index-DaEqcP4z.js 2.7 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077
  1. var VQ=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var KVe=VQ((da,ha)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const r of i)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const r={};return i.integrity&&(r.integrity=i.integrity),i.referrerPolicy&&(r.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?r.credentials="include":i.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(i){if(i.ep)return;i.ep=!0;const r=n(i);fetch(i.href,r)}})();/**
  2. * @vue/shared v3.5.13
  3. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  4. * @license MIT
  5. **//*! #__NO_SIDE_EFFECTS__ */function j1(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ds={},lE=[],ro=()=>{},GQ=()=>!1,GM=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Q1=e=>e.startsWith("onUpdate:"),Ai=Object.assign,q1=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},WQ=Object.prototype.hasOwnProperty,zn=(e,t)=>WQ.call(e,t),at=Array.isArray,aE=e=>n$(e)==="[object Map]",WM=e=>n$(e)==="[object Set]",hp=e=>n$(e)==="[object Date]",Ut=e=>typeof e=="function",Dt=e=>typeof e=="string",Vc=e=>typeof e=="symbol",Tn=e=>e!==null&&typeof e=="object",oy=e=>(Tn(e)||Ut(e))&&Ut(e.then)&&Ut(e.catch),LW=Object.prototype.toString,n$=e=>LW.call(e),XQ=e=>n$(e).slice(8,-1),sy=e=>n$(e)==="[object Object]",J1=e=>Dt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,PS=j1(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),XM=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},zQ=/-(\w)/g,ll=XM(e=>e.replace(zQ,(t,n)=>n?n.toUpperCase():"")),YQ=/\B([A-Z])/g,Ih=XM(e=>e.replace(YQ,"-$1").toLowerCase()),o$=XM(e=>e.charAt(0).toUpperCase()+e.slice(1)),DS=XM(e=>e?`on${o$(e)}`:""),rp=(e,t)=>!Object.is(e,t),MR=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},wW=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},ok=e=>{const t=parseFloat(e);return isNaN(t)?e:t},KQ=e=>{const t=Dt(e)?Number(e):NaN;return isNaN(t)?e:t};let vB;const zM=()=>vB||(vB=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Bt(e){if(at(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],i=Dt(s)?JQ(s):Bt(s);if(i)for(const r in i)t[r]=i[r]}return t}else if(Dt(e)||Tn(e))return e}const jQ=/;(?![^(]*\))/g,QQ=/:([^]+)/,qQ=/\/\*[^]*?\*\//g;function JQ(e){const t={};return e.replace(qQ,"").split(jQ).forEach(n=>{if(n){const s=n.split(QQ);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function z(e){let t="";if(Dt(e))t=e;else if(at(e))for(let n=0;n<e.length;n++){const s=z(e[n]);s&&(t+=s+" ")}else if(Tn(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function qa(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Dt(t)&&(e.class=z(t)),n&&(e.style=Bt(n)),e}const ZQ="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",eq=j1(ZQ);function kW(e){return!!e||e===""}function tq(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=yE(e[s],t[s]);return n}function yE(e,t){if(e===t)return!0;let n=hp(e),s=hp(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Vc(e),s=Vc(t),n||s)return e===t;if(n=at(e),s=at(t),n||s)return n&&s?tq(e,t):!1;if(n=Tn(e),s=Tn(t),n||s){if(!n||!s)return!1;const i=Object.keys(e).length,r=Object.keys(t).length;if(i!==r)return!1;for(const a in e){const c=e.hasOwnProperty(a),u=t.hasOwnProperty(a);if(c&&!u||!c&&u||!yE(e[a],t[a]))return!1}}return String(e)===String(t)}function NW(e,t){return e.findIndex(n=>yE(n,t))}const PW=e=>!!(e&&e.__v_isRef===!0),Ke=e=>Dt(e)?e:e==null?"":at(e)||Tn(e)&&(e.toString===LW||!Ut(e.toString))?PW(e)?Ke(e.value):JSON.stringify(e,DW,2):String(e),DW=(e,t)=>PW(t)?DW(e,t.value):aE(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,i],r)=>(n[CL(s,r)+" =>"]=i,n),{})}:WM(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>CL(n))}:Vc(t)?CL(t):Tn(t)&&!at(t)&&!sy(t)?String(t):t,CL=(e,t="")=>{var n;return Vc(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
  6. * @vue/reactivity v3.5.13
  7. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  8. * @license MIT
  9. **/let Zr;class xW{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Zr,!t&&Zr&&(this.index=(Zr.scopes||(Zr.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Zr;try{return Zr=this,t()}finally{Zr=n}}}on(){Zr=this}off(){Zr=this.parent}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function YM(e){return new xW(e)}function Z1(){return Zr}function eP(e,t=!1){Zr&&Zr.cleanups.push(e)}let Ts;const ML=new WeakSet;class BW{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Zr&&Zr.active&&Zr.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ML.has(this)&&(ML.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||UW(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,bB(this),HW(this);const t=Ts,n=Uc;Ts=this,Uc=!0;try{return this.fn()}finally{VW(this),Ts=t,Uc=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)oP(t);this.deps=this.depsTail=void 0,bB(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ML.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){sk(this)&&this.run()}get dirty(){return sk(this)}}let FW=0,xS,BS;function UW(e,t=!1){if(e.flags|=8,t){e.next=BS,BS=e;return}e.next=xS,xS=e}function tP(){FW++}function nP(){if(--FW>0)return;if(BS){let t=BS;for(BS=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;xS;){let t=xS;for(xS=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function HW(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function VW(e){let t,n=e.depsTail,s=n;for(;s;){const i=s.prevDep;s.version===-1?(s===n&&(n=i),oP(s),nq(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=i}e.deps=t,e.depsTail=n}function sk(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(GW(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function GW(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===iy))return;e.globalVersion=iy;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!sk(e)){e.flags&=-3;return}const n=Ts,s=Uc;Ts=e,Uc=!0;try{HW(e);const i=e.fn(e._value);(t.version===0||rp(i,e._value))&&(e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Ts=n,Uc=s,VW(e),e.flags&=-3}}function oP(e,t=!1){const{dep:n,prevSub:s,nextSub:i}=e;if(s&&(s.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)oP(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function nq(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Uc=!0;const WW=[];function Ip(){WW.push(Uc),Uc=!1}function Rp(){const e=WW.pop();Uc=e===void 0?!0:e}function bB(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ts;Ts=void 0;try{t()}finally{Ts=n}}}let iy=0,oq=class{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}};class KM{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!Ts||!Uc||Ts===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ts)n=this.activeLink=new oq(Ts,this),Ts.deps?(n.prevDep=Ts.depsTail,Ts.depsTail.nextDep=n,Ts.depsTail=n):Ts.deps=Ts.depsTail=n,XW(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Ts.depsTail,n.nextDep=void 0,Ts.depsTail.nextDep=n,Ts.depsTail=n,Ts.deps===n&&(Ts.deps=s)}return n}trigger(t){this.version++,iy++,this.notify(t)}notify(t){tP();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{nP()}}}function XW(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)XW(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const PC=new WeakMap,_m=Symbol(""),ik=Symbol(""),ry=Symbol("");function Cr(e,t,n){if(Uc&&Ts){let s=PC.get(e);s||PC.set(e,s=new Map);let i=s.get(n);i||(s.set(n,i=new KM),i.map=s,i.key=n),i.track()}}function ch(e,t,n,s,i,r){const a=PC.get(e);if(!a){iy++;return}const c=u=>{u&&u.trigger()};if(tP(),t==="clear")a.forEach(c);else{const u=at(e),h=u&&J1(n);if(u&&n==="length"){const f=Number(s);a.forEach((p,_)=>{(_==="length"||_===ry||!Vc(_)&&_>=f)&&c(p)})}else switch((n!==void 0||a.has(void 0))&&c(a.get(n)),h&&c(a.get(ry)),t){case"add":u?h&&c(a.get("length")):(c(a.get(_m)),aE(e)&&c(a.get(ik)));break;case"delete":u||(c(a.get(_m)),aE(e)&&c(a.get(ik)));break;case"set":aE(e)&&c(a.get(_m));break}}nP()}function sq(e,t){const n=PC.get(e);return n&&n.get(t)}function DT(e){const t=uo(e);return t===e?t:(Cr(t,"iterate",ry),nc(e)?t:t.map(Mr))}function jM(e){return Cr(e=uo(e),"iterate",ry),e}const iq={__proto__:null,[Symbol.iterator](){return AL(this,Symbol.iterator,Mr)},concat(...e){return DT(this).concat(...e.map(t=>at(t)?DT(t):t))},entries(){return AL(this,"entries",e=>(e[1]=Mr(e[1]),e))},every(e,t){return Qd(this,"every",e,t,void 0,arguments)},filter(e,t){return Qd(this,"filter",e,t,n=>n.map(Mr),arguments)},find(e,t){return Qd(this,"find",e,t,Mr,arguments)},findIndex(e,t){return Qd(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Qd(this,"findLast",e,t,Mr,arguments)},findLastIndex(e,t){return Qd(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Qd(this,"forEach",e,t,void 0,arguments)},includes(...e){return LL(this,"includes",e)},indexOf(...e){return LL(this,"indexOf",e)},join(e){return DT(this).join(e)},lastIndexOf(...e){return LL(this,"lastIndexOf",e)},map(e,t){return Qd(this,"map",e,t,void 0,arguments)},pop(){return lS(this,"pop")},push(...e){return lS(this,"push",e)},reduce(e,...t){return OB(this,"reduce",e,t)},reduceRight(e,...t){return OB(this,"reduceRight",e,t)},shift(){return lS(this,"shift")},some(e,t){return Qd(this,"some",e,t,void 0,arguments)},splice(...e){return lS(this,"splice",e)},toReversed(){return DT(this).toReversed()},toSorted(e){return DT(this).toSorted(e)},toSpliced(...e){return DT(this).toSpliced(...e)},unshift(...e){return lS(this,"unshift",e)},values(){return AL(this,"values",Mr)}};function AL(e,t,n){const s=jM(e),i=s[t]();return s!==e&&!nc(e)&&(i._next=i.next,i.next=()=>{const r=i._next();return r.value&&(r.value=n(r.value)),r}),i}const rq=Array.prototype;function Qd(e,t,n,s,i,r){const a=jM(e),c=a!==e&&!nc(e),u=a[t];if(u!==rq[t]){const p=u.apply(e,r);return c?Mr(p):p}let h=n;a!==e&&(c?h=function(p,_){return n.call(this,Mr(p),_,e)}:n.length>2&&(h=function(p,_){return n.call(this,p,_,e)}));const f=u.call(a,h,s);return c&&i?i(f):f}function OB(e,t,n,s){const i=jM(e);let r=n;return i!==e&&(nc(e)?n.length>3&&(r=function(a,c,u){return n.call(this,a,c,u,e)}):r=function(a,c,u){return n.call(this,a,Mr(c),u,e)}),i[t](r,...s)}function LL(e,t,n){const s=uo(e);Cr(s,"iterate",ry);const i=s[t](...n);return(i===-1||i===!1)&&lP(n[0])?(n[0]=uo(n[0]),s[t](...n)):i}function lS(e,t,n=[]){Ip(),tP();const s=uo(e)[t].apply(e,n);return nP(),Rp(),s}const lq=j1("__proto__,__v_isRef,__isVue"),zW=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Vc));function aq(e){Vc(e)||(e=String(e));const t=uo(this);return Cr(t,"has",e),t.hasOwnProperty(e)}class YW{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const i=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return r;if(n==="__v_raw")return s===(i?r?Tq:qW:r?QW:jW).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const a=at(t);if(!i){let u;if(a&&(u=iq[n]))return u;if(n==="hasOwnProperty")return aq}const c=Reflect.get(t,n,po(t)?t:s);return(Vc(n)?zW.has(n):lq(n))||(i||Cr(t,"get",n),r)?c:po(c)?a&&J1(n)?c:c.value:Tn(c)?i?ov(c):Kn(c):c}}class KW extends YW{constructor(t=!1){super(!1,t)}set(t,n,s,i){let r=t[n];if(!this._isShallow){const u=Im(r);if(!nc(s)&&!Im(s)&&(r=uo(r),s=uo(s)),!at(t)&&po(r)&&!po(s))return u?!1:(r.value=s,!0)}const a=at(t)&&J1(n)?Number(n)<t.length:zn(t,n),c=Reflect.set(t,n,s,po(t)?t:i);return t===uo(i)&&(a?rp(s,r)&&ch(t,"set",n,s):ch(t,"add",n,s)),c}deleteProperty(t,n){const s=zn(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&s&&ch(t,"delete",n,void 0),i}has(t,n){const s=Reflect.has(t,n);return(!Vc(n)||!zW.has(n))&&Cr(t,"has",n),s}ownKeys(t){return Cr(t,"iterate",at(t)?"length":_m),Reflect.ownKeys(t)}}class cq extends YW{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const uq=new KW,dq=new cq,hq=new KW(!0),rk=e=>e,L0=e=>Reflect.getPrototypeOf(e);function fq(e,t,n){return function(...s){const i=this.__v_raw,r=uo(i),a=aE(r),c=e==="entries"||e===Symbol.iterator&&a,u=e==="keys"&&a,h=i[e](...s),f=n?rk:t?lk:Mr;return!t&&Cr(r,"iterate",u?ik:_m),{next(){const{value:p,done:_}=h.next();return _?{value:p,done:_}:{value:c?[f(p[0]),f(p[1])]:f(p),done:_}},[Symbol.iterator](){return this}}}}function w0(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function pq(e,t){const n={get(i){const r=this.__v_raw,a=uo(r),c=uo(i);e||(rp(i,c)&&Cr(a,"get",i),Cr(a,"get",c));const{has:u}=L0(a),h=t?rk:e?lk:Mr;if(u.call(a,i))return h(r.get(i));if(u.call(a,c))return h(r.get(c));r!==a&&r.get(i)},get size(){const i=this.__v_raw;return!e&&Cr(uo(i),"iterate",_m),Reflect.get(i,"size",i)},has(i){const r=this.__v_raw,a=uo(r),c=uo(i);return e||(rp(i,c)&&Cr(a,"has",i),Cr(a,"has",c)),i===c?r.has(i):r.has(i)||r.has(c)},forEach(i,r){const a=this,c=a.__v_raw,u=uo(c),h=t?rk:e?lk:Mr;return!e&&Cr(u,"iterate",_m),c.forEach((f,p)=>i.call(r,h(f),h(p),a))}};return Ai(n,e?{add:w0("add"),set:w0("set"),delete:w0("delete"),clear:w0("clear")}:{add(i){!t&&!nc(i)&&!Im(i)&&(i=uo(i));const r=uo(this);return L0(r).has.call(r,i)||(r.add(i),ch(r,"add",i,i)),this},set(i,r){!t&&!nc(r)&&!Im(r)&&(r=uo(r));const a=uo(this),{has:c,get:u}=L0(a);let h=c.call(a,i);h||(i=uo(i),h=c.call(a,i));const f=u.call(a,i);return a.set(i,r),h?rp(r,f)&&ch(a,"set",i,r):ch(a,"add",i,r),this},delete(i){const r=uo(this),{has:a,get:c}=L0(r);let u=a.call(r,i);u||(i=uo(i),u=a.call(r,i)),c&&c.call(r,i);const h=r.delete(i);return u&&ch(r,"delete",i,void 0),h},clear(){const i=uo(this),r=i.size!==0,a=i.clear();return r&&ch(i,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=fq(i,e,t)}),n}function sP(e,t){const n=pq(e,t);return(s,i,r)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?s:Reflect.get(zn(n,i)&&i in s?n:s,i,r)}const gq={get:sP(!1,!1)},mq={get:sP(!1,!0)},_q={get:sP(!0,!1)},jW=new WeakMap,QW=new WeakMap,qW=new WeakMap,Tq=new WeakMap;function Eq(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function vq(e){return e.__v_skip||!Object.isExtensible(e)?0:Eq(XQ(e))}function Kn(e){return Im(e)?e:rP(e,!1,uq,gq,jW)}function iP(e){return rP(e,!1,hq,mq,QW)}function ov(e){return rP(e,!0,dq,_q,qW)}function rP(e,t,n,s,i){if(!Tn(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=i.get(e);if(r)return r;const a=vq(e);if(a===0)return e;const c=new Proxy(e,a===2?s:n);return i.set(e,c),c}function lp(e){return Im(e)?lp(e.__v_raw):!!(e&&e.__v_isReactive)}function Im(e){return!!(e&&e.__v_isReadonly)}function nc(e){return!!(e&&e.__v_isShallow)}function lP(e){return e?!!e.__v_raw:!1}function uo(e){const t=e&&e.__v_raw;return t?uo(t):e}function zu(e){return!zn(e,"__v_skip")&&Object.isExtensible(e)&&wW(e,"__v_skip",!0),e}const Mr=e=>Tn(e)?Kn(e):e,lk=e=>Tn(e)?ov(e):e;function po(e){return e?e.__v_isRef===!0:!1}function K(e){return JW(e,!1)}function lo(e){return JW(e,!0)}function JW(e,t){return po(e)?e:new bq(e,t)}class bq{constructor(t,n){this.dep=new KM,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:uo(t),this._value=n?t:Mr(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||nc(t)||Im(t);t=s?t:uo(t),rp(t,n)&&(this._rawValue=t,this._value=s?t:Mr(t),this.dep.trigger())}}function g(e){return po(e)?e.value:e}const Oq={get:(e,t,n)=>t==="__v_raw"?e:g(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const i=e[t];return po(i)&&!po(n)?(i.value=n,!0):Reflect.set(e,t,n,s)}};function ZW(e){return lp(e)?e:new Proxy(e,Oq)}class Sq{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new KM,{get:s,set:i}=t(n.track.bind(n),n.trigger.bind(n));this._get=s,this._set=i}get value(){return this._value=this._get()}set value(t){this._set(t)}}function yq(e){return new Sq(e)}function fi(e){const t=at(e)?new Array(e.length):{};for(const n in e)t[n]=e3(e,n);return t}class $q{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return sq(uo(this._object),this._key)}}class Iq{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function oo(e,t,n){return po(e)?e:Ut(e)?new Iq(e):Tn(e)&&arguments.length>1?e3(e,t,n):K(e)}function e3(e,t,n){const s=e[t];return po(s)?s:new $q(e,t,n)}class Rq{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new KM(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=iy-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Ts!==this)return UW(this,!0),!0}get value(){const t=this.dep.track();return GW(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Cq(e,t,n=!1){let s,i;return Ut(e)?s=e:(s=e.get,i=e.set),new Rq(s,i,n)}const k0={},DC=new WeakMap;let em;function Mq(e,t=!1,n=em){if(n){let s=DC.get(n);s||DC.set(n,s=[]),s.push(e)}}function Aq(e,t,n=ds){const{immediate:s,deep:i,once:r,scheduler:a,augmentJob:c,call:u}=n,h=R=>i?R:nc(R)||i===!1||i===0?uh(R,1):uh(R);let f,p,_,E,v=!1,b=!1;if(po(e)?(p=()=>e.value,v=nc(e)):lp(e)?(p=()=>h(e),v=!0):at(e)?(b=!0,v=e.some(R=>lp(R)||nc(R)),p=()=>e.map(R=>{if(po(R))return R.value;if(lp(R))return h(R);if(Ut(R))return u?u(R,2):R()})):Ut(e)?t?p=u?()=>u(e,2):e:p=()=>{if(_){Ip();try{_()}finally{Rp()}}const R=em;em=f;try{return u?u(e,3,[E]):e(E)}finally{em=R}}:p=ro,t&&i){const R=p,w=i===!0?1/0:i;p=()=>uh(R(),w)}const y=Z1(),S=()=>{f.stop(),y&&y.active&&q1(y.effects,f)};if(r&&t){const R=t;t=(...w)=>{R(...w),S()}}let L=b?new Array(e.length).fill(k0):k0;const I=R=>{if(!(!(f.flags&1)||!f.dirty&&!R))if(t){const w=f.run();if(i||v||(b?w.some((k,D)=>rp(k,L[D])):rp(w,L))){_&&_();const k=em;em=f;try{const D=[w,L===k0?void 0:b&&L[0]===k0?[]:L,E];u?u(t,3,D):t(...D),L=w}finally{em=k}}}else f.run()};return c&&c(I),f=new BW(p),f.scheduler=a?()=>a(I,!1):I,E=R=>Mq(R,!1,f),_=f.onStop=()=>{const R=DC.get(f);if(R){if(u)u(R,4);else for(const w of R)w();DC.delete(f)}},t?s?I(!0):L=f.run():a?a(I.bind(null,!0),!0):f.run(),S.pause=f.pause.bind(f),S.resume=f.resume.bind(f),S.stop=S,S}function uh(e,t=1/0,n){if(t<=0||!Tn(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,po(e))uh(e.value,t,n);else if(at(e))for(let s=0;s<e.length;s++)uh(e[s],t,n);else if(WM(e)||aE(e))e.forEach(s=>{uh(s,t,n)});else if(sy(e)){for(const s in e)uh(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&uh(e[s],t,n)}return e}/**
  10. * @vue/runtime-core v3.5.13
  11. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  12. * @license MIT
  13. **/function s$(e,t,n,s){try{return s?e(...s):e()}catch(i){QM(i,t,n)}}function Gc(e,t,n,s){if(Ut(e)){const i=s$(e,t,n,s);return i&&oy(i)&&i.catch(r=>{QM(r,t,n)}),i}if(at(e)){const i=[];for(let r=0;r<e.length;r++)i.push(Gc(e[r],t,n,s));return i}}function QM(e,t,n,s=!0){const i=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||ds;if(t){let c=t.parent;const u=t.proxy,h=`https://vuejs.org/error-reference/#runtime-${n}`;for(;c;){const f=c.ec;if(f){for(let p=0;p<f.length;p++)if(f[p](e,u,h)===!1)return}c=c.parent}if(r){Ip(),s$(r,null,10,[e,u,h]),Rp();return}}Lq(e,n,i,s,a)}function Lq(e,t,n,s=!0,i=!1){if(i)throw e;console.error(e)}const el=[];let Pu=-1;const cE=[];let zf=null,XT=0;const t3=Promise.resolve();let xC=null;function Vt(e){const t=xC||t3;return e?t.then(this?e.bind(this):e):t}function wq(e){let t=Pu+1,n=el.length;for(;t<n;){const s=t+n>>>1,i=el[s],r=ly(i);r<e||r===e&&i.flags&2?t=s+1:n=s}return t}function aP(e){if(!(e.flags&1)){const t=ly(e),n=el[el.length-1];!n||!(e.flags&2)&&t>=ly(n)?el.push(e):el.splice(wq(t),0,e),e.flags|=1,n3()}}function n3(){xC||(xC=t3.then(s3))}function kq(e){at(e)?cE.push(...e):zf&&e.id===-1?zf.splice(XT+1,0,e):e.flags&1||(cE.push(e),e.flags|=1),n3()}function SB(e,t,n=Pu+1){for(;n<el.length;n++){const s=el[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;el.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function o3(e){if(cE.length){const t=[...new Set(cE)].sort((n,s)=>ly(n)-ly(s));if(cE.length=0,zf){zf.push(...t);return}for(zf=t,XT=0;XT<zf.length;XT++){const n=zf[XT];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}zf=null,XT=0}}const ly=e=>e.id==null?e.flags&2?-1:1/0:e.id;function s3(e){try{for(Pu=0;Pu<el.length;Pu++){const t=el[Pu];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),s$(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Pu<el.length;Pu++){const t=el[Pu];t&&(t.flags&=-2)}Pu=-1,el.length=0,o3(),xC=null,(el.length||cE.length)&&s3()}}let Ri=null,i3=null;function BC(e){const t=Ri;return Ri=e,i3=e&&e.type.__scopeId||null,t}function de(e,t=Ri,n){if(!t||e._n)return e;const s=(...i)=>{s._d&&xB(-1);const r=BC(t);let a;try{a=e(...i)}finally{BC(r),s._d&&xB(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function an(e,t){if(Ri===null)return e;const n=nA(Ri),s=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[r,a,c,u=ds]=t[i];r&&(Ut(r)&&(r={mounted:r,updated:r}),r.deep&&uh(a),s.push({dir:r,instance:n,value:a,oldValue:void 0,arg:c,modifiers:u}))}return e}function Kg(e,t,n,s){const i=e.dirs,r=t&&t.dirs;for(let a=0;a<i.length;a++){const c=i[a];r&&(c.oldValue=r[a].value);let u=c.dir[s];u&&(Ip(),Gc(u,n,8,[e.el,c,e,t]),Rp())}}const r3=Symbol("_vte"),l3=e=>e.__isTeleport,FS=e=>e&&(e.disabled||e.disabled===""),yB=e=>e&&(e.defer||e.defer===""),$B=e=>typeof SVGElement<"u"&&e instanceof SVGElement,IB=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ak=(e,t)=>{const n=e&&e.to;return Dt(n)?t?t(n):null:n},a3={name:"Teleport",__isTeleport:!0,process(e,t,n,s,i,r,a,c,u,h){const{mc:f,pc:p,pbc:_,o:{insert:E,querySelector:v,createText:b,createComment:y}}=h,S=FS(t.props);let{shapeFlag:L,children:I,dynamicChildren:R}=t;if(e==null){const w=t.el=b(""),k=t.anchor=b("");E(w,n,s),E(k,n,s);const D=(B,F)=>{L&16&&(i&&i.isCE&&(i.ce._teleportTarget=B),f(I,B,F,i,r,a,c,u))},P=()=>{const B=t.target=ak(t.props,v),F=c3(B,t,b,E);B&&(a!=="svg"&&$B(B)?a="svg":a!=="mathml"&&IB(B)&&(a="mathml"),S||(D(B,F),AR(t,!1)))};S&&(D(n,k),AR(t,!0)),yB(t.props)?Jr(()=>{P(),t.el.__isMounted=!0},r):P()}else{if(yB(t.props)&&!e.el.__isMounted){Jr(()=>{a3.process(e,t,n,s,i,r,a,c,u,h),delete e.el.__isMounted},r);return}t.el=e.el,t.targetStart=e.targetStart;const w=t.anchor=e.anchor,k=t.target=e.target,D=t.targetAnchor=e.targetAnchor,P=FS(e.props),B=P?n:k,F=P?w:D;if(a==="svg"||$B(k)?a="svg":(a==="mathml"||IB(k))&&(a="mathml"),R?(_(e.dynamicChildren,R,B,i,r,a,c),pP(e,t,!0)):u||p(e,t,B,F,i,r,a,c,!1),S)P?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):N0(t,n,w,h,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const X=t.target=ak(t.props,v);X&&N0(t,X,null,h,0)}else P&&N0(t,k,D,h,1);AR(t,S)}},remove(e,t,n,{um:s,o:{remove:i}},r){const{shapeFlag:a,children:c,anchor:u,targetStart:h,targetAnchor:f,target:p,props:_}=e;if(p&&(i(h),i(f)),r&&i(u),a&16){const E=r||!FS(_);for(let v=0;v<c.length;v++){const b=c[v];s(b,t,n,E,!!b.dynamicChildren)}}},move:N0,hydrate:Nq};function N0(e,t,n,{o:{insert:s},m:i},r=2){r===0&&s(e.targetAnchor,t,n);const{el:a,anchor:c,shapeFlag:u,children:h,props:f}=e,p=r===2;if(p&&s(a,t,n),(!p||FS(f))&&u&16)for(let _=0;_<h.length;_++)i(h[_],t,n,2);p&&s(c,t,n)}function Nq(e,t,n,s,i,r,{o:{nextSibling:a,parentNode:c,querySelector:u,insert:h,createText:f}},p){const _=t.target=ak(t.props,u);if(_){const E=FS(t.props),v=_._lpa||_.firstChild;if(t.shapeFlag&16)if(E)t.anchor=p(a(e),t,c(e),n,s,i,r),t.targetStart=v,t.targetAnchor=v&&a(v);else{t.anchor=a(e);let b=v;for(;b;){if(b&&b.nodeType===8){if(b.data==="teleport start anchor")t.targetStart=b;else if(b.data==="teleport anchor"){t.targetAnchor=b,_._lpa=t.targetAnchor&&a(t.targetAnchor);break}}b=a(b)}t.targetAnchor||c3(_,t,f,h),p(v&&a(v),t,_,n,s,i,r)}AR(t,E)}return t.anchor&&a(t.anchor)}const Pq=a3;function AR(e,t){const n=e.ctx;if(n&&n.ut){let s,i;for(t?(s=e.el,i=e.anchor):(s=e.targetStart,i=e.targetAnchor);s&&s!==i;)s.nodeType===1&&s.setAttribute("data-v-owner",n.uid),s=s.nextSibling;n.ut()}}function c3(e,t,n,s){const i=t.targetStart=n(""),r=t.targetAnchor=n("");return i[r3]=r,e&&(s(i,e),s(r,e)),r}const Yf=Symbol("_leaveCb"),P0=Symbol("_enterCb");function u3(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return rn(()=>{e.isMounted=!0}),vo(()=>{e.isUnmounting=!0}),e}const Xa=[Function,Array],d3={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Xa,onEnter:Xa,onAfterEnter:Xa,onEnterCancelled:Xa,onBeforeLeave:Xa,onLeave:Xa,onAfterLeave:Xa,onLeaveCancelled:Xa,onBeforeAppear:Xa,onAppear:Xa,onAfterAppear:Xa,onAppearCancelled:Xa},h3=e=>{const t=e.subTree;return t.component?h3(t.component):t},Dq={name:"BaseTransition",props:d3,setup(e,{slots:t}){const n=pn(),s=u3();return()=>{const i=t.default&&cP(t.default(),!0);if(!i||!i.length)return;const r=f3(i),a=uo(e),{mode:c}=a;if(s.isLeaving)return wL(r);const u=RB(r);if(!u)return wL(r);let h=ay(u,a,s,n,p=>h=p);u.type!==Ii&&Rm(u,h);let f=n.subTree&&RB(n.subTree);if(f&&f.type!==Ii&&!tm(u,f)&&h3(n).type!==Ii){let p=ay(f,a,s,n);if(Rm(f,p),c==="out-in"&&u.type!==Ii)return s.isLeaving=!0,p.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete p.afterLeave,f=void 0},wL(r);c==="in-out"&&u.type!==Ii?p.delayLeave=(_,E,v)=>{const b=p3(s,f);b[String(f.key)]=f,_[Yf]=()=>{E(),_[Yf]=void 0,delete h.delayedLeave,f=void 0},h.delayedLeave=()=>{v(),delete h.delayedLeave,f=void 0}}:f=void 0}else f&&(f=void 0);return r}}};function f3(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ii){t=n;break}}return t}const xq=Dq;function p3(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function ay(e,t,n,s,i){const{appear:r,mode:a,persisted:c=!1,onBeforeEnter:u,onEnter:h,onAfterEnter:f,onEnterCancelled:p,onBeforeLeave:_,onLeave:E,onAfterLeave:v,onLeaveCancelled:b,onBeforeAppear:y,onAppear:S,onAfterAppear:L,onAppearCancelled:I}=t,R=String(e.key),w=p3(n,e),k=(B,F)=>{B&&Gc(B,s,9,F)},D=(B,F)=>{const X=F[1];k(B,F),at(B)?B.every(G=>G.length<=1)&&X():B.length<=1&&X()},P={mode:a,persisted:c,beforeEnter(B){let F=u;if(!n.isMounted)if(r)F=y||u;else return;B[Yf]&&B[Yf](!0);const X=w[R];X&&tm(e,X)&&X.el[Yf]&&X.el[Yf](),k(F,[B])},enter(B){let F=h,X=f,G=p;if(!n.isMounted)if(r)F=S||h,X=L||f,G=I||p;else return;let re=!1;const _e=B[P0]=J=>{re||(re=!0,J?k(G,[B]):k(X,[B]),P.delayedLeave&&P.delayedLeave(),B[P0]=void 0)};F?D(F,[B,_e]):_e()},leave(B,F){const X=String(e.key);if(B[P0]&&B[P0](!0),n.isUnmounting)return F();k(_,[B]);let G=!1;const re=B[Yf]=_e=>{G||(G=!0,F(),_e?k(b,[B]):k(v,[B]),B[Yf]=void 0,w[X]===e&&delete w[X])};w[X]=e,E?D(E,[B,re]):re()},clone(B){const F=ay(B,t,n,s,i);return i&&i(F),F}};return P}function wL(e){if(qM(e))return e=Eh(e),e.children=null,e}function RB(e){if(!qM(e))return l3(e.type)&&e.children?f3(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Ut(n.default))return n.default()}}function Rm(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Rm(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function cP(e,t=!1,n){let s=[],i=0;for(let r=0;r<e.length;r++){let a=e[r];const c=n==null?a.key:String(n)+String(a.key!=null?a.key:r);a.type===Lt?(a.patchFlag&128&&i++,s=s.concat(cP(a.children,t,c))):(t||a.type!==Ii)&&s.push(c!=null?Eh(a,{key:c}):a)}if(i>1)for(let r=0;r<s.length;r++)s[r].patchFlag=-2;return s}/*! #__NO_SIDE_EFFECTS__ */function Re(e,t){return Ut(e)?Ai({name:e.name},t,{setup:e}):e}function g3(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function FC(e,t,n,s,i=!1){if(at(e)){e.forEach((v,b)=>FC(v,t&&(at(t)?t[b]:t),n,s,i));return}if(uE(s)&&!i){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&FC(e,t,n,s.component.subTree);return}const r=s.shapeFlag&4?nA(s.component):s.el,a=i?null:r,{i:c,r:u}=e,h=t&&t.r,f=c.refs===ds?c.refs={}:c.refs,p=c.setupState,_=uo(p),E=p===ds?()=>!1:v=>zn(_,v);if(h!=null&&h!==u&&(Dt(h)?(f[h]=null,E(h)&&(p[h]=null)):po(h)&&(h.value=null)),Ut(u))s$(u,c,12,[a,f]);else{const v=Dt(u),b=po(u);if(v||b){const y=()=>{if(e.f){const S=v?E(u)?p[u]:f[u]:u.value;i?at(S)&&q1(S,r):at(S)?S.includes(r)||S.push(r):v?(f[u]=[r],E(u)&&(p[u]=f[u])):(u.value=[r],e.k&&(f[e.k]=u.value))}else v?(f[u]=a,E(u)&&(p[u]=a)):b&&(u.value=a,e.k&&(f[e.k]=a))};a?(y.id=-1,Jr(y,n)):y()}}}zM().requestIdleCallback;zM().cancelIdleCallback;const uE=e=>!!e.type.__asyncLoader,qM=e=>e.type.__isKeepAlive;function uP(e,t){_3(e,"a",t)}function m3(e,t){_3(e,"da",t)}function _3(e,t,n=Fi){const s=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(JM(t,s,n),n){let i=n.parent;for(;i&&i.parent;)qM(i.parent.vnode)&&Bq(s,t,n,i),i=i.parent}}function Bq(e,t,n,s){const i=JM(t,e,s,!0);Ch(()=>{q1(s[t],i)},n)}function JM(e,t,n=Fi,s=!1){if(n){const i=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...a)=>{Ip();const c=i$(n),u=Gc(t,n,e,a);return c(),Rp(),u});return s?i.unshift(r):i.push(r),r}}const Rh=e=>(t,n=Fi)=>{(!uy||e==="sp")&&JM(e,(...s)=>t(...s),n)},ZM=Rh("bm"),rn=Rh("m"),T3=Rh("bu"),nd=Rh("u"),vo=Rh("bum"),Ch=Rh("um"),Fq=Rh("sp"),Uq=Rh("rtg"),Hq=Rh("rtc");function Vq(e,t=Fi){JM("ec",e,t)}const dP="components",Gq="directives";function Ot(e,t){return hP(dP,e,!0,t)||e}const E3=Symbol.for("v-ndc");function yn(e){return Dt(e)?hP(dP,e,!1)||e:e||E3}function eA(e){return hP(Gq,e)}function hP(e,t,n=!0,s=!1){const i=Ri||Fi;if(i){const r=i.type;if(e===dP){const c=C9(r,!1);if(c&&(c===t||c===ll(t)||c===o$(ll(t))))return r}const a=CB(i[e]||r[e],t)||CB(i.appContext[e],t);return!a&&s?r:a}}function CB(e,t){return e&&(e[t]||e[ll(t)]||e[o$(ll(t))])}function In(e,t,n,s){let i;const r=n,a=at(e);if(a||Dt(e)){const c=a&&lp(e);let u=!1;c&&(u=!nc(e),e=jM(e)),i=new Array(e.length);for(let h=0,f=e.length;h<f;h++)i[h]=t(u?Mr(e[h]):e[h],h,void 0,r)}else if(typeof e=="number"){i=new Array(e);for(let c=0;c<e;c++)i[c]=t(c+1,c,void 0,r)}else if(Tn(e))if(e[Symbol.iterator])i=Array.from(e,(c,u)=>t(c,u,void 0,r));else{const c=Object.keys(e);i=new Array(c.length);for(let u=0,h=c.length;u<h;u++){const f=c[u];i[u]=t(e[f],f,u,r)}}else i=[];return i}function ic(e,t){for(let n=0;n<t.length;n++){const s=t[n];if(at(s))for(let i=0;i<s.length;i++)e[s[i].name]=s[i].fn;else s&&(e[s.name]=s.key?(...i)=>{const r=s.fn(...i);return r&&(r.key=s.key),r}:s.fn)}return e}function He(e,t,n={},s,i){if(Ri.ce||Ri.parent&&uE(Ri.parent)&&Ri.parent.ce)return t!=="default"&&(n.name=t),H(),Ye(Lt,null,[oe("slot",n,s&&s())],64);let r=e[t];r&&r._c&&(r._d=!1),H();const a=r&&v3(r(n)),c=n.key||a&&a.key,u=Ye(Lt,{key:(c&&!Vc(c)?c:`_${t}`)+(!a&&s?"_fb":"")},a||(s?s():[]),a&&e._===1?64:-2);return u.scopeId&&(u.slotScopeIds=[u.scopeId+"-s"]),r&&r._c&&(r._d=!0),u}function v3(e){return e.some(t=>zo(t)?!(t.type===Ii||t.type===Lt&&!v3(t.children)):!0)?e:null}function Wq(e,t){const n={};for(const s in e)n[DS(s)]=e[s];return n}const ck=e=>e?U3(e)?nA(e):ck(e.parent):null,US=Ai(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ck(e.parent),$root:e=>ck(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>S3(e),$forceUpdate:e=>e.f||(e.f=()=>{aP(e.update)}),$nextTick:e=>e.n||(e.n=Vt.bind(e.proxy)),$watch:e=>h9.bind(e)}),kL=(e,t)=>e!==ds&&!e.__isScriptSetup&&zn(e,t),Xq={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:i,props:r,accessCache:a,type:c,appContext:u}=e;let h;if(t[0]!=="$"){const E=a[t];if(E!==void 0)switch(E){case 1:return s[t];case 2:return i[t];case 4:return n[t];case 3:return r[t]}else{if(kL(s,t))return a[t]=1,s[t];if(i!==ds&&zn(i,t))return a[t]=2,i[t];if((h=e.propsOptions[0])&&zn(h,t))return a[t]=3,r[t];if(n!==ds&&zn(n,t))return a[t]=4,n[t];uk&&(a[t]=0)}}const f=US[t];let p,_;if(f)return t==="$attrs"&&Cr(e.attrs,"get",""),f(e);if((p=c.__cssModules)&&(p=p[t]))return p;if(n!==ds&&zn(n,t))return a[t]=4,n[t];if(_=u.config.globalProperties,zn(_,t))return _[t]},set({_:e},t,n){const{data:s,setupState:i,ctx:r}=e;return kL(i,t)?(i[t]=n,!0):s!==ds&&zn(s,t)?(s[t]=n,!0):zn(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:i,propsOptions:r}},a){let c;return!!n[a]||e!==ds&&zn(e,a)||kL(t,a)||(c=r[0])&&zn(c,a)||zn(s,a)||zn(US,a)||zn(i.config.globalProperties,a)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:zn(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ks(){return b3().slots}function Cp(){return b3().attrs}function b3(){const e=pn();return e.setupContext||(e.setupContext=V3(e))}function MB(e){return at(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let uk=!0;function zq(e){const t=S3(e),n=e.proxy,s=e.ctx;uk=!1,t.beforeCreate&&AB(t.beforeCreate,e,"bc");const{data:i,computed:r,methods:a,watch:c,provide:u,inject:h,created:f,beforeMount:p,mounted:_,beforeUpdate:E,updated:v,activated:b,deactivated:y,beforeDestroy:S,beforeUnmount:L,destroyed:I,unmounted:R,render:w,renderTracked:k,renderTriggered:D,errorCaptured:P,serverPrefetch:B,expose:F,inheritAttrs:X,components:G,directives:re,filters:_e}=t;if(h&&Yq(h,s,null),a)for(const ae in a){const Z=a[ae];Ut(Z)&&(s[ae]=Z.bind(n))}if(i){const ae=i.call(n,n);Tn(ae)&&(e.data=Kn(ae))}if(uk=!0,r)for(const ae in r){const Z=r[ae],Q=Ut(Z)?Z.bind(n,n):Ut(Z.get)?Z.get.bind(n,n):ro,he=!Ut(Z)&&Ut(Z.set)?Z.set.bind(n):ro,ge=x({get:Q,set:he});Object.defineProperty(s,ae,{enumerable:!0,configurable:!0,get:()=>ge.value,set:Ie=>ge.value=Ie})}if(c)for(const ae in c)O3(c[ae],s,n,ae);if(u){const ae=Ut(u)?u.call(n):u;Reflect.ownKeys(ae).forEach(Z=>{An(Z,ae[Z])})}f&&AB(f,e,"c");function Y(ae,Z){at(Z)?Z.forEach(Q=>ae(Q.bind(n))):Z&&ae(Z.bind(n))}if(Y(ZM,p),Y(rn,_),Y(T3,E),Y(nd,v),Y(uP,b),Y(m3,y),Y(Vq,P),Y(Hq,k),Y(Uq,D),Y(vo,L),Y(Ch,R),Y(Fq,B),at(F))if(F.length){const ae=e.exposed||(e.exposed={});F.forEach(Z=>{Object.defineProperty(ae,Z,{get:()=>n[Z],set:Q=>n[Z]=Q})})}else e.exposed||(e.exposed={});w&&e.render===ro&&(e.render=w),X!=null&&(e.inheritAttrs=X),G&&(e.components=G),re&&(e.directives=re),B&&g3(e)}function Yq(e,t,n=ro){at(e)&&(e=dk(e));for(const s in e){const i=e[s];let r;Tn(i)?"default"in i?r=It(i.from||s,i.default,!0):r=It(i.from||s):r=It(i),po(r)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>r.value,set:a=>r.value=a}):t[s]=r}}function AB(e,t,n){Gc(at(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function O3(e,t,n,s){let i=s.includes(".")?P3(n,s):()=>n[s];if(Dt(e)){const r=t[e];Ut(r)&&tt(i,r)}else if(Ut(e))tt(i,e.bind(n));else if(Tn(e))if(at(e))e.forEach(r=>O3(r,t,n,s));else{const r=Ut(e.handler)?e.handler.bind(n):t[e.handler];Ut(r)&&tt(i,r,e)}}function S3(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:i,optionsCache:r,config:{optionMergeStrategies:a}}=e.appContext,c=r.get(t);let u;return c?u=c:!i.length&&!n&&!s?u=t:(u={},i.length&&i.forEach(h=>UC(u,h,a,!0)),UC(u,t,a)),Tn(t)&&r.set(t,u),u}function UC(e,t,n,s=!1){const{mixins:i,extends:r}=t;r&&UC(e,r,n,!0),i&&i.forEach(a=>UC(e,a,n,!0));for(const a in t)if(!(s&&a==="expose")){const c=Kq[a]||n&&n[a];e[a]=c?c(e[a],t[a]):t[a]}return e}const Kq={data:LB,props:wB,emits:wB,methods:yS,computed:yS,beforeCreate:Qr,created:Qr,beforeMount:Qr,mounted:Qr,beforeUpdate:Qr,updated:Qr,beforeDestroy:Qr,beforeUnmount:Qr,destroyed:Qr,unmounted:Qr,activated:Qr,deactivated:Qr,errorCaptured:Qr,serverPrefetch:Qr,components:yS,directives:yS,watch:Qq,provide:LB,inject:jq};function LB(e,t){return t?e?function(){return Ai(Ut(e)?e.call(this,this):e,Ut(t)?t.call(this,this):t)}:t:e}function jq(e,t){return yS(dk(e),dk(t))}function dk(e){if(at(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Qr(e,t){return e?[...new Set([].concat(e,t))]:t}function yS(e,t){return e?Ai(Object.create(null),e,t):t}function wB(e,t){return e?at(e)&&at(t)?[...new Set([...e,...t])]:Ai(Object.create(null),MB(e),MB(t??{})):t}function Qq(e,t){if(!e)return t;if(!t)return e;const n=Ai(Object.create(null),e);for(const s in t)n[s]=Qr(e[s],t[s]);return n}function y3(){return{app:null,config:{isNativeTag:GQ,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let qq=0;function Jq(e,t){return function(s,i=null){Ut(s)||(s=Ai({},s)),i!=null&&!Tn(i)&&(i=null);const r=y3(),a=new WeakSet,c=[];let u=!1;const h=r.app={_uid:qq++,_component:s,_props:i,_container:null,_context:r,_instance:null,version:A9,get config(){return r.config},set config(f){},use(f,...p){return a.has(f)||(f&&Ut(f.install)?(a.add(f),f.install(h,...p)):Ut(f)&&(a.add(f),f(h,...p))),h},mixin(f){return r.mixins.includes(f)||r.mixins.push(f),h},component(f,p){return p?(r.components[f]=p,h):r.components[f]},directive(f,p){return p?(r.directives[f]=p,h):r.directives[f]},mount(f,p,_){if(!u){const E=h._ceVNode||oe(s,i);return E.appContext=r,_===!0?_="svg":_===!1&&(_=void 0),e(E,f,_),u=!0,h._container=f,f.__vue_app__=h,nA(E.component)}},onUnmount(f){c.push(f)},unmount(){u&&(Gc(c,h._instance,16),e(null,h._container),delete h._container.__vue_app__)},provide(f,p){return r.provides[f]=p,h},runWithContext(f){const p=Tm;Tm=h;try{return f()}finally{Tm=p}}};return h}}let Tm=null;function An(e,t){if(Fi){let n=Fi.provides;const s=Fi.parent&&Fi.parent.provides;s===n&&(n=Fi.provides=Object.create(s)),n[e]=t}}function It(e,t,n=!1){const s=Fi||Ri;if(s||Tm){const i=Tm?Tm._context.provides:s?s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&Ut(t)?t.call(s&&s.proxy):t}}function Zq(){return!!(Fi||Ri||Tm)}const $3={},I3=()=>Object.create($3),R3=e=>Object.getPrototypeOf(e)===$3;function e9(e,t,n,s=!1){const i={},r=I3();e.propsDefaults=Object.create(null),C3(e,t,i,r);for(const a in e.propsOptions[0])a in i||(i[a]=void 0);n?e.props=s?i:iP(i):e.type.props?e.props=i:e.props=r,e.attrs=r}function t9(e,t,n,s){const{props:i,attrs:r,vnode:{patchFlag:a}}=e,c=uo(i),[u]=e.propsOptions;let h=!1;if((s||a>0)&&!(a&16)){if(a&8){const f=e.vnode.dynamicProps;for(let p=0;p<f.length;p++){let _=f[p];if(tA(e.emitsOptions,_))continue;const E=t[_];if(u)if(zn(r,_))E!==r[_]&&(r[_]=E,h=!0);else{const v=ll(_);i[v]=hk(u,c,v,E,e,!1)}else E!==r[_]&&(r[_]=E,h=!0)}}}else{C3(e,t,i,r)&&(h=!0);let f;for(const p in c)(!t||!zn(t,p)&&((f=Ih(p))===p||!zn(t,f)))&&(u?n&&(n[p]!==void 0||n[f]!==void 0)&&(i[p]=hk(u,c,p,void 0,e,!0)):delete i[p]);if(r!==c)for(const p in r)(!t||!zn(t,p))&&(delete r[p],h=!0)}h&&ch(e.attrs,"set","")}function C3(e,t,n,s){const[i,r]=e.propsOptions;let a=!1,c;if(t)for(let u in t){if(PS(u))continue;const h=t[u];let f;i&&zn(i,f=ll(u))?!r||!r.includes(f)?n[f]=h:(c||(c={}))[f]=h:tA(e.emitsOptions,u)||(!(u in s)||h!==s[u])&&(s[u]=h,a=!0)}if(r){const u=uo(n),h=c||ds;for(let f=0;f<r.length;f++){const p=r[f];n[p]=hk(i,u,p,h[p],e,!zn(h,p))}}return a}function hk(e,t,n,s,i,r){const a=e[n];if(a!=null){const c=zn(a,"default");if(c&&s===void 0){const u=a.default;if(a.type!==Function&&!a.skipFactory&&Ut(u)){const{propsDefaults:h}=i;if(n in h)s=h[n];else{const f=i$(i);s=h[n]=u.call(null,t),f()}}else s=u;i.ce&&i.ce._setProp(n,s)}a[0]&&(r&&!c?s=!1:a[1]&&(s===""||s===Ih(n))&&(s=!0))}return s}const n9=new WeakMap;function M3(e,t,n=!1){const s=n?n9:t.propsCache,i=s.get(e);if(i)return i;const r=e.props,a={},c=[];let u=!1;if(!Ut(e)){const f=p=>{u=!0;const[_,E]=M3(p,t,!0);Ai(a,_),E&&c.push(...E)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!r&&!u)return Tn(e)&&s.set(e,lE),lE;if(at(r))for(let f=0;f<r.length;f++){const p=ll(r[f]);kB(p)&&(a[p]=ds)}else if(r)for(const f in r){const p=ll(f);if(kB(p)){const _=r[f],E=a[p]=at(_)||Ut(_)?{type:_}:Ai({},_),v=E.type;let b=!1,y=!0;if(at(v))for(let S=0;S<v.length;++S){const L=v[S],I=Ut(L)&&L.name;if(I==="Boolean"){b=!0;break}else I==="String"&&(y=!1)}else b=Ut(v)&&v.name==="Boolean";E[0]=b,E[1]=y,(b||zn(E,"default"))&&c.push(p)}}const h=[a,c];return Tn(e)&&s.set(e,h),h}function kB(e){return e[0]!=="$"&&!PS(e)}const A3=e=>e[0]==="_"||e==="$stable",fP=e=>at(e)?e.map(Du):[Du(e)],o9=(e,t,n)=>{if(t._n)return t;const s=de((...i)=>fP(t(...i)),n);return s._c=!1,s},L3=(e,t,n)=>{const s=e._ctx;for(const i in e){if(A3(i))continue;const r=e[i];if(Ut(r))t[i]=o9(i,r,s);else if(r!=null){const a=fP(r);t[i]=()=>a}}},w3=(e,t)=>{const n=fP(t);e.slots.default=()=>n},k3=(e,t,n)=>{for(const s in t)(n||s!=="_")&&(e[s]=t[s])},s9=(e,t,n)=>{const s=e.slots=I3();if(e.vnode.shapeFlag&32){const i=t._;i?(k3(s,t,n),n&&wW(s,"_",i,!0)):L3(t,s)}else t&&w3(e,t)},i9=(e,t,n)=>{const{vnode:s,slots:i}=e;let r=!0,a=ds;if(s.shapeFlag&32){const c=t._;c?n&&c===1?r=!1:k3(i,t,n):(r=!t.$stable,L3(t,i)),a=t}else t&&(w3(e,t),a={default:1});if(r)for(const c in i)!A3(c)&&a[c]==null&&delete i[c]},Jr=E9;function r9(e){return l9(e)}function l9(e,t){const n=zM();n.__VUE__=!0;const{insert:s,remove:i,patchProp:r,createElement:a,createText:c,createComment:u,setText:h,setElementText:f,parentNode:p,nextSibling:_,setScopeId:E=ro,insertStaticContent:v}=e,b=(ee,pe,Oe,ze=null,Ze=null,De=null,me=void 0,Te=null,Ue=!!pe.dynamicChildren)=>{if(ee===pe)return;ee&&!tm(ee,pe)&&(ze=ve(ee),Ie(ee,Ze,De,!0),ee=null),pe.patchFlag===-2&&(Ue=!1,pe.dynamicChildren=null);const{type:qe,ref:ct,shapeFlag:Ne}=pe;switch(qe){case Gm:y(ee,pe,Oe,ze);break;case Ii:S(ee,pe,Oe,ze);break;case PL:ee==null&&L(pe,Oe,ze,me);break;case Lt:G(ee,pe,Oe,ze,Ze,De,me,Te,Ue);break;default:Ne&1?w(ee,pe,Oe,ze,Ze,De,me,Te,Ue):Ne&6?re(ee,pe,Oe,ze,Ze,De,me,Te,Ue):(Ne&64||Ne&128)&&qe.process(ee,pe,Oe,ze,Ze,De,me,Te,Ue,ot)}ct!=null&&Ze&&FC(ct,ee&&ee.ref,De,pe||ee,!pe)},y=(ee,pe,Oe,ze)=>{if(ee==null)s(pe.el=c(pe.children),Oe,ze);else{const Ze=pe.el=ee.el;pe.children!==ee.children&&h(Ze,pe.children)}},S=(ee,pe,Oe,ze)=>{ee==null?s(pe.el=u(pe.children||""),Oe,ze):pe.el=ee.el},L=(ee,pe,Oe,ze)=>{[ee.el,ee.anchor]=v(ee.children,pe,Oe,ze,ee.el,ee.anchor)},I=({el:ee,anchor:pe},Oe,ze)=>{let Ze;for(;ee&&ee!==pe;)Ze=_(ee),s(ee,Oe,ze),ee=Ze;s(pe,Oe,ze)},R=({el:ee,anchor:pe})=>{let Oe;for(;ee&&ee!==pe;)Oe=_(ee),i(ee),ee=Oe;i(pe)},w=(ee,pe,Oe,ze,Ze,De,me,Te,Ue)=>{pe.type==="svg"?me="svg":pe.type==="math"&&(me="mathml"),ee==null?k(pe,Oe,ze,Ze,De,me,Te,Ue):B(ee,pe,Ze,De,me,Te,Ue)},k=(ee,pe,Oe,ze,Ze,De,me,Te)=>{let Ue,qe;const{props:ct,shapeFlag:Ne,transition:Se,dirs:Je}=ee;if(Ue=ee.el=a(ee.type,De,ct&&ct.is,ct),Ne&8?f(Ue,ee.children):Ne&16&&P(ee.children,Ue,null,ze,Ze,NL(ee,De),me,Te),Je&&Kg(ee,null,ze,"created"),D(Ue,ee,ee.scopeId,me,ze),ct){for(const Mt in ct)Mt!=="value"&&!PS(Mt)&&r(Ue,Mt,null,ct[Mt],De,ze);"value"in ct&&r(Ue,"value",null,ct.value,De),(qe=ct.onVnodeBeforeMount)&&Ru(qe,ze,ee)}Je&&Kg(ee,null,ze,"beforeMount");const ut=a9(Ze,Se);ut&&Se.beforeEnter(Ue),s(Ue,pe,Oe),((qe=ct&&ct.onVnodeMounted)||ut||Je)&&Jr(()=>{qe&&Ru(qe,ze,ee),ut&&Se.enter(Ue),Je&&Kg(ee,null,ze,"mounted")},Ze)},D=(ee,pe,Oe,ze,Ze)=>{if(Oe&&E(ee,Oe),ze)for(let De=0;De<ze.length;De++)E(ee,ze[De]);if(Ze){let De=Ze.subTree;if(pe===De||x3(De.type)&&(De.ssContent===pe||De.ssFallback===pe)){const me=Ze.vnode;D(ee,me,me.scopeId,me.slotScopeIds,Ze.parent)}}},P=(ee,pe,Oe,ze,Ze,De,me,Te,Ue=0)=>{for(let qe=Ue;qe<ee.length;qe++){const ct=ee[qe]=Te?Kf(ee[qe]):Du(ee[qe]);b(null,ct,pe,Oe,ze,Ze,De,me,Te)}},B=(ee,pe,Oe,ze,Ze,De,me)=>{const Te=pe.el=ee.el;let{patchFlag:Ue,dynamicChildren:qe,dirs:ct}=pe;Ue|=ee.patchFlag&16;const Ne=ee.props||ds,Se=pe.props||ds;let Je;if(Oe&&jg(Oe,!1),(Je=Se.onVnodeBeforeUpdate)&&Ru(Je,Oe,pe,ee),ct&&Kg(pe,ee,Oe,"beforeUpdate"),Oe&&jg(Oe,!0),(Ne.innerHTML&&Se.innerHTML==null||Ne.textContent&&Se.textContent==null)&&f(Te,""),qe?F(ee.dynamicChildren,qe,Te,Oe,ze,NL(pe,Ze),De):me||Z(ee,pe,Te,null,Oe,ze,NL(pe,Ze),De,!1),Ue>0){if(Ue&16)X(Te,Ne,Se,Oe,Ze);else if(Ue&2&&Ne.class!==Se.class&&r(Te,"class",null,Se.class,Ze),Ue&4&&r(Te,"style",Ne.style,Se.style,Ze),Ue&8){const ut=pe.dynamicProps;for(let Mt=0;Mt<ut.length;Mt++){const mt=ut[Mt],qt=Ne[mt],ce=Se[mt];(ce!==qt||mt==="value")&&r(Te,mt,qt,ce,Ze,Oe)}}Ue&1&&ee.children!==pe.children&&f(Te,pe.children)}else!me&&qe==null&&X(Te,Ne,Se,Oe,Ze);((Je=Se.onVnodeUpdated)||ct)&&Jr(()=>{Je&&Ru(Je,Oe,pe,ee),ct&&Kg(pe,ee,Oe,"updated")},ze)},F=(ee,pe,Oe,ze,Ze,De,me)=>{for(let Te=0;Te<pe.length;Te++){const Ue=ee[Te],qe=pe[Te],ct=Ue.el&&(Ue.type===Lt||!tm(Ue,qe)||Ue.shapeFlag&70)?p(Ue.el):Oe;b(Ue,qe,ct,null,ze,Ze,De,me,!0)}},X=(ee,pe,Oe,ze,Ze)=>{if(pe!==Oe){if(pe!==ds)for(const De in pe)!PS(De)&&!(De in Oe)&&r(ee,De,pe[De],null,Ze,ze);for(const De in Oe){if(PS(De))continue;const me=Oe[De],Te=pe[De];me!==Te&&De!=="value"&&r(ee,De,Te,me,Ze,ze)}"value"in Oe&&r(ee,"value",pe.value,Oe.value,Ze)}},G=(ee,pe,Oe,ze,Ze,De,me,Te,Ue)=>{const qe=pe.el=ee?ee.el:c(""),ct=pe.anchor=ee?ee.anchor:c("");let{patchFlag:Ne,dynamicChildren:Se,slotScopeIds:Je}=pe;Je&&(Te=Te?Te.concat(Je):Je),ee==null?(s(qe,Oe,ze),s(ct,Oe,ze),P(pe.children||[],Oe,ct,Ze,De,me,Te,Ue)):Ne>0&&Ne&64&&Se&&ee.dynamicChildren?(F(ee.dynamicChildren,Se,Oe,Ze,De,me,Te),(pe.key!=null||Ze&&pe===Ze.subTree)&&pP(ee,pe,!0)):Z(ee,pe,Oe,ct,Ze,De,me,Te,Ue)},re=(ee,pe,Oe,ze,Ze,De,me,Te,Ue)=>{pe.slotScopeIds=Te,ee==null?pe.shapeFlag&512?Ze.ctx.activate(pe,Oe,ze,me,Ue):_e(pe,Oe,ze,Ze,De,me,Ue):J(ee,pe,Ue)},_e=(ee,pe,Oe,ze,Ze,De,me)=>{const Te=ee.component=y9(ee,ze,Ze);if(qM(ee)&&(Te.ctx.renderer=ot),$9(Te,!1,me),Te.asyncDep){if(Ze&&Ze.registerDep(Te,Y,me),!ee.el){const Ue=Te.subTree=oe(Ii);S(null,Ue,pe,Oe)}}else Y(Te,ee,pe,Oe,Ze,De,me)},J=(ee,pe,Oe)=>{const ze=pe.component=ee.component;if(_9(ee,pe,Oe))if(ze.asyncDep&&!ze.asyncResolved){ae(ze,pe,Oe);return}else ze.next=pe,ze.update();else pe.el=ee.el,ze.vnode=pe},Y=(ee,pe,Oe,ze,Ze,De,me)=>{const Te=()=>{if(ee.isMounted){let{next:Ne,bu:Se,u:Je,parent:ut,vnode:Mt}=ee;{const ne=N3(ee);if(ne){Ne&&(Ne.el=Mt.el,ae(ee,Ne,me)),ne.asyncDep.then(()=>{ee.isUnmounted||Te()});return}}let mt=Ne,qt;jg(ee,!1),Ne?(Ne.el=Mt.el,ae(ee,Ne,me)):Ne=Mt,Se&&MR(Se),(qt=Ne.props&&Ne.props.onVnodeBeforeUpdate)&&Ru(qt,ut,Ne,Mt),jg(ee,!0);const ce=PB(ee),q=ee.subTree;ee.subTree=ce,b(q,ce,p(q.el),ve(q),ee,Ze,De),Ne.el=ce.el,mt===null&&T9(ee,ce.el),Je&&Jr(Je,Ze),(qt=Ne.props&&Ne.props.onVnodeUpdated)&&Jr(()=>Ru(qt,ut,Ne,Mt),Ze)}else{let Ne;const{el:Se,props:Je}=pe,{bm:ut,m:Mt,parent:mt,root:qt,type:ce}=ee,q=uE(pe);jg(ee,!1),ut&&MR(ut),!q&&(Ne=Je&&Je.onVnodeBeforeMount)&&Ru(Ne,mt,pe),jg(ee,!0);{qt.ce&&qt.ce._injectChildStyle(ce);const ne=ee.subTree=PB(ee);b(null,ne,Oe,ze,ee,Ze,De),pe.el=ne.el}if(Mt&&Jr(Mt,Ze),!q&&(Ne=Je&&Je.onVnodeMounted)){const ne=pe;Jr(()=>Ru(Ne,mt,ne),Ze)}(pe.shapeFlag&256||mt&&uE(mt.vnode)&&mt.vnode.shapeFlag&256)&&ee.a&&Jr(ee.a,Ze),ee.isMounted=!0,pe=Oe=ze=null}};ee.scope.on();const Ue=ee.effect=new BW(Te);ee.scope.off();const qe=ee.update=Ue.run.bind(Ue),ct=ee.job=Ue.runIfDirty.bind(Ue);ct.i=ee,ct.id=ee.uid,Ue.scheduler=()=>aP(ct),jg(ee,!0),qe()},ae=(ee,pe,Oe)=>{pe.component=ee;const ze=ee.vnode.props;ee.vnode=pe,ee.next=null,t9(ee,pe.props,ze,Oe),i9(ee,pe.children,Oe),Ip(),SB(ee),Rp()},Z=(ee,pe,Oe,ze,Ze,De,me,Te,Ue=!1)=>{const qe=ee&&ee.children,ct=ee?ee.shapeFlag:0,Ne=pe.children,{patchFlag:Se,shapeFlag:Je}=pe;if(Se>0){if(Se&128){he(qe,Ne,Oe,ze,Ze,De,me,Te,Ue);return}else if(Se&256){Q(qe,Ne,Oe,ze,Ze,De,me,Te,Ue);return}}Je&8?(ct&16&&$e(qe,Ze,De),Ne!==qe&&f(Oe,Ne)):ct&16?Je&16?he(qe,Ne,Oe,ze,Ze,De,me,Te,Ue):$e(qe,Ze,De,!0):(ct&8&&f(Oe,""),Je&16&&P(Ne,Oe,ze,Ze,De,me,Te,Ue))},Q=(ee,pe,Oe,ze,Ze,De,me,Te,Ue)=>{ee=ee||lE,pe=pe||lE;const qe=ee.length,ct=pe.length,Ne=Math.min(qe,ct);let Se;for(Se=0;Se<Ne;Se++){const Je=pe[Se]=Ue?Kf(pe[Se]):Du(pe[Se]);b(ee[Se],Je,Oe,null,Ze,De,me,Te,Ue)}qe>ct?$e(ee,Ze,De,!0,!1,Ne):P(pe,Oe,ze,Ze,De,me,Te,Ue,Ne)},he=(ee,pe,Oe,ze,Ze,De,me,Te,Ue)=>{let qe=0;const ct=pe.length;let Ne=ee.length-1,Se=ct-1;for(;qe<=Ne&&qe<=Se;){const Je=ee[qe],ut=pe[qe]=Ue?Kf(pe[qe]):Du(pe[qe]);if(tm(Je,ut))b(Je,ut,Oe,null,Ze,De,me,Te,Ue);else break;qe++}for(;qe<=Ne&&qe<=Se;){const Je=ee[Ne],ut=pe[Se]=Ue?Kf(pe[Se]):Du(pe[Se]);if(tm(Je,ut))b(Je,ut,Oe,null,Ze,De,me,Te,Ue);else break;Ne--,Se--}if(qe>Ne){if(qe<=Se){const Je=Se+1,ut=Je<ct?pe[Je].el:ze;for(;qe<=Se;)b(null,pe[qe]=Ue?Kf(pe[qe]):Du(pe[qe]),Oe,ut,Ze,De,me,Te,Ue),qe++}}else if(qe>Se)for(;qe<=Ne;)Ie(ee[qe],Ze,De,!0),qe++;else{const Je=qe,ut=qe,Mt=new Map;for(qe=ut;qe<=Se;qe++){const Fe=pe[qe]=Ue?Kf(pe[qe]):Du(pe[qe]);Fe.key!=null&&Mt.set(Fe.key,qe)}let mt,qt=0;const ce=Se-ut+1;let q=!1,ne=0;const Le=new Array(ce);for(qe=0;qe<ce;qe++)Le[qe]=0;for(qe=Je;qe<=Ne;qe++){const Fe=ee[qe];if(qt>=ce){Ie(Fe,Ze,De,!0);continue}let ye;if(Fe.key!=null)ye=Mt.get(Fe.key);else for(mt=ut;mt<=Se;mt++)if(Le[mt-ut]===0&&tm(Fe,pe[mt])){ye=mt;break}ye===void 0?Ie(Fe,Ze,De,!0):(Le[ye-ut]=qe+1,ye>=ne?ne=ye:q=!0,b(Fe,pe[ye],Oe,null,Ze,De,me,Te,Ue),qt++)}const ue=q?c9(Le):lE;for(mt=ue.length-1,qe=ce-1;qe>=0;qe--){const Fe=ut+qe,ye=pe[Fe],ft=Fe+1<ct?pe[Fe+1].el:ze;Le[qe]===0?b(null,ye,Oe,ft,Ze,De,me,Te,Ue):q&&(mt<0||qe!==ue[mt]?ge(ye,Oe,ft,2):mt--)}}},ge=(ee,pe,Oe,ze,Ze=null)=>{const{el:De,type:me,transition:Te,children:Ue,shapeFlag:qe}=ee;if(qe&6){ge(ee.component.subTree,pe,Oe,ze);return}if(qe&128){ee.suspense.move(pe,Oe,ze);return}if(qe&64){me.move(ee,pe,Oe,ot);return}if(me===Lt){s(De,pe,Oe);for(let Ne=0;Ne<Ue.length;Ne++)ge(Ue[Ne],pe,Oe,ze);s(ee.anchor,pe,Oe);return}if(me===PL){I(ee,pe,Oe);return}if(ze!==2&&qe&1&&Te)if(ze===0)Te.beforeEnter(De),s(De,pe,Oe),Jr(()=>Te.enter(De),Ze);else{const{leave:Ne,delayLeave:Se,afterLeave:Je}=Te,ut=()=>s(De,pe,Oe),Mt=()=>{Ne(De,()=>{ut(),Je&&Je()})};Se?Se(De,ut,Mt):Mt()}else s(De,pe,Oe)},Ie=(ee,pe,Oe,ze=!1,Ze=!1)=>{const{type:De,props:me,ref:Te,children:Ue,dynamicChildren:qe,shapeFlag:ct,patchFlag:Ne,dirs:Se,cacheIndex:Je}=ee;if(Ne===-2&&(Ze=!1),Te!=null&&FC(Te,null,Oe,ee,!0),Je!=null&&(pe.renderCache[Je]=void 0),ct&256){pe.ctx.deactivate(ee);return}const ut=ct&1&&Se,Mt=!uE(ee);let mt;if(Mt&&(mt=me&&me.onVnodeBeforeUnmount)&&Ru(mt,pe,ee),ct&6)We(ee.component,Oe,ze);else{if(ct&128){ee.suspense.unmount(Oe,ze);return}ut&&Kg(ee,null,pe,"beforeUnmount"),ct&64?ee.type.remove(ee,pe,Oe,ot,ze):qe&&!qe.hasOnce&&(De!==Lt||Ne>0&&Ne&64)?$e(qe,pe,Oe,!1,!0):(De===Lt&&Ne&384||!Ze&&ct&16)&&$e(Ue,pe,Oe),ze&&be(ee)}(Mt&&(mt=me&&me.onVnodeUnmounted)||ut)&&Jr(()=>{mt&&Ru(mt,pe,ee),ut&&Kg(ee,null,pe,"unmounted")},Oe)},be=ee=>{const{type:pe,el:Oe,anchor:ze,transition:Ze}=ee;if(pe===Lt){Ae(Oe,ze);return}if(pe===PL){R(ee);return}const De=()=>{i(Oe),Ze&&!Ze.persisted&&Ze.afterLeave&&Ze.afterLeave()};if(ee.shapeFlag&1&&Ze&&!Ze.persisted){const{leave:me,delayLeave:Te}=Ze,Ue=()=>me(Oe,De);Te?Te(ee.el,De,Ue):Ue()}else De()},Ae=(ee,pe)=>{let Oe;for(;ee!==pe;)Oe=_(ee),i(ee),ee=Oe;i(pe)},We=(ee,pe,Oe)=>{const{bum:ze,scope:Ze,job:De,subTree:me,um:Te,m:Ue,a:qe}=ee;NB(Ue),NB(qe),ze&&MR(ze),Ze.stop(),De&&(De.flags|=8,Ie(me,ee,pe,Oe)),Te&&Jr(Te,pe),Jr(()=>{ee.isUnmounted=!0},pe),pe&&pe.pendingBranch&&!pe.isUnmounted&&ee.asyncDep&&!ee.asyncResolved&&ee.suspenseId===pe.pendingId&&(pe.deps--,pe.deps===0&&pe.resolve())},$e=(ee,pe,Oe,ze=!1,Ze=!1,De=0)=>{for(let me=De;me<ee.length;me++)Ie(ee[me],pe,Oe,ze,Ze)},ve=ee=>{if(ee.shapeFlag&6)return ve(ee.component.subTree);if(ee.shapeFlag&128)return ee.suspense.next();const pe=_(ee.anchor||ee.el),Oe=pe&&pe[r3];return Oe?_(Oe):pe};let Pe=!1;const Be=(ee,pe,Oe)=>{ee==null?pe._vnode&&Ie(pe._vnode,null,null,!0):b(pe._vnode||null,ee,pe,null,null,null,Oe),pe._vnode=ee,Pe||(Pe=!0,SB(),o3(),Pe=!1)},ot={p:b,um:Ie,m:ge,r:be,mt:_e,mc:P,pc:Z,pbc:F,n:ve,o:e};return{render:Be,hydrate:void 0,createApp:Jq(Be)}}function NL({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function jg({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function a9(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function pP(e,t,n=!1){const s=e.children,i=t.children;if(at(s)&&at(i))for(let r=0;r<s.length;r++){const a=s[r];let c=i[r];c.shapeFlag&1&&!c.dynamicChildren&&((c.patchFlag<=0||c.patchFlag===32)&&(c=i[r]=Kf(i[r]),c.el=a.el),!n&&c.patchFlag!==-2&&pP(a,c)),c.type===Gm&&(c.el=a.el)}}function c9(e){const t=e.slice(),n=[0];let s,i,r,a,c;const u=e.length;for(s=0;s<u;s++){const h=e[s];if(h!==0){if(i=n[n.length-1],e[i]<h){t[s]=i,n.push(s);continue}for(r=0,a=n.length-1;r<a;)c=r+a>>1,e[n[c]]<h?r=c+1:a=c;h<e[n[r]]&&(r>0&&(t[s]=n[r-1]),n[r]=s)}}for(r=n.length,a=n[r-1];r-- >0;)n[r]=a,a=t[a];return n}function N3(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:N3(t)}function NB(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const u9=Symbol.for("v-scx"),d9=()=>It(u9);function Zs(e,t){return gP(e,null,t)}function tt(e,t,n){return gP(e,t,n)}function gP(e,t,n=ds){const{immediate:s,deep:i,flush:r,once:a}=n,c=Ai({},n),u=t&&s||!t&&r!=="post";let h;if(uy){if(r==="sync"){const E=d9();h=E.__watcherHandles||(E.__watcherHandles=[])}else if(!u){const E=()=>{};return E.stop=ro,E.resume=ro,E.pause=ro,E}}const f=Fi;c.call=(E,v,b)=>Gc(E,f,v,b);let p=!1;r==="post"?c.scheduler=E=>{Jr(E,f&&f.suspense)}:r!=="sync"&&(p=!0,c.scheduler=(E,v)=>{v?E():aP(E)}),c.augmentJob=E=>{t&&(E.flags|=4),p&&(E.flags|=2,f&&(E.id=f.uid,E.i=f))};const _=Aq(e,t,c);return uy&&(h?h.push(_):u&&_()),_}function h9(e,t,n){const s=this.proxy,i=Dt(e)?e.includes(".")?P3(s,e):()=>s[e]:e.bind(s,s);let r;Ut(t)?r=t:(r=t.handler,n=t);const a=i$(this),c=gP(i,r.bind(s),n);return a(),c}function P3(e,t){const n=t.split(".");return()=>{let s=e;for(let i=0;i<n.length&&s;i++)s=s[n[i]];return s}}const f9=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ll(t)}Modifiers`]||e[`${Ih(t)}Modifiers`];function p9(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ds;let i=n;const r=t.startsWith("update:"),a=r&&f9(s,t.slice(7));a&&(a.trim&&(i=n.map(f=>Dt(f)?f.trim():f)),a.number&&(i=n.map(ok)));let c,u=s[c=DS(t)]||s[c=DS(ll(t))];!u&&r&&(u=s[c=DS(Ih(t))]),u&&Gc(u,e,6,i);const h=s[c+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,Gc(h,e,6,i)}}function D3(e,t,n=!1){const s=t.emitsCache,i=s.get(e);if(i!==void 0)return i;const r=e.emits;let a={},c=!1;if(!Ut(e)){const u=h=>{const f=D3(h,t,!0);f&&(c=!0,Ai(a,f))};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!r&&!c?(Tn(e)&&s.set(e,null),null):(at(r)?r.forEach(u=>a[u]=null):Ai(a,r),Tn(e)&&s.set(e,a),a)}function tA(e,t){return!e||!GM(t)?!1:(t=t.slice(2).replace(/Once$/,""),zn(e,t[0].toLowerCase()+t.slice(1))||zn(e,Ih(t))||zn(e,t))}function PB(e){const{type:t,vnode:n,proxy:s,withProxy:i,propsOptions:[r],slots:a,attrs:c,emit:u,render:h,renderCache:f,props:p,data:_,setupState:E,ctx:v,inheritAttrs:b}=e,y=BC(e);let S,L;try{if(n.shapeFlag&4){const R=i||s,w=R;S=Du(h.call(w,R,f,p,E,_,v)),L=c}else{const R=t;S=Du(R.length>1?R(p,{attrs:c,slots:a,emit:u}):R(p,null)),L=t.props?c:g9(c)}}catch(R){HS.length=0,QM(R,e,1),S=oe(Ii)}let I=S;if(L&&b!==!1){const R=Object.keys(L),{shapeFlag:w}=I;R.length&&w&7&&(r&&R.some(Q1)&&(L=m9(L,r)),I=Eh(I,L,!1,!0))}return n.dirs&&(I=Eh(I,null,!1,!0),I.dirs=I.dirs?I.dirs.concat(n.dirs):n.dirs),n.transition&&Rm(I,n.transition),S=I,BC(y),S}const g9=e=>{let t;for(const n in e)(n==="class"||n==="style"||GM(n))&&((t||(t={}))[n]=e[n]);return t},m9=(e,t)=>{const n={};for(const s in e)(!Q1(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function _9(e,t,n){const{props:s,children:i,component:r}=e,{props:a,children:c,patchFlag:u}=t,h=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return s?DB(s,a,h):!!a;if(u&8){const f=t.dynamicProps;for(let p=0;p<f.length;p++){const _=f[p];if(a[_]!==s[_]&&!tA(h,_))return!0}}}else return(i||c)&&(!c||!c.$stable)?!0:s===a?!1:s?a?DB(s,a,h):!0:!!a;return!1}function DB(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let i=0;i<s.length;i++){const r=s[i];if(t[r]!==e[r]&&!tA(n,r))return!0}return!1}function T9({vnode:e,parent:t},n){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.el=e.el),s===e)(e=t.vnode).el=n,t=t.parent;else break}}const x3=e=>e.__isSuspense;function E9(e,t){t&&t.pendingBranch?at(e)?t.effects.push(...e):t.effects.push(e):kq(e)}const Lt=Symbol.for("v-fgt"),Gm=Symbol.for("v-txt"),Ii=Symbol.for("v-cmt"),PL=Symbol.for("v-stc"),HS=[];let aa=null;function H(e=!1){HS.push(aa=e?null:[])}function v9(){HS.pop(),aa=HS[HS.length-1]||null}let cy=1;function xB(e,t=!1){cy+=e,e<0&&aa&&t&&(aa.hasOnce=!0)}function B3(e){return e.dynamicChildren=cy>0?aa||lE:null,v9(),cy>0&&aa&&aa.push(e),e}function le(e,t,n,s,i,r){return B3(te(e,t,n,s,i,r,!0))}function Ye(e,t,n,s,i){return B3(oe(e,t,n,s,i,!0))}function zo(e){return e?e.__v_isVNode===!0:!1}function tm(e,t){return e.type===t.type&&e.key===t.key}const F3=({key:e})=>e??null,LR=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Dt(e)||po(e)||Ut(e)?{i:Ri,r:e,k:t,f:!!n}:e:null);function te(e,t=null,n=null,s=0,i=null,r=e===Lt?0:1,a=!1,c=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&F3(t),ref:t&&LR(t),scopeId:i3,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:s,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Ri};return c?(mP(u,n),r&128&&e.normalize(u)):n&&(u.shapeFlag|=Dt(n)?8:16),cy>0&&!a&&aa&&(u.patchFlag>0||r&6)&&u.patchFlag!==32&&aa.push(u),u}const oe=b9;function b9(e,t=null,n=null,s=0,i=null,r=!1){if((!e||e===E3)&&(e=Ii),zo(e)){const c=Eh(e,t,!0);return n&&mP(c,n),cy>0&&!r&&aa&&(c.shapeFlag&6?aa[aa.indexOf(e)]=c:aa.push(c)),c.patchFlag=-2,c}if(M9(e)&&(e=e.__vccOpts),t){t=Th(t);let{class:c,style:u}=t;c&&!Dt(c)&&(t.class=z(c)),Tn(u)&&(lP(u)&&!at(u)&&(u=Ai({},u)),t.style=Bt(u))}const a=Dt(e)?1:x3(e)?128:l3(e)?64:Tn(e)?4:Ut(e)?2:0;return te(e,t,n,s,i,a,r,!0)}function Th(e){return e?lP(e)||R3(e)?Ai({},e):e:null}function Eh(e,t,n=!1,s=!1){const{props:i,ref:r,patchFlag:a,children:c,transition:u}=e,h=t?$n(i||{},t):i,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&F3(h),ref:t&&t.ref?n&&r?at(r)?r.concat(LR(t)):[r,LR(t)]:LR(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:c,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Lt?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Eh(e.ssContent),ssFallback:e.ssFallback&&Eh(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&s&&Rm(f,u.clone(f)),f}function Xt(e=" ",t=0){return oe(Gm,null,e,t)}function Ge(e="",t=!1){return t?(H(),Ye(Ii,null,e)):oe(Ii,null,e)}function Du(e){return e==null||typeof e=="boolean"?oe(Ii):at(e)?oe(Lt,null,e.slice()):zo(e)?Kf(e):oe(Gm,null,String(e))}function Kf(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Eh(e)}function mP(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(at(t))n=16;else if(typeof t=="object")if(s&65){const i=t.default;i&&(i._c&&(i._d=!1),mP(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!R3(t)?t._ctx=Ri:i===3&&Ri&&(Ri.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ut(t)?(t={default:t,_ctx:Ri},n=32):(t=String(t),s&64?(n=16,t=[Xt(t)]):n=8);e.children=t,e.shapeFlag|=n}function $n(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const i in s)if(i==="class")t.class!==s.class&&(t.class=z([t.class,s.class]));else if(i==="style")t.style=Bt([t.style,s.style]);else if(GM(i)){const r=t[i],a=s[i];a&&r!==a&&!(at(r)&&r.includes(a))&&(t[i]=r?[].concat(r,a):a)}else i!==""&&(t[i]=s[i])}return t}function Ru(e,t,n,s=null){Gc(e,t,7,[n,s])}const O9=y3();let S9=0;function y9(e,t,n){const s=e.type,i=(t?t.appContext:e.appContext)||O9,r={uid:S9++,vnode:e,type:s,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new xW(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:M3(s,i),emitsOptions:D3(s,i),emit:null,emitted:null,propsDefaults:ds,inheritAttrs:s.inheritAttrs,ctx:ds,data:ds,props:ds,attrs:ds,slots:ds,refs:ds,setupState:ds,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return r.ctx={_:r},r.root=t?t.root:r,r.emit=p9.bind(null,r),e.ce&&e.ce(r),r}let Fi=null;const pn=()=>Fi||Ri;let HC,fk;{const e=zM(),t=(n,s)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(s),r=>{i.length>1?i.forEach(a=>a(r)):i[0](r)}};HC=t("__VUE_INSTANCE_SETTERS__",n=>Fi=n),fk=t("__VUE_SSR_SETTERS__",n=>uy=n)}const i$=e=>{const t=Fi;return HC(e),e.scope.on(),()=>{e.scope.off(),HC(t)}},BB=()=>{Fi&&Fi.scope.off(),HC(null)};function U3(e){return e.vnode.shapeFlag&4}let uy=!1;function $9(e,t=!1,n=!1){t&&fk(t);const{props:s,children:i}=e.vnode,r=U3(e);e9(e,s,r,t),s9(e,i,n);const a=r?I9(e,t):void 0;return t&&fk(!1),a}function I9(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Xq);const{setup:s}=n;if(s){Ip();const i=e.setupContext=s.length>1?V3(e):null,r=i$(e),a=s$(s,e,0,[e.props,i]),c=oy(a);if(Rp(),r(),(c||e.sp)&&!uE(e)&&g3(e),c){if(a.then(BB,BB),t)return a.then(u=>{FB(e,u)}).catch(u=>{QM(u,e,0)});e.asyncDep=a}else FB(e,a)}else H3(e)}function FB(e,t,n){Ut(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Tn(t)&&(e.setupState=ZW(t)),H3(e)}function H3(e,t,n){const s=e.type;e.render||(e.render=s.render||ro);{const i=i$(e);Ip();try{zq(e)}finally{Rp(),i()}}}const R9={get(e,t){return Cr(e,"get",""),e[t]}};function V3(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,R9),slots:e.slots,emit:e.emit,expose:t}}function nA(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ZW(zu(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in US)return US[n](e)},has(t,n){return n in t||n in US}})):e.proxy}function C9(e,t=!0){return Ut(e)?e.displayName||e.name:e.name||t&&e.__name}function M9(e){return Ut(e)&&"__vccOpts"in e}const x=(e,t)=>Cq(e,t,uy);function Gt(e,t,n){const s=arguments.length;return s===2?Tn(t)&&!at(t)?zo(t)?oe(e,null,[t]):oe(e,t):oe(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&zo(n)&&(n=[n]),oe(e,t,n))}const A9="3.5.13",L9=ro;/**
  14. * @vue/runtime-dom v3.5.13
  15. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  16. * @license MIT
  17. **/let pk;const UB=typeof window<"u"&&window.trustedTypes;if(UB)try{pk=UB.createPolicy("vue",{createHTML:e=>e})}catch{}const G3=pk?e=>pk.createHTML(e):e=>e,w9="http://www.w3.org/2000/svg",k9="http://www.w3.org/1998/Math/MathML",ih=typeof document<"u"?document:null,HB=ih&&ih.createElement("template"),N9={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const i=t==="svg"?ih.createElementNS(w9,e):t==="mathml"?ih.createElementNS(k9,e):n?ih.createElement(e,{is:n}):ih.createElement(e);return e==="select"&&s&&s.multiple!=null&&i.setAttribute("multiple",s.multiple),i},createText:e=>ih.createTextNode(e),createComment:e=>ih.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ih.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,i,r){const a=n?n.previousSibling:t.lastChild;if(i&&(i===r||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===r||!(i=i.nextSibling)););else{HB.innerHTML=G3(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const c=HB.content;if(s==="svg"||s==="mathml"){const u=c.firstChild;for(;u.firstChild;)c.appendChild(u.firstChild);c.removeChild(u)}t.insertBefore(c,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},xf="transition",aS="animation",$E=Symbol("_vtc"),W3={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},X3=Ai({},d3,W3),P9=e=>(e.displayName="Transition",e.props=X3,e),Li=P9((e,{slots:t})=>Gt(xq,z3(e),t)),Qg=(e,t=[])=>{at(e)?e.forEach(n=>n(...t)):e&&e(...t)},VB=e=>e?at(e)?e.some(t=>t.length>1):e.length>1:!1;function z3(e){const t={};for(const G in e)G in W3||(t[G]=e[G]);if(e.css===!1)return t;const{name:n="v",type:s,duration:i,enterFromClass:r=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:u=r,appearActiveClass:h=a,appearToClass:f=c,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:_=`${n}-leave-active`,leaveToClass:E=`${n}-leave-to`}=e,v=D9(i),b=v&&v[0],y=v&&v[1],{onBeforeEnter:S,onEnter:L,onEnterCancelled:I,onLeave:R,onLeaveCancelled:w,onBeforeAppear:k=S,onAppear:D=L,onAppearCancelled:P=I}=t,B=(G,re,_e,J)=>{G._enterCancelled=J,Hf(G,re?f:c),Hf(G,re?h:a),_e&&_e()},F=(G,re)=>{G._isLeaving=!1,Hf(G,p),Hf(G,E),Hf(G,_),re&&re()},X=G=>(re,_e)=>{const J=G?D:L,Y=()=>B(re,G,_e);Qg(J,[re,Y]),GB(()=>{Hf(re,G?u:r),ku(re,G?f:c),VB(J)||WB(re,s,b,Y)})};return Ai(t,{onBeforeEnter(G){Qg(S,[G]),ku(G,r),ku(G,a)},onBeforeAppear(G){Qg(k,[G]),ku(G,u),ku(G,h)},onEnter:X(!1),onAppear:X(!0),onLeave(G,re){G._isLeaving=!0;const _e=()=>F(G,re);ku(G,p),G._enterCancelled?(ku(G,_),gk()):(gk(),ku(G,_)),GB(()=>{G._isLeaving&&(Hf(G,p),ku(G,E),VB(R)||WB(G,s,y,_e))}),Qg(R,[G,_e])},onEnterCancelled(G){B(G,!1,void 0,!0),Qg(I,[G])},onAppearCancelled(G){B(G,!0,void 0,!0),Qg(P,[G])},onLeaveCancelled(G){F(G),Qg(w,[G])}})}function D9(e){if(e==null)return null;if(Tn(e))return[DL(e.enter),DL(e.leave)];{const t=DL(e);return[t,t]}}function DL(e){return KQ(e)}function ku(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[$E]||(e[$E]=new Set)).add(t)}function Hf(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[$E];n&&(n.delete(t),n.size||(e[$E]=void 0))}function GB(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let x9=0;function WB(e,t,n,s){const i=e._endId=++x9,r=()=>{i===e._endId&&s()};if(n!=null)return setTimeout(r,n);const{type:a,timeout:c,propCount:u}=Y3(e,t);if(!a)return s();const h=a+"end";let f=0;const p=()=>{e.removeEventListener(h,_),r()},_=E=>{E.target===e&&++f>=u&&p()};setTimeout(()=>{f<u&&p()},c+1),e.addEventListener(h,_)}function Y3(e,t){const n=window.getComputedStyle(e),s=v=>(n[v]||"").split(", "),i=s(`${xf}Delay`),r=s(`${xf}Duration`),a=XB(i,r),c=s(`${aS}Delay`),u=s(`${aS}Duration`),h=XB(c,u);let f=null,p=0,_=0;t===xf?a>0&&(f=xf,p=a,_=r.length):t===aS?h>0&&(f=aS,p=h,_=u.length):(p=Math.max(a,h),f=p>0?a>h?xf:aS:null,_=f?f===xf?r.length:u.length:0);const E=f===xf&&/\b(transform|all)(,|$)/.test(s(`${xf}Property`).toString());return{type:f,timeout:p,propCount:_,hasTransform:E}}function XB(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>zB(n)+zB(e[s])))}function zB(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function gk(){return document.body.offsetHeight}function B9(e,t,n){const s=e[$E];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const VC=Symbol("_vod"),K3=Symbol("_vsh"),Yn={beforeMount(e,{value:t},{transition:n}){e[VC]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):cS(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),cS(e,!0),s.enter(e)):s.leave(e,()=>{cS(e,!1)}):cS(e,t))},beforeUnmount(e,{value:t}){cS(e,t)}};function cS(e,t){e.style.display=t?e[VC]:"none",e[K3]=!t}const F9=Symbol(""),U9=/(^|;)\s*display\s*:/;function H9(e,t,n){const s=e.style,i=Dt(n);let r=!1;if(n&&!i){if(t)if(Dt(t))for(const a of t.split(";")){const c=a.slice(0,a.indexOf(":")).trim();n[c]==null&&wR(s,c,"")}else for(const a in t)n[a]==null&&wR(s,a,"");for(const a in n)a==="display"&&(r=!0),wR(s,a,n[a])}else if(i){if(t!==n){const a=s[F9];a&&(n+=";"+a),s.cssText=n,r=U9.test(n)}}else t&&e.removeAttribute("style");VC in e&&(e[VC]=r?s.display:"",e[K3]&&(s.display="none"))}const YB=/\s*!important$/;function wR(e,t,n){if(at(n))n.forEach(s=>wR(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=V9(e,t);YB.test(n)?e.setProperty(Ih(s),n.replace(YB,""),"important"):e[s]=n}}const KB=["Webkit","Moz","ms"],xL={};function V9(e,t){const n=xL[t];if(n)return n;let s=ll(t);if(s!=="filter"&&s in e)return xL[t]=s;s=o$(s);for(let i=0;i<KB.length;i++){const r=KB[i]+s;if(r in e)return xL[t]=r}return t}const jB="http://www.w3.org/1999/xlink";function QB(e,t,n,s,i,r=eq(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(jB,t.slice(6,t.length)):e.setAttributeNS(jB,t,n):n==null||r&&!kW(n)?e.removeAttribute(t):e.setAttribute(t,r?"":Vc(n)?String(n):n)}function qB(e,t,n,s,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?G3(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const c=r==="OPTION"?e.getAttribute("value")||"":e.value,u=n==null?e.type==="checkbox"?"on":"":String(n);(c!==u||!("_value"in e))&&(e.value=u),n==null&&e.removeAttribute(t),e._value=n;return}let a=!1;if(n===""||n==null){const c=typeof e[t];c==="boolean"?n=kW(n):n==null&&c==="string"?(n="",a=!0):c==="number"&&(n=0,a=!0)}try{e[t]=n}catch{}a&&e.removeAttribute(i||t)}function Jf(e,t,n,s){e.addEventListener(t,n,s)}function G9(e,t,n,s){e.removeEventListener(t,n,s)}const JB=Symbol("_vei");function W9(e,t,n,s,i=null){const r=e[JB]||(e[JB]={}),a=r[t];if(s&&a)a.value=s;else{const[c,u]=X9(t);if(s){const h=r[t]=K9(s,i);Jf(e,c,h,u)}else a&&(G9(e,c,a,u),r[t]=void 0)}}const ZB=/(?:Once|Passive|Capture)$/;function X9(e){let t;if(ZB.test(e)){t={};let s;for(;s=e.match(ZB);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Ih(e.slice(2)),t]}let BL=0;const z9=Promise.resolve(),Y9=()=>BL||(z9.then(()=>BL=0),BL=Date.now());function K9(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Gc(j9(s,n.value),t,5,[s])};return n.value=e,n.attached=Y9(),n}function j9(e,t){if(at(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>i=>!i._stopped&&s&&s(i))}else return t}const eF=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Q9=(e,t,n,s,i,r)=>{const a=i==="svg";t==="class"?B9(e,s,a):t==="style"?H9(e,n,s):GM(t)?Q1(t)||W9(e,t,n,s,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):q9(e,t,s,a))?(qB(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&QB(e,t,s,a,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Dt(s))?qB(e,ll(t),s,r,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),QB(e,t,s,a))};function q9(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&eF(t)&&Ut(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return eF(t)&&Dt(n)?!1:t in e}const j3=new WeakMap,Q3=new WeakMap,GC=Symbol("_moveCb"),tF=Symbol("_enterCb"),J9=e=>(delete e.props.mode,e),Z9=J9({name:"TransitionGroup",props:Ai({},X3,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=pn(),s=u3();let i,r;return nd(()=>{if(!i.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!o7(i[0].el,n.vnode.el,a))return;i.forEach(e7),i.forEach(t7);const c=i.filter(n7);gk(),c.forEach(u=>{const h=u.el,f=h.style;ku(h,a),f.transform=f.webkitTransform=f.transitionDuration="";const p=h[GC]=_=>{_&&_.target!==h||(!_||/transform$/.test(_.propertyName))&&(h.removeEventListener("transitionend",p),h[GC]=null,Hf(h,a))};h.addEventListener("transitionend",p)})}),()=>{const a=uo(e),c=z3(a);let u=a.tag||Lt;if(i=[],r)for(let h=0;h<r.length;h++){const f=r[h];f.el&&f.el instanceof Element&&(i.push(f),Rm(f,ay(f,c,s,n)),j3.set(f,f.el.getBoundingClientRect()))}r=t.default?cP(t.default()):[];for(let h=0;h<r.length;h++){const f=r[h];f.key!=null&&Rm(f,ay(f,c,s,n))}return oe(u,null,r)}}}),q3=Z9;function e7(e){const t=e.el;t[GC]&&t[GC](),t[tF]&&t[tF]()}function t7(e){Q3.set(e,e.el.getBoundingClientRect())}function n7(e){const t=j3.get(e),n=Q3.get(e),s=t.left-n.left,i=t.top-n.top;if(s||i){const r=e.el.style;return r.transform=r.webkitTransform=`translate(${s}px,${i}px)`,r.transitionDuration="0s",e}}function o7(e,t,n){const s=e.cloneNode(),i=e[$E];i&&i.forEach(c=>{c.split(/\s+/).forEach(u=>u&&s.classList.remove(u))}),n.split(/\s+/).forEach(c=>c&&s.classList.add(c)),s.style.display="none";const r=t.nodeType===1?t:t.parentNode;r.appendChild(s);const{hasTransform:a}=Y3(s);return r.removeChild(s),a}const IE=e=>{const t=e.props["onUpdate:modelValue"]||!1;return at(t)?n=>MR(t,n):t};function s7(e){e.target.composing=!0}function nF(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const mh=Symbol("_assign"),oA={created(e,{modifiers:{lazy:t,trim:n,number:s}},i){e[mh]=IE(i);const r=s||i.props&&i.props.type==="number";Jf(e,t?"change":"input",a=>{if(a.target.composing)return;let c=e.value;n&&(c=c.trim()),r&&(c=ok(c)),e[mh](c)}),n&&Jf(e,"change",()=>{e.value=e.value.trim()}),t||(Jf(e,"compositionstart",s7),Jf(e,"compositionend",nF),Jf(e,"change",nF))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:i,number:r}},a){if(e[mh]=IE(a),e.composing)return;const c=(r||e.type==="number")&&!/^0\d/.test(e.value)?ok(e.value):e.value,u=t??"";c!==u&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||i&&e.value.trim()===u)||(e.value=u))}},WC={deep:!0,created(e,t,n){e[mh]=IE(n),Jf(e,"change",()=>{const s=e._modelValue,i=Z3(e),r=e.checked,a=e[mh];if(at(s)){const c=NW(s,i),u=c!==-1;if(r&&!u)a(s.concat(i));else if(!r&&u){const h=[...s];h.splice(c,1),a(h)}}else if(WM(s)){const c=new Set(s);r?c.add(i):c.delete(i),a(c)}else a(eX(e,r))})},mounted:oF,beforeUpdate(e,t,n){e[mh]=IE(n),oF(e,t,n)}};function oF(e,{value:t,oldValue:n},s){e._modelValue=t;let i;if(at(t))i=NW(t,s.props.value)>-1;else if(WM(t))i=t.has(s.props.value);else{if(t===n)return;i=yE(t,eX(e,!0))}e.checked!==i&&(e.checked=i)}const J3={created(e,{value:t},n){e.checked=yE(t,n.props.value),e[mh]=IE(n),Jf(e,"change",()=>{e[mh](Z3(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[mh]=IE(s),t!==n&&(e.checked=yE(t,s.props.value))}};function Z3(e){return"_value"in e?e._value:e.value}function eX(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const i7=["ctrl","shift","alt","meta"],r7={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>i7.some(n=>e[`${n}Key`]&&!t.includes(n))},Yt=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(i,...r)=>{for(let a=0;a<t.length;a++){const c=r7[t[a]];if(c&&c(i,t))return}return e(i,...r)})},l7={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},So=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=i=>{if(!("key"in i))return;const r=Ih(i.key);if(t.some(a=>a===r||l7[a]===r))return e(i)})},a7=Ai({patchProp:Q9},N9);let sF;function tX(){return sF||(sF=r9(a7))}const fp=(...e)=>{tX().render(...e)},nX=(...e)=>{const t=tX().createApp(...e),{mount:n}=t;return t.mount=s=>{const i=u7(s);if(!i)return;const r=t._component;!Ut(r)&&!r.render&&!r.template&&(r.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const a=n(i,!1,c7(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},t};function c7(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function u7(e){return Dt(e)?document.querySelector(e):e}var ep=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kR={exports:{}},NR={exports:{}},PR={exports:{}},DR={exports:{}},xR={exports:{}},d7=xR.exports,iF;function sA(){return iF||(iF=1,function(e,t){(function(n,s){e.exports=s()})(d7,function(){var n={},s,i,r,a,c,u,h,f,p,_,E,v,b,y,S,L,I,R,w,k,D,P,B,F,X,G,re,_e,J,Y,ae,Z,Q,he,ge,Ie,be,Ae,We,$e,ve,Pe,Be,ot,Xe,ee,pe,Oe,ze,Ze,De,me,Te,Ue,qe,ct,Ne,Se,Je,ut,Mt,mt,qt,ce,q,ne,Le,ue,Fe,ye,ft,Kt,En,Rn,Lo,Ln,Zn,On,xo,ie,Ce,U,se,ke,je,Rt,Qt,Cn,fs,ps,js,cr,bt,jt,Hn,rs,Ps,ul,ur,Br,dl,_a,_t,Jt,bn,Bn,oi,dr,Ov,Km,ud,x$,jm,Sv,yv,$v,xp,dd,Dh,B$,Qm,xh,Iv,F$,nu,Rv,Bh,qm,Cv,Bp,pc,ki,Mv,Jm,Zm,e_,Av,t_,Lv,wv,Fp,U$,kv,ou,Nv,Ta,H$,n_,V$,su,Pv,G$,W$,Jo,Yo,X$,Dv,z$,Y$,o_,K$,xv,Bv,Us,Fh,iu,Wl,s_,Fr,Fv,Uv,Hv,Vv,Gv,i_,Hs,Uh,hr,j$,Wv,gc,Up,r_,ls,mc,l_,Xv,a_,Q$,q$,J$,zv,Hp,Xl,Yv,Kv,jv,Ur,Ho,ru,Z$,Vp,Hh,hl,c_,Ni,Gp,hd,Qv,qv,eI,Jv,tI,Zv,Wp,fd,nI,oI,u_,Vh,Ea,Gh,eb,sI,Wh,lu,Pi,d_,tb,nb,Xh,h_,f_,pd,lt,Ct,vt,gn,Vn,Co,Ds,Vo,gd,ob,pi,md,zl,au,zh,Yh,ko,p_,g_,Kh,jh,iI,Xp,Qh,va,zp,Yp,qh,sb,ib,Kp,rb,Jh,fl,Zh,lb,ef,m_,jp,Qp,qp,ab,ba,cb,ub,Vs,gi,rI,lI,Oa,cu,tf,_d,nf,uu,pl,_c,Td,Tc,Ed,db,__,hb,Os,Jp,Sa,Ec,we,si,Zp,Hr,ao,aI,fb,cI,vc,T_,uI,dI,hI,pb,gl,gb,E_,fI,pI,gI,ya,Sn,fr,Qs,Zo,$a,ml,ln,Cs,Vr,mI,v_,mb,_I,_b,eg,b_,Tb,TI,tg,of,vd,EI,Eb,ng,Ia,O_,du,mi,vI,S_,y_,bd,Ra,og,vb,hu,bb,$_,qs,sg,I_,_l,ig,sf,bc,R_,_i,rg,bI,OI,rf,lg,SI,fu,C_,Ob,Sb,Od,yb,$b,ag,M_,A_,cg,Ib,Rb,ug,Cb,dg,L_,w_,k_,lf,yI,N_,Mb,$I,Ab,II,P_,Lb,D_,RI,x_,eo,CI,Mn;s=function(o,l,d,m){if(!(o instanceof At)&&typeof o!="string"||`${o}`.trim()==="")throw Error('Invalid type "'+o+'". The type must be a non-empty string or a Blockly.registry.Type.');if(o=`${o}`.toLowerCase(),typeof l!="string"||l.trim()==="")throw Error('Invalid name "'+l+'". The name must be a non-empty string.');const $=l.toLowerCase();if(!d)throw Error("Can not register a null value");let V=Tl[o],Ee=B_[o];if(V||(V=Tl[o]=Object.create(null),Ee=B_[o]=Object.create(null)),i(o,d),!m&&V[$])throw Error('Name "'+$+'" with type "'+o+'" already registered.');V[$]=d,Ee[$]=l},i=function(o,l){switch(o){case String(At.FIELD):if(typeof l.fromJson!="function")throw Error('Type "'+o+'" must have a fromJson function')}},r=function(o,l){o=`${o}`.toLowerCase(),l=l.toLowerCase();const d=Tl[o];d&&d[l]?(delete Tl[o][l],delete B_[o][l]):console.warn("Unable to unregister ["+l+"]["+o+"] from the registry.")},a=function(o,l,d){o=`${o}`.toLowerCase(),l=l.toLowerCase();const m=Tl[o];if(!m||!m[l]){if(l="Unable to find ["+l+"]["+o+"] in the registry.",d)throw Error(l+" You must require or register a "+o+" plugin.");return console.warn(l),null}return m[l]},c=function(o,l){return o=`${o}`.toLowerCase(),l=l.toLowerCase(),(o=Tl[o])?!!o[l]:!1},u=function(o,l,d){return a(o,l,d)},h=function(o,l,d){return a(o,l,d)},f=function(o,l,d){o=`${o}`.toLowerCase();var m=Tl[o];if(!m){if(m=`Unable to find [${o}] in the registry.`,d)throw Error(`${m} You must require or register a ${o} plugin.`);return console.warn(m),null}if(!l)return m;o=B_[o],d=Object.create(null);for(const $ of Object.keys(m))d[o[$]]=m[$];return d},p=function(o,l,d){return l=l.plugins[String(o)]||Ca,typeof l=="function"?l:u(o,l,d)},_=function(o){return Sd[o]||null},E=function(){const o=[];for(const l in Sd)o.push(Sd[l]);return o},v=function(o){Sd[o.id]=o},b=function(o){delete Sd[o.id]},y=function(){return wb},S=function(o){wb=o},L=function(){return kb},I=function(o){kb=o},R=function(){return pr},w=function(o){pr=o},k=function(o){for(;o.options.parentWorkspace;)o=o.options.parentWorkspace;const l=o.getParentSvg(),d=o.getCachedParentSvgSize();var m=l.parentElement;if(m instanceof HTMLElement){var $=m.offsetWidth;m=m.offsetHeight,d.width!==$&&(l.setAttribute("width",$+"px"),o.setCachedParentSvgSize($,null)),d.height!==m&&(l.setAttribute("height",m+"px"),o.setCachedParentSvgSize(null,m)),o.resize()}},D=function(o,l){const d=Object.create(null),m=o.getDescendants(!0);l&&(o=o.getNextBlock())&&(o=m.indexOf(o),m.splice(o,m.length-o));for(let $=0,V;V=m[$];$++)d[V.type]?d[V.type]++:d[V.type]=1;return d},P=function(o){return function(){this.jsonInit(o)}},B=function(o){F_.defineBlocksWithJsonArrayInternal(o)},F=function(o){n.defineBlocks$$module$build$src$core$common(n.createBlockDefinitionsFromJsonArray$$module$build$src$core$common(o))},n.createBlockDefinitionsFromJsonArray$$module$build$src$core$common=function(o){const l={};for(let d=0;d<o.length;d++){const m=o[d];if(!m){console.warn(`Block definition #${d} in JSON array is ${m}. Skipping`);continue}const $=m.type;$?l[$]={init:P(m)}:console.warn(`Block definition #${d} in JSON array is missing a type attribute. Skipping.`)}return l},n.defineBlocks$$module$build$src$core$common=function(o){for(const l of Object.keys(o)){const d=o[l];l in Ti&&console.warn(`Block definiton "${l}" overwrites previous definition.`),Ti[l]=d}},X=function(){return"blockly-"+(Pb++).toString(36)},G=function(){return Nb.genUid()},re=function(o){pu=o},_e=function(){return pu},J=function(o){H_.fireInternal(o)},Y=function(o){if(he()){if(!_u.length)try{requestAnimationFrame(()=>{setTimeout(ae,0)})}catch{setTimeout(ae,0)}_u.push(o)}},ae=function(){var o=Z(_u,!0);_u.length=0;for(let d=0,m;m=o[d];d++)if(m.workspaceId){var l=_(m.workspaceId);l&&l.fireChangeListener(m)}o=new Set(o.map(d=>d.workspaceId));for(const d of o){if(!d||(o=_(d),!o))continue;o=o.getUndoStack();let m;for(l=o.length;0<l;l--){const $=o[l-1];if($.group==="")break;if(m===void 0)m=$.group;else if($.group!==m)break}m&&l!=o.length-1&&(l=o.splice(l,o.length-l),l=Z(l,!0),o.push(...l))}},Z=function(o,l){o=o.slice(),l||o.reverse();const d=[],m=Object.create(null);for(let Ee=0,Ve;Ve=o[Ee];Ee++)if(!Ve.isNull()){var $=[Ve.isUiEvent?af:Ve.type,Ve.blockId,Ve.workspaceId].join(" "),V=m[$];const St=V?V.event:null;V?Ve.type===n.MOVE$$module$build$src$core$events$utils&&V.index===Ee-1?($=Ve,St.newParentId=$.newParentId,St.newInputName=$.newInputName,St.newCoordinate=$.newCoordinate,$.reason&&(St.reason?($=new Set($.reason.concat(St.reason)),St.reason=Array.from($)):St.reason=$.reason),V.index=Ee):Ve.type===n.CHANGE$$module$build$src$core$events$utils&&Ve.element===St.element&&Ve.name===St.name?St.newValue=Ve.newValue:Ve.type===xs?(V=Ve,St.viewTop=V.viewTop,St.viewLeft=V.viewLeft,St.scale=V.scale,St.oldScale=V.oldScale):(Ve.type!==yc||St.type!==Kl)&&(m[$]={event:Ve,index:Ee},d.push(Ve)):(m[$]={event:Ve,index:Ee},d.push(Ve))}o=d.filter(function(Ee){return!Ee.isNull()}),l||o.reverse();for(let Ee=1,Ve;Ve=o[Ee];Ee++)Ve.type===n.CHANGE$$module$build$src$core$events$utils&&Ve.element==="mutation"&&o.unshift(o.splice(Ee,1)[0]);return o},Q=function(){for(let o=0,l;l=_u[o];o++)l.recordUndo=!1},n.disable$$module$build$src$core$events$utils=function(){Yl++},n.enable$$module$build$src$core$events$utils=function(){Yl--},he=function(){return Yl===0},n.getGroup$$module$build$src$core$events$utils=function(){return fg},n.setGroup$$module$build$src$core$events$utils=function(o){H_.setGroupInternal(o)},ge=function(o){fg=typeof o=="boolean"?o?G():"":o},Ie=function(o){const l=[];o=o.getDescendants(!1);for(let d=0,m;m=o[d];d++)l[d]=m.id;return l},be=function(o,l){const d=Ae(o.type);if(!d)throw Error("Unknown event type.");return d.fromJson(o,l)},Ae=function(o){const l=u(At.EVENT,o);if(!l)throw Error(`Event type ${o} not found in registry.`);return l},We=function(o){if((o.type===n.MOVE$$module$build$src$core$events$utils||o.type===n.CREATE$$module$build$src$core$events$utils)&&o.workspaceId){var l=_(o.workspaceId);if(!o.blockId)throw Error("Encountered a blockEvent without a proper blockId");if(o=l.getBlockById(o.blockId)){const d=pu;try{pu=!1;const m=o.getParent();if(m&&m.isEnabled()){const $=o.getDescendants(!1);for(let V=0,Ee;Ee=$[V];V++)Ee.setEnabled(!0)}else if((o.outputConnection||o.previousConnection)&&!l.isDragging())do o.setEnabled(!1),o=o.getNextBlock();while(o)}finally{pu=d}}}},$e=function(o,l){ve(),df=setTimeout(function(){l&&l.handleRightClick(o)},AI)},ve=function(){df&&(clearTimeout(df),df=0)},Pe=function(){mg=null},Be=function(o){return!o.type.startsWith("pointer")||o instanceof PointerEvent&&Xe(o)},ot=function(o){return`${o.pointerId}`},Xe=function(o){const l=ot(o);return mg?mg===l:o.type==="pointerdown"?(mg=l,!0):!1},ee=function(o,l,d,m,$){function V(Ve){($||Be(Ve))&&(d?m.call(d,Ve):m(Ve))}const Ee=[];if(l in Ma)for(let Ve=0;Ve<Ma[l].length;Ve++){const St=Ma[l][Ve];o.addEventListener(St,V,!1),Ee.push([o,St,V])}else o.addEventListener(l,V,!1),Ee.push([o,l,V]);return Ee},pe=function(o,l,d,m){function $(Ee){d?m.call(d,Ee):m(Ee)}const V=[];if(l in Ma)for(let Ee=0;Ee<Ma[l].length;Ee++){const Ve=Ma[l][Ee];o.addEventListener(Ve,$,!1),V.push([o,Ve,$])}else o.addEventListener(l,$,!1),V.push([o,l,$]);return V},Oe=function(o){const l=o[o.length-1][2];for(;o.length;){const[d,m,$]=o.pop();d.removeEventListener(m,$,!1)}return l},ze=function(o){if(o.target instanceof HTMLElement){if(o.target.isContentEditable||o.target.getAttribute("data-is-text-input")==="true")return!0;if(o.target instanceof HTMLInputElement)return o=o.target,o.type==="text"||o.type==="number"||o.type==="email"||o.type==="password"||o.type==="search"||o.type==="tel"||o.type==="url";if(o.target instanceof HTMLTextAreaElement)return!0}return!1},Ze=function(o){return o.ctrlKey&&Tg?!0:o.button===2},De=function(o,l,d){const m=l.createSVGPoint();return m.x=o.clientX,m.y=o.clientY,d||(d=l.getScreenCTM().inverse()),m.matrixTransform(d)},me=function(o){switch(o.deltaMode){default:return{x:o.deltaX,y:o.deltaY};case 1:return{x:o.deltaX*Ad,y:o.deltaY*Ad};case 2:return{x:o.deltaX*Nn,y:o.deltaY*Nn}}},Te=function(o,l){return l=o.indexOf(l),l===-1?!1:(o.splice(l,1),!0)},Ue=function(o){if(vg)throw Error("CSS already injected");j_+=`
  18. `+o},qe=function(o,l){vg||(vg=!0,o&&(o=l.replace(/[\\/]$/,""),l=j_.replace(/<<<PATH>>>/g,o),j_="",o=document.createElement("style"),o.id="blockly-common-style",l=document.createTextNode(l),o.appendChild(l),document.head.insertBefore(o,document.head.firstChild)))},ct=function(o,l,d,m){o=o+" was deprecated in "+l+" and will be deleted in "+d+".",m&&(o+=`
  19. Use `+m+" instead."),LI.has(o)||(LI.add(o),console.warn(o))},Ne=function(o,l,d){o=document.createElementNS(bg,`${o}`);for(const m in l)o.setAttribute(m,`${l[m]}`);return d&&d.appendChild(o),o},Se=function(o,l){return l=l.split(" "),l.every(d=>o.classList.contains(d))?!1:(o.classList.add(...l),!0)},Je=function(o,l){o.classList.remove(...l.split(" "))},ut=function(o,l){return l=l.split(" "),l.every(d=>!o.classList.contains(d))?!1:(o.classList.remove(...l),!0)},Mt=function(o,l){return o.classList.contains(l)},mt=function(o){return o&&o.parentNode?o.parentNode.removeChild(o):null},qt=function(o,l){const d=l.nextSibling;if(l=l.parentNode,!l)throw Error("Reference node has no parent.");d?l.insertBefore(o,d):l.appendChild(o)},ce=function(o,l){return ct("Blockly.utils.dom.containsNode","version 10","version 11",'Use native "contains" DOM method'),o.contains(l)},q=function(o,l){o.style.transform=l,o.style["-webkit-transform"]=l},ne=function(){Jl++,ql||(ql=Object.create(null))},Le=function(){Jl--,Jl||(ql=null)},ue=function(o){const l=o.textContent+`
  20. `+o.className.baseVal;let d;if(ql&&(d=ql[l]))return d;try{d=o.getComputedTextLength()}catch{return 8*o.textContent.length}return ql&&(ql[l]=d),d},Fe=function(o,l,d,m){return ye(o,l+"pt",d,m)},ye=function(o,l,d,m){const $=o.textContent;o=$+`
  21. `+o.className.baseVal;var V;return ql&&(V=ql[o])||(li||(V=document.createElement("canvas"),V.className="blocklyComputeCanvas",document.body.appendChild(V),li=V.getContext("2d")),li.font=d+" "+l+" "+m,V=$?li.measureText($).width:0,ql&&(ql[o]=V)),V},ft=function(o,l,d,m){const $=document.createElement("span");$.style.font=d+" "+l+" "+m,$.textContent=o,o=document.createElement("div"),o.style.width="1px",o.style.height="0",l=document.createElement("div"),l.style.display="flex",l.style.position="fixed",l.style.top="0",l.style.left="0",l.appendChild($),l.appendChild(o),document.body.appendChild(l),d={height:0,baseline:0};try{l.style.alignItems="baseline",d.baseline=o.offsetTop-$.offsetTop,l.style.alignItems="flex-end",d.height=o.offsetTop-$.offsetTop}finally{document.body.removeChild(l)}return d},Kt=function(o){return wI.getSizeInternal(o)},En=function(o){if(Lo(o,"display")!=="none")return Rn(o);const l=o.style,d=l.display,m=l.visibility,$=l.position;l.visibility="hidden",l.position="absolute",l.display="inline";const V=o.offsetWidth;return o=o.offsetHeight,l.display=d,l.position=$,l.visibility=m,new Ko(V,o)},Rn=function(o){return new Ko(o.offsetWidth,o.offsetHeight)},Lo=function(o,l){return o=window.getComputedStyle(o),o[l]||o.getPropertyValue(l)},Ln=function(o){const l=new zt(0,0);o=o.getBoundingClientRect();var d=document.documentElement;return d=new zt(window.pageXOffset||d.scrollLeft,window.pageYOffset||d.scrollTop),l.x=o.left+d.x,l.y=o.top+d.y,l},Zn=function(){const o=document.body,l=document.documentElement;return new zt(o.scrollLeft||l.scrollLeft,o.scrollTop||l.scrollTop)},On=function(o){const l=parseFloat(Lo(o,"borderLeftWidth")),d=parseFloat(Lo(o,"borderRightWidth")),m=parseFloat(Lo(o,"borderTopWidth"));return o=parseFloat(Lo(o,"borderBottomWidth")),new Po(m,o,l,d)},xo=function(o,l,d){o=ie(o,l,d),l.scrollLeft=o.x,l.scrollTop=o.y},ie=function(o,l,d){var m=Ln(o),$=Ln(l),V=On(l);const Ee=m.x-$.x-V.left;return m=m.y-$.y-V.top,$=Rn(o),o=l.clientWidth-$.width,$=l.clientHeight-$.height,V=l.scrollLeft,l=l.scrollTop,d?(V+=Ee-o/2,l+=m-$/2):(V+=Math.min(Ee,Math.max(Ee-o,0)),l+=Math.min(m,Math.max(m-$,0))),new zt(V,l)},Ce=function(o){const l=new zt(0,0);var d=o.x&&o.getAttribute("x");const m=o.y&&o.getAttribute("y");return d&&(l.x=parseInt(d)),m&&(l.y=parseInt(m)),(d=(d=o.getAttribute("transform"))&&d.match(Xb))&&(l.x+=Number(d[1]),d[3]&&(l.y+=Number(d[3]))),(o=o.getAttribute("style"))&&-1<o.indexOf("translate")&&(o=o.match(zb))&&(l.x+=Number(o[1]),o[3]&&(l.y+=Number(o[3]))),l},U=function(o){let l=0,d=0;for(;o;){const m=Ce(o);if(l+=m.x,d+=m.y,(" "+(o.getAttribute("class")||"")+" ").indexOf(" injectionDiv ")!==-1)break;o=o.parentNode}return new zt(l,d)},se=function(){const o=Zn();return new Po(o.y,document.documentElement.clientHeight+o.y,o.x,document.documentElement.clientWidth+o.x)},ke=function(){const o=document.documentElement,l=window;return new zt(l.pageXOffset||o.scrollLeft,l.pageYOffset||o.scrollTop)},je=function(o,l){var d=l.x;l=l.y;const m=o.getInjectionDiv().getBoundingClientRect();return d=new zt(d-m.left,l-m.top),l=o.getOriginOffsetInPixels(),zt.difference(d,l).scale(1/o.scale)},Rt=function(o,l){var d=l.scale(o.scale);l=d.x,d=d.y;const m=o.getInjectionDiv().getBoundingClientRect();return o=o.getOriginOffsetInPixels(),new zt(l+m.left+o.x,d+m.top+o.y)},Qt=function(o){({document:Og=Og,DOMParser:Sg=Sg,XMLSerializer:wd=wd}=o),Q_=new Sg,q_=new wd},n.createElement$$module$build$src$core$utils$xml=function(o){return Og.createElementNS(Yb,o)},n.createTextNode$$module$build$src$core$utils$xml=function(o){return Og.createTextNode(o)},n.textToDom$$module$build$src$core$utils$xml=function(o){let l=Q_.parseFromString(o,"text/xml");if(l&&l.documentElement&&!l.getElementsByTagName("parsererror").length)return l.documentElement;if((l=Q_.parseFromString(o,"text/html"))&&l.body.firstChild&&l.body.firstChild.nodeName.toLowerCase()==="xml")return l.body.firstChild;throw Error(`DOMParser was unable to parse: ${o}`)},Cn=function(o){return fs(q_.serializeToString(o))},fs=function(o){return o.replace(yg,l=>`&#${l.charCodeAt(0)};`)},ps=function(o){return o?((o instanceof Element||typeof o=="string")&&(o=ur(o),o=rs(o)),js(o),o):null},js=function(o){const l=o.kind;if(o=o.contents,l&&l!==Kb&&l!==J_)throw Error("Invalid toolbox kind "+l+". Please supply either "+Kb+" or "+J_);if(!o)throw Error("Toolbox must have a contents attribute.")},cr=function(o){return o?o.contents?o.contents:Array.isArray(o)&&0<o.length&&!o[0].nodeType?o:Ps(o):[]},bt=function(o){return jb.hasCategoriesInternal(o)},jt=function(o){if(!o)return!1;const l=o.kind;return l?l===J_:!!o.contents.filter(function(d){return d.kind.toUpperCase()==="CATEGORY"}).length},Hn=function(o){return o&&o.contents?!!o.contents.filter(function(l){return l.kind.toUpperCase()==="CATEGORY"}).length:!1},rs=function(o){const l={contents:Ps(o)};return o instanceof Node&&ul(o,l),l},Ps=function(o){const l=[];let d=o.childNodes;d||(d=o);for(let m=0,$;$=d[m];m++){if(!$.tagName)continue;o={};const V=$.tagName.toUpperCase();o.kind=V,V==="BLOCK"?o.blockxml=$:$.childNodes&&0<$.childNodes.length&&(o.contents=Ps($)),ul($,o),l.push(o)}return l},ul=function(o,l){for(let d=0;d<o.attributes.length;d++){const m=o.attributes[d];-1<m.nodeName.indexOf("css-")?(l.cssconfig=l.cssconfig||{},l.cssconfig[m.nodeName.replace("css-","")]=m.value):l[m.nodeName]=m.value}},ur=function(o){let l=null;if(o)if(typeof o=="string"){if(l=n.textToDom$$module$build$src$core$utils$xml(o),l.nodeName.toLowerCase()!=="xml")throw TypeError("Toolbox should be an <xml> document.")}else o instanceof Element&&(l=o);return l},Br=function(o,l,d,m,$,V){const Ee=V.scrollbar&&V.scrollbar.canScrollVertically();return o.horizontal===ff.LEFT?(d=$.absoluteMetrics.left+d,Ee&&V.RTL&&(d+=Ms.scrollbarThickness)):(d=$.absoluteMetrics.left+$.viewMetrics.width-l.width-d,Ee&&!V.RTL&&(d-=Ms.scrollbarThickness)),o.vertical===Ki.TOP?o=$.absoluteMetrics.top+m:(o=$.absoluteMetrics.top+$.viewMetrics.height-l.height-m,V.scrollbar&&V.scrollbar.canScrollHorizontally()&&(o-=Ms.scrollbarThickness)),new Po(o,o+l.height,d,d+l.width)},dl=function(o,l){return{horizontal:l.toolboxMetrics.position===Gn.LEFT||o.horizontalLayout&&!o.RTL?ff.RIGHT:ff.LEFT,vertical:l.toolboxMetrics.position===Gn.BOTTOM?Ki.TOP:Ki.BOTTOM}},_a=function(o,l,d,m){const $=o.left,V=o.right-o.left,Ee=o.bottom-o.top;for(let Ve=0;Ve<m.length;Ve++){const St=m[Ve];o.intersects(St)&&(o=d===Ic.UP?St.top-Ee-l:St.bottom+l,o=new Po(o,o+Ee,$,$+V),Ve=-1)}return o},_t=function(o,l){NI(o,l)},Jt=function(o){NI=o},bn=function(o,l){xI.confirmInternal(o,l)},Bn=function(o,l){PI(o,l)},oi=function(o){PI=o},dr=function(o,l,d){DI(o,l,d)},Ov=function(o){DI=o},Km=function(o){return o.getVariableModel!==void 0},ud=function(o){return o.getProcedureDef!==void 0},x$=function(o){return o.getProcedureCall!==void 0&&o.renameProcedure!==void 0},n.allUsedVarModels$$module$build$src$core$variables=function(o){o=o.getAllBlocks(!1);const l=new Set;for(let d=0;d<o.length;d++){const m=o[d].getVarModels();if(m)for(let $=0;$<m.length;$++){const V=m[$];V.getId()&&l.add(V)}}return Array.from(l.values())},n.allDeveloperVariables$$module$build$src$core$variables=function(o){o=o.getAllBlocks(!1);const l=new Set;for(let m=0,$;$=o[m];m++){var d=$.getDeveloperVariables;if(d){d=d();for(let V=0;V<d.length;V++)l.add(d[V])}}return Array.from(l.values())},jm=function(o){let l=[];const d=document.createElement("button");return d.setAttribute("text","%{BKY_NEW_VARIABLE}"),d.setAttribute("callbackKey","CREATE_VARIABLE"),o.registerButtonCallback("CREATE_VARIABLE",function(m){dd(m.getTargetWorkspace())}),l.push(d),o=Sv(o),l=l.concat(o)},Sv=function(o){o=o.getVariablesOfType("");const l=[];if(0<o.length){var d=o[o.length-1];if(Ti.variables_set){var m=n.createElement$$module$build$src$core$utils$xml("block");m.setAttribute("type","variables_set"),m.setAttribute("gap",Ti.math_change?"8":"24"),m.appendChild(nu(d)),l.push(m)}if(Ti.math_change&&(m=n.createElement$$module$build$src$core$utils$xml("block"),m.setAttribute("type","math_change"),m.setAttribute("gap",Ti.variables_get?"20":"8"),m.appendChild(nu(d)),d=n.textToDom$$module$build$src$core$utils$xml('<value name="DELTA"><shadow type="math_number"><field name="NUM">1</field></shadow></value>'),m.appendChild(d),l.push(m)),Ti.variables_get){o.sort(gf.compareByName);for(let $=0,V;V=o[$];$++)d=n.createElement$$module$build$src$core$utils$xml("block"),d.setAttribute("type","variables_get"),d.setAttribute("gap","8"),d.appendChild(nu(V)),l.push(d)}}return l},yv=function(o){return FI.generateUniqueNameInternal(o)},$v=function(o){return xp(Jb.charAt(0),o.getAllVariableNames())},xp=function(o,l){if(!l.length)return o;const d=Jb;let m="",$=d.indexOf(o);for(;;){let V=!1;for(let Ee=0;Ee<l.length;Ee++)if(l[Ee].toLowerCase()===o){V=!0;break}if(!V)break;$++,$===d.length&&($=0,m=`${Number(m)+1}`),o=d.charAt($)+m}return o},dd=function(o,l,d){function m(V){Dh(n.Msg$$module$build$src$core$msg.NEW_VARIABLE_TITLE,V,function(Ee){if(Ee){var Ve=Qm(Ee,o);if(Ve){if(Ve.type===$)var St=n.Msg$$module$build$src$core$msg.VARIABLE_ALREADY_EXISTS.replace("%1",Ve.name);else St=n.Msg$$module$build$src$core$msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE,St=St.replace("%1",Ve.name).replace("%2",Ve.type);_t(St,function(){m(Ee)})}else o.createVariable(Ee,$),l&&l(Ee)}else l&&l(null)})}const $=d||"";m("")},n.renameVariable$$module$build$src$core$variables=function(o,l,d){function m($){const V=n.Msg$$module$build$src$core$msg.RENAME_VARIABLE_TITLE.replace("%1",l.name);Dh(V,$,function(Ee){if(Ee){var Ve=B$(Ee,l.type,o),St=xh(l.name,Ee,o);if(Ve||St){var tn="";Ve?tn=n.Msg$$module$build$src$core$msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE.replace("%1",Ve.name).replace("%2",Ve.type):St&&(tn=n.Msg$$module$build$src$core$msg.VARIABLE_ALREADY_EXISTS_FOR_A_PARAMETER.replace("%1",Ee).replace("%2",St)),_t(tn,function(){m(Ee)})}else o.renameVariableById(l.getId(),Ee),d&&d(Ee)}else d&&d(null)})}m("")},Dh=function(o,l,d){dr(o,l,function(m){m&&(m=m.replace(/[\s\xa0]+/g," ").trim(),m===n.Msg$$module$build$src$core$msg.RENAME_VARIABLE||m===n.Msg$$module$build$src$core$msg.NEW_VARIABLE)&&(m=null),d(m)})},B$=function(o,l,d){d=d.getVariableMap().getAllVariables(),o=o.toLowerCase();for(let m=0,$;$=d[m];m++)if($.name.toLowerCase()===o&&$.type!==l)return $;return null},Qm=function(o,l){l=l.getVariableMap().getAllVariables(),o=o.toLowerCase();for(let d=0,m;m=l[d];d++)if(m.name.toLowerCase()===o)return m;return null},xh=function(o,l,d){return d.getProcedureMap().getProcedures().length?Iv(o,l,d):F$(o,l,d)},Iv=function(o,l,d){o=o.toLowerCase(),l=l.toLowerCase(),d=d.getProcedureMap().getProcedures();for(const $ of d){var m=$.getParameters().filter(Km).map(V=>V.getVariableModel().name);if(m&&(d=m.some(V=>V.toLowerCase()===o),m=m.some(V=>V.toLowerCase()===l),d&&m))return $.getName()}return null},F$=function(o,l,d){o=o.toLowerCase(),l=l.toLowerCase(),d=d.getAllBlocks(!1);for(const $ of d){if(!ud($))continue;d=$.getProcedureDef();var m=d[1];const V=m.some(Ee=>Ee.toLowerCase()===o);if(m=m.some(Ee=>Ee.toLowerCase()===l),V&&m)return d[0]}return null},nu=function(o){const l=n.createElement$$module$build$src$core$utils$xml("field");return l.setAttribute("name","VAR"),l.setAttribute("id",o.getId()),l.setAttribute("variabletype",o.type),o=n.createTextNode$$module$build$src$core$utils$xml(o.name),l.appendChild(o),l},n.getOrCreateVariablePackage$$module$build$src$core$variables=function(o,l,d,m){let $=n.getVariable$$module$build$src$core$variables(o,l,d,m);return $||($=Rv(o,l,d,m)),$},n.getVariable$$module$build$src$core$variables=function(o,l,d,m){const $=o.getPotentialVariableMap();let V=null;if(l&&(V=o.getVariableById(l),!V&&$&&(V=$.getVariableById(l)),V))return V;if(d){if(m===void 0)throw Error("Tried to look up a variable by name without a type");V=o.getVariable(d,m),!V&&$&&(V=$.getVariable(d,m))}return V},Rv=function(o,l,d,m){const $=o.getPotentialVariableMap();return d||(d=yv(o.isFlyout?o.targetWorkspace:o)),$?$.createVariable(d,m,l):o.createVariable(d,m,l)},Bh=function(o,l){o=o.getAllVariables();const d=[];if(l.length!==o.length)for(let m=0;m<o.length;m++){const $=o[m];l.indexOf($)===-1&&d.push($)}return d},qm=function(o,l){s(At.PASTER,o,l)},Cv=function(o){r(At.PASTER,o)},Bp=function(o){return Jm(o),Mv()?(Zm(),Promise.resolve()):(Pd||(Pd=new Promise(l=>{nO=l,UI=window.requestAnimationFrame(()=>{Zm(),l()})})),Pd)},pc=function(){return Pd||Promise.resolve()},ki=function(o){o||window.cancelAnimationFrame(UI),Zm(o),!o&&nO&&nO()},Mv=function(){return Vb},Jm=function(o){tO.add(o);const l=o.getParent();l?Jm(l):nT.add(o)},Zm=function(o){const l=o?new Set([o]):new Set([...nT].map($=>$.workspace)),d=[...nT].filter(Av).filter($=>l.has($.workspace));for(var m of d)t_(m);for(const $ of l)$.resizeContents();for(const $ of d)m=$.getRelativeToSurfaceXY(),$.updateComponentLocations(m);for(const $ of d)e_($);o||(Pd=null)},e_=function(o){nT.delete(o),tO.delete(o);for(const l of o.getChildren(!1))e_(l)},Av=function(o){return!o.isDisposed()&&!o.getParent()},t_=function(o){if(tO.has(o)){for(const l of o.getChildren(!1))t_(l);o.renderEfficiently()}},Lv=function(o,l){const d=n.createElement$$module$build$src$core$utils$xml("xml");var m=wv(n.allUsedVarModels$$module$build$src$core$variables(o));m.hasChildNodes()&&d.appendChild(m),m=o.getTopComments(!0);for(let $=0;$<m.length;$++)d.appendChild(m[$].toXmlWithXY(l));for(o=o.getTopBlocks(!0),m=0;m<o.length;m++)d.appendChild(Fp(o[m],l));return d},wv=function(o){const l=n.createElement$$module$build$src$core$utils$xml("variables");for(let d=0;d<o.length;d++){const m=o[d],$=n.createElement$$module$build$src$core$utils$xml("variable");$.appendChild(n.createTextNode$$module$build$src$core$utils$xml(m.name)),m.type&&$.setAttribute("type",m.type),$.id=m.getId(),l.appendChild($)}return l},Fp=function(o,l){if(o.isInsertionMarker()&&(o=o.getChildren(!1)[0],!o))return new DocumentFragment;let d=0;if(o.workspace.RTL&&(d=o.workspace.getWidth()),l=ou(o,l),Bv(l)){const m=o.getRelativeToSurfaceXY();l.setAttribute("x",String(Math.round(o.workspace.RTL?d-m.x:m.x))),l.setAttribute("y",String(Math.round(m.y)))}return l},U$=function(o){if(o.isSerializable()){const l=n.createElement$$module$build$src$core$utils$xml("field");return l.setAttribute("name",o.name||""),o.toXml(l)}return null},kv=function(o,l){for(let d=0;d<o.inputList.length;d++){const m=o.inputList[d];for(let $=0;$<m.fieldRow.length;$++){const V=U$(m.fieldRow[$]);V&&l.appendChild(V)}}},ou=function(o,l){if(o.isInsertionMarker())return(l=o.getChildren(!1)[0])?ou(l):new DocumentFragment;const d=n.createElement$$module$build$src$core$utils$xml(o.isShadow()?"shadow":"block");if(d.setAttribute("type",o.type),l||(d.id=o.id),o.mutationToDom){var m=o.mutationToDom();m&&(m.hasChildNodes()||m.hasAttributes())&&d.appendChild(m)}if(kv(o,d),m=o.getCommentText()){var $=o.getIcon(_r.COMMENT),V=$.getBubbleSize();$=$.bubbleIsVisible();var Ee=n.createElement$$module$build$src$core$utils$xml("comment");Ee.appendChild(n.createTextNode$$module$build$src$core$utils$xml(m)),Ee.setAttribute("pinned",`${$}`),Ee.setAttribute("h",String(V.height)),Ee.setAttribute("w",String(V.width)),d.appendChild(Ee)}for(o.data&&(m=n.createElement$$module$build$src$core$utils$xml("data"),m.appendChild(n.createTextNode$$module$build$src$core$utils$xml(o.data)),d.appendChild(m)),m=0;m<o.inputList.length;m++){V=o.inputList[m];var Ve=void 0;if($=!0,V.type!==n.inputTypes$$module$build$src$core$inputs$input_types.DUMMY&&V.type!==n.inputTypes$$module$build$src$core$inputs$input_types.END_ROW){Ee=V.connection.targetBlock(),V.type===n.inputTypes$$module$build$src$core$inputs$input_types.VALUE?Ve=n.createElement$$module$build$src$core$utils$xml("value"):V.type===n.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT&&(Ve=n.createElement$$module$build$src$core$utils$xml("statement"));const tn=V.connection.getShadowDom();!tn||Ee&&Ee.isShadow()||Ve.appendChild(Nv(tn,l)),Ee&&(Ee=ou(Ee,l),Ee.nodeType===$c.ELEMENT_NODE&&(Ve.appendChild(Ee),$=!1)),Ve.setAttribute("name",V.name),$||d.appendChild(Ve)}}o.inputsInline!==void 0&&o.inputsInline!==o.inputsInlineDefault&&d.setAttribute("inline",String(o.inputsInline)),o.isCollapsed()&&d.setAttribute("collapsed","true"),o.isEnabled()||d.setAttribute("disabled","true"),o.isDeletable()||o.isShadow()||d.setAttribute("deletable","false"),o.isMovable()||o.isShadow()||d.setAttribute("movable","false"),o.isEditable()||d.setAttribute("editable","false"),Ve=o.getNextBlock();let St;return Ve&&(m=ou(Ve,l),m.nodeType===$c.ELEMENT_NODE&&(St=n.createElement$$module$build$src$core$utils$xml("next"),St.appendChild(m),d.appendChild(St))),o=o.nextConnection&&o.nextConnection.getShadowDom(),!o||Ve&&Ve.isShadow()||St.appendChild(Nv(o,l)),d},Nv=function(o,l){let d=o=o.cloneNode(!0),m;for(;d;)if(l&&d.nodeName==="shadow"&&d.removeAttribute("id"),d.firstChild)d=d.firstChild;else{for(;d&&!d.nextSibling;){m=d,d=d.parentNode;let $;m.nodeType===$c.TEXT_NODE&&m.data.trim()===""&&(($=d)==null?void 0:$.firstChild)!==m&&mt(m)}d&&(m=d,d=d.nextSibling,m.nodeType===$c.TEXT_NODE&&m.data.trim()===""&&mt(m))}return o},Ta=function(o){return Cn(o).replace(/<(\w+)([^<]*)\/>/g,"<$1$2></$1>")},H$=function(o){o=Ta(o).split("<");let l="";for(let d=1;d<o.length;d++){const m=o[d];m[0]==="/"&&(l=l.substring(2)),o[d]=l+"<"+m,m[0]!=="/"&&m.slice(-2)!=="/>"&&(l+=" ")}return o=o.join(`
  22. `),o=o.replace(/(<(\w+)\b[^>]*>[^\n]*)\n *<\/\2>/g,"$1</$2>"),o.replace(/^\n/,"")},n_=function(o,l){return l.setResizesEnabled(!1),l.clear(),o=n.domToWorkspace$$module$build$src$core$xml(o,l),l.setResizesEnabled(!0),o},n.domToWorkspace$$module$build$src$core$xml=function(o,l){let d=0;l.RTL&&(d=l.getWidth());const m=[];ne();const $=n.getGroup$$module$build$src$core$events$utils();$||n.setGroup$$module$build$src$core$events$utils(!0),l.setResizesEnabled&&l.setResizesEnabled(!1);let V=!0;try{for(let Ee=0,Ve;Ve=o.childNodes[Ee];Ee++){const St=Ve.nodeName.toLowerCase(),tn=Ve;if(St==="block"||St==="shadow"&&!_e()){const cs=su(tn,l);m.push(cs.id);let ts;const Rl=parseInt((ts=tn.getAttribute("x"))!=null?ts:"10",10);let NT;const PT=parseInt((NT=tn.getAttribute("y"))!=null?NT:"10",10);isNaN(Rl)||isNaN(PT)||cs.moveBy(l.RTL?d-Rl:Rl,PT,["create"]),V=!1}else{if(St==="shadow")throw TypeError("Shadow block cannot be a top-level block.");if(St==="comment")l.rendered?Oi.fromXmlRendered(tn,l,d):wa.fromXml(tn,l);else if(St==="variables"){if(V)Pv(tn,l);else throw Error("'variables' tag must exist once before block and shadow tag elements in the workspace XML, but it was found in another location.");V=!1}}}}finally{n.setGroup$$module$build$src$core$events$utils($),l.setResizesEnabled&&l.setResizesEnabled(!0),l.rendered&&ki(),Le()}return J(new(Ae(El))(l)),m},V$=function(o,l){if(!l.getBlocksBoundingBox)return n.domToWorkspace$$module$build$src$core$xml(o,l);var d=l.getBlocksBoundingBox();if(o=n.domToWorkspace$$module$build$src$core$xml(o,l),d&&d.top!==d.bottom){var m=d.bottom;d=l.RTL?d.right:d.left;var $=1/0;let V=-1/0,Ee=1/0;for(let Ve=0;Ve<o.length;Ve++){const St=l.getBlockById(o[Ve]).getRelativeToSurfaceXY();St.y<Ee&&(Ee=St.y),St.x<$&&($=St.x),St.x>V&&(V=St.x)}for(m=m-Ee+10,d=l.RTL?d-V:d-$,$=0;$<o.length;$++)l.getBlockById(o[$]).moveBy(d,m,["create"])}return o},n.domToBlock$$module$build$src$core$xml=function(o,l){return o=su(o,l),l.rendered&&ki(),o},su=function(o,l){n.disable$$module$build$src$core$events$utils();var d=l.getAllVariables();let m;try{if(m=o_(o,l),l.rendered){const $=m,V=m.getDescendants(!1);$.setConnectionTracking(!1);for(let Ee=V.length-1;0<=Ee;Ee--)V[Ee].initSvg();for(let Ee=V.length-1;0<=Ee;Ee--)V[Ee].queueRender();setTimeout(function(){$.disposed||$.setConnectionTracking(!0)},1),l.resizeContents()}else{const $=m.getDescendants(!1);for(let V=$.length-1;0<=V;V--)$[V].initModel()}}finally{n.enable$$module$build$src$core$events$utils()}if(he()){for(o=Bh(l,d),l=0;l<o.length;l++)d=o[l],J(new(Ae(zi))(d));J(new(Ae(n.CREATE$$module$build$src$core$events$utils))(m))}return m},Pv=function(o,l){for(let m=0;m<o.children.length;m++){var d=o.children[m];const $=d.getAttribute("type"),V=d.getAttribute("id");if(d=d.textContent,!d)break;l.createVariable(d,$,V)}},G$=function(o){const l={mutation:[],comment:[],data:[],field:[],input:[],next:[]};for(let d=0;d<o.children.length;d++){const m=o.children[d];if(m.nodeType!==$c.TEXT_NODE)switch(m.nodeName.toLowerCase()){case"mutation":l.mutation.push(m);break;case"comment":l.comment.push(m);break;case"data":l.data.push(m);break;case"title":case"field":l.field.push(m);break;case"value":case"statement":l.input.push(m);break;case"next":l.next.push(m);break;default:console.warn("Ignoring unknown tag: "+m.nodeName)}}return l},W$=function(o,l){let d=!1;for(let m=0;m<o.length;m++){const $=o[m];l.domToMutation&&(l.domToMutation($),l.initSvg&&(d=!0))}return d},Jo=function(o,l){for(let m=0;m<o.length;m++){var d=o[m];const $=d.textContent,V=d.getAttribute("pinned")==="true";let Ee;const Ve=parseInt((Ee=d.getAttribute("w"))!=null?Ee:"50",10);let St;d=parseInt((St=d.getAttribute("h"))!=null?St:"50",10),l.setCommentText($);const tn=l.getIcon(_r.COMMENT);isNaN(Ve)||isNaN(d)||tn.setBubbleSize(new Ko(Ve,d)),tn.setBubbleVisible(V),setTimeout(()=>tn.setBubbleVisible(V),1)}},Yo=function(o,l){for(let d=0;d<o.length;d++)l.data=o[d].textContent},X$=function(o,l){for(let d=0;d<o.length;d++){const m=o[d],$=m.getAttribute("name");$?K$(l,$,m):console.warn(`Ignoring unnamed field in block ${l.type}`)}},Dv=function(o){let l=null,d=null;for(let m=0;m<o.childNodes.length;m++){const $=o.childNodes[m];Bv($)&&($.nodeName.toLowerCase()==="block"?l=$:$.nodeName.toLowerCase()==="shadow"&&(d=$))}return{childBlockElement:l,childShadowElement:d}},z$=function(o,l,d,m){for(let V=0;V<o.length;V++){var $=o[V];const Ee=$.getAttribute("name"),Ve=Ee?d.getInput(Ee):null;if(!Ve){console.warn("Ignoring non-existent input "+Ee+" in block "+m);break}if($=Dv($),$.childBlockElement){if(!Ve.connection)throw TypeError("Input connection does not exist.");o_($.childBlockElement,l,Ve.connection,!1)}if($.childShadowElement){let St;(St=Ve.connection)==null||St.setShadowDom($.childShadowElement)}}},Y$=function(o,l,d){for(let m=0;m<o.length;m++){const $=Dv(o[m]);if($.childBlockElement){if(!d.nextConnection)throw TypeError("Next statement does not exist.");if(d.nextConnection.isConnected())throw TypeError("Next statement is already connected.");o_($.childBlockElement,l,d.nextConnection,!0)}$.childShadowElement&&d.nextConnection&&d.nextConnection.setShadowDom($.childShadowElement)}},o_=function(o,l,d,m){var $;const V=o.getAttribute("type");if(!V)throw TypeError("Block type unspecified: "+o.outerHTML);var Ee=($=o.getAttribute("id"))!=null?$:void 0;$=l.newBlock(V,Ee),Ee=G$(o);const Ve=W$(Ee.mutation,$);if(Jo(Ee.comment,$),Yo(Ee.data,$),d)if(m)if($.previousConnection)d.connect($.previousConnection);else throw TypeError("Next block does not have previous statement.");else if($.outputConnection)d.connect($.outputConnection);else if($.previousConnection)d.connect($.previousConnection);else throw TypeError("Child block does not have output or previous statement.");if(X$(Ee.field,$),z$(Ee.input,l,$,V),Y$(Ee.next,l,$),Ve&&$.initSvg(),(l=o.getAttribute("inline"))&&$.setInputsInline(l==="true"),(l=o.getAttribute("disabled"))&&$.setEnabled(l!=="true"&&l!=="disabled"),(l=o.getAttribute("deletable"))&&$.setDeletable(l==="true"),(l=o.getAttribute("movable"))&&$.setMovable(l==="true"),(l=o.getAttribute("editable"))&&$.setEditable(l==="true"),(l=o.getAttribute("collapsed"))&&$.setCollapsed(l==="true"),o.nodeName.toLowerCase()==="shadow"){for(o=$.getChildren(!1),l=0;l<o.length;l++)if(!o[l].isShadow())throw TypeError("Shadow block not allowed non-shadow child.");$.setShadow(!0)}return $},K$=function(o,l,d){const m=o.getField(l);m?m.fromXml(d):console.warn("Ignoring non-existent field "+l+" in block "+o.type)},xv=function(o){for(let l=0;l<o.childNodes.length;l++){const d=o.childNodes[l];if(d.nodeName.toLowerCase()==="next"){o.removeChild(d);break}}},Bv=function(o){return o.nodeType===$c.ELEMENT_NODE},Us=function(o){return o.saveState!==void 0&&o.loadState!==void 0},Fh=function(o,l){s(At.SERIALIZER,o,l)},iu=function(o){r(At.SERIALIZER,o)},Wl=function(o,{addCoordinates:l=!1,addInputBlocks:d=!0,addNextBlocks:m=!0,doFullSerialization:$=!0,saveIds:V=!0}={}){if(o.isInsertionMarker())return null;const Ee={type:o.type,id:V?o.id:void 0};return l&&Fr(o,Ee),s_(o,Ee),Fv(o,Ee,$),Uv(o,Ee,$),Hv(o,Ee,$),d&&Vv(o,Ee,$,V),m&&Gv(o,Ee,$,V),Ee},s_=function(o,l){o.isCollapsed()&&(l.collapsed=!0),o.isEnabled()||(l.enabled=!1),o.isOwnDeletable()||(l.deletable=!1),o.isOwnMovable()||(l.movable=!1),o.isOwnEditable()||(l.editable=!1),o.inputsInline!==void 0&&o.inputsInline!==o.inputsInlineDefault&&(l.inline=o.inputsInline),o.data&&(l.data=o.data)},Fr=function(o,l){const d=o.workspace;o=o.getRelativeToSurfaceXY(),l.x=Math.round(d.RTL?d.getWidth()-o.x:o.x),l.y=Math.round(o.y)},Fv=function(o,l,d){o.saveExtraState?(o=o.saveExtraState(d),o!==null&&(l.extraState=o)):o.mutationToDom&&(o=o.mutationToDom(),o!==null&&(l.extraState=Ta(o).replace(' xmlns="https://developers.google.com/blockly/xml"',"")))},Uv=function(o,l,d){const m=Object.create(null);for(const $ of o.getIcons())Us($)&&(o=$.saveState(d))&&(m[$.getType().toString()]=o);Object.keys(m).length&&(l.icons=m)},Hv=function(o,l,d){const m=Object.create(null);for(let $=0;$<o.inputList.length;$++){const V=o.inputList[$];for(let Ee=0;Ee<V.fieldRow.length;Ee++){const Ve=V.fieldRow[Ee];Ve.isSerializable()&&(m[Ve.name]=Ve.saveState(d))}}Object.keys(m).length&&(l.fields=m)},Vv=function(o,l,d,m){const $=Object.create(null);for(let V=0;V<o.inputList.length;V++){const Ee=o.inputList[V];if(!Ee.connection)continue;const Ve=i_(Ee.connection,d,m);Ve&&($[Ee.name]=Ve)}Object.keys($).length&&(l.inputs=$)},Gv=function(o,l,d,m){o.nextConnection&&(o=i_(o.nextConnection,d,m))&&(l.next=o)},i_=function(o,l,d){const m=o.getShadowState(!0);if(o=o.targetBlock(),!m&&!o)return null;const $=Object.create(null);return m&&($.shadow=m),o&&!o.isShadow()&&($.block=Wl(o,{doFullSerialization:l,saveIds:d})),$},Hs=function(o,l,{recordUndo:d=!1}={}){return o=Uh(o,l,{recordUndo:d}),l.rendered&&ki(),o},Uh=function(o,l,{parentConnection:d,isShadow:m=!1,recordUndo:$=!1}={}){const V=_e();re($),($=n.getGroup$$module$build$src$core$events$utils())||n.setGroup$$module$build$src$core$events$utils(!0),n.disable$$module$build$src$core$events$utils();let Ee;try{Ee=hr(o,l,{parentConnection:d,isShadow:m})}finally{n.enable$$module$build$src$core$events$utils()}if(he()&&J(new(Ae(n.CREATE$$module$build$src$core$events$utils))(Ee)),n.setGroup$$module$build$src$core$events$utils($),re(V),l.rendered){const Ve=Ee;setTimeout(()=>{Ve.disposed||Ve.setConnectionTracking(!0)},1)}return Ee},hr=function(o,l,{parentConnection:d,isShadow:m=!1}={}){if(!o.type)throw new HI(o);const $=l.newBlock(o.type,o.id);return $.setShadow(m),j$($,o),Wv($,o),gc($,o),Up(d,$,o),r_($,o),ls($,o),mc($,o),l_($,o),a_($,l.rendered),$},j$=function(o,l){let d=l.x===void 0?0:l.x;l=l.y===void 0?0:l.y;const m=o.workspace;d=m.RTL?m.getWidth()-d:d,o.moveBy(d,l)},Wv=function(o,l){l.collapsed&&o.setCollapsed(!0),l.deletable===!1&&o.setDeletable(!1),l.movable===!1&&o.setMovable(!1),l.editable===!1&&o.setEditable(!1),l.enabled===!1&&o.setEnabled(!1),l.inline!==void 0&&o.setInputsInline(l.inline),l.data!==void 0&&(o.data=l.data)},gc=function(o,l){l.extraState&&(o.loadExtraState?o.loadExtraState(l.extraState):o.domToMutation&&o.domToMutation(n.textToDom$$module$build$src$core$utils$xml(l.extraState)))},Up=function(o,l,d){if(o){if(o.getSourceBlock().isShadow()&&!l.isShadow())throw new GI(d);if(o.type===n.inputTypes$$module$build$src$core$inputs$input_types.VALUE){var m=l.outputConnection;if(!m)throw new $g("output",l,d)}else if(m=l.previousConnection,!m)throw new $g("previous",l,d);if(!o.connect(m)){const $=l.workspace.connectionChecker;throw new VI($.getErrorMessage($.canConnectWithReason(m,o,!1),m,o),o.type===n.inputTypes$$module$build$src$core$inputs$input_types.VALUE?"output connection":"previous connection",l,d)}}},r_=function(o,l){if(l.icons){var d=Object.keys(l.icons);for(const $ of d){d=l.icons[$];var m=o.getIcon($);if(!m){if(m=u(At.ICON,$,!1),!m)throw new WI($,o,l);m=new m(o),o.addIcon(m)}Us(m)&&m.loadState(d)}}},ls=function(o,l){if(l.fields){var d=Object.keys(l.fields);for(let m=0;m<d.length;m++){const $=d[m],V=l.fields[$],Ee=o.getField($);Ee?Ee.loadState(V):console.warn(`Ignoring non-existant field ${$} in block ${o.type}`)}}},mc=function(o,l){if(l.inputs){var d=Object.keys(l.inputs);for(let m=0;m<d.length;m++){const $=d[m],V=o.getInput($);if(!V||!V.connection)throw new $g($,o,l);Xv(V.connection,l.inputs[$])}}},l_=function(o,l){if(l.next){if(!o.nextConnection)throw new $g("next",o,l);Xv(o.nextConnection,l.next)}},Xv=function(o,l){l.shadow&&o.setShadowState(l.shadow),l.block&&hr(l.block,o.getSourceBlock().workspace,{parentConnection:o})},a_=function(o,l){if(l){o.setConnectionTracking(!1),o.initSvg(),o.queueRender();for(const d of o.getIcons())d.onLocationChange(o.getRelativeToSurfaceXY())}else o.initModel()},Q$=function(o){const l=o.workspace,d=n.config$$module$build$src$core$config.snapRadius,m=o.getRelativeToSurfaceXY(),$=new zt(0,0),V=l.getAllBlocks(!1).filter(Ee=>Ee.id!=o.id).map(Ee=>Ee.getRelativeToSurfaceXY());for(;q$(zt.sum(m,$),V)||J$(o,$,d);)l.RTL?$.translate(-d,2*d):$.translate(d,2*d);o.moveTo(zt.sum(m,$))},q$=function(o,l){return l.some(d=>1>=Math.abs(d.x-o.x)&&1>=Math.abs(d.y-o.y))},J$=function(o,l,d){return o.getConnections_(!1).some(m=>!!m.closest(d,l).connection)},zv=function(o){return ct("Blockly.clipboard.copy","v11","v12","myCopyable.toCopyData()"),uO.copyInternal(o)},Hp=function(o){const l=o.toCopyData();aO=l;let d;return cO=(d=o.workspace)!=null?d:null,l},Xl=function(o,l,d){return o&&l?Yv(o,l,d):aO&&cO?Yv(aO,cO):null},Yv=function(o,l,d){let m;l=(m=l.getRootWorkspace())!=null?m:l;let $,V;return(V=($=h(At.PASTER,o.paster,!1))==null?void 0:$.paste(o,l,d))!=null?V:null},Kv=function(o){return ct("Blockly.clipboard.duplicate","v11","v12","Blockly.clipboard.paste(myCopyable.toCopyData(), myWorkspace)"),uO.duplicateInternal(o)},jv=function(o){const l=o.toCopyData();return l?Xl(l,o.workspace):null},Ur=function(o,l){o.setAttribute(uL,l)},Ho=function(o,l,d){Array.isArray(d)&&(d=d.join(" ")),o.setAttribute(cL+l,`${d}`)},ru=function(){return ka},Z$=function(o){if(ka=o,o===null){let l;(l=document.querySelector("."+hO))==null||l.remove()}},Vp=function(){document.querySelector("."+hO)||(ka=document.createElement("div"),ka.className=hO,(R()||document.body).appendChild(ka))},Hh=function(o,l,d){hl(),Ef=o,sT=d,(o=ka)&&(o.style.direction=l?"rtl":"ltr",o.style.display="block",l=y(),vf=l.getRenderer().getClassName(),bf=l.getTheme().getClassName(),vf&&Se(o,vf),bf&&Se(o,bf))},hl=function(){if(c_()){Ef=null;var o=ka;o&&(o.style.display="none",o.style.left="",o.style.top="",sT&&sT(),sT=null,o.textContent="",vf&&(ut(o,vf),vf=""),bf&&(ut(o,bf),bf=""),y().markFocused())}},c_=function(){return!!Ef},Ni=function(o){Ef===o&&hl()},Gp=function(o,l,d){ka.style.left=o+"px",ka.style.top=l+"px",ka.style.height=d+"px"},hd=function(o,l,d,m){const $=qv(o,l,d);o=Qv(o,l,d,m),0>$?Gp(o,0,d.height+$):Gp(o,$,d.height)},Qv=function(o,l,d,m){return m?Math.min(Math.max(l.right-d.width,o.left),o.right-d.width):Math.max(Math.min(l.left,o.right-d.width),o.left)},qv=function(o,l,d){return l.bottom+d.height>=o.bottom?l.top-d.height:l.bottom},eI=function(o){return!(o==null||!o.repositionForWindowResize)},Jv=function(){eI(Ef)&&Ef.repositionForWindowResize()||hl()},tI=function(){return iT},Zv=function(o){iT=o},Wp=function(o,l,d){if(Hh(jI,d,Ea),l.length){var m=fd(l,d);rT=m,nI(m,o,d),setTimeout(function(){m.focus()},1),iT=null}else Vh()},fd=function(o,l){const d=new dO;d.setRole(Er.MENU);for(let m=0;m<o.length;m++){const $=o[m],V=new Tf($.text);V.setRightToLeft(l),V.setRole(Er.MENUITEM),d.addChild(V),V.setEnabled($.enabled),$.enabled&&V.onAction(function(){Vh(),requestAnimationFrame(()=>{setTimeout(()=>{$.callback($.scope)},0)})},{})}return d},nI=function(o,l,d){const m=se();l=new Po(l.clientY+m.top,l.clientY+m.top,l.clientX+m.left,l.clientX+m.left),oI(o);const $=o.getSize();d&&(l.left+=$.width,l.right+=$.width,m.left+=$.width,m.right+=$.width),hd(m,l,$,d),o.focus()},oI=function(o){var l=ru();if(!l)throw Error("Attempting to create a context menu when widget div is null");l=o.render(l),Se(l,"blocklyContextMenu"),ee(l,"contextmenu",null,u_),o.focus()},u_=function(o){o.preventDefault(),o.stopPropagation()},Vh=function(){Ni(jI),iT=null},Ea=function(){rT&&(rT.dispose(),rT=null)},n.callbackFactory$$module$build$src$core$contextmenu=function(o,l){return()=>{n.disable$$module$build$src$core$events$utils();let d;try{d=l instanceof Element?su(l,o.workspace):Uh(l,o.workspace);const m=o.getRelativeToSurfaceXY();m.x=o.RTL?m.x-n.config$$module$build$src$core$config.snapRadius:m.x+n.config$$module$build$src$core$config.snapRadius,m.y+=2*n.config$$module$build$src$core$config.snapRadius,d.moveBy(m.x,m.y)}finally{n.enable$$module$build$src$core$events$utils()}return he()&&!d.isShadow()&&J(new(Ae(n.CREATE$$module$build$src$core$events$utils))(d)),d.select(),d}},Gh=function(o){return{text:n.Msg$$module$build$src$core$msg.REMOVE_COMMENT,enabled:!0,callback:function(){n.setGroup$$module$build$src$core$events$utils(!0),o.dispose(),n.setGroup$$module$build$src$core$events$utils(!1)}}},eb=function(o){return{text:n.Msg$$module$build$src$core$msg.DUPLICATE_COMMENT,enabled:!0,callback:function(){const l=o.toCopyData();l&&Xl(l,o.workspace)}}},sI=function(o,l){const d={enabled:!0};return d.text=n.Msg$$module$build$src$core$msg.ADD_COMMENT,d.callback=function(){const m=new Oi(o,n.Msg$$module$build$src$core$msg.WORKSPACE_COMMENT_DEFAULT_TEXT,Oi.DEFAULT_SIZE,Oi.DEFAULT_SIZE);var $=o.getInjectionDiv().getBoundingClientRect();$=new zt(l.clientX-$.left,l.clientY-$.top);const V=o.getOriginOffsetInPixels();$=zt.difference($,V),$.scale(1/o.scale),m.moveBy($.x,$.y),o.rendered&&(m.initSvg(),m.render(),m.select())},d},Wh=function(o){return o*Math.PI/180},lu=function(o){return 180*o/Math.PI},Pi=function(o,l,d){if(d<o){const m=d;d=o,o=m}return Math.max(o,Math.min(l,d))},d_=function(){document.querySelector(".blocklyDropDownDiv")||(go=document.createElement("div"),go.className="blocklyDropDownDiv",(R()||document.body).appendChild(go),yf=document.createElement("div"),yf.className="blocklyDropDownContent",go.appendChild(yf),Ud=document.createElement("div"),Ud.className="blocklyDropDownArrow",go.appendChild(Ud),go.style.opacity="0",go.style.transition="transform "+Cg+"s, opacity "+Cg+"s",go.addEventListener("focusin",function(){Se(go,"blocklyFocused")}),go.addEventListener("focusout",function(){ut(go,"blocklyFocused")}))},tb=function(o){gO=o},nb=function(){return bu},Xh=function(){return yf},h_=function(){yf.textContent="",yf.style.width=""},f_=function(o,l){go.style.backgroundColor=o,go.style.borderColor=l},pd=function(o,l,d,m){return gn(Ct(l),o,d,m)},lt=function(o,l,d){return qI=!0,gn(vt(o),o,l,d)},Ct=function(o){var l=o.getSvgRoot();const d=o.workspace.scale,m=o.height*d;return o=o.width*d,l=Ln(l),new Po(l.y,l.y+m,l.x,l.x+o)},vt=function(o){return o=o.getScaledBBox(),new Po(o.top,o.bottom,o.left,o.right)},gn=function(o,l,d,m){const $=o.left+(o.right-o.left)/2,V=o.bottom;o=o.top,m&&(o+=m),m=l.getSourceBlock();let Ee=m.workspace;for(;Ee.options.parentWorkspace;)Ee=Ee.options.parentWorkspace;return tb(Ee.getParentSvg().parentNode),Vn(l,m.RTL,$,V,$,o,d)},Vn=function(o,l,d,m,$,V,Ee){return bu=o,Fd=Ee||null,go.style.direction=l?"rtl":"ltr",o=y(),Of=o.getRenderer().getClassName(),Sf=o.getTheme().getClassName(),Of&&Se(go,Of),Sf&&Se(go,Sf),au(d,m,$,V)},Co=function(o,l,d,m){return o=gd(o,d.left,d.right,m.width),{initialX:o.divX,initialY:l,finalX:o.divX,finalY:l+aT,arrowX:o.arrowX,arrowY:-(Rg/2+fO),arrowAtTop:!0,arrowVisible:!0}},Ds=function(o,l,d,m){return o=gd(o,d.left,d.right,m.width),{initialX:o.divX,initialY:l-m.height,finalX:o.divX,finalY:l-m.height-aT,arrowX:o.arrowX,arrowY:m.height-2*fO-Rg/2,arrowAtTop:!1,arrowVisible:!0}},Vo=function(o,l,d){return o=gd(o,l.left,l.right,d.width),{initialX:o.divX,initialY:0,finalX:o.divX,finalY:0,arrowAtTop:null,arrowX:null,arrowY:null,arrowVisible:!1}},gd=function(o,l,d,m){return l=Pi(l,o-m/2,d-m),o=o-Rg/2-l,d=QI,o=Pi(d,o,m-d-Rg),{arrowX:o,divX:l}},ob=function(){return!!bu},pi=function(o,l){return bu===o?(l?zl():md(),!0):!1},md=function(){go.style.transform="translate(0, 0)",go.style.opacity="0",pO=setTimeout(function(){zl()},1e3*Cg),Fd&&(Fd(),Fd=null)},zl=function(){ob()&&(pO&&clearTimeout(pO),go.style.transform="",go.style.left="",go.style.top="",go.style.opacity="0",go.style.display="none",go.style.backgroundColor="",go.style.borderColor="",Fd&&(Fd(),Fd=null),h_(),bu=null,Of&&(ut(go,Of),Of=""),Sf&&(ut(go,Sf),Sf=""),y().markFocused())},au=function(o,l,d,m){o=mO.getPositionMetrics(o,l,d,m),o.arrowVisible?(Ud.style.display="",Ud.style.transform="translate("+o.arrowX+"px,"+o.arrowY+"px) rotate(45deg)",Ud.setAttribute("class",o.arrowAtTop?"blocklyDropDownArrow blocklyArrowTop":"blocklyDropDownArrow blocklyArrowBottom")):Ud.style.display="none",l=Math.floor(o.initialX),d=Math.floor(o.initialY),m=Math.floor(o.finalX);const $=Math.floor(o.finalY);return go.style.left=l+"px",go.style.top=d+"px",go.style.display="block",go.style.opacity="1",go.style.transform="translate("+(m-l)+"px,"+($-d)+"px)",!!o.arrowAtTop},zh=function(){if(bu){var o=bu.getSourceBlock();o=qI?vt(bu):Ct(o);const l=o.left+(o.right-o.left)/2;au(l,o.bottom,l,o.top)}else md()},Yh=function(o){if(!(100<o.getDescendants(!1).length)){var l=o.workspace,d=o.getSvgRoot();l.getAudioManager().play("delete");var m=l.getSvgXY(d);d=d.cloneNode(!0),d.setAttribute("transform","translate("+m.x+","+m.y+")"),l.getParentSvg().appendChild(d),ko(d,{x:m.x,y:m.y,width:o.width,height:o.height},l.RTL,new Date,l.scale)}},ko=function(o,l,d,m,$){const V=(new Date().getTime()-m.getTime())/150;1<V?mt(o):(o.setAttribute("transform","translate("+(l.x+(d?-1:1)*l.width*$/2*V)+","+(l.y+l.height*$*V)+") scale("+(1-V)*$+")"),setTimeout(ko,10,o,l,d,m,$))},p_=function(o){var l=o.workspace;const d=l.scale;if(l.getAudioManager().play("click"),!(1>d)){var m=l.getSvgXY(o.getSvgRoot());o.outputConnection?(m.x+=(o.RTL?3:-3)*d,m.y+=13*d):o.previousConnection&&(m.x+=(o.RTL?-23:23)*d,m.y+=3*d);var $=Ne(st.CIRCLE,{cx:m.x,cy:m.y,r:0,fill:"none",stroke:"#888","stroke-width":10},l.getParentSvg());o=Ne(st.ANIMATE,{id:"animationCircle",begin:"indefinite",attributeName:"r",dur:"150ms",from:0,to:25*d},$),l=Ne(st.ANIMATE,{id:"animationOpacity",begin:"indefinite",attributeName:"opacity",dur:"150ms",from:1,to:0},$),o.beginElement(),l.beginElement(),setTimeout(()=>void mt($),150)}},g_=function(o){if(jh(),o.workspace.getAudioManager().play("disconnect"),!(1>o.workspace.scale)){var l=o.getHeightWidth().height;l=Math.atan(10/l)/Math.PI*180,o.RTL||(l*=-1),Mg=o,Kh(o,l,new Date)}},Kh=function(o,l,d){const m=(new Date().getTime()-d.getTime())/200;let $="";1>=m&&($=`skewX(${Math.round(Math.sin(m*Math.PI*3)*(1-m)*l)})`,cT=setTimeout(Kh,10,o,l,d)),o.getSvgRoot().setAttribute("transform",`${o.getTranslation()} ${$}`)},jh=function(){Mg&&(cT&&(clearTimeout(cT),cT=null),Mg.getSvgRoot().setAttribute("transform",Mg.getTranslation()),Mg=null)},iI=function(o,l){return ct("Blockly.utils.string.startsWith()","April 2022","April 2023","Use built-in string.startsWith"),o.startsWith(l)},Xp=function(o){return o.length?o.reduce(function(l,d){return l.length<d.length?l:d}).length:0},Qh=function(o,l){if(!o.length)return 0;if(o.length===1)return o[0].length;let d=0;l=l||Xp(o);let m;for(m=0;m<l;m++){for(var $=o[0][m],V=1;V<o.length;V++)if($!==o[V][m])return d;$===" "&&(d=m+1)}for($=1;$<o.length;$++)if((V=o[$][m])&&V!==" ")return d;return l},va=function(o,l){if(!o.length)return 0;if(o.length===1)return o[0].length;let d=0;l=l||Xp(o);let m;for(m=0;m<l;m++){for(var $=o[0].substr(-m-1,1),V=1;V<o.length;V++)if($!==o[V].substr(-m-1,1))return d;$===" "&&(d=m+1)}for($=1;$<o.length;$++)if((V=o[$].charAt(o[$].length-m-1))&&V!==" ")return d;return l},n.wrap$$module$build$src$core$utils$string=function(o,l){o=o.split(`
  23. `);for(let d=0;d<o.length;d++)o[d]=zp(o[d],l);return o.join(`
  24. `)},zp=function(o,l){if(o.length<=l)return o;const d=o.trim().split(/\s+/);for(var m=0;m<d.length;m++)d[m].length>l&&(l=d[m].length);var $=-1/0;let V,Ee=1;do{m=$,V=o,o=[],$=d.length/Ee;let Ve=1;for(let St=0;St<d.length-1;St++)Ve<(St+1.5)/$?(Ve++,o[St]=!0):o[St]=!1;o=qh(d,o,l),$=Yp(d,o,l),o=sb(d,o),Ee++}while($>m);return V},Yp=function(o,l,d){const m=[0],$=[];for(var V=0;V<o.length;V++)m[m.length-1]+=o[V].length,l[V]===!0?(m.push(0),$.push(o[V].charAt(o[V].length-1))):l[V]===!1&&m[m.length-1]++;for(o=Math.max(...m),l=0,V=0;V<m.length;V++)l-=2*Math.pow(Math.abs(d-m[V]),1.5),l-=Math.pow(o-m[V],1.5),".?!".indexOf($[V])!==-1?l+=d/3:",;)]}".indexOf($[V])!==-1&&(l+=d/4);return 1<m.length&&m[m.length-1]<=m[m.length-2]&&(l+=.5),l},qh=function(o,l,d){let m=Yp(o,l,d),$;for(let V=0;V<l.length-1;V++){if(l[V]===l[V+1])continue;const Ee=[].concat(l);Ee[V]=!Ee[V],Ee[V+1]=!Ee[V+1];const Ve=Yp(o,Ee,d);Ve>m&&(m=Ve,$=Ee)}return $?qh(o,$,d):l},sb=function(o,l){const d=[];for(let m=0;m<o.length;m++)d.push(o[m]),l[m]!==void 0&&d.push(l[m]?`
  25. `:" ");return d.join("")},n.isNumber$$module$build$src$core$utils$string=function(o){return/^\s*-?\d+(\.\d+)?\s*$/.test(o)},ib=function(o){Lg=o},Kp=function(){return Lg},rb=function(){return wg},Jh=function(){return Xs},fl=function(o){if(o=Zh(o)){for(o=o.tooltip;typeof o=="function";)o=o();if(typeof o!="string")throw Error("Tooltip function must return a string.");return o}return""},Zh=function(o){for(;o&&o.tooltip;){if(typeof o.tooltip=="string"||typeof o.tooltip=="function")return o;o=o.tooltip}return null},lb=function(){document.querySelector(".blocklyTooltipDiv")||(Xs=document.createElement("div"),Xs.className="blocklyTooltipDiv",(R()||document.body).appendChild(Xs))},ef=function(o){o.mouseOverWrapper_=pe(o,"pointerover",null,jp),o.mouseOutWrapper_=pe(o,"pointerout",null,Qp),o.addEventListener("pointermove",qp,!1)},m_=function(o){o&&(Oe(o.mouseOverWrapper_),Oe(o.mouseOutWrapper_),o.removeEventListener("pointermove",qp))},jp=function(o){If||(o=Zh(o.currentTarget),vr!==o&&(ba(),Rf=null,vr=o),clearTimeout(kg))},Qp=function(o){If||(kg=setTimeout(function(){Rf=vr=null,ba()},1),clearTimeout(Da),Da=0)},qp=function(o){if(vr&&vr.tooltip&&!If)if(wg){const l=vO-o.pageX;o=bO-o.pageY,Math.sqrt(l*l+o*o)>e0&&ba()}else Rf!==vr&&(clearTimeout(Da),vO=o.pageX,bO=o.pageY,Da=setTimeout(lI,t0))},ab=function(){Rf=vr=null,ba()},ba=function(){wg&&(wg=!1,Xs&&(Xs.style.display="none")),Da&&(clearTimeout(Da),Da=0)},cb=function(){ba(),If=!0},ub=function(){If=!1},Vs=function(){Xs&&vr&&(typeof Lg=="function"?Lg(Xs,vr):gi())},gi=function(){var o=fl(vr);o=n.wrap$$module$build$src$core$utils$string(o,ZI),o=o.split(`
  26. `);for(let l=0;l<o.length;l++){const d=document.createElement("div");d.appendChild(document.createTextNode(o[l])),Xs.appendChild(d)}},rI=function(o){const l=document.documentElement.clientWidth,d=document.documentElement.clientHeight;let m=vO;m=o?m-(OO+Xs.offsetWidth):m+OO;let $=bO+SO;return $+Xs.offsetHeight>d+window.scrollY&&($-=Xs.offsetHeight+2*SO),o?m=Math.max(hT-window.scrollX,m):m+Xs.offsetWidth>l+window.scrollX-2*hT&&(m=l-Xs.offsetWidth-2*hT),{x:m,y:$}},lI=function(){if(!If&&(Rf=vr,Xs)){Xs.textContent="",Vs();var o=vr.RTL;Xs.style.direction=o?"rtl":"ltr",Xs.style.display="block",wg=!0;var{x:l,y:d}=rI(o);Xs.style.left=l+"px",Xs.style.top=d+"px"}},Oa=function(o,l){for(const d in l)o[d]=l[d]!==null&&typeof l[d]=="object"?Oa(o[d]||Object.create(null),l[d]):l[d];return o},cu=function(o){return o.bubbleIsVisible!==void 0&&o.setBubbleVisible!==void 0},tf=function(){return $O},_d=function(o){$O=o},nf=function(){return xa},uu=function(o){xa=o},pl=function(o){o=`${o}`.toLowerCase().trim();var l=s0[o];if(l||(l=o.substring(0,2)==="0x"?"#"+o.substring(2):o,l=l[0]==="#"?l:"#"+l,/^#[0-9a-f]{6}$/.test(l)))return l;if(/^#[0-9a-f]{3}$/.test(l))return["#",l[1],l[1],l[2],l[2],l[3],l[3]].join("");var d=o.match(/^(?:rgb)?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);return d&&(o=Number(d[1]),l=Number(d[2]),d=Number(d[3]),0<=o&&256>o&&0<=l&&256>l&&0<=d&&256>d)?_c(o,l,d):null},_c=function(o,l,d){return l=o<<16|l<<8|d,16>o?"#"+(16777216|l).toString(16).substr(1):"#"+l.toString(16)},Td=function(o){return o=pl(o),o?(o=parseInt(o.substr(1),16),[o>>16,o>>8&255,o&255]):[0,0,0]},Tc=function(o,l,d){let m=0,$=0,V=0;if(l===0)V=$=m=d;else{const Ee=Math.floor(o/60),Ve=o/60-Ee;o=d*(1-l);const St=d*(1-l*Ve);switch(l=d*(1-l*(1-Ve)),Ee){case 1:m=St,$=d,V=o;break;case 2:m=o,$=d,V=l;break;case 3:m=o,$=St,V=d;break;case 4:m=l,$=o,V=d;break;case 5:m=d,$=o,V=St;break;case 6:case 0:m=d,$=l,V=o}}return _c(Math.floor(m),Math.floor($),Math.floor(V))},Ed=function(o,l,d){return o=pl(o),!o||(l=pl(l),!l)?null:(o=Td(o),l=Td(l),_c(Math.round(l[0]+d*(o[0]-l[0])),Math.round(l[1]+d*(o[1]-l[1])),Math.round(l[2]+d*(o[2]-l[2]))))},db=function(o){return Tc(o,$O,255*xa)},__=function(o,l,d){const m=[];var $=o.split("");$.push("");var V=0;o=[];let Ee=null;for(let tn=0;tn<$.length;tn++){var Ve=$[tn];if(V===0)if(Ve==="%")(V=o.join(""))&&m.push(V),o.length=0,V=1;else if(d&&Ve===`
  27. `){const cs=o.join("");cs&&m.push(cs),o.length=0,m.push(Ve)}else o.push(Ve);else if(V===1)Ve==="%"?(o.push(Ve),V=0):l&&"0"<=Ve&&"9">=Ve?(V=2,Ee=Ve,(Ve=o.join(""))&&m.push(Ve),o.length=0):Ve==="{"?V=3:(o.push("%",Ve),V=0);else if(V===2)if("0"<=Ve&&"9">=Ve)Ee+=Ve;else{var St=void 0;m.push(parseInt((St=Ee)!=null?St:"",10)),tn--,V=0}else V===3&&(Ve===""?(o.splice(0,0,"%{"),tn--,V=0):Ve!=="}"?o.push(Ve):(V=o.join(""),/[A-Z]\w*/i.test(V)?(Ve=V.toUpperCase(),(Ve=Ve.startsWith("BKY_")?Ve.substring(4):null)&&Ve in n.Msg$$module$build$src$core$msg?(V=n.Msg$$module$build$src$core$msg[Ve],typeof V=="string"?Array.prototype.push.apply(m,__(V,l,d)):l?m.push(`${V}`):m.push(V)):m.push("%{"+V+"}")):m.push("%{"+V+"}"),V=o.length=0))}for((l=o.join(""))&&m.push(l),St=[],o.length=0,$=0;$<m.length;$++)typeof m[$]!="string"||d&&m[$]===`
  28. `?((l=o.join(""))&&St.push(l),o.length=0,St.push(m[$])):o.push(m[$]);return(l=o.join(""))&&St.push(l),o.length=0,St},hb=function(o){return __(o,!0,!0)},Os=function(o){return typeof o!="string"?o:(o=__(o,!1,!1),o.length?String(o[0]):"")},Jp=function(o){let l=!0;const d=n.Msg$$module$build$src$core$msg,m=o.match(/%{BKY_[A-Z]\w*}/gi);if(m)for(let $=0;$<m.length;$++){const V=m[$].toUpperCase();d[V.slice(6,-1)]===void 0&&(console.warn("No message string for "+m[$]+" in "+o),l=!1)}return l},Sa=function(o){const l=typeof o=="string"?Os(o):o;var d=Number(l);if(!isNaN(d)&&0<=d&&360>=d)return{hue:d,hex:Tc(d,tf(),255*nf())};if(d=pl(l))return{hue:null,hex:d};throw d='Invalid colour: "'+l+'"',o!==l&&(d+=' (from "'+o+'")'),Error(d)},Ec=function(o){return o.getProcedureModel!==void 0&&o.doProcedureUpdate!==void 0&&o.isProcedureDef!==void 0},we=function(o){return o.startPublishing!==void 0&&o.stopPublishing!==void 0},si=function(o,l){s(At.FIELD,o,l)},Zp=function(o){r(At.FIELD,o)},n.fromJson$$module$build$src$core$field_registry=function(o){return Ba.fromJsonInternal(o)},Hr=function(o){const l=h(At.FIELD,o.type);if(l){if(typeof l.fromJson!="function")throw new TypeError("returned Field was not a IRegistrableField");return l.fromJson(o)}return console.warn("Blockly could not create a field of type "+o.type+". The field is probably not being registered. This could be because the file is not loaded, the field does not register itself (Issue #1584), or the registration is not being reached."),null},ao=function(o){let l=!1;const d=o.map(([Ee,Ve])=>typeof Ee=="string"?[Os(Ee),Ve]:(l=!0,[Ee.alt!==null?Object.assign({},Ee,{alt:Os(Ee.alt)}):Object.assign({},Ee),Ve]));if(l||2>o.length)return{options:d};var m=d.map(([Ee])=>Ee),$=Xp(m);o=Qh(m,$);const V=va(m,$);return!o&&!V||$<=o+V?{options:d}:($=o?m[0].substring(0,o-1):void 0,m=V?m[0].substr(1-V):void 0,{options:aI(d,o,V),prefix:$,suffix:m})},aI=function(o,l,d){return o.map(([m,$])=>[m.substring(l,m.length-d),$])},fb=function(o){if(!Array.isArray(o))throw TypeError("FieldDropdown options must be an array.");if(!o.length)throw TypeError("FieldDropdown options must not be an empty array.");let l=!1;for(let d=0;d<o.length;d++){const m=o[d];Array.isArray(m)?typeof m[1]!="string"?(l=!0,console.error("Invalid option["+d+"]: Each FieldDropdown option id must be a string. Found "+m[1]+" in: ",m)):m[0]&&typeof m[0]!="string"&&typeof m[0].src!="string"&&(l=!0,console.error("Invalid option["+d+"]: Each FieldDropdown option must have a string label or image description. Found"+m[0]+" in: ",m)):(l=!0,console.error("Invalid option["+d+"]: Each FieldDropdown option must be an array. Found: ",m))}if(l)throw TypeError("Found invalid FieldDropdown options.")},n.register$$module$build$src$core$extensions=function(o,l){if(typeof o!="string"||o.trim()==="")throw Error('Error: Invalid extension name "'+o+'"');if(Cf[o])throw Error('Error: Extension "'+o+'" is already registered.');if(typeof l!="function")throw Error('Error: Extension "'+o+'" must be a function');Cf[o]=l},n.registerMixin$$module$build$src$core$extensions=function(o,l){if(!l||typeof l!="object")throw Error('Error: Mixin "'+o+'" must be a object');n.register$$module$build$src$core$extensions(o,function(){this.mixin(l)})},n.registerMutator$$module$build$src$core$extensions=function(o,l,d,m){const $='Error when registering mutator "'+o+'": ';gb($,l);const V=pb(l,$);if(d&&typeof d!="function")throw Error($+'Extension "'+o+'" is not a function');n.register$$module$build$src$core$extensions(o,function(){V&&this.setMutator(new n.MutatorIcon$$module$build$src$core$icons$mutator_icon(m||[],this)),this.mixin(l),d&&d.apply(this)})},cI=function(o){vc(o)?delete Cf[o]:console.warn('No extension mapping for name "'+o+'" found to unregister')},vc=function(o){return!!Cf[o]},T_=function(o,l,d){const m=Cf[o];if(typeof m!="function")throw Error('Error: Extension "'+o+'" not found.');let $;if(d?uI(o,l):$=E_(l),m.apply(l),d)gb('Error after applying mutator "'+o+'": ',l);else if(!fI($,l))throw Error('Error when applying extension "'+o+'": mutation properties changed when applying a non-mutator extension.')},uI=function(o,l){if(E_(l).length)throw Error('Error: tried to apply mutation "'+o+'" to a block that already has mutator functions. Block id: '+l.id)},dI=function(o,l){return gl(o.mutationToDom,o.domToMutation,l+" mutationToDom/domToMutation")},hI=function(o,l){return gl(o.saveExtraState,o.loadExtraState,l+" saveExtraState/loadExtraState")},pb=function(o,l){return gl(o.compose,o.decompose,l+" compose/decompose")},gl=function(o,l,d){if(o&&l){if(typeof o!="function"||typeof l!="function")throw Error(d+" must be a function");return!0}if(!o&&!l)return!1;throw Error(d+"Must have both or neither functions")},gb=function(o,l){const d=dI(l,o),m=hI(l,o);if(!d&&!m)throw Error(o+"Mutations must contain either XML hooks, or JSON hooks, or both");pb(l,o)},E_=function(o){const l=[];return o.domToMutation!==void 0&&l.push(o.domToMutation),o.mutationToDom!==void 0&&l.push(o.mutationToDom),o.saveExtraState!==void 0&&l.push(o.saveExtraState),o.loadExtraState!==void 0&&l.push(o.loadExtraState),o.compose!==void 0&&l.push(o.compose),o.decompose!==void 0&&l.push(o.decompose),l},fI=function(o,l){if(l=E_(l),l.length!==o.length)return!1;for(let d=0;d<l.length;d++)if(o[d]!==l[d])return!1;return!0},pI=function(o){if(typeof document!="object")throw Error("runAfterPageLoad() requires browser document.");if(document.readyState==="complete")o();else{const l=setInterval(function(){document.readyState==="complete"&&(clearInterval(l),o())},10)}},n.buildTooltipForDropdown$$module$build$src$core$extensions=function(o,l){const d=[];return function(){d.indexOf(this.type)===-1&&(gI(this,o,l),d.push(this.type)),this.setTooltip((function(){const m=String(this.getFieldValue(o));return Os(l[m])}).bind(this))}},gI=function(o,l,d){var m=o.getField(l);if(m instanceof Yr&&!m.isOptionListDynamic()){m=m.getOptions();for(const[,$]of m)d[$]===void 0&&console.warn(`No tooltip mapping for value ${$} of field ${l} of block type ${o.type}.`)}},n.buildTooltipWithFieldText$$module$build$src$core$extensions=function(o,l){return function(){this.setTooltip((function(){const d=this.getField(l);return Os(o).replace("%1",d?d.getText():"")}).bind(this))}},ya=function(){const o=this.tooltip;this.setTooltip((function(){const l=this.getParent();return l&&l.getInputsInline()&&l.tooltip||o}).bind(this))},Sn=function(o,l){return" "+o+","+l+" "},fr=function(o,l){return" "+o+l.join("")},Qs=function(o,l){return" M "+o+","+l+" "},Zo=function(o,l){return" m "+o+","+l+" "},$a=function(o,l){return" l "+o+","+l+" "},ml=function(o){return" l"+o.join("")},ln=function(o,l){return" "+o+" "+l+" "},Cs=function(o,l,d,m){return o+" "+d+" "+d+" "+l+m},Vr=function(o,l){s(At.ICON,o.toString(),l)},mI=function(o){r(At.ICON,o)},v_=function(o){const l=o.getProcedureMap().getProcedures().filter(m=>!m.getReturnTypes()).map(m=>[m.getName(),m.getParameters().map($=>$.getName()),!1]);o.getBlocksByType("procedures_defnoreturn",!1).forEach(m=>{!Ec(m)&&ud(m)&&l.push(m.getProcedureDef())});const d=o.getProcedureMap().getProcedures().filter(m=>!!m.getReturnTypes()).map(m=>[m.getName(),m.getParameters().map($=>$.getName()),!0]);return o.getBlocksByType("procedures_defreturn",!1).forEach(m=>{!Ec(m)&&ud(m)&&d.push(m.getProcedureDef())}),l.sort(mb),d.sort(mb),[l,d]},mb=function(o,l){return o[0].localeCompare(l[0],void 0,{sensitivity:"base"})},n.findLegalName$$module$build$src$core$procedures=function(o,l){if(l.isInFlyout)return o;for(o=o||n.Msg$$module$build$src$core$msg.UNNAMED_KEY||"unnamed";!_I(o,l.workspace,l);){const d=o.match(/^(.*?)(\d+)$/);o=d?d[1]+(parseInt(d[2])+1):o+"2"}return o},_I=function(o,l,d){return!_b(o,l,d)},_b=function(o,l,d){for(const m of l.getAllBlocks(!1))if(m!==d&&ud(m)&&n.Names$$module$build$src$core$names.equals(m.getProcedureDef()[0],o))return!0;d=d&&Ec(d)?d==null?void 0:d.getProcedureModel():void 0;for(const m of l.getProcedureMap().getProcedures())if(m!==d&&n.Names$$module$build$src$core$names.equals(m.getName(),o))return!0;return!1},n.rename$$module$build$src$core$procedures=function(o){var l=this.getSourceBlock();if(!l)throw new Go;o=o.trim();const d=n.findLegalName$$module$build$src$core$procedures(o,l);Ec(l)&&!l.isInsertionMarker()&&l.getProcedureModel().setName(d);const m=this.getValue();if(m!==o&&m!==d)for(o=l.workspace.getAllBlocks(!1),l=0;l<o.length;l++){const $=o[l];$.renameProcedure&&$.renameProcedure(m,d)}return d},eg=function(o){function l(V,Ee){for(let St=0;St<V.length;St++){var Ve=V[St][0];const tn=V[St][1],cs=n.createElement$$module$build$src$core$utils$xml("block");cs.setAttribute("type",Ee),cs.setAttribute("gap","16");const ts=n.createElement$$module$build$src$core$utils$xml("mutation");for(ts.setAttribute("name",Ve),cs.appendChild(ts),Ve=0;Ve<tn.length;Ve++){const Rl=n.createElement$$module$build$src$core$utils$xml("arg");Rl.setAttribute("name",tn[Ve]),ts.appendChild(Rl)}d.push(cs)}}const d=[];if(Ti.procedures_defnoreturn){var m=n.createElement$$module$build$src$core$utils$xml("block");m.setAttribute("type","procedures_defnoreturn"),m.setAttribute("gap","16");var $=n.createElement$$module$build$src$core$utils$xml("field");$.setAttribute("name","NAME"),$.appendChild(n.createTextNode$$module$build$src$core$utils$xml(n.Msg$$module$build$src$core$msg.PROCEDURES_DEFNORETURN_PROCEDURE)),m.appendChild($),d.push(m)}return Ti.procedures_defreturn&&(m=n.createElement$$module$build$src$core$utils$xml("block"),m.setAttribute("type","procedures_defreturn"),m.setAttribute("gap","16"),$=n.createElement$$module$build$src$core$utils$xml("field"),$.setAttribute("name","NAME"),$.appendChild(n.createTextNode$$module$build$src$core$utils$xml(n.Msg$$module$build$src$core$msg.PROCEDURES_DEFRETURN_PROCEDURE)),m.appendChild($),d.push(m)),Ti.procedures_ifreturn&&(m=n.createElement$$module$build$src$core$utils$xml("block"),m.setAttribute("type","procedures_ifreturn"),m.setAttribute("gap","16"),d.push(m)),d.length&&d[d.length-1].setAttribute("gap","24"),o=v_(o),l(o[0],"procedures_callnoreturn"),l(o[1],"procedures_callreturn"),d},b_=function(o){var l=[],d=o.getBlocksByType("procedures_mutatorarg",!1);for(let V=0,Ee;Ee=d[V];V++)l.push(Ee.getFieldValue("NAME"));d=n.createElement$$module$build$src$core$utils$xml("xml");const m=n.createElement$$module$build$src$core$utils$xml("block");m.setAttribute("type","procedures_mutatorarg");const $=n.createElement$$module$build$src$core$utils$xml("field");$.setAttribute("name","NAME"),l=xp(n.DEFAULT_ARG$$module$build$src$core$procedures,l),l=n.createTextNode$$module$build$src$core$utils$xml(l),$.appendChild(l),m.appendChild($),d.appendChild(m),o.updateToolbox(d)},Tb=function(o){if(o.type===Kl&&o.bubbleType==="mutator"&&o.isOpen&&o.blockId){o=_(o.workspaceId).getBlockById(o.blockId);var l=o.type;(l==="procedures_defnoreturn"||l==="procedures_defreturn")&&(o=o.getIcon(n.MutatorIcon$$module$build$src$core$icons$mutator_icon.TYPE).getWorkspace(),b_(o),o.addChangeListener(TI))}},TI=function(o){(o.type===n.CREATE$$module$build$src$core$events$utils||o.type===n.DELETE$$module$build$src$core$events$utils||o.type===n.CHANGE$$module$build$src$core$events$utils||o.type===gu)&&(o=_(o.workspaceId),b_(o))},tg=function(o,l){return l.getAllBlocks(!1).filter(d=>of(d,o)||x$(d)&&n.Names$$module$build$src$core$names.equals(d.getProcedureCall(),o))},of=function(o,l){return Ec(o)&&!o.isProcedureDef()&&o.getProcedureModel()&&n.Names$$module$build$src$core$names.equals(o.getProcedureModel().getName(),l)},n.mutateCallers$$module$build$src$core$procedures=function(o){const l=_e();var d=o.getProcedureDef()[0];const m=o.mutationToDom(!0);o=tg(d,o.workspace);for(let V=0,Ee;Ee=o[V];V++){d=(d=Ee.mutationToDom())&&Cn(d),Ee.domToMutation&&Ee.domToMutation(m);var $=Ee.mutationToDom();$=$&&Cn($),d!==$&&(re(!1),J(new(Ae(n.CHANGE$$module$build$src$core$events$utils))(Ee,"mutation",null,d,$)),re(l))}},n.getDefinition$$module$build$src$core$procedures=function(o,l){for(const d of l.getAllBlocks(!1))if(Ec(d)&&d.isProcedureDef()&&n.Names$$module$build$src$core$names.equals(d.getProcedureModel().getName(),o)||ud(d)&&n.Names$$module$build$src$core$names.equals(d.getProcedureDef()[0],o))return d;return null},vd=function(o){return o.isDynamic},EI=function(o){return o.pathDown!==void 0&&o.pathUp!==void 0},Eb=function(o){return o.pathLeft!==void 0&&o.pathRight!==void 0},ng=function(o){let l=o.outputConnection;return(!l||o.previousConnection&&o.previousConnection.isConnected())&&(l=o.previousConnection),l},Ia=function(o,l){if(!o||!l)throw Error("Cannot connect null connections.");o.targetConnection=l,l.targetConnection=o},O_=function(o,l){let d=null;l=l.outputConnection;const m=l==null?void 0:l.getConnectionChecker();for(let $=0,V;V=o.inputList[$];$++){const Ee=V.connection;let Ve;if(Ee&&((Ve=m)!=null&&Ve.canConnect(l,Ee,!1))){if(d)return null;d=Ee}}return d},du=function(o,l){let d;for(;d=O_(o,l);)if(o=d.targetBlock(),!o||o.isShadow())return d;return null},mi=function(o,l){s(At.RENDERER,o,l)},vI=function(o){r(At.RENDERER,o)},S_=function(o,l,d){return o=new(u(At.RENDERER,o))(o),o.init(l,d),o},y_=function(o){dd(o.getTargetWorkspace(),void 0,"String")},bd=function(o){dd(o.getTargetWorkspace(),void 0,"Number")},Ra=function(o){dd(o.getTargetWorkspace(),void 0,"Colour")},og=function(o){let l=[],d=document.createElement("button");return d.setAttribute("text",n.Msg$$module$build$src$core$msg.NEW_STRING_VARIABLE),d.setAttribute("callbackKey","CREATE_VARIABLE_STRING"),l.push(d),d=document.createElement("button"),d.setAttribute("text",n.Msg$$module$build$src$core$msg.NEW_NUMBER_VARIABLE),d.setAttribute("callbackKey","CREATE_VARIABLE_NUMBER"),l.push(d),d=document.createElement("button"),d.setAttribute("text",n.Msg$$module$build$src$core$msg.NEW_COLOUR_VARIABLE),d.setAttribute("callbackKey","CREATE_VARIABLE_COLOUR"),l.push(d),o.registerButtonCallback("CREATE_VARIABLE_STRING",y_),o.registerButtonCallback("CREATE_VARIABLE_NUMBER",bd),o.registerButtonCallback("CREATE_VARIABLE_COLOUR",Ra),o=vb(o),l=l.concat(o)},vb=function(o){o=o.getAllVariables();const l=[];if(0<o.length){if(Ti.variables_set_dynamic){var d=o[o.length-1];const m=n.createElement$$module$build$src$core$utils$xml("block");m.setAttribute("type","variables_set_dynamic"),m.setAttribute("gap","24"),m.appendChild(nu(d)),l.push(m)}if(Ti.variables_get_dynamic){o.sort(gf.compareByName);for(let m=0,$;$=o[m];m++)d=n.createElement$$module$build$src$core$utils$xml("block"),d.setAttribute("type","variables_get_dynamic"),d.setAttribute("gap","8"),d.appendChild(nu($)),l.push(d)}}return l},hu=function(o){return o.toCopyData!==void 0},bb=function(){yo.registry.register({name:Va.ESCAPE,preconditionFn(o){return!o.options.readOnly},callback(o){return o.hideChaff(),!0},keyCodes:[Wn.ESC]})},$_=function(){yo.registry.register({name:Va.DELETE,preconditionFn(o){const l=L();return!o.options.readOnly&&l!=null&&l.isDeletable()},callback(o,l){return l.preventDefault(),Cc.inProgress()?!1:(L().checkAndDelete(),!0)},keyCodes:[Wn.DELETE,Wn.BACKSPACE]})},qs=function(){const o=yo.registry.createSerializedKey(Wn.C,[Wn.CTRL]),l=yo.registry.createSerializedKey(Wn.C,[Wn.ALT]),d=yo.registry.createSerializedKey(Wn.C,[Wn.META]);yo.registry.register({name:Va.COPY,preconditionFn(m){const $=L();return!m.options.readOnly&&!Cc.inProgress()&&$!=null&&$.isDeletable()&&$.isMovable()&&hu($)},callback(m,$){return $.preventDefault(),m.hideChaff(),$=L(),!$||!hu($)?!1:(zg=$.toCopyData(),RT=m,!!zg)},keyCodes:[o,l,d]})},sg=function(){const o=yo.registry.createSerializedKey(Wn.X,[Wn.CTRL]),l=yo.registry.createSerializedKey(Wn.X,[Wn.ALT]),d=yo.registry.createSerializedKey(Wn.X,[Wn.META]);yo.registry.register({name:Va.CUT,preconditionFn(m){const $=L();return!m.options.readOnly&&!Cc.inProgress()&&$!=null&&$ instanceof Ha&&$.isDeletable()&&$.isMovable()&&!$.workspace.isFlyout},callback(m){const $=L();return!$||!hu($)?!1:(zg=$.toCopyData(),RT=m,$.checkAndDelete(),!0)},keyCodes:[o,l,d]})},I_=function(){const o=yo.registry.createSerializedKey(Wn.V,[Wn.CTRL]),l=yo.registry.createSerializedKey(Wn.V,[Wn.ALT]),d=yo.registry.createSerializedKey(Wn.V,[Wn.META]);yo.registry.register({name:Va.PASTE,preconditionFn(m){return!m.options.readOnly&&!Cc.inProgress()},callback(){return zg&&RT?!!Xl(zg,RT):!1},keyCodes:[o,l,d]})},_l=function(){const o=yo.registry.createSerializedKey(Wn.Z,[Wn.CTRL]),l=yo.registry.createSerializedKey(Wn.Z,[Wn.ALT]),d=yo.registry.createSerializedKey(Wn.Z,[Wn.META]);yo.registry.register({name:Va.UNDO,preconditionFn(m){return!m.options.readOnly&&!Cc.inProgress()},callback(m){return m.hideChaff(),m.undo(!1),!0},keyCodes:[o,l,d]})},ig=function(){const o=yo.registry.createSerializedKey(Wn.Z,[Wn.SHIFT,Wn.CTRL]),l=yo.registry.createSerializedKey(Wn.Z,[Wn.SHIFT,Wn.ALT]),d=yo.registry.createSerializedKey(Wn.Z,[Wn.SHIFT,Wn.META]),m=yo.registry.createSerializedKey(Wn.Y,[Wn.CTRL]);yo.registry.register({name:Va.REDO,preconditionFn($){return!Cc.inProgress()&&!$.options.readOnly},callback($){return $.hideChaff(),$.undo(!0),!0},keyCodes:[o,l,d,m]})},sf=function(){bb(),$_(),qs(),sg(),I_(),_l(),ig()},bc=function(o){const l={id:o.getId(),name:o.getName(),returnTypes:o.getReturnTypes()};return o.getParameters().length&&(l.parameters=o.getParameters().map(d=>R_(d))),l},R_=function(o){const l={id:o.getId(),name:o.getName()};return o.getTypes().length&&(l.types=o.getTypes()),l},_i=function(o,l,d,m){if(o=new o(m,d.name,d.id).setReturnTypes(d.returnTypes),!d.parameters)return o;for(const[$,V]of d.parameters.entries())o.insertParameter(rg(l,V,m),$);return o},rg=function(o,l,d){return o=new o(d,l.name,l.id),l.types&&o.setTypes(l.types),o},bI=function(o){const l=Object.create(null),d=f(At.SERIALIZER,!0);for(const m in d){let $;const V=($=d[m])==null?void 0:$.save(o);V&&(l[m]=V)}return l},OI=function(o,l,{recordUndo:d=!1}={}){var m=f(At.SERIALIZER,!0);if(m){m=Object.entries(m).sort((V,Ee)=>Ee[1].priority-V[1].priority);var $=_e();re(d),(d=n.getGroup$$module$build$src$core$events$utils())||n.setGroup$$module$build$src$core$events$utils(!0),ne(),l instanceof na&&l.setResizesEnabled(!1);for(const[,V]of m.reverse()){let Ee;(Ee=V)==null||Ee.clear(l)}for(let[V,Ee]of m.reverse())if(o[V]){let Ve;(Ve=Ee)==null||Ve.load(o[V],l)}l instanceof na&&l.setResizesEnabled(!0),Le(),J(new(Ae(El))(l)),n.setGroup$$module$build$src$core$events$utils(d),re($)}},rf=function(o,l,d){const m=d.getBoundingRectangle(),$=m.right-m.left,V=Pi(l.top,m.top,l.top+l.height-(m.bottom-m.top))-m.top;let Ee=l.left;return l=l.left+l.width-$,o.RTL?Ee=Math.min(l,Ee):l=Math.max(Ee,l),(o=Pi(Ee,m.left,l)-m.left)||V?(d.moveBy(o,V,["inbounds"]),!0):!1},lg=function(o){return l=>{var d=o.getMetricsManager();if(d.hasFixedEdges()&&!o.isDragging()){var m;if(pg.indexOf((m=l.type)!=null?m:"")!==-1){m=d.getScrollMetrics(!0);const $=SI(o,l);$&&(d=n.getGroup$$module$build$src$core$events$utils()||!1,n.setGroup$$module$build$src$core$events$utils(l.group),rf(o,m,$)&&!l.group&&console.warn("Moved object in bounds but there was no event group. This may break undo."),n.setGroup$$module$build$src$core$events$utils(d))}else l.type===xs&&l.scale&&l.oldScale&&l.scale>l.oldScale&&fu(o)}}},SI=function(o,l){let d=null;switch(l.type){case n.CREATE$$module$build$src$core$events$utils:case n.MOVE$$module$build$src$core$events$utils:(d=o.getBlockById(l.blockId))&&(d=d.getRootBlock());break;case Ei:case Wr:d=o.getCommentById(l.commentId)}return d},fu=function(o){var l=o.getMetricsManager();if(l.hasFixedEdges()&&!o.isDragging()){l=l.getScrollMetrics(!0);var d=o.getTopBoundedElements();for(let m=0,$;$=d[m];m++)rf(o,l,$)}},C_=function(o,l){const d=[];for(const m of o.getIcons())(!cu(m)||m.bubbleIsVisible())&&(d.push({location:l,icon:m}),m.onLocationChange(l));for(const m of o.getChildren(!1))d.push(...C_(m,zt.sum(l,m.relativeCoords)));return d},Ob=function(){Mo.registry.register({displayText(){return n.Msg$$module$build$src$core$msg.UNDO},preconditionFn(o){return 0<o.workspace.getUndoStack().length?"enabled":"disabled"},callback(o){o.workspace.undo(!1)},scopeType:Mo.ScopeType.WORKSPACE,id:"undoWorkspace",weight:1})},Sb=function(){Mo.registry.register({displayText(){return n.Msg$$module$build$src$core$msg.REDO},preconditionFn(o){return 0<o.workspace.getRedoStack().length?"enabled":"disabled"},callback(o){o.workspace.undo(!0)},scopeType:Mo.ScopeType.WORKSPACE,id:"redoWorkspace",weight:2})},Od=function(){Mo.registry.register({displayText(){return n.Msg$$module$build$src$core$msg.CLEAN_UP},preconditionFn(o){return o.workspace.isMovable()?1<o.workspace.getTopBlocks(!1).length?"enabled":"disabled":"hidden"},callback(o){o.workspace.cleanUp()},scopeType:Mo.ScopeType.WORKSPACE,id:"cleanWorkspace",weight:3})},yb=function(o,l){function d(V){$--,V.setCollapsed(o),$===0&&n.setGroup$$module$build$src$core$events$utils(!1)}let m=0,$=0;n.setGroup$$module$build$src$core$events$utils(!0);for(let V=0;V<l.length;V++){let Ee=l[V];for(;Ee;)$++,setTimeout(d.bind(null,Ee),m),Ee=Ee.getNextBlock(),m+=10}},$b=function(){Mo.registry.register({displayText(){return n.Msg$$module$build$src$core$msg.COLLAPSE_ALL},preconditionFn(o){if(o.workspace.options.collapse){o=o.workspace.getTopBlocks(!1);for(let l=0;l<o.length;l++){let d=o[l];for(;d;){if(!d.isCollapsed())return"enabled";d=d.getNextBlock()}}return"disabled"}return"hidden"},callback(o){yb(!0,o.workspace.getTopBlocks(!0))},scopeType:Mo.ScopeType.WORKSPACE,id:"collapseWorkspace",weight:4})},ag=function(){Mo.registry.register({displayText(){return n.Msg$$module$build$src$core$msg.EXPAND_ALL},preconditionFn(o){if(o.workspace.options.collapse){o=o.workspace.getTopBlocks(!1);for(let l=0;l<o.length;l++){let d=o[l];for(;d;){if(d.isCollapsed())return"enabled";d=d.getNextBlock()}}return"disabled"}return"hidden"},callback(o){yb(!1,o.workspace.getTopBlocks(!0))},scopeType:Mo.ScopeType.WORKSPACE,id:"expandWorkspace",weight:5})},M_=function(o,l){if(o.isDeletable())Array.prototype.push.apply(l,o.getDescendants(!1));else{o=o.getChildren(!1);for(let d=0;d<o.length;d++)M_(o[d],l)}},A_=function(o){const l=[];o=o.getTopBlocks(!0);for(let d=0;d<o.length;d++)M_(o[d],l);return l},cg=function(o,l){l?n.setGroup$$module$build$src$core$events$utils(l):(n.setGroup$$module$build$src$core$events$utils(!0),l=n.getGroup$$module$build$src$core$events$utils());const d=o.shift();d&&(d.isDeadOrDying()?cg(o,l):(d.dispose(!1,!0),setTimeout(cg,10,o,l))),n.setGroup$$module$build$src$core$events$utils(!1)},Ib=function(){Mo.registry.register({displayText(o){return o.workspace?(o=A_(o.workspace).length,o===1?n.Msg$$module$build$src$core$msg.DELETE_BLOCK:n.Msg$$module$build$src$core$msg.DELETE_X_BLOCKS.replace("%1",`${o}`)):""},preconditionFn(o){return o.workspace&&0<A_(o.workspace).length?"enabled":"disabled"},callback(o){if(o.workspace){o.workspace.cancelCurrentGesture();var l=A_(o.workspace);2>l.length?cg(l):bn(n.Msg$$module$build$src$core$msg.DELETE_ALL_BLOCKS.replace("%1",String(l.length)),function(d){d&&cg(l)})}},scopeType:Mo.ScopeType.WORKSPACE,id:"workspaceDelete",weight:6})},Rb=function(){Ob(),Sb(),Od(),$b(),ag(),Ib()},ug=function(){Mo.registry.register({displayText(){return n.Msg$$module$build$src$core$msg.DUPLICATE_BLOCK},preconditionFn(o){return o=o.block,!o.isInFlyout&&o.isDeletable()&&o.isMovable()?o.isDuplicatable()?"enabled":"disabled":"hidden"},callback(o){if(o.block){var l=o.block.toCopyData();l&&Xl(l,o.block.workspace)}},scopeType:Mo.ScopeType.BLOCK,id:"blockDuplicate",weight:1})},Cb=function(){Mo.registry.register({displayText(o){return o.block.hasIcon(qi.TYPE)?n.Msg$$module$build$src$core$msg.REMOVE_COMMENT:n.Msg$$module$build$src$core$msg.ADD_COMMENT},preconditionFn(o){return o=o.block,!o.isInFlyout&&o.workspace.options.comments&&!o.isCollapsed()&&o.isEditable()?"enabled":"hidden"},callback(o){o=o.block,o.hasIcon(qi.TYPE)?o.setCommentText(null):o.setCommentText("")},scopeType:Mo.ScopeType.BLOCK,id:"blockComment",weight:2})},dg=function(){Mo.registry.register({displayText(o){return o.block.getInputsInline()?n.Msg$$module$build$src$core$msg.EXTERNAL_INPUTS:n.Msg$$module$build$src$core$msg.INLINE_INPUTS},preconditionFn(o){if(o=o.block,!o.isInFlyout&&o.isMovable()&&!o.isCollapsed()){for(let l=1;l<o.inputList.length;l++)if(!(o.inputList[l-1]instanceof wT||o.inputList[l]instanceof wT))return"enabled"}return"hidden"},callback(o){o.block.setInputsInline(!o.block.getInputsInline())},scopeType:Mo.ScopeType.BLOCK,id:"blockInline",weight:3})},L_=function(){Mo.registry.register({displayText(o){return o.block.isCollapsed()?n.Msg$$module$build$src$core$msg.EXPAND_BLOCK:n.Msg$$module$build$src$core$msg.COLLAPSE_BLOCK},preconditionFn(o){return o=o.block,!o.isInFlyout&&o.isMovable()&&o.workspace.options.collapse?"enabled":"hidden"},callback(o){o.block.setCollapsed(!o.block.isCollapsed())},scopeType:Mo.ScopeType.BLOCK,id:"blockCollapseExpand",weight:4})},w_=function(){Mo.registry.register({displayText(o){return o.block.isEnabled()?n.Msg$$module$build$src$core$msg.DISABLE_BLOCK:n.Msg$$module$build$src$core$msg.ENABLE_BLOCK},preconditionFn(o){return o=o.block,!o.isInFlyout&&o.workspace.options.disable&&o.isEditable()?o.getInheritedDisabled()?"disabled":"enabled":"hidden"},callback(o){o=o.block;const l=n.getGroup$$module$build$src$core$events$utils();l||n.setGroup$$module$build$src$core$events$utils(!0),o.setEnabled(!o.isEnabled()),n.setGroup$$module$build$src$core$events$utils(l)},scopeType:Mo.ScopeType.BLOCK,id:"blockDisable",weight:5})},k_=function(){Mo.registry.register({displayText(o){var l=o.block;return o=l.getDescendants(!1).length,(l=l.getNextBlock())&&(o-=l.getDescendants(!1).length),o===1?n.Msg$$module$build$src$core$msg.DELETE_BLOCK:n.Msg$$module$build$src$core$msg.DELETE_X_BLOCKS.replace("%1",`${o}`)},preconditionFn(o){return!o.block.isInFlyout&&o.block.isDeletable()?"enabled":"hidden"},callback(o){o.block&&o.block.checkAndDelete()},scopeType:Mo.ScopeType.BLOCK,id:"blockDelete",weight:6})},lf=function(){Mo.registry.register({displayText(){return n.Msg$$module$build$src$core$msg.HELP},preconditionFn(o){return o=o.block,(typeof o.helpUrl=="function"?o.helpUrl():o.helpUrl)?"enabled":"hidden"},callback(o){o.block.showHelp()},scopeType:Mo.ScopeType.BLOCK,id:"blockHelp",weight:7})},yI=function(){ug(),Cb(),dg(),L_(),w_(),k_(),lf()},N_=function(){Rb(),yI()},Mb=function(o,l){var d=null;d=typeof o=="string"?document.getElementById(o)||document.querySelector(o):o;let m;if(!document.contains(d)&&document!==((m=d)==null?void 0:m.ownerDocument))throw Error("Error: container is not in current document");o=new as(l||{}),l=document.createElement("div"),l.className="injectionDiv",l.tabIndex=0,Ho(l,jo.LABEL,n.Msg$$module$build$src$core$msg.WORKSPACE_ARIA_LABEL),d.appendChild(l),d=$I(l,o);const $=Ab(l,d,o);return II($),S($),k($),l.addEventListener("focusin",function(){S($)}),$},$I=function(o,l){o.setAttribute("dir","LTR"),qe(l.hasCss,l.pathToMedia),o=Ne(st.SVG,{xmlns:bg,"xmlns:html":Ql,"xmlns:xlink":Xr,version:"1.1",class:"blocklySvg",tabindex:"0"},o);const d=Ne(st.DEFS,{},o),m=String(Math.random()).substring(2);return l.gridPattern=yO.createDom(m,l.gridOptions,d),o},Ab=function(o,l,d){d.parentWorkspace=null,d=new na(d);const m=d.options;d.scale=m.zoomOptions.startScale,l.appendChild(d.createDom("blocklyMainBackground",o));var $=d.getRenderer().getClassName();return $&&Se(o,$),($=d.getTheme().getClassName())&&Se(o,$),!m.hasCategories&&m.languageTree&&(o=d.addFlyout(st.SVG),qt(o,l)),m.hasTrashcan&&d.addTrashcan(),m.zoomOptions&&m.zoomOptions.controls&&d.addZoomControls(),d.getThemeManager().subscribe(l,"workspaceBackgroundColour","background-color"),d.translate(0,0),d.addChangeListener(lg(d)),k(d),Vp(),d_(),lb(),d},II=function(o){const l=o.options;var d=o.getParentSvg();if(ee(d.parentNode,"contextmenu",null,function(m){ze(m)||m.preventDefault()}),d=ee(window,"resize",null,function(){ba(),o.hideComponents(!0),zh(),Jv(),k(o),fu(o)}),o.setResizeHandlerWrapper(d),Lb(),l.languageTree){d=o.getToolbox();const m=o.getFlyout(!0);d?d.init():m&&(m.init(o),m.show(l.languageTree),typeof m.scrollToStart=="function"&&m.scrollToStart())}l.hasTrashcan&&o.trashcan.init(),l.zoomOptions&&l.zoomOptions.controls&&o.zoomControls_.init(),l.moveOptions&&l.moveOptions.scrollbars?(o.scrollbar=new YO(o,l.moveOptions.scrollbars===!0||!!l.moveOptions.scrollbars.horizontal,l.moveOptions.scrollbars===!0||!!l.moveOptions.scrollbars.vertical,"blocklyMainWorkspaceScrollbar"),o.scrollbar.resize()):o.setMetrics({x:.5,y:.5}),l.hasSounds&&D_(l.pathToMedia,o)},P_=function(o){const l=y();l&&!(ze(o)||l.rendered&&!l.isVisible())&&yo.registry.onKeyDown(l,o)},Lb=function(){Bi||(ee(document,"scroll",null,function(){const o=E();for(let l=0,d;d=o[l];l++)d instanceof na&&d.updateInverseScreenCTM()}),ee(document,"keydown",null,P_),pe(document,"touchend",null,ve),pe(document,"touchcancel",null,ve),mr&&ee(window,"orientationchange",document,function(){k(y())})),Bi=!0},D_=function(o,l){function d(){for(;$.length;){const V=$.pop();V&&Oe(V)}m.preload()}const m=l.getAudioManager();m.load([o+"click.mp3",o+"click.wav",o+"click.ogg"],"click"),m.load([o+"disconnect.wav",o+"disconnect.mp3",o+"disconnect.ogg"],"disconnect"),m.load([o+"delete.mp3",o+"delete.ogg",o+"delete.wav"],"delete");const $=[];$.push(ee(document,"pointermove",null,d,!0)),$.push(ee(document,"touchstart",null,d,!0))},RI=function(o){return o.getType!==void 0&&o.initView!==void 0&&o.dispose!==void 0&&o.getWeight!==void 0&&o.getSize!==void 0&&o.applyColour!==void 0&&o.hideForInsertionMarker!==void 0&&o.updateEditable!==void 0&&o.updateCollapsed!==void 0&&o.isShownWhenCollapsed!==void 0&&o.setOffsetInBlock!==void 0&&o.onLocationChange!==void 0&&o.onClick!==void 0},x_=function(o){return o.paste!==void 0},eo=function(o){return o.isSelectable()},CI=function(o){y().hideChaff(o)},Mn=Mn||{},Mn.scope={},Mn.ASSUME_ES5=!1,Mn.ASSUME_NO_NATIVE_MAP=!1,Mn.ASSUME_NO_NATIVE_SET=!1,Mn.SIMPLE_FROUND_POLYFILL=!1,Mn.ISOLATE_POLYFILLS=!1,Mn.FORCE_POLYFILL_PROMISE=!1,Mn.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1,Mn.defineProperty=Mn.ASSUME_ES5||typeof Object.defineProperties=="function"?Object.defineProperty:function(o,l,d){return o==Array.prototype||o==Object.prototype||(o[l]=d.value),o},Mn.getGlobal=function(o){o=[typeof globalThis=="object"&&globalThis,o,typeof window=="object"&&window,typeof self=="object"&&self,typeof ep=="object"&&ep];for(var l=0;l<o.length;++l){var d=o[l];if(d&&d.Math==Math)return d}throw Error("Cannot find global object")},Mn.global=Mn.getGlobal(this),Mn.IS_SYMBOL_NATIVE=typeof Symbol=="function"&&typeof Symbol("x")=="symbol",Mn.TRUST_ES6_POLYFILLS=!Mn.ISOLATE_POLYFILLS||Mn.IS_SYMBOL_NATIVE,Mn.polyfills={},Mn.propertyToPolyfillSymbol={},Mn.POLYFILL_PREFIX="$jscp$",Mn.polyfill=function(o,l,d,m){l&&(Mn.ISOLATE_POLYFILLS?Mn.polyfillIsolated(o,l,d,m):Mn.polyfillUnisolated(o,l,d,m))},Mn.polyfillUnisolated=function(o,l,d,m){for(d=Mn.global,o=o.split("."),m=0;m<o.length-1;m++){var $=o[m];if(!($ in d))return;d=d[$]}o=o[o.length-1],m=d[o],l=l(m),l!=m&&l!=null&&Mn.defineProperty(d,o,{configurable:!0,writable:!0,value:l})},Mn.polyfillIsolated=function(o,l,d,m){var $=o.split(".");o=$.length===1,m=$[0],m=!o&&m in Mn.polyfills?Mn.polyfills:Mn.global;for(var V=0;V<$.length-1;V++){var Ee=$[V];if(!(Ee in m))return;m=m[Ee]}$=$[$.length-1],d=Mn.IS_SYMBOL_NATIVE&&d==="es6"?m[$]:null,l=l(d),l!=null&&(o?Mn.defineProperty(Mn.polyfills,$,{configurable:!0,writable:!0,value:l}):l!==d&&(Mn.propertyToPolyfillSymbol[$]===void 0&&(d=1e9*Math.random()>>>0,Mn.propertyToPolyfillSymbol[$]=Mn.IS_SYMBOL_NATIVE?Mn.global.Symbol($):Mn.POLYFILL_PREFIX+d+"$"+$),Mn.defineProperty(m,Mn.propertyToPolyfillSymbol[$],{configurable:!0,writable:!0,value:l})))},Mn.polyfill("globalThis",function(o){return o||Mn.global},"es_2020","es3"),Mn.arrayIteratorImpl=function(o){var l=0;return function(){return l<o.length?{done:!1,value:o[l++]}:{done:!0}}},Mn.arrayIterator=function(o){return{next:Mn.arrayIteratorImpl(o)}},Mn.initSymbol=function(){},Mn.iteratorPrototype=function(o){return o={next:o},o[Symbol.iterator]=function(){return this},o},Mn.iteratorFromArray=function(o,l){o instanceof String&&(o+="");var d=0,m=!1,$={next:function(){if(!m&&d<o.length){var V=d++;return{value:l(V,o[V]),done:!1}}return m=!0,{done:!0,value:void 0}}};return $[Symbol.iterator]=function(){return $},$},Mn.polyfill("Array.prototype.values",function(o){return o||function(){return Mn.iteratorFromArray(this,function(l,d){return d})}},"es8","es3"),Mn.polyfill("Array.prototype.flat",function(o){return o||function(l){l=l===void 0?1:l;var d=[];return Array.prototype.forEach.call(this,function(m){Array.isArray(m)&&0<l?(m=Array.prototype.flat.call(m,l-1),d.push.apply(d,m)):d.push(m)}),d}},"es9","es5"),Mn.owns=function(o,l){return Object.prototype.hasOwnProperty.call(o,l)},Mn.polyfill("Object.entries",function(o){return o||function(l){var d=[],m;for(m in l)Mn.owns(l,m)&&d.push([m,l[m]]);return d}},"es8","es3"),Mn.polyfill("Object.values",function(o){return o||function(l){var d=[],m;for(m in l)Mn.owns(l,m)&&d.push(l[m]);return d}},"es8","es3");var Tl=Object.create(null),MI={typeMap:Tl},B_=Object.create(null),Ca="default",At=class{constructor(o){this.name=o}toString(){return this.name}};At.CONNECTION_CHECKER=new At("connectionChecker"),At.CONNECTION_PREVIEWER=new At("connectionPreviewer"),At.CURSOR=new At("cursor"),At.EVENT=new At("event"),At.FIELD=new At("field"),At.INPUT=new At("input"),At.RENDERER=new At("renderer"),At.TOOLBOX=new At("toolbox"),At.THEME=new At("theme"),At.TOOLBOX_ITEM=new At("toolboxItem"),At.FLYOUTS_VERTICAL_TOOLBOX=new At("flyoutsVerticalToolbox"),At.FLYOUTS_HORIZONTAL_TOOLBOX=new At("flyoutsHorizontalToolbox"),At.METRICS_MANAGER=new At("metricsManager"),At.BLOCK_DRAGGER=new At("blockDragger"),At.SERIALIZER=new At("serializer"),At.ICON=new At("icon"),At.PASTER=new At("paster");var Oc={DEFAULT:Ca,TEST_ONLY:MI};Oc.Type=At,Oc.getAllItems=f,Oc.getClass=u,Oc.getClassFromOptions=p,Oc.getObject=h,Oc.hasItem=c,Oc.register=s,Oc.unregister=r;var Ti=Object.create(null),Sd=Object.create(null),wb,kb=null,pr,Gr=[],F_={defineBlocksWithJsonArrayInternal:F},ii={TEST_ONLY:F_};ii.createBlockDefinitionsFromJsonArray=n.createBlockDefinitionsFromJsonArray$$module$build$src$core$common,ii.defineBlocks=n.defineBlocks$$module$build$src$core$common,ii.defineBlocksWithJsonArray=B,ii.draggingConnections=Gr,ii.getAllWorkspaces=E,ii.getBlockTypeCounts=D,ii.getMainWorkspace=y,ii.getParentContainer=R,ii.getSelected=L,ii.getWorkspaceById=_,ii.registerWorkspace=v,ii.setMainWorkspace=S,ii.setParentContainer=w,ii.setSelected=I,ii.svgResize=k,ii.unregisterWorkpace=b;var hg="!#$%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",Nb={genUid:()=>{const o=hg.length,l=[];for(let d=0;20>d;d++)l[d]=hg.charAt(Math.random()*o);return l.join("")}},Pb=0,U_={TEST_ONLY:Nb};U_.genUid=G,U_.getNextUniqueId=X;var fg,pu,Yl,gu,zi,mu,yd,af,$d,Sc,yc,Id,Kl,cf,Rd,Cd,xs,Ei,Md,uf,Wr,El,pg,_u,H_,Di;fg="",pu=!0,Yl=0,n.CREATE$$module$build$src$core$events$utils="create",n.CREATE$$module$build$src$core$events$utils,n.DELETE$$module$build$src$core$events$utils="delete",n.DELETE$$module$build$src$core$events$utils,n.CHANGE$$module$build$src$core$events$utils="change",n.CHANGE$$module$build$src$core$events$utils,gu="block_field_intermediate_change",n.MOVE$$module$build$src$core$events$utils="move",n.MOVE$$module$build$src$core$events$utils,zi="var_create",mu="var_delete",yd="var_rename",af="ui",$d="drag",Sc="selected",yc="click",Id="marker_move",Kl="bubble_open",cf="trashcan_open",Rd="toolbox_item_select",Cd="theme_change",xs="viewport_change",Ei="comment_create",Md="comment_delete",uf="comment_change",Wr="comment_move",El="finished_loading",pg=[n.CREATE$$module$build$src$core$events$utils,n.MOVE$$module$build$src$core$events$utils,Ei,Wr],_u=[],H_={FIRE_QUEUE:_u,fireNow:ae,fireInternal:Y,setGroupInternal:ge},Di={BLOCK_CHANGE:n.CHANGE$$module$build$src$core$events$utils,BLOCK_CREATE:n.CREATE$$module$build$src$core$events$utils,BLOCK_DELETE:n.DELETE$$module$build$src$core$events$utils,BLOCK_DRAG:$d,BLOCK_FIELD_INTERMEDIATE_CHANGE:gu,BLOCK_MOVE:n.MOVE$$module$build$src$core$events$utils,BUBBLE_OPEN:Kl,BUMP_EVENTS:pg,CHANGE:n.CHANGE$$module$build$src$core$events$utils,CLICK:yc,COMMENT_CHANGE:uf,COMMENT_CREATE:Ei,COMMENT_DELETE:Md,COMMENT_MOVE:Wr,CREATE:n.CREATE$$module$build$src$core$events$utils,DELETE:n.DELETE$$module$build$src$core$events$utils,FINISHED_LOADING:El,MARKER_MOVE:Id,MOVE:n.MOVE$$module$build$src$core$events$utils,SELECTED:Sc,TEST_ONLY:H_,THEME_CHANGE:Cd,TOOLBOX_ITEM_SELECT:Rd,TRASHCAN_OPEN:cf,UI:af,VAR_CREATE:zi,VAR_DELETE:mu,VAR_RENAME:yd,VIEWPORT_CHANGE:xs},Di.clearPendingUndo=Q,Di.disable=n.disable$$module$build$src$core$events$utils,Di.disableOrphans=We,Di.enable=n.enable$$module$build$src$core$events$utils,Di.filter=Z,Di.fire=J,Di.fromJson=be,Di.get=Ae,Di.getDescendantIds=Ie,Di.getGroup=n.getGroup$$module$build$src$core$events$utils,Di.getRecordUndo=_e,Di.isEnabled=he,Di.setGroup=n.setGroup$$module$build$src$core$events$utils,Di.setRecordUndo=re;var jl=class{constructor(){this.workspaceId=void 0,this.isUiEvent=!1,this.type="",this.group=n.getGroup$$module$build$src$core$events$utils(),this.recordUndo=_e()}toJson(){return{type:this.type,group:this.group}}static fromJson(o,l,d){return d.isBlank=!1,d.group=o.group||"",d.workspaceId=l.id,d}isNull(){return!1}run(o){}getEventWorkspace_(){let o;if(this.workspaceId&&(o=_(this.workspaceId)),!o)throw Error("Workspace is null. Event must have been generated from real Blockly events.");return o}},gr=class extends jl{constructor(o){super(),this.recordUndo=!1,this.isUiEvent=!0,this.isBlank=typeof o>"u",this.workspaceId=o||""}},Db=class extends gr{constructor(o,l,d){l=o?o.workspace.id:l,l===null&&(l=void 0),super(l),this.type=yc,this.blockId=o?o.id:void 0,this.targetType=d}toJson(){const o=super.toJson();if(!this.targetType)throw Error("The click target type is undefined. Either pass a block to the constructor, or call fromJson");return o.targetType=this.targetType,o.blockId=this.blockId,o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new Db),l.targetType=o.targetType,l.blockId=o.blockId,l}},V_;(function(o){o.BLOCK="block",o.WORKSPACE="workspace",o.ZOOM_CONTROLS="zoom_controls"})(V_||(V_={})),s(At.EVENT,yc,Db);var AI=750,gg="ontouchstart"in globalThis||!!(globalThis.document&&document.documentElement&&"ontouchstart"in document.documentElement)||!(!globalThis.navigator||!globalThis.navigator.maxTouchPoints&&!globalThis.navigator.msMaxTouchPoints),mg=null,Ma={mousedown:["pointerdown"],mouseenter:["pointerenter"],mouseleave:["pointerleave"],mousemove:["pointermove"],mouseout:["pointerout"],mouseover:["pointerover"],mouseup:["pointerup","pointercancel"],touchend:["pointerup"],touchcancel:["pointercancel"]},df=0,Aa={TOUCH_ENABLED:gg,TOUCH_MAP:Ma};Aa.checkTouchIdentifier=Xe,Aa.clearTouchIdentifier=Pe,Aa.getTouchIdentifierFromEvent=ot,Aa.longStart=$e,Aa.longStop=ve,Aa.shouldHandleEvent=Be;var xb,Bb,_g,Fb,hf,G_,W_,La,Ub,Hb;(function(o){function l(m){return d.indexOf(m.toUpperCase())!==-1}xb=o;const d=xb.toUpperCase();Bb=l("JavaFX"),_g=l("WebKit"),Fb=l("Gecko")&&!_g,hf=l("Android"),o=globalThis.navigator&&globalThis.navigator.maxTouchPoints,G_=l("iPad")||l("Macintosh")&&0<o,W_=l("iPhone")&&!G_,La=l("Macintosh"),Ub=G_||hf&&!l("Mobile")||l("Silk"),Hb=!Ub&&(W_||hf)})(globalThis.navigator&&globalThis.navigator.userAgent||"");var iL=xb,Vb=Bb,Gb=Fb,X_=hf,mr=G_,z_=W_,Tg=La,Eg=Hb,Y_={ANDROID:X_,GECKO:Gb,IPAD:mr,IPHONE:z_,JavaFx:Vb,MAC:Tg,MOBILE:Eg,raw:iL},Ad=40,Nn=125,vl={};vl.bind=pe,vl.conditionalBind=ee,vl.getScrollDeltaPixels=me,vl.isRightButton=Ze,vl.isTargetInput=ze,vl.mouseToSvg=De,vl.unbind=Oe;var K_={};K_.removeElem=Te;var Yi=class{constructor(o){this.name_=o}toString(){return this.name_}};Yi.POSITIONABLE=new Yi("positionable"),Yi.DRAG_TARGET=new Yi("drag_target"),Yi.DELETE_AREA=new Yi("delete_area"),Yi.AUTOHIDEABLE=new Yi("autohideable");var Gs=class{constructor(){this.componentData=new Map,this.capabilityToComponentIds=new Map}addComponent(o,l){const d=o.component.id;if(!l&&this.componentData.has(d)){var m;throw Error('Plugin "'+d+'" with capabilities "'+((m=this.componentData.get(d))==null?void 0:m.capabilities)+'" already added.')}for(this.componentData.set(d,o),l=[],m=0;m<o.capabilities.length;m++){const $=String(o.capabilities[m]).toLowerCase();if(l.push($),this.capabilityToComponentIds.has($)){let V;(V=this.capabilityToComponentIds.get($))==null||V.push(d)}else this.capabilityToComponentIds.set($,[d])}this.componentData.get(d).capabilities=l}removeComponent(o){const l=this.componentData.get(o);if(l){for(let d=0;d<l.capabilities.length;d++){const m=String(l.capabilities[d]).toLowerCase();Te(this.capabilityToComponentIds.get(m),o)}this.componentData.delete(o)}}addCapability(o,l){if(!this.getComponent(o))throw Error('Cannot add capability, "'+l+'". Plugin "'+o+'" has not been added to the ComponentManager');if(this.hasCapability(o,l))console.warn('Plugin "'+o+'already has capability "'+l+'"');else{l=`${l}`.toLowerCase();var d;(d=this.componentData.get(o))==null||d.capabilities.push(l);var m;(m=this.capabilityToComponentIds.get(l))==null||m.push(o)}}removeCapability(o,l){if(!this.getComponent(o))throw Error('Cannot remove capability, "'+l+'". Plugin "'+o+'" has not been added to the ComponentManager');this.hasCapability(o,l)?(l=`${l}`.toLowerCase(),Te(this.componentData.get(o).capabilities,l),Te(this.capabilityToComponentIds.get(l),o)):console.warn('Plugin "'+o+`doesn't have capability "`+l+'" to remove')}hasCapability(o,l){return l=`${l}`.toLowerCase(),this.componentData.has(o)&&this.componentData.get(o).capabilities.indexOf(l)!==-1}getComponent(o){let l;return(l=this.componentData.get(o))==null?void 0:l.component}getComponents(o,l){if(o=`${o}`.toLowerCase(),o=this.capabilityToComponentIds.get(o),!o)return[];const d=[];if(l){const m=[];o.forEach($=>{m.push(this.componentData.get($))}),m.sort(function($,V){return $.weight-V.weight}),m.forEach(function($){d.push($.component)})}else o.forEach(m=>{d.push(this.componentData.get(m).component)});return d}};Gs.Capability=Yi;var vg=!1,j_=`
  29. .blocklySvg {
  30. background-color: #fff;
  31. outline: none;
  32. overflow: hidden; /* IE overflows by default. */
  33. position: absolute;
  34. display: block;
  35. }
  36. .blocklyWidgetDiv {
  37. display: none;
  38. position: absolute;
  39. z-index: 99999; /* big value for bootstrap3 compatibility */
  40. }
  41. .injectionDiv {
  42. height: 100%;
  43. position: relative;
  44. overflow: hidden; /* So blocks in drag surface disappear at edges */
  45. touch-action: none;
  46. }
  47. .blocklyNonSelectable {
  48. user-select: none;
  49. -ms-user-select: none;
  50. -webkit-user-select: none;
  51. }
  52. .blocklyBlockCanvas.blocklyCanvasTransitioning,
  53. .blocklyBubbleCanvas.blocklyCanvasTransitioning {
  54. transition: transform .5s;
  55. }
  56. .blocklyTooltipDiv {
  57. background-color: #ffffc7;
  58. border: 1px solid #ddc;
  59. box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);
  60. color: #000;
  61. display: none;
  62. font: 9pt sans-serif;
  63. opacity: .9;
  64. padding: 2px;
  65. position: absolute;
  66. z-index: 100000; /* big value for bootstrap3 compatibility */
  67. }
  68. .blocklyDropDownDiv {
  69. position: absolute;
  70. left: 0;
  71. top: 0;
  72. z-index: 1000;
  73. display: none;
  74. border: 1px solid;
  75. border-color: #dadce0;
  76. background-color: #fff;
  77. border-radius: 2px;
  78. padding: 4px;
  79. box-shadow: 0 0 3px 1px rgba(0,0,0,.3);
  80. }
  81. .blocklyDropDownDiv.blocklyFocused {
  82. box-shadow: 0 0 6px 1px rgba(0,0,0,.3);
  83. }
  84. .blocklyDropDownContent {
  85. max-height: 300px; /* @todo: spec for maximum height. */
  86. overflow: auto;
  87. overflow-x: hidden;
  88. position: relative;
  89. }
  90. .blocklyDropDownArrow {
  91. position: absolute;
  92. left: 0;
  93. top: 0;
  94. width: 16px;
  95. height: 16px;
  96. z-index: -1;
  97. background-color: inherit;
  98. border-color: inherit;
  99. }
  100. .blocklyDropDownButton {
  101. display: inline-block;
  102. float: left;
  103. padding: 0;
  104. margin: 4px;
  105. border-radius: 4px;
  106. outline: none;
  107. border: 1px solid;
  108. transition: box-shadow .1s;
  109. cursor: pointer;
  110. }
  111. .blocklyArrowTop {
  112. border-top: 1px solid;
  113. border-left: 1px solid;
  114. border-top-left-radius: 4px;
  115. border-color: inherit;
  116. }
  117. .blocklyArrowBottom {
  118. border-bottom: 1px solid;
  119. border-right: 1px solid;
  120. border-bottom-right-radius: 4px;
  121. border-color: inherit;
  122. }
  123. .blocklyResizeSE {
  124. cursor: se-resize;
  125. fill: #aaa;
  126. }
  127. .blocklyResizeSW {
  128. cursor: sw-resize;
  129. fill: #aaa;
  130. }
  131. .blocklyResizeLine {
  132. stroke: #515A5A;
  133. stroke-width: 1;
  134. }
  135. .blocklyHighlightedConnectionPath {
  136. fill: none;
  137. stroke: #fc3;
  138. stroke-width: 4px;
  139. }
  140. .blocklyPathLight {
  141. fill: none;
  142. stroke-linecap: round;
  143. stroke-width: 1;
  144. }
  145. .blocklySelected>.blocklyPathLight {
  146. display: none;
  147. }
  148. .blocklyDraggable {
  149. cursor: grab;
  150. cursor: -webkit-grab;
  151. }
  152. .blocklyDragging {
  153. cursor: grabbing;
  154. cursor: -webkit-grabbing;
  155. }
  156. /* Changes cursor on mouse down. Not effective in Firefox because of
  157. https://bugzilla.mozilla.org/show_bug.cgi?id=771241 */
  158. .blocklyDraggable:active {
  159. cursor: grabbing;
  160. cursor: -webkit-grabbing;
  161. }
  162. .blocklyDragging.blocklyDraggingDelete {
  163. cursor: url("<<<PATH>>>/handdelete.cur"), auto;
  164. }
  165. .blocklyDragging>.blocklyPath,
  166. .blocklyDragging>.blocklyPathLight {
  167. fill-opacity: .8;
  168. stroke-opacity: .8;
  169. }
  170. .blocklyDragging>.blocklyPathDark {
  171. display: none;
  172. }
  173. .blocklyDisabled>.blocklyPath {
  174. fill-opacity: .5;
  175. stroke-opacity: .5;
  176. }
  177. .blocklyDisabled>.blocklyPathLight,
  178. .blocklyDisabled>.blocklyPathDark {
  179. display: none;
  180. }
  181. .blocklyInsertionMarker>.blocklyPath,
  182. .blocklyInsertionMarker>.blocklyPathLight,
  183. .blocklyInsertionMarker>.blocklyPathDark {
  184. fill-opacity: .2;
  185. stroke: none;
  186. }
  187. .blocklyMultilineText {
  188. font-family: monospace;
  189. }
  190. .blocklyNonEditableText>text {
  191. pointer-events: none;
  192. }
  193. .blocklyFlyout {
  194. position: absolute;
  195. z-index: 20;
  196. }
  197. .blocklyText text {
  198. cursor: default;
  199. }
  200. /*
  201. Don't allow users to select text. It gets annoying when trying to
  202. drag a block and selected text moves instead.
  203. */
  204. .blocklySvg text {
  205. user-select: none;
  206. -ms-user-select: none;
  207. -webkit-user-select: none;
  208. cursor: inherit;
  209. }
  210. .blocklyHidden {
  211. display: none;
  212. }
  213. .blocklyFieldDropdown:not(.blocklyHidden) {
  214. display: block;
  215. }
  216. .blocklyIconGroup {
  217. cursor: default;
  218. }
  219. .blocklyIconGroup:not(:hover),
  220. .blocklyIconGroupReadonly {
  221. opacity: .6;
  222. }
  223. .blocklyIconShape {
  224. fill: #00f;
  225. stroke: #fff;
  226. stroke-width: 1px;
  227. }
  228. .blocklyIconSymbol {
  229. fill: #fff;
  230. }
  231. .blocklyMinimalBody {
  232. margin: 0;
  233. padding: 0;
  234. }
  235. .blocklyHtmlInput {
  236. border: none;
  237. border-radius: 4px;
  238. height: 100%;
  239. margin: 0;
  240. outline: none;
  241. padding: 0;
  242. width: 100%;
  243. text-align: center;
  244. display: block;
  245. box-sizing: border-box;
  246. }
  247. /* Remove the increase and decrease arrows on the field number editor */
  248. input.blocklyHtmlInput[type=number]::-webkit-inner-spin-button,
  249. input.blocklyHtmlInput[type=number]::-webkit-outer-spin-button {
  250. -webkit-appearance: none;
  251. margin: 0;
  252. }
  253. input[type=number] {
  254. -moz-appearance: textfield;
  255. }
  256. .blocklyMainBackground {
  257. stroke-width: 1;
  258. stroke: #c6c6c6; /* Equates to #ddd due to border being off-pixel. */
  259. }
  260. .blocklyMutatorBackground {
  261. fill: #fff;
  262. stroke: #ddd;
  263. stroke-width: 1;
  264. }
  265. .blocklyFlyoutBackground {
  266. fill: #ddd;
  267. fill-opacity: .8;
  268. }
  269. .blocklyMainWorkspaceScrollbar {
  270. z-index: 20;
  271. }
  272. .blocklyFlyoutScrollbar {
  273. z-index: 30;
  274. }
  275. .blocklyScrollbarHorizontal,
  276. .blocklyScrollbarVertical {
  277. position: absolute;
  278. outline: none;
  279. }
  280. .blocklyScrollbarBackground {
  281. opacity: 0;
  282. }
  283. .blocklyScrollbarHandle {
  284. fill: #ccc;
  285. }
  286. .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,
  287. .blocklyScrollbarHandle:hover {
  288. fill: #bbb;
  289. }
  290. /* Darken flyout scrollbars due to being on a grey background. */
  291. /* By contrast, workspace scrollbars are on a white background. */
  292. .blocklyFlyout .blocklyScrollbarHandle {
  293. fill: #bbb;
  294. }
  295. .blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,
  296. .blocklyFlyout .blocklyScrollbarHandle:hover {
  297. fill: #aaa;
  298. }
  299. .blocklyInvalidInput {
  300. background: #faa;
  301. }
  302. .blocklyVerticalMarker {
  303. stroke-width: 3px;
  304. fill: rgba(255,255,255,.5);
  305. pointer-events: none;
  306. }
  307. .blocklyComputeCanvas {
  308. position: absolute;
  309. width: 0;
  310. height: 0;
  311. }
  312. .blocklyNoPointerEvents {
  313. pointer-events: none;
  314. }
  315. .blocklyContextMenu {
  316. border-radius: 4px;
  317. max-height: 100%;
  318. }
  319. .blocklyDropdownMenu {
  320. border-radius: 2px;
  321. padding: 0 !important;
  322. }
  323. .blocklyDropdownMenu .blocklyMenuItem {
  324. /* 28px on the left for icon or checkbox. */
  325. padding-left: 28px;
  326. }
  327. /* BiDi override for the resting state. */
  328. .blocklyDropdownMenu .blocklyMenuItemRtl {
  329. /* Flip left/right padding for BiDi. */
  330. padding-left: 5px;
  331. padding-right: 28px;
  332. }
  333. .blocklyWidgetDiv .blocklyMenu {
  334. background: #fff;
  335. border: 1px solid transparent;
  336. box-shadow: 0 0 3px 1px rgba(0,0,0,.3);
  337. font: normal 13px Arial, sans-serif;
  338. margin: 0;
  339. outline: none;
  340. padding: 4px 0;
  341. position: absolute;
  342. overflow-y: auto;
  343. overflow-x: hidden;
  344. max-height: 100%;
  345. z-index: 20000; /* Arbitrary, but some apps depend on it... */
  346. }
  347. .blocklyWidgetDiv .blocklyMenu.blocklyFocused {
  348. box-shadow: 0 0 6px 1px rgba(0,0,0,.3);
  349. }
  350. .blocklyDropDownDiv .blocklyMenu {
  351. background: inherit; /* Compatibility with gapi, reset from goog-menu */
  352. border: inherit; /* Compatibility with gapi, reset from goog-menu */
  353. font: normal 13px "Helvetica Neue", Helvetica, sans-serif;
  354. outline: none;
  355. position: relative; /* Compatibility with gapi, reset from goog-menu */
  356. z-index: 20000; /* Arbitrary, but some apps depend on it... */
  357. }
  358. /* State: resting. */
  359. .blocklyMenuItem {
  360. border: none;
  361. color: #000;
  362. cursor: pointer;
  363. list-style: none;
  364. margin: 0;
  365. /* 7em on the right for shortcut. */
  366. min-width: 7em;
  367. padding: 6px 15px;
  368. white-space: nowrap;
  369. }
  370. /* State: disabled. */
  371. .blocklyMenuItemDisabled {
  372. color: #ccc;
  373. cursor: inherit;
  374. }
  375. /* State: hover. */
  376. .blocklyMenuItemHighlight {
  377. background-color: rgba(0,0,0,.1);
  378. }
  379. /* State: selected/checked. */
  380. .blocklyMenuItemCheckbox {
  381. height: 16px;
  382. position: absolute;
  383. width: 16px;
  384. }
  385. .blocklyMenuItemSelected .blocklyMenuItemCheckbox {
  386. background: url(<<<PATH>>>/sprites.png) no-repeat -48px -16px;
  387. float: left;
  388. margin-left: -24px;
  389. position: static; /* Scroll with the menu. */
  390. }
  391. .blocklyMenuItemRtl .blocklyMenuItemCheckbox {
  392. float: right;
  393. margin-right: -24px;
  394. }
  395. .blocklyBlockDragSurface {
  396. position: absolute;
  397. top: 0;
  398. left: 0;
  399. right: 0;
  400. bottom: 0;
  401. overflow: visible !important;
  402. z-index: 80;
  403. pointer-events: none;
  404. }
  405. `,ri={};ri.inject=qe,ri.register=Ue;var zt=class{constructor(o,l){this.x=o,this.y=l}clone(){return new zt(this.x,this.y)}scale(o){return this.x*=o,this.y*=o,this}translate(o,l){return this.x+=o,this.y+=l,this}static equals(o,l){return o===l?!0:o&&l?o.x===l.x&&o.y===l.y:!1}static distance(o,l){const d=o.x-l.x;return o=o.y-l.y,Math.sqrt(d*d+o*o)}static magnitude(o){return Math.sqrt(o.x*o.x+o.y*o.y)}static difference(o,l){return new zt(o.x-l.x,o.y-l.y)}static sum(o,l){return new zt(o.x+l.x,o.y+l.y)}},LI=new Set,Wb={};Wb.warn=ct;var bg="http://www.w3.org/2000/svg",Ql="http://www.w3.org/1999/xhtml",Xr="http://www.w3.org/1999/xlink",$c;(function(o){o[o.ELEMENT_NODE=1]="ELEMENT_NODE",o[o.TEXT_NODE=3]="TEXT_NODE",o[o.COMMENT_NODE=8]="COMMENT_NODE"})($c||($c={}));var ql=null,Jl=0,li=null,Bs={HTML_NS:Ql};Bs.NodeType=$c,Bs.SVG_NS=bg,Bs.XLINK_NS=Xr,Bs.addClass=Se,Bs.containsNode=ce,Bs.createSvgElement=Ne,Bs.getFastTextWidth=Fe,Bs.getFastTextWidthWithSizeString=ye,Bs.getTextWidth=ue,Bs.hasClass=Mt,Bs.insertAfter=qt,Bs.measureFontMetrics=ft,Bs.removeClass=ut,Bs.removeClasses=Je,Bs.removeNode=mt,Bs.setCssTransform=q,Bs.startTextWidthCache=ne,Bs.stopTextWidthCache=Le;var st=class{constructor(o){this.tagName=o}toString(){return this.tagName}};st.ANIMATE=new st("animate"),st.CIRCLE=new st("circle"),st.CLIPPATH=new st("clipPath"),st.DEFS=new st("defs"),st.FECOMPOSITE=new st("feComposite"),st.FECOMPONENTTRANSFER=new st("feComponentTransfer"),st.FEFLOOD=new st("feFlood"),st.FEFUNCA=new st("feFuncA"),st.FEGAUSSIANBLUR=new st("feGaussianBlur"),st.FEPOINTLIGHT=new st("fePointLight"),st.FESPECULARLIGHTING=new st("feSpecularLighting"),st.FILTER=new st("filter"),st.FOREIGNOBJECT=new st("foreignObject"),st.G=new st("g"),st.IMAGE=new st("image"),st.LINE=new st("line"),st.PATH=new st("path"),st.PATTERN=new st("pattern"),st.POLYGON=new st("polygon"),st.RECT=new st("rect"),st.SVG=new st("svg"),st.TEXT=new st("text"),st.TSPAN=new st("tspan");var Po=class{constructor(o,l,d,m){this.top=o,this.bottom=l,this.left=d,this.right=m}getHeight(){return this.bottom-this.top}getWidth(){return this.right-this.left}contains(o,l){return o>=this.left&&o<=this.right&&l>=this.top&&l<=this.bottom}intersects(o){return!(this.left>o.right||this.right<o.left||this.top>o.bottom||this.bottom<o.top)}},Ko=class{constructor(o,l){this.width=o,this.height=l}static equals(o,l){return o===l?!0:o&&l?o.width===l.width&&o.height===l.height:!1}},wI={getSizeInternal:En},bl={TEST_ONLY:wI};bl.getBorderBox=On,bl.getComputedStyle=Lo,bl.getContainerOffsetToScrollInto=ie,bl.getPageOffset=Ln,bl.getSize=Kt,bl.getViewportPageOffset=Zn,bl.scrollIntoContainerView=xo;var Xb=/translate\(\s*([-+\d.e]+)([ ,]\s*([-+\d.e]+)\s*)?/,zb=/transform:\s*translate(?:3d)?\(\s*([-+\d.e]+)\s*px([ ,]\s*([-+\d.e]+)\s*px)?/,rL={XY_REGEX:Xb,XY_STYLE_REGEX:zb},Ld={TEST_ONLY:rL};Ld.getDocumentScroll=ke,Ld.getInjectionDivXY=U,Ld.getRelativeXY=Ce,Ld.getViewportBBox=se,Ld.screenToWsCoordinates=je,Ld.wsToScreenCoordinates=Rt;var Ms=class{constructor(o,l,d,m,$){this.workspace=o,this.horizontal=l,this.oldHostMetrics=null,this.ratio=1,this.origin=new zt(0,0),this.startDragHandle=this.handlePosition=this.handleLength=this.scrollbarLength=this.startDragMouse=0,this.containerVisible=this.isHandleVisible=!0,this.position=new zt(0,0),this.onMouseMoveWrapper_=this.onMouseUpWrapper_=null,this.pair=d||!1,this.margin=$!==void 0?$:Ms.DEFAULT_SCROLLBAR_MARGIN,o="blocklyScrollbar"+(this.horizontal?"Horizontal":"Vertical"),m&&(o+=" "+m),this.outerSvg=Ne(st.SVG,{class:o}),m=Ne(st.G,{},this.outerSvg),this.svgBackground=Ne(st.RECT,{class:"blocklyScrollbarBackground"},m),o=Math.floor((Ms.scrollbarThickness-5)/2),this.svgHandle=Ne(st.RECT,{class:"blocklyScrollbarHandle",rx:o,ry:o},m),this.workspace.getThemeManager().subscribe(this.svgHandle,"scrollbarColour","fill"),this.workspace.getThemeManager().subscribe(this.svgHandle,"scrollbarOpacity","fill-opacity"),qt(this.outerSvg,this.workspace.getParentSvg()),this.setInitialThickness(),l?(this.lengthAttribute_="width",this.positionAttribute_="x"):(this.lengthAttribute_="height",this.positionAttribute_="y"),this.onMouseDownBarWrapper_=ee(this.svgBackground,"pointerdown",this,this.onMouseDownBar),this.onMouseDownHandleWrapper_=ee(this.svgHandle,"pointerdown",this,this.onMouseDownHandle)}setInitialThickness(){const o=Ms.scrollbarThickness;this.horizontal?(this.svgBackground.setAttribute("height",String(o)),this.outerSvg.setAttribute("height",String(o)),this.svgHandle.setAttribute("height",String(o-5)),this.svgHandle.setAttribute("y","2.5")):(this.svgBackground.setAttribute("width",String(o)),this.outerSvg.setAttribute("width",String(o)),this.svgHandle.setAttribute("width",String(o-5)),this.svgHandle.setAttribute("x","2.5"))}dispose(){this.cleanUp(),Oe(this.onMouseDownBarWrapper_),Oe(this.onMouseDownHandleWrapper_),mt(this.outerSvg),this.workspace.getThemeManager().unsubscribe(this.svgHandle)}constrainHandleLength(o){return o=0>=o||isNaN(o)?0:Math.min(o,this.scrollbarLength)}setHandleLength(o){this.handleLength=o,this.svgHandle.setAttribute(this.lengthAttribute_,String(this.handleLength))}constrainHandlePosition(o){return o=0>=o||isNaN(o)?0:Math.min(o,this.scrollbarLength-this.handleLength)}setHandlePosition(o){this.handlePosition=o,this.svgHandle.setAttribute(this.positionAttribute_,String(this.handlePosition))}setScrollbarLength(o){this.scrollbarLength=o,this.outerSvg.setAttribute(this.lengthAttribute_,String(this.scrollbarLength)),this.svgBackground.setAttribute(this.lengthAttribute_,String(this.scrollbarLength))}setPosition(o,l){this.position.x=o,this.position.y=l,q(this.outerSvg,"translate("+(this.position.x+this.origin.x)+"px,"+(this.position.y+this.origin.y)+"px)")}resize(o){!o&&(o=this.workspace.getMetrics(),!o)||this.oldHostMetrics&&Ms.metricsAreEquivalent(o,this.oldHostMetrics)||(this.horizontal?this.resizeHorizontal(o):this.resizeVertical(o),this.oldHostMetrics=o,this.updateMetrics())}requiresViewResize(o){return this.oldHostMetrics?this.oldHostMetrics.viewWidth!==o.viewWidth||this.oldHostMetrics.viewHeight!==o.viewHeight||this.oldHostMetrics.absoluteLeft!==o.absoluteLeft||this.oldHostMetrics.absoluteTop!==o.absoluteTop:!0}resizeHorizontal(o){this.requiresViewResize(o)?this.resizeViewHorizontal(o):this.resizeContentHorizontal(o)}resizeViewHorizontal(o){var l=o.viewWidth-2*this.margin;this.pair&&(l-=Ms.scrollbarThickness),this.setScrollbarLength(Math.max(0,l)),l=o.absoluteLeft+this.margin,this.pair&&this.workspace.RTL&&(l+=Ms.scrollbarThickness),this.setPosition(l,o.absoluteTop+o.viewHeight-Ms.scrollbarThickness-this.margin),this.resizeContentHorizontal(o)}resizeContentHorizontal(o){if(o.viewWidth>=o.scrollWidth)this.setHandleLength(this.scrollbarLength),this.setHandlePosition(0),this.pair||this.setVisible(!1);else{this.pair||this.setVisible(!0);var l=this.scrollbarLength*o.viewWidth/o.scrollWidth;l=this.constrainHandleLength(l),this.setHandleLength(l),l=o.scrollWidth-o.viewWidth;var d=this.scrollbarLength-this.handleLength;o=(o.viewLeft-o.scrollLeft)/l*d,o=this.constrainHandlePosition(o),this.setHandlePosition(o),this.ratio=d/l}}resizeVertical(o){this.requiresViewResize(o)?this.resizeViewVertical(o):this.resizeContentVertical(o)}resizeViewVertical(o){let l=o.viewHeight-2*this.margin;this.pair&&(l-=Ms.scrollbarThickness),this.setScrollbarLength(Math.max(0,l)),this.setPosition(this.workspace.RTL?o.absoluteLeft+this.margin:o.absoluteLeft+o.viewWidth-Ms.scrollbarThickness-this.margin,o.absoluteTop+this.margin),this.resizeContentVertical(o)}resizeContentVertical(o){if(o.viewHeight>=o.scrollHeight)this.setHandleLength(this.scrollbarLength),this.setHandlePosition(0),this.pair||this.setVisible(!1);else{this.pair||this.setVisible(!0);var l=this.scrollbarLength*o.viewHeight/o.scrollHeight;l=this.constrainHandleLength(l),this.setHandleLength(l),l=o.scrollHeight-o.viewHeight;var d=this.scrollbarLength-this.handleLength;o=(o.viewTop-o.scrollTop)/l*d,o=this.constrainHandlePosition(o),this.setHandlePosition(o),this.ratio=d/l}}isVisible(){return this.isHandleVisible}setContainerVisible(o){const l=o!==this.containerVisible;this.containerVisible=o,l&&this.updateDisplay_()}setVisible(o){if(this.pair)throw Error("Unable to toggle visibility of paired scrollbars.");this.setVisibleInternal(o)}setVisibleInternal(o){const l=o!==this.isVisible();this.isHandleVisible=o,l&&this.updateDisplay_()}updateDisplay_(){this.containerVisible&&this.isVisible()?this.outerSvg.setAttribute("display","block"):this.outerSvg.setAttribute("display","none")}onMouseDownBar(o){if(this.workspace.markFocused(),Pe(),this.cleanUp(),Ze(o))o.stopPropagation();else{var l=De(o,this.workspace.getParentSvg(),this.workspace.getInverseScreenCTM());l=this.horizontal?l.x:l.y;var d=U(this.svgHandle);d=this.horizontal?d.x:d.y;var m=this.handlePosition,$=.95*this.handleLength;l<=d?m-=$:l>=d+this.handleLength&&(m+=$),this.setHandlePosition(this.constrainHandlePosition(m)),this.updateMetrics(),o.stopPropagation(),o.preventDefault()}}onMouseDownHandle(o){this.workspace.markFocused(),this.cleanUp(),Ze(o)?o.stopPropagation():(this.startDragHandle=this.handlePosition,this.startDragMouse=this.horizontal?o.clientX:o.clientY,this.onMouseUpWrapper_=ee(document,"pointerup",this,this.onMouseUpHandle),this.onMouseMoveWrapper_=ee(document,"pointermove",this,this.onMouseMoveHandle),o.stopPropagation(),o.preventDefault())}onMouseMoveHandle(o){this.setHandlePosition(this.constrainHandlePosition(this.startDragHandle+((this.horizontal?o.clientX:o.clientY)-this.startDragMouse))),this.updateMetrics()}onMouseUpHandle(){Pe(),this.cleanUp()}cleanUp(){this.workspace.hideChaff(!0),this.onMouseUpWrapper_&&(Oe(this.onMouseUpWrapper_),this.onMouseUpWrapper_=null),this.onMouseMoveWrapper_&&(Oe(this.onMouseMoveWrapper_),this.onMouseMoveWrapper_=null)}getRatio_(){let o=this.handlePosition/(this.scrollbarLength-this.handleLength);return isNaN(o)&&(o=0),o}updateMetrics(){const o=this.getRatio_();this.horizontal?this.workspace.setMetrics({x:o}):this.workspace.setMetrics({y:o})}set(o,l){this.setHandlePosition(this.constrainHandlePosition(o*this.ratio)),(l||l===void 0)&&this.updateMetrics()}setOrigin(o,l){this.origin=new zt(o,l)}static metricsAreEquivalent(o,l){return o.viewWidth===l.viewWidth&&o.viewHeight===l.viewHeight&&o.viewLeft===l.viewLeft&&o.viewTop===l.viewTop&&o.absoluteTop===l.absoluteTop&&o.absoluteLeft===l.absoluteLeft&&o.scrollWidth===l.scrollWidth&&o.scrollHeight===l.scrollHeight&&o.scrollLeft===l.scrollLeft&&o.scrollTop===l.scrollTop}};Ms.scrollbarThickness=gg?25:15,Ms.DEFAULT_SCROLLBAR_MARGIN=.5;var Q_={parseFromString:function(){throw Error("DOMParser was not found in the global scope and was not properly injected using injectDependencies")}},q_={serializeToString:function(){throw Error("XMLSerializer was not foundin the global scope and was not properly injected using injectDependencies")}},{document:Og,DOMParser:Sg,XMLSerializer:wd}=globalThis;Sg&&(Q_=new Sg),wd&&(q_=new wd);var Yb="https://developers.google.com/blockly/xml",yg=/[\x00-\x09\x0B\x0C\x0E-\x1F]/g,Tu={NAME_SPACE:Yb};Tu.createElement=n.createElement$$module$build$src$core$utils$xml,Tu.createTextNode=n.createTextNode$$module$build$src$core$utils$xml,Tu.domToText=Cn,Tu.injectDependencies=Qt,Tu.textToDom=n.textToDom$$module$build$src$core$utils$xml;var J_="categoryToolbox",Kb="flyoutToolbox",Gn;(function(o){o[o.TOP=0]="TOP",o[o.BOTTOM=1]="BOTTOM",o[o.LEFT=2]="LEFT",o[o.RIGHT=3]="RIGHT"})(Gn||(Gn={}));var jb={hasCategoriesInternal:jt},vi={};vi.Position=Gn,vi.TEST_ONLY=jb,vi.convertFlyoutDefToJsonArray=cr,vi.convertToolboxDefToJson=ps,vi.hasCategories=bt,vi.isCategoryCollapsible=Hn,vi.parseToolboxTree=ur;var Ki;(function(o){o[o.TOP=0]="TOP",o[o.BOTTOM=1]="BOTTOM"})(Ki||(Ki={}));var ff;(function(o){o[o.LEFT=0]="LEFT",o[o.RIGHT=1]="RIGHT"})(ff||(ff={}));var Ic;(function(o){o[o.UP=0]="UP",o[o.DOWN=1]="DOWN"})(Ic||(Ic={}));var kd={};kd.bumpDirection=Ic,kd.bumpPositionRect=_a,kd.getCornerOppositeToolbox=dl,kd.getStartPositionRect=Br,kd.horizontalPosition=ff,kd.verticalPosition=Ki;var ji={width:96,height:124,url:"sprites.png"},kI=class{constructor(o){this.workspace=o,this.id="zoomControls",this.boundEvents=[],this.zoomResetGroup=this.zoomOutGroup=this.zoomInGroup=null,this.HEIGHT=this.WIDTH=32,this.SMALL_SPACING=2,this.LARGE_SPACING=11,this.MARGIN_HORIZONTAL=this.MARGIN_VERTICAL=20,this.svgGroup=null,this.top=this.left=0,this.initialized=!1}createDom(){this.svgGroup=Ne(st.G,{});const o=String(Math.random()).substring(2);return this.createZoomOutSvg(o),this.createZoomInSvg(o),this.workspace.isMovable()&&this.createZoomResetSvg(o),this.svgGroup}init(){this.workspace.getComponentManager().addComponent({component:this,weight:2,capabilities:[Gs.Capability.POSITIONABLE]}),this.initialized=!0}dispose(){this.workspace.getComponentManager().removeComponent("zoomControls"),this.svgGroup&&mt(this.svgGroup);for(const o of this.boundEvents)Oe(o);this.boundEvents.length=0}getBoundingRectangle(){let o=this.SMALL_SPACING+2*this.HEIGHT;return this.zoomResetGroup&&(o+=this.LARGE_SPACING+this.HEIGHT),new Po(this.top,this.top+o,this.left,this.left+this.WIDTH)}position(o,l){if(this.initialized){var d=dl(this.workspace,o),m=this.SMALL_SPACING+2*this.HEIGHT;if(this.zoomResetGroup&&(m+=this.LARGE_SPACING+this.HEIGHT),o=Br(d,new Ko(this.WIDTH,m),this.MARGIN_HORIZONTAL,this.MARGIN_VERTICAL,o,this.workspace),d=d.vertical,l=_a(o,this.MARGIN_VERTICAL,d===Ki.TOP?Ic.DOWN:Ic.UP,l),d===Ki.TOP){var $=this.SMALL_SPACING+this.HEIGHT,V;(V=this.zoomInGroup)==null||V.setAttribute("transform","translate(0, "+$+")"),this.zoomResetGroup&&this.zoomResetGroup.setAttribute("transform","translate(0, "+($+this.LARGE_SPACING+this.HEIGHT)+")")}else{V=this.zoomResetGroup?this.LARGE_SPACING+this.HEIGHT:0;let Ve;(Ve=this.zoomInGroup)==null||Ve.setAttribute("transform","translate(0, "+V+")"),V=V+this.SMALL_SPACING+this.HEIGHT,($=this.zoomOutGroup)==null||$.setAttribute("transform","translate(0, "+V+")")}this.top=l.top,this.left=l.left;var Ee;(Ee=this.svgGroup)==null||Ee.setAttribute("transform","translate("+this.left+","+this.top+")")}}createZoomOutSvg(o){this.zoomOutGroup=Ne(st.G,{class:"blocklyZoom blocklyZoomOut"},this.svgGroup);const l=Ne(st.CLIPPATH,{id:"blocklyZoomoutClipPath"+o},this.zoomOutGroup);Ne(st.RECT,{width:32,height:32},l),Ne(st.IMAGE,{width:ji.width,height:ji.height,x:-64,y:-92,"clip-path":"url(#blocklyZoomoutClipPath"+o+")"},this.zoomOutGroup).setAttributeNS(Xr,"xlink:href",this.workspace.options.pathToMedia+ji.url),this.boundEvents.push(ee(this.zoomOutGroup,"pointerdown",null,this.zoom.bind(this,-1)))}createZoomInSvg(o){this.zoomInGroup=Ne(st.G,{class:"blocklyZoom blocklyZoomIn"},this.svgGroup);const l=Ne(st.CLIPPATH,{id:"blocklyZoominClipPath"+o},this.zoomInGroup);Ne(st.RECT,{width:32,height:32},l),Ne(st.IMAGE,{width:ji.width,height:ji.height,x:-32,y:-92,"clip-path":"url(#blocklyZoominClipPath"+o+")"},this.zoomInGroup).setAttributeNS(Xr,"xlink:href",this.workspace.options.pathToMedia+ji.url),this.boundEvents.push(ee(this.zoomInGroup,"pointerdown",null,this.zoom.bind(this,1)))}zoom(o,l){this.workspace.markFocused(),this.workspace.zoomCenter(o),this.fireZoomEvent(),Pe(),l.stopPropagation(),l.preventDefault()}createZoomResetSvg(o){this.zoomResetGroup=Ne(st.G,{class:"blocklyZoom blocklyZoomReset"},this.svgGroup);const l=Ne(st.CLIPPATH,{id:"blocklyZoomresetClipPath"+o},this.zoomResetGroup);Ne(st.RECT,{width:32,height:32},l),Ne(st.IMAGE,{width:ji.width,height:ji.height,y:-92,"clip-path":"url(#blocklyZoomresetClipPath"+o+")"},this.zoomResetGroup).setAttributeNS(Xr,"xlink:href",this.workspace.options.pathToMedia+ji.url),this.boundEvents.push(ee(this.zoomResetGroup,"pointerdown",null,this.resetZoom.bind(this)))}resetZoom(o){this.workspace.markFocused();const l=Math.log(this.workspace.options.zoomOptions.startScale/this.workspace.scale)/Math.log(this.workspace.options.zoomOptions.scaleSpeed);this.workspace.beginCanvasTransition(),this.workspace.zoomCenter(l),this.workspace.scrollCenter(),setTimeout(this.workspace.endCanvasTransition.bind(this.workspace),500),this.fireZoomEvent(),Pe(),o.stopPropagation(),o.preventDefault()}fireZoomEvent(){const o=new(Ae(yc))(null,this.workspace.id,"zoom_controls");J(o)}};Ue(`
  406. .blocklyZoom>image, .blocklyZoom>svg>image {
  407. opacity: .4;
  408. }
  409. .blocklyZoom>image:hover, .blocklyZoom>svg>image:hover {
  410. opacity: .6;
  411. }
  412. .blocklyZoom>image:active, .blocklyZoom>svg>image:active {
  413. opacity: .8;
  414. }
  415. `);var _r=class{constructor(o){this.name=o}toString(){return this.name}equals(o){return this.name===o.toString()}};_r.MUTATOR=new _r("mutator"),_r.WARNING=new _r("warning"),_r.COMMENT=new _r("comment"),function(o){o[o.VALUE=1]="VALUE",o[o.STATEMENT=3]="STATEMENT",o[o.DUMMY=5]="DUMMY",o[o.CUSTOM=6]="CUSTOM",o[o.END_ROW=7]="END_ROW"}(n.inputTypes$$module$build$src$core$inputs$input_types||(n.inputTypes$$module$build$src$core$inputs$input_types={})),n.inputTypes$$module$build$src$core$inputs$input_types;var NI=function(o,l){window.alert(o),l&&l()},PI=function(o,l){l(window.confirm(o))},DI=function(o,l,d){d(window.prompt(o,l))},xI={confirmInternal:Bn},Nd={TEST_ONLY:xI};Nd.alert=_t,Nd.confirm=bn,Nd.prompt=dr,Nd.setAlert=Jt,Nd.setConfirm=oi,Nd.setPrompt=Ov;var Qb,BI;n.Msg$$module$build$src$core$msg=Object.create(null),Qb=function(o){Object.keys(o).forEach(function(l){n.Msg$$module$build$src$core$msg[l]=o[l]})},BI={Msg:n.Msg$$module$build$src$core$msg,setLocale:Qb};var pf=class extends jl{constructor(o){super(),this.isBlank=typeof o>"u",o&&(this.varId=o.getId(),this.workspaceId=o.workspace.id)}toJson(){const o=super.toJson();if(!this.varId)throw Error("The var ID is undefined. Either pass a variable to the constructor, or call fromJson");return o.varId=this.varId,o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new pf),l.varId=o.varId,l}},Z_=class extends pf{constructor(o){super(o),this.type=zi,o&&(this.varType=o.type,this.varName=o.name)}toJson(){const o=super.toJson();if(this.varType===void 0)throw Error("The var type is undefined. Either pass a variable to the constructor, or call fromJson");if(!this.varName)throw Error("The var name is undefined. Either pass a variable to the constructor, or call fromJson");return o.varType=this.varType,o.varName=this.varName,o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new Z_),l.varType=o.varType,l.varName=o.varName,l}run(o){const l=this.getEventWorkspace_();if(!this.varId)throw Error("The var ID is undefined. Either pass a variable to the constructor, or call fromJson");if(!this.varName)throw Error("The var name is undefined. Either pass a variable to the constructor, or call fromJson");o?l.createVariable(this.varName,this.varType,this.varId):l.deleteVariableById(this.varId)}};s(At.EVENT,zi,Z_);var gf=class{constructor(o,l,d,m){this.workspace=o,this.name=l,this.type=d||"",this.id_=m||G()}getId(){return this.id_}static compareByName(o,l){return o.name.localeCompare(l.name,void 0,{sensitivity:"base"})}},qb="VARIABLE",Jb="ijkmnopqrstuvwxyzabcdefgh",FI={generateUniqueNameInternal:$v},bi={CATEGORY_NAME:qb,TEST_ONLY:FI,VAR_LETTER_OPTIONS:Jb};bi.allDeveloperVariables=n.allDeveloperVariables$$module$build$src$core$variables,bi.allUsedVarModels=n.allUsedVarModels$$module$build$src$core$variables,bi.createVariableButtonHandler=dd,bi.flyoutCategory=jm,bi.flyoutCategoryBlocks=Sv,bi.generateUniqueName=yv,bi.generateUniqueNameFromOptions=xp,bi.generateVariableFieldDom=nu,bi.getAddedVariables=Bh,bi.getOrCreateVariablePackage=n.getOrCreateVariablePackage$$module$build$src$core$variables,bi.getVariable=n.getVariable$$module$build$src$core$variables,bi.nameUsedWithAnyType=Qm,bi.nameUsedWithConflictingParam=xh,bi.promptName=Dh,bi.renameVariable=n.renameVariable$$module$build$src$core$variables;var wa=class{constructor(o,l,d,m,$){this.workspace=o,this.editable=this.movable=this.deletable=!0,this.disposed_=!1,this.isComment=!0,this.id=$&&!o.getCommentById($)?$:G(),o.addTopComment(this),this.xy_=new zt(0,0),this.height_=d,this.width_=m,this.RTL=o.RTL,this.content_=l,wa.fireCreateEvent(this)}dispose(){this.disposed_||(he()&&J(new(Ae(Md))(this)),this.workspace.removeTopComment(this),this.disposed_=!0)}getHeight(){return this.height_}setHeight(o){this.height_=o}getWidth(){return this.width_}setWidth(o){this.width_=o}getRelativeToSurfaceXY(){return new zt(this.xy_.x,this.xy_.y)}moveBy(o,l){const d=new(Ae(Wr))(this);this.xy_.translate(o,l),d.recordNew(),J(d)}isDeletable(){return this.deletable&&!(this.workspace&&this.workspace.options.readOnly)}setDeletable(o){this.deletable=o}isMovable(){return this.movable&&!(this.workspace&&this.workspace.options.readOnly)}setMovable(o){this.movable=o}isEditable(){return this.editable&&!(this.workspace&&this.workspace.options.readOnly)}setEditable(o){this.editable=o}getContent(){return this.content_}setContent(o){this.content_!==o&&(J(new(Ae(uf))(this,this.content_,o)),this.content_=o)}toXmlWithXY(o){return o=this.toXml(o),o.setAttribute("x",String(Math.round(this.xy_.x))),o.setAttribute("y",String(Math.round(this.xy_.y))),o.setAttribute("h",String(this.height_)),o.setAttribute("w",String(this.width_)),o}toXml(o){const l=n.createElement$$module$build$src$core$utils$xml("comment");return o||(l.id=this.id),l.textContent=this.getContent(),l}static fireCreateEvent(o){if(he()){const l=n.getGroup$$module$build$src$core$events$utils();l||n.setGroup$$module$build$src$core$events$utils(!0);try{J(new(Ae(Ei))(o))}finally{n.setGroup$$module$build$src$core$events$utils(l)}}}static fromXml(o,l){var d=wa.parseAttributes(o);return l=new wa(l,d.content,d.h,d.w,d.id),d=o.getAttribute("x"),o=o.getAttribute("y"),d=d?parseInt(d,10):NaN,o=o?parseInt(o,10):NaN,isNaN(d)||isNaN(o)||l.moveBy(d,o),wa.fireCreateEvent(l),l}static parseAttributes(o){const l=o.getAttribute("h"),d=o.getAttribute("w"),m=o.getAttribute("x"),$=o.getAttribute("y"),V=o.getAttribute("id");if(!V)throw Error("No ID present in XML comment definition.");let Ee;return{id:V,h:l?parseInt(l):100,w:d?parseInt(d):100,x:m?parseInt(m):NaN,y:$?parseInt($):NaN,content:(Ee=o.textContent)!=null?Ee:""}}},Zb=class extends gr{constructor(o,l,d){super(d),this.type=Sc,this.oldElementId=o??void 0,this.newElementId=l??void 0}toJson(){const o=super.toJson();return o.oldElementId=this.oldElementId,o.newElementId=this.newElementId,o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new Zb),l.oldElementId=o.oldElementId,l.newElementId=o.newElementId,l}};s(At.EVENT,Sc,Zb);var eO={};eO.register=qm,eO.unregister=Cv;var eT=class{paste(o,l,d){const m=o.commentState;if(d)m.setAttribute("x",`${d.x}`),m.setAttribute("y",`${d.y}`);else{var $;d=parseInt(($=m.getAttribute("x"))!=null?$:"0")+50;let V;$=parseInt((V=m.getAttribute("y"))!=null?V:"0")+50,m.setAttribute("x",`${d}`),m.setAttribute("y",`${$}`)}return Oi.fromXmlRendered(o.commentState,l)}};eT.TYPE="workspace-comment",qm(eT.TYPE,new eT);var Ws=8,tT=3,Ol=2,Oi=class extends wa{constructor(o,l,d,m,$){super(o,l,d,m,$),this.onMouseMoveWrapper=this.onMouseUpWrapper=null,this.eventsInit=!1,this.deleteIconBorder=this.deleteGroup=this.resizeGroup=this.foreignObject=this.svgHandleTarget=this.svgRectTarget=this.textarea=null,this.rendered=this.autoLayout=this.focused=!1,this.svgGroup=Ne(st.G,{class:"blocklyComment"}),this.workspace=o,this.svgRect_=Ne(st.RECT,{class:"blocklyCommentRect",x:0,y:0,rx:tT,ry:tT}),this.svgGroup.appendChild(this.svgRect_),this.render()}dispose(){this.disposed_||(L()===this&&(this.unselect(),this.workspace.cancelCurrentGesture()),he()&&J(new(Ae(Md))(this)),mt(this.svgGroup),n.disable$$module$build$src$core$events$utils(),super.dispose(),n.enable$$module$build$src$core$events$utils())}initSvg(o){if(!this.workspace.rendered)throw TypeError("Workspace is headless.");this.workspace.options.readOnly||this.eventsInit||(ee(this.svgRectTarget,"pointerdown",this,this.pathMouseDown),ee(this.svgHandleTarget,"pointerdown",this,this.pathMouseDown)),this.eventsInit=!0,this.updateMovable(),this.getSvgRoot().parentNode||this.workspace.getBubbleCanvas().appendChild(this.getSvgRoot()),!o&&this.textarea&&this.textarea.select()}pathMouseDown(o){const l=this.workspace.getGesture(o);l&&l.handleBubbleStart(o,this)}showContextMenu(o){throw Error("The implementation of showContextMenu should be monkey-patched in by blockly.ts")}select(){if(L()!==this){var o=null;if(L()){o=L().id,n.disable$$module$build$src$core$events$utils();try{L().unselect()}finally{n.enable$$module$build$src$core$events$utils()}}o=new(Ae(Sc))(o,this.id,this.workspace.id),J(o),I(this),this.addSelect()}}unselect(){if(L()===this){var o=new(Ae(Sc))(this.id,null,this.workspace.id);J(o),I(null),this.removeSelect(),this.blurFocus()}}addSelect(){Se(this.svgGroup,"blocklySelected"),this.setFocus()}removeSelect(){Se(this.svgGroup,"blocklySelected"),this.blurFocus()}addFocus(){Se(this.svgGroup,"blocklyFocused")}removeFocus(){ut(this.svgGroup,"blocklyFocused")}getRelativeToSurfaceXY(){const o=this.workspace.getLayerManager();if(!o)throw Error("Cannot calculate position because the workspace has not been appended");let l=0,d=0,m=this.getSvgRoot();if(m)do{const $=Ce(m);l+=$.x,d+=$.y,m=m.parentNode}while(m&&!o.hasLayer(m)&&m!==null);return this.xy_=new zt(l,d)}moveBy(o,l){const d=new(Ae(Wr))(this),m=this.getRelativeToSurfaceXY();this.translate(m.x+o,m.y+l),this.xy_=new zt(m.x+o,m.y+l),d.recordNew(),J(d),this.workspace.resizeContents()}translate(o,l){this.xy_=new zt(o,l),this.getSvgRoot().setAttribute("transform","translate("+o+","+l+")")}moveDuringDrag(o){o=`translate(${o.x}, ${o.y})`,this.getSvgRoot().setAttribute("transform",o)}moveTo(o,l){this.translate(o,l)}clearTransformAttributes(){this.getSvgRoot().removeAttribute("transform")}getBoundingRectangle(){var o=this.getRelativeToSurfaceXY();const l=this.getHeightWidth(),d=o.y,m=o.y+l.height;let $;return this.RTL?($=o.x-l.width,o=o.x):($=o.x,o=o.x+l.width),new Po(d,m,$,o)}updateMovable(){this.isMovable()?Se(this.svgGroup,"blocklyDraggable"):ut(this.svgGroup,"blocklyDraggable")}setMovable(o){super.setMovable(o),this.updateMovable()}setEditable(o){super.setEditable(o),this.textarea&&(this.textarea.readOnly=!o)}setDragging(o){o?Se(this.getSvgRoot(),"blocklyDragging"):ut(this.getSvgRoot(),"blocklyDragging")}getSvgRoot(){return this.svgGroup}getContent(){return this.textarea?this.textarea.value:this.content_}setContent(o){super.setContent(o),this.textarea&&(this.textarea.value=o)}setDeleteStyle(o){o?Se(this.svgGroup,"blocklyDraggingDelete"):ut(this.svgGroup,"blocklyDraggingDelete")}setAutoLayout(o){}toXmlWithXY(o){let l=0;this.workspace.RTL&&(l=this.workspace.getWidth()),o=this.toXml(o);const d=this.getRelativeToSurfaceXY();return o.setAttribute("x",String(Math.round(this.workspace.RTL?l-d.x:d.x))),o.setAttribute("y",String(Math.round(d.y))),o.setAttribute("h",String(this.getHeight())),o.setAttribute("w",String(this.getWidth())),o}toCopyData(){return{paster:eT.TYPE,commentState:this.toXmlWithXY()}}getHeightWidth(){return{width:this.getWidth(),height:this.getHeight()}}render(){if(!this.rendered){var o=this.getHeightWidth(),l=this.createEditor();this.svgGroup.appendChild(l),this.svgHandleTarget=Ne(st.RECT,{class:"blocklyCommentHandleTarget",x:0,y:0}),this.svgGroup.appendChild(this.svgHandleTarget),this.svgRectTarget=Ne(st.RECT,{class:"blocklyCommentTarget",x:0,y:0,rx:tT,ry:tT}),this.svgGroup.appendChild(this.svgRectTarget),this.addResizeDom(),this.isDeletable()&&this.addDeleteDom(),this.setSize(o.width,o.height),this.textarea.value=this.content_,this.rendered=!0,this.resizeGroup&&ee(this.resizeGroup,"pointerdown",this,this.resizeMouseDown),this.isDeletable()&&(ee(this.deleteGroup,"pointerdown",this,this.deleteMouseDown),ee(this.deleteGroup,"pointerout",this,this.deleteMouseOut),ee(this.deleteGroup,"pointerup",this,this.deleteMouseUp))}}createEditor(){this.foreignObject=Ne(st.FOREIGNOBJECT,{x:0,y:Oi.TOP_OFFSET,class:"blocklyCommentForeignObject"});const o=document.createElementNS(Ql,"body");o.setAttribute("xmlns",Ql),o.className="blocklyMinimalBody";const l=document.createElementNS(Ql,"textarea");return l.className="blocklyCommentTextarea",l.setAttribute("dir",this.RTL?"RTL":"LTR"),l.readOnly=!this.isEditable(),o.appendChild(l),this.textarea=l,this.foreignObject.appendChild(o),ee(l,"wheel",this,function(d){d.stopPropagation()}),ee(l,"change",this,function(d){this.setContent(l.value)}),this.foreignObject}addResizeDom(){this.resizeGroup=Ne(st.G,{class:this.RTL?"blocklyResizeSW":"blocklyResizeSE"},this.svgGroup),Ne(st.POLYGON,{points:`0,${Ws} ${Ws},${Ws} ${Ws},0`},this.resizeGroup),Ne(st.LINE,{class:"blocklyResizeLine",x1:Ws/3,y1:Ws-1,x2:Ws-1,y2:Ws/3},this.resizeGroup),Ne(st.LINE,{class:"blocklyResizeLine",x1:2*Ws/3,y1:Ws-1,x2:Ws-1,y2:2*Ws/3},this.resizeGroup)}addDeleteDom(){this.deleteGroup=Ne(st.G,{class:"blocklyCommentDeleteIcon"},this.svgGroup),this.deleteIconBorder=Ne(st.CIRCLE,{class:"blocklyDeleteIconShape",r:"7",cx:"7.5",cy:"7.5"},this.deleteGroup),Ne(st.LINE,{x1:"5",y1:"10",x2:"10",y2:"5",stroke:"#fff","stroke-width":"2"},this.deleteGroup),Ne(st.LINE,{x1:"5",y1:"5",x2:"10",y2:"10",stroke:"#fff","stroke-width":"2"},this.deleteGroup)}resizeMouseDown(o){this.unbindDragEvents(),Ze(o)||(this.workspace.startDrag(o,new zt(this.workspace.RTL?-this.width_:this.width_,this.height_)),this.onMouseUpWrapper=ee(document,"pointerup",this,this.resizeMouseUp),this.onMouseMoveWrapper=ee(document,"pointermove",this,this.resizeMouseMove),this.workspace.hideChaff()),o.stopPropagation()}deleteMouseDown(o){this.deleteIconBorder&&Se(this.deleteIconBorder,"blocklyDeleteIconHighlighted"),o.stopPropagation()}deleteMouseOut(o){this.deleteIconBorder&&ut(this.deleteIconBorder,"blocklyDeleteIconHighlighted")}deleteMouseUp(o){this.dispose(),o.stopPropagation()}unbindDragEvents(){this.onMouseUpWrapper&&(Oe(this.onMouseUpWrapper),this.onMouseUpWrapper=null),this.onMouseMoveWrapper&&(Oe(this.onMouseMoveWrapper),this.onMouseMoveWrapper=null)}resizeMouseUp(o){Pe(),this.unbindDragEvents()}resizeMouseMove(o){this.autoLayout=!1,o=this.workspace.moveDrag(o),this.setSize(this.RTL?-o.x:o.x,o.y)}resizeComment(){const o=this.getHeightWidth(),l=Oi.TOP_OFFSET,d=2*Ol;let m;(m=this.foreignObject)==null||m.setAttribute("width",String(o.width));let $;if(($=this.foreignObject)==null||$.setAttribute("height",String(o.height-l)),this.RTL){let V;(V=this.foreignObject)==null||V.setAttribute("x",String(-o.width))}this.textarea&&(this.textarea.style.width=o.width-d+"px",this.textarea.style.height=o.height-d-l+"px")}setSize(o,l){o=Math.max(o,45),l=Math.max(l,20+Oi.TOP_OFFSET),this.width_=o,this.height_=l,this.svgRect_.setAttribute("width",`${o}`),this.svgRect_.setAttribute("height",`${l}`);let d;(d=this.svgRectTarget)==null||d.setAttribute("width",`${o}`);let m;(m=this.svgRectTarget)==null||m.setAttribute("height",`${l}`);let $;($=this.svgHandleTarget)==null||$.setAttribute("width",`${o}`);let V;if((V=this.svgHandleTarget)==null||V.setAttribute("height",String(Oi.TOP_OFFSET)),this.RTL){this.svgRect_.setAttribute("transform","scale(-1 1)");let Ee;(Ee=this.svgRectTarget)==null||Ee.setAttribute("transform","scale(-1 1)")}if(this.resizeGroup)if(this.RTL){this.resizeGroup.setAttribute("transform","translate("+(-o+Ws)+","+(l-Ws)+") scale(-1 1)");let Ee;(Ee=this.deleteGroup)==null||Ee.setAttribute("transform","translate("+(-o+Ws)+","+-Ws+") scale(-1 1)")}else{this.resizeGroup.setAttribute("transform","translate("+(o-Ws)+","+(l-Ws)+")");let Ee;(Ee=this.deleteGroup)==null||Ee.setAttribute("transform","translate("+(o-Ws)+","+-Ws+")")}this.resizeComment()}setFocus(){this.focused=!0,setTimeout(()=>{this.disposed_||(this.textarea.focus(),this.addFocus(),this.svgRectTarget&&Se(this.svgRectTarget,"blocklyCommentTargetFocused"),this.svgHandleTarget&&Se(this.svgHandleTarget,"blocklyCommentHandleTargetFocused"))},0)}blurFocus(){this.focused=!1,setTimeout(()=>{this.disposed_||(this.textarea.blur(),this.removeFocus(),this.svgRectTarget&&ut(this.svgRectTarget,"blocklyCommentTargetFocused"),this.svgHandleTarget&&ut(this.svgHandleTarget,"blocklyCommentHandleTargetFocused"))},0)}static fromXmlRendered(o,l,d){n.disable$$module$build$src$core$events$utils();let m;try{const $=wa.parseAttributes(o);if(m=new Oi(l,$.content,$.h,$.w,$.id),l.rendered&&(m.initSvg(!0),m.render()),!isNaN($.x)&&!isNaN($.y))if(l.RTL){const V=d||l.getWidth();m.moveBy(V-$.x,$.y)}else m.moveBy($.x,$.y)}finally{n.enable$$module$build$src$core$events$utils()}return wa.fireCreateEvent(m),m}};Oi.DEFAULT_SIZE=100,Oi.TOP_OFFSET=10,Ue(`
  416. .blocklyCommentForeignObject {
  417. position: relative;
  418. z-index: 0;
  419. }
  420. .blocklyCommentRect {
  421. fill: #E7DE8E;
  422. stroke: #bcA903;
  423. stroke-width: 1px;
  424. }
  425. .blocklyCommentTarget {
  426. fill: transparent;
  427. stroke: #bcA903;
  428. }
  429. .blocklyCommentTargetFocused {
  430. fill: none;
  431. }
  432. .blocklyCommentHandleTarget {
  433. fill: none;
  434. }
  435. .blocklyCommentHandleTargetFocused {
  436. fill: transparent;
  437. }
  438. .blocklyFocused>.blocklyCommentRect {
  439. fill: #B9B272;
  440. stroke: #B9B272;
  441. }
  442. .blocklySelected>.blocklyCommentTarget {
  443. stroke: #fc3;
  444. stroke-width: 3px;
  445. }
  446. .blocklyCommentDeleteIcon {
  447. cursor: pointer;
  448. fill: #000;
  449. display: none;
  450. }
  451. .blocklySelected > .blocklyCommentDeleteIcon {
  452. display: block;
  453. }
  454. .blocklyDeleteIconShape {
  455. fill: #000;
  456. stroke: #000;
  457. stroke-width: 1px;
  458. }
  459. .blocklyDeleteIconShape.blocklyDeleteIconHighlighted {
  460. stroke: #fc3;
  461. }
  462. `);var nT=new Set,tO=new WeakSet,Pd=null,nO=null,UI=0,oT={};oT.finishQueuedRenders=pc,oT.queueRender=Bp,oT.triggerQueuedRenders=ki;var Tr={};Tr.appendDomToWorkspace=V$,Tr.blockToDom=ou,Tr.blockToDomWithXY=Fp,Tr.clearWorkspaceAndLoadFromXml=n_,Tr.deleteNext=xv,Tr.domToBlock=n.domToBlock$$module$build$src$core$xml,Tr.domToBlockInternal=su,Tr.domToPrettyText=H$,Tr.domToText=Ta,Tr.domToVariables=Pv,Tr.domToWorkspace=n.domToWorkspace$$module$build$src$core$xml,Tr.variablesToDom=wv,Tr.workspaceToDom=Lv;var Eu=class extends Error{},HI=class extends Eu{constructor(o){super("Expected to find a 'type' property, defining the block type"),this.state=o}},$g=class extends Eu{constructor(o,l,d){super(`The block ${l.toDevString()} is missing a(n) ${o}
  463. connection`),this.block=l,this.state=d}},VI=class extends Eu{constructor(o,l,d,m){super(`The block ${d.toDevString()} could not connect its
  464. ${l} to its parent, because: ${o}`),this.childBlock=d,this.childState=m}},GI=class extends Eu{constructor(o){super(`Encountered a real block which is defined as a child of a shadow
  465. block. It is an invariant of Blockly that shadow blocks only have shadow
  466. children`),this.state=o}},WI=class extends Eu{constructor(o,l,d){super(`Cannot add an icon of type '${o}' to the block ${l.toDevString()}, because there is no icon registered with type '${o}'. Make sure that all of your icons have been registered.`),this.block=l,this.state=d}},Dd={};Dd.BadConnectionCheck=VI,Dd.DeserializationError=Eu,Dd.MissingBlockType=HI,Dd.MissingConnection=$g,Dd.RealChildOfShadow=GI,Dd.UnregisteredIcon=WI;var XI=100,zI=75,YI=50,lL={BLOCKS:YI,PROCEDURES:zI,VARIABLES:XI},oO={};oO.register=Fh,oO.unregister=iu;var KI=class{constructor(){this.priority=YI}save(o){const l=[];for(const d of o.getTopBlocks(!1))(o=Wl(d,{addCoordinates:!0,doFullSerialization:!1}))&&l.push(o);return l.length?{languageVersion:0,blocks:l}:null}load(o,l){o=o.blocks;for(const d of o)Hs(d,l,{recordUndo:_e()})}clear(o){for(const l of o.getTopBlocks(!1))l.dispose(!1)}};Fh("blocks",new KI);var Ig={};Ig.BlockSerializer=KI,Ig.append=Hs,Ig.appendInternal=Uh,Ig.save=Wl;var xd=class extends jl{constructor(o){super(),this.isBlank=!o,o&&(this.blockId=o.id,this.workspaceId=o.workspace.id)}toJson(){const o=super.toJson();if(!this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");return o.blockId=this.blockId,o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new xd),l.blockId=o.blockId,l}},sO=class extends xd{constructor(o){super(o),this.type=n.CREATE$$module$build$src$core$events$utils,o&&(o.isShadow()&&(this.recordUndo=!1),this.xml=Fp(o),this.ids=Ie(o),this.json=Wl(o,{addCoordinates:!0}))}toJson(){const o=super.toJson();if(!this.xml)throw Error("The block XML is undefined. Either pass a block to the constructor, or call fromJson");if(!this.ids)throw Error("The block IDs are undefined. Either pass a block to the constructor, or call fromJson");if(!this.json)throw Error("The block JSON is undefined. Either pass a block to the constructor, or call fromJson");return o.xml=Ta(this.xml),o.ids=this.ids,o.json=this.json,this.recordUndo||(o.recordUndo=this.recordUndo),o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new sO),l.xml=n.textToDom$$module$build$src$core$utils$xml(o.xml),l.ids=o.ids,l.json=o.json,o.recordUndo!==void 0&&(l.recordUndo=o.recordUndo),l}run(o){const l=this.getEventWorkspace_();if(!this.json)throw Error("The block JSON is undefined. Either pass a block to the constructor, or call fromJson");if(!this.ids)throw Error("The block IDs are undefined. Either pass a block to the constructor, or call fromJson");if(!aL(l,this.ids))if(o)Hs(this.json,l);else for(o=0;o<this.ids.length;o++){const d=this.ids[o],m=l.getBlockById(d);m?m.dispose(!1):d===this.blockId&&console.warn("Can't uncreate non-existent block: "+d)}}},aL=function(o,l){return l.map(d=>o.getBlockById(d)).filter(d=>d&&d.isShadow()).length===l.length};s(At.EVENT,n.CREATE$$module$build$src$core$events$utils,sO);var iO=class extends gr{constructor(o,l){super(l),this.type=Cd,this.themeName=o}toJson(){const o=super.toJson();if(!this.themeName)throw Error("The theme name is undefined. Either pass a theme name to the constructor, or call fromJson");return o.themeName=this.themeName,o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new iO),l.themeName=o.themeName,l}};s(At.EVENT,Cd,iO);var rO=class extends gr{constructor(o,l,d,m,$){super(m),this.type=xs,this.viewTop=o,this.viewLeft=l,this.scale=d,this.oldScale=$}toJson(){const o=super.toJson();if(this.viewTop===void 0)throw Error("The view top is undefined. Either pass a value to the constructor, or call fromJson");if(this.viewLeft===void 0)throw Error("The view left is undefined. Either pass a value to the constructor, or call fromJson");if(this.scale===void 0)throw Error("The scale is undefined. Either pass a value to the constructor, or call fromJson");if(this.oldScale===void 0)throw Error("The old scale is undefined. Either pass a value to the constructor, or call fromJson");return o.viewTop=this.viewTop,o.viewLeft=this.viewLeft,o.scale=this.scale,o.oldScale=this.oldScale,o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new rO),l.viewTop=o.viewTop,l.viewLeft=o.viewLeft,l.scale=o.scale,l.oldScale=o.oldScale,l}};s(At.EVENT,xs,rO);var lO;lO=28,n.config$$module$build$src$core$config={dragRadius:5,flyoutDragRadius:10,snapRadius:lO,connectingSnapRadius:lO,currentConnectionPreference:8,bumpDelay:250},n.config$$module$build$src$core$config;var sn;(function(o){o[o.INPUT_VALUE=1]="INPUT_VALUE",o[o.OUTPUT_VALUE=2]="OUTPUT_VALUE",o[o.NEXT_STATEMENT=3]="NEXT_STATEMENT",o[o.PREVIOUS_STATEMENT=4]="PREVIOUS_STATEMENT"})(sn||(sn={}));var vu=class{constructor(o){this.connectionChecker=o,this.connections=[]}addConnection(o,l){l=this.calculateIndexForYPos(l),this.connections.splice(l,0,o)}findIndexOfConnection(o,l){if(!this.connections.length)return-1;const d=this.calculateIndexForYPos(l);if(d>=this.connections.length)return-1;l=o.y;let m=d;for(;0<=m&&this.connections[m].y===l;){if(this.connections[m]===o)return m;m--}for(m=d;m<this.connections.length&&this.connections[m].y===l;){if(this.connections[m]===o)return m;m++}return-1}calculateIndexForYPos(o){if(!this.connections.length)return 0;let l=0,d=this.connections.length;for(;l<d;){const m=Math.floor((l+d)/2);if(this.connections[m].y<o)l=m+1;else if(this.connections[m].y>o)d=m;else{l=m;break}}return l}removeConnection(o,l){if(o=this.findIndexOfConnection(o,l),o===-1)throw Error("Unable to find connection in connectionDB.");this.connections.splice(o,1)}getNeighbours(o,l){function d(tn){const cs=$-m[tn].x,ts=V-m[tn].y;return Math.sqrt(cs*cs+ts*ts)<=l&&St.push(m[tn]),ts<l}const m=this.connections,$=o.x,V=o.y;o=0;let Ee=m.length-2,Ve=Ee;for(;o<Ve;)m[Ve].y<V?o=Ve:Ee=Ve,Ve=Math.floor((o+Ee)/2);const St=[];if(Ee=o=Ve,m.length){for(;0<=o&&d(o);)o--;do Ee++;while(Ee<m.length&&d(Ee))}return St}isInYRange(o,l,d){return Math.abs(this.connections[o].y-l)<=d}searchForClosest(o,l,d){if(!this.connections.length)return{connection:null,radius:l};const m=o.y,$=o.x;o.x=$+d.x,o.y=m+d.y;var V=this.calculateIndexForYPos(o.y);d=null;let Ee=l,Ve,St=V-1;for(;0<=St&&this.isInYRange(St,o.y,l);)Ve=this.connections[St],this.connectionChecker.canConnect(o,Ve,!0,Ee)&&(d=Ve,Ee=Ve.distanceFrom(o)),St--;for(;V<this.connections.length&&this.isInYRange(V,o.y,l);)Ve=this.connections[V],this.connectionChecker.canConnect(o,Ve,!0,Ee)&&(d=Ve,Ee=Ve.distanceFrom(o)),V++;return o.x=$,o.y=m,{connection:d,radius:Ee}}static init(o){const l=[];return l[sn.INPUT_VALUE]=new vu(o),l[sn.OUTPUT_VALUE]=new vu(o),l[sn.NEXT_STATEMENT]=new vu(o),l[sn.PREVIOUS_STATEMENT]=new vu(o),l}},mf=class{paste(o,l,d){if(!l.isCapacityAvailable(o.typeCounts))return null;d&&(o.blockState.x=d.x,o.blockState.y=d.y),n.disable$$module$build$src$core$events$utils();let m;try{m=Hs(o.blockState,l),Q$(m)}finally{n.enable$$module$build$src$core$events$utils()}return m&&(he()&&!m.isShadow()&&J(new(Ae(n.CREATE$$module$build$src$core$events$utils))(m)),m.select(),m)}};mf.TYPE="block",qm(mf.TYPE,new mf);var aO=null,cO=null,uO={duplicateInternal:jv,copyInternal:Hp},Bd={};Bd.BlockPaster=mf,Bd.TEST_ONLY=uO,Bd.copy=zv,Bd.duplicate=Kv,Bd.paste=Xl,Bd.registry=eO;var cL="aria-",uL="role",Er;(function(o){o.GRID="grid",o.GRIDCELL="gridcell",o.GROUP="group",o.LISTBOX="listbox",o.MENU="menu",o.MENUITEM="menuitem",o.MENUITEMCHECKBOX="menuitemcheckbox",o.OPTION="option",o.PRESENTATION="presentation",o.ROW="row",o.TREE="tree",o.TREEITEM="treeitem"})(Er||(Er={}));var jo;(function(o){o.ACTIVEDESCENDANT="activedescendant",o.COLCOUNT="colcount",o.DISABLED="disabled",o.EXPANDED="expanded",o.INVALID="invalid",o.LABEL="label",o.LABELLEDBY="labelledby",o.LEVEL="level",o.ORIENTATION="orientation",o.POSINSET="posinset",o.ROWCOUNT="rowcount",o.SELECTED="selected",o.SETSIZE="setsize",o.VALUEMAX="valuemax",o.VALUEMIN="valuemin"})(jo||(jo={}));var _f={};_f.Role=Er,_f.State=jo,_f.setRole=Ur,_f.setState=Ho;var dO=class{constructor(){this.menuItems=[],this.roleName=this.element=this.onKeyDownHandler=this.mouseLeaveHandler=this.mouseEnterHandler=this.clickHandler=this.mouseOverHandler=this.highlightedItem=this.openingCoords=null}addChild(o){this.menuItems.push(o)}render(o){const l=document.createElement("div");l.className="blocklyMenu goog-menu blocklyNonSelectable",l.tabIndex=0,this.roleName&&Ur(l,this.roleName),this.element=l;for(let d=0,m;m=this.menuItems[d];d++)l.appendChild(m.createDom());return this.mouseOverHandler=ee(l,"pointerover",this,this.handleMouseOver,!0),this.clickHandler=ee(l,"pointerup",this,this.handleClick,!0),this.mouseEnterHandler=ee(l,"pointerenter",this,this.handleMouseEnter,!0),this.mouseLeaveHandler=ee(l,"pointerleave",this,this.handleMouseLeave,!0),this.onKeyDownHandler=ee(l,"keydown",this,this.handleKeyEvent),o.appendChild(l),l}getElement(){return this.element}focus(){const o=this.getElement();o&&(o.focus({preventScroll:!0}),Se(o,"blocklyFocused"))}blur(){const o=this.getElement();o&&(o.blur(),ut(o,"blocklyFocused"))}setRole(o){this.roleName=o}dispose(){this.mouseOverHandler&&(Oe(this.mouseOverHandler),this.mouseOverHandler=null),this.clickHandler&&(Oe(this.clickHandler),this.clickHandler=null),this.mouseEnterHandler&&(Oe(this.mouseEnterHandler),this.mouseEnterHandler=null),this.mouseLeaveHandler&&(Oe(this.mouseLeaveHandler),this.mouseLeaveHandler=null),this.onKeyDownHandler&&(Oe(this.onKeyDownHandler),this.onKeyDownHandler=null);for(let o=0,l;l=this.menuItems[o];o++)l.dispose();this.element=null}getMenuItem(o){const l=this.getElement();for(;o&&o!==l;){if(o.classList.contains("blocklyMenuItem")){for(let d=0,m;m=this.menuItems[d];d++)if(m.getElement()===o)return m}o=o.parentElement}return null}setHighlighted(o){var l=this.highlightedItem;l&&(l.setHighlighted(!1),this.highlightedItem=null),o&&(o.setHighlighted(!0),this.highlightedItem=o,l=this.getElement(),xo(o.getElement(),l),Ho(l,jo.ACTIVEDESCENDANT,o.getId()))}highlightNext(){const o=this.highlightedItem?this.menuItems.indexOf(this.highlightedItem):-1;this.highlightHelper(o,1)}highlightPrevious(){const o=this.highlightedItem?this.menuItems.indexOf(this.highlightedItem):-1;this.highlightHelper(0>o?this.menuItems.length:o,-1)}highlightFirst(){this.highlightHelper(-1,1)}highlightLast(){this.highlightHelper(this.menuItems.length,-1)}highlightHelper(o,l){o+=l;let d;for(;d=this.menuItems[o];){if(d.isEnabled()){this.setHighlighted(d);break}o+=l}}handleMouseOver(o){(o=this.getMenuItem(o.target))&&(o.isEnabled()?this.highlightedItem!==o&&this.setHighlighted(o):this.setHighlighted(null))}handleClick(o){const l=this.openingCoords;if(this.openingCoords=null,l&&typeof o.clientX=="number"){const d=new zt(o.clientX,o.clientY);if(1>zt.distance(l,d))return}(o=this.getMenuItem(o.target))&&o.performAction()}handleMouseEnter(o){this.focus()}handleMouseLeave(o){this.getElement()&&(this.blur(),this.setHighlighted(null))}handleKeyEvent(o){if(this.menuItems.length&&!(o.shiftKey||o.ctrlKey||o.metaKey||o.altKey)){var l=this.highlightedItem;switch(o.key){case"Enter":case" ":l&&l.performAction();break;case"ArrowUp":this.highlightPrevious();break;case"ArrowDown":this.highlightNext();break;case"PageUp":case"Home":this.highlightFirst();break;case"PageDown":case"End":this.highlightLast();break;default:return}o.preventDefault(),o.stopPropagation()}}getSize(){const o=this.getElement(),l=Kt(o);return l.height=o.scrollHeight,l}},Tf=class{constructor(o,l){this.content=o,this.opt_value=l,this.enabled=!0,this.element=null,this.rightToLeft=!1,this.roleName=null,this.highlight=this.checked=this.checkable=!1,this.actionHandler=null}createDom(){const o=document.createElement("div");o.id=X(),this.element=o,o.className="blocklyMenuItem goog-menuitem "+(this.enabled?"":"blocklyMenuItemDisabled goog-menuitem-disabled ")+(this.checked?"blocklyMenuItemSelected goog-option-selected ":"")+(this.highlight?"blocklyMenuItemHighlight goog-menuitem-highlight ":"")+(this.rightToLeft?"blocklyMenuItemRtl goog-menuitem-rtl ":"");const l=document.createElement("div");if(l.className="blocklyMenuItemContent goog-menuitem-content",this.checkable){var d=document.createElement("div");d.className="blocklyMenuItemCheckbox goog-menuitem-checkbox",l.appendChild(d)}return d=this.content,typeof this.content=="string"&&(d=document.createTextNode(this.content)),l.appendChild(d),o.appendChild(l),this.roleName&&Ur(o,this.roleName),Ho(o,jo.SELECTED,this.checkable&&this.checked||!1),Ho(o,jo.DISABLED,!this.enabled),o}dispose(){this.element=null}getElement(){return this.element}getId(){return this.element.id}getValue(){let o;return(o=this.opt_value)!=null?o:null}setRightToLeft(o){this.rightToLeft=o}setRole(o){this.roleName=o}setCheckable(o){this.checkable=o}setChecked(o){this.checked=o}setHighlighted(o){this.highlight=o;const l=this.getElement();l&&this.isEnabled()&&(o?(Se(l,"blocklyMenuItemHighlight"),Se(l,"goog-menuitem-highlight")):(ut(l,"blocklyMenuItemHighlight"),ut(l,"goog-menuitem-highlight")))}isEnabled(){return this.enabled}setEnabled(o){this.enabled=o}performAction(){this.isEnabled()&&this.actionHandler&&this.actionHandler(this)}onAction(o,l){this.actionHandler=o.bind(l)}},Ef=null,sT=null,hO="blocklyWidgetDiv",vf="",bf="",ka,Na={};Na.createDom=Vp,Na.getDiv=ru,Na.hide=hl,Na.hideIfOwner=Ni,Na.isVisible=c_,Na.positionWithAnchor=hd,Na.repositionForWindowResize=Jv,Na.show=Hh,Na.testOnly_setDiv=Z$;var iT=null,jI={},rT=null,Pa={};Pa.callbackFactory=n.callbackFactory$$module$build$src$core$contextmenu,Pa.commentDeleteOption=Gh,Pa.commentDuplicateOption=eb,Pa.dispose=Ea,Pa.getCurrentBlock=tI,Pa.hide=Vh,Pa.setCurrentBlock=Zv,Pa.show=Wp,Pa.workspaceCommentOption=sI;var Mo=class{constructor(){this.registry_=new Map,this.reset()}reset(){this.registry_.clear()}register(o){if(this.registry_.has(o.id))throw Error('Menu item with ID "'+o.id+'" is already registered.');this.registry_.set(o.id,o)}unregister(o){if(!this.registry_.has(o))throw Error('Menu item with ID "'+o+'" not found.');this.registry_.delete(o)}getItem(o){let l;return(l=this.registry_.get(o))!=null?l:null}getContextMenuOptions(o,l){const d=[];for(const $ of this.registry_.values())if(o===$.scopeType){var m=$.preconditionFn(l);m!=="hidden"&&(m={text:typeof $.displayText=="function"?$.displayText(l):$.displayText,enabled:m==="enabled",callback:$.callback,scope:l,weight:$.weight},d.push(m))}return d.sort(function($,V){return $.weight-V.weight}),d}};(function(o){var l=o.ScopeType||(o.ScopeType={});l.BLOCK="block",l.WORKSPACE="workspace",o.registry=new o})(Mo),Mo.ScopeType;var lT={};lT.clamp=Pi,lT.toDegrees=lu,lT.toRadians=Wh;var Rg=16,fO=1,QI=12,aT=16,Cg=.25,pO=null,Fd=null,Of="",Sf="",go,yf,Ud,gO=null,bu=null,qI=null,mO={getBoundsInfo:function(){const o=Ln(gO),l=Kt(gO);return{left:o.x,right:o.x+l.width,top:o.y,bottom:o.y+l.height,width:l.width,height:l.height}},getPositionMetrics:function(o,l,d,m){const $=mO.getBoundsInfo(),V=Kt(go);return l+V.height<$.bottom?Co(o,l,$,V):m-V.height>$.top?Ds(d,m,$,V):l+V.height<document.documentElement.clientHeight?Co(o,l,$,V):m-V.height>document.documentElement.clientTop?Ds(d,m,$,V):Vo(o,$,V)}},xi={ANIMATION_TIME:Cg,ARROW_HORIZONTAL_PADDING:QI,ARROW_SIZE:Rg,BORDER_SIZE:fO,PADDING_Y:aT,TEST_ONLY:mO};xi.clearContent=h_,xi.createDom=d_,xi.getContentDiv=Xh,xi.getOwner=nb,xi.getPositionX=gd,xi.hide=md,xi.hideIfOwner=pi,xi.hideWithoutAnimation=zl,xi.isVisible=ob,xi.repositionForWindowResize=zh,xi.setBoundsElement=tb,xi.setColour=f_,xi.show=Vn,xi.showPositionedByBlock=pd,xi.showPositionedByField=lt;var cT=null,Mg=null,Ag={};Ag.connectionUiEffect=p_,Ag.disconnectUiEffect=g_,Ag.disconnectUiStop=jh,Ag.disposeUiEffect=Yh;var _O=50,$f=100,JI=class{constructor(o,l){this.bubble=o,this.workspace=l,this.dragTarget_=null,this.wouldDeleteBubble_=!1,this.startXY_=this.bubble.getRelativeToSurfaceXY()}startBubbleDrag(){n.getGroup$$module$build$src$core$events$utils()||n.setGroup$$module$build$src$core$events$utils(!0),this.workspace.setResizesEnabled(!1),this.bubble.setAutoLayout&&this.bubble.setAutoLayout(!1);let o;(o=this.workspace.getLayerManager())==null||o.moveToDragLayer(this.bubble),this.bubble.setDragging&&this.bubble.setDragging(!0)}dragBubble(o,l){l=this.pixelsToWorkspaceUnits_(l),l=zt.sum(this.startXY_,l),this.bubble.moveDuringDrag(l),l=this.dragTarget_,this.dragTarget_=this.workspace.getDragTarget(o),o=this.wouldDeleteBubble_,this.wouldDeleteBubble_=this.shouldDelete_(this.dragTarget_),o!==this.wouldDeleteBubble_&&this.updateCursorDuringBubbleDrag_(),this.dragTarget_!==l&&(l&&l.onDragExit(this.bubble),this.dragTarget_&&this.dragTarget_.onDragEnter(this.bubble)),this.dragTarget_&&this.dragTarget_.onDragOver(this.bubble)}shouldDelete_(o){return o&&this.workspace.getComponentManager().hasCapability(o.id,Gs.Capability.DELETE_AREA)?o.wouldDelete(this.bubble,!1):!1}updateCursorDuringBubbleDrag_(){this.bubble.setDeleteStyle(this.wouldDeleteBubble_)}endBubbleDrag(o,l){if(this.dragBubble(o,l),this.dragTarget_&&this.dragTarget_.shouldPreventMove(this.bubble)?o=this.startXY_:(o=this.pixelsToWorkspaceUnits_(l),o=zt.sum(this.startXY_,o)),this.bubble.moveTo(o.x,o.y),this.dragTarget_&&this.dragTarget_.onDrop(this.bubble),this.wouldDeleteBubble_)this.fireMoveEvent_(),this.bubble.dispose();else{if(this.bubble.setDragging){this.bubble.setDragging(!1);let d;(d=this.workspace.getLayerManager())==null||d.moveOffDragLayer(this.bubble,$f)}this.fireMoveEvent_()}this.workspace.setResizesEnabled(!0),n.setGroup$$module$build$src$core$events$utils(!1)}fireMoveEvent_(){if(this.bubble instanceof Oi){const o=new(Ae(Wr))(this.bubble);o.setOldCoordinate(this.startXY_),o.recordNew(),J(o)}}pixelsToWorkspaceUnits_(o){return o=new zt(o.x/this.workspace.scale,o.y/this.workspace.scale),this.workspace.isMutator&&o.scale(1/this.workspace.options.parentWorkspace.scale),o}},TO=30,EO=!0,Rc=[];Rc[sn.INPUT_VALUE]=sn.OUTPUT_VALUE,Rc[sn.OUTPUT_VALUE]=sn.INPUT_VALUE,Rc[sn.NEXT_STATEMENT]=sn.PREVIOUS_STATEMENT,Rc[sn.PREVIOUS_STATEMENT]=sn.NEXT_STATEMENT;var uT="RENAME_VARIABLE_ID",dT="DELETE_VARIABLE_ID",Ou={};Ou.commonWordPrefix=Qh,Ou.commonWordSuffix=va,Ou.isNumber=n.isNumber$$module$build$src$core$utils$string,Ou.shortestStringLength=Xp,Ou.startsWith=iI,Ou.wrap=n.wrap$$module$build$src$core$utils$string;var Lg=void 0,wg=!1,If=!1,ZI=50,kg=0,Da=0,vO=0,bO=0,vr=null,Rf=null,OO=0,SO=10,e0=10,t0=750,hT=5,Xs=null,zr={HOVER_MS:t0,LIMIT:ZI,MARGINS:hT,OFFSET_X:OO,OFFSET_Y:SO,RADIUS_OK:e0};zr.bindMouseEvents=ef,zr.block=cb,zr.createDom=lb,zr.dispose=ab,zr.getCustomTooltip=Kp,zr.getDiv=Jh,zr.getTooltipOfObject=fl,zr.hide=ba,zr.isVisible=rb,zr.setCustomTooltip=ib,zr.unbindMouseEvents=m_,zr.unblock=ub;var n0=class{constructor(o){this.workspace=o,this.horizontalScrollEnabled_=this.workspace.isMovableHorizontally(),this.verticalScrollEnabled_=this.workspace.isMovableVertically(),this.startScrollXY_=new zt(o.scrollX,o.scrollY)}dispose(){this.workspace=null}startDrag(){L()&&L().unselect()}endDrag(o){this.drag(o)}drag(o){if(o=zt.sum(this.startScrollXY_,o),this.horizontalScrollEnabled_&&this.verticalScrollEnabled_)this.workspace.scroll(o.x,o.y);else if(this.horizontalScrollEnabled_)this.workspace.scroll(o.x,this.workspace.scrollY);else if(this.verticalScrollEnabled_)this.workspace.scroll(this.workspace.scrollX,o.y);else throw new TypeError("Invalid state.")}},dL=5,hL=6,Cc=class{constructor(o,l){this.creatorWorkspace=l,this.mouseDownXY=new zt(0,0),this.startWorkspace_=this.targetBlock=this.startBlock=this.startIcon=this.startField=this.startBubble=null,this.hasExceededDragRadius=!1,this.boundEvents=[],this.flyout=this.workspaceDragger=this.blockDragger=this.bubbleDragger=null,this.isMultiTouch_=this.isEnding_=this.gestureHasStarted=this.calledUpdateIsDragging=!1,this.cachedPoints=new Map,this.startDistance=this.previousScale=0,this.currentDropdownOwner=this.isPinchZoomEnabled=null,this.mostRecentEvent=o,this.currentDragDeltaXY=new zt(0,0),this.healStack=!EO}dispose(){Pe(),ub(),this.creatorWorkspace.clearGesture();for(const o of this.boundEvents)Oe(o);this.boundEvents.length=0,this.blockDragger&&this.blockDragger.dispose(),this.workspaceDragger&&this.workspaceDragger.dispose()}updateFromEvent(o){const l=new zt(o.clientX,o.clientY);this.updateDragDelta(l)&&(this.updateIsDragging(),ve()),this.mostRecentEvent=o}updateDragDelta(o){return this.currentDragDeltaXY=zt.difference(o,this.mouseDownXY),this.hasExceededDragRadius?!1:this.hasExceededDragRadius=zt.magnitude(this.currentDragDeltaXY)>(this.flyout?n.config$$module$build$src$core$config.flyoutDragRadius:n.config$$module$build$src$core$config.dragRadius)}updateIsDraggingFromFlyout(){let o;if(!this.targetBlock||(o=this.flyout)==null||!o.isBlockCreatable(this.targetBlock))return!1;if(!this.flyout.targetWorkspace)throw Error(`Cannot update dragging from the flyout because the ' +
  467. 'flyout's target workspace is undefined`);return!this.flyout.isScrollable()||this.flyout.isDragTowardWorkspace(this.currentDragDeltaXY)?(this.startWorkspace_=this.flyout.targetWorkspace,this.startWorkspace_.updateScreenCalculationsIfScrolled(),n.getGroup$$module$build$src$core$events$utils()||n.setGroup$$module$build$src$core$events$utils(!0),this.startBlock=null,this.targetBlock=this.flyout.createBlock(this.targetBlock),this.targetBlock.select(),!0):!1}updateIsDraggingBubble(){return this.startBubble?(this.startDraggingBubble(),!0):!1}updateIsDraggingBlock(){if(!this.targetBlock)return!1;if(this.flyout){if(this.updateIsDraggingFromFlyout())return this.startDraggingBlock(),!0}else if(this.targetBlock.isMovable())return this.startDraggingBlock(),!0;return!1}updateIsDraggingWorkspace(){if(!this.startWorkspace_)throw Error("Cannot update dragging the workspace because the start workspace is undefined");(this.flyout?this.flyout.isScrollable():this.startWorkspace_&&this.startWorkspace_.isDraggable())&&(this.workspaceDragger=new n0(this.startWorkspace_),this.workspaceDragger.startDrag())}updateIsDragging(){if(this.calledUpdateIsDragging)throw Error("updateIsDragging_ should only be called once per gesture.");this.calledUpdateIsDragging=!0,this.updateIsDraggingBubble()||this.updateIsDraggingBlock()||this.updateIsDraggingWorkspace()}startDraggingBlock(){this.blockDragger=new(p(At.BLOCK_DRAGGER,this.creatorWorkspace.options,!0))(this.targetBlock,this.startWorkspace_),this.blockDragger.startDrag(this.currentDragDeltaXY,this.healStack),this.blockDragger.drag(this.mostRecentEvent,this.currentDragDeltaXY)}startDraggingBubble(){if(!this.startBubble)throw Error("Cannot update dragging the bubble because the start bubble is undefined");if(!this.startWorkspace_)throw Error("Cannot update dragging the bubble because the start workspace is undefined");this.bubbleDragger=new JI(this.startBubble,this.startWorkspace_),this.bubbleDragger.startBubbleDrag(),this.bubbleDragger.dragBubble(this.mostRecentEvent,this.currentDragDeltaXY)}doStart(o){if(!this.startWorkspace_)throw Error("Cannot start the touch gesture becauase the start workspace is undefined");this.isPinchZoomEnabled=this.startWorkspace_.options.zoomOptions&&this.startWorkspace_.options.zoomOptions.pinch,ze(o)?this.cancel():(this.gestureHasStarted=!0,jh(),this.startWorkspace_.updateScreenCalculationsIfScrolled(),this.startWorkspace_.isMutator&&this.startWorkspace_.resize(),this.currentDropdownOwner=nb(),this.startWorkspace_.hideChaff(!!this.flyout),this.startWorkspace_.markFocused(),this.mostRecentEvent=o,cb(),this.targetBlock&&this.targetBlock.select(),Ze(o)?this.handleRightClick(o):(o.type.toLowerCase()==="pointerdown"&&o.pointerType!=="mouse"&&$e(o,this),this.mouseDownXY=new zt(o.clientX,o.clientY),this.healStack=o.altKey||o.ctrlKey||o.metaKey,this.bindMouseEvents(o),this.isEnding_||this.handleTouchStart(o)))}bindMouseEvents(o){this.boundEvents.push(ee(document,"pointerdown",null,this.handleStart.bind(this),!0)),this.boundEvents.push(ee(document,"pointermove",null,this.handleMove.bind(this),!0)),this.boundEvents.push(ee(document,"pointerup",null,this.handleUp.bind(this),!0)),o.preventDefault(),o.stopPropagation()}handleStart(o){this.isDragging()||(this.handleTouchStart(o),this.isMultiTouch()&&ve())}handleMove(o){this.isDragging()&&Be(o)||!this.isMultiTouch()?(this.updateFromEvent(o),this.workspaceDragger?this.workspaceDragger.drag(this.currentDragDeltaXY):this.blockDragger?this.blockDragger.drag(this.mostRecentEvent,this.currentDragDeltaXY):this.bubbleDragger&&this.bubbleDragger.dragBubble(this.mostRecentEvent,this.currentDragDeltaXY),o.preventDefault(),o.stopPropagation()):this.isMultiTouch()&&(this.handleTouchMove(o),ve())}handleUp(o){if(this.isDragging()||this.handleTouchEnd(o),!this.isMultiTouch()||this.isDragging()){if(!Be(o))return;if(this.updateFromEvent(o),ve(),this.isEnding_){console.log("Trying to end a gesture recursively.");return}this.isEnding_=!0,this.bubbleDragger?this.bubbleDragger.endBubbleDrag(o,this.currentDragDeltaXY):this.blockDragger?this.blockDragger.endDrag(o,this.currentDragDeltaXY):this.workspaceDragger?this.workspaceDragger.endDrag(this.currentDragDeltaXY):this.isBubbleClick()?this.doBubbleClick():this.isFieldClick()?this.doFieldClick():this.isIconClick()?this.doIconClick():this.isBlockClick()?this.doBlockClick():this.isWorkspaceClick()&&this.doWorkspaceClick(o)}o.preventDefault(),o.stopPropagation(),this.dispose()}handleTouchStart(o){var l=ot(o);this.cachedPoints.set(l,this.getTouchPoint(o));var d=Array.from(this.cachedPoints.keys());d.length===2&&(l=this.cachedPoints.get(d[0]),d=this.cachedPoints.get(d[1]),this.startDistance=zt.distance(l,d),this.isMultiTouch_=!0,o.preventDefault())}handleTouchMove(o){const l=ot(o);this.cachedPoints.set(l,this.getTouchPoint(o)),this.isPinchZoomEnabled&&this.cachedPoints.size===2?this.handlePinch(o):this.handleMove(o)}handlePinch(o){var l=Array.from(this.cachedPoints.keys()),d=this.cachedPoints.get(l[0]);if(l=this.cachedPoints.get(l[1]),d=zt.distance(d,l)/this.startDistance,0<this.previousScale&&1/0>this.previousScale){if(l=d-this.previousScale,l=0<l?l*dL:l*hL,!this.startWorkspace_)throw Error("Cannot handle a pinch because the start workspace is undefined");const m=this.startWorkspace_,$=De(o,m.getParentSvg(),m.getInverseScreenCTM());m.zoom($.x,$.y,l)}this.previousScale=d,o.preventDefault()}handleTouchEnd(o){o=ot(o),this.cachedPoints.has(o)&&this.cachedPoints.delete(o),2>this.cachedPoints.size&&(this.cachedPoints.clear(),this.previousScale=0)}getTouchPoint(o){return this.startWorkspace_?new zt(o.pageX,o.pageY):null}isMultiTouch(){return this.isMultiTouch_}cancel(){this.isEnding_||(ve(),this.bubbleDragger?this.bubbleDragger.endBubbleDrag(this.mostRecentEvent,this.currentDragDeltaXY):this.blockDragger?this.blockDragger.endDrag(this.mostRecentEvent,this.currentDragDeltaXY):this.workspaceDragger&&this.workspaceDragger.endDrag(this.currentDragDeltaXY),this.dispose())}handleRightClick(o){this.targetBlock?(this.bringBlockToFront(),this.targetBlock.workspace.hideChaff(!!this.flyout),this.targetBlock.showContextMenu(o)):this.startBubble?this.startBubble.showContextMenu(o):this.startWorkspace_&&!this.flyout&&(this.startWorkspace_.hideChaff(),this.startWorkspace_.showContextMenu(o)),o.preventDefault(),o.stopPropagation(),this.dispose()}handleWsStart(o,l){if(this.gestureHasStarted)throw Error("Tried to call gesture.handleWsStart, but the gesture had already been started.");this.setStartWorkspace(l),this.mostRecentEvent=o,this.doStart(o)}fireWorkspaceClick(o){J(new(Ae(yc))(null,o.id,"workspace"))}handleFlyoutStart(o,l){if(this.gestureHasStarted)throw Error("Tried to call gesture.handleFlyoutStart, but the gesture had already been started.");this.setStartFlyout(l),this.handleWsStart(o,l.getWorkspace())}handleBlockStart(o,l){if(this.gestureHasStarted)throw Error("Tried to call gesture.handleBlockStart, but the gesture had already been started.");this.setStartBlock(l),this.mostRecentEvent=o}handleBubbleStart(o,l){if(this.gestureHasStarted)throw Error("Tried to call gesture.handleBubbleStart, but the gesture had already been started.");this.setStartBubble(l),this.mostRecentEvent=o}doBubbleClick(){this.startBubble instanceof Oi&&(this.startBubble.setFocus(),this.startBubble.select())}doFieldClick(){if(!this.startField)throw Error("Cannot do a field click because the start field is undefined");this.currentDropdownOwner!==this.startField&&this.startField.showEditor(this.mostRecentEvent),this.bringBlockToFront()}doIconClick(){if(!this.startIcon)throw Error("Cannot do an icon click because the start icon is undefined");this.bringBlockToFront(),this.startIcon.onClick()}doBlockClick(){if(this.flyout&&this.flyout.autoClose){if(!this.targetBlock)throw Error("Cannot do a block click because the target block is undefined");this.targetBlock.isEnabled()&&(n.getGroup$$module$build$src$core$events$utils()||n.setGroup$$module$build$src$core$events$utils(!0),this.flyout.createBlock(this.targetBlock).scheduleSnapAndBump())}else{if(!this.startWorkspace_)throw Error("Cannot do a block click because the start workspace is undefined");const o=new(Ae(yc))(this.startBlock,this.startWorkspace_.id,"block");J(o)}this.bringBlockToFront(),n.setGroup$$module$build$src$core$events$utils(!1)}doWorkspaceClick(o){o=this.creatorWorkspace,L()&&L().unselect(),this.fireWorkspaceClick(this.startWorkspace_||o)}bringBlockToFront(){this.targetBlock&&!this.flyout&&this.targetBlock.bringToFront()}setStartField(o){if(this.gestureHasStarted)throw Error("Tried to call gesture.setStartField, but the gesture had already been started.");this.startField||(this.startField=o)}setStartIcon(o){if(this.gestureHasStarted)throw Error("Tried to call gesture.setStartIcon, but the gesture had already been started.");this.startIcon||(this.startIcon=o)}setStartBubble(o){this.startBubble||(this.startBubble=o)}setStartBlock(o){this.startBlock||this.startBubble||(this.startBlock=o,o.isInFlyout&&o!==o.getRootBlock()?this.setTargetBlock(o.getRootBlock()):this.setTargetBlock(o))}setTargetBlock(o){o.isShadow()?this.setTargetBlock(o.getParent()):this.targetBlock=o}setStartWorkspace(o){this.startWorkspace_||(this.startWorkspace_=o)}setStartFlyout(o){this.flyout||(this.flyout=o)}isBubbleClick(){return!!this.startBubble&&!this.hasExceededDragRadius}isBlockClick(){return!!this.startBlock&&!this.hasExceededDragRadius&&!this.isFieldClick()&&!this.isIconClick()}isFieldClick(){return this.startField?this.startField.isClickable()&&!this.hasExceededDragRadius&&(!this.flyout||this.startField.isClickableInFlyout(this.flyout.autoClose)):!1}isIconClick(){if(!this.startIcon)return!1;const o=!this.flyout||!this.startIcon.isClickableInFlyout||this.startIcon.isClickableInFlyout(this.flyout.autoClose);return!this.hasExceededDragRadius&&o}isWorkspaceClick(){return!this.startBlock&&!this.startBubble&&!this.startField&&!this.hasExceededDragRadius}isDragging(){return!!this.workspaceDragger||!!this.blockDragger||!!this.bubbleDragger}hasStarted(){return this.gestureHasStarted}getInsertionMarkers(){return this.blockDragger?this.blockDragger.getInsertionMarkers():[]}getCurrentDragger(){let o,l;return(l=(o=this.blockDragger)!=null?o:this.workspaceDragger)!=null?l:this.bubbleDragger}static inProgress(){const o=E();for(let l=0,d;d=o[l];l++)if(d.currentGesture_)return!0;return!1}},yO=class{constructor(o,l){this.pattern=o,this.scale=1;let d;this.spacing=(d=l.spacing)!=null?d:0;let m;this.length=(m=l.length)!=null?m:1,this.line2=(this.line1=o.firstChild)&&this.line1.nextSibling;let $;this.snapToGrid=($=l.snap)!=null?$:!1}setSpacing(o){this.spacing=o,this.update(this.scale)}setLength(o){this.length=o,this.update(this.scale)}setSnapToGrid(o){this.snapToGrid=o}shouldSnap(){return this.snapToGrid}getSpacing(){return this.spacing}getPatternId(){return this.pattern.id}update(o){this.scale=o;var l=this.spacing*o;this.pattern.setAttribute("width",`${l}`),this.pattern.setAttribute("height",`${l}`),l=Math.floor(this.spacing/2)+.5;let d=l-this.length/2,m=l+this.length/2;l*=o,d*=o,m*=o,this.setLineAttributes(this.line1,o,d,m,l,l),this.setLineAttributes(this.line2,o,l,l,d,m)}setLineAttributes(o,l,d,m,$,V){o&&(o.setAttribute("stroke-width",`${l}`),o.setAttribute("x1",`${d}`),o.setAttribute("y1",`${$}`),o.setAttribute("x2",`${m}`),o.setAttribute("y2",`${V}`))}moveTo(o,l){this.pattern.setAttribute("x",`${o}`),this.pattern.setAttribute("y",`${l}`)}static createDom(o,l,d){o=Ne(st.PATTERN,{id:"blocklyGridPattern"+o,patternUnits:"userSpaceOnUse"},d);let m,$;if(0<((m=l.length)!=null?m:1)&&0<(($=l.spacing)!=null?$:0)){Ne(st.LINE,{stroke:l.colour},o);let V;(V=l.length)!=null&&V&&Ne(st.LINE,{stroke:l.colour},o)}else Ne(st.LINE,{},o);return o}},Qi=class{constructor(o){this.workspace=o,this.cursorSvg_=this.cursor_=null,this.markers=new Map,this.markerSvg_=null}registerMarker(o,l){this.markers.has(o)&&this.unregisterMarker(o),l.setDrawer(this.workspace.getRenderer().makeMarkerDrawer(this.workspace,l)),this.setMarkerSvg(l.getDrawer().createDom()),this.markers.set(o,l)}unregisterMarker(o){const l=this.markers.get(o);if(l)l.dispose(),this.markers.delete(o);else throw Error("Marker with ID "+o+" does not exist. Can only unregister markers that exist.")}getCursor(){return this.cursor_}getMarker(o){return this.markers.get(o)||null}setCursor(o){this.cursor_&&this.cursor_.getDrawer()&&this.cursor_.getDrawer().dispose(),(this.cursor_=o)&&(o=this.workspace.getRenderer().makeMarkerDrawer(this.workspace,this.cursor_),this.cursor_.setDrawer(o),this.setCursorSvg(this.cursor_.getDrawer().createDom()))}setCursorSvg(o){o?(this.workspace.getBlockCanvas().appendChild(o),this.cursorSvg_=o):this.cursorSvg_=null}setMarkerSvg(o){o?this.workspace.getBlockCanvas()&&(this.cursorSvg_?this.workspace.getBlockCanvas().insertBefore(o,this.cursorSvg_):this.workspace.getBlockCanvas().appendChild(o)):this.markerSvg_=null}updateMarkers(){this.workspace.keyboardAccessibilityMode&&this.cursorSvg_&&this.workspace.getCursor().draw()}dispose(){const o=Object.keys(this.markers);for(let l=0,d;d=o[l];l++)this.unregisterMarker(d);this.markers.clear(),this.cursor_&&(this.cursor_.dispose(),this.cursor_=null)}};Qi.LOCAL_MARKER="local_marker_1";var o0={};o0.deepMerge=Oa;var Hd=class{constructor(o,l,d,m){this.name=o,this.startHats=!1,this.blockStyles=l||Object.create(null),this.categoryStyles=d||Object.create(null),this.componentStyles=m||Object.create(null),this.fontStyle=Object.create(null),s(At.THEME,o,this,!0)}getClassName(){return this.name+"-theme"}setBlockStyle(o,l){this.blockStyles[o]=l}setCategoryStyle(o,l){this.categoryStyles[o]=l}getComponentStyle(o){if(o=this.componentStyles[o],!o)return null;if(typeof o=="string"){const l=this.getComponentStyle(o);if(l)return l}return`${o}`}setComponentStyle(o,l){this.componentStyles[o]=l}setFontStyle(o){this.fontStyle=o}setStartHats(o){this.startHats=o}static defineTheme(o,l){o=o.toLowerCase();const d=new Hd(o);let m=l.base;if(m){if(typeof m=="string"){let $;m=($=h(At.THEME,m))!=null?$:void 0}m instanceof Hd&&(Oa(d,m),d.name=o)}return Oa(d.blockStyles,l.blockStyles),Oa(d.categoryStyles,l.categoryStyles),Oa(d.componentStyles,l.componentStyles),Oa(d.fontStyle,l.fontStyle),l.startHats!==null&&(d.startHats=l.startHats),d}},Vd={colour_blocks:{colourPrimary:"20"},list_blocks:{colourPrimary:"260"},logic_blocks:{colourPrimary:"210"},loop_blocks:{colourPrimary:"120"},math_blocks:{colourPrimary:"230"},procedure_blocks:{colourPrimary:"290"},text_blocks:{colourPrimary:"160"},variable_blocks:{colourPrimary:"330"},variable_dynamic_blocks:{colourPrimary:"310"},hat_blocks:{colourPrimary:"330",hat:"cap"}},jn={colour_category:{colour:"20"},list_category:{colour:"260"},logic_category:{colour:"210"},loop_category:{colour:"120"},math_category:{colour:"230"},procedure_category:{colour:"290"},text_category:{colour:"160"},variable_category:{colour:"330"},variable_dynamic_category:{colour:"310"}},fT=new Hd("classic",Vd,jn),as=class{constructor(o){this.gridPattern=null,this.getMetrics=this.setMetrics=void 0;let l=null,d=!1;var m=!1,$=!1,V=!1,Ee=!1,Ve=!1;const St=!!o.readOnly;if(!St){var tn;l=ps((tn=o.toolbox)!=null?tn:null),d=bt(l),m=o.trashcan,m=m===void 0?d:m,$=o.collapse,$=$===void 0?d:$,V=o.comments,V=V===void 0?d:V,Ee=o.disable,Ee=Ee===void 0?d:Ee,Ve=o.sounds,Ve=Ve===void 0?!0:Ve}tn=o.maxTrashcanContents,m?tn===void 0&&(tn=32):tn=0;const cs=!!o.rtl;let ts=o.horizontalLayout;ts===void 0&&(ts=!1);var Rl=o.toolboxPosition!=="end";Rl=ts?Rl?Gn.TOP:Gn.BOTTOM:Rl===cs?Gn.RIGHT:Gn.LEFT;let NT=o.css;NT===void 0&&(NT=!0);let PT="blockly/media/";o.media?PT=o.media.endsWith("/")?o.media:o.media+"/":"path"in o&&(ct("path","Nov 2014","Jul 2023","media"),PT=o.path+"media/");const mB=o.oneBasedIndex,UQ=o.renderer||"geras",HQ=o.plugins||{};let RL=o.modalInputs;RL===void 0&&(RL=!0),this.RTL=cs,this.oneBasedIndex=mB===void 0?!0:mB,this.collapse=$,this.comments=V,this.disable=Ee,this.readOnly=St,this.maxBlocks=o.maxBlocks||1/0;let _B;this.maxInstances=(_B=o.maxInstances)!=null?_B:null,this.modalInputs=RL,this.pathToMedia=PT,this.hasCategories=d,this.moveOptions=as.parseMoveOptions_(o,d),this.hasScrollbars=!!this.moveOptions.scrollbars,this.hasTrashcan=m,this.maxTrashcanContents=tn,this.hasSounds=Ve,this.hasCss=NT,this.horizontalLayout=ts,this.languageTree=l,this.gridOptions=as.parseGridOptions_(o),this.zoomOptions=as.parseZoomOptions_(o),this.toolboxPosition=Rl,this.theme=as.parseThemeOptions_(o),this.renderer=UQ;let TB;this.rendererOverrides=(TB=o.rendererOverrides)!=null?TB:null;let EB;this.parentWorkspace=(EB=o.parentWorkspace)!=null?EB:null,this.plugins=HQ}static parseMoveOptions_(o,l){const d=o.move||{},m={};return d.scrollbars===void 0&&o.scrollbars===void 0?m.scrollbars=l:typeof d.scrollbars=="object"?(m.scrollbars={horizontal:!!d.scrollbars.horizontal,vertical:!!d.scrollbars.vertical},m.scrollbars.horizontal&&m.scrollbars.vertical?m.scrollbars=!0:m.scrollbars.horizontal||m.scrollbars.vertical||(m.scrollbars=!1)):m.scrollbars=!!d.scrollbars||!!o.scrollbars,m.wheel=m.scrollbars&&d.wheel!==void 0?!!d.wheel:typeof m.scrollbars=="object",m.drag=m.scrollbars?d.drag===void 0?!0:!!d.drag:!1,m}static parseZoomOptions_(o){o=o.zoom||{};const l={};return l.controls=o.controls===void 0?!1:!!o.controls,l.wheel=o.wheel===void 0?!1:!!o.wheel,l.startScale=o.startScale===void 0?1:Number(o.startScale),l.maxScale=o.maxScale===void 0?3:Number(o.maxScale),l.minScale=o.minScale===void 0?.3:Number(o.minScale),l.scaleSpeed=o.scaleSpeed===void 0?1.2:Number(o.scaleSpeed),l.pinch=o.pinch===void 0?l.wheel||l.controls:!!o.pinch,l}static parseGridOptions_(o){o=o.grid||{};const l={};return l.spacing=Number(o.spacing)||0,l.colour=o.colour||"#888",l.length=o.length===void 0?1:Number(o.length),l.snap=0<l.spacing&&!!o.snap,l}static parseThemeOptions_(o){return o=o.theme||fT,typeof o=="string"?h(At.THEME,o):o instanceof Hd?o:Hd.defineTheme(o.name||"builtin"+X(),o)}},Qo=class extends xd{constructor(o,l,d,m,$){super(o),this.type=n.CHANGE$$module$build$src$core$events$utils,o&&(this.element=l,this.name=d||void 0,this.oldValue=m,this.newValue=$)}toJson(){const o=super.toJson();if(!this.element)throw Error("The changed element is undefined. Either pass an element to the constructor, or call fromJson");return o.element=this.element,o.name=this.name,o.oldValue=this.oldValue,o.newValue=this.newValue,o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new Qo),l.element=o.element,l.name=o.name,l.oldValue=o.oldValue,l.newValue=o.newValue,l}isNull(){return this.oldValue===this.newValue}run(o){var l=this.getEventWorkspace_();if(!this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");if(l=l.getBlockById(this.blockId),!l)throw Error("The associated block is undefined. Either pass a block to the constructor, or call fromJson");var d=l.getIcon(_r.MUTATOR);switch(d&&cu(d)&&d.bubbleIsVisible()&&d.setBubbleVisible(!1),o=o?this.newValue:this.oldValue,this.element){case"field":(l=l.getField(this.name))?l.setValue(o):console.warn("Can't set non-existent field: "+this.name);break;case"comment":l.setCommentText(o||null);break;case"collapsed":l.setCollapsed(!!o);break;case"disabled":l.setEnabled(!o);break;case"inline":l.setInputsInline(!!o);break;case"mutation":d=Qo.getExtraBlockState_(l),l.loadExtraState?l.loadExtraState(JSON.parse(o||"{}")):l.domToMutation&&l.domToMutation(n.textToDom$$module$build$src$core$utils$xml(o||"<mutation/>")),J(new Qo(l,"mutation",null,d,o));break;default:console.warn("Unknown change type: "+this.element)}}static getExtraBlockState_(o){return o.saveExtraState?(o=o.saveExtraState(!0))?JSON.stringify(o):"":o.mutationToDom&&(o=o.mutationToDom())?Ta(o):""}};s(At.EVENT,n.CHANGE$$module$build$src$core$events$utils,Qo);var $O=.45,xa=.65,s0={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00"},Sl={};Sl.blend=Ed,Sl.getHsvSaturation=tf,Sl.getHsvValue=nf,Sl.hexToRgb=Td,Sl.hsvToHex=Tc,Sl.hueToHex=db,Sl.names=s0,Sl.parse=pl,Sl.rgbToHex=_c,Sl.setHsvSaturation=_d,Sl.setHsvValue=uu;var Ng={};Ng.checkMessageReferences=Jp,Ng.parseBlockColour=Sa,Ng.replaceMessageReferences=Os,Ng.tokenizeInterpolation=hb;var so=class{constructor(o,l,d){this.DEFAULT_VALUE=null,this.name=void 0,this.constants_=this.mouseDownWrapper_=this.textContent_=this.textElement_=this.borderRect_=this.fieldGroup_=this.markerSvg_=this.cursorSvg_=this.tooltip_=this.validator_=null,this.disposed=!1,this.maxDisplayLength=50,this.sourceBlock_=null,this.enabled_=this.visible_=this.isDirty_=!0,this.suffixField=this.prefixField=this.clickTarget_=null,this.EDITABLE=!0,this.SERIALIZABLE=!1,this.CURSOR="",this.value_="DEFAULT_VALUE"in new.target.prototype?new.target.prototype.DEFAULT_VALUE:this.DEFAULT_VALUE,this.size_=new Ko(0,0),o!==so.SKIP_SETUP&&(d&&this.configure_(d),this.setValue(o),l&&this.setValidator(l))}configure_(o){o.tooltip&&this.setTooltip(Os(o.tooltip))}setSourceBlock(o){if(this.sourceBlock_)throw Error("Field already bound to a block");this.sourceBlock_=o}getConstants(){return!this.constants_&&this.sourceBlock_&&!this.sourceBlock_.isDeadOrDying()&&this.sourceBlock_.workspace.rendered&&(this.constants_=this.sourceBlock_.workspace.getRenderer().getConstants()),this.constants_}getSourceBlock(){return this.sourceBlock_}init(){this.fieldGroup_||(this.fieldGroup_=Ne(st.G,{}),this.isVisible()||(this.fieldGroup_.style.display="none"),this.sourceBlock_.getSvgRoot().appendChild(this.fieldGroup_),this.initView(),this.updateEditable(),this.setTooltip(this.tooltip_),this.bindEvents_(),this.initModel())}initView(){this.createBorderRect_(),this.createTextElement_()}initModel(){}isFullBlockField(){return!this.borderRect_}createBorderRect_(){this.borderRect_=Ne(st.RECT,{rx:this.getConstants().FIELD_BORDER_RECT_RADIUS,ry:this.getConstants().FIELD_BORDER_RECT_RADIUS,x:0,y:0,height:this.size_.height,width:this.size_.width,class:"blocklyFieldRect"},this.fieldGroup_)}createTextElement_(){this.textElement_=Ne(st.TEXT,{class:"blocklyText"},this.fieldGroup_),this.getConstants().FIELD_TEXT_BASELINE_CENTER&&this.textElement_.setAttribute("dominant-baseline","central"),this.textContent_=document.createTextNode(""),this.textElement_.appendChild(this.textContent_)}bindEvents_(){const o=this.getClickTarget_();if(!o)throw Error("A click target has not been set.");ef(o),this.mouseDownWrapper_=ee(o,"pointerdown",this,this.onMouseDown_)}fromXml(o){this.setValue(o.textContent)}toXml(o){return o.textContent=this.getValue(),o}saveState(o){return o=this.saveLegacyState(so),o!==null?o:this.getValue()}loadState(o){this.loadLegacyState(so,o)||this.setValue(o)}saveLegacyState(o){return o.prototype.saveState===this.saveState&&o.prototype.toXml!==this.toXml?(o=n.createElement$$module$build$src$core$utils$xml("field"),o.setAttribute("name",this.name||""),Cn(this.toXml(o)).replace(' xmlns="https://developers.google.com/blockly/xml"',"")):null}loadLegacyState(o,l){return o.prototype.loadState===this.loadState&&o.prototype.fromXml!==this.fromXml?(this.fromXml(n.textToDom$$module$build$src$core$utils$xml(l)),!0):!1}dispose(){pi(this),Ni(this);let o;(o=this.getSourceBlock())!=null&&o.isDeadOrDying()||mt(this.fieldGroup_),this.disposed=!0}updateEditable(){const o=this.fieldGroup_,l=this.getSourceBlock();this.EDITABLE&&o&&l&&(this.enabled_&&l.isEditable()?(Se(o,"blocklyEditableText"),ut(o,"blocklyNonEditableText"),o.style.cursor=this.CURSOR):(Se(o,"blocklyNonEditableText"),ut(o,"blocklyEditableText"),o.style.cursor=""))}setEnabled(o){this.enabled_=o,this.updateEditable()}isEnabled(){return this.enabled_}isClickable(){return this.enabled_&&!!this.sourceBlock_&&this.sourceBlock_.isEditable()&&this.showEditor_!==so.prototype.showEditor_}isClickableInFlyout(o){return!o}isCurrentlyEditable(){return this.enabled_&&this.EDITABLE&&!!this.sourceBlock_&&this.sourceBlock_.isEditable()}isSerializable(){let o=!1;return this.name&&(this.SERIALIZABLE?o=!0:this.EDITABLE&&(console.warn("Detected an editable field that was not serializable. Please define SERIALIZABLE property as true on all editable custom fields. Proceeding with serialization."),o=!0)),o}isVisible(){return this.visible_}setVisible(o){if(this.visible_!==o){this.visible_=o;var l=this.fieldGroup_;l&&(l.style.display=o?"block":"none")}}setValidator(o){this.validator_=o}getValidator(){return this.validator_}getSvgRoot(){return this.fieldGroup_}getBorderRect(){if(!this.borderRect_)throw Error(`The border rectangle is ${this.borderRect_}.`);return this.borderRect_}getTextElement(){if(!this.textElement_)throw Error(`The text element is ${this.textElement_}.`);return this.textElement_}getTextContent(){if(!this.textContent_)throw Error(`The text content is ${this.textContent_}.`);return this.textContent_}applyColour(){}render_(){this.textContent_&&(this.textContent_.nodeValue=this.getDisplayText_()),this.updateSize_()}showEditor(o){this.isClickable()&&this.showEditor_(o)}showEditor_(o){}repositionForWindowResize(){return!1}updateSize_(o){const l=this.getConstants();o=o!==void 0?o:this.isFullBlockField()?0:this.getConstants().FIELD_BORDER_RECT_X_PADDING;let d=2*o,m=l.FIELD_TEXT_HEIGHT,$=0;this.textElement_&&($=Fe(this.textElement_,l.FIELD_TEXT_FONTSIZE,l.FIELD_TEXT_FONTWEIGHT,l.FIELD_TEXT_FONTFAMILY),d+=$),this.isFullBlockField()||(m=Math.max(m,l.FIELD_BORDER_RECT_HEIGHT)),this.size_.height=m,this.size_.width=d,this.positionTextElement_(o,$),this.positionBorderRect_()}positionTextElement_(o,l){if(this.textElement_){var d=this.getConstants(),m=this.size_.height/2,$;this.textElement_.setAttribute("x",String(($=this.getSourceBlock())!=null&&$.RTL?this.size_.width-l-o:o)),this.textElement_.setAttribute("y",String(d.FIELD_TEXT_BASELINE_CENTER?m:m-d.FIELD_TEXT_HEIGHT/2+d.FIELD_TEXT_BASELINE))}}positionBorderRect_(){this.borderRect_&&(this.borderRect_.setAttribute("width",String(this.size_.width)),this.borderRect_.setAttribute("height",String(this.size_.height)),this.borderRect_.setAttribute("rx",String(this.getConstants().FIELD_BORDER_RECT_RADIUS)),this.borderRect_.setAttribute("ry",String(this.getConstants().FIELD_BORDER_RECT_RADIUS)))}getSize(){return this.isVisible()?(this.isDirty_?(this.render_(),this.isDirty_=!1):this.visible_&&this.size_.width===0&&(this.render_(),this.size_.width!==0&&console.warn("Deprecated use of setting size_.width to 0 to rerender a field. Set field.isDirty_ to true instead.")),this.size_):new Ko(0,0)}getScaledBBox(){let o;var l=this.getSourceBlock();if(!l)throw new Go;if(this.isFullBlockField()){var d=this.sourceBlock_.getHeightWidth();const m=l.workspace.scale;o=this.getAbsoluteXY_(),l=(d.width+1)*m,d=(d.height+1)*m,Gb?(o.x+=1.5*m,o.y+=1.5*m):(o.x-=.5*m,o.y-=.5*m)}else d=this.borderRect_.getBoundingClientRect(),o=Ln(this.borderRect_),l=d.width,d=d.height;return new Po(o.y,o.y+d,o.x,o.x+l)}onLocationChange(o){}getDisplayText_(){let o=this.getText();return o?(o.length>this.maxDisplayLength&&(o=o.substring(0,this.maxDisplayLength-2)+"…"),o=o.replace(/\s/g,so.NBSP),this.sourceBlock_&&this.sourceBlock_.RTL&&(o+="‏"),o):so.NBSP}getText(){const o=this.getText_();return String(o!==null?o:this.getValue())}getText_(){return null}markDirty(){this.isDirty_=!0,this.constants_=null}forceRerender(){this.isDirty_=!0,this.sourceBlock_&&this.sourceBlock_.rendered&&(this.sourceBlock_.queueRender(),this.sourceBlock_.bumpNeighbours())}setValue(o,l=!0){if(o!==null){var d=this.doClassValidation_(o);if(o=this.processValidation_(o,d),!(o instanceof Error)){var m;d=(m=this.getValidator())==null?void 0:m.call(this,o),m=this.processValidation_(o,d),m instanceof Error||(o=this.sourceBlock_,o&&o.disposed||(d=this.getValue(),d===m?this.doValueUpdate_(m):(this.doValueUpdate_(m),l&&o&&he()&&J(new(Ae(n.CHANGE$$module$build$src$core$events$utils))(o,"field",this.name||null,d,m)),this.isDirty_&&this.forceRerender())))}}}processValidation_(o,l){return l===null?(this.doValueInvalid_(o),this.isDirty_&&this.forceRerender(),Error()):l===void 0?o:l}getValue(){return this.value_}doClassValidation_(o){return o??null}doValueUpdate_(o){this.value_=o,this.isDirty_=!0}doValueInvalid_(o){}onMouseDown_(o){this.sourceBlock_&&!this.sourceBlock_.isDeadOrDying()&&(o=this.sourceBlock_.workspace.getGesture(o))&&o.setStartField(this)}setTooltip(o){o||o===""||(o=this.sourceBlock_);const l=this.getClickTarget_();l?l.tooltip=o:this.tooltip_=o}getTooltip(){const o=this.getClickTarget_();return fl(o||{tooltip:this.tooltip_})}getClickTarget_(){return this.clickTarget_||this.getSvgRoot()}getAbsoluteXY_(){return Ln(this.getClickTarget_())}referencesVariables(){return!1}refreshVariableName(){}getParentInput(){let o=null;const l=this.getSourceBlock();if(!l)throw new Go;const d=l.inputList;for(let m=0;m<l.inputList.length;m++){const $=d[m],V=$.fieldRow;for(let Ee=0;Ee<V.length;Ee++)if(V[Ee]===this){o=$;break}}return o}getFlipRtl(){return!1}isTabNavigable(){return!1}onShortcut(o){return!1}setCursorSvg(o){if(o){if(!this.fieldGroup_)throw Error(`The field group is ${this.fieldGroup_}.`);this.fieldGroup_.appendChild(o),this.cursorSvg_=o}else this.cursorSvg_=null}setMarkerSvg(o){if(o){if(!this.fieldGroup_)throw Error(`The field group is ${this.fieldGroup_}.`);this.fieldGroup_.appendChild(o),this.markerSvg_=o}else this.markerSvg_=null}updateMarkers_(){var o=this.getSourceBlock();if(!o)throw new Go;o=o.workspace,o.keyboardAccessibilityMode&&this.cursorSvg_&&o.getCursor().draw(),o.keyboardAccessibilityMode&&this.markerSvg_&&o.getMarker(Qi.LOCAL_MARKER).draw()}};so.NBSP=" ",so.SKIP_SETUP=Symbol("SKIP_SETUP");var Go=class extends Error{constructor(){super("The field has not yet been attached to its input. Call appendField to attach it.")}};n.Names$$module$build$src$core$names=class{constructor(o,l){this.db=new Map,this.dbReverse=new Set,this.variableMap=null,this.variablePrefix=l||"",this.reservedWords=new Set(o?o.split(","):[])}reset(){this.db.clear(),this.dbReverse.clear(),this.variableMap=null}setVariableMap(o){this.variableMap=o}getNameForUserVariable(o){return this.variableMap?(o=this.variableMap.getVariableById(o))?o.name:null:(console.warn(`Deprecated call to Names.prototype.getName without defining a variable map. To fix, add the following code in your generator's init() function:
  468. Blockly.YourGeneratorName.nameDB_.setVariableMap(workspace.getVariableMap());`),null)}populateVariables(o){o=n.allUsedVarModels$$module$build$src$core$variables(o);for(let l=0;l<o.length;l++)this.getName(o[l].getId(),n.NameType$$module$build$src$core$names.VARIABLE)}populateProcedures(o){throw Error("The implementation of populateProcedures should be monkey-patched in by blockly.ts")}getName(o,l){let d=o;l===n.NameType$$module$build$src$core$names.VARIABLE&&(o=this.getNameForUserVariable(o))&&(d=o),o=d.toLowerCase();const m=l===n.NameType$$module$build$src$core$names.VARIABLE||l===n.NameType$$module$build$src$core$names.DEVELOPER_VARIABLE?this.variablePrefix:"";this.db.has(l)||this.db.set(l,new Map);const $=this.db.get(l);return $.has(o)?m+$.get(o):(l=this.getDistinctName(d,l),$.set(o,l.substr(m.length)),l)}getUserNames(o){let l;return(o=(l=this.db.get(o))==null?void 0:l.keys())?Array.from(o):[]}getDistinctName(o,l){o=this.safeName(o);let d=null,m,$;for(;this.dbReverse.has(o+((m=d)!=null?m:""))||this.reservedWords.has(o+(($=d)!=null?$:""));)d=d?d+1:2;let V;return o+=(V=d)!=null?V:"",this.dbReverse.add(o),(l===n.NameType$$module$build$src$core$names.VARIABLE||l===n.NameType$$module$build$src$core$names.DEVELOPER_VARIABLE?this.variablePrefix:"")+o}safeName(o){return o?(o=encodeURI(o.replace(/ /g,"_")).replace(/[^\w]/g,"_"),"0123456789".indexOf(o[0])!==-1&&(o="my_"+o)):o=n.Msg$$module$build$src$core$msg.UNNAMED_KEY||"unnamed",o}static equals(o,l){return o.toLowerCase()===l.toLowerCase()}},function(o){o=o.NameType||(o.NameType={}),o.DEVELOPER_VARIABLE="DEVELOPER_VARIABLE",o.VARIABLE="VARIABLE",o.PROCEDURE="PROCEDURE"}(n.Names$$module$build$src$core$names||(n.Names$$module$build$src$core$names={})),n.NameType$$module$build$src$core$names=n.Names$$module$build$src$core$names.NameType,n.Names$$module$build$src$core$names.DEVELOPER_VARIABLE_TYPE=n.NameType$$module$build$src$core$names.DEVELOPER_VARIABLE,n.NameType$$module$build$src$core$names,n.Names$$module$build$src$core$names;var pT=class extends Map{constructor(){super()}set(o,l){return this.get(o)===l?this:(super.set(o,l),we(l)&&l.startPublishing(),this)}delete(o){const l=this.get(o);return o=super.delete(o),o&&(we(l)&&l.stopPublishing(),o)}clear(){if(this.size)for(const o of this.keys())this.delete(o)}add(o){return this.set(o.getId(),o)}getProcedures(){return[...this.values()]}},gT=class{constructor(o){this.sourceBlock=o,this.offsetInBlock=new zt(0,0),this.workspaceLocation=new zt(0,0),this.svgRoot=null,this.tooltip=o}getType(){throw Error("Icons must implement getType")}initView(o){if(!this.svgRoot){var l=this.sourceBlock;this.svgRoot=Ne(st.G,{class:"blocklyIconGroup"}),l.getSvgRoot().appendChild(this.svgRoot),this.updateSvgRootOffset(),ee(this.svgRoot,"pointerdown",this,o),this.svgRoot.tooltip=this,ef(this.svgRoot)}}dispose(){m_(this.svgRoot),mt(this.svgRoot)}getWeight(){return-1}getSize(){return new Ko(0,0)}setTooltip(o){this.tooltip=o??this.sourceBlock}getTooltip(){return this.tooltip}applyColour(){}updateEditable(){}updateCollapsed(){this.svgRoot&&(this.sourceBlock.isCollapsed()?this.svgRoot.style.display="none":this.svgRoot.style.display="block",cu(this)&&this.setBubbleVisible(!1))}hideForInsertionMarker(){this.svgRoot&&(this.svgRoot.style.display="none")}isShownWhenCollapsed(){return!1}setOffsetInBlock(o){this.offsetInBlock=o,this.updateSvgRootOffset()}updateSvgRootOffset(){let o;(o=this.svgRoot)==null||o.setAttribute("transform",`translate(${this.offsetInBlock.x}, ${this.offsetInBlock.y})`)}onLocationChange(o){this.workspaceLocation=zt.sum(o,this.offsetInBlock)}onClick(){}isClickableInFlyout(o){return!0}setVisible(o){ct("setVisible","v10","v11","setBubbleVisible"),cu(this)&&this.setBubbleVisible(o)}},Ba={fromJsonInternal:Hr},Pg={TEST_ONLY:Ba};Pg.fromJson=n.fromJson$$module$build$src$core$field_registry,Pg.register=si,Pg.unregister=Zp;var Yr=class extends so{constructor(o,l,d){super(so.SKIP_SETUP),this.svgArrow=this.arrow=this.imageElement=this.menu_=this.selectedMenuItem=null,this.SERIALIZABLE=!0,this.CURSOR="default",this.clickTarget_=this.suffixField=this.prefixField=this.generatedOptions=null,o!==so.SKIP_SETUP&&(Array.isArray(o)?(fb(o),o=ao(o),this.menuGenerator_=o.options,this.prefixField=o.prefix||null,this.suffixField=o.suffix||null):this.menuGenerator_=o,this.selectedOption=this.getOptions(!1)[0],d&&this.configure_(d),this.setValue(this.selectedOption[1]),l&&this.setValidator(l))}fromXml(o){this.isOptionListDynamic()&&this.getOptions(!1),this.setValue(o.textContent)}loadState(o){this.loadLegacyState(Yr,o)||(this.isOptionListDynamic()&&this.getOptions(!1),this.setValue(o))}initView(){this.shouldAddBorderRect_()?this.createBorderRect_():this.clickTarget_=this.sourceBlock_.getSvgRoot(),this.createTextElement_(),this.imageElement=Ne(st.IMAGE,{},this.fieldGroup_),this.getConstants().FIELD_DROPDOWN_SVG_ARROW?this.createSVGArrow_():this.createTextArrow_(),this.borderRect_&&Se(this.borderRect_,"blocklyDropdownRect")}shouldAddBorderRect_(){let o;return!this.getConstants().FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW||this.getConstants().FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW&&!((o=this.getSourceBlock())!=null&&o.isShadow())}createTextArrow_(){this.arrow=Ne(st.TSPAN,{},this.textElement_);let o;this.arrow.appendChild(document.createTextNode((o=this.getSourceBlock())!=null&&o.RTL?Yr.ARROW_CHAR+" ":" "+Yr.ARROW_CHAR));let l;(l=this.getSourceBlock())!=null&&l.RTL?this.getTextElement().insertBefore(this.arrow,this.textContent_):this.getTextElement().appendChild(this.arrow)}createSVGArrow_(){this.svgArrow=Ne(st.IMAGE,{height:this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE+"px",width:this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE+"px"},this.fieldGroup_),this.svgArrow.setAttributeNS(Xr,"xlink:href",this.getConstants().FIELD_DROPDOWN_SVG_ARROW_DATAURI)}showEditor_(o){var l=this.getSourceBlock();if(!l)throw new Go;this.dropdownCreate(),this.menu_.openingCoords=o&&typeof o.clientX=="number"?new zt(o.clientX,o.clientY):null,h_(),o=this.menu_.render(Xh()),Se(o,"blocklyDropdownMenu"),this.getConstants().FIELD_DROPDOWN_COLOURED_DIV&&(l=l.getColour(),f_(l,this.sourceBlock_.style.colourTertiary)),lt(this,this.dropdownDispose_.bind(this)),this.menu_.focus(),this.selectedMenuItem&&(this.menu_.setHighlighted(this.selectedMenuItem),xo(this.selectedMenuItem.getElement(),Xh(),!0)),this.applyColour()}dropdownCreate(){const o=this.getSourceBlock();if(!o)throw new Go;const l=new dO;l.setRole(Er.LISTBOX),this.menu_=l;const d=this.getOptions(!1);this.selectedMenuItem=null;for(let $=0;$<d.length;$++){const[V,Ee]=d[$];if(typeof V=="object"){var m=new Image(V.width,V.height);m.src=V.src,m.alt=V.alt||""}else m=V;m=new Tf(m,Ee),m.setRole(Er.OPTION),m.setRightToLeft(o.RTL),m.setCheckable(!0),l.addChild(m),m.setChecked(Ee===this.value_),Ee===this.value_&&(this.selectedMenuItem=m),m.onAction(this.handleMenuActionEvent,this)}}dropdownDispose_(){this.menu_&&this.menu_.dispose(),this.selectedMenuItem=this.menu_=null,this.applyColour()}handleMenuActionEvent(o){pi(this,!0),this.onItemSelected_(this.menu_,o)}onItemSelected_(o,l){this.setValue(l.getValue())}isOptionListDynamic(){return typeof this.menuGenerator_=="function"}getOptions(o){if(!this.menuGenerator_)throw TypeError("A menu generator was never defined.");return Array.isArray(this.menuGenerator_)?this.menuGenerator_:o&&this.generatedOptions?this.generatedOptions:(this.generatedOptions=this.menuGenerator_(),fb(this.generatedOptions),this.generatedOptions)}doClassValidation_(o){return this.getOptions(!0).some(l=>l[1]===o)?o:(this.sourceBlock_&&console.warn("Cannot set the dropdown's value to an unavailable option. Block type: "+this.sourceBlock_.type+", Field name: "+this.name+", Value: "+o),null)}doValueUpdate_(o){super.doValueUpdate_(o),o=this.getOptions(!0);for(let l=0,d;d=o[l];l++)d[1]===this.value_&&(this.selectedOption=d)}applyColour(){const o=this.sourceBlock_.style;this.borderRect_&&(this.borderRect_.setAttribute("stroke",o.colourTertiary),this.menu_?this.borderRect_.setAttribute("fill",o.colourTertiary):this.borderRect_.setAttribute("fill","transparent")),this.sourceBlock_&&this.arrow&&(this.sourceBlock_.isShadow()?this.arrow.style.fill=o.colourSecondary:this.arrow.style.fill=o.colourPrimary)}render_(){this.getTextContent().nodeValue="",this.imageElement.style.display="none";const o=this.selectedOption&&this.selectedOption[0];o&&typeof o=="object"?this.renderSelectedImage(o):this.renderSelectedText(),this.positionBorderRect_()}renderSelectedImage(o){const l=this.getSourceBlock();if(!l)throw new Go;this.imageElement.style.display="",this.imageElement.setAttributeNS(Xr,"xlink:href",o.src),this.imageElement.setAttribute("height",String(o.height)),this.imageElement.setAttribute("width",String(o.width));const d=Number(o.height);o=Number(o.width);var m=!!this.borderRect_;const $=Math.max(m?this.getConstants().FIELD_DROPDOWN_BORDER_RECT_HEIGHT:0,d+As);m=m?this.getConstants().FIELD_BORDER_RECT_X_PADDING:0;let V;V=this.svgArrow?this.positionSVGArrow(o+m,$/2-this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE/2):Fe(this.arrow,this.getConstants().FIELD_TEXT_FONTSIZE,this.getConstants().FIELD_TEXT_FONTWEIGHT,this.getConstants().FIELD_TEXT_FONTFAMILY),this.size_.width=o+V+2*m,this.size_.height=$;let Ee=0;l.RTL?this.imageElement.setAttribute("x",`${m+V}`):(Ee=o+V,this.getTextElement().setAttribute("text-anchor","end"),this.imageElement.setAttribute("x",`${m}`)),this.imageElement.setAttribute("y",String($/2-d/2)),this.positionTextElement_(Ee+m,o+V)}renderSelectedText(){this.getTextContent().nodeValue=this.getDisplayText_();var o=this.getTextElement();Se(o,"blocklyDropdownText"),o.setAttribute("text-anchor","start");var l=!!this.borderRect_;o=Math.max(l?this.getConstants().FIELD_DROPDOWN_BORDER_RECT_HEIGHT:0,this.getConstants().FIELD_TEXT_HEIGHT);const d=Fe(this.getTextElement(),this.getConstants().FIELD_TEXT_FONTSIZE,this.getConstants().FIELD_TEXT_FONTWEIGHT,this.getConstants().FIELD_TEXT_FONTFAMILY);l=l?this.getConstants().FIELD_BORDER_RECT_X_PADDING:0;let m=0;this.svgArrow&&(m=this.positionSVGArrow(d+l,o/2-this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE/2)),this.size_.width=d+m+2*l,this.size_.height=o,this.positionTextElement_(l,d)}positionSVGArrow(o,l){if(!this.svgArrow)return 0;const d=this.getSourceBlock();if(!d)throw new Go;const m=this.borderRect_?this.getConstants().FIELD_BORDER_RECT_X_PADDING:0,$=this.getConstants().FIELD_DROPDOWN_SVG_ARROW_PADDING,V=this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE;return this.svgArrow.setAttribute("transform","translate("+(d.RTL?m:o+$)+","+l+")"),V+$}getText_(){if(!this.selectedOption)return null;const o=this.selectedOption[0];return typeof o=="object"?o.alt:o}static fromJson(o){if(!o.options)throw Error("options are required for the dropdown field. The options property must be assigned an array of [humanReadableValue, languageNeutralValue] tuples.");return new this(o.options,void 0,o)}};Yr.CHECKMARK_OVERHANG=25,Yr.MAX_MENU_HEIGHT_VH=.45,Yr.ARROW_CHAR="▾";var Ss=5,As=2*Ss;si("field_dropdown",Yr);var br,Ao=class{constructor(o,l,d){this.workspace=o,this.anchor=l,this.ownerRect=d,this.size=new Ko(0,0),this.colour="#ffffff",this.disposed=!1,this.relativeLeft=this.relativeTop=0,this.svgRoot=Ne(st.G,{},o.getBubbleCanvas()),o=Ne(st.G,{filter:`url(#${this.workspace.getRenderer().getConstants().embossFilterId})`},this.svgRoot),this.tail=Ne(st.PATH,{},o),this.background=Ne(st.RECT,{class:"blocklyDraggable",x:0,y:0,rx:br.BORDER_WIDTH,ry:br.BORDER_WIDTH},o),this.contentContainer=Ne(st.G,{},this.svgRoot),ee(this.background,"pointerdown",this,this.onMouseDown)}dispose(){mt(this.svgRoot),this.disposed=!0}setAnchorLocation(o,l=!1){this.anchor=o,l?this.positionByRect(this.ownerRect):this.positionRelativeToAnchor(),this.renderTail()}setPositionRelativeToAnchor(o,l){this.relativeLeft=o,this.relativeTop=l,this.positionRelativeToAnchor(),this.renderTail()}getSize(){return this.size}setSize(o,l=!1){o.width=Math.max(o.width,br.MIN_SIZE),o.height=Math.max(o.height,br.MIN_SIZE),this.size=o,this.background.setAttribute("width",`${o.width}`),this.background.setAttribute("height",`${o.height}`),l?this.positionByRect(this.ownerRect):this.positionRelativeToAnchor(),this.renderTail()}getColour(){return this.colour}setColour(o){this.colour=o,this.tail.setAttribute("fill",o),this.background.setAttribute("fill",o)}onMouseDown(o){let l;(l=this.workspace.getGesture(o))==null||l.handleBubbleStart(o,this)}positionRelativeToAnchor(){let o=this.anchor.x;o=this.workspace.RTL?o-(this.relativeLeft+this.size.width):o+this.relativeLeft,this.moveTo(o,this.relativeTop+this.anchor.y)}moveTo(o,l){this.svgRoot.setAttribute("transform",`translate(${o}, ${l})`)}positionByRect(o=new Po(0,0,0,0)){var l=this.workspace.getMetricsManager().getViewMetrics(!0),d=this.getOptimalRelativeLeft(l),m=this.getOptimalRelativeTop(l);const $={x:d,y:-this.size.height-this.workspace.getRenderer().getConstants().MIN_BLOCK_HEIGHT},V={x:-this.size.width-30,y:m};m={x:o.getWidth(),y:m};var Ee={x:d,y:o.getHeight()};d=o.getWidth()<o.getHeight()?m:Ee,o=o.getWidth()<o.getHeight()?Ee:m,m=this.getOverlap($,l),Ee=this.getOverlap(V,l);const Ve=this.getOverlap(d,l);l=this.getOverlap(o,l),l=Math.max(m,Ee,Ve,l),m===l?(this.relativeLeft=$.x,this.relativeTop=$.y):Ee===l?(this.relativeLeft=V.x,this.relativeTop=V.y):Ve===l?(this.relativeLeft=d.x,this.relativeTop=d.y):(this.relativeLeft=o.x,this.relativeTop=o.y),this.positionRelativeToAnchor()}getOverlap(o,l){var d=this.workspace.RTL?this.anchor.x-o.x-this.size.width:o.x+this.anchor.x;return o=o.y+this.anchor.y,Math.max(0,Math.min(1,(Math.min(d+this.size.width,l.left+l.width)-Math.max(d,l.left))*(Math.min(o+this.size.height,l.top+l.height)-Math.max(o,l.top))/(this.size.width*this.size.height)))}getOptimalRelativeLeft(o){let l=-this.size.width/4;if(this.size.width>o.width)return l;if(o=this.getWorkspaceViewRect(o),this.workspace.RTL){var d=this.anchor.x-l;d-this.size.width<o.left?l=-(o.left-this.anchor.x+this.size.width):d>o.right&&(l=-(o.right-this.anchor.x))}else{d=l+this.anchor.x;const m=d+this.size.width;d<o.left?l=o.left-this.anchor.x:m>o.right&&(l=o.right-this.anchor.x-this.size.width)}return l}getOptimalRelativeTop(o){let l=-this.size.height/4;if(this.size.height>o.height)return l;const d=this.anchor.y+l,m=d+this.size.height;return o=this.getWorkspaceViewRect(o),d<o.top?l=o.top-this.anchor.y:m>o.bottom&&(l=o.bottom-this.anchor.y-this.size.height),l}getWorkspaceViewRect(o){const l=o.top;let d=o.top+o.height,m=o.left;return o=o.left+o.width,d-=this.getScrollbarThickness(),this.workspace.RTL?m-=this.getScrollbarThickness():o-=this.getScrollbarThickness(),new Po(l,d,m,o)}getScrollbarThickness(){return Ms.scrollbarThickness/this.workspace.scale}renderTail(){const o=[];var l=this.size.width/2,d=this.size.height/2,m=-this.relativeLeft,$=-this.relativeTop;if(l===m&&d===$)o.push("M "+l+","+d);else{$-=d,m-=l,this.workspace.RTL&&(m*=-1);var V=Math.sqrt($*$+m*m),Ee=Math.acos(m/V);0>$&&(Ee=2*Math.PI-Ee);var Ve=Ee+Math.PI/2;Ve>2*Math.PI&&(Ve-=2*Math.PI);var St=Math.sin(Ve);const cs=Math.cos(Ve);let ts=(this.size.width+this.size.height)/br.TAIL_THICKNESS;ts=Math.min(ts,this.size.width,this.size.height)/4,Ve=1-br.ANCHOR_RADIUS/V,m=l+Ve*m,$=d+Ve*$,Ve=l+ts*cs;const Rl=d+ts*St;l-=ts*cs,d-=ts*St,St=Wh(this.workspace.RTL?-br.TAIL_ANGLE:br.TAIL_ANGLE),St=Ee+St,St>2*Math.PI&&(St-=2*Math.PI),Ee=Math.sin(St)*V/br.TAIL_BEND,V=Math.cos(St)*V/br.TAIL_BEND,o.push("M"+Ve+","+Rl),o.push("C"+(Ve+V)+","+(Rl+Ee)+" "+m+","+$+" "+m+","+$),o.push("C"+m+","+$+" "+(l+V)+","+(d+Ee)+" "+l+","+d)}o.push("z");let tn;(tn=this.tail)==null||tn.setAttribute("d",o.join(" "))}bringToFront(){let o;const l=(o=this.svgRoot)==null?void 0:o.parentNode;return this.svgRoot&&(l==null?void 0:l.lastChild)!==this.svgRoot?(l==null||l.appendChild(this.svgRoot),!0):!1}getRelativeToSurfaceXY(){return new zt(this.workspace.RTL?-this.relativeLeft+this.anchor.x-this.size.width:this.anchor.x+this.relativeLeft,this.anchor.y+this.relativeTop)}getSvgRoot(){return this.svgRoot}moveDuringDrag(o){this.moveTo(o.x,o.y),this.relativeLeft=this.workspace.RTL?this.anchor.x-o.x-this.size.width:o.x-this.anchor.x,this.relativeTop=o.y-this.anchor.y,this.renderTail()}setDragging(o){}setDeleteStyle(o){}isDeletable(){return!1}showContextMenu(o){}};br=Ao,Ao.BORDER_WIDTH=6,Ao.DOUBLE_BORDER=2*br.BORDER_WIDTH,Ao.MIN_SIZE=br.DOUBLE_BORDER,Ao.TAIL_THICKNESS=1,Ao.TAIL_ANGLE=20,Ao.TAIL_BEND=4,Ao.ANCHOR_RADIUS=8;var Mc=class extends Ao{constructor(o,l,d,m){super(l,d,m),this.workspace=l,this.anchor=d,this.ownerRect=m,this.autoLayout=!0,l=new as(o),this.validateWorkspaceOptions(l),this.svgDialog=Ne(st.SVG,{x:Ao.BORDER_WIDTH,y:Ao.BORDER_WIDTH},this.contentContainer),o.parentWorkspace=this.workspace,this.miniWorkspace=this.newWorkspaceSvg(new as(o)),this.miniWorkspace.internalIsMutator=!0,o=this.miniWorkspace.createDom("blocklyMutatorBackground"),this.svgDialog.appendChild(o),l.languageTree&&(o.insertBefore(this.miniWorkspace.addFlyout(st.G),this.miniWorkspace.getCanvas()),o=this.miniWorkspace.getFlyout(),o==null||o.init(this.miniWorkspace),o==null||o.show(l.languageTree)),this.miniWorkspace.addChangeListener(this.onWorkspaceChange.bind(this));let $,V;($=this.miniWorkspace.getFlyout())==null||(V=$.getWorkspace())==null||V.addChangeListener(this.onWorkspaceChange.bind(this)),this.updateBubbleSize()}dispose(){this.miniWorkspace.dispose(),super.dispose()}getWorkspace(){return this.miniWorkspace}addWorkspaceChangeListener(o){this.miniWorkspace.addChangeListener(o)}validateWorkspaceOptions(o){if(o.hasCategories)throw Error("The miniworkspace bubble does not support toolboxes with categories");if(o.hasTrashcan)throw Error("The miniworkspace bubble does not support trashcans");if(o.zoomOptions.controls||o.zoomOptions.wheel||o.zoomOptions.pinch)throw Error("The miniworkspace bubble does not support zooming");if(o.moveOptions.scrollbars||o.moveOptions.wheel||o.moveOptions.drag)throw Error("The miniworkspace bubble does not scrolling/moving the workspace");if(o.horizontalLayout)throw Error("The miniworkspace bubble does not support horizontal layouts")}onWorkspaceChange(){this.bumpBlocksIntoBounds(),this.updateBubbleSize()}bumpBlocksIntoBounds(){if(!this.miniWorkspace.isDragging())for(const o of this.miniWorkspace.getTopBlocks(!1)){const l=o.getRelativeToSurfaceXY();if(20>l.y&&o.moveBy(0,20-l.y),o.RTL){let d=-20;const m=this.miniWorkspace.getFlyout();m&&(d-=m.getWidth()),l.x>d&&o.moveBy(d-l.x,0)}else 20>l.x&&o.moveBy(20-l.x,0)}}updateBubbleSize(){if(!this.miniWorkspace.isDragging()){var o=this.getSize(),l=this.calculateWorkspaceSize();Math.abs(o.width-l.width)<Mc.MINIMUM_VIEW_CHANGE&&Math.abs(o.height-l.height)<Mc.MINIMUM_VIEW_CHANGE||(this.svgDialog.setAttribute("width",`${l.width}px`),this.svgDialog.setAttribute("height",`${l.height}px`),this.miniWorkspace.setCachedParentSvgSize(l.width,l.height),this.miniWorkspace.RTL&&this.miniWorkspace.getCanvas().setAttribute("transform",`translate(${l.width}, 0)`),this.setSize(new Ko(l.width+Ao.DOUBLE_BORDER,l.height+Ao.DOUBLE_BORDER),this.autoLayout),this.miniWorkspace.resize(),this.miniWorkspace.recordDragTargets())}}calculateWorkspaceSize(){var o=this.miniWorkspace.getCanvas().getBBox();let l=o.width+Mc.MARGIN;o=o.height+Mc.MARGIN;const d=this.miniWorkspace.getFlyout();if(d){const m=d.getWorkspace().getMetricsManager().getScrollMetrics();o=Math.max(o,m.height+20),l+=d.getWidth()}return new Ko(l,o)}updateBlockStyles(){for(var o of this.miniWorkspace.getAllBlocks(!1))o.setStyle(o.getStyleName());let l;if(o=(l=this.miniWorkspace.getFlyout())==null?void 0:l.getWorkspace())for(const d of o.getAllBlocks(!1))d.setStyle(d.getStyleName())}moveDuringDrag(o){super.moveDuringDrag(o),this.autoLayout=!1}moveTo(o,l){super.moveTo(o,l),this.miniWorkspace.recordDragTargets()}newWorkspaceSvg(o){throw Error("The implementation of newWorkspaceSvg should be monkey-patched in by blockly.ts")}};Mc.MINIMUM_VIEW_CHANGE=10,Mc.MARGIN=3*Ao.DOUBLE_BORDER;var mT,_T;mT=17,_T=16,n.MutatorIcon$$module$build$src$core$icons$mutator_icon=class extends gT{constructor(o,l){super(l),this.flyoutBlockTypes=o,this.sourceBlock=l,this.saveConnectionsListener=this.updateWorkspacePid=this.rootBlock=this.miniWorkspaceBubble=null}getType(){return n.MutatorIcon$$module$build$src$core$icons$mutator_icon.TYPE}initView(o){this.svgRoot||(super.initView(o),Ne(st.RECT,{class:"blocklyIconShape",rx:"4",ry:"4",height:"16",width:"16"},this.svgRoot),Ne(st.PATH,{class:"blocklyIconSymbol",d:"m4.203,7.296 0,1.368 -0.92,0.677 -0.11,0.41 0.9,1.559 0.41,0.11 1.043,-0.457 1.187,0.683 0.127,1.134 0.3,0.3 1.8,0 0.3,-0.299 0.127,-1.138 1.185,-0.682 1.046,0.458 0.409,-0.11 0.9,-1.559 -0.11,-0.41 -0.92,-0.677 0,-1.366 0.92,-0.677 0.11,-0.41 -0.9,-1.559 -0.409,-0.109 -1.046,0.458 -1.185,-0.682 -0.127,-1.138 -0.3,-0.299 -1.8,0 -0.3,0.3 -0.126,1.135 -1.187,0.682 -1.043,-0.457 -0.41,0.11 -0.899,1.559 0.108,0.409z"},this.svgRoot),Ne(st.CIRCLE,{class:"blocklyIconShape",r:"2.7",cx:"8",cy:"8"},this.svgRoot),Se(this.svgRoot,"blockly-icon-mutator"))}dispose(){super.dispose();let o;(o=this.miniWorkspaceBubble)==null||o.dispose()}getWeight(){return n.MutatorIcon$$module$build$src$core$icons$mutator_icon.WEIGHT}getSize(){return new Ko(mT,mT)}applyColour(){super.applyColour();let o;(o=this.miniWorkspaceBubble)==null||o.setColour(this.sourceBlock.style.colourPrimary);let l;(l=this.miniWorkspaceBubble)==null||l.updateBlockStyles()}updateCollapsed(){super.updateCollapsed(),this.sourceBlock.isCollapsed()&&this.setBubbleVisible(!1)}onLocationChange(o){super.onLocationChange(o);let l;(l=this.miniWorkspaceBubble)==null||l.setAnchorLocation(this.getAnchorLocation())}onClick(){super.onClick(),this.sourceBlock.isEditable()&&this.setBubbleVisible(!this.bubbleIsVisible())}isClickableInFlyout(){return!1}bubbleIsVisible(){return!!this.miniWorkspaceBubble}setBubbleVisible(o){if(this.bubbleIsVisible()!==o){if(o){this.miniWorkspaceBubble=new Mc(this.getMiniWorkspaceConfig(),this.sourceBlock.workspace,this.getAnchorLocation(),this.getBubbleOwnerRect()),this.applyColour(),this.createRootBlock(),this.addSaveConnectionsListener();let l;(l=this.miniWorkspaceBubble)==null||l.addWorkspaceChangeListener(this.createMiniWorkspaceChangeListener())}else{let l;(l=this.miniWorkspaceBubble)==null||l.dispose(),this.miniWorkspaceBubble=null,this.saveConnectionsListener&&this.sourceBlock.workspace.removeChangeListener(this.saveConnectionsListener),this.saveConnectionsListener=null}J(new(Ae(Kl))(this.sourceBlock,o,"mutator"))}}getMiniWorkspaceConfig(){let o;const l={disable:!1,media:this.sourceBlock.workspace.options.pathToMedia,rtl:this.sourceBlock.RTL,renderer:this.sourceBlock.workspace.options.renderer,rendererOverrides:(o=this.sourceBlock.workspace.options.rendererOverrides)!=null?o:void 0};return this.flyoutBlockTypes.length&&(l.toolbox={kind:"flyoutToolbox",contents:this.flyoutBlockTypes.map(d=>({kind:"block",type:d}))}),l}getAnchorLocation(){const o=mT/2;return zt.sum(this.workspaceLocation,new zt(o,o))}getBubbleOwnerRect(){const o=this.sourceBlock.getSvgRoot().getBBox();return new Po(o.y,o.y+o.height,o.x,o.x+o.width)}createRootBlock(){if(!this.sourceBlock.decompose)throw Error("Blocks with mutator icons must include a decompose method");this.rootBlock=this.sourceBlock.decompose(this.miniWorkspaceBubble.getWorkspace());for(var o of this.rootBlock.getDescendants(!1))o.queueRender();this.rootBlock.setMovable(!1),this.rootBlock.setDeletable(!1);let l,d,m,$;o=($=(l=this.miniWorkspaceBubble)==null||(d=l.getWorkspace())==null||(m=d.getFlyout())==null?void 0:m.getWidth())!=null?$:0,this.rootBlock.moveBy(this.rootBlock.RTL?-(o+_T):_T,_T)}addSaveConnectionsListener(){this.sourceBlock.saveConnections&&this.rootBlock&&(this.saveConnectionsListener=()=>{this.sourceBlock.saveConnections&&this.rootBlock&&this.sourceBlock.saveConnections(this.rootBlock)},this.saveConnectionsListener(),this.sourceBlock.workspace.addChangeListener(this.saveConnectionsListener))}createMiniWorkspaceChangeListener(){return o=>{n.MutatorIcon$$module$build$src$core$icons$mutator_icon.isIgnorableMutatorEvent(o)||this.updateWorkspacePid||(this.updateWorkspacePid=setTimeout(()=>{this.updateWorkspacePid=null,this.recomposeSourceBlock()},0))}}static isIgnorableMutatorEvent(o){return o.isUiEvent||o.type===n.CREATE$$module$build$src$core$events$utils||o.type===n.CHANGE$$module$build$src$core$events$utils&&o.element==="disabled"}recomposeSourceBlock(){if(this.rootBlock){if(!this.sourceBlock.compose)throw Error("Blocks with mutator icons must include a compose method");var o=n.getGroup$$module$build$src$core$events$utils();o||n.setGroup$$module$build$src$core$events$utils(!0);var l=Qo.getExtraBlockState_(this.sourceBlock);this.sourceBlock.compose(this.rootBlock);var d=Qo.getExtraBlockState_(this.sourceBlock);l!==d&&J(new(Ae(n.CHANGE$$module$build$src$core$events$utils))(this.sourceBlock,"mutation",null,l,d)),n.setGroup$$module$build$src$core$events$utils(o)}}getWorkspace(){let o;return(o=this.miniWorkspaceBubble)==null?void 0:o.getWorkspace()}static reconnect(o,l,d){return ct("MutatorIcon.reconnect","v10","v11","connection.reconnect"),o?o.reconnect(l,d):!1}static findParentWs(o){return ct("MutatorIcon.findParentWs","v10","v11","workspace.getRootWorkspace"),o.getRootWorkspace()}},n.MutatorIcon$$module$build$src$core$icons$mutator_icon.TYPE=_r.MUTATOR,n.MutatorIcon$$module$build$src$core$icons$mutator_icon.WEIGHT=1,n.MutatorIcon$$module$build$src$core$icons$mutator_icon;var Cf=Object.create(null),fL={allExtensions:Cf};n.register$$module$build$src$core$extensions("parent_tooltip_when_inline",ya);var yl={TEST_ONLY:fL};yl.apply=T_,yl.buildTooltipForDropdown=n.buildTooltipForDropdown$$module$build$src$core$extensions,yl.buildTooltipWithFieldText=n.buildTooltipWithFieldText$$module$build$src$core$extensions,yl.isRegistered=vc,yl.register=n.register$$module$build$src$core$extensions,yl.registerMixin=n.registerMixin$$module$build$src$core$extensions,yl.registerMutator=n.registerMutator$$module$build$src$core$extensions,yl.runAfterPageLoad=pI,yl.unregister=cI;var Wn;(function(o){o[o.WIN_KEY_FF_LINUX=0]="WIN_KEY_FF_LINUX",o[o.MAC_ENTER=3]="MAC_ENTER",o[o.BACKSPACE=8]="BACKSPACE",o[o.TAB=9]="TAB",o[o.NUM_CENTER=12]="NUM_CENTER",o[o.ENTER=13]="ENTER",o[o.SHIFT=16]="SHIFT",o[o.CTRL=17]="CTRL",o[o.ALT=18]="ALT",o[o.PAUSE=19]="PAUSE",o[o.CAPS_LOCK=20]="CAPS_LOCK",o[o.ESC=27]="ESC",o[o.SPACE=32]="SPACE",o[o.PAGE_UP=33]="PAGE_UP",o[o.PAGE_DOWN=34]="PAGE_DOWN",o[o.END=35]="END",o[o.HOME=36]="HOME",o[o.LEFT=37]="LEFT",o[o.UP=38]="UP",o[o.RIGHT=39]="RIGHT",o[o.DOWN=40]="DOWN",o[o.PLUS_SIGN=43]="PLUS_SIGN",o[o.PRINT_SCREEN=44]="PRINT_SCREEN",o[o.INSERT=45]="INSERT",o[o.DELETE=46]="DELETE",o[o.ZERO=48]="ZERO",o[o.ONE=49]="ONE",o[o.TWO=50]="TWO",o[o.THREE=51]="THREE",o[o.FOUR=52]="FOUR",o[o.FIVE=53]="FIVE",o[o.SIX=54]="SIX",o[o.SEVEN=55]="SEVEN",o[o.EIGHT=56]="EIGHT",o[o.NINE=57]="NINE",o[o.FF_SEMICOLON=59]="FF_SEMICOLON",o[o.FF_EQUALS=61]="FF_EQUALS",o[o.FF_DASH=173]="FF_DASH",o[o.FF_HASH=163]="FF_HASH",o[o.QUESTION_MARK=63]="QUESTION_MARK",o[o.AT_SIGN=64]="AT_SIGN",o[o.A=65]="A",o[o.B=66]="B",o[o.C=67]="C",o[o.D=68]="D",o[o.E=69]="E",o[o.F=70]="F",o[o.G=71]="G",o[o.H=72]="H",o[o.I=73]="I",o[o.J=74]="J",o[o.K=75]="K",o[o.L=76]="L",o[o.M=77]="M",o[o.N=78]="N",o[o.O=79]="O",o[o.P=80]="P",o[o.Q=81]="Q",o[o.R=82]="R",o[o.S=83]="S",o[o.T=84]="T",o[o.U=85]="U",o[o.V=86]="V",o[o.W=87]="W",o[o.X=88]="X",o[o.Y=89]="Y",o[o.Z=90]="Z",o[o.META=91]="META",o[o.WIN_KEY_RIGHT=92]="WIN_KEY_RIGHT",o[o.CONTEXT_MENU=93]="CONTEXT_MENU",o[o.NUM_ZERO=96]="NUM_ZERO",o[o.NUM_ONE=97]="NUM_ONE",o[o.NUM_TWO=98]="NUM_TWO",o[o.NUM_THREE=99]="NUM_THREE",o[o.NUM_FOUR=100]="NUM_FOUR",o[o.NUM_FIVE=101]="NUM_FIVE",o[o.NUM_SIX=102]="NUM_SIX",o[o.NUM_SEVEN=103]="NUM_SEVEN",o[o.NUM_EIGHT=104]="NUM_EIGHT",o[o.NUM_NINE=105]="NUM_NINE",o[o.NUM_MULTIPLY=106]="NUM_MULTIPLY",o[o.NUM_PLUS=107]="NUM_PLUS",o[o.NUM_MINUS=109]="NUM_MINUS",o[o.NUM_PERIOD=110]="NUM_PERIOD",o[o.NUM_DIVISION=111]="NUM_DIVISION",o[o.F1=112]="F1",o[o.F2=113]="F2",o[o.F3=114]="F3",o[o.F4=115]="F4",o[o.F5=116]="F5",o[o.F6=117]="F6",o[o.F7=118]="F7",o[o.F8=119]="F8",o[o.F9=120]="F9",o[o.F10=121]="F10",o[o.F11=122]="F11",o[o.F12=123]="F12",o[o.NUMLOCK=144]="NUMLOCK",o[o.SCROLL_LOCK=145]="SCROLL_LOCK",o[o.FIRST_MEDIA_KEY=166]="FIRST_MEDIA_KEY",o[o.LAST_MEDIA_KEY=183]="LAST_MEDIA_KEY",o[o.SEMICOLON=186]="SEMICOLON",o[o.DASH=189]="DASH",o[o.EQUALS=187]="EQUALS",o[o.COMMA=188]="COMMA",o[o.PERIOD=190]="PERIOD",o[o.SLASH=191]="SLASH",o[o.APOSTROPHE=192]="APOSTROPHE",o[o.TILDE=192]="TILDE",o[o.SINGLE_QUOTE=222]="SINGLE_QUOTE",o[o.OPEN_SQUARE_BRACKET=219]="OPEN_SQUARE_BRACKET",o[o.BACKSLASH=220]="BACKSLASH",o[o.CLOSE_SQUARE_BRACKET=221]="CLOSE_SQUARE_BRACKET",o[o.WIN_KEY=224]="WIN_KEY",o[o.MAC_FF_META=224]="MAC_FF_META",o[o.MAC_WK_CMD_LEFT=91]="MAC_WK_CMD_LEFT",o[o.MAC_WK_CMD_RIGHT=93]="MAC_WK_CMD_RIGHT",o[o.WIN_IME=229]="WIN_IME",o[o.VK_NONAME=252]="VK_NONAME",o[o.PHANTOM=255]="PHANTOM"})(Wn||(Wn={}));var Zl={};Zl.arc=Cs,Zl.curve=fr,Zl.line=ml,Zl.lineOnAxis=ln,Zl.lineTo=$a,Zl.moveBy=Zo,Zl.moveTo=Qs,Zl.point=Sn;var gs={};gs.Coordinate=zt,gs.KeyCodes=Wn,gs.Rect=Po,gs.Size=Ko,gs.Svg=st,gs.aria=_f,gs.array=K_,gs.browserEvents=vl,gs.colour=Sl,gs.deprecation=Wb,gs.dom=Bs,gs.extensions=yl,gs.idGenerator=U_,gs.math=lT,gs.object=o0,gs.parsing=Ng,gs.string=Ou,gs.style=bl,gs.svgMath=Ld,gs.svgPaths=Zl,gs.toolbox=vi,gs.userAgent=Y_,gs.xml=Tu;var TT={};TT.register=Vr,TT.unregister=mI;var Mf=class extends Ao{constructor(o,l,d,m){super(l,d,m),this.text=o,this.workspace=l,this.anchor=d,this.ownerRect=m,this.paragraph=this.stringToSvg(o,this.contentContainer),this.updateBubbleSize()}getText(){return this.text}setText(o){this.text=o,mt(this.paragraph),this.paragraph=this.stringToSvg(o,this.contentContainer),this.updateBubbleSize()}stringToSvg(o,l){return l=this.createParagraph(l),o=this.createSpans(l,o),this.workspace.RTL&&this.rightAlignSpans(l.getBBox().width,o),l}createParagraph(o){return Ne(st.TEXT,{class:"blocklyText blocklyBubbleText blocklyNoPointerEvents",y:Ao.BORDER_WIDTH},o)}createSpans(o,l){return l.split(`
  469. `).map(d=>{const m=Ne(st.TSPAN,{dy:"1em",x:Ao.BORDER_WIDTH},o);return d=document.createTextNode(d),m.appendChild(d),m})}rightAlignSpans(o,l){for(const d of l)d.setAttribute("text-anchor","end"),d.setAttribute("x",`${o+Ao.BORDER_WIDTH}`)}updateBubbleSize(){const o=this.paragraph.getBBox();this.setSize(new Ko(o.width+2*Ao.BORDER_WIDTH,o.height+2*Ao.BORDER_WIDTH),!0)}},Or=class extends Ao{constructor(o,l,d){super(o,l,d),this.workspace=o,this.anchor=l,this.ownerRect=d,this.resizePointerMoveListener=this.resizePointerUpListener=null,this.textChangeListeners=[],this.sizeChangeListeners=[],this.text="",this.DEFAULT_SIZE=new Ko(160+Ao.DOUBLE_BORDER,80+Ao.DOUBLE_BORDER),this.MIN_SIZE=new Ko(45+Ao.DOUBLE_BORDER,20+Ao.DOUBLE_BORDER),{inputRoot:this.inputRoot,textArea:this.textArea}=this.createEditor(this.contentContainer),this.resizeGroup=this.createResizeHandle(this.svgRoot),this.setSize(this.DEFAULT_SIZE,!0)}getText(){return this.text}setText(o){this.text=o,this.textArea.value=o,this.onTextChange()}addTextChangeListener(o){this.textChangeListeners.push(o)}addSizeChangeListener(o){this.sizeChangeListeners.push(o)}createEditor(o){o=Ne(st.FOREIGNOBJECT,{x:Ao.BORDER_WIDTH,y:Ao.BORDER_WIDTH},o);const l=document.createElementNS(Ql,"body");l.setAttribute("xmlns",Ql),l.className="blocklyMinimalBody";const d=document.createElementNS(Ql,"textarea");return d.className="blocklyCommentTextarea",d.setAttribute("dir",this.workspace.RTL?"RTL":"LTR"),l.appendChild(d),o.appendChild(l),this.bindTextAreaEvents(d),setTimeout(()=>{d.focus()},0),{inputRoot:o,textArea:d}}bindTextAreaEvents(o){ee(o,"wheel",this,l=>{l.stopPropagation()}),ee(o,"focus",this,this.onStartEdit,!0),ee(o,"change",this,this.onTextChange)}createResizeHandle(o){o=Ne(st.G,{class:this.workspace.RTL?"blocklyResizeSW":"blocklyResizeSE"},o);const l=2*Ao.BORDER_WIDTH;return Ne(st.POLYGON,{points:`0,${l} ${l},${l} ${l},0`},o),Ne(st.LINE,{class:"blocklyResizeLine",x1:l/3,y1:l-1,x2:l-1,y2:l/3},o),Ne(st.LINE,{class:"blocklyResizeLine",x1:2*l/3,y1:l-1,x2:l-1,y2:2*l/3},o),ee(o,"pointerdown",this,this.onResizePointerDown),o}setSize(o,l=!1){o.width=Math.max(o.width,this.MIN_SIZE.width),o.height=Math.max(o.height,this.MIN_SIZE.height);const d=o.width-Ao.DOUBLE_BORDER,m=o.height-Ao.DOUBLE_BORDER;this.inputRoot.setAttribute("width",`${d}`),this.inputRoot.setAttribute("height",`${m}`),this.textArea.style.width=`${d-4}px`,this.textArea.style.height=`${m-4}px`,this.workspace.RTL?this.resizeGroup.setAttribute("transform",`translate(${Ao.DOUBLE_BORDER}, ${m}) scale(-1 1)`):this.resizeGroup.setAttribute("transform",`translate(${d}, ${m})`),super.setSize(o,l),this.onSizeChange()}getSize(){return super.getSize()}onResizePointerDown(o){this.bringToFront(),Ze(o)||(this.workspace.startDrag(o,new zt(this.workspace.RTL?-this.getSize().width:this.getSize().width,this.getSize().height)),this.resizePointerUpListener=ee(document,"pointerup",this,this.onResizePointerUp),this.resizePointerMoveListener=ee(document,"pointermove",this,this.onResizePointerMove),this.workspace.hideChaff()),o.stopPropagation()}onResizePointerUp(o){Pe(),this.resizePointerUpListener&&(Oe(this.resizePointerUpListener),this.resizePointerUpListener=null),this.resizePointerMoveListener&&(Oe(this.resizePointerMoveListener),this.resizePointerMoveListener=null)}onResizePointerMove(o){o=this.workspace.moveDrag(o),this.setSize(new Ko(this.workspace.RTL?-o.x:o.x,o.y),!1),this.onSizeChange()}onStartEdit(){this.bringToFront()&&this.textArea.focus()}onTextChange(){this.text=this.textArea.value;for(const o of this.textChangeListeners)o()}onSizeChange(){for(const o of this.sizeChangeListeners)o()}};Ue(`
  470. .blocklyCommentTextarea {
  471. background-color: #fef49c;
  472. border: 0;
  473. display: block;
  474. margin: 0;
  475. outline: 0;
  476. padding: 3px;
  477. resize: none;
  478. text-overflow: hidden;
  479. }
  480. `);var Su=17,i0=160,r0=80,qi=class extends gT{constructor(o){super(o),this.sourceBlock=o,this.textBubble=this.textInputBubble=null,this.text="",this.bubbleSize=new Ko(i0,r0),this.bubbleVisiblity=!1}getType(){return qi.TYPE}initView(o){this.svgRoot||(super.initView(o),Ne(st.CIRCLE,{class:"blocklyIconShape",r:"8",cx:"8",cy:"8"},this.svgRoot),Ne(st.PATH,{class:"blocklyIconSymbol",d:"m6.8,10h2c0.003,-0.617 0.271,-0.962 0.633,-1.266 2.875,-2.4050.607,-5.534 -3.765,-3.874v1.7c3.12,-1.657 3.698,0.118 2.336,1.25-1.201,0.998 -1.201,1.528 -1.204,2.19z"},this.svgRoot),Ne(st.RECT,{class:"blocklyIconSymbol",x:"6.8",y:"10.78",height:"2",width:"2"},this.svgRoot),Se(this.svgRoot,"blockly-icon-comment"))}dispose(){super.dispose();let o;(o=this.textInputBubble)==null||o.dispose();let l;(l=this.textBubble)==null||l.dispose()}getWeight(){return qi.WEIGHT}getSize(){return new Ko(Su,Su)}applyColour(){super.applyColour();const o=this.sourceBlock.style.colourPrimary;let l;(l=this.textInputBubble)==null||l.setColour(o);let d;(d=this.textBubble)==null||d.setColour(o)}updateEditable(){super.updateEditable(),this.bubbleIsVisible()&&(this.setBubbleVisible(!1),this.setBubbleVisible(!0))}onLocationChange(o){super.onLocationChange(o),o=this.getAnchorLocation();let l;(l=this.textInputBubble)==null||l.setAnchorLocation(o);let d;(d=this.textBubble)==null||d.setAnchorLocation(o)}setText(o){const l=this.text;J(new(Ae(n.CHANGE$$module$build$src$core$events$utils))(this.sourceBlock,"comment",null,l,o)),this.text=o;let d;(d=this.textInputBubble)==null||d.setText(this.text);let m;(m=this.textBubble)==null||m.setText(this.text)}getText(){return this.text}setBubbleSize(o){this.bubbleSize=o;let l;(l=this.textInputBubble)==null||l.setSize(this.bubbleSize,!0)}getBubbleSize(){return this.bubbleSize}saveState(){return this.text?{text:this.text,pinned:this.bubbleIsVisible(),height:this.bubbleSize.height,width:this.bubbleSize.width}:null}loadState(o){let l;this.text=(l=o.text)!=null?l:"";let d,m;this.bubbleSize=new Ko((d=o.width)!=null?d:i0,(m=o.height)!=null?m:r0);let $;this.bubbleVisiblity=($=o.pinned)!=null?$:!1,setTimeout(()=>this.setBubbleVisible(this.bubbleVisiblity),1)}onClick(){super.onClick(),this.setBubbleVisible(!this.bubbleIsVisible())}isClickableInFlyout(){return!1}onTextChange(){if(this.textInputBubble){var o=this.textInputBubble.getText();this.text!==o&&(J(new(Ae(n.CHANGE$$module$build$src$core$events$utils))(this.sourceBlock,"comment",null,this.text,o)),this.text=o)}}onSizeChange(){this.textInputBubble&&(this.bubbleSize=this.textInputBubble.getSize())}bubbleIsVisible(){return this.bubbleVisiblity}setBubbleVisible(o){(!o||!this.textBubble&&!this.textInputBubble)&&(o||this.textBubble||this.textInputBubble)&&(this.bubbleVisiblity=o,this.sourceBlock.rendered&&!this.sourceBlock.isInFlyout&&(o?(this.sourceBlock.isEditable()?this.showEditableBubble():this.showNonEditableBubble(),this.applyColour()):this.hideBubble(),J(new(Ae(Kl))(this.sourceBlock,o,"comment"))))}showEditableBubble(){this.textInputBubble=new Or(this.sourceBlock.workspace,this.getAnchorLocation(),this.getBubbleOwnerRect()),this.textInputBubble.setText(this.getText()),this.textInputBubble.setSize(this.bubbleSize,!0),this.textInputBubble.addTextChangeListener(()=>this.onTextChange()),this.textInputBubble.addSizeChangeListener(()=>this.onSizeChange())}showNonEditableBubble(){this.textBubble=new Mf(this.getText(),this.sourceBlock.workspace,this.getAnchorLocation(),this.getBubbleOwnerRect())}hideBubble(){let o;(o=this.textInputBubble)==null||o.dispose(),this.textInputBubble=null;let l;(l=this.textBubble)==null||l.dispose(),this.textBubble=null}getAnchorLocation(){const o=Su/2;return zt.sum(this.workspaceLocation,new zt(o,o))}getBubbleOwnerRect(){const o=this.sourceBlock.getSvgRoot().getBBox();return new Po(o.y,o.y+o.height,o.x,o.x+o.width)}};qi.TYPE=_r.COMMENT,qi.WEIGHT=3,Vr(qi.TYPE,qi);var IO=17,ea=class extends gT{constructor(o){super(o),this.sourceBlock=o,this.textMap=new Map,this.textBubble=null}getType(){return ea.TYPE}initView(o){this.svgRoot||(super.initView(o),Ne(st.PATH,{class:"blocklyIconShape",d:"M2,15Q-1,15 0.5,12L6.5,1.7Q8,-1 9.5,1.7L15.5,12Q17,15 14,15z"},this.svgRoot),Ne(st.PATH,{class:"blocklyIconSymbol",d:"m7,4.8v3.16l0.27,2.27h1.46l0.27,-2.27v-3.16z"},this.svgRoot),Ne(st.RECT,{class:"blocklyIconSymbol",x:"7",y:"11",height:"2",width:"2"},this.svgRoot),Se(this.svgRoot,"blockly-icon-warning"))}dispose(){super.dispose();let o;(o=this.textBubble)==null||o.dispose()}getWeight(){return ea.WEIGHT}getSize(){return new Ko(IO,IO)}applyColour(){super.applyColour();let o;(o=this.textBubble)==null||o.setColour(this.sourceBlock.style.colourPrimary)}updateCollapsed(){}isShownWhenCollapsed(){return!0}onLocationChange(o){super.onLocationChange(o);let l;(l=this.textBubble)==null||l.setAnchorLocation(this.getAnchorLocation())}addMessage(o,l){if(this.textMap.get(l)===o)return this;o?this.textMap.set(l,o):this.textMap.delete(l);let d;return(d=this.textBubble)==null||d.setText(this.getText()),this}getText(){return[...this.textMap.values()].join(`
  481. `)}onClick(){super.onClick(),this.setBubbleVisible(!this.bubbleIsVisible())}isClickableInFlyout(){return!1}bubbleIsVisible(){return!!this.textBubble}setBubbleVisible(o){if(this.bubbleIsVisible()!==o){if(o)this.textBubble=new Mf(this.getText(),this.sourceBlock.workspace,this.getAnchorLocation(),this.getBubbleOwnerRect()),this.applyColour();else{let l;(l=this.textBubble)==null||l.dispose(),this.textBubble=null}J(new(Ae(Kl))(this.sourceBlock,o,"warning"))}}getAnchorLocation(){const o=IO/2;return zt.sum(this.workspaceLocation,new zt(o,o))}getBubbleOwnerRect(){const o=this.sourceBlock.getSvgRoot().getBBox();return new Po(o.y,o.y+o.height,o.x,o.x+o.width)}};ea.TYPE=_r.WARNING,ea.WEIGHT=2;var RO=class extends Error{constructor(o){super(`Tried to append an icon of type ${o.getType()} when an icon of that type already exists on the block. Use getIcon to access the existing icon.`),this.icon=o}},Fa={};Fa.DuplicateIconType=RO;var Fn={};Fn.CommentIcon=qi,Fn.Icon=gT,Fn.IconType=_r,Fn.MutatorIcon=n.MutatorIcon$$module$build$src$core$icons$mutator_icon,Fn.WarningIcon=ea,Fn.exceptions=Fa,Fn.registry=TT;var Dg,es;Dg="PROCEDURE",n.DEFAULT_ARG$$module$build$src$core$procedures="x",es={CATEGORY_NAME:Dg,DEFAULT_ARG:n.DEFAULT_ARG$$module$build$src$core$procedures},es.ObservableProcedureMap=pT,es.allProcedures=v_,es.findLegalName=n.findLegalName$$module$build$src$core$procedures,es.flyoutCategory=eg,es.getCallers=tg,es.getDefinition=n.getDefinition$$module$build$src$core$procedures,es.isNameUsed=_b,es.isProcedureBlock=Ec,es.mutateCallers=n.mutateCallers$$module$build$src$core$procedures,es.mutatorOpenListener=Tb,es.rename=n.rename$$module$build$src$core$procedures;var l0=class{constructor(){this.NONE=0,this.FIELD=1,this.HAT=2,this.ICON=4,this.SPACER=8,this.BETWEEN_ROW_SPACER=16,this.IN_ROW_SPACER=32,this.EXTERNAL_VALUE_INPUT=64,this.INPUT=128,this.INLINE_INPUT=256,this.STATEMENT_INPUT=512,this.CONNECTION=1024,this.PREVIOUS_CONNECTION=2048,this.NEXT_CONNECTION=4096,this.OUTPUT_CONNECTION=8192,this.CORNER=16384,this.LEFT_SQUARE_CORNER=32768,this.LEFT_ROUND_CORNER=65536,this.RIGHT_SQUARE_CORNER=131072,this.RIGHT_ROUND_CORNER=262144,this.JAGGED_EDGE=524288,this.ROW=1048576,this.TOP_ROW=2097152,this.BOTTOM_ROW=4194304,this.INPUT_ROW=8388608,this.LEFT_CORNER=this.LEFT_SQUARE_CORNER|this.LEFT_ROUND_CORNER,this.RIGHT_CORNER=this.RIGHT_SQUARE_CORNER|this.RIGHT_ROUND_CORNER,this.nextTypeValue_=16777216}getType(o){return Object.prototype.hasOwnProperty.call(this,o)||(this[o]=this.nextTypeValue_,this.nextTypeValue_<<=1),this[o]}isField(o){return o.type&this.FIELD}isHat(o){return o.type&this.HAT}isIcon(o){return o.type&this.ICON}isSpacer(o){return o.type&this.SPACER}isInRowSpacer(o){return o.type&this.IN_ROW_SPACER}isInput(o){return o.type&this.INPUT}isExternalInput(o){return o.type&this.EXTERNAL_VALUE_INPUT}isInlineInput(o){return o.type&this.INLINE_INPUT}isStatementInput(o){return o.type&this.STATEMENT_INPUT}isPreviousConnection(o){return o.type&this.PREVIOUS_CONNECTION}isNextConnection(o){return o.type&this.NEXT_CONNECTION}isPreviousOrNextConnection(o){return o.type&(this.PREVIOUS_CONNECTION|this.NEXT_CONNECTION)}isLeftRoundedCorner(o){return o.type&this.LEFT_ROUND_CORNER}isRightRoundedCorner(o){return o.type&this.RIGHT_ROUND_CORNER}isLeftSquareCorner(o){return o.type&this.LEFT_SQUARE_CORNER}isRightSquareCorner(o){return o.type&this.RIGHT_SQUARE_CORNER}isCorner(o){return o.type&this.CORNER}isJaggedEdge(o){return o.type&this.JAGGED_EDGE}isRow(o){return o.type&this.ROW}isBetweenRowSpacer(o){return o.type&this.BETWEEN_ROW_SPACER}isTopRow(o){return o.type&this.TOP_ROW}isBottomRow(o){return o.type&this.BOTTOM_ROW}isTopOrBottomRow(o){return o.type&(this.TOP_ROW|this.BOTTOM_ROW)}isInputRow(o){return o.type&this.INPUT_ROW}},nt=new l0,no=class{constructor(o){this.centerline=this.xPos=this.height=this.width=0,this.constants_=o,this.type=nt.NONE,this.notchOffset=this.constants_.NOTCH_OFFSET_LEFT}},xg=class{constructor(o){this.elements=[],this.xPos=this.yPos=this.widthWithConnectedBlocks=this.minWidth=this.minHeight=this.width=this.height=0,this.hasStatement=this.hasExternalInput=!1,this.statementEdge=0,this.hasJaggedEdge=this.hasDummyInput=this.hasInlineInput=!1,this.align=null,this.constants_=o,this.type=nt.ROW,this.notchOffset=this.constants_.NOTCH_OFFSET_LEFT}getLastInput(){for(let o=this.elements.length-1;0<=o;o--){const l=this.elements[o];if(nt.isInput(l))return l}return null}measure(){throw Error("Unexpected attempt to measure a base Row.")}startsWithElemSpacer(){return!0}endsWithElemSpacer(){return!0}getFirstSpacer(){for(let o=0;o<this.elements.length;o++){const l=this.elements[o];if(nt.isSpacer(l))return l}return null}getLastSpacer(){for(let o=this.elements.length-1;0<=o;o--){const l=this.elements[o];if(nt.isSpacer(l))return l}return null}},ET=class extends xg{constructor(o){super(o),this.hasNextConnection=!1,this.connection=null,this.baseline=this.descenderHeight=0,this.type|=nt.BOTTOM_ROW}hasLeftSquareCorner(o){return!!o.outputConnection||!!o.getNextBlock()}hasRightSquareCorner(o){return!0}measure(){let o=0,l=0,d=0;for(let m=0;m<this.elements.length;m++){const $=this.elements[m];l+=$.width,nt.isSpacer($)||(nt.isNextConnection($)?d=Math.max(d,$.height):o=Math.max(o,$.height))}this.width=Math.max(this.minWidth,l),this.height=Math.max(this.minHeight,o)+d,this.descenderHeight=d,this.widthWithConnectedBlocks=this.width}startsWithElemSpacer(){return!1}endsWithElemSpacer(){return!1}},$l=class extends no{constructor(o,l){super(o),this.connectionModel=l,this.type|=nt.CONNECTION,this.shape=this.constants_.shapeFor(l),this.isDynamicShape="isDynamic"in this.shape&&this.shape.isDynamic,this.highlighted=l.isHighlighted()}},yu=class extends $l{constructor(o,l){super(o,l.connection),this.input=l,this.connectionOffsetY=this.connectionOffsetX=0,this.type|=nt.INPUT,this.align=l.align,(this.connectedBlock=l.connection&&l.connection.targetBlock()?l.connection.targetBlock():null)?(o=this.connectedBlock.getHeightWidth(),this.connectedBlockWidth=o.width,this.connectedBlockHeight=o.height):this.connectedBlockHeight=this.connectedBlockWidth=0}},vT=class extends yu{constructor(o,l){super(o,l),this.height=0,this.type|=nt.EXTERNAL_VALUE_INPUT,this.height=this.connectedBlock?this.connectedBlockHeight-this.constants_.TAB_OFFSET_FROM_TOP-this.constants_.MEDIUM_PADDING:this.shape.height,this.width=this.shape.width+this.constants_.EXTERNAL_VALUE_INPUT_PADDING,this.connectionOffsetY=this.constants_.TAB_OFFSET_FROM_TOP,this.connectionHeight=this.shape.height,this.connectionWidth=this.shape.width}},Af=class extends no{constructor(o,l,d){super(o),this.field=l,this.parentInput=d,this.isEditable=l.EDITABLE,this.flipRtl=l.getFlipRtl(),this.type|=nt.FIELD,o=this.field.getSize(),this.height=o.height,this.width=o.width}},CO=class extends no{constructor(o){super(o),this.type|=nt.HAT,this.height=this.constants_.START_HAT.height,this.width=this.constants_.START_HAT.width,this.ascenderHeight=this.height}},a0=class extends no{constructor(o,l){super(o),this.icon=l,this.flipRtl=!1,this.isVisible=cu(l)&&l.bubbleIsVisible(),this.type|=nt.ICON,o=l.getSize(),this.height=o.height,this.width=o.width}},Kr=class extends no{constructor(o,l){super(o),this.type=this.type|nt.SPACER|nt.IN_ROW_SPACER,this.width=l,this.height=this.constants_.SPACER_DEFAULT_HEIGHT}},MO=class extends yu{constructor(o,l){super(o,l),this.type|=nt.INLINE_INPUT,this.connectedBlock?(this.width=this.connectedBlockWidth,this.height=this.connectedBlockHeight):(this.height=this.constants_.EMPTY_INLINE_INPUT_HEIGHT,this.width=this.constants_.EMPTY_INLINE_INPUT_PADDING),this.connectionHeight=this.isDynamicShape?this.shape.height(this.height):this.shape.height,this.connectionWidth=this.isDynamicShape?this.shape.width(this.height):this.shape.width,this.connectedBlock||(this.width+=this.connectionWidth*(this.isDynamicShape?2:1)),this.connectionOffsetY="connectionOffsetY"in this.shape?this.shape.connectionOffsetY(this.connectionHeight):this.constants_.TAB_OFFSET_FROM_TOP,this.connectionOffsetX="connectionOffsetX"in this.shape?this.shape.connectionOffsetX(this.connectionWidth):0}},Bg=class extends yu{constructor(o,l){super(o,l),this.type|=nt.STATEMENT_INPUT,this.height=this.connectedBlock?this.connectedBlockHeight+this.constants_.STATEMENT_BOTTOM_SPACER:this.constants_.EMPTY_STATEMENT_INPUT_HEIGHT,this.width=this.constants_.STATEMENT_INPUT_NOTCH_OFFSET+this.shape.width}},AO=class extends xg{constructor(o){super(o),this.connectedBlockWidths=0,this.type|=nt.INPUT_ROW}measure(){this.width=this.minWidth,this.height=this.minHeight;let o=0;for(let l=0;l<this.elements.length;l++){const d=this.elements[l];this.width+=d.width,nt.isInput(d)&&d instanceof yu&&(nt.isStatementInput(d)&&d instanceof Bg?o+=d.connectedBlockWidth:nt.isExternalInput(d)&&d instanceof vT&&d.connectedBlockWidth!==0&&(o+=d.connectedBlockWidth-d.connectionWidth)),nt.isSpacer(d)||(this.height=Math.max(this.height,d.height))}this.connectedBlockWidths=o,this.widthWithConnectedBlocks=this.width+o}endsWithElemSpacer(){return!this.hasExternalInput&&!this.hasStatement}},c0=class extends no{constructor(o){super(o),this.type|=nt.JAGGED_EDGE,this.height=this.constants_.JAGGED_TEETH.height,this.width=this.constants_.JAGGED_TEETH.width}},u0=class extends $l{constructor(o,l){super(o,l),this.type|=nt.NEXT_CONNECTION,this.height=this.shape.height,this.width=this.shape.width}},d0=class extends $l{constructor(o,l){super(o,l),this.connectionOffsetX=0,this.type|=nt.OUTPUT_CONNECTION,this.height=this.isDynamicShape?0:this.shape.height,this.startX=this.width=this.isDynamicShape?0:this.shape.width,this.connectionOffsetY=this.constants_.TAB_OFFSET_FROM_TOP}},h0=class extends $l{constructor(o,l){super(o,l),this.type|=nt.PREVIOUS_CONNECTION,this.height=this.shape.height,this.width=this.shape.width}},Gd=class extends no{constructor(o,l){super(o),this.type=(l&&l!=="left"?nt.RIGHT_ROUND_CORNER:nt.LEFT_ROUND_CORNER)|nt.CORNER,this.width=this.constants_.CORNER_RADIUS,this.height=this.constants_.CORNER_RADIUS/2}},LO=class extends xg{constructor(o,l,d){super(o),this.height=l,this.width=d,this.precedesStatement=this.followsStatement=!1,this.widthWithConnectedBlocks=0,this.type=this.type|nt.SPACER|nt.BETWEEN_ROW_SPACER,this.elements=[new Kr(this.constants_,d)]}measure(){}},Wd=class extends no{constructor(o,l){super(o),this.type=(l&&l!=="left"?nt.RIGHT_SQUARE_CORNER:nt.LEFT_SQUARE_CORNER)|nt.CORNER,this.width=this.height=this.constants_.NO_PADDING}},wO=class extends xg{constructor(o){super(o),this.ascenderHeight=this.capline=0,this.hasPreviousConnection=!1,this.connection=null,this.type|=nt.TOP_ROW}hasLeftSquareCorner(o){const l=(o.hat?o.hat==="cap":this.constants_.ADD_START_HATS)&&!o.outputConnection&&!o.previousConnection,d=o.getPreviousBlock();return!!o.outputConnection||l||(d?d.getNextBlock()===o:!1)}hasRightSquareCorner(o){return!0}measure(){let o=0,l=0,d=0;for(let m=0;m<this.elements.length;m++){const $=this.elements[m];l+=$.width,nt.isSpacer($)||(nt.isHat($)&&$ instanceof CO?d=Math.max(d,$.ascenderHeight):o=Math.max(o,$.height))}this.width=Math.max(this.minWidth,l),this.height=Math.max(this.minHeight,o)+d,this.capline=this.ascenderHeight=d,this.widthWithConnectedBlocks=this.width}startsWithElemSpacer(){return!1}endsWithElemSpacer(){return!1}},Fg=class{constructor(){this.NO_PADDING=0,this.SMALL_PADDING=3,this.MEDIUM_PADDING=5,this.MEDIUM_LARGE_PADDING=8,this.LARGE_PADDING=10,this.TAB_HEIGHT=15,this.TAB_OFFSET_FROM_TOP=5,this.TAB_VERTICAL_OVERLAP=2.5,this.TAB_WIDTH=8,this.NOTCH_WIDTH=15,this.NOTCH_HEIGHT=4,this.MIN_BLOCK_WIDTH=12,this.EMPTY_BLOCK_SPACER_HEIGHT=16,this.CORNER_RADIUS=8,this.NOTCH_OFFSET_LEFT=15,this.STATEMENT_BOTTOM_SPACER=0,this.STATEMENT_INPUT_PADDING_LEFT=20,this.BETWEEN_STATEMENT_PADDING_Y=4,this.ADD_START_HATS=!1,this.START_HAT_HEIGHT=15,this.START_HAT_WIDTH=100,this.SPACER_DEFAULT_HEIGHT=15,this.MIN_BLOCK_HEIGHT=24,this.EMPTY_INLINE_INPUT_PADDING=14.5,this.EXTERNAL_VALUE_INPUT_PADDING=2,this.JAGGED_TEETH_HEIGHT=12,this.JAGGED_TEETH_WIDTH=6,this.FIELD_TEXT_FONTSIZE=11,this.FIELD_TEXT_FONTWEIGHT="normal",this.FIELD_TEXT_FONTFAMILY="sans-serif",this.FIELD_TEXT_BASELINE=this.FIELD_TEXT_HEIGHT=-1,this.FIELD_BORDER_RECT_RADIUS=4,this.FIELD_BORDER_RECT_HEIGHT=16,this.FIELD_BORDER_RECT_X_PADDING=5,this.FIELD_BORDER_RECT_Y_PADDING=3,this.FIELD_BORDER_RECT_COLOUR="#fff",this.FIELD_DROPDOWN_SVG_ARROW=this.FIELD_DROPDOWN_COLOURED_DIV=this.FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW=!1,this.FIELD_DROPDOWN_SVG_ARROW_SIZE=12,this.FIELD_COLOUR_FULL_BLOCK=this.FIELD_TEXTINPUT_BOX_SHADOW=!1,this.FIELD_COLOUR_DEFAULT_WIDTH=26,this.defs=null,this.embossFilterId="",this.embossFilter=null,this.disabledPatternId="",this.disabledPattern=null,this.debugFilterId="",this.cssNode=this.debugFilter=null,this.CURSOR_COLOUR="#cc0a0a",this.MARKER_COLOUR="#4286f4",this.CURSOR_WS_WIDTH=100,this.WS_CURSOR_HEIGHT=5,this.CURSOR_STACK_PADDING=10,this.CURSOR_BLOCK_PADDING=2,this.CURSOR_STROKE_WIDTH=4,this.FULL_BLOCK_FIELDS=!1,this.INSERTION_MARKER_COLOUR="#000000",this.INSERTION_MARKER_OPACITY=.2,this.SHAPES={PUZZLE:1,NOTCH:2},this.TALL_INPUT_FIELD_OFFSET_Y=this.MEDIUM_PADDING,this.DUMMY_INPUT_SHADOW_MIN_HEIGHT=this.DUMMY_INPUT_MIN_HEIGHT=this.TAB_HEIGHT,this.STATEMENT_INPUT_NOTCH_OFFSET=this.NOTCH_OFFSET_LEFT,this.TOP_ROW_MIN_HEIGHT=this.MEDIUM_PADDING,this.TOP_ROW_PRECEDES_STATEMENT_MIN_HEIGHT=this.LARGE_PADDING,this.BOTTOM_ROW_MIN_HEIGHT=this.MEDIUM_PADDING,this.BOTTOM_ROW_AFTER_STATEMENT_MIN_HEIGHT=this.LARGE_PADDING,this.EMPTY_INLINE_INPUT_HEIGHT=this.TAB_HEIGHT+11,this.EMPTY_STATEMENT_INPUT_HEIGHT=this.MIN_BLOCK_HEIGHT,this.START_POINT=Zo(0,0),this.FIELD_TEXT_BASELINE_CENTER=!0,this.FIELD_DROPDOWN_BORDER_RECT_HEIGHT=this.FIELD_BORDER_RECT_HEIGHT,this.FIELD_DROPDOWN_SVG_ARROW_PADDING=this.FIELD_BORDER_RECT_X_PADDING,this.FIELD_DROPDOWN_SVG_ARROW_DATAURI="data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMi43MSIgaGVpZ2h0PSI4Ljc5IiB2aWV3Qm94PSIwIDAgMTIuNzEgOC43OSI+PHRpdGxlPmRyb3Bkb3duLWFycm93PC90aXRsZT48ZyBvcGFjaXR5PSIwLjEiPjxwYXRoIGQ9Ik0xMi43MSwyLjQ0QTIuNDEsMi40MSwwLDAsMSwxMiw0LjE2TDguMDgsOC4wOGEyLjQ1LDIuNDUsMCwwLDEtMy40NSwwTDAuNzIsNC4xNkEyLjQyLDIuNDIsMCwwLDEsMCwyLjQ0LDIuNDgsMi40OCwwLDAsMSwuNzEuNzFDMSwwLjQ3LDEuNDMsMCw2LjM2LDBTMTEuNzUsMC40NiwxMiwuNzFBMi40NCwyLjQ0LDAsMCwxLDEyLjcxLDIuNDRaIiBmaWxsPSIjMjMxZjIwIi8+PC9nPjxwYXRoIGQ9Ik02LjM2LDcuNzlhMS40MywxLjQzLDAsMCwxLTEtLjQyTDEuNDIsMy40NWExLjQ0LDEuNDQsMCwwLDEsMC0yYzAuNTYtLjU2LDkuMzEtMC41Niw5Ljg3LDBhMS40NCwxLjQ0LDAsMCwxLDAsMkw3LjM3LDcuMzdBMS40MywxLjQzLDAsMCwxLDYuMzYsNy43OVoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=",this.FIELD_COLOUR_DEFAULT_HEIGHT=this.FIELD_BORDER_RECT_HEIGHT,this.FIELD_CHECKBOX_X_OFFSET=this.FIELD_BORDER_RECT_X_PADDING-3,this.randomIdentifier=String(Math.random()).substring(2)}init(){this.JAGGED_TEETH=this.makeJaggedTeeth(),this.NOTCH=this.makeNotch(),this.START_HAT=this.makeStartHat(),this.PUZZLE_TAB=this.makePuzzleTab(),this.INSIDE_CORNERS=this.makeInsideCorners(),this.OUTSIDE_CORNERS=this.makeOutsideCorners()}setTheme(o){this.blockStyles=Object.create(null);const l=o.blockStyles;for(const d in l)this.blockStyles[d]=this.validatedBlockStyle_(l[d]);this.setDynamicProperties_(o)}setDynamicProperties_(o){this.setFontConstants_(o),this.setComponentConstants_(o),this.ADD_START_HATS=o.startHats!==void 0?o.startHats:this.ADD_START_HATS}setFontConstants_(o){o.fontStyle&&o.fontStyle.family&&(this.FIELD_TEXT_FONTFAMILY=o.fontStyle.family),o.fontStyle&&o.fontStyle.weight&&(this.FIELD_TEXT_FONTWEIGHT=o.fontStyle.weight),o.fontStyle&&o.fontStyle.size&&(this.FIELD_TEXT_FONTSIZE=o.fontStyle.size),o=ft("Hg",this.FIELD_TEXT_FONTSIZE+"pt",this.FIELD_TEXT_FONTWEIGHT,this.FIELD_TEXT_FONTFAMILY),this.FIELD_TEXT_HEIGHT=o.height,this.FIELD_TEXT_BASELINE=o.baseline}setComponentConstants_(o){this.CURSOR_COLOUR=o.getComponentStyle("cursorColour")||this.CURSOR_COLOUR,this.MARKER_COLOUR=o.getComponentStyle("markerColour")||this.MARKER_COLOUR,this.INSERTION_MARKER_COLOUR=o.getComponentStyle("insertionMarkerColour")||this.INSERTION_MARKER_COLOUR,this.INSERTION_MARKER_OPACITY=Number(o.getComponentStyle("insertionMarkerOpacity"))||this.INSERTION_MARKER_OPACITY}getBlockStyleForColour(o){const l="auto_"+o;return this.blockStyles[l]||(this.blockStyles[l]=this.createBlockStyle_(o)),{style:this.blockStyles[l],name:l}}getBlockStyle(o){return this.blockStyles[o||""]||(o&&o.indexOf("auto_")===0?this.getBlockStyleForColour(o.substring(5)).style:this.createBlockStyle_("#000000"))}createBlockStyle_(o){return this.validatedBlockStyle_({colourPrimary:o})}validatedBlockStyle_(o){const l={};return o&&Object.assign(l,o),o=Sa(l.colourPrimary||"#000"),l.colourPrimary=o.hex,l.colourSecondary=l.colourSecondary?Sa(l.colourSecondary).hex:this.generateSecondaryColour_(l.colourPrimary),l.colourTertiary=l.colourTertiary?Sa(l.colourTertiary).hex:this.generateTertiaryColour_(l.colourPrimary),l.hat=l.hat||"",l}generateSecondaryColour_(o){return Ed("#fff",o,.6)||o}generateTertiaryColour_(o){return Ed("#fff",o,.3)||o}dispose(){this.embossFilter&&mt(this.embossFilter),this.disabledPattern&&mt(this.disabledPattern),this.debugFilter&&mt(this.debugFilter),this.cssNode=null}makeJaggedTeeth(){const o=this.JAGGED_TEETH_HEIGHT,l=this.JAGGED_TEETH_WIDTH,d=ml([Sn(l,o/4),Sn(2*-l,o/2),Sn(l,o/4)]);return{height:o,width:l,path:d}}makeStartHat(){const o=this.START_HAT_HEIGHT,l=this.START_HAT_WIDTH,d=fr("c",[Sn(30,-o),Sn(70,-o),Sn(l,0)]);return{height:o,width:l,path:d}}makePuzzleTab(){function o(V){V=V?-1:1;const Ee=-V;var Ve=d/2;const St=Ve+2.5,tn=Ve+.5,cs=Sn(-l,V*Ve);return Ve=Sn(l,V*Ve),fr("c",[Sn(0,V*St),Sn(-l,Ee*tn),cs])+fr("s",[Sn(l,2.5*Ee),Ve])}const l=this.TAB_WIDTH,d=this.TAB_HEIGHT,m=o(!0),$=o(!1);return{type:this.SHAPES.PUZZLE,width:l,height:d,pathDown:$,pathUp:m}}makeNotch(){function o(Ee){return ml([Sn(Ee*m,d),Sn(3*Ee,0),Sn(Ee*m,-d)])}const l=this.NOTCH_WIDTH,d=this.NOTCH_HEIGHT,m=(l-3)/2,$=o(1),V=o(-1);return{type:this.SHAPES.NOTCH,width:l,height:d,pathLeft:$,pathRight:V}}makeInsideCorners(){const o=this.CORNER_RADIUS,l=Cs("a","0 0,0",o,Sn(-o,o)),d=Cs("a","0 0,0",o,Sn(o,o));return{width:o,height:o,pathTop:l,pathBottom:d}}makeOutsideCorners(){const o=this.CORNER_RADIUS,l=Zo(0,o)+Cs("a","0 0,1",o,Sn(o,-o)),d=Cs("a","0 0,1",o,Sn(o,o)),m=Cs("a","0 0,1",o,Sn(-o,-o)),$=Cs("a","0 0,1",o,Sn(-o,o));return{topLeft:l,topRight:d,bottomRight:$,bottomLeft:m,rightHeight:o}}shapeFor(o){switch(o.type){case sn.INPUT_VALUE:case sn.OUTPUT_VALUE:return this.PUZZLE_TAB;case sn.PREVIOUS_STATEMENT:case sn.NEXT_STATEMENT:return this.NOTCH;default:throw Error("Unknown connection type")}}createDom(o,l,d){this.injectCSS_(l,d),this.defs=Ne(st.DEFS,{},o),o=Ne(st.FILTER,{id:"blocklyEmbossFilter"+this.randomIdentifier},this.defs),Ne(st.FEGAUSSIANBLUR,{in:"SourceAlpha",stdDeviation:1,result:"blur"},o),l=Ne(st.FESPECULARLIGHTING,{in:"blur",surfaceScale:1,specularConstant:.5,specularExponent:10,"lighting-color":"white",result:"specOut"},o),Ne(st.FEPOINTLIGHT,{x:-5e3,y:-1e4,z:2e4},l),Ne(st.FECOMPOSITE,{in:"specOut",in2:"SourceAlpha",operator:"in",result:"specOut"},o),Ne(st.FECOMPOSITE,{in:"SourceGraphic",in2:"specOut",operator:"arithmetic",k1:0,k2:1,k3:1,k4:0},o),this.embossFilterId=o.id,this.embossFilter=o,o=Ne(st.PATTERN,{id:"blocklyDisabledPattern"+this.randomIdentifier,patternUnits:"userSpaceOnUse",width:10,height:10},this.defs),Ne(st.RECT,{width:10,height:10,fill:"#aaa"},o),Ne(st.PATH,{d:"M 0 0 L 10 10 M 10 0 L 0 10",stroke:"#cc0"},o),this.disabledPatternId=o.id,this.disabledPattern=o,this.createDebugFilter()}createDebugFilter(){if(!this.debugFilter){const o=Ne(st.FILTER,{id:"blocklyDebugFilter"+this.randomIdentifier,height:"160%",width:"180%",y:"-30%",x:"-40%"},this.defs),l=Ne(st.FECOMPONENTTRANSFER,{result:"outBlur"},o);Ne(st.FEFUNCA,{type:"table",tableValues:"0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"},l),Ne(st.FEFLOOD,{"flood-color":"#ff0000","flood-opacity":.5,result:"outColor"},o),Ne(st.FECOMPOSITE,{in:"outColor",in2:"outBlur",operator:"in",result:"outGlow"},o),this.debugFilterId=o.id,this.debugFilter=o}}injectCSS_(o,l){l=this.getCSS_(l),o="blockly-renderer-style-"+o,this.cssNode=document.getElementById(o);const d=l.join(`
  482. `);this.cssNode?this.cssNode.firstChild.textContent=d:(l=document.createElement("style"),l.id=o,o=document.createTextNode(d),l.appendChild(o),document.head.insertBefore(l,document.head.firstChild),this.cssNode=l)}getCSS_(o){return[`${o} .blocklyText, `,`${o} .blocklyFlyoutLabelText {`,`font: ${this.FIELD_TEXT_FONTWEIGHT} ${this.FIELD_TEXT_FONTSIZE}pt ${this.FIELD_TEXT_FONTFAMILY};`,"}",`${o} .blocklyText {`,"fill: #fff;","}",`${o} .blocklyNonEditableText>rect,`,`${o} .blocklyEditableText>rect {`,`fill: ${this.FIELD_BORDER_RECT_COLOUR};`,"fill-opacity: .6;","stroke: none;","}",`${o} .blocklyNonEditableText>text,`,`${o} .blocklyEditableText>text {`,"fill: #000;","}",`${o} .blocklyFlyoutLabelText {`,"fill: #000;","}",`${o} .blocklyText.blocklyBubbleText {`,"fill: #000;","}",`${o} .blocklyEditableText:not(.editing):hover>rect {`,"stroke: #fff;","stroke-width: 2;","}",`${o} .blocklyHtmlInput {`,`font-family: ${this.FIELD_TEXT_FONTFAMILY};`,`font-weight: ${this.FIELD_TEXT_FONTWEIGHT};`,"}",`${o} .blocklySelected>.blocklyPath {`,"stroke: #fc3;","stroke-width: 3px;","}",`${o} .blocklyHighlightedConnectionPath {`,"stroke: #fc3;","}",`${o} .blocklyReplaceable .blocklyPath {`,"fill-opacity: .5;","}",`${o} .blocklyReplaceable .blocklyPathLight,`,`${o} .blocklyReplaceable .blocklyPathDark {`,"display: none;","}",`${o} .blocklyInsertionMarker>.blocklyPath {`,`fill-opacity: ${this.INSERTION_MARKER_OPACITY};`,"stroke: none;","}"]}},Ug=class{constructor(o,l){this.inlinePath_=this.outlinePath_="",this.block_=o,this.info_=l,this.topLeft_=o.getRelativeToSurfaceXY(),this.constants_=l.getRenderer().getConstants()}draw(){this.drawOutline_(),this.drawInternals_(),this.updateConnectionHighlights(),this.block_.pathObject.setPath(this.outlinePath_+`
  483. `+this.inlinePath_),this.info_.RTL&&this.block_.pathObject.flipRTL(),this.recordSizeOnBlock_()}hideHiddenIcons_(){ct("hideHiddenIcons_","v10","v11")}recordSizeOnBlock_(){this.block_.height=this.info_.height,this.block_.width=this.info_.widthWithChildren}drawOutline_(){this.drawTop_();for(let o=1;o<this.info_.rows.length-1;o++){const l=this.info_.rows[o];l.hasJaggedEdge?this.drawJaggedEdge_(l):l.hasStatement?this.drawStatementInput_(l):l.hasExternalInput?this.drawValueInput_(l):this.drawRightSideRow_(l)}this.drawBottom_(),this.drawLeft_()}drawTop_(){const o=this.info_.topRow,l=o.elements;this.positionPreviousConnection_(),this.outlinePath_+=Zo(o.xPos,this.info_.startY);for(let d=0,m;m=l[d];d++)nt.isLeftRoundedCorner(m)?this.outlinePath_+=this.constants_.OUTSIDE_CORNERS.topLeft:nt.isRightRoundedCorner(m)?this.outlinePath_+=this.constants_.OUTSIDE_CORNERS.topRight:nt.isPreviousConnection(m)&&m instanceof $l?this.outlinePath_+=m.shape.pathLeft:nt.isHat(m)?this.outlinePath_+=this.constants_.START_HAT.path:nt.isSpacer(m)&&(this.outlinePath_+=ln("h",m.width));this.outlinePath_+=ln("v",o.height)}drawJaggedEdge_(o){this.outlinePath_+=this.constants_.JAGGED_TEETH.path+ln("v",o.height-this.constants_.JAGGED_TEETH.height)}drawValueInput_(o){const l=o.getLastInput();this.positionExternalValueConnection_(o);const d=vd(l.shape)?l.shape.pathDown(l.height):l.shape.pathDown;this.outlinePath_+=ln("H",l.xPos+l.width)+d+ln("v",o.height-l.connectionHeight)}drawStatementInput_(o){var l=o.getLastInput();if(l){var d=l.xPos+l.notchOffset+l.shape.width;l=l.shape.pathRight+ln("h",-(l.notchOffset-this.constants_.INSIDE_CORNERS.width))+this.constants_.INSIDE_CORNERS.pathTop;var m=o.height-2*this.constants_.INSIDE_CORNERS.height;this.outlinePath_+=ln("H",d)+l+ln("v",m)+this.constants_.INSIDE_CORNERS.pathBottom+ln("H",o.xPos+o.width),this.positionStatementInputConnection_(o)}}drawRightSideRow_(o){this.outlinePath_+=ln("V",o.yPos+o.height)}drawBottom_(){const o=this.info_.bottomRow,l=o.elements;this.positionNextConnection_();let d=0,m="";for(let $=l.length-1,V;V=l[$];$--)nt.isNextConnection(V)&&V instanceof $l?m+=V.shape.pathRight:nt.isLeftSquareCorner(V)?m+=ln("H",o.xPos):nt.isLeftRoundedCorner(V)?m+=this.constants_.OUTSIDE_CORNERS.bottomLeft:nt.isRightRoundedCorner(V)?(m+=this.constants_.OUTSIDE_CORNERS.bottomRight,d=this.constants_.OUTSIDE_CORNERS.rightHeight):nt.isSpacer(V)&&(m+=ln("h",-1*V.width));this.outlinePath_+=ln("V",o.baseline-d),this.outlinePath_+=m}drawLeft_(){var o=this.info_.outputConnection;if(this.positionOutputConnection_(),o){const l=o.connectionOffsetY+o.height;o=vd(o.shape)?o.shape.pathUp(o.height):o.shape.pathUp,this.outlinePath_+=ln("V",l)+o}this.outlinePath_+="z"}drawInternals_(){for(let o=0,l;l=this.info_.rows[o];o++)for(let d=0,m;m=l.elements[d];d++)nt.isInlineInput(m)?this.drawInlineInput_(m):(nt.isIcon(m)||nt.isField(m))&&this.layoutField_(m)}layoutField_(o){const l=o.centerline-o.height/2;let d=o.xPos;var m="";this.info_.RTL&&(d=-(d+o.width),o.flipRtl&&(d+=o.width,m="scale(-1 1)")),nt.isIcon(o)?(m=o.icon,m.setOffsetInBlock(new zt(d,l)),this.info_.isInsertionMarker&&m.hideForInsertionMarker()):(o=o.field.getSvgRoot(),o.setAttribute("transform","translate("+d+","+l+")"+m),this.info_.isInsertionMarker&&o.setAttribute("display","none"))}drawInlineInput_(o){const l=o.width,d=o.height,m=o.connectionOffsetY,$=o.connectionHeight+m;this.inlinePath_+=Qs(o.xPos+o.connectionWidth,o.centerline-d/2)+ln("v",m)+o.shape.pathDown+ln("v",d-$)+ln("h",l-o.connectionWidth)+ln("v",-d)+"z",this.positionInlineInputConnection_(o)}positionInlineInputConnection_(o){const l=o.centerline-o.height/2;if(o.connectionModel){let d=o.xPos+o.connectionWidth+o.connectionOffsetX;this.info_.RTL&&(d*=-1),o.connectionModel.setOffsetInBlock(d,l+o.connectionOffsetY)}}positionStatementInputConnection_(o){const l=o.getLastInput();if(l!=null&&l.connectionModel){let d=o.xPos+o.statementEdge+l.notchOffset;this.info_.RTL&&(d*=-1),l.connectionModel.setOffsetInBlock(d,o.yPos)}}positionExternalValueConnection_(o){const l=o.getLastInput();if(l&&l.connectionModel){let d=o.xPos+o.width;this.info_.RTL&&(d*=-1),l.connectionModel.setOffsetInBlock(d,o.yPos)}}positionPreviousConnection_(){const o=this.info_.topRow;if(o.connection){const l=o.xPos+o.notchOffset;o.connection.connectionModel.setOffsetInBlock(this.info_.RTL?-l:l,0)}}positionNextConnection_(){const o=this.info_.bottomRow;if(o.connection){const l=o.connection,d=l.xPos;l.connectionModel.setOffsetInBlock(this.info_.RTL?-d:d,o.baseline)}}positionOutputConnection_(){if(this.info_.outputConnection){const o=this.info_.startX+this.info_.outputConnection.connectionOffsetX;this.block_.outputConnection.setOffsetInBlock(this.info_.RTL?-o:o,this.info_.outputConnection.connectionOffsetY)}}updateConnectionHighlights(){for(const o of this.info_.rows)for(const l of o.elements)if(l instanceof $l)if(l.highlighted)this.drawConnectionHighlightPath(l);else{let d,m;(m=(d=this.block_.pathObject).removeConnectionHighlight)==null||m.call(d,l.connectionModel)}}drawConnectionHighlightPath(o){const l=o.connectionModel;o=l.type===sn.INPUT_VALUE||l.type===sn.OUTPUT_VALUE?this.getExpressionConnectionHighlightPath(o):this.getStatementConnectionHighlightPath(o);const d=l.getSourceBlock();let m,$;($=(m=d.pathObject).addConnectionHighlight)==null||$.call(m,l,o,l.getOffsetInBlock(),d.RTL)}getExpressionConnectionHighlightPath(o){let l="";return vd(o.shape)?l=o.shape.pathDown(o.height):EI(o.shape)&&(l=o.shape.pathDown),o=this.constants_.TAB_OFFSET_FROM_TOP,Zo(0,-o)+ln("v",o)+l+ln("v",o)}getStatementConnectionHighlightPath(o){if(!Eb(o.shape))throw Error("Statement connections should have notch shapes");const l=this.constants_.NOTCH_OFFSET_LEFT-this.constants_.CORNER_RADIUS;return Zo(-l,0)+ln("h",l)+o.shape.pathLeft+ln("h",l)}};(function(o){o[o.LEFT=-1]="LEFT",o[o.CENTRE=0]="CENTRE",o[o.RIGHT=1]="RIGHT"})(n.Align$$module$build$src$core$inputs$align||(n.Align$$module$build$src$core$inputs$align={})),n.Align$$module$build$src$core$inputs$align;var ms=class extends so{constructor(o,l,d){super(so.SKIP_SETUP),this.class=null,this.EDITABLE=!1,this.maxDisplayLength=1/0,o!==so.SKIP_SETUP&&(d?this.configure_(d):this.class=l||null,this.setValue(o))}configure_(o){super.configure_(o),o.class&&(this.class=o.class)}initView(){this.createTextElement_(),this.class&&Se(this.getTextElement(),this.class)}doClassValidation_(o){return o==null?null:`${o}`}setClass(o){this.textElement_&&(this.class&&ut(this.textElement_,this.class),o&&Se(this.textElement_,o)),this.class=o}static fromJson(o){return new this(Os(o.text),void 0,o)}};si("field_label",ms),ms.prototype.DEFAULT_VALUE="";var Ls=class{constructor(o,l){this.name=o,this.sourceBlock=l,this.fieldRow=[],this.align=n.Align$$module$build$src$core$inputs$input.LEFT,this.visible=!0,this.type=n.inputTypes$$module$build$src$core$inputs$input_types.CUSTOM,this.connection=null}getSourceBlock(){return this.sourceBlock}appendField(o,l){return this.insertFieldAt(this.fieldRow.length,o,l),this}insertFieldAt(o,l,d){if(0>o||o>this.fieldRow.length)throw Error("index "+o+" out of bounds.");return(l||l===""&&d)&&(typeof l=="string"&&(l=n.fromJson$$module$build$src$core$field_registry({type:"field_label",text:l})),l.setSourceBlock(this.sourceBlock),this.sourceBlock.rendered&&(l.init(),l.applyColour()),l.name=d,l.setVisible(this.isVisible()),l.prefixField&&(o=this.insertFieldAt(o,l.prefixField)),this.fieldRow.splice(o,0,l),o++,l.suffixField&&(o=this.insertFieldAt(o,l.suffixField)),this.sourceBlock.rendered&&(this.sourceBlock.queueRender(),this.sourceBlock.bumpNeighbours())),o}removeField(o,l){for(let d=0,m;m=this.fieldRow[d];d++)if(m.name===o)return m.dispose(),this.fieldRow.splice(d,1),this.sourceBlock.rendered&&(this.sourceBlock.queueRender(),this.sourceBlock.bumpNeighbours()),!0;if(l)return!1;throw Error('Field "'+o+'" not found.')}isVisible(){return this.visible}setVisible(o){let l=[];if(this.visible===o)return l;this.visible=o;for(let m=0,$;$=this.fieldRow[m];m++)$.setVisible(o);if(this.connection){var d=this.connection;o?l=d.startTrackingAll():d.stopTrackingAll(),(d=d.targetBlock())&&(d.getSvgRoot().style.display=o?"block":"none")}return l}markDirty(){for(let o=0,l;l=this.fieldRow[o];o++)l.markDirty()}setCheck(o){if(!this.connection)throw Error("This input does not have a connection.");return this.connection.setCheck(o),this}setAlign(o){return this.align=o,this.sourceBlock.rendered&&this.sourceBlock.queueRender(),this}setShadowDom(o){if(!this.connection)throw Error("This input does not have a connection.");return this.connection.setShadowDom(o),this}getShadowDom(){if(!this.connection)throw Error("This input does not have a connection.");return this.connection.getShadowDom()}init(){if(this.sourceBlock.workspace.rendered)for(let o=0;o<this.fieldRow.length;o++)this.fieldRow[o].init()}dispose(){for(let o=0,l;l=this.fieldRow[o];o++)l.dispose();this.connection&&this.connection.dispose()}makeConnection(o){return this.sourceBlock.makeConnection_(o)}},f0;(function(o){o=o.Align||(o.Align={}),o[o.LEFT=-1]="LEFT",o[o.CENTRE=0]="CENTRE",o[o.RIGHT=1]="RIGHT"})(Ls),n.Align$$module$build$src$core$inputs$input=Ls.Align,f0={Align:n.Align$$module$build$src$core$inputs$input},f0.Input=Ls;var Ua=class extends Ls{constructor(o,l){super(o,l),this.name=o,this.type=n.inputTypes$$module$build$src$core$inputs$input_types.DUMMY}},Ac=class extends Ls{constructor(o,l){super(o,l),this.name=o,this.type=n.inputTypes$$module$build$src$core$inputs$input_types.END_ROW}},Sr=class extends Ls{constructor(o,l){if(!o)throw Error("Statement inputs must have a non-empty name");super(o,l),this.name=o,this.type=n.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT,this.connection=this.makeConnection(sn.NEXT_STATEMENT)}},p0;n.ValueInput$$module$build$src$core$inputs$value_input=class extends Ls{constructor(o,l){if(!o)throw Error("Value inputs must have a non-empty name");super(o,l),this.name=o,this.type=n.inputTypes$$module$build$src$core$inputs$input_types.VALUE,this.connection=this.makeConnection(sn.INPUT_VALUE)}},p0={},p0.ValueInput=n.ValueInput$$module$build$src$core$inputs$value_input;var Lf=class{constructor(o,l){this.statementEdge=this.width=this.widthWithChildren=this.height=0,this.rows=[],this.inputRows=[],this.startY=this.startX=0,this.renderer_=o,this.block_=l,this.constants_=this.renderer_.getConstants(),this.outputConnection=l.outputConnection?new d0(this.constants_,l.outputConnection):null,this.isInline=l.getInputsInline()&&!l.isCollapsed(),this.isCollapsed=l.isCollapsed(),this.isInsertionMarker=l.isInsertionMarker(),this.RTL=l.RTL,this.topRow=new wO(this.constants_),this.bottomRow=new ET(this.constants_)}getRenderer(){return this.renderer_}measure(){this.createRows_(),this.addElemSpacing_(),this.addRowSpacing_(),this.computeBounds_(),this.alignRowElements_(),this.finalize_()}createRows_(){this.populateTopRow_(),this.rows.push(this.topRow);let o=new AO(this.constants_);this.inputRows.push(o);var l=this.block_.getIcons();for(let d=0,m;m=l[d];d++){const $=new a0(this.constants_,m);this.isCollapsed&&!m.isShownWhenCollapsed()||o.elements.push($)}l=void 0;for(let d=0,m;m=this.block_.inputList[d];d++)if(m.isVisible()){this.shouldStartNewRow_(m,l)&&(this.rows.push(o),o=new AO(this.constants_),this.inputRows.push(o));for(let $=0,V;V=m.fieldRow[$];$++)o.elements.push(new Af(this.constants_,V,m));this.addInput_(m,o),l=m}this.isCollapsed&&(o.hasJaggedEdge=!0,o.elements.push(new c0(this.constants_))),(o.elements.length||o.hasDummyInput)&&this.rows.push(o),this.populateBottomRow_(),this.rows.push(this.bottomRow)}populateTopRow_(){var o=!!this.block_.previousConnection;const l=(this.block_.hat?this.block_.hat==="cap":this.constants_.ADD_START_HATS)&&!this.outputConnection&&!o;let d=this.topRow.hasLeftSquareCorner(this.block_)?Wd:Gd;this.topRow.elements.push(new d(this.constants_)),l?(o=new CO(this.constants_),this.topRow.elements.push(o),this.topRow.capline=o.ascenderHeight):o&&(this.topRow.hasPreviousConnection=!0,this.topRow.connection=new h0(this.constants_,this.block_.previousConnection),this.topRow.elements.push(this.topRow.connection)),this.block_.inputList.length&&this.block_.inputList[0]instanceof Sr&&!this.block_.isCollapsed()?this.topRow.minHeight=this.constants_.TOP_ROW_PRECEDES_STATEMENT_MIN_HEIGHT:this.topRow.minHeight=this.constants_.TOP_ROW_MIN_HEIGHT,d=this.topRow.hasRightSquareCorner(this.block_)?Wd:Gd,this.topRow.elements.push(new d(this.constants_,"right"))}populateBottomRow_(){this.bottomRow.hasNextConnection=!!this.block_.nextConnection,this.bottomRow.minHeight=this.block_.inputList.length&&this.block_.inputList[this.block_.inputList.length-1]instanceof Sr?this.constants_.BOTTOM_ROW_AFTER_STATEMENT_MIN_HEIGHT:this.constants_.BOTTOM_ROW_MIN_HEIGHT,this.bottomRow.hasLeftSquareCorner(this.block_)?this.bottomRow.elements.push(new Wd(this.constants_)):this.bottomRow.elements.push(new Gd(this.constants_)),this.bottomRow.hasNextConnection&&(this.bottomRow.connection=new u0(this.constants_,this.block_.nextConnection),this.bottomRow.elements.push(this.bottomRow.connection)),this.bottomRow.hasRightSquareCorner(this.block_)?this.bottomRow.elements.push(new Wd(this.constants_,"right")):this.bottomRow.elements.push(new Gd(this.constants_,"right"))}addInput_(o,l){this.isInline&&o instanceof n.ValueInput$$module$build$src$core$inputs$value_input?(l.elements.push(new MO(this.constants_,o)),l.hasInlineInput=!0):o instanceof Sr?(l.elements.push(new Bg(this.constants_,o)),l.hasStatement=!0):o instanceof n.ValueInput$$module$build$src$core$inputs$value_input?(l.elements.push(new vT(this.constants_,o)),l.hasExternalInput=!0):(o instanceof Ua||o instanceof Ac)&&(l.minHeight=Math.max(l.minHeight,o.getSourceBlock()&&o.getSourceBlock().isShadow()?this.constants_.DUMMY_INPUT_SHADOW_MIN_HEIGHT:this.constants_.DUMMY_INPUT_MIN_HEIGHT),l.hasDummyInput=!0),l.align===null&&(l.align=o.align)}shouldStartNewRow_(o,l){return l?l instanceof Ac||o instanceof Sr||l instanceof Sr?!0:o instanceof n.ValueInput$$module$build$src$core$inputs$value_input||o instanceof Ua||l instanceof n.ValueInput$$module$build$src$core$inputs$value_input?!this.isInline:!1:!1}addElemSpacing_(){for(let o=0,l;l=this.rows[o];o++){const d=l.elements;if(l.elements=[],l.startsWithElemSpacer()&&l.elements.push(new Kr(this.constants_,this.getInRowSpacing_(null,d[0]))),d.length){for(let m=0;m<d.length-1;m++){l.elements.push(d[m]);const $=this.getInRowSpacing_(d[m],d[m+1]);l.elements.push(new Kr(this.constants_,$))}l.elements.push(d[d.length-1]),l.endsWithElemSpacer()&&l.elements.push(new Kr(this.constants_,this.getInRowSpacing_(d[d.length-1],null)))}}}getInRowSpacing_(o,l){if(!o&&l&&nt.isStatementInput(l))return this.constants_.STATEMENT_INPUT_PADDING_LEFT;if(o&&nt.isInput(o)&&!l){if(nt.isExternalInput(o))return this.constants_.NO_PADDING;if(nt.isInlineInput(o))return this.constants_.LARGE_PADDING;if(nt.isStatementInput(o))return this.constants_.NO_PADDING}return o&&nt.isLeftSquareCorner(o)&&l&&(nt.isPreviousConnection(l)||nt.isNextConnection(l))?l.notchOffset:o&&nt.isLeftRoundedCorner(o)&&l&&(nt.isPreviousConnection(l)||nt.isNextConnection(l))?l.notchOffset-this.constants_.CORNER_RADIUS:this.constants_.MEDIUM_PADDING}computeBounds_(){let o=0,l=0,d=0;for(let $=0,V;V=this.rows[$];$++){if(V.measure(),l=Math.max(l,V.width),V.hasStatement){var m=V.getLastInput();let Ee,Ve;m=V.width-((Ve=(Ee=m)==null?void 0:Ee.width)!=null?Ve:0),o=Math.max(o,m)}d=Math.max(d,V.widthWithConnectedBlocks)}this.statementEdge=o,this.width=l;for(let $=0,V;V=this.rows[$];$++)V.hasStatement&&(V.statementEdge=this.statementEdge);this.widthWithChildren=Math.max(l,d),this.outputConnection&&(this.startX=this.outputConnection.width,this.width+=this.outputConnection.width,this.widthWithChildren+=this.outputConnection.width)}alignRowElements_(){for(let l=0,d;d=this.rows[l];l++)if(d.hasStatement)this.alignStatementRow_(d);else{var o=d.width;o=this.getDesiredRowWidth_(d)-o,0<o&&this.addAlignmentPadding_(d,o),nt.isTopOrBottomRow(d)&&(d.widthWithConnectedBlocks=d.width)}}getDesiredRowWidth_(o){return this.width-this.startX}addAlignmentPadding_(o,l){const d=o.getFirstSpacer(),m=o.getLastSpacer();if((o.hasExternalInput||o.hasStatement)&&(o.widthWithConnectedBlocks+=l),o.align===n.Align$$module$build$src$core$inputs$align.LEFT&&m)m.width+=l;else if(o.align===n.Align$$module$build$src$core$inputs$align.CENTRE&&d&&m)d.width+=l/2,m.width+=l/2;else if(o.align===n.Align$$module$build$src$core$inputs$align.RIGHT&&d)d.width+=l;else if(m)m.width+=l;else return;o.width+=l}alignStatementRow_(o){const l=o.getLastInput();if(l){var d=o.width-l.width,m=this.statementEdge;d=m-d,0<d&&this.addAlignmentPadding_(o,d),d=o.width,m=this.getDesiredRowWidth_(o),l.width+=m-d,l.height=Math.max(l.height,o.height),o.width+=m-d,o.widthWithConnectedBlocks=Math.max(o.width,this.statementEdge+o.connectedBlockWidths)}}addRowSpacing_(){const o=this.rows;this.rows=[];for(let l=0;l<o.length;l++)this.rows.push(o[l]),l!==o.length-1&&this.rows.push(this.makeSpacerRow_(o[l],o[l+1]))}makeSpacerRow_(o,l){var d=this.getSpacerRowHeight_(o,l);const m=this.getSpacerRowWidth_(o,l);return d=new LO(this.constants_,d,m),o.hasStatement&&(d.followsStatement=!0),l.hasStatement&&(d.precedesStatement=!0),d}getSpacerRowWidth_(o,l){return this.width-this.startX}getSpacerRowHeight_(o,l){return this.constants_.MEDIUM_PADDING}getElemCenterline_(o,l){return nt.isSpacer(l)?o.yPos+l.height/2:nt.isBottomRow(o)?(o=o.yPos+o.height-o.descenderHeight,nt.isNextConnection(l)?o+l.height/2:o-l.height/2):nt.isTopRow(o)?nt.isHat(l)?o.capline-l.height/2:o.capline+l.height/2:o.yPos+o.height/2}recordElemPositions_(o){let l=o.xPos;for(let d=0,m;m=o.elements[d];d++)nt.isSpacer(m)&&(m.height=o.height),m.xPos=l,m.centerline=this.getElemCenterline_(o,m),l+=m.width}finalize_(){let o=0,l=0;for(let d=0,m;m=this.rows[d];d++)m.yPos=l,m.xPos=this.startX,l+=m.height,o=Math.max(o,m.widthWithConnectedBlocks),this.recordElemPositions_(m);if(this.outputConnection&&this.block_.nextConnection){const d=this.block_.nextConnection.targetBlock();d&&(o=Math.max(o,d.getHeightWidth().width))}this.widthWithChildren=o+this.startX,this.height=l,this.startY=this.topRow.capline,this.bottomRow.baseline=l-this.bottomRow.descenderHeight}getMeasureableForConnection(o){let l;if(((l=this.outputConnection)==null?void 0:l.connectionModel)===o)return this.outputConnection;for(const d of this.rows)for(const m of d.elements)if(m instanceof $l&&m.connectionModel===o)return m;return null}},Pt=class{constructor(o,l,d){if(this.wsCoordinate=null,!l)throw Error("Cannot create a node without a location.");this.type=o,this.isConnectionLocation=Pt.isConnectionType(o),this.location=l,this.processParams(d||null)}processParams(o){o&&o.wsCoordinate&&(this.wsCoordinate=o.wsCoordinate)}getLocation(){return this.location}getType(){return this.type}getWsCoordinate(){return this.wsCoordinate}isConnection(){return this.isConnectionLocation}findNextForInput(){var o=this.location.getParentInput();const l=o.getSourceBlock();for(o=l.inputList.indexOf(o),o+=1;o<l.inputList.length;o++){const d=l.inputList[o],m=d.fieldRow;for(let $=0;$<m.length;$++){const V=m[$];if(V.isClickable()||Pt.NAVIGATE_ALL_FIELDS)return Pt.createFieldNode(V)}if(d.connection)return Pt.createInputNode(d)}return null}findNextForField(){var o=this.location,l=o.getParentInput();const d=o.getSourceBlock();if(!d)throw Error("The current AST location is not associated with a block");var m=d.inputList.indexOf(l);for(o=l.fieldRow.indexOf(o)+1;m<d.inputList.length;m++){l=d.inputList[m];const $=l.fieldRow;for(;o<$.length;){if($[o].isClickable()||Pt.NAVIGATE_ALL_FIELDS)return Pt.createFieldNode($[o]);o++}if(o=0,l.connection)return Pt.createInputNode(l)}return null}findPrevForInput(){const o=this.location.getParentInput(),l=o.getSourceBlock();for(var d=l.inputList.indexOf(o);0<=d;d--){var m=l.inputList[d];if(m.connection&&m!==o)return Pt.createInputNode(m);m=m.fieldRow;for(let $=m.length-1;0<=$;$--){const V=m[$];if(V.isClickable()||Pt.NAVIGATE_ALL_FIELDS)return Pt.createFieldNode(V)}}return null}findPrevForField(){var o=this.location;const l=o.getParentInput(),d=o.getSourceBlock();if(!d)throw Error("The current AST location is not associated with a block");var m=d.inputList.indexOf(l);for(o=l.fieldRow.indexOf(o)-1;0<=m;m--){var $=d.inputList[m];if($.connection&&$!==l)return Pt.createInputNode($);for($=$.fieldRow;-1<o;){if($[o].isClickable()||Pt.NAVIGATE_ALL_FIELDS)return Pt.createFieldNode($[o]);o--}0<=m-1&&(o=d.inputList[m-1].fieldRow.length-1)}return null}navigateBetweenStacks(o){var l=this.getLocation();if(l.getSourceBlock){var d=l.getSourceBlock();d&&(l=d)}if(!l||l.isDeadOrDying())return null;d=l.getRootBlock(),l=d.workspace.getTopBlocks(!0);for(let m=0;m<l.length;m++)if(d.id===l[m].id)return o=m+(o?1:-1),o===-1||o===l.length?null:Pt.createStackNode(l[o]);throw Error("Couldn't find "+(o?"next":"previous")+" stack?!")}findTopASTNodeForBlock(o){const l=ng(o);return l?Pt.createConnectionNode(l):Pt.createBlockNode(o)}getOutAstNodeForBlock(o){if(!o)return null;o=o.getTopStackBlock();const l=ng(o);return l&&l.targetConnection&&l.targetConnection.getParentInput()?Pt.createInputNode(l.targetConnection.getParentInput()):Pt.createStackNode(o)}findFirstFieldOrInput(o){o=o.inputList;for(let l=0;l<o.length;l++){const d=o[l],m=d.fieldRow;for(let $=0;$<m.length;$++){const V=m[$];if(V.isClickable()||Pt.NAVIGATE_ALL_FIELDS)return Pt.createFieldNode(V)}if(d.connection)return Pt.createInputNode(d)}return null}getSourceBlock(){return this.getType()===Pt.types.BLOCK?this.getLocation():this.getType()===Pt.types.STACK?this.getLocation():this.getType()===Pt.types.WORKSPACE?null:this.getLocation().getSourceBlock()}next(){switch(this.type){case Pt.types.STACK:return this.navigateBetweenStacks(!0);case Pt.types.OUTPUT:return Pt.createBlockNode(this.location.getSourceBlock());case Pt.types.FIELD:return this.findNextForField();case Pt.types.INPUT:return this.findNextForInput();case Pt.types.BLOCK:const o=this.location.nextConnection;if(!o)break;return Pt.createConnectionNode(o);case Pt.types.PREVIOUS:return Pt.createBlockNode(this.location.getSourceBlock());case Pt.types.NEXT:return Pt.createConnectionNode(this.location.targetConnection)}return null}in(){switch(this.type){case Pt.types.WORKSPACE:const o=this.location.getTopBlocks(!0);if(0<o.length)return Pt.createStackNode(o[0]);break;case Pt.types.STACK:return this.findTopASTNodeForBlock(this.location);case Pt.types.BLOCK:return this.findFirstFieldOrInput(this.location);case Pt.types.INPUT:return Pt.createConnectionNode(this.location.targetConnection)}return null}prev(){switch(this.type){case Pt.types.STACK:return this.navigateBetweenStacks(!1);case Pt.types.FIELD:return this.findPrevForField();case Pt.types.INPUT:return this.findPrevForInput();case Pt.types.BLOCK:var o=ng(this.location);if(!o)break;return Pt.createConnectionNode(o);case Pt.types.PREVIOUS:if((o=this.location.targetConnection)&&!o.getParentInput())return Pt.createConnectionNode(o);break;case Pt.types.NEXT:return Pt.createBlockNode(this.location.getSourceBlock())}return null}out(){switch(this.type){case Pt.types.STACK:var o=this.location,l=o.getRelativeToSurfaceXY();return l=new zt(l.x,l.y+Pt.DEFAULT_OFFSET_Y),Pt.createWorkspaceNode(o.workspace,l);case Pt.types.OUTPUT:return o=this.location,(l=o.targetConnection)?Pt.createConnectionNode(l):Pt.createStackNode(o.getSourceBlock());case Pt.types.FIELD:if(o=this.location.getSourceBlock(),!o)throw Error("The current AST location is not associated with a block");return Pt.createBlockNode(o);case Pt.types.INPUT:return Pt.createBlockNode(this.location.getSourceBlock());case Pt.types.BLOCK:return this.getOutAstNodeForBlock(this.location);case Pt.types.PREVIOUS:return this.getOutAstNodeForBlock(this.location.getSourceBlock());case Pt.types.NEXT:return this.getOutAstNodeForBlock(this.location.getSourceBlock())}return null}static isConnectionType(o){switch(o){case Pt.types.PREVIOUS:case Pt.types.NEXT:case Pt.types.INPUT:case Pt.types.OUTPUT:return!0}return!1}static createFieldNode(o){return o?new Pt(Pt.types.FIELD,o):null}static createConnectionNode(o){if(!o)return null;const l=o.type;return l===sn.INPUT_VALUE||l===sn.NEXT_STATEMENT&&o.getParentInput()?Pt.createInputNode(o.getParentInput()):l===sn.NEXT_STATEMENT?new Pt(Pt.types.NEXT,o):l===sn.OUTPUT_VALUE?new Pt(Pt.types.OUTPUT,o):l===sn.PREVIOUS_STATEMENT?new Pt(Pt.types.PREVIOUS,o):null}static createInputNode(o){return o&&o.connection?new Pt(Pt.types.INPUT,o.connection):null}static createBlockNode(o){return o?new Pt(Pt.types.BLOCK,o):null}static createStackNode(o){return o?new Pt(Pt.types.STACK,o):null}static createWorkspaceNode(o,l){return l&&o?new Pt(Pt.types.WORKSPACE,o,{wsCoordinate:l}):null}static createTopNode(o){const l=ng(o);return l?Pt.createConnectionNode(l):Pt.createBlockNode(o)}};Pt.NAVIGATE_ALL_FIELDS=!1,Pt.DEFAULT_OFFSET_Y=-20,function(o){o=o.types||(o.types={}),o.FIELD="field",o.BLOCK="block",o.INPUT="input",o.OUTPUT="output",o.NEXT="next",o.PREVIOUS="previous",o.STACK="stack",o.WORKSPACE="workspace"}(Pt);var bT=class extends gr{constructor(o,l,d,m){let $=o?o.workspace.id:void 0;m&&m.getType()===Pt.types.WORKSPACE&&($=m.getLocation().id),super($),this.type=Id,this.blockId=o==null?void 0:o.id,this.oldNode=d||void 0,this.newNode=m,this.isCursor=l}toJson(){const o=super.toJson();if(this.isCursor===void 0)throw Error("Whether this is a cursor event or not is undefined. Either pass a value to the constructor, or call fromJson");if(!this.newNode)throw Error("The new node is undefined. Either pass a node to the constructor, or call fromJson");return o.isCursor=this.isCursor,o.blockId=this.blockId,o.oldNode=this.oldNode,o.newNode=this.newNode,o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new bT),l.isCursor=o.isCursor,l.blockId=o.blockId,l.oldNode=o.oldNode,l.newNode=o.newNode,l}};s(At.EVENT,Id,bT);var pL="blocklyCursor",gL="blocklyMarker",mL=.75,OT=class{constructor(o,l,d){this.workspace=o,this.marker=d,this.markerSvgRect_=this.markerSvgLine_=this.markerInput_=this.markerBlock_=this.svgGroup_=this.markerSvg_=this.currentMarkerSvg=this.parent=null,this.constants_=l,o=this.isCursor()?this.constants_.CURSOR_COLOUR:this.constants_.MARKER_COLOUR,this.colour_=d.colour||o}getSvgRoot(){return this.svgGroup_}getMarker(){return this.marker}isCursor(){return this.marker.type==="cursor"}createDom(){const o=this.isCursor()?pL:gL;return this.svgGroup_=Ne(st.G,{class:o}),this.createDomInternal_(),this.svgGroup_}setParent_(o){this.isCursor()?(this.parent&&this.parent.setCursorSvg(null),o.setCursorSvg(this.getSvgRoot())):(this.parent&&this.parent.setMarkerSvg(null),o.setMarkerSvg(this.getSvgRoot())),this.parent=o}draw(o,l){if(l){this.constants_=this.workspace.getRenderer().getConstants();var d=this.isCursor()?this.constants_.CURSOR_COLOUR:this.constants_.MARKER_COLOUR;this.colour_=this.marker.colour||d,this.applyColour_(l),this.showAtLocation_(l),this.fireMarkerEvent(o,l),o=this.currentMarkerSvg.childNodes[0],o!==void 0&&o.beginElement&&o.beginElement()}else this.hide()}showAtLocation_(o){const l=o.getLocation().type;o.getType()===Pt.types.BLOCK?this.showWithBlock_(o):o.getType()===Pt.types.OUTPUT?this.showWithOutput_(o):l===sn.INPUT_VALUE?this.showWithInput_(o):l===sn.NEXT_STATEMENT?this.showWithNext_(o):o.getType()===Pt.types.PREVIOUS?this.showWithPrevious_(o):o.getType()===Pt.types.FIELD?this.showWithField_(o):o.getType()===Pt.types.WORKSPACE?this.showWithCoordinates_(o):o.getType()===Pt.types.STACK&&this.showWithStack_(o)}showWithBlockPrevOutput(o){o=o.getSourceBlock();const l=o.width;var d=o.height,m=d*mL;const $=this.constants_.CURSOR_BLOCK_PADDING;o.previousConnection?(d=this.constants_.shapeFor(o.previousConnection),this.positionPrevious_(l,$,m,d)):o.outputConnection?(m=this.constants_.shapeFor(o.outputConnection),this.positionOutput_(l,d,m)):this.positionBlock_(l,$,m),this.setParent_(o),this.showCurrent_()}showWithBlock_(o){this.showWithBlockPrevOutput(o)}showWithPrevious_(o){this.showWithBlockPrevOutput(o)}showWithOutput_(o){this.showWithBlockPrevOutput(o)}showWithCoordinates_(o){var l=o.getWsCoordinate();o=l.x,l=l.y,this.workspace.RTL&&(o-=this.constants_.CURSOR_WS_WIDTH),this.positionLine_(o,l,this.constants_.CURSOR_WS_WIDTH),this.setParent_(this.workspace),this.showCurrent_()}showWithField_(o){o=o.getLocation();const l=o.getSize().width,d=o.getSize().height;this.positionRect_(0,0,l,d),this.setParent_(o),this.showCurrent_()}showWithInput_(o){o=o.getLocation();const l=o.getSourceBlock();this.positionInput_(o),this.setParent_(l),this.showCurrent_()}showWithNext_(o){var l=o.getLocation();o=l.getSourceBlock();let d=0;l=l.getOffsetInBlock().y;const m=o.getHeightWidth().width;this.workspace.RTL&&(d=-m),this.positionLine_(d,l,m),this.setParent_(o),this.showCurrent_()}showWithStack_(o){o=o.getLocation();var l=o.getHeightWidth();const d=l.width+this.constants_.CURSOR_STACK_PADDING;l=l.height+this.constants_.CURSOR_STACK_PADDING;const m=-this.constants_.CURSOR_STACK_PADDING/2,$=-this.constants_.CURSOR_STACK_PADDING/2;let V=m;this.workspace.RTL&&(V=-(d+m)),this.positionRect_(V,$,d,l),this.setParent_(o),this.showCurrent_()}showCurrent_(){this.hide(),this.currentMarkerSvg&&(this.currentMarkerSvg.style.display="")}positionBlock_(o,l,d){if(o=Zo(-l,d)+ln("V",-l)+ln("H",o+2*l)+ln("V",d),!this.markerBlock_)throw Error("createDom should be called before positioning the marker");this.markerBlock_.setAttribute("d",o),this.workspace.RTL&&this.flipRtl(this.markerBlock_),this.currentMarkerSvg=this.markerBlock_}positionInput_(o){const l=o.getOffsetInBlock().x,d=o.getOffsetInBlock().y;o=Qs(0,0)+this.constants_.shapeFor(o).pathDown,this.markerInput_.setAttribute("d",o),this.markerInput_.setAttribute("transform","translate("+l+","+d+")"+(this.workspace.RTL?" scale(-1 1)":"")),this.currentMarkerSvg=this.markerInput_}positionLine_(o,l,d){if(!this.markerSvgLine_)throw Error("createDom should be called before positioning the line");this.markerSvgLine_.setAttribute("x",`${o}`),this.markerSvgLine_.setAttribute("y",`${l}`),this.markerSvgLine_.setAttribute("width",`${d}`),this.currentMarkerSvg=this.markerSvgLine_}positionOutput_(o,l,d){if(!this.markerBlock_)throw Error("createDom should be called before positioning the output");o=Zo(o,0)+ln("h",-(o-d.width))+ln("v",this.constants_.TAB_OFFSET_FROM_TOP)+d.pathDown+ln("V",l)+ln("H",o),this.markerBlock_.setAttribute("d",o),this.workspace.RTL&&this.flipRtl(this.markerBlock_),this.currentMarkerSvg=this.markerBlock_}positionPrevious_(o,l,d,m){if(!this.markerBlock_)throw Error("createDom should be called before positioning the previous connection marker");o=Zo(-l,d)+ln("V",-l)+ln("H",this.constants_.NOTCH_OFFSET_LEFT)+m.pathLeft+ln("H",o+2*l)+ln("V",d),this.markerBlock_.setAttribute("d",o),this.workspace.RTL&&this.flipRtl(this.markerBlock_),this.currentMarkerSvg=this.markerBlock_}positionRect_(o,l,d,m){if(!this.markerSvgRect_)throw Error("createDom should be called before positioning the rect");this.markerSvgRect_.setAttribute("x",`${o}`),this.markerSvgRect_.setAttribute("y",`${l}`),this.markerSvgRect_.setAttribute("width",`${d}`),this.markerSvgRect_.setAttribute("height",`${m}`),this.currentMarkerSvg=this.markerSvgRect_}flipRtl(o){o.setAttribute("transform","scale(-1 1)")}hide(){if(!(this.markerSvgLine_&&this.markerSvgRect_&&this.markerInput_&&this.markerBlock_))throw Error("createDom should be called before hiding the marker");this.markerSvgLine_.style.display="none",this.markerSvgRect_.style.display="none",this.markerInput_.style.display="none",this.markerBlock_.style.display="none"}fireMarkerEvent(o,l){const d=l.getSourceBlock();o=new(Ae(Id))(d,this.isCursor(),o,l),J(o)}getBlinkProperties_(){return{attributeType:"XML",attributeName:"fill",dur:"1s",values:this.colour_+";transparent;transparent;",repeatCount:"indefinite"}}createDomInternal_(){if(this.markerSvg_=Ne(st.G,{width:this.constants_.CURSOR_WS_WIDTH,height:this.constants_.WS_CURSOR_HEIGHT},this.svgGroup_),this.markerSvgLine_=Ne(st.RECT,{width:this.constants_.CURSOR_WS_WIDTH,height:this.constants_.WS_CURSOR_HEIGHT},this.markerSvg_),this.markerSvgRect_=Ne(st.RECT,{class:"blocklyVerticalMarker",rx:10,ry:10},this.markerSvg_),this.markerInput_=Ne(st.PATH,{transform:""},this.markerSvg_),this.markerBlock_=Ne(st.PATH,{transform:"",fill:"none","stroke-width":this.constants_.CURSOR_STROKE_WIDTH},this.markerSvg_),this.hide(),this.isCursor()){const o=this.getBlinkProperties_();Ne(st.ANIMATE,o,this.markerSvgLine_),Ne(st.ANIMATE,o,this.markerInput_),Ne(st.ANIMATE,Object.assign({},o,{attributeName:"stroke"}),this.markerBlock_)}return this.markerSvg_}applyColour_(o){if(!(this.markerSvgLine_&&this.markerSvgRect_&&this.markerInput_&&this.markerBlock_))throw Error("createDom should be called before applying color to the markerj");this.markerSvgLine_.setAttribute("fill",this.colour_),this.markerSvgRect_.setAttribute("stroke",this.colour_),this.markerInput_.setAttribute("fill",this.colour_),this.markerBlock_.setAttribute("stroke",this.colour_),this.isCursor()&&(o=this.colour_+";transparent;transparent;",this.markerSvgLine_.firstElementChild.setAttribute("values",o),this.markerInput_.firstElementChild.setAttribute("values",o),this.markerBlock_.firstElementChild.setAttribute("values",o))}dispose(){this.svgGroup_&&mt(this.svgGroup_)}},Hg=class{constructor(o,l,d){this.markerSvg=this.cursorSvg=null,this.connectionHighlights=new WeakMap,this.highlightOffsets=new WeakMap,this.constants=d,this.style=l,this.svgRoot=o,this.svgPath=Ne(st.PATH,{class:"blocklyPath"},this.svgRoot)}setPath(o){this.svgPath.setAttribute("d",o)}flipRTL(){this.svgPath.setAttribute("transform","scale(-1 1)")}setCursorSvg(o){o?(this.svgRoot.appendChild(o),this.cursorSvg=o):this.cursorSvg=null}setMarkerSvg(o){o?(this.cursorSvg?this.svgRoot.insertBefore(o,this.cursorSvg):this.svgRoot.appendChild(o),this.markerSvg=o):this.markerSvg=null}applyColour(o){this.svgPath.setAttribute("stroke",this.style.colourTertiary),this.svgPath.setAttribute("fill",this.style.colourPrimary),this.updateShadow_(o.isShadow()),this.updateDisabled_(!o.isEnabled()||o.getInheritedDisabled())}setStyle(o){this.style=o}setClass_(o,l){o&&(l?Se(this.svgRoot,o):ut(this.svgRoot,o))}updateHighlighted(o){o?this.svgPath.setAttribute("filter","url(#"+this.constants.embossFilterId+")"):this.svgPath.setAttribute("filter","none")}updateShadow_(o){o&&(this.svgPath.setAttribute("stroke","none"),this.svgPath.setAttribute("fill",this.style.colourSecondary))}updateDisabled_(o){this.setClass_("blocklyDisabled",o),o&&this.svgPath.setAttribute("fill","url(#"+this.constants.disabledPatternId+")")}updateSelected(o){this.setClass_("blocklySelected",o)}updateDraggingDelete(o){this.setClass_("blocklyDraggingDelete",o)}updateInsertionMarker(o){this.setClass_("blocklyInsertionMarker",o)}updateMovable(o){this.setClass_("blocklyDraggable",o)}updateReplacementFade(o){this.setClass_("blocklyReplaceable",o)}updateShapeForInputHighlight(o,l){}addConnectionHighlight(o,l,d,m){if(this.connectionHighlights.has(o)){if(this.currentHighlightMatchesNew(o,l,d))return;this.removeConnectionHighlight(o)}l=Ne(st.PATH,{class:"blocklyHighlightedConnectionPath",d:l,transform:`translate(${d.x}, ${d.y})`+(m?" scale(-1 1)":"")},this.svgRoot),this.connectionHighlights.set(o,l)}currentHighlightMatchesNew(o,l,d){let m;const $=(m=this.connectionHighlights.get(o))==null?void 0:m.getAttribute("d");return o=this.highlightOffsets.get(o),$===l&&zt.equals(o,d)}removeConnectionHighlight(o){const l=this.connectionHighlights.get(o);l&&(mt(l),this.connectionHighlights.delete(o))}},bo=class{constructor(o,l){this.type=l,this.targetConnection=null,this.disposed=!1,this.shadowDom=this.check=null,this.y=this.x=0,this.shadowState=null,this.sourceBlock_=o}connect_(o){const l=sn.INPUT_VALUE,d=this.getSourceBlock();var m=o.getSourceBlock();o.isConnected()&&o.disconnectInternal(!1);let $;if(this.isConnected()){const Ee=this.stashShadowState(),Ve=this.targetBlock();Ve.isShadow()?Ve.dispose(!1):(this.disconnectInternal(),$=Ve),this.applyShadowState(Ee)}let V;he()&&(V=new(Ae(n.MOVE$$module$build$src$core$events$utils))(m),V.setReason(["connect"])),Ia(this,o),m.setParent(d),V&&(V.recordNew(),J(V)),$&&(o=this.type===l?$.outputConnection:$.previousConnection)&&((m=bo.getConnectionForOrphanedConnection(m,o))?o.connect(m):o.onFailedConnect(this))}dispose(){if(this.isConnected()){this.setShadowStateInternal();const o=this.targetBlock();o&&!o.isDeadOrDying()&&o.unplug()}this.disposed=!0}getSourceBlock(){return this.sourceBlock_}isSuperior(){return this.type===sn.INPUT_VALUE||this.type===sn.NEXT_STATEMENT}isConnected(){return!!this.targetConnection}getConnectionChecker(){return this.sourceBlock_.workspace.connectionChecker}onFailedConnect(o){}connect(o){if(this.targetConnection===o)return!0;if(this.getConnectionChecker().canConnect(this,o,!1)){const l=n.getGroup$$module$build$src$core$events$utils();l||n.setGroup$$module$build$src$core$events$utils(!0),this.isSuperior()?this.connect_(o):o.connect_(this),n.setGroup$$module$build$src$core$events$utils(l)}return this.isConnected()}disconnect(){this.disconnectInternal()}disconnectInternal(o=!0){const{parentConnection:l,childConnection:d}=this.getParentAndChildConnections();if(!l||!d)throw Error("Source connection not connected.");const m=n.getGroup$$module$build$src$core$events$utils();m||n.setGroup$$module$build$src$core$events$utils(!0);let $;he()&&($=new(Ae(n.MOVE$$module$build$src$core$events$utils))(d.getSourceBlock()),$.setReason(["disconnect"]));const V=this.targetConnection;V&&(V.targetConnection=null),this.targetConnection=null,o&&d.getSourceBlock().setParent(null),$&&($.recordNew(),J($)),d.getSourceBlock().isShadow()||l.respawnShadow_(),n.setGroup$$module$build$src$core$events$utils(m)}getParentAndChildConnections(){return this.targetConnection?this.isSuperior()?{parentConnection:this,childConnection:this.targetConnection}:{parentConnection:this.targetConnection,childConnection:this}:{}}respawnShadow_(){this.createShadowBlock(!0)}reconnect(o,l){if(this.getSourceBlock().isDeadOrDying())return!1;var d;return l=(d=o.getInput(l))==null?void 0:d.connection,d=this.targetBlock(),d&&d!==o||!l||l.targetConnection===this?!1:(l.isConnected()&&l.disconnect(),l.connect(this),!0)}targetBlock(){if(this.isConnected()){let o,l;return(l=(o=this.targetConnection)==null?void 0:o.getSourceBlock())!=null?l:null}return null}onCheckChanged_(){!this.isConnected()||this.targetConnection&&this.getConnectionChecker().canConnect(this,this.targetConnection,!1)||(this.isSuperior()?this.targetBlock():this.sourceBlock_).unplug()}setCheck(o){return o?(Array.isArray(o)||(o=[o]),this.check=o,this.onCheckChanged_()):this.check=null,this}getCheck(){return this.check}setShadowDom(o){this.setShadowStateInternal({shadowDom:o})}getShadowDom(o){return o&&this.targetBlock().isShadow()?ou(this.targetBlock()):this.shadowDom}setShadowState(o){this.setShadowStateInternal({shadowState:o})}getShadowState(o){return o&&this.targetBlock()&&this.targetBlock().isShadow()?Wl(this.targetBlock()):this.shadowState}neighbours(o){return[]}getParentInput(){let o=null;const l=this.sourceBlock_.inputList;for(let d=0;d<l.length;d++)if(l[d].connection===this){o=l[d];break}return o}toString(){const o=this.sourceBlock_;if(!o)return"Orphan Connection";if(o.outputConnection===this)var l="Output Connection of ";else if(o.previousConnection===this)l="Previous Connection of ";else if(o.nextConnection===this)l="Next Connection of ";else{l=null;for(let d=0,m;m=o.inputList[d];d++)if(m.connection===this){l=m;break}if(l)l='Input "'+l.name+'" connection on ';else return console.warn("Connection not actually connected to sourceBlock_"),"Orphan Connection"}return l+o.toDevString()}stashShadowState(){const o=this.getShadowDom(!0),l=this.getShadowState(!0);return this.shadowState=this.shadowDom=null,{shadowDom:o,shadowState:l}}applyShadowState({shadowDom:o,shadowState:l}){this.shadowDom=o,this.shadowState=l}setShadowStateInternal({shadowDom:o=null,shadowState:l=null}={}){this.shadowDom=o,this.shadowState=l,(o=this.targetBlock())?o.isShadow()?(o.dispose(!1),this.getSourceBlock().isDeadOrDying()||(this.respawnShadow_(),this.targetBlock()&&this.targetBlock().isShadow()&&this.serializeShadow(this.targetBlock()))):(o=this.createShadowBlock(!1),this.serializeShadow(o),o&&o.dispose(!1)):(this.respawnShadow_(),this.targetBlock()&&this.targetBlock().isShadow()&&this.serializeShadow(this.targetBlock()))}createShadowBlock(o){var l=this.getSourceBlock();const d=this.getShadowState(),m=this.getShadowDom();if(l.isDeadOrDying()||!d&&!m)return null;if(d)return l=Uh(d,l.workspace,{parentConnection:o?this:void 0,isShadow:!0,recordUndo:!1});if(m){if(l=su(m,l.workspace),o)if(this.type===sn.INPUT_VALUE){if(!l.outputConnection)throw Error("Shadow block is missing an output connection");if(!this.connect(l.outputConnection))throw Error("Could not connect shadow block to connection")}else if(this.type===sn.NEXT_STATEMENT){if(!l.previousConnection)throw Error("Shadow block is missing previous connection");if(!this.connect(l.previousConnection))throw Error("Could not connect shadow block to connection")}else throw Error("Cannot connect a shadow block to a previous/output connection");return l}return null}serializeShadow(o){o&&(this.shadowDom=ou(o),this.shadowState=Wl(o))}static getConnectionForOrphanedConnection(o,l){if(l.type===sn.OUTPUT_VALUE)return du(o,l.getSourceBlock());o=o.lastConnectionInStack(!0);const d=l.getConnectionChecker();return o&&d.canConnect(l,o,!1)?o:null}};bo.CAN_CONNECT=0,bo.REASON_SELF_CONNECTION=1,bo.REASON_WRONG_TYPE=2,bo.REASON_TARGET_NULL=3,bo.REASON_CHECKS_FAILED=4,bo.REASON_DIFFERENT_WORKSPACES=5,bo.REASON_SHADOW_PARENT=6,bo.REASON_DRAG_CHECKS_FAILED=7,bo.REASON_PREVIOUS_AND_OUTPUT=8;var Xd="_TEMP_COLLAPSED_INPUT",ST="_TEMP_COLLAPSED_FIELD",_L={COLLAPSED_FIELD_NAME:ST,COLLAPSED_INPUT_NAME:Xd},zd="The insertion marker manager tried to create a marker but the result is missing %1. If you are using a mutator, make sure your domToMutation method is properly defined.",ta=class{constructor(o){this.activeCandidate=this.lastMarker=this.lastOnStack=null,this.wouldDeleteBlock=!1,this.fadedBlock=this.highlightedBlock=this.markerConnection=null,I(o),this.topBlock=o,this.workspace=o.workspace,this.firstMarker=this.createMarkerBlock(this.topBlock),this.availableConnections=this.initAvailableConnections(),this.lastOnStack&&(this.lastMarker=this.createMarkerBlock(this.lastOnStack.getSourceBlock()))}dispose(){this.availableConnections.length=0,this.disposeInsertionMarker(this.firstMarker),this.disposeInsertionMarker(this.lastMarker)}updateAvailableConnections(){this.availableConnections=this.initAvailableConnections()}wouldConnectBlock(){return!!this.activeCandidate}applyConnections(){if(this.activeCandidate){n.disable$$module$build$src$core$events$utils(),this.hidePreview(),n.enable$$module$build$src$core$events$utils();var{local:o,closest:l}=this.activeCandidate;if(o.connect(l),this.topBlock.rendered){const d=o.isSuperior()?l:o,m=this.topBlock.getRootBlock();pc().then(()=>{p_(d.getSourceBlock()),setTimeout(()=>{m.bringToFront()},0)})}}}update(o,l){const d=this.getCandidate(o);((this.wouldDeleteBlock=this.shouldDelete(!!d,l))||this.shouldUpdatePreviews(d,o))&&(n.disable$$module$build$src$core$events$utils(),this.maybeHidePreview(d),this.maybeShowPreview(d),n.enable$$module$build$src$core$events$utils())}createMarkerBlock(o){var l=o.type;n.disable$$module$build$src$core$events$utils();let d;try{if(d=this.workspace.newBlock(l),d.setInsertionMarker(!0),o.saveExtraState){var m=o.saveExtraState(!0);m&&d.loadExtraState&&d.loadExtraState(m)}else if(o.mutationToDom){const $=o.mutationToDom();$&&d.domToMutation&&d.domToMutation($)}for(l=0;l<o.inputList.length;l++){const $=o.inputList[l];if($.name===Xd)continue;const V=d.inputList[l];if(!V)throw Error(zd.replace("%1","an input"));for(m=0;m<$.fieldRow.length;m++){const Ee=$.fieldRow[m],Ve=V.fieldRow[m];if(!Ve)throw Error(zd.replace("%1","a field"));Ve.setValue(Ee.getValue())}}for(const $ of d.getDescendants(!1))$.setInsertionMarker(!0);d.setCollapsed(o.isCollapsed()),d.setInputsInline(o.getInputsInline()),d.initSvg(),d.getSvgRoot().setAttribute("visibility","hidden")}finally{n.enable$$module$build$src$core$events$utils()}return d}initAvailableConnections(){const o=this.topBlock.getConnections_(!1),l=this.topBlock.lastConnectionInStack(!0);return l&&l!==this.topBlock.nextConnection&&(o.push(l),this.lastOnStack=l),o}shouldUpdatePreviews(o,l){if(!o)return!!this.activeCandidate;if(!this.activeCandidate)return!0;const{local:d,closest:m}=this.activeCandidate;if(m===o.closest&&d===o.local)return!1;const $=d.x+l.x-m.x;return l=d.y+l.y-m.y,o.radius<Math.sqrt($*$+l*l)-n.config$$module$build$src$core$config.currentConnectionPreference}getCandidate(o){this.markerConnection&&this.markerConnection.isConnected()||this.updateAvailableConnections();let l=this.getStartRadius(),d=null;for(let m=0;m<this.availableConnections.length;m++){const $=this.availableConnections[m],V=$.closest(l,o);V.connection&&(d={closest:V.connection,local:$,radius:V.radius},l=V.radius)}return d}getStartRadius(){return this.activeCandidate?n.config$$module$build$src$core$config.connectingSnapRadius:n.config$$module$build$src$core$config.snapRadius}shouldDelete(o,l){return l&&this.workspace.getComponentManager().hasCapability(l.id,Gs.Capability.DELETE_AREA)?l.wouldDelete(this.topBlock,o):!1}maybeShowPreview(o){if(!this.wouldDeleteBlock&&o){var l=o.closest,d;l===((d=this.activeCandidate)==null?void 0:d.closest)||l.getSourceBlock().isInsertionMarker()?console.log("Trying to connect to an insertion marker"):(this.activeCandidate=o,this.showPreview(this.activeCandidate))}}showPreview(o){const l=this.workspace.getRenderer();switch(l.getConnectionPreviewMethod(o.closest,o.local,this.topBlock)){case ta.PREVIEW_TYPE.INPUT_OUTLINE:this.showInsertionInputOutline(o);break;case ta.PREVIEW_TYPE.INSERTION_MARKER:this.showInsertionMarker(o);break;case ta.PREVIEW_TYPE.REPLACEMENT_FADE:this.showReplacementFade(o)}l.shouldHighlightConnection(o.closest)&&o.closest.highlight()}maybeHidePreview(o){if(!o)this.hidePreview();else if(this.activeCandidate){const l=this.activeCandidate.local!==o.local;(this.activeCandidate.closest!==o.closest||l||this.wouldDeleteBlock)&&this.hidePreview()}this.activeCandidate=this.markerConnection=null}hidePreview(){let o;const l=(o=this.activeCandidate)==null?void 0:o.closest;l&&l.targetBlock()&&this.workspace.getRenderer().shouldHighlightConnection(l)&&l.unhighlight(),this.hideReplacementFade(),this.hideInsertionInputOutline(),this.hideInsertionMarker()}showInsertionMarker(o){const{local:l,closest:d}=o;let m=(o=this.lastOnStack&&l===this.lastOnStack)?this.lastMarker:this.firstMarker;if(!m)throw Error("Cannot show the insertion marker because there is no insertion marker block");let $;try{$=m.getMatchingConnection(l.getSourceBlock(),l)}catch{if(o&&this.lastOnStack?(this.disposeInsertionMarker(this.lastMarker),m=this.lastMarker=this.createMarkerBlock(this.lastOnStack.getSourceBlock())):(this.disposeInsertionMarker(this.firstMarker),m=this.firstMarker=this.createMarkerBlock(this.topBlock)),!m)throw Error("Cannot show the insertion marker because there is no insertion marker block");$=m.getMatchingConnection(l.getSourceBlock(),l)}if(!$)throw Error("Cannot show the insertion marker because there is no associated connection");if($===this.markerConnection)throw Error("Made it to showInsertionMarker_ even though the marker isn't changing");m.queueRender(),ki(),$.connect(d);const V={x:d.x-$.x,y:d.y-$.y},Ee=$.getOffsetInBlock().clone(),Ve=$;pc().then(()=>{let St;(St=m)==null||St.positionNearConnection(Ve,V,Ee);let tn;(tn=m)==null||tn.getSvgRoot().setAttribute("visibility","visible")}),this.markerConnection=$}hideInsertionMarker(){if(this.markerConnection){var o=this.markerConnection,l=o.getSourceBlock(),d=l.outputConnection,m;if((m=l.previousConnection)!=null&&m.targetConnection||d!=null&&d.targetConnection)l.unplug(!0);else{let $;($=o.targetBlock())==null||$.unplug(!1)}if(o.targetConnection)throw Error("markerConnection still connected at the end of disconnectInsertionMarker");this.markerConnection=null,(o=l.getSvgRoot())&&o.setAttribute("visibility","hidden")}}showInsertionInputOutline(o){o=o.closest,this.highlightedBlock=o.getSourceBlock(),this.highlightedBlock.highlightShapeForInput(o,!0)}hideInsertionInputOutline(){if(this.highlightedBlock){if(!this.activeCandidate)throw Error("Cannot hide the insertion marker outline because there is no active candidate");this.highlightedBlock.highlightShapeForInput(this.activeCandidate.closest,!1),this.highlightedBlock=null}}showReplacementFade(o){if(this.fadedBlock=o.closest.targetBlock(),!this.fadedBlock)throw Error("Cannot show the replacement fade because the closest connection does not have a target block");this.fadedBlock.fadeForReplacement(!0)}hideReplacementFade(){this.fadedBlock&&(this.fadedBlock.fadeForReplacement(!1),this.fadedBlock=null)}getInsertionMarkers(){const o=[];return this.firstMarker&&o.push(this.firstMarker),this.lastMarker&&o.push(this.lastMarker),o}disposeInsertionMarker(o){if(o){n.disable$$module$build$src$core$events$utils();try{o.dispose()}finally{n.enable$$module$build$src$core$events$utils()}}}};(function(o){o=o.PREVIEW_TYPE||(o.PREVIEW_TYPE={}),o[o.INSERTION_MARKER=0]="INSERTION_MARKER",o[o.INPUT_OUTLINE=1]="INPUT_OUTLINE",o[o.REPLACEMENT_FADE=2]="REPLACEMENT_FADE"})(ta),ta.PREVIEW_TYPE;var Vg=class{constructor(o){this.overrides=null,this.name=o}getClassName(){return this.name+"-renderer"}init(o,l){this.constants_=this.makeConstants_(),l&&(this.overrides=l,Object.assign(this.constants_,l)),this.constants_.setTheme(o),this.constants_.init()}createDom(o,l){this.constants_.createDom(o,this.name+"-"+l.name,"."+this.getClassName()+"."+l.getClassName())}refreshDom(o,l){const d=this.getConstants();d.dispose(),this.constants_=this.makeConstants_(),this.overrides&&Object.assign(this.constants_,this.overrides),this.constants_.randomIdentifier=d.randomIdentifier,this.constants_.setTheme(l),this.constants_.init(),this.createDom(o,l)}dispose(){this.constants_&&this.constants_.dispose()}makeConstants_(){return new Fg}makeRenderInfo_(o){return new Lf(this,o)}makeDrawer_(o,l){return new Ug(o,l)}makeMarkerDrawer(o,l){return new OT(o,this.getConstants(),l)}makePathObject(o,l){return new Hg(o,l,this.constants_)}getConstants(){return this.constants_}shouldHighlightConnection(o){return!0}orphanCanConnectAtEnd(o,l,d){return!!bo.getConnectionForOrphanedConnection(o,d===sn.OUTPUT_VALUE?l.outputConnection:l.previousConnection)}getConnectionPreviewMethod(o,l,d){return ct("getConnectionPreviewMethod","v10","v12","an IConnectionPreviewer, if it fulfills your use case."),l.type===sn.OUTPUT_VALUE||l.type===sn.PREVIOUS_STATEMENT?!o.isConnected()||this.orphanCanConnectAtEnd(d,o.targetBlock(),l.type)?ta.PREVIEW_TYPE.INSERTION_MARKER:ta.PREVIEW_TYPE.REPLACEMENT_FADE:ta.PREVIEW_TYPE.INSERTION_MARKER}render(o){const l=this.makeRenderInfo_(o);l.measure(),this.makeDrawer_(o,l).draw()}},wo={};wo.BottomRow=ET,wo.Connection=$l,wo.ConstantProvider=Fg,wo.Drawer=Ug,wo.ExternalValueInput=vT,wo.Field=Af,wo.Hat=CO,wo.Icon=a0,wo.InRowSpacer=Kr,wo.InlineInput=MO,wo.InputConnection=yu,wo.InputRow=AO,wo.JaggedEdge=c0,wo.MarkerSvg=OT,wo.Measurable=no,wo.NextConnection=u0,wo.OutputConnection=d0,wo.PathObject=Hg,wo.PreviousConnection=h0,wo.RenderInfo=Lf,wo.Renderer=Vg,wo.RoundCorner=Gd,wo.Row=xg,wo.SpacerRow=LO,wo.SquareCorner=Wd,wo.StatementInput=Bg,wo.TopRow=wO,wo.Types=nt,wo.init=S_,wo.register=mi,wo.unregister=vI;var g0=class{constructor(o,l){this.workspace=o,this.theme=l,this.subscribedWorkspaces_=[],this.componentDB=new Map}getTheme(){return this.theme}setTheme(o){var l=this.theme;this.theme=o,(o=this.workspace.getInjectionDiv())&&(l&&(l=l.getClassName())&&ut(o,l),(l=this.theme.getClassName())&&Se(o,l));for(let d=0,m;m=this.subscribedWorkspaces_[d];d++)m.refreshTheme();for(const[d,m]of this.componentDB)for(const $ of m){o=$.element,l=$.propertyName;const V=this.theme&&this.theme.getComponentStyle(d);o.style.setProperty(l,V||"")}for(const d of this.subscribedWorkspaces_)d.hideChaff()}subscribeWorkspace(o){this.subscribedWorkspaces_.push(o)}unsubscribeWorkspace(o){if(!Te(this.subscribedWorkspaces_,o))throw Error("Cannot unsubscribe a workspace that hasn't been subscribed.")}subscribe(o,l,d){this.componentDB.has(l)||this.componentDB.set(l,[]),this.componentDB.get(l).push({element:o,propertyName:d}),l=this.theme&&this.theme.getComponentStyle(l),o.style.setProperty(d,l||"")}unsubscribe(o){if(o)for(const[l,d]of this.componentDB){for(let m=d.length-1;0<=m;m--)d[m].element===o&&d.splice(m,1);d.length||this.componentDB.delete(l)}}dispose(){this.subscribedWorkspaces_.length=0,this.componentDB.clear()}},kO="VARIABLE_DYNAMIC",Yd={CATEGORY_NAME:kO};Yd.flyoutCategory=og,Yd.flyoutCategoryBlocks=vb,Yd.onCreateVariableButtonClick_Colour=Ra,Yd.onCreateVariableButtonClick_Number=bd,Yd.onCreateVariableButtonClick_String=y_;var NO=class{canConnect(o,l,d,m){return this.canConnectWithReason(o,l,d,m)===bo.CAN_CONNECT}canConnectWithReason(o,l,d,m){const $=this.doSafetyChecks(o,l);return $!==bo.CAN_CONNECT?$:this.doTypeChecks(o,l)?d&&!this.doDragChecks(o,l,m||0)?bo.REASON_DRAG_CHECKS_FAILED:bo.CAN_CONNECT:bo.REASON_CHECKS_FAILED}getErrorMessage(o,l,d){switch(o){case bo.REASON_SELF_CONNECTION:return"Attempted to connect a block to itself.";case bo.REASON_DIFFERENT_WORKSPACES:return"Blocks not on same workspace.";case bo.REASON_WRONG_TYPE:return"Attempt to connect incompatible types.";case bo.REASON_TARGET_NULL:return"Target connection is null.";case bo.REASON_CHECKS_FAILED:return"Connection checks failed. "+(l+" expected "+l.getCheck()+", found "+d.getCheck());case bo.REASON_SHADOW_PARENT:return"Connecting non-shadow to shadow block.";case bo.REASON_DRAG_CHECKS_FAILED:return"Drag checks failed.";case bo.REASON_PREVIOUS_AND_OUTPUT:return"Block would have an output and a previous connection.";default:return"Unknown connection failure: this should never happen!"}}doSafetyChecks(o,l){if(!o||!l)return bo.REASON_TARGET_NULL;let d,m,$;return o.isSuperior()?(d=o.getSourceBlock(),m=l.getSourceBlock(),$=l):(m=o.getSourceBlock(),d=l.getSourceBlock(),$=o,o=l),d===m?bo.REASON_SELF_CONNECTION:$.type!==Rc[o.type]?bo.REASON_WRONG_TYPE:d.workspace!==m.workspace?bo.REASON_DIFFERENT_WORKSPACES:d.isShadow()&&!m.isShadow()?bo.REASON_SHADOW_PARENT:$.type===sn.OUTPUT_VALUE&&m.previousConnection&&m.previousConnection.isConnected()||$.type===sn.PREVIOUS_STATEMENT&&m.outputConnection&&m.outputConnection.isConnected()?bo.REASON_PREVIOUS_AND_OUTPUT:bo.CAN_CONNECT}doTypeChecks(o,l){if(o=o.getCheck(),l=l.getCheck(),!o||!l)return!0;for(let d=0;d<o.length;d++)if(l.indexOf(o[d])!==-1)return!0;return!1}doDragChecks(o,l,d){if(o.distanceFrom(l)>d||l.getSourceBlock().isInsertionMarker())return!1;switch(l.type){case sn.PREVIOUS_STATEMENT:return this.canConnectToPrevious_(o,l);case sn.OUTPUT_VALUE:if(l.isConnected()&&!l.targetBlock().isInsertionMarker()||o.isConnected())return!1;break;case sn.INPUT_VALUE:if(l.isConnected()&&!l.targetBlock().isMovable()&&!l.targetBlock().isShadow())return!1;break;case sn.NEXT_STATEMENT:if(l.isConnected()&&!o.getSourceBlock().nextConnection&&!l.targetBlock().isShadow()&&l.targetBlock().nextConnection||l.targetBlock()&&!l.targetBlock().isMovable()&&!l.targetBlock().isShadow())return!1;break;default:return!1}return Gr.indexOf(l)===-1}canConnectToPrevious_(o,l){return o.targetConnection||Gr.indexOf(l)!==-1?!1:l.targetConnection?(o=l.targetBlock(),o.isInsertionMarker()?!o.getPreviousBlock():!1):!0}};s(At.CONNECTION_CHECKER,Ca,NO);var PO=class extends pf{constructor(o){super(o),this.type=mu,o&&(this.varType=o.type,this.varName=o.name)}toJson(){const o=super.toJson();if(this.varType===void 0)throw Error("The var type is undefined. Either pass a variable to the constructor, or call fromJson");if(!this.varName)throw Error("The var name is undefined. Either pass a variable to the constructor, or call fromJson");return o.varType=this.varType,o.varName=this.varName,o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new PO),l.varType=o.varType,l.varName=o.varName,l}run(o){const l=this.getEventWorkspace_();if(!this.varId)throw Error("The var ID is undefined. Either pass a variable to the constructor, or call fromJson");if(!this.varName)throw Error("The var name is undefined. Either pass a variable to the constructor, or call fromJson");o?l.deleteVariableById(this.varId):l.createVariable(this.varName,this.varType,this.varId)}};s(At.EVENT,mu,PO);var DO=class extends pf{constructor(o,l){super(o),this.type=yd,o&&(this.oldName=o.name,this.newName=typeof l>"u"?"":l)}toJson(){const o=super.toJson();if(!this.oldName)throw Error("The old var name is undefined. Either pass a variable to the constructor, or call fromJson");if(!this.newName)throw Error("The new var name is undefined. Either pass a value to the constructor, or call fromJson");return o.oldName=this.oldName,o.newName=this.newName,o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new DO),l.oldName=o.oldName,l.newName=o.newName,l}run(o){const l=this.getEventWorkspace_();if(!this.varId)throw Error("The var ID is undefined. Either pass a variable to the constructor, or call fromJson");if(!this.oldName)throw Error("The old var name is undefined. Either pass a variable to the constructor, or call fromJson");if(!this.newName)throw Error("The new var name is undefined. Either pass a value to the constructor, or call fromJson");o?l.renameVariableById(this.varId,this.newName):l.renameVariableById(this.varId,this.oldName)}};s(At.EVENT,yd,DO);var xO=class{constructor(o){this.workspace=o,this.variableMap=new Map}clear(){for(const o of this.variableMap.values())for(;0<o.length;)this.deleteVariable(o[0]);if(this.variableMap.size!==0)throw Error("Non-empty variable map")}renameVariable(o,l){if(o.name!==l){var d=this.getVariable(l,o.type),m=this.workspace.getAllBlocks(!1),$=n.getGroup$$module$build$src$core$events$utils();$||n.setGroup$$module$build$src$core$events$utils(!0);try{d&&d.getId()!==o.getId()?this.renameVariableWithConflict_(o,l,d,m):this.renameVariableAndUses_(o,l,m)}finally{n.setGroup$$module$build$src$core$events$utils($)}}}renameVariableById(o,l){const d=this.getVariableById(o);if(!d)throw Error("Tried to rename a variable that didn't exist. ID: "+o);this.renameVariable(d,l)}renameVariableAndUses_(o,l,d){for(J(new(Ae(yd))(o,l)),o.name=l,l=0;l<d.length;l++)d[l].updateVarName(o)}renameVariableWithConflict_(o,l,d,m){const $=o.type;for(l!==d.name&&this.renameVariableAndUses_(d,l,m),l=0;l<m.length;l++)m[l].renameVarById(o.getId(),d.getId());J(new(Ae(mu))(o)),Te(this.variableMap.get($),o)}createVariable(o,l,d){var m=this.getVariable(o,l);if(m){if(d&&m.getId()!==d)throw Error('Variable "'+o+'" is already in use and its id is "'+m.getId()+'" which conflicts with the passed in id, "'+d+'".');return m}if(d&&this.getVariableById(d))throw Error('Variable id, "'+d+'", is already in use.');return m=d||G(),l=l||"",m=new gf(this.workspace,o,l,m),o=this.variableMap.get(l)||[],o.push(m),this.variableMap.delete(l),this.variableMap.set(l,o),J(new(Ae(zi))(m)),m}deleteVariable(o){const l=o.getId(),d=this.variableMap.get(o.type);if(d){for(let m=0;m<d.length;m++)if(d[m].getId()===l){d.splice(m,1),J(new(Ae(mu))(o)),d.length===0&&this.variableMap.delete(o.type);break}}}deleteVariableById(o){const l=this.getVariableById(o);if(l){var d=l.name;const m=this.getVariableUsesById(o);for(let $=0,V;V=m[$];$++)if(V.type==="procedures_defnoreturn"||V.type==="procedures_defreturn"){o=String(V.getFieldValue("NAME")),d=n.Msg$$module$build$src$core$msg.CANNOT_DELETE_VARIABLE_PROCEDURE.replace("%1",d).replace("%2",o),_t(d);return}1<m.length?(d=n.Msg$$module$build$src$core$msg.DELETE_VARIABLE_CONFIRMATION.replace("%1",String(m.length)).replace("%2",d),bn(d,$=>{$&&l&&this.deleteVariableInternal(l,m)})):this.deleteVariableInternal(l,m)}else console.warn("Can't delete non-existent variable: "+o)}deleteVariableInternal(o,l){const d=n.getGroup$$module$build$src$core$events$utils();d||n.setGroup$$module$build$src$core$events$utils(!0);try{for(let m=0;m<l.length;m++)l[m].dispose(!0);this.deleteVariable(o)}finally{n.setGroup$$module$build$src$core$events$utils(d)}}getVariable(o,l){if(l=this.variableMap.get(l||"")){for(let d=0,m;m=l[d];d++)if(n.Names$$module$build$src$core$names.equals(m.name,o))return m}return null}getVariableById(o){for(const l of this.variableMap.values())for(const d of l)if(d.getId()===o)return d;return null}getVariablesOfType(o){return(o=this.variableMap.get(o||""))?o.slice():[]}getVariableTypes(o){const l=new Set(this.variableMap.keys());if(o&&o.getPotentialVariableMap())for(const d of o.getPotentialVariableMap().variableMap.keys())l.add(d);return l.has("")||l.add(""),Array.from(l.values())}getAllVariables(){let o=[];for(const l of this.variableMap.values())o=o.concat(l);return o}getAllVariableNames(){return Array.from(this.variableMap.values()).flat().map(o=>o.name)}getVariableUsesById(o){const l=[],d=this.workspace.getAllBlocks(!1);for(let m=0;m<d.length;m++){const $=d[m].getVarModels();if($)for(let V=0;V<$.length;V++)$[V].getId()===o&&l.push(d[m])}return l}},Gg=class{get isFlyout(){return this.internalIsFlyout}get isMutator(){return this.internalIsMutator}constructor(o){this.isClearing=this.internalIsMutator=this.internalIsFlyout=this.rendered=!1,this.MAX_UNDO=1024,this.connectionDBList=[],this.topBlocks=[],this.topComments=[],this.commentDB=new Map,this.listeners=[],this.undoStack_=[],this.redoStack_=[],this.blockDB=new Map,this.typedBlocksDB=new Map,this.procedureMap=new pT,this.potentialVariableMap=null,this.id=G(),v(this),this.options=o||new as({}),this.RTL=!!this.options.RTL,this.horizontalLayout=!!this.options.horizontalLayout,this.toolboxPosition=this.options.toolboxPosition,this.connectionChecker=new(p(At.CONNECTION_CHECKER,this.options,!0))(this),this.variableMap=new xO(this)}dispose(){this.listeners.length=0,this.clear(),b(this)}sortObjects_(o,l){const d=Math.sin(Wh(Gg.SCAN_ANGLE))*(this.RTL?-1:1);return o=o.getRelativeToSurfaceXY(),l=l.getRelativeToSurfaceXY(),o.y+d*o.x-(l.y+d*l.x)}addTopBlock(o){this.topBlocks.push(o)}removeTopBlock(o){if(!Te(this.topBlocks,o))throw Error("Block not present in workspace's list of top-most blocks.")}getTopBlocks(o=!1){const l=[].concat(this.topBlocks);return o&&1<l.length&&l.sort(this.sortObjects_.bind(this)),l}addTypedBlock(o){this.typedBlocksDB.has(o.type)||this.typedBlocksDB.set(o.type,[]),this.typedBlocksDB.get(o.type).push(o)}removeTypedBlock(o){Te(this.typedBlocksDB.get(o.type),o),this.typedBlocksDB.get(o.type).length||this.typedBlocksDB.delete(o.type)}getBlocksByType(o,l=!1){return this.typedBlocksDB.has(o)?(o=this.typedBlocksDB.get(o).slice(0),l&&o&&1<o.length&&o.sort(this.sortObjects_.bind(this)),o.filter(function(d){return!d.isInsertionMarker()})):[]}addTopComment(o){this.topComments.push(o),this.commentDB.has(o.id)&&console.warn('Overriding an existing comment on this workspace, with id "'+o.id+'"'),this.commentDB.set(o.id,o)}removeTopComment(o){if(!Te(this.topComments,o))throw Error("Comment not present in workspace's list of top-most comments.");this.commentDB.delete(o.id)}getTopComments(o=!1){const l=[].concat(this.topComments);return o&&1<l.length&&l.sort(this.sortObjects_.bind(this)),l}getAllBlocks(o=!1){if(o){var l=this.getTopBlocks(!0);o=[];for(let d=0;d<l.length;d++)o.push(...l[d].getDescendants(!0))}else for(o=this.getTopBlocks(!1),l=0;l<o.length;l++)o.push(...o[l].getChildren(!1));return o.filter(function(d){return!d.isInsertionMarker()})}clear(){this.isClearing=!0;try{const o=n.getGroup$$module$build$src$core$events$utils();for(o||n.setGroup$$module$build$src$core$events$utils(!0);this.topBlocks.length;)this.topBlocks[0].dispose(!1);for(;this.topComments.length;)this.topComments[this.topComments.length-1].dispose();n.setGroup$$module$build$src$core$events$utils(o),this.variableMap.clear(),this.potentialVariableMap&&this.potentialVariableMap.clear()}finally{this.isClearing=!1}}renameVariableById(o,l){this.variableMap.renameVariableById(o,l)}createVariable(o,l,d){return this.variableMap.createVariable(o,l,d)}getVariableUsesById(o){return this.variableMap.getVariableUsesById(o)}deleteVariableById(o){this.variableMap.deleteVariableById(o)}getVariable(o,l){return this.variableMap.getVariable(o,l)}getVariableById(o){return this.variableMap.getVariableById(o)}getVariablesOfType(o){return this.variableMap.getVariablesOfType(o)}getVariableTypes(){return this.variableMap.getVariableTypes(this)}getAllVariables(){return this.variableMap.getAllVariables()}getAllVariableNames(){return this.variableMap.getAllVariableNames()}getWidth(){return 0}newBlock(o,l){throw Error("The implementation of newBlock should be monkey-patched in by blockly.ts")}remainingCapacity(){return isNaN(this.options.maxBlocks)?1/0:this.options.maxBlocks-this.getAllBlocks(!1).length}remainingCapacityOfType(o){return this.options.maxInstances?(this.options.maxInstances[o]!==void 0?this.options.maxInstances[o]:1/0)-this.getBlocksByType(o,!1).length:1/0}isCapacityAvailable(o){if(!this.hasBlockLimits())return!0;let l=0;for(const d in o){if(o[d]>this.remainingCapacityOfType(d))return!1;l+=o[d]}return!(l>this.remainingCapacity())}hasBlockLimits(){return this.options.maxBlocks!==1/0||!!this.options.maxInstances}getUndoStack(){return this.undoStack_}getRedoStack(){return this.redoStack_}undo(o){var l=o?this.redoStack_:this.undoStack_,d=o?this.undoStack_:this.redoStack_;const m=l.pop();if(m){for(var $=[m];l.length&&m.group&&m.group===l[l.length-1].group;){const V=l.pop();V&&$.push(V)}for(l=0;l<$.length;l++)d.push($[l]);$=Z($,o),re(!1);try{for(d=0;d<$.length;d++)$[d].run(o)}finally{re(!0)}}}clearUndo(){this.undoStack_.length=0,this.redoStack_.length=0,Q()}addChangeListener(o){return this.listeners.push(o),o}removeChangeListener(o){Te(this.listeners,o)}fireChangeListener(o){if(o.recordUndo)for(this.undoStack_.push(o),this.redoStack_.length=0;this.undoStack_.length>this.MAX_UNDO&&0<=this.MAX_UNDO;)this.undoStack_.shift();for(let l=0;l<this.listeners.length;l++)(0,this.listeners[l])(o)}getBlockById(o){return this.blockDB.get(o)||null}setBlockById(o,l){this.blockDB.set(o,l)}removeBlockById(o){this.blockDB.delete(o)}getCommentById(o){let l;return(l=this.commentDB.get(o))!=null?l:null}allInputsFilled(o){const l=this.getTopBlocks(!1);for(let d=0;d<l.length;d++)if(!l[d].allInputsFilled(o))return!1;return!0}getPotentialVariableMap(){return this.potentialVariableMap}createPotentialVariableMap(){this.potentialVariableMap=new xO(this)}getVariableMap(){return this.variableMap}setVariableMap(o){this.variableMap=o}getProcedureMap(){return this.procedureMap}getRootWorkspace(){let o=null;const l=this.options.parentWorkspace;return this.isFlyout?l&&l.options&&(o=l.options.parentWorkspace):l&&(o=l),o}static getById(o){return _(o)}static getAll(){return E()}};Gg.SCAN_ANGLE=3;var TL=100,m0=class{constructor(o){this.parentWorkspace=o,this.sounds=new Map,this.lastSound_=null,this.muted=!1}dispose(){this.sounds.clear()}load(o,l){if(o.length){try{var d=new globalThis.Audio}catch{return}for(let $=0;$<o.length;$++){const V=o[$],Ee=V.match(/\.(\w+)$/);if(Ee&&d.canPlayType("audio/"+Ee[1])){var m=new globalThis.Audio(V);break}}m&&this.sounds.set(l,m)}}preload(){for(const o of this.sounds.values()){o.volume=.01;const l=o.play();if(l!==void 0?l.then(o.pause).catch(function(){}):o.pause(),mr||z_)break}}play(o,l){if(!this.muted){var d=this.sounds.get(o);d?(o=new Date,this.lastSound_!==null&&o.getTime()-this.lastSound_.getTime()<TL||(this.lastSound_=o,d=mr||X_?d:d.cloneNode(),d.volume=l===void 0?1:l,d.play())):this.parentWorkspace&&this.parentWorkspace.getAudioManager().play(o,l)}}setMuted(o){this.muted=o}getMuted(){return this.muted}},EL=class{constructor(o){this.workspace=o,this.layers=new Map,(o=o.getInjectionDiv())&&(this.dragLayer=this.createDragLayer(o)),o=this.createLayer(_O),Se(o,"blocklyBlockCanvas"),o=this.createLayer($f),Se(o,"blocklyBubbleCanvas")}createDragLayer(o){const l=Ne(st.SVG,{class:"blocklyBlockDragSurface",xmlns:bg,"xmlns:html":Ql,"xmlns:xlink":Xr,version:"1.1"});return o.append(l),Ne(st.G,{},l)}translateLayers(o,l){o=`translate(${o.x}, ${o.y}) scale(${l})`;let d;(d=this.dragLayer)==null||d.setAttribute("transform",o);for(const[,m]of this.layers)m.setAttribute("transform",o)}moveToDragLayer(o){let l;(l=this.dragLayer)==null||l.appendChild(o.getSvgRoot())}moveOffDragLayer(o,l){this.append(o,l)}append(o,l){this.layers.has(l)||this.createLayer(l);let d;(d=this.layers.get(l))==null||d.appendChild(o.getSvgRoot())}createLayer(o){const l=this.workspace.getSvgGroup(),d=Ne(st.G,{});let m=!1;const $=[...this.layers].sort((V,Ee)=>V[0]-Ee[0]);for(const[V,Ee]of $)if(o<V){l.insertBefore(d,Ee),m=!0;break}return m||l.appendChild(d),this.layers.set(o,d),d}hasLayer(o){return o===this.dragLayer||new Set(this.layers.values()).has(o)}getBlockLayer(){return this.layers.get(_O)}getBubbleLayer(){return this.layers.get($f)}},vL=20,na=class extends Gg{constructor(o){super(o),this.resizeHandlerWrapper=null,this.resizesEnabled=this.isVisible_=this.rendered=!0,this.startScrollY=this.startScrollX=this.scrollY=this.scrollX=0,this.dragDeltaXY=null,this.oldScale=this.scale=1,this.oldLeft=this.oldTop=0,this.inverseScreenCTM=this.targetWorkspace=this.dummyWheelListener=this.configureContextMenu=this.lastRecordedPageScroll=this.injectionDiv=this.currentGesture_=this.toolbox_=this.flyout=this.scrollbar=this.trashcan=null,this.inverseScreenCTMDirty=!0,this.highlightedBlocks=[],this.toolboxCategoryCallbacks=new Map,this.flyoutButtonCallbacks=new Map,this.cachedParentSvg=null,this.keyboardAccessibilityMode=!1,this.topBoundedElements=[],this.dragTargetAreas=[],this.zoomControls_=this.layerManager=null,this.metricsManager=new(p(At.METRICS_MANAGER,o,!0))(this),this.getMetrics=o.getMetrics||this.metricsManager.getMetrics.bind(this.metricsManager),this.setMetrics=o.setMetrics||na.setTopLevelWorkspaceMetrics_,this.componentManager=new Gs,this.connectionDBList=vu.init(this.connectionChecker),this.audioManager=new m0(o.parentWorkspace),this.grid=this.options.gridPattern?new yO(this.options.gridPattern,o.gridOptions):null,this.markerManager=new Qi(this),jm&&this.registerToolboxCategoryCallback(qb,jm),og&&this.registerToolboxCategoryCallback(kO,og),es&&eg&&(this.registerToolboxCategoryCallback(Dg,eg),this.addChangeListener(Tb)),this.themeManager_=this.options.parentWorkspace?this.options.parentWorkspace.getThemeManager():new g0(this,this.options.theme||fT),this.themeManager_.subscribeWorkspace(this);let l;this.renderer=S_(this.options.renderer||"geras",this.getTheme(),(l=this.options.rendererOverrides)!=null?l:void 0),this.cachedParentSvgSize=new Ko(0,0)}getMarkerManager(){return this.markerManager}getMetricsManager(){return this.metricsManager}setMetricsManager(o){this.metricsManager=o,this.getMetrics=this.metricsManager.getMetrics.bind(this.metricsManager)}getComponentManager(){return this.componentManager}setCursorSvg(o){this.markerManager.setCursorSvg(o)}setMarkerSvg(o){this.markerManager.setMarkerSvg(o)}getMarker(o){return this.markerManager?this.markerManager.getMarker(o):null}getCursor(){return this.markerManager?this.markerManager.getCursor():null}getRenderer(){return this.renderer}getThemeManager(){return this.themeManager_}getTheme(){return this.themeManager_.getTheme()}setTheme(o){o||(o=fT),this.themeManager_.setTheme(o)}refreshTheme(){this.svgGroup_&&this.renderer.refreshDom(this.svgGroup_,this.getTheme()),this.updateBlockStyles_(this.getAllBlocks(!1).filter(function(l){return!!l.getStyleName()})),this.refreshToolboxSelection(),this.toolbox_&&this.toolbox_.refreshTheme(),this.isVisible()&&this.setVisible(!0);const o=new(Ae(Cd))(this.getTheme().name,this.id);J(o)}updateBlockStyles_(o){for(let l=0,d;d=o[l];l++){const m=d.getStyleName();m&&d.setStyle(m)}}getInverseScreenCTM(){if(this.inverseScreenCTMDirty){const o=this.getParentSvg().getScreenCTM();o&&(this.inverseScreenCTM=o.inverse(),this.inverseScreenCTMDirty=!1)}return this.inverseScreenCTM}updateInverseScreenCTM(){this.inverseScreenCTMDirty=!0}isVisible(){return this.isVisible_}getSvgXY(o){let l=0,d=0,m=1;(this.getCanvas().contains(o)||this.getBubbleCanvas().contains(o))&&(m=this.scale);do{const $=Ce(o);(o===this.getCanvas()||o===this.getBubbleCanvas())&&(m=1),l+=$.x*m,d+=$.y*m,o=o.parentNode}while(o&&o!==this.getParentSvg()&&o!==this.getInjectionDiv());return new zt(l,d)}getCachedParentSvgSize(){const o=this.cachedParentSvgSize;return new Ko(o.width,o.height)}getOriginOffsetInPixels(){return U(this.getCanvas())}getInjectionDiv(){if(!this.injectionDiv){let o=this.svgGroup_;for(;o;){if((" "+(o.getAttribute("class")||"")+" ").indexOf(" injectionDiv ")!==-1){this.injectionDiv=o;break}o=o.parentNode}}return this.injectionDiv}getSvgGroup(){return this.svgGroup_}getBlockCanvas(){return this.getCanvas()}setResizeHandlerWrapper(o){this.resizeHandlerWrapper=o}createDom(o,l){return this.injectionDiv||(this.injectionDiv=l??null),this.svgGroup_=Ne(st.G,{class:"blocklyWorkspace"}),o&&(this.svgBackground_=Ne(st.RECT,{height:"100%",width:"100%",class:o},this.svgGroup_),o==="blocklyMainBackground"&&this.grid?this.svgBackground_.style.fill="url(#"+this.grid.getPatternId()+")":this.themeManager_.subscribe(this.svgBackground_,"workspaceBackgroundColour","fill")),this.layerManager=new EL(this),this.svgBlockCanvas_=this.layerManager.getBlockLayer(),this.svgBubbleCanvas_=this.layerManager.getBubbleLayer(),this.isFlyout||(ee(this.svgGroup_,"pointerdown",this,this.onMouseDown_,!1),this.dummyWheelListener=()=>{},document.body.addEventListener("wheel",this.dummyWheelListener),ee(this.svgGroup_,"wheel",this,this.onMouseWheel_)),this.options.hasCategories&&(this.toolbox_=new(p(At.TOOLBOX,this.options,!0))(this)),this.grid&&this.grid.update(this.scale),this.recordDragTargets(),(o=p(At.CURSOR,this.options))&&this.markerManager.setCursor(new o),this.renderer.createDom(this.svgGroup_,this.getTheme()),this.svgGroup_}dispose(){if(this.rendered=!1,this.currentGesture_&&this.currentGesture_.cancel(),this.svgGroup_&&mt(this.svgGroup_),this.toolbox_&&(this.toolbox_.dispose(),this.toolbox_=null),this.flyout&&(this.flyout.dispose(),this.flyout=null),this.trashcan&&(this.trashcan.dispose(),this.trashcan=null),this.scrollbar&&(this.scrollbar.dispose(),this.scrollbar=null),this.zoomControls_&&this.zoomControls_.dispose(),this.audioManager&&this.audioManager.dispose(),this.grid&&(this.grid=null),this.renderer.dispose(),this.markerManager&&this.markerManager.dispose(),super.dispose(),this.themeManager_&&(this.themeManager_.unsubscribeWorkspace(this),this.themeManager_.unsubscribe(this.svgBackground_),this.options.parentWorkspace||this.themeManager_.dispose()),this.connectionDBList.length=0,this.toolboxCategoryCallbacks.clear(),this.flyoutButtonCallbacks.clear(),!this.options.parentWorkspace){const o=this.getParentSvg();o&&o.parentNode&&mt(o.parentNode)}this.resizeHandlerWrapper&&(Oe(this.resizeHandlerWrapper),this.resizeHandlerWrapper=null),this.dummyWheelListener&&(document.body.removeEventListener("wheel",this.dummyWheelListener),this.dummyWheelListener=null)}addTrashcan(){this.trashcan=na.newTrashcan(this);const o=this.trashcan.createDom();this.svgGroup_.insertBefore(o,this.getCanvas())}static newTrashcan(o){throw Error("The implementation of newTrashcan should be monkey-patched in by blockly.ts")}addZoomControls(){this.zoomControls_=new kI(this);const o=this.zoomControls_.createDom();this.svgGroup_.appendChild(o)}addFlyout(o){const l=new as({parentWorkspace:this,rtl:this.RTL,oneBasedIndex:this.options.oneBasedIndex,horizontalLayout:this.horizontalLayout,renderer:this.options.renderer,rendererOverrides:this.options.rendererOverrides,move:{scrollbars:!0}});return l.toolboxPosition=this.options.toolboxPosition,this.flyout=this.horizontalLayout?new(p(At.FLYOUTS_HORIZONTAL_TOOLBOX,this.options,!0))(l):new(p(At.FLYOUTS_VERTICAL_TOOLBOX,this.options,!0))(l),this.flyout.autoClose=!1,this.flyout.getWorkspace().setVisible(!0),this.flyout.createDom(o)}getFlyout(o){return this.flyout||o?this.flyout:this.toolbox_?this.toolbox_.getFlyout():null}getToolbox(){return this.toolbox_}updateScreenCalculations_(){this.updateInverseScreenCTM(),this.recordDragTargets()}resizeContents(){this.resizesEnabled&&this.rendered&&(this.scrollbar&&this.scrollbar.resize(),this.updateInverseScreenCTM())}resize(){this.toolbox_&&this.toolbox_.position(),this.flyout&&this.flyout.position();const o=this.componentManager.getComponents(Gs.Capability.POSITIONABLE,!0),l=this.getMetricsManager().getUiMetrics(),d=[];for(let m=0,$;$=o[m];m++){$.position(l,d);const V=$.getBoundingRectangle();V&&d.push(V)}this.scrollbar&&this.scrollbar.resize(),this.updateScreenCalculations_()}updateScreenCalculationsIfScrolled(){const o=ke();zt.equals(this.lastRecordedPageScroll,o)||(this.lastRecordedPageScroll=o,this.updateScreenCalculations_())}getLayerManager(){return this.layerManager}getCanvas(){return this.layerManager.getBlockLayer()}setCachedParentSvgSize(o,l){const d=this.getParentSvg();o!=null&&(this.cachedParentSvgSize.width=o,d.setAttribute("data-cached-width",`${o}`)),l!=null&&(this.cachedParentSvgSize.height=l,d.setAttribute("data-cached-height",`${l}`))}getBubbleCanvas(){return this.layerManager.getBubbleLayer()}getParentSvg(){if(!this.cachedParentSvg){let o=this.svgGroup_;for(;o;){if(o.tagName==="svg"){this.cachedParentSvg=o;break}o=o.parentNode}}return this.cachedParentSvg}maybeFireViewportChangeEvent(){if(he()){var o=this.scale,l=-this.scrollY,d=-this.scrollX;if(!(o===this.oldScale&&1>Math.abs(l-this.oldTop)&&1>Math.abs(d-this.oldLeft))){var m=new(Ae(xs))(l,d,o,this.id,this.oldScale);this.oldScale=o,this.oldTop=l,this.oldLeft=d,J(m)}}}translate(o,l){let d;(d=this.layerManager)==null||d.translateLayers(new zt(o,l),this.scale);let m;(m=this.grid)==null||m.moveTo(o,l),this.maybeFireViewportChangeEvent()}getWidth(){const o=this.getMetrics();return o?o.viewWidth/this.scale:0}setVisible(o){this.isVisible_=o,this.svgGroup_&&(this.scrollbar&&this.scrollbar.setContainerVisible(o),this.getFlyout()&&this.getFlyout().setContainerVisible(o),this.getParentSvg().style.display=o?"block":"none",this.toolbox_&&this.toolbox_.setVisible(o),o||this.hideChaff(!0))}render(){for(var o=this.getAllBlocks(!1),l=o.length-1;0<=l;l--)o[l].queueRender();if(this.currentGesture_)for(o=this.currentGesture_.getInsertionMarkers(),l=0;l<o.length;l++)o[l].queueRender();pc().then(()=>void this.markerManager.updateMarkers())}highlightBlock(o,l){if(l===void 0){for(let d=0,m;m=this.highlightedBlocks[d];d++)m.setHighlighted(!1);this.highlightedBlocks.length=0}(o=o?this.getBlockById(o):null)&&((l=l===void 0||l)?this.highlightedBlocks.indexOf(o)===-1&&this.highlightedBlocks.push(o):Te(this.highlightedBlocks,o),o.setHighlighted(l))}paste(o){if(ct("Blockly.WorkspaceSvg.prototype.paste","v10","v11","Blockly.clipboard.paste"),!this.rendered||!o.type&&!o.tagName)return null;this.currentGesture_&&this.currentGesture_.cancel();const l=n.getGroup$$module$build$src$core$events$utils();l||n.setGroup$$module$build$src$core$events$utils(!0);let d;try{d=o.type?this.pasteBlock_(null,o):o.tagName.toLowerCase()==="comment"?this.pasteWorkspaceComment_(o):this.pasteBlock_(o,null)}finally{n.setGroup$$module$build$src$core$events$utils(l)}return d}pasteBlock_(o,l){n.disable$$module$build$src$core$events$utils();let d;try{let m=0,$=0;if(o){d=su(o,this);let V;m=parseInt((V=o.getAttribute("x"))!=null?V:"0"),this.RTL&&(m=-m);let Ee;$=parseInt((Ee=o.getAttribute("y"))!=null?Ee:"0")}else l&&(d=Hs(l,this),m=l.x||10,this.RTL&&(m=this.getWidth()-m),$=l.y||10);if(!isNaN(m)&&!isNaN($)){let V;do{V=!1;const Ee=this.getAllBlocks(!1);for(let Ve=0,St;St=Ee[Ve];Ve++){const tn=St.getRelativeToSurfaceXY();if(1>=Math.abs(m-tn.x)&&1>=Math.abs($-tn.y)){V=!0;break}}if(!V){const Ve=d.getConnections_(!1);for(let St=0,tn;tn=Ve[St];St++)if(tn.closest(n.config$$module$build$src$core$config.snapRadius,new zt(m,$)).connection){V=!0;break}}V&&(m=this.RTL?m-n.config$$module$build$src$core$config.snapRadius:m+n.config$$module$build$src$core$config.snapRadius,$+=2*n.config$$module$build$src$core$config.snapRadius)}while(V);d.moveTo(new zt(m,$))}}finally{n.enable$$module$build$src$core$events$utils()}return he()&&!d.isShadow()&&J(new(Ae(n.CREATE$$module$build$src$core$events$utils))(d)),d.select(),d}pasteWorkspaceComment_(o){n.disable$$module$build$src$core$events$utils();let l;try{l=Oi.fromXmlRendered(o,this);let d,m=parseInt((d=o.getAttribute("x"))!=null?d:"0"),$,V=parseInt(($=o.getAttribute("y"))!=null?$:"0");isNaN(m)||isNaN(V)||(this.RTL&&(m=-m),l.moveBy(m+50,V+50))}finally{n.enable$$module$build$src$core$events$utils()}return he()&&wa.fireCreateEvent(l),l.select(),l}refreshToolboxSelection(){const o=this.isFlyout?this.targetWorkspace:this;o&&!o.currentGesture_&&o.toolbox_&&o.toolbox_.getFlyout()&&o.toolbox_.refreshSelection()}renameVariableById(o,l){super.renameVariableById(o,l),this.refreshToolboxSelection()}deleteVariableById(o){super.deleteVariableById(o),this.refreshToolboxSelection()}createVariable(o,l,d){return o=super.createVariable(o,l,d),this.refreshToolboxSelection(),o}recordDragTargets(){const o=this.componentManager.getComponents(Gs.Capability.DRAG_TARGET,!0);this.dragTargetAreas=[];for(let l=0,d;d=o[l];l++){const m=d.getClientRect();m&&this.dragTargetAreas.push({component:d,clientRect:m})}}newBlock(o,l){throw Error("The implementation of newBlock should be monkey-patched in by blockly.ts")}getDragTarget(o){for(let l=0,d;d=this.dragTargetAreas[l];l++)if(d.clientRect.contains(o.clientX,o.clientY))return d.component;return null}onMouseDown_(o){const l=this.getGesture(o);l&&l.handleWsStart(o,this)}startDrag(o,l){o=De(o,this.getParentSvg(),this.getInverseScreenCTM()),o.x/=this.scale,o.y/=this.scale,this.dragDeltaXY=zt.difference(l,o)}moveDrag(o){return o=De(o,this.getParentSvg(),this.getInverseScreenCTM()),o.x/=this.scale,o.y/=this.scale,zt.sum(this.dragDeltaXY,o)}isDragging(){return this.currentGesture_!==null&&this.currentGesture_.isDragging()}isDraggable(){return this.options.moveOptions&&this.options.moveOptions.drag}isMovable(){return this.options.moveOptions&&!!this.options.moveOptions.scrollbars||this.options.moveOptions&&this.options.moveOptions.wheel||this.options.moveOptions&&this.options.moveOptions.drag||this.options.zoomOptions&&this.options.zoomOptions.wheel||this.options.zoomOptions&&this.options.zoomOptions.pinch}isMovableHorizontally(){const o=!!this.scrollbar;return this.isMovable()&&(!o||o&&this.scrollbar.canScrollHorizontally())}isMovableVertically(){const o=!!this.scrollbar;return this.isMovable()&&(!o||o&&this.scrollbar.canScrollVertically())}onMouseWheel_(o){if(Cc.inProgress())o.preventDefault(),o.stopPropagation();else{var l=this.options.zoomOptions&&this.options.zoomOptions.wheel,d=this.options.moveOptions&&this.options.moveOptions.wheel;if(l||d){var m=me(o);if(Tg)var $=o.metaKey;l&&(o.ctrlKey||$||!d)?(m=-m.y/50,l=De(o,this.getParentSvg(),this.getInverseScreenCTM()),this.zoom(l.x,l.y,m)):(l=this.scrollX-m.x,d=this.scrollY-m.y,o.shiftKey&&!m.x&&(l=this.scrollX-m.y,d=this.scrollY),this.scroll(l,d)),o.preventDefault()}}}getBlocksBoundingBox(){const o=this.getTopBoundedElements();if(!o.length)return new Po(0,0,0,0);const l=o[0].getBoundingRectangle();for(let m=1;m<o.length;m++){var d=o[m];d.isInsertionMarker&&d.isInsertionMarker()||(d=d.getBoundingRectangle(),d.top<l.top&&(l.top=d.top),d.bottom>l.bottom&&(l.bottom=d.bottom),d.left<l.left&&(l.left=d.left),d.right>l.right&&(l.right=d.right))}return l}cleanUp(){this.setResizesEnabled(!1),n.setGroup$$module$build$src$core$events$utils(!0);const o=this.getTopBlocks(!0);let l=0;for(let d=0,m;m=o[d];d++){if(!m.isMovable())continue;const $=m.getRelativeToSurfaceXY();m.moveBy(-$.x,l-$.y,["cleanup"]),m.snapToGrid(),l=m.getRelativeToSurfaceXY().y+m.getHeightWidth().height+this.renderer.getConstants().MIN_BLOCK_HEIGHT}n.setGroup$$module$build$src$core$events$utils(!1),this.setResizesEnabled(!0)}showContextMenu(o){if(!this.options.readOnly&&!this.isFlyout){var l=Mo.registry.getContextMenuOptions(Mo.ScopeType.WORKSPACE,{workspace:this});this.configureContextMenu&&this.configureContextMenu(l,o),Wp(o,l,this.RTL)}}updateToolbox(o){if(o=ps(o)){if(!this.options.languageTree)throw Error("Existing toolbox is null. Can't create new toolbox.");if(bt(o)){if(!this.toolbox_)throw Error("Existing toolbox has no categories. Can't change mode.");this.options.languageTree=o,this.toolbox_.render(o)}else{if(!this.flyout)throw Error("Existing toolbox has categories. Can't change mode.");this.options.languageTree=o,this.flyout.show(o)}}else if(this.options.languageTree)throw Error("Can't nullify an existing toolbox.")}markFocused(){this.options.parentWorkspace?this.options.parentWorkspace.markFocused():(S(this),this.getParentSvg().focus({preventScroll:!0}))}zoom(o,l,d){d=Math.pow(this.options.zoomOptions.scaleSpeed,d);const m=this.scale*d;if(this.scale!==m){m>this.options.zoomOptions.maxScale?d=this.options.zoomOptions.maxScale/this.scale:m<this.options.zoomOptions.minScale&&(d=this.options.zoomOptions.minScale/this.scale);var $=this.getCanvas().getCTM(),V=this.getParentSvg().createSVGPoint();V.x=o,V.y=l,V=V.matrixTransform($.inverse()),o=V.x,l=V.y,$=$.translate(o*(1-d),l*(1-d)).scale(d),this.scrollX=$.e,this.scrollY=$.f,this.setScale(m)}}zoomCenter(o){var l=this.getMetrics();let d;this.flyout?(d=l.svgWidth?l.svgWidth/2:0,l=l.svgHeight?l.svgHeight/2:0):(d=l.viewWidth/2+l.absoluteLeft,l=l.viewHeight/2+l.absoluteTop),this.zoom(d,l,o)}zoomToFit(){if(this.isMovable()){var o=this.getMetrics(),l=o.viewWidth;o=o.viewHeight;var d=this.getBlocksBoundingBox(),m=2*vL,$=d.right-d.left+m;if(d=d.bottom-d.top+m,$){this.flyout&&(this.horizontalLayout?(o+=this.flyout.getHeight(),d+=this.flyout.getHeight()/this.scale):(l+=this.flyout.getWidth(),$+=this.flyout.getWidth()/this.scale)),l/=$,o/=d,n.disable$$module$build$src$core$events$utils();try{this.setScale(Math.min(l,o)),this.scrollCenter()}finally{n.enable$$module$build$src$core$events$utils()}this.maybeFireViewportChangeEvent()}}else console.warn("Tried to move a non-movable workspace. This could result in blocks becoming inaccessible.")}beginCanvasTransition(){Se(this.getCanvas(),"blocklyCanvasTransitioning"),Se(this.getBubbleCanvas(),"blocklyCanvasTransitioning")}endCanvasTransition(){ut(this.getCanvas(),"blocklyCanvasTransitioning"),ut(this.getBubbleCanvas(),"blocklyCanvasTransitioning")}scrollCenter(){if(this.isMovable()){var o=this.getMetrics(),l=(o.scrollWidth-o.viewWidth)/2,d=(o.scrollHeight-o.viewHeight)/2;l=-l-o.scrollLeft,d=-d-o.scrollTop,this.scroll(l,d)}else console.warn("Tried to move a non-movable workspace. This could result in blocks becoming inaccessible.")}centerOnBlock(o,l){if(this.isMovable()){var d=o?this.getBlockById(o):null;if(d){o=d.getRelativeToSurfaceXY(),d=l?{height:d.height,width:d.width}:d.getHeightWidth();var m=this.scale;l=(o.x+(this.RTL?-1:1)*d.width/2)*m,o=(o.y+d.height/2)*m,d=this.getMetrics(),this.scroll(-(l-d.viewWidth/2),-(o-d.viewHeight/2))}}else console.warn("Tried to move a non-movable workspace. This could result in blocks becoming inaccessible.")}setScale(o){this.options.zoomOptions.maxScale&&o>this.options.zoomOptions.maxScale?o=this.options.zoomOptions.maxScale:this.options.zoomOptions.minScale&&o<this.options.zoomOptions.minScale&&(o=this.options.zoomOptions.minScale),this.scale=o,this.hideChaff(!1),(o=this.getFlyout(!1))&&o.isVisible()&&(o.reflow(),this.recordDragTargets()),this.grid&&this.grid.update(this.scale),o=this.getMetrics(),this.scrollX-=o.absoluteLeft,this.scrollY-=o.absoluteTop,o.viewLeft+=o.absoluteLeft,o.viewTop+=o.absoluteTop,this.scroll(this.scrollX,this.scrollY),this.scrollbar&&(this.flyout?this.scrollbar.resizeView(o):this.scrollbar.resizeContent(o))}getScale(){return this.options.parentWorkspace?this.options.parentWorkspace.getScale():this.scale}scroll(o,l){this.hideChaff(!0);const d=this.getMetrics();o=Math.min(o,-d.scrollLeft),l=Math.min(l,-d.scrollTop);const m=d.scrollTop+Math.max(0,d.scrollHeight-d.viewHeight);o=Math.max(o,-(d.scrollLeft+Math.max(0,d.scrollWidth-d.viewWidth))),l=Math.max(l,-m),this.scrollX=o,this.scrollY=l,this.scrollbar&&this.scrollbar.set(-(o+d.scrollLeft),-(l+d.scrollTop),!1),o+=d.absoluteLeft,l+=d.absoluteTop,this.translate(o,l)}getBlockById(o){return super.getBlockById(o)}getAllBlocks(o=!1){return super.getAllBlocks(o)}getTopBlocks(o=!1){return super.getTopBlocks(o)}addTopBlock(o){this.addTopBoundedElement(o),super.addTopBlock(o)}removeTopBlock(o){this.removeTopBoundedElement(o),super.removeTopBlock(o)}addTopComment(o){this.addTopBoundedElement(o),super.addTopComment(o)}removeTopComment(o){this.removeTopBoundedElement(o),super.removeTopComment(o)}getRootWorkspace(){return super.getRootWorkspace()}addTopBoundedElement(o){this.topBoundedElements.push(o)}removeTopBoundedElement(o){Te(this.topBoundedElements,o)}getTopBoundedElements(){return[].concat(this.topBoundedElements)}setResizesEnabled(o){const l=!this.resizesEnabled&&o;this.resizesEnabled=o,l&&this.resizeContents()}clear(){this.setResizesEnabled(!1),super.clear(),this.topBoundedElements=[],this.setResizesEnabled(!0)}registerButtonCallback(o,l){if(typeof l!="function")throw TypeError("Button callbacks must be functions.");this.flyoutButtonCallbacks.set(o,l)}getButtonCallback(o){let l;return(l=this.flyoutButtonCallbacks.get(o))!=null?l:null}removeButtonCallback(o){this.flyoutButtonCallbacks.delete(o)}registerToolboxCategoryCallback(o,l){if(typeof l!="function")throw TypeError("Toolbox category callbacks must be functions.");this.toolboxCategoryCallbacks.set(o,l)}getToolboxCategoryCallback(o){return this.toolboxCategoryCallbacks.get(o)||null}removeToolboxCategoryCallback(o){this.toolboxCategoryCallbacks.delete(o)}getGesture(o){const l=o.type==="pointerdown",d=this.currentGesture_;return d?l&&d.hasStarted()?(console.warn("Tried to start the same gesture twice."),d.cancel(),null):d:l?this.currentGesture_=new Cc(o,this):null}clearGesture(){this.currentGesture_=null}cancelCurrentGesture(){this.currentGesture_&&this.currentGesture_.cancel()}getAudioManager(){return this.audioManager}getGrid(){return this.grid}hideChaff(o=!1){ba(),hl(),zl(),this.hideComponents(o)}hideComponents(o=!1){this.getComponentManager().getComponents(Gs.Capability.AUTOHIDEABLE,!0).forEach(l=>l.autoHide(o))}static setTopLevelWorkspaceMetrics_(o){const l=this.getMetrics();typeof o.x=="number"&&(this.scrollX=-(l.scrollLeft+(l.scrollWidth-l.viewWidth)*o.x)),typeof o.y=="number"&&(this.scrollY=-(l.scrollTop+(l.scrollHeight-l.viewHeight)*o.y)),this.translate(this.scrollX+l.absoluteLeft,this.scrollY+l.absoluteTop)}},BO=class extends gr{constructor(o,l){super(l),this.type=cf,this.isOpen=o}toJson(){const o=super.toJson();if(this.isOpen===void 0)throw Error("Whether this is already open or not is undefined. Either pass a value to the constructor, or call fromJson");return o.isOpen=this.isOpen,o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new BO),l.isOpen=o.isOpen,l}};s(At.EVENT,cf,BO);var FO=class extends xd{constructor(o){if(super(o),this.type=n.DELETE$$module$build$src$core$events$utils,o){if(o.getParent())throw Error("Connected blocks cannot be deleted.");o.isShadow()&&(this.recordUndo=!1),this.oldXml=Fp(o),this.ids=Ie(o),this.wasShadow=o.isShadow(),this.oldJson=Wl(o,{addCoordinates:!0})}}toJson(){const o=super.toJson();if(!this.oldXml)throw Error("The old block XML is undefined. Either pass a block to the constructor, or call fromJson");if(!this.ids)throw Error("The block IDs are undefined. Either pass a block to the constructor, or call fromJson");if(this.wasShadow===void 0)throw Error("Whether the block was a shadow is undefined. Either pass a block to the constructor, or call fromJson");if(!this.oldJson)throw Error("The old block JSON is undefined. Either pass a block to the constructor, or call fromJson");return o.oldXml=Ta(this.oldXml),o.ids=this.ids,o.wasShadow=this.wasShadow,o.oldJson=this.oldJson,this.recordUndo||(o.recordUndo=this.recordUndo),o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new FO),l.oldXml=n.textToDom$$module$build$src$core$utils$xml(o.oldXml),l.ids=o.ids,l.wasShadow=o.wasShadow||l.oldXml.tagName.toLowerCase()==="shadow",l.oldJson=o.oldJson,o.recordUndo!==void 0&&(l.recordUndo=o.recordUndo),l}run(o){const l=this.getEventWorkspace_();if(!this.ids)throw Error("The block IDs are undefined. Either pass a block to the constructor, or call fromJson");if(!this.oldJson)throw Error("The old block JSON is undefined. Either pass a block to the constructor, or call fromJson");if(o)for(o=0;o<this.ids.length;o++){const d=this.ids[o],m=l.getBlockById(d);m?m.dispose(!1):d===this.blockId&&console.warn("Can't delete non-existent block: "+d)}else Hs(this.oldJson,l)}};s(At.EVENT,n.DELETE$$module$build$src$core$events$utils,FO);var wf=class{constructor(o,l,d){if(this.data=null,this.disposed=!1,this.hue_=null,this.colour_="#000000",this.styleName_="",this.suppressPrefixSuffix=!1,this.previousConnection=this.nextConnection=this.outputConnection=null,this.inputList=[],this.icons=[],this.disabled=!1,this.tooltip="",this.contextMenu=!0,this.parentBlock_=null,this.childBlocks_=[],this.editable_=this.movable_=this.deletable_=!0,this.collapsed_=this.isShadow_=!1,this.outputShape_=null,this.isInsertionMarker_=this.disposing=!1,this.onchangeWrapper_=this.helpUrl=this.rendered=null,this.statementInputCount=0,this.workspace=o,this.id=d&&!o.getBlockById(d)?d:G(),o.setBlockById(this.id,this),this.xy_=new zt(0,0),this.isInFlyout=o.isFlyout,this.isInMutator=o.isMutator,this.RTL=o.RTL,l){if(this.type=l,d=Ti[l],!d||typeof d!="object")throw TypeError("Invalid block definition for type: "+l);Object.assign(this,d)}o.addTopBlock(this),o.addTypedBlock(this),new.target===wf&&this.doInit_()}doInit_(){const o=n.getGroup$$module$build$src$core$events$utils();o||n.setGroup$$module$build$src$core$events$utils(!0);const l=_e();try{typeof this.init=="function"&&(re(!1),this.init(),re(l)),he()&&J(new(Ae(n.CREATE$$module$build$src$core$events$utils))(this))}finally{n.setGroup$$module$build$src$core$events$utils(o),re(l)}this.inputsInlineDefault=this.inputsInline,typeof this.onchange=="function"&&this.setOnChange(this.onchange)}dispose(o){this.isDeadOrDying()||(this.onchangeWrapper_&&this.workspace.removeChangeListener(this.onchangeWrapper_),this.unplug(o),he()&&J(new(Ae(n.DELETE$$module$build$src$core$events$utils))(this)),this.workspace.removeTopBlock(this),this.disposeInternal())}disposeInternal(){this.isDeadOrDying()||(this.onchangeWrapper_&&this.workspace.removeChangeListener(this.onchangeWrapper_),this.workspace.removeTypedBlock(this),this.workspace.removeBlockById(this.id),this.disposing=!0,typeof this.destroy=="function"&&this.destroy(),this.childBlocks_.forEach(o=>o.disposeInternal()),this.inputList.forEach(o=>o.dispose()),this.inputList.length=0,this.getConnections_(!0).forEach(o=>o.dispose()),this.disposed=!0)}isDeadOrDying(){return this.disposing||this.disposed}initModel(){for(const o of this.inputList)for(const l of o.fieldRow)l.initModel&&l.initModel()}unplug(o){this.outputConnection&&this.unplugFromRow_(o),this.previousConnection&&this.unplugFromStack_(o)}unplugFromRow_(o){let l=null,d;(d=this.outputConnection)!=null&&d.isConnected()&&(l=this.outputConnection.targetConnection,this.outputConnection.disconnect()),l&&o&&(o=this.getOnlyValueConnection_())&&o.isConnected()&&!o.targetBlock().isShadow()&&(o=o.targetConnection,o==null||o.disconnect(),this.workspace.connectionChecker.canConnect(o,l,!1)?l.connect(o):o==null||o.onFailedConnect(l))}getOnlyValueConnection_(){let o=null;for(let l=0;l<this.inputList.length;l++){const d=this.inputList[l].connection;if(d&&d.type===sn.INPUT_VALUE&&d.targetConnection){if(o)return null;o=d}}return o}unplugFromStack_(o){let l=null;var d;if((d=this.previousConnection)!=null&&d.isConnected()&&(l=this.previousConnection.targetConnection,this.previousConnection.disconnect()),d=this.getNextBlock(),o&&d&&!d.isShadow()){let m,$;o=($=(m=this.nextConnection)==null?void 0:m.targetConnection)!=null?$:null,o==null||o.disconnect(),l&&this.workspace.connectionChecker.canConnect(l,o,!1)&&l.connect(o)}}getConnections_(o){o=[],this.outputConnection&&o.push(this.outputConnection),this.previousConnection&&o.push(this.previousConnection),this.nextConnection&&o.push(this.nextConnection);for(let l=0,d;d=this.inputList[l];l++)d.connection&&o.push(d.connection);return o}lastConnectionInStack(o){let l=this.nextConnection;for(;l;){const d=l.targetBlock();if(!d||o&&d.isShadow())return l;l=d.nextConnection}return null}bumpNeighbours(){}getParent(){return this.parentBlock_}getInputWithBlock(o){for(let l=0,d;d=this.inputList[l];l++)if(d.connection&&d.connection.targetBlock()===o)return d;return null}getSurroundParent(){let o=this,l;do if(l=o,o=o.getParent(),!o)return null;while(o.getNextBlock()===l);return o}getNextBlock(){return this.nextConnection&&this.nextConnection.targetBlock()}getPreviousBlock(){return this.previousConnection&&this.previousConnection.targetBlock()}getRootBlock(){let o,l=this;do o=l,l=o.parentBlock_;while(l);return o}getTopStackBlock(){let o=this,l;do l=o.getPreviousBlock();while(l&&l.getNextBlock()===o&&(o=l));return o}getChildren(o){if(!o)return this.childBlocks_;o=[];for(let d=0,m;m=this.inputList[d];d++)if(m.connection){var l=m.connection.targetBlock();l&&o.push(l)}return(l=this.getNextBlock())&&o.push(l),o}setParent(o){if(o!==this.parentBlock_){var l=this.previousConnection&&this.previousConnection.targetBlock()||this.outputConnection&&this.outputConnection.targetBlock(),d=!!l;if(d&&o&&l!==o)throw Error("Block connected to superior one that is not new parent.");if(!d&&o)throw Error("Block not connected to new parent.");if(d&&!o)throw Error("Cannot set parent to null while block is still connected to superior block.");this.parentBlock_?Te(this.parentBlock_.childBlocks_,this):this.workspace.removeTopBlock(this),(this.parentBlock_=o)?o.childBlocks_.push(this):this.workspace.addTopBlock(this)}}getDescendants(o){const l=[this],d=this.getChildren(o);for(let m,$=0;m=d[$];$++)l.push(...m.getDescendants(o));return l}isDeletable(){return this.deletable_&&!this.isShadow_&&!this.isDeadOrDying()&&!this.workspace.options.readOnly}isOwnDeletable(){return this.deletable_}setDeletable(o){this.deletable_=o}isMovable(){return this.movable_&&!this.isShadow_&&!this.isDeadOrDying()&&!this.workspace.options.readOnly}isOwnMovable(){return this.movable_}setMovable(o){this.movable_=o}isDuplicatable(){return this.workspace.hasBlockLimits()?this.workspace.isCapacityAvailable(D(this,!0)):!0}isShadow(){return this.isShadow_}setShadow(o){this.isShadow_=o}isInsertionMarker(){return this.isInsertionMarker_}setInsertionMarker(o){this.isInsertionMarker_=o}isEditable(){return this.editable_&&!this.isDeadOrDying()&&!this.workspace.options.readOnly}isOwnEditable(){return this.editable_}setEditable(o){this.editable_=o;for(let l=0,d;d=this.inputList[l];l++)for(let m=0,$;$=d.fieldRow[m];m++)$.updateEditable()}isDisposed(){return this.disposed}isSimpleReporter(){if(!this.outputConnection)return!1;for(const o of this.inputList)if(o.connection||1<o.fieldRow.length)return!1;return!0}getMatchingConnection(o,l){const d=this.getConnections_(!0);if(o=o.getConnections_(!0),d.length!==o.length)throw Error("Connection lists did not match in length.");for(let m=0;m<o.length;m++)if(o[m]===l)return d[m];return null}setHelpUrl(o){this.helpUrl=o}setTooltip(o){this.tooltip=o}getTooltip(){return fl(this)}getColour(){return this.colour_}getStyleName(){return this.styleName_}getHue(){return this.hue_}setColour(o){o=Sa(o),this.hue_=o.hue,this.colour_=o.hex}setStyle(o){this.styleName_=o}setOnChange(o){if(o&&typeof o!="function")throw Error("onchange must be a function.");this.onchangeWrapper_&&this.workspace.removeChangeListener(this.onchangeWrapper_),this.onchange=o,this.onchangeWrapper_=o.bind(this),this.workspace.addChangeListener(this.onchangeWrapper_)}getField(o){if(typeof o!="string")throw TypeError("Block.prototype.getField expects a string with the field name but received "+(o===void 0?"nothing":o+" of type "+typeof o)+" instead");for(let l=0,d;d=this.inputList[l];l++)for(let m=0,$;$=d.fieldRow[m];m++)if($.name===o)return $;return null}getVars(){const o=[];for(let l=0,d;d=this.inputList[l];l++)for(let m=0,$;$=d.fieldRow[m];m++)$.referencesVariables()&&o.push($.getValue());return o}getVarModels(){const o=[];for(let l=0,d;d=this.inputList[l];l++)for(let m=0,$;$=d.fieldRow[m];m++)if($.referencesVariables()){const V=this.workspace.getVariableById($.getValue());V&&o.push(V)}return o}updateVarName(o){for(let l=0,d;d=this.inputList[l];l++)for(let m=0,$;$=d.fieldRow[m];m++)$.referencesVariables()&&o.getId()===$.getValue()&&$.refreshVariableName()}renameVarById(o,l){for(let d=0,m;m=this.inputList[d];d++)for(let $=0,V;V=m.fieldRow[$];$++)V.referencesVariables()&&o===V.getValue()&&V.setValue(l)}getFieldValue(o){return(o=this.getField(o))?o.getValue():null}setFieldValue(o,l){const d=this.getField(l);if(!d)throw Error('Field "'+l+'" not found.');d.setValue(o)}setPreviousStatement(o,l){if(o)l===void 0&&(l=null),this.previousConnection||(this.previousConnection=this.makeConnection_(sn.PREVIOUS_STATEMENT)),this.previousConnection.setCheck(l);else if(this.previousConnection){if(this.previousConnection.isConnected())throw Error("Must disconnect previous statement before removing connection.");this.previousConnection.dispose(),this.previousConnection=null}}setNextStatement(o,l){if(o)l===void 0&&(l=null),this.nextConnection||(this.nextConnection=this.makeConnection_(sn.NEXT_STATEMENT)),this.nextConnection.setCheck(l);else if(this.nextConnection){if(this.nextConnection.isConnected())throw Error("Must disconnect next statement before removing connection.");this.nextConnection.dispose(),this.nextConnection=null}}setOutput(o,l){if(o)l===void 0&&(l=null),this.outputConnection||(this.outputConnection=this.makeConnection_(sn.OUTPUT_VALUE)),this.outputConnection.setCheck(l);else if(this.outputConnection){if(this.outputConnection.isConnected())throw Error("Must disconnect output value before removing connection.");this.outputConnection.dispose(),this.outputConnection=null}}setInputsInline(o){this.inputsInline!==o&&(J(new(Ae(n.CHANGE$$module$build$src$core$events$utils))(this,"inline",null,this.inputsInline,o)),this.inputsInline=o)}getInputsInline(){if(this.inputsInline!==void 0)return this.inputsInline;for(var o=1;o<this.inputList.length;o++)if(this.inputList[o-1]instanceof Ua&&this.inputList[o]instanceof Ua)return!1;for(o=1;o<this.inputList.length;o++)if(this.inputList[o-1]instanceof n.ValueInput$$module$build$src$core$inputs$value_input&&this.inputList[o]instanceof Ua)return!0;for(o=0;o<this.inputList.length;o++)if(this.inputList[o]instanceof Ac)return!0;return!1}setOutputShape(o){this.outputShape_=o}getOutputShape(){return this.outputShape_}isEnabled(){return!this.disabled}setEnabled(o){if(this.isEnabled()!==o){const l=this.disabled;this.disabled=!o,J(new(Ae(n.CHANGE$$module$build$src$core$events$utils))(this,"disabled",null,l,!o))}}getInheritedDisabled(){let o=this.getSurroundParent();for(;o;){if(o.disabled)return!0;o=o.getSurroundParent()}return!1}isCollapsed(){return this.collapsed_}setCollapsed(o){this.collapsed_!==o&&(J(new(Ae(n.CHANGE$$module$build$src$core$events$utils))(this,"collapsed",null,this.collapsed_,o)),this.collapsed_=o)}toString(o,l){l=this.toTokens(l);for(let m=2;m<l.length;m++)l[m-2]==="("&&l[m]===")"&&(l[m-2]=l[m-1],l.splice(m-1,2));let d="";return l=l.reduce((m,$)=>(m=m+(d==="("||$===")"?"":" ")+$,d=$[$.length-1],m),""),l=l.trim()||"???",o&&l.length>o&&(l=l.substring(0,o-3)+"..."),l}toTokens(o="?"){const l=[];for(const m of this.inputList)if(m.name!=Xd){for(const $ of m.fieldRow)l.push($.getText());if(m.connection){const $=m.connection.targetBlock();if($){var d=m.connection;let V=d.getCheck();!V&&d.targetConnection&&(V=d.targetConnection.getCheck()),(d=!!V&&(V.indexOf("Boolean")!==-1||V.indexOf("Number")!==-1))&&l.push("("),l.push(...$.toTokens(o)),d&&l.push(")")}else l.push(o)}}return l}appendValueInput(o){return this.appendInput(new n.ValueInput$$module$build$src$core$inputs$value_input(o,this))}appendStatementInput(o){return this.statementInputCount++,this.appendInput(new Sr(o,this))}appendDummyInput(o=""){return this.appendInput(new Ua(o,this))}appendEndRowInput(o=""){return this.appendInput(new Ac(o,this))}appendInput(o){return this.inputList.push(o),o}appendInputFromRegistry(o,l){return(o=u(At.INPUT,o,!1))?this.appendInput(new o(l,this)):null}jsonInit(o){var l=o.type?'Block "'+o.type+'": ':"";if(o.output&&o.previousStatement)throw Error(l+"Must not have both an output and a previousStatement.");for(var d=0;o["args"+d];){if(o["message"+d]===void 0)throw Error(l+`args${d} must have a corresponding message (message${d}).`);d++}if(o.style&&o.style.hat&&(this.hat=o.style.hat,o.style=null),o.style&&o.colour)throw Error(l+"Must not have both a colour and a style.");for(o.style?this.jsonInitStyle_(o,l):this.jsonInitColour_(o,l),d=0;o["message"+d]!==void 0;)this.interpolate_(o["message"+d],o["args"+d]||[],o["implicitAlign"+d]||o["lastDummyAlign"+d],l),d++;if(o.inputsInline!==void 0&&(n.disable$$module$build$src$core$events$utils(),this.setInputsInline(o.inputsInline),n.enable$$module$build$src$core$events$utils()),o.output!==void 0&&this.setOutput(!0,o.output),o.outputShape!==void 0&&this.setOutputShape(o.outputShape),o.previousStatement!==void 0&&this.setPreviousStatement(!0,o.previousStatement),o.nextStatement!==void 0&&this.setNextStatement(!0,o.nextStatement),o.tooltip!==void 0&&(d=Os(o.tooltip),this.setTooltip(d)),o.enableContextMenu!==void 0&&(this.contextMenu=!!o.enableContextMenu),o.suppressPrefixSuffix!==void 0&&(this.suppressPrefixSuffix=!!o.suppressPrefixSuffix),o.helpUrl!==void 0&&(d=Os(o.helpUrl),this.setHelpUrl(d)),typeof o.extensions=="string"&&(console.warn(l+"JSON attribute 'extensions' should be an array of strings. Found raw string in JSON for '"+o.type+"' block."),o.extensions=[o.extensions]),o.mutator!==void 0&&T_(o.mutator,this,!0),o=o.extensions,Array.isArray(o))for(l=0;l<o.length;l++)T_(o[l],this,!1)}jsonInitColour_(o,l){if("colour"in o)if(o.colour===void 0)console.warn(l+"Undefined colour value.");else{o=o.colour;try{this.setColour(o)}catch{console.warn(l+"Illegal colour value: ",o)}}}jsonInitStyle_(o,l){o=o.style;try{this.setStyle(o)}catch{console.warn(l+"Style does not exist: ",o)}}mixin(o,l){if(l!==void 0&&typeof l!="boolean")throw Error("opt_disableCheck must be a boolean if provided");if(!l){l=[];for(const d in o)this[d]!==void 0&&l.push(d);if(l.length)throw Error("Mixin will overwrite block members: "+JSON.stringify(l))}Object.assign(this,o)}interpolate_(o,l,d,m){o=hb(o),this.validateTokens_(o,l.length),l=this.interpolateArguments_(o,l,d),d=[];for(let $=0,V;V=l[$];$++)if(this.isInputKeyword_(V.type)){if(o=this.inputFromJson_(V,m)){for(let Ee=0,Ve;Ve=d[Ee];Ee++)o.appendField(Ve[0],Ve[1]);d.length=0}}else(o=this.fieldFromJson_(V))&&d.push([o,V.name])}validateTokens_(o,l){const d=[];let m=0;for(let $=0;$<o.length;$++){const V=o[$];if(typeof V=="number"){if(1>V||V>l)throw Error('Block "'+this.type+'": Message index %'+V+" out of range.");if(d[V])throw Error('Block "'+this.type+'": Message index %'+V+" duplicated.");d[V]=!0,m++}}if(m!==l)throw Error('Block "'+this.type+'": Message does not reference all '+l+" arg(s).")}interpolateArguments_(o,l,d){const m=[];for(let V=0;V<o.length;V++){var $=o[V];if(typeof $=="number"&&($=l[$-1]),typeof $=="string"){if($===`
  484. `)$={type:"input_end_row"},d&&($.align=d);else if($=this.stringToFieldJson_($),!$)continue}m.push($)}return(o=m.length)&&!this.isInputKeyword_(m[o-1].type)&&(o={type:"input_dummy"},d&&(o.align=d),m.push(o)),m}fieldFromJson_(o){const l=n.fromJson$$module$build$src$core$field_registry(o);return!l&&o.alt?typeof o.alt=="string"?(o=this.stringToFieldJson_(o.alt))?this.fieldFromJson_(o):null:this.fieldFromJson_(o.alt):l}inputFromJson_(o,l){var d={LEFT:n.Align$$module$build$src$core$inputs$align.LEFT,RIGHT:n.Align$$module$build$src$core$inputs$align.RIGHT,CENTRE:n.Align$$module$build$src$core$inputs$align.CENTRE,CENTER:n.Align$$module$build$src$core$inputs$align.CENTRE};let m;switch(o.type){case"input_value":m=this.appendValueInput(o.name);break;case"input_statement":m=this.appendStatementInput(o.name);break;case"input_dummy":m=this.appendDummyInput(o.name);break;case"input_end_row":m=this.appendEndRowInput(o.name);break;default:m=this.appendInputFromRegistry(o.type,o.name)}return m?(o.check&&m.setCheck(o.check),o.align&&(d=d[o.align.toUpperCase()],d===void 0?console.warn(l+"Illegal align value: ",o.align):m.setAlign(d)),m):null}isInputKeyword_(o){return o==="input_value"||o==="input_statement"||o==="input_dummy"||o==="input_end_row"||c(At.INPUT,o)}stringToFieldJson_(o){return(o=o.trim())?{type:"field_label",text:o}:null}moveInputBefore(o,l){if(o!==l){var d=-1,m=l?-1:this.inputList.length;for(let $=0,V;V=this.inputList[$];$++)if(V.name===o){if(d=$,m!==-1)break}else if(l&&V.name===l&&(m=$,d!==-1))break;if(d===-1)throw Error('Named input "'+o+'" not found.');if(m===-1)throw Error('Reference input "'+l+'" not found.');this.moveNumberedInputBefore(d,m)}}moveNumberedInputBefore(o,l){if(o===l)throw Error("Can't move input to itself.");if(o>=this.inputList.length)throw RangeError("Input index "+o+" out of bounds.");if(l>this.inputList.length)throw RangeError("Reference input "+l+" out of bounds.");const d=this.inputList[o];this.inputList.splice(o,1),o<l&&l--,this.inputList.splice(l,0,d)}removeInput(o,l){for(let d=0,m;m=this.inputList[d];d++)if(m.name===o)return m instanceof Sr&&this.statementInputCount--,m.dispose(),this.inputList.splice(d,1),!0;if(l)return!1;throw Error("Input not found: "+o)}getInput(o){for(let l=0,d;d=this.inputList[l];l++)if(d.name===o)return d;return null}getInputTargetBlock(o){return(o=this.getInput(o))&&o.connection&&o.connection.targetBlock()}getCommentText(){let o,l;return(l=(o=this.getIcon(qi.TYPE))==null?void 0:o.getText())!=null?l:null}setCommentText(o){var l;let d;const m=(d=(l=this.getIcon(qi.TYPE))==null?void 0:l.getText())!=null?d:null;m!==o&&(o!==null?((l=this.getIcon(qi.TYPE))||(l=this.addIcon(new qi(this))),n.disable$$module$build$src$core$events$utils(),l.setText(o),n.enable$$module$build$src$core$events$utils()):this.removeIcon(qi.TYPE),J(new(Ae(n.CHANGE$$module$build$src$core$events$utils))(this,"comment",null,m,o)))}setWarningText(o,l){}setMutator(o){}addIcon(o){if(this.hasIcon(o.getType()))throw new RO(o);return this.icons.push(o),this.icons.sort((l,d)=>l.getWeight()-d.getWeight()),o}removeIcon(o){if(!this.hasIcon(o))return!1;let l;return(l=this.getIcon(o))==null||l.dispose(),this.icons=this.icons.filter(d=>!d.getType().equals(o)),!0}hasIcon(o){return this.icons.some(l=>l.getType().equals(o))}getIcon(o){return o instanceof _r?this.icons.find(l=>l.getType().equals(o)):this.icons.find(l=>l.getType().toString()===o)}getIcons(){return[...this.icons]}getRelativeToSurfaceXY(){return this.xy_}moveBy(o,l,d){if(this.parentBlock_)throw Error("Block has parent");const m=new(Ae(n.MOVE$$module$build$src$core$events$utils))(this);d&&m.setReason(d),this.xy_.translate(o,l),m.recordNew(),J(m)}makeConnection_(o){return new bo(this,o)}allInputsFilled(o){if(o===void 0&&(o=!0),!o&&this.isShadow())return!1;for(let d=0,m;m=this.inputList[d];d++)if(m.connection){var l=m.connection.targetBlock();if(!l||!l.allInputsFilled(o))return!1}return(l=this.getNextBlock())?l.allInputsFilled(o):!0}toDevString(){let o=this.type?'"'+this.type+'" block':"Block";return this.id&&(o+=' (id="'+this.id+'")'),o}};wf.COLLAPSED_INPUT_NAME=Xd,wf.COLLAPSED_FIELD_NAME=ST;var _0=class{constructor(){this.drawer=this.curNode=this.colour=null,this.type="marker"}setDrawer(o){this.drawer=o}getDrawer(){return this.drawer}getCurNode(){return this.curNode}setCurNode(o){const l=this.curNode;this.curNode=o,this.drawer&&this.drawer.draw(l,this.curNode)}draw(){this.drawer&&this.drawer.draw(this.curNode,this.curNode)}hide(){this.drawer&&this.drawer.hide()}dispose(){this.getDrawer()&&this.getDrawer().dispose()}},UO=class extends _0{constructor(){super(),this.type="cursor"}next(){var o=this.getCurNode();if(!o)return null;for(o=o.next();o&&o.next()&&(o.getType()===Pt.types.NEXT||o.getType()===Pt.types.BLOCK);)o=o.next();return o&&this.setCurNode(o),o}in(){var o=this.getCurNode();if(!o)return null;(o.getType()===Pt.types.PREVIOUS||o.getType()===Pt.types.OUTPUT)&&(o=o.next());let l,d;return(o=(d=(l=o)==null?void 0:l.in())!=null?d:null)&&this.setCurNode(o),o}prev(){var o=this.getCurNode();if(!o)return null;for(o=o.prev();o&&o.prev()&&(o.getType()===Pt.types.NEXT||o.getType()===Pt.types.BLOCK);)o=o.prev();return o&&this.setCurNode(o),o}out(){var o=this.getCurNode();return o?((o=o.out())&&o.getType()===Pt.types.BLOCK&&(o=o.prev()||o),o&&this.setCurNode(o),o):null}};s(At.CURSOR,Ca,UO);var Wg=class extends UO{constructor(){super()}next(){var o=this.getCurNode();return o?((o=this.getNextNode_(o,this.validNode_))&&this.setCurNode(o),o):null}in(){return this.next()}prev(){var o=this.getCurNode();return o?((o=this.getPreviousNode_(o,this.validNode_))&&this.setCurNode(o),o):null}out(){return this.prev()}getNextNode_(o,l){if(!o)return null;const d=o.in()||o.next();return l(d)?d:d?this.getNextNode_(d,l):(o=this.findSiblingOrParent(o.out()),l(o)?o:o?this.getNextNode_(o,l):null)}getPreviousNode_(o,l){if(!o)return null;let d=o.prev();return d=d?this.getRightMostChild(d):o.out(),l(d)?d:d?this.getPreviousNode_(d,l):null}validNode_(o){let l=!1;return o=o&&o.getType(),(o===Pt.types.OUTPUT||o===Pt.types.INPUT||o===Pt.types.FIELD||o===Pt.types.NEXT||o===Pt.types.PREVIOUS||o===Pt.types.WORKSPACE)&&(l=!0),l}findSiblingOrParent(o){if(!o)return null;const l=o.next();return l||this.findSiblingOrParent(o.out())}getRightMostChild(o){if(!o.in())return o;for(o=o.in();o&&o.next();)o=o.next();return this.getRightMostChild(o)}};Wg.registrationName="basicCursor",s(At.CURSOR,Wg.registrationName,Wg);var T0=class extends Wg{validNode_(o){let l=!1;const d=o&&o.getType();return o&&(o=o.getLocation(),d===Pt.types.FIELD&&o&&o.isTabNavigable()&&o.isClickable()&&(l=!0)),l}},HO=10,yr=class extends bo{constructor(o,l){super(o,l),this.highlighted=!1,this.targetConnection=null,this.db=o.workspace.connectionDBList[l],this.dbOpposite=o.workspace.connectionDBList[Rc[l]],this.offsetInBlock=new zt(0,0),this.trackedState=yr.TrackedState.WILL_TRACK}dispose(){super.dispose(),this.trackedState===yr.TrackedState.TRACKED&&this.db.removeConnection(this,this.y);let o,l;(l=(o=this.sourceBlock_.pathObject).removeConnectionHighlight)==null||l.call(o,this)}getSourceBlock(){return super.getSourceBlock()}targetBlock(){return super.targetBlock()}distanceFrom(o){const l=this.x-o.x;return o=this.y-o.y,Math.sqrt(l*l+o*o)}bumpAwayFrom(o){if(!this.sourceBlock_.workspace.isDragging()){var l=this.sourceBlock_.getRootBlock();if(!l.isInFlyout){var d=!1;if(!l.isMovable()){if(l=o.getSourceBlock().getRootBlock(),!l.isMovable())return;o=this,d=!0}var m=L()==l;m||l.addSelect();var $=o.x+n.config$$module$build$src$core$config.snapRadius+Math.floor(Math.random()*HO)-this.x,V=o.y+n.config$$module$build$src$core$config.snapRadius+Math.floor(Math.random()*HO)-this.y;d&&(V=-V),l.RTL&&($=o.x-n.config$$module$build$src$core$config.snapRadius-Math.floor(Math.random()*HO)-this.x),l.moveBy($,V,["bump"]),m||l.removeSelect()}}}moveTo(o,l){let d=!1;return this.trackedState===yr.TrackedState.WILL_TRACK?(this.db.addConnection(this,l),this.trackedState=yr.TrackedState.TRACKED,d=!0):this.trackedState===yr.TrackedState.TRACKED&&(this.db.removeConnection(this,this.y),this.db.addConnection(this,l),d=!0),this.x=o,this.y=l,d}moveBy(o,l){return this.moveTo(this.x+o,this.y+l)}moveToOffset(o){return this.moveTo(o.x+this.offsetInBlock.x,o.y+this.offsetInBlock.y)}setOffsetInBlock(o,l){this.offsetInBlock.x=o,this.offsetInBlock.y=l}getOffsetInBlock(){return this.offsetInBlock}tightenEfficiently(){var o=this.targetConnection;const l=this.targetBlock();o&&l&&(o=zt.difference(this.offsetInBlock,o.offsetInBlock),l.translate(o.x,o.y))}closest(o,l){return this.dbOpposite.searchForClosest(this,o,l)}highlight(){this.highlighted=!0,this.getSourceBlock().queueRender()}unhighlight(){this.highlighted=!1,this.getSourceBlock().queueRender()}isHighlighted(){return this.highlighted}setTracking(o){o&&this.trackedState===yr.TrackedState.TRACKED||!o&&this.trackedState===yr.TrackedState.UNTRACKED||this.sourceBlock_.isInFlyout||(o?(this.db.addConnection(this,this.y),this.trackedState=yr.TrackedState.TRACKED):(this.trackedState===yr.TrackedState.TRACKED&&this.db.removeConnection(this,this.y),this.trackedState=yr.TrackedState.UNTRACKED))}stopTrackingAll(){if(this.setTracking(!1),this.targetConnection){const o=this.targetBlock().getDescendants(!1);for(let l=0;l<o.length;l++){const d=o[l],m=d.getConnections_(!0);for(let $=0;$<m.length;$++)m[$].setTracking(!1);for(const $ of d.getIcons())cu($)&&$.setBubbleVisible(!1)}}}startTrackingAll(){this.setTracking(!0);let o=[];if(this.type!==sn.INPUT_VALUE&&this.type!==sn.NEXT_STATEMENT)return o;const l=this.targetBlock();if(l){let d;l.isCollapsed()?(d=[],l.outputConnection&&d.push(l.outputConnection),l.nextConnection&&d.push(l.nextConnection),l.previousConnection&&d.push(l.previousConnection)):d=l.getConnections_(!0);for(let m=0;m<d.length;m++)o.push(...d[m].startTrackingAll());o.length||(o=[l])}return o}onFailedConnect(o){const l=this.getSourceBlock();if(_e()){const d=n.getGroup$$module$build$src$core$events$utils();setTimeout((function(){l.isDisposed()||l.getParent()||(n.setGroup$$module$build$src$core$events$utils(d),this.bumpAwayFrom(o),n.setGroup$$module$build$src$core$events$utils(!1))}).bind(this),n.config$$module$build$src$core$config.bumpDelay)}}disconnectInternal(o=!0){const{parentConnection:l,childConnection:d}=this.getParentAndChildConnections();if(l&&d){var m=l.getSourceBlock(),$=d.getSourceBlock();super.disconnectInternal(o),m.rendered&&m.queueRender(),$.rendered&&($.updateDisabled(),$.queueRender(),$.getSvgRoot().style.display="block")}}respawnShadow_(){super.respawnShadow_();const o=this.targetBlock();o&&(o.initSvg(),o.queueRender())}neighbours(o){return this.dbOpposite.getNeighbours(this,o)}connect_(o){super.connect_(o);var l=this.getSourceBlock();o=o.getSourceBlock();const d=l.rendered,m=o.rendered;d&&l.updateDisabled(),m&&o.updateDisabled(),d&&m&&(this.type===sn.NEXT_STATEMENT||this.type===sn.PREVIOUS_STATEMENT?o.queueRender():l.queueRender()),(l=l.getInputWithBlock(o))&&(l=l.isVisible(),o.getSvgRoot().style.display=l?"block":"none")}onCheckChanged_(){!this.isConnected()||this.targetConnection&&this.getConnectionChecker().canConnect(this,this.targetConnection,!1)||((this.isSuperior()?this.targetBlock():this.sourceBlock_).unplug(),this.sourceBlock_.bumpNeighbours())}setCheck(o){return super.setCheck(o),this.sourceBlock_.rendered&&this.sourceBlock_.queueRender(),this}};(function(o){o=o.TrackedState||(o.TrackedState={}),o[o.WILL_TRACK=-1]="WILL_TRACK",o[o.UNTRACKED=0]="UNTRACKED",o[o.TRACKED=1]="TRACKED"})(yr),yr.TrackedState;var Ha=class extends wf{constructor(o,l,d){super(o,l,d),this.width=this.height=0,this.warningTextDb=new Map,this.warning=this.mutator=null,this.eventsInit_=this.renderIsInProgress_=this.visuallyDisabled=this.rendered=!1,this.translation="",this.bumpNeighboursPid=0,this.dragging=!1,this.relativeCoords=new zt(0,0),this.workspace=o,this.svgGroup_=Ne(st.G,{}),this.style=o.getRenderer().getConstants().getBlockStyle(null),this.pathObject=o.getRenderer().makePathObject(this.svgGroup_,this.style),o=this.pathObject.svgPath,o.tooltip=this,ef(o),this.svgGroup_.setAttribute("data-id",this.id),this.doInit_()}initSvg(){if(!this.workspace.rendered)throw TypeError("Workspace is headless.");for(let l=0,d;d=this.inputList[l];l++)d.init();for(var o of this.getIcons())o.initView(this.createIconPointerDownListener(o)),o.updateEditable();this.applyColour(),this.pathObject.updateMovable(this.isMovable()),o=this.getSvgRoot(),this.workspace.options.readOnly||this.eventsInit_||!o||ee(o,"pointerdown",this,this.onMouseDown_),this.eventsInit_=!0,o.parentNode||this.workspace.getCanvas().appendChild(o)}getColourSecondary(){return this.style.colourSecondary}getColourTertiary(){return this.style.colourTertiary}select(){if(this.isShadow()&&this.getParent())this.getParent().select();else if(L()!==this){var o=null;if(L()){o=L().id,n.disable$$module$build$src$core$events$utils();try{L().unselect()}finally{n.enable$$module$build$src$core$events$utils()}}o=new(Ae(Sc))(o,this.id,this.workspace.id),J(o),I(this),this.addSelect()}}unselect(){if(L()===this){var o=new(Ae(Sc))(this.id,null,this.workspace.id);o.workspaceId=this.workspace.id,J(o),I(null),this.removeSelect()}}setParent(o){const l=this.parentBlock_;if(o!==l){ne(),super.setParent(o),Le();var d=this.getSvgRoot();if(!this.workspace.isClearing&&d){var m=this.getRelativeToSurfaceXY();o?o.getSvgRoot().appendChild(d):l&&((o=this.workspace.getCanvas().querySelector(".blocklyDragging"))?this.workspace.getCanvas().insertBefore(d,o):this.workspace.getCanvas().appendChild(d),this.translate(m.x,m.y)),this.applyColour()}}}getRelativeToSurfaceXY(){const o=this.workspace.getLayerManager();if(!o)throw Error("Cannot calculate position because the workspace has not been appended");let l=0,d=0,m=this.getSvgRoot();if(m)do{const $=Ce(m);l+=$.x,d+=$.y,m=m.parentNode}while(m&&!o.hasLayer(m));return new zt(l,d)}moveBy(o,l,d){if(this.parentBlock_)throw Error("Block has parent");const m=he();let $=null;m&&($=new(Ae(n.MOVE$$module$build$src$core$events$utils))(this),d&&$.setReason(d)),o=new zt(o,l),l=this.getRelativeToSurfaceXY(),o=zt.sum(l,o),this.translate(o.x,o.y),this.updateComponentLocations(o),m&&$&&($.recordNew(),J($)),this.workspace.resizeContents()}translate(o,l){this.translation=`translate(${o}, ${l})`,this.relativeCoords=new zt(o,l),this.getSvgRoot().setAttribute("transform",this.getTranslation())}getTranslation(){return this.translation}moveTo(o,l){const d=this.getRelativeToSurfaceXY();this.moveBy(o.x-d.x,o.y-d.y,l)}moveDuringDrag(o){this.translate(o.x,o.y),this.getSvgRoot().setAttribute("transform",this.getTranslation()),this.updateComponentLocations(o)}snapToGrid(){if(!(this.isDeadOrDying()||this.workspace.isDragging()||this.getParent()||this.isInFlyout)){var o=this.workspace.getGrid();if(o&&o.shouldSnap()){var l=o.getSpacing(),d=l/2,m=this.getRelativeToSurfaceXY();o=Math.round(Math.round((m.x-d)/l)*l+d-m.x),l=Math.round(Math.round((m.y-d)/l)*l+d-m.y),(o||l)&&this.moveBy(o,l,["snap"])}}}getBoundingRectangle(){const o=this.getRelativeToSurfaceXY(),l=this.getHeightWidth();let d,m;return this.RTL?(d=o.x-l.width,m=o.x):(d=o.x,m=o.x+l.width),new Po(o.y,o.y+l.height,d,m)}markDirty(){this.pathObject.constants=this.workspace.getRenderer().getConstants();for(let o=0,l;l=this.inputList[o];o++)l.markDirty()}setCollapsed(o){this.collapsed_!==o&&(super.setCollapsed(o),this.updateCollapsed_())}updateCollapsed_(){var o=this.isCollapsed();const l=Xd,d=ST;for(let $=0,V;V=this.inputList[$];$++)V.name!==l&&V.setVisible(!o);for(var m of this.getIcons())m.updateCollapsed();o?(o=this.toString(TO),(m=this.getField(d))?m.setValue(o):(this.getInput(l)||this.appendDummyInput(l)).appendField(new ms(o),d)):(this.updateDisabled(),this.removeInput(l))}tab(o,l){const d=new T0;d.setCurNode(Pt.createFieldNode(o)),o=d.getCurNode(),l?d.next():d.prev(),(l=d.getCurNode())&&l!==o&&(l.getLocation().showEditor(),this.workspace.keyboardAccessibilityMode&&this.workspace.getCursor().setCurNode(l))}onMouseDown_(o){const l=this.workspace.getGesture(o);l&&l.handleBlockStart(o,this)}showHelp(){const o=typeof this.helpUrl=="function"?this.helpUrl():this.helpUrl;o&&window.open(o)}generateContextMenu(){if(this.workspace.options.readOnly||!this.contextMenu)return null;const o=Mo.registry.getContextMenuOptions(Mo.ScopeType.BLOCK,{block:this});return this.customContextMenu&&this.customContextMenu(o),o}showContextMenu(o){const l=this.generateContextMenu();l&&l.length&&(Wp(o,l,this.RTL),Zv(this))}updateComponentLocations(o){if(this.rendered){this.dragging||this.updateConnectionLocations(o),this.updateIconLocations(o),this.updateFieldLocations(o);for(const l of this.getChildren(!1))l.updateComponentLocations(zt.sum(o,l.relativeCoords))}}updateConnectionLocations(o){for(const l of this.getConnections_(!1))l.moveToOffset(o)}updateIconLocations(o){for(const l of this.getIcons())l.onLocationChange(o)}updateFieldLocations(o){for(const l of this.inputList)for(const d of l.fieldRow)d.onLocationChange(o)}setDragging(o){(this.dragging=o)?(this.translation="",Gr.push(...this.getConnections_(!0)),Se(this.svgGroup_,"blocklyDragging")):(Gr.length=0,ut(this.svgGroup_,"blocklyDragging"));for(let l=0;l<this.childBlocks_.length;l++)this.childBlocks_[l].setDragging(o)}setMovable(o){super.setMovable(o),this.pathObject.updateMovable(o)}setEditable(o){super.setEditable(o),o=this.getIcons();for(let l=0;l<o.length;l++)o[l].updateEditable()}setShadow(o){super.setShadow(o),this.applyColour()}setInsertionMarker(o){this.isInsertionMarker_!==o&&(this.isInsertionMarker_=o)&&(this.setColour(this.workspace.getRenderer().getConstants().INSERTION_MARKER_COLOUR),this.pathObject.updateInsertionMarker(!0))}getSvgRoot(){return this.svgGroup_}dispose(o,l){this.isDeadOrDying()||(ab(),Vh(),l&&this.rendered&&(this.unplug(o),Yh(this)),super.dispose(!!o),mt(this.svgGroup_))}disposeInternal(){this.isDeadOrDying()||(super.disposeInternal(),this.rendered=!1,L()===this&&(this.unselect(),this.workspace.cancelCurrentGesture()),[...this.warningTextDb.values()].forEach(o=>clearTimeout(o)),this.warningTextDb.clear(),this.getIcons().forEach(o=>o.dispose()))}checkAndDelete(){this.workspace.isFlyout||(n.setGroup$$module$build$src$core$events$utils(!0),this.workspace.hideChaff(),this.outputConnection?this.dispose(!1,!0):this.dispose(!0,!0),n.setGroup$$module$build$src$core$events$utils(!1))}toCopyData(){return this.isInsertionMarker_?null:{paster:mf.TYPE,blockState:Wl(this,{addCoordinates:!0,addNextBlocks:!1}),typeCounts:D(this,!0)}}applyColour(){this.pathObject.applyColour(this);const o=this.getIcons();for(let l=0;l<o.length;l++)o[l].applyColour();for(let l=0,d;d=this.inputList[l];l++)for(let m=0,$;$=d.fieldRow[m];m++)$.applyColour()}updateDisabled(){const o=!this.isEnabled()||this.getInheritedDisabled();if(this.visuallyDisabled===o){let l;(l=this.getNextBlock())==null||l.updateDisabled()}else{this.applyColour(),this.visuallyDisabled=o;for(const l of this.getChildren(!1))l.updateDisabled()}}getCommentIcon(){ct("getCommentIcon","v10","v11","getIcon");let o;return(o=this.getIcon(qi.TYPE))!=null?o:null}setWarningText(o,l=""){if(l)this.warningTextDb.has(l)&&(clearTimeout(this.warningTextDb.get(l)),this.warningTextDb.delete(l));else{for(var d of this.warningTextDb.values())clearTimeout(d);this.warningTextDb.clear()}if(this.workspace.isDragging())this.warningTextDb.set(l,setTimeout(()=>{this.isDeadOrDying()||(this.warningTextDb.delete(l),this.setWarningText(o,l))},100));else if(this.isInFlyout&&(o=null),d=this.getIcon(ea.TYPE),o){let m=this.getSurroundParent(),$=null;for(;m;)m.isCollapsed()&&($=m),m=m.getSurroundParent();$&&$.setWarningText(n.Msg$$module$build$src$core$msg.COLLAPSED_WARNINGS_WARNING,Ha.COLLAPSED_WARNING_ID),d?d.addMessage(o,l):this.addIcon(new ea(this).addMessage(o,l))}else d&&(l?(d.addMessage("",l),d.getText()||this.removeIcon(ea.TYPE)):this.removeIcon(ea.TYPE))}setMutator(o){this.removeIcon(n.MutatorIcon$$module$build$src$core$icons$mutator_icon.TYPE),o&&this.addIcon(o)}addIcon(o){return super.addIcon(o),o instanceof ea&&(this.warning=o),o instanceof n.MutatorIcon$$module$build$src$core$icons$mutator_icon&&(this.mutator=o),this.rendered&&(o.initView(this.createIconPointerDownListener(o)),o.applyColour(),o.updateEditable(),this.queueRender(),ki(),this.bumpNeighbours()),o}createIconPointerDownListener(o){return l=>{this.isDeadOrDying()||(l=this.workspace.getGesture(l))&&l.setStartIcon(o)}}removeIcon(o){const l=super.removeIcon(o);return o.equals(ea.TYPE)&&(this.warning=null),o.equals(n.MutatorIcon$$module$build$src$core$icons$mutator_icon.TYPE)&&(this.mutator=null),this.rendered&&(this.queueRender(),ki(),this.bumpNeighbours()),l}setEnabled(o){this.isEnabled()!==o&&(super.setEnabled(o),this.rendered&&!this.getInheritedDisabled()&&this.updateDisabled())}setHighlighted(o){this.rendered&&this.pathObject.updateHighlighted(o)}addSelect(){this.pathObject.updateSelected(!0)}removeSelect(){this.pathObject.updateSelected(!1)}setDeleteStyle(o){this.pathObject.updateDraggingDelete(o)}getColour(){return this.style.colourPrimary}setColour(o){super.setColour(o),o=this.workspace.getRenderer().getConstants().getBlockStyleForColour(this.colour_),this.pathObject.setStyle(o.style),this.style=o.style,this.styleName_=o.name,this.applyColour()}setStyle(o){const l=this.workspace.getRenderer().getConstants().getBlockStyle(o);if(this.styleName_=o,l)this.hat=l.hat,this.pathObject.setStyle(l),this.colour_=l.colourPrimary,this.style=l,this.applyColour();else throw Error("Invalid style name: "+o)}bringToFront(o=!1){let l=this;if(!l.isDeadOrDying())do{const d=l.getSvgRoot(),m=d.parentNode,$=m.childNodes;if($[$.length-1]!==d&&m.appendChild(d),o)break;l=l.getParent()}while(l)}setPreviousStatement(o,l){super.setPreviousStatement(o,l),this.rendered&&(this.queueRender(),this.bumpNeighbours())}setNextStatement(o,l){super.setNextStatement(o,l),this.rendered&&(this.queueRender(),this.bumpNeighbours())}setOutput(o,l){super.setOutput(o,l),this.rendered&&(this.queueRender(),this.bumpNeighbours())}setInputsInline(o){super.setInputsInline(o),this.rendered&&(this.queueRender(),this.bumpNeighbours())}removeInput(o,l){return o=super.removeInput(o,l),this.rendered&&(this.queueRender(),this.bumpNeighbours()),o}moveNumberedInputBefore(o,l){super.moveNumberedInputBefore(o,l),this.rendered&&(this.queueRender(),this.bumpNeighbours())}appendInput(o){return super.appendInput(o),this.rendered&&(this.queueRender(),this.bumpNeighbours()),o}setConnectionTracking(o){if(this.previousConnection&&this.previousConnection.setTracking(o),this.outputConnection&&this.outputConnection.setTracking(o),this.nextConnection){this.nextConnection.setTracking(o);var l=this.nextConnection.targetBlock();l&&l.setConnectionTracking(o)}if(!this.collapsed_)for(l=0;l<this.inputList.length;l++){var d=this.inputList[l].connection;d&&(d.setTracking(o),(d=d.targetBlock())&&d.setConnectionTracking(o))}}getConnections_(o){const l=[];if((o||this.rendered)&&(this.outputConnection&&l.push(this.outputConnection),this.previousConnection&&l.push(this.previousConnection),this.nextConnection&&l.push(this.nextConnection),o||!this.collapsed_))for(let d=0,m;m=this.inputList[d];d++)m.connection&&l.push(m.connection);return l}lastConnectionInStack(o){return super.lastConnectionInStack(o)}getMatchingConnection(o,l){return super.getMatchingConnection(o,l)}makeConnection_(o){return new yr(this,o)}getNextBlock(){return super.getNextBlock()}getPreviousBlock(){return super.getPreviousBlock()}bumpNeighbours(){if(!this.bumpNeighboursPid){var o=n.getGroup$$module$build$src$core$events$utils();this.bumpNeighboursPid=setTimeout(()=>{const l=n.getGroup$$module$build$src$core$events$utils();n.setGroup$$module$build$src$core$events$utils(o),this.getRootBlock().bumpNeighboursInternal(),n.setGroup$$module$build$src$core$events$utils(l),this.bumpNeighboursPid=0},n.config$$module$build$src$core$config.bumpDelay)}}bumpNeighboursInternal(){const o=this.getRootBlock();if(!(this.isDeadOrDying()||this.workspace.isDragging()||o.isInFlyout))for(const l of this.getConnections_(!1)){if(l.isSuperior()){let d;(d=l.targetBlock())==null||d.bumpNeighboursInternal()}for(const d of l.neighbours(n.config$$module$build$src$core$config.snapRadius))d.getSourceBlock().getRootBlock()!==o&&(l.isConnected()&&d.isConnected()||(l.isSuperior()?d.bumpAwayFrom(l):l.bumpAwayFrom(d)))}}scheduleSnapAndBump(){const o=n.getGroup$$module$build$src$core$events$utils();setTimeout(()=>{n.setGroup$$module$build$src$core$events$utils(o),this.snapToGrid(),n.setGroup$$module$build$src$core$events$utils(!1)},n.config$$module$build$src$core$config.bumpDelay/2),this.bumpNeighbours()}positionNearConnection(o,l,d){if(o.type===sn.NEXT_STATEMENT||o.type===sn.INPUT_VALUE){let m=l.x;l=l.y,m+=d.x-o.getOffsetInBlock().x,l+=d.y-o.getOffsetInBlock().y,this.moveBy(m,l)}}getChildren(o){return super.getChildren(o)}queueRender(){return Bp(this)}render(){this.queueRender(),ki()}renderEfficiently(){this.rendered=!0,ne(),this.isCollapsed()&&this.updateCollapsed_(),this.isEnabled()||this.updateDisabled(),this.workspace.getRenderer().render(this),this.tightenChildrenEfficiently(),Le(),this.updateMarkers_()}tightenChildrenEfficiently(){for(const o of this.inputList){const l=o.connection;l&&l.tightenEfficiently()}this.nextConnection&&this.nextConnection.tightenEfficiently()}updateMarkers_(){this.workspace.keyboardAccessibilityMode&&this.pathObject.cursorSvg&&this.workspace.getCursor().draw(),this.workspace.keyboardAccessibilityMode&&this.pathObject.markerSvg&&this.workspace.getMarker(Qi.LOCAL_MARKER).draw();for(const o of this.inputList)for(const l of o.fieldRow)l.updateMarkers_()}setCursorSvg(o){this.pathObject.setCursorSvg(o)}setMarkerSvg(o){this.pathObject.setMarkerSvg(o)}getHeightWidth(){let o=this.height,l=this.width;var d=this.getNextBlock();if(d){d=d.getHeightWidth();const m=this.workspace.getRenderer().getConstants().NOTCH_HEIGHT;o+=d.height-m,l=Math.max(l,d.width)}return{height:o,width:l}}fadeForReplacement(o){this.pathObject.updateReplacementFade(o)}highlightShapeForInput(o,l){this.pathObject.updateShapeForInputHighlight(o,l)}};Ha.INLINE=-1,Ha.COLLAPSED_WARNING_ID="TEMP_COLLAPSED_WARNING_";var E0=class{constructor(){}onDragEnter(o){}onDragOver(o){}onDragExit(o){}onDrop(o){}getClientRect(){return null}shouldPreventMove(o){return!1}},yT=class extends E0{constructor(){super(),this.wouldDelete_=!1}wouldDelete(o,l){return o instanceof Ha?(o=!o.getParent()&&o.isDeletable(),this.updateWouldDelete_(o&&!l)):this.updateWouldDelete_(o.isDeletable()),this.wouldDelete_}updateWouldDelete_(o){this.wouldDelete_=o}},v0=class extends yT{constructor(o){super(),this.workspace=o,this.id="trashcan",this.contents=[],this.flyout=null,this.isLidOpen=!1,this.minOpenness=0,this.lidTask=this.svgLid=this.svgGroup=null,this.top=this.left=this.lidOpen=0,this.initialized=!1,0>=this.workspace.options.maxTrashcanContents||(o=new as({scrollbars:!0,parentWorkspace:this.workspace,rtl:this.workspace.RTL,oneBasedIndex:this.workspace.options.oneBasedIndex,renderer:this.workspace.options.renderer,rendererOverrides:this.workspace.options.rendererOverrides,move:{scrollbars:!0}}),this.workspace.horizontalLayout?(o.toolboxPosition=this.workspace.toolboxPosition===Gn.TOP?Gn.BOTTOM:Gn.TOP,this.flyout=new(p(At.FLYOUTS_HORIZONTAL_TOOLBOX,this.workspace.options,!0))(o)):(o.toolboxPosition=this.workspace.toolboxPosition===Gn.RIGHT?Gn.LEFT:Gn.RIGHT,this.flyout=new(p(At.FLYOUTS_VERTICAL_TOOLBOX,this.workspace.options,!0))(o)),this.workspace.addChangeListener(this.onDelete.bind(this)))}createDom(){this.svgGroup=Ne(st.G,{class:"blocklyTrash"});let o;const l=String(Math.random()).substring(2);o=Ne(st.CLIPPATH,{id:"blocklyTrashBodyClipPath"+l},this.svgGroup),Ne(st.RECT,{width:kf,height:$T,y:Nf},o);const d=Ne(st.IMAGE,{width:ji.width,x:-VO,height:ji.height,y:-GO,"clip-path":"url(#blocklyTrashBodyClipPath"+l+")"},this.svgGroup);return d.setAttributeNS(Xr,"xlink:href",this.workspace.options.pathToMedia+ji.url),o=Ne(st.CLIPPATH,{id:"blocklyTrashLidClipPath"+l},this.svgGroup),Ne(st.RECT,{width:kf,height:Nf},o),this.svgLid=Ne(st.IMAGE,{width:ji.width,x:-VO,height:ji.height,y:-GO,"clip-path":"url(#blocklyTrashLidClipPath"+l+")"},this.svgGroup),this.svgLid.setAttributeNS(Xr,"xlink:href",this.workspace.options.pathToMedia+ji.url),pe(this.svgGroup,"pointerdown",this,this.blockMouseDownWhenOpenable),pe(this.svgGroup,"pointerup",this,this.click),pe(d,"pointerover",this,this.mouseOver),pe(d,"pointerout",this,this.mouseOut),this.animateLid(),this.svgGroup}init(){0<this.workspace.options.maxTrashcanContents&&(qt(this.flyout.createDom(st.SVG),this.workspace.getParentSvg()),this.flyout.init(this.workspace)),this.workspace.getComponentManager().addComponent({component:this,weight:1,capabilities:[Gs.Capability.AUTOHIDEABLE,Gs.Capability.DELETE_AREA,Gs.Capability.DRAG_TARGET,Gs.Capability.POSITIONABLE]}),this.initialized=!0,this.setLidOpen(!1)}dispose(){this.workspace.getComponentManager().removeComponent("trashcan"),this.svgGroup&&mt(this.svgGroup),this.lidTask&&clearTimeout(this.lidTask)}hasContents(){return!!this.contents.length}contentsIsOpen(){return!!this.flyout&&this.flyout.isVisible()}openFlyout(){if(!this.contentsIsOpen()){var o=this.contents.map(function(d){return JSON.parse(d)}),l=this.workspace.getParentSvg().style;l.cursor="wait",setTimeout(()=>{let d;(d=this.flyout)==null||d.show(o),l.cursor="";let m;(m=this.workspace.scrollbar)==null||m.setVisible(!1)},10),this.fireUiEvent(!0)}}closeFlyout(){if(this.contentsIsOpen()){var o;(o=this.flyout)==null||o.hide();var l;(l=this.workspace.scrollbar)==null||l.setVisible(!0),this.fireUiEvent(!1),this.workspace.recordDragTargets()}}autoHide(o){!o&&this.flyout&&this.closeFlyout()}emptyContents(){this.hasContents()&&(this.contents.length=0,this.setMinOpenness(0),this.closeFlyout())}position(o,l){if(this.initialized){var d=dl(this.workspace,o);o=Br(d,new Ko(kf,$T+Nf),b0,IT,o,this.workspace),l=_a(o,IT,d.vertical===Ki.TOP?Ic.DOWN:Ic.UP,l),this.top=l.top,this.left=l.left;var m;(m=this.svgGroup)==null||m.setAttribute("transform","translate("+this.left+","+this.top+")")}}getBoundingRectangle(){return new Po(this.top,this.top+$T+Nf,this.left,this.left+kf)}getClientRect(){if(!this.svgGroup)return null;var o=this.svgGroup.getBoundingClientRect();const l=o.top+GO-Xg;return o=o.left+VO-Xg,new Po(l,l+Nf+$T+2*Xg,o,o+kf+2*Xg)}onDragOver(o){this.setLidOpen(this.wouldDelete_)}onDragExit(o){this.setLidOpen(!1)}onDrop(o){setTimeout(this.setLidOpen.bind(this,!1),100)}setLidOpen(o){this.isLidOpen!==o&&(this.lidTask&&clearTimeout(this.lidTask),this.isLidOpen=o,this.animateLid())}animateLid(){const o=OL;var l=1/(o+1);this.lidOpen+=this.isLidOpen?l:-l,this.lidOpen=Math.min(Math.max(this.lidOpen,this.minOpenness),1),this.setLidAngle(this.lidOpen*Ji),l=O0+this.lidOpen*(SL-O0),this.svgGroup&&(this.svgGroup.style.opacity=`${l}`),this.lidOpen>this.minOpenness&&1>this.lidOpen&&(this.lidTask=setTimeout(this.animateLid.bind(this),WO/o))}setLidAngle(o){const l=this.workspace.toolboxPosition===Gn.RIGHT||this.workspace.horizontalLayout&&this.workspace.RTL;let d;(d=this.svgLid)==null||d.setAttribute("transform","rotate("+(l?-o:o)+","+(l?4:kf-4)+","+(Nf-2)+")")}setMinOpenness(o){this.minOpenness=o,this.isLidOpen||this.setLidAngle(o*Ji)}closeLid(){this.setLidOpen(!1)}click(){this.hasContents()&&!this.workspace.isDragging()&&this.openFlyout()}fireUiEvent(o){o=new(Ae(cf))(o,this.workspace.id),J(o)}blockMouseDownWhenOpenable(o){!this.contentsIsOpen()&&this.hasContents()&&o.stopPropagation()}mouseOver(){this.hasContents()&&this.setLidOpen(!0)}mouseOut(){this.setLidOpen(!1)}onDelete(o){if(!(0>=this.workspace.options.maxTrashcanContents||o.type!==n.DELETE$$module$build$src$core$events$utils||o.type!==n.DELETE$$module$build$src$core$events$utils||o.wasShadow)){if(!o.oldJson)throw Error("Encountered a delete event without proper oldJson");if(o=JSON.stringify(this.cleanBlockJson(o.oldJson)),this.contents.indexOf(o)===-1){for(this.contents.unshift(o);this.contents.length>this.workspace.options.maxTrashcanContents;)this.contents.pop();this.setMinOpenness(bL)}}}cleanBlockJson(o){function l(d){if(d){if(delete d.id,delete d.x,delete d.y,delete d.enabled,d.icons&&d.icons.comment){var m=d.icons.comment;delete m.height,delete m.width,delete m.pinned}m=d.inputs;for(var $ in m){var V=m[$];const Ee=V.block;V=V.shadow,Ee&&l(Ee),V&&l(V)}d.next&&($=d.next,d=$.block,$=$.shadow,d&&l(d),$&&l($))}}return o=JSON.parse(JSON.stringify(o)),l(o),Object.assign({},{kind:"BLOCK"},o)}},kf=47,$T=44,Nf=16,IT=20,b0=20,Xg=10,VO=0,GO=32,bL=.1,WO=80,OL=4,O0=.4,SL=.8,Ji=45,yo=class{constructor(){this.shortcuts=new Map,this.keyMap=new Map,this.reset()}reset(){this.shortcuts.clear(),this.keyMap.clear()}register(o,l){if(this.shortcuts.get(o.name)&&!l)throw Error(`Shortcut named "${o.name}" already exists.`);if(this.shortcuts.set(o.name,o),(l=o.keyCodes)&&0<l.length)for(let d=0;d<l.length;d++)this.addKeyMapping(l[d],o.name,!!o.allowCollision)}unregister(o){return this.shortcuts.get(o)?(this.removeAllKeyMappings(o),this.shortcuts.delete(o),!0):(console.warn(`Keyboard shortcut named "${o}" not found.`),!1)}addKeyMapping(o,l,d){o=`${o}`;const m=this.keyMap.get(o);if(m&&!d)throw Error(`Shortcut named "${l}" collides with shortcuts "${m}"`);m&&d?m.unshift(l):this.keyMap.set(o,[l])}removeKeyMapping(o,l,d){const m=this.keyMap.get(o);if(!m)return d||console.warn(`No keyboard shortcut named "${l}" registered with key code "${o}"`),!1;const $=m.indexOf(l);return-1<$?(m.splice($,1),m.length===0&&this.keyMap.delete(o),!0):(d||console.warn(`No keyboard shortcut named "${l}" registered with key code "${o}"`),!1)}removeAllKeyMappings(o){for(const l of this.keyMap.keys())this.removeKeyMapping(l,o,!0)}setKeyMap(o){this.keyMap.clear();for(const l in o)this.keyMap.set(l,o[l])}getKeyMap(){const o=Object.create(null);for(const[l,d]of this.keyMap)o[l]=d;return o}getRegistry(){const o=Object.create(null);for(const[l,d]of this.shortcuts)o[l]=d;return Oa(Object.create(null),o)}onKeyDown(o,l){var d=this.serializeKeyEvent_(l);if(d=this.getShortcutNamesByKeyCode(d),!d)return!1;for(let m=0,$;$=d[m];m++){const V=this.shortcuts.get($);let Ee,Ve;if((Ee=V)==null||!Ee.preconditionFn||(Ve=V)!=null&&Ve.preconditionFn(o)){let St,tn;if((St=V)!=null&&St.callback&&((tn=V)!=null&&tn.callback(o,l,V)))return!0}}return!1}getShortcutNamesByKeyCode(o){return this.keyMap.get(o)||[]}getKeyCodesByShortcutName(o){const l=[];for(const[d,m]of this.keyMap)-1<m.indexOf(o)&&l.push(d);return l}serializeKeyEvent_(o){let l="";for(const d in yo.modifierKeys)o.getModifierState(d)&&(l!==""&&(l+="+"),l+=d);return l!==""&&o.keyCode?l=l+"+"+o.keyCode:o.keyCode&&(l=String(o.keyCode)),l}checkModifiers_(o){for(let l=0,d;d=o[l];l++)if(!(d in yo.modifierKeys))throw Error(d+" is not a valid modifier key.")}createSerializedKey(o,l){let d="";if(l){this.checkModifiers_(l);for(const m in yo.modifierKeys)-1<l.indexOf(yo.modifierKeys[m])&&(d!==""&&(d+="+"),d+=m)}return d!==""&&o?d=d+"+"+o:o&&(d=`${o}`),d}};yo.registry=new yo,function(o){o=o.modifierKeys||(o.modifierKeys={}),o[o.Shift=16]="Shift",o[o.Control=17]="Control",o[o.Alt=18]="Alt",o[o.Meta=91]="Meta"}(yo);var Va;(function(o){o.ESCAPE="escape",o.DELETE="delete",o.COPY="copy",o.CUT="cut",o.PASTE="paste",o.UNDO="undo",o.REDO="redo"})(Va||(Va={}));var zg=null,RT=null;sf();var Ga={};Ga.names=Va,Ga.registerCopy=qs,Ga.registerCut=sg,Ga.registerDefaultShortcuts=sf,Ga.registerDelete=$_,Ga.registerEscape=bb,Ga.registerPaste=I_,Ga.registerRedo=ig,Ga.registerUndo=_l;var XO=class{constructor(o,l){this.procedureModelClass=o,this.parameterModelClass=l,this.priority=zI}save(o){return o=o.getProcedureMap().getProcedures().map(l=>bc(l)),o.length?o:null}load(o,l){const d=l.getProcedureMap();for(const m of o)d.add(_i(this.procedureModelClass,this.parameterModelClass,m,l))}clear(o){o.getProcedureMap().clear()}},Pf={};Pf.ProcedureSerializer=XO,Pf.loadParameter=rg,Pf.loadProcedure=_i,Pf.saveParameter=R_,Pf.saveProcedure=bc;var CT=class{constructor(){this.priority=XI}save(o){const l=[];for(const d of o.getAllVariables())o={name:d.name,id:d.getId()},d.type&&(o.type=d.type),l.push(o);return l.length?l:null}load(o,l){for(const d of o)l.createVariable(d.name,d.type,d.id)}clear(o){o.getVariableMap().clear()}};Fh("variables",new CT);var S0={};S0.VariableSerializer=CT;var zO={};zO.load=OI,zO.save=bI;var yL={blocks:Ig,exceptions:Dd,priorities:lL,procedures:Pf,registry:oO,variables:S0,workspaces:zO},YO=class{constructor(o,l,d,m,$){this.workspace=o,this.oldHostMetrics_=this.corner_=this.vScroll=this.hScroll=null,l=l===void 0?!0:l,d=d===void 0?!0:d;const V=l&&d;l&&(this.hScroll=new Ms(o,!0,V,m,$)),d&&(this.vScroll=new Ms(o,!1,V,m,$)),V&&(this.corner_=Ne(st.RECT,{height:Ms.scrollbarThickness,width:Ms.scrollbarThickness,class:"blocklyScrollbarBackground"}),qt(this.corner_,o.getBubbleCanvas()))}dispose(){mt(this.corner_),this.oldHostMetrics_=this.corner_=null,this.hScroll&&(this.hScroll.dispose(),this.hScroll=null),this.vScroll&&(this.vScroll.dispose(),this.vScroll=null)}resize(){const o=this.workspace.getMetrics();if(o){var l=!1,d=!1;if(this.oldHostMetrics_&&this.oldHostMetrics_.viewWidth===o.viewWidth&&this.oldHostMetrics_.viewHeight===o.viewHeight&&this.oldHostMetrics_.absoluteTop===o.absoluteTop&&this.oldHostMetrics_.absoluteLeft===o.absoluteLeft?(this.oldHostMetrics_&&this.oldHostMetrics_.scrollWidth===o.scrollWidth&&this.oldHostMetrics_.viewLeft===o.viewLeft&&this.oldHostMetrics_.scrollLeft===o.scrollLeft||(l=!0),this.oldHostMetrics_&&this.oldHostMetrics_.scrollHeight===o.scrollHeight&&this.oldHostMetrics_.viewTop===o.viewTop&&this.oldHostMetrics_.scrollTop===o.scrollTop||(d=!0)):d=l=!0,l||d){try{n.disable$$module$build$src$core$events$utils(),this.hScroll&&l&&this.hScroll.resize(o),this.vScroll&&d&&this.vScroll.resize(o)}finally{n.enable$$module$build$src$core$events$utils()}this.workspace.maybeFireViewportChangeEvent()}if(this.hScroll&&this.vScroll){if(!this.oldHostMetrics_||this.oldHostMetrics_.viewWidth!==o.viewWidth||this.oldHostMetrics_.absoluteLeft!==o.absoluteLeft){let m;(m=this.corner_)==null||m.setAttribute("x",String(this.vScroll.position.x))}if(!this.oldHostMetrics_||this.oldHostMetrics_.viewHeight!==o.viewHeight||this.oldHostMetrics_.absoluteTop!==o.absoluteTop){let m;(m=this.corner_)==null||m.setAttribute("y",String(this.hScroll.position.y))}}this.oldHostMetrics_=o}}canScrollHorizontally(){return!!this.hScroll}canScrollVertically(){return!!this.vScroll}setOrigin(o,l){this.hScroll&&this.hScroll.setOrigin(o,l),this.vScroll&&this.vScroll.setOrigin(o,l)}set(o,l,d){this.hScroll&&this.hScroll.set(o,!1),this.vScroll&&this.vScroll.set(l,!1),(d||d===void 0)&&(o={},this.hScroll&&(o.x=this.hScroll.getRatio_()),this.vScroll&&(o.y=this.vScroll.getRatio_()),this.workspace.setMetrics(o))}setX(o){this.hScroll&&this.hScroll.set(o,!0)}setY(o){this.vScroll&&this.vScroll.set(o,!0)}setContainerVisible(o){this.hScroll&&this.hScroll.setContainerVisible(o),this.vScroll&&this.vScroll.setContainerVisible(o)}isVisible(){let o=!1;return this.hScroll&&(o=this.hScroll.isVisible()),this.vScroll&&(o=o||this.vScroll.isVisible()),o}setVisible(o){this.hScroll&&this.hScroll.setVisibleInternal(o),this.vScroll&&this.vScroll.setVisibleInternal(o)}resizeContent(o){this.hScroll&&this.hScroll.resizeContentHorizontal(o),this.vScroll&&this.vScroll.resizeContentVertical(o)}resizeView(o){this.hScroll&&this.hScroll.resizeViewHorizontal(o),this.vScroll&&this.vScroll.resizeViewVertical(o)}},MT=class{constructor(o){this.workspace_=o}getDimensionsPx_(o){let l=0,d=0;return o&&(l=o.getWidth(),d=o.getHeight()),new Ko(l,d)}getFlyoutMetrics(o){return o=this.getDimensionsPx_(this.workspace_.getFlyout(o)),{width:o.width,height:o.height,position:this.workspace_.toolboxPosition}}getToolboxMetrics(){const o=this.getDimensionsPx_(this.workspace_.getToolbox());return{width:o.width,height:o.height,position:this.workspace_.toolboxPosition}}getSvgMetrics(){return this.workspace_.getCachedParentSvgSize()}getAbsoluteMetrics(){let o=0,l=0;const d=this.getToolboxMetrics(),m=this.getFlyoutMetrics(),$=!!this.workspace_.getToolbox();var V;const Ee=!((V=this.workspace_.getFlyout())!=null&&V.autoClose);V=$?d.position:m.position;const Ve=V===Gn.TOP;return V===Gn.LEFT&&($&&(o+=d.width),Ee&&(o+=m.width)),Ve&&($&&(l+=d.height),Ee&&(l+=m.height)),{top:l,left:o}}getViewMetrics(o){o=o?this.workspace_.scale:1;const l=this.getSvgMetrics(),d=this.getToolboxMetrics(),m=this.getFlyoutMetrics(),$=!!this.workspace_.getToolbox();var V;const Ee=!((V=this.workspace_.getFlyout())!=null&&V.autoClose);V=$?d.position:m.position;const Ve=V===Gn.LEFT||V===Gn.RIGHT;return(V===Gn.TOP||V===Gn.BOTTOM)&&($&&(l.height-=d.height),Ee&&(l.height-=m.height)),Ve&&($&&(l.width-=d.width),Ee&&(l.width-=m.width)),{height:l.height/o,width:l.width/o,top:-this.workspace_.scrollY/o,left:-this.workspace_.scrollX/o}}getContentMetrics(o){o=o?1:this.workspace_.scale;const l=this.workspace_.getBlocksBoundingBox();return{height:(l.bottom-l.top)*o,width:(l.right-l.left)*o,top:l.top*o,left:l.left*o}}hasFixedEdges(){return!this.workspace_.isMovableHorizontally()||!this.workspace_.isMovableVertically()}getComputedFixedEdges_(o){if(!this.hasFixedEdges())return{};const l=this.workspace_.isMovableHorizontally(),d=this.workspace_.isMovableVertically();o=o||this.getViewMetrics(!1);const m={};return d||(m.top=o.top,m.bottom=o.top+o.height),l||(m.left=o.left,m.right=o.left+o.width),m}getPaddedContent_(o,l){const d=l.top+l.height,m=l.left+l.width,$=o.width;o=o.height;const V=$/2,Ee=o/2;return{top:Math.min(l.top-Ee,d-o),bottom:Math.max(d+Ee,l.top+o),left:Math.min(l.left-V,m-$),right:Math.max(m+V,l.left+$)}}getScrollMetrics(o,l,d){o=o?this.workspace_.scale:1,l=l||this.getViewMetrics(!1);var m=d||this.getContentMetrics();d=this.getComputedFixedEdges_(l),l=this.getPaddedContent_(l,m),m=d.top!==void 0?d.top:l.top;const $=d.left!==void 0?d.left:l.left;return{top:m/o,left:$/o,width:((d.right!==void 0?d.right:l.right)-$)/o,height:((d.bottom!==void 0?d.bottom:l.bottom)-m)/o}}getUiMetrics(){return{viewMetrics:this.getViewMetrics(),absoluteMetrics:this.getAbsoluteMetrics(),toolboxMetrics:this.getToolboxMetrics()}}getMetrics(){const o=this.getToolboxMetrics(),l=this.getFlyoutMetrics(!0),d=this.getSvgMetrics(),m=this.getAbsoluteMetrics(),$=this.getViewMetrics(),V=this.getContentMetrics(),Ee=this.getScrollMetrics(!1,$,V);return{contentHeight:V.height,contentWidth:V.width,contentTop:V.top,contentLeft:V.left,scrollHeight:Ee.height,scrollWidth:Ee.width,scrollTop:Ee.top,scrollLeft:Ee.left,viewHeight:$.height,viewWidth:$.width,viewTop:$.top,viewLeft:$.left,absoluteTop:m.top,absoluteLeft:m.left,svgHeight:d.height,svgWidth:d.width,toolboxWidth:o.width,toolboxHeight:o.height,toolboxPosition:o.position,flyoutWidth:l.width,flyoutHeight:l.height}}};s(At.METRICS_MANAGER,Ca,MT);var y0=class extends jl{constructor(o){super(),this.isBlank=!0,this.recordUndo=!1,this.type=El,this.isBlank=!!o,o&&(this.workspaceId=o.id)}};s(At.EVENT,El,y0);var KO=class extends gr{constructor(o,l,d){super(o?o.workspace.id:void 0),this.type=$d,o&&(this.blockId=o.id,this.isStart=l,this.blocks=d)}toJson(){const o=super.toJson();if(this.isStart===void 0)throw Error("Whether this event is the start of a drag is undefined. Either pass the value to the constructor, or call fromJson");if(this.blockId===void 0)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");return o.isStart=this.isStart,o.blockId=this.blockId,o.blocks=this.blocks,o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new KO),l.isStart=o.isStart,l.blockId=o.blockId,l.blocks=o.blocks,l}};s(At.EVENT,$d,KO);var AT={};AT.bumpIntoBounds=rf,AT.bumpIntoBoundsHandler=lg,AT.bumpTopObjectsIntoBounds=fu;var LT=class{constructor(o,l){this.connectionCandidate=this.dragTarget_=null,this.wouldDeleteBlock_=!1,this.dragIconData_=[],this.draggingBlock_=o,this.workspace_=l,this.connectionPreviewer=new(p(At.CONNECTION_PREVIEWER,this.workspace_.options))(o),this.startXY_=this.draggingBlock_.getRelativeToSurfaceXY(),this.dragIconData_=C_(o,this.startXY_)}dispose(){this.dragIconData_.length=0,this.connectionPreviewer.dispose()}startDrag(o,l){n.getGroup$$module$build$src$core$events$utils()||n.setGroup$$module$build$src$core$events$utils(!0),this.fireDragStartEvent_(),this.draggingBlock_.bringToFront(!0),ne(),this.workspace_.setResizesEnabled(!1),jh(),this.shouldDisconnect_(l)&&this.disconnectBlock_(l,o),this.draggingBlock_.setDragging(!0);let d;(d=this.workspace_.getLayerManager())==null||d.moveToDragLayer(this.draggingBlock_)}shouldDisconnect_(o){return!!(this.draggingBlock_.getParent()||o&&this.draggingBlock_.nextConnection&&this.draggingBlock_.nextConnection.targetBlock())}disconnectBlock_(o,l){this.draggingBlock_.unplug(o),o=this.pixelsToWorkspaceUnits_(l),o=zt.sum(this.startXY_,o),this.draggingBlock_.translate(o.x,o.y),g_(this.draggingBlock_)}fireDragStartEvent_(){const o=new(Ae($d))(this.draggingBlock_,!0,this.draggingBlock_.getDescendants(!1));J(o)}drag(o,l){const d=this.draggingBlock_;this.moveBlock(d,l),this.updateDragTargets(o,d),this.wouldDeleteBlock_=this.wouldDeleteBlock(o,d,l),this.updateCursorDuringBlockDrag_(),this.updateConnectionPreview(d,l)}moveBlock(o,l){l=this.pixelsToWorkspaceUnits_(l),l=zt.sum(this.startXY_,l),o.moveDuringDrag(l)}updateDragTargets(o,l){if(o=this.workspace_.getDragTarget(o),this.dragTarget_!==o){let d;(d=this.dragTarget_)==null||d.onDragExit(l),o==null||o.onDragEnter(l)}o==null||o.onDragOver(l),this.dragTarget_=o}wouldDeleteBlock(o,l,d){return(o=this.workspace_.getDragTarget(o))&&this.workspace_.getComponentManager().hasCapability(o.id,Gs.Capability.DELETE_AREA)?o.wouldDelete(l,!!this.getConnectionCandidate(l,d)):!1}updateConnectionPreview(o,l){l=this.pixelsToWorkspaceUnits_(l);const d=this.connectionCandidate,m=this.getConnectionCandidate(o,l);if(m){this.connectionCandidate=l=d&&this.currCandidateIsBetter(d,l,m)?d:m;var{local:$,neighbour:V}=l;$.type!==sn.OUTPUT_VALUE&&$.type!==sn.PREVIOUS_STATEMENT||!V.isConnected()||V.targetBlock().isInsertionMarker()||this.orphanCanConnectAtEnd(o,V.targetBlock(),$.type)?this.connectionPreviewer.previewConnection($,V):this.connectionPreviewer.previewReplacement($,V,V.targetBlock())}else this.connectionPreviewer.hidePreview(),this.connectionCandidate=null}orphanCanConnectAtEnd(o,l,d){return!!bo.getConnectionForOrphanedConnection(o,d===sn.OUTPUT_VALUE?l.outputConnection:l.previousConnection)}currCandidateIsBetter(o,l,d){const{local:m,neighbour:$}=o;o=new zt(m.x,m.y);const V=new zt($.x,$.y);return l=zt.distance(zt.sum(o,l),V),d.distance>l-n.config$$module$build$src$core$config.currentConnectionPreference}getConnectionCandidate(o,l){o=this.getLocalConnections(o);let d=this.connectionCandidate?n.config$$module$build$src$core$config.connectingSnapRadius:n.config$$module$build$src$core$config.snapRadius,m=null;for(const $ of o){const{connection:V,radius:Ee}=$.closest(d,l);V&&(m={local:$,neighbour:V,distance:Ee},d=Ee)}return m}getLocalConnections(o){const l=o.getConnections_(!1),d=o.lastConnectionInStack(!0);return d&&d!==o.nextConnection&&l.push(d),l}endDrag(o,l){if(this.drag(o,l),this.fireDragEndEvent_(),Le(),jh(),this.connectionPreviewer.hidePreview(),o=null,this.dragTarget_&&this.dragTarget_.shouldPreventMove(this.draggingBlock_)||(o=this.getNewLocationAfterDrag_(l).delta),this.dragTarget_&&this.dragTarget_.onDrop(this.draggingBlock_),!this.maybeDeleteBlock_()){let d;(d=this.workspace_.getLayerManager())==null||d.moveOffDragLayer(this.draggingBlock_,_O),this.draggingBlock_.setDragging(!1),o?this.updateBlockAfterMove_():rf(this.draggingBlock_.workspace,this.workspace_.getMetricsManager().getScrollMetrics(!0),this.draggingBlock_)}this.connectionPreviewer.dispose(),this.workspace_.setResizesEnabled(!0),n.setGroup$$module$build$src$core$events$utils(!1)}getNewLocationAfterDrag_(o){o=this.pixelsToWorkspaceUnits_(o);const l=zt.sum(this.startXY_,o);return{delta:o,newLocation:l}}maybeDeleteBlock_(){return this.wouldDeleteBlock_?(this.fireMoveEvent_(),this.draggingBlock_.dispose(!1,!0),Gr.length=0,!0):!1}updateBlockAfterMove_(){this.fireMoveEvent_(),this.connectionCandidate?this.applyConnections(this.connectionCandidate):this.draggingBlock_.queueRender(),this.draggingBlock_.scheduleSnapAndBump()}applyConnections(o){const{local:l,neighbour:d}=o;if(l.connect(d),this.draggingBlock_.rendered){const m=l.isSuperior()?d:l,$=this.draggingBlock_.getRootBlock();pc().then(()=>{p_(m.getSourceBlock()),setTimeout(()=>{$.bringToFront()},0)})}}fireDragEndEvent_(){const o=new(Ae($d))(this.draggingBlock_,!1,this.draggingBlock_.getDescendants(!1));J(o)}updateToolboxStyle_(o){const l=this.workspace_.getToolbox();if(l){const d=this.draggingBlock_.isDeletable()?"blocklyToolboxDelete":"blocklyToolboxGrab";o&&typeof l.removeStyle=="function"?l.removeStyle(d):o||typeof l.addStyle!="function"||l.addStyle(d)}}fireMoveEvent_(){if(!this.draggingBlock_.isDeadOrDying()){var o=new(Ae(n.MOVE$$module$build$src$core$events$utils))(this.draggingBlock_);o.setReason(["drag"]),o.oldCoordinate=this.startXY_,o.recordNew(),J(o)}}updateCursorDuringBlockDrag_(){this.draggingBlock_.setDeleteStyle(this.wouldDeleteBlock_)}pixelsToWorkspaceUnits_(o){return o=new zt(o.x/this.workspace_.scale,o.y/this.workspace_.scale),this.workspace_.isMutator&&o.scale(1/this.workspace_.options.parentWorkspace.scale),o}dragIcons_(){ct("Blockly.BlockDragger.prototype.dragIcons_","v10","v11")}getInsertionMarkers(){return this.workspace_.getAllBlocks().filter(o=>o.isInsertionMarker())}};s(At.BLOCK_DRAGGER,Ca,LT);var Kd={};Kd.Bubble=Ao,Kd.MiniWorkspaceBubble=Mc,Kd.TextBubble=Mf,Kd.TextInputBubble=Or;var jO=class extends xd{constructor(o,l,d,m){super(o),this.type=gu,this.recordUndo=!1,o&&(this.name=l,this.oldValue=d,this.newValue=m)}toJson(){const o=super.toJson();if(!this.name)throw Error("The changed field name is undefined. Either pass a name to the constructor, or call fromJson.");return o.name=this.name,o.oldValue=this.oldValue,o.newValue=this.newValue,o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new jO),l.name=o.name,l.oldValue=o.oldValue,l.newValue=o.newValue,l}isNull(){return this.oldValue===this.newValue}run(o){var l=this.getEventWorkspace_();if(!this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");if(l=l.getBlockById(this.blockId),!l)throw Error("The associated block is undefined. Either pass a block to the constructor, or call fromJson");o=o?this.newValue:this.oldValue,(l=l.getField(this.name))?l.setValue(o):console.warn("Can't set non-existent field: "+this.name)}};s(At.EVENT,gu,jO);var QO=class extends xd{constructor(o){super(o),this.type=n.MOVE$$module$build$src$core$events$utils,o&&(o.isShadow()&&(this.recordUndo=!1),o=this.currentLocation_(),this.oldParentId=o.parentId,this.oldInputName=o.inputName,this.oldCoordinate=o.coordinate)}toJson(){const o=super.toJson();return o.oldParentId=this.oldParentId,o.oldInputName=this.oldInputName,this.oldCoordinate&&(o.oldCoordinate=`${Math.round(this.oldCoordinate.x)}, ${Math.round(this.oldCoordinate.y)}`),o.newParentId=this.newParentId,o.newInputName=this.newInputName,this.newCoordinate&&(o.newCoordinate=`${Math.round(this.newCoordinate.x)}, ${Math.round(this.newCoordinate.y)}`),this.reason&&(o.reason=this.reason),this.recordUndo||(o.recordUndo=this.recordUndo),o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new QO),l.oldParentId=o.oldParentId,l.oldInputName=o.oldInputName,o.oldCoordinate&&(d=o.oldCoordinate.split(","),l.oldCoordinate=new zt(Number(d[0]),Number(d[1]))),l.newParentId=o.newParentId,l.newInputName=o.newInputName,o.newCoordinate&&(d=o.newCoordinate.split(","),l.newCoordinate=new zt(Number(d[0]),Number(d[1]))),o.reason!==void 0&&(l.reason=o.reason),o.recordUndo!==void 0&&(l.recordUndo=o.recordUndo),l}recordNew(){const o=this.currentLocation_();this.newParentId=o.parentId,this.newInputName=o.inputName,this.newCoordinate=o.coordinate}setReason(o){this.reason=o}currentLocation_(){var o=this.getEventWorkspace_();if(!this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");var l=o.getBlockById(this.blockId);if(!l)throw Error("The block associated with the block move event could not be found");o={};const d=l.getParent();return d?(o.parentId=d.id,(l=d.getInputWithBlock(l))&&(o.inputName=l.name)):o.coordinate=l.getRelativeToSurfaceXY(),o}isNull(){return this.oldParentId===this.newParentId&&this.oldInputName===this.newInputName&&zt.equals(this.oldCoordinate,this.newCoordinate)}run(o){var l=this.getEventWorkspace_();if(!this.blockId)throw Error("The block ID is undefined. Either pass a block to the constructor, or call fromJson");var d=l.getBlockById(this.blockId);if(d){var m=o?this.newParentId:this.oldParentId,$=o?this.newInputName:this.oldInputName;if(o=o?this.newCoordinate:this.oldCoordinate,m){var V=l.getBlockById(m);if(!V){console.warn("Can't connect to non-existent block: "+m);return}}if(d.getParent()&&d.unplug(),o)$=d.getRelativeToSurfaceXY(),d.moveBy(o.x-$.x,o.y-$.y,this.reason);else{l=d.outputConnection,(!l||d.previousConnection&&d.previousConnection.isConnected())&&(l=d.previousConnection);let Ee,Ve;d=(Ve=l)==null?void 0:Ve.type,$?(d=V.getInput($))&&(Ee=d.connection):d===sn.PREVIOUS_STATEMENT&&(Ee=V.nextConnection),Ee&&l?l.connect(Ee):console.warn("Can't connect to non-existent input: "+$)}}else console.warn("Can't move non-existent block: "+this.blockId)}};s(At.EVENT,n.MOVE$$module$build$src$core$events$utils,QO);var qO=class extends gr{constructor(o,l,d){super(o?o.workspace.id:void 0),this.type=Kl,o&&(this.blockId=o.id,this.isOpen=l,this.bubbleType=d)}toJson(){const o=super.toJson();if(this.isOpen===void 0)throw Error("Whether this event is for opening the bubble is undefined. Either pass the value to the constructor, or call fromJson");if(!this.bubbleType)throw Error("The type of bubble is undefined. Either pass the value to the constructor, or call fromJson");return o.isOpen=this.isOpen,o.bubbleType=this.bubbleType,o.blockId=this.blockId||"",o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new qO),l.isOpen=o.isOpen,l.bubbleType=o.bubbleType,l.blockId=o.blockId,l}},JO;(function(o){o.MUTATOR="mutator",o.COMMENT="comment",o.WARNING="warning"})(JO||(JO={})),s(At.EVENT,Kl,qO);var $u=class extends jl{constructor(o){super(),this.isBlank=!o,o&&(this.commentId=o.id,this.workspaceId=o.workspace.id,this.group=n.getGroup$$module$build$src$core$events$utils(),this.recordUndo=_e())}toJson(){const o=super.toJson();if(!this.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");return o.commentId=this.commentId,o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new $u),l.commentId=o.commentId,l}static CommentCreateDeleteHelper(o,l){var d=o.getEventWorkspace_();if(l){if(l=n.createElement$$module$build$src$core$utils$xml("xml"),!o.xml)throw Error("Ecountered a comment event without proper xml");l.appendChild(o.xml),n.domToWorkspace$$module$build$src$core$xml(l,d)}else{if(!o.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");(d=d.getCommentById(o.commentId))?d.dispose():console.warn("Can't uncreate non-existent comment: "+o.commentId)}}},ZO=class extends $u{constructor(o,l,d){super(o),this.type=uf,o&&(this.oldContents_=typeof l>"u"?"":l,this.newContents_=typeof d>"u"?"":d)}toJson(){const o=super.toJson();if(!this.oldContents_)throw Error("The old contents is undefined. Either pass a value to the constructor, or call fromJson");if(!this.newContents_)throw Error("The new contents is undefined. Either pass a value to the constructor, or call fromJson");return o.oldContents=this.oldContents_,o.newContents=this.newContents_,o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new ZO),l.oldContents_=o.oldContents,l.newContents_=o.newContents,l}isNull(){return this.oldContents_===this.newContents_}run(o){var l=this.getEventWorkspace_();if(!this.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");if(l=l.getCommentById(this.commentId)){var d=o?this.newContents_:this.oldContents_;if(!d)throw Error(o?"The new contents is undefined. Either pass a value to the constructor, or call fromJson":"The old contents is undefined. Either pass a value to the constructor, or call fromJson");l.setContent(d)}else console.warn("Can't change non-existent comment: "+this.commentId)}};s(At.EVENT,uf,ZO);var eS=class extends $u{constructor(o){super(o),this.type=Ei,o&&(this.xml=o.toXmlWithXY())}toJson(){const o=super.toJson();if(!this.xml)throw Error("The comment XML is undefined. Either pass a comment to the constructor, or call fromJson");return o.xml=Ta(this.xml),o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new eS),l.xml=n.textToDom$$module$build$src$core$utils$xml(o.xml),l}run(o){$u.CommentCreateDeleteHelper(this,o)}};s(At.EVENT,Ei,eS);var tS=class extends $u{constructor(o){super(o),this.type=Md,o&&(this.xml=o.toXmlWithXY())}run(o){$u.CommentCreateDeleteHelper(this,!o)}toJson(){const o=super.toJson();if(!this.xml)throw Error("The comment XML is undefined. Either pass a comment to the constructor, or call fromJson");return o.xml=Ta(this.xml),o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new tS),l.xml=n.textToDom$$module$build$src$core$utils$xml(o.xml),l}};s(At.EVENT,Md,tS);var nS=class extends $u{constructor(o){super(o),this.type=Wr,o&&(this.comment_=o,this.oldCoordinate_=o.getRelativeToSurfaceXY())}recordNew(){if(this.newCoordinate_)throw Error("Tried to record the new position of a comment on the same event twice.");if(!this.comment_)throw Error("The comment is undefined. Pass a comment to the constructor if you want to use the record functionality");this.newCoordinate_=this.comment_.getRelativeToSurfaceXY()}setOldCoordinate(o){this.oldCoordinate_=o}toJson(){const o=super.toJson();if(!this.oldCoordinate_)throw Error("The old comment position is undefined. Either pass a comment to the constructor, or call fromJson");if(!this.newCoordinate_)throw Error("The new comment position is undefined. Either call recordNew, or call fromJson");return o.oldCoordinate=`${Math.round(this.oldCoordinate_.x)}, ${Math.round(this.oldCoordinate_.y)}`,o.newCoordinate=Math.round(this.newCoordinate_.x)+","+Math.round(this.newCoordinate_.y),o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new nS),d=o.oldCoordinate.split(","),l.oldCoordinate_=new zt(Number(d[0]),Number(d[1])),d=o.newCoordinate.split(","),l.newCoordinate_=new zt(Number(d[0]),Number(d[1])),l}isNull(){return zt.equals(this.oldCoordinate_,this.newCoordinate_)}run(o){var l=this.getEventWorkspace_();if(!this.commentId)throw Error("The comment ID is undefined. Either pass a comment to the constructor, or call fromJson");if(l=l.getCommentById(this.commentId)){if(o=o?this.newCoordinate_:this.oldCoordinate_,!o)throw Error("Either oldCoordinate_ or newCoordinate_ is undefined. Either pass a comment to the constructor and call recordNew, or call fromJson");var d=l.getRelativeToSurfaceXY();l.moveBy(o.x-d.x,o.y-d.y)}else console.warn("Can't move non-existent comment: "+this.commentId)}};s(At.EVENT,Wr,nS);var oS=class extends gr{constructor(o,l,d){super(d),this.type=Rd,this.oldItem=o??void 0,this.newItem=l??void 0}toJson(){const o=super.toJson();return o.oldItem=this.oldItem,o.newItem=this.newItem,o}static fromJson(o,l,d){return l=super.fromJson(o,l,d??new oS),l.oldItem=o.oldItem,l.newItem=o.newItem,l}};s(At.EVENT,Rd,oS),n.CHANGE$$module$build$src$core$events$utils,n.CREATE$$module$build$src$core$events$utils,n.DELETE$$module$build$src$core$events$utils,n.MOVE$$module$build$src$core$events$utils,n.CHANGE$$module$build$src$core$events$utils,n.CREATE$$module$build$src$core$events$utils,n.DELETE$$module$build$src$core$events$utils,n.MOVE$$module$build$src$core$events$utils,n.disable$$module$build$src$core$events$utils,n.enable$$module$build$src$core$events$utils,n.getGroup$$module$build$src$core$events$utils,n.setGroup$$module$build$src$core$events$utils;var cn={};cn.Abstract=jl,cn.BLOCK_CHANGE=n.CHANGE$$module$build$src$core$events$utils,cn.BLOCK_CREATE=n.CREATE$$module$build$src$core$events$utils,cn.BLOCK_DELETE=n.DELETE$$module$build$src$core$events$utils,cn.BLOCK_DRAG=$d,cn.BLOCK_FIELD_INTERMEDIATE_CHANGE=gu,cn.BLOCK_MOVE=n.MOVE$$module$build$src$core$events$utils,cn.BUBBLE_OPEN=Kl,cn.BUMP_EVENTS=pg,cn.BlockBase=xd,cn.BlockChange=Qo,cn.BlockCreate=sO,cn.BlockDelete=FO,cn.BlockDrag=KO,cn.BlockFieldIntermediateChange=jO,cn.BlockMove=QO,cn.BubbleOpen=qO,cn.BubbleType=JO,cn.CHANGE=n.CHANGE$$module$build$src$core$events$utils,cn.CLICK=yc,cn.COMMENT_CHANGE=uf,cn.COMMENT_CREATE=Ei,cn.COMMENT_DELETE=Md,cn.COMMENT_MOVE=Wr,cn.CREATE=n.CREATE$$module$build$src$core$events$utils,cn.Click=Db,cn.ClickTarget=V_,cn.CommentBase=$u,cn.CommentChange=ZO,cn.CommentCreate=eS,cn.CommentDelete=tS,cn.CommentMove=nS,cn.DELETE=n.DELETE$$module$build$src$core$events$utils,cn.FINISHED_LOADING=El,cn.FinishedLoading=y0,cn.MARKER_MOVE=Id,cn.MOVE=n.MOVE$$module$build$src$core$events$utils,cn.MarkerMove=bT,cn.SELECTED=Sc,cn.Selected=Zb,cn.THEME_CHANGE=Cd,cn.TOOLBOX_ITEM_SELECT=Rd,cn.TRASHCAN_OPEN=cf,cn.ThemeChange=iO,cn.ToolboxItemSelect=oS,cn.TrashcanOpen=BO,cn.UI=af,cn.UiBase=gr,cn.VAR_CREATE=zi,cn.VAR_DELETE=mu,cn.VAR_RENAME=yd,cn.VIEWPORT_CHANGE=xs,cn.VarBase=pf,cn.VarCreate=Z_,cn.VarDelete=PO,cn.VarRename=DO,cn.ViewportChange=rO,cn.clearPendingUndo=Q,cn.disable=n.disable$$module$build$src$core$events$utils,cn.disableOrphans=We,cn.enable=n.enable$$module$build$src$core$events$utils,cn.filter=Z,cn.fire=J,cn.fromJson=be,cn.get=Ae,cn.getDescendantIds=Ie,cn.getGroup=n.getGroup$$module$build$src$core$events$utils,cn.getRecordUndo=_e,cn.isEnabled=he,cn.setGroup=n.setGroup$$module$build$src$core$events$utils,cn.setRecordUndo=re;var $0=class extends Fg{constructor(){super(),this.GRID_UNIT=4,this.CURSOR_COLOUR="#ffa200",this.CURSOR_RADIUS=5,this.JAGGED_TEETH_WIDTH=this.JAGGED_TEETH_HEIGHT=0,this.START_HAT_HEIGHT=22,this.START_HAT_WIDTH=96,this.SHAPES={HEXAGONAL:1,ROUND:2,SQUARE:3,PUZZLE:4,NOTCH:5},this.SHAPE_IN_SHAPE_PADDING={1:{0:5*this.GRID_UNIT,1:2*this.GRID_UNIT,2:5*this.GRID_UNIT,3:5*this.GRID_UNIT},2:{0:3*this.GRID_UNIT,1:3*this.GRID_UNIT,2:1*this.GRID_UNIT,3:2*this.GRID_UNIT},3:{0:2*this.GRID_UNIT,1:2*this.GRID_UNIT,2:2*this.GRID_UNIT,3:2*this.GRID_UNIT}},this.FULL_BLOCK_FIELDS=!0,this.FIELD_TEXT_FONTWEIGHT="bold",this.FIELD_TEXT_FONTFAMILY='"Helvetica Neue", "Segoe UI", Helvetica, sans-serif',this.FIELD_COLOUR_FULL_BLOCK=this.FIELD_TEXTINPUT_BOX_SHADOW=this.FIELD_DROPDOWN_SVG_ARROW=this.FIELD_DROPDOWN_COLOURED_DIV=this.FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW=!0,this.SELECTED_GLOW_COLOUR="#fff200",this.SELECTED_GLOW_SIZE=.5,this.REPLACEMENT_GLOW_COLOUR="#fff200",this.REPLACEMENT_GLOW_SIZE=2,this.selectedGlowFilterId="",this.selectedGlowFilter=null,this.replacementGlowFilterId="",this.SQUARED=this.ROUNDED=this.HEXAGONAL=this.replacementGlowFilter=null,this.SMALL_PADDING=this.GRID_UNIT,this.MEDIUM_PADDING=2*this.GRID_UNIT,this.MEDIUM_LARGE_PADDING=3*this.GRID_UNIT,this.LARGE_PADDING=4*this.GRID_UNIT,this.CORNER_RADIUS=1*this.GRID_UNIT,this.NOTCH_WIDTH=9*this.GRID_UNIT,this.NOTCH_HEIGHT=2*this.GRID_UNIT,this.STATEMENT_INPUT_NOTCH_OFFSET=this.NOTCH_OFFSET_LEFT=3*this.GRID_UNIT,this.MIN_BLOCK_WIDTH=2*this.GRID_UNIT,this.MIN_BLOCK_HEIGHT=12*this.GRID_UNIT,this.EMPTY_STATEMENT_INPUT_HEIGHT=6*this.GRID_UNIT,this.TOP_ROW_MIN_HEIGHT=this.CORNER_RADIUS,this.TOP_ROW_PRECEDES_STATEMENT_MIN_HEIGHT=this.LARGE_PADDING,this.BOTTOM_ROW_MIN_HEIGHT=this.CORNER_RADIUS,this.BOTTOM_ROW_AFTER_STATEMENT_MIN_HEIGHT=6*this.GRID_UNIT,this.STATEMENT_BOTTOM_SPACER=-this.NOTCH_HEIGHT,this.STATEMENT_INPUT_SPACER_MIN_WIDTH=40*this.GRID_UNIT,this.STATEMENT_INPUT_PADDING_LEFT=4*this.GRID_UNIT,this.EMPTY_INLINE_INPUT_PADDING=4*this.GRID_UNIT,this.EMPTY_INLINE_INPUT_HEIGHT=8*this.GRID_UNIT,this.DUMMY_INPUT_MIN_HEIGHT=8*this.GRID_UNIT,this.DUMMY_INPUT_SHADOW_MIN_HEIGHT=6*this.GRID_UNIT,this.CURSOR_WS_WIDTH=20*this.GRID_UNIT,this.FIELD_TEXT_FONTSIZE=3*this.GRID_UNIT,this.FIELD_BORDER_RECT_RADIUS=this.CORNER_RADIUS,this.FIELD_BORDER_RECT_X_PADDING=2*this.GRID_UNIT,this.FIELD_BORDER_RECT_Y_PADDING=1.625*this.GRID_UNIT,this.FIELD_BORDER_RECT_HEIGHT=8*this.GRID_UNIT,this.FIELD_DROPDOWN_BORDER_RECT_HEIGHT=8*this.GRID_UNIT,this.FIELD_DROPDOWN_SVG_ARROW_PADDING=this.FIELD_BORDER_RECT_X_PADDING,this.FIELD_COLOUR_DEFAULT_WIDTH=6*this.GRID_UNIT,this.FIELD_COLOUR_DEFAULT_HEIGHT=8*this.GRID_UNIT,this.FIELD_CHECKBOX_X_OFFSET=1*this.GRID_UNIT,this.MAX_DYNAMIC_CONNECTION_SHAPE_WIDTH=12*this.GRID_UNIT}setFontConstants_(o){super.setFontConstants_(o),this.FIELD_DROPDOWN_BORDER_RECT_HEIGHT=this.FIELD_BORDER_RECT_HEIGHT=this.FIELD_TEXT_HEIGHT+2*this.FIELD_BORDER_RECT_Y_PADDING}init(){super.init(),this.HEXAGONAL=this.makeHexagonal(),this.ROUNDED=this.makeRounded(),this.SQUARED=this.makeSquared(),this.STATEMENT_INPUT_NOTCH_OFFSET=this.NOTCH_OFFSET_LEFT+this.INSIDE_CORNERS.rightWidth}setDynamicProperties_(o){super.setDynamicProperties_(o),this.SELECTED_GLOW_COLOUR=o.getComponentStyle("selectedGlowColour")||this.SELECTED_GLOW_COLOUR;const l=Number(o.getComponentStyle("selectedGlowSize"));this.SELECTED_GLOW_SIZE=l&&!isNaN(l)?l:this.SELECTED_GLOW_SIZE,this.REPLACEMENT_GLOW_COLOUR=o.getComponentStyle("replacementGlowColour")||this.REPLACEMENT_GLOW_COLOUR,this.REPLACEMENT_GLOW_SIZE=(o=Number(o.getComponentStyle("replacementGlowSize")))&&!isNaN(o)?o:this.REPLACEMENT_GLOW_SIZE}dispose(){super.dispose(),this.selectedGlowFilter&&mt(this.selectedGlowFilter),this.replacementGlowFilter&&mt(this.replacementGlowFilter)}makeStartHat(){const o=this.START_HAT_HEIGHT,l=this.START_HAT_WIDTH,d=fr("c",[Sn(25,-o),Sn(71,-o),Sn(l,0)]);return{height:o,width:l,path:d}}makeHexagonal(){function o(d,m,$){var V=d/2;return V=V>l?l:V,$=$?-1:1,d=(m?-1:1)*d/2,$a(-$*V,d)+$a($*V,d)}const l=this.MAX_DYNAMIC_CONNECTION_SHAPE_WIDTH;return{type:this.SHAPES.HEXAGONAL,isDynamic:!0,width(d){return d/=2,d>l?l:d},height(d){return d},connectionOffsetY(d){return d/2},connectionOffsetX(d){return-d},pathDown(d){return o(d,!1,!1)},pathUp(d){return o(d,!0,!1)},pathRightDown(d){return o(d,!1,!0)},pathRightUp(d){return o(d,!1,!0)}}}makeRounded(){function o(m,$,V){const Ee=m>d?m-d:0;m=(m>d?d:m)/2;const Ve=V===$?"0":"1";return Cs("a","0 0,"+Ve,m,Sn((V?1:-1)*m,($?-1:1)*m))+ln("v",($?-1:1)*Ee)+Cs("a","0 0,"+Ve,m,Sn((V?-1:1)*m,($?-1:1)*m))}const l=this.MAX_DYNAMIC_CONNECTION_SHAPE_WIDTH,d=2*l;return{type:this.SHAPES.ROUND,isDynamic:!0,width(m){return m/=2,m>l?l:m},height(m){return m},connectionOffsetY(m){return m/2},connectionOffsetX(m){return-m},pathDown(m){return o(m,!1,!1)},pathUp(m){return o(m,!0,!1)},pathRightDown(m){return o(m,!1,!0)},pathRightUp(m){return o(m,!1,!0)}}}makeSquared(){function o(d,m,$){d-=2*l;const V=$===m?"0":"1";return Cs("a","0 0,"+V,l,Sn(($?1:-1)*l,(m?-1:1)*l))+ln("v",(m?-1:1)*d)+Cs("a","0 0,"+V,l,Sn(($?-1:1)*l,(m?-1:1)*l))}const l=this.CORNER_RADIUS;return{type:this.SHAPES.SQUARE,isDynamic:!0,width(d){return l},height(d){return d},connectionOffsetY(d){return d/2},connectionOffsetX(d){return-d},pathDown(d){return o(d,!1,!1)},pathUp(d){return o(d,!0,!1)},pathRightDown(d){return o(d,!1,!0)},pathRightUp(d){return o(d,!1,!0)}}}shapeFor(o){let l=o.getCheck();switch(!l&&o.targetConnection&&(l=o.targetConnection.getCheck()),o.type){case sn.INPUT_VALUE:case sn.OUTPUT_VALUE:if(o=o.getSourceBlock().getOutputShape(),o!==null)switch(o){case this.SHAPES.HEXAGONAL:return this.HEXAGONAL;case this.SHAPES.ROUND:return this.ROUNDED;case this.SHAPES.SQUARE:return this.SQUARED}return l&&l.indexOf("Boolean")!==-1?this.HEXAGONAL:l&&l.indexOf("Number")!==-1?this.ROUNDED:(l&&l.indexOf("String"),this.ROUNDED);case sn.PREVIOUS_STATEMENT:case sn.NEXT_STATEMENT:return this.NOTCH;default:throw Error("Unknown type")}}makeNotch(){function o(tn){return fr("c",[Sn(tn*$/2,0),Sn(tn*$*3/4,Ee/2),Sn(tn*$,Ee)])+ml([Sn(tn*$,V)])+fr("c",[Sn(tn*$/4,Ee/2),Sn(tn*$/2,Ee),Sn(tn*$,Ee)])+ln("h",tn*m)+fr("c",[Sn(tn*$/2,0),Sn(tn*$*3/4,-(Ee/2)),Sn(tn*$,-Ee)])+ml([Sn(tn*$,-V)])+fr("c",[Sn(tn*$/4,-(Ee/2)),Sn(tn*$/2,-Ee),Sn(tn*$,-Ee)])}const l=this.NOTCH_WIDTH,d=this.NOTCH_HEIGHT,m=l/3,$=m/3,V=d/2,Ee=V/2,Ve=o(1),St=o(-1);return{type:this.SHAPES.NOTCH,width:l,height:d,pathLeft:Ve,pathRight:St}}makeInsideCorners(){const o=this.CORNER_RADIUS,l=Cs("a","0 0,0",o,Sn(-o,o)),d=Cs("a","0 0,1",o,Sn(-o,o)),m=Cs("a","0 0,0",o,Sn(o,o)),$=Cs("a","0 0,1",o,Sn(o,o));return{width:o,height:o,pathTop:l,pathBottom:m,rightWidth:o,rightHeight:o,pathTopRight:d,pathBottomRight:$}}generateSecondaryColour_(o){return Ed("#000",o,.15)||o}generateTertiaryColour_(o){return Ed("#000",o,.25)||o}createDom(o,l,d){super.createDom(o,l,d),o=Ne(st.DEFS,{},o),l=Ne(st.FILTER,{id:"blocklySelectedGlowFilter"+this.randomIdentifier,height:"160%",width:"180%",y:"-30%",x:"-40%"},o),Ne(st.FEGAUSSIANBLUR,{in:"SourceGraphic",stdDeviation:this.SELECTED_GLOW_SIZE},l),d=Ne(st.FECOMPONENTTRANSFER,{result:"outBlur"},l),Ne(st.FEFUNCA,{type:"table",tableValues:"0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"},d),Ne(st.FEFLOOD,{"flood-color":this.SELECTED_GLOW_COLOUR,"flood-opacity":1,result:"outColor"},l),Ne(st.FECOMPOSITE,{in:"outColor",in2:"outBlur",operator:"in",result:"outGlow"},l),this.selectedGlowFilterId=l.id,this.selectedGlowFilter=l,o=Ne(st.FILTER,{id:"blocklyReplacementGlowFilter"+this.randomIdentifier,height:"160%",width:"180%",y:"-30%",x:"-40%"},o),Ne(st.FEGAUSSIANBLUR,{in:"SourceGraphic",stdDeviation:this.REPLACEMENT_GLOW_SIZE},o),l=Ne(st.FECOMPONENTTRANSFER,{result:"outBlur"},o),Ne(st.FEFUNCA,{type:"table",tableValues:"0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"},l),Ne(st.FEFLOOD,{"flood-color":this.REPLACEMENT_GLOW_COLOUR,"flood-opacity":1,result:"outColor"},o),Ne(st.FECOMPOSITE,{in:"outColor",in2:"outBlur",operator:"in",result:"outGlow"},o),Ne(st.FECOMPOSITE,{in:"SourceGraphic",in2:"outGlow",operator:"over"},o),this.replacementGlowFilterId=o.id,this.replacementGlowFilter=o}getCSS_(o){return[`${o} .blocklyText,`,`${o} .blocklyFlyoutLabelText {`,`font: ${this.FIELD_TEXT_FONTWEIGHT} ${this.FIELD_TEXT_FONTSIZE}pt ${this.FIELD_TEXT_FONTFAMILY};`,"}",`${o} .blocklyText {`,"fill: #fff;","}",`${o} .blocklyNonEditableText>rect:not(.blocklyDropdownRect),`,`${o} .blocklyEditableText>rect:not(.blocklyDropdownRect) {`,`fill: ${this.FIELD_BORDER_RECT_COLOUR};`,"}",`${o} .blocklyNonEditableText>text,`,`${o} .blocklyEditableText>text,`,`${o} .blocklyNonEditableText>g>text,`,`${o} .blocklyEditableText>g>text {`,"fill: #575E75;","}",`${o} .blocklyFlyoutLabelText {`,"fill: #575E75;","}",`${o} .blocklyText.blocklyBubbleText {`,"fill: #575E75;","}",`${o} .blocklyDraggable:not(.blocklyDisabled)`," .blocklyEditableText:not(.editing):hover>rect,",`${o} .blocklyDraggable:not(.blocklyDisabled)`," .blocklyEditableText:not(.editing):hover>.blocklyPath {","stroke: #fff;","stroke-width: 2;","}",`${o} .blocklyHtmlInput {`,`font-family: ${this.FIELD_TEXT_FONTFAMILY};`,`font-weight: ${this.FIELD_TEXT_FONTWEIGHT};`,"color: #575E75;","}",`${o} .blocklyDropdownText {`,"fill: #fff !important;","}",`${o}.blocklyWidgetDiv .goog-menuitem,`,`${o}.blocklyDropDownDiv .goog-menuitem {`,`font-family: ${this.FIELD_TEXT_FONTFAMILY};`,"}",`${o}.blocklyDropDownDiv .goog-menuitem-content {`,"color: #fff;","}",`${o} .blocklyHighlightedConnectionPath {`,`stroke: ${this.SELECTED_GLOW_COLOUR};`,"}",`${o} .blocklyDisabled > .blocklyOutlinePath {`,`fill: url(#blocklyDisabledPattern${this.randomIdentifier})`,"}",`${o} .blocklyInsertionMarker>.blocklyPath {`,`fill-opacity: ${this.INSERTION_MARKER_OPACITY};`,"stroke: none;","}"]}},I0=class extends Ug{constructor(o,l){super(o,l)}draw(){const o=this.block_.pathObject;o.beginDrawing(),this.drawOutline_(),this.drawInternals_(),this.updateConnectionHighlights(),o.setPath(this.outlinePath_+`
  485. `+this.inlinePath_),this.info_.RTL&&o.flipRTL(),this.recordSizeOnBlock_(),this.info_.outputConnection&&(o.outputShapeType=this.info_.outputConnection.shape.type),o.endDrawing()}drawOutline_(){this.info_.outputConnection&&this.info_.outputConnection.isDynamicShape&&!this.info_.hasStatementInput&&!this.info_.bottomRow.hasNextConnection?(this.drawFlatTop_(),this.drawRightDynamicConnection_(),this.drawFlatBottom_(),this.drawLeftDynamicConnection_()):super.drawOutline_()}drawLeft_(){this.info_.outputConnection&&this.info_.outputConnection.isDynamicShape?this.drawLeftDynamicConnection_():super.drawLeft_()}drawRightSideRow_(o){if(!(0>=o.height)){if(nt.isSpacer(o)){const m=o.precedesStatement;var l=o.followsStatement;if(m||l){const $=this.constants_.INSIDE_CORNERS;var d=$.rightHeight;d=o.height-(m?d:0),l=l?$.pathBottomRight:"",o=0<d?ln("V",o.yPos+d):"",this.outlinePath_+=l+o+(m?$.pathTopRight:"");return}}this.outlinePath_+=ln("V",o.yPos+o.height)}}drawRightDynamicConnection_(){if(!this.info_.outputConnection)throw Error("Cannot draw the output connection of a block that doesn't have one");this.outlinePath_+=this.info_.outputConnection.shape.pathRightDown(this.info_.outputConnection.height)}drawLeftDynamicConnection_(){if(!this.info_.outputConnection)throw Error("Cannot draw the output connection of a block that doesn't have one");this.positionOutputConnection_(),this.outlinePath_+=this.info_.outputConnection.shape.pathUp(this.info_.outputConnection.height),this.outlinePath_+="z"}drawFlatTop_(){const o=this.info_.topRow;this.positionPreviousConnection_(),this.outlinePath_+=Zo(o.xPos,this.info_.startY),this.outlinePath_+=ln("h",o.width)}drawFlatBottom_(){const o=this.info_.bottomRow;this.positionNextConnection_(),this.outlinePath_+=ln("V",o.baseline),this.outlinePath_+=ln("h",-o.width)}drawInlineInput_(o){this.positionInlineInputConnection_(o);const l=o.input.name;o.connectedBlock||this.info_.isInsertionMarker||(o=Qs(o.xPos+o.connectionWidth,o.centerline-o.height/2)+this.getInlineInputPath(o),this.block_.pathObject.setOutlinePath(l,o))}getInlineInputPath(o){const l=o.width-2*o.connectionWidth,d=o.height;return ln("h",l)+o.shape.pathRightDown(d)+ln("h",-l)+o.shape.pathUp(d)+"z"}drawStatementInput_(o){var l=o.getLastInput();const d=l.xPos+l.notchOffset+l.shape.width,m=this.constants_.INSIDE_CORNERS,$=l.shape.pathRight+ln("h",-(l.notchOffset-m.width))+m.pathTop,V=o.height-2*m.height;l=m.pathBottom+ln("h",l.notchOffset-m.width)+(l.connectedBottomNextConnection?"":l.shape.pathLeft),this.outlinePath_+=ln("H",d)+$+ln("v",V)+l+ln("H",o.xPos+o.width),this.positionStatementInputConnection_(o)}drawConnectionHighlightPath(o){const l=o.connectionModel;if(l.type===sn.NEXT_STATEMENT||l.type===sn.PREVIOUS_STATEMENT||l.type===sn.OUTPUT_VALUE&&!o.isDynamicShape)super.drawConnectionHighlightPath(o);else{o=l.type===sn.INPUT_VALUE?Qs(o.connectionWidth,-o.height/2)+this.getInlineInputPath(o):Qs(o.width,-o.height/2)+o.shape.pathDown(o.height);var d=l.getSourceBlock(),m,$;($=(m=d.pathObject).addConnectionHighlight)==null||$.call(m,l,o,l.getOffsetInBlock(),d.RTL)}}},jd=class extends so{constructor(o,l,d,m,$,V,Ee){if(super(so.SKIP_SETUP),this.imageElement=this.clickHandler=null,this.flipRtl=this.isDirty_=this.EDITABLE=!1,this.altText="",d=Number(Os(d)),l=Number(Os(l)),isNaN(d)||isNaN(l))throw Error("Height and width values of an image field must cast to numbers.");if(0>=d||0>=l)throw Error("Height and width values of an image field must be greater than 0.");this.size_=new Ko(l,d+jd.Y_PADDING),this.imageHeight=d,typeof $=="function"&&(this.clickHandler=$),o!==so.SKIP_SETUP&&(Ee?this.configure_(Ee):(this.flipRtl=!!V,this.altText=Os(m)||""),this.setValue(Os(o)))}configure_(o){super.configure_(o),o.flipRtl&&(this.flipRtl=o.flipRtl),o.alt&&(this.altText=Os(o.alt))}initView(){this.imageElement=Ne(st.IMAGE,{height:this.imageHeight+"px",width:this.size_.width+"px",alt:this.altText},this.fieldGroup_),this.imageElement.setAttributeNS(Xr,"xlink:href",this.value_),this.clickHandler&&(this.imageElement.style.cursor="pointer")}updateSize_(){}doClassValidation_(o){return typeof o!="string"?null:o}doValueUpdate_(o){this.value_=o,this.imageElement&&this.imageElement.setAttributeNS(Xr,"xlink:href",this.value_)}getFlipRtl(){return this.flipRtl}setAlt(o){o!==this.altText&&(this.altText=o||"",this.imageElement&&this.imageElement.setAttribute("alt",this.altText))}showEditor_(){this.clickHandler&&this.clickHandler(this)}setOnClickHandler(o){this.clickHandler=o}getText_(){return this.altText}static fromJson(o){if(!o.src||!o.width||!o.height)throw Error("src, width, and height values for an image field arerequired. The width and height must be non-zero.");return new this(o.src,o.width,o.height,void 0,void 0,void 0,o)}};jd.Y_PADDING=1,si("field_image",jd),jd.prototype.DEFAULT_VALUE="";var Yg=class extends so{constructor(o,l,d){super(so.SKIP_SETUP),this.spellcheck_=!0,this.htmlInput_=null,this.isTextValid_=this.isBeingEdited_=!1,this.onKeyInputWrapper_=this.onKeyDownWrapper_=this.valueWhenEditorWasOpened_=null,this.fullBlockClickTarget_=!1,this.workspace_=null,this.SERIALIZABLE=!0,this.CURSOR="text",o!==so.SKIP_SETUP&&(d&&this.configure_(d),this.setValue(o),l&&this.setValidator(l))}configure_(o){super.configure_(o),o.spellcheck!==void 0&&(this.spellcheck_=o.spellcheck)}initView(){if(!this.getSourceBlock())throw new Go;super.initView(),this.isFullBlockField()&&(this.clickTarget_=this.sourceBlock_.getSvgRoot())}isFullBlockField(){const o=this.getSourceBlock();if(!o)throw new Go;let l;return this.fullBlockClickTarget_=!((l=this.getConstants())==null||!l.FULL_BLOCK_FIELDS)&&o.isSimpleReporter()}doValueInvalid_(o){this.isBeingEdited_&&(this.isDirty_=!0,this.isTextValid_=!1,o=this.value_,this.value_=this.htmlInput_.getAttribute("data-untyped-default-value"),this.sourceBlock_&&he()&&J(new(Ae(n.CHANGE$$module$build$src$core$events$utils))(this.sourceBlock_,"field",this.name||null,o,this.value_)))}doValueUpdate_(o){this.isTextValid_=this.isDirty_=!0,this.value_=o}applyColour(){const o=this.getSourceBlock();if(!o)throw new Go;this.getConstants().FULL_BLOCK_FIELDS&&this.fieldGroup_&&(!this.isFullBlockField()&&this.borderRect_?(this.borderRect_.style.display="block",this.borderRect_.setAttribute("stroke",o.style.colourTertiary)):(this.borderRect_.style.display="none",o.pathObject.svgPath.setAttribute("fill",this.getConstants().FIELD_BORDER_RECT_COLOUR)))}getSize(){let o;return(o=this.getConstants())!=null&&o.FULL_BLOCK_FIELDS&&(this.render_(),this.isDirty_=!1),super.getSize()}onLocationChange(){this.isBeingEdited_&&this.resizeEditor_()}render_(){if(super.render_(),this.isBeingEdited_){var o=this.htmlInput_;this.isTextValid_?(ut(o,"blocklyInvalidInput"),Ho(o,jo.INVALID,!1)):(Se(o,"blocklyInvalidInput"),Ho(o,jo.INVALID,!0))}if(o=this.getSourceBlock(),!o)throw new Go;this.getConstants().FULL_BLOCK_FIELDS&&o.applyColour()}setSpellcheck(o){o!==this.spellcheck_&&(this.spellcheck_=o,this.htmlInput_&&this.htmlInput_.setAttribute("spellcheck",this.spellcheck_))}showEditor_(o,l=!1){this.workspace_=this.sourceBlock_.workspace,!l&&this.workspace_.options.modalInputs&&(Eg||X_||mr)?this.showPromptEditor_():this.showInlineEditor_(l)}showPromptEditor_(){dr(n.Msg$$module$build$src$core$msg.CHANGE_VALUE_TITLE,this.getText(),o=>{o!==null&&this.setValue(this.getValueFromEditorText_(o)),this.onFinishEditing_(this.value_)})}showInlineEditor_(o){const l=this.getSourceBlock();if(!l)throw new Go;Hh(this,l.RTL,this.widgetDispose_.bind(this)),this.htmlInput_=this.widgetCreate_(),this.isBeingEdited_=!0,this.valueWhenEditorWasOpened_=this.value_,o||(this.htmlInput_.focus({preventScroll:!0}),this.htmlInput_.select())}widgetCreate_(){var o=this.getSourceBlock();if(!o)throw new Go;n.setGroup$$module$build$src$core$events$utils(!0);const l=ru();var d=this.getClickTarget_();if(!d)throw Error("A click target has not been set.");Se(d,"editing"),d=document.createElement("input"),d.className="blocklyHtmlInput",d.setAttribute("spellcheck",this.spellcheck_);const m=this.workspace_.getScale();var $=this.getConstants().FIELD_TEXT_FONTSIZE*m+"pt";return l.style.fontSize=$,d.style.fontSize=$,$=Yg.BORDERRADIUS*m+"px",this.isFullBlockField()&&($=this.getScaledBBox(),$=($.bottom-$.top)/2+"px",o=o.getParent()?o.getParent().style.colourTertiary:this.sourceBlock_.style.colourTertiary,d.style.border=1*m+"px solid "+o,l.style.borderRadius=$,l.style.transition="box-shadow 0.25s ease 0s",this.getConstants().FIELD_TEXTINPUT_BOX_SHADOW&&(l.style.boxShadow="rgba(255, 255, 255, 0.3) 0 0 0 "+4*m+"px")),d.style.borderRadius=$,l.appendChild(d),d.value=d.defaultValue=this.getEditorText_(this.value_),d.setAttribute("data-untyped-default-value",String(this.value_)),this.resizeEditor_(),this.bindInputEvents_(d),d}widgetDispose_(){this.isBeingEdited_=!1,this.isTextValid_=!0,this.forceRerender(),this.onFinishEditing_(this.value_),this.sourceBlock_&&he()&&this.valueWhenEditorWasOpened_!==null&&this.valueWhenEditorWasOpened_!==this.value_&&(J(new(Ae(n.CHANGE$$module$build$src$core$events$utils))(this.sourceBlock_,"field",this.name||null,this.valueWhenEditorWasOpened_,this.value_)),this.valueWhenEditorWasOpened_=null),n.setGroup$$module$build$src$core$events$utils(!1),this.unbindInputEvents_();var o=ru().style;if(o.width="auto",o.height="auto",o.fontSize="",o.transition="",o.boxShadow="",this.htmlInput_=null,o=this.getClickTarget_(),!o)throw Error("A click target has not been set.");ut(o,"editing")}onFinishEditing_(o){}bindInputEvents_(o){this.onKeyDownWrapper_=ee(o,"keydown",this,this.onHtmlInputKeyDown_),this.onKeyInputWrapper_=ee(o,"input",this,this.onHtmlInputChange_)}unbindInputEvents_(){this.onKeyDownWrapper_&&(Oe(this.onKeyDownWrapper_),this.onKeyDownWrapper_=null),this.onKeyInputWrapper_&&(Oe(this.onKeyInputWrapper_),this.onKeyInputWrapper_=null)}onHtmlInputKeyDown_(o){o.key==="Enter"?(hl(),zl()):o.key==="Escape"?(this.setValue(this.htmlInput_.getAttribute("data-untyped-default-value"),!1),hl(),zl()):o.key==="Tab"&&(hl(),zl(),this.sourceBlock_.tab(this,!o.shiftKey),o.preventDefault())}onHtmlInputChange_(o){o=this.value_,this.setValue(this.getValueFromEditorText_(this.htmlInput_.value),!1),this.sourceBlock_&&he()&&this.value_!==o&&J(new(Ae(gu))(this.sourceBlock_,this.name||null,o,this.value_))}setEditorValue_(o,l=!0){this.isDirty_=!0,this.isBeingEdited_&&(this.htmlInput_.value=this.getEditorText_(o)),this.setValue(o,l)}resizeEditor_(){var o=this.getSourceBlock();if(!o)throw new Go;const l=ru(),d=this.getScaledBBox();l.style.width=d.right-d.left+"px",l.style.height=d.bottom-d.top+"px",o=new zt(o.RTL?d.right-l.offsetWidth:d.left,d.top),l.style.left=o.x+"px",l.style.top=o.y+"px"}repositionForWindowResize(){const o=this.getSourceBlock();return o instanceof Ha?(rf(this.workspace_,this.workspace_.getMetricsManager().getViewMetrics(!0),o)||this.resizeEditor_(),!0):!1}isTabNavigable(){return!0}getText_(){return this.isBeingEdited_&&this.htmlInput_?this.htmlInput_.value:null}getEditorText_(o){return`${o}`}getValueFromEditorText_(o){return o}};Yg.BORDERRADIUS=4;var Df=class extends Yg{constructor(o,l,d){super(o,l,d)}doClassValidation_(o){return o===void 0?null:`${o}`}static fromJson(o){return new this(Os(o.text),void 0,o)}};si("field_input",Df),Df.prototype.DEFAULT_VALUE="";var R0=class extends ET{constructor(o){super(o)}endsWithElemSpacer(){return!1}hasLeftSquareCorner(o){return!!o.outputConnection}hasRightSquareCorner(o){return!!o.outputConnection&&!o.statementInputCount&&!o.nextConnection}},wT=class extends Bg{constructor(o,l){if(super(o,l),this.connectedBottomNextConnection=!1,this.connectedBlock){for(o=this.connectedBlock;l=o.getNextBlock();)o=l;o.nextConnection||(this.height=this.connectedBlockHeight,this.connectedBottomNextConnection=!0)}}},C0=class extends no{constructor(o){super(o),this.width=this.height=0,this.type|=nt.getType("RIGHT_CONNECTION")}},M0=class extends wO{constructor(o){super(o)}endsWithElemSpacer(){return!1}hasLeftSquareCorner(o){const l=(o.hat?o.hat==="cap":this.constants_.ADD_START_HATS)&&!o.outputConnection&&!o.previousConnection;return!!o.outputConnection||l}hasRightSquareCorner(o){return!!o.outputConnection&&!o.statementInputCount&&!o.nextConnection}},A0=class extends Lf{constructor(o,l){super(o,l),this.isInline=!0,this.renderer_=o,this.constants_=this.renderer_.getConstants(),this.topRow=new M0(this.constants_),this.bottomRow=new R0(this.constants_),this.isMultiRow=!l.getInputsInline()||l.isCollapsed(),this.hasStatementInput=0<l.statementInputCount,this.rightSide=this.outputConnection?new C0(this.constants_):null,this.rightAlignedDummyInputs=new WeakMap}getRenderer(){return this.renderer_}measure(){this.createRows_(),this.addElemSpacing_(),this.addRowSpacing_(),this.adjustXPosition_(),this.computeBounds_(),this.alignRowElements_(),this.finalize_()}shouldStartNewRow_(o,l){return l?l instanceof Ac||o instanceof Sr||l instanceof Sr?!0:o instanceof n.ValueInput$$module$build$src$core$inputs$value_input||o instanceof Ua||o instanceof Ac?!this.isInline||this.isMultiRow:!1:!1}getDesiredRowWidth_(o){return o.hasStatement?this.width-this.startX-(this.constants_.INSIDE_CORNERS.rightWidth||0):super.getDesiredRowWidth_(o)}getInRowSpacing_(o,l){return o&&l||!this.outputConnection||!this.outputConnection.isDynamicShape||this.hasStatementInput||this.bottomRow.hasNextConnection?!o&&l&&nt.isStatementInput(l)?this.constants_.STATEMENT_INPUT_PADDING_LEFT:o&&nt.isLeftRoundedCorner(o)&&l&&(nt.isPreviousConnection(l)||nt.isNextConnection(l))?l.notchOffset-this.constants_.CORNER_RADIUS:o&&nt.isLeftSquareCorner(o)&&l&&nt.isHat(l)?this.constants_.NO_PADDING:this.constants_.MEDIUM_PADDING:this.constants_.NO_PADDING}getSpacerRowHeight_(o,l){if(nt.isTopRow(o)&&nt.isBottomRow(l))return this.constants_.EMPTY_BLOCK_SPACER_HEIGHT;const d=nt.isInputRow(o)&&o.hasStatement,m=nt.isInputRow(l)&&l.hasStatement;return m||d?(o=Math.max(this.constants_.NOTCH_HEIGHT,this.constants_.INSIDE_CORNERS.rightHeight||0),m&&d?Math.max(o,this.constants_.DUMMY_INPUT_MIN_HEIGHT):o):nt.isTopRow(o)?o.hasPreviousConnection||this.outputConnection&&!this.hasStatementInput?this.constants_.NO_PADDING:Math.abs(this.constants_.NOTCH_HEIGHT-this.constants_.CORNER_RADIUS):nt.isBottomRow(l)?this.outputConnection?!l.hasNextConnection&&this.hasStatementInput?Math.abs(this.constants_.NOTCH_HEIGHT-this.constants_.CORNER_RADIUS):this.constants_.NO_PADDING:Math.max(this.topRow.minHeight,Math.max(this.constants_.NOTCH_HEIGHT,this.constants_.CORNER_RADIUS))-this.constants_.CORNER_RADIUS:this.constants_.MEDIUM_PADDING}getSpacerRowWidth_(o,l){const d=this.width-this.startX;return nt.isInputRow(o)&&o.hasStatement||nt.isInputRow(l)&&l.hasStatement?Math.max(d,this.constants_.STATEMENT_INPUT_SPACER_MIN_WIDTH):d}getElemCenterline_(o,l){if(o.hasStatement&&!nt.isSpacer(l)&&!nt.isStatementInput(l))return o.yPos+this.constants_.EMPTY_STATEMENT_INPUT_HEIGHT/2;if(nt.isInlineInput(l)&&l instanceof yu){const d=l.connectedBlock;if(d&&d.outputConnection&&d.nextConnection)return o.yPos+d.height/2}return super.getElemCenterline_(o,l)}addInput_(o,l){if((o instanceof Ua||o instanceof Ac)&&l.hasDummyInput&&l.align===n.Align$$module$build$src$core$inputs$align.LEFT&&o.align===n.Align$$module$build$src$core$inputs$align.RIGHT)this.rightAlignedDummyInputs.set(l,o);else if(o instanceof Sr){l.elements.push(new wT(this.constants_,o)),l.hasStatement=!0,l.align===null&&(l.align=o.align);return}super.addInput_(o,l)}addAlignmentPadding_(o,l){if(this.rightAlignedDummyInputs.get(o)){let d;for(let m=0;m<o.elements.length;m++){const $=o.elements[m];if(nt.isSpacer($)&&(d=$),nt.isField($)&&$ instanceof Af&&$.parentInput===this.rightAlignedDummyInputs.get(o))break}if(d){d.width+=l,o.width+=l;return}}super.addAlignmentPadding_(o,l)}adjustXPosition_(){const o=this.constants_.NOTCH_OFFSET_LEFT+this.constants_.NOTCH_WIDTH;let l=o;for(let $=2;$<this.rows.length-1;$+=2){var d=this.rows[$-1];const V=this.rows[$];var m=this.rows[$+1];if(d=$===2?!!this.topRow.hasPreviousConnection:!!d.followsStatement,m=$+2>=this.rows.length-1?!!this.bottomRow.hasNextConnection:!!m.precedesStatement,nt.isInputRow(V)&&V.hasStatement){V.measure();let Ee,Ve;l=V.width-((Ve=(Ee=V.getLastInput())==null?void 0:Ee.width)!=null?Ve:0)+o}else if(d&&($===2||m)&&nt.isInputRow(V)&&!V.hasStatement){m=V.xPos,d=null;for(let Ee=0;Ee<V.elements.length;Ee++){const Ve=V.elements[Ee];nt.isSpacer(Ve)&&(d=Ve),d&&(nt.isField(Ve)||nt.isInput(Ve))&&m<l&&!(nt.isField(Ve)&&Ve instanceof Af&&(Ve.field instanceof ms||Ve.field instanceof jd))&&(d.width+=l-m),m+=Ve.width}}}}finalizeOutputConnection_(){if(this.outputConnection&&this.outputConnection.isDynamicShape){var o=this.outputConnection.shape;if("isDynamic"in o&&o.isDynamic){for(var l=0,d=0;d<this.rows.length;d++){const m=this.rows[d];m.yPos=l,l+=m.height}this.height=l,d=this.bottomRow.hasNextConnection?this.height-this.bottomRow.descenderHeight:this.height,l=o.height(d),d=o.width(d),this.outputConnection.height=l,this.outputConnection.width=d,this.outputConnection.startX=d,this.outputConnection.connectionOffsetY=o.connectionOffsetY(l),this.outputConnection.connectionOffsetX=o.connectionOffsetX(d),o=0,this.hasStatementInput||this.bottomRow.hasNextConnection||(o=d,this.rightSide.height=l,this.rightSide.width=o,this.rightSide.centerline=l/2,this.rightSide.xPos=this.width+o),this.startX=d,this.width+=d+o,this.widthWithChildren+=d+o}}}finalizeHorizontalAlignment_(){if(this.outputConnection&&!this.hasStatementInput&&!this.bottomRow.hasNextConnection){for(var o=0,l=0;l<this.rows.length;l++){var d=this.rows[l];if(!nt.isInputRow(d))continue;o=d.elements[d.elements.length-2];let m=this.getNegativeSpacing_(d.elements[1]),$=this.getNegativeSpacing_(o);o=m+$;const V=this.constants_.MIN_BLOCK_WIDTH+2*this.outputConnection.width;this.width-o<V&&(o=this.width-V,m=o/2,$=o/2),d.elements.unshift(new Kr(this.constants_,-m)),d.elements.push(new Kr(this.constants_,-$))}if(o)for(this.width-=o,this.widthWithChildren-=o,this.rightSide.xPos-=o,l=0;l<this.rows.length;l++)d=this.rows[l],nt.isTopOrBottomRow(d)&&(d.elements[1].width-=o),d.width-=o,d.widthWithConnectedBlocks-=o}}getNegativeSpacing_(o){if(!o||!this.outputConnection)return 0;const l=this.outputConnection.width;var d=this.outputConnection.shape.type;const m=this.constants_;if(1<this.inputRows.length)switch(d){case m.SHAPES.ROUND:return d=this.constants_.MAX_DYNAMIC_CONNECTION_SHAPE_WIDTH,d=this.height/2>d?d:this.height/2,l-d*(1-Math.sin(Math.acos((d-this.constants_.SMALL_PADDING)/d)));default:return 0}if(nt.isInlineInput(o)&&o instanceof yu){const $=o.connectedBlock;return o=$?$.pathObject.outputShapeType:o.shape.type,o==null||$&&$.outputConnection&&($.statementInputCount||$.nextConnection)||d===m.SHAPES.HEXAGONAL&&d!==o?0:l-this.constants_.SHAPE_IN_SHAPE_PADDING[d][o]}return nt.isField(o)&&o instanceof Af?d===m.SHAPES.ROUND&&o.field instanceof Df?l-2.75*m.GRID_UNIT:l-this.constants_.SHAPE_IN_SHAPE_PADDING[d][0]:nt.isIcon(o)?this.constants_.SMALL_PADDING:0}finalizeVerticalAlignment_(){if(!this.outputConnection)for(let m=2;m<this.rows.length-1;m+=2){const $=this.rows[m-1],V=this.rows[m],Ee=this.rows[m+1];var o=m===2,l=m+2>=this.rows.length-1?!!this.bottomRow.hasNextConnection:!!Ee.precedesStatement;if(o?this.topRow.hasPreviousConnection:$.followsStatement){var d=V.elements[1];if(d=V.elements.length===3&&d instanceof Af&&(d.field instanceof ms||d.field instanceof jd),!o&&d)$.height-=this.constants_.SMALL_PADDING,Ee.height-=this.constants_.SMALL_PADDING,V.height-=this.constants_.MEDIUM_PADDING;else if(!o&&!l)$.height+=this.constants_.SMALL_PADDING;else if(l){for(o=!1,l=0;l<V.elements.length;l++)if(d=V.elements[l],d instanceof yu&&nt.isInlineInput(d)&&d.connectedBlock&&!d.connectedBlock.isShadow()&&40<=d.connectedBlock.getHeightWidth().height){o=!0;break}o&&($.height-=this.constants_.SMALL_PADDING,Ee.height-=this.constants_.SMALL_PADDING)}}}}finalize_(){this.finalizeOutputConnection_(),this.finalizeHorizontalAlignment_(),this.finalizeVerticalAlignment_(),super.finalize_(),this.rightSide&&(this.widthWithChildren+=this.rightSide.width)}},T=class extends OT{constructor(o,l,d){super(o,l,d),this.markerCircle=null}showWithInputOutput(o){const l=o.getSourceBlock();o=o.getLocation().getOffsetInBlock(),this.positionCircle(o.x,o.y),this.setParent_(l),this.showCurrent_()}showWithOutput_(o){this.showWithInputOutput(o)}showWithInput_(o){this.showWithInputOutput(o)}showWithBlock_(o){o=o.getLocation();const l=o.getHeightWidth();this.positionRect_(0,0,l.width,l.height),this.setParent_(o),this.showCurrent_()}positionCircle(o,l){let d;(d=this.markerCircle)==null||d.setAttribute("cx",`${o}`);let m;(m=this.markerCircle)==null||m.setAttribute("cy",`${l}`),this.currentMarkerSvg=this.markerCircle}hide(){super.hide(),this.markerCircle&&(this.markerCircle.style.display="none")}createDomInternal_(){if(super.createDomInternal_(),this.markerCircle=Ne(st.CIRCLE,{r:this.constants_.CURSOR_RADIUS,"stroke-width":this.constants_.CURSOR_STROKE_WIDTH},this.markerSvg_),this.hide(),this.isCursor()){const o=this.getBlinkProperties_();Ne(st.ANIMATE,o,this.markerCircle)}return this.markerSvg_}applyColour_(o){super.applyColour_(o);let l;(l=this.markerCircle)==null||l.setAttribute("fill",this.colour_);let d;if((d=this.markerCircle)==null||d.setAttribute("stroke",this.colour_),this.isCursor()){o=this.colour_+";transparent;transparent;";let m;(m=this.markerCircle)==null||m.firstElementChild.setAttribute("values",o)}}},O=class extends Hg{constructor(o,l,d){super(o,l,d),this.svgPathSelected=null,this.outlines=new Map,this.remainingOutlines=new Set,this.outputShapeType=null,this.constants=d}setPath(o){super.setPath(o),this.svgPathSelected&&this.svgPathSelected.setAttribute("d",o)}applyColour(o){super.applyColour(o);const l=o.getParent();o.isShadow()&&l&&this.svgPath.setAttribute("stroke",l.style.colourTertiary);for(const d of this.outlines.values())d.setAttribute("fill",this.style.colourTertiary)}flipRTL(){super.flipRTL();for(const o of this.outlines.values())o.setAttribute("transform","scale(-1 1)")}updateSelected(o){this.setClass_("blocklySelected",o),o?this.svgPathSelected||(this.svgPathSelected=this.svgPath.cloneNode(!0),this.svgPathSelected.setAttribute("fill","none"),this.svgPathSelected.setAttribute("filter","url(#"+this.constants.selectedGlowFilterId+")"),this.svgRoot.appendChild(this.svgPathSelected)):this.svgPathSelected&&(this.svgRoot.removeChild(this.svgPathSelected),this.svgPathSelected=null)}updateReplacementFade(o){this.setClass_("blocklyReplaceable",o),o?this.svgPath.setAttribute("filter","url(#"+this.constants.replacementGlowFilterId+")"):this.svgPath.removeAttribute("filter")}updateShapeForInputHighlight(o,l){o=o.getParentInput().name,(o=this.getOutlinePath(o))&&(l?o.setAttribute("filter","url(#"+this.constants.replacementGlowFilterId+")"):o.removeAttribute("filter"))}beginDrawing(){this.remainingOutlines.clear();for(const o of this.outlines.keys())this.remainingOutlines.add(o)}endDrawing(){if(this.remainingOutlines.size)for(const o of this.remainingOutlines)this.removeOutlinePath(o);this.remainingOutlines.clear()}setOutlinePath(o,l){o=this.getOutlinePath(o),o.setAttribute("d",l),o.setAttribute("fill",this.style.colourTertiary)}getOutlinePath(o){return this.outlines.has(o)||this.outlines.set(o,Ne(st.PATH,{class:"blocklyOutlinePath",d:""},this.svgRoot)),this.remainingOutlines.delete(o),this.outlines.get(o)}removeOutlinePath(o){let l,d;(l=this.outlines.get(o))==null||(d=l.parentNode)==null||d.removeChild(this.outlines.get(o)),this.outlines.delete(o)}},N=class extends Vg{constructor(o){super(o)}makeConstants_(){return new $0}makeRenderInfo_(o){return new A0(this,o)}makeDrawer_(o,l){return new I0(o,l)}makeMarkerDrawer(o,l){return new T(o,this.getConstants(),l)}makePathObject(o,l){return new O(o,l,this.getConstants())}getConstants(){return this.constants_}getConnectionPreviewMethod(o,l,d){return ct("getConnectionPreviewMethod","v10","v12","an IConnectionPreviewer, if it fulfills your use case."),l.type===sn.OUTPUT_VALUE?o.isConnected()?ta.PREVIEW_TYPE.REPLACEMENT_FADE:ta.PREVIEW_TYPE.INPUT_OUTLINE:super.getConnectionPreviewMethod(o,l,d)}};mi("zelos",N);var j={};j.BottomRow=R0,j.ConstantProvider=$0,j.Drawer=I0,j.MarkerSvg=T,j.PathObject=O,j.RenderInfo=A0,j.Renderer=N,j.RightConnectionShape=C0,j.StatementInput=wT,j.TopRow=M0,N_();var fe={};fe.registerCleanup=Od,fe.registerCollapse=$b,fe.registerCollapseExpandBlock=L_,fe.registerComment=Cb,fe.registerDefaultOptions=N_,fe.registerDelete=k_,fe.registerDeleteAll=Ib,fe.registerDisable=w_,fe.registerDuplicate=ug,fe.registerExpand=ag,fe.registerHelp=lf,fe.registerInline=dg,fe.registerRedo=Sb,fe.registerUndo=Ob;var Me=class extends Yg{constructor(o,l,d){super(so.SKIP_SETUP),this.clockwise=Me.CLOCKWISE,this.offset=Me.OFFSET,this.wrap=Me.WRAP,this.round=Me.ROUND,this.boundEvents=[],this.symbol_=this.gauge=this.line=null,o!==so.SKIP_SETUP&&(d&&this.configure_(d),this.setValue(o),l&&this.setValidator(l))}configure_(o){switch(super.configure_(o),o.mode){case Qe.COMPASS:this.clockwise=!0,this.offset=90;break;case Qe.PROTRACTOR:this.clockwise=!1,this.offset=0}o.clockwise&&(this.clockwise=o.clockwise),o.offset&&(this.offset=o.offset),o.wrap&&(this.wrap=o.wrap),o.round&&(this.round=o.round)}initView(){super.initView(),this.symbol_=Ne(st.TSPAN,{}),this.symbol_.appendChild(document.createTextNode("°")),this.getTextElement().appendChild(this.symbol_)}render_(){super.render_(),this.updateGraph()}showEditor_(o){super.showEditor_(o,Eg||X_||mr),o=this.dropdownCreate(),Xh().appendChild(o),this.sourceBlock_ instanceof Ha&&f_(this.sourceBlock_.style.colourPrimary,this.sourceBlock_.style.colourTertiary),lt(this,this.dropdownDispose.bind(this)),this.updateGraph()}dropdownCreate(){const o=Ne(st.SVG,{xmlns:bg,"xmlns:html":Ql,"xmlns:xlink":Xr,version:"1.1",height:2*Me.HALF+"px",width:2*Me.HALF+"px"});o.style.touchAction="none";const l=Ne(st.CIRCLE,{cx:Me.HALF,cy:Me.HALF,r:Me.RADIUS,class:"blocklyAngleCircle"},o);this.gauge=Ne(st.PATH,{class:"blocklyAngleGauge"},o),this.line=Ne(st.LINE,{x1:Me.HALF,y1:Me.HALF,class:"blocklyAngleLine"},o);for(let d=0;360>d;d+=15)Ne(st.LINE,{x1:Me.HALF+Me.RADIUS,y1:Me.HALF,x2:Me.HALF+Me.RADIUS-(d%45===0?10:5),y2:Me.HALF,class:"blocklyAngleMarks",transform:"rotate("+d+","+Me.HALF+","+Me.HALF+")"},o);return this.boundEvents.push(ee(o,"click",this,this.hide)),this.boundEvents.push(ee(l,"pointerdown",this,this.onMouseMove_,!0)),this.boundEvents.push(ee(l,"pointermove",this,this.onMouseMove_,!0)),o}dropdownDispose(){for(const o of this.boundEvents)Oe(o);this.boundEvents.length=0,this.line=this.gauge=null}hide(){pi(this),hl()}onMouseMove_(o){var l=this.gauge.ownerSVGElement.getBoundingClientRect();const d=o.clientX-l.left-Me.HALF;o=o.clientY-l.top-Me.HALF,l=Math.atan(-o/d),isNaN(l)||(l=lu(l),0>d?l+=180:0<o&&(l+=360),l=this.clockwise?this.offset+360-l:360-(this.offset-l),this.displayMouseOrKeyboardValue(l))}displayMouseOrKeyboardValue(o){if(this.round&&(o=Math.round(o/this.round)*this.round),o=this.wrapValue(o),o!==this.value_){const l=this.value_;this.setEditorValue_(o,!1),this.sourceBlock_&&he()&&this.value_!==l&&J(new(Ae(gu))(this.sourceBlock_,this.name||null,l,this.value_))}}updateGraph(){if(this.gauge&&this.line){var o=Number(this.getText())+this.offset,l=Wh(o%360);o=["M ",Me.HALF,",",Me.HALF];var d=Me.HALF,m=Me.HALF;if(!isNaN(l)){const $=Number(this.clockwise),V=Wh(this.offset),Ee=Math.cos(V)*Me.RADIUS,Ve=Math.sin(V)*-Me.RADIUS;$&&(l=2*V-l),d+=Math.cos(l)*Me.RADIUS,m-=Math.sin(l)*Me.RADIUS,l=Math.abs(Math.floor((l-V)/Math.PI)%2),$&&(l=1-l),o.push(" l ",Ee,",",Ve," A ",Me.RADIUS,",",Me.RADIUS," 0 ",l," ",$," ",d,",",m," z")}this.gauge.setAttribute("d",o.join("")),this.line.setAttribute("x2",`${d}`),this.line.setAttribute("y2",`${m}`)}}onHtmlInputKeyDown_(o){super.onHtmlInputKeyDown_(o);var l=this.getSourceBlock();if(!l)throw new Go;let d=0;switch(o.key){case"ArrowLeft":d=l.RTL?1:-1;break;case"ArrowRight":d=l.RTL?-1:1;break;case"ArrowDown":d=-1;break;case"ArrowUp":d=1}d&&(l=this.getValue(),this.displayMouseOrKeyboardValue(l+d*this.round),o.preventDefault(),o.stopPropagation())}doClassValidation_(o){return o=Number(o),isNaN(o)||!isFinite(o)?null:this.wrapValue(o)}wrapValue(o){return o%=360,0>o&&(o+=360),o>this.wrap&&(o-=360),o}static fromJson(o){return new this(o.angle,void 0,o)}};Me.HALF=50,Me.RADIUS=Me.HALF-1,Me.CLOCKWISE=!1,Me.OFFSET=0,Me.WRAP=360,Me.ROUND=15,si("field_angle",Me),Me.prototype.DEFAULT_VALUE=0,Ue(`
  486. .blocklyAngleCircle {
  487. stroke: #444;
  488. stroke-width: 1;
  489. fill: #ddd;
  490. fill-opacity: 0.8;
  491. }
  492. .blocklyAngleMarks {
  493. stroke: #444;
  494. stroke-width: 1;
  495. }
  496. .blocklyAngleGauge {
  497. fill: #f88;
  498. fill-opacity: 0.8;
  499. pointer-events: none;
  500. }
  501. .blocklyAngleLine {
  502. stroke: #f00;
  503. stroke-width: 2;
  504. stroke-linecap: round;
  505. pointer-events: none;
  506. }
  507. `);var Qe;(function(o){o.COMPASS="compass",o.PROTRACTOR="protractor"})(Qe||(Qe={}));var et=class extends so{constructor(o,l,d){super(so.SKIP_SETUP),this.SERIALIZABLE=!0,this.CURSOR="default",this.value_=this.value_,this.checkChar=et.CHECK_CHAR,o!==so.SKIP_SETUP&&(d&&this.configure_(d),this.setValue(o),l&&this.setValidator(l))}configure_(o){super.configure_(o),o.checkCharacter&&(this.checkChar=o.checkCharacter)}saveState(){const o=this.saveLegacyState(et);return o!==null?o:this.getValueBoolean()}initView(){super.initView();const o=this.getTextElement();Se(o,"blocklyCheckbox"),o.style.display=this.value_?"block":"none"}render_(){this.textContent_&&(this.textContent_.nodeValue=this.getDisplayText_()),this.updateSize_(this.getConstants().FIELD_CHECKBOX_X_OFFSET)}getDisplayText_(){return this.checkChar}setCheckCharacter(o){this.checkChar=o||et.CHECK_CHAR,this.forceRerender()}showEditor_(){this.setValue(!this.value_)}doClassValidation_(o){return o===!0||o==="TRUE"?"TRUE":o===!1||o==="FALSE"?"FALSE":null}doValueUpdate_(o){this.value_=this.convertValueToBool_(o),this.textElement_&&(this.textElement_.style.display=this.value_?"block":"none")}getValue(){return this.value_?"TRUE":"FALSE"}getValueBoolean(){return this.value_}getText(){return String(this.convertValueToBool_(this.value_))}convertValueToBool_(o){return typeof o=="string"?o==="TRUE":!!o}static fromJson(o){return new this(o.checked,void 0,o)}};et.CHECK_CHAR="✓",si("field_checkbox",et),et.prototype.DEFAULT_VALUE=!1;var it=class extends so{constructor(o,l,d){super(so.SKIP_SETUP),this.highlightedIndex=this.picker=null,this.boundEvents=[],this.SERIALIZABLE=!0,this.CURSOR="default",this.isDirty_=!1,this.titles=this.colours=null,this.columns=0,o!==so.SKIP_SETUP&&(d&&this.configure_(d),this.setValue(o),l&&this.setValidator(l))}configure_(o){super.configure_(o),o.colourOptions&&(this.colours=o.colourOptions),o.colourTitles&&(this.titles=o.colourTitles),o.columns&&(this.columns=o.columns)}initView(){this.size_=new Ko(this.getConstants().FIELD_COLOUR_DEFAULT_WIDTH,this.getConstants().FIELD_COLOUR_DEFAULT_HEIGHT),this.createBorderRect_(),this.getBorderRect().style.fillOpacity="1",this.getBorderRect().setAttribute("stroke","#fff"),this.isFullBlockField()&&(this.clickTarget_=this.sourceBlock_.getSvgRoot())}isFullBlockField(){const o=this.getSourceBlock();if(!o)throw new Go;const l=this.getConstants();return o.isSimpleReporter()&&!(l==null||!l.FIELD_COLOUR_FULL_BLOCK)}applyColour(){const o=this.getSourceBlock();if(!o)throw new Go;if(this.fieldGroup_){var l=this.borderRect_;if(!l)throw Error("The border rect has not been initialized");this.isFullBlockField()?(l.style.display="none",o.pathObject.svgPath.setAttribute("fill",this.getValue()),o.pathObject.svgPath.setAttribute("stroke","#fff")):(l.style.display="block",l.style.fill=this.getValue())}}getSize(){let o;return(o=this.getConstants())!=null&&o.FIELD_COLOUR_FULL_BLOCK&&(this.render_(),this.isDirty_=!1),super.getSize()}render_(){super.render_();const o=this.getSourceBlock();if(!o)throw new Go;o.applyColour()}updateSize_(o){var l=this.getConstants();this.isFullBlockField()?(o=2*(o??0),l=l.FIELD_TEXT_HEIGHT):(o=l.FIELD_COLOUR_DEFAULT_WIDTH,l=l.FIELD_COLOUR_DEFAULT_HEIGHT),this.size_.height=l,this.size_.width=o,this.positionBorderRect_()}doClassValidation_(o){return typeof o!="string"?null:pl(o)}getText(){let o=this.value_;return/^#(.)\1(.)\2(.)\3$/.test(o)&&(o="#"+o[1]+o[3]+o[5]),o}setColours(o,l){return this.colours=o,l&&(this.titles=l),this}setColumns(o){return this.columns=o,this}showEditor_(){this.dropdownCreate(),Xh().appendChild(this.picker),lt(this,this.dropdownDispose.bind(this)),this.picker.focus({preventScroll:!0})}onClick(o){o=(o=o.target)&&o.getAttribute("data-colour"),o!==null&&(this.setValue(o),pi(this))}onKeyDown(o){let l=!0;var d;switch(o.key){case"ArrowUp":this.moveHighlightBy(0,-1);break;case"ArrowDown":this.moveHighlightBy(0,1);break;case"ArrowLeft":this.moveHighlightBy(-1,0);break;case"ArrowRight":this.moveHighlightBy(1,0);break;case"Enter":(d=this.getHighlighted())&&(d=d.getAttribute("data-colour"),d!==null&&this.setValue(d)),zl();break;default:l=!1}l&&o.stopPropagation()}moveHighlightBy(o,l){if(this.highlightedIndex){var d=this.colours||it.COLOURS,m=this.columns||it.COLUMNS,$=this.highlightedIndex%m,V=Math.floor(this.highlightedIndex/m);$+=o,V+=l,0>o?0>$&&0<V?($=m-1,V--):0>$&&($=0):0<o?$>m-1&&V<Math.floor(d.length/m)-1?($=0,V++):$>m-1&&$--:0>l?0>V&&(V=0):0<l&&V>Math.floor(d.length/m)-1&&(V=Math.floor(d.length/m)-1),this.setHighlightedCell(this.picker.childNodes[V].childNodes[$],V*m+$)}}onMouseMove(o){const l=(o=o.target)&&Number(o.getAttribute("data-index"));l!==null&&l!==this.highlightedIndex&&this.setHighlightedCell(o,l)}onMouseEnter(){let o;(o=this.picker)==null||o.focus({preventScroll:!0})}onMouseLeave(){var o;(o=this.picker)==null||o.blur(),(o=this.getHighlighted())&&ut(o,"blocklyColourHighlighted")}getHighlighted(){if(!this.highlightedIndex)return null;const o=this.columns||it.COLUMNS,l=this.picker.childNodes[Math.floor(this.highlightedIndex/o)];return l?l.childNodes[this.highlightedIndex%o]:null}setHighlightedCell(o,l){const d=this.getHighlighted();d&&ut(d,"blocklyColourHighlighted"),Se(o,"blocklyColourHighlighted"),this.highlightedIndex=l,(o=o.getAttribute("id"))&&this.picker&&Ho(this.picker,jo.ACTIVEDESCENDANT,o)}dropdownCreate(){const o=this.columns||it.COLUMNS,l=this.colours||it.COLOURS,d=this.titles||it.TITLES,m=this.getValue(),$=document.createElement("table");$.className="blocklyColourTable",$.tabIndex=0,$.dir="ltr",Ur($,Er.GRID),Ho($,jo.EXPANDED,!0),Ho($,jo.ROWCOUNT,Math.floor(l.length/o)),Ho($,jo.COLCOUNT,o);let V;for(let Ee=0;Ee<l.length;Ee++){Ee%o===0&&(V=document.createElement("tr"),Ur(V,Er.ROW),$.appendChild(V));const Ve=document.createElement("td");V.appendChild(Ve),Ve.setAttribute("data-colour",l[Ee]),Ve.title=d[Ee]||l[Ee],Ve.id=X(),Ve.setAttribute("data-index",`${Ee}`),Ur(Ve,Er.GRIDCELL),Ho(Ve,jo.LABEL,l[Ee]),Ho(Ve,jo.SELECTED,l[Ee]===m),Ve.style.backgroundColor=l[Ee],l[Ee]===m&&(Ve.className="blocklyColourSelected",this.highlightedIndex=Ee)}this.boundEvents.push(ee($,"pointerdown",this,this.onClick,!0)),this.boundEvents.push(ee($,"pointermove",this,this.onMouseMove,!0)),this.boundEvents.push(ee($,"pointerenter",this,this.onMouseEnter,!0)),this.boundEvents.push(ee($,"pointerleave",this,this.onMouseLeave,!0)),this.boundEvents.push(ee($,"keydown",this,this.onKeyDown,!1)),this.picker=$}dropdownDispose(){for(const o of this.boundEvents)Oe(o);this.boundEvents.length=0,this.highlightedIndex=this.picker=null}static fromJson(o){return new this(o.colour,void 0,o)}};it.COLOURS="#ffffff #cccccc #c0c0c0 #999999 #666666 #333333 #000000 #ffcccc #ff6666 #ff0000 #cc0000 #990000 #660000 #330000 #ffcc99 #ff9966 #ff9900 #ff6600 #cc6600 #993300 #663300 #ffff99 #ffff66 #ffcc66 #ffcc33 #cc9933 #996633 #663333 #ffffcc #ffff33 #ffff00 #ffcc00 #999900 #666600 #333300 #99ff99 #66ff99 #33ff33 #33cc00 #009900 #006600 #003300 #99ffff #33ffff #66cccc #00cccc #339999 #336666 #003333 #ccffff #66ffff #33ccff #3366ff #3333ff #000099 #000066 #ccccff #9999ff #6666cc #6633ff #6600cc #333399 #330099 #ffccff #ff99ff #cc66cc #cc33cc #993399 #663366 #330033".split(" "),it.TITLES=[],it.COLUMNS=7,it.prototype.DEFAULT_VALUE=it.COLOURS[0],si("field_colour",it),Ue(`
  508. .blocklyColourTable {
  509. border-collapse: collapse;
  510. display: block;
  511. outline: none;
  512. padding: 1px;
  513. }
  514. .blocklyColourTable>tr>td {
  515. border: 0.5px solid #888;
  516. box-sizing: border-box;
  517. cursor: pointer;
  518. display: inline-block;
  519. height: 20px;
  520. padding: 0;
  521. width: 20px;
  522. }
  523. .blocklyColourTable>tr>td.blocklyColourHighlighted {
  524. border-color: #eee;
  525. box-shadow: 2px 2px 7px 2px rgba(0, 0, 0, 0.3);
  526. position: relative;
  527. }
  528. .blocklyColourSelected, .blocklyColourSelected:hover {
  529. border-color: #eee !important;
  530. outline: 1px solid #333;
  531. position: relative;
  532. }
  533. `);var wt=class extends ms{constructor(o,l,d){super(String(o??""),l,d),this.EDITABLE=!1,this.SERIALIZABLE=!0}static fromJson(o){return new this(Os(o.text),void 0,o)}};si("field_label_serializable",wt);var kt=class extends Df{constructor(o,l,d){super(so.SKIP_SETUP),this.textGroup=null,this.maxLines_=1/0,this.isOverflowedY_=!1,o!==so.SKIP_SETUP&&(d&&this.configure_(d),this.setValue(o),l&&this.setValidator(l))}configure_(o){super.configure_(o),o.maxLines&&this.setMaxLines(o.maxLines)}toXml(o){return o.textContent=this.getValue().replace(/\n/g,"&#10;"),o}fromXml(o){this.setValue(o.textContent.replace(/&#10;/g,`
  534. `))}saveState(){const o=this.saveLegacyState(kt);return o!==null?o:this.getValue()}loadState(o){this.loadLegacyState(so,o)||this.setValue(o)}initView(){this.createBorderRect_(),this.textGroup=Ne(st.G,{class:"blocklyEditableText"},this.fieldGroup_)}getDisplayText_(){const o=this.getSourceBlock();if(!o)throw new Go;let l=this.getText();if(!l)return so.NBSP;const d=l.split(`
  535. `);l="";const m=this.isOverflowedY_?this.maxLines_:d.length;for(let $=0;$<m;$++){let V=d[$];V.length>this.maxDisplayLength?V=V.substring(0,this.maxDisplayLength-4)+"...":this.isOverflowedY_&&$===m-1&&(V=V.substring(0,V.length-3)+"..."),V=V.replace(/\s/g,so.NBSP),l+=V,$!==m-1&&(l+=`
  536. `)}return o.RTL&&(l+="‏"),l}doValueUpdate_(o){super.doValueUpdate_(o),this.value_!==null&&(this.isOverflowedY_=this.value_.split(`
  537. `).length>this.maxLines_)}render_(){var o=this.getSourceBlock();if(!o)throw new Go;for(var l,d=this.textGroup;l=d.firstChild;)d.removeChild(l);l=this.getDisplayText_().split(`
  538. `);let m=0;for(let $=0;$<l.length;$++){const V=this.getConstants().FIELD_TEXT_HEIGHT+this.getConstants().FIELD_BORDER_RECT_Y_PADDING;Ne(st.TEXT,{class:"blocklyText blocklyMultilineText",x:this.getConstants().FIELD_BORDER_RECT_X_PADDING,y:m+this.getConstants().FIELD_BORDER_RECT_Y_PADDING,dy:this.getConstants().FIELD_TEXT_BASELINE},d).appendChild(document.createTextNode(l[$])),m+=V}this.isBeingEdited_&&(d=this.htmlInput_,this.isOverflowedY_?Se(d,"blocklyHtmlTextAreaInputOverflowedY"):ut(d,"blocklyHtmlTextAreaInputOverflowedY")),this.updateSize_(),this.isBeingEdited_&&(o.RTL?setTimeout(this.resizeEditor_.bind(this),0):this.resizeEditor_(),o=this.htmlInput_,this.isTextValid_?(ut(o,"blocklyInvalidInput"),Ho(o,jo.INVALID,!1)):(Se(o,"blocklyInvalidInput"),Ho(o,jo.INVALID,!0)))}updateSize_(){var o=this.textGroup.childNodes;const l=this.getConstants().FIELD_TEXT_FONTSIZE,d=this.getConstants().FIELD_TEXT_FONTWEIGHT,m=this.getConstants().FIELD_TEXT_FONTFAMILY;let $=0,V=0;for(var Ee=0;Ee<o.length;Ee++){var Ve=Fe(o[Ee],l,d,m);Ve>$&&($=Ve),V+=this.getConstants().FIELD_TEXT_HEIGHT+(0<Ee?this.getConstants().FIELD_BORDER_RECT_Y_PADDING:0)}if(this.isBeingEdited_){for(o=String(this.value_).split(`
  539. `),Ee=Ne(st.TEXT,{class:"blocklyText blocklyMultilineText"}),Ve=0;Ve<o.length;Ve++){o[Ve].length>this.maxDisplayLength&&(o[Ve]=o[Ve].substring(0,this.maxDisplayLength)),Ee.textContent=o[Ve];const St=Fe(Ee,l,d,m);St>$&&($=St)}$+=this.htmlInput_.offsetWidth-this.htmlInput_.clientWidth}this.borderRect_&&(V+=2*this.getConstants().FIELD_BORDER_RECT_Y_PADDING,$+=2*this.getConstants().FIELD_BORDER_RECT_X_PADDING,this.borderRect_.setAttribute("width",`${$}`),this.borderRect_.setAttribute("height",`${V}`)),this.size_.width=$,this.size_.height=V,this.positionBorderRect_()}showEditor_(o,l){super.showEditor_(o,l),this.forceRerender()}widgetCreate_(){const o=ru(),l=this.workspace_.getScale(),d=document.createElement("textarea");d.className="blocklyHtmlInput blocklyHtmlTextAreaInput",d.setAttribute("spellcheck",String(this.spellcheck_));var m=this.getConstants().FIELD_TEXT_FONTSIZE*l+"pt";o.style.fontSize=m,d.style.fontSize=m,d.style.borderRadius=Df.BORDERRADIUS*l+"px",m=this.getConstants().FIELD_BORDER_RECT_X_PADDING*l;const $=this.getConstants().FIELD_BORDER_RECT_Y_PADDING*l/2;return d.style.padding=$+"px "+m+"px "+$+"px "+m+"px",m=this.getConstants().FIELD_TEXT_HEIGHT+this.getConstants().FIELD_BORDER_RECT_Y_PADDING,d.style.lineHeight=m*l+"px",o.appendChild(d),d.value=d.defaultValue=this.getEditorText_(this.value_),d.setAttribute("data-untyped-default-value",String(this.value_)),d.setAttribute("data-old-value",""),Gb?setTimeout(this.resizeEditor_.bind(this),0):this.resizeEditor_(),this.bindInputEvents_(d),d}setMaxLines(o){typeof o=="number"&&0<o&&o!==this.maxLines_&&(this.maxLines_=o,this.forceRerender())}getMaxLines(){return this.maxLines_}onHtmlInputKeyDown_(o){o.key!=="Enter"&&super.onHtmlInputKeyDown_(o)}static fromJson(o){return new this(Os(o.text),void 0,o)}};si("field_multilinetext",kt),Ue(`
  540. .blocklyHtmlTextAreaInput {
  541. font-family: monospace;
  542. resize: none;
  543. overflow: hidden;
  544. height: 100%;
  545. text-align: left;
  546. }
  547. .blocklyHtmlTextAreaInputOverflowedY {
  548. overflow-y: scroll;
  549. }
  550. `);var Ht=class extends Yg{constructor(o,l,d,m,$,V){super(so.SKIP_SETUP),this.min_=-1/0,this.max_=1/0,this.precision_=0,this.decimalPlaces=null,this.spellcheck_=!1,o!==so.SKIP_SETUP&&(V?this.configure_(V):this.setConstraints(l,d,m),this.setValue(o),$&&this.setValidator($))}configure_(o){super.configure_(o),this.setMinInternal(o.min),this.setMaxInternal(o.max),this.setPrecisionInternal(o.precision)}setConstraints(o,l,d){this.setMinInternal(o),this.setMaxInternal(l),this.setPrecisionInternal(d),this.setValue(this.getValue())}setMin(o){this.setMinInternal(o),this.setValue(this.getValue())}setMinInternal(o){o==null?this.min_=-1/0:(o=Number(o),isNaN(o)||(this.min_=o))}getMin(){return this.min_}setMax(o){this.setMaxInternal(o),this.setValue(this.getValue())}setMaxInternal(o){o==null?this.max_=1/0:(o=Number(o),isNaN(o)||(this.max_=o))}getMax(){return this.max_}setPrecision(o){this.setPrecisionInternal(o),this.setValue(this.getValue())}setPrecisionInternal(o){this.precision_=Number(o)||0;let l=String(this.precision_);l.indexOf("e")!==-1&&(l=this.precision_.toLocaleString("en-US",{maximumFractionDigits:20}));const d=l.indexOf(".");this.decimalPlaces=d===-1?o?0:null:l.length-d-1}getPrecision(){return this.precision_}doClassValidation_(o){return o===null||(o=`${o}`.replace(/O/gi,"0"),o=o.replace(/,/g,""),o=o.replace(/infinity/i,"Infinity"),o=Number(o||0),isNaN(o))?null:(o=Math.min(Math.max(o,this.min_),this.max_),this.precision_&&isFinite(o)&&(o=Math.round(o/this.precision_)*this.precision_),this.decimalPlaces!==null&&(o=Number(o.toFixed(this.decimalPlaces))),o)}widgetCreate_(){const o=super.widgetCreate_();return-1/0<this.min_&&(o.min=`${this.min_}`,Ho(o,jo.VALUEMIN,this.min_)),1/0>this.max_&&(o.max=`${this.max_}`,Ho(o,jo.VALUEMAX,this.max_)),o}static fromJson(o){return new this(o.value,void 0,void 0,void 0,void 0,o)}};si("field_number",Ht),Ht.prototype.DEFAULT_VALUE=0;var Zt=class extends Yr{constructor(o,l,d,m,$){super(so.SKIP_SETUP),this.defaultType="",this.variableTypes=[],this.variable=null,this.SERIALIZABLE=!0,this.menuGenerator_=Zt.dropdownCreate,this.defaultVariableName=typeof o=="string"?o:"",this.size_=new Ko(0,0),o!==so.SKIP_SETUP&&($?this.configure_($):this.setTypes(d,m),l&&this.setValidator(l))}configure_(o){super.configure_(o),this.setTypes(o.variableTypes,o.defaultType)}initModel(){var o=this.getSourceBlock();if(!o)throw new Go;this.variable||(o=n.getOrCreateVariablePackage$$module$build$src$core$variables(o.workspace,null,this.defaultVariableName,this.defaultType),this.doValueUpdate_(o.getId()))}shouldAddBorderRect_(){const o=this.getSourceBlock();if(!o)throw new Go;return super.shouldAddBorderRect_()&&(!this.getConstants().FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW||o.type!=="variables_get")}fromXml(o){var l=this.getSourceBlock();if(!l)throw new Go;const d=o.getAttribute("id"),m=o.textContent,$=o.getAttribute("variabletype")||o.getAttribute("variableType")||"";if(l=n.getOrCreateVariablePackage$$module$build$src$core$variables(l.workspace,d,m,$),$!==null&&$!==l.type)throw Error("Serialized variable type with id '"+l.getId()+"' had type "+l.type+", and does not match variable field that references it: "+Ta(o)+".");this.setValue(l.getId())}toXml(o){return this.initModel(),o.id=this.variable.getId(),o.textContent=this.variable.name,this.variable.type&&o.setAttribute("variabletype",this.variable.type),o}saveState(o){var l=this.saveLegacyState(Zt);return l!==null||(this.initModel(),l={id:this.variable.getId()},o&&(l.name=this.variable.name,l.type=this.variable.type)),l}loadState(o){const l=this.getSourceBlock();if(!l)throw new Go;this.loadLegacyState(Zt,o)||(o=n.getOrCreateVariablePackage$$module$build$src$core$variables(l.workspace,o.id||null,o.name,o.type||""),this.setValue(o.getId()))}setSourceBlock(o){if(o.isShadow())throw Error("Variable fields are not allowed to exist on shadow blocks.");super.setSourceBlock(o)}getValue(){return this.variable?this.variable.getId():null}getText(){return this.variable?this.variable.name:""}getVariable(){return this.variable}getValidator(){return this.variable?this.validator_:null}doClassValidation_(o){if(o===null)return null;var l=this.getSourceBlock();if(!l)throw new Go;return l=n.getVariable$$module$build$src$core$variables(l.workspace,o),l?(l=l.type,this.typeIsAllowed(l)?o:(console.warn("Variable type doesn't match this field! Type was "+l),null)):(console.warn("Variable id doesn't point to a real variable! ID was "+o),null)}doValueUpdate_(o){const l=this.getSourceBlock();if(!l)throw new Go;this.variable=n.getVariable$$module$build$src$core$variables(l.workspace,o),super.doValueUpdate_(o)}typeIsAllowed(o){const l=this.getVariableTypes();if(!l)return!0;for(let d=0;d<l.length;d++)if(o===l[d])return!0;return!1}getVariableTypes(){var o=this.variableTypes;if(o===null&&this.sourceBlock_&&!this.sourceBlock_.isDeadOrDying())return this.sourceBlock_.workspace.getVariableTypes();if(o=o||[""],o.length===0)throw o=this.getText(),Error("'variableTypes' of field variable "+o+" was an empty list");return o}setTypes(o=null,l=""){if(Array.isArray(o)){let d=!1;for(let m=0;m<o.length;m++)o[m]===l&&(d=!0);if(!d)throw Error("Invalid default type '"+l+"' in the definition of a FieldVariable")}else if(o!==null)throw Error("'variableTypes' was not an array in the definition of a FieldVariable");this.defaultType=l,this.variableTypes=o}refreshVariableName(){this.forceRerender()}onItemSelected_(o,l){if(o=l.getValue(),this.sourceBlock_&&!this.sourceBlock_.isDeadOrDying()){if(o===uT){n.renameVariable$$module$build$src$core$variables(this.sourceBlock_.workspace,this.variable);return}if(o===dT){this.sourceBlock_.workspace.deleteVariableById(this.variable.getId());return}}this.setValue(o)}referencesVariables(){return!0}static fromJson(o){return new this(Os(o.variable),void 0,void 0,void 0,o)}static dropdownCreate(){if(!this.variable)throw Error("Tried to call dropdownCreate on a variable field with no variable selected.");const o=this.getText();let l=[];if(this.sourceBlock_&&!this.sourceBlock_.isDeadOrDying())for(var d=this.getVariableTypes(),m=0;m<d.length;m++){const $=this.sourceBlock_.workspace.getVariablesOfType(d[m]);l=l.concat($)}for(l.sort(gf.compareByName),d=[],m=0;m<l.length;m++)d[m]=[l[m].name,l[m].getId()];return d.push([n.Msg$$module$build$src$core$msg.RENAME_VARIABLE,uT]),n.Msg$$module$build$src$core$msg.DELETE_VARIABLE&&d.push([n.Msg$$module$build$src$core$msg.DELETE_VARIABLE.replace("%1",o),dT]),d}};si("field_variable",Zt);var fn=class{constructor(o,l,d,m){this.workspace=o,this.targetWorkspace=l,this.isLabel_=m,this.onMouseUpWrapper=null,this.height=this.width=0,this.svgText=this.svgGroup=null,this.text=d.text,this.position=new zt(0,0),this.callbackKey=d.callbackKey||d.callbackkey,this.cssClass=d["web-class"]||null,this.info=d}createDom(){var o=this.isLabel_?"blocklyFlyoutLabel":"blocklyFlyoutButton";this.cssClass&&(o+=" "+this.cssClass),this.svgGroup=Ne(st.G,{class:o},this.workspace.getCanvas());let l;this.isLabel_||(l=Ne(st.RECT,{class:"blocklyFlyoutButtonShadow",rx:fn.BORDER_RADIUS,ry:fn.BORDER_RADIUS,x:1,y:1},this.svgGroup)),o=Ne(st.RECT,{class:this.isLabel_?"blocklyFlyoutLabelBackground":"blocklyFlyoutButtonBackground",rx:fn.BORDER_RADIUS,ry:fn.BORDER_RADIUS},this.svgGroup);const d=Ne(st.TEXT,{class:this.isLabel_?"blocklyFlyoutLabelText":"blocklyText",x:0,y:0,"text-anchor":"middle"},this.svgGroup);var m=Os(this.text);this.workspace.RTL&&(m+="‏"),d.textContent=m,this.isLabel_&&(this.svgText=d,this.workspace.getThemeManager().subscribe(this.svgText,"flyoutForegroundColour","fill"));const $=Lo(d,"fontSize"),V=Lo(d,"fontWeight"),Ee=Lo(d,"fontFamily");if(this.width=ye(d,$,V,Ee),m=ft(m,$,V,Ee),this.height=m.height,!this.isLabel_){this.width+=2*fn.TEXT_MARGIN_X,this.height+=2*fn.TEXT_MARGIN_Y;let Ve;(Ve=l)==null||Ve.setAttribute("width",String(this.width));let St;(St=l)==null||St.setAttribute("height",String(this.height))}return o.setAttribute("width",String(this.width)),o.setAttribute("height",String(this.height)),d.setAttribute("x",String(this.width/2)),d.setAttribute("y",String(this.height/2-m.height/2+m.baseline)),this.updateTransform(),this.onMouseUpWrapper=ee(this.svgGroup,"pointerup",this,this.onMouseUp),this.svgGroup}show(){this.updateTransform(),this.svgGroup.setAttribute("display","block")}updateTransform(){this.svgGroup.setAttribute("transform","translate("+this.position.x+","+this.position.y+")")}moveTo(o,l){this.position.x=o,this.position.y=l,this.updateTransform()}isLabel(){return this.isLabel_}getPosition(){return this.position}getButtonText(){return this.text}getTargetWorkspace(){return this.targetWorkspace}dispose(){this.onMouseUpWrapper&&Oe(this.onMouseUpWrapper),this.svgGroup&&mt(this.svgGroup),this.svgText&&this.workspace.getThemeManager().unsubscribe(this.svgText)}onMouseUp(o){(o=this.targetWorkspace.getGesture(o))&&o.cancel(),this.isLabel_&&this.callbackKey?console.warn("Labels should not have callbacks. Label text: "+this.text):this.isLabel_||this.callbackKey&&this.targetWorkspace.getButtonCallback(this.callbackKey)?this.isLabel_||(o=this.targetWorkspace.getButtonCallback(this.callbackKey))&&o(this):console.warn("Buttons should have callbacks. Button text: "+this.text)}};fn.TEXT_MARGIN_X=5,fn.TEXT_MARGIN_Y=2,fn.BORDER_RADIUS=4,Ue(`
  551. .blocklyFlyoutButton {
  552. fill: #888;
  553. cursor: default;
  554. }
  555. .blocklyFlyoutButtonShadow {
  556. fill: #666;
  557. }
  558. .blocklyFlyoutButton:hover {
  559. fill: #aaa;
  560. }
  561. .blocklyFlyoutLabel {
  562. cursor: default;
  563. }
  564. .blocklyFlyoutLabelBackground {
  565. opacity: 0;
  566. }
  567. `);var Pn=class extends MT{constructor(o,l){super(o),this.flyout_=l}getBoundingBox_(){let o;try{o=this.workspace_.getCanvas().getBBox()}catch{o={height:0,y:0,width:0,x:0}}return o}getContentMetrics(o){const l=this.getBoundingBox_();return o=o?1:this.workspace_.scale,{height:l.height*o,width:l.width*o,top:l.y*o,left:l.x*o}}getScrollMetrics(o,l,d){return l=d||this.getContentMetrics(),d=this.flyout_.MARGIN*this.workspace_.scale,o=o?this.workspace_.scale:1,{height:(l.height+2*d)/o,width:(l.width+l.left+d)/o,top:0,left:0}}},Xn;(function(o){o.BLOCK="block",o.BUTTON="button"})(Xn||(Xn={}));var kn=class extends yT{constructor(o){super(),this.horizontalLayout=!1,this.boundEvents=[],this.filterWrapper=this.reflowWrapper=null,this.mats=[],this.buttons_=[],this.listeners=[],this.permanentlyDisabled=[],this.recycledBlocks=[],this.autoClose=!0,this.isVisible_=!1,this.containerVisible=!0,this.CORNER_RADIUS=8,this.SCROLLBAR_MARGIN=2.5,this.height_=this.width_=0,this.dragAngleRange_=70,this.svgGroup_=this.svgBackground_=null,o.setMetrics=this.setMetrics_.bind(this),this.workspace_=new na(o),this.workspace_.setMetricsManager(new Pn(this.workspace_,this)),this.workspace_.internalIsFlyout=!0,this.workspace_.setVisible(this.isVisible_),this.id=G(),this.RTL=!!o.RTL,this.toolboxPosition_=o.toolboxPosition,this.tabWidth_=this.workspace_.getRenderer().getConstants().TAB_WIDTH,this.rectMap_=new WeakMap,this.MARGIN=this.CORNER_RADIUS,this.GAP_X=3*this.MARGIN,this.GAP_Y=3*this.MARGIN}createDom(o){return this.svgGroup_=Ne(o,{class:"blocklyFlyout"}),this.svgGroup_.style.display="none",this.svgBackground_=Ne(st.PATH,{class:"blocklyFlyoutBackground"},this.svgGroup_),this.svgGroup_.appendChild(this.workspace_.createDom()),this.workspace_.getThemeManager().subscribe(this.svgBackground_,"flyoutBackgroundColour","fill"),this.workspace_.getThemeManager().subscribe(this.svgBackground_,"flyoutOpacity","fill-opacity"),this.svgGroup_}init(o){this.targetWorkspace=o,this.workspace_.targetWorkspace=o,this.workspace_.scrollbar=new YO(this.workspace_,this.horizontalLayout,!this.horizontalLayout,"blocklyFlyoutScrollbar",this.SCROLLBAR_MARGIN),this.hide(),this.boundEvents.push(ee(this.svgGroup_,"wheel",this,this.wheel_)),this.filterWrapper=this.filterForCapacity.bind(this),this.targetWorkspace.addChangeListener(this.filterWrapper),this.boundEvents.push(ee(this.svgBackground_,"pointerdown",this,this.onMouseDown)),this.workspace_.getGesture=this.targetWorkspace.getGesture.bind(this.targetWorkspace),this.workspace_.setVariableMap(this.targetWorkspace.getVariableMap()),this.workspace_.createPotentialVariableMap(),o.getComponentManager().addComponent({component:this,weight:1,capabilities:[Gs.Capability.AUTOHIDEABLE,Gs.Capability.DELETE_AREA,Gs.Capability.DRAG_TARGET]})}dispose(){this.hide(),this.targetWorkspace.getComponentManager().removeComponent(this.id);for(const o of this.boundEvents)Oe(o);this.boundEvents.length=0,this.filterWrapper&&this.targetWorkspace.removeChangeListener(this.filterWrapper),this.workspace_&&(this.workspace_.getThemeManager().unsubscribe(this.svgBackground_),this.workspace_.dispose()),this.svgGroup_&&mt(this.svgGroup_)}getWidth(){return this.width_}getHeight(){return this.height_}getFlyoutScale(){return this.targetWorkspace.scale}getWorkspace(){return this.workspace_}setAutoClose(o){this.autoClose=o,this.targetWorkspace.recordDragTargets(),this.targetWorkspace.resizeContents()}autoHide(o){!o&&this.targetWorkspace.getFlyout(!0)===this&&this.autoClose&&this.hide()}isVisible(){return this.isVisible_}setVisible(o){const l=o!==this.isVisible();this.isVisible_=o,l&&(this.autoClose||this.targetWorkspace.recordDragTargets(),this.updateDisplay())}setContainerVisible(o){const l=o!==this.containerVisible;this.containerVisible=o,l&&this.updateDisplay()}updateDisplay(){let o;o=this.containerVisible?this.isVisible():!1,this.svgGroup_&&(this.svgGroup_.style.display=o?"block":"none");let l;(l=this.workspace_.scrollbar)==null||l.setContainerVisible(o)}positionAt_(o,l,d,m){let $;($=this.svgGroup_)==null||$.setAttribute("width",`${o}`);let V;(V=this.svgGroup_)==null||V.setAttribute("height",`${l}`),this.workspace_.setCachedParentSvgSize(o,l),this.svgGroup_&&q(this.svgGroup_,"translate("+d+"px,"+m+"px)"),(o=this.workspace_.scrollbar)&&(o.setOrigin(d,m),o.resize(),o.hScroll&&o.hScroll.setPosition(o.hScroll.position.x,o.hScroll.position.y),o.vScroll&&o.vScroll.setPosition(o.vScroll.position.x,o.vScroll.position.y))}hide(){if(this.isVisible()){this.setVisible(!1);for(const o of this.listeners)Oe(o);this.listeners.length=0,this.reflowWrapper&&(this.workspace_.removeChangeListener(this.reflowWrapper),this.reflowWrapper=null)}}show(o){this.workspace_.setResizesEnabled(!1),this.hide(),this.clearOldBlocks(),typeof o=="string"&&(o=this.getDynamicCategoryContents(o)),this.setVisible(!0),o=cr(o),o=this.createFlyoutInfo(o),ki(this.workspace_),this.layout_(o.contents,o.gaps),this.horizontalLayout?this.height_=0:this.width_=0,this.workspace_.setResizesEnabled(!0),this.reflow(),this.filterForCapacity(),this.position(),this.reflowWrapper=this.reflow.bind(this),this.workspace_.addChangeListener(this.reflowWrapper),this.emptyRecycledBlocks()}createFlyoutInfo(o){const l=[],d=[];this.permanentlyDisabled.length=0;const m=this.horizontalLayout?this.GAP_X:this.GAP_Y;for(const $ of o){if("custom"in $){o=this.getDynamicCategoryContents($.custom),o=cr(o);const{contents:V,gaps:Ee}=this.createFlyoutInfo(o);l.push(...V),d.push(...Ee)}switch($.kind.toUpperCase()){case"BLOCK":o=$;const V=this.createFlyoutBlock(o);l.push({type:Xn.BLOCK,block:V}),this.addBlockGap(o,d,m);break;case"SEP":this.addSeparatorGap($,d,m);break;case"LABEL":o=this.createButton($,!0),l.push({type:Xn.BUTTON,button:o}),d.push(m);break;case"BUTTON":o=this.createButton($,!1),l.push({type:Xn.BUTTON,button:o}),d.push(m)}}return{contents:l,gaps:d}}getDynamicCategoryContents(o){if(o=this.workspace_.targetWorkspace.getToolboxCategoryCallback(o),typeof o!="function")throw TypeError("Couldn't find a callback function when opening a toolbox category.");return o(this.workspace_.targetWorkspace)}createButton(o,l){return new fn(this.workspace_,this.targetWorkspace,o,l)}createFlyoutBlock(o){let l;return o.blockxml?(o=typeof o.blockxml=="string"?n.textToDom$$module$build$src$core$utils$xml(o.blockxml):o.blockxml,(l=this.getRecycledBlock(o.getAttribute("type")))||(l=su(o,this.workspace_))):(l=this.getRecycledBlock(o.type),l||(o.enabled===void 0&&(o.enabled=o.disabled!=="true"&&o.disabled!==!0),l=Uh(o,this.workspace_))),l.isEnabled()||this.permanentlyDisabled.push(l),l}getRecycledBlock(o){let l=-1;for(let d=0;d<this.recycledBlocks.length;d++)if(this.recycledBlocks[d].type===o){l=d;break}return l===-1?void 0:this.recycledBlocks.splice(l,1)[0]}addBlockGap(o,l,d){let m;o.gap?m=parseInt(String(o.gap)):o.blockxml&&(o=typeof o.blockxml=="string"?n.textToDom$$module$build$src$core$utils$xml(o.blockxml):o.blockxml,m=parseInt(o.getAttribute("gap"))),l.push(!m||isNaN(m)?d:m)}addSeparatorGap(o,l,d){o=parseInt(String(o.gap)),!isNaN(o)&&0<l.length?l[l.length-1]=o:l.push(d)}clearOldBlocks(){var o=this.workspace_.getTopBlocks(!1);for(let d=0,m;m=o[d];d++)this.blockIsRecyclable_(m)?this.recycleBlock(m):m.dispose(!1,!1);for(o=0;o<this.mats.length;o++){const d=this.mats[o];d&&(m_(d),mt(d))}this.mats.length=0;for(let d=0,m;m=this.buttons_[d];d++)m.dispose();this.buttons_.length=0;let l;(l=this.workspace_.getPotentialVariableMap())==null||l.clear()}emptyRecycledBlocks(){for(let o=0;o<this.recycledBlocks.length;o++)this.recycledBlocks[o].dispose();this.recycledBlocks=[]}blockIsRecyclable_(o){return!1}recycleBlock(o){const l=o.getRelativeToSurfaceXY();o.moveBy(-l.x,-l.y),this.recycledBlocks.push(o)}addBlockListeners_(o,l,d){this.listeners.push(ee(o,"pointerdown",null,this.blockMouseDown(l))),this.listeners.push(ee(d,"pointerdown",null,this.blockMouseDown(l))),this.listeners.push(pe(o,"pointerenter",l,()=>{this.targetWorkspace.isDragging()||l.addSelect()})),this.listeners.push(pe(o,"pointerleave",l,()=>{this.targetWorkspace.isDragging()||l.removeSelect()})),this.listeners.push(pe(d,"pointerenter",l,()=>{this.targetWorkspace.isDragging()||l.addSelect()})),this.listeners.push(pe(d,"pointerleave",l,()=>{this.targetWorkspace.isDragging()||l.removeSelect()}))}blockMouseDown(o){return l=>{const d=this.targetWorkspace.getGesture(l);d&&(d.setStartBlock(o),d.handleFlyoutStart(l,this))}}onMouseDown(o){const l=this.targetWorkspace.getGesture(o);l&&l.handleFlyoutStart(o,this)}isBlockCreatable(o){return o.isEnabled()}createBlock(o){let l=null;n.disable$$module$build$src$core$events$utils();var d=this.targetWorkspace.getAllVariables();this.targetWorkspace.setResizesEnabled(!1);try{l=this.placeNewBlock(o)}finally{n.enable$$module$build$src$core$events$utils()}if(this.targetWorkspace.hideChaff(),o=Bh(this.targetWorkspace,d),he()){for(n.setGroup$$module$build$src$core$events$utils(!0),d=0;d<o.length;d++){const m=o[d];J(new(Ae(zi))(m))}J(new(Ae(n.CREATE$$module$build$src$core$events$utils))(l))}return this.autoClose?this.hide():this.filterForCapacity(),l}initFlyoutButton_(o,l,d){const m=o.createDom();o.moveTo(l,d),o.show(),this.listeners.push(ee(m,"pointerdown",this,this.onMouseDown)),this.buttons_.push(o)}createRect_(o,l,d,m,$){return l=Ne(st.RECT,{"fill-opacity":0,x:l,y:d,height:m.height,width:m.width}),l.tooltip=o,ef(l),this.workspace_.getCanvas().insertBefore(l,o.getSvgRoot()),this.rectMap_.set(o,l),this.mats[$]=l}moveRectToBlock_(o,l){const d=l.getHeightWidth();o.setAttribute("width",String(d.width)),o.setAttribute("height",String(d.height)),l=l.getRelativeToSurfaceXY(),o.setAttribute("y",String(l.y)),o.setAttribute("x",String(this.RTL?l.x-d.width:l.x))}filterForCapacity(){const o=this.workspace_.getTopBlocks(!1);for(let l=0,d;d=o[l];l++)if(this.permanentlyDisabled.indexOf(d)===-1){const m=this.targetWorkspace.isCapacityAvailable(D(d));for(;d;)d.setEnabled(m),d=d.getNextBlock()}}reflow(){this.reflowWrapper&&this.workspace_.removeChangeListener(this.reflowWrapper),this.reflowInternal_(),this.reflowWrapper&&this.workspace_.addChangeListener(this.reflowWrapper)}isScrollable(){return this.workspace_.scrollbar?this.workspace_.scrollbar.isVisible():!1}placeNewBlock(o){var l=this.targetWorkspace;if(!o.getSvgRoot())throw Error("oldBlock is not rendered");const d=Wl(o);return l.setResizesEnabled(!1),l=Hs(d,l),this.positionNewBlock(o,l),l}positionNewBlock(o,l){const d=this.targetWorkspace;var m=d.getOriginOffsetInPixels(),$=this.workspace_.getOriginOffsetInPixels();o=o.getRelativeToSurfaceXY(),o.scale(this.workspace_.scale),$=zt.sum($,o),m=zt.difference($,m),m.scale(1/d.scale),l.moveTo(new zt(m.x,m.y))}};kn.FlyoutItemType=Xn;var io=class extends kn{constructor(o){super(o),this.horizontalLayout=!0}setMetrics_(o){if(this.isVisible()){var l=this.workspace_.getMetricsManager(),d=l.getScrollMetrics(),m=l.getViewMetrics();l=l.getAbsoluteMetrics(),typeof o.x=="number"&&(this.workspace_.scrollX=-(d.left+(d.width-m.width)*o.x)),this.workspace_.translate(this.workspace_.scrollX+l.left,this.workspace_.scrollY+l.top)}}getX(){return 0}getY(){if(!this.isVisible())return 0;var o=this.targetWorkspace.getMetricsManager();const l=o.getAbsoluteMetrics(),d=o.getViewMetrics();o=o.getToolboxMetrics();const m=this.toolboxPosition_===Gn.TOP;return this.targetWorkspace.toolboxPosition===this.toolboxPosition_?this.targetWorkspace.getToolbox()?m?o.height:d.height-this.height_:m?0:d.height:m?0:d.height+l.top-this.height_}position(){if(this.isVisible()&&this.targetWorkspace.isVisible()){var o=this.targetWorkspace.getMetricsManager().getViewMetrics();this.width_=o.width,this.setBackgroundPath(o.width-2*this.CORNER_RADIUS,this.height_-this.CORNER_RADIUS),o=this.getX();var l=this.getY();this.positionAt_(this.width_,this.height_,o,l)}}setBackgroundPath(o,l){const d=this.toolboxPosition_===Gn.TOP,m=["M 0,"+(d?0:this.CORNER_RADIUS)];d?(m.push("h",o+2*this.CORNER_RADIUS),m.push("v",l),m.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,-this.CORNER_RADIUS,this.CORNER_RADIUS),m.push("h",-o),m.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,-this.CORNER_RADIUS,-this.CORNER_RADIUS)):(m.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,this.CORNER_RADIUS,-this.CORNER_RADIUS),m.push("h",o),m.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,this.CORNER_RADIUS,this.CORNER_RADIUS),m.push("v",l),m.push("h",-o-2*this.CORNER_RADIUS)),m.push("z"),this.svgBackground_.setAttribute("d",m.join(" "))}scrollToStart(){let o;(o=this.workspace_.scrollbar)==null||o.setX(this.RTL?1/0:0)}wheel_(o){var l=me(o);if(l=l.x||l.y){const d=this.workspace_.getMetricsManager(),m=d.getScrollMetrics();l=d.getViewMetrics().left-m.left+l;let $;($=this.workspace_.scrollbar)==null||$.setX(l),hl(),zl()}o.preventDefault(),o.stopPropagation()}layout_(o,l){this.workspace_.scale=this.targetWorkspace.scale;const d=this.MARGIN;let m=d+this.tabWidth_;this.RTL&&(o=o.reverse());for(let Ve=0,St;St=o[Ve];Ve++)if(St.type==="block"){var $=St.block,V=$.getDescendants(!1);for(let cs=0,ts;ts=V[cs];cs++)ts.isInFlyout=!0;V=$.getSvgRoot();const tn=$.getHeightWidth();var Ee=$.outputConnection?this.tabWidth_:0;Ee=this.RTL?m+tn.width:m-Ee,$.moveBy(Ee,d),Ee=this.createRect_($,Ee,d,tn,Ve),m+=tn.width+l[Ve],this.addBlockListeners_(V,$,Ee)}else St.type==="button"&&($=St.button,this.initFlyoutButton_($,m,d),m+=$.width+l[Ve])}isDragTowardWorkspace(o){o=Math.atan2(o.y,o.x)/Math.PI*180;const l=this.dragAngleRange_;return o<90+l&&o>90-l||o>-90-l&&o<-90+l}getClientRect(){if(!this.svgGroup_||this.autoClose||!this.isVisible())return null;const o=this.svgGroup_.getBoundingClientRect(),l=o.top;return this.toolboxPosition_===Gn.TOP?new Po(-1e9,l+o.height,-1e9,1e9):new Po(l,1e9,-1e9,1e9)}reflowInternal_(){this.workspace_.scale=this.getFlyoutScale();let o=0;const l=this.workspace_.getTopBlocks(!1);for(let m=0,$;$=l[m];m++)o=Math.max(o,$.getHeightWidth().height);const d=this.buttons_;for(let m=0,$;$=d[m];m++)o=Math.max(o,$.height);if(o+=1.5*this.MARGIN,o*=this.workspace_.scale,o+=Ms.scrollbarThickness,this.height_!==o){for(let m=0,$;$=l[m];m++)this.rectMap_.has($)&&this.moveRectToBlock_(this.rectMap_.get($),$);this.targetWorkspace.scrollbar||this.autoClose||this.targetWorkspace.getFlyout()!==this||this.toolboxPosition_!==Gn.TOP||this.targetWorkspace.translate(this.targetWorkspace.scrollX,this.targetWorkspace.scrollY+o),this.height_=o,this.position(),this.targetWorkspace.resizeContents(),this.targetWorkspace.recordDragTargets()}}};s(At.FLYOUTS_HORIZONTAL_TOOLBOX,Ca,io);var co=class extends kn{constructor(o){super(o)}setMetrics_(o){if(this.isVisible()){var l=this.workspace_.getMetricsManager(),d=l.getScrollMetrics(),m=l.getViewMetrics();l=l.getAbsoluteMetrics(),typeof o.y=="number"&&(this.workspace_.scrollY=-(d.top+(d.height-m.height)*o.y)),this.workspace_.translate(this.workspace_.scrollX+l.left,this.workspace_.scrollY+l.top)}}getX(){if(!this.isVisible())return 0;var o=this.targetWorkspace.getMetricsManager();const l=o.getAbsoluteMetrics(),d=o.getViewMetrics();return o=o.getToolboxMetrics(),this.targetWorkspace.toolboxPosition===this.toolboxPosition_?this.targetWorkspace.getToolbox()?this.toolboxPosition_===Gn.LEFT?o.width:d.width-this.width_:this.toolboxPosition_===Gn.LEFT?0:d.width:this.toolboxPosition_===Gn.LEFT?0:d.width+l.left-this.width_}getY(){return 0}position(){if(this.isVisible()&&this.targetWorkspace.isVisible()){var o=this.targetWorkspace.getMetricsManager().getViewMetrics();this.height_=o.height,this.setBackgroundPath(this.width_-this.CORNER_RADIUS,o.height-2*this.CORNER_RADIUS),o=this.getX();var l=this.getY();this.positionAt_(this.width_,this.height_,o,l)}}setBackgroundPath(o,l){const d=this.toolboxPosition_===Gn.RIGHT;var m=o+this.CORNER_RADIUS;m=["M "+(d?m:0)+",0"],m.push("h",d?-o:o),m.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,d?0:1,d?-this.CORNER_RADIUS:this.CORNER_RADIUS,this.CORNER_RADIUS),m.push("v",Math.max(0,l)),m.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,d?0:1,d?this.CORNER_RADIUS:-this.CORNER_RADIUS,this.CORNER_RADIUS),m.push("h",d?o:-o),m.push("z"),this.svgBackground_.setAttribute("d",m.join(" "))}scrollToStart(){let o;(o=this.workspace_.scrollbar)==null||o.setY(0)}wheel_(o){var l=me(o);if(l.y){const d=this.workspace_.getMetricsManager(),m=d.getScrollMetrics();l=d.getViewMetrics().top-m.top+l.y;let $;($=this.workspace_.scrollbar)==null||$.setY(l),hl(),zl()}o.preventDefault(),o.stopPropagation()}layout_(o,l){this.workspace_.scale=this.targetWorkspace.scale;var d=this.MARGIN;const m=this.RTL?d:d+this.tabWidth_;for(let Ve=0,St;St=o[Ve];Ve++)if(St.type==="block"){var $=St.block,V=$.getDescendants(!1);for(let cs=0,ts;ts=V[cs];cs++)ts.isInFlyout=!0;V=$.getSvgRoot();const tn=$.getHeightWidth();var Ee=$.outputConnection?m-this.tabWidth_:m;$.moveBy(Ee,d),Ee=this.createRect_($,this.RTL?Ee-tn.width:Ee,d,tn,Ve),this.addBlockListeners_(V,$,Ee),d+=tn.height+l[Ve]}else St.type==="button"&&($=St.button,this.initFlyoutButton_($,m,d),d+=$.height+l[Ve])}isDragTowardWorkspace(o){o=Math.atan2(o.y,o.x)/Math.PI*180;const l=this.dragAngleRange_;return o<l&&o>-l||o<-180+l||o>180-l}getClientRect(){if(!this.svgGroup_||this.autoClose||!this.isVisible())return null;const o=this.svgGroup_.getBoundingClientRect(),l=o.left;return this.toolboxPosition_===Gn.LEFT?new Po(-1e9,1e9,-1e9,l+o.width):new Po(-1e9,1e9,l,1e9)}reflowInternal_(){this.workspace_.scale=this.getFlyoutScale();let o=0;var l=this.workspace_.getTopBlocks(!1);for(let m=0,$;$=l[m];m++){var d=$.getHeightWidth().width;$.outputConnection&&(d-=this.tabWidth_),o=Math.max(o,d)}for(let m=0,$;$=this.buttons_[m];m++)o=Math.max(o,$.width);if(o+=1.5*this.MARGIN+this.tabWidth_,o*=this.workspace_.scale,o+=Ms.scrollbarThickness,this.width_!==o){for(let m=0,$;$=l[m];m++){if(this.RTL){d=$.getRelativeToSurfaceXY().x;let V=o/this.workspace_.scale-this.MARGIN;$.outputConnection||(V-=this.tabWidth_),$.moveBy(V-d,0)}this.rectMap_.has($)&&this.moveRectToBlock_(this.rectMap_.get($),$)}if(this.RTL)for(let m=0,$;$=this.buttons_[m];m++)l=$.getPosition().y,$.moveTo(o/this.workspace_.scale-$.width-this.MARGIN-this.tabWidth_,l);this.targetWorkspace.scrollbar||this.autoClose||this.targetWorkspace.getFlyout()!==this||this.toolboxPosition_!==Gn.LEFT||this.targetWorkspace.translate(this.targetWorkspace.scrollX+o,this.targetWorkspace.scrollY),this.width_=o,this.position(),this.targetWorkspace.resizeContents(),this.targetWorkspace.recordDragTargets()}}};co.registryName="verticalFlyout",s(At.FLYOUTS_VERTICAL_TOOLBOX,Ca,co);var $r;n.CodeGenerator$$module$build$src$core$generator=class{constructor(o){this.forBlock=Object.create(null),this.FUNCTION_NAME_PLACEHOLDER_="{leCUI8hutHZI4480Dc}",this.STATEMENT_SUFFIX=this.STATEMENT_PREFIX=this.INFINITE_LOOP_TRAP=null,this.INDENT=" ",this.COMMENT_WRAP=60,this.ORDER_OVERRIDES=[],this.isInitialized=null,this.RESERVED_WORDS_="",this.definitions_=Object.create(null),this.functionNames_=Object.create(null),this.nameDB_=void 0,this.name_=o,this.FUNCTION_NAME_PLACEHOLDER_REGEXP_=new RegExp(this.FUNCTION_NAME_PLACEHOLDER_,"g")}workspaceToCode(o){o||(console.warn("No workspace specified in workspaceToCode call. Guessing."),o=y());var l=[];this.init(o),o=o.getTopBlocks(!0);for(let d=0,m;m=o[d];d++){let $=this.blockToCode(m);Array.isArray($)&&($=$[0]),$&&(m.outputConnection&&($=this.scrubNakedValue($),this.STATEMENT_PREFIX&&!m.suppressPrefixSuffix&&($=this.injectId(this.STATEMENT_PREFIX,m)+$),this.STATEMENT_SUFFIX&&!m.suppressPrefixSuffix&&($+=this.injectId(this.STATEMENT_SUFFIX,m))),l.push($))}return l=l.join(`
  568. `),l=this.finish(l),l=l.replace(/^\s+\n/,""),l=l.replace(/\n\s+$/,`
  569. `),l=l.replace(/[ \t]+\n/g,`
  570. `)}prefixLines(o,l){return l+o.replace(/(?!\n$)\n/g,`
  571. `+l)}allNestedComments(o){const l=[];o=o.getDescendants(!0);for(let d=0;d<o.length;d++){const m=o[d].getCommentText();m&&l.push(m)}return l.length&&l.push(""),l.join(`
  572. `)}blockToCode(o,l){if(this.isInitialized===!1&&console.warn("CodeGenerator init was not called before blockToCode was called."),!o)return"";if(!o.isEnabled())return l?"":this.blockToCode(o.getNextBlock());if(o.isInsertionMarker())return l?"":this.blockToCode(o.getChildren(!1)[0]);var d=this.forBlock[o.type];if(!d&&this[o.type]&&(ct("block generator functions on CodeGenerator objects","10.0","11.0","the .forBlock[blockType] dictionary"),d=this[o.type]),typeof d!="function")throw Error(`${this.name_} generator does not know how to generate code for block type "${o.type}".`);if(d=d.call(o,o,this),Array.isArray(d)){if(!o.outputConnection)throw TypeError("Expecting string from statement block: "+o.type);return[this.scrub_(o,d[0],l),d[1]]}if(typeof d=="string")return this.STATEMENT_PREFIX&&!o.suppressPrefixSuffix&&(d=this.injectId(this.STATEMENT_PREFIX,o)+d),this.STATEMENT_SUFFIX&&!o.suppressPrefixSuffix&&(d+=this.injectId(this.STATEMENT_SUFFIX,o)),this.scrub_(o,d,l);if(d===null)return"";throw SyntaxError("Invalid code generated: "+d)}valueToCode(o,l,d){if(isNaN(d))throw TypeError("Expecting valid order from block: "+o.type);var m=o.getInputTargetBlock(l);if(!m||(l=this.blockToCode(m),l===""))return"";if(!Array.isArray(l))throw TypeError(`Expecting tuple from value block: ${m.type} See developers.google.com/blockly/guides/create-custom-blocks/generating-code for more information`);if(o=l[0],l=l[1],isNaN(l))throw TypeError("Expecting valid order from value block: "+m.type);if(!o)return"";m=!1;var $=Math.floor(d);const V=Math.floor(l);if($<=V&&($!==V||$!==0&&$!==99)){for(m=!0,$=0;$<this.ORDER_OVERRIDES.length;$++)if(this.ORDER_OVERRIDES[$][0]===d&&this.ORDER_OVERRIDES[$][1]===l){m=!1;break}}return m&&(o="("+o+")"),o}statementToCode(o,l){if(o=o.getInputTargetBlock(l),l=this.blockToCode(o),typeof l!="string")throw TypeError("Expecting code from statement block: "+(o&&o.type));return l&&(l=this.prefixLines(l,this.INDENT)),l}addLoopTrap(o,l){return this.INFINITE_LOOP_TRAP&&(o=this.prefixLines(this.injectId(this.INFINITE_LOOP_TRAP,l),this.INDENT)+o),this.STATEMENT_SUFFIX&&!l.suppressPrefixSuffix&&(o=this.prefixLines(this.injectId(this.STATEMENT_SUFFIX,l),this.INDENT)+o),this.STATEMENT_PREFIX&&!l.suppressPrefixSuffix&&(o+=this.prefixLines(this.injectId(this.STATEMENT_PREFIX,l),this.INDENT)),o}injectId(o,l){return l=l.id.replace(/\$/g,"$$$$"),o.replace(/%1/g,"'"+l+"'")}addReservedWords(o){this.RESERVED_WORDS_+=o+","}provideFunction_(o,l){if(!this.definitions_[o]){const d=this.nameDB_.getDistinctName(o,n.NameType$$module$build$src$core$names.PROCEDURE);this.functionNames_[o]=d,Array.isArray(l)&&(l=l.join(`
  573. `)),l=l.trim().replace(this.FUNCTION_NAME_PLACEHOLDER_REGEXP_,d);let m;for(;m!==l;)m=l,l=l.replace(/^(( {2})*) {2}/gm,"$1\0");l=l.replace(/\0/g,this.INDENT),this.definitions_[o]=l}return this.functionNames_[o]}getVariableName(o){return this.getName(o,n.NameType$$module$build$src$core$names.VARIABLE)}getProcedureName(o){return this.getName(o,n.NameType$$module$build$src$core$names.PROCEDURE)}getName(o,l){if(!this.nameDB_)throw Error("Name database is not defined. You must initialize `nameDB_` in your generator class and call `init` first.");return this.nameDB_.getName(o,l)}init(o){this.definitions_=Object.create(null),this.functionNames_=Object.create(null)}scrub_(o,l,d){return l}finish(o){return this.definitions_=Object.create(null),this.functionNames_=Object.create(null),o}scrubNakedValue(o){return o}},$r={},$r.CodeGenerator=n.CodeGenerator$$module$build$src$core$generator;var Bi=!1,zs={};zs.Align=n.Align$$module$build$src$core$inputs$align,zs.DummyInput=Ua,zs.EndRowInput=Ac,zs.Input=Ls,zs.StatementInput=Sr,zs.ValueInput=n.ValueInput$$module$build$src$core$inputs$value_input,zs.inputTypes=n.inputTypes$$module$build$src$core$inputs$input_types;var ws="The insertion marker previewer tried to create a marker but the result is missing %1. If you are using a mutator, make sure your domToMutation method is properly defined.",Il=class{constructor(o){this.staticConn=this.draggedConn=this.markerConn=this.fadedBlock=null,this.workspace=o.workspace}previewReplacement(o,l,d){n.disable$$module$build$src$core$events$utils();try{this.hidePreview(),this.fadedBlock=d,d.fadeForReplacement(!0),this.workspace.getRenderer().shouldHighlightConnection(l)&&(l.highlight(),this.staticConn=l)}finally{n.enable$$module$build$src$core$events$utils()}}previewConnection(o,l){if(o!==this.draggedConn||l!==this.staticConn){n.disable$$module$build$src$core$events$utils();try{this.hidePreview(),this.shouldUseMarkerPreview(o,l)&&(this.markerConn=this.previewMarker(o,l)),this.workspace.getRenderer().shouldHighlightConnection(l)&&l.highlight(),this.draggedConn=o,this.staticConn=l}finally{n.enable$$module$build$src$core$events$utils()}}}shouldUseMarkerPreview(o,l){return l.type===sn.PREVIOUS_STATEMENT||l.type===sn.NEXT_STATEMENT||!(this.workspace.getRenderer()instanceof N)}previewMarker(o,l){const d=o.getSourceBlock(),m=this.createInsertionMarker(d),$=this.getMatchingConnection(d,m,o);if(!$)throw Error("Could not create insertion marker to preview connection");m.queueRender(),ki(),$.connect(l);const V={x:l.x-$.x,y:l.y-$.y},Ee=$.getOffsetInBlock().clone();return pc().then(()=>{m==null||m.positionNearConnection($,V,Ee),m==null||m.getSvgRoot().setAttribute("visibility","visible")}),$}createInsertionMarker(o){const l=this.workspace.newBlock(o.type);if(l.setInsertionMarker(!0),o.saveExtraState){var d=o.saveExtraState(!0);d&&l.loadExtraState&&l.loadExtraState(d)}else o.mutationToDom&&(d=o.mutationToDom())&&l.domToMutation&&l.domToMutation(d);for(d=0;d<o.inputList.length;d++){const m=o.inputList[d];if(m.name===Xd)continue;const $=l.inputList[d];if(!$)throw Error(ws.replace("%1","an input"));for(let V=0;V<m.fieldRow.length;V++){const Ee=m.fieldRow[V],Ve=$.fieldRow[V];if(!Ve)throw Error(ws.replace("%1","a field"));Ve.setValue(Ee.getValue())}}for(const m of l.getDescendants(!1))m.setInsertionMarker(!0);return l.setCollapsed(o.isCollapsed()),l.setInputsInline(o.getInputsInline()),l.initSvg(),l.getSvgRoot().setAttribute("visibility","hidden"),l}getMatchingConnection(o,l,d){if(o=o.getConnections_(!0),l=l.getConnections_(!0),o.length!==l.length)return null;for(let m=0;m<o.length;m++)if(o[m]===d)return l[m];return null}hidePreview(){n.disable$$module$build$src$core$events$utils();try{this.staticConn&&(this.staticConn.unhighlight(),this.staticConn=null),this.fadedBlock&&(this.fadedBlock.fadeForReplacement(!1),this.fadedBlock=null),this.markerConn&&(this.hideInsertionMarker(this.markerConn),this.draggedConn=this.markerConn=null)}finally{n.enable$$module$build$src$core$events$utils()}}hideInsertionMarker(o){const l=o.getSourceBlock(),d=l.outputConnection;let m;if((m=l.previousConnection)!=null&&m.targetConnection||d!=null&&d.targetConnection)l.unplug(!0);else{let $;($=o.targetBlock())==null||$.unplug(!1)}l.dispose()}dispose(){this.hidePreview()}};s(At.CONNECTION_PREVIEWER,Ca,Il);var Wa=class extends Fg{constructor(){super(),this.FIELD_TEXT_BASELINE_CENTER=!1,this.DARK_PATH_OFFSET=1,this.MAX_BOTTOM_WIDTH=30,this.STATEMENT_BOTTOM_SPACER=-this.NOTCH_HEIGHT/2}getCSS_(o){return super.getCSS_(o).concat([`${o} .blocklyInsertionMarker>.blocklyPathLight,`,`${o} .blocklyInsertionMarker>.blocklyPathDark {`,`fill-opacity: ${this.INSERTION_MARKER_OPACITY};`,"stroke: none;","}"])}},sS=class{constructor(o){this.inlineSteps_=this.steps_="",this.info_=o,this.RTL_=this.info_.RTL,o=o.getRenderer(),this.constants_=o.getConstants(),this.highlightConstants_=o.getHighlightConstants(),this.highlightOffset=this.highlightConstants_.OFFSET,this.outsideCornerPaths_=this.highlightConstants_.OUTSIDE_CORNER,this.insideCornerPaths_=this.highlightConstants_.INSIDE_CORNER,this.puzzleTabPaths_=this.highlightConstants_.PUZZLE_TAB,this.notchPaths_=this.highlightConstants_.NOTCH,this.startPaths_=this.highlightConstants_.START_HAT,this.jaggedTeethPaths_=this.highlightConstants_.JAGGED_TEETH}getPath(){return this.steps_+`
  574. `+this.inlineSteps_}drawTopCorner(o){this.steps_+=Zo(o.xPos,this.info_.startY);for(let l=0,d;d=o.elements[l];l++)nt.isLeftSquareCorner(d)?this.steps_+=this.highlightConstants_.START_POINT:nt.isLeftRoundedCorner(d)?this.steps_+=this.outsideCornerPaths_.topLeft(this.RTL_):nt.isPreviousConnection(d)?this.steps_+=this.notchPaths_.pathLeft:nt.isHat(d)?this.steps_+=this.startPaths_.path(this.RTL_):nt.isSpacer(d)&&d.width!==0&&(this.steps_+=ln("H",d.xPos+d.width-this.highlightOffset));this.steps_+=ln("H",o.xPos+o.width-this.highlightOffset)}drawJaggedEdge_(o){this.info_.RTL&&(this.steps_+=this.jaggedTeethPaths_.pathLeft+ln("v",o.height-this.jaggedTeethPaths_.height-this.highlightOffset))}drawValueInput(o){const l=o.getLastInput();if(this.RTL_){const d=o.height-l.connectionHeight;this.steps_+=Qs(l.xPos+l.width-this.highlightOffset,o.yPos)+this.puzzleTabPaths_.pathDown(this.RTL_)+ln("v",d)}else this.steps_+=Qs(l.xPos+l.width,o.yPos)+this.puzzleTabPaths_.pathDown(this.RTL_)}drawStatementInput(o){const l=o.getLastInput();if(l)if(this.RTL_){const d=o.height-2*this.insideCornerPaths_.height;this.steps_+=Qs(l.xPos,o.yPos)+this.insideCornerPaths_.pathTop(this.RTL_)+ln("v",d)+this.insideCornerPaths_.pathBottom(this.RTL_)+$a(o.width-l.xPos-this.insideCornerPaths_.width,0)}else this.steps_+=Qs(l.xPos,o.yPos+o.height)+this.insideCornerPaths_.pathBottom(this.RTL_)+$a(o.width-l.xPos-this.insideCornerPaths_.width,0)}drawRightSideRow(o){const l=o.xPos+o.width-this.highlightOffset;o instanceof LO&&o.followsStatement&&(this.steps_+=ln("H",l)),this.RTL_&&(this.steps_+=ln("H",l),o.height>this.highlightOffset&&(this.steps_+=ln("V",o.yPos+o.height-this.highlightOffset)))}drawBottomRow(o){if(this.RTL_)this.steps_+=ln("V",o.baseline-this.highlightOffset);else{const l=this.info_.bottomRow.elements[0];nt.isLeftSquareCorner(l)?this.steps_+=Qs(o.xPos+this.highlightOffset,o.baseline-this.highlightOffset):nt.isLeftRoundedCorner(l)&&(this.steps_+=Qs(o.xPos,o.baseline),this.steps_+=this.outsideCornerPaths_.bottomLeft())}}drawLeft(){var o=this.info_.outputConnection;o&&(o=o.connectionOffsetY+o.height,this.RTL_?this.steps_+=Qs(this.info_.startX,o):(this.steps_+=Qs(this.info_.startX+this.highlightOffset,this.info_.bottomRow.baseline-this.highlightOffset),this.steps_+=ln("V",o)),this.steps_+=this.puzzleTabPaths_.pathUp(this.RTL_)),this.RTL_||(o=this.info_.topRow,nt.isLeftRoundedCorner(o.elements[0])?this.steps_+=ln("V",this.outsideCornerPaths_.height):this.steps_+=ln("V",o.capline+this.highlightOffset))}drawInlineInput(o){const l=this.highlightOffset,d=o.xPos+o.connectionWidth;var m=o.centerline-o.height/2;const $=o.width-o.connectionWidth,V=m+l;this.RTL_?(m=o.connectionOffsetY-l,o=o.height-(o.connectionOffsetY+o.connectionHeight)+l,this.inlineSteps_+=Qs(d-l,V)+ln("v",m)+this.puzzleTabPaths_.pathDown(this.RTL_)+ln("v",o)+ln("h",$)):this.inlineSteps_+=Qs(o.xPos+o.width+l,V)+ln("v",o.height)+ln("h",-$)+Qs(d,m+o.connectionOffsetY)+this.puzzleTabPaths_.pathDown(this.RTL_)}},nB=class extends Ug{constructor(o,l){super(o,l),this.highlighter_=new sS(l)}draw(){this.drawOutline_(),this.drawInternals_(),this.updateConnectionHighlights();const o=this.block_.pathObject;o.setPath(this.outlinePath_+`
  575. `+this.inlinePath_),o.setHighlightPath(this.highlighter_.getPath()),this.info_.RTL&&o.flipRTL(),this.recordSizeOnBlock_()}drawTop_(){this.highlighter_.drawTopCorner(this.info_.topRow),this.highlighter_.drawRightSideRow(this.info_.topRow),super.drawTop_()}drawJaggedEdge_(o){this.highlighter_.drawJaggedEdge_(o),super.drawJaggedEdge_(o)}drawValueInput_(o){this.highlighter_.drawValueInput(o),super.drawValueInput_(o)}drawStatementInput_(o){this.highlighter_.drawStatementInput(o),super.drawStatementInput_(o)}drawRightSideRow_(o){this.highlighter_.drawRightSideRow(o),this.outlinePath_+=ln("H",o.xPos+o.width)+ln("V",o.yPos+o.height)}drawBottom_(){this.highlighter_.drawBottomRow(this.info_.bottomRow),super.drawBottom_()}drawLeft_(){this.highlighter_.drawLeft(),super.drawLeft_()}drawInlineInput_(o){this.highlighter_.drawInlineInput(o),super.drawInlineInput_(o)}positionInlineInputConnection_(o){const l=o.centerline-o.height/2;if(o.connectionModel){let d=o.xPos+o.connectionWidth+this.constants_.DARK_PATH_OFFSET;this.info_.RTL&&(d*=-1),o.connectionModel.setOffsetInBlock(d,l+o.connectionOffsetY+this.constants_.DARK_PATH_OFFSET)}}positionStatementInputConnection_(o){const l=o.getLastInput();if(l!=null&&l.connectionModel){let d=o.xPos+o.statementEdge+l.notchOffset;d=this.info_.RTL?-1*d:d+this.constants_.DARK_PATH_OFFSET,l.connectionModel.setOffsetInBlock(d,o.yPos+this.constants_.DARK_PATH_OFFSET)}}positionExternalValueConnection_(o){const l=o.getLastInput();if(l&&l.connectionModel){let d=o.xPos+o.width+this.constants_.DARK_PATH_OFFSET;this.info_.RTL&&(d*=-1),l.connectionModel.setOffsetInBlock(d,o.yPos)}}positionNextConnection_(){const o=this.info_.bottomRow;if(o.connection){const l=o.connection,d=l.xPos;l.connectionModel.setOffsetInBlock((this.info_.RTL?-d:d)+this.constants_.DARK_PATH_OFFSET/2,o.baseline+this.constants_.DARK_PATH_OFFSET)}}},oB=class{constructor(o){this.OFFSET=.5,this.constantProvider=o,this.START_POINT=Zo(this.OFFSET,this.OFFSET)}init(){this.INSIDE_CORNER=this.makeInsideCorner(),this.OUTSIDE_CORNER=this.makeOutsideCorner(),this.PUZZLE_TAB=this.makePuzzleTab(),this.NOTCH=this.makeNotch(),this.JAGGED_TEETH=this.makeJaggedTeeth(),this.START_HAT=this.makeStartHat()}makeInsideCorner(){const o=this.constantProvider.CORNER_RADIUS,l=this.OFFSET,d=(1-Math.SQRT1_2)*(o+l)-l,m=Zo(d,d)+Cs("a","0 0,0",o,Sn(-d-l,o-d)),$=Cs("a","0 0,0",o+l,Sn(o+l,o+l)),V=Zo(d,-d)+Cs("a","0 0,0",o+l,Sn(o-d,d+l));return{width:o+l,height:o,pathTop(Ee){return Ee?m:""},pathBottom(Ee){return Ee?$:V}}}makeOutsideCorner(){const o=this.constantProvider.CORNER_RADIUS,l=this.OFFSET,d=(1-Math.SQRT1_2)*(o-l)+l,m=Zo(d,d)+Cs("a","0 0,1",o-l,Sn(o-d,-d+l)),$=Zo(l,o)+Cs("a","0 0,1",o-l,Sn(o,-o+l)),V=-d,Ee=Zo(d,V)+Cs("a","0 0,1",o-l,Sn(-d+l,-V-o));return{height:o,topLeft(Ve){return Ve?m:$},bottomLeft(){return Ee}}}makePuzzleTab(){const o=this.constantProvider.TAB_WIDTH,l=this.constantProvider.TAB_HEIGHT,d=Zo(-2,-l+3.4)+$a(-.45*o,-2.1),m=ln("v",2.5)+Zo(.97*-o,2.5)+fr("q",[Sn(.05*-o,10),Sn(.3*o,9.5)])+Zo(.67*o,-1.9)+ln("v",2.5),$=ln("v",-1.5)+Zo(-.92*o,-.5)+fr("q",[Sn(-.19*o,-5.5),Sn(0,-11)])+Zo(.92*o,1),V=Zo(-5,l-.7)+$a(.46*o,-2.1);return{width:o,height:l,pathUp(Ee){return Ee?d:$},pathDown(Ee){return Ee?m:V}}}makeNotch(){return{pathLeft:ln("h",this.OFFSET)+this.constantProvider.NOTCH.pathLeft}}makeJaggedTeeth(){return{pathLeft:$a(5.1,2.6)+Zo(-10.2,6.8)+$a(5.1,2.6),height:12,width:10.2}}makeStartHat(){const o=this.constantProvider.START_HAT.height,l=Zo(25,-8.7)+fr("c",[Sn(29.7,-6.2),Sn(57.2,-.5),Sn(75,8.7)]),d=fr("c",[Sn(17.8,-9.2),Sn(45.3,-14.9),Sn(75,-8.7)])+Qs(100.5,o+.5);return{path(m){return m?l:d}}}},sB=class extends MO{constructor(o,l){super(o,l),this.constants_=o,this.connectedBlock&&(this.width+=this.constants_.DARK_PATH_OFFSET,this.height+=this.constants_.DARK_PATH_OFFSET)}},iB=class extends Bg{constructor(o,l){super(o,l),this.constants_=o,this.connectedBlock&&(this.height+=this.constants_.DARK_PATH_OFFSET)}},rB=class extends Lf{constructor(o,l){super(o,l),this.renderer_=o}getRenderer(){return this.renderer_}populateBottomRow_(){super.populateBottomRow_(),this.block_.inputList.length&&this.block_.inputList[this.block_.inputList.length-1]instanceof Sr||(this.bottomRow.minHeight=this.constants_.MEDIUM_PADDING-this.constants_.DARK_PATH_OFFSET)}addInput_(o,l){this.isInline&&o instanceof n.ValueInput$$module$build$src$core$inputs$value_input?(l.elements.push(new sB(this.constants_,o)),l.hasInlineInput=!0):o instanceof Sr?(l.elements.push(new iB(this.constants_,o)),l.hasStatement=!0):o instanceof n.ValueInput$$module$build$src$core$inputs$value_input?(l.elements.push(new vT(this.constants_,o)),l.hasExternalInput=!0):(o instanceof Ua||o instanceof Ac)&&(l.minHeight=Math.max(l.minHeight,this.constants_.DUMMY_INPUT_MIN_HEIGHT),l.hasDummyInput=!0),this.isInline||l.align!==null||(l.align=o.align)}addElemSpacing_(){let o=!1;for(let d=0,m;m=this.rows[d];d++)m.hasExternalInput&&(o=!0);for(let d=0,m;m=this.rows[d];d++){var l=m.elements;if(m.elements=[],m.startsWithElemSpacer()&&m.elements.push(new Kr(this.constants_,this.getInRowSpacing_(null,l[0]))),l.length){for(let $=0;$<l.length-1;$++){m.elements.push(l[$]);const V=this.getInRowSpacing_(l[$],l[$+1]);m.elements.push(new Kr(this.constants_,V))}m.elements.push(l[l.length-1]),m.endsWithElemSpacer()&&(l=this.getInRowSpacing_(l[l.length-1],null),o&&m.hasDummyInput&&(l+=this.constants_.TAB_WIDTH),m.elements.push(new Kr(this.constants_,l)))}}}getInRowSpacing_(o,l){if(!o)return l&&nt.isField(l)&&l.isEditable?this.constants_.MEDIUM_PADDING:l&&nt.isInlineInput(l)?this.constants_.MEDIUM_LARGE_PADDING:l&&nt.isStatementInput(l)?this.constants_.STATEMENT_INPUT_PADDING_LEFT:this.constants_.LARGE_PADDING;if(!nt.isInput(o)&&(!l||nt.isStatementInput(l)))return nt.isField(o)&&o.isEditable?this.constants_.MEDIUM_PADDING:nt.isIcon(o)?2*this.constants_.LARGE_PADDING+1:nt.isHat(o)?this.constants_.NO_PADDING:nt.isPreviousOrNextConnection(o)?this.constants_.LARGE_PADDING:nt.isLeftRoundedCorner(o)?this.constants_.MIN_BLOCK_WIDTH:nt.isJaggedEdge(o)?this.constants_.NO_PADDING:this.constants_.LARGE_PADDING;if(nt.isInput(o)&&!l){if(nt.isExternalInput(o))return this.constants_.NO_PADDING;if(nt.isInlineInput(o))return this.constants_.LARGE_PADDING;if(nt.isStatementInput(o))return this.constants_.NO_PADDING}if(!nt.isInput(o)&&l&&nt.isInput(l)){if(nt.isField(o)&&o.isEditable){if(nt.isInlineInput(l)||nt.isExternalInput(l))return this.constants_.SMALL_PADDING}else{if(nt.isInlineInput(l)||nt.isExternalInput(l))return this.constants_.MEDIUM_LARGE_PADDING;if(nt.isStatementInput(l))return this.constants_.LARGE_PADDING}return this.constants_.LARGE_PADDING-1}if(nt.isIcon(o)&&l&&!nt.isInput(l))return this.constants_.LARGE_PADDING;if(nt.isInlineInput(o)&&l&&nt.isField(l))return l.isEditable?this.constants_.MEDIUM_PADDING:this.constants_.LARGE_PADDING;if(nt.isLeftSquareCorner(o)&&l){if(nt.isHat(l))return this.constants_.NO_PADDING;if(nt.isPreviousConnection(l))return l.notchOffset;if(nt.isNextConnection(l))return l.notchOffset+(this.RTL?1:-1)*this.constants_.DARK_PATH_OFFSET/2}if(nt.isLeftRoundedCorner(o)&&l){if(nt.isPreviousConnection(l))return l.notchOffset-this.constants_.CORNER_RADIUS;if(nt.isNextConnection(l))return l.notchOffset-this.constants_.CORNER_RADIUS+(this.RTL?1:-1)*this.constants_.DARK_PATH_OFFSET/2}return nt.isField(o)&&l&&nt.isField(l)&&o.isEditable===l.isEditable||l&&nt.isJaggedEdge(l)?this.constants_.LARGE_PADDING:this.constants_.MEDIUM_PADDING}getSpacerRowHeight_(o,l){return nt.isTopRow(o)&&nt.isBottomRow(l)?this.constants_.EMPTY_BLOCK_SPACER_HEIGHT:nt.isTopRow(o)||nt.isBottomRow(l)?this.constants_.NO_PADDING:o.hasExternalInput&&l.hasExternalInput?this.constants_.LARGE_PADDING:!o.hasStatement&&l.hasStatement?this.constants_.BETWEEN_STATEMENT_PADDING_Y:o.hasStatement&&l.hasStatement||!o.hasStatement&&l.hasDummyInput||o.hasDummyInput?this.constants_.LARGE_PADDING:this.constants_.MEDIUM_PADDING}getElemCenterline_(o,l){if(nt.isSpacer(l))return o.yPos+l.height/2;if(nt.isBottomRow(o))return o=o.yPos+o.height-o.descenderHeight,nt.isNextConnection(l)?o+l.height/2:o-l.height/2;if(nt.isTopRow(o))return nt.isHat(l)?o.capline-l.height/2:o.capline+l.height/2;let d=o.yPos;return nt.isField(l)||nt.isIcon(l)?(d+=l.height/2,(o.hasInlineInput||o.hasStatement)&&l.height+this.constants_.TALL_INPUT_FIELD_OFFSET_Y<=o.height&&(d+=this.constants_.TALL_INPUT_FIELD_OFFSET_Y)):d=nt.isInlineInput(l)?d+l.height/2:d+o.height/2,d}alignRowElements_(){if(this.isInline){var o=0,l=new WeakMap,d=null;for(let m=this.rows.length-1,$;$=this.rows[m];m--)l.set($,o),nt.isInputRow($)&&($.hasStatement&&this.alignStatementRow_($),d&&d.hasStatement&&$.width<d.width?l.set($,d.width):o=$.hasStatement?$.width:Math.max(o,$.width),d=$);o=0;for(let m=0,$;$=this.rows[m];m++)$.hasStatement?o=this.getDesiredRowWidth_($):nt.isSpacer($)?$.width=Math.max(o,l.get($)):(d=$.width,o=Math.max(o,l.get($))-d,0<o&&this.addAlignmentPadding_($,o),o=$.width)}else super.alignRowElements_()}getDesiredRowWidth_(o){return this.isInline&&o.hasStatement?this.statementEdge+this.constants_.MAX_BOTTOM_WIDTH+this.startX:super.getDesiredRowWidth_(o)}finalize_(){let o=0,l=0;for(let m=0,$;$=this.rows[m];m++){$.yPos=l,$.xPos=this.startX,l+=$.height,o=Math.max(o,$.widthWithConnectedBlocks);var d=l-this.topRow.ascenderHeight;$===this.bottomRow&&d<this.constants_.MIN_BLOCK_HEIGHT&&(d=this.constants_.MIN_BLOCK_HEIGHT-d,this.bottomRow.height+=d,l+=d),this.recordElemPositions_($)}this.outputConnection&&this.block_.nextConnection&&this.block_.nextConnection.isConnected()&&(d=this.block_.nextConnection.targetBlock())&&(o=Math.max(o,d.getHeightWidth().width-this.constants_.DARK_PATH_OFFSET)),this.bottomRow.baseline=l-this.bottomRow.descenderHeight,this.widthWithChildren=o+this.startX+this.constants_.DARK_PATH_OFFSET,this.width+=this.constants_.DARK_PATH_OFFSET,this.height=l+this.constants_.DARK_PATH_OFFSET,this.startY=this.topRow.capline}},lB=class extends Hg{constructor(o,l,d){super(o,l,d),this.constants=d,this.colourDark="#000000",this.svgPathDark=Ne(st.PATH,{class:"blocklyPathDark",transform:"translate(1,1)"}),this.svgRoot.insertBefore(this.svgPathDark,this.svgPath),this.svgPathLight=Ne(st.PATH,{class:"blocklyPathLight"},this.svgRoot)}setPath(o){this.svgPath.setAttribute("d",o),this.svgPathDark.setAttribute("d",o)}setHighlightPath(o){this.svgPathLight.setAttribute("d",o)}flipRTL(){this.svgPath.setAttribute("transform","scale(-1 1)"),this.svgPathLight.setAttribute("transform","scale(-1 1)"),this.svgPathDark.setAttribute("transform","translate(1,1) scale(-1 1)")}applyColour(o){if(this.svgPathLight.style.display="",this.svgPathDark.style.display="",!this.style.colourTertiary)throw Error("The renderer did not properly initialize the tertiary colour of the block style");this.svgPathLight.setAttribute("stroke",this.style.colourTertiary),this.svgPathDark.setAttribute("fill",this.colourDark),super.applyColour(o),this.svgPath.setAttribute("stroke","none")}setStyle(o){this.style=o,this.colourDark=Ed("#000",this.style.colourPrimary,.2)||this.colourDark}updateHighlighted(o){o?(this.svgPath.setAttribute("filter","url(#"+this.constants.embossFilterId+")"),this.svgPathLight.style.display="none"):(this.svgPath.setAttribute("filter","none"),this.svgPathLight.style.display="inline")}updateShadow_(o){if(o){if(this.svgPathLight.style.display="none",!this.style.colourSecondary)throw Error("The renderer did not properly initialize the secondary colour of the block style block style");this.svgPathDark.setAttribute("fill",this.style.colourSecondary),this.svgPath.setAttribute("stroke","none"),this.svgPath.setAttribute("fill",this.style.colourSecondary)}}updateDisabled_(o){super.updateDisabled_(o),o&&this.svgPath.setAttribute("stroke","none")}},aB=class extends Vg{constructor(o){super(o),this.highlightConstants=null}init(o,l){super.init(o,l),this.highlightConstants=this.makeHighlightConstants_(),this.highlightConstants.init()}refreshDom(o,l){super.refreshDom(o,l),this.getHighlightConstants().init()}makeConstants_(){return new Wa}makeRenderInfo_(o){return new rB(this,o)}makeDrawer_(o,l){return new nB(o,l)}makePathObject(o,l){return new lB(o,l,this.getConstants())}makeHighlightConstants_(){return new oB(this.getConstants())}getHighlightConstants(){if(!this.highlightConstants)throw Error("Cannot access the highlight constants because init has not been called");return this.highlightConstants}};mi("geras",aB);var Iu={};Iu.ConstantProvider=Wa,Iu.Drawer=nB,Iu.HighlightConstantProvider=oB,Iu.Highlighter=sS,Iu.InlineInput=sB,Iu.PathObject=lB,Iu.RenderInfo=rB,Iu.Renderer=aB,Iu.StatementInput=iB;var cB=class extends Fg{constructor(){super(),ct("Blockly.minimalist.ConstantProvider","v10","v11","Blockly.blockRendering.ConstantProvider")}},uB=class extends Ug{constructor(o,l){super(o,l),ct("Blockly.minimalist.Drawer","v10","v11","Blockly.blockRendering.Drawer")}},dB=class extends Lf{constructor(o,l){super(o,l),ct("Blockly.minimalist.RenderInfo","v10","v11","Blockly.blockRendering.RenderInfo")}getRenderer(){return this.renderer_}},hB=class extends Vg{constructor(o){super(o),ct("Blockly.minimalist.Renderer","v10","v11","Blockly.blockRendering.Renderer")}makeConstants_(){return new cB}makeRenderInfo_(o){return new dB(this,o)}makeDrawer_(o,l){return new uB(o,l)}};mi("minimalist",hB);var iS={};iS.ConstantProvider=cB,iS.Drawer=uB,iS.RenderInfo=dB,iS.Renderer=hB;var fB=class extends Lf{constructor(o,l){super(o,l)}getRenderer(){return this.renderer_}addElemSpacing_(){let o=!1;for(var l=0;l<this.rows.length;l++)if(this.rows[l].hasExternalInput){o=!0;break}for(l=0;l<this.rows.length;l++){const m=this.rows[l];var d=m.elements;if(m.elements=[],m.startsWithElemSpacer()&&m.elements.push(new Kr(this.constants_,this.getInRowSpacing_(null,d[0]))),d.length){for(let $=0;$<d.length-1;$++){m.elements.push(d[$]);const V=this.getInRowSpacing_(d[$],d[$+1]);m.elements.push(new Kr(this.constants_,V))}m.elements.push(d[d.length-1]),m.endsWithElemSpacer()&&(d=this.getInRowSpacing_(d[d.length-1],null),o&&m.hasDummyInput&&(d+=this.constants_.TAB_WIDTH),m.elements.push(new Kr(this.constants_,d)))}}}getInRowSpacing_(o,l){if(!o)return l&&nt.isField(l)&&l.isEditable?this.constants_.MEDIUM_PADDING:l&&nt.isInlineInput(l)?this.constants_.MEDIUM_LARGE_PADDING:l&&nt.isStatementInput(l)?this.constants_.STATEMENT_INPUT_PADDING_LEFT:this.constants_.LARGE_PADDING;if(!nt.isInput(o)&&!l)return nt.isField(o)&&o.isEditable?this.constants_.MEDIUM_PADDING:nt.isIcon(o)?2*this.constants_.LARGE_PADDING+1:nt.isHat(o)?this.constants_.NO_PADDING:nt.isPreviousOrNextConnection(o)?this.constants_.LARGE_PADDING:nt.isLeftRoundedCorner(o)?this.constants_.MIN_BLOCK_WIDTH:nt.isJaggedEdge(o)?this.constants_.NO_PADDING:this.constants_.LARGE_PADDING;if(nt.isInput(o)&&!l){if(nt.isExternalInput(o))return this.constants_.NO_PADDING;if(nt.isInlineInput(o))return this.constants_.LARGE_PADDING;if(nt.isStatementInput(o))return this.constants_.NO_PADDING}if(!nt.isInput(o)&&l&&nt.isInput(l)){if(nt.isField(o)&&o.isEditable){if(nt.isInlineInput(l)||nt.isExternalInput(l))return this.constants_.SMALL_PADDING}else{if(nt.isInlineInput(l)||nt.isExternalInput(l))return this.constants_.MEDIUM_LARGE_PADDING;if(nt.isStatementInput(l))return this.constants_.LARGE_PADDING}return this.constants_.LARGE_PADDING-1}if(nt.isIcon(o)&&l&&!nt.isInput(l))return this.constants_.LARGE_PADDING;if(nt.isInlineInput(o)&&l&&nt.isField(l))return l.isEditable?this.constants_.MEDIUM_PADDING:this.constants_.LARGE_PADDING;if(nt.isLeftSquareCorner(o)&&l){if(nt.isHat(l))return this.constants_.NO_PADDING;if(nt.isPreviousConnection(l)||nt.isNextConnection(l))return l.notchOffset}return nt.isLeftRoundedCorner(o)&&l?l.notchOffset-this.constants_.CORNER_RADIUS:nt.isField(o)&&l&&nt.isField(l)&&o.isEditable===l.isEditable||l&&nt.isJaggedEdge(l)?this.constants_.LARGE_PADDING:this.constants_.MEDIUM_PADDING}getSpacerRowHeight_(o,l){return nt.isTopRow(o)&&nt.isBottomRow(l)?this.constants_.EMPTY_BLOCK_SPACER_HEIGHT:nt.isTopRow(o)||nt.isBottomRow(l)?this.constants_.NO_PADDING:o.hasExternalInput&&l.hasExternalInput?this.constants_.LARGE_PADDING:!o.hasStatement&&l.hasStatement?this.constants_.BETWEEN_STATEMENT_PADDING_Y:o.hasStatement&&l.hasStatement||o.hasDummyInput||l.hasDummyInput?this.constants_.LARGE_PADDING:this.constants_.MEDIUM_PADDING}getElemCenterline_(o,l){if(nt.isSpacer(l))return o.yPos+l.height/2;if(nt.isBottomRow(o))return o=o.yPos+o.height-o.descenderHeight,nt.isNextConnection(l)?o+l.height/2:o-l.height/2;if(nt.isTopRow(o))return nt.isHat(l)?o.capline-l.height/2:o.capline+l.height/2;let d=o.yPos;return d=nt.isField(l)&&o.hasStatement?d+(this.constants_.TALL_INPUT_FIELD_OFFSET_Y+l.height/2):d+o.height/2}finalize_(){let o=0,l=0;for(var d=0;d<this.rows.length;d++){const $=this.rows[d];$.yPos=l,$.xPos=this.startX,l+=$.height,o=Math.max(o,$.widthWithConnectedBlocks);var m=l-this.topRow.ascenderHeight;$===this.bottomRow&&m<this.constants_.MIN_BLOCK_HEIGHT&&(m=this.constants_.MIN_BLOCK_HEIGHT-m,this.bottomRow.height+=m,l+=m),this.recordElemPositions_($)}this.outputConnection&&this.block_.nextConnection&&this.block_.nextConnection.isConnected()&&(d=this.block_.nextConnection.targetBlock())&&(o=Math.max(o,d.getHeightWidth().width)),this.bottomRow.baseline=l-this.bottomRow.descenderHeight,this.widthWithChildren=o+this.startX,this.height=l,this.startY=this.topRow.capline}},pB=class extends Vg{constructor(o){super(o)}makeRenderInfo_(o){return new fB(this,o)}};mi("thrasos",pB);var $L={};$L.RenderInfo=fB,$L.Renderer=pB;var OQ={colour_blocks:{colourPrimary:"#CF63CF",colourSecondary:"#C94FC9",colourTertiary:"#BD42BD"},list_blocks:{colourPrimary:"#9966FF",colourSecondary:"#855CD6",colourTertiary:"#774DCB"},logic_blocks:{colourPrimary:"#4C97FF",colourSecondary:"#4280D7",colourTertiary:"#3373CC"},loop_blocks:{colourPrimary:"#0fBD8C",colourSecondary:"#0DA57A",colourTertiary:"#0B8E69"},math_blocks:{colourPrimary:"#59C059",colourSecondary:"#46B946",colourTertiary:"#389438"},procedure_blocks:{colourPrimary:"#FF6680",colourSecondary:"#FF4D6A",colourTertiary:"#FF3355"},text_blocks:{colourPrimary:"#FFBF00",colourSecondary:"#E6AC00",colourTertiary:"#CC9900"},variable_blocks:{colourPrimary:"#FF8C1A",colourSecondary:"#FF8000",colourTertiary:"#DB6E00"},variable_dynamic_blocks:{colourPrimary:"#FF8C1A",colourSecondary:"#FF8000",colourTertiary:"#DB6E00"},hat_blocks:{colourPrimary:"#4C97FF",colourSecondary:"#4280D7",colourTertiary:"#3373CC",hat:"cap"}},SQ={colour_category:{colour:"#CF63CF"},list_category:{colour:"#9966FF"},logic_category:{colour:"#4C97FF"},loop_category:{colour:"#0fBD8C"},math_category:{colour:"#59C059"},procedure_category:{colour:"#FF6680"},text_category:{colour:"#FFBF00"},variable_category:{colour:"#FF8C1A"},variable_dynamic_category:{colour:"#FF8C1A"}},yQ=new Hd("zelos",OQ,SQ),$Q={Classic:fT,Zelos:yQ},IL=class{constructor(o,l,d){this.id_=o.toolboxitemid||X(),this.level_=(this.parent_=d||null)?this.parent_.getLevel()+1:0,this.toolboxItemDef_=o,this.parentToolbox_=l,this.workspace_=this.parentToolbox_.getWorkspace()}init(){}getDiv(){return null}getClickTarget(){return null}getId(){return this.id_}getParent(){return null}getLevel(){return this.level_}isSelectable(){return!1}isCollapsible(){return!1}dispose(){}setVisible_(o){}},Lc=class extends IL{constructor(o,l,d){super(o,l,d),this.colour_=this.name_="",this.labelDom_=this.iconDom_=this.rowContents_=this.rowDiv_=this.htmlDiv_=null,this.isDisabled_=this.isHidden_=!1,this.flyoutItems_=[],this.cssConfig_=this.makeDefaultCssConfig_()}init(){this.parseCategoryDef_(this.toolboxItemDef_),this.parseContents_(this.toolboxItemDef_),this.createDom_(),this.toolboxItemDef_.hidden==="true"&&this.hide()}makeDefaultCssConfig_(){return{container:"blocklyToolboxCategory",row:"blocklyTreeRow",rowcontentcontainer:"blocklyTreeRowContentContainer",icon:"blocklyTreeIcon",label:"blocklyTreeLabel",contents:"blocklyToolboxContents",selected:"blocklyTreeSelected",openicon:"blocklyTreeIconOpen",closedicon:"blocklyTreeIconClosed"}}parseContents_(o){if("custom"in o)this.flyoutItems_=o.custom;else if(o=o.contents)for(let l=0;l<o.length;l++){const d=o[l];Array.isArray(this.flyoutItems_)&&this.flyoutItems_.push(d)}}parseCategoryDef_(o){this.name_="name"in o?Os(o.name):"",this.colour_=this.getColour_(o),Object.assign(this.cssConfig_,o.cssconfig||o.cssConfig)}createDom_(){this.htmlDiv_=this.createContainer_(),Ur(this.htmlDiv_,Er.TREEITEM),Ho(this.htmlDiv_,jo.SELECTED,!1),Ho(this.htmlDiv_,jo.LEVEL,this.level_+1),this.rowDiv_=this.createRowContainer_(),this.rowDiv_.style.pointerEvents="auto",this.htmlDiv_.appendChild(this.rowDiv_),this.rowContents_=this.createRowContentsContainer_(),this.rowContents_.style.pointerEvents="none",this.rowDiv_.appendChild(this.rowContents_),this.iconDom_=this.createIconDom_(),Ur(this.iconDom_,Er.PRESENTATION),this.rowContents_.appendChild(this.iconDom_),this.labelDom_=this.createLabelDom_(this.name_),this.rowContents_.appendChild(this.labelDom_);const o=this.labelDom_.getAttribute("id");return o&&Ho(this.htmlDiv_,jo.LABELLEDBY,o),this.addColourBorder_(this.colour_),this.htmlDiv_}createContainer_(){const o=document.createElement("div"),l=this.cssConfig_.container;return l&&Se(o,l),o}createRowContainer_(){const o=document.createElement("div");var l=this.cssConfig_.row;return l&&Se(o,l),l=`${Lc.nestedPadding*this.getLevel()}px`,this.workspace_.RTL?o.style.paddingRight=l:o.style.paddingLeft=l,o}createRowContentsContainer_(){const o=document.createElement("div"),l=this.cssConfig_.rowcontentcontainer;return l&&Se(o,l),o}createIconDom_(){const o=document.createElement("span");if(!this.parentToolbox_.isHorizontal()){const l=this.cssConfig_.icon;l&&Se(o,l)}return o.style.display="inline-block",o}createLabelDom_(o){const l=document.createElement("span");return l.setAttribute("id",this.getId()+".label"),l.textContent=o,(o=this.cssConfig_.label)&&Se(l,o),l}refreshTheme(){this.colour_=this.getColour_(this.toolboxItemDef_),this.addColourBorder_(this.colour_)}addColourBorder_(o){o&&(o=Lc.borderWidth+"px solid "+(o||"#ddd"),this.workspace_.RTL?this.rowDiv_.style.borderRight=o:this.rowDiv_.style.borderLeft=o)}getColour_(o){const l=o.categorystyle||o.categoryStyle;if((o=o.colour)&&l)console.warn('Toolbox category "'+this.name_+'" must not have both a style and a colour');else{if(l)return this.getColourfromStyle_(l);if(o)return this.parseColour_(o)}return""}getColourfromStyle_(o){var l=this.workspace_.getTheme();if(o&&l){if((l=l.categoryStyles[o])&&l.colour)return this.parseColour_(l.colour);console.warn('Style "'+o+'" must exist and contain a colour value')}return""}getClickTarget(){return this.rowDiv_}parseColour_(o){if(o=Os(o),o==null||o==="")return"";var l=Number(o);return isNaN(l)?(l=pl(o))?l:(console.warn('Toolbox category "'+this.name_+'" has unrecognized colour attribute: '+o),""):db(l)}openIcon_(o){if(o){var l=this.cssConfig_.closedicon;l&&Je(o,l),(l=this.cssConfig_.openicon)&&Se(o,l)}}closeIcon_(o){if(o){var l=this.cssConfig_.openicon;l&&Je(o,l),(l=this.cssConfig_.closedicon)&&Se(o,l)}}setVisible_(o){this.htmlDiv_.style.display=o?"block":"none",this.isHidden_=!o,this.parentToolbox_.getSelectedItem()===this&&this.parentToolbox_.clearSelection()}hide(){this.setVisible_(!1)}show(){this.setVisible_(!0)}isVisible(){return!this.isHidden_&&this.allAncestorsExpanded_()}allAncestorsExpanded_(){let o=this;for(;o.getParent();)if(o=o.getParent(),!o.isExpanded())return!1;return!0}isSelectable(){return this.isVisible()&&!this.isDisabled_}onClick(o){}setSelected(o){if(this.rowDiv_){var l=this.cssConfig_.selected;if(o){const d=this.parseColour_(Lc.defaultBackgroundColour);this.rowDiv_.style.backgroundColor=this.colour_||d,l&&Se(this.rowDiv_,l)}else this.rowDiv_.style.backgroundColor="",l&&ut(this.rowDiv_,l);Ho(this.htmlDiv_,jo.SELECTED,o)}}setDisabled(o){this.isDisabled_=o,this.getDiv().setAttribute("disabled",`${o}`),o?this.getDiv().setAttribute("disabled","true"):this.getDiv().removeAttribute("disabled")}getName(){return this.name_}getParent(){return this.parent_}getDiv(){return this.htmlDiv_}getContents(){return this.flyoutItems_}updateFlyoutContents(o){this.flyoutItems_=[],this.toolboxItemDef_=typeof o=="string"?{kind:this.toolboxItemDef_.kind,custom:o,id:this.toolboxItemDef_.id,categorystyle:this.toolboxItemDef_.categorystyle,colour:this.toolboxItemDef_.colour,cssconfig:this.toolboxItemDef_.cssconfig,hidden:this.toolboxItemDef_.hidden}:{kind:this.toolboxItemDef_.kind,name:"name"in this.toolboxItemDef_?this.toolboxItemDef_.name:"",contents:cr(o),id:this.toolboxItemDef_.id,categorystyle:this.toolboxItemDef_.categorystyle,colour:this.toolboxItemDef_.colour,cssconfig:this.toolboxItemDef_.cssconfig,hidden:this.toolboxItemDef_.hidden},this.parseContents_(this.toolboxItemDef_)}dispose(){mt(this.htmlDiv_)}};Lc.registrationName="category",Lc.nestedPadding=19,Lc.borderWidth=8,Lc.defaultBackgroundColour="#57e",Ue(`
  576. .blocklyTreeRow:not(.blocklyTreeSelected):hover {
  577. background-color: rgba(255, 255, 255, .2);
  578. }
  579. .blocklyToolboxDiv[layout="h"] .blocklyToolboxCategory {
  580. margin: 1px 5px 1px 0;
  581. }
  582. .blocklyToolboxDiv[dir="RTL"][layout="h"] .blocklyToolboxCategory {
  583. margin: 1px 0 1px 5px;
  584. }
  585. .blocklyTreeRow {
  586. height: 22px;
  587. line-height: 22px;
  588. margin-bottom: 3px;
  589. padding-right: 8px;
  590. white-space: nowrap;
  591. }
  592. .blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {
  593. margin-left: 8px;
  594. padding-right: 0;
  595. }
  596. .blocklyTreeIcon {
  597. background-image: url(<<<PATH>>>/sprites.png);
  598. height: 16px;
  599. vertical-align: middle;
  600. visibility: hidden;
  601. width: 16px;
  602. }
  603. .blocklyTreeIconClosed {
  604. background-position: -32px -1px;
  605. }
  606. .blocklyToolboxDiv[dir="RTL"] .blocklyTreeIconClosed {
  607. background-position: 0 -1px;
  608. }
  609. .blocklyTreeSelected>.blocklyTreeIconClosed {
  610. background-position: -32px -17px;
  611. }
  612. .blocklyToolboxDiv[dir="RTL"] .blocklyTreeSelected>.blocklyTreeIconClosed {
  613. background-position: 0 -17px;
  614. }
  615. .blocklyTreeIconOpen {
  616. background-position: -16px -1px;
  617. }
  618. .blocklyTreeSelected>.blocklyTreeIconOpen {
  619. background-position: -16px -17px;
  620. }
  621. .blocklyTreeLabel {
  622. cursor: default;
  623. font: 16px sans-serif;
  624. padding: 0 3px;
  625. vertical-align: middle;
  626. }
  627. .blocklyToolboxDelete .blocklyTreeLabel {
  628. cursor: url("<<<PATH>>>/handdelete.cur"), auto;
  629. }
  630. .blocklyTreeSelected .blocklyTreeLabel {
  631. color: #fff;
  632. }
  633. `),s(At.TOOLBOX_ITEM,Lc.registrationName,Lc);var rS=class extends IL{constructor(o,l){super(o,l),this.cssConfig_={container:"blocklyTreeSeparator"},this.htmlDiv_=null,Object.assign(this.cssConfig_,o.cssconfig||o.cssConfig)}init(){this.createDom_()}createDom_(){const o=document.createElement("div"),l=this.cssConfig_.container;return l&&Se(o,l),this.htmlDiv_=o}getDiv(){return this.htmlDiv_}dispose(){mt(this.htmlDiv_)}};rS.registrationName="sep",Ue(`
  634. .blocklyTreeSeparator {
  635. border-bottom: solid #e5e5e5 1px;
  636. height: 0;
  637. margin: 5px 0;
  638. }
  639. .blocklyToolboxDiv[layout="h"] .blocklyTreeSeparator {
  640. border-right: solid #e5e5e5 1px;
  641. border-bottom: none;
  642. height: auto;
  643. margin: 0 5px 0 5px;
  644. padding: 5px 0;
  645. width: 0;
  646. }
  647. `),s(At.TOOLBOX_ITEM,rS.registrationName,rS);var kT=class extends Lc{constructor(o,l,d){super(o,l,d),this.subcategoriesDiv_=null,this.expanded_=!1,this.toolboxItems_=[]}makeDefaultCssConfig_(){const o=super.makeDefaultCssConfig_();return o.contents="blocklyToolboxContents",o}parseContents_(o){if("custom"in o)this.flyoutItems_=o.custom;else{const l=o.contents;if(l){this.flyoutItems_=[],o=!0;for(let d=0;d<l.length;d++){const m=l[d];!c(At.TOOLBOX_ITEM,m.kind)||m.kind.toLowerCase()===rS.registrationName&&o?(this.flyoutItems_.push(m),o=!0):(this.createToolboxItem_(m),o=!1)}}}}createToolboxItem_(o){let l=o.kind;l.toUpperCase()==="CATEGORY"&&Hn(o)&&(l=kT.registrationName),o=new(u(At.TOOLBOX_ITEM,l))(o,this.parentToolbox_,this),this.toolboxItems_.push(o)}init(){super.init(),this.setExpanded(this.toolboxItemDef_.expanded==="true"||this.toolboxItemDef_.expanded===!0)}createDom_(){super.createDom_();const o=this.getChildToolboxItems();return this.subcategoriesDiv_=this.createSubCategoriesDom_(o),Ur(this.subcategoriesDiv_,Er.GROUP),this.htmlDiv_.appendChild(this.subcategoriesDiv_),this.closeIcon_(this.iconDom_),Ho(this.htmlDiv_,jo.EXPANDED,!1),this.htmlDiv_}createIconDom_(){const o=document.createElement("span");if(!this.parentToolbox_.isHorizontal()){const l=this.cssConfig_.icon;l&&Se(o,l),o.style.visibility="visible"}return o.style.display="inline-block",o}createSubCategoriesDom_(o){const l=document.createElement("div");l.style.display="none";var d=this.cssConfig_.contents;for(d&&Se(l,d),d=0;d<o.length;d++){const m=o[d];m.init();const $=m.getDiv();if(l.appendChild($),m.getClickTarget){let V;(V=m.getClickTarget())==null||V.setAttribute("id",m.getId())}}return l}setExpanded(o){if(this.expanded_!==o){if(this.expanded_=o)this.subcategoriesDiv_.style.display="block",this.openIcon_(this.iconDom_);else{let l;(l=this.parentToolbox_.getFlyout())==null||l.setVisible(!1),this.subcategoriesDiv_.style.display="none",this.closeIcon_(this.iconDom_)}Ho(this.htmlDiv_,jo.EXPANDED,o),this.parentToolbox_.handleToolboxItemResize()}}setVisible_(o){this.htmlDiv_.style.display=o?"block":"none";const l=this.getChildToolboxItems();for(let d=0;d<l.length;d++)l[d].setVisible_(o);this.isHidden_=!o,this.parentToolbox_.getSelectedItem()===this&&this.parentToolbox_.clearSelection()}isExpanded(){return this.expanded_}isCollapsible(){return!0}onClick(o){this.toggleExpanded()}toggleExpanded(){this.setExpanded(!this.expanded_)}getDiv(){return this.htmlDiv_}getChildToolboxItems(){return this.toolboxItems_}};kT.registrationName="collapsibleCategory",s(At.TOOLBOX_ITEM,kT.registrationName,kT);var gB=class extends yT{constructor(o){super(),this.id="toolbox",this.contentsDiv_=this.HtmlDiv=null,this.isVisible_=!1,this.contents_=[],this.height_=this.width_=0,this.previouslySelectedItem_=this.selectedItem_=this.flyout_=null,this.boundEvents_=[],this.workspace_=o,this.toolboxDef_=o.options.languageTree||{contents:[]},this.horizontalLayout_=o.options.horizontalLayout,this.RTL=o.options.RTL,this.contentMap_=Object.create(null),this.toolboxPosition=o.options.toolboxPosition}onShortcut(o){return!1}init(){var o=this.workspace_;const l=o.getParentSvg();this.flyout_=this.createFlyout_(),this.HtmlDiv=this.createDom_(this.workspace_),qt(this.flyout_.createDom("svg"),l),this.setVisible(!0),this.flyout_.init(o),this.render(this.toolboxDef_),o=o.getThemeManager(),o.subscribe(this.HtmlDiv,"toolboxBackgroundColour","background-color"),o.subscribe(this.HtmlDiv,"toolboxForegroundColour","color"),this.workspace_.getComponentManager().addComponent({component:this,weight:1,capabilities:[Gs.Capability.AUTOHIDEABLE,Gs.Capability.DELETE_AREA,Gs.Capability.DRAG_TARGET]})}createDom_(o){o=o.getParentSvg();const l=this.createContainer_();return this.contentsDiv_=this.createContentsContainer_(),this.contentsDiv_.tabIndex=0,Ur(this.contentsDiv_,Er.TREE),l.appendChild(this.contentsDiv_),o.parentNode.insertBefore(l,o),this.attachEvents_(l,this.contentsDiv_),l}createContainer_(){const o=document.createElement("div");return o.setAttribute("layout",this.isHorizontal()?"h":"v"),Se(o,"blocklyToolboxDiv"),Se(o,"blocklyNonSelectable"),o.setAttribute("dir",this.RTL?"RTL":"LTR"),o}createContentsContainer_(){const o=document.createElement("div");return Se(o,"blocklyToolboxContents"),this.isHorizontal()&&(o.style.flexDirection="row"),o}attachEvents_(o,l){o=ee(o,"pointerdown",this,this.onClick_,!1),this.boundEvents_.push(o),l=ee(l,"keydown",this,this.onKeyDown_,!1),this.boundEvents_.push(l)}onClick_(o){if(Ze(o)||o.target===this.HtmlDiv)y().hideChaff(!1);else{var l=o.target.getAttribute("id");l&&(l=this.getToolboxItemById(l),l.isSelectable()&&(this.setSelectedItem(l),l.onClick(o))),y().hideChaff(!0)}Pe()}onKeyDown_(o){let l=!1;switch(o.key){case"ArrowDown":l=this.selectNext_();break;case"ArrowUp":l=this.selectPrevious_();break;case"ArrowLeft":l=this.selectParent_();break;case"ArrowRight":l=this.selectChild_();break;case"Enter":case" ":this.selectedItem_&&this.selectedItem_.isCollapsible()&&(this.selectedItem_.toggleExpanded(),l=!0);break;default:l=!1}!l&&this.selectedItem_&&this.selectedItem_.onKeyDown&&(l=this.selectedItem_.onKeyDown(o)),l&&o.preventDefault()}createFlyout_(){const o=this.workspace_,l=new as({parentWorkspace:o,rtl:o.RTL,oneBasedIndex:o.options.oneBasedIndex,horizontalLayout:o.horizontalLayout,renderer:o.options.renderer,rendererOverrides:o.options.rendererOverrides,move:{scrollbars:!0}});return l.toolboxPosition=o.options.toolboxPosition,new(o.horizontalLayout?p(At.FLYOUTS_HORIZONTAL_TOOLBOX,o.options,!0):p(At.FLYOUTS_VERTICAL_TOOLBOX,o.options,!0))(l)}render(o){this.toolboxDef_=o;for(let l=0;l<this.contents_.length;l++){const d=this.contents_[l];d&&d.dispose()}this.contents_=[],this.contentMap_=Object.create(null),this.renderContents_(o.contents),this.position(),this.handleToolboxItemResize()}renderContents_(o){const l=document.createDocumentFragment();for(let d=0;d<o.length;d++)this.createToolboxItem_(o[d],l);this.contentsDiv_.appendChild(l)}createToolboxItem_(o,l){var d=o.kind;d.toUpperCase()==="CATEGORY"&&Hn(o)&&(d=kT.registrationName),(d=u(At.TOOLBOX_ITEM,d.toLowerCase()))&&(o=new d(o,this),o.init(),this.addToolboxItem_(o),(d=o.getDiv())&&l.appendChild(d),o.getClickTarget()&&o.getClickTarget().setAttribute("id",o.getId()))}addToolboxItem_(o){if(this.contents_.push(o),this.contentMap_[o.getId()]=o,o.isCollapsible()){o=o.getChildToolboxItems();for(let l=0;l<o.length;l++)this.addToolboxItem_(o[l])}}getToolboxItems(){return this.contents_}addStyle(o){o&&this.HtmlDiv&&Se(this.HtmlDiv,o)}removeStyle(o){o&&this.HtmlDiv&&ut(this.HtmlDiv,o)}getClientRect(){if(!this.HtmlDiv||!this.isVisible_)return null;var o=this.HtmlDiv.getBoundingClientRect();const l=o.top,d=l+o.height,m=o.left;return o=m+o.width,this.toolboxPosition===Gn.TOP?new Po(-1e7,d,-1e7,1e7):this.toolboxPosition===Gn.BOTTOM?new Po(l,1e7,-1e7,1e7):this.toolboxPosition===Gn.LEFT?new Po(-1e7,1e7,-1e7,o):new Po(-1e7,1e7,m,1e7)}wouldDelete(o,l){return o instanceof Ha?this.updateWouldDelete_(!o.getParent()&&o.isDeletable()):this.updateWouldDelete_(o.isDeletable()),this.wouldDelete_}onDragEnter(o){this.updateCursorDeleteStyle_(!0)}onDragExit(o){this.updateCursorDeleteStyle_(!1)}onDrop(o){this.updateCursorDeleteStyle_(!1)}updateWouldDelete_(o){o!==this.wouldDelete_&&(this.updateCursorDeleteStyle_(!1),this.wouldDelete_=o,this.updateCursorDeleteStyle_(!0))}updateCursorDeleteStyle_(o){const l=this.wouldDelete_?"blocklyToolboxDelete":"blocklyToolboxGrab";o?this.addStyle(l):this.removeStyle(l)}getToolboxItemById(o){return this.contentMap_[o]||null}getWidth(){return this.width_}getHeight(){return this.height_}getFlyout(){return this.flyout_}getWorkspace(){return this.workspace_}getSelectedItem(){return this.selectedItem_}getPreviouslySelectedItem(){return this.previouslySelectedItem_}isHorizontal(){return this.horizontalLayout_}position(){const o=this.workspace_.getMetrics(),l=this.HtmlDiv;l&&(this.horizontalLayout_?(l.style.left="0",l.style.height="auto",l.style.width="100%",this.height_=l.offsetHeight,this.width_=o.viewWidth,this.toolboxPosition===Gn.TOP?l.style.top="0":l.style.bottom="0"):(this.toolboxPosition===Gn.RIGHT?l.style.right="0":l.style.left="0",l.style.height="100%",this.width_=l.offsetWidth,this.height_=o.viewHeight),this.flyout_.position())}handleToolboxItemResize(){const o=this.workspace_,l=this.HtmlDiv.getBoundingClientRect();o.translate(this.toolboxPosition===Gn.LEFT?o.scrollX+l.width:o.scrollX,this.toolboxPosition===Gn.TOP?o.scrollY+l.height:o.scrollY),k(o)}clearSelection(){this.setSelectedItem(null)}refreshTheme(){for(let o=0;o<this.contents_.length;o++){const l=this.contents_[o];l.refreshTheme&&l.refreshTheme()}}refreshSelection(){this.selectedItem_&&this.selectedItem_.isSelectable()&&this.selectedItem_.getContents().length&&this.flyout_.show(this.selectedItem_.getContents())}setVisible(o){this.isVisible_!==o&&(this.HtmlDiv.style.display=o?"block":"none",this.isVisible_=o,this.workspace_.recordDragTargets())}autoHide(o){!o&&this.flyout_&&this.flyout_.autoClose&&this.clearSelection()}setSelectedItem(o){const l=this.selectedItem_;!o&&!l||o&&!eo(o)||(this.shouldDeselectItem_(l,o)&&l!==null&&this.deselectItem_(l),this.shouldSelectItem_(l,o)&&o!==null&&this.selectItem_(l,o),this.updateFlyout_(l,o),this.fireSelectEvent_(l,o))}shouldDeselectItem_(o,l){return o!==null&&(!o.isCollapsible()||o!==l)}shouldSelectItem_(o,l){return l!==null&&l!==o}deselectItem_(o){this.selectedItem_=null,this.previouslySelectedItem_=o,o.setSelected(!1),Ho(this.contentsDiv_,jo.ACTIVEDESCENDANT,"")}selectItem_(o,l){this.selectedItem_=l,this.previouslySelectedItem_=o,l.setSelected(!0),Ho(this.contentsDiv_,jo.ACTIVEDESCENDANT,l.getId())}selectItemByPosition(o){-1<o&&o<this.contents_.length&&(o=this.contents_[o],o.isSelectable()&&this.setSelectedItem(o))}updateFlyout_(o,l){l&&(o!==l||l.isCollapsible())&&l.getContents().length?(this.flyout_.show(l.getContents()),this.flyout_.scrollToStart()):this.flyout_.hide()}fireSelectEvent_(o,l){const d=o&&o.getName();let m=l&&l.getName();o===l&&(m=null),o=new(Ae(Rd))(d,m,this.workspace_.id),J(o)}selectParent_(){return this.selectedItem_?this.selectedItem_.isCollapsible()&&this.selectedItem_.isExpanded()?(this.selectedItem_.toggleExpanded(),!0):this.selectedItem_.getParent()&&this.selectedItem_.getParent().isSelectable()?(this.setSelectedItem(this.selectedItem_.getParent()),!0):!1:!1}selectChild_(){if(!this.selectedItem_||!this.selectedItem_.isCollapsible())return!1;const o=this.selectedItem_;return o.isExpanded()?this.selectNext_():o.toggleExpanded(),!0}selectNext_(){if(!this.selectedItem_)return!1;let o=this.contents_.indexOf(this.selectedItem_)+1;if(-1<o&&o<this.contents_.length){let l=this.contents_[o];for(;l&&!l.isSelectable();)l=this.contents_[++o];if(l&&l.isSelectable())return this.setSelectedItem(l),!0}return!1}selectPrevious_(){if(!this.selectedItem_)return!1;let o=this.contents_.indexOf(this.selectedItem_)-1;if(-1<o&&o<this.contents_.length){let l=this.contents_[o];for(;l&&!l.isSelectable();)l=this.contents_[--o];if(l&&l.isSelectable())return this.setSelectedItem(l),!0}return!1}dispose(){this.workspace_.getComponentManager().removeComponent("toolbox"),this.flyout_.dispose();for(var o=0;o<this.contents_.length;o++)this.contents_[o].dispose();for(o=0;o<this.boundEvents_.length;o++)Oe(this.boundEvents_[o]);this.boundEvents_=[],this.contents_=[],this.HtmlDiv&&(this.workspace_.getThemeManager().unsubscribe(this.HtmlDiv),mt(this.HtmlDiv))}};Ue(`
  648. .blocklyToolboxDelete {
  649. cursor: url("<<<PATH>>>/handdelete.cur"), auto;
  650. }
  651. .blocklyToolboxGrab {
  652. cursor: url("<<<PATH>>>/handclosed.cur"), auto;
  653. cursor: grabbing;
  654. cursor: -webkit-grabbing;
  655. }
  656. /* Category tree in Toolbox. */
  657. .blocklyToolboxDiv {
  658. background-color: #ddd;
  659. overflow-x: visible;
  660. overflow-y: auto;
  661. padding: 4px 0 4px 0;
  662. position: absolute;
  663. z-index: 70; /* so blocks go under toolbox when dragging */
  664. -webkit-tap-highlight-color: transparent; /* issue #1345 */
  665. }
  666. .blocklyToolboxContents {
  667. display: flex;
  668. flex-wrap: wrap;
  669. flex-direction: column;
  670. }
  671. .blocklyToolboxContents:focus {
  672. outline: none;
  673. }
  674. `),s(At.TOOLBOX,Ca,gB);var IQ="10.4.3",RQ=n.Align$$module$build$src$core$inputs$align.LEFT,CQ=n.Align$$module$build$src$core$inputs$align.CENTRE,MQ=n.Align$$module$build$src$core$inputs$align.RIGHT,AQ=sn.INPUT_VALUE,LQ=sn.OUTPUT_VALUE,wQ=sn.NEXT_STATEMENT,kQ=sn.PREVIOUS_STATEMENT,NQ=n.inputTypes$$module$build$src$core$inputs$input_types.DUMMY,PQ=Gn.TOP,DQ=Gn.BOTTOM,xQ=Gn.LEFT,BQ=Gn.RIGHT;Gg.prototype.newBlock=function(o,l){return new wf(this,o,l)},na.prototype.newBlock=function(o,l){return new Ha(this,o,l)},na.newTrashcan=function(o){return new v0(o)},Oi.prototype.showContextMenu=function(o){if(!this.workspace.options.readOnly){var l=[];this.isDeletable()&&this.isMovable()&&(l.push(eb(this)),l.push(Gh(this))),Wp(o,l,this.RTL)}},Mc.prototype.newWorkspaceSvg=function(o){return new na(o)},n.Names$$module$build$src$core$names.prototype.populateProcedures=function(o){o=v_(o),o=o[0].concat(o[1]);for(let l=0;l<o.length;l++)this.getName(o[l][0],n.Names$$module$build$src$core$names.NameType.PROCEDURE)};var FQ=sn,Tt={ALIGN_CENTRE:CQ,ALIGN_LEFT:RQ,ALIGN_RIGHT:MQ};return Tt.ASTNode=Pt,Tt.BasicCursor=Wg,Tt.Block=wf,Tt.BlockDragger=LT,Tt.BlockSvg=Ha,Tt.Blocks=Ti,Tt.Bubble=Ao,Tt.BubbleDragger=JI,Tt.COLLAPSED_FIELD_NAME=ST,Tt.COLLAPSED_INPUT_NAME=Xd,Tt.COLLAPSE_CHARS=TO,Tt.CodeGenerator=n.CodeGenerator$$module$build$src$core$generator,Tt.CollapsibleToolboxCategory=kT,Tt.ComponentManager=Gs,Tt.Connection=bo,Tt.ConnectionChecker=NO,Tt.ConnectionDB=vu,Tt.ConnectionType=sn,Tt.ContextMenu=Pa,Tt.ContextMenuItems=fe,Tt.ContextMenuRegistry=Mo,Tt.Css=ri,Tt.Cursor=UO,Tt.DELETE_VARIABLE_ID=dT,Tt.DRAG_STACK=EO,Tt.DUMMY_INPUT=NQ,Tt.DeleteArea=yT,Tt.DragTarget=E0,Tt.DropDownDiv=xi,Tt.Events=cn,Tt.Extensions=yl,Tt.Field=so,Tt.FieldAngle=Me,Tt.FieldCheckbox=et,Tt.FieldColour=it,Tt.FieldDropdown=Yr,Tt.FieldImage=jd,Tt.FieldLabel=ms,Tt.FieldLabelSerializable=wt,Tt.FieldMultilineInput=kt,Tt.FieldNumber=Ht,Tt.FieldTextInput=Df,Tt.FieldVariable=Zt,Tt.Flyout=kn,Tt.FlyoutButton=fn,Tt.FlyoutMetricsManager=Pn,Tt.Generator=n.CodeGenerator$$module$build$src$core$generator,Tt.Gesture=Cc,Tt.Grid=yO,Tt.HorizontalFlyout=io,Tt.INPUT_VALUE=AQ,Tt.Input=Ls,Tt.InsertionMarkerManager=ta,Tt.InsertionMarkerPreviewer=Il,Tt.Marker=_0,Tt.MarkerManager=Qi,Tt.Menu=dO,Tt.MenuItem=Tf,Tt.MetricsManager=MT,Tt.Msg=n.Msg$$module$build$src$core$msg,Tt.NEXT_STATEMENT=wQ,Tt.Names=n.Names$$module$build$src$core$names,Tt.OPPOSITE_TYPE=Rc,Tt.OUTPUT_VALUE=LQ,Tt.Options=as,Tt.PREVIOUS_STATEMENT=kQ,Tt.PROCEDURE_CATEGORY_NAME=Dg,Tt.Procedures=es,Tt.RENAME_VARIABLE_ID=uT,Tt.RenderedConnection=yr,Tt.Scrollbar=Ms,Tt.ScrollbarPair=YO,Tt.ShortcutItems=Ga,Tt.ShortcutRegistry=yo,Tt.TOOLBOX_AT_BOTTOM=DQ,Tt.TOOLBOX_AT_LEFT=xQ,Tt.TOOLBOX_AT_RIGHT=BQ,Tt.TOOLBOX_AT_TOP=PQ,Tt.TabNavigateCursor=T0,Tt.Theme=Hd,Tt.ThemeManager=g0,Tt.Themes=$Q,Tt.Toolbox=gB,Tt.ToolboxCategory=Lc,Tt.ToolboxItem=IL,Tt.ToolboxSeparator=rS,Tt.Tooltip=zr,Tt.Touch=Aa,Tt.Trashcan=v0,Tt.UnattachedFieldError=Go,Tt.VARIABLE_CATEGORY_NAME=qb,Tt.VARIABLE_DYNAMIC_CATEGORY_NAME=kO,Tt.VERSION=IQ,Tt.VariableMap=xO,Tt.VariableModel=gf,Tt.Variables=bi,Tt.VariablesDynamic=Yd,Tt.VerticalFlyout=co,Tt.WidgetDiv=Na,Tt.Workspace=Gg,Tt.WorkspaceAudio=m0,Tt.WorkspaceComment=wa,Tt.WorkspaceCommentSvg=Oi,Tt.WorkspaceDragger=n0,Tt.WorkspaceSvg=na,Tt.Xml=Tr,Tt.ZoomControls=kI,Tt.blockAnimations=Ag,Tt.blockRendering=wo,Tt.browserEvents=vl,Tt.bubbles=Kd,Tt.bumpObjects=AT,Tt.clipboard=Bd,Tt.common=ii,Tt.config=n.config$$module$build$src$core$config,Tt.connectionTypes=FQ,Tt.constants=_L,Tt.defineBlocksWithJsonArray=B,Tt.dialog=Nd,Tt.fieldRegistry=Pg,Tt.geras=Iu,Tt.getMainWorkspace=y,Tt.getSelected=L,Tt.hasBubble=cu,Tt.hideChaff=CI,Tt.icons=Fn,Tt.inject=Mb,Tt.inputTypes=n.inputTypes$$module$build$src$core$inputs$input_types,Tt.inputs=zs,Tt.isCopyable=hu,Tt.isIcon=RI,Tt.isObservable=we,Tt.isPaster=x_,Tt.isSerializable=Us,Tt.isVariableBackedParameterModel=Km,Tt.minimalist=iS,Tt.procedures=es,Tt.registry=Oc,Tt.renderManagement=oT,Tt.serialization=yL,Tt.setLocale=Qb,Tt.setParentContainer=w,Tt.svgResize=k,Tt.thrasos=$L,Tt.uiPosition=kd,Tt.utils=gs,Tt.zelos=j,Object.defineProperties(Tt,{HSV_SATURATION:{get:function(){return ct("Blockly.HSV_SATURATION","version 10","version 11","Blockly.utils.colour.getHsvSaturation()"),tf()},set:function(o){ct("Blockly.HSV_SATURATION","version 10","version 11","Blockly.utils.colour.setHsvSaturation()"),_d(o)}},HSV_VALUE:{get:function(){return ct("Blockly.HSV_VALUE","version 10","version 11","Blockly.utils.colour.getHsvValue()"),nf()},set:function(o){ct("Blockly.HSV_VALUE","version 10","version 11","Blockly.utils.colour.setHsvValue()"),uu(o)}}}),"Blockly"in globalThis||(globalThis.Blockly={Msg:BI}),Tt.__namespace__=n,Tt})}(xR)),xR.exports}var h7=DR.exports,rF;function f7(){return rF||(rF=1,function(e,t){(function(n,s){e.exports=s(sA())})(h7,function(n){/**
  675. * @license
  676. * Copyright 2020 Google LLC
  677. * SPDX-License-Identifier: Apache-2.0
  678. */return n})}(DR)),DR.exports}var p7=PR.exports,lF;function _P(){return lF||(lF=1,function(e,t){(function(n,s){e.exports=s(f7())})(p7,function(n){return n})}(PR)),PR.exports}var BR={exports:{}},g7=BR.exports,aF;function m7(){return aF||(aF=1,function(e,t){(function(n,s){e.exports=s()})(g7,function(){var n=n||{Msg:Object.create(null)};return n.Msg.ADD_COMMENT="Add Comment",n.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE="Can't delete the variable '%1' because it's part of the definition of the function '%2'",n.Msg.CHANGE_VALUE_TITLE="Change value:",n.Msg.CLEAN_UP="Clean up Blocks",n.Msg.COLLAPSED_WARNINGS_WARNING="Collapsed blocks contain warnings.",n.Msg.COLLAPSE_ALL="Collapse Blocks",n.Msg.COLLAPSE_BLOCK="Collapse Block",n.Msg.COLOUR_BLEND_COLOUR1="colour 1",n.Msg.COLOUR_BLEND_COLOUR2="colour 2",n.Msg.COLOUR_BLEND_HELPURL="https://meyerweb.com/eric/tools/color-blend/#:::rgbp",n.Msg.COLOUR_BLEND_RATIO="ratio",n.Msg.COLOUR_BLEND_TITLE="blend",n.Msg.COLOUR_BLEND_TOOLTIP="Blends two colours together with a given ratio (0.0 - 1.0).",n.Msg.COLOUR_PICKER_HELPURL="https://en.wikipedia.org/wiki/Color",n.Msg.COLOUR_PICKER_TOOLTIP="Choose a colour from the palette.",n.Msg.COLOUR_RANDOM_HELPURL="http://randomcolour.com",n.Msg.COLOUR_RANDOM_TITLE="random colour",n.Msg.COLOUR_RANDOM_TOOLTIP="Choose a colour at random.",n.Msg.COLOUR_RGB_BLUE="blue",n.Msg.COLOUR_RGB_GREEN="green",n.Msg.COLOUR_RGB_HELPURL="https://www.december.com/html/spec/colorpercompact.html",n.Msg.COLOUR_RGB_RED="red",n.Msg.COLOUR_RGB_TITLE="colour with",n.Msg.COLOUR_RGB_TOOLTIP="Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100.",n.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL="https://github.com/google/blockly/wiki/Loops#loop-termination-blocks",n.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK="break out of loop",n.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE="continue with next iteration of loop",n.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK="Break out of the containing loop.",n.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE="Skip the rest of this loop, and continue with the next iteration.",n.Msg.CONTROLS_FLOW_STATEMENTS_WARNING="Warning: This block may only be used within a loop.",n.Msg.CONTROLS_FOREACH_HELPURL="https://github.com/google/blockly/wiki/Loops#for-each",n.Msg.CONTROLS_FOREACH_TITLE="for each item %1 in list %2",n.Msg.CONTROLS_FOREACH_TOOLTIP="For each item in a list, set the variable '%1' to the item, and then do some statements.",n.Msg.CONTROLS_FOR_HELPURL="https://github.com/google/blockly/wiki/Loops#count-with",n.Msg.CONTROLS_FOR_TITLE="count with %1 from %2 to %3 by %4",n.Msg.CONTROLS_FOR_TOOLTIP="Have the variable '%1' take on the values from the start number to the end number, counting by the specified interval, and do the specified blocks.",n.Msg.CONTROLS_IF_ELSEIF_TOOLTIP="Add a condition to the if block.",n.Msg.CONTROLS_IF_ELSE_TOOLTIP="Add a final, catch-all condition to the if block.",n.Msg.CONTROLS_IF_HELPURL="https://github.com/google/blockly/wiki/IfElse",n.Msg.CONTROLS_IF_IF_TOOLTIP="Add, remove, or reorder sections to reconfigure this if block.",n.Msg.CONTROLS_IF_MSG_ELSE="else",n.Msg.CONTROLS_IF_MSG_ELSEIF="else if",n.Msg.CONTROLS_IF_MSG_IF="if",n.Msg.CONTROLS_IF_TOOLTIP_1="If a value is true, then do some statements.",n.Msg.CONTROLS_IF_TOOLTIP_2="If a value is true, then do the first block of statements. Otherwise, do the second block of statements.",n.Msg.CONTROLS_IF_TOOLTIP_3="If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements.",n.Msg.CONTROLS_IF_TOOLTIP_4="If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements. If none of the values are true, do the last block of statements.",n.Msg.CONTROLS_REPEAT_HELPURL="https://en.wikipedia.org/wiki/For_loop",n.Msg.CONTROLS_REPEAT_INPUT_DO="do",n.Msg.CONTROLS_REPEAT_TITLE="repeat %1 times",n.Msg.CONTROLS_REPEAT_TOOLTIP="Do some statements several times.",n.Msg.CONTROLS_WHILEUNTIL_HELPURL="https://github.com/google/blockly/wiki/Loops#repeat",n.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL="repeat until",n.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE="repeat while",n.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL="While a value is false, then do some statements.",n.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE="While a value is true, then do some statements.",n.Msg.DELETE_ALL_BLOCKS="Delete all %1 blocks?",n.Msg.DELETE_BLOCK="Delete Block",n.Msg.DELETE_VARIABLE="Delete the '%1' variable",n.Msg.DELETE_VARIABLE_CONFIRMATION="Delete %1 uses of the '%2' variable?",n.Msg.DELETE_X_BLOCKS="Delete %1 Blocks",n.Msg.DIALOG_CANCEL="Cancel",n.Msg.DIALOG_OK="OK",n.Msg.DISABLE_BLOCK="Disable Block",n.Msg.DUPLICATE_BLOCK="Duplicate",n.Msg.DUPLICATE_COMMENT="Duplicate Comment",n.Msg.ENABLE_BLOCK="Enable Block",n.Msg.EXPAND_ALL="Expand Blocks",n.Msg.EXPAND_BLOCK="Expand Block",n.Msg.EXTERNAL_INPUTS="External Inputs",n.Msg.HELP="Help",n.Msg.INLINE_INPUTS="Inline Inputs",n.Msg.LISTS_CREATE_EMPTY_HELPURL="https://github.com/google/blockly/wiki/Lists#create-empty-list",n.Msg.LISTS_CREATE_EMPTY_TITLE="create empty list",n.Msg.LISTS_CREATE_EMPTY_TOOLTIP="Returns a list, of length 0, containing no data records",n.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD="list",n.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP="Add, remove, or reorder sections to reconfigure this list block.",n.Msg.LISTS_CREATE_WITH_HELPURL="https://github.com/google/blockly/wiki/Lists#create-list-with",n.Msg.LISTS_CREATE_WITH_INPUT_WITH="create list with",n.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP="Add an item to the list.",n.Msg.LISTS_CREATE_WITH_TOOLTIP="Create a list with any number of items.",n.Msg.LISTS_GET_INDEX_FIRST="first",n.Msg.LISTS_GET_INDEX_FROM_END="# from end",n.Msg.LISTS_GET_INDEX_FROM_START="#",n.Msg.LISTS_GET_INDEX_GET="get",n.Msg.LISTS_GET_INDEX_GET_REMOVE="get and remove",n.Msg.LISTS_GET_INDEX_LAST="last",n.Msg.LISTS_GET_INDEX_RANDOM="random",n.Msg.LISTS_GET_INDEX_REMOVE="remove",n.Msg.LISTS_GET_INDEX_TAIL="",n.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST="Returns the first item in a list.",n.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM="Returns the item at the specified position in a list.",n.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST="Returns the last item in a list.",n.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM="Returns a random item in a list.",n.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST="Removes and returns the first item in a list.",n.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM="Removes and returns the item at the specified position in a list.",n.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST="Removes and returns the last item in a list.",n.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM="Removes and returns a random item in a list.",n.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST="Removes the first item in a list.",n.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM="Removes the item at the specified position in a list.",n.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST="Removes the last item in a list.",n.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM="Removes a random item in a list.",n.Msg.LISTS_GET_SUBLIST_END_FROM_END="to # from end",n.Msg.LISTS_GET_SUBLIST_END_FROM_START="to #",n.Msg.LISTS_GET_SUBLIST_END_LAST="to last",n.Msg.LISTS_GET_SUBLIST_HELPURL="https://github.com/google/blockly/wiki/Lists#getting-a-sublist",n.Msg.LISTS_GET_SUBLIST_START_FIRST="get sub-list from first",n.Msg.LISTS_GET_SUBLIST_START_FROM_END="get sub-list from # from end",n.Msg.LISTS_GET_SUBLIST_START_FROM_START="get sub-list from #",n.Msg.LISTS_GET_SUBLIST_TAIL="",n.Msg.LISTS_GET_SUBLIST_TOOLTIP="Creates a copy of the specified portion of a list.",n.Msg.LISTS_INDEX_FROM_END_TOOLTIP="%1 is the last item.",n.Msg.LISTS_INDEX_FROM_START_TOOLTIP="%1 is the first item.",n.Msg.LISTS_INDEX_OF_FIRST="find first occurrence of item",n.Msg.LISTS_INDEX_OF_HELPURL="https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list",n.Msg.LISTS_INDEX_OF_LAST="find last occurrence of item",n.Msg.LISTS_INDEX_OF_TOOLTIP="Returns the index of the first/last occurrence of the item in the list. Returns %1 if item is not found.",n.Msg.LISTS_INLIST="in list",n.Msg.LISTS_ISEMPTY_HELPURL="https://github.com/google/blockly/wiki/Lists#is-empty",n.Msg.LISTS_ISEMPTY_TITLE="%1 is empty",n.Msg.LISTS_ISEMPTY_TOOLTIP="Returns true if the list is empty.",n.Msg.LISTS_LENGTH_HELPURL="https://github.com/google/blockly/wiki/Lists#length-of",n.Msg.LISTS_LENGTH_TITLE="length of %1",n.Msg.LISTS_LENGTH_TOOLTIP="Returns the length of a list.",n.Msg.LISTS_REPEAT_HELPURL="https://github.com/google/blockly/wiki/Lists#create-list-with",n.Msg.LISTS_REPEAT_TITLE="create list with item %1 repeated %2 times",n.Msg.LISTS_REPEAT_TOOLTIP="Creates a list consisting of the given value repeated the specified number of times.",n.Msg.LISTS_REVERSE_HELPURL="https://github.com/google/blockly/wiki/Lists#reversing-a-list",n.Msg.LISTS_REVERSE_MESSAGE0="reverse %1",n.Msg.LISTS_REVERSE_TOOLTIP="Reverse a copy of a list.",n.Msg.LISTS_SET_INDEX_HELPURL="https://github.com/google/blockly/wiki/Lists#in-list--set",n.Msg.LISTS_SET_INDEX_INPUT_TO="as",n.Msg.LISTS_SET_INDEX_INSERT="insert at",n.Msg.LISTS_SET_INDEX_SET="set",n.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST="Inserts the item at the start of a list.",n.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM="Inserts the item at the specified position in a list.",n.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST="Append the item to the end of a list.",n.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM="Inserts the item randomly in a list.",n.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST="Sets the first item in a list.",n.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM="Sets the item at the specified position in a list.",n.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST="Sets the last item in a list.",n.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM="Sets a random item in a list.",n.Msg.LISTS_SORT_HELPURL="https://github.com/google/blockly/wiki/Lists#sorting-a-list",n.Msg.LISTS_SORT_ORDER_ASCENDING="ascending",n.Msg.LISTS_SORT_ORDER_DESCENDING="descending",n.Msg.LISTS_SORT_TITLE="sort %1 %2 %3",n.Msg.LISTS_SORT_TOOLTIP="Sort a copy of a list.",n.Msg.LISTS_SORT_TYPE_IGNORECASE="alphabetic, ignore case",n.Msg.LISTS_SORT_TYPE_NUMERIC="numeric",n.Msg.LISTS_SORT_TYPE_TEXT="alphabetic",n.Msg.LISTS_SPLIT_HELPURL="https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists",n.Msg.LISTS_SPLIT_LIST_FROM_TEXT="make list from text",n.Msg.LISTS_SPLIT_TEXT_FROM_LIST="make text from list",n.Msg.LISTS_SPLIT_TOOLTIP_JOIN="Join a list of texts into one text, separated by a delimiter.",n.Msg.LISTS_SPLIT_TOOLTIP_SPLIT="Split text into a list of texts, breaking at each delimiter.",n.Msg.LISTS_SPLIT_WITH_DELIMITER="with delimiter",n.Msg.LOGIC_BOOLEAN_FALSE="false",n.Msg.LOGIC_BOOLEAN_HELPURL="https://github.com/google/blockly/wiki/Logic#values",n.Msg.LOGIC_BOOLEAN_TOOLTIP="Returns either true or false.",n.Msg.LOGIC_BOOLEAN_TRUE="true",n.Msg.LOGIC_COMPARE_HELPURL="https://en.wikipedia.org/wiki/Inequality_(mathematics)",n.Msg.LOGIC_COMPARE_TOOLTIP_EQ="Return true if both inputs equal each other.",n.Msg.LOGIC_COMPARE_TOOLTIP_GT="Return true if the first input is greater than the second input.",n.Msg.LOGIC_COMPARE_TOOLTIP_GTE="Return true if the first input is greater than or equal to the second input.",n.Msg.LOGIC_COMPARE_TOOLTIP_LT="Return true if the first input is smaller than the second input.",n.Msg.LOGIC_COMPARE_TOOLTIP_LTE="Return true if the first input is smaller than or equal to the second input.",n.Msg.LOGIC_COMPARE_TOOLTIP_NEQ="Return true if both inputs are not equal to each other.",n.Msg.LOGIC_NEGATE_HELPURL="https://github.com/google/blockly/wiki/Logic#not",n.Msg.LOGIC_NEGATE_TITLE="not %1",n.Msg.LOGIC_NEGATE_TOOLTIP="Returns true if the input is false. Returns false if the input is true.",n.Msg.LOGIC_NULL="null",n.Msg.LOGIC_NULL_HELPURL="https://en.wikipedia.org/wiki/Nullable_type",n.Msg.LOGIC_NULL_TOOLTIP="Returns null.",n.Msg.LOGIC_OPERATION_AND="and",n.Msg.LOGIC_OPERATION_HELPURL="https://github.com/google/blockly/wiki/Logic#logical-operations",n.Msg.LOGIC_OPERATION_OR="or",n.Msg.LOGIC_OPERATION_TOOLTIP_AND="Return true if both inputs are true.",n.Msg.LOGIC_OPERATION_TOOLTIP_OR="Return true if at least one of the inputs is true.",n.Msg.LOGIC_TERNARY_CONDITION="test",n.Msg.LOGIC_TERNARY_HELPURL="https://en.wikipedia.org/wiki/%3F:",n.Msg.LOGIC_TERNARY_IF_FALSE="if false",n.Msg.LOGIC_TERNARY_IF_TRUE="if true",n.Msg.LOGIC_TERNARY_TOOLTIP="Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value.",n.Msg.MATH_ADDITION_SYMBOL="+",n.Msg.MATH_ARITHMETIC_HELPURL="https://en.wikipedia.org/wiki/Arithmetic",n.Msg.MATH_ARITHMETIC_TOOLTIP_ADD="Return the sum of the two numbers.",n.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE="Return the quotient of the two numbers.",n.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS="Return the difference of the two numbers.",n.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY="Return the product of the two numbers.",n.Msg.MATH_ARITHMETIC_TOOLTIP_POWER="Return the first number raised to the power of the second number.",n.Msg.MATH_ATAN2_HELPURL="https://en.wikipedia.org/wiki/Atan2",n.Msg.MATH_ATAN2_TITLE="atan2 of X:%1 Y:%2",n.Msg.MATH_ATAN2_TOOLTIP="Return the arctangent of point (X, Y) in degrees from -180 to 180.",n.Msg.MATH_CHANGE_HELPURL="https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter",n.Msg.MATH_CHANGE_TITLE="change %1 by %2",n.Msg.MATH_CHANGE_TOOLTIP="Add a number to variable '%1'.",n.Msg.MATH_CONSTANT_HELPURL="https://en.wikipedia.org/wiki/Mathematical_constant",n.Msg.MATH_CONSTANT_TOOLTIP="Return one of the common constants: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity).",n.Msg.MATH_CONSTRAIN_HELPURL="https://en.wikipedia.org/wiki/Clamping_(graphics)",n.Msg.MATH_CONSTRAIN_TITLE="constrain %1 low %2 high %3",n.Msg.MATH_CONSTRAIN_TOOLTIP="Constrain a number to be between the specified limits (inclusive).",n.Msg.MATH_DIVISION_SYMBOL="÷",n.Msg.MATH_IS_DIVISIBLE_BY="is divisible by",n.Msg.MATH_IS_EVEN="is even",n.Msg.MATH_IS_NEGATIVE="is negative",n.Msg.MATH_IS_ODD="is odd",n.Msg.MATH_IS_POSITIVE="is positive",n.Msg.MATH_IS_PRIME="is prime",n.Msg.MATH_IS_TOOLTIP="Check if a number is an even, odd, prime, whole, positive, negative, or if it is divisible by certain number. Returns true or false.",n.Msg.MATH_IS_WHOLE="is whole",n.Msg.MATH_MODULO_HELPURL="https://en.wikipedia.org/wiki/Modulo_operation",n.Msg.MATH_MODULO_TITLE="remainder of %1 ÷ %2",n.Msg.MATH_MODULO_TOOLTIP="Return the remainder from dividing the two numbers.",n.Msg.MATH_MULTIPLICATION_SYMBOL="×",n.Msg.MATH_NUMBER_HELPURL="https://en.wikipedia.org/wiki/Number",n.Msg.MATH_NUMBER_TOOLTIP="A number.",n.Msg.MATH_ONLIST_HELPURL="",n.Msg.MATH_ONLIST_OPERATOR_AVERAGE="average of list",n.Msg.MATH_ONLIST_OPERATOR_MAX="max of list",n.Msg.MATH_ONLIST_OPERATOR_MEDIAN="median of list",n.Msg.MATH_ONLIST_OPERATOR_MIN="min of list",n.Msg.MATH_ONLIST_OPERATOR_MODE="modes of list",n.Msg.MATH_ONLIST_OPERATOR_RANDOM="random item of list",n.Msg.MATH_ONLIST_OPERATOR_STD_DEV="standard deviation of list",n.Msg.MATH_ONLIST_OPERATOR_SUM="sum of list",n.Msg.MATH_ONLIST_TOOLTIP_AVERAGE="Return the average (arithmetic mean) of the numeric values in the list.",n.Msg.MATH_ONLIST_TOOLTIP_MAX="Return the largest number in the list.",n.Msg.MATH_ONLIST_TOOLTIP_MEDIAN="Return the median number in the list.",n.Msg.MATH_ONLIST_TOOLTIP_MIN="Return the smallest number in the list.",n.Msg.MATH_ONLIST_TOOLTIP_MODE="Return a list of the most common item(s) in the list.",n.Msg.MATH_ONLIST_TOOLTIP_RANDOM="Return a random element from the list.",n.Msg.MATH_ONLIST_TOOLTIP_STD_DEV="Return the standard deviation of the list.",n.Msg.MATH_ONLIST_TOOLTIP_SUM="Return the sum of all the numbers in the list.",n.Msg.MATH_POWER_SYMBOL="^",n.Msg.MATH_RANDOM_FLOAT_HELPURL="https://en.wikipedia.org/wiki/Random_number_generation",n.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM="random fraction",n.Msg.MATH_RANDOM_FLOAT_TOOLTIP="Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive).",n.Msg.MATH_RANDOM_INT_HELPURL="https://en.wikipedia.org/wiki/Random_number_generation",n.Msg.MATH_RANDOM_INT_TITLE="random integer from %1 to %2",n.Msg.MATH_RANDOM_INT_TOOLTIP="Return a random integer between the two specified limits, inclusive.",n.Msg.MATH_ROUND_HELPURL="https://en.wikipedia.org/wiki/Rounding",n.Msg.MATH_ROUND_OPERATOR_ROUND="round",n.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN="round down",n.Msg.MATH_ROUND_OPERATOR_ROUNDUP="round up",n.Msg.MATH_ROUND_TOOLTIP="Round a number up or down.",n.Msg.MATH_SINGLE_HELPURL="https://en.wikipedia.org/wiki/Square_root",n.Msg.MATH_SINGLE_OP_ABSOLUTE="absolute",n.Msg.MATH_SINGLE_OP_ROOT="square root",n.Msg.MATH_SINGLE_TOOLTIP_ABS="Return the absolute value of a number.",n.Msg.MATH_SINGLE_TOOLTIP_EXP="Return e to the power of a number.",n.Msg.MATH_SINGLE_TOOLTIP_LN="Return the natural logarithm of a number.",n.Msg.MATH_SINGLE_TOOLTIP_LOG10="Return the base 10 logarithm of a number.",n.Msg.MATH_SINGLE_TOOLTIP_NEG="Return the negation of a number.",n.Msg.MATH_SINGLE_TOOLTIP_POW10="Return 10 to the power of a number.",n.Msg.MATH_SINGLE_TOOLTIP_ROOT="Return the square root of a number.",n.Msg.MATH_SUBTRACTION_SYMBOL="-",n.Msg.MATH_TRIG_ACOS="acos",n.Msg.MATH_TRIG_ASIN="asin",n.Msg.MATH_TRIG_ATAN="atan",n.Msg.MATH_TRIG_COS="cos",n.Msg.MATH_TRIG_HELPURL="https://en.wikipedia.org/wiki/Trigonometric_functions",n.Msg.MATH_TRIG_SIN="sin",n.Msg.MATH_TRIG_TAN="tan",n.Msg.MATH_TRIG_TOOLTIP_ACOS="Return the arccosine of a number.",n.Msg.MATH_TRIG_TOOLTIP_ASIN="Return the arcsine of a number.",n.Msg.MATH_TRIG_TOOLTIP_ATAN="Return the arctangent of a number.",n.Msg.MATH_TRIG_TOOLTIP_COS="Return the cosine of a degree (not radian).",n.Msg.MATH_TRIG_TOOLTIP_SIN="Return the sine of a degree (not radian).",n.Msg.MATH_TRIG_TOOLTIP_TAN="Return the tangent of a degree (not radian).",n.Msg.NEW_COLOUR_VARIABLE="Create colour variable...",n.Msg.NEW_NUMBER_VARIABLE="Create number variable...",n.Msg.NEW_STRING_VARIABLE="Create string variable...",n.Msg.NEW_VARIABLE="Create variable...",n.Msg.NEW_VARIABLE_TITLE="New variable name:",n.Msg.NEW_VARIABLE_TYPE_TITLE="New variable type:",n.Msg.ORDINAL_NUMBER_SUFFIX="",n.Msg.PROCEDURES_ALLOW_STATEMENTS="allow statements",n.Msg.PROCEDURES_BEFORE_PARAMS="with:",n.Msg.PROCEDURES_CALLNORETURN_HELPURL="https://en.wikipedia.org/wiki/Subroutine",n.Msg.PROCEDURES_CALLNORETURN_TOOLTIP="Run the user-defined function '%1'.",n.Msg.PROCEDURES_CALLRETURN_HELPURL="https://en.wikipedia.org/wiki/Subroutine",n.Msg.PROCEDURES_CALLRETURN_TOOLTIP="Run the user-defined function '%1' and use its output.",n.Msg.PROCEDURES_CALL_BEFORE_PARAMS="with:",n.Msg.PROCEDURES_CREATE_DO="Create '%1'",n.Msg.PROCEDURES_DEFNORETURN_COMMENT="Describe this function...",n.Msg.PROCEDURES_DEFNORETURN_DO="",n.Msg.PROCEDURES_DEFNORETURN_HELPURL="https://en.wikipedia.org/wiki/Subroutine",n.Msg.PROCEDURES_DEFNORETURN_PROCEDURE="do something",n.Msg.PROCEDURES_DEFNORETURN_TITLE="to",n.Msg.PROCEDURES_DEFNORETURN_TOOLTIP="Creates a function with no output.",n.Msg.PROCEDURES_DEFRETURN_HELPURL="https://en.wikipedia.org/wiki/Subroutine",n.Msg.PROCEDURES_DEFRETURN_RETURN="return",n.Msg.PROCEDURES_DEFRETURN_TOOLTIP="Creates a function with an output.",n.Msg.PROCEDURES_DEF_DUPLICATE_WARNING="Warning: This function has duplicate parameters.",n.Msg.PROCEDURES_HIGHLIGHT_DEF="Highlight function definition",n.Msg.PROCEDURES_IFRETURN_HELPURL="https://c2.com/cgi/wiki?GuardClause",n.Msg.PROCEDURES_IFRETURN_TOOLTIP="If a value is true, then return a second value.",n.Msg.PROCEDURES_IFRETURN_WARNING="Warning: This block may be used only within a function definition.",n.Msg.PROCEDURES_MUTATORARG_TITLE="input name:",n.Msg.PROCEDURES_MUTATORARG_TOOLTIP="Add an input to the function.",n.Msg.PROCEDURES_MUTATORCONTAINER_TITLE="inputs",n.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP="Add, remove, or reorder inputs to this function.",n.Msg.REDO="Redo",n.Msg.REMOVE_COMMENT="Remove Comment",n.Msg.RENAME_VARIABLE="Rename variable...",n.Msg.RENAME_VARIABLE_TITLE="Rename all '%1' variables to:",n.Msg.TEXT_APPEND_HELPURL="https://github.com/google/blockly/wiki/Text#text-modification",n.Msg.TEXT_APPEND_TITLE="to %1 append text %2",n.Msg.TEXT_APPEND_TOOLTIP="Append some text to variable '%1'.",n.Msg.TEXT_CHANGECASE_HELPURL="https://github.com/google/blockly/wiki/Text#adjusting-text-case",n.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE="to lower case",n.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE="to Title Case",n.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE="to UPPER CASE",n.Msg.TEXT_CHANGECASE_TOOLTIP="Return a copy of the text in a different case.",n.Msg.TEXT_CHARAT_FIRST="get first letter",n.Msg.TEXT_CHARAT_FROM_END="get letter # from end",n.Msg.TEXT_CHARAT_FROM_START="get letter #",n.Msg.TEXT_CHARAT_HELPURL="https://github.com/google/blockly/wiki/Text#extracting-text",n.Msg.TEXT_CHARAT_LAST="get last letter",n.Msg.TEXT_CHARAT_RANDOM="get random letter",n.Msg.TEXT_CHARAT_TAIL="",n.Msg.TEXT_CHARAT_TITLE="in text %1 %2",n.Msg.TEXT_CHARAT_TOOLTIP="Returns the letter at the specified position.",n.Msg.TEXT_COUNT_HELPURL="https://github.com/google/blockly/wiki/Text#counting-substrings",n.Msg.TEXT_COUNT_MESSAGE0="count %1 in %2",n.Msg.TEXT_COUNT_TOOLTIP="Count how many times some text occurs within some other text.",n.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP="Add an item to the text.",n.Msg.TEXT_CREATE_JOIN_TITLE_JOIN="join",n.Msg.TEXT_CREATE_JOIN_TOOLTIP="Add, remove, or reorder sections to reconfigure this text block.",n.Msg.TEXT_GET_SUBSTRING_END_FROM_END="to letter # from end",n.Msg.TEXT_GET_SUBSTRING_END_FROM_START="to letter #",n.Msg.TEXT_GET_SUBSTRING_END_LAST="to last letter",n.Msg.TEXT_GET_SUBSTRING_HELPURL="https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text",n.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT="in text",n.Msg.TEXT_GET_SUBSTRING_START_FIRST="get substring from first letter",n.Msg.TEXT_GET_SUBSTRING_START_FROM_END="get substring from letter # from end",n.Msg.TEXT_GET_SUBSTRING_START_FROM_START="get substring from letter #",n.Msg.TEXT_GET_SUBSTRING_TAIL="",n.Msg.TEXT_GET_SUBSTRING_TOOLTIP="Returns a specified portion of the text.",n.Msg.TEXT_INDEXOF_HELPURL="https://github.com/google/blockly/wiki/Text#finding-text",n.Msg.TEXT_INDEXOF_OPERATOR_FIRST="find first occurrence of text",n.Msg.TEXT_INDEXOF_OPERATOR_LAST="find last occurrence of text",n.Msg.TEXT_INDEXOF_TITLE="in text %1 %2 %3",n.Msg.TEXT_INDEXOF_TOOLTIP="Returns the index of the first/last occurrence of the first text in the second text. Returns %1 if text is not found.",n.Msg.TEXT_ISEMPTY_HELPURL="https://github.com/google/blockly/wiki/Text#checking-for-empty-text",n.Msg.TEXT_ISEMPTY_TITLE="%1 is empty",n.Msg.TEXT_ISEMPTY_TOOLTIP="Returns true if the provided text is empty.",n.Msg.TEXT_JOIN_HELPURL="https://github.com/google/blockly/wiki/Text#text-creation",n.Msg.TEXT_JOIN_TITLE_CREATEWITH="create text with",n.Msg.TEXT_JOIN_TOOLTIP="Create a piece of text by joining together any number of items.",n.Msg.TEXT_LENGTH_HELPURL="https://github.com/google/blockly/wiki/Text#text-modification",n.Msg.TEXT_LENGTH_TITLE="length of %1",n.Msg.TEXT_LENGTH_TOOLTIP="Returns the number of letters (including spaces) in the provided text.",n.Msg.TEXT_PRINT_HELPURL="https://github.com/google/blockly/wiki/Text#printing-text",n.Msg.TEXT_PRINT_TITLE="print %1",n.Msg.TEXT_PRINT_TOOLTIP="Print the specified text, number or other value.",n.Msg.TEXT_PROMPT_HELPURL="https://github.com/google/blockly/wiki/Text#getting-input-from-the-user",n.Msg.TEXT_PROMPT_TOOLTIP_NUMBER="Prompt for user for a number.",n.Msg.TEXT_PROMPT_TOOLTIP_TEXT="Prompt for user for some text.",n.Msg.TEXT_PROMPT_TYPE_NUMBER="prompt for number with message",n.Msg.TEXT_PROMPT_TYPE_TEXT="prompt for text with message",n.Msg.TEXT_REPLACE_HELPURL="https://github.com/google/blockly/wiki/Text#replacing-substrings",n.Msg.TEXT_REPLACE_MESSAGE0="replace %1 with %2 in %3",n.Msg.TEXT_REPLACE_TOOLTIP="Replace all occurances of some text within some other text.",n.Msg.TEXT_REVERSE_HELPURL="https://github.com/google/blockly/wiki/Text#reversing-text",n.Msg.TEXT_REVERSE_MESSAGE0="reverse %1",n.Msg.TEXT_REVERSE_TOOLTIP="Reverses the order of the characters in the text.",n.Msg.TEXT_TEXT_HELPURL="https://en.wikipedia.org/wiki/String_(computer_science)",n.Msg.TEXT_TEXT_TOOLTIP="A letter, word, or line of text.",n.Msg.TEXT_TRIM_HELPURL="https://github.com/google/blockly/wiki/Text#trimming-removing-spaces",n.Msg.TEXT_TRIM_OPERATOR_BOTH="trim spaces from both sides of",n.Msg.TEXT_TRIM_OPERATOR_LEFT="trim spaces from left side of",n.Msg.TEXT_TRIM_OPERATOR_RIGHT="trim spaces from right side of",n.Msg.TEXT_TRIM_TOOLTIP="Return a copy of the text with spaces removed from one or both ends.",n.Msg.TODAY="Today",n.Msg.UNDO="Undo",n.Msg.UNNAMED_KEY="unnamed",n.Msg.VARIABLES_DEFAULT_NAME="item",n.Msg.VARIABLES_GET_CREATE_SET="Create 'set %1'",n.Msg.VARIABLES_GET_HELPURL="https://github.com/google/blockly/wiki/Variables#get",n.Msg.VARIABLES_GET_TOOLTIP="Returns the value of this variable.",n.Msg.VARIABLES_SET="set %1 to %2",n.Msg.VARIABLES_SET_CREATE_GET="Create 'get %1'",n.Msg.VARIABLES_SET_HELPURL="https://github.com/google/blockly/wiki/Variables#set",n.Msg.VARIABLES_SET_TOOLTIP="Sets this variable to be equal to the input.",n.Msg.VARIABLE_ALREADY_EXISTS="A variable named '%1' already exists.",n.Msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE="A variable named '%1' already exists for another type: '%2'.",n.Msg.VARIABLE_ALREADY_EXISTS_FOR_A_PARAMETER="A variable named '%1' already exists as a parameter in the procedure '%2'.",n.Msg.WORKSPACE_ARIA_LABEL="Blockly Workspace",n.Msg.WORKSPACE_COMMENT_DEFAULT_TEXT="Say something...",n.Msg.CONTROLS_FOREACH_INPUT_DO=n.Msg.CONTROLS_REPEAT_INPUT_DO,n.Msg.CONTROLS_FOR_INPUT_DO=n.Msg.CONTROLS_REPEAT_INPUT_DO,n.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF=n.Msg.CONTROLS_IF_MSG_ELSEIF,n.Msg.CONTROLS_IF_ELSE_TITLE_ELSE=n.Msg.CONTROLS_IF_MSG_ELSE,n.Msg.CONTROLS_IF_IF_TITLE_IF=n.Msg.CONTROLS_IF_MSG_IF,n.Msg.CONTROLS_IF_MSG_THEN=n.Msg.CONTROLS_REPEAT_INPUT_DO,n.Msg.CONTROLS_WHILEUNTIL_INPUT_DO=n.Msg.CONTROLS_REPEAT_INPUT_DO,n.Msg.LISTS_CREATE_WITH_ITEM_TITLE=n.Msg.VARIABLES_DEFAULT_NAME,n.Msg.LISTS_GET_INDEX_HELPURL=n.Msg.LISTS_INDEX_OF_HELPURL,n.Msg.LISTS_GET_INDEX_INPUT_IN_LIST=n.Msg.LISTS_INLIST,n.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST=n.Msg.LISTS_INLIST,n.Msg.LISTS_INDEX_OF_INPUT_IN_LIST=n.Msg.LISTS_INLIST,n.Msg.LISTS_SET_INDEX_INPUT_IN_LIST=n.Msg.LISTS_INLIST,n.Msg.MATH_CHANGE_TITLE_ITEM=n.Msg.VARIABLES_DEFAULT_NAME,n.Msg.PROCEDURES_DEFRETURN_COMMENT=n.Msg.PROCEDURES_DEFNORETURN_COMMENT,n.Msg.PROCEDURES_DEFRETURN_DO=n.Msg.PROCEDURES_DEFNORETURN_DO,n.Msg.PROCEDURES_DEFRETURN_PROCEDURE=n.Msg.PROCEDURES_DEFNORETURN_PROCEDURE,n.Msg.PROCEDURES_DEFRETURN_TITLE=n.Msg.PROCEDURES_DEFNORETURN_TITLE,n.Msg.TEXT_APPEND_VARIABLE=n.Msg.VARIABLES_DEFAULT_NAME,n.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM=n.Msg.VARIABLES_DEFAULT_NAME,n.Msg.MATH_HUE="230",n.Msg.LOOPS_HUE="120",n.Msg.LISTS_HUE="260",n.Msg.LOGIC_HUE="210",n.Msg.VARIABLES_HUE="330",n.Msg.TEXTS_HUE="160",n.Msg.PROCEDURES_HUE="290",n.Msg.COLOUR_HUE="20",n.Msg.VARIABLES_DYNAMIC_HUE="310",n.Msg})}(BR)),BR.exports}var FR={exports:{}},UR={exports:{}},_7=UR.exports,cF;function T7(){return cF||(cF=1,function(e,t){(function(n,s){e.exports=s(sA())})(_7,function(n){var s=n.__namespace__,i=s.createBlockDefinitionsFromJsonArray$$module$build$src$core$common([{type:"variables_get_dynamic",message0:"%1",args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_VARIABLES_DEFAULT_NAME}"}],output:null,style:"variable_dynamic_blocks",helpUrl:"%{BKY_VARIABLES_GET_HELPURL}",tooltip:"%{BKY_VARIABLES_GET_TOOLTIP}",extensions:["contextMenu_variableDynamicSetterGetter"]},{type:"variables_set_dynamic",message0:"%{BKY_VARIABLES_SET}",args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_VARIABLES_DEFAULT_NAME}"},{type:"input_value",name:"VALUE"}],previousStatement:null,nextStatement:null,style:"variable_dynamic_blocks",tooltip:"%{BKY_VARIABLES_SET_TOOLTIP}",helpUrl:"%{BKY_VARIABLES_SET_HELPURL}",extensions:["contextMenu_variableDynamicSetterGetter"]}]),r={customContextMenu:function(q){if(this.isInFlyout)(this.type==="variables_get_dynamic"||this.type==="variables_get_reporter_dynamic")&&(Le={text:s.Msg$$module$build$src$core$msg.RENAME_VARIABLE,enabled:!0,callback:a(this)},ue=this.getField("VAR").getText(),ue={text:s.Msg$$module$build$src$core$msg.DELETE_VARIABLE.replace("%1",ue),enabled:!0,callback:c(this)},q.unshift(Le),q.unshift(ue));else{if(this.type==="variables_get_dynamic")var ne="variables_set_dynamic",Le=s.Msg$$module$build$src$core$msg.VARIABLES_GET_CREATE_SET;else ne="variables_get_dynamic",Le=s.Msg$$module$build$src$core$msg.VARIABLES_SET_CREATE_GET;var ue=this.getField("VAR");ne={type:ne,fields:{VAR:ue.saveState(!0)}},q.push({enabled:0<this.workspace.remainingCapacity(),text:Le.replace("%1",ue.getText()),callback:s.callbackFactory$$module$build$src$core$contextmenu(this,ne)})}},onchange:function(q){q=this.getFieldValue("VAR"),q=s.getVariable$$module$build$src$core$variables(this.workspace,q),this.type==="variables_get_dynamic"?this.outputConnection.setCheck(q.type):this.getInput("VALUE").connection.setCheck(q.type)}},a=function(q){return function(){const ne=q.workspace,Le=q.getField("VAR").getVariable();s.renameVariable$$module$build$src$core$variables(ne,Le)}},c=function(q){return function(){const ne=q.workspace,Le=q.getField("VAR").getVariable();ne.deleteVariableById(Le.getId()),ne.refreshToolboxSelection()}};s.registerMixin$$module$build$src$core$extensions("contextMenu_variableDynamicSetterGetter",r),s.defineBlocks$$module$build$src$core$common(i);var u={blocks:i},h=s.createBlockDefinitionsFromJsonArray$$module$build$src$core$common([{type:"variables_get",message0:"%1",args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_VARIABLES_DEFAULT_NAME}"}],output:null,style:"variable_blocks",helpUrl:"%{BKY_VARIABLES_GET_HELPURL}",tooltip:"%{BKY_VARIABLES_GET_TOOLTIP}",extensions:["contextMenu_variableSetterGetter"]},{type:"variables_set",message0:"%{BKY_VARIABLES_SET}",args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_VARIABLES_DEFAULT_NAME}"},{type:"input_value",name:"VALUE"}],previousStatement:null,nextStatement:null,style:"variable_blocks",tooltip:"%{BKY_VARIABLES_SET_TOOLTIP}",helpUrl:"%{BKY_VARIABLES_SET_HELPURL}",extensions:["contextMenu_variableSetterGetter"]}]),f={customContextMenu:function(q){if(this.isInFlyout)(this.type==="variables_get"||this.type==="variables_get_reporter")&&(Le={text:s.Msg$$module$build$src$core$msg.RENAME_VARIABLE,enabled:!0,callback:p(this)},ue=this.getField("VAR").getText(),ue={text:s.Msg$$module$build$src$core$msg.DELETE_VARIABLE.replace("%1",ue),enabled:!0,callback:_(this)},q.unshift(Le),q.unshift(ue));else{if(this.type==="variables_get")var ne="variables_set",Le=s.Msg$$module$build$src$core$msg.VARIABLES_GET_CREATE_SET;else ne="variables_get",Le=s.Msg$$module$build$src$core$msg.VARIABLES_SET_CREATE_GET;var ue=this.getField("VAR");ne={type:ne,fields:{VAR:ue.saveState(!0)}},q.push({enabled:0<this.workspace.remainingCapacity(),text:Le.replace("%1",ue.getText()),callback:s.callbackFactory$$module$build$src$core$contextmenu(this,ne)})}}},p=function(q){return function(){const ne=q.workspace,Le=q.getField("VAR").getVariable();s.renameVariable$$module$build$src$core$variables(ne,Le)}},_=function(q){return function(){const ne=q.workspace,Le=q.getField("VAR").getVariable();ne.deleteVariableById(Le.getId()),ne.refreshToolboxSelection()}};s.registerMixin$$module$build$src$core$extensions("contextMenu_variableSetterGetter",f),s.defineBlocks$$module$build$src$core$common(h);var E={blocks:h},v=s.createBlockDefinitionsFromJsonArray$$module$build$src$core$common([{type:"text",message0:"%1",args0:[{type:"field_input",name:"TEXT",text:""}],output:"String",style:"text_blocks",helpUrl:"%{BKY_TEXT_TEXT_HELPURL}",tooltip:"%{BKY_TEXT_TEXT_TOOLTIP}",extensions:["text_quotes","parent_tooltip_when_inline"]},{type:"text_multiline",message0:"%1 %2",args0:[{type:"field_image",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAARCAYAAADpPU2iAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAdhgAAHYYBXaITgQAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMS42/U4J6AAAAP1JREFUOE+Vks0KQUEYhjmRIja4ABtZ2dm5A3t3Ia6AUm7CylYuQRaUhZSlLZJiQbFAyRnPN33y01HOW08z8873zpwzM4F3GWOCruvGIE4/rLaV+Nq1hVGMBqzhqlxgCys4wJA65xnogMHsQ5lujnYHTejBBCK2mE4abjCgMGhNxHgDFWjDSG07kdfVa2pZMf4ZyMAdWmpZMfYOsLiDMYMjlMB+K613QISRhTnITnsYg5yUd0DETmEoMlkFOeIT/A58iyK5E18BuTBfgYXfwNJv4P9/oEBerLylOnRhygmGdPpTTBZAPkde61lbQe4moWUvYUZYLfUNftIY4zwA5X2Z9AYnQrEAAAAASUVORK5CYII=",width:12,height:17,alt:"¶"},{type:"field_multilinetext",name:"TEXT",text:""}],output:"String",style:"text_blocks",helpUrl:"%{BKY_TEXT_TEXT_HELPURL}",tooltip:"%{BKY_TEXT_TEXT_TOOLTIP}",extensions:["parent_tooltip_when_inline"]},{type:"text_join",message0:"",output:"String",style:"text_blocks",helpUrl:"%{BKY_TEXT_JOIN_HELPURL}",tooltip:"%{BKY_TEXT_JOIN_TOOLTIP}",mutator:"text_join_mutator"},{type:"text_create_join_container",message0:"%{BKY_TEXT_CREATE_JOIN_TITLE_JOIN} %1 %2",args0:[{type:"input_dummy"},{type:"input_statement",name:"STACK"}],style:"text_blocks",tooltip:"%{BKY_TEXT_CREATE_JOIN_TOOLTIP}",enableContextMenu:!1},{type:"text_create_join_item",message0:"%{BKY_TEXT_CREATE_JOIN_ITEM_TITLE_ITEM}",previousStatement:null,nextStatement:null,style:"text_blocks",tooltip:"%{BKY_TEXT_CREATE_JOIN_ITEM_TOOLTIP}",enableContextMenu:!1},{type:"text_append",message0:"%{BKY_TEXT_APPEND_TITLE}",args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_TEXT_APPEND_VARIABLE}"},{type:"input_value",name:"TEXT"}],previousStatement:null,nextStatement:null,style:"text_blocks",extensions:["text_append_tooltip"]},{type:"text_length",message0:"%{BKY_TEXT_LENGTH_TITLE}",args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Number",style:"text_blocks",tooltip:"%{BKY_TEXT_LENGTH_TOOLTIP}",helpUrl:"%{BKY_TEXT_LENGTH_HELPURL}"},{type:"text_isEmpty",message0:"%{BKY_TEXT_ISEMPTY_TITLE}",args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Boolean",style:"text_blocks",tooltip:"%{BKY_TEXT_ISEMPTY_TOOLTIP}",helpUrl:"%{BKY_TEXT_ISEMPTY_HELPURL}"},{type:"text_indexOf",message0:"%{BKY_TEXT_INDEXOF_TITLE}",args0:[{type:"input_value",name:"VALUE",check:"String"},{type:"field_dropdown",name:"END",options:[["%{BKY_TEXT_INDEXOF_OPERATOR_FIRST}","FIRST"],["%{BKY_TEXT_INDEXOF_OPERATOR_LAST}","LAST"]]},{type:"input_value",name:"FIND",check:"String"}],output:"Number",style:"text_blocks",helpUrl:"%{BKY_TEXT_INDEXOF_HELPURL}",inputsInline:!0,extensions:["text_indexOf_tooltip"]},{type:"text_charAt",message0:"%{BKY_TEXT_CHARAT_TITLE}",args0:[{type:"input_value",name:"VALUE",check:"String"},{type:"field_dropdown",name:"WHERE",options:[["%{BKY_TEXT_CHARAT_FROM_START}","FROM_START"],["%{BKY_TEXT_CHARAT_FROM_END}","FROM_END"],["%{BKY_TEXT_CHARAT_FIRST}","FIRST"],["%{BKY_TEXT_CHARAT_LAST}","LAST"],["%{BKY_TEXT_CHARAT_RANDOM}","RANDOM"]]}],output:"String",style:"text_blocks",helpUrl:"%{BKY_TEXT_CHARAT_HELPURL}",inputsInline:!0,mutator:"text_charAt_mutator"}]),b={init:function(){this.WHERE_OPTIONS_1=[[s.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_START_FROM_START,"FROM_START"],[s.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_START_FROM_END,"FROM_END"],[s.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[s.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_END_FROM_START,"FROM_START"],[s.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_END_FROM_END,"FROM_END"],[s.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_END_LAST,"LAST"]],this.setHelpUrl(s.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_HELPURL),this.setStyle("text_blocks"),this.appendValueInput("STRING").setCheck("String").appendField(s.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),s.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_TAIL&&this.appendDummyInput("TAIL").appendField(s.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_TAIL),this.setInputsInline(!0),this.setOutput(!0,"String"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(s.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_TOOLTIP)},mutationToDom:function(){const q=s.createElement$$module$build$src$core$utils$xml("mutation");var ne=this.getInput("AT1")instanceof s.ValueInput$$module$build$src$core$inputs$value_input;return q.setAttribute("at1",`${ne}`),ne=this.getInput("AT2")instanceof s.ValueInput$$module$build$src$core$inputs$value_input,q.setAttribute("at2",`${ne}`),q},domToMutation:function(q){const ne=q.getAttribute("at1")==="true";q=q.getAttribute("at2")==="true",this.updateAt_(1,ne),this.updateAt_(2,q)},updateAt_:function(q,ne){this.removeInput("AT"+q),this.removeInput("ORDINAL"+q,!0),ne?(this.appendValueInput("AT"+q).setCheck("Number"),s.Msg$$module$build$src$core$msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL"+q).appendField(s.Msg$$module$build$src$core$msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT"+q),q===2&&s.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_TAIL&&(this.removeInput("TAIL",!0),this.appendDummyInput("TAIL").appendField(s.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_TAIL));const Le=s.fromJson$$module$build$src$core$field_registry({type:"field_dropdown",options:this["WHERE_OPTIONS_"+q]});Le.setValidator(function(ue){const Fe=ue==="FROM_START"||ue==="FROM_END";if(Fe!==ne){const ye=this.getSourceBlock();return ye.updateAt_(q,Fe),ye.setFieldValue(ue,"WHERE"+q),null}}),this.getInput("AT"+q).appendField(Le,"WHERE"+q),q===1&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}};v.text_getSubstring=b,v.text_changeCase={init:function(){const q=[[s.Msg$$module$build$src$core$msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE,"UPPERCASE"],[s.Msg$$module$build$src$core$msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE,"LOWERCASE"],[s.Msg$$module$build$src$core$msg.TEXT_CHANGECASE_OPERATOR_TITLECASE,"TITLECASE"]];this.setHelpUrl(s.Msg$$module$build$src$core$msg.TEXT_CHANGECASE_HELPURL),this.setStyle("text_blocks"),this.appendValueInput("TEXT").setCheck("String").appendField(s.fromJson$$module$build$src$core$field_registry({type:"field_dropdown",options:q}),"CASE"),this.setOutput(!0,"String"),this.setTooltip(s.Msg$$module$build$src$core$msg.TEXT_CHANGECASE_TOOLTIP)}},v.text_trim={init:function(){const q=[[s.Msg$$module$build$src$core$msg.TEXT_TRIM_OPERATOR_BOTH,"BOTH"],[s.Msg$$module$build$src$core$msg.TEXT_TRIM_OPERATOR_LEFT,"LEFT"],[s.Msg$$module$build$src$core$msg.TEXT_TRIM_OPERATOR_RIGHT,"RIGHT"]];this.setHelpUrl(s.Msg$$module$build$src$core$msg.TEXT_TRIM_HELPURL),this.setStyle("text_blocks"),this.appendValueInput("TEXT").setCheck("String").appendField(s.fromJson$$module$build$src$core$field_registry({type:"field_dropdown",options:q}),"MODE"),this.setOutput(!0,"String"),this.setTooltip(s.Msg$$module$build$src$core$msg.TEXT_TRIM_TOOLTIP)}},v.text_print={init:function(){this.jsonInit({message0:s.Msg$$module$build$src$core$msg.TEXT_PRINT_TITLE,args0:[{type:"input_value",name:"TEXT"}],previousStatement:null,nextStatement:null,style:"text_blocks",tooltip:s.Msg$$module$build$src$core$msg.TEXT_PRINT_TOOLTIP,helpUrl:s.Msg$$module$build$src$core$msg.TEXT_PRINT_HELPURL})}};var y={updateType_:function(q){this.outputConnection.setCheck(q==="NUMBER"?"Number":"String")},mutationToDom:function(){const q=s.createElement$$module$build$src$core$utils$xml("mutation");return q.setAttribute("type",this.getFieldValue("TYPE")),q},domToMutation:function(q){this.updateType_(q.getAttribute("type"))}};v.text_prompt_ext=Object.assign({},y,{init:function(){var q=[[s.Msg$$module$build$src$core$msg.TEXT_PROMPT_TYPE_TEXT,"TEXT"],[s.Msg$$module$build$src$core$msg.TEXT_PROMPT_TYPE_NUMBER,"NUMBER"]];this.setHelpUrl(s.Msg$$module$build$src$core$msg.TEXT_PROMPT_HELPURL),this.setStyle("text_blocks"),q=s.fromJson$$module$build$src$core$field_registry({type:"field_dropdown",options:q}),q.setValidator(ne=>{this.updateType_(ne)}),this.appendValueInput("TEXT").appendField(q,"TYPE"),this.setOutput(!0,"String"),this.setTooltip(()=>this.getFieldValue("TYPE")==="TEXT"?s.Msg$$module$build$src$core$msg.TEXT_PROMPT_TOOLTIP_TEXT:s.Msg$$module$build$src$core$msg.TEXT_PROMPT_TOOLTIP_NUMBER)}});var S=Object.assign({},y,{init:function(){this.mixin(L);var q=[[s.Msg$$module$build$src$core$msg.TEXT_PROMPT_TYPE_TEXT,"TEXT"],[s.Msg$$module$build$src$core$msg.TEXT_PROMPT_TYPE_NUMBER,"NUMBER"]];this.setHelpUrl(s.Msg$$module$build$src$core$msg.TEXT_PROMPT_HELPURL),this.setStyle("text_blocks"),q=s.fromJson$$module$build$src$core$field_registry({type:"field_dropdown",options:q}),q.setValidator(ne=>{this.updateType_(ne)}),this.appendDummyInput().appendField(q,"TYPE").appendField(this.newQuote_(!0)).appendField(s.fromJson$$module$build$src$core$field_registry({type:"field_input",text:""}),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,"String"),this.setTooltip(()=>this.getFieldValue("TYPE")==="TEXT"?s.Msg$$module$build$src$core$msg.TEXT_PROMPT_TOOLTIP_TEXT:s.Msg$$module$build$src$core$msg.TEXT_PROMPT_TOOLTIP_NUMBER)}});v.text_prompt=S,v.text_count={init:function(){this.jsonInit({message0:s.Msg$$module$build$src$core$msg.TEXT_COUNT_MESSAGE0,args0:[{type:"input_value",name:"SUB",check:"String"},{type:"input_value",name:"TEXT",check:"String"}],output:"Number",inputsInline:!0,style:"text_blocks",tooltip:s.Msg$$module$build$src$core$msg.TEXT_COUNT_TOOLTIP,helpUrl:s.Msg$$module$build$src$core$msg.TEXT_COUNT_HELPURL})}},v.text_replace={init:function(){this.jsonInit({message0:s.Msg$$module$build$src$core$msg.TEXT_REPLACE_MESSAGE0,args0:[{type:"input_value",name:"FROM",check:"String"},{type:"input_value",name:"TO",check:"String"},{type:"input_value",name:"TEXT",check:"String"}],output:"String",inputsInline:!0,style:"text_blocks",tooltip:s.Msg$$module$build$src$core$msg.TEXT_REPLACE_TOOLTIP,helpUrl:s.Msg$$module$build$src$core$msg.TEXT_REPLACE_HELPURL})}},v.text_reverse={init:function(){this.jsonInit({message0:s.Msg$$module$build$src$core$msg.TEXT_REVERSE_MESSAGE0,args0:[{type:"input_value",name:"TEXT",check:"String"}],output:"String",inputsInline:!0,style:"text_blocks",tooltip:s.Msg$$module$build$src$core$msg.TEXT_REVERSE_TOOLTIP,helpUrl:s.Msg$$module$build$src$core$msg.TEXT_REVERSE_HELPURL})}};var L={QUOTE_IMAGE_LEFT_DATAURI:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAn0lEQVQI1z3OMa5BURSF4f/cQhAKjUQhuQmFNwGJEUi0RKN5rU7FHKhpjEH3TEMtkdBSCY1EIv8r7nFX9e29V7EBAOvu7RPjwmWGH/VuF8CyN9/OAdvqIXYLvtRaNjx9mMTDyo+NjAN1HNcl9ZQ5oQMM3dgDUqDo1l8DzvwmtZN7mnD+PkmLa+4mhrxVA9fRowBWmVBhFy5gYEjKMfz9AylsaRRgGzvZAAAAAElFTkSuQmCC",QUOTE_IMAGE_RIGHT_DATAURI:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAqUlEQVQI1z3KvUpCcRiA8ef9E4JNHhI0aFEacm1o0BsI0Slx8wa8gLauoDnoBhq7DcfWhggONDmJJgqCPA7neJ7p934EOOKOnM8Q7PDElo/4x4lFb2DmuUjcUzS3URnGib9qaPNbuXvBO3sGPHJDRG6fGVdMSeWDP2q99FQdFrz26Gu5Tq7dFMzUvbXy8KXeAj57cOklgA+u1B5AoslLtGIHQMaCVnwDnADZIFIrXsoXrgAAAABJRU5ErkJggg==",QUOTE_IMAGE_WIDTH:12,QUOTE_IMAGE_HEIGHT:12,quoteField_:function(q){for(let ne=0,Le;Le=this.inputList[ne];ne++)for(let ue=0,Fe;Fe=Le.fieldRow[ue];ue++)if(q===Fe.name){Le.insertFieldAt(ue,this.newQuote_(!0)),Le.insertFieldAt(ue+2,this.newQuote_(!1));return}console.warn('field named "'+q+'" not found in '+this.toDevString())},newQuote_:function(q){return q=this.RTL?!q:q,s.fromJson$$module$build$src$core$field_registry({type:"field_image",src:q?this.QUOTE_IMAGE_LEFT_DATAURI:this.QUOTE_IMAGE_RIGHT_DATAURI,width:this.QUOTE_IMAGE_WIDTH,height:this.QUOTE_IMAGE_HEIGHT,alt:q?"“":"”"})}},I=function(){this.mixin(L),this.quoteField_("TEXT")},R={itemCount_:0,mutationToDom:function(){const q=s.createElement$$module$build$src$core$utils$xml("mutation");return q.setAttribute("items",`${this.itemCount_}`),q},domToMutation:function(q){this.itemCount_=parseInt(q.getAttribute("items"),10),this.updateShape_()},saveExtraState:function(){return{itemCount:this.itemCount_}},loadExtraState:function(q){this.itemCount_=q.itemCount,this.updateShape_()},decompose:function(q){const ne=q.newBlock("text_create_join_container");ne.initSvg();let Le=ne.getInput("STACK").connection;for(let ue=0;ue<this.itemCount_;ue++){const Fe=q.newBlock("text_create_join_item");Fe.initSvg(),Le.connect(Fe.previousConnection),Le=Fe.nextConnection}return ne},compose:function(q){var ne=q.getInputTargetBlock("STACK");for(q=[];ne;)ne.isInsertionMarker()||q.push(ne.valueConnection_),ne=ne.getNextBlock();for(ne=0;ne<this.itemCount_;ne++){const Le=this.getInput("ADD"+ne).connection.targetConnection;Le&&q.indexOf(Le)===-1&&Le.disconnect()}for(this.itemCount_=q.length,this.updateShape_(),ne=0;ne<this.itemCount_;ne++){let Le;(Le=q[ne])==null||Le.reconnect(this,"ADD"+ne)}},saveConnections:function(q){q=q.getInputTargetBlock("STACK");let ne=0;for(;q;){if(q.isInsertionMarker()){q=q.getNextBlock();continue}const Le=this.getInput("ADD"+ne);q.valueConnection_=Le&&Le.connection.targetConnection,q=q.getNextBlock(),ne++}},updateShape_:function(){this.itemCount_&&this.getInput("EMPTY")?this.removeInput("EMPTY"):this.itemCount_||this.getInput("EMPTY")||this.appendDummyInput("EMPTY").appendField(this.newQuote_(!0)).appendField(this.newQuote_(!1));for(var q=0;q<this.itemCount_;q++)if(!this.getInput("ADD"+q)){const ne=this.appendValueInput("ADD"+q).setAlign(s.Align$$module$build$src$core$inputs$align.RIGHT);q===0&&ne.appendField(s.Msg$$module$build$src$core$msg.TEXT_JOIN_TITLE_CREATEWITH)}for(q=this.itemCount_;this.getInput("ADD"+q);q++)this.removeInput("ADD"+q)}},w=function(){this.mixin(L),this.itemCount_=2,this.updateShape_(),this.setMutator(new s.MutatorIcon$$module$build$src$core$icons$mutator_icon(["text_create_join_item"],this))};s.register$$module$build$src$core$extensions("text_append_tooltip",s.buildTooltipWithFieldText$$module$build$src$core$extensions("%{BKY_TEXT_APPEND_TOOLTIP}","VAR"));var k=function(){this.setTooltip(()=>s.Msg$$module$build$src$core$msg.TEXT_INDEXOF_TOOLTIP.replace("%1",this.workspace.options.oneBasedIndex?"0":"-1"))},D={isAt_:!1,mutationToDom:function(){const q=s.createElement$$module$build$src$core$utils$xml("mutation");return q.setAttribute("at",`${this.isAt_}`),q},domToMutation:function(q){q=q.getAttribute("at")!=="false",this.updateAt_(q)},updateAt_:function(q){this.removeInput("AT",!0),this.removeInput("ORDINAL",!0),q&&(this.appendValueInput("AT").setCheck("Number"),s.Msg$$module$build$src$core$msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL").appendField(s.Msg$$module$build$src$core$msg.ORDINAL_NUMBER_SUFFIX)),s.Msg$$module$build$src$core$msg.TEXT_CHARAT_TAIL&&(this.removeInput("TAIL",!0),this.appendDummyInput("TAIL").appendField(s.Msg$$module$build$src$core$msg.TEXT_CHARAT_TAIL)),this.isAt_=q}},P=function(){this.getField("WHERE").setValidator(function(q){q=q==="FROM_START"||q==="FROM_END";const ne=this.getSourceBlock();q!==ne.isAt_&&ne.updateAt_(q)}),this.updateAt_(!0),this.setTooltip(()=>{var q=this.getFieldValue("WHERE");let ne=s.Msg$$module$build$src$core$msg.TEXT_CHARAT_TOOLTIP;return(q==="FROM_START"||q==="FROM_END")&&(q=q==="FROM_START"?s.Msg$$module$build$src$core$msg.LISTS_INDEX_FROM_START_TOOLTIP:s.Msg$$module$build$src$core$msg.LISTS_INDEX_FROM_END_TOOLTIP)&&(ne+=" "+q.replace("%1",this.workspace.options.oneBasedIndex?"#1":"#0")),ne})};s.register$$module$build$src$core$extensions("text_indexOf_tooltip",k),s.register$$module$build$src$core$extensions("text_quotes",I),s.registerMixin$$module$build$src$core$extensions("quote_image_mixin",L),s.registerMutator$$module$build$src$core$extensions("text_join_mutator",R,w),s.registerMutator$$module$build$src$core$extensions("text_charAt_mutator",D,P),s.defineBlocks$$module$build$src$core$common(v);var B={blocks:v},F={},X={setStatements_:function(q){this.hasStatements_!==q&&(q?(this.appendStatementInput("STACK").appendField(s.Msg$$module$build$src$core$msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=q)},updateParams_:function(){let q="";this.arguments_.length&&(q=s.Msg$$module$build$src$core$msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),s.disable$$module$build$src$core$events$utils();try{this.setFieldValue(q,"PARAMS")}finally{s.enable$$module$build$src$core$events$utils()}},mutationToDom:function(q){const ne=s.createElement$$module$build$src$core$utils$xml("mutation");q&&ne.setAttribute("name",this.getFieldValue("NAME"));for(let Le=0;Le<this.argumentVarModels_.length;Le++){const ue=s.createElement$$module$build$src$core$utils$xml("arg"),Fe=this.argumentVarModels_[Le];ue.setAttribute("name",Fe.name),ue.setAttribute("varid",Fe.getId()),q&&this.paramIds_&&ue.setAttribute("paramId",this.paramIds_[Le]),ne.appendChild(ue)}return this.hasStatements_||ne.setAttribute("statements","false"),ne},domToMutation:function(q){this.arguments_=[],this.argumentVarModels_=[];for(let Le=0,ue;ue=q.childNodes[Le];Le++)if(ue.nodeName.toLowerCase()==="arg"){var ne=ue;const Fe=ne.getAttribute("name");ne=ne.getAttribute("varid")||ne.getAttribute("varId"),this.arguments_.push(Fe),ne=s.getOrCreateVariablePackage$$module$build$src$core$variables(this.workspace,ne,Fe,""),ne!==null?this.argumentVarModels_.push(ne):console.log(`Failed to create a variable named "${Fe}", ignoring.`)}this.updateParams_(),s.mutateCallers$$module$build$src$core$procedures(this),this.setStatements_(q.getAttribute("statements")!=="false")},saveExtraState:function(){if(!this.argumentVarModels_.length&&this.hasStatements_)return null;const q=Object.create(null);if(this.argumentVarModels_.length){q.params=[];for(let ne=0;ne<this.argumentVarModels_.length;ne++)q.params.push({name:this.argumentVarModels_[ne].name,id:this.argumentVarModels_[ne].getId()})}return this.hasStatements_||(q.hasStatements=!1),q},loadExtraState:function(q){if(this.arguments_=[],this.argumentVarModels_=[],q.params)for(let Le=0;Le<q.params.length;Le++){var ne=q.params[Le];ne=s.getOrCreateVariablePackage$$module$build$src$core$variables(this.workspace,ne.id,ne.name,""),this.arguments_.push(ne.name),this.argumentVarModels_.push(ne)}this.updateParams_(),s.mutateCallers$$module$build$src$core$procedures(this),this.setStatements_(q.hasStatements!==!1)},decompose:function(q){const ne=s.createElement$$module$build$src$core$utils$xml("block");ne.setAttribute("type","procedures_mutatorcontainer");var Le=s.createElement$$module$build$src$core$utils$xml("statement");Le.setAttribute("name","STACK"),ne.appendChild(Le);for(let Fe=0;Fe<this.arguments_.length;Fe++){const ye=s.createElement$$module$build$src$core$utils$xml("block");ye.setAttribute("type","procedures_mutatorarg");var ue=s.createElement$$module$build$src$core$utils$xml("field");ue.setAttribute("name","NAME");const ft=s.createTextNode$$module$build$src$core$utils$xml(this.arguments_[Fe]);ue.appendChild(ft),ye.appendChild(ue),ue=s.createElement$$module$build$src$core$utils$xml("next"),ye.appendChild(ue),Le.appendChild(ye),Le=ue}return q=s.domToBlock$$module$build$src$core$xml(ne,q),this.type==="procedures_defreturn"?q.setFieldValue(this.hasStatements_,"STATEMENTS"):q.removeInput("STATEMENT_INPUT"),s.mutateCallers$$module$build$src$core$procedures(this),q},compose:function(q){this.arguments_=[],this.paramIds_=[],this.argumentVarModels_=[];let ne=q.getInputTargetBlock("STACK");for(;ne&&!ne.isInsertionMarker();){var Le=ne.getFieldValue("NAME");this.arguments_.push(Le),Le=this.workspace.getVariable(Le,""),this.argumentVarModels_.push(Le),this.paramIds_.push(ne.id),ne=ne.nextConnection&&ne.nextConnection.targetBlock()}if(this.updateParams_(),s.mutateCallers$$module$build$src$core$procedures(this),q=q.getFieldValue("STATEMENTS"),q!==null&&(q=q==="TRUE",this.hasStatements_!==q))if(q){this.setStatements_(!0);var ue;(ue=this.statementConnection_)==null||ue.reconnect(this,"STACK"),this.statementConnection_=null}else ue=this.getInput("STACK").connection,(this.statementConnection_=ue.targetConnection)&&(ue=ue.targetBlock(),ue.unplug(),ue.bumpNeighbours()),this.setStatements_(!1)},getVars:function(){return this.arguments_},getVarModels:function(){return this.argumentVarModels_},renameVarById:function(q,ne){var Le=this.workspace.getVariableById(q);if(Le.type===""){Le=Le.name,ne=this.workspace.getVariableById(ne);var ue=!1;for(let Fe=0;Fe<this.argumentVarModels_.length;Fe++)this.argumentVarModels_[Fe].getId()===q&&(this.arguments_[Fe]=ne.name,this.argumentVarModels_[Fe]=ne,ue=!0);ue&&(this.displayRenamedVar_(Le,ne.name),s.mutateCallers$$module$build$src$core$procedures(this))}},updateVarName:function(q){const ne=q.name;let Le=!1,ue;for(let Fe=0;Fe<this.argumentVarModels_.length;Fe++)this.argumentVarModels_[Fe].getId()===q.getId()&&(ue=this.arguments_[Fe],this.arguments_[Fe]=ne,Le=!0);Le&&(this.displayRenamedVar_(ue,ne),s.mutateCallers$$module$build$src$core$procedures(this))},displayRenamedVar_:function(q,ne){this.updateParams_();var Le=this.getIcon(s.MutatorIcon$$module$build$src$core$icons$mutator_icon.TYPE);if(Le&&Le.bubbleIsVisible()){Le=Le.getWorkspace().getAllBlocks(!1);for(let ue=0,Fe;Fe=Le[ue];ue++)Fe.type==="procedures_mutatorarg"&&s.Names$$module$build$src$core$names.equals(q,Fe.getFieldValue("NAME"))&&Fe.setFieldValue(ne,"NAME")}},customContextMenu:function(q){if(!this.isInFlyout){var ne=this.getFieldValue("NAME"),Le={type:this.callType_,extraState:{name:ne,params:this.arguments_}};if(q.push({enabled:!0,text:s.Msg$$module$build$src$core$msg.PROCEDURES_CREATE_DO.replace("%1",ne),callback:s.callbackFactory$$module$build$src$core$contextmenu(this,Le)}),!this.isCollapsed())for(ne=0;ne<this.argumentVarModels_.length;ne++){Le=this.argumentVarModels_[ne];const ue={type:"variables_get",fields:{VAR:{name:Le.name,id:Le.getId(),type:Le.type}}};q.push({enabled:!0,text:s.Msg$$module$build$src$core$msg.VARIABLES_SET_CREATE_GET.replace("%1",Le.name),callback:s.callbackFactory$$module$build$src$core$contextmenu(this,ue)})}}}};F.procedures_defnoreturn=Object.assign({},X,{init:function(){var q=s.findLegalName$$module$build$src$core$procedures("",this);q=s.fromJson$$module$build$src$core$field_registry({type:"field_input",text:q}),q.setValidator(s.rename$$module$build$src$core$procedures),q.setSpellcheck(!1),this.appendDummyInput().appendField(s.Msg$$module$build$src$core$msg.PROCEDURES_DEFNORETURN_TITLE).appendField(q,"NAME").appendField("","PARAMS"),this.setMutator(new s.MutatorIcon$$module$build$src$core$icons$mutator_icon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&s.Msg$$module$build$src$core$msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(s.Msg$$module$build$src$core$msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(s.Msg$$module$build$src$core$msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(s.Msg$$module$build$src$core$msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},getProcedureDef:function(){return[this.getFieldValue("NAME"),this.arguments_,!1]},callType_:"procedures_callnoreturn"}),F.procedures_defreturn=Object.assign({},X,{init:function(){var q=s.findLegalName$$module$build$src$core$procedures("",this);q=s.fromJson$$module$build$src$core$field_registry({type:"field_input",text:q}),q.setValidator(s.rename$$module$build$src$core$procedures),q.setSpellcheck(!1),this.appendDummyInput().appendField(s.Msg$$module$build$src$core$msg.PROCEDURES_DEFRETURN_TITLE).appendField(q,"NAME").appendField("","PARAMS"),this.appendValueInput("RETURN").setAlign(s.Align$$module$build$src$core$inputs$input.RIGHT).appendField(s.Msg$$module$build$src$core$msg.PROCEDURES_DEFRETURN_RETURN),this.setMutator(new s.MutatorIcon$$module$build$src$core$icons$mutator_icon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&s.Msg$$module$build$src$core$msg.PROCEDURES_DEFRETURN_COMMENT&&this.setCommentText(s.Msg$$module$build$src$core$msg.PROCEDURES_DEFRETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(s.Msg$$module$build$src$core$msg.PROCEDURES_DEFRETURN_TOOLTIP),this.setHelpUrl(s.Msg$$module$build$src$core$msg.PROCEDURES_DEFRETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},getProcedureDef:function(){return[this.getFieldValue("NAME"),this.arguments_,!0]},callType_:"procedures_callreturn"});var G={init:function(){this.appendDummyInput().appendField(s.Msg$$module$build$src$core$msg.PROCEDURES_MUTATORCONTAINER_TITLE),this.appendStatementInput("STACK"),this.appendDummyInput("STATEMENT_INPUT").appendField(s.Msg$$module$build$src$core$msg.PROCEDURES_ALLOW_STATEMENTS).appendField(s.fromJson$$module$build$src$core$field_registry({type:"field_checkbox",checked:!0}),"STATEMENTS"),this.setStyle("procedure_blocks"),this.setTooltip(s.Msg$$module$build$src$core$msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP),this.contextMenu=!1}};F.procedures_mutatorcontainer=G;var re={init:function(){const q=s.fromJson$$module$build$src$core$field_registry({type:"field_input",text:s.DEFAULT_ARG$$module$build$src$core$procedures});q.setValidator(this.validator_),q.oldShowEditorFn_=q.showEditor_,q.showEditor_=function(){this.createdVariables_=[],this.oldShowEditorFn_()},this.appendDummyInput().appendField(s.Msg$$module$build$src$core$msg.PROCEDURES_MUTATORARG_TITLE).appendField(q,"NAME"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setStyle("procedure_blocks"),this.setTooltip(s.Msg$$module$build$src$core$msg.PROCEDURES_MUTATORARG_TOOLTIP),this.contextMenu=!1,q.onFinishEditing_=this.deleteIntermediateVars_,q.createdVariables_=[],q.onFinishEditing_("x")},validator_:function(q){var ne=this.getSourceBlock();const Le=ne.workspace.getRootWorkspace();if(q=q.replace(/[\s\xa0]+/g," ").replace(/^ | $/g,""),!q)return null;const ue=(ne.workspace.targetWorkspace||ne.workspace).getAllBlocks(!1),Fe=q.toLowerCase();for(let ye=0;ye<ue.length;ye++){if(ue[ye].id===this.getSourceBlock().id)continue;const ft=ue[ye].getFieldValue("NAME");if(ft&&ft.toLowerCase()===Fe)return null}return ne.isInFlyout||((ne=Le.getVariable(q,""))&&ne.name!==q&&Le.renameVariableById(ne.getId(),q),ne||(ne=Le.createVariable(q,""))&&this.createdVariables_&&this.createdVariables_.push(ne)),q},deleteIntermediateVars_:function(q){const ne=this.getSourceBlock().workspace.getRootWorkspace();if(ne)for(let Le=0;Le<this.createdVariables_.length;Le++){const ue=this.createdVariables_[Le];ue.name!==q&&ne.deleteVariableById(ue.getId())}}};F.procedures_mutatorarg=re;var _e={getProcedureCall:function(){return this.getFieldValue("NAME")},renameProcedure:function(q,ne){s.Names$$module$build$src$core$names.equals(q,this.getProcedureCall())&&(this.setFieldValue(ne,"NAME"),this.setTooltip((this.outputConnection?s.Msg$$module$build$src$core$msg.PROCEDURES_CALLRETURN_TOOLTIP:s.Msg$$module$build$src$core$msg.PROCEDURES_CALLNORETURN_TOOLTIP).replace("%1",ne)))},setProcedureParameters_:function(q,ne){var Le=s.getDefinition$$module$build$src$core$procedures(this.getProcedureCall(),this.workspace);if((Le=(Le=Le&&Le.getIcon(s.MutatorIcon$$module$build$src$core$icons$mutator_icon.TYPE))&&Le.bubbleIsVisible())?this.setCollapsed(!1):(this.quarkConnections_={},this.quarkIds_=null),q.join(`
  679. `)===this.arguments_.join(`
  680. `))this.quarkIds_=ne;else{if(ne.length!==q.length)throw RangeError("paramNames and paramIds must be the same length.");this.quarkIds_||(this.quarkConnections_={},this.quarkIds_=[]);for(let Fe=0;Fe<this.arguments_.length;Fe++){var ue=this.getInput("ARG"+Fe);ue&&(ue=ue.connection.targetConnection,this.quarkConnections_[this.quarkIds_[Fe]]=ue,Le&&ue&&ne.indexOf(this.quarkIds_[Fe])===-1&&(ue.disconnect(),ue.getSourceBlock().bumpNeighbours()))}for(this.arguments_=[].concat(q),this.argumentVarModels_=[],q=0;q<this.arguments_.length;q++)Le=s.getOrCreateVariablePackage$$module$build$src$core$variables(this.workspace,null,this.arguments_[q],""),this.argumentVarModels_.push(Le);if(this.updateShape_(),this.quarkIds_=ne){for(ne=0;ne<this.arguments_.length;ne++)if(q=this.quarkIds_[ne],q in this.quarkConnections_){let Fe;(Fe=this.quarkConnections_[q])!=null&&Fe.reconnect(this,"ARG"+ne)||delete this.quarkConnections_[q]}}}},updateShape_:function(){for(var q=0;q<this.arguments_.length;q++){var ne=this.getField("ARGNAME"+q);if(ne){s.disable$$module$build$src$core$events$utils();try{ne.setValue(this.arguments_[q])}finally{s.enable$$module$build$src$core$events$utils()}}else ne=s.fromJson$$module$build$src$core$field_registry({type:"field_label",text:this.arguments_[q]}),this.appendValueInput("ARG"+q).setAlign(s.Align$$module$build$src$core$inputs$input.RIGHT).appendField(ne,"ARGNAME"+q).init()}for(q=this.arguments_.length;this.getInput("ARG"+q);q++)this.removeInput("ARG"+q);(q=this.getInput("TOPROW"))&&(this.arguments_.length?this.getField("WITH")||(q.appendField(s.Msg$$module$build$src$core$msg.PROCEDURES_CALL_BEFORE_PARAMS,"WITH"),q.init()):this.getField("WITH")&&q.removeField("WITH"))},mutationToDom:function(){const q=s.createElement$$module$build$src$core$utils$xml("mutation");q.setAttribute("name",this.getProcedureCall());for(let ne=0;ne<this.arguments_.length;ne++){const Le=s.createElement$$module$build$src$core$utils$xml("arg");Le.setAttribute("name",this.arguments_[ne]),q.appendChild(Le)}return q},domToMutation:function(q){var ne=q.getAttribute("name");this.renameProcedure(this.getProcedureCall(),ne),ne=[];const Le=[];for(let ue=0,Fe;Fe=q.childNodes[ue];ue++)Fe.nodeName.toLowerCase()==="arg"&&(ne.push(Fe.getAttribute("name")),Le.push(Fe.getAttribute("paramId")));this.setProcedureParameters_(ne,Le)},saveExtraState:function(){const q=Object.create(null);return q.name=this.getProcedureCall(),this.arguments_.length&&(q.params=this.arguments_),q},loadExtraState:function(q){if(this.renameProcedure(this.getProcedureCall(),q.name),q=q.params){const ne=[];ne.length=q.length,ne.fill(null),this.setProcedureParameters_(q,ne)}},getVars:function(){return this.arguments_},getVarModels:function(){return this.argumentVarModels_},onchange:function(q){if(this.workspace&&!this.workspace.isFlyout&&q.recordUndo)if(q.type===s.CREATE$$module$build$src$core$events$utils&&q.ids.indexOf(this.id)!==-1){var ne=this.getProcedureCall();if(ne=s.getDefinition$$module$build$src$core$procedures(ne,this.workspace),!ne||ne.type===this.defType_&&JSON.stringify(ne.getVars())===JSON.stringify(this.arguments_)||(ne=null),!ne){s.setGroup$$module$build$src$core$events$utils(q.group),q=s.createElement$$module$build$src$core$utils$xml("xml"),ne=s.createElement$$module$build$src$core$utils$xml("block"),ne.setAttribute("type",this.defType_);var Le=this.getRelativeToSurfaceXY(),ue=Le.y+2*s.config$$module$build$src$core$config.snapRadius;ne.setAttribute("x",`${Le.x+s.config$$module$build$src$core$config.snapRadius*(this.RTL?-1:1)}`),ne.setAttribute("y",`${ue}`),Le=this.mutationToDom(),ne.appendChild(Le),Le=s.createElement$$module$build$src$core$utils$xml("field"),Le.setAttribute("name","NAME"),ue=this.getProcedureCall();const Fe=s.findLegalName$$module$build$src$core$procedures(ue,this);ue!==Fe&&this.renameProcedure(ue,Fe),Le.appendChild(s.createTextNode$$module$build$src$core$utils$xml(ue)),ne.appendChild(Le),q.appendChild(ne),s.domToWorkspace$$module$build$src$core$xml(q,this.workspace),s.setGroup$$module$build$src$core$events$utils(!1)}}else q.type===s.DELETE$$module$build$src$core$events$utils?(ne=this.getProcedureCall(),s.getDefinition$$module$build$src$core$procedures(ne,this.workspace)||(s.setGroup$$module$build$src$core$events$utils(q.group),this.dispose(!0),s.setGroup$$module$build$src$core$events$utils(!1))):q.type===s.CHANGE$$module$build$src$core$events$utils&&q.element==="disabled"&&(ne=this.getProcedureCall(),(ne=s.getDefinition$$module$build$src$core$procedures(ne,this.workspace))&&ne.id===q.blockId&&((ne=s.getGroup$$module$build$src$core$events$utils())&&console.log("Saw an existing group while responding to a definition change"),s.setGroup$$module$build$src$core$events$utils(q.group),q.newValue?(this.previousEnabledState_=this.isEnabled(),this.setEnabled(!1)):this.setEnabled(this.previousEnabledState_),s.setGroup$$module$build$src$core$events$utils(ne)))},customContextMenu:function(q){if(this.workspace.isMovable()){var ne=this.getProcedureCall(),Le=this.workspace;q.push({enabled:!0,text:s.Msg$$module$build$src$core$msg.PROCEDURES_HIGHLIGHT_DEF,callback:function(){const ue=s.getDefinition$$module$build$src$core$procedures(ne,Le);ue&&(Le.centerOnBlock(ue.id),ue.select())}})}}};F.procedures_callnoreturn=Object.assign({},_e,{init:function(){this.appendDummyInput("TOPROW").appendField("","NAME"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setStyle("procedure_blocks"),this.setHelpUrl(s.Msg$$module$build$src$core$msg.PROCEDURES_CALLNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.quarkConnections_={},this.quarkIds_=null,this.previousEnabledState_=!0},defType_:"procedures_defnoreturn"}),F.procedures_callreturn=Object.assign({},_e,{init:function(){this.appendDummyInput("TOPROW").appendField("","NAME"),this.setOutput(!0),this.setStyle("procedure_blocks"),this.setHelpUrl(s.Msg$$module$build$src$core$msg.PROCEDURES_CALLRETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.quarkConnections_={},this.quarkIds_=null,this.previousEnabledState_=!0},defType_:"procedures_defreturn"});var J={init:function(){this.appendValueInput("CONDITION").setCheck("Boolean").appendField(s.Msg$$module$build$src$core$msg.CONTROLS_IF_MSG_IF),this.appendValueInput("VALUE").appendField(s.Msg$$module$build$src$core$msg.PROCEDURES_DEFRETURN_RETURN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setStyle("procedure_blocks"),this.setTooltip(s.Msg$$module$build$src$core$msg.PROCEDURES_IFRETURN_TOOLTIP),this.setHelpUrl(s.Msg$$module$build$src$core$msg.PROCEDURES_IFRETURN_HELPURL),this.hasReturnValue_=!0},mutationToDom:function(){const q=s.createElement$$module$build$src$core$utils$xml("mutation");return q.setAttribute("value",String(Number(this.hasReturnValue_))),q},domToMutation:function(q){this.hasReturnValue_=q.getAttribute("value")==="1",this.hasReturnValue_||(this.removeInput("VALUE"),this.appendDummyInput("VALUE").appendField(s.Msg$$module$build$src$core$msg.PROCEDURES_DEFRETURN_RETURN))},onchange:function(q){if(!(this.workspace.isDragging&&this.workspace.isDragging()||q.type!==s.MOVE$$module$build$src$core$events$utils)){var ne=!1,Le=this;do{if(this.FUNCTION_TYPES.indexOf(Le.type)!==-1){ne=!0;break}Le=Le.getSurroundParent()}while(Le);ne?(Le.type==="procedures_defnoreturn"&&this.hasReturnValue_?(this.removeInput("VALUE"),this.appendDummyInput("VALUE").appendField(s.Msg$$module$build$src$core$msg.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!1):Le.type!=="procedures_defreturn"||this.hasReturnValue_||(this.removeInput("VALUE"),this.appendValueInput("VALUE").appendField(s.Msg$$module$build$src$core$msg.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!0),this.setWarningText(null)):this.setWarningText(s.Msg$$module$build$src$core$msg.PROCEDURES_IFRETURN_WARNING),this.isInFlyout||(Le=s.getGroup$$module$build$src$core$events$utils(),s.setGroup$$module$build$src$core$events$utils(q.group),this.setEnabled(ne),s.setGroup$$module$build$src$core$events$utils(Le))}},FUNCTION_TYPES:["procedures_defnoreturn","procedures_defreturn"]};F.procedures_ifreturn=J,s.defineBlocks$$module$build$src$core$common(F);var Y={blocks:F},ae=s.createBlockDefinitionsFromJsonArray$$module$build$src$core$common([{type:"math_number",message0:"%1",args0:[{type:"field_number",name:"NUM",value:0}],output:"Number",helpUrl:"%{BKY_MATH_NUMBER_HELPURL}",style:"math_blocks",tooltip:"%{BKY_MATH_NUMBER_TOOLTIP}",extensions:["parent_tooltip_when_inline"]},{type:"math_arithmetic",message0:"%1 %2 %3",args0:[{type:"input_value",name:"A",check:"Number"},{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_ADDITION_SYMBOL}","ADD"],["%{BKY_MATH_SUBTRACTION_SYMBOL}","MINUS"],["%{BKY_MATH_MULTIPLICATION_SYMBOL}","MULTIPLY"],["%{BKY_MATH_DIVISION_SYMBOL}","DIVIDE"],["%{BKY_MATH_POWER_SYMBOL}","POWER"]]},{type:"input_value",name:"B",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ARITHMETIC_HELPURL}",extensions:["math_op_tooltip"]},{type:"math_single",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_SINGLE_OP_ROOT}","ROOT"],["%{BKY_MATH_SINGLE_OP_ABSOLUTE}","ABS"],["-","NEG"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]},{type:"input_value",name:"NUM",check:"Number"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_SINGLE_HELPURL}",extensions:["math_op_tooltip"]},{type:"math_trig",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_TRIG_SIN}","SIN"],["%{BKY_MATH_TRIG_COS}","COS"],["%{BKY_MATH_TRIG_TAN}","TAN"],["%{BKY_MATH_TRIG_ASIN}","ASIN"],["%{BKY_MATH_TRIG_ACOS}","ACOS"],["%{BKY_MATH_TRIG_ATAN}","ATAN"]]},{type:"input_value",name:"NUM",check:"Number"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_TRIG_HELPURL}",extensions:["math_op_tooltip"]},{type:"math_constant",message0:"%1",args0:[{type:"field_dropdown",name:"CONSTANT",options:[["π","PI"],["e","E"],["φ","GOLDEN_RATIO"],["sqrt(2)","SQRT2"],["sqrt(½)","SQRT1_2"],["∞","INFINITY"]]}],output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_CONSTANT_TOOLTIP}",helpUrl:"%{BKY_MATH_CONSTANT_HELPURL}"},{type:"math_number_property",message0:"%1 %2",args0:[{type:"input_value",name:"NUMBER_TO_CHECK",check:"Number"},{type:"field_dropdown",name:"PROPERTY",options:[["%{BKY_MATH_IS_EVEN}","EVEN"],["%{BKY_MATH_IS_ODD}","ODD"],["%{BKY_MATH_IS_PRIME}","PRIME"],["%{BKY_MATH_IS_WHOLE}","WHOLE"],["%{BKY_MATH_IS_POSITIVE}","POSITIVE"],["%{BKY_MATH_IS_NEGATIVE}","NEGATIVE"],["%{BKY_MATH_IS_DIVISIBLE_BY}","DIVISIBLE_BY"]]}],inputsInline:!0,output:"Boolean",style:"math_blocks",tooltip:"%{BKY_MATH_IS_TOOLTIP}",mutator:"math_is_divisibleby_mutator"},{type:"math_change",message0:"%{BKY_MATH_CHANGE_TITLE}",args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_MATH_CHANGE_TITLE_ITEM}"},{type:"input_value",name:"DELTA",check:"Number"}],previousStatement:null,nextStatement:null,style:"variable_blocks",helpUrl:"%{BKY_MATH_CHANGE_HELPURL}",extensions:["math_change_tooltip"]},{type:"math_round",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_ROUND_OPERATOR_ROUND}","ROUND"],["%{BKY_MATH_ROUND_OPERATOR_ROUNDUP}","ROUNDUP"],["%{BKY_MATH_ROUND_OPERATOR_ROUNDDOWN}","ROUNDDOWN"]]},{type:"input_value",name:"NUM",check:"Number"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ROUND_HELPURL}",tooltip:"%{BKY_MATH_ROUND_TOOLTIP}"},{type:"math_on_list",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_ONLIST_OPERATOR_SUM}","SUM"],["%{BKY_MATH_ONLIST_OPERATOR_MIN}","MIN"],["%{BKY_MATH_ONLIST_OPERATOR_MAX}","MAX"],["%{BKY_MATH_ONLIST_OPERATOR_AVERAGE}","AVERAGE"],["%{BKY_MATH_ONLIST_OPERATOR_MEDIAN}","MEDIAN"],["%{BKY_MATH_ONLIST_OPERATOR_MODE}","MODE"],["%{BKY_MATH_ONLIST_OPERATOR_STD_DEV}","STD_DEV"],["%{BKY_MATH_ONLIST_OPERATOR_RANDOM}","RANDOM"]]},{type:"input_value",name:"LIST",check:"Array"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ONLIST_HELPURL}",mutator:"math_modes_of_list_mutator",extensions:["math_op_tooltip"]},{type:"math_modulo",message0:"%{BKY_MATH_MODULO_TITLE}",args0:[{type:"input_value",name:"DIVIDEND",check:"Number"},{type:"input_value",name:"DIVISOR",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_MODULO_TOOLTIP}",helpUrl:"%{BKY_MATH_MODULO_HELPURL}"},{type:"math_constrain",message0:"%{BKY_MATH_CONSTRAIN_TITLE}",args0:[{type:"input_value",name:"VALUE",check:"Number"},{type:"input_value",name:"LOW",check:"Number"},{type:"input_value",name:"HIGH",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_CONSTRAIN_TOOLTIP}",helpUrl:"%{BKY_MATH_CONSTRAIN_HELPURL}"},{type:"math_random_int",message0:"%{BKY_MATH_RANDOM_INT_TITLE}",args0:[{type:"input_value",name:"FROM",check:"Number"},{type:"input_value",name:"TO",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_RANDOM_INT_TOOLTIP}",helpUrl:"%{BKY_MATH_RANDOM_INT_HELPURL}"},{type:"math_random_float",message0:"%{BKY_MATH_RANDOM_FLOAT_TITLE_RANDOM}",output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_RANDOM_FLOAT_TOOLTIP}",helpUrl:"%{BKY_MATH_RANDOM_FLOAT_HELPURL}"},{type:"math_atan2",message0:"%{BKY_MATH_ATAN2_TITLE}",args0:[{type:"input_value",name:"X",check:"Number"},{type:"input_value",name:"Y",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_ATAN2_TOOLTIP}",helpUrl:"%{BKY_MATH_ATAN2_HELPURL}"}]),Z={ADD:"%{BKY_MATH_ARITHMETIC_TOOLTIP_ADD}",MINUS:"%{BKY_MATH_ARITHMETIC_TOOLTIP_MINUS}",MULTIPLY:"%{BKY_MATH_ARITHMETIC_TOOLTIP_MULTIPLY}",DIVIDE:"%{BKY_MATH_ARITHMETIC_TOOLTIP_DIVIDE}",POWER:"%{BKY_MATH_ARITHMETIC_TOOLTIP_POWER}",ROOT:"%{BKY_MATH_SINGLE_TOOLTIP_ROOT}",ABS:"%{BKY_MATH_SINGLE_TOOLTIP_ABS}",NEG:"%{BKY_MATH_SINGLE_TOOLTIP_NEG}",LN:"%{BKY_MATH_SINGLE_TOOLTIP_LN}",LOG10:"%{BKY_MATH_SINGLE_TOOLTIP_LOG10}",EXP:"%{BKY_MATH_SINGLE_TOOLTIP_EXP}",POW10:"%{BKY_MATH_SINGLE_TOOLTIP_POW10}",SIN:"%{BKY_MATH_TRIG_TOOLTIP_SIN}",COS:"%{BKY_MATH_TRIG_TOOLTIP_COS}",TAN:"%{BKY_MATH_TRIG_TOOLTIP_TAN}",ASIN:"%{BKY_MATH_TRIG_TOOLTIP_ASIN}",ACOS:"%{BKY_MATH_TRIG_TOOLTIP_ACOS}",ATAN:"%{BKY_MATH_TRIG_TOOLTIP_ATAN}",SUM:"%{BKY_MATH_ONLIST_TOOLTIP_SUM}",MIN:"%{BKY_MATH_ONLIST_TOOLTIP_MIN}",MAX:"%{BKY_MATH_ONLIST_TOOLTIP_MAX}",AVERAGE:"%{BKY_MATH_ONLIST_TOOLTIP_AVERAGE}",MEDIAN:"%{BKY_MATH_ONLIST_TOOLTIP_MEDIAN}",MODE:"%{BKY_MATH_ONLIST_TOOLTIP_MODE}",STD_DEV:"%{BKY_MATH_ONLIST_TOOLTIP_STD_DEV}",RANDOM:"%{BKY_MATH_ONLIST_TOOLTIP_RANDOM}"};s.register$$module$build$src$core$extensions("math_op_tooltip",s.buildTooltipForDropdown$$module$build$src$core$extensions("OP",Z));var Q={mutationToDom:function(){const q=s.createElement$$module$build$src$core$utils$xml("mutation"),ne=this.getFieldValue("PROPERTY")==="DIVISIBLE_BY";return q.setAttribute("divisor_input",String(ne)),q},domToMutation:function(q){q=q.getAttribute("divisor_input")==="true",this.updateShape_(q)},updateShape_:function(q){const ne=this.getInput("DIVISOR");q?ne||this.appendValueInput("DIVISOR").setCheck("Number"):ne&&this.removeInput("DIVISOR")}},he=function(){this.getField("PROPERTY").setValidator(function(q){q=q==="DIVISIBLE_BY",this.getSourceBlock().updateShape_(q)})};s.registerMutator$$module$build$src$core$extensions("math_is_divisibleby_mutator",Q,he),s.register$$module$build$src$core$extensions("math_change_tooltip",s.buildTooltipWithFieldText$$module$build$src$core$extensions("%{BKY_MATH_CHANGE_TOOLTIP}","VAR"));var ge={updateType_:function(q){q==="MODE"?this.outputConnection.setCheck("Array"):this.outputConnection.setCheck("Number")},mutationToDom:function(){const q=s.createElement$$module$build$src$core$utils$xml("mutation");return q.setAttribute("op",this.getFieldValue("OP")),q},domToMutation:function(q){if(q=q.getAttribute("op"),q===null)throw new TypeError("xmlElement had no op attribute");this.updateType_(q)}},Ie=function(){this.getField("OP").setValidator((function(q){this.updateType_(q)}).bind(this))};s.registerMutator$$module$build$src$core$extensions("math_modes_of_list_mutator",ge,Ie),s.defineBlocks$$module$build$src$core$common(ae);var be={blocks:ae},Ae=s.createBlockDefinitionsFromJsonArray$$module$build$src$core$common([{type:"controls_repeat_ext",message0:"%{BKY_CONTROLS_REPEAT_TITLE}",args0:[{type:"input_value",name:"TIMES",check:"Number"}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],previousStatement:null,nextStatement:null,style:"loop_blocks",tooltip:"%{BKY_CONTROLS_REPEAT_TOOLTIP}",helpUrl:"%{BKY_CONTROLS_REPEAT_HELPURL}"},{type:"controls_repeat",message0:"%{BKY_CONTROLS_REPEAT_TITLE}",args0:[{type:"field_number",name:"TIMES",value:10,min:0,precision:1}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],previousStatement:null,nextStatement:null,style:"loop_blocks",tooltip:"%{BKY_CONTROLS_REPEAT_TOOLTIP}",helpUrl:"%{BKY_CONTROLS_REPEAT_HELPURL}"},{type:"controls_whileUntil",message0:"%1 %2",args0:[{type:"field_dropdown",name:"MODE",options:[["%{BKY_CONTROLS_WHILEUNTIL_OPERATOR_WHILE}","WHILE"],["%{BKY_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL}","UNTIL"]]},{type:"input_value",name:"BOOL",check:"Boolean"}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],previousStatement:null,nextStatement:null,style:"loop_blocks",helpUrl:"%{BKY_CONTROLS_WHILEUNTIL_HELPURL}",extensions:["controls_whileUntil_tooltip"]},{type:"controls_for",message0:"%{BKY_CONTROLS_FOR_TITLE}",args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"FROM",check:"Number",align:"RIGHT"},{type:"input_value",name:"TO",check:"Number",align:"RIGHT"},{type:"input_value",name:"BY",check:"Number",align:"RIGHT"}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],inputsInline:!0,previousStatement:null,nextStatement:null,style:"loop_blocks",helpUrl:"%{BKY_CONTROLS_FOR_HELPURL}",extensions:["contextMenu_newGetVariableBlock","controls_for_tooltip"]},{type:"controls_forEach",message0:"%{BKY_CONTROLS_FOREACH_TITLE}",args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"LIST",check:"Array"}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],previousStatement:null,nextStatement:null,style:"loop_blocks",helpUrl:"%{BKY_CONTROLS_FOREACH_HELPURL}",extensions:["contextMenu_newGetVariableBlock","controls_forEach_tooltip"]},{type:"controls_flow_statements",message0:"%1",args0:[{type:"field_dropdown",name:"FLOW",options:[["%{BKY_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK}","BREAK"],["%{BKY_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE}","CONTINUE"]]}],previousStatement:null,style:"loop_blocks",helpUrl:"%{BKY_CONTROLS_FLOW_STATEMENTS_HELPURL}",suppressPrefixSuffix:!0,extensions:["controls_flow_tooltip","controls_flow_in_loop_check"]}]),We={WHILE:"%{BKY_CONTROLS_WHILEUNTIL_TOOLTIP_WHILE}",UNTIL:"%{BKY_CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}"};s.register$$module$build$src$core$extensions("controls_whileUntil_tooltip",s.buildTooltipForDropdown$$module$build$src$core$extensions("MODE",We));var $e={BREAK:"%{BKY_CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK}",CONTINUE:"%{BKY_CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}"};s.register$$module$build$src$core$extensions("controls_flow_tooltip",s.buildTooltipForDropdown$$module$build$src$core$extensions("FLOW",$e));var ve={customContextMenu:function(q){if(!this.isInFlyout){var ne=this.getField("VAR"),Le=ne.getVariable().name;this.isCollapsed()||Le===null||(ne={type:"variables_get",fields:{VAR:ne.saveState(!0)}},q.push({enabled:!0,text:s.Msg$$module$build$src$core$msg.VARIABLES_SET_CREATE_GET.replace("%1",Le),callback:s.callbackFactory$$module$build$src$core$contextmenu(this,ne)}))}}};s.registerMixin$$module$build$src$core$extensions("contextMenu_newGetVariableBlock",ve),s.register$$module$build$src$core$extensions("controls_for_tooltip",s.buildTooltipWithFieldText$$module$build$src$core$extensions("%{BKY_CONTROLS_FOR_TOOLTIP}","VAR")),s.register$$module$build$src$core$extensions("controls_forEach_tooltip",s.buildTooltipWithFieldText$$module$build$src$core$extensions("%{BKY_CONTROLS_FOREACH_TOOLTIP}","VAR"));var Pe=new Set(["controls_repeat","controls_repeat_ext","controls_forEach","controls_for","controls_whileUntil"]),Be={getSurroundLoop:function(){let q=this;do{if(Pe.has(q.type))return q;q=q.getSurroundParent()}while(q);return null},onchange:function(q){var ne=this.workspace;if(ne.isDragging&&!ne.isDragging()&&q.type===s.MOVE$$module$build$src$core$events$utils&&(ne=!!this.getSurroundLoop(),this.setWarningText(ne?null:s.Msg$$module$build$src$core$msg.CONTROLS_FLOW_STATEMENTS_WARNING),!this.isInFlyout)){const Le=s.getGroup$$module$build$src$core$events$utils();s.setGroup$$module$build$src$core$events$utils(q.group),this.setEnabled(ne),s.setGroup$$module$build$src$core$events$utils(Le)}}};s.registerMixin$$module$build$src$core$extensions("controls_flow_in_loop_check",Be),s.defineBlocks$$module$build$src$core$common(Ae);var ot={blocks:Ae,loopTypes:Pe},Xe=s.createBlockDefinitionsFromJsonArray$$module$build$src$core$common([{type:"logic_boolean",message0:"%1",args0:[{type:"field_dropdown",name:"BOOL",options:[["%{BKY_LOGIC_BOOLEAN_TRUE}","TRUE"],["%{BKY_LOGIC_BOOLEAN_FALSE}","FALSE"]]}],output:"Boolean",style:"logic_blocks",tooltip:"%{BKY_LOGIC_BOOLEAN_TOOLTIP}",helpUrl:"%{BKY_LOGIC_BOOLEAN_HELPURL}"},{type:"controls_if",message0:"%{BKY_CONTROLS_IF_MSG_IF} %1",args0:[{type:"input_value",name:"IF0",check:"Boolean"}],message1:"%{BKY_CONTROLS_IF_MSG_THEN} %1",args1:[{type:"input_statement",name:"DO0"}],previousStatement:null,nextStatement:null,style:"logic_blocks",helpUrl:"%{BKY_CONTROLS_IF_HELPURL}",suppressPrefixSuffix:!0,mutator:"controls_if_mutator",extensions:["controls_if_tooltip"]},{type:"controls_ifelse",message0:"%{BKY_CONTROLS_IF_MSG_IF} %1",args0:[{type:"input_value",name:"IF0",check:"Boolean"}],message1:"%{BKY_CONTROLS_IF_MSG_THEN} %1",args1:[{type:"input_statement",name:"DO0"}],message2:"%{BKY_CONTROLS_IF_MSG_ELSE} %1",args2:[{type:"input_statement",name:"ELSE"}],previousStatement:null,nextStatement:null,style:"logic_blocks",tooltip:"%{BKYCONTROLS_IF_TOOLTIP_2}",helpUrl:"%{BKY_CONTROLS_IF_HELPURL}",suppressPrefixSuffix:!0,extensions:["controls_if_tooltip"]},{type:"logic_compare",message0:"%1 %2 %3",args0:[{type:"input_value",name:"A"},{type:"field_dropdown",name:"OP",options:[["=","EQ"],["≠","NEQ"],["‏<","LT"],["‏≤","LTE"],["‏>","GT"],["‏≥","GTE"]]},{type:"input_value",name:"B"}],inputsInline:!0,output:"Boolean",style:"logic_blocks",helpUrl:"%{BKY_LOGIC_COMPARE_HELPURL}",extensions:["logic_compare","logic_op_tooltip"]},{type:"logic_operation",message0:"%1 %2 %3",args0:[{type:"input_value",name:"A",check:"Boolean"},{type:"field_dropdown",name:"OP",options:[["%{BKY_LOGIC_OPERATION_AND}","AND"],["%{BKY_LOGIC_OPERATION_OR}","OR"]]},{type:"input_value",name:"B",check:"Boolean"}],inputsInline:!0,output:"Boolean",style:"logic_blocks",helpUrl:"%{BKY_LOGIC_OPERATION_HELPURL}",extensions:["logic_op_tooltip"]},{type:"logic_negate",message0:"%{BKY_LOGIC_NEGATE_TITLE}",args0:[{type:"input_value",name:"BOOL",check:"Boolean"}],output:"Boolean",style:"logic_blocks",tooltip:"%{BKY_LOGIC_NEGATE_TOOLTIP}",helpUrl:"%{BKY_LOGIC_NEGATE_HELPURL}"},{type:"logic_null",message0:"%{BKY_LOGIC_NULL}",output:null,style:"logic_blocks",tooltip:"%{BKY_LOGIC_NULL_TOOLTIP}",helpUrl:"%{BKY_LOGIC_NULL_HELPURL}"},{type:"logic_ternary",message0:"%{BKY_LOGIC_TERNARY_CONDITION} %1",args0:[{type:"input_value",name:"IF",check:"Boolean"}],message1:"%{BKY_LOGIC_TERNARY_IF_TRUE} %1",args1:[{type:"input_value",name:"THEN"}],message2:"%{BKY_LOGIC_TERNARY_IF_FALSE} %1",args2:[{type:"input_value",name:"ELSE"}],output:null,style:"logic_blocks",tooltip:"%{BKY_LOGIC_TERNARY_TOOLTIP}",helpUrl:"%{BKY_LOGIC_TERNARY_HELPURL}",extensions:["logic_ternary"]},{type:"controls_if_if",message0:"%{BKY_CONTROLS_IF_IF_TITLE_IF}",nextStatement:null,enableContextMenu:!1,style:"logic_blocks",tooltip:"%{BKY_CONTROLS_IF_IF_TOOLTIP}"},{type:"controls_if_elseif",message0:"%{BKY_CONTROLS_IF_ELSEIF_TITLE_ELSEIF}",previousStatement:null,nextStatement:null,enableContextMenu:!1,style:"logic_blocks",tooltip:"%{BKY_CONTROLS_IF_ELSEIF_TOOLTIP}"},{type:"controls_if_else",message0:"%{BKY_CONTROLS_IF_ELSE_TITLE_ELSE}",previousStatement:null,enableContextMenu:!1,style:"logic_blocks",tooltip:"%{BKY_CONTROLS_IF_ELSE_TOOLTIP}"}]),ee={EQ:"%{BKY_LOGIC_COMPARE_TOOLTIP_EQ}",NEQ:"%{BKY_LOGIC_COMPARE_TOOLTIP_NEQ}",LT:"%{BKY_LOGIC_COMPARE_TOOLTIP_LT}",LTE:"%{BKY_LOGIC_COMPARE_TOOLTIP_LTE}",GT:"%{BKY_LOGIC_COMPARE_TOOLTIP_GT}",GTE:"%{BKY_LOGIC_COMPARE_TOOLTIP_GTE}",AND:"%{BKY_LOGIC_OPERATION_TOOLTIP_AND}",OR:"%{BKY_LOGIC_OPERATION_TOOLTIP_OR}"};s.register$$module$build$src$core$extensions("logic_op_tooltip",s.buildTooltipForDropdown$$module$build$src$core$extensions("OP",ee));var pe={elseifCount_:0,elseCount_:0,mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;const q=s.createElement$$module$build$src$core$utils$xml("mutation");return this.elseifCount_&&q.setAttribute("elseif",String(this.elseifCount_)),this.elseCount_&&q.setAttribute("else","1"),q},domToMutation:function(q){this.elseifCount_=parseInt(q.getAttribute("elseif"),10)||0,this.elseCount_=parseInt(q.getAttribute("else"),10)||0,this.rebuildShape_()},saveExtraState:function(){if(!this.elseifCount_&&!this.elseCount_)return null;const q=Object.create(null);return this.elseifCount_&&(q.elseIfCount=this.elseifCount_),this.elseCount_&&(q.hasElse=!0),q},loadExtraState:function(q){this.elseifCount_=q.elseIfCount||0,this.elseCount_=q.hasElse?1:0,this.updateShape_()},decompose:function(q){const ne=q.newBlock("controls_if_if");ne.initSvg();let Le=ne.nextConnection;for(let ue=1;ue<=this.elseifCount_;ue++){const Fe=q.newBlock("controls_if_elseif");Fe.initSvg(),Le.connect(Fe.previousConnection),Le=Fe.nextConnection}return this.elseCount_&&(q=q.newBlock("controls_if_else"),q.initSvg(),Le.connect(q.previousConnection)),ne},compose:function(q){q=q.nextConnection.targetBlock(),this.elseCount_=this.elseifCount_=0;const ne=[null],Le=[null];let ue=null;for(;q;){if(!q.isInsertionMarker())switch(q.type){case"controls_if_elseif":this.elseifCount_++,ne.push(q.valueConnection_),Le.push(q.statementConnection_);break;case"controls_if_else":this.elseCount_++,ue=q.statementConnection_;break;default:throw TypeError("Unknown block type: "+q.type)}q=q.getNextBlock()}this.updateShape_(),this.reconnectChildBlocks_(ne,Le,ue)},saveConnections:function(q){q=q.nextConnection.targetBlock();let ne=1;for(;q;){if(!q.isInsertionMarker())switch(q.type){case"controls_if_elseif":var Le=this.getInput("IF"+ne);const ue=this.getInput("DO"+ne);q.valueConnection_=Le&&Le.connection.targetConnection,q.statementConnection_=ue&&ue.connection.targetConnection,ne++;break;case"controls_if_else":Le=this.getInput("ELSE"),q.statementConnection_=Le&&Le.connection.targetConnection;break;default:throw TypeError("Unknown block type: "+q.type)}q=q.getNextBlock()}},rebuildShape_:function(){const q=[null],ne=[null];let Le=null;this.getInput("ELSE")&&(Le=this.getInput("ELSE").connection.targetConnection);for(let ue=1;this.getInput("IF"+ue);ue++){const Fe=this.getInput("IF"+ue),ye=this.getInput("DO"+ue);q.push(Fe.connection.targetConnection),ne.push(ye.connection.targetConnection)}this.updateShape_(),this.reconnectChildBlocks_(q,ne,Le)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var q=1;this.getInput("IF"+q);q++)this.removeInput("IF"+q),this.removeInput("DO"+q);for(q=1;q<=this.elseifCount_;q++)this.appendValueInput("IF"+q).setCheck("Boolean").appendField(s.Msg$$module$build$src$core$msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+q).appendField(s.Msg$$module$build$src$core$msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(s.Msg$$module$build$src$core$msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(q,ne,Le){for(let ue=1;ue<=this.elseifCount_;ue++){let Fe;(Fe=q[ue])==null||Fe.reconnect(this,"IF"+ue);let ye;(ye=ne[ue])==null||ye.reconnect(this,"DO"+ue)}Le==null||Le.reconnect(this,"ELSE")}};s.registerMutator$$module$build$src$core$extensions("controls_if_mutator",pe,null,["controls_if_elseif","controls_if_else"]);var Oe=function(){this.setTooltip((function(){if(this.elseifCount_||this.elseCount_){if(!this.elseifCount_&&this.elseCount_)return s.Msg$$module$build$src$core$msg.CONTROLS_IF_TOOLTIP_2;if(this.elseifCount_&&!this.elseCount_)return s.Msg$$module$build$src$core$msg.CONTROLS_IF_TOOLTIP_3;if(this.elseifCount_&&this.elseCount_)return s.Msg$$module$build$src$core$msg.CONTROLS_IF_TOOLTIP_4}else return s.Msg$$module$build$src$core$msg.CONTROLS_IF_TOOLTIP_1;return""}).bind(this))};s.register$$module$build$src$core$extensions("controls_if_tooltip",Oe);var ze={onchange:function(q){this.prevBlocks_||(this.prevBlocks_=[null,null]);var ne=this.getInputTargetBlock("A");const Le=this.getInputTargetBlock("B");ne&&Le&&!this.workspace.connectionChecker.doTypeChecks(ne.outputConnection,Le.outputConnection)&&(s.setGroup$$module$build$src$core$events$utils(q.group),q=this.prevBlocks_[0],q!==ne&&(ne.unplug(),!q||q.isDisposed()||q.isShadow()||this.getInput("A").connection.connect(q.outputConnection)),ne=this.prevBlocks_[1],ne!==Le&&(Le.unplug(),!ne||ne.isDisposed()||ne.isShadow()||this.getInput("B").connection.connect(ne.outputConnection)),this.bumpNeighbours(),s.setGroup$$module$build$src$core$events$utils(!1)),this.prevBlocks_[0]=this.getInputTargetBlock("A"),this.prevBlocks_[1]=this.getInputTargetBlock("B")}},Ze=function(){this.mixin(ze)};s.register$$module$build$src$core$extensions("logic_compare",Ze);var De={prevParentConnection_:null,onchange:function(q){const ne=this.getInputTargetBlock("THEN"),Le=this.getInputTargetBlock("ELSE"),ue=this.outputConnection.targetConnection;if((ne||Le)&&ue)for(let Fe=0;2>Fe;Fe++){const ye=Fe===1?ne:Le;ye&&!ye.workspace.connectionChecker.doTypeChecks(ye.outputConnection,ue)&&(s.setGroup$$module$build$src$core$events$utils(q.group),ue===this.prevParentConnection_?(this.unplug(),ue.getSourceBlock().bumpNeighbours()):(ye.unplug(),ye.bumpNeighbours()),s.setGroup$$module$build$src$core$events$utils(!1))}this.prevParentConnection_=ue}};s.registerMixin$$module$build$src$core$extensions("logic_ternary",De),s.defineBlocks$$module$build$src$core$common(Xe);var me=s.createBlockDefinitionsFromJsonArray$$module$build$src$core$common([{type:"lists_create_empty",message0:"%{BKY_LISTS_CREATE_EMPTY_TITLE}",output:"Array",style:"list_blocks",tooltip:"%{BKY_LISTS_CREATE_EMPTY_TOOLTIP}",helpUrl:"%{BKY_LISTS_CREATE_EMPTY_HELPURL}"},{type:"lists_repeat",message0:"%{BKY_LISTS_REPEAT_TITLE}",args0:[{type:"input_value",name:"ITEM"},{type:"input_value",name:"NUM",check:"Number"}],output:"Array",style:"list_blocks",tooltip:"%{BKY_LISTS_REPEAT_TOOLTIP}",helpUrl:"%{BKY_LISTS_REPEAT_HELPURL}"},{type:"lists_reverse",message0:"%{BKY_LISTS_REVERSE_MESSAGE0}",args0:[{type:"input_value",name:"LIST",check:"Array"}],output:"Array",inputsInline:!0,style:"list_blocks",tooltip:"%{BKY_LISTS_REVERSE_TOOLTIP}",helpUrl:"%{BKY_LISTS_REVERSE_HELPURL}"},{type:"lists_isEmpty",message0:"%{BKY_LISTS_ISEMPTY_TITLE}",args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Boolean",style:"list_blocks",tooltip:"%{BKY_LISTS_ISEMPTY_TOOLTIP}",helpUrl:"%{BKY_LISTS_ISEMPTY_HELPURL}"},{type:"lists_length",message0:"%{BKY_LISTS_LENGTH_TITLE}",args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Number",style:"list_blocks",tooltip:"%{BKY_LISTS_LENGTH_TOOLTIP}",helpUrl:"%{BKY_LISTS_LENGTH_HELPURL}"}]),Te={init:function(){this.setHelpUrl(s.Msg$$module$build$src$core$msg.LISTS_CREATE_WITH_HELPURL),this.setStyle("list_blocks"),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Array"),this.setMutator(new s.MutatorIcon$$module$build$src$core$icons$mutator_icon(["lists_create_with_item"],this)),this.setTooltip(s.Msg$$module$build$src$core$msg.LISTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){const q=s.createElement$$module$build$src$core$utils$xml("mutation");return q.setAttribute("items",String(this.itemCount_)),q},domToMutation:function(q){if(q=q.getAttribute("items"),!q)throw new TypeError("element did not have items");this.itemCount_=parseInt(q,10),this.updateShape_()},saveExtraState:function(){return{itemCount:this.itemCount_}},loadExtraState:function(q){this.itemCount_=q.itemCount,this.updateShape_()},decompose:function(q){const ne=q.newBlock("lists_create_with_container");ne.initSvg();let Le=ne.getInput("STACK").connection;for(let ue=0;ue<this.itemCount_;ue++){const Fe=q.newBlock("lists_create_with_item");if(Fe.initSvg(),!Fe.previousConnection)throw Error("itemBlock has no previousConnection");Le.connect(Fe.previousConnection),Le=Fe.nextConnection}return ne},compose:function(q){var ne=q.getInputTargetBlock("STACK");for(q=[];ne;)ne.isInsertionMarker()||q.push(ne.valueConnection_),ne=ne.getNextBlock();for(ne=0;ne<this.itemCount_;ne++){const Le=this.getInput("ADD"+ne).connection.targetConnection;Le&&q.indexOf(Le)===-1&&Le.disconnect()}for(this.itemCount_=q.length,this.updateShape_(),ne=0;ne<this.itemCount_;ne++){let Le;(Le=q[ne])==null||Le.reconnect(this,"ADD"+ne)}},saveConnections:function(q){q=q.getInputTargetBlock("STACK");let ne=0;for(;q;){if(q.isInsertionMarker()){q=q.getNextBlock();continue}const Le=this.getInput("ADD"+ne);let ue;q.valueConnection_=(ue=Le)==null?void 0:ue.connection.targetConnection,q=q.getNextBlock(),ne++}},updateShape_:function(){this.itemCount_&&this.getInput("EMPTY")?this.removeInput("EMPTY"):this.itemCount_||this.getInput("EMPTY")||this.appendDummyInput("EMPTY").appendField(s.Msg$$module$build$src$core$msg.LISTS_CREATE_EMPTY_TITLE);for(var q=0;q<this.itemCount_;q++)if(!this.getInput("ADD"+q)){const ne=this.appendValueInput("ADD"+q).setAlign(s.Align$$module$build$src$core$inputs$align.RIGHT);q===0&&ne.appendField(s.Msg$$module$build$src$core$msg.LISTS_CREATE_WITH_INPUT_WITH)}for(q=this.itemCount_;this.getInput("ADD"+q);q++)this.removeInput("ADD"+q)}};me.lists_create_with=Te;var Ue={init:function(){this.setStyle("list_blocks"),this.appendDummyInput().appendField(s.Msg$$module$build$src$core$msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD),this.appendStatementInput("STACK"),this.setTooltip(s.Msg$$module$build$src$core$msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}};me.lists_create_with_container=Ue;var qe={init:function(){this.setStyle("list_blocks"),this.appendDummyInput().appendField(s.Msg$$module$build$src$core$msg.LISTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(s.Msg$$module$build$src$core$msg.LISTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}};me.lists_create_with_item=qe;var ct={init:function(){var q=[[s.Msg$$module$build$src$core$msg.LISTS_INDEX_OF_FIRST,"FIRST"],[s.Msg$$module$build$src$core$msg.LISTS_INDEX_OF_LAST,"LAST"]];if(this.setHelpUrl(s.Msg$$module$build$src$core$msg.LISTS_INDEX_OF_HELPURL),this.setStyle("list_blocks"),this.setOutput(!0,"Number"),this.appendValueInput("VALUE").setCheck("Array").appendField(s.Msg$$module$build$src$core$msg.LISTS_INDEX_OF_INPUT_IN_LIST),q=s.fromJson$$module$build$src$core$field_registry({type:"field_dropdown",options:q}),!q)throw Error("field_dropdown not found");this.appendValueInput("FIND").appendField(q,"END"),this.setInputsInline(!0),this.setTooltip(()=>s.Msg$$module$build$src$core$msg.LISTS_INDEX_OF_TOOLTIP.replace("%1",this.workspace.options.oneBasedIndex?"0":"-1"))}};me.lists_indexOf=ct;var Ne={init:function(){var q=[[s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_GET,"GET"],[s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_GET_REMOVE,"GET_REMOVE"],[s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_REMOVE,"REMOVE"]];this.WHERE_OPTIONS=[[s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_FIRST,"FIRST"],[s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_LAST,"LAST"],[s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_RANDOM,"RANDOM"]],this.setHelpUrl(s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_HELPURL),this.setStyle("list_blocks"),q=s.fromJson$$module$build$src$core$field_registry({type:"field_dropdown",options:q}),q.setValidator(function(ne){ne=ne==="REMOVE",this.getSourceBlock().updateStatement_(ne)}),this.appendValueInput("VALUE").setCheck("Array").appendField(s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_INPUT_IN_LIST),this.appendDummyInput().appendField(q,"MODE").appendField("","SPACE"),this.appendDummyInput("AT"),s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0),this.setTooltip(()=>{const ne=this.getFieldValue("MODE"),Le=this.getFieldValue("WHERE");let ue="";switch(ne+" "+Le){case"GET FROM_START":case"GET FROM_END":ue=s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET FIRST":ue=s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST;break;case"GET LAST":ue=s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST;break;case"GET RANDOM":ue=s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":ue=s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE FIRST":ue=s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST;break;case"GET_REMOVE LAST":ue=s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST;break;case"GET_REMOVE RANDOM":ue=s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM;break;case"REMOVE FROM_START":case"REMOVE FROM_END":ue=s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM;break;case"REMOVE FIRST":ue=s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST;break;case"REMOVE LAST":ue=s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST;break;case"REMOVE RANDOM":ue=s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM}return(Le==="FROM_START"||Le==="FROM_END")&&(ue+=" "+(Le==="FROM_START"?s.Msg$$module$build$src$core$msg.LISTS_INDEX_FROM_START_TOOLTIP:s.Msg$$module$build$src$core$msg.LISTS_INDEX_FROM_END_TOOLTIP).replace("%1",this.workspace.options.oneBasedIndex?"#1":"#0")),ue})},mutationToDom:function(){const q=s.createElement$$module$build$src$core$utils$xml("mutation");q.setAttribute("statement",String(!this.outputConnection));const ne=this.getInput("AT")instanceof s.ValueInput$$module$build$src$core$inputs$value_input;return q.setAttribute("at",String(ne)),q},domToMutation:function(q){const ne=q.getAttribute("statement")==="true";this.updateStatement_(ne),q=q.getAttribute("at")!=="false",this.updateAt_(q)},saveExtraState:function(){return this.outputConnection?null:{isStatement:!0}},loadExtraState:function(q){q.isStatement?this.updateStatement_(!0):typeof q=="string"&&this.domToMutation(s.textToDom$$module$build$src$core$utils$xml(q))},updateStatement_:function(q){q!==!this.outputConnection&&(this.unplug(!0,!0),q?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(q){this.removeInput("AT"),this.removeInput("ORDINAL",!0),q?(this.appendValueInput("AT").setCheck("Number"),s.Msg$$module$build$src$core$msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL").appendField(s.Msg$$module$build$src$core$msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT");const ne=s.fromJson$$module$build$src$core$field_registry({type:"field_dropdown",options:this.WHERE_OPTIONS});ne.setValidator(function(Le){const ue=Le==="FROM_START"||Le==="FROM_END";if(ue!==q){const Fe=this.getSourceBlock();return Fe.updateAt_(ue),Fe.setFieldValue(Le,"WHERE"),null}}),this.getInput("AT").appendField(ne,"WHERE"),s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}};me.lists_getIndex=Ne;var Se={init:function(){var q=[[s.Msg$$module$build$src$core$msg.LISTS_SET_INDEX_SET,"SET"],[s.Msg$$module$build$src$core$msg.LISTS_SET_INDEX_INSERT,"INSERT"]];this.WHERE_OPTIONS=[[s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_FIRST,"FIRST"],[s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_LAST,"LAST"],[s.Msg$$module$build$src$core$msg.LISTS_GET_INDEX_RANDOM,"RANDOM"]],this.setHelpUrl(s.Msg$$module$build$src$core$msg.LISTS_SET_INDEX_HELPURL),this.setStyle("list_blocks"),this.appendValueInput("LIST").setCheck("Array").appendField(s.Msg$$module$build$src$core$msg.LISTS_SET_INDEX_INPUT_IN_LIST),q=s.fromJson$$module$build$src$core$field_registry({type:"field_dropdown",options:q}),this.appendDummyInput().appendField(q,"MODE").appendField("","SPACE"),this.appendDummyInput("AT"),this.appendValueInput("TO").appendField(s.Msg$$module$build$src$core$msg.LISTS_SET_INDEX_INPUT_TO),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(s.Msg$$module$build$src$core$msg.LISTS_SET_INDEX_TOOLTIP),this.updateAt_(!0),this.setTooltip(()=>{const ne=this.getFieldValue("MODE"),Le=this.getFieldValue("WHERE");let ue="";switch(ne+" "+Le){case"SET FROM_START":case"SET FROM_END":ue=s.Msg$$module$build$src$core$msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM;break;case"SET FIRST":ue=s.Msg$$module$build$src$core$msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST;break;case"SET LAST":ue=s.Msg$$module$build$src$core$msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST;break;case"SET RANDOM":ue=s.Msg$$module$build$src$core$msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM;break;case"INSERT FROM_START":case"INSERT FROM_END":ue=s.Msg$$module$build$src$core$msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM;break;case"INSERT FIRST":ue=s.Msg$$module$build$src$core$msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST;break;case"INSERT LAST":ue=s.Msg$$module$build$src$core$msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST;break;case"INSERT RANDOM":ue=s.Msg$$module$build$src$core$msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM}return(Le==="FROM_START"||Le==="FROM_END")&&(ue+=" "+s.Msg$$module$build$src$core$msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",this.workspace.options.oneBasedIndex?"#1":"#0")),ue})},mutationToDom:function(){const q=s.createElement$$module$build$src$core$utils$xml("mutation"),ne=this.getInput("AT")instanceof s.ValueInput$$module$build$src$core$inputs$value_input;return q.setAttribute("at",String(ne)),q},domToMutation:function(q){q=q.getAttribute("at")!=="false",this.updateAt_(q)},saveExtraState:function(){return null},loadExtraState:function(){},updateAt_:function(q){this.removeInput("AT"),this.removeInput("ORDINAL",!0),q?(this.appendValueInput("AT").setCheck("Number"),s.Msg$$module$build$src$core$msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL").appendField(s.Msg$$module$build$src$core$msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT");const ne=s.fromJson$$module$build$src$core$field_registry({type:"field_dropdown",options:this.WHERE_OPTIONS});ne.setValidator(function(Le){const ue=Le==="FROM_START"||Le==="FROM_END";if(ue!==q){const Fe=this.getSourceBlock();return Fe.updateAt_(ue),Fe.setFieldValue(Le,"WHERE"),null}}),this.moveInputBefore("AT","TO"),this.getInput("ORDINAL")&&this.moveInputBefore("ORDINAL","TO"),this.getInput("AT").appendField(ne,"WHERE")}};me.lists_setIndex=Se;var Je={init:function(){this.WHERE_OPTIONS_1=[[s.Msg$$module$build$src$core$msg.LISTS_GET_SUBLIST_START_FROM_START,"FROM_START"],[s.Msg$$module$build$src$core$msg.LISTS_GET_SUBLIST_START_FROM_END,"FROM_END"],[s.Msg$$module$build$src$core$msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[s.Msg$$module$build$src$core$msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[s.Msg$$module$build$src$core$msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[s.Msg$$module$build$src$core$msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(s.Msg$$module$build$src$core$msg.LISTS_GET_SUBLIST_HELPURL),this.setStyle("list_blocks"),this.appendValueInput("LIST").setCheck("Array").appendField(s.Msg$$module$build$src$core$msg.LISTS_GET_SUBLIST_INPUT_IN_LIST),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),s.Msg$$module$build$src$core$msg.LISTS_GET_SUBLIST_TAIL&&this.appendDummyInput("TAIL").appendField(s.Msg$$module$build$src$core$msg.LISTS_GET_SUBLIST_TAIL),this.setInputsInline(!0),this.setOutput(!0,"Array"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(s.Msg$$module$build$src$core$msg.LISTS_GET_SUBLIST_TOOLTIP)},mutationToDom:function(){const q=s.createElement$$module$build$src$core$utils$xml("mutation");var ne=this.getInput("AT1")instanceof s.ValueInput$$module$build$src$core$inputs$value_input;return q.setAttribute("at1",String(ne)),ne=this.getInput("AT2")instanceof s.ValueInput$$module$build$src$core$inputs$value_input,q.setAttribute("at2",String(ne)),q},domToMutation:function(q){const ne=q.getAttribute("at1")==="true";q=q.getAttribute("at2")==="true",this.updateAt_(1,ne),this.updateAt_(2,q)},saveExtraState:function(){return null},loadExtraState:function(){},updateAt_:function(q,ne){this.removeInput("AT"+q),this.removeInput("ORDINAL"+q,!0),ne?(this.appendValueInput("AT"+q).setCheck("Number"),s.Msg$$module$build$src$core$msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL"+q).appendField(s.Msg$$module$build$src$core$msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT"+q);const Le=s.fromJson$$module$build$src$core$field_registry({type:"field_dropdown",options:this["WHERE_OPTIONS_"+q]});Le.setValidator(function(ue){const Fe=ue==="FROM_START"||ue==="FROM_END";if(Fe!==ne){const ye=this.getSourceBlock();return ye.updateAt_(q,Fe),ye.setFieldValue(ue,"WHERE"+q),null}}),this.getInput("AT"+q).appendField(Le,"WHERE"+q),q===1&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2")),s.Msg$$module$build$src$core$msg.LISTS_GET_SUBLIST_TAIL&&this.moveInputBefore("TAIL",null)}};me.lists_getSublist=Je,me.lists_sort={init:function(){this.jsonInit({message0:"%{BKY_LISTS_SORT_TITLE}",args0:[{type:"field_dropdown",name:"TYPE",options:[["%{BKY_LISTS_SORT_TYPE_NUMERIC}","NUMERIC"],["%{BKY_LISTS_SORT_TYPE_TEXT}","TEXT"],["%{BKY_LISTS_SORT_TYPE_IGNORECASE}","IGNORE_CASE"]]},{type:"field_dropdown",name:"DIRECTION",options:[["%{BKY_LISTS_SORT_ORDER_ASCENDING}","1"],["%{BKY_LISTS_SORT_ORDER_DESCENDING}","-1"]]},{type:"input_value",name:"LIST",check:"Array"}],output:"Array",style:"list_blocks",tooltip:"%{BKY_LISTS_SORT_TOOLTIP}",helpUrl:"%{BKY_LISTS_SORT_HELPURL}"})}},me.lists_split={init:function(){const q=s.fromJson$$module$build$src$core$field_registry({type:"field_dropdown",options:[[s.Msg$$module$build$src$core$msg.LISTS_SPLIT_LIST_FROM_TEXT,"SPLIT"],[s.Msg$$module$build$src$core$msg.LISTS_SPLIT_TEXT_FROM_LIST,"JOIN"]]});if(!q)throw Error("field_dropdown not found");q.setValidator(ne=>{this.updateType_(ne)}),this.setHelpUrl(s.Msg$$module$build$src$core$msg.LISTS_SPLIT_HELPURL),this.setStyle("list_blocks"),this.appendValueInput("INPUT").setCheck("String").appendField(q,"MODE"),this.appendValueInput("DELIM").setCheck("String").appendField(s.Msg$$module$build$src$core$msg.LISTS_SPLIT_WITH_DELIMITER),this.setInputsInline(!0),this.setOutput(!0,"Array"),this.setTooltip(()=>{const ne=this.getFieldValue("MODE");if(ne==="SPLIT")return s.Msg$$module$build$src$core$msg.LISTS_SPLIT_TOOLTIP_SPLIT;if(ne==="JOIN")return s.Msg$$module$build$src$core$msg.LISTS_SPLIT_TOOLTIP_JOIN;throw Error("Unknown mode: "+ne)})},updateType_:function(q){if(this.getFieldValue("MODE")!==q){const ne=this.getInput("INPUT").connection;ne.setShadowDom(null);const Le=ne.targetBlock();Le&&(ne.disconnect(),Le.isShadow()?Le.dispose(!1):this.bumpNeighbours())}q==="SPLIT"?(this.outputConnection.setCheck("Array"),this.getInput("INPUT").setCheck("String")):(this.outputConnection.setCheck("String"),this.getInput("INPUT").setCheck("Array"))},mutationToDom:function(){const q=s.createElement$$module$build$src$core$utils$xml("mutation");return q.setAttribute("mode",this.getFieldValue("MODE")),q},domToMutation:function(q){this.updateType_(q.getAttribute("mode"))},saveExtraState:function(){return null},loadExtraState:function(){}},s.defineBlocks$$module$build$src$core$common(me);var ut={blocks:me},Mt=s.createBlockDefinitionsFromJsonArray$$module$build$src$core$common([{type:"colour_picker",message0:"%1",args0:[{type:"field_colour",name:"COLOUR",colour:"#ff0000"}],output:"Colour",helpUrl:"%{BKY_COLOUR_PICKER_HELPURL}",style:"colour_blocks",tooltip:"%{BKY_COLOUR_PICKER_TOOLTIP}",extensions:["parent_tooltip_when_inline"]},{type:"colour_random",message0:"%{BKY_COLOUR_RANDOM_TITLE}",output:"Colour",helpUrl:"%{BKY_COLOUR_RANDOM_HELPURL}",style:"colour_blocks",tooltip:"%{BKY_COLOUR_RANDOM_TOOLTIP}"},{type:"colour_rgb",message0:"%{BKY_COLOUR_RGB_TITLE} %{BKY_COLOUR_RGB_RED} %1 %{BKY_COLOUR_RGB_GREEN} %2 %{BKY_COLOUR_RGB_BLUE} %3",args0:[{type:"input_value",name:"RED",check:"Number",align:"RIGHT"},{type:"input_value",name:"GREEN",check:"Number",align:"RIGHT"},{type:"input_value",name:"BLUE",check:"Number",align:"RIGHT"}],output:"Colour",helpUrl:"%{BKY_COLOUR_RGB_HELPURL}",style:"colour_blocks",tooltip:"%{BKY_COLOUR_RGB_TOOLTIP}"},{type:"colour_blend",message0:"%{BKY_COLOUR_BLEND_TITLE} %{BKY_COLOUR_BLEND_COLOUR1} %1 %{BKY_COLOUR_BLEND_COLOUR2} %2 %{BKY_COLOUR_BLEND_RATIO} %3",args0:[{type:"input_value",name:"COLOUR1",check:"Colour",align:"RIGHT"},{type:"input_value",name:"COLOUR2",check:"Colour",align:"RIGHT"},{type:"input_value",name:"RATIO",check:"Number",align:"RIGHT"}],output:"Colour",helpUrl:"%{BKY_COLOUR_BLEND_HELPURL}",style:"colour_blocks",tooltip:"%{BKY_COLOUR_BLEND_TOOLTIP}"}]);s.defineBlocks$$module$build$src$core$common(Mt);var mt={blocks:Mt},qt=Object.assign({},Mt,me,Xe,Ae,ae,F,h,i),ce={blocks:qt,colour:mt,lists:ut,loops:ot,math:be,procedures:Y,texts:B,variables:E,variablesDynamic:u};return ce.__namespace__=s,ce})}(UR)),UR.exports}var E7=FR.exports,uF;function v7(){return uF||(uF=1,function(e,t){(function(n,s){e.exports=s(T7())})(E7,function(n){/**
  681. * @license
  682. * Copyright 2020 Google LLC
  683. * SPDX-License-Identifier: Apache-2.0
  684. */return n})}(FR)),FR.exports}var HR={exports:{}},VR={exports:{}},b7=VR.exports,dF;function O7(){return dF||(dF=1,function(e,t){(function(n,s){e.exports=s(sA())})(b7,function(n){var s=n.__namespace__,i=function(U,se){return[se.quote_(U.getFieldValue("COLOUR")),ce.ATOMIC]},r=function(U,se){return[se.provideFunction_("colourRandom",`
  685. function ${se.FUNCTION_NAME_PLACEHOLDER_}() {
  686. var num = Math.floor(Math.random() * Math.pow(2, 24));
  687. return '#' + ('00000' + num.toString(16)).substr(-6);
  688. }
  689. `)+"()",ce.FUNCTION_CALL]},a=function(U,se){const ke=se.valueToCode(U,"RED",ce.NONE)||0,je=se.valueToCode(U,"GREEN",ce.NONE)||0;return U=se.valueToCode(U,"BLUE",ce.NONE)||0,[se.provideFunction_("colourRgb",`
  690. function ${se.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
  691. r = Math.max(Math.min(Number(r), 100), 0) * 2.55;
  692. g = Math.max(Math.min(Number(g), 100), 0) * 2.55;
  693. b = Math.max(Math.min(Number(b), 100), 0) * 2.55;
  694. r = ('0' + (Math.round(r) || 0).toString(16)).slice(-2);
  695. g = ('0' + (Math.round(g) || 0).toString(16)).slice(-2);
  696. b = ('0' + (Math.round(b) || 0).toString(16)).slice(-2);
  697. return '#' + r + g + b;
  698. }
  699. `)+"("+ke+", "+je+", "+U+")",ce.FUNCTION_CALL]},c=function(U,se){const ke=se.valueToCode(U,"COLOUR1",ce.NONE)||"'#000000'",je=se.valueToCode(U,"COLOUR2",ce.NONE)||"'#000000'";return U=se.valueToCode(U,"RATIO",ce.NONE)||.5,[se.provideFunction_("colourBlend",`
  700. function ${se.FUNCTION_NAME_PLACEHOLDER_}(c1, c2, ratio) {
  701. ratio = Math.max(Math.min(Number(ratio), 1), 0);
  702. var r1 = parseInt(c1.substring(1, 3), 16);
  703. var g1 = parseInt(c1.substring(3, 5), 16);
  704. var b1 = parseInt(c1.substring(5, 7), 16);
  705. var r2 = parseInt(c2.substring(1, 3), 16);
  706. var g2 = parseInt(c2.substring(3, 5), 16);
  707. var b2 = parseInt(c2.substring(5, 7), 16);
  708. var r = Math.round(r1 * (1 - ratio) + r2 * ratio);
  709. var g = Math.round(g1 * (1 - ratio) + g2 * ratio);
  710. var b = Math.round(b1 * (1 - ratio) + b2 * ratio);
  711. r = ('0' + (r || 0).toString(16)).slice(-2);
  712. g = ('0' + (g || 0).toString(16)).slice(-2);
  713. b = ('0' + (b || 0).toString(16)).slice(-2);
  714. return '#' + r + g + b;
  715. }
  716. `)+"("+ke+", "+je+", "+U+")",ce.FUNCTION_CALL]},u=function(U,se){return["[]",ce.ATOMIC]},h=function(U,se){const ke=Array(U.itemCount_);for(let je=0;je<U.itemCount_;je++)ke[je]=se.valueToCode(U,"ADD"+je,ce.NONE)||"null";return["["+ke.join(", ")+"]",ce.ATOMIC]},f=function(U,se){const ke=se.provideFunction_("listsRepeat",`
  717. function ${se.FUNCTION_NAME_PLACEHOLDER_}(value, n) {
  718. var array = [];
  719. for (var i = 0; i < n; i++) {
  720. array[i] = value;
  721. }
  722. return array;
  723. }
  724. `),je=se.valueToCode(U,"ITEM",ce.NONE)||"null";return U=se.valueToCode(U,"NUM",ce.NONE)||"0",[ke+"("+je+", "+U+")",ce.FUNCTION_CALL]},p=function(U,se){return[(se.valueToCode(U,"VALUE",ce.MEMBER)||"[]")+".length",ce.MEMBER]},_=function(U,se){return["!"+(se.valueToCode(U,"VALUE",ce.MEMBER)||"[]")+".length",ce.LOGICAL_NOT]},E=function(U,se){const ke=U.getFieldValue("END")==="FIRST"?"indexOf":"lastIndexOf",je=se.valueToCode(U,"FIND",ce.NONE)||"''";return se=(se.valueToCode(U,"VALUE",ce.MEMBER)||"[]")+"."+ke+"("+je+")",U.workspace.options.oneBasedIndex?[se+" + 1",ce.ADDITION]:[se,ce.FUNCTION_CALL]},v=function(U,se){const ke=U.getFieldValue("MODE")||"GET",je=U.getFieldValue("WHERE")||"FROM_START";var Rt=se.valueToCode(U,"VALUE",je==="RANDOM"?ce.NONE:ce.MEMBER)||"[]";switch(je){case"FIRST":if(ke==="GET")return[Rt+"[0]",ce.MEMBER];if(ke==="GET_REMOVE")return[Rt+".shift()",ce.MEMBER];if(ke==="REMOVE")return Rt+`.shift();
  725. `;break;case"LAST":if(ke==="GET")return[Rt+".slice(-1)[0]",ce.MEMBER];if(ke==="GET_REMOVE")return[Rt+".pop()",ce.MEMBER];if(ke==="REMOVE")return Rt+`.pop();
  726. `;break;case"FROM_START":if(U=se.getAdjusted(U,"AT"),ke==="GET")return[Rt+"["+U+"]",ce.MEMBER];if(ke==="GET_REMOVE")return[Rt+".splice("+U+", 1)[0]",ce.FUNCTION_CALL];if(ke==="REMOVE")return Rt+".splice("+U+`, 1);
  727. `;break;case"FROM_END":if(U=se.getAdjusted(U,"AT",1,!0),ke==="GET")return[Rt+".slice("+U+")[0]",ce.FUNCTION_CALL];if(ke==="GET_REMOVE")return[Rt+".splice("+U+", 1)[0]",ce.FUNCTION_CALL];if(ke==="REMOVE")return Rt+".splice("+U+", 1);";break;case"RANDOM":if(Rt=se.provideFunction_("listsGetRandomItem",`
  728. function ${se.FUNCTION_NAME_PLACEHOLDER_}(list, remove) {
  729. var x = Math.floor(Math.random() * list.length);
  730. if (remove) {
  731. return list.splice(x, 1)[0];
  732. } else {
  733. return list[x];
  734. }
  735. }
  736. `)+"("+Rt+", "+(ke!=="GET")+")",ke==="GET"||ke==="GET_REMOVE")return[Rt,ce.FUNCTION_CALL];if(ke==="REMOVE")return Rt+`;
  737. `}throw Error("Unhandled combination (lists_getIndex).")},b=function(U,se){function ke(){if(je.match(/^\w+$/))return"";const fs=se.nameDB_.getDistinctName("tmpList",s.NameType$$module$build$src$core$names.VARIABLE),ps="var "+fs+" = "+je+`;
  738. `;return je=fs,ps}let je=se.valueToCode(U,"LIST",ce.MEMBER)||"[]";const Rt=U.getFieldValue("MODE")||"GET";var Qt=U.getFieldValue("WHERE")||"FROM_START";const Cn=se.valueToCode(U,"TO",ce.ASSIGNMENT)||"null";switch(Qt){case"FIRST":if(Rt==="SET")return je+"[0] = "+Cn+`;
  739. `;if(Rt==="INSERT")return je+".unshift("+Cn+`);
  740. `;break;case"LAST":if(Rt==="SET")return ke()+(je+"["+je+".length - 1] = "+Cn+`;
  741. `);if(Rt==="INSERT")return je+".push("+Cn+`);
  742. `;break;case"FROM_START":if(U=se.getAdjusted(U,"AT"),Rt==="SET")return je+"["+U+"] = "+Cn+`;
  743. `;if(Rt==="INSERT")return je+".splice("+U+", 0, "+Cn+`);
  744. `;break;case"FROM_END":if(U=se.getAdjusted(U,"AT",1,!1,ce.SUBTRACTION),Qt=ke(),Rt==="SET")return Qt+(je+"["+je+".length - "+U+"] = "+Cn+`;
  745. `);if(Rt==="INSERT")return Qt+(je+".splice("+je+".length - "+U+", 0, "+Cn+`);
  746. `);break;case"RANDOM":if(U=ke(),Qt=se.nameDB_.getDistinctName("tmpX",s.NameType$$module$build$src$core$names.VARIABLE),U+="var "+Qt+" = Math.floor(Math.random() * "+je+`.length);
  747. `,Rt==="SET")return U+(je+"["+Qt+"] = "+Cn+`;
  748. `);if(Rt==="INSERT")return U+(je+".splice("+Qt+", 0, "+Cn+`);
  749. `)}throw Error("Unhandled combination (lists_setIndex).")},y=function(U,se){var ke={FIRST:"First",LAST:"Last",FROM_START:"FromStart",FROM_END:"FromEnd"},je=se.valueToCode(U,"LIST",ce.MEMBER)||"[]";const Rt=U.getFieldValue("WHERE1"),Qt=U.getFieldValue("WHERE2");if(Rt==="FIRST"&&Qt==="LAST")je+=".slice(0)";else if(je.match(/^\w+$/)||Rt!=="FROM_END"&&Qt==="FROM_START"){switch(Rt){case"FROM_START":ke=se.getAdjusted(U,"AT1");break;case"FROM_END":ke=se.getAdjusted(U,"AT1",1,!1,ce.SUBTRACTION),ke=je+".length - "+ke;break;case"FIRST":ke="0";break;default:throw Error("Unhandled option (lists_getSublist).")}switch(Qt){case"FROM_START":se=se.getAdjusted(U,"AT2",1);break;case"FROM_END":se=se.getAdjusted(U,"AT2",0,!1,ce.SUBTRACTION),se=je+".length - "+se;break;case"LAST":se=je+".length";break;default:throw Error("Unhandled option (lists_getSublist).")}je=je+".slice("+ke+", "+se+")"}else{const Cn=se.getAdjusted(U,"AT1");U=se.getAdjusted(U,"AT2"),je=se.provideFunction_("subsequence"+ke[Rt]+ke[Qt],`
  750. function ${se.FUNCTION_NAME_PLACEHOLDER_}(sequence${Rt==="FROM_END"||Rt==="FROM_START"?", at1":""}${Qt==="FROM_END"||Qt==="FROM_START"?", at2":""}) {
  751. var start = ${Le("sequence",Rt,"at1")};
  752. var end = ${Le("sequence",Qt,"at2")} + 1;
  753. return sequence.slice(start, end);
  754. }
  755. `)+"("+je+(Rt==="FROM_END"||Rt==="FROM_START"?", "+Cn:"")+(Qt==="FROM_END"||Qt==="FROM_START"?", "+U:"")+")"}return[je,ce.FUNCTION_CALL]},S=function(U,se){const ke=se.valueToCode(U,"LIST",ce.FUNCTION_CALL)||"[]",je=U.getFieldValue("DIRECTION")==="1"?1:-1;return U=U.getFieldValue("TYPE"),se=se.provideFunction_("listsGetSortCompare",`
  756. function ${se.FUNCTION_NAME_PLACEHOLDER_}(type, direction) {
  757. var compareFuncs = {
  758. 'NUMERIC': function(a, b) {
  759. return Number(a) - Number(b); },
  760. 'TEXT': function(a, b) {
  761. return String(a) > String(b) ? 1 : -1; },
  762. 'IGNORE_CASE': function(a, b) {
  763. return String(a).toLowerCase() > String(b).toLowerCase() ? 1 : -1; },
  764. };
  765. var compare = compareFuncs[type];
  766. return function(a, b) { return compare(a, b) * direction; };
  767. }
  768. `),[ke+".slice().sort("+se+'("'+U+'", '+je+"))",ce.FUNCTION_CALL]},L=function(U,se){let ke=se.valueToCode(U,"INPUT",ce.MEMBER);if(se=se.valueToCode(U,"DELIM",ce.NONE)||"''",U=U.getFieldValue("MODE"),U==="SPLIT")ke||(ke="''"),U="split";else if(U==="JOIN")ke||(ke="[]"),U="join";else throw Error("Unknown mode: "+U);return[ke+"."+U+"("+se+")",ce.FUNCTION_CALL]},I=function(U,se){return[(se.valueToCode(U,"LIST",ce.FUNCTION_CALL)||"[]")+".slice().reverse()",ce.FUNCTION_CALL]},R=function(U,se){var ke=0;let je="";se.STATEMENT_PREFIX&&(je+=se.injectId(se.STATEMENT_PREFIX,U));do{const Rt=se.valueToCode(U,"IF"+ke,ce.NONE)||"false";let Qt=se.statementToCode(U,"DO"+ke);se.STATEMENT_SUFFIX&&(Qt=se.prefixLines(se.injectId(se.STATEMENT_SUFFIX,U),se.INDENT)+Qt),je+=(0<ke?" else ":"")+"if ("+Rt+`) {
  769. `+Qt+"}",ke++}while(U.getInput("IF"+ke));return(U.getInput("ELSE")||se.STATEMENT_SUFFIX)&&(ke=se.statementToCode(U,"ELSE"),se.STATEMENT_SUFFIX&&(ke=se.prefixLines(se.injectId(se.STATEMENT_SUFFIX,U),se.INDENT)+ke),je+=` else {
  770. `+ke+"}"),je+`
  771. `},w=function(U,se){const ke={EQ:"==",NEQ:"!=",LT:"<",LTE:"<=",GT:">",GTE:">="}[U.getFieldValue("OP")],je=ke==="=="||ke==="!="?ce.EQUALITY:ce.RELATIONAL,Rt=se.valueToCode(U,"A",je)||"0";return U=se.valueToCode(U,"B",je)||"0",[Rt+" "+ke+" "+U,je]},k=function(U,se){const ke=U.getFieldValue("OP")==="AND"?"&&":"||",je=ke==="&&"?ce.LOGICAL_AND:ce.LOGICAL_OR;let Rt=se.valueToCode(U,"A",je);return U=se.valueToCode(U,"B",je),Rt||U?(se=ke==="&&"?"true":"false",Rt||(Rt=se),U||(U=se)):U=Rt="false",[Rt+" "+ke+" "+U,je]},D=function(U,se){const ke=ce.LOGICAL_NOT;return["!"+(se.valueToCode(U,"BOOL",ke)||"true"),ke]},P=function(U,se){return[U.getFieldValue("BOOL")==="TRUE"?"true":"false",ce.ATOMIC]},B=function(U,se){return["null",ce.ATOMIC]},F=function(U,se){const ke=se.valueToCode(U,"IF",ce.CONDITIONAL)||"false",je=se.valueToCode(U,"THEN",ce.CONDITIONAL)||"null";return U=se.valueToCode(U,"ELSE",ce.CONDITIONAL)||"null",[ke+" ? "+je+" : "+U,ce.CONDITIONAL]},X=function(U,se){let ke;ke=U.getField("TIMES")?String(Number(U.getFieldValue("TIMES"))):se.valueToCode(U,"TIMES",ce.ASSIGNMENT)||"0";let je=se.statementToCode(U,"DO");je=se.addLoopTrap(je,U),U="";const Rt=se.nameDB_.getDistinctName("count",s.NameType$$module$build$src$core$names.VARIABLE);let Qt=ke;return ke.match(/^\w+$/)||s.isNumber$$module$build$src$core$utils$string(ke)||(Qt=se.nameDB_.getDistinctName("repeat_end",s.NameType$$module$build$src$core$names.VARIABLE),U+="var "+Qt+" = "+ke+`;
  772. `),U+("for (var "+Rt+" = 0; "+Rt+" < "+Qt+"; "+Rt+`++) {
  773. `+je+`}
  774. `)},G=function(U,se){const ke=U.getFieldValue("MODE")==="UNTIL";let je=se.valueToCode(U,"BOOL",ke?ce.LOGICAL_NOT:ce.NONE)||"false",Rt=se.statementToCode(U,"DO");return Rt=se.addLoopTrap(Rt,U),ke&&(je="!"+je),"while ("+je+`) {
  775. `+Rt+`}
  776. `},re=function(U,se){var ke=se.getVariableName(U.getFieldValue("VAR")),je=se.valueToCode(U,"FROM",ce.ASSIGNMENT)||"0",Rt=se.valueToCode(U,"TO",ce.ASSIGNMENT)||"0";const Qt=se.valueToCode(U,"BY",ce.ASSIGNMENT)||"1";let Cn=se.statementToCode(U,"DO");if(Cn=se.addLoopTrap(Cn,U),s.isNumber$$module$build$src$core$utils$string(je)&&s.isNumber$$module$build$src$core$utils$string(Rt)&&s.isNumber$$module$build$src$core$utils$string(Qt))se=Number(je)<=Number(Rt),U="for ("+ke+" = "+je+"; "+ke+(se?" <= ":" >= ")+Rt+"; "+ke,ke=Math.abs(Number(Qt)),U=ke===1?U+(se?"++":"--"):U+((se?" += ":" -= ")+ke),U+=`) {
  777. `+Cn+`}
  778. `;else{U="";let fs=je;je.match(/^\w+$/)||s.isNumber$$module$build$src$core$utils$string(je)||(fs=se.nameDB_.getDistinctName(ke+"_start",s.NameType$$module$build$src$core$names.VARIABLE),U+="var "+fs+" = "+je+`;
  779. `),je=Rt,Rt.match(/^\w+$/)||s.isNumber$$module$build$src$core$utils$string(Rt)||(je=se.nameDB_.getDistinctName(ke+"_end",s.NameType$$module$build$src$core$names.VARIABLE),U+="var "+je+" = "+Rt+`;
  780. `),Rt=se.nameDB_.getDistinctName(ke+"_inc",s.NameType$$module$build$src$core$names.VARIABLE),U+="var "+Rt+" = ",U=s.isNumber$$module$build$src$core$utils$string(Qt)?U+(Math.abs(Number(Qt))+`;
  781. `):U+("Math.abs("+Qt+`);
  782. `),U+="if ("+fs+" > "+je+`) {
  783. `,U+=se.INDENT+Rt+" = -"+Rt+`;
  784. `,U=U+`}
  785. for (`+(ke+" = "+fs+"; "+Rt+" >= 0 ? "+ke+" <= "+je+" : "+ke+" >= "+je+"; "+ke+" += "+Rt+`) {
  786. `+Cn+`}
  787. `)}return U},_e=function(U,se){const ke=se.getVariableName(U.getFieldValue("VAR"));var je=se.valueToCode(U,"LIST",ce.ASSIGNMENT)||"[]";let Rt=se.statementToCode(U,"DO");Rt=se.addLoopTrap(Rt,U),U="";let Qt=je;return je.match(/^\w+$/)||(Qt=se.nameDB_.getDistinctName(ke+"_list",s.NameType$$module$build$src$core$names.VARIABLE),U+="var "+Qt+" = "+je+`;
  788. `),je=se.nameDB_.getDistinctName(ke+"_index",s.NameType$$module$build$src$core$names.VARIABLE),Rt=se.INDENT+ke+" = "+Qt+"["+je+`];
  789. `+Rt,U+("for (var "+je+" in "+Qt+`) {
  790. `+Rt+`}
  791. `)},J=function(U,se){let ke="";if(se.STATEMENT_PREFIX&&(ke+=se.injectId(se.STATEMENT_PREFIX,U)),se.STATEMENT_SUFFIX&&(ke+=se.injectId(se.STATEMENT_SUFFIX,U)),se.STATEMENT_PREFIX){const je=U.getSurroundLoop();je&&!je.suppressPrefixSuffix&&(ke+=se.injectId(se.STATEMENT_PREFIX,je))}switch(U.getFieldValue("FLOW")){case"BREAK":return ke+`break;
  792. `;case"CONTINUE":return ke+`continue;
  793. `}throw Error("Unknown flow statement.")},Y=function(U,se){return U=Number(U.getFieldValue("NUM")),[String(U),0<=U?ce.ATOMIC:ce.UNARY_NEGATION]},ae=function(U,se){var ke={ADD:[" + ",ce.ADDITION],MINUS:[" - ",ce.SUBTRACTION],MULTIPLY:[" * ",ce.MULTIPLICATION],DIVIDE:[" / ",ce.DIVISION],POWER:[null,ce.NONE]}[U.getFieldValue("OP")];const je=ke[0];ke=ke[1];const Rt=se.valueToCode(U,"A",ke)||"0";return U=se.valueToCode(U,"B",ke)||"0",je?[Rt+je+U,ke]:["Math.pow("+Rt+", "+U+")",ce.FUNCTION_CALL]},Z=function(U,se){const ke=U.getFieldValue("OP");let je;if(ke==="NEG")return U=se.valueToCode(U,"NUM",ce.UNARY_NEGATION)||"0",U[0]==="-"&&(U=" "+U),["-"+U,ce.UNARY_NEGATION];switch(U=ke==="SIN"||ke==="COS"||ke==="TAN"?se.valueToCode(U,"NUM",ce.DIVISION)||"0":se.valueToCode(U,"NUM",ce.NONE)||"0",ke){case"ABS":je="Math.abs("+U+")";break;case"ROOT":je="Math.sqrt("+U+")";break;case"LN":je="Math.log("+U+")";break;case"EXP":je="Math.exp("+U+")";break;case"POW10":je="Math.pow(10,"+U+")";break;case"ROUND":je="Math.round("+U+")";break;case"ROUNDUP":je="Math.ceil("+U+")";break;case"ROUNDDOWN":je="Math.floor("+U+")";break;case"SIN":je="Math.sin("+U+" / 180 * Math.PI)";break;case"COS":je="Math.cos("+U+" / 180 * Math.PI)";break;case"TAN":je="Math.tan("+U+" / 180 * Math.PI)"}if(je)return[je,ce.FUNCTION_CALL];switch(ke){case"LOG10":je="Math.log("+U+") / Math.log(10)";break;case"ASIN":je="Math.asin("+U+") / Math.PI * 180";break;case"ACOS":je="Math.acos("+U+") / Math.PI * 180";break;case"ATAN":je="Math.atan("+U+") / Math.PI * 180";break;default:throw Error("Unknown math operator: "+ke)}return[je,ce.DIVISION]},Q=function(U,se){return{PI:["Math.PI",ce.MEMBER],E:["Math.E",ce.MEMBER],GOLDEN_RATIO:["(1 + Math.sqrt(5)) / 2",ce.DIVISION],SQRT2:["Math.SQRT2",ce.MEMBER],SQRT1_2:["Math.SQRT1_2",ce.MEMBER],INFINITY:["Infinity",ce.ATOMIC]}[U.getFieldValue("CONSTANT")]},he=function(U,se){var ke={EVEN:[" % 2 === 0",ce.MODULUS,ce.EQUALITY],ODD:[" % 2 === 1",ce.MODULUS,ce.EQUALITY],WHOLE:[" % 1 === 0",ce.MODULUS,ce.EQUALITY],POSITIVE:[" > 0",ce.RELATIONAL,ce.RELATIONAL],NEGATIVE:[" < 0",ce.RELATIONAL,ce.RELATIONAL],DIVISIBLE_BY:[null,ce.MODULUS,ce.EQUALITY],PRIME:[null,ce.NONE,ce.FUNCTION_CALL]};const je=U.getFieldValue("PROPERTY"),[Rt,Qt,Cn]=ke[je];return ke=se.valueToCode(U,"NUMBER_TO_CHECK",Qt)||"0",je==="PRIME"?U=se.provideFunction_("mathIsPrime",`
  794. function ${se.FUNCTION_NAME_PLACEHOLDER_}(n) {
  795. // https://en.wikipedia.org/wiki/Primality_test#Naive_methods
  796. if (n == 2 || n == 3) {
  797. return true;
  798. }
  799. // False if n is NaN, negative, is 1, or not whole.
  800. // And false if n is divisible by 2 or 3.
  801. if (isNaN(n) || n <= 1 || n % 1 !== 0 || n % 2 === 0 || n % 3 === 0) {
  802. return false;
  803. }
  804. // Check all the numbers of form 6k +/- 1, up to sqrt(n).
  805. for (var x = 6; x <= Math.sqrt(n) + 1; x += 6) {
  806. if (n % (x - 1) === 0 || n % (x + 1) === 0) {
  807. return false;
  808. }
  809. }
  810. return true;
  811. }
  812. `)+"("+ke+")":je==="DIVISIBLE_BY"?(U=se.valueToCode(U,"DIVISOR",ce.MODULUS)||"0",U=ke+" % "+U+" === 0"):U=ke+Rt,[U,Cn]},ge=function(U,se){const ke=se.valueToCode(U,"DELTA",ce.ADDITION)||"0";return U=se.getVariableName(U.getFieldValue("VAR")),U+" = (typeof "+U+" === 'number' ? "+U+" : 0) + "+ke+`;
  813. `},Ie=function(U,se){var ke=U.getFieldValue("OP");switch(ke){case"SUM":U=se.valueToCode(U,"LIST",ce.MEMBER)||"[]",U+=".reduce(function(x, y) {return x + y;}, 0)";break;case"MIN":U=se.valueToCode(U,"LIST",ce.NONE)||"[]",U="Math.min.apply(null, "+U+")";break;case"MAX":U=se.valueToCode(U,"LIST",ce.NONE)||"[]",U="Math.max.apply(null, "+U+")";break;case"AVERAGE":ke=se.provideFunction_("mathMean",`
  814. function ${se.FUNCTION_NAME_PLACEHOLDER_}(myList) {
  815. return myList.reduce(function(x, y) {return x + y;}, 0) / myList.length;
  816. }
  817. `),U=se.valueToCode(U,"LIST",ce.NONE)||"[]",U=ke+"("+U+")";break;case"MEDIAN":ke=se.provideFunction_("mathMedian",`
  818. function ${se.FUNCTION_NAME_PLACEHOLDER_}(myList) {
  819. var localList = myList.filter(function (x) {return typeof x === 'number';});
  820. if (!localList.length) return null;
  821. localList.sort(function(a, b) {return b - a;});
  822. if (localList.length % 2 === 0) {
  823. return (localList[localList.length / 2 - 1] + localList[localList.length / 2]) / 2;
  824. } else {
  825. return localList[(localList.length - 1) / 2];
  826. }
  827. }
  828. `),U=se.valueToCode(U,"LIST",ce.NONE)||"[]",U=ke+"("+U+")";break;case"MODE":ke=se.provideFunction_("mathModes",`
  829. function ${se.FUNCTION_NAME_PLACEHOLDER_}(values) {
  830. var modes = [];
  831. var counts = [];
  832. var maxCount = 0;
  833. for (var i = 0; i < values.length; i++) {
  834. var value = values[i];
  835. var found = false;
  836. var thisCount;
  837. for (var j = 0; j < counts.length; j++) {
  838. if (counts[j][0] === value) {
  839. thisCount = ++counts[j][1];
  840. found = true;
  841. break;
  842. }
  843. }
  844. if (!found) {
  845. counts.push([value, 1]);
  846. thisCount = 1;
  847. }
  848. maxCount = Math.max(thisCount, maxCount);
  849. }
  850. for (var j = 0; j < counts.length; j++) {
  851. if (counts[j][1] === maxCount) {
  852. modes.push(counts[j][0]);
  853. }
  854. }
  855. return modes;
  856. }
  857. `),U=se.valueToCode(U,"LIST",ce.NONE)||"[]",U=ke+"("+U+")";break;case"STD_DEV":ke=se.provideFunction_("mathStandardDeviation",`
  858. function ${se.FUNCTION_NAME_PLACEHOLDER_}(numbers) {
  859. var n = numbers.length;
  860. if (!n) return null;
  861. var mean = numbers.reduce(function(x, y) {return x + y;}) / n;
  862. var variance = 0;
  863. for (var j = 0; j < n; j++) {
  864. variance += Math.pow(numbers[j] - mean, 2);
  865. }
  866. variance = variance / n;
  867. return Math.sqrt(variance);
  868. }
  869. `),U=se.valueToCode(U,"LIST",ce.NONE)||"[]",U=ke+"("+U+")";break;case"RANDOM":ke=se.provideFunction_("mathRandomList",`
  870. function ${se.FUNCTION_NAME_PLACEHOLDER_}(list) {
  871. var x = Math.floor(Math.random() * list.length);
  872. return list[x];
  873. }
  874. `),U=se.valueToCode(U,"LIST",ce.NONE)||"[]",U=ke+"("+U+")";break;default:throw Error("Unknown operator: "+ke)}return[U,ce.FUNCTION_CALL]},be=function(U,se){const ke=se.valueToCode(U,"DIVIDEND",ce.MODULUS)||"0";return U=se.valueToCode(U,"DIVISOR",ce.MODULUS)||"0",[ke+" % "+U,ce.MODULUS]},Ae=function(U,se){const ke=se.valueToCode(U,"VALUE",ce.NONE)||"0",je=se.valueToCode(U,"LOW",ce.NONE)||"0";return U=se.valueToCode(U,"HIGH",ce.NONE)||"Infinity",["Math.min(Math.max("+ke+", "+je+"), "+U+")",ce.FUNCTION_CALL]},We=function(U,se){const ke=se.valueToCode(U,"FROM",ce.NONE)||"0";return U=se.valueToCode(U,"TO",ce.NONE)||"0",[se.provideFunction_("mathRandomInt",`
  875. function ${se.FUNCTION_NAME_PLACEHOLDER_}(a, b) {
  876. if (a > b) {
  877. // Swap a and b to ensure a is smaller.
  878. var c = a;
  879. a = b;
  880. b = c;
  881. }
  882. return Math.floor(Math.random() * (b - a + 1) + a);
  883. }
  884. `)+"("+ke+", "+U+")",ce.FUNCTION_CALL]},$e=function(U,se){return["Math.random()",ce.FUNCTION_CALL]},ve=function(U,se){const ke=se.valueToCode(U,"X",ce.NONE)||"0";return["Math.atan2("+(se.valueToCode(U,"Y",ce.NONE)||"0")+", "+ke+") / Math.PI * 180",ce.DIVISION]},Pe=function(U,se){const ke=se.getProcedureName(U.getFieldValue("NAME"));var je="";se.STATEMENT_PREFIX&&(je+=se.injectId(se.STATEMENT_PREFIX,U)),se.STATEMENT_SUFFIX&&(je+=se.injectId(se.STATEMENT_SUFFIX,U)),je&&(je=se.prefixLines(je,se.INDENT));let Rt="";se.INFINITE_LOOP_TRAP&&(Rt=se.prefixLines(se.injectId(se.INFINITE_LOOP_TRAP,U),se.INDENT));const Qt=se.statementToCode(U,"STACK");let Cn=se.valueToCode(U,"RETURN",ce.NONE)||"",fs="";Qt&&Cn&&(fs=je),Cn&&(Cn=se.INDENT+"return "+Cn+`;
  885. `);const ps=[],js=U.getVars();for(let cr=0;cr<js.length;cr++)ps[cr]=se.getVariableName(js[cr]);return je="function "+ke+"("+ps.join(", ")+`) {
  886. `+je+Rt+Qt+fs+Cn+"}",je=se.scrub_(U,je),se.definitions_["%"+ke]=je,null},Be=function(U,se){const ke=se.getProcedureName(U.getFieldValue("NAME")),je=[],Rt=U.getVars();for(let Qt=0;Qt<Rt.length;Qt++)je[Qt]=se.valueToCode(U,"ARG"+Qt,ce.NONE)||"null";return[ke+"("+je.join(", ")+")",ce.FUNCTION_CALL]},ot=function(U,se){return se.forBlock.procedures_callreturn(U,se)[0]+`;
  887. `},Xe=function(U,se){let ke="if ("+(se.valueToCode(U,"CONDITION",ce.NONE)||"false")+`) {
  888. `;return se.STATEMENT_SUFFIX&&(ke+=se.prefixLines(se.injectId(se.STATEMENT_SUFFIX,U),se.INDENT)),U.hasReturnValue_?(U=se.valueToCode(U,"VALUE",ce.NONE)||"null",ke+=se.INDENT+"return "+U+`;
  889. `):ke+=se.INDENT+`return;
  890. `,ke+`}
  891. `},ee=function(U,se){return[se.quote_(U.getFieldValue("TEXT")),ce.ATOMIC]},pe=function(U,se){return U=se.multiline_quote_(U.getFieldValue("TEXT")),se=U.indexOf("+")!==-1?ce.ADDITION:ce.ATOMIC,[U,se]},Oe=function(U,se){switch(U.itemCount_){case 0:return["''",ce.ATOMIC];case 1:return U=se.valueToCode(U,"ADD0",ce.NONE)||"''",Rn(U);case 2:var ke=se.valueToCode(U,"ADD0",ce.NONE)||"''";return U=se.valueToCode(U,"ADD1",ce.NONE)||"''",[Rn(ke)[0]+" + "+Rn(U)[0],ce.ADDITION];default:ke=Array(U.itemCount_);for(let je=0;je<U.itemCount_;je++)ke[je]=se.valueToCode(U,"ADD"+je,ce.NONE)||"''";return["["+ke.join(",")+"].join('')",ce.FUNCTION_CALL]}},ze=function(U,se){const ke=se.getVariableName(U.getFieldValue("VAR"));return U=se.valueToCode(U,"TEXT",ce.NONE)||"''",ke+" += "+Rn(U)[0]+`;
  892. `},Ze=function(U,se){return[(se.valueToCode(U,"VALUE",ce.MEMBER)||"''")+".length",ce.MEMBER]},De=function(U,se){return["!"+(se.valueToCode(U,"VALUE",ce.MEMBER)||"''")+".length",ce.LOGICAL_NOT]},me=function(U,se){const ke=U.getFieldValue("END")==="FIRST"?"indexOf":"lastIndexOf",je=se.valueToCode(U,"FIND",ce.NONE)||"''";return se=(se.valueToCode(U,"VALUE",ce.MEMBER)||"''")+"."+ke+"("+je+")",U.workspace.options.oneBasedIndex?[se+" + 1",ce.ADDITION]:[se,ce.FUNCTION_CALL]},Te=function(U,se){const ke=U.getFieldValue("WHERE")||"FROM_START",je=se.valueToCode(U,"VALUE",ke==="RANDOM"?ce.NONE:ce.MEMBER)||"''";switch(ke){case"FIRST":return[je+".charAt(0)",ce.FUNCTION_CALL];case"LAST":return[je+".slice(-1)",ce.FUNCTION_CALL];case"FROM_START":return U=se.getAdjusted(U,"AT"),[je+".charAt("+U+")",ce.FUNCTION_CALL];case"FROM_END":return U=se.getAdjusted(U,"AT",1,!0),[je+".slice("+U+").charAt(0)",ce.FUNCTION_CALL];case"RANDOM":return[se.provideFunction_("textRandomLetter",`
  893. function ${se.FUNCTION_NAME_PLACEHOLDER_}(text) {
  894. var x = Math.floor(Math.random() * text.length);
  895. return text[x];
  896. }
  897. `)+"("+je+")",ce.FUNCTION_CALL]}throw Error("Unhandled option (text_charAt).")},Ue=function(U,se){var ke={FIRST:"First",LAST:"Last",FROM_START:"FromStart",FROM_END:"FromEnd"};const je=U.getFieldValue("WHERE1"),Rt=U.getFieldValue("WHERE2");var Qt=je!=="FROM_END"&&je!=="LAST"&&Rt!=="FROM_END"&&Rt!=="LAST",Cn=se.valueToCode(U,"STRING",Qt?ce.MEMBER:ce.NONE)||"''";if(je==="FIRST"&&Rt==="LAST")return[Cn,ce.NONE];if(Cn.match(/^'?\w+'?$/)||Qt){switch(je){case"FROM_START":ke=se.getAdjusted(U,"AT1");break;case"FROM_END":ke=se.getAdjusted(U,"AT1",1,!1,ce.SUBTRACTION),ke=Cn+".length - "+ke;break;case"FIRST":ke="0";break;default:throw Error("Unhandled option (text_getSubstring).")}switch(Rt){case"FROM_START":se=se.getAdjusted(U,"AT2",1);break;case"FROM_END":se=se.getAdjusted(U,"AT2",0,!1,ce.SUBTRACTION),se=Cn+".length - "+se;break;case"LAST":se=Cn+".length";break;default:throw Error("Unhandled option (text_getSubstring).")}Cn=Cn+".slice("+ke+", "+se+")"}else Qt=se.getAdjusted(U,"AT1"),U=se.getAdjusted(U,"AT2"),Cn=se.provideFunction_("subsequence"+ke[je]+ke[Rt],`
  898. function ${se.FUNCTION_NAME_PLACEHOLDER_}(sequence${je==="FROM_END"||je==="FROM_START"?", at1":""}${Rt==="FROM_END"||Rt==="FROM_START"?", at2":""}) {
  899. var start = ${Lo("sequence",je,"at1")};
  900. var end = ${Lo("sequence",Rt,"at2")} + 1;
  901. return sequence.slice(start, end);
  902. }
  903. `)+"("+Cn+(je==="FROM_END"||je==="FROM_START"?", "+Qt:"")+(Rt==="FROM_END"||Rt==="FROM_START"?", "+U:"")+")";return[Cn,ce.FUNCTION_CALL]},qe=function(U,se){const ke={UPPERCASE:".toUpperCase()",LOWERCASE:".toLowerCase()",TITLECASE:null}[U.getFieldValue("CASE")];return U=se.valueToCode(U,"TEXT",ke?ce.MEMBER:ce.NONE)||"''",[ke?U+ke:se.provideFunction_("textToTitleCase",`
  904. function ${se.FUNCTION_NAME_PLACEHOLDER_}(str) {
  905. return str.replace(/\\S+/g,
  906. function(txt) {return txt[0].toUpperCase() + txt.substring(1).toLowerCase();});
  907. }
  908. `)+"("+U+")",ce.FUNCTION_CALL]},ct=function(U,se){const ke={LEFT:".replace(/^[\\s\\xa0]+/, '')",RIGHT:".replace(/[\\s\\xa0]+$/, '')",BOTH:".trim()"}[U.getFieldValue("MODE")];return[(se.valueToCode(U,"TEXT",ce.MEMBER)||"''")+ke,ce.FUNCTION_CALL]},Ne=function(U,se){return"window.alert("+(se.valueToCode(U,"TEXT",ce.NONE)||"''")+`);
  909. `},Se=function(U,se){return se="window.prompt("+(U.getField("TEXT")?se.quote_(U.getFieldValue("TEXT")):se.valueToCode(U,"TEXT",ce.NONE)||"''")+")",U.getFieldValue("TYPE")==="NUMBER"&&(se="Number("+se+")"),[se,ce.FUNCTION_CALL]},Je=function(U,se){const ke=se.valueToCode(U,"TEXT",ce.NONE)||"''";return U=se.valueToCode(U,"SUB",ce.NONE)||"''",[se.provideFunction_("textCount",`
  910. function ${se.FUNCTION_NAME_PLACEHOLDER_}(haystack, needle) {
  911. if (needle.length === 0) {
  912. return haystack.length + 1;
  913. } else {
  914. return haystack.split(needle).length - 1;
  915. }
  916. }
  917. `)+"("+ke+", "+U+")",ce.FUNCTION_CALL]},ut=function(U,se){const ke=se.valueToCode(U,"TEXT",ce.NONE)||"''",je=se.valueToCode(U,"FROM",ce.NONE)||"''";return U=se.valueToCode(U,"TO",ce.NONE)||"''",[se.provideFunction_("textReplace",`
  918. function ${se.FUNCTION_NAME_PLACEHOLDER_}(haystack, needle, replacement) {
  919. needle = needle.replace(/([-()\\[\\]{}+?*.$\\^|,:#<!\\\\])/g, '\\\\$1')
  920. .replace(/\\x08/g, '\\\\x08');
  921. return haystack.replace(new RegExp(needle, 'g'), replacement);
  922. }
  923. `)+"("+ke+", "+je+", "+U+")",ce.FUNCTION_CALL]},Mt=function(U,se){return[(se.valueToCode(U,"TEXT",ce.MEMBER)||"''")+".split('').reverse().join('')",ce.FUNCTION_CALL]},mt=function(U,se){return[se.getVariableName(U.getFieldValue("VAR")),ce.ATOMIC]},qt=function(U,se){const ke=se.valueToCode(U,"VALUE",ce.ASSIGNMENT)||"0";return se.getVariableName(U.getFieldValue("VAR"))+" = "+ke+`;
  924. `},ce;(function(U){U[U.ATOMIC=0]="ATOMIC",U[U.NEW=1.1]="NEW",U[U.MEMBER=1.2]="MEMBER",U[U.FUNCTION_CALL=2]="FUNCTION_CALL",U[U.INCREMENT=3]="INCREMENT",U[U.DECREMENT=3]="DECREMENT",U[U.BITWISE_NOT=4.1]="BITWISE_NOT",U[U.UNARY_PLUS=4.2]="UNARY_PLUS",U[U.UNARY_NEGATION=4.3]="UNARY_NEGATION",U[U.LOGICAL_NOT=4.4]="LOGICAL_NOT",U[U.TYPEOF=4.5]="TYPEOF",U[U.VOID=4.6]="VOID",U[U.DELETE=4.7]="DELETE",U[U.AWAIT=4.8]="AWAIT",U[U.EXPONENTIATION=5]="EXPONENTIATION",U[U.MULTIPLICATION=5.1]="MULTIPLICATION",U[U.DIVISION=5.2]="DIVISION",U[U.MODULUS=5.3]="MODULUS",U[U.SUBTRACTION=6.1]="SUBTRACTION",U[U.ADDITION=6.2]="ADDITION",U[U.BITWISE_SHIFT=7]="BITWISE_SHIFT",U[U.RELATIONAL=8]="RELATIONAL",U[U.IN=8]="IN",U[U.INSTANCEOF=8]="INSTANCEOF",U[U.EQUALITY=9]="EQUALITY",U[U.BITWISE_AND=10]="BITWISE_AND",U[U.BITWISE_XOR=11]="BITWISE_XOR",U[U.BITWISE_OR=12]="BITWISE_OR",U[U.LOGICAL_AND=13]="LOGICAL_AND",U[U.LOGICAL_OR=14]="LOGICAL_OR",U[U.CONDITIONAL=15]="CONDITIONAL",U[U.ASSIGNMENT=16]="ASSIGNMENT",U[U.YIELD=17]="YIELD",U[U.COMMA=18]="COMMA",U[U.NONE=99]="NONE"})(ce||(ce={}));var q=class extends s.CodeGenerator$$module$build$src$core$generator{constructor(U="JavaScript"){super(U),this.ORDER_OVERRIDES=[[ce.FUNCTION_CALL,ce.MEMBER],[ce.FUNCTION_CALL,ce.FUNCTION_CALL],[ce.MEMBER,ce.MEMBER],[ce.MEMBER,ce.FUNCTION_CALL],[ce.LOGICAL_NOT,ce.LOGICAL_NOT],[ce.MULTIPLICATION,ce.MULTIPLICATION],[ce.ADDITION,ce.ADDITION],[ce.LOGICAL_AND,ce.LOGICAL_AND],[ce.LOGICAL_OR,ce.LOGICAL_OR]],this.isInitialized=!1;for(const se in ce)U=ce[se],typeof U!="string"&&(this["ORDER_"+se]=U);this.addReservedWords("break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,in,instanceof,new,return,super,switch,this,throw,try,typeof,var,void,while,with,yield,enum,implements,interface,let,package,private,protected,public,static,await,null,true,false,arguments,"+Object.getOwnPropertyNames(globalThis).join(","))}init(U){super.init(U),this.nameDB_?this.nameDB_.reset():this.nameDB_=new s.Names$$module$build$src$core$names(this.RESERVED_WORDS_),this.nameDB_.setVariableMap(U.getVariableMap()),this.nameDB_.populateVariables(U),this.nameDB_.populateProcedures(U);const se=[];var ke=s.allDeveloperVariables$$module$build$src$core$variables(U);for(let je=0;je<ke.length;je++)se.push(this.nameDB_.getName(ke[je],s.NameType$$module$build$src$core$names.DEVELOPER_VARIABLE));for(U=s.allUsedVarModels$$module$build$src$core$variables(U),ke=0;ke<U.length;ke++)se.push(this.nameDB_.getName(U[ke].getId(),s.NameType$$module$build$src$core$names.VARIABLE));se.length&&(this.definitions_.variables="var "+se.join(", ")+";"),this.isInitialized=!0}finish(U){const se=Object.values(this.definitions_);return super.finish(U),this.isInitialized=!1,this.nameDB_.reset(),se.join(`
  925. `)+`
  926. `+U}scrubNakedValue(U){return U+`;
  927. `}quote_(U){return U=U.replace(/\\/g,"\\\\").replace(/\n/g,`\\
  928. `).replace(/'/g,"\\'"),"'"+U+"'"}multiline_quote_(U){return U.split(/\n/g).map(this.quote_).join(` + '\\n' +
  929. `)}scrub_(U,se,ke=!1){let je="";if(!U.outputConnection||!U.outputConnection.targetConnection){var Rt=U.getCommentText();Rt&&(Rt=s.wrap$$module$build$src$core$utils$string(Rt,this.COMMENT_WRAP-3),je+=this.prefixLines(Rt+`
  930. `,"// "));for(let Qt=0;Qt<U.inputList.length;Qt++)U.inputList[Qt].type===s.inputTypes$$module$build$src$core$inputs$input_types.VALUE&&(Rt=U.inputList[Qt].connection.targetBlock())&&(Rt=this.allNestedComments(Rt))&&(je+=this.prefixLines(Rt,"// "))}return U=U.nextConnection&&U.nextConnection.targetBlock(),ke=ke?"":this.blockToCode(U),je+se+ke}getAdjusted(U,se,ke=0,je=!1,Rt=ce.NONE){U.workspace.options.oneBasedIndex&&ke--;const Qt=U.workspace.options.oneBasedIndex?"1":"0";let Cn=Rt;return 0<ke?Cn=ce.ADDITION:0>ke?Cn=ce.SUBTRACTION:je&&(Cn=ce.UNARY_NEGATION),U=this.valueToCode(U,se,Cn)||Qt,ke===0&&!je?U:s.isNumber$$module$build$src$core$utils$string(U)?(U=String(Number(U)+ke),je&&(U=String(-Number(U))),U):(0<ke?U=`${U} + ${ke}`:0>ke&&(U=`${U} - ${-ke}`),je&&(U=ke?`-(${U})`:`-${U}`),Math.floor(Rt)>=Math.floor(Cn)&&(U=`(${U})`),U)}},ne={};ne.colour_blend=c,ne.colour_picker=i,ne.colour_random=r,ne.colour_rgb=a;var Le=function(U,se,ke){return se==="FIRST"?"0":se==="FROM_END"?U+".length - 1 - "+ke:se==="LAST"?U+".length - 1":ke},ue={};ue.lists_create_empty=u,ue.lists_create_with=h,ue.lists_getIndex=v,ue.lists_getSublist=y,ue.lists_indexOf=E,ue.lists_isEmpty=_,ue.lists_length=p,ue.lists_repeat=f,ue.lists_reverse=I,ue.lists_setIndex=b,ue.lists_sort=S,ue.lists_split=L;var Fe={};Fe.controls_if=R,Fe.controls_ifelse=R,Fe.logic_boolean=P,Fe.logic_compare=w,Fe.logic_negate=D,Fe.logic_null=B,Fe.logic_operation=k,Fe.logic_ternary=F;var ye={};ye.controls_flow_statements=J,ye.controls_for=re,ye.controls_forEach=_e,ye.controls_repeat=X,ye.controls_repeat_ext=X,ye.controls_whileUntil=G;var ft={};ft.math_arithmetic=ae,ft.math_atan2=ve,ft.math_change=ge,ft.math_constant=Q,ft.math_constrain=Ae,ft.math_modulo=be,ft.math_number=Y,ft.math_number_property=he,ft.math_on_list=Ie,ft.math_random_float=$e,ft.math_random_int=We,ft.math_round=Z,ft.math_single=Z,ft.math_trig=Z;var Kt={};Kt.procedures_callnoreturn=ot,Kt.procedures_callreturn=Be,Kt.procedures_defnoreturn=Pe,Kt.procedures_defreturn=Pe,Kt.procedures_ifreturn=Xe;var En=/^\s*'([^']|\\')*'\s*$/,Rn=function(U){return En.test(U)?[U,ce.ATOMIC]:["String("+U+")",ce.FUNCTION_CALL]},Lo=function(U,se,ke){return se==="FIRST"?"0":se==="FROM_END"?U+".length - 1 - "+ke:se==="LAST"?U+".length - 1":ke},Ln={};Ln.text=ee,Ln.text_append=ze,Ln.text_changeCase=qe,Ln.text_charAt=Te,Ln.text_count=Je,Ln.text_getSubstring=Ue,Ln.text_indexOf=me,Ln.text_isEmpty=De,Ln.text_join=Oe,Ln.text_length=Ze,Ln.text_multiline=pe,Ln.text_print=Ne,Ln.text_prompt=Se,Ln.text_prompt_ext=Se,Ln.text_replace=ut,Ln.text_reverse=Mt,Ln.text_trim=ct;var Zn={};Zn.variables_get=mt,Zn.variables_set=qt;var On={};On.variables_get_dynamic=mt,On.variables_set_dynamic=qt;var xo=new q,ie=Object.assign({},ne,ue,Fe,ye,ft,Kt,Ln,Zn,On);for(const U in ie)xo.forBlock[U]=ie[U];var Ce={};return Ce.JavascriptGenerator=q,Ce.Order=ce,Ce.javascriptGenerator=xo,Ce.__namespace__=s,Ce})}(VR)),VR.exports}var S7=HR.exports,hF;function y7(){return hF||(hF=1,function(e,t){(function(n,s){e.exports=s(_P(),O7())})(S7,function(n,s){/**
  931. * @license
  932. * Copyright 2020 Google LLC
  933. * SPDX-License-Identifier: Apache-2.0
  934. */return s})}(HR)),HR.exports}var $7=NR.exports,fF;function I7(){return fF||(fF=1,function(e,t){(function(n,s){e.exports=s(_P(),m7(),v7(),y7())})($7,function(n,s,i,r){return n.setLocale(s),n})}(NR)),NR.exports}var R7=kR.exports,pF;function C7(){return pF||(pF=1,function(e,t){(function(n,s){e.exports=s(I7())})(R7,function(n){/**
  935. * @license
  936. * Copyright 2019 Google LLC
  937. * SPDX-License-Identifier: Apache-2.0
  938. */return n})}(kR)),kR.exports}var M7=C7();const C=Qc(M7);var M=M||{Msg:Object.create(null)};M.Msg.catLogic="逻辑";M.Msg.catLoops="循环";M.Msg.catMath="数学";M.Msg.catText="文本";M.Msg.catVariables="变量";M.Msg.catLists="列表";M.Msg.catDictionary="字典";M.Msg.catTuples="元组";M.Msg.catSet="集合";M.Msg.catFunctions="函数";M.Msg.catOutput="输入/输出";M.Msg.catFiles="文件";M.Msg.ADD_COMMENT="添加注释";M.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE="不能删除变量“%1”,因为它是函数“%2”定义的一部分";M.Msg.CHANGE_VALUE_TITLE="更改值:";M.Msg.CLEAN_UP="整理块";M.Msg.COLLAPSED_WARNINGS_WARNING="已收起的信息块内包含警告。";M.Msg.COLLAPSE_ALL="折叠块";M.Msg.COLLAPSE_BLOCK="折叠块";M.Msg.COLOUR_BLEND_COLOUR1="颜色1";M.Msg.COLOUR_BLEND_COLOUR2="颜色2";M.Msg.COLOUR_BLEND_HELPURL="https://meyerweb.com/eric/tools/color-blend/#:::rgbp";M.Msg.COLOUR_BLEND_RATIO="比例";M.Msg.COLOUR_BLEND_TITLE="混合";M.Msg.COLOUR_BLEND_TOOLTIP="把两种颜色以一个给定的比例(0.0-1.0)进行混合。";M.Msg.COLOUR_PICKER_HELPURL="https://zh.wikipedia.org/wiki/颜色";M.Msg.COLOUR_PICKER_TOOLTIP="从调色板中选择一种颜色。";M.Msg.COLOUR_RANDOM_HELPURL="http://randomcolour.com";M.Msg.COLOUR_RANDOM_TITLE="随机颜色";M.Msg.COLOUR_RANDOM_TOOLTIP="随机选择一种颜色。";M.Msg.COLOUR_RGB_BLUE="蓝色";M.Msg.COLOUR_RGB_GREEN="绿色";M.Msg.COLOUR_RGB_HELPURL="https://www.december.com/html/spec/colorpercompact.html";M.Msg.COLOUR_RGB_RED="红色";M.Msg.COLOUR_RGB_TITLE="颜色";M.Msg.COLOUR_RGB_TOOLTIP="通过指定红色、绿色和蓝色的量创建一种颜色。所有的值必须在0和100之间。";M.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL="https://github.com/google/blockly/wiki/Loops#loop-termination-blocks";M.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK="跳出循环";M.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE="继续下一轮循环";M.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK="跳出包含它的循环。";M.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE="跳过本轮循环的剩余部分,并继进行续下一轮循环。";M.Msg.CONTROLS_FLOW_STATEMENTS_WARNING="警告:这个块只能在循环内使用。";M.Msg.CONTROLS_FOREACH_HELPURL="https://github.com/google/blockly/wiki/Loops#for-each";M.Msg.CONTROLS_FOREACH_TITLE="遍历列表 %2 里的每一项 %1";M.Msg.CONTROLS_FOREACH_TOOLTIP="遍历列表中的每一项,将变量“%1”设为所选项,并执行一些语句。";M.Msg.CONTROLS_FOR_HELPURL="https://github.com/google/blockly/wiki/Loops#count-with";M.Msg.CONTROLS_FOR_TITLE="变量 %1 从 %2 数到 %3 每次增加 %4";M.Msg.CONTROLS_FOR_TOOLTIP="让变量“%1”记录开始数到结束数之间指定间隔的值,并执行指定的块。";M.Msg.CONTROLS_IF_ELSEIF_TOOLTIP="在这个if语句块中增加一个条件。";M.Msg.CONTROLS_IF_ELSE_TOOLTIP="在这个if语句块中添加一个最终的,包括所有其余情况的条件。";M.Msg.CONTROLS_IF_HELPURL="https://github.com/google/blockly/wiki/IfElse";M.Msg.CONTROLS_IF_IF_TOOLTIP="增加、删除或重新排列各节来重新配置这个if语句块。";M.Msg.CONTROLS_IF_MSG_ELSE="否则";M.Msg.CONTROLS_IF_MSG_ELSEIF="否则如果";M.Msg.CONTROLS_IF_MSG_IF="如果";M.Msg.CONTROLS_IF_TOOLTIP_1="如果值为真,执行一些语句。";M.Msg.CONTROLS_IF_TOOLTIP_2="如果值为真,则执行第一块语句。否则,则执行第二块语句。";M.Msg.CONTROLS_IF_TOOLTIP_3="如果第一个值为真,则执行第一块的语句。否则,如果第二个值为真,则执行第二块的语句。";M.Msg.CONTROLS_IF_TOOLTIP_4="如果第一个值为真,则执行第一块对语句。否则,如果第二个值为真,则执行语句的第二块。如果没有值为真,则执行最后一块的语句。";M.Msg.CONTROLS_REPEAT_HELPURL="https://zh.wikipedia.org/wiki/For循环";M.Msg.CONTROLS_REPEAT_INPUT_DO="执行";M.Msg.CONTROLS_REPEAT_TITLE="重复 %1 次";M.Msg.CONTROLS_REPEAT_TOOLTIP="多次执行一些语句。";M.Msg.CONTROLS_WHILEUNTIL_HELPURL="https://github.com/google/blockly/wiki/Loops#repeat";M.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL="重复直到条件满足";M.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE="当条件满足时重复";M.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL="只要值为假,就一直循环执行一些语句。";M.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE="只要值为真,就一直循环执行一些语句。";M.Msg.DELETE_ALL_BLOCKS="删除所有 %1 个块吗?";M.Msg.DELETE_BLOCK="删除块";M.Msg.DELETE_VARIABLE="删除变量“%1”";M.Msg.DELETE_VARIABLE_CONFIRMATION="要删除对变量“%2”的%1个引用吗?";M.Msg.DELETE_X_BLOCKS="删除 %1 个块";M.Msg.DIALOG_CANCEL="取消";M.Msg.DIALOG_OK="确认";M.Msg.DISABLE_BLOCK="禁用块";M.Msg.DUPLICATE_BLOCK="复制";M.Msg.DUPLICATE_COMMENT="复制注释";M.Msg.ENABLE_BLOCK="启用块";M.Msg.EXPAND_ALL="展开块";M.Msg.EXPAND_BLOCK="展开块";M.Msg.EXTERNAL_INPUTS="外部输入";M.Msg.HELP="帮助";M.Msg.INLINE_INPUTS="单行输入";M.Msg.LISTS_CREATE_EMPTY_HELPURL="https://github.com/google/blockly/wiki/Lists#create-empty-list";M.Msg.LISTS_CREATE_EMPTY_TITLE="创建空列表";M.Msg.LISTS_CREATE_EMPTY_TOOLTIP="返回一个列表,长度为 0,不包含任何数据记录";M.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD="列表";M.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP="增加、删除或重新排列各部分以此重新配置这个列表块。";M.Msg.LISTS_CREATE_WITH_HELPURL="https://github.com/google/blockly/wiki/Lists#create-list-with";M.Msg.LISTS_CREATE_WITH_INPUT_WITH="创建列表,内容:";M.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP="将一个项添加到列表中。";M.Msg.LISTS_CREATE_WITH_TOOLTIP="建立一个具有任意数量项目的列表。";M.Msg.LISTS_GET_INDEX_FIRST="第一项";M.Msg.LISTS_GET_INDEX_FROM_END="倒数第#项";M.Msg.LISTS_GET_INDEX_FROM_START="#";M.Msg.LISTS_GET_INDEX_GET="取得";M.Msg.LISTS_GET_INDEX_GET_REMOVE="取得并移除";M.Msg.LISTS_GET_INDEX_LAST="最后一项";M.Msg.LISTS_GET_INDEX_RANDOM="随机的一项";M.Msg.LISTS_GET_INDEX_REMOVE="移除";M.Msg.LISTS_GET_INDEX_TAIL="";M.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST="返回列表中的第一项。";M.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM="返回在列表中的指定位置的项。";M.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST="返回列表中的最后一项。";M.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM="返回列表中的随机一项。";M.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST="移除并返回列表中的第一项。";M.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM="移除并返回列表中的指定位置的项。";M.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST="移除并返回列表中的最后一项。";M.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM="移除并返回列表中的随机一项。";M.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST="移除列表中的第一项";M.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM="移除在列表中的指定位置的项。";M.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST="移除列表中的最后一项";M.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM="删除列表中的随机一项。";M.Msg.LISTS_GET_SUBLIST_END_FROM_END="到倒数第#项";M.Msg.LISTS_GET_SUBLIST_END_FROM_START="到第#项";M.Msg.LISTS_GET_SUBLIST_END_LAST="到最后一项";M.Msg.LISTS_GET_SUBLIST_HELPURL="https://github.com/google/blockly/wiki/Lists#getting-a-sublist";M.Msg.LISTS_GET_SUBLIST_START_FIRST="获取子列表,从第一项";M.Msg.LISTS_GET_SUBLIST_START_FROM_END="获取子列表,从倒数第#项";M.Msg.LISTS_GET_SUBLIST_START_FROM_START="获取子列表,从第#项";M.Msg.LISTS_GET_SUBLIST_TAIL="";M.Msg.LISTS_GET_SUBLIST_TOOLTIP="复制列表中指定的部分。";M.Msg.LISTS_INDEX_FROM_END_TOOLTIP="%1是最后一项。";M.Msg.LISTS_INDEX_FROM_START_TOOLTIP="%1是第一项。";M.Msg.LISTS_INDEX_OF_FIRST="寻找第一次出现的项";M.Msg.LISTS_INDEX_OF_HELPURL="https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list";M.Msg.LISTS_INDEX_OF_LAST="寻找最后一次出现的项";M.Msg.LISTS_INDEX_OF_TOOLTIP="返回在列表中的第一/最后一个匹配项的索引值。如果找不到项目则返回%1。";M.Msg.LISTS_INLIST="在列表中";M.Msg.LISTS_ISEMPTY_HELPURL="https://github.com/google/blockly/wiki/Lists#is-empty";M.Msg.LISTS_ISEMPTY_TITLE="%1是空的";M.Msg.LISTS_ISEMPTY_TOOLTIP="如果改列表为空,则返回真。";M.Msg.LISTS_LENGTH_HELPURL="https://github.com/google/blockly/wiki/Lists#length-of";M.Msg.LISTS_LENGTH_TITLE="%1的长度";M.Msg.LISTS_LENGTH_TOOLTIP="返回列表的长度。";M.Msg.LISTS_REPEAT_HELPURL="https://github.com/google/blockly/wiki/Lists#create-list-with";M.Msg.LISTS_REPEAT_TITLE="建立列表使用项 %1 重复 %2 次";M.Msg.LISTS_REPEAT_TOOLTIP="建立包含指定重复次数的值的列表。";M.Msg.LISTS_REVERSE_HELPURL="https://github.com/google/blockly/wiki/Lists#reversing-a-list";M.Msg.LISTS_REVERSE_MESSAGE0="倒转%1";M.Msg.LISTS_REVERSE_TOOLTIP="倒转一个列表,返回副本。";M.Msg.LISTS_SET_INDEX_HELPURL="https://github.com/google/blockly/wiki/Lists#in-list--set";M.Msg.LISTS_SET_INDEX_INPUT_TO="值为";M.Msg.LISTS_SET_INDEX_INSERT="插入在";M.Msg.LISTS_SET_INDEX_SET="设置";M.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST="在列表的起始处添加该项。";M.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM="在列表中指定位置插入项。";M.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST="在列表的末尾处添加该项。";M.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM="在列表的随机位置插入该项。";M.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST="设置列表中的第一项。";M.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM="设置在列表中指定位置的项。";M.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST="设置列表中的最后一项。";M.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM="设置列表中的随机一项。";M.Msg.LISTS_SORT_HELPURL="https://github.com/google/blockly/wiki/Lists#sorting-a-list";M.Msg.LISTS_SORT_ORDER_ASCENDING="升序";M.Msg.LISTS_SORT_ORDER_DESCENDING="降序";M.Msg.LISTS_SORT_TITLE="排序%1 %2 %3";M.Msg.LISTS_SORT_TOOLTIP="排序一个列表,返回副本。";M.Msg.LISTS_SORT_TYPE_IGNORECASE="按字母(忽略大小写)";M.Msg.LISTS_SORT_TYPE_NUMERIC="按数字";M.Msg.LISTS_SORT_TYPE_TEXT="按字母";M.Msg.LISTS_SPLIT_HELPURL="https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";M.Msg.LISTS_SPLIT_LIST_FROM_TEXT="从文本制作列表";M.Msg.LISTS_SPLIT_TEXT_FROM_LIST="将列表合并为文本";M.Msg.LISTS_SPLIT_TOOLTIP_JOIN="加入文本列表至一个文本,由分隔符分隔。";M.Msg.LISTS_SPLIT_TOOLTIP_SPLIT="将文本按指定的分隔符拆分为文本组成的列表。";M.Msg.LISTS_SPLIT_WITH_DELIMITER="分隔符:";M.Msg.LOGIC_BOOLEAN_FALSE="false";M.Msg.LOGIC_BOOLEAN_HELPURL="https://github.com/google/blockly/wiki/Logic#values";M.Msg.LOGIC_BOOLEAN_TOOLTIP="返回 true 或 false。";M.Msg.LOGIC_BOOLEAN_TRUE="true";M.Msg.LOGIC_COMPARE_HELPURL="https://zh.wikipedia.org/wiki/不等";M.Msg.LOGIC_COMPARE_TOOLTIP_EQ="如果两个输入结果相等,则返回真。";M.Msg.LOGIC_COMPARE_TOOLTIP_GT="如果第一个输入结果比第二个大,则返回真。";M.Msg.LOGIC_COMPARE_TOOLTIP_GTE="如果第一个输入结果大于或等于第二个输入结果,则返回真。";M.Msg.LOGIC_COMPARE_TOOLTIP_LT="如果第一个输入结果比第二个小,则返回真。";M.Msg.LOGIC_COMPARE_TOOLTIP_LTE="如果第一个输入结果小于或等于第二个输入结果,则返回真。";M.Msg.LOGIC_COMPARE_TOOLTIP_NEQ="如果两个输入结果不相等,则返回真。";M.Msg.LOGIC_NEGATE_HELPURL="https://github.com/google/blockly/wiki/Logic#not";M.Msg.LOGIC_NEGATE_TITLE="非 %1";M.Msg.LOGIC_NEGATE_TOOLTIP="如果输入结果为false,则返回true;如果输入结果为true,则返回false。";M.Msg.LOGIC_NULL="空";M.Msg.LOGIC_NULL_HELPURL="https://en.wikipedia.org/wiki/Nullable_type";M.Msg.LOGIC_NULL_TOOLTIP="返回空值。";M.Msg.LOGIC_OPERATION_AND="并且";M.Msg.LOGIC_OPERATION_HELPURL="https://github.com/google/blockly/wiki/Logic#logical-operations";M.Msg.LOGIC_OPERATION_OR="或";M.Msg.LOGIC_OPERATION_TOOLTIP_AND="如果两个输入结果都为真,则返回真。";M.Msg.LOGIC_OPERATION_TOOLTIP_OR="如果至少有一个输入结果为真,则返回真。";M.Msg.LOGIC_TERNARY_CONDITION="断言";M.Msg.LOGIC_TERNARY_HELPURL="https://zh.wikipedia.org/wiki/条件运算符";M.Msg.LOGIC_TERNARY_IF_FALSE="如果为 false";M.Msg.LOGIC_TERNARY_IF_TRUE="如果为 true";M.Msg.LOGIC_TERNARY_TOOLTIP="检查“断言”里的条件语句。如果条件为真,则返回“如果为真”的值,否则,则返回“如果为假”的值。";M.Msg.MATH_ADDITION_SYMBOL="+";M.Msg.MATH_ARITHMETIC_HELPURL="https://zh.wikipedia.org/wiki/算术";M.Msg.MATH_ARITHMETIC_TOOLTIP_ADD="返回两个数的和。";M.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE="返回两个数的商。";M.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS="返回两个数的差。";M.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY="返回两个数的积。";M.Msg.MATH_ARITHMETIC_TOOLTIP_POWER="返回第一个数的第二个数次幂。";M.Msg.MATH_ATAN2_HELPURL="https://zh.wikipedia.org/wiki/反正切2";M.Msg.MATH_ATAN2_TITLE="点(x:%1,y:%2)的方位角";M.Msg.MATH_ATAN2_TOOLTIP="返回点(X,Y)的反正切值,范围为-180到180度。";M.Msg.MATH_CHANGE_HELPURL="https://zh.wikipedia.org/wiki/加法";M.Msg.MATH_CHANGE_TITLE="给 %1 加 %2";M.Msg.MATH_CHANGE_TOOLTIP="把数加到变量“%1”。";M.Msg.MATH_CONSTANT_HELPURL="https://zh.wikipedia.org/wiki/数学常数";M.Msg.MATH_CONSTANT_TOOLTIP="返回一个以下常见常数:π (3.141…)、e (2.718…)、φ (1.618…)、根号2 (1.414…)、根号½ (0.707…)或∞ (无穷)。";M.Msg.MATH_CONSTRAIN_HELPURL="https://en.wikipedia.org/wiki/Clamping_(graphics)";M.Msg.MATH_CONSTRAIN_TITLE="将 %1 限制在 最低 %2 到最高 %3 之间";M.Msg.MATH_CONSTRAIN_TOOLTIP="把一个数限制在指定的极限(含)之间。";M.Msg.MATH_DIVISION_SYMBOL="÷";M.Msg.MATH_IS_DIVISIBLE_BY="可整除被";M.Msg.MATH_IS_EVEN="是偶数";M.Msg.MATH_IS_NEGATIVE="是负数";M.Msg.MATH_IS_ODD="是奇数";M.Msg.MATH_IS_POSITIVE="是正数";M.Msg.MATH_IS_PRIME="是质数";M.Msg.MATH_IS_TOOLTIP="检查一个数是否是偶数、奇数、质数、整数、正数、负数,或者是否能被某数整除。返回真或假。";M.Msg.MATH_IS_WHOLE="是整数";M.Msg.MATH_MODULO_HELPURL="https://zh.wikipedia.org/wiki/模除";M.Msg.MATH_MODULO_TITLE="%1 ÷ %2 的余数";M.Msg.MATH_MODULO_TOOLTIP="返回两个数相除的余数。";M.Msg.MATH_MULTIPLICATION_SYMBOL="×";M.Msg.MATH_NUMBER_HELPURL="https://zh.wikipedia.org/wiki/数";M.Msg.MATH_NUMBER_TOOLTIP="一个数。";M.Msg.MATH_ONLIST_HELPURL="";M.Msg.MATH_ONLIST_OPERATOR_AVERAGE="列表的平均";M.Msg.MATH_ONLIST_OPERATOR_MAX="列表的最大数";M.Msg.MATH_ONLIST_OPERATOR_MEDIAN="列表的中位数";M.Msg.MATH_ONLIST_OPERATOR_MIN="列表的最小数";M.Msg.MATH_ONLIST_OPERATOR_MODE="列表的众数";M.Msg.MATH_ONLIST_OPERATOR_RANDOM="列表的随机项";M.Msg.MATH_ONLIST_OPERATOR_STD_DEV="列表的标准差";M.Msg.MATH_ONLIST_OPERATOR_SUM="列表的和";M.Msg.MATH_ONLIST_TOOLTIP_AVERAGE="返回列表内数值的平均(算术平均)。";M.Msg.MATH_ONLIST_TOOLTIP_MAX="返回列表内的最大数。";M.Msg.MATH_ONLIST_TOOLTIP_MEDIAN="返回列表内数的中位数。";M.Msg.MATH_ONLIST_TOOLTIP_MIN="返回列表内的最小数。";M.Msg.MATH_ONLIST_TOOLTIP_MODE="返回列表中的出现次数最多的项的列表。";M.Msg.MATH_ONLIST_TOOLTIP_RANDOM="返回列表内的一个随机元素。";M.Msg.MATH_ONLIST_TOOLTIP_STD_DEV="返回列表的标准差。";M.Msg.MATH_ONLIST_TOOLTIP_SUM="返回列表内的所有数的和。";M.Msg.MATH_POWER_SYMBOL="^";M.Msg.MATH_RANDOM_FLOAT_HELPURL="https://zh.wikipedia.org/wiki/随机数生成器";M.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM="随机小数";M.Msg.MATH_RANDOM_FLOAT_TOOLTIP="返回一个从0.0(含)到1.0(不含)之间的随机数。";M.Msg.MATH_RANDOM_INT_HELPURL="https://zh.wikipedia.org/wiki/随机数生成器";M.Msg.MATH_RANDOM_INT_TITLE="从 %1 到 %2 范围内的随机整数";M.Msg.MATH_RANDOM_INT_TOOLTIP="返回两个指定的极限(含)之间的随机整数。";M.Msg.MATH_ROUND_HELPURL="https://zh.wikipedia.org/wiki/数值修约";M.Msg.MATH_ROUND_OPERATOR_ROUND="四舍五入";M.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN="向下舍入";M.Msg.MATH_ROUND_OPERATOR_ROUNDUP="向上舍入";M.Msg.MATH_ROUND_TOOLTIP="数向上或向下取整。";M.Msg.MATH_SINGLE_HELPURL="https://zh.wikipedia.org/wiki/平方根";M.Msg.MATH_SINGLE_OP_ABSOLUTE="绝对值";M.Msg.MATH_SINGLE_OP_ROOT="平方根";M.Msg.MATH_SINGLE_TOOLTIP_ABS="返回一个数的绝对值。";M.Msg.MATH_SINGLE_TOOLTIP_EXP="返回e的一个数次幂。";M.Msg.MATH_SINGLE_TOOLTIP_LN="返回一个数的自然对数。";M.Msg.MATH_SINGLE_TOOLTIP_LOG10="返回一个数的以10为底的对数。";M.Msg.MATH_SINGLE_TOOLTIP_NEG="返回一个数的相反数。";M.Msg.MATH_SINGLE_TOOLTIP_POW10="返回10的一个数次幂。";M.Msg.MATH_SINGLE_TOOLTIP_ROOT="返回一个数的平方根。";M.Msg.MATH_SUBTRACTION_SYMBOL="-";M.Msg.MATH_TRIG_ACOS="反余弦";M.Msg.MATH_TRIG_ASIN="反正弦";M.Msg.MATH_TRIG_ATAN="反正切";M.Msg.MATH_TRIG_COS="余弦";M.Msg.MATH_TRIG_HELPURL="https://zh.wikipedia.org/wiki/三角函数";M.Msg.MATH_TRIG_SIN="正弦";M.Msg.MATH_TRIG_TAN="正切";M.Msg.MATH_TRIG_TOOLTIP_ACOS="返回一个数的反余弦。";M.Msg.MATH_TRIG_TOOLTIP_ASIN="返回一个数的反正弦。";M.Msg.MATH_TRIG_TOOLTIP_ATAN="返回一个数的反正切。";M.Msg.MATH_TRIG_TOOLTIP_COS="返回角度(非弧度)的余弦。";M.Msg.MATH_TRIG_TOOLTIP_SIN="返回角度(非弧度)的正弦。";M.Msg.MATH_TRIG_TOOLTIP_TAN="返回角度(非弧度)的正切。";M.Msg.NEW_COLOUR_VARIABLE="创建颜色变量...";M.Msg.NEW_NUMBER_VARIABLE="创建数变量...";M.Msg.NEW_STRING_VARIABLE="创建字符串变量...";M.Msg.NEW_VARIABLE="创建变量...";M.Msg.NEW_VARIABLE_TITLE="新变量的名称:";M.Msg.NEW_VARIABLE_TYPE_TITLE="新变量的类型:";M.Msg.ORDINAL_NUMBER_SUFFIX="";M.Msg.PROCEDURES_ALLOW_STATEMENTS="允许声明";M.Msg.PROCEDURES_BEFORE_PARAMS="与:";M.Msg.PROCEDURES_CALLNORETURN_HELPURL="https://zh.wikipedia.org/wiki/子程序";M.Msg.PROCEDURES_CALLNORETURN_TOOLTIP="运行用户定义的函数“%1”。";M.Msg.PROCEDURES_CALLRETURN_HELPURL="https://zh.wikipedia.org/wiki/子程序";M.Msg.PROCEDURES_CALLRETURN_TOOLTIP="运行用户定义的函数“%1”,并使用它的输出值。";M.Msg.PROCEDURES_CALL_BEFORE_PARAMS="与:";M.Msg.PROCEDURES_CREATE_DO="创建“%1”";M.Msg.PROCEDURES_DEFNORETURN_COMMENT="描述该功能...";M.Msg.PROCEDURES_DEFNORETURN_DO="";M.Msg.PROCEDURES_DEFNORETURN_HELPURL="https://zh.wikipedia.org/wiki/子程序";M.Msg.PROCEDURES_DEFNORETURN_PROCEDURE="做点什么";M.Msg.PROCEDURES_DEFNORETURN_TITLE="至";M.Msg.PROCEDURES_DEFNORETURN_TOOLTIP="创建一个不带输出值的函数。";M.Msg.PROCEDURES_DEFRETURN_HELPURL="https://zh.wikipedia.org/wiki/子程序";M.Msg.PROCEDURES_DEFRETURN_RETURN="返回";M.Msg.PROCEDURES_DEFRETURN_TOOLTIP="创建一个有输出值的函数。";M.Msg.PROCEDURES_DEF_DUPLICATE_WARNING="警告:此函数具有重复参数。";M.Msg.PROCEDURES_HIGHLIGHT_DEF="突出显示函数定义";M.Msg.PROCEDURES_IFRETURN_HELPURL="https://c2.com/cgi/wiki?GuardClause";M.Msg.PROCEDURES_IFRETURN_TOOLTIP="如果值为真,则返回第二个值。";M.Msg.PROCEDURES_IFRETURN_WARNING="警告:这个块只能在函数内部使用。";M.Msg.PROCEDURES_MUTATORARG_TITLE="输入名称:";M.Msg.PROCEDURES_MUTATORARG_TOOLTIP="添加函数输入。";M.Msg.PROCEDURES_MUTATORCONTAINER_TITLE="输入";M.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP="添加、移除或重新排此函数的输入。";M.Msg.REDO="重做";M.Msg.REMOVE_COMMENT="删除注释";M.Msg.RENAME_VARIABLE="重命名变量...";M.Msg.RENAME_VARIABLE_TITLE="将所有“%1”变量重命名为:";M.Msg.TEXT_APPEND_HELPURL="https://github.com/google/blockly/wiki/Text#text-modification";M.Msg.TEXT_APPEND_TITLE="在%1之后加上文本%2";M.Msg.TEXT_APPEND_TOOLTIP="将一些文本追加到变量“%1”里。";M.Msg.TEXT_CHANGECASE_HELPURL="https://github.com/google/blockly/wiki/Text#adjusting-text-case";M.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE="转为小写";M.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE="转为首字母大写";M.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE="转为大写";M.Msg.TEXT_CHANGECASE_TOOLTIP="用不同的大小写模式复制并返回这段文字。";M.Msg.TEXT_CHARAT_FIRST="获取第一个字符";M.Msg.TEXT_CHARAT_FROM_END="获取倒数第#个字符";M.Msg.TEXT_CHARAT_FROM_START="获取第#个字符";M.Msg.TEXT_CHARAT_HELPURL="https://github.com/google/blockly/wiki/Text#extracting-text";M.Msg.TEXT_CHARAT_LAST="获取最后一个字符";M.Msg.TEXT_CHARAT_RANDOM="获取随机一个字符";M.Msg.TEXT_CHARAT_TAIL="";M.Msg.TEXT_CHARAT_TITLE="在文本%1 里 %2";M.Msg.TEXT_CHARAT_TOOLTIP="返回位于指定位置的字符。";M.Msg.TEXT_COUNT_HELPURL="https://github.com/google/blockly/wiki/Text#counting-substrings";M.Msg.TEXT_COUNT_MESSAGE0="计算%1在%2里出现的次数";M.Msg.TEXT_COUNT_TOOLTIP="计算在一段文本中,某个部分文本重复出现了多少次。";M.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP="将一个项添加到文本中。";M.Msg.TEXT_CREATE_JOIN_TITLE_JOIN="拼接";M.Msg.TEXT_CREATE_JOIN_TOOLTIP="添加、移除或重新排列各节来重新配置这个文本块。";M.Msg.TEXT_GET_SUBSTRING_END_FROM_END="到倒数第#个字符";M.Msg.TEXT_GET_SUBSTRING_END_FROM_START="到第#个字符";M.Msg.TEXT_GET_SUBSTRING_END_LAST="到最后一个字符";M.Msg.TEXT_GET_SUBSTRING_HELPURL="https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text";M.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT="从文本";M.Msg.TEXT_GET_SUBSTRING_START_FIRST="获取子串,从第一个字符";M.Msg.TEXT_GET_SUBSTRING_START_FROM_END="获取子串,从倒数第#个字符";M.Msg.TEXT_GET_SUBSTRING_START_FROM_START="获取子串,从第#个字符";M.Msg.TEXT_GET_SUBSTRING_TAIL="";M.Msg.TEXT_GET_SUBSTRING_TOOLTIP="返回文本中指定的一部分。";M.Msg.TEXT_INDEXOF_HELPURL="https://github.com/google/blockly/wiki/Text#finding-text";M.Msg.TEXT_INDEXOF_OPERATOR_FIRST="寻找第一次出现的文本";M.Msg.TEXT_INDEXOF_OPERATOR_LAST="寻找最后一次出现的文本";M.Msg.TEXT_INDEXOF_TITLE="在文本 %1 里 %2 %3";M.Msg.TEXT_INDEXOF_TOOLTIP="返回第一个文本段在第二个文本段中的第一/最后一个匹配项的起始位置。如果未找到,则返回%1。";M.Msg.TEXT_ISEMPTY_HELPURL="https://github.com/google/blockly/wiki/Text#checking-for-empty-text";M.Msg.TEXT_ISEMPTY_TITLE="%1是空的";M.Msg.TEXT_ISEMPTY_TOOLTIP="如果给定的文本为空,则返回真。";M.Msg.TEXT_JOIN_HELPURL="https://github.com/google/blockly/wiki/Text#text-creation";M.Msg.TEXT_JOIN_TITLE_CREATEWITH="创建文本,内容:";M.Msg.TEXT_JOIN_TOOLTIP="通过串起任意数量的项以建立一段文本。";M.Msg.TEXT_LENGTH_HELPURL="https://github.com/google/blockly/wiki/Text#text-modification";M.Msg.TEXT_LENGTH_TITLE="%1的长度";M.Msg.TEXT_LENGTH_TOOLTIP="返回给定文本的字母数(包括空格)。";M.Msg.TEXT_PRINT_HELPURL="https://github.com/google/blockly/wiki/Text#printing-text";M.Msg.TEXT_PRINT_TITLE="输出%1";M.Msg.TEXT_PRINT_TOOLTIP="打印指定的文字、数或其他值。";M.Msg.TEXT_PROMPT_HELPURL="https://github.com/google/blockly/wiki/Text#getting-input-from-the-user";M.Msg.TEXT_PROMPT_TOOLTIP_NUMBER="提示用户输入一个数。";M.Msg.TEXT_PROMPT_TOOLTIP_TEXT="要求用户输入一些文本。";M.Msg.TEXT_PROMPT_TYPE_NUMBER="提示输入数并显示消息";M.Msg.TEXT_PROMPT_TYPE_TEXT="要求输入文本,并显示提示消息";M.Msg.TEXT_REPLACE_HELPURL="https://github.com/google/blockly/wiki/Text#replacing-substrings";M.Msg.TEXT_REPLACE_MESSAGE0="把%3中的%1替换为%2";M.Msg.TEXT_REPLACE_TOOLTIP="在一段文本中,将出现过的某部分文本都替换掉。";M.Msg.TEXT_REVERSE_HELPURL="https://github.com/google/blockly/wiki/Text#reversing-text";M.Msg.TEXT_REVERSE_MESSAGE0="倒转文本%1";M.Msg.TEXT_REVERSE_TOOLTIP="将文本中各个字符的顺序倒转。";M.Msg.TEXT_TEXT_HELPURL="https://zh.wikipedia.org/wiki/字符串";M.Msg.TEXT_TEXT_TOOLTIP="一个字、词或一行文本。";M.Msg.TEXT_TRIM_HELPURL="https://github.com/google/blockly/wiki/Text#trimming-removing-spaces";M.Msg.TEXT_TRIM_OPERATOR_BOTH="消除其两侧的空格";M.Msg.TEXT_TRIM_OPERATOR_LEFT="消除其左侧的空格";M.Msg.TEXT_TRIM_OPERATOR_RIGHT="消除其右侧的空格";M.Msg.TEXT_TRIM_TOOLTIP="从某一端或同时从两端删除多余的空白,并返回这段文字的一个副本。";M.Msg.TODAY="今天";M.Msg.UNDO="撤销";M.Msg.UNNAMED_KEY="未命名";M.Msg.VARIABLES_DEFAULT_NAME="项目";M.Msg.VARIABLES_GET_CREATE_SET="创建“设定%1”";M.Msg.VARIABLES_GET_HELPURL="https://github.com/google/blockly/wiki/Variables#get";M.Msg.VARIABLES_GET_TOOLTIP="返回此变量的值。";M.Msg.VARIABLES_SET="赋值 %1 为 %2";M.Msg.VARIABLES_SET_CREATE_GET="创建“获得%1”";M.Msg.VARIABLES_SET_HELPURL="https://github.com/google/blockly/wiki/Variables#set";M.Msg.VARIABLES_SET_TOOLTIP="设置此变量,以使它和输入值相等。";M.Msg.VARIABLE_ALREADY_EXISTS="名字叫“%1”的变量已经存在了。";M.Msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE="名字叫“%1”的变量已经有了另一个类型:“%2”。";M.Msg.WORKSPACE_ARIA_LABEL="Blockly工作区";M.Msg.WORKSPACE_COMMENT_DEFAULT_TEXT="说点什么...";M.Msg.CONTROLS_FOREACH_INPUT_DO=M.Msg.CONTROLS_REPEAT_INPUT_DO;M.Msg.CONTROLS_FOR_INPUT_DO=M.Msg.CONTROLS_REPEAT_INPUT_DO;M.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF=M.Msg.CONTROLS_IF_MSG_ELSEIF;M.Msg.CONTROLS_IF_ELSE_TITLE_ELSE=M.Msg.CONTROLS_IF_MSG_ELSE;M.Msg.CONTROLS_IF_IF_TITLE_IF=M.Msg.CONTROLS_IF_MSG_IF;M.Msg.CONTROLS_IF_MSG_THEN=M.Msg.CONTROLS_REPEAT_INPUT_DO;M.Msg.CONTROLS_WHILEUNTIL_INPUT_DO=M.Msg.CONTROLS_REPEAT_INPUT_DO;M.Msg.LISTS_CREATE_WITH_ITEM_TITLE=M.Msg.VARIABLES_DEFAULT_NAME;M.Msg.LISTS_GET_INDEX_HELPURL=M.Msg.LISTS_INDEX_OF_HELPURL;M.Msg.LISTS_GET_INDEX_INPUT_IN_LIST=M.Msg.LISTS_INLIST;M.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST=M.Msg.LISTS_INLIST;M.Msg.LISTS_INDEX_OF_INPUT_IN_LIST=M.Msg.LISTS_INLIST;M.Msg.LISTS_SET_INDEX_INPUT_IN_LIST=M.Msg.LISTS_INLIST;M.Msg.MATH_CHANGE_TITLE_ITEM=M.Msg.VARIABLES_DEFAULT_NAME;M.Msg.PROCEDURES_DEFRETURN_COMMENT=M.Msg.PROCEDURES_DEFNORETURN_COMMENT;M.Msg.PROCEDURES_DEFRETURN_DO=M.Msg.PROCEDURES_DEFNORETURN_DO;M.Msg.PROCEDURES_DEFRETURN_PROCEDURE=M.Msg.PROCEDURES_DEFNORETURN_PROCEDURE;M.Msg.PROCEDURES_DEFRETURN_TITLE=M.Msg.PROCEDURES_DEFNORETURN_TITLE;M.Msg.TEXT_APPEND_VARIABLE=M.Msg.VARIABLES_DEFAULT_NAME;M.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM=M.Msg.VARIABLES_DEFAULT_NAME;M.Msg.MATH_HUE="230";M.Msg.LOOPS_HUE="120";M.Msg.LISTS_HUE="260";M.Msg.LOGIC_HUE="210";M.Msg.VARIABLES_HUE="330";M.Msg.TEXTS_HUE="160";M.Msg.PROCEDURES_HUE="290";M.Msg.COLOUR_HUE="20";M.Msg.VARIABLES_DYNAMIC_HUE="310";M.Msg.TEXT_IS_NUMBER_HELPURL="";M.Msg.TEXT_IS_NUMBER_TOOLTIP="判断文本%1,并返回True或False";M.Msg.TEXT_IS_NUMBER_MESSAGE0="%1 %2";M.Msg.TEXT_IS_DIGIT="是数字";M.Msg.TEXT_IS_ALPHA="是字母";M.Msg.TEXT_IS_ALNUM="是数字和字母的组合";M.Msg.TEXT_LIST_START="初始化列表 [";M.Msg.TEXT_LIST_END="]";M.Msg.TEXT_TUPLE_START="初始化元组 (";M.Msg.TEXT_TUPLE_END=")";M.Msg.TEXT_DICT_START="初始化字典 {";M.Msg.TEXT_DICT_END="}";M.Msg.TEXT_SET_START="初始化集合 {";M.Msg.TEXT_SET_END="}";M.Msg.TEXT_SET_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/index.html";M.Msg.ADD_COMMENT="添加注释";M.Msg.CHANGE_VALUE_TITLE="更改值:";M.Msg.CLEAN_UP="整理块";M.Msg.COLLAPSE_ALL="折叠块";M.Msg.COLLAPSE_BLOCK="折叠块";M.Msg.COLOUR_BLEND_COLOUR1="颜色1";M.Msg.COLOUR_BLEND_COLOUR2="颜色2";M.Msg.COLOUR_BLEND_HELPURL="http://meyerweb.com/eric/tools/color-blend/";M.Msg.COLOUR_BLEND_RATIO="比例";M.Msg.COLOUR_BLEND_TITLE="混合";M.Msg.COLOUR_BLEND_TOOLTIP="用一个给定的比率(0.0-1.0)混合两种颜色。";M.Msg.COLOUR_PICKER_HELPURL="https://zh.wikipedia.org/wiki/颜色";M.Msg.COLOUR_PICKER_TOOLTIP="从调色板中选择一种颜色。";M.Msg.COLOUR_RANDOM_HELPURL="http://randomcolour.com";M.Msg.COLOUR_RANDOM_TITLE="随机颜色";M.Msg.COLOUR_RANDOM_TOOLTIP="随机选择一种颜色。";M.Msg.COLOUR_RGB_BLUE="蓝色";M.Msg.COLOUR_RGB_GREEN="绿色";M.Msg.COLOUR_RGB_HELPURL="http://www.december.com/html/spec/colorper.html";M.Msg.COLOUR_RGB_RED="红色";M.Msg.COLOUR_RGB_TITLE="颜色";M.Msg.COLOUR_RGB_TOOLTIP="通过指定红色、绿色和蓝色的量创建一种颜色。所有的值必须介于0和100之间。";M.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL="https://github.com/google/blockly/wiki/Loops#loop-termination-blocks";M.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK="中断循环";M.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE="继续下一次循环";M.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK="中断包含它的循环。";M.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE="跳过这个循环的剩余部分,并继续下一次迭代。";M.Msg.CONTROLS_FLOW_STATEMENTS_WARNING="警告:此块仅可用于在一个循环内。";M.Msg.CONTROLS_FOREACH_HELPURL="https://github.com/google/blockly/wiki/Loops#for-each";M.Msg.CONTROLS_FOREACH_TITLE="在列表 %2 中以 %1 遍历每个项目";M.Msg.CONTROLS_FOREACH_TOOLTIP="遍历每个列表中的项目,将变量“%1”设定到该项中,然后执行某些语句。";M.Msg.CONTROLS_FOR_HELPURL="https://github.com/google/blockly/wiki/Loops#count-with";M.Msg.CONTROLS_FOR_TITLE="使用 %1 从范围 %2 到 %3 每隔 %4";M.Msg.CONTROLS_FOR_TOOLTIP="从起始数到结尾数中取出变量“%1”的值,按指定的时间间隔,执行指定的块。";M.Msg.CONTROLS_IF_ELSEIF_TOOLTIP="在if语句块中增加一个条件。";M.Msg.CONTROLS_IF_ELSE_TOOLTIP="添加一个最终的,包括所有情况的节到if块中。";M.Msg.CONTROLS_IF_HELPURL="https://github.com/google/blockly/wiki/IfElse";M.Msg.TRY_EXCEPT_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/index.html";M.Msg.CONTROLS_IF_IF_TOOLTIP="增加、删除或重新排列各节来重新配置“if”块。";M.Msg.CONTROLS_IF_MSG_ELSE="否则";M.Msg.CONTROLS_IF_MSG_ELSEIF="否则如果";M.Msg.TRY_EXCEPT_FINALLY="最后";M.Msg.TRY_EXCEPT_FINALLY_TOOLTIP="";M.Msg.TRY_EXCEPT_EXCEPT="除了";M.Msg.TRY_EXCEPT_EXCEPT_TOOLTIP="";M.Msg.TRY_EXCEPT_TRY="尝试";M.Msg.TRY_EXCEPT_TRY_TOOLTIP="";M.Msg.CONTROLS_IF_MSG_IF="如果";M.Msg.CONTROLS_IF_TOOLTIP_1="如果值为真,执行一些语句。";M.Msg.CONTROLS_IF_TOOLTIP_2="如果值为真,则执行第一块语句。否则,则执行第二块语句。";M.Msg.CONTROLS_IF_TOOLTIP_3="如果第一个值为真,则执行第一块的语句。否则,如果第二个值为真,则执行第二块的语句。";M.Msg.CONTROLS_IF_TOOLTIP_4="如果第一个值为真,则执行第一块对语句。否则,如果第二个值为真,则执行语句的第二块。如果没有值为真,则执行最后一块的语句。";M.Msg.CONTROLS_REPEAT_FOREVER="一直重复";M.Msg.CONTROLS_REPEAT_FOREVER_TOOLTIP="一直执行一些语句。";M.Msg.CONTROLS_REPEAT_HELPURL="https://zh.wikipedia.org/wiki/For循环";M.Msg.CONTROLS_REPEAT_INPUT_DO="执行";M.Msg.CONTROLS_REPEAT_TITLE="重复 %1 次";M.Msg.CONTROLS_REPEAT_TOOLTIP="多次执行一些语句。";M.Msg.CONTROLS_WHILEUNTIL_HELPURL="https://github.com/google/blockly/wiki/Loops#repeat";M.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL="重复直到";M.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE="重复当";M.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL="只要值为假,执行一些语句。";M.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE="只要值为真,执行一些语句。";M.Msg.DELETE_ALL_BLOCKS="删除所有%1块吗?";M.Msg.DELETE_BLOCK="删除块";M.Msg.DELETE_VARIABLE="删除“%1”变量";M.Msg.DELETE_VARIABLE_CONFIRMATION="删除“%2”变量的%1种用途么?";M.Msg.DELETE_X_BLOCKS="删除块";M.Msg.DISABLE_BLOCK="禁用块";M.Msg.DUPLICATE_BLOCK="复制";M.Msg.ENABLE_BLOCK="启用块";M.Msg.EXPAND_ALL="展开块";M.Msg.EXPAND_BLOCK="展开块";M.Msg.EXTERNAL_INPUTS="多行输入";M.Msg.HELP="帮助";M.Msg.INLINE_INPUTS="单行输入";M.Msg.LISTS_CREATE_EMPTY_HELPURL="https://github.com/google/blockly/wiki/Lists#create-empty-list";M.Msg.LISTS_CREATE_EMPTY_TITLE="创建空列表";M.Msg.TUPLE_CREATE_EMPTY_TITLE="创建空元组";M.Msg.DICT_CREATE_EMPTY_TITLE="创建空字典";M.Msg.SET_CREATE_EMPTY_TITLE="创建空集合";M.Msg.LISTS_CREATE_EMPTY_TOOLTIP="返回一个列表,长度为 0,不包含任何数据记录";M.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD="列表";M.Msg.TUPLE_CREATE_WITH_CONTAINER_TITLE_ADD="元组";M.Msg.DICT_CREATE_WITH_CONTAINER_TITLE_ADD="字典";M.Msg.SET_CREATE_WITH_CONTAINER_TITLE_ADD="集合";M.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP="增加、删除或重新排列各部分以此重新配置这个列表块。";M.Msg.TUPLE_CREATE_WITH_CONTAINER_TOOLTIP="增加、删除或重新排列各部分以此重新配置这个元组块。";M.Msg.DICT_CREATE_WITH_CONTAINER_TOOLTIP="增加、删除或重新排列各部分以此重新配置这个字典块。";M.Msg.SET_CREATE_WITH_CONTAINER_TOOLTIP="增加、删除或重新排列各部分以此重新配置这个集合块。";M.Msg.LISTS_CREATE_WITH_HELPURL="https://github.com/google/blockly/wiki/Lists#create-list-with";M.Msg.LISTS_CREATE_WITH_INPUT_WITH="初始化列表";M.Msg.TUPLE_CREATE_WITH_INPUT_WITH="初始化元组";M.Msg.DICT_CREATE_WITH_INPUT_WITH="初始化字典";M.Msg.SET_CREATE_WITH_INPUT_WITH="初始化集合";M.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP="将一个项添加到列表中。";M.Msg.TUPLE_CREATE_WITH_ITEM_TOOLTIP="将一个项添加到元组中。";M.Msg.DICT_CREATE_WITH_ITEM_TOOLTIP="将一个项添加到字典中。";M.Msg.SET_CREATE_WITH_ITEM_TOOLTIP="将一个项添加到集合中。";M.Msg.LISTS_CREATE_WITH_TOOLTIP="建立一个具有任意数量项目的列表。";M.Msg.LISTS_GET_INDEX_FIRST="第一";M.Msg.LISTS_GET_INDEX_FROM_END="倒数第";M.Msg.LISTS_GET_INDEX_FROM_START="第";M.Msg.LISTS_GET_INDEX_GET="获得";M.Msg.LISTS_GET_INDEX_GET_REMOVE="取出并移除";M.Msg.LISTS_GET_INDEX_LAST="最后";M.Msg.LISTS_GET_INDEX_RANDOM="随机";M.Msg.LISTS_GET_INDEX_REMOVE="移除";M.Msg.LISTS_POP_HELPURL="";M.Msg.LISTS_POP_TOOLTIP="";M.Msg.LISTS_POP_MESSAGE0="在列表 %1 中移除 %2 项";M.Msg.LISTS_GET_INDEX_TAIL="";M.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST="返回列表中的第一个项目。";M.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM="返回在列表中的指定位置的项。";M.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST="返回列表中的最后一项。";M.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM="随机返回列表中的一个项目。";M.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST="移除并返回列表中的第一个项目。";M.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM="移除并返回列表中的指定位置的项。";M.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST="移除并返回列表中的最后一个项目。";M.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM="移除并返回列表中的一个随机项目中。";M.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST="移除列表中的第一项";M.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM="移除在列表中的指定位置的项。";M.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST="移除列表中的最后一项";M.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM="删除列表中的一个随机的项。";M.Msg.LISTS_GET_SUBLIST_END_FROM_END="到倒数第#";M.Msg.LISTS_GET_SUBLIST_END_FROM_START="到#";M.Msg.LISTS_GET_SUBLIST_END_LAST="到最后";M.Msg.LISTS_GET_SUBLIST_HELPURL="https://github.com/google/blockly/wiki/Lists#getting-a-sublist";M.Msg.LISTS_GET_SUBLIST_START_FIRST="从头获得子列表";M.Msg.LISTS_GET_SUBLIST_START_FROM_END="从倒数#取得子列表";M.Msg.LISTS_GET_SUBLIST_START_FROM_START="从#取得子列表";M.Msg.LISTS_GET_SUBLIST_TAIL="";M.Msg.LISTS_GET_SUBLIST_TOOLTIP="复制列表中指定的部分。";M.Msg.LISTS_INDEX_FROM_END_TOOLTIP="%1是最后一项。";M.Msg.LISTS_INDEX_FROM_START_TOOLTIP="%1是第一个项目。";M.Msg.LISTS_INDEX_OF_FIRST="找出第一个项出现";M.Msg.LISTS_INDEX_OF_HELPURL="https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list";M.Msg.LISTS_INDEX_OF_LAST="找出最后一个项出现";M.Msg.LISTS_INDEX_OF_TOOLTIP="返回在列表中的第一/最后一个匹配项的索引值。如果找不到项目则返回0";M.Msg.LISTS_INLIST="在列表中";M.Msg.LISTS_ISEMPTY_HELPURL="https://github.com/google/blockly/wiki/Lists#is-empty";M.Msg.LISTS_ISEMPTY_TITLE="%1是空的";M.Msg.LISTS_ISEMPTY_TOOLTIP="如果改列表为空,则返回真。";M.Msg.LISTS_LENGTH_HELPURL="https://github.com/google/blockly/wiki/Lists#length-of";M.Msg.LISTS_LENGTH_TITLE="%1的长度";M.Msg.LISTS_LENGTH_TOOLTIP="返回列表的长度。";M.Msg.LISTS_REPEAT_HELPURL="https://github.com/google/blockly/wiki/Lists#create-list-with";M.Msg.LISTS_REPEAT_TITLE="建立列表 项 %1 重复 %2 次";M.Msg.LISTS_REPEAT_TOOLTIP="建立包含指定重复次数的值的列表。";M.Msg.LISTS_SET_INDEX_HELPURL="https://github.com/google/blockly/wiki/Lists#in-list--set";M.Msg.LISTS_SET_INDEX_INPUT_TO="为";M.Msg.LISTS_SET_INDEX_INSERT="插入在";M.Msg.LISTS_SET_INDEX_SET="设置";M.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST="在列表的起始处添加该项。";M.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM="插入在列表中指定位置的项。";M.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST="将该项追加到列表的末尾。";M.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM="在列表中随机插入项。";M.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST="设置列表中的第一个项目。";M.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM="设置在列表中指定位置的项。";M.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST="设置列表中的最后一项。";M.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM="设置列表中一个随机的项目。";M.Msg.LISTS_SORT_HELPURL="https://github.com/google/blockly/wiki/Lists#sorting-a-list";M.Msg.LISTS_SORT_ORDER_ASCENDING="升序";M.Msg.LISTS_SORT_ORDER_DESCENDING="降序";M.Msg.LISTS_SORT_TITLE="排序%1 %2 %3";M.Msg.LISTS_SORT_TOOLTIP="排序一个列表的拷贝。";M.Msg.LISTS_SORT_TYPE_IGNORECASE="按字母排序,忽略大小写";M.Msg.LISTS_SORT_TYPE_NUMERIC="按数字排序";M.Msg.LISTS_SORT_TYPE_TEXT="按字母排序";M.Msg.LISTS_SPLIT_HELPURL="https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";M.Msg.LISTS_SPLIT_LIST_FROM_TEXT="从文本制作列表";M.Msg.LISTS_SPLIT_TEXT_FROM_LIST="从列表组合文本";M.Msg.LISTS_SPLIT_TOOLTIP_JOIN="加入文本列表至一个文本,由分隔符分隔。";M.Msg.LISTS_SPLIT_TOOLTIP_SPLIT="拆分文本到文本列表,按每个分隔符拆分。";M.Msg.LISTS_SPLIT_WITH_DELIMITER="用分隔符";M.Msg.LOGIC_BOOLEAN_FALSE="假";M.Msg.LOGIC_BOOLEAN_HELPURL="https://github.com/google/blockly/wiki/Logic#values";M.Msg.LOGIC_BOOLEAN_TOOLTIP="返回真或假。";M.Msg.LOGIC_BOOLEAN_TRUE="真";M.Msg.LOGIC_COMPARE_HELPURL="https://zh.wikipedia.org/wiki/不等";M.Msg.LOGIC_COMPARE_TOOLTIP_EQ="如果两个输入结果相等,则返回真。";M.Msg.LOGIC_COMPARE_TOOLTIP_GT="如果第一个输入结果比第二个大,则返回真。";M.Msg.LOGIC_COMPARE_TOOLTIP_GTE="如果第一个输入结果大于或等于第二个输入结果,则返回真。";M.Msg.LOGIC_COMPARE_TOOLTIP_LT="如果第一个输入结果比第二个小,则返回真。";M.Msg.LOGIC_COMPARE_TOOLTIP_LTE="如果第一个输入结果小于或等于第二个输入结果,则返回真。";M.Msg.LOGIC_COMPARE_TOOLTIP_NEQ="如果两个输入结果不相等,则返回真。";M.Msg.LOGIC_NEGATE_HELPURL="https://github.com/google/blockly/wiki/Logic#not";M.Msg.LOGIC_NEGATE_TITLE="非%1";M.Msg.LOGIC_NEGATE_TOOLTIP="如果输入结果为假,则返回真;如果输入结果为真,则返回假。";M.Msg.LOGIC_NULL="空";M.Msg.LOGIC_NULL_HELPURL="https://en.wikipedia.org/wiki/Nullable_type";M.Msg.LOGIC_NULL_TOOLTIP="返回空值。";M.Msg.LOGIC_OPERATION_AND="和";M.Msg.LOGIC_OPERATION_HELPURL="https://github.com/google/blockly/wiki/Logic#logical-operations";M.Msg.LOGIC_OPERATION_OR="或";M.Msg.LOGIC_OPERATION_TOOLTIP_AND="如果两个输入结果都为真,则返回真。";M.Msg.LOGIC_OPERATION_TOOLTIP_OR="如果至少有一个输入结果为真,则返回真。";M.Msg.LOGIC_TERNARY_CONDITION="测试";M.Msg.LOGIC_TERNARY_HELPURL="https://zh.wikipedia.org/wiki/条件运算符";M.Msg.LOGIC_TERNARY_IF_FALSE="如果为假";M.Msg.LOGIC_TERNARY_IF_TRUE="如果为真";M.Msg.LOGIC_TERNARY_TOOLTIP="检查“test”中的条件。如果条件为真,则返回“if true”的值,否则,则返回“if false”的值。";M.Msg.MATH_ADDITION_SYMBOL="+";M.Msg.MATH_ARITHMETIC_HELPURL="https://zh.wikipedia.org/wiki/算术";M.Msg.MATH_ARITHMETIC_TOOLTIP_ADD="返回两个数字的和。";M.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE="返回两个数字的商。";M.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS="返回两个数字的区别。";M.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY="返回两个数字的乘积。";M.Msg.MATH_ARITHMETIC_TOOLTIP_POWER="返回第一个数的第二个数次幂。";M.Msg.MATH_CHANGE_HELPURL="https://zh.wikipedia.org/wiki/%E5%8A%A0%E6%B3%95";M.Msg.MATH_CHANGE_TITLE="将变量 %1 的值增加 %2";M.Msg.MATH_CHANGE_TOOLTIP="将一个数添加到变量“%1”。";M.Msg.MATH_CONSTANT_HELPURL="https://zh.wikipedia.org/wiki/数学常数";M.Msg.MATH_CONSTANT_TOOLTIP="返回一个常见常量:π (3.141......),e (2.718...)、φ (1.618...)、 sqrt(2) (1.414......)、sqrt(½) (0.707......)或 ∞(无穷大)。";M.Msg.MATH_CONSTRAIN_HELPURL="https://en.wikipedia.org/wiki/Clamping_%28graphics%29";M.Msg.MATH_CONSTRAIN_TITLE="限制数字 %1 介于 (低) %2 到 (高) %3";M.Msg.MATH_CONSTRAIN_TOOLTIP="限制数字介于两个指定的数字之间";M.Msg.MATH_CONVERT_HELPURL="";M.Msg.MATH_CONVERT_MESSAGE0="%1 %2";M.Msg.MATH_CONVERT_TOOLTIP="强制转换数据类型";M.Msg.MATH_DIVISION_CONSULT_HELPURL="";M.Msg.MATH_DIVISION_CONSULT_TITLE="%1 ÷ %2 商的整数部分";M.Msg.MATH_DIVISION_CONSULT_TOOLTIP="返回两数商的整数部分";M.Msg.MATH_DIVISION_SYMBOL="÷";M.Msg.MATH_IS_DIVISIBLE_BY="可被整除";M.Msg.MATH_IS_EVEN="是偶数";M.Msg.MATH_IS_NEGATIVE="为负";M.Msg.MATH_IS_ODD="是奇数";M.Msg.MATH_IS_POSITIVE="为正";M.Msg.MATH_IS_PRIME="是质数";M.Msg.MATH_IS_TOOLTIP="如果数字是偶数、奇数、非负整数、正数、负数或如果它可被某数字整除,则返回真或假。";M.Msg.MATH_IS_WHOLE="为整数";M.Msg.MATH_MODULO_HELPURL="https://zh.wikipedia.org/wiki/模除";M.Msg.MATH_MODULO_TITLE="%1 ÷ %2 的余数";M.Msg.MATH_MODULO_TOOLTIP="返回这两个数字相除后的余数。";M.Msg.MATH_MULTIPLICATION_SYMBOL="×";M.Msg.MATH_NUMBER_BITS_OPS_HELPURL="";M.Msg.MATH_NUMBER_BITS_OPS_MESSAGE0="%1 %2 %3";M.Msg.MATH_NUMBER_BITS_OPS_TOOLTIP="对数字进行位运算";M.Msg.MATH_NUMBER_HELPURL="https://zh.wikipedia.org/wiki/数";M.Msg.MATH_NUMBER_TOOLTIP="一个数字。";M.Msg.MATH_ONLIST_HELPURL="";M.Msg.MATH_ONLIST_OPERATOR_AVERAGE="列表中的平均数";M.Msg.MATH_ONLIST_OPERATOR_MAX="列表中的最大值";M.Msg.MATH_ONLIST_OPERATOR_MEDIAN="列表中位数";M.Msg.MATH_ONLIST_OPERATOR_MIN="列表中的最小值";M.Msg.MATH_ONLIST_OPERATOR_MODE="列表模式";M.Msg.MATH_ONLIST_OPERATOR_RANDOM="列表的随机项";M.Msg.MATH_ONLIST_OPERATOR_STD_DEV="列表中的标准差";M.Msg.MATH_ONLIST_OPERATOR_SUM="列表中的数的总和";M.Msg.MATH_ONLIST_TOOLTIP_AVERAGE="返回列表中的数值的平均值。";M.Msg.MATH_ONLIST_TOOLTIP_MAX="返回列表中最大数。";M.Msg.MATH_ONLIST_TOOLTIP_MEDIAN="返回列表中的中位数。";M.Msg.MATH_ONLIST_TOOLTIP_MIN="返回列表中最小数。";M.Msg.MATH_ONLIST_TOOLTIP_MODE="返回列表中的最常见的项的列表。";M.Msg.MATH_ONLIST_TOOLTIP_RANDOM="从列表中返回一个随机的元组。";M.Msg.MATH_ONLIST_TOOLTIP_STD_DEV="返回列表的标准偏差。";M.Msg.MATH_ONLIST_TOOLTIP_SUM="返回列表中的所有数字的和。";M.Msg.MATH_POWER_SYMBOL="**";M.Msg.MATH_RANDOM_FLOAT_HELPURL="https://zh.wikipedia.org/wiki/随机数生成器";M.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM="随机小数";M.Msg.MATH_RANDOM_FLOAT_TOOLTIP="返回介于(包含)0.0到1.0之间的随机数。";M.Msg.MATH_RANDOM_INT_HELPURL="https://zh.wikipedia.org/wiki/随机数生成器";M.Msg.MATH_RANDOM_INT_TITLE="从 %1 到 %2 之间的随机整数";M.Msg.MATH_RANDOM_INT_TOOLTIP="返回两个指定的范围(含)之间的随机整数。";M.Msg.MATH_ROUND_HELPURL="https://zh.wikipedia.org/wiki/数值修约";M.Msg.MATH_ROUND_OPERATOR_ROUND="四舍五入";M.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN="向下舍入";M.Msg.MATH_ROUND_OPERATOR_ROUNDUP="向上舍入";M.Msg.MATH_ROUND_TOOLTIP="数字向上或向下舍入。";M.Msg.MATH_SINGLE_HELPURL="https://zh.wikipedia.org/wiki/平方根";M.Msg.MATH_SINGLE_OP_ABSOLUTE="绝对";M.Msg.MATH_SINGLE_OP_ROOT="平方根";M.Msg.MATH_SINGLE_TOOLTIP_ABS="返回一个数的绝对值。";M.Msg.MATH_SINGLE_TOOLTIP_EXP="返回数的e次幂。";M.Msg.MATH_SINGLE_TOOLTIP_LN="返回一个数的自然对数。";M.Msg.MATH_SINGLE_TOOLTIP_LOG10="返回数字的对数。";M.Msg.MATH_SINGLE_TOOLTIP_NEG="返回数的逻辑非。";M.Msg.MATH_SINGLE_TOOLTIP_POW10="返回数的10次幂。";M.Msg.MATH_SINGLE_TOOLTIP_ROOT="返回数的平方根。";M.Msg.MATH_SUBTRACTION_SYMBOL="-";M.Msg.MATH_TRIG_ACOS="acos";M.Msg.MATH_TRIG_ASIN="asin";M.Msg.MATH_TRIG_ATAN="atan";M.Msg.MATH_TRIG_COS="cos";M.Msg.MATH_TRIG_HELPURL="https://zh.wikipedia.org/wiki/三角函数";M.Msg.MATH_TRIG_SIN="sin";M.Msg.MATH_TRIG_TAN="tan";M.Msg.MATH_TRIG_TOOLTIP_ACOS="返回一个数的反余弦值。";M.Msg.MATH_TRIG_TOOLTIP_ASIN="返回一个数的反正弦值。";M.Msg.MATH_TRIG_TOOLTIP_ATAN="返回指定角度的反正切值。";M.Msg.MATH_TRIG_TOOLTIP_COS="返回指定角度的余弦值(非弧度)。";M.Msg.MATH_TRIG_TOOLTIP_SIN="返回指定角度的正弦值(非弧度)。";M.Msg.MATH_TRIG_TOOLTIP_TAN="返回指定角度的正切值(非弧度)。";M.Msg.NEW_VARIABLE="创建变量...";M.Msg.NEW_VARIABLE_TITLE="新变量的名称:";M.Msg.ORDINAL_NUMBER_SUFFIX="";M.Msg.PROCEDURES_ALLOW_STATEMENTS="允许声明";M.Msg.PROCEDURES_BEFORE_PARAMS="参数:";M.Msg.PROCEDURES_CALLNORETURN_HELPURL="https://zh.wikipedia.org/wiki/子程序";M.Msg.PROCEDURES_CALLNORETURN_TOOLTIP="运行用户定义的函数“%1”。";M.Msg.PROCEDURES_CALLRETURN_HELPURL="https://zh.wikipedia.org/wiki/子程序";M.Msg.PROCEDURES_CALLRETURN_TOOLTIP="运行用户定义的函数“%1”,并使用它的输出值。";M.Msg.PROCEDURES_CALL_BEFORE_PARAMS="与:";M.Msg.PROCEDURES_CREATE_DO="创建“%1”";M.Msg.PROCEDURES_DEFNORETURN_COMMENT="";M.Msg.PROCEDURES_DEFNORETURN_DO="";M.Msg.PROCEDURES_DEFNORETURN_HELPURL="https://zh.wikipedia.org/wiki/子程序";M.Msg.PROCEDURES_DEFNORETURN_PROCEDURE="my_func";M.Msg.PROCEDURES_DEFNORETURN_TITLE="定义函数";M.Msg.PROCEDURES_DEFNORETURN_TOOLTIP="创建一个不带输出值的函数。";M.Msg.PROCEDURES_DEFRETURN_HELPURL="https://zh.wikipedia.org/wiki/子程序";M.Msg.PROCEDURES_DEFRETURN_RETURN="返回";M.Msg.PROCEDURES_DEFRETURN_TOOLTIP="创建一个有输出值的函数。";M.Msg.PROCEDURES_DEF_DUPLICATE_WARNING="警告: 此函数具有重复参数。";M.Msg.PROCEDURES_HIGHLIGHT_DEF="突出显示函数定义";M.Msg.PROCEDURES_IFRETURN_HELPURL="http://c2.com/cgi/wiki?GuardClause";M.Msg.PROCEDURES_IFRETURN_TOOLTIP="如果值为真,则返回第二个值。";M.Msg.PROCEDURES_IFRETURN_WARNING="警告: 仅在定义函数内可使用此块。";M.Msg.PROCEDURES_MUTATORARG_TITLE="输入名称:";M.Msg.PROCEDURES_MUTATORARG_TOOLTIP="添加函数输入。";M.Msg.PROCEDURES_MUTATORCONTAINER_TITLE="输入";M.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP="添加、删除或重新排此函数的输入。";M.Msg.REDO="重做";M.Msg.REMOVE_COMMENT="删除注释";M.Msg.RENAME_VARIABLE="重命名变量...";M.Msg.RENAME_VARIABLE_TITLE="将所有“%1”变量重命名为:";M.Msg.TEXT_APPEND_APPENDTEXT="追加文本";M.Msg.TEXT_APPEND_HELPURL="https://github.com/google/blockly/wiki/Text#text-modification";M.Msg.TEXT_APPEND_TO="";M.Msg.TEXT_APPEND_TOOLTIP="将一些文本追加到变量“%1”。";M.Msg.TEXT_CHANGECASE_HELPURL="https://github.com/google/blockly/wiki/Text#adjusting-text-case";M.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE="转为小写";M.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE="转为首字母大写";M.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE="转为大写";M.Msg.TEXT_CHANGECASE_TOOLTIP="使用不同的大小写复制这段文字。";M.Msg.TEXT_CHARAT_FIRST="获得第一个字符";M.Msg.TEXT_CHARAT_FROM_END="获得倒数第#个字符";M.Msg.TEXT_CHARAT_FROM_START="获得字符#";M.Msg.TEXT_CHARAT_HELPURL="https://github.com/google/blockly/wiki/Text#extracting-text";M.Msg.TEXT_CHARAT_INPUT_INTEXT="从文本";M.Msg.TEXT_CHARAT_LAST="获得最后一个字符";M.Msg.TEXT_CHARAT_RANDOM="获取随机的字母";M.Msg.TEXT_CHARAT_TAIL="";M.Msg.TEXT_CHARAT_TOOLTIP="返回位于指定位置的字母。";M.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP="将一个项添加到文本中。";M.Msg.TEXT_CREATE_JOIN_TITLE_JOIN="加入";M.Msg.TEXT_CREATE_JOIN_TOOLTIP="添加、移除或重新排列各节来重新配置这个文本块。";M.Msg.TEXT_GET_SUBSTRING_END_FROM_END="到倒数第#个字符";M.Msg.TEXT_GET_SUBSTRING_END_FROM_START="到字符#";M.Msg.TEXT_GET_SUBSTRING_END_LAST="到最后一个字符";M.Msg.TEXT_GET_SUBSTRING_HELPURL="https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text";M.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT="从文本";M.Msg.TEXT_GET_SUBSTRING_START_FIRST="取得一段字串自第一个字符";M.Msg.TEXT_GET_SUBSTRING_START_FROM_END="取得一段字串自倒数第#个字符";M.Msg.TEXT_GET_SUBSTRING_START_FROM_START="取得一段字串自#";M.Msg.TEXT_GET_SUBSTRING_TAIL="";M.Msg.TEXT_GET_SUBSTRING_TOOLTIP="返回指定的部分文本。";M.Msg.TEXT_INDEXOF_HELPURL="https://github.com/google/blockly/wiki/Text#finding-text";M.Msg.TEXT_INDEXOF_INPUT_INTEXT="在文本";M.Msg.TEXT_INDEXOF_OPERATOR_FIRST="中查找 最先 出现";M.Msg.TEXT_INDEXOF_OPERATOR_LAST="中查找 最后 出现";M.Msg.TEXT_INDEXOF_TAIL="的位置";M.Msg.TEXT_INDEXOF_TOOLTIP="返回在第二个字串中的第一/最后一个匹配项的索引值。如果未找到则返回%1。";M.Msg.TEXT_ISEMPTY_HELPURL="https://github.com/google/blockly/wiki/Text#checking-for-empty-text";M.Msg.TEXT_ISEMPTY_TITLE="%1是空的";M.Msg.TEXT_ISEMPTY_TOOLTIP="如果提供的文本为空,则返回真。";M.Msg.TEXT_JOIN_HELPURL="https://github.com/google/blockly/wiki/Text#text-creation";M.Msg.TEXT_JOIN_TITLE_CREATEWITH="转为文本";M.Msg.TEXT_JOIN_TOOLTIP="通过串起任意数量的项以建立一段文字。";M.Msg.TEXT_LENGTH_HELPURL="https://github.com/google/blockly/wiki/Text#text-modification";M.Msg.TEXT_LENGTH_TITLE="%1的长度";M.Msg.TEXT_LENGTH_TOOLTIP="返回提供文本的字母数(包括空格)。";M.Msg.TEXT_PRINT_HELPURL="https://github.com/google/blockly/wiki/Text#printing-text";M.Msg.TEXT_PRINT_TITLE="打印%1";M.Msg.CocoRobo_INPUT_MESSAGE0="输入%1";M.Msg.TEXT_PRINT_TOOLTIP="打印指定的文字、数字或其他值。";M.Msg.TEXT_PROMPT_HELPURL="https://github.com/google/blockly/wiki/Text#getting-input-from-the-user";M.Msg.TEXT_PROMPT_TOOLTIP_NUMBER="提示用户输入数字。";M.Msg.TEXT_PROMPT_TOOLTIP_TEXT="提示用户输入一些文本。";M.Msg.TEXT_PROMPT_TYPE_NUMBER="输入数字并显示提示消息";M.Msg.TEXT_PROMPT_TYPE_TEXT="输入数字并显示提示消息";M.Msg.TEXT_TEXT_HELPURL="https://zh.wikipedia.org/wiki/字符串";M.Msg.TEXT_TEXT_TOOLTIP="一个字母、单词或一行文本。";M.Msg.TEXT_TRIM_HELPURL="https://github.com/google/blockly/wiki/Text#trimming-removing-spaces";M.Msg.TEXT_TRIM_OPERATOR_BOTH="消除两侧空格";M.Msg.TEXT_TRIM_OPERATOR_LEFT="消除左侧空格";M.Msg.TEXT_TRIM_OPERATOR_RIGHT="消除右侧空格";M.Msg.TEXT_TRIM_TOOLTIP="复制这段文字的同时删除两端多余的空格。";M.Msg.TODAY="今天";M.Msg.UNDO="撤销";M.Msg.VARIABLES_DEFAULT_NAME="item";M.Msg.VARIABLES_GET_CREATE_SET="创建“设定%1”";M.Msg.VARIABLES_GET_HELPURL="https://github.com/google/blockly/wiki/Variables#get";M.Msg.VARIABLES_GET_TOOLTIP="返回此变量的值。";M.Msg.VARIABLES_SET="将变量 %1 设定为 %2";M.Msg.VARIABLES_SET_CREATE_GET="创建“获得%1”";M.Msg.VARIABLES_SET_HELPURL="https://github.com/google/blockly/wiki/Variables#set";M.Msg.VARIABLES_SET_TOOLTIP="设置此变量,以使它和输入值相等。";M.Msg.VARIABLE_ALREADY_EXISTS="已存在名为“%1”的变量。";M.Msg.PROCEDURES_DEFRETURN_TITLE=M.Msg.PROCEDURES_DEFNORETURN_TITLE;M.Msg.CONTROLS_IF_IF_TITLE_IF=M.Msg.CONTROLS_IF_MSG_IF;M.Msg.CONTROLS_WHILEUNTIL_INPUT_DO=M.Msg.CONTROLS_REPEAT_INPUT_DO;M.Msg.CONTROLS_IF_MSG_THEN=M.Msg.CONTROLS_REPEAT_INPUT_DO;M.Msg.TRY_EXCEPT_TRY="尝试";M.Msg.CocoRobo_RETURN_TOOLTIP="返回一个值";M.Msg.CocoRobo_RETURN_MESSAGE0="返回 %1";M.Msg.CocoRobo_TYPE_MESSAGE0="值 %1 的类型";M.Msg.CocoRobo_TYPE_TOOLTIP="返回当前值的类型";M.Msg.CocoRobo_TYPE_IS_MESSAGE0="值 %1 的类型为 %2";M.Msg.CocoRobo_TYPE_IS_TOOLTIP="设置当前值的类型为%2,并返回结果";M.Msg.CocoRobo_EVAL_HELPURL="";M.Msg.CocoRobo_EVAL_MESSAGE0="计算表达式 %1 的结果";M.Msg.CocoRobo_EVAL_TOOLTIP="计算字符串表达式,并返回结果";M.Msg.CocoRobo_RETURN_HELPURL="";M.Msg.CocoRobo_RETURN_MESSAGE0="返回 %1";M.Msg.CocoRobo_RETURN_TOOLTIP="返回一个值";M.Msg.math_degrad_rad="转换角度为弧度";M.Msg.math_degrad_deg="转换弧度为角度";M.Msg.MATH_KEEP_DECIMAL_HELPURL="";M.Msg.MATH_KEEP_DECIMAL_TOOLTIP="返回指定值保留小数点的结果";M.Msg.MATH_KEEP_DECIMAL_MESSAGE0="%1 保留 %2 位小数";M.Msg.labplus_mapping_MESSAGE0="映射%1 从%2 , %3到%4 , %5";M.Msg.labplus_mapping_TOOLTIP="将0~100中的10映射到0~200中并返回映射值";M.Msg.labplus_mapping_HELPURL="";M.Msg.MATH_RANDOM_RANDRANGE_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.MATH_RANDOM_RANDRANGE_TOOLTIP="返回指定递增基数集合中的一个随机数,基数缺省值为1";M.Msg.MATH_RANDOM_RANDRANGE_MESSAGE0="随机数 从递增区间 [%1 ,%2) 递增步长%3";M.Msg.BIT_INVERSION_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.BIT_INVERSION_TOOLTIP="对数据的每个二进制位取反";M.Msg.BIT_INVERSION_MESSAGE0="二进制取反 %1";M.Msg.CocoRobo_TEN_CONVERT_TO_HELPURL="";M.Msg.CocoRobo_TEN_CONVERT_TO_MESSAGE0="10进制整数 %1 转化为 %2 字符串";M.Msg.CocoRobo_TEN_CONVERT_TO_TOOLTIP="将10进制整数转化为%2字符串,并返回结果";M.Msg.CocoRobo_LOCK_OBJECT_ACQUIRE_LOCK_HELPURL="";M.Msg.CocoRobo_LOCK_OBJECT_ACQUIRE_LOCK_MESSAGE0="线程锁对象 %1 请求锁";M.Msg.CocoRobo_LOCK_OBJECT_ACQUIRE_LOCK_TOOLTIP="";M.Msg.CocoRobo_START_NEW_THREAD_HELPURL="";M.Msg.CocoRobo_START_NEW_THREAD_MESSAGE0="子线程 %1";M.Msg.CocoRobo_START_NEW_THREAD_TOOLTIP="";M.Msg.CocoRobo_BAUDRATE_HELPURL="";M.Msg.CocoRobo_BAUDRATE_MESSAGE0="%1";M.Msg.CocoRobo_BAUDRATE_TOOLTIP="";M.Msg.CocoRobo_HIGH_LOW_HELPURL="";M.Msg.CocoRobo_HIGH_LOW_MESSAGE0="%1";M.Msg.CocoRobo_HIGH_LOW_TOOLTIP="";M.Msg.CocoRobo_TEN_CONVERT_TO_HELPURL="";M.Msg.CocoRobo_TEN_CONVERT_TO_MESSAGE0="10进制整数 %1 转化为 %2 字符串";M.Msg.CocoRobo_TEN_CONVERT_TO_TOOLTIP="将10进制整数转化为%2字符串,并返回结果";M.Msg.CocoRobo_BIN="二进制";M.Msg.CocoRobo_OCT="八进制";M.Msg.CocoRobo_HEX="十六进制";M.Msg.CocoRobo_CONVERT_TO_TEN_HELPURL="";M.Msg.CocoRobo_CONVERT_TO_TEN_MESSAGE0="%1 字符串 %2 转 10进制整数";M.Msg.CocoRobo_CONVERT_TO_TEN_TOOLTIP="将%2字符串转化为10进制整数,并返回结果";M.Msg.CocoRobo_TEN_CONVERTED_TO_BYTES_HELPURL="";M.Msg.CocoRobo_TEN_CONVERTED_TO_BYTES_MESSAGE0="10进制整数 %2 转 %1 字节";M.Msg.CocoRobo_TEN_CONVERTED_TO_BYTES_TOOLTIP="将10进制整数转为%1字节,并返回结果";M.Msg.CocoRobo_INT_TO_CHR_HELPURL="";M.Msg.CocoRobo_INT_TO_CHR_MESSAGE0="整型 %1 转 ASCII 单字符";M.Msg.CocoRobo_INT_TO_CHR_TOOLTIP="ASCII:基于拉丁字母的一套电脑编码系统,主要用于显示现代英语和其他西欧语言。";M.Msg.CocoRobo_CHR_TO_INT_HELPURL="";M.Msg.CocoRobo_CHR_TO_INT_MESSAGE0="ASCII 单字符 %1 转 整型";M.Msg.CocoRobo_CHR_TO_INT_TOOLTIP="ASCII是基于拉丁字母的一套电脑编码系统,主要用于显示现代英语和其他西欧语言。";M.Msg.CocoRobo_STR_TO_HEX_HELPURL="";M.Msg.CocoRobo_STR_TO_HEX_MESSAGE0="字符串 %1 转 十六进制 字节";M.Msg.CocoRobo_STR_TO_HEX_TOOLTIP="返回结果中用空格分隔两个十六进制数";M.Msg.CocoRobo_HEX_TO_BIN_STR_HELPURL="";M.Msg.CocoRobo_HEX_TO_BIN_STR_MESSAGE0="十六进制字符串 %1 转 二进制 字节";M.Msg.CocoRobo_HEX_TO_BIN_STR_TOOLTIP="十六进制字符串转二进制字节,并返回结果";M.Msg.CocoRobo_DATA_TO_BASE64_HELPURL="";M.Msg.CocoRobo_DATA_TO_BASE64_MESSAGE0="%1 以 base64 格式编码 返回字节对象";M.Msg.CocoRobo_DATA_TO_BASE64_TOOLTIP="Base64编码是从二进制到字符的过程";M.Msg.CocoRobo_BASE64_TO_DATA_HELPURL="";M.Msg.CocoRobo_BASE64_TO_DATA_MESSAGE0="解码 base64 数据 %1 返回字节对象";M.Msg.CocoRobo_BASE64_TO_DATA_TOOLTIP="Base64编码是从二进制到字符的过程";M.Msg.CocoRobo_UJSON_DUMPS_HELPURL="";M.Msg.CocoRobo_UJSON_DUMPS_MESSAGE0="%1 转 json 字符串";M.Msg.CocoRobo_UJSON_DUMPS_TOOLTIP="JSON 格式的 key 必须是字符串,value 可以是合法的 JSON 数据类型(字符串, 数字, 对象, 数组, 布尔值或 none)";M.Msg.CocoRobo_UJSON_LOADS_HELPURL="";M.Msg.CocoRobo_UJSON_LOADS_MESSAGE0="解析 json 字符串 %1 返回对象";M.Msg.CocoRobo_UJSON_LOADS_TOOLTIP="JSON 格式的 key 必须是字符串,value 可以是合法的 JSON 数据类型(字符串, 数字, 对象, 数组, 布尔值或 none)";M.Msg.CocoRobo_code_annotation_HELPURL="";M.Msg.CocoRobo_code_annotation_MESSAGE0="注释 # %1";M.Msg.CocoRobo_code_annotation_TOOLTIP="生成代码注释";M.Msg.TEXT_FORMAT_MESSAGE0="格式化字符串 %1 % %2";M.Msg.TEXT_FORMAT_TOOLTIP='使用"%"的方式格式化字符串,并返回结果';M.Msg.TEXT_FORMAT_HELPURL="";M.Msg.TEXT_FORMAT2_MESSAGE0="格式化字符串 %1 format %2";M.Msg.TEXT_FORMAT2_TOOLTIP='使用"format"的方式格式化字符串,并返回结果';M.Msg.TEXT_FORMAT2_HELPURL="";M.Msg.TEXT_TO_BYTE_MESSAGE0="转字节 %1";M.Msg.TEXT_TO_BYTE_TOOLTIP="支持数据类型:string";M.Msg.TEXT_TO_BYTE_HELPURL="";M.Msg.CocoRobo_BYTES_DECODE_HELPURL="";M.Msg.CocoRobo_BYTES_DECODE_MESSAGE0="字节 %1 转 字符串";M.Msg.CocoRobo_BYTES_DECODE_TOOLTIP="返回指定字节转字符串的结果";M.Msg.OTHER_TO_BYTE_MESSAGE0="非文本转字节 %1";M.Msg.OTHER_TO_BYTE_TOOLTIP="";M.Msg.OTHER_TO_BYTE_HELPURL="";M.Msg.text_additional_delimiter_string="将字符串";M.Msg.text_additional_delimiter_deli="使用分隔符:";M.Msg.text_additional_delimiter_end="进行拆分并生成列表";M.Msg.TUPLE_CREATE_WITH_ITEMS_INSERT_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.TUPLE_CREATE_WITH_ITEMS_INSERT_TOOLTIP="正序计数从0开始,倒序计数从1开始";M.Msg.CocoRobo_TEXT_ESC_HELPURL="";M.Msg.CocoRobo_TEXT_ESC_MESSAGE0="文本转义字符 %1";M.Msg.CocoRobo_TEXT_ESC_TOOLTIP="文本转义字符";M.Msg.TEXT_APPEND_TEXT_HELPURL="";M.Msg.TEXT_APPEND_TEXT_TOOLTIP="在指定文本后追加文本,并返回结果";M.Msg.TEXT_APPEND_TEXT_MESSAGE0="%1 追加文本 %2";M.Msg.TEXT_APPEND_TEXT_HELPURL="";M.Msg.TEXT_APPEND_TEXT_TOOLTIP="在指定文本後追加文本,並返回結果";M.Msg.TEXT_APPEND_TEXT_MESSAGE0="%1 追加文本 %2";M.Msg.TEXT_IS_NUMBER_HELPURL="";M.Msg.TEXT_IS_NUMBER_TOOLTIP="判断文本%1,并返回True或False";M.Msg.TEXT_IS_NUMBER_MESSAGE0="%1 %2";M.Msg.CocoRobo_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.CocoRobo_return_list_MESSAGE0="定义列表 %1 = %2";M.Msg.CocoRobo_return_list_TOOLTIP="定义一个列表";M.Msg.CocoRobo_ORDER="第";M.Msg.CocoRobo_REVERSE_ORDER="倒数第";M.Msg.LIST_ORDER_ITEM_MESSAGE0="列表%1 %2 %3 项";M.Msg.LIST_ORDER_ITEM_TOOLTIP="正序计数从0开始,倒序计数从1开始";M.Msg.LIST_ORDER_ITEM_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.CocoRobo_lists_append_MESSAGE0="列表%1 末尾添加项%2";M.Msg.CocoRobo_lists_append_TOOLTIP="列表末尾添加项";M.Msg.CocoRobo_lists_append_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.LIST_ITEM_EXIST_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.LIST_ITEM_EXIST_TOOLTIP="列表包含特定的字符串";M.Msg.LIST_ITEM_EXIST_MESSAGE0="列表%1 包含%2";M.Msg.SET_LIST_ORDER_ITEM_MESSAGE0="设列表%1 %2 %3 项为%4";M.Msg.SET_LIST_ORDER_ITEM_TOOLTIP="正序计数从0开始,倒序计数从1开始";M.Msg.SET_LIST_ORDER_ITEM_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.INSERT_LIST_ORDER_ITEM_MESSAGE0="插入列表%1 %2 %3 项为%4";M.Msg.INSERT_LIST_ORDER_ITEM_TOOLTIP="正序计数从0开始,倒序计数从1开始";M.Msg.INSERT_LIST_ORDER_ITEM_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.LIST_ORDER_ITEM_MESSAGE0="列表%1 %2 %3 项";M.Msg.LIST_ORDER_ITEM_TOOLTIP="正序计数从0开始,倒序计数从1开始";M.Msg.LIST_ORDER_ITEM_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.PARTS_OF_LIST_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.PARTS_OF_LIST_TOOLTIP=`递增顺序取项
  939. 举例:
  940. 倒数第5到倒数第2;
  941. 第0到第5`;M.Msg.PARTS_OF_LIST_MESSAGE0="返回列表%1 取%2 %3 项到 %4 %5 项";M.Msg.LIST_TO_TUPLE_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.LIST_TO_TUPLE_TOOLTIP="列表转元组";M.Msg.LIST_TO_TUPLE_MESSAGE0="列表%1 转元组";M.Msg.CocoRobo_lists_clear_MESSAGE0="列表%1 清空";M.Msg.CocoRobo_lists_clear_TOOLTIP="清空列表";M.Msg.CocoRobo_lists_clear_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.CocoRobo_lists_extend_MESSAGE0="列表%1 追加列表%2";M.Msg.CocoRobo_lists_extend_TOOLTIP="在列表中追加列表";M.Msg.CocoRobo_lists_extend_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.LIST_FIRST_INDEX_HELPURL="";M.Msg.LIST_FIRST_INDEX_MESSAGE0="项 %1 在列表 %2 %3 出现的位置";M.Msg.LIST_FIRST_INDEX_TOOLTIP="返回指定字符串在列表中%3出现的位置";M.Msg.FIRST="第一次";M.Msg.LAST="最后一次";M.Msg.DICT_CREATE_WITH_ITEM_TOOLTIP="将一个项添加到字典中。";M.Msg.DICT_CREATE_WITH_ITEMS_INSERT_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.DICT_CREATE_WITH_ITEMS_INSERT_TOOLTIP="初始化字典";M.Msg.DICT_KEY_VALUE_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.DICT_KEY_VALUE_TOOLTIP="返回字典指定键的值";M.Msg.DICT_KEY_VALUE_MESSAGE0="字典%1 键%2 的值";M.Msg.ADD_DICT_KEY_VALUE_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.ADD_DICT_KEY_VALUE_TOOLTIP="已有该键则更新该键";M.Msg.ADD_DICT_KEY_VALUE_MESSAGE0="字典%1 添加键%2 值%3";M.Msg.DICT_LENGTH_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.DICT_LENGTH_TOOLTIP="返回字典的长度";M.Msg.DICT_LENGTH_MESSAGE0="字典%1 长度";M.Msg.DICT_KEY_EXIST_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.DICT_KEY_EXIST_TOOLTIP="判断字典中是否包含指定键,并返回True或False";M.Msg.DICT_KEY_EXIST_MESSAGE0="字典%1 包含键%2";M.Msg.DICT_KEY_OR_VAL_LIST_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.DICT_KEY_OR_VAL_LIST_TOOLTIP="返回字典%2的列表";M.Msg.DICT_KEY_OR_VAL_LIST_MESSAGE0="字典%1 %2的列表";M.Msg.DICT_KEYS="键";M.Msg.DICT_VALUES="值";M.Msg.DICT_CREATE_WITH_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.DICT_CREATE_WITH_TOOLTIP="定义一个字典";M.Msg.DICT_CREATE_WITH_MESSAGE0="定义字典 %1 = %2";M.Msg.tuple_create_with_MESSAGE0="定义元组 %1 = %2 ";M.Msg.tuple_create_with_TOOLTIP="只包含一个元组时,需要在元组后面添加逗号";M.Msg.tuple_create_with_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.tuple_order_item_MESSAGE0="元组%1 %2 %3 项";M.Msg.tuple_order_item_TOOLTIP="正序计数从0开始,倒序计数从1开始";M.Msg.tuple_order_item_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.CocoRobo_MIN="最小值";M.Msg.CocoRobo_MAX="最大值";M.Msg.CocoRobo_LENTH="长度";M.Msg.TUPLE_MIN_MAX_LEN_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.TUPLE_MIN_MAX_LEN_TOOLTIP="返回元组的%2";M.Msg.TUPLE_MIN_MAX_LEN_MESSAGE0="元组 %1 %2";M.Msg.TUPLE_ITEM_EXIST_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.TUPLE_ITEM_EXIST_TOOLTIP="判断是否包含指定值,并返回True或False";M.Msg.TUPLE_ITEM_EXIST_MESSAGE0="元组%1 包含%2";M.Msg.PARTS_OF_TUPLE_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.PARTS_OF_TUPLE_TOOLTIP="正序计数从0开始,倒序计数从1开始";M.Msg.PARTS_OF_TUPLE_MESSAGE0="返回元组%1 取第%2 项到尾项";M.Msg.PARTS_OF_TUPLE2_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.PARTS_OF_TUPLE2_TOOLTIP=`递增顺序取项
  942. 举例:
  943. 倒数第5到倒数第2;
  944. 第0到第5`;M.Msg.PARTS_OF_TUPLE2_MESSAGE0="返回元组%1 取%2 %3 项到 %4 %5 项";M.Msg.SET_CREATE_WITH_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.SET_CREATE_WITH_TOOLTIP="定义集合";M.Msg.SET_CREATE_WITH_MESSAGE0="定义集合 %1 = %2";M.Msg.SET_UPDATE_WITH_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.SET_UPDATE_WITH_TOOLTIP="添加参数可为字符串、列表、元组、集合、字典(只添加key),已有元组则不进行操作";M.Msg.SET_UPDATE_WITH_MESSAGE0="集合 %1 添加 %2";M.Msg.INTERSECTION_OF_SETS_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.INTERSECTION_OF_SETS_TOOLTIP="返回两集合的%1";M.Msg.INTERSECTION_OF_SETS_MESSAGE0="取 %1 集合 %2 集合 %3";M.Msg.CocoRobo_INTERSECTION="交集";M.Msg.CocoRobo_UNION="并集";M.Msg.CocoRobo_DIFFERENCE="差集";M.Msg.SETS_UPDATE_WAYS_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.SETS_UPDATE_WAYS_TOOLTIP="集合更新为与指定集合的%3";M.Msg.SETS_UPDATE_WAYS_MESSAGE0="集合 %1 更新为 与集合 %2 的 %3";M.Msg.SUBSET_SUPERSET_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.SUBSET_SUPERSET_TOOLTIP="集合为集合的%3";M.Msg.SUBSET_SUPERSET_MESSAGE0="集合 %1 为集合 %2 的 %3";M.Msg.CocoRobo_SUBSET="子集";M.Msg.CocoRobo_SUPERSET="超集";M.Msg.LEN_OF_SETS_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.LEN_OF_SETS_TOOLTIP="返回指定集合的长度";M.Msg.LEN_OF_SETS_MESSAGE0="集合 %1 长度";M.Msg.GET_SETS_POP_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.GET_SETS_POP_TOOLTIP="返回移除随机项后的集合";M.Msg.GET_SETS_POP_MESSAGE0="返回随机项并移除之 从集合 %1";M.Msg.CREATE_EMPTY_SET_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";M.Msg.CREATE_EMPTY_SET_TOOLTIP="";M.Msg.CREATE_EMPTY_SET_MESSAGE0="创建空集合 %1";M.Msg.io_high="高电平";M.Msg.io_low="低电平";M.Msg.digital_set="设置引脚 #";M.Msg.digital_set_as="为";M.Msg.digital_get="获取引脚 #";M.Msg.digital_get_value="的数字信号数值";M.Msg.digital_set_title="设置特定引脚为指定电平";M.Msg.digital_get_value_title="返回特定引脚的数字信号数值";M.Msg.time_iot_module="IoT 模块 ";M.Msg.time_ai_module="AI 模块";M.Msg.analog_get_moudule="模块获取引脚 #";M.Msg.analog_get_value="的模拟信号数值 (PWM)";M.Msg.set_pin="(范围:0 ~ 1023)";M.Msg.Esp32_Main_Controller_Io_From_Analog_Pin_TOOLTIP="模块获取特定引脚的模拟信号数值";M.Msg.time_init_timer="初始化计时器";M.Msg.time_timer_get_time="获取计时器已过时间(毫秒)";M.Msg.time_timer_clear="清除计时器";M.Msg.time_timer_periodically="启用周期重复计时器";M.Msg.time_timer_every="每隔";M.Msg.time_timer_ms="毫秒";M.Msg.time_execution="运行";M.Msg.time_timer_periodically_clear="清除周期重复计时器";M.Msg.time_get_current_date_title="获取本地时间:";M.Msg.time_get_current_date_y="年";M.Msg.time_get_current_date_m="月";M.Msg.time_get_current_date_d="日";M.Msg.time_get_current_date_hour="时";M.Msg.time_get_current_date_min="分";M.Msg.time_get_current_date_sec="秒";M.Msg.serialcomm_print="串口打印";M.Msg.serialcomm_write_title_text="通过串口发送数据至其他设备";M.Msg.serialcomm_read_setup_title_text="通过串口获取数据";M.Msg.serialcomm_read_setup_title_text_1="初始化";M.Msg.serial_read_data="从";M.Msg.Serial_Read_Data_all="获取串口的数据,并将其存到";M.Msg.ARD_SERIAL_RECEIVE_DATASET_GET_TEXT="获取接收到串口数据中第";M.Msg.ARD_SERIAL_RECEIVE_DATASET_TYPE_TEXT="位的数据,数据类型为:";M.Msg.ARD_SERIAL_RECEIVE_DATASET_TYPE_FLOAT="浮点数";M.Msg.ARD_SERIAL_RECEIVE_DATASET_TYPE_INTEGER="Number";M.Msg.ARD_SERIAL_RECEIVE_DATASET_TYPE_STRING="字符";M.Msg.serialcomm_write_item_first="第 ";M.Msg.serialcomm_write_item_last=" 位数据:";M.Msg.serialcomm_write_item="项目";M.Msg.serialcomm_write_data="数据";M.Msg.serialcomm_write_data_bps_title="设置波特率为:";M.Msg.serialcomm_write_data_bps_attrib="比特/秒";M.Msg.serialcomm_write_on="使用";M.Msg.serialcomm_write_on_ai="AI 模块";M.Msg.serialcomm_write_on_iot="IoT 模块";M.Msg.serialcomm_write_on_iot_lite="IoT Lite 模块";M.Msg.serial_send_data_on="在";M.Msg.serial_send_data_on_send_data="模块上发送数据至 Microbit";M.Msg.serial_new_send_data="串口写入文本";M.Msg.serial_new_send_data_1="不换行";M.Msg.serial_new_send_data_2="自动换行";M.Msg.serial_new_send_data_3="串口写入单字节";M.Msg.serial_new_send_data_4="串口写入字节列表";M.Msg.serial_new_get_data_1="串口有可读数据";M.Msg.serial_new_get_data_2="串口读取一行数据";M.Msg.serial_new_get_data_3="串口读取数据";M.Msg.serial_new_get_data_4="串口读取数据长度为";M.Msg.serial_close="关闭串口";M.Msg.SYSTEM="重启系统";M.Msg.SYSTEM_GC="启动内存回收";M.Msg.SYSTEM_CREATE="创建文本文件 ";M.Msg.SYSTEM_CREATE_FILE="创建文件 ";M.Msg.SYSTEM_CREATE_F="文件名:";M.Msg.SYSTEM_CREATE_F_1="文件路径为:";M.Msg.SYSTEM_RUN="运行程序文件";M.Msg.SYSTEM_RUN_F="文件名:";M.Msg.SYSTEM_WRITE="创建文本文件";M.Msg.SYSTEM_OPEN_FILE="打开文件";M.Msg.SYSTEM_WRITE_FILE="写入文件";M.Msg.SYSTEM_CLOSE_FILE="关闭文件";M.Msg.SYSTEM_WRITE_F="文件名:";M.Msg.SYSTEM_WRITE_W="写入内容:";M.Msg.SYSTEM_WRITE_S="分隔符为:";M.Msg.SYSTEM_WRITE_S_N="换行";M.Msg.SYSTEM_WRITE_S_C="逗号";M.Msg.SYSTEM_WRITE_S_S="空格";M.Msg.SYSTEM_WRITE_S_SE="分号";M.Msg.SYSTEM_INPUT="读取文本文件为列表";M.Msg.SYSTEM_INPUT_FILE="读取文件为列表";const A7=M.Msg;var A=A||{Msg:Object.create(null)};A.Msg.catLogic="邏輯";A.Msg.catLoops="循環";A.Msg.catMath="數學";A.Msg.catText="文本";A.Msg.catVariables="變量";A.Msg.catLists="陣列";A.Msg.catDictionary="字典";A.Msg.catTuples="元組";A.Msg.catSet="集合";A.Msg.catFunctions="函數";A.Msg.catOutput="輸入/輸出";A.Msg.catFiles="變量";A.Msg.ADD_COMMENT="加入註解";A.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE="無法刪除變數「%1」,因為這是功能「%2」定義的一部份內容";A.Msg.CHANGE_VALUE_TITLE="修改值:";A.Msg.CLEAN_UP="清理區塊";A.Msg.COLLAPSED_WARNINGS_WARNING="收合含有警告的區塊。";A.Msg.COLLAPSE_ALL="收合區塊";A.Msg.COLLAPSE_BLOCK="收合區塊";A.Msg.COLOUR_BLEND_COLOUR1="顏色 1";A.Msg.COLOUR_BLEND_COLOUR2="顏色 2";A.Msg.COLOUR_BLEND_HELPURL="https://meyerweb.com/eric/tools/color-blend/#:::rgbp";A.Msg.COLOUR_BLEND_RATIO="比例";A.Msg.COLOUR_BLEND_TITLE="混合";A.Msg.COLOUR_BLEND_TOOLTIP="用一個給定的比率(0.0-1.0)混合兩種顏色。";A.Msg.COLOUR_PICKER_HELPURL="https://zh.wikipedia.org/wiki/顏色";A.Msg.COLOUR_PICKER_TOOLTIP="從調色板中選擇一種顏色。";A.Msg.COLOUR_RANDOM_HELPURL="http://randomcolour.com";A.Msg.COLOUR_RANDOM_TITLE="隨機顏色";A.Msg.COLOUR_RANDOM_TOOLTIP="隨機選擇一種顏色。";A.Msg.COLOUR_RGB_BLUE="藍";A.Msg.COLOUR_RGB_GREEN="綠";A.Msg.COLOUR_RGB_HELPURL="https://www.december.com/html/spec/colorpercompact.html";A.Msg.COLOUR_RGB_RED="紅";A.Msg.COLOUR_RGB_TITLE="顏色";A.Msg.COLOUR_RGB_TOOLTIP="透過指定紅、綠、 藍色的值來建立一種顏色。所有的值必須介於 0 和 100 之間。";A.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL="https://github.com/google/blockly/wiki/Loops#loop-termination-blocks";A.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK="中斷循環";A.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE="繼續下一個循環";A.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK="中斷當前的循環。";A.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE="跳過這個循環的其餘步驟,並繼續下一次的循環。";A.Msg.CONTROLS_FLOW_STATEMENTS_WARNING="警告:此區塊僅可用於循環內。";A.Msg.CONTROLS_FOREACH_HELPURL="https://github.com/google/blockly/wiki/Loops#for-each";A.Msg.CONTROLS_FOREACH_TITLE="為列表 %2 裡的每一項 %1";A.Msg.CONTROLS_FOREACH_TOOLTIP="遍歷每個清單中的項目,將變數「%1」設定到該項目中,然後執行某些陳述式。";A.Msg.CONTROLS_FOR_HELPURL="https://github.com/google/blockly/wiki/Loops#count-with";A.Msg.CONTROLS_FOR_TITLE="循環計數 %1 從 %2 到 %3 每次增加 %4";A.Msg.CONTROLS_FOR_TOOLTIP="從起始數到結尾數中取出變數「%1」的值,按指定的時間間隔,執行指定的區塊。";A.Msg.CONTROLS_IF_ELSEIF_TOOLTIP="添加條件到「如果」區塊。";A.Msg.CONTROLS_IF_ELSE_TOOLTIP="加入一個最終、所有條件都執行的部份到「如果」區塊中。";A.Msg.CONTROLS_IF_HELPURL="https://github.com/google/blockly/wiki/IfElse";A.Msg.CONTROLS_IF_IF_TOOLTIP="添加、刪除或重新排列各部份以重新配置這個「如果」區塊。";A.Msg.CONTROLS_IF_MSG_ELSE="否則";A.Msg.CONTROLS_IF_MSG_ELSEIF="否則,如果";A.Msg.CONTROLS_IF_MSG_IF="如果";A.Msg.CONTROLS_IF_TOOLTIP_1="當值為 true 時,執行一些陳述式。";A.Msg.CONTROLS_IF_TOOLTIP_2="值為是(true)就執行第一塊陳述式,否則執行第二塊。";A.Msg.CONTROLS_IF_TOOLTIP_3="如果第一個值為 true,則執行第一塊陳述式。否則,當第二個值為 true 時,則執行第二塊陳述式。";A.Msg.CONTROLS_IF_TOOLTIP_4="如果第一個值為 true,則執行第一塊陳述式。否則當第二個值為 true 時,則執行第二塊陳述式。如果前幾個敘述都不為 ture,則執行最後一塊陳述式。";A.Msg.CONTROLS_REPEAT_HELPURL="https://zh.wikipedia.org/wiki/For迴圈";A.Msg.CONTROLS_REPEAT_INPUT_DO="執行";A.Msg.CONTROLS_REPEAT_TITLE="重複%1次";A.Msg.CONTROLS_REPEAT_TOOLTIP="重複執行某些陳述式多次。";A.Msg.CONTROLS_WHILEUNTIL_HELPURL="https://github.com/google/blockly/wiki/Loops#repeat";A.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL="重複直到";A.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE="重複,當";A.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL="當值為 false 時,執行一些陳述式。";A.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE="當值為 true 時,執行一些陳述式。";A.Msg.DELETE_ALL_BLOCKS="刪除全部 %1 個區塊?";A.Msg.DELETE_BLOCK="刪除區塊";A.Msg.DELETE_VARIABLE="刪除變數「%1」";A.Msg.DELETE_VARIABLE_CONFIRMATION="刪除使用%1次的「%2」變數?";A.Msg.DELETE_X_BLOCKS="刪除%1個區塊";A.Msg.DIALOG_CANCEL="取消";A.Msg.DIALOG_OK="確定";A.Msg.DISABLE_BLOCK="停用區塊";A.Msg.DUPLICATE_BLOCK="重複";A.Msg.DUPLICATE_COMMENT="複製註解";A.Msg.ENABLE_BLOCK="啟用區塊";A.Msg.EXPAND_ALL="展開區塊";A.Msg.EXPAND_BLOCK="展開區塊";A.Msg.EXTERNAL_INPUTS="外部輸入";A.Msg.HELP="說明";A.Msg.INLINE_INPUTS="單行輸入";A.Msg.LISTS_CREATE_EMPTY_HELPURL="https://github.com/google/blockly/wiki/Lists#create-empty-list";A.Msg.LISTS_CREATE_EMPTY_TITLE="建立空的清單";A.Msg.LISTS_CREATE_EMPTY_TOOLTIP="返回一個長度(項目數量)為 0 的清單,不包含任何資料記錄";A.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD="清單";A.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP="添加、刪除或重新排列各部份以重新配置這個清單區塊。";A.Msg.LISTS_CREATE_WITH_HELPURL="https://github.com/google/blockly/wiki/Lists#create-list-with";A.Msg.LISTS_CREATE_WITH_INPUT_WITH="使用這些值建立清單";A.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP="添加一個項目到清單裡。";A.Msg.LISTS_CREATE_WITH_TOOLTIP="建立一個具備任意數量項目的清單。";A.Msg.LISTS_GET_INDEX_FIRST="第一筆";A.Msg.LISTS_GET_INDEX_FROM_END="倒數第 # 筆";A.Msg.LISTS_GET_INDEX_FROM_START="#";A.Msg.LISTS_GET_INDEX_GET="取得";A.Msg.LISTS_GET_INDEX_GET_REMOVE="取得並移除";A.Msg.LISTS_GET_INDEX_LAST="最後一筆";A.Msg.LISTS_GET_INDEX_RANDOM="隨機";A.Msg.LISTS_GET_INDEX_REMOVE="移除";A.Msg.LISTS_GET_INDEX_TAIL="";A.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST="返回清單中的第一個項目。";A.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM="返回在清單中指定位置的項目。";A.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST="返回清單中的最後一個項目。";A.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM="返回清單中隨機一個項目。";A.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST="移除並返回清單中的第一個項目。";A.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM="移除並返回清單中的指定位置的項目。";A.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST="移除並返回清單中的最後一個項目。";A.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM="移除並返回清單中的隨機項目。";A.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST="移除清單中的第一個項目。";A.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM="移除在清單中指定位置的項目。";A.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST="移除清單中的最後一個項目。";A.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM="移除清單中隨機一個項目。";A.Msg.LISTS_GET_SUBLIST_END_FROM_END="到倒數 #";A.Msg.LISTS_GET_SUBLIST_END_FROM_START="到 #";A.Msg.LISTS_GET_SUBLIST_END_LAST="到 最後面";A.Msg.LISTS_GET_SUBLIST_HELPURL="https://github.com/google/blockly/wiki/Lists#getting-a-sublist";A.Msg.LISTS_GET_SUBLIST_START_FIRST="從最前面取得子清單";A.Msg.LISTS_GET_SUBLIST_START_FROM_END="從倒數# 取得子清單";A.Msg.LISTS_GET_SUBLIST_START_FROM_START="從 #取得子清單";A.Msg.LISTS_GET_SUBLIST_TAIL="";A.Msg.LISTS_GET_SUBLIST_TOOLTIP="複製清單中指定的部分。";A.Msg.LISTS_INDEX_FROM_END_TOOLTIP="%1 是最後一個項目。";A.Msg.LISTS_INDEX_FROM_START_TOOLTIP="%1 是第一個項目。";A.Msg.LISTS_INDEX_OF_FIRST="從 最前面 索引項目";A.Msg.LISTS_INDEX_OF_HELPURL="https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list";A.Msg.LISTS_INDEX_OF_LAST="從 最後面 索引項目";A.Msg.LISTS_INDEX_OF_TOOLTIP="在清單中檢索是否有包含項目,如果有,返回從頭/倒數算起的索引值。如果沒有則返回 %1。";A.Msg.LISTS_INLIST="自清單";A.Msg.LISTS_ISEMPTY_HELPURL="https://github.com/google/blockly/wiki/Lists#is-empty";A.Msg.LISTS_ISEMPTY_TITLE="%1 值為空";A.Msg.LISTS_ISEMPTY_TOOLTIP="如果該清單為空,則返回 true。";A.Msg.LISTS_LENGTH_HELPURL="https://github.com/google/blockly/wiki/Lists#length-of";A.Msg.LISTS_LENGTH_TITLE="長度 %1";A.Msg.LISTS_LENGTH_TOOLTIP="返回清單的長度(項目數)。";A.Msg.LISTS_REPEAT_HELPURL="https://github.com/google/blockly/wiki/Lists#create-list-with";A.Msg.LISTS_REPEAT_TITLE="使用項目 %1 重複 %2 次建立清單";A.Msg.LISTS_REPEAT_TOOLTIP="建立一個清單,項目中包含指定重複次數的值。";A.Msg.LISTS_REVERSE_HELPURL="https://github.com/google/blockly/wiki/Lists#reversing-a-list";A.Msg.LISTS_REVERSE_MESSAGE0="反轉%1";A.Msg.LISTS_REVERSE_TOOLTIP="反轉清單的複製內容。";A.Msg.LISTS_SET_INDEX_HELPURL="https://github.com/google/blockly/wiki/Lists#in-list--set";A.Msg.LISTS_SET_INDEX_INPUT_TO="為";A.Msg.LISTS_SET_INDEX_INSERT="添加";A.Msg.LISTS_SET_INDEX_SET="設定";A.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST="添加一個項目到清單中的第一個位置。";A.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM="添加一個項目到清單中的指定位置。";A.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST="添加一個項目到清單中的最後一個位置。";A.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM="添加一個項目到清單中的隨機位置。";A.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST="設定清單中的第一個項目。";A.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM="設定清單中指定位置的項目。";A.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST="設定清單中的最後一個項目。";A.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM="設定清單中隨機一個項目。";A.Msg.LISTS_SORT_HELPURL="https://github.com/google/blockly/wiki/Lists#sorting-a-list";A.Msg.LISTS_SORT_ORDER_ASCENDING="升序";A.Msg.LISTS_SORT_ORDER_DESCENDING="降序";A.Msg.LISTS_SORT_TITLE="排列 %1 %2 %3";A.Msg.LISTS_SORT_TOOLTIP="排序清單的複製內容。";A.Msg.LISTS_SORT_TYPE_IGNORECASE="依字母排序,忽略大小寫";A.Msg.LISTS_SORT_TYPE_NUMERIC="依數字";A.Msg.LISTS_SORT_TYPE_TEXT="依字母";A.Msg.LISTS_SPLIT_HELPURL="https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";A.Msg.LISTS_SPLIT_LIST_FROM_TEXT="從文本製作清單";A.Msg.LISTS_SPLIT_TEXT_FROM_LIST="從清單拆出文本";A.Msg.LISTS_SPLIT_TOOLTIP_JOIN="串起清單項目成一個文本,並用分隔符號分開。";A.Msg.LISTS_SPLIT_TOOLTIP_SPLIT="將文本變成清單項目,按分隔符號拆分。";A.Msg.LISTS_SPLIT_WITH_DELIMITER="用分隔符";A.Msg.LOGIC_BOOLEAN_FALSE="假";A.Msg.LOGIC_BOOLEAN_HELPURL="https://github.com/google/blockly/wiki/Logic#values";A.Msg.LOGIC_BOOLEAN_TOOLTIP="返回真或假。";A.Msg.LOGIC_BOOLEAN_TRUE="真";A.Msg.LOGIC_COMPARE_HELPURL="https://zh.wikipedia.org/wiki/不等";A.Msg.LOGIC_COMPARE_TOOLTIP_EQ="如果這兩個輸入的結果相等,返回 true。";A.Msg.LOGIC_COMPARE_TOOLTIP_GT="如果第一個輸入結果大於第二個,返回 true。";A.Msg.LOGIC_COMPARE_TOOLTIP_GTE="如果第一個輸入結果大於或等於第二個,返回 true。";A.Msg.LOGIC_COMPARE_TOOLTIP_LT="如果第一個輸入結果比第二個小,返回 true。";A.Msg.LOGIC_COMPARE_TOOLTIP_LTE="如果第一個輸入結果小於或等於第二個,返回 true。";A.Msg.LOGIC_COMPARE_TOOLTIP_NEQ="如果這兩個輸入的結果不相等,返回 true。";A.Msg.LOGIC_NEGATE_HELPURL="https://github.com/google/blockly/wiki/Logic#not";A.Msg.LOGIC_NEGATE_TITLE="%1 不成立";A.Msg.LOGIC_NEGATE_TOOLTIP="如果輸入結果是 false,則返回 true。如果輸入結果是 true,則返回 false。";A.Msg.LOGIC_NULL="空";A.Msg.LOGIC_NULL_HELPURL="https://en.wikipedia.org/wiki/Nullable_type";A.Msg.LOGIC_NULL_TOOLTIP="返回空值。";A.Msg.LOGIC_OPERATION_AND="和";A.Msg.LOGIC_OPERATION_HELPURL="https://github.com/google/blockly/wiki/Logic#logical-operations";A.Msg.LOGIC_OPERATION_OR="或";A.Msg.LOGIC_OPERATION_TOOLTIP_AND="如果兩個輸入結果都為 true,則返回 true。";A.Msg.LOGIC_OPERATION_TOOLTIP_OR="如果至少一個輸入結果為 true,返回 true。";A.Msg.LOGIC_TERNARY_CONDITION="測試";A.Msg.LOGIC_TERNARY_HELPURL="https://en.wikipedia.org/wiki/%3F:";A.Msg.LOGIC_TERNARY_IF_FALSE="如果為假";A.Msg.LOGIC_TERNARY_IF_TRUE="如果為真";A.Msg.LOGIC_TERNARY_TOOLTIP="檢查「測試」中的條件。如果條件為真,將返回「如果為真」的值;否則,返回「如果為假」的值。";A.Msg.MATH_ADDITION_SYMBOL="+";A.Msg.MATH_ARITHMETIC_HELPURL="https://zh.wikipedia.org/wiki/算術";A.Msg.MATH_ARITHMETIC_TOOLTIP_ADD="返回兩個數字的總和。";A.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE="傳回兩數之商。";A.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS="傳回兩數之差。";A.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY="返回兩個數字的乘積。";A.Msg.MATH_ARITHMETIC_TOOLTIP_POWER="返回以第一個數值為底數,以第二個數值為冪的結果。";A.Msg.MATH_ATAN2_HELPURL="https://zh.wikipedia.org/wiki/Atan2";A.Msg.MATH_ATAN2_TITLE="X:%1 Y:%2 的 Atan2";A.Msg.MATH_ATAN2_TOOLTIP="回傳點(X,Y)從 -180 至 180 度的反正切值。";A.Msg.MATH_CHANGE_HELPURL="https://zh.wikipedia.org/wiki/加法";A.Msg.MATH_CHANGE_TITLE="修改 %1 自 %2";A.Msg.MATH_CHANGE_TOOLTIP="將數字加到變數「%1」。";A.Msg.MATH_CONSTANT_HELPURL="https://zh.wikipedia.org/wiki/數學常數";A.Msg.MATH_CONSTANT_TOOLTIP="返回一個的常見常量: π (3.141......),e (2.718...)、 φ (1.618...)、 開方(2) (1.414......)、 開方(½) (0.707......) 或 ∞ (無窮大)。";A.Msg.MATH_CONSTRAIN_HELPURL="https://en.wikipedia.org/wiki/Clamping_(graphics)";A.Msg.MATH_CONSTRAIN_TITLE="限制數字 %1 介於(低)%2 到(高)%3";A.Msg.MATH_CONSTRAIN_TOOLTIP="限制數字介於兩個指定的數字之間(包含)。";A.Msg.MATH_DIVISION_SYMBOL="÷";A.Msg.MATH_IS_DIVISIBLE_BY="可被整除";A.Msg.MATH_IS_EVEN="是偶數";A.Msg.MATH_IS_NEGATIVE="是負數";A.Msg.MATH_IS_ODD="是奇數";A.Msg.MATH_IS_POSITIVE="是正值";A.Msg.MATH_IS_PRIME="是質數";A.Msg.MATH_IS_TOOLTIP="如果數字是偶數,奇數,非負整數,正數、 負數,或如果它是可被某數字整除,則返回 true 或 false。";A.Msg.MATH_IS_WHOLE="是整數";A.Msg.MATH_MODULO_HELPURL="https://zh.wikipedia.org/wiki/模除";A.Msg.MATH_MODULO_TITLE="%1 除以 %2 的餘數";A.Msg.MATH_MODULO_TOOLTIP="返回兩個數字相除的餘數。";A.Msg.MATH_MULTIPLICATION_SYMBOL="×";A.Msg.MATH_NUMBER_HELPURL="https://zh.wikipedia.org/wiki/數";A.Msg.MATH_NUMBER_TOOLTIP="數字";A.Msg.MATH_ONLIST_HELPURL="";A.Msg.MATH_ONLIST_OPERATOR_AVERAGE="清單的平均數";A.Msg.MATH_ONLIST_OPERATOR_MAX="清單的最大數字";A.Msg.MATH_ONLIST_OPERATOR_MEDIAN="清單的中位數";A.Msg.MATH_ONLIST_OPERATOR_MIN="清單的最小數字";A.Msg.MATH_ONLIST_OPERATOR_MODE="清單中的眾數";A.Msg.MATH_ONLIST_OPERATOR_RANDOM="清單中的隨機一項";A.Msg.MATH_ONLIST_OPERATOR_STD_DEV="清單的標準差";A.Msg.MATH_ONLIST_OPERATOR_SUM="清單中數值的和";A.Msg.MATH_ONLIST_TOOLTIP_AVERAGE="返回清單中數值的平均值(算術平均值)。";A.Msg.MATH_ONLIST_TOOLTIP_MAX="返回清單中最大的數字。";A.Msg.MATH_ONLIST_TOOLTIP_MEDIAN="返回清單中數值的中位數。";A.Msg.MATH_ONLIST_TOOLTIP_MIN="返回清單中最小的數字。";A.Msg.MATH_ONLIST_TOOLTIP_MODE="返回一個清單中的最常見的項目列表。";A.Msg.MATH_ONLIST_TOOLTIP_RANDOM="從清單中返回一個隨機的項目。";A.Msg.MATH_ONLIST_TOOLTIP_STD_DEV="返回清單中數字的標準差。";A.Msg.MATH_ONLIST_TOOLTIP_SUM="返回清單中的所有數字的總和。";A.Msg.MATH_POWER_SYMBOL="^";A.Msg.MATH_RANDOM_FLOAT_HELPURL="https://zh.wikipedia.org/wiki/隨機數生成器";A.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM="隨機取分數";A.Msg.MATH_RANDOM_FLOAT_TOOLTIP="在 0.0(包含)和 1.0(不包含)之間隨機取一個分數。";A.Msg.MATH_RANDOM_INT_HELPURL="https://zh.wikipedia.org/wiki/隨機數生成器";A.Msg.MATH_RANDOM_INT_TITLE="隨機取整數 %1 到 %2";A.Msg.MATH_RANDOM_INT_TOOLTIP="在指定二個數之間隨機取一個整數(包含)。";A.Msg.MATH_ROUND_HELPURL="https://zh.wikipedia.org/wiki/數值簡化";A.Msg.MATH_ROUND_OPERATOR_ROUND="四捨五入";A.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN="無條件捨去";A.Msg.MATH_ROUND_OPERATOR_ROUNDUP="無條件進位";A.Msg.MATH_ROUND_TOOLTIP="上捨入或下捨入數字";A.Msg.MATH_SINGLE_HELPURL="https://zh.wikipedia.org/wiki/平方根";A.Msg.MATH_SINGLE_OP_ABSOLUTE="絕對值";A.Msg.MATH_SINGLE_OP_ROOT="開根號";A.Msg.MATH_SINGLE_TOOLTIP_ABS="返回指定數字的絕對值。";A.Msg.MATH_SINGLE_TOOLTIP_EXP="返回e的指定數字次冪。";A.Msg.MATH_SINGLE_TOOLTIP_LN="返回指定數字的自然對數。";A.Msg.MATH_SINGLE_TOOLTIP_LOG10="返回指定數字的對數。";A.Msg.MATH_SINGLE_TOOLTIP_NEG="返回指定數字的相反數。";A.Msg.MATH_SINGLE_TOOLTIP_POW10="返回10的指定數字次冪。";A.Msg.MATH_SINGLE_TOOLTIP_ROOT="返回指定數字的平方根。";A.Msg.MATH_SUBTRACTION_SYMBOL="-";A.Msg.MATH_TRIG_ACOS="反餘弦";A.Msg.MATH_TRIG_ASIN="反正弦";A.Msg.MATH_TRIG_ATAN="反正切";A.Msg.MATH_TRIG_COS="餘弦";A.Msg.MATH_TRIG_HELPURL="https://zh.wikipedia.org/wiki/三角函數";A.Msg.MATH_TRIG_SIN="正弦";A.Msg.MATH_TRIG_TAN="正切";A.Msg.MATH_TRIG_TOOLTIP_ACOS="返回指定數字的反餘弦值。";A.Msg.MATH_TRIG_TOOLTIP_ASIN="返回指定角度的反正弦值(非弧度)。";A.Msg.MATH_TRIG_TOOLTIP_ATAN="返回指定數字的反正切值。";A.Msg.MATH_TRIG_TOOLTIP_COS="返回指定角度的餘弦值(非弧度)。";A.Msg.MATH_TRIG_TOOLTIP_SIN="返回指定角度的正弦值(非弧度)。";A.Msg.MATH_TRIG_TOOLTIP_TAN="返回指定角度的正切值(非弧度)。";A.Msg.NEW_COLOUR_VARIABLE="建立顏色變數…";A.Msg.NEW_NUMBER_VARIABLE="建立數值變數……";A.Msg.NEW_STRING_VARIABLE="建立字串變數……";A.Msg.NEW_VARIABLE="建立變數…";A.Msg.NEW_VARIABLE_TYPE_TITLE="新變數類型:";A.Msg.ORDINAL_NUMBER_SUFFIX="";A.Msg.PROCEDURES_ALLOW_STATEMENTS="允許陳述式";A.Msg.PROCEDURES_BEFORE_PARAMS="與:";A.Msg.PROCEDURES_CALLNORETURN_HELPURL="https://zh.wikipedia.org/wiki/子程式";A.Msg.PROCEDURES_CALLNORETURN_TOOLTIP="執行使用者定義的函式「%1」。";A.Msg.PROCEDURES_CALLRETURN_HELPURL="https://zh.wikipedia.org/wiki/%E5%AD%90%E7%A8%8B%E5%BA%8F";A.Msg.PROCEDURES_CALLRETURN_TOOLTIP="執行使用者定義的函式「%1」,並使用它的回傳值。";A.Msg.PROCEDURES_CALL_BEFORE_PARAMS="與:";A.Msg.PROCEDURES_CREATE_DO="建立「%1」";A.Msg.PROCEDURES_DEFNORETURN_COMMENT="描述此函式...";A.Msg.PROCEDURES_DEFNORETURN_DO="";A.Msg.PROCEDURES_DEFNORETURN_HELPURL="https://zh.wikipedia.org/wiki/子程式";A.Msg.PROCEDURES_DEFNORETURN_PROCEDURE="做些什麼";A.Msg.PROCEDURES_DEFNORETURN_TITLE="到";A.Msg.PROCEDURES_DEFNORETURN_TOOLTIP="創建一個無回傳值的函式。";A.Msg.PROCEDURES_DEFRETURN_HELPURL="https://zh.wikipedia.org/wiki/子程式";A.Msg.PROCEDURES_DEFRETURN_RETURN="返回";A.Msg.PROCEDURES_DEFRETURN_TOOLTIP="創建一個有回傳值的的函式。";A.Msg.PROCEDURES_DEF_DUPLICATE_WARNING="警告: 此函式中有重複的參數。";A.Msg.PROCEDURES_HIGHLIGHT_DEF="反白顯示函式定義";A.Msg.PROCEDURES_IFRETURN_HELPURL="https://c2.com/cgi/wiki?GuardClause";A.Msg.PROCEDURES_IFRETURN_TOOLTIP="如果值為 true,則返回第二個值。";A.Msg.PROCEDURES_IFRETURN_WARNING="警告:這個區塊只可以在定義函式時使用。";A.Msg.PROCEDURES_MUTATORARG_TITLE="輸入名稱:";A.Msg.PROCEDURES_MUTATORARG_TOOLTIP="添加一個輸入區塊到函式。";A.Msg.PROCEDURES_MUTATORCONTAINER_TITLE="輸入";A.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP="添加、刪除或重新排列此函式的輸入。";A.Msg.REDO="重做";A.Msg.REMOVE_COMMENT="移除註解";A.Msg.RENAME_VARIABLE="重新命名變數...";A.Msg.RENAME_VARIABLE_TITLE="將所有「%1」變數重新命名為:";A.Msg.TEXT_APPEND_HELPURL="https://github.com/google/blockly/wiki/Text#text-modification";A.Msg.TEXT_APPEND_TITLE="至 %1 套用文字 %2";A.Msg.TEXT_APPEND_TOOLTIP="添加一些文字到變數「%1」之後。";A.Msg.TEXT_CHANGECASE_HELPURL="https://github.com/google/blockly/wiki/Text#adjusting-text-case";A.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE="轉成英文小寫";A.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE="轉成英文首字大寫";A.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE="轉成英文大寫";A.Msg.TEXT_CHANGECASE_TOOLTIP="使用不同的大小寫複製這段文字。";A.Msg.TEXT_CHARAT_FIRST="擷取首字元";A.Msg.TEXT_CHARAT_FROM_END="取得倒數第#字元";A.Msg.TEXT_CHARAT_FROM_START="取得 字元 #";A.Msg.TEXT_CHARAT_HELPURL="https://github.com/google/blockly/wiki/Text#extracting-text";A.Msg.TEXT_CHARAT_LAST="取得 最後一個字元";A.Msg.TEXT_CHARAT_RANDOM="取得 任意字元";A.Msg.TEXT_CHARAT_TAIL="";A.Msg.TEXT_CHARAT_TITLE="在文字 %1 %2";A.Msg.TEXT_CHARAT_TOOLTIP="返回位於指定位置的字元。";A.Msg.TEXT_COUNT_HELPURL="https://github.com/google/blockly/wiki/Text#counting-substrings";A.Msg.TEXT_COUNT_MESSAGE0="計算%1在%2裡出現的次數";A.Msg.TEXT_COUNT_TOOLTIP="計算在一段文本中,某個部分文本重複出現了多少次。";A.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP="添加一個項目到字串中。";A.Msg.TEXT_CREATE_JOIN_TITLE_JOIN="加入";A.Msg.TEXT_CREATE_JOIN_TOOLTIP="添加、刪除或重新排列各部份以重新配置這個文字區塊。";A.Msg.TEXT_GET_SUBSTRING_END_FROM_END="到倒數第#字元";A.Msg.TEXT_GET_SUBSTRING_END_FROM_START="到 字元 #";A.Msg.TEXT_GET_SUBSTRING_END_LAST="到尾字元";A.Msg.TEXT_GET_SUBSTRING_HELPURL="https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text";A.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT="在字串";A.Msg.TEXT_GET_SUBSTRING_START_FIRST="取得首字元";A.Msg.TEXT_GET_SUBSTRING_START_FROM_END="取得 倒數第 # 個字元";A.Msg.TEXT_GET_SUBSTRING_START_FROM_START="取得 字元 #";A.Msg.TEXT_GET_SUBSTRING_TAIL="";A.Msg.TEXT_GET_SUBSTRING_TOOLTIP="返回指定的部分文字。";A.Msg.TEXT_INDEXOF_HELPURL="https://github.com/google/blockly/wiki/Text#finding-text";A.Msg.TEXT_INDEXOF_OPERATOR_FIRST="從 最前面 索引字串";A.Msg.TEXT_INDEXOF_OPERATOR_LAST="從 最後面 索引字串";A.Msg.TEXT_INDEXOF_TITLE="在文字 %1 %2 %3";A.Msg.TEXT_INDEXOF_TOOLTIP="在字串1中檢索是否有包含字串2,如果有,返回從頭/倒數算起的索引值。如果沒有則返回 %1。";A.Msg.TEXT_ISEMPTY_HELPURL="https://github.com/google/blockly/wiki/Text#checking-for-empty-text";A.Msg.TEXT_ISEMPTY_TITLE="%1 為空";A.Msg.TEXT_ISEMPTY_TOOLTIP="如果提供的字串為空,則返回 true。";A.Msg.TEXT_JOIN_HELPURL="https://github.com/google/blockly/wiki/Text#text-creation";A.Msg.TEXT_JOIN_TITLE_CREATEWITH="字串組合";A.Msg.TEXT_JOIN_TOOLTIP="通過連接任意數量的項目來建立一串文字。";A.Msg.TEXT_LENGTH_HELPURL="https://github.com/google/blockly/wiki/Text#text-modification";A.Msg.TEXT_LENGTH_TITLE="%1的長度";A.Msg.TEXT_LENGTH_TOOLTIP="返回這串文字的字元數(包含空格)。";A.Msg.TEXT_PRINT_HELPURL="https://github.com/google/blockly/wiki/Text#printing-text";A.Msg.TEXT_PRINT_TITLE="輸出 %1";A.Msg.TEXT_PRINT_TOOLTIP="輸出指定的文字、 數字或其他值。";A.Msg.TEXT_PROMPT_HELPURL="https://github.com/google/blockly/wiki/Text#getting-input-from-the-user";A.Msg.TEXT_PROMPT_TOOLTIP_NUMBER="要求用戶輸入數字";A.Msg.TEXT_PROMPT_TOOLTIP_TEXT="要求用戶輸入文字";A.Msg.TEXT_PROMPT_TYPE_NUMBER="要求輸入數字,並顯示提示訊息";A.Msg.TEXT_PROMPT_TYPE_TEXT="要求輸入文字,並顯示提示訊息";A.Msg.TEXT_REPLACE_HELPURL="https://github.com/google/blockly/wiki/Text#replacing-substrings";A.Msg.TEXT_REPLACE_MESSAGE0="在%3以%2取代%1";A.Msg.TEXT_REPLACE_TOOLTIP="取代在內容裡的全部某些文字。";A.Msg.TEXT_REVERSE_HELPURL="https://github.com/google/blockly/wiki/Text#reversing-text";A.Msg.TEXT_REVERSE_MESSAGE0="反轉%1";A.Msg.TEXT_REVERSE_TOOLTIP="反轉排序在文字裡的字元。";A.Msg.TEXT_TEXT_HELPURL="https://zh.wikipedia.org/wiki/字串";A.Msg.TEXT_TEXT_TOOLTIP="一粒字元、一個字詞或一行字";A.Msg.TEXT_TRIM_HELPURL="https://github.com/google/blockly/wiki/Text#trimming-removing-spaces";A.Msg.TEXT_TRIM_OPERATOR_BOTH="消除兩側空格";A.Msg.TEXT_TRIM_OPERATOR_LEFT="消除左側空格";A.Msg.TEXT_TRIM_OPERATOR_RIGHT="消除右側空格";A.Msg.TEXT_TRIM_TOOLTIP="複製這段文字,同時刪除兩端多餘的空格。";A.Msg.TODAY="今天";A.Msg.UNDO="還原";A.Msg.UNNAMED_KEY="未命名";A.Msg.VARIABLES_DEFAULT_NAME="項目";A.Msg.VARIABLES_GET_CREATE_SET="建立「賦值 %1」";A.Msg.VARIABLES_GET_HELPURL="https://github.com/google/blockly/wiki/Variables#get";A.Msg.VARIABLES_GET_TOOLTIP="返回此變數的值。";A.Msg.VARIABLES_SET="賦值 %1 成 %2";A.Msg.VARIABLES_SET_CREATE_GET="建立「取得 %1」";A.Msg.VARIABLES_SET_HELPURL="https://github.com/google/blockly/wiki/Variables#set";A.Msg.VARIABLES_SET_TOOLTIP="設定此變數,好和輸入結果相等。";A.Msg.VARIABLE_ALREADY_EXISTS="已存在變數「%1」。";A.Msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE="已存在名為「%1」,且用於其它類型「%2」的變數。";A.Msg.WORKSPACE_ARIA_LABEL="Blockly工作區";A.Msg.WORKSPACE_COMMENT_DEFAULT_TEXT="來說些事情...";A.Msg.CONTROLS_FOREACH_INPUT_DO=A.Msg.CONTROLS_REPEAT_INPUT_DO;A.Msg.CONTROLS_FOR_INPUT_DO=A.Msg.CONTROLS_REPEAT_INPUT_DO;A.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF=A.Msg.CONTROLS_IF_MSG_ELSEIF;A.Msg.CONTROLS_IF_ELSE_TITLE_ELSE=A.Msg.CONTROLS_IF_MSG_ELSE;A.Msg.CONTROLS_IF_IF_TITLE_IF=A.Msg.CONTROLS_IF_MSG_IF;A.Msg.CONTROLS_IF_MSG_THEN=A.Msg.CONTROLS_REPEAT_INPUT_DO;A.Msg.CONTROLS_WHILEUNTIL_INPUT_DO=A.Msg.CONTROLS_REPEAT_INPUT_DO;A.Msg.LISTS_CREATE_WITH_ITEM_TITLE=A.Msg.VARIABLES_DEFAULT_NAME;A.Msg.LISTS_GET_INDEX_HELPURL=A.Msg.LISTS_INDEX_OF_HELPURL;A.Msg.LISTS_GET_INDEX_INPUT_IN_LIST=A.Msg.LISTS_INLIST;A.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST=A.Msg.LISTS_INLIST;A.Msg.LISTS_INDEX_OF_INPUT_IN_LIST=A.Msg.LISTS_INLIST;A.Msg.LISTS_SET_INDEX_INPUT_IN_LIST=A.Msg.LISTS_INLIST;A.Msg.MATH_CHANGE_TITLE_ITEM=A.Msg.VARIABLES_DEFAULT_NAME;A.Msg.PROCEDURES_DEFRETURN_COMMENT=A.Msg.PROCEDURES_DEFNORETURN_COMMENT;A.Msg.PROCEDURES_DEFRETURN_DO=A.Msg.PROCEDURES_DEFNORETURN_DO;A.Msg.PROCEDURES_DEFRETURN_PROCEDURE=A.Msg.PROCEDURES_DEFNORETURN_PROCEDURE;A.Msg.PROCEDURES_DEFRETURN_TITLE=A.Msg.PROCEDURES_DEFNORETURN_TITLE;A.Msg.TEXT_APPEND_VARIABLE=A.Msg.VARIABLES_DEFAULT_NAME;A.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM=A.Msg.VARIABLES_DEFAULT_NAME;A.Msg.MATH_HUE="230";A.Msg.LOOPS_HUE="120";A.Msg.LISTS_HUE="260";A.Msg.LOGIC_HUE="210";A.Msg.VARIABLES_HUE="330";A.Msg.TEXTS_HUE="160";A.Msg.PROCEDURES_HUE="290";A.Msg.COLOUR_HUE="20";A.Msg.VARIABLES_DYNAMIC_HUE="310";A.Msg.TEXT_IS_NUMBER_HELPURL="";A.Msg.TEXT_IS_NUMBER_TOOLTIP="判斷文本%1,並返回True或False";A.Msg.TEXT_IS_NUMBER_MESSAGE0="%1 %2";A.Msg.TEXT_IS_DIGIT="是數字";A.Msg.TEXT_IS_ALPHA="是字母";A.Msg.TEXT_IS_ALNUM="是數字和字母的組合";A.Msg.TEXT_LIST_START="初始化陣列 [";A.Msg.TEXT_LIST_END="]";A.Msg.TEXT_TUPLE_START="初始化元組 (";A.Msg.TEXT_TUPLE_END=")";A.Msg.TEXT_DICT_START="初始化字典 {";A.Msg.TEXT_DICT_END="}";A.Msg.TEXT_SET_START="初始化集合 {";A.Msg.TEXT_SET_END="}";A.Msg.TEXT_SET_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/index.html";A.Msg.ADD_COMMENT="添加註釋";A.Msg.CHANGE_VALUE_TITLE="更改值:";A.Msg.CLEAN_UP="整理塊";A.Msg.COLLAPSE_ALL="折疊塊";A.Msg.COLLAPSE_BLOCK="折疊塊";A.Msg.COLOUR_BLEND_COLOUR1="顏色1";A.Msg.COLOUR_BLEND_COLOUR2="顏色2";A.Msg.COLOUR_BLEND_HELPURL="http://meyerweb.com/eric/tools/color-blend/";A.Msg.COLOUR_BLEND_RATIO="比例";A.Msg.COLOUR_BLEND_TITLE="混合";A.Msg.COLOUR_BLEND_TOOLTIP="用一個給定的比率(0.0-1.0)混合兩種顏色。";A.Msg.COLOUR_PICKER_HELPURL="https://zh.wikipedia.org/wiki/顏色";A.Msg.COLOUR_PICKER_TOOLTIP="從調色板中選擇壹種顏色。";A.Msg.COLOUR_RANDOM_HELPURL="http://randomcolour.com";A.Msg.COLOUR_RANDOM_TITLE="隨機顏色";A.Msg.COLOUR_RANDOM_TOOLTIP="隨機選擇壹種顏色。";A.Msg.COLOUR_RGB_BLUE="藍色";A.Msg.COLOUR_RGB_GREEN="綠色";A.Msg.COLOUR_RGB_HELPURL="http://www.december.com/html/spec/colorper.html";A.Msg.COLOUR_RGB_RED="紅色";A.Msg.COLOUR_RGB_TITLE="顏色";A.Msg.COLOUR_RGB_TOOLTIP="透過指定紅色、綠色和藍色的量創建壹種顏色。所有的值必須介於0和100之間。";A.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL="https://github.com/google/blockly/wiki/Loops#loop-termination-blocks";A.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK="中斷循環";A.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE="繼續下一次循環";A.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK="中斷包含它的循環。";A.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE="跳過這個循環的剩余部分,並繼續下一次疊代。";A.Msg.CONTROLS_FLOW_STATEMENTS_WARNING="警告:此塊僅可用於在一個循環內。";A.Msg.CONTROLS_FOREACH_HELPURL="https://github.com/google/blockly/wiki/Loops#for-each";A.Msg.CONTROLS_FOREACH_TITLE="在陣列 %2 中以 %1 遍歷每個項目";A.Msg.CONTROLS_FOREACH_TOOLTIP="遍歷每個陣列中的項目,將變量“%1”設定到該項中,然後執行某些語句。";A.Msg.CONTROLS_FOR_HELPURL="https://github.com/google/blockly/wiki/Loops#count-with";A.Msg.CONTROLS_FOR_TITLE="使用 %1 從範圍 %2 到 %3 每隔 %4";A.Msg.CONTROLS_FOR_TOOLTIP="從起始數到結尾數中取出變量“%1”的值,按指定的時間間隔,執行指定的塊。";A.Msg.CONTROLS_IF_ELSEIF_TOOLTIP="在if語句塊中增加一個條件。";A.Msg.CONTROLS_IF_ELSE_TOOLTIP="添加一個最終的,包括所有情況的節到if塊中。";A.Msg.CONTROLS_IF_HELPURL="https://github.com/google/blockly/wiki/IfElse";A.Msg.TRY_EXCEPT_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/index.html";A.Msg.CONTROLS_IF_IF_TOOLTIP="增加、刪除或重新排列各節來重新配置“if”塊。";A.Msg.CONTROLS_IF_MSG_ELSE="否則";A.Msg.CONTROLS_IF_MSG_ELSEIF="否則如果";A.Msg.TRY_EXCEPT_FINALLY="最後";A.Msg.TRY_EXCEPT_FINALLY_TOOLTIP="";A.Msg.TRY_EXCEPT_EXCEPT="除了";A.Msg.TRY_EXCEPT_EXCEPT_TOOLTIP="";A.Msg.TRY_EXCEPT_TRY="嘗試";A.Msg.TRY_EXCEPT_TRY_TOOLTIP="";A.Msg.CONTROLS_IF_MSG_IF="如果";A.Msg.CONTROLS_IF_TOOLTIP_1="如果值為真,執行壹些語句。";A.Msg.CONTROLS_IF_TOOLTIP_2="如果值為真,則執行首個塊語句。否則,則執行第二塊語句。";A.Msg.CONTROLS_IF_TOOLTIP_3="如果首個值為真,則執行首個塊的語句。否則,如果第二個值為真,則執行第二塊的語句。";A.Msg.CONTROLS_IF_TOOLTIP_4="如果首個值為真,則執行首個塊對語句。否則,如果第二個值為真,則執行語句的第二塊。如果沒有值為真,則執行最後壹塊的語句。";A.Msg.CONTROLS_REPEAT_FOREVER="一直重複";A.Msg.CONTROLS_REPEAT_FOREVER_TOOLTIP="壹直執行壹些語句。";A.Msg.CONTROLS_REPEAT_HELPURL="https://zh.wikipedia.org/wiki/For循環";A.Msg.CONTROLS_REPEAT_INPUT_DO="執行";A.Msg.CONTROLS_REPEAT_TITLE="重複 %1 次";A.Msg.CONTROLS_REPEAT_TOOLTIP="多次執行壹些語句。";A.Msg.CONTROLS_WHILEUNTIL_HELPURL="https://github.com/google/blockly/wiki/Loops#repeat";A.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL="重複直到";A.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE="重複當";A.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL="只要值為假,執行壹些語句。";A.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE="只要值為真,執行壹些語句。";A.Msg.DELETE_ALL_BLOCKS="刪除所有%1塊嗎?";A.Msg.DELETE_BLOCK="刪除塊";A.Msg.DELETE_VARIABLE="刪除“%1”變量";A.Msg.DELETE_VARIABLE_CONFIRMATION="刪除“%2”變量的%1種用途麼?";A.Msg.DELETE_X_BLOCKS="刪除塊";A.Msg.DISABLE_BLOCK="禁用塊";A.Msg.DUPLICATE_BLOCK="復制";A.Msg.ENABLE_BLOCK="啟用塊";A.Msg.EXPAND_ALL="展開塊";A.Msg.EXPAND_BLOCK="展開塊";A.Msg.EXTERNAL_INPUTS="多欄輸入";A.Msg.HELP="幫助";A.Msg.INLINE_INPUTS="單欄輸入";A.Msg.LISTS_CREATE_EMPTY_HELPURL="https://github.com/google/blockly/wiki/Lists#create-empty-list";A.Msg.LISTS_CREATE_EMPTY_TITLE="創建空陣列";A.Msg.TUPLE_CREATE_EMPTY_TITLE="創建空元組";A.Msg.DICT_CREATE_EMPTY_TITLE="創建空字典";A.Msg.SET_CREATE_EMPTY_TITLE="創建空集合";A.Msg.LISTS_CREATE_EMPTY_TOOLTIP="返回一個陣列,長度為 0,不包含任何數據記錄";A.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD="陣列";A.Msg.TUPLE_CREATE_WITH_CONTAINER_TITLE_ADD="元組";A.Msg.DICT_CREATE_WITH_CONTAINER_TITLE_ADD="字典";A.Msg.SET_CREATE_WITH_CONTAINER_TITLE_ADD="集合";A.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP="增加、刪除或重新排列各部分以此重新配置這個陣列塊。";A.Msg.TUPLE_CREATE_WITH_CONTAINER_TOOLTIP="增加、刪除或重新排列各部分以此重新配置這個元組塊。";A.Msg.DICT_CREATE_WITH_CONTAINER_TOOLTIP="增加、刪除或重新排列各部分以此重新配置這個字典塊。";A.Msg.SET_CREATE_WITH_CONTAINER_TOOLTIP="增加、刪除或重新排列各部分以此重新配置這個集合塊。";A.Msg.LISTS_CREATE_WITH_HELPURL="https://github.com/google/blockly/wiki/Lists#create-list-with";A.Msg.LISTS_CREATE_WITH_INPUT_WITH="初始化陣列";A.Msg.TUPLE_CREATE_WITH_INPUT_WITH="初始化元組";A.Msg.DICT_CREATE_WITH_INPUT_WITH="初始化字典";A.Msg.SET_CREATE_WITH_INPUT_WITH="初始化集合";A.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP="將一個項添加到陣列中。";A.Msg.TUPLE_CREATE_WITH_ITEM_TOOLTIP="將一個項添加到元組中。";A.Msg.DICT_CREATE_WITH_ITEM_TOOLTIP="將一個項添加到字典中。";A.Msg.SET_CREATE_WITH_ITEM_TOOLTIP="將一個項添加到集合中。";A.Msg.LISTS_CREATE_WITH_TOOLTIP="建立一個具有任意數量項目的陣列。";A.Msg.LISTS_GET_INDEX_FIRST="首個";A.Msg.LISTS_GET_INDEX_FROM_END="倒數第";A.Msg.LISTS_GET_INDEX_FROM_START="第";A.Msg.LISTS_GET_INDEX_GET="獲得";A.Msg.LISTS_GET_INDEX_GET_REMOVE="取出並移除";A.Msg.LISTS_GET_INDEX_LAST="最後";A.Msg.LISTS_GET_INDEX_RANDOM="隨機";A.Msg.LISTS_GET_INDEX_REMOVE="移除";A.Msg.LISTS_POP_HELPURL="";A.Msg.LISTS_POP_TOOLTIP="";A.Msg.LISTS_POP_MESSAGE0="在陣列 %1 中移除 %2 項";A.Msg.LISTS_GET_INDEX_TAIL="";A.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST="返回陣列中的首個項目。";A.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM="返回在陣列中的指定位置的項。";A.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST="返回陣列中的最後壹項。";A.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM="隨機返回陣列中的一個項目。";A.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST="移除並返回陣列中的首個項目。";A.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM="移除並返回陣列中的指定位置的項。";A.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST="移除並返回陣列中的最後一個項目。";A.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM="移除並返回陣列中的一個隨機項目中。";A.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST="移除陣列中的首個項";A.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM="移除在陣列中的指定位置的項。";A.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST="移除陣列中的最後壹項";A.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM="刪除陣列中的一個隨機的項。";A.Msg.LISTS_GET_SUBLIST_END_FROM_END="到倒數第#";A.Msg.LISTS_GET_SUBLIST_END_FROM_START="到#";A.Msg.LISTS_GET_SUBLIST_END_LAST="到最後";A.Msg.LISTS_GET_SUBLIST_HELPURL="https://github.com/google/blockly/wiki/Lists#getting-a-sublist";A.Msg.LISTS_GET_SUBLIST_START_FIRST="從頭獲得子陣列";A.Msg.LISTS_GET_SUBLIST_START_FROM_END="從倒數#取得子陣列";A.Msg.LISTS_GET_SUBLIST_START_FROM_START="從#取得子陣列";A.Msg.LISTS_GET_SUBLIST_TAIL="";A.Msg.LISTS_GET_SUBLIST_TOOLTIP="復制陣列中指定的部分。";A.Msg.LISTS_INDEX_FROM_END_TOOLTIP="%1是最後壹項。";A.Msg.LISTS_INDEX_FROM_START_TOOLTIP="%1是首個項目。";A.Msg.LISTS_INDEX_OF_FIRST="找出首個項出現";A.Msg.LISTS_INDEX_OF_HELPURL="https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list";A.Msg.LISTS_INDEX_OF_LAST="找出最後一個項出現";A.Msg.LISTS_INDEX_OF_TOOLTIP="返回在陣列中的首個/最後一個匹配項的索引值。如果找不到項目則返回0";A.Msg.LISTS_INLIST="在陣列中";A.Msg.LISTS_ISEMPTY_HELPURL="https://github.com/google/blockly/wiki/Lists#is-empty";A.Msg.LISTS_ISEMPTY_TITLE="%1是空的";A.Msg.LISTS_ISEMPTY_TOOLTIP="如果改陣列為空,則返回真。";A.Msg.LISTS_LENGTH_HELPURL="https://github.com/google/blockly/wiki/Lists#length-of";A.Msg.LISTS_LENGTH_TITLE="%1的長度";A.Msg.LISTS_LENGTH_TOOLTIP="返回陣列的長度。";A.Msg.LISTS_REPEAT_HELPURL="https://github.com/google/blockly/wiki/Lists#create-list-with";A.Msg.LISTS_REPEAT_TITLE="建立陣列 項 %1 重複 %2 次";A.Msg.LISTS_REPEAT_TOOLTIP="建立包含指定重複次數的值的陣列。";A.Msg.LISTS_SET_INDEX_HELPURL="https://github.com/google/blockly/wiki/Lists#in-list--set";A.Msg.LISTS_SET_INDEX_INPUT_TO="為";A.Msg.LISTS_SET_INDEX_INSERT="插入在";A.Msg.LISTS_SET_INDEX_SET="設置";A.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST="在陣列的起始處添加該項。";A.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM="插入在陣列中指定位置的項。";A.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST="將該項追加到陣列的末尾。";A.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM="在陣列中隨機插入項。";A.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST="設置陣列中的首個項目。";A.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM="設置在陣列中指定位置的項。";A.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST="設置陣列中的最後壹項。";A.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM="設置陣列中一個隨機的項目。";A.Msg.LISTS_SORT_HELPURL="https://github.com/google/blockly/wiki/Lists#sorting-a-list";A.Msg.LISTS_SORT_ORDER_ASCENDING="升序";A.Msg.LISTS_SORT_ORDER_DESCENDING="降序";A.Msg.LISTS_SORT_TITLE="排序%1 %2 %3";A.Msg.LISTS_SORT_TOOLTIP="排序一個陣列的拷貝。";A.Msg.LISTS_SORT_TYPE_IGNORECASE="按字母排序,忽略大小寫";A.Msg.LISTS_SORT_TYPE_NUMERIC="按數字排序";A.Msg.LISTS_SORT_TYPE_TEXT="按字母排序";A.Msg.LISTS_SPLIT_HELPURL="https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";A.Msg.LISTS_SPLIT_LIST_FROM_TEXT="從文本制作陣列";A.Msg.LISTS_SPLIT_TEXT_FROM_LIST="從陣列組合文本";A.Msg.LISTS_SPLIT_TOOLTIP_JOIN="加入文本陣列至一個文本,由分隔符分隔。";A.Msg.LISTS_SPLIT_TOOLTIP_SPLIT="拆分文本到文本陣列,按每個分隔符拆分。";A.Msg.LISTS_SPLIT_WITH_DELIMITER="用分隔符";A.Msg.LOGIC_BOOLEAN_FALSE="假";A.Msg.LOGIC_BOOLEAN_HELPURL="https://github.com/google/blockly/wiki/Logic#values";A.Msg.LOGIC_BOOLEAN_TOOLTIP="返回真或假。";A.Msg.LOGIC_BOOLEAN_TRUE="真";A.Msg.LOGIC_COMPARE_HELPURL="https://zh.wikipedia.org/wiki/不等";A.Msg.LOGIC_COMPARE_TOOLTIP_EQ="如果兩個輸入結果相等,則返回真。";A.Msg.LOGIC_COMPARE_TOOLTIP_GT="如果首個輸入結果比第二個大,則返回真。";A.Msg.LOGIC_COMPARE_TOOLTIP_GTE="如果首個輸入結果大於或等於第二個輸入結果,則返回真。";A.Msg.LOGIC_COMPARE_TOOLTIP_LT="如果首個輸入結果比第二個小,則返回真。";A.Msg.LOGIC_COMPARE_TOOLTIP_LTE="如果首個輸入結果小於或等於第二個輸入結果,則返回真。";A.Msg.LOGIC_COMPARE_TOOLTIP_NEQ="如果兩個輸入結果不相等,則返回真。";A.Msg.LOGIC_NEGATE_HELPURL="https://github.com/google/blockly/wiki/Logic#not";A.Msg.LOGIC_NEGATE_TITLE="非%1";A.Msg.LOGIC_NEGATE_TOOLTIP="如果輸入結果為假,則返回真;如果輸入結果為真,則返回假。";A.Msg.LOGIC_NULL="空";A.Msg.LOGIC_NULL_HELPURL="https://en.wikipedia.org/wiki/Nullable_type";A.Msg.LOGIC_NULL_TOOLTIP="返回空值。";A.Msg.LOGIC_OPERATION_AND="和";A.Msg.LOGIC_OPERATION_HELPURL="https://github.com/google/blockly/wiki/Logic#logical-operations";A.Msg.LOGIC_OPERATION_OR="或";A.Msg.LOGIC_OPERATION_TOOLTIP_AND="如果兩個輸入結果都為真,則返回真。";A.Msg.LOGIC_OPERATION_TOOLTIP_OR="如果至少有一個輸入結果為真,則返回真。";A.Msg.LOGIC_TERNARY_CONDITION="測試";A.Msg.LOGIC_TERNARY_HELPURL="https://zh.wikipedia.org/wiki/條件運算符";A.Msg.LOGIC_TERNARY_IF_FALSE="如果為假";A.Msg.LOGIC_TERNARY_IF_TRUE="如果為真";A.Msg.LOGIC_TERNARY_TOOLTIP="檢查“test”中的條件。如果條件為真,則返回“if true”的值,否則,則返回“if false”的值。";A.Msg.MATH_ADDITION_SYMBOL="+";A.Msg.MATH_ARITHMETIC_HELPURL="https://zh.wikipedia.org/wiki/算術";A.Msg.MATH_ARITHMETIC_TOOLTIP_ADD="返回兩個數字的和。";A.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE="返回兩個數字的商。";A.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS="返回兩個數字的區別。";A.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY="返回兩個數字的乘積。";A.Msg.MATH_ARITHMETIC_TOOLTIP_POWER="返回首個數的第二個數次方。";A.Msg.MATH_CHANGE_HELPURL="https://zh.wikipedia.org/wiki/%E5%8A%A0%E6%B3%95";A.Msg.MATH_CHANGE_TITLE="將變量 %1 的值增加 %2";A.Msg.MATH_CHANGE_TOOLTIP="將一個數添加到變量“%1”。";A.Msg.MATH_CONSTANT_HELPURL="https://zh.wikipedia.org/wiki/數學常數";A.Msg.MATH_CONSTANT_TOOLTIP="返回一個常見常量:π (3.141......),e (2.718...)、φ (1.618...)、 sqrt(2) (1.414......)、sqrt(½) (0.707......)或 ∞(無窮大)。";A.Msg.MATH_CONSTRAIN_HELPURL="https://en.wikipedia.org/wiki/Clamping_%28graphics%29";A.Msg.MATH_CONSTRAIN_TITLE="限制數字 %1 介於 (低) %2 到 (高) %3";A.Msg.MATH_CONSTRAIN_TOOLTIP="限制數字介於兩個指定的數字之間";A.Msg.MATH_CONVERT_HELPURL="";A.Msg.MATH_CONVERT_MESSAGE0="%1 %2";A.Msg.MATH_CONVERT_TOOLTIP="強制轉換數據類型";A.Msg.MATH_DIVISION_CONSULT_HELPURL="";A.Msg.MATH_DIVISION_CONSULT_TITLE="%1 ÷ %2 商的整數部分";A.Msg.MATH_DIVISION_CONSULT_TOOLTIP="返回兩數商的整數部分";A.Msg.MATH_DIVISION_SYMBOL="÷";A.Msg.MATH_IS_DIVISIBLE_BY="可被整除";A.Msg.MATH_IS_EVEN="是偶數";A.Msg.MATH_IS_NEGATIVE="為負";A.Msg.MATH_IS_ODD="是奇數";A.Msg.MATH_IS_POSITIVE="為正";A.Msg.MATH_IS_PRIME="是質數";A.Msg.MATH_IS_TOOLTIP="如果數字是偶數、奇數、非負整數、正數、負數或如果它可被某數字整除,則返回真或假。";A.Msg.MATH_IS_WHOLE="為整數";A.Msg.MATH_MODULO_HELPURL="https://zh.wikipedia.org/wiki/模除";A.Msg.MATH_MODULO_TITLE="%1 ÷ %2 的餘數";A.Msg.MATH_MODULO_TOOLTIP="返回這兩個數字相除後的餘數。";A.Msg.MATH_MULTIPLICATION_SYMBOL="×";A.Msg.MATH_NUMBER_BITS_OPS_HELPURL="";A.Msg.MATH_NUMBER_BITS_OPS_MESSAGE0="%1 %2 %3";A.Msg.MATH_NUMBER_BITS_OPS_TOOLTIP="對數字進行位運算";A.Msg.MATH_NUMBER_HELPURL="https://zh.wikipedia.org/wiki/數";A.Msg.MATH_NUMBER_TOOLTIP="一個數字。";A.Msg.MATH_ONLIST_HELPURL="";A.Msg.MATH_ONLIST_OPERATOR_AVERAGE="陣列中的平均數";A.Msg.MATH_ONLIST_OPERATOR_MAX="陣列中的最大值";A.Msg.MATH_ONLIST_OPERATOR_MEDIAN="陣列中位數";A.Msg.MATH_ONLIST_OPERATOR_MIN="陣列中的最小值";A.Msg.MATH_ONLIST_OPERATOR_MODE="陣列模式";A.Msg.MATH_ONLIST_OPERATOR_RANDOM="陣列的隨機項";A.Msg.MATH_ONLIST_OPERATOR_STD_DEV="陣列中的標準差";A.Msg.MATH_ONLIST_OPERATOR_SUM="陣列中的數的總和";A.Msg.MATH_ONLIST_TOOLTIP_AVERAGE="返回陣列中的數值的平均值。";A.Msg.MATH_ONLIST_TOOLTIP_MAX="返回陣列中最大數。";A.Msg.MATH_ONLIST_TOOLTIP_MEDIAN="返回陣列中的中位數。";A.Msg.MATH_ONLIST_TOOLTIP_MIN="返回陣列中最小數。";A.Msg.MATH_ONLIST_TOOLTIP_MODE="返回陣列中的最常見的項的陣列。";A.Msg.MATH_ONLIST_TOOLTIP_RANDOM="從陣列中返回一個隨機的元素。";A.Msg.MATH_ONLIST_TOOLTIP_STD_DEV="返回陣列的標準偏差。";A.Msg.MATH_ONLIST_TOOLTIP_SUM="返回陣列中的所有數字的和。";A.Msg.MATH_POWER_SYMBOL="**";A.Msg.MATH_RANDOM_FLOAT_HELPURL="https://zh.wikipedia.org/wiki/隨機數生成器";A.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM="隨機小數";A.Msg.MATH_RANDOM_FLOAT_TOOLTIP="返回介於(包含)0.0到1.0之間的隨機數。";A.Msg.MATH_RANDOM_INT_HELPURL="https://zh.wikipedia.org/wiki/隨機數生成器";A.Msg.MATH_RANDOM_INT_TITLE="從 %1 到 %2 之間的隨機整數";A.Msg.MATH_RANDOM_INT_TOOLTIP="返回兩個指定的範圍(含)之間的隨機整數。";A.Msg.MATH_ROUND_HELPURL="https://zh.wikipedia.org/wiki/數值修約";A.Msg.MATH_ROUND_OPERATOR_ROUND="四舍五入";A.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN="向下舍入";A.Msg.MATH_ROUND_OPERATOR_ROUNDUP="向上舍入";A.Msg.MATH_ROUND_TOOLTIP="數字向上或向下舍入。";A.Msg.MATH_SINGLE_HELPURL="https://zh.wikipedia.org/wiki/平方根";A.Msg.MATH_SINGLE_OP_ABSOLUTE="絕對";A.Msg.MATH_SINGLE_OP_ROOT="平方根";A.Msg.MATH_SINGLE_TOOLTIP_ABS="返回一個數的絕對值。";A.Msg.MATH_SINGLE_TOOLTIP_EXP="返回數的e次方。";A.Msg.MATH_SINGLE_TOOLTIP_LN="返回一個數的自然對數。";A.Msg.MATH_SINGLE_TOOLTIP_LOG10="返回數字的對數。";A.Msg.MATH_SINGLE_TOOLTIP_NEG="返回數的邏輯非。";A.Msg.MATH_SINGLE_TOOLTIP_POW10="返回數的10次方。";A.Msg.MATH_SINGLE_TOOLTIP_ROOT="返回數的平方根。";A.Msg.MATH_SUBTRACTION_SYMBOL="-";A.Msg.MATH_TRIG_ACOS="acos";A.Msg.MATH_TRIG_ASIN="asin";A.Msg.MATH_TRIG_ATAN="atan";A.Msg.MATH_TRIG_COS="cos";A.Msg.MATH_TRIG_HELPURL="https://zh.wikipedia.org/wiki/三角函數";A.Msg.MATH_TRIG_SIN="sin";A.Msg.MATH_TRIG_TAN="tan";A.Msg.MATH_TRIG_TOOLTIP_ACOS="返回一個數的反余弦值。";A.Msg.MATH_TRIG_TOOLTIP_ASIN="返回一個數的反正弦值。";A.Msg.MATH_TRIG_TOOLTIP_ATAN="返回指定角度的反正切值。";A.Msg.MATH_TRIG_TOOLTIP_COS="返回指定角度的余弦值(非弧度)。";A.Msg.MATH_TRIG_TOOLTIP_SIN="返回指定角度的正弦值(非弧度)。";A.Msg.MATH_TRIG_TOOLTIP_TAN="返回指定角度的正切值(非弧度)。";A.Msg.NEW_VARIABLE_TITLE="新變量的名稱:";A.Msg.ORDINAL_NUMBER_SUFFIX="";A.Msg.PROCEDURES_ALLOW_STATEMENTS="允許宣告";A.Msg.PROCEDURES_BEFORE_PARAMS="參數:";A.Msg.PROCEDURES_CALLNORETURN_HELPURL="https://zh.wikipedia.org/wiki/子程序";A.Msg.PROCEDURES_CALLNORETURN_TOOLTIP="運行用戶定義的函數“%1”。";A.Msg.PROCEDURES_CALLRETURN_HELPURL="https://zh.wikipedia.org/wiki/子程序";A.Msg.PROCEDURES_CALLRETURN_TOOLTIP="運行用戶定義的函數“%1”,並使用它的輸出值。";A.Msg.PROCEDURES_CALL_BEFORE_PARAMS="與:";A.Msg.PROCEDURES_CREATE_DO="創建“%1”";A.Msg.PROCEDURES_DEFNORETURN_COMMENT="";A.Msg.PROCEDURES_DEFNORETURN_DO="";A.Msg.PROCEDURES_DEFNORETURN_HELPURL="https://zh.wikipedia.org/wiki/子程序";A.Msg.PROCEDURES_DEFNORETURN_PROCEDURE="my_func";A.Msg.PROCEDURES_DEFNORETURN_TITLE="定義函數";A.Msg.PROCEDURES_DEFNORETURN_TOOLTIP="創建一個不帶輸出值的函數。";A.Msg.PROCEDURES_DEFRETURN_HELPURL="https://zh.wikipedia.org/wiki/子程序";A.Msg.PROCEDURES_DEFRETURN_RETURN="返回";A.Msg.PROCEDURES_DEFRETURN_TOOLTIP="創建一個有輸出值的函數。";A.Msg.PROCEDURES_DEF_DUPLICATE_WARNING="警告: 此函數具有重複參數。";A.Msg.PROCEDURES_HIGHLIGHT_DEF="突出顯示函數定義";A.Msg.PROCEDURES_IFRETURN_HELPURL="http://c2.com/cgi/wiki?GuardClause";A.Msg.PROCEDURES_IFRETURN_TOOLTIP="如果值為真,則返回第二個值。";A.Msg.PROCEDURES_IFRETURN_WARNING="警告: 僅在定義函數內可使用此塊。";A.Msg.PROCEDURES_MUTATORARG_TITLE="輸入名稱:";A.Msg.PROCEDURES_MUTATORARG_TOOLTIP="添加函數輸入。";A.Msg.PROCEDURES_MUTATORCONTAINER_TITLE="輸入";A.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP="添加、刪除或重新排此函數的輸入。";A.Msg.REDO="重做";A.Msg.REMOVE_COMMENT="刪除註釋";A.Msg.RENAME_VARIABLE="重命名變量...";A.Msg.RENAME_VARIABLE_TITLE="將所有“%1”變量重命名為:";A.Msg.TEXT_APPEND_APPENDTEXT="追加文本";A.Msg.TEXT_APPEND_HELPURL="https://github.com/google/blockly/wiki/Text#text-modification";A.Msg.TEXT_APPEND_TO="";A.Msg.TEXT_APPEND_TOOLTIP="將壹些文本追加到變量“%1”。";A.Msg.TEXT_CHANGECASE_HELPURL="https://github.com/google/blockly/wiki/Text#adjusting-text-case";A.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE="轉為小寫";A.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE="轉為首字母大寫";A.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE="轉為大寫";A.Msg.TEXT_CHANGECASE_TOOLTIP="使用不同的大小寫復制這段文字。";A.Msg.TEXT_CHARAT_FIRST="獲得首個字元";A.Msg.TEXT_CHARAT_FROM_END="獲得倒數第#個字元";A.Msg.TEXT_CHARAT_FROM_START="獲得字元#";A.Msg.TEXT_CHARAT_HELPURL="https://github.com/google/blockly/wiki/Text#extracting-text";A.Msg.TEXT_CHARAT_INPUT_INTEXT="從文本";A.Msg.TEXT_CHARAT_LAST="獲得最後一個字元";A.Msg.TEXT_CHARAT_RANDOM="獲取隨機的字母";A.Msg.TEXT_CHARAT_TAIL="";A.Msg.TEXT_CHARAT_TOOLTIP="返回位於指定位置的字母。";A.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP="將一個項添加到文本中。";A.Msg.TEXT_CREATE_JOIN_TITLE_JOIN="加入";A.Msg.TEXT_CREATE_JOIN_TOOLTIP="添加、移除或重新排列各節來重新配置這個文本塊。";A.Msg.TEXT_GET_SUBSTRING_END_FROM_END="到倒數第#個字元";A.Msg.TEXT_GET_SUBSTRING_END_FROM_START="到字元#";A.Msg.TEXT_GET_SUBSTRING_END_LAST="到最後一個字元";A.Msg.TEXT_GET_SUBSTRING_HELPURL="https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text";A.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT="從文本";A.Msg.TEXT_GET_SUBSTRING_START_FIRST="取得段落字串自首個字元";A.Msg.TEXT_GET_SUBSTRING_START_FROM_END="取得段落字串自倒數第#個字元";A.Msg.TEXT_GET_SUBSTRING_START_FROM_START="取得段落字串自#";A.Msg.TEXT_GET_SUBSTRING_TAIL="";A.Msg.TEXT_GET_SUBSTRING_TOOLTIP="返回指定的部分文本。";A.Msg.TEXT_INDEXOF_HELPURL="https://github.com/google/blockly/wiki/Text#finding-text";A.Msg.TEXT_INDEXOF_INPUT_INTEXT="在文本";A.Msg.TEXT_INDEXOF_OPERATOR_FIRST="中查找 最先 出現";A.Msg.TEXT_INDEXOF_OPERATOR_LAST="中查找 最後 出現";A.Msg.TEXT_INDEXOF_TAIL="的位置";A.Msg.TEXT_INDEXOF_TOOLTIP="返回在第二個字串中的首個/最後一個匹配項的索引值。如果未找到則返回%1。";A.Msg.TEXT_ISEMPTY_HELPURL="https://github.com/google/blockly/wiki/Text#checking-for-empty-text";A.Msg.TEXT_ISEMPTY_TITLE="%1是空的";A.Msg.TEXT_ISEMPTY_TOOLTIP="如果提供的文本為空,則返回真。";A.Msg.TEXT_JOIN_HELPURL="https://github.com/google/blockly/wiki/Text#text-creation";A.Msg.TEXT_JOIN_TITLE_CREATEWITH="轉為文本";A.Msg.TEXT_JOIN_TOOLTIP="透過串起任意數量的項以建立壹段文字。";A.Msg.TEXT_LENGTH_HELPURL="https://github.com/google/blockly/wiki/Text#text-modification";A.Msg.TEXT_LENGTH_TITLE="%1的長度";A.Msg.TEXT_LENGTH_TOOLTIP="返回提供文本的字母數(包括空格)。";A.Msg.TEXT_PRINT_HELPURL="https://github.com/google/blockly/wiki/Text#printing-text";A.Msg.TEXT_PRINT_TITLE="打印%1";A.Msg.CocoRobo_INPUT_MESSAGE0="輸入%1";A.Msg.TEXT_PRINT_TOOLTIP="打印指定的文字、數字或其他值。";A.Msg.TEXT_PROMPT_HELPURL="https://github.com/google/blockly/wiki/Text#getting-input-from-the-user";A.Msg.TEXT_PROMPT_TOOLTIP_NUMBER="提示用戶輸入數字。";A.Msg.TEXT_PROMPT_TOOLTIP_TEXT="提示用戶輸入壹些文本。";A.Msg.TEXT_PROMPT_TYPE_NUMBER="輸入數字並顯示提示消息";A.Msg.TEXT_PROMPT_TYPE_TEXT="輸入數字並顯示提示消息";A.Msg.TEXT_TEXT_HELPURL="https://zh.wikipedia.org/wiki/字串";A.Msg.TEXT_TEXT_TOOLTIP="一個字母、單詞或壹欄文本。";A.Msg.TEXT_TRIM_HELPURL="https://github.com/google/blockly/wiki/Text#trimming-removing-spaces";A.Msg.TEXT_TRIM_OPERATOR_BOTH="消除兩側空格";A.Msg.TEXT_TRIM_OPERATOR_LEFT="消除左側空格";A.Msg.TEXT_TRIM_OPERATOR_RIGHT="消除右側空格";A.Msg.TEXT_TRIM_TOOLTIP="復制這段文字的同時刪除兩端多余的空格。";A.Msg.TODAY="今天";A.Msg.UNDO="撤銷";A.Msg.VARIABLES_DEFAULT_NAME="item";A.Msg.VARIABLES_GET_CREATE_SET="創建“設定%1”";A.Msg.VARIABLES_GET_HELPURL="https://github.com/google/blockly/wiki/Variables#get";A.Msg.VARIABLES_GET_TOOLTIP="返回此變量的值。";A.Msg.VARIABLES_SET="將變量 %1 設定為 %2";A.Msg.VARIABLES_SET_CREATE_GET="創建“獲得%1”";A.Msg.VARIABLES_SET_HELPURL="https://github.com/google/blockly/wiki/Variables#set";A.Msg.VARIABLES_SET_TOOLTIP="設置此變量,以使它和輸入值相等。";A.Msg.VARIABLE_ALREADY_EXISTS="已存在名為“%1”的變量。";A.Msg.PROCEDURES_DEFRETURN_TITLE=A.Msg.PROCEDURES_DEFNORETURN_TITLE;A.Msg.CONTROLS_IF_IF_TITLE_IF=A.Msg.CONTROLS_IF_MSG_IF;A.Msg.CONTROLS_WHILEUNTIL_INPUT_DO=A.Msg.CONTROLS_REPEAT_INPUT_DO;A.Msg.CONTROLS_IF_MSG_THEN=A.Msg.CONTROLS_REPEAT_INPUT_DO;A.Msg.TRY_EXCEPT_TRY="嘗試";A.Msg.CocoRobo_RETURN_TOOLTIP="返回一個值";A.Msg.CocoRobo_RETURN_MESSAGE0="返回 %1";A.Msg.CocoRobo_TYPE_MESSAGE0="值 %1 的類型";A.Msg.CocoRobo_TYPE_TOOLTIP="返回當前值的類型";A.Msg.CocoRobo_TYPE_IS_MESSAGE0="值 %1 的類型為 %2";A.Msg.CocoRobo_TYPE_IS_TOOLTIP="設定當前值的類型爲%2,並返回結果";A.Msg.CocoRobo_EVAL_HELPURL="";A.Msg.CocoRobo_EVAL_MESSAGE0="計算運算式 %1 的結果";A.Msg.CocoRobo_EVAL_TOOLTIP="計算字串運算式,並返回結果";A.Msg.CocoRobo_RETURN_HELPURL="";A.Msg.CocoRobo_RETURN_MESSAGE0="返回 %1";A.Msg.CocoRobo_RETURN_TOOLTIP="返回一個值";A.Msg.math_degrad_rad="轉換角度為弧度";A.Msg.math_degrad_deg="轉換弧度為角度";A.Msg.MATH_KEEP_DECIMAL_HELPURL="";A.Msg.MATH_KEEP_DECIMAL_TOOLTIP="返回指定值保留小數點的結果";A.Msg.MATH_KEEP_DECIMAL_MESSAGE0="%1 保留 %2 位小數";A.Msg.labplus_mapping_MESSAGE0="映射%1 從%2 , %3到%4 , %5";A.Msg.labplus_mapping_TOOLTIP="將0~100中的10映射到0~200中並返回映射值";A.Msg.labplus_mapping_HELPURL="";A.Msg.MATH_RANDOM_RANDRANGE_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.MATH_RANDOM_RANDRANGE_TOOLTIP="返回指定遞增基數集合中的一個隨機數,基數缺省值為1";A.Msg.MATH_RANDOM_RANDRANGE_MESSAGE0="隨機數 從遞增區間 [%1 ,%2) 遞增長度%3";A.Msg.BIT_INVERSION_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.BIT_INVERSION_TOOLTIP="對數據的每個二進制位取反";A.Msg.BIT_INVERSION_MESSAGE0="二進制取反 %1";A.Msg.CocoRobo_TEN_CONVERT_TO_HELPURL="";A.Msg.CocoRobo_TEN_CONVERT_TO_MESSAGE0="10進制整數 %1 轉化為 %2 字串";A.Msg.CocoRobo_TEN_CONVERT_TO_TOOLTIP="將10進制整數轉化爲%2字元串,並返回結果";A.Msg.CocoRobo_LOCK_OBJECT_ACQUIRE_LOCK_HELPURL="";A.Msg.CocoRobo_LOCK_OBJECT_ACQUIRE_LOCK_MESSAGE0="綫程鎖對象 %1 請求鎖";A.Msg.CocoRobo_LOCK_OBJECT_ACQUIRE_LOCK_TOOLTIP="";A.Msg.CocoRobo_START_NEW_THREAD_HELPURL="";A.Msg.CocoRobo_START_NEW_THREAD_MESSAGE0="子綫程 %1";A.Msg.CocoRobo_START_NEW_THREAD_TOOLTIP="";A.Msg.CocoRobo_BAUDRATE_HELPURL="";A.Msg.CocoRobo_BAUDRATE_MESSAGE0="%1";A.Msg.CocoRobo_BAUDRATE_TOOLTIP="";A.Msg.CocoRobo_HIGH_LOW_HELPURL="";A.Msg.CocoRobo_HIGH_LOW_MESSAGE0="%1";A.Msg.CocoRobo_HIGH_LOW_TOOLTIP="";A.Msg.CocoRobo_TEN_CONVERT_TO_HELPURL="";A.Msg.CocoRobo_TEN_CONVERT_TO_MESSAGE0="10進制整數 %1 轉化為 %2 字串";A.Msg.CocoRobo_TEN_CONVERT_TO_TOOLTIP="將10進制整數轉化爲%2字元串,並返回結果";A.Msg.CocoRobo_BIN="二進制";A.Msg.CocoRobo_OCT="八進制";A.Msg.CocoRobo_HEX="十六進制";A.Msg.CocoRobo_CONVERT_TO_TEN_HELPURL="";A.Msg.CocoRobo_CONVERT_TO_TEN_MESSAGE0="%1 字串 %2 轉 10進制整數";A.Msg.CocoRobo_CONVERT_TO_TEN_TOOLTIP="將%2字元串轉化爲10進制整數,並返回結果";A.Msg.CocoRobo_TEN_CONVERTED_TO_BYTES_HELPURL="";A.Msg.CocoRobo_TEN_CONVERTED_TO_BYTES_MESSAGE0="10進制整數 %2 轉 %1 字節";A.Msg.CocoRobo_TEN_CONVERTED_TO_BYTES_TOOLTIP="將10進制整數轉爲%1字節,並返回結果";A.Msg.CocoRobo_INT_TO_CHR_HELPURL="";A.Msg.CocoRobo_INT_TO_CHR_MESSAGE0="整型 %1 轉 ASCII 單字元";A.Msg.CocoRobo_INT_TO_CHR_TOOLTIP="ASCII:基於拉丁字母的壹套電腦編碼系統,主要用於顯示現代英語和其他西歐語言";A.Msg.CocoRobo_CHR_TO_INT_HELPURL="";A.Msg.CocoRobo_CHR_TO_INT_MESSAGE0="ASCII 單字元 %1 轉 整型";A.Msg.CocoRobo_CHR_TO_INT_TOOLTIP="ASCII:基於拉丁字母的壹套電腦編碼系統,主要用於顯示現代英語和其他西歐語言。";A.Msg.CocoRobo_STR_TO_HEX_HELPURL="";A.Msg.CocoRobo_STR_TO_HEX_MESSAGE0="字串 %1 轉 十六進制 字節";A.Msg.CocoRobo_STR_TO_HEX_TOOLTIP="返回結果中用空格分隔兩個十六進制數";A.Msg.CocoRobo_HEX_TO_BIN_STR_HELPURL="";A.Msg.CocoRobo_HEX_TO_BIN_STR_MESSAGE0="十六進制字串 %1 轉 二進制 字節";A.Msg.CocoRobo_HEX_TO_BIN_STR_TOOLTIP="十六進制字元串轉二進制字節,並返回結果";A.Msg.CocoRobo_DATA_TO_BASE64_HELPURL="";A.Msg.CocoRobo_DATA_TO_BASE64_MESSAGE0="%1 以 base64 格式編碼 返回字節對象";A.Msg.CocoRobo_DATA_TO_BASE64_TOOLTIP="";A.Msg.CocoRobo_BASE64_TO_DATA_HELPURL="";A.Msg.CocoRobo_BASE64_TO_DATA_MESSAGE0="解碼 base64 數據 %1 返回字節對象";A.Msg.CocoRobo_BASE64_TO_DATA_TOOLTIP="";A.Msg.CocoRobo_UJSON_DUMPS_HELPURL="";A.Msg.CocoRobo_UJSON_DUMPS_MESSAGE0="%1 轉 json 字串";A.Msg.CocoRobo_UJSON_DUMPS_TOOLTIP="JSON 格式的 key 必須是字串 ,value 可以是合法的 JSON 數據類型(字串, 數字, 對象, 陣列, 布爾值或 none)";A.Msg.CocoRobo_UJSON_LOADS_HELPURL="";A.Msg.CocoRobo_UJSON_LOADS_MESSAGE0="解析 json 字串 %1 返回對象";A.Msg.CocoRobo_UJSON_LOADS_TOOLTIP="JSON 格式的 key 必須是字串 ,value 可以是合法的 JSON 數據類型(字串, 數字, 對象, 陣列, 布爾值或 none)";A.Msg.CocoRobo_code_annotation_HELPURL="";A.Msg.CocoRobo_code_annotation_MESSAGE0="註釋 # %1";A.Msg.CocoRobo_code_annotation_TOOLTIP="生成代碼註釋";A.Msg.TEXT_FORMAT_MESSAGE0="格式化字串 %1 % %2";A.Msg.TEXT_FORMAT_TOOLTIP='使用"%"的方式格式化字元串,並返回結果';A.Msg.TEXT_FORMAT_HELPURL="";A.Msg.TEXT_FORMAT2_MESSAGE0="格式化字串 %1 format %2";A.Msg.TEXT_FORMAT2_TOOLTIP='使用"format"的方式格式化字元串,並返回結果';A.Msg.TEXT_FORMAT2_HELPURL="";A.Msg.text_additional_delimiter_string="將字串";A.Msg.text_additional_delimiter_deli="使用分隔符:";A.Msg.text_additional_delimiter_end="進行拆分並生成陣列";A.Msg.TUPLE_CREATE_WITH_ITEMS_INSERT_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.TUPLE_CREATE_WITH_ITEMS_INSERT_TOOLTIP="正序計數從0開始,倒序計數從1開始";A.Msg.CocoRobo_TEXT_ESC_HELPURL="";A.Msg.CocoRobo_TEXT_ESC_MESSAGE0="文本轉義字元 %1 ";A.Msg.CocoRobo_TEXT_ESC_TOOLTIP="文本轉義字元";A.Msg.TEXT_IS_NUMBER_HELPURL="";A.Msg.TEXT_IS_NUMBER_TOOLTIP="判斷文本%1,並返回True或False";A.Msg.TEXT_IS_NUMBER_MESSAGE0="%1 %2";A.Msg.CocoRobo_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.CocoRobo_return_list_MESSAGE0="定義陣列 %1 = %2";A.Msg.CocoRobo_return_list_TOOLTIP="定義一個陣列";A.Msg.CocoRobo_ORDER="第";A.Msg.CocoRobo_REVERSE_ORDER="倒數第";A.Msg.LIST_ORDER_ITEM_MESSAGE0="陣列%1 %2 %3 項";A.Msg.LIST_ORDER_ITEM_TOOLTIP="正序計數從0開始,倒序計數從1開始";A.Msg.LIST_ORDER_ITEM_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.CocoRobo_lists_append_MESSAGE0="陣列%1 末尾添加項%2";A.Msg.CocoRobo_lists_append_TOOLTIP="陣列末尾添加項";A.Msg.CocoRobo_lists_append_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.LIST_ITEM_EXIST_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.LIST_ITEM_EXIST_TOOLTIP="陣列包含特定的字串";A.Msg.LIST_ITEM_EXIST_MESSAGE0="陣列%1 包含%2";A.Msg.SET_LIST_ORDER_ITEM_MESSAGE0="設陣列%1 %2 %3 項為%4";A.Msg.SET_LIST_ORDER_ITEM_TOOLTIP="正序計數從0開始,倒序計數從1開始";A.Msg.SET_LIST_ORDER_ITEM_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.INSERT_LIST_ORDER_ITEM_MESSAGE0="插入陣列%1 %2 %3 項為%4";A.Msg.INSERT_LIST_ORDER_ITEM_TOOLTIP="正序計數從0開始,倒序計數從1開始";A.Msg.INSERT_LIST_ORDER_ITEM_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.LIST_ORDER_ITEM_MESSAGE0="陣列%1 %2 %3 項";A.Msg.LIST_ORDER_ITEM_TOOLTIP="正序計數從0開始,倒序計數從1開始";A.Msg.LIST_ORDER_ITEM_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.PARTS_OF_LIST_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.PARTS_OF_LIST_TOOLTIP=`遞增順序取項
  945. 舉例:
  946. 倒數第5到倒數第2;
  947. 第0到第5`;A.Msg.PARTS_OF_LIST_MESSAGE0="返回陣列%1 取%2 %3 項到 %4 %5 項";A.Msg.LIST_TO_TUPLE_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.LIST_TO_TUPLE_TOOLTIP="陣列轉元組";A.Msg.LIST_TO_TUPLE_MESSAGE0="陣列%1 轉元組";A.Msg.CocoRobo_lists_clear_MESSAGE0="陣列%1 清空";A.Msg.CocoRobo_lists_clear_TOOLTIP="清空陣列";A.Msg.CocoRobo_lists_clear_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.CocoRobo_lists_extend_MESSAGE0="陣列%1 追加陣列%2";A.Msg.CocoRobo_lists_extend_TOOLTIP="在陣列中追加陣列";A.Msg.CocoRobo_lists_extend_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.LIST_FIRST_INDEX_HELPURL="";A.Msg.LIST_FIRST_INDEX_MESSAGE0="項 %1 在陣列 %2 %3 出現的位置";A.Msg.LIST_FIRST_INDEX_TOOLTIP="返回指定字串在陣列中%3出現的位置";A.Msg.FIRST="首次";A.Msg.LAST="最後一次";A.Msg.DICT_CREATE_WITH_ITEM_TOOLTIP="將一個項添加到字典中。";A.Msg.DICT_KEY_VALUE_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.DICT_KEY_VALUE_TOOLTIP="返回字典指定鍵的值";A.Msg.DICT_KEY_VALUE_MESSAGE0="字典%1 鍵%2 的值";A.Msg.ADD_DICT_KEY_VALUE_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.ADD_DICT_KEY_VALUE_TOOLTIP="已有該鍵則更新該鍵";A.Msg.ADD_DICT_KEY_VALUE_MESSAGE0="字典%1 添加鍵%2 值%3";A.Msg.DICT_LENGTH_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.DICT_LENGTH_TOOLTIP="返回字典的長度";A.Msg.DICT_LENGTH_MESSAGE0="字典%1 長度";A.Msg.DICT_KEY_EXIST_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.DICT_KEY_EXIST_TOOLTIP="判斷字典中是否包含指定鍵,並返回True或False";A.Msg.DICT_KEY_EXIST_MESSAGE0="字典%1 包含鍵%2";A.Msg.DICT_KEY_OR_VAL_LIST_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.DICT_KEY_OR_VAL_LIST_TOOLTIP="返回字典%2的陣列";A.Msg.DICT_KEY_OR_VAL_LIST_MESSAGE0="字典%1 %2的陣列";A.Msg.DICT_KEYS="鍵";A.Msg.DICT_VALUES="值";A.Msg.DICT_CREATE_WITH_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.DICT_CREATE_WITH_TOOLTIP="定義一個字典";A.Msg.DICT_CREATE_WITH_MESSAGE0="定義字典 %1 = %2";A.Msg.tuple_create_with_MESSAGE0="定義元組 %1 = %2 ";A.Msg.tuple_create_with_TOOLTIP="只包含一個元素時,需要在元素後面添加逗號";A.Msg.tuple_create_with_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.tuple_order_item_MESSAGE0="元組%1 %2 %3 項";A.Msg.tuple_order_item_TOOLTIP="正序計數從0開始,倒序計數從1開始";A.Msg.CocoRobo_MIN="最小值";A.Msg.CocoRobo_MAX="最大值";A.Msg.CocoRobo_LENTH="長度";A.Msg.tuple_order_item_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.TUPLE_MIN_MAX_LEN_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.TUPLE_MIN_MAX_LEN_TOOLTIP="返回元組的%2";A.Msg.TUPLE_MIN_MAX_LEN_MESSAGE0="元組 %1 %2";A.Msg.TUPLE_ITEM_EXIST_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.TUPLE_ITEM_EXIST_TOOLTIP="判斷是否包含指定值,並返回True或False";A.Msg.TUPLE_ITEM_EXIST_MESSAGE0="元組%1 包含%2";A.Msg.PARTS_OF_TUPLE_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.PARTS_OF_TUPLE_TOOLTIP="正序計數從0開始,倒序計數從1開始";A.Msg.PARTS_OF_TUPLE_MESSAGE0="返回元組%1 取第%2 項到尾項";A.Msg.PARTS_OF_TUPLE2_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.PARTS_OF_TUPLE2_TOOLTIP=`遞增順序取項
  948. 舉例:
  949. 倒數第5到倒數第2;
  950. 第0到第5`;A.Msg.PARTS_OF_TUPLE2_MESSAGE0="返回元組%1 取%2 %3 項到 %4 %5 項";A.Msg.SET_CREATE_WITH_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.SET_CREATE_WITH_TOOLTIP="定義集合";A.Msg.SET_CREATE_WITH_MESSAGE0="定義集合 %1 = %2";A.Msg.SET_UPDATE_WITH_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.SET_UPDATE_WITH_TOOLTIP="添加參數可為字串、陣列、元組、集合、字典(只添加key),已有元素則不進行操作";A.Msg.SET_UPDATE_WITH_MESSAGE0="集合 %1 添加 %2";A.Msg.INTERSECTION_OF_SETS_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.INTERSECTION_OF_SETS_TOOLTIP="返回兩集合的%1";A.Msg.INTERSECTION_OF_SETS_MESSAGE0="取 %1 集合 %2 集合 %3";A.Msg.CocoRobo_INTERSECTION="交集";A.Msg.CocoRobo_UNION="並集";A.Msg.CocoRobo_DIFFERENCE="差集";A.Msg.SETS_UPDATE_WAYS_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.SETS_UPDATE_WAYS_TOOLTIP="集合更新爲與指定集合的%3";A.Msg.SETS_UPDATE_WAYS_MESSAGE0="集合 %1 更新為 與集合 %2 的 %3";A.Msg.SUBSET_SUPERSET_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.SUBSET_SUPERSET_TOOLTIP="集合爲集合的%3";A.Msg.SUBSET_SUPERSET_MESSAGE0="集合 %1 為集合 %2 的 %3";A.Msg.CocoRobo_SUBSET="子集";A.Msg.CocoRobo_SUPERSET="超集";A.Msg.LEN_OF_SETS_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.LEN_OF_SETS_TOOLTIP="返回指定集合的長度";A.Msg.LEN_OF_SETS_MESSAGE0="集合 %1 長度";A.Msg.GET_SETS_POP_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.GET_SETS_POP_TOOLTIP="返回移除隨機項後的集合";A.Msg.GET_SETS_POP_MESSAGE0="返回隨機項並移除之 從集合 %1";A.Msg.CREATE_EMPTY_SET_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";A.Msg.CREATE_EMPTY_SET_TOOLTIP="";A.Msg.CREATE_EMPTY_SET_MESSAGE0="創建空集合 %1";A.Msg.io_high="高電平";A.Msg.io_low="低電平";A.Msg.digital_set="設定引腳 #";A.Msg.digital_set_as="爲";A.Msg.digital_get="獲取引腳 #";A.Msg.digital_get_value="的數碼訊號數值";A.Msg.digital_set_title="設置特定引腳爲指定電平";A.Msg.digital_get_value_title="返回特定引腳的數字信號數值";A.Msg.time_iot_module="IoT 模組 ";A.Msg.time_ai_module="AI 模組";A.Msg.analog_get_moudule="模組獲取引脚 #";A.Msg.analog_get_value="的類比訊號數值 (PWM)";A.Msg.set_pin="(範圍:0 ~ 1023)";A.Msg.Esp32_Main_Controller_Io_From_Analog_Pin_TOOLTIP="模組獲取特定引腳的模擬信號數值";A.Msg.time_init_timer="初始化計時器";A.Msg.time_timer_get_time="獲取計時器已過時間(毫秒)";A.Msg.time_timer_clear="清除計時器";A.Msg.time_timer_periodically="啟用週期重複計時器";A.Msg.time_timer_every="每隔";A.Msg.time_timer_ms="毫秒";A.Msg.time_execution="執行";A.Msg.time_timer_periodically_clear="清除週期重複計時器";A.Msg.time_get_current_date_title="獲取本地時間:";A.Msg.time_get_current_date_y="年";A.Msg.time_get_current_date_m="月";A.Msg.time_get_current_date_d="日";A.Msg.time_get_current_date_hour="時";A.Msg.time_get_current_date_min="分";A.Msg.time_get_current_date_sec="秒";A.Msg.serialcomm_print="序列埠打印";A.Msg.serialcomm_write_title_text="透過序列埠傳送數據至其他設備";A.Msg.serialcomm_read_setup_title_text="透過序列埠獲取數據";A.Msg.serialcomm_read_setup_title_text_1="初始化";A.Msg.serial_read_data="從";A.Msg.Serial_Read_Data_all="獲取序列埠的數據,並將其存到";A.Msg.ARD_SERIAL_RECEIVE_DATASET_GET_TEXT="獲取接收到序列埠數據中第";A.Msg.ARD_SERIAL_RECEIVE_DATASET_TYPE_TEXT="位的數據,數據型別為:";A.Msg.ARD_SERIAL_RECEIVE_DATASET_TYPE_FLOAT="浮點數";A.Msg.ARD_SERIAL_RECEIVE_DATASET_TYPE_INTEGER="Number";A.Msg.ARD_SERIAL_RECEIVE_DATASET_TYPE_STRING="字元";A.Msg.serialcomm_write_item_first="第 ";A.Msg.serialcomm_write_item_last=" 位數據:";A.Msg.serialcomm_write_item="項目";A.Msg.serialcomm_write_data="數據";A.Msg.serialcomm_write_data_bps_title="設定波特率為:";A.Msg.serialcomm_write_data_bps_attrib="位元/秒";A.Msg.serialcomm_write_on="使用";A.Msg.serialcomm_write_on_ai="AI 模組";A.Msg.serialcomm_write_on_iot="IoT 模組";A.Msg.serialcomm_write_on_iot_lite="IoT Lite 模組";A.Msg.serial_send_data_on="在";A.Msg.serial_send_data_on_send_data="模組上載送數據至 Microbit";A.Msg.serial_new_send_data="序列埠寫入文本";A.Msg.serial_new_send_data_1="不換行";A.Msg.serial_new_send_data_2="自動換行";A.Msg.serial_new_send_data_3="序列埠寫入單字節";A.Msg.serial_new_send_data_4="序列埠寫入字節陣列";A.Msg.serial_new_get_data_1="序列埠有可讀數據";A.Msg.serial_new_get_data_2="序列埠讀取一行數據";A.Msg.serial_new_get_data_3="序列埠讀取數據";A.Msg.serial_new_get_data_4="序列埠讀取數據長度爲";A.Msg.serial_close="關閉序列埠";A.Msg.SYSTEM="重啟系統";A.Msg.SYSTEM_GC="啟動記憶體回收";A.Msg.SYSTEM_RUN="執行 Python 程式";A.Msg.SYSTEM_RUN_F="程式所在路徑:";A.Msg.SYSTEM_CREATE="創建文本檔案";A.Msg.SYSTEM_CREATE_FILE="創建檔案";A.Msg.SYSTEM_CREATE_F="檔名:";A.Msg.SYSTEM_CREATE_F_1="檔案路徑爲:";A.Msg.SYSTEM_WRITE="創建文本檔案";A.Msg.SYSTEM_OPEN_FILE="打開檔案";A.Msg.SYSTEM_WRITE_FILE="寫入檔案";A.Msg.SYSTEM_CLOSE_FILE="關閉檔案";A.Msg.SYSTEM_WRITE_F="檔案名稱:";A.Msg.SYSTEM_WRITE_W="寫入內容:";A.Msg.SYSTEM_WRITE_S="分隔符號為:";A.Msg.SYSTEM_WRITE_S_N="換欄";A.Msg.SYSTEM_WRITE_S_C="逗號";A.Msg.SYSTEM_WRITE_S_S="空格";A.Msg.SYSTEM_WRITE_S_SE="分號";A.Msg.SYSTEM_INPUT="讀取文本檔案為陣列";A.Msg.SYSTEM_INPUT_FILE="讀取檔案為陣列";const L7=A.Msg;var W=W||{Msg:Object.create(null)};W.Msg.catLogic="Logic";W.Msg.catLoops="Loops";W.Msg.catMath="Math";W.Msg.catText="Text";W.Msg.catVariables="Variables";W.Msg.catLists="Lists";W.Msg.catDictionary="Dictionary";W.Msg.catTuples="Tuples";W.Msg.catSet="Sets";W.Msg.catFunctions="Functions";W.Msg.catOutput="Output";W.Msg.catFiles="File";W.Msg.ADD_COMMENT="Add Comment";W.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE="Can't delete the variable '%1' because it's part of the definition of the function '%2'";W.Msg.CHANGE_VALUE_TITLE="Change value:";W.Msg.CLEAN_UP="Clean up Blocks";W.Msg.COLLAPSED_WARNINGS_WARNING="Collapsed blocks contain warnings.";W.Msg.COLLAPSE_ALL="Collapse Blocks";W.Msg.COLLAPSE_BLOCK="Collapse Block";W.Msg.COLOUR_BLEND_COLOUR1="colour 1";W.Msg.COLOUR_BLEND_COLOUR2="colour 2";W.Msg.COLOUR_BLEND_HELPURL="https://meyerweb.com/eric/tools/color-blend/#:::rgbp";W.Msg.COLOUR_BLEND_RATIO="ratio";W.Msg.COLOUR_BLEND_TITLE="blend";W.Msg.COLOUR_BLEND_TOOLTIP="Blends two colours together with a given ratio (0.0 - 1.0).";W.Msg.COLOUR_PICKER_HELPURL="https://en.wikipedia.org/wiki/Color";W.Msg.COLOUR_PICKER_TOOLTIP="Choose a colour from the palette.";W.Msg.COLOUR_RANDOM_HELPURL="http://randomcolour.com";W.Msg.COLOUR_RANDOM_TITLE="random colour";W.Msg.COLOUR_RANDOM_TOOLTIP="Choose a colour at random.";W.Msg.COLOUR_RGB_BLUE="blue";W.Msg.COLOUR_RGB_GREEN="green";W.Msg.COLOUR_RGB_HELPURL="https://www.december.com/html/spec/colorpercompact.html";W.Msg.COLOUR_RGB_RED="red";W.Msg.COLOUR_RGB_TITLE="colour with";W.Msg.COLOUR_RGB_TOOLTIP="Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100.";W.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL="https://github.com/google/blockly/wiki/Loops#loop-termination-blocks";W.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK="break out of loop";W.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE="continue with next iteration of loop";W.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK="Break out of the containing loop.";W.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE="Skip the rest of this loop, and continue with the next iteration.";W.Msg.CONTROLS_FLOW_STATEMENTS_WARNING="Warning: This block may only be used within a loop.";W.Msg.CONTROLS_FOREACH_HELPURL="https://github.com/google/blockly/wiki/Loops#for-each";W.Msg.CONTROLS_FOREACH_TITLE="for each item %1 in list %2";W.Msg.CONTROLS_FOREACH_TOOLTIP="For each item in a list, set the variable '%1' to the item, and then do some statements.";W.Msg.CONTROLS_FOR_HELPURL="https://github.com/google/blockly/wiki/Loops#count-with";W.Msg.CONTROLS_FOR_TITLE="count with %1 from %2 to %3 by %4";W.Msg.CONTROLS_FOR_TOOLTIP="Have the variable '%1' take on the values from the start number to the end number, counting by the specified interval, and do the specified blocks.";W.Msg.CONTROLS_IF_ELSEIF_TOOLTIP="Add a condition to the if block.";W.Msg.CONTROLS_IF_ELSE_TOOLTIP="Add a final, catch-all condition to the if block.";W.Msg.CONTROLS_IF_HELPURL="https://github.com/google/blockly/wiki/IfElse";W.Msg.CONTROLS_IF_IF_TOOLTIP="Add, remove, or reorder sections to reconfigure this if block.";W.Msg.CONTROLS_IF_MSG_ELSE="else";W.Msg.CONTROLS_IF_MSG_ELSEIF="else if";W.Msg.CONTROLS_IF_MSG_IF="if";W.Msg.CONTROLS_IF_TOOLTIP_1="If a value is true, then do some statements.";W.Msg.CONTROLS_IF_TOOLTIP_2="If a value is true, then do the first block of statements. Otherwise, do the second block of statements.";W.Msg.CONTROLS_IF_TOOLTIP_3="If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements.";W.Msg.CONTROLS_IF_TOOLTIP_4="If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements. If none of the values are true, do the last block of statements.";W.Msg.CONTROLS_REPEAT_HELPURL="https://en.wikipedia.org/wiki/For_loop";W.Msg.CONTROLS_REPEAT_INPUT_DO="do";W.Msg.CONTROLS_REPEAT_TITLE="repeat %1 times";W.Msg.CONTROLS_REPEAT_TOOLTIP="Do some statements several times.";W.Msg.CONTROLS_WHILEUNTIL_HELPURL="https://github.com/google/blockly/wiki/Loops#repeat";W.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL="repeat until";W.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE="repeat while";W.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL="While a value is false, then do some statements.";W.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE="While a value is true, then do some statements.";W.Msg.DELETE_ALL_BLOCKS="Delete all %1 blocks?";W.Msg.DELETE_BLOCK="Delete Block";W.Msg.DELETE_VARIABLE="Delete the '%1' variable";W.Msg.DELETE_VARIABLE_CONFIRMATION="Delete %1 uses of the '%2' variable?";W.Msg.DELETE_X_BLOCKS="Delete %1 Blocks";W.Msg.DIALOG_CANCEL="Cancel";W.Msg.DIALOG_OK="OK";W.Msg.DISABLE_BLOCK="Disable Block";W.Msg.DUPLICATE_BLOCK="Duplicate";W.Msg.DUPLICATE_COMMENT="Duplicate Comment";W.Msg.ENABLE_BLOCK="Enable Block";W.Msg.EXPAND_ALL="Expand Blocks";W.Msg.EXPAND_BLOCK="Expand Block";W.Msg.EXTERNAL_INPUTS="External Inputs";W.Msg.HELP="Help";W.Msg.LOGIC_BOOLEAN_FALSE="false";W.Msg.LOGIC_BOOLEAN_HELPURL="https://github.com/google/blockly/wiki/Logic#values";W.Msg.LOGIC_BOOLEAN_TOOLTIP="Returns either true or false.";W.Msg.LOGIC_BOOLEAN_TRUE="true";W.Msg.LOGIC_COMPARE_HELPURL="https://en.wikipedia.org/wiki/Inequality_(mathematics)";W.Msg.LOGIC_COMPARE_TOOLTIP_EQ="Return true if both inputs equal each other.";W.Msg.LOGIC_COMPARE_TOOLTIP_GT="Return true if the first input is greater than the second input.";W.Msg.LOGIC_COMPARE_TOOLTIP_GTE="Return true if the first input is greater than or equal to the second input.";W.Msg.LOGIC_COMPARE_TOOLTIP_LT="Return true if the first input is smaller than the second input.";W.Msg.LOGIC_COMPARE_TOOLTIP_LTE="Return true if the first input is smaller than or equal to the second input.";W.Msg.LOGIC_COMPARE_TOOLTIP_NEQ="Return true if both inputs are not equal to each other.";W.Msg.LOGIC_NEGATE_HELPURL="https://github.com/google/blockly/wiki/Logic#not";W.Msg.LOGIC_NEGATE_TITLE="not %1";W.Msg.LOGIC_NEGATE_TOOLTIP="Returns true if the input is false. Returns false if the input is true.";W.Msg.LOGIC_NULL="null";W.Msg.LOGIC_NULL_HELPURL="https://en.wikipedia.org/wiki/Nullable_type";W.Msg.LOGIC_NULL_TOOLTIP="Returns null.";W.Msg.LOGIC_OPERATION_AND="and";W.Msg.LOGIC_OPERATION_HELPURL="https://github.com/google/blockly/wiki/Logic#logical-operations";W.Msg.LOGIC_OPERATION_OR="or";W.Msg.LOGIC_OPERATION_TOOLTIP_AND="Return true if both inputs are true.";W.Msg.LOGIC_OPERATION_TOOLTIP_OR="Return true if at least one of the inputs is true.";W.Msg.LOGIC_TERNARY_CONDITION="test";W.Msg.LOGIC_TERNARY_HELPURL="https://en.wikipedia.org/wiki/%3F:";W.Msg.LOGIC_TERNARY_IF_FALSE="if false";W.Msg.LOGIC_TERNARY_IF_TRUE="if true";W.Msg.LOGIC_TERNARY_TOOLTIP="Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value.";W.Msg.MATH_ADDITION_SYMBOL="+";W.Msg.MATH_ARITHMETIC_HELPURL="https://en.wikipedia.org/wiki/Arithmetic";W.Msg.MATH_ARITHMETIC_TOOLTIP_ADD="Return the sum of the two numbers.";W.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE="Return the quotient of the two numbers.";W.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS="Return the difference of the two numbers.";W.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY="Return the product of the two numbers.";W.Msg.MATH_ARITHMETIC_TOOLTIP_POWER="Return the first number raised to the power of the second number.";W.Msg.MATH_ATAN2_HELPURL="https://en.wikipedia.org/wiki/Atan2";W.Msg.MATH_ATAN2_TITLE="atan2 of X:%1 Y:%2";W.Msg.MATH_ATAN2_TOOLTIP="Return the arctangent of point (X, Y) in degrees from -180 to 180.";W.Msg.MATH_CHANGE_HELPURL="https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter";W.Msg.MATH_CHANGE_TITLE="change %1 by %2";W.Msg.MATH_CHANGE_TOOLTIP="Add a number to variable '%1'.";W.Msg.MATH_CONSTANT_HELPURL="https://en.wikipedia.org/wiki/Mathematical_constant";W.Msg.MATH_CONSTANT_TOOLTIP="Return one of the common constants: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity).";W.Msg.MATH_CONSTRAIN_HELPURL="https://en.wikipedia.org/wiki/Clamping_(graphics)";W.Msg.MATH_CONSTRAIN_TITLE="constrain %1 low %2 high %3";W.Msg.MATH_CONSTRAIN_TOOLTIP="Constrain a number to be between the specified limits (inclusive).";W.Msg.MATH_DIVISION_SYMBOL="÷";W.Msg.MATH_IS_DIVISIBLE_BY="is divisible by";W.Msg.MATH_IS_EVEN="is even";W.Msg.MATH_IS_NEGATIVE="is negative";W.Msg.MATH_IS_ODD="is odd";W.Msg.MATH_IS_POSITIVE="is positive";W.Msg.MATH_IS_PRIME="is prime";W.Msg.MATH_IS_TOOLTIP="Check if a number is an even, odd, prime, whole, positive, negative, or if it is divisible by certain number. Returns true or false.";W.Msg.MATH_IS_WHOLE="is whole";W.Msg.MATH_MODULO_HELPURL="https://en.wikipedia.org/wiki/Modulo_operation";W.Msg.MATH_MODULO_TITLE="remainder of %1 ÷ %2";W.Msg.MATH_MODULO_TOOLTIP="Return the remainder from dividing the two numbers.";W.Msg.MATH_MULTIPLICATION_SYMBOL="×";W.Msg.MATH_NUMBER_HELPURL="https://en.wikipedia.org/wiki/Number";W.Msg.MATH_NUMBER_TOOLTIP="A number.";W.Msg.MATH_ONLIST_HELPURL="";W.Msg.MATH_ONLIST_OPERATOR_AVERAGE="average of list";W.Msg.MATH_ONLIST_OPERATOR_MAX="max of list";W.Msg.MATH_ONLIST_OPERATOR_MEDIAN="median of list";W.Msg.MATH_ONLIST_OPERATOR_MIN="min of list";W.Msg.MATH_ONLIST_OPERATOR_MODE="modes of list";W.Msg.MATH_ONLIST_OPERATOR_RANDOM="random item of list";W.Msg.MATH_ONLIST_OPERATOR_STD_DEV="standard deviation of list";W.Msg.MATH_ONLIST_OPERATOR_SUM="sum of list";W.Msg.MATH_ONLIST_TOOLTIP_AVERAGE="Return the average (arithmetic mean) of the numeric values in the list.";W.Msg.MATH_ONLIST_TOOLTIP_MAX="Return the largest number in the list.";W.Msg.MATH_ONLIST_TOOLTIP_MEDIAN="Return the median number in the list.";W.Msg.MATH_ONLIST_TOOLTIP_MIN="Return the smallest number in the list.";W.Msg.MATH_ONLIST_TOOLTIP_MODE="Return a list of the most common item(s) in the list.";W.Msg.MATH_ONLIST_TOOLTIP_RANDOM="Return a random element from the list.";W.Msg.MATH_ONLIST_TOOLTIP_STD_DEV="Return the standard deviation of the list.";W.Msg.MATH_ONLIST_TOOLTIP_SUM="Return the sum of all the numbers in the list.";W.Msg.MATH_POWER_SYMBOL="^";W.Msg.MATH_RANDOM_FLOAT_HELPURL="https://en.wikipedia.org/wiki/Random_number_generation";W.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM="random fraction";W.Msg.MATH_RANDOM_FLOAT_TOOLTIP="Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive).";W.Msg.MATH_RANDOM_INT_HELPURL="https://en.wikipedia.org/wiki/Random_number_generation";W.Msg.MATH_RANDOM_INT_TITLE="random integer from %1 to %2";W.Msg.MATH_RANDOM_INT_TOOLTIP="Return a random integer between the two specified limits, inclusive.";W.Msg.MATH_ROUND_HELPURL="https://en.wikipedia.org/wiki/Rounding";W.Msg.MATH_ROUND_OPERATOR_ROUND="round";W.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN="round down";W.Msg.MATH_ROUND_OPERATOR_ROUNDUP="round up";W.Msg.MATH_ROUND_TOOLTIP="Round a number up or down.";W.Msg.MATH_SINGLE_HELPURL="https://en.wikipedia.org/wiki/Square_root";W.Msg.MATH_SINGLE_OP_ABSOLUTE="absolute";W.Msg.MATH_SINGLE_OP_ROOT="square root";W.Msg.MATH_SINGLE_TOOLTIP_ABS="Return the absolute value of a number.";W.Msg.MATH_SINGLE_TOOLTIP_EXP="Return e to the power of a number.";W.Msg.MATH_SINGLE_TOOLTIP_LN="Return the natural logarithm of a number.";W.Msg.MATH_SINGLE_TOOLTIP_LOG10="Return the base 10 logarithm of a number.";W.Msg.MATH_SINGLE_TOOLTIP_NEG="Return the negation of a number.";W.Msg.MATH_SINGLE_TOOLTIP_POW10="Return 10 to the power of a number.";W.Msg.MATH_SINGLE_TOOLTIP_ROOT="Return the square root of a number.";W.Msg.MATH_SUBTRACTION_SYMBOL="-";W.Msg.MATH_TRIG_ACOS="acos";W.Msg.MATH_TRIG_ASIN="asin";W.Msg.MATH_TRIG_ATAN="atan";W.Msg.MATH_TRIG_COS="cos";W.Msg.MATH_TRIG_HELPURL="https://en.wikipedia.org/wiki/Trigonometric_functions";W.Msg.MATH_TRIG_SIN="sin";W.Msg.MATH_TRIG_TAN="tan";W.Msg.MATH_TRIG_TOOLTIP_ACOS="Return the arccosine of a number.";W.Msg.MATH_TRIG_TOOLTIP_ASIN="Return the arcsine of a number.";W.Msg.MATH_TRIG_TOOLTIP_ATAN="Return the arctangent of a number.";W.Msg.MATH_TRIG_TOOLTIP_COS="Return the cosine of a degree (not radian).";W.Msg.MATH_TRIG_TOOLTIP_SIN="Return the sine of a degree (not radian).";W.Msg.MATH_TRIG_TOOLTIP_TAN="Return the tangent of a degree (not radian).";W.Msg.NEW_COLOUR_VARIABLE="Create colour variable...";W.Msg.NEW_NUMBER_VARIABLE="Create number variable...";W.Msg.NEW_STRING_VARIABLE="Create string variable...";W.Msg.NEW_VARIABLE="Create variable...";W.Msg.NEW_VARIABLE_TITLE="New variable name:";W.Msg.NEW_VARIABLE_TYPE_TITLE="New variable type:";W.Msg.ORDINAL_NUMBER_SUFFIX="";W.Msg.REDO="Redo";W.Msg.REMOVE_COMMENT="Remove Comment";W.Msg.RENAME_VARIABLE="Rename variable...";W.Msg.RENAME_VARIABLE_TITLE="Rename all '%1' variables to:";W.Msg.TEXT_APPEND_HELPURL="https://github.com/google/blockly/wiki/Text#text-modification";W.Msg.TEXT_APPEND_TITLE="to %1 append text %2";W.Msg.TEXT_APPEND_TOOLTIP="Append some text to variable '%1'.";W.Msg.TEXT_CHANGECASE_HELPURL="https://github.com/google/blockly/wiki/Text#adjusting-text-case";W.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE="to lower case";W.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE="to Title Case";W.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE="to UPPER CASE";W.Msg.TEXT_CHANGECASE_TOOLTIP="Return a copy of the text in a different case.";W.Msg.TEXT_CHARAT_FIRST="get first letter";W.Msg.TEXT_CHARAT_FROM_END="get letter # from end";W.Msg.TEXT_CHARAT_FROM_START="get letter #";W.Msg.TEXT_CHARAT_HELPURL="https://github.com/google/blockly/wiki/Text#extracting-text";W.Msg.TEXT_CHARAT_LAST="get last letter";W.Msg.TEXT_CHARAT_RANDOM="get random letter";W.Msg.TEXT_CHARAT_TAIL="";W.Msg.TEXT_CHARAT_TITLE="in text %1 %2";W.Msg.TEXT_CHARAT_TOOLTIP="Returns the letter at the specified position.";W.Msg.TEXT_COUNT_HELPURL="https://github.com/google/blockly/wiki/Text#counting-substrings";W.Msg.TEXT_COUNT_MESSAGE0="count %1 in %2";W.Msg.TEXT_COUNT_TOOLTIP="Count how many times some text occurs within some other text.";W.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP="Add an item to the text.";W.Msg.TEXT_CREATE_JOIN_TITLE_JOIN="join";W.Msg.TEXT_CREATE_JOIN_TOOLTIP="Add, remove, or reorder sections to reconfigure this text block.";W.Msg.TEXT_GET_SUBSTRING_END_FROM_END="to letter # from end";W.Msg.TEXT_GET_SUBSTRING_END_FROM_START="to letter #";W.Msg.TEXT_GET_SUBSTRING_END_LAST="to last letter";W.Msg.TEXT_GET_SUBSTRING_HELPURL="https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text";W.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT="in text";W.Msg.TEXT_GET_SUBSTRING_START_FIRST="get substring from first letter";W.Msg.TEXT_GET_SUBSTRING_START_FROM_END="get substring from letter # from end";W.Msg.TEXT_GET_SUBSTRING_START_FROM_START="get substring from letter #";W.Msg.TEXT_GET_SUBSTRING_TAIL="";W.Msg.TEXT_GET_SUBSTRING_TOOLTIP="Returns a specified portion of the text.";W.Msg.TEXT_INDEXOF_HELPURL="https://github.com/google/blockly/wiki/Text#finding-text";W.Msg.TEXT_INDEXOF_OPERATOR_FIRST="find first occurrence of text";W.Msg.TEXT_INDEXOF_OPERATOR_LAST="find last occurrence of text";W.Msg.TEXT_INDEXOF_TITLE="in text %1 %2 %3";W.Msg.TEXT_INDEXOF_TOOLTIP="Returns the index of the first/last occurrence of the first text in the second text. Returns %1 if text is not found.";W.Msg.TEXT_ISEMPTY_HELPURL="https://github.com/google/blockly/wiki/Text#checking-for-empty-text";W.Msg.TEXT_ISEMPTY_TITLE="%1 is empty";W.Msg.TEXT_ISEMPTY_TOOLTIP="Returns true if the provided text is empty.";W.Msg.TEXT_JOIN_HELPURL="https://github.com/google/blockly/wiki/Text#text-creation";W.Msg.TEXT_JOIN_TITLE_CREATEWITH="create text with";W.Msg.TEXT_JOIN_TOOLTIP="Create a piece of text by joining together any number of items.";W.Msg.TEXT_LENGTH_HELPURL="https://github.com/google/blockly/wiki/Text#text-modification";W.Msg.TEXT_LENGTH_TITLE="length of %1";W.Msg.TEXT_LENGTH_TOOLTIP="Returns the number of letters (including spaces) in the provided text.";W.Msg.TEXT_PRINT_HELPURL="https://github.com/google/blockly/wiki/Text#printing-text";W.Msg.TEXT_PRINT_TITLE="print %1";W.Msg.TEXT_PRINT_TOOLTIP="Print the specified text, number or other value.";W.Msg.TEXT_PROMPT_HELPURL="https://github.com/google/blockly/wiki/Text#getting-input-from-the-user";W.Msg.TEXT_PROMPT_TOOLTIP_NUMBER="Prompt for user for a number.";W.Msg.TEXT_PROMPT_TOOLTIP_TEXT="Prompt for user for some text.";W.Msg.TEXT_PROMPT_TYPE_NUMBER="prompt for number with message";W.Msg.TEXT_PROMPT_TYPE_TEXT="prompt for text with message";W.Msg.TEXT_REPLACE_HELPURL="https://github.com/google/blockly/wiki/Text#replacing-substrings";W.Msg.TEXT_REPLACE_MESSAGE0="replace %1 with %2 in %3";W.Msg.TEXT_REPLACE_TOOLTIP="Replace all occurances of some text within some other text.";W.Msg.TEXT_REVERSE_HELPURL="https://github.com/google/blockly/wiki/Text#reversing-text";W.Msg.TEXT_REVERSE_MESSAGE0="reverse %1";W.Msg.TEXT_REVERSE_TOOLTIP="Reverses the order of the characters in the text.";W.Msg.TEXT_TEXT_HELPURL="https://en.wikipedia.org/wiki/String_(computer_science)";W.Msg.TEXT_TEXT_TOOLTIP="A letter, word, or line of text.";W.Msg.TEXT_TRIM_HELPURL="https://github.com/google/blockly/wiki/Text#trimming-removing-spaces";W.Msg.TEXT_TRIM_OPERATOR_BOTH="trim spaces from both sides of";W.Msg.TEXT_TRIM_OPERATOR_LEFT="trim spaces from left side of";W.Msg.TEXT_TRIM_OPERATOR_RIGHT="trim spaces from right side of";W.Msg.TEXT_TRIM_TOOLTIP="Return a copy of the text with spaces removed from one or both ends.";W.Msg.TODAY="Today";W.Msg.UNDO="Undo";W.Msg.UNNAMED_KEY="unnamed";W.Msg.VARIABLES_DEFAULT_NAME="item";W.Msg.VARIABLES_GET_CREATE_SET="Create 'set %1'";W.Msg.VARIABLES_GET_HELPURL="https://github.com/google/blockly/wiki/Variables#get";W.Msg.VARIABLES_GET_TOOLTIP="Returns the value of this variable.";W.Msg.VARIABLES_SET="set %1 to %2";W.Msg.VARIABLES_SET_CREATE_GET="Create 'get %1'";W.Msg.VARIABLES_SET_HELPURL="https://github.com/google/blockly/wiki/Variables#set";W.Msg.VARIABLES_SET_TOOLTIP="Sets this variable to be equal to the input.";W.Msg.VARIABLE_ALREADY_EXISTS="A variable named '%1' already exists.";W.Msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE="A variable named '%1' already exists for another type: '%2'.";W.Msg.WORKSPACE_ARIA_LABEL="Blockly Workspace";W.Msg.WORKSPACE_COMMENT_DEFAULT_TEXT="Say something...";W.Msg.TEXT_IS_NUMBER_HELPURL="";W.Msg.TEXT_IS_NUMBER_TOOLTIP="Judge the text %1 and return True or False";W.Msg.TEXT_IS_NUMBER_MESSAGE0="%1 %2";W.Msg.TEXT_IS_DIGIT="Is number";W.Msg.TEXT_IS_ALPHA="Is letter";W.Msg.TEXT_IS_ALNUM="Is mix of numbers and letters";W.Msg.REDO="Redo";W.Msg.UNDO="Undo";W.Msg.DELETE_VARIABLE='Delete "%1" variable';W.Msg.DELETE_VARIABLE_CONFIRMATION='Delete %1 of the "%2" variable?';W.Msg.CONTROLS_REPEAT_FOREVER="Repeat forever";W.Msg.CONTROLS_REPEAT_FOREVER_TOOLTIP="Do some statements forever times";W.Msg.TEXT_LIST_START="Create list [";W.Msg.TEXT_LIST_END="]";W.Msg.TEXT_TUPLE_START="Create tuple (";W.Msg.TEXT_TUPLE_END=")";W.Msg.TEXT_DICT_START="Create dictionary {";W.Msg.TEXT_DICT_END="}";W.Msg.TEXT_SET_START="Create set {";W.Msg.TEXT_SET_END="}";W.Msg.TEXT_SET_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/index.html";W.Msg.TUPLE_CREATE_EMPTY_TITLE="Create empty tuple";W.Msg.DICT_CREATE_EMPTY_TITLE="Create empty dictionary";W.Msg.SET_CREATE_EMPTY_TITLE="Create empty sets";W.Msg.TUPLE_CREATE_WITH_CONTAINER_TITLE_ADD="Tuple";W.Msg.DICT_CREATE_WITH_CONTAINER_TITLE_ADD="Dictionary";W.Msg.SET_CREATE_WITH_CONTAINER_TITLE_ADD="Sets";W.Msg.TUPLE_CREATE_WITH_CONTAINER_TOOLTIP="Add, remove, or rearrange sections to reconfigure this tuple block.";W.Msg.DICT_CREATE_WITH_CONTAINER_TOOLTIP="Add, remove, or rearrange sections to reconfigure this dictionary block.";W.Msg.TUPLE_CREATE_WITH_INPUT_WITH="Create tuple with";W.Msg.DICT_CREATE_WITH_INPUT_WITH="Create dictionary with";W.Msg.SET_CREATE_WITH_INPUT_WITH="Create sets with";W.Msg.TUPLE_CREATE_WITH_ITEM_TOOLTIP="Add an item to the tuple.";W.Msg.DICT_CREATE_WITH_ITEM_TOOLTIP="Add an item to the dictionary.";W.Msg.SET_CREATE_WITH_ITEM_TOOLTIP="Add an item to the sets.";W.Msg.LISTS_SORT_HELPURL="https://github.com/google/blockly/wiki/Lists#sorting-a-list";W.Msg.LISTS_SORT_ORDER_ASCENDING="Ascending";W.Msg.LISTS_SORT_ORDER_DESCENDING="Descending";W.Msg.LISTS_SORT_TITLE="Sort %1 %2 %3";W.Msg.LISTS_SORT_TOOLTIP="Sort a copy of a list.";W.Msg.LISTS_SORT_TYPE_IGNORECASE="By letter, ignore case";W.Msg.LISTS_SORT_TYPE_NUMERIC="By number";W.Msg.LISTS_SORT_TYPE_TEXT="By letter";W.Msg.labplus_mapping_MESSAGE0="Map %1 from %2 , %3 to %4 , %5";W.Msg.labplus_mapping_TOOLTIP="Map 10 of 0~100 to 0~200 and return the mapped value";W.Msg.labplus_mapping_HELPURL="";W.Msg.CocoRobo_OPEN="On";W.Msg.CocoRobo_CLOSE="Off";W.Msg.CocoRoboBOX_RGB_IMAGE_SHIFT_LEFT="Shift left";W.Msg.CocoRoboBOX_RGB_IMAGE_SHIFT_RIGHT="Shift right";W.Msg.CocoRoboBOX_RGB_IMAGE_SHIFT_UP="Shift up";W.Msg.CocoRoboBOX_RGB_IMAGE_SHIFT_DOWN="Shift down";W.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_HEAT_GRAYSCALE="Grayscale";W.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_HEAT_RAINBOW="Rainbow";W.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_HEAT_NEGATE="Negate";W.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_HEAT_INVERT="Invert";W.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_DESCARTES_LINPOLAR="Line polar";W.Msg.CocoRobo_AI_LCD_SHOW_IMAGE_DESCARTES_LOGPOLAR="Log polar";W.Msg.CocoRobo_AI_SENSOR_PATTERN_GRAYSCALE="Grayscale";W.Msg.CocoRobo_AI_SENSOR_PATTERN_COLOR="Color";W.Msg.CocoRobo_AI_SENSOR_ENABLE_START="Start capturing image";W.Msg.CocoRobo_AI_SENSOR_ENABLE_STOP="Stop capturing image";W.Msg.CocoRobo_AI_SENSOR_LEVEL_MI_H="Horizontal mirror";W.Msg.CocoRobo_AI_SENSOR_LEVEL_MI_V="Vertical flip";W.Msg.CocoRobo_AI_SENSOR_SETS_CONTRAST="Contrast";W.Msg.CocoRobo_AI_SENSOR_SETS_BRIGHTNESS="Brightness";W.Msg.CocoRobo_AI_SENSOR_SETS_SATURATION="Saturation";W.Msg.CocoRobo_AI2_FACE_YOLO="FACE YOLO";W.Msg.CocoRobo_AI2_CLASS_20_YOLO="CLASS 20 YOLO";W.Msg.CocoRobo_AI_TRACE_COLOR_RECTANGLE="Rectangle";W.Msg.CocoRobo_AI_TRACE_COLOR_CROSS="Cross";W.Msg.TEXT_APPEND_TEXT_HELPURL="";W.Msg.TEXT_APPEND_TEXT_TOOLTIP="Append text after the specified text and return the result";W.Msg.TEXT_APPEND_TEXT_MESSAGE0="%1 append text %2";W.Msg.CocoRobo_RETURN_TOOLTIP="Return a value";W.Msg.CocoRobo_RETURN_MESSAGE0="Return %1";W.Msg.CocoRobo_TYPE_MESSAGE0="Type %1";W.Msg.CocoRobo_TYPE_TOOLTIP="Returns the type of the current value";W.Msg.CocoRobo_TYPE_IS_MESSAGE0="Type %1 is %2";W.Msg.CocoRobo_TYPE_IS_TOOLTIP="Set the type of the current value to %2 and return the result";W.Msg.CocoRobo_EVAL_HELPURL="";W.Msg.CocoRobo_EVAL_MESSAGE0="Eval %1";W.Msg.CocoRobo_EVAL_TOOLTIP="Simulate a string expression and return the result";W.Msg.CocoRobo_RETURN_HELPURL="";W.Msg.CocoRobo_RETURN_MESSAGE0="Return %1";W.Msg.CocoRobo_RETURN_TOOLTIP="Return a value";W.Msg.math_degrad_rad="Convert Degrees to Radians";W.Msg.math_degrad_deg="Convert Radians to Degrees";W.Msg.MATH_KEEP_DECIMAL_HELPURL="";W.Msg.MATH_KEEP_DECIMAL_TOOLTIP="Returns the result of the specified value keeping the decimal point";W.Msg.MATH_KEEP_DECIMAL_MESSAGE0="%1 keep %2 decimal places";W.Msg.labplus_mapping_MESSAGE0="Map %1 from %2 , %3 to %4 , %5";W.Msg.labplus_mapping_TOOLTIP="Map 10 of 0~100 to 0~200 and return the mapped value";W.Msg.labplus_mapping_HELPURL="";W.Msg.MATH_RANDOM_RANDRANGE_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.MATH_RANDOM_RANDRANGE_TOOLTIP="Returns a random number in the specified incremental cardinality set, the base value defaults to 1";W.Msg.MATH_RANDOM_RANDRANGE_MESSAGE0="Random number increments from increment interval [%1 , %2) by step %3";W.Msg.BIT_INVERSION_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.BIT_INVERSION_TOOLTIP="Reverse each binary bit of data";W.Msg.BIT_INVERSION_MESSAGE0="Invert each binary bit of the data %1";W.Msg.CocoRobo_TEN_CONVERT_TO_HELPURL="";W.Msg.CocoRobo_TEN_CONVERT_TO_MESSAGE0="Decimal int num %1 converted to %2 string";W.Msg.CocoRobo_TEN_CONVERT_TO_TOOLTIP="Convert a decimal integer to a %2 string and return the result";W.Msg.MATH_DIVISION_CONSULT_HELPURL="";W.Msg.MATH_DIVISION_CONSULT_TITLE="The integer part of the quotient %1 ÷ %2";W.Msg.MATH_DIVISION_CONSULT_TOOLTIP="Returns the integer part of the quotient of two numbers";W.Msg.MATH_CONVERT_MESSAGE0="%1 %2";W.Msg.MATH_NUMBER_BITS_OPS_MESSAGE0="%1 %2 %3";W.Msg.CocoRobo_LOCK_OBJECT_ACQUIRE_LOCK_HELPURL="";W.Msg.CocoRobo_LOCK_OBJECT_ACQUIRE_LOCK_MESSAGE0="Thread lock object %1 requests lock";W.Msg.CocoRobo_LOCK_OBJECT_ACQUIRE_LOCK_TOOLTIP="";W.Msg.CocoRobo_START_NEW_THREAD_HELPURL="";W.Msg.CocoRobo_START_NEW_THREAD_MESSAGE0="Thread %1";W.Msg.CocoRobo_START_NEW_THREAD_TOOLTIP="";W.Msg.TEXT_FORMAT_MESSAGE0="Format string %1 % %2";W.Msg.TEXT_FORMAT_TOOLTIP='Use "%" to format the string and return the result';W.Msg.TEXT_FORMAT_HELPURL="";W.Msg.TEXT_FORMAT2_MESSAGE0="Format string %1 with %2";W.Msg.TEXT_FORMAT2_TOOLTIP='Use "format" to format the string and return the result';W.Msg.TEXT_FORMAT2_HELPURL="";W.Msg.CocoRobo_BAUDRATE_HELPURL="";W.Msg.CocoRobo_BAUDRATE_MESSAGE0="%1";W.Msg.CocoRobo_BAUDRATE_TOOLTIP="";W.Msg.CocoRobo_HIGH_LOW_HELPURL="";W.Msg.CocoRobo_HIGH_LOW_MESSAGE0="%1";W.Msg.CocoRobo_HIGH_LOW_TOOLTIP="";W.Msg.CocoRobo_TEN_CONVERT_TO_HELPURL="";W.Msg.CocoRobo_TEN_CONVERT_TO_MESSAGE0="Decimal int num %1 converted to %2 string";W.Msg.CocoRobo_TEN_CONVERT_TO_TOOLTIP="Convert a decimal integer to a %2 string and return the result";W.Msg.CocoRobo_BIN="BIN";W.Msg.CocoRobo_OCT="OCT";W.Msg.CocoRobo_HEX="HEX";W.Msg.CocoRobo_CONVERT_TO_TEN_HELPURL="";W.Msg.CocoRobo_CONVERT_TO_TEN_MESSAGE0="%1 string %2 converted to decimal int num";W.Msg.CocoRobo_CONVERT_TO_TEN_TOOLTIP="Convert a %2 string to a decimal integer and return the result";W.Msg.CocoRobo_TEN_CONVERTED_TO_BYTES_HELPURL="";W.Msg.CocoRobo_TEN_CONVERTED_TO_BYTES_MESSAGE0="Decimal int num %2 converted to %1 bytes";W.Msg.CocoRobo_TEN_CONVERTED_TO_BYTES_TOOLTIP="Convert a decimal integer to %1 bytes and return the result";W.Msg.CocoRobo_INT_TO_CHR_HELPURL="";W.Msg.CocoRobo_INT_TO_CHR_MESSAGE0="Shaping number %1 converted to character in ASCII";W.Msg.CocoRobo_INT_TO_CHR_TOOLTIP="ASCII is a computer coding system based on the Latin alphabet, mainly used to display modern English and other Western European languages";W.Msg.CocoRobo_STR_TO_HEX_HELPURL="";W.Msg.CocoRobo_STR_TO_HEX_MESSAGE0="String %1 converted to hex bytes";W.Msg.CocoRobo_STR_TO_HEX_TOOLTIP="Returns two hexadecimal numbers separated by spaces in the result";W.Msg.CocoRobo_CHR_TO_INT_HELPURL="";W.Msg.CocoRobo_CHR_TO_INT_MESSAGE0="Character in ASCII %1 converted to shaping number";W.Msg.CocoRobo_CHR_TO_INT_TOOLTIP="ASCII is a computer coding system based on the Latin alphabet, mainly used to display modern English and other Western European languages";W.Msg.CocoRobo_HEX_TO_BIN_STR_HELPURL="";W.Msg.CocoRobo_HEX_TO_BIN_STR_MESSAGE0="Hex string %1 converted to bin bytes";W.Msg.CocoRobo_HEX_TO_BIN_STR_TOOLTIP="Convert hexadecimal string to binary byte and return the result";W.Msg.CocoRobo_DATA_TO_BASE64_HELPURL="";W.Msg.CocoRobo_DATA_TO_BASE64_MESSAGE0="Encoding data %1 in base64 and return byte object";W.Msg.CocoRobo_DATA_TO_BASE64_TOOLTIP="Base64 encoding is a process from binary to character";W.Msg.CocoRobo_BASE64_TO_DATA_HELPURL="";W.Msg.CocoRobo_BASE64_TO_DATA_MESSAGE0="Decoding base64 data %1 and return byte object";W.Msg.CocoRobo_BASE64_TO_DATA_TOOLTIP="Base64 encoding is a process from binary to character";W.Msg.CocoRobo_UJSON_DUMPS_HELPURL="";W.Msg.CocoRobo_UJSON_DUMPS_MESSAGE0="%1 converted to json string";W.Msg.CocoRobo_UJSON_DUMPS_TOOLTIP="Key in json format must be a string, and value can be a legitimate json data type (string, number, object, array, Boolean, or none";W.Msg.CocoRobo_UJSON_LOADS_HELPURL="";W.Msg.CocoRobo_UJSON_LOADS_MESSAGE0="Parse json string %1 and return the object";W.Msg.CocoRobo_UJSON_LOADS_TOOLTIP="Key in json format must be a string, and value can be a legitimate json data type (string, number, object, array, Boolean, or none";W.Msg.CocoRobo_code_annotation_HELPURL="";W.Msg.CocoRobo_code_annotation_MESSAGE0="Comment # %1";W.Msg.CocoRobo_code_annotation_TOOLTIP="Generate code comments";W.Msg.CocoRobo_SETS_PIN_MODE_HELPURL="https://CocoRobo.readthedocs.io/zh/master/board/hardware.html#CocoRobopindesc";W.Msg.CocoRobo_SETS_PIN_MODE_TOOLTIP="Right-click help to view the pin declaration";W.Msg.CocoRobo_SETS_PIN_MODE_MESSAGE0="Set pin %1 as %2 mode %3 and set the value to %4";W.Msg.CocoRobo_SET_PIN_IN="Input";W.Msg.CocoRobo_SET_PIN_PUSH_PULL_OUT="Push-pull output";W.Msg.CocoRobo_SET_PIN_LEAKY_OUT="Leaky output";W.Msg.CocoRobo_SET_PIN_NO_PULL="No pull";W.Msg.CocoRobo_SET_PIN_DOWN_PULL="Ppull down";W.Msg.CocoRobo_SET_PIN_UP_PULL="Pull up";W.Msg.CocoRobo_LOCK_OBJECT_ACQUIRE_LOCK_HELPURL="";W.Msg.CocoRobo_LOCK_OBJECT_ACQUIRE_LOCK_MESSAGE0="Thread lock object %1 requests lock";W.Msg.CocoRobo_LOCK_OBJECT_ACQUIRE_LOCK_TOOLTIP="";W.Msg.CocoRobo_START_NEW_THREAD_HELPURL="";W.Msg.CocoRobo_START_NEW_THREAD_MESSAGE0="Thread %1";W.Msg.CocoRobo_START_NEW_THREAD_TOOLTIP="";W.Msg.text_additional_delimiter_string="Split string to a list";W.Msg.text_additional_delimiter_deli="by delimiter:";W.Msg.text_additional_delimiter_end="Split and generate a list";W.Msg.TUPLE_CREATE_WITH_ITEMS_INSERT_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.TUPLE_CREATE_WITH_ITEMS_INSERT_TOOLTIP="The sequence count starts from 0, and the reverse count starts from 1.";W.Msg.CocoRobo_TEXT_ESC_HELPURL="";W.Msg.CocoRobo_TEXT_ESC_MESSAGE0="Text ESC %1";W.Msg.CocoRobo_TEXT_ESC_TOOLTIP="Text ESC";W.Msg.TEXT_APPEND_TEXT_HELPURL="";W.Msg.TEXT_APPEND_TEXT_TOOLTIP="Append text after the specified text and return the result";W.Msg.TEXT_APPEND_TEXT_MESSAGE0="%1 append text %2";W.Msg.TEXT_IS_NUMBER_HELPURL="";W.Msg.TEXT_IS_NUMBER_TOOLTIP="Judge the text %1 and return True or False";W.Msg.TEXT_IS_NUMBER_MESSAGE0="%1 %2";W.Msg.CocoRobo_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.CocoRobo_return_list_MESSAGE0="Define list %1 = %2";W.Msg.CocoRobo_return_list_TOOLTIP="Define a list";W.Msg.CocoRobo_ORDER="#";W.Msg.CocoRobo_REVERSE_ORDER="Countdown #";W.Msg.LIST_ORDER_ITEM_MESSAGE0="List %1 %2 %3 item";W.Msg.LIST_ORDER_ITEM_TOOLTIP="The sequence count starts from 0, and the reverse count starts from 1.";W.Msg.LIST_ORDER_ITEM_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.CocoRobo_lists_append_MESSAGE0="Add item %2 at the end of list %1";W.Msg.CocoRobo_lists_append_TOOLTIP="Add item to the end of the list";W.Msg.CocoRobo_lists_append_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.LIST_ITEM_EXIST_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.LIST_ITEM_EXIST_TOOLTIP="The list contains a specific string";W.Msg.LIST_ITEM_EXIST_MESSAGE0="List %1 include %2";W.Msg.SET_LIST_ORDER_ITEM_MESSAGE0="Set list %1 %2 %3 item as %4";W.Msg.SET_LIST_ORDER_ITEM_TOOLTIP="The sequence count starts from 0, and the reverse count starts from 1.";W.Msg.SET_LIST_ORDER_ITEM_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.INSERT_LIST_ORDER_ITEM_MESSAGE0="Insert list %1 %2 %3 item as %4";W.Msg.INSERT_LIST_ORDER_ITEM_TOOLTIP="The sequence count starts from 0, and the reverse count starts from 1.";W.Msg.INSERT_LIST_ORDER_ITEM_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.LIST_ORDER_ITEM_MESSAGE0="List %1 %2 %3 item";W.Msg.LIST_ORDER_ITEM_TOOLTIP="The sequence count starts from 0, and the reverse count starts from 1.";W.Msg.LIST_ORDER_ITEM_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.PARTS_OF_LIST_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.PARTS_OF_LIST_TOOLTIP=`Incremental order fetching
  951. Example:
  952. reciprocal number 5 to reciprocal number 2;
  953. 0th to 5th`;W.Msg.PARTS_OF_LIST_MESSAGE0="Return list %1 takes %2 %3 items to %4 %5 items";W.Msg.LIST_TO_TUPLE_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.LIST_TO_TUPLE_TOOLTIP="List conversion to tuple";W.Msg.LIST_TO_TUPLE_MESSAGE0="List %1 conversion to tuple";W.Msg.CocoRobo_lists_clear_MESSAGE0="Clear list %1";W.Msg.CocoRobo_lists_clear_TOOLTIP="Clear the list";W.Msg.CocoRobo_lists_clear_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.CocoRobo_lists_extend_MESSAGE0="List %1 append list %2";W.Msg.CocoRobo_lists_extend_TOOLTIP="Append list to list";W.Msg.CocoRobo_lists_extend_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.LIST_FIRST_INDEX_HELPURL="";W.Msg.LIST_FIRST_INDEX_MESSAGE0="Location of item%1 in list%2 %3";W.Msg.LIST_FIRST_INDEX_TOOLTIP="Returns the position where the specified string appears in the list %3";W.Msg.FIRST="First";W.Msg.LAST="Last";W.Msg.DICT_CREATE_WITH_ITEM_TOOLTIP="Add an item to the dictionary.";W.Msg.DICT_KEY_VALUE_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.DICT_KEY_VALUE_TOOLTIP="Returns the value of the specified key of the dictionary";W.Msg.DICT_KEY_VALUE_MESSAGE0="Value of the key %2 in dictionary %1";W.Msg.ADD_DICT_KEY_VALUE_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.ADD_DICT_KEY_VALUE_TOOLTIP="Update the key if the key already exists";W.Msg.ADD_DICT_KEY_VALUE_MESSAGE0="Add key %2 & value %3 to dictionary %1";W.Msg.DICT_LENGTH_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.DICT_LENGTH_TOOLTIP="Returns the length of the dictionary";W.Msg.DICT_LENGTH_MESSAGE0="Length of dictionary %1";W.Msg.DICT_KEY_EXIST_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.DICT_KEY_EXIST_TOOLTIP="Determine whether the dictionary contains the specified key, and return True or False";W.Msg.DICT_KEY_EXIST_MESSAGE0="Dictionary %1 include key %2";W.Msg.DICT_KEY_OR_VAL_LIST_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.DICT_KEY_OR_VAL_LIST_TOOLTIP="Return list of %2 in dictionary";W.Msg.DICT_KEY_OR_VAL_LIST_MESSAGE0="List of %2 in dictionary %1";W.Msg.DICT_KEYS="KEY";W.Msg.DICT_VALUES="VALUE";W.Msg.DICT_CREATE_WITH_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.DICT_CREATE_WITH_TOOLTIP="Define a dictionary";W.Msg.DICT_CREATE_WITH_MESSAGE0="Define dictionary %1 = %2";W.Msg.tuple_create_with_MESSAGE0="Define tuple %1 = %2 ";W.Msg.tuple_create_with_TOOLTIP="When you only have one element, you need to add a comma after the element";W.Msg.tuple_create_with_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.tuple_order_item_MESSAGE0="Tuple %1 %2 %3 item";W.Msg.tuple_order_item_TOOLTIP="The sequence count starts from 0, and the reverse count starts from 1.";W.Msg.tuple_order_item_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.CocoRobo_MIN="Min value";W.Msg.CocoRobo_MAX="Max value";W.Msg.CocoRobo_LENTH="length";W.Msg.TUPLE_MIN_MAX_LEN_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.TUPLE_MIN_MAX_LEN_TOOLTIP="Return %2 of tuple";W.Msg.TUPLE_MIN_MAX_LEN_MESSAGE0="Tuple %1 %2";W.Msg.TUPLE_ITEM_EXIST_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.TUPLE_ITEM_EXIST_TOOLTIP="Determine whether the specified value is included, and return True or False";W.Msg.TUPLE_ITEM_EXIST_MESSAGE0="Tuple %1 include %2";W.Msg.PARTS_OF_TUPLE_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.PARTS_OF_TUPLE_TOOLTIP="The sequence count starts from 0, and the reverse count starts from 1.";W.Msg.PARTS_OF_TUPLE_MESSAGE0="Return tuple %1 from the %2 to the last item";W.Msg.PARTS_OF_TUPLE2_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.PARTS_OF_TUPLE2_TOOLTIP=`Incremental order fetching
  954. Example:
  955. reciprocal number 5 to reciprocal number 2;
  956. 0th to 5th`;W.Msg.PARTS_OF_TUPLE2_MESSAGE0="Return tuple %1 takes %2 %3 items to %4 %5 items";W.Msg.SET_CREATE_WITH_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.SET_CREATE_WITH_TOOLTIP="Define collection";W.Msg.SET_CREATE_WITH_MESSAGE0="Define set %1 = %2";W.Msg.SET_UPDATE_WITH_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.SET_UPDATE_WITH_TOOLTIP="Add parameters as strings, lists, tuples, sets, dictionaries (add only key). For existing elements, do not do anything";W.Msg.SET_UPDATE_WITH_MESSAGE0="Update set %1 with %2";W.Msg.INTERSECTION_OF_SETS_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.INTERSECTION_OF_SETS_TOOLTIP="Return %1 of both collection";W.Msg.INTERSECTION_OF_SETS_MESSAGE0="%1 of set %2 and set %3";W.Msg.CocoRobo_INTERSECTION="Intersection";W.Msg.CocoRobo_UNION="Union";W.Msg.CocoRobo_DIFFERENCE="Difference";W.Msg.SETS_UPDATE_WAYS_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.SETS_UPDATE_WAYS_TOOLTIP="The collection is updated to the %3 of the specified collection";W.Msg.SETS_UPDATE_WAYS_MESSAGE0="Update set %1 as the %3 with set %2";W.Msg.SUBSET_SUPERSET_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.SUBSET_SUPERSET_TOOLTIP="Collection is %3 of collection";W.Msg.SUBSET_SUPERSET_MESSAGE0="Set %1 is %3 of set %2";W.Msg.CocoRobo_SUBSET="Subset";W.Msg.CocoRobo_SUPERSET="Superset";W.Msg.GET_SETS_POP_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.GET_SETS_POP_TOOLTIP="Return the collection with random items removed";W.Msg.GET_SETS_POP_MESSAGE0="Return a random item from the set %1, and remove it";W.Msg.LEN_OF_SETS_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.LEN_OF_SETS_TOOLTIP="Returns the length of the specified collection";W.Msg.LEN_OF_SETS_MESSAGE0="Length of set %1";W.Msg.CREATE_EMPTY_SET_HELPURL="https://CocoRobox.readthedocs.io/zh_CN/latest/CocoRoboX.html";W.Msg.CREATE_EMPTY_SET_TOOLTIP="";W.Msg.CREATE_EMPTY_SET_MESSAGE0="Create empty sets %1";W.Msg.io_high="HIGH";W.Msg.io_low="LOW";W.Msg.digital_set="Set GPIO #";W.Msg.digital_set_as="to";W.Msg.digital_get="Get GPIO #";W.Msg.digital_get_value="Digital Read";W.Msg.digital_set_title="Setting specific pins for specific levels";W.Msg.digital_get_value_title="Returns the digital signal value of a specific pin";W.Msg.time_iot_module="IoT Module ";W.Msg.time_ai_module="A.I. Module";W.Msg.analog_get_moudule="Module Get Pin #";W.Msg.analog_get_value="Analog Value (PWM)";W.Msg.set_pin="(range:0 ~ 1023)";W.Msg.Esp32_Main_Controller_Io_From_Analog_Pin_TOOLTIP="The module obtains the analog signal value of a specific pin";W.Msg.time_init_timer="Initialize Timer";W.Msg.time_timer_get_time="Get time elapsed from Timer (ms)";W.Msg.time_timer_clear="Clear Timer";W.Msg.time_timer_periodically="Enable Periodical Timer";W.Msg.time_timer_every="Every";W.Msg.time_timer_ms="Millisecond(s)";W.Msg.time_execution="Do";W.Msg.time_timer_periodically_clear="Clear Periodical Timer";W.Msg.time_get_current_date_title="Get Current Time:";W.Msg.time_get_current_date_y="Year";W.Msg.time_get_current_date_m="Month";W.Msg.time_get_current_date_d="Day";W.Msg.time_get_current_date_hour="Hour";W.Msg.time_get_current_date_min="Minute";W.Msg.time_get_current_date_sec="Second";W.Msg.serialcomm_print="Serial print";W.Msg.serialcomm_write_title_text="Send Data to other devices through the serial port";W.Msg.serialcomm_read_setup_title_text="Obtain data through the serial port";W.Msg.serialcomm_read_setup_title_text_1=" to initialize";W.Msg.serial_read_data="From ";W.Msg.Serial_Read_Data_all="Get the data of the serial port and save it to";W.Msg.ARD_SERIAL_RECEIVE_DATASET_GET_TEXT="Get Serial (UART) Data at ";W.Msg.ARD_SERIAL_RECEIVE_DATASET_TYPE_TEXT="as Type";W.Msg.ARD_SERIAL_RECEIVE_DATASET_TYPE_FLOAT="Float";W.Msg.ARD_SERIAL_RECEIVE_DATASET_TYPE_INTEGER="Number";W.Msg.ARD_SERIAL_RECEIVE_DATASET_TYPE_STRING="String";W.Msg.serialcomm_write_item_first="Data ";W.Msg.serialcomm_write_item_last="";W.Msg.serialcomm_write_item="Item";W.Msg.serialcomm_write_data="Data";W.Msg.serialcomm_write_data_bps_title="Set Baud Rate:";W.Msg.serialcomm_write_data_bps_attrib="bps";W.Msg.serialcomm_write_on="On";W.Msg.serialcomm_write_on_ai="AI Module ";W.Msg.serialcomm_write_on_iot="IoT Module ";W.Msg.serialcomm_write_on_iot_lite="IoT Lite Module ";W.Msg.serial_send_data_on="On";W.Msg.serial_send_data_on_send_data="Module Send Data to Microbit";W.Msg.serial_new_send_data="Serial port writing text";W.Msg.serial_new_send_data_1="Nowrap";W.Msg.serial_new_send_data_2="Wrap";W.Msg.serial_new_send_data_3="Serial port writing single byte";W.Msg.serial_new_send_data_4="Serial port write byte list";W.Msg.serial_new_get_data_1="Serial port has readable data";W.Msg.serial_new_get_data_2="Serial port reads a row of data";W.Msg.serial_new_get_data_3="Serial port reading data";W.Msg.serial_new_get_data_4="The length of data read by serial port is";W.Msg.serial_close="Close the serial port";W.Msg.SYSTEM="Restart System";W.Msg.SYSTEM_GC="Start memory reclaim";W.Msg.SYSTEM_RUN="Execute Python Code:";W.Msg.SYSTEM_RUN_F="Filename:";W.Msg.SYSTEM_CREATE="Create Text file";W.Msg.SYSTEM_CREATE_FILE="Create file";W.Msg.SYSTEM_CREATE_F="Filename:";W.Msg.SYSTEM_CREATE_F_1="File Path:";W.Msg.SYSTEM_WRITE="Create Text file";W.Msg.SYSTEM_OPEN_FILE="Open file";W.Msg.SYSTEM_WRITE_FILE="Write file";W.Msg.SYSTEM_CLOSE_FILE="Close file";W.Msg.SYSTEM_WRITE_F="Filename:";W.Msg.SYSTEM_WRITE_W="Write content:";W.Msg.SYSTEM_WRITE_S="The separator is:";W.Msg.SYSTEM_WRITE_S_N="newline";W.Msg.SYSTEM_WRITE_S_C="comma";W.Msg.SYSTEM_WRITE_S_S="space";W.Msg.SYSTEM_WRITE_S_SE="semicolon";W.Msg.SYSTEM_INPUT="Read Text File as List";W.Msg.SYSTEM_INPUT_FILE="Read File as List";const w7=W.Msg,k7={xml:`<xml style="height: 100%">
  957. <category id="catLogic" name="Logic" colour="#4c97ff">
  958. <block type="controls_if"></block>
  959. <block type="logic_compare"></block>
  960. <block type="logic_operation"></block>
  961. <block type="logic_negate"></block>
  962. <block type="logic_boolean"></block>
  963. <block type="logic_null"></block>
  964. <block type="logic_ternary"></block>
  965. <block type="CocoRobo_return"></block>
  966. <block type="CocoRobo_try_except"></block>
  967. <block type="CocoRobo_try_except_finally"></block>
  968. <block type="CocoRobo_type"></block>
  969. <block type="CocoRobo_type_is"></block>
  970. <block type="CocoRobo_eval"></block>
  971. </category>
  972. <category id="catLoops" name="Loops" colour="#9d64fd">
  973. <block type="controls_repeat_forever"></block>
  974. <block type="controls_repeat_ext">
  975. <value name="TIMES">
  976. <shadow type="math_number">
  977. <field name="NUM">10</field>
  978. </shadow>
  979. </value>
  980. </block>
  981. <block type="controls_whileUntil"></block>
  982. <block type="controls_for">
  983. <value name="FROM">
  984. <shadow type="math_number">
  985. <field name="NUM">1</field>
  986. </shadow>
  987. </value>
  988. <value name="TO">
  989. <shadow type="math_number">
  990. <field name="NUM">10</field>
  991. </shadow>
  992. </value>
  993. <value name="BY">
  994. <shadow type="math_number">
  995. <field name="NUM">1</field>
  996. </shadow>
  997. </value>
  998. </block>
  999. <block type="controls_forEach"></block>
  1000. <block type="controls_flow_statements"></block>
  1001. </category>
  1002. <category id="catMath" name="Math" colour="#5472ea">
  1003. <block type="math_number" gap="32"></block>
  1004. <block type="math_arithmetic">
  1005. <value name="A">
  1006. <shadow type="math_number">
  1007. <field name="NUM">1</field>
  1008. </shadow>
  1009. </value>
  1010. <value name="B">
  1011. <shadow type="math_number">
  1012. <field name="NUM">1</field>
  1013. </shadow>
  1014. </value>
  1015. </block>
  1016. <block type="math_degrad"></block>
  1017. <block type="math_single">
  1018. <value name="NUM">
  1019. <shadow type="math_number">
  1020. <field name="NUM">9</field>
  1021. </shadow>
  1022. </value>
  1023. </block>
  1024. <block type="math_trig">
  1025. <value name="NUM">
  1026. <shadow type="math_angle">
  1027. <field name="angle">45</field>
  1028. </shadow>
  1029. </value>
  1030. </block>
  1031. <block type="math_constant"></block>
  1032. <block type="math_number_property">
  1033. <value name="NUMBER_TO_CHECK">
  1034. <shadow type="math_number">
  1035. <field name="NUM">0</field>
  1036. </shadow>
  1037. </value>
  1038. </block>
  1039. <block type="math_round">
  1040. <value name="NUM">
  1041. <shadow type="math_number">
  1042. <field name="NUM">3.1</field>
  1043. </shadow>
  1044. </value>
  1045. </block>
  1046. <block type="math_keep_decimal">
  1047. <value name="NUM">
  1048. <shadow type="math_number">
  1049. <field name="NUM">3.1415926</field>
  1050. </shadow>
  1051. </value>
  1052. <value name="PLACE">
  1053. <shadow type="math_number">
  1054. <field name="NUM">2</field>
  1055. </shadow>
  1056. </value>
  1057. </block>
  1058. <block type="math_on_list"></block>
  1059. <block type="math_modulo">
  1060. <value name="DIVIDEND">
  1061. <shadow type="math_number">
  1062. <field name="NUM">64</field>
  1063. </shadow>
  1064. </value>
  1065. <value name="DIVISOR">
  1066. <shadow type="math_number">
  1067. <field name="NUM">10</field>
  1068. </shadow>
  1069. </value>
  1070. </block>
  1071. <block type="math_division_consult">
  1072. <value name="DIVIDEND">
  1073. <shadow type="math_number">
  1074. <field name="NUM">64</field>
  1075. </shadow>
  1076. </value>
  1077. <value name="DIVISOR">
  1078. <shadow type="math_number">
  1079. <field name="NUM">10</field>
  1080. </shadow>
  1081. </value>
  1082. </block>
  1083. <block type="math_constrain">
  1084. <value name="VALUE">
  1085. <shadow type="math_number">
  1086. <field name="NUM">50</field>
  1087. </shadow>
  1088. </value>
  1089. <value name="LOW">
  1090. <shadow type="math_number">
  1091. <field name="NUM">1</field>
  1092. </shadow>
  1093. </value>
  1094. <value name="HIGH">
  1095. <shadow type="math_number">
  1096. <field name="NUM">100</field>
  1097. </shadow>
  1098. </value>
  1099. </block>
  1100. <block type="labplus_mapping">
  1101. <value name="inputNum"><shadow type="math_number"><field name="NUM">10</field></shadow></value>
  1102. <value name="bMin"><shadow type="math_number"><field name="NUM">0</field></shadow></value>
  1103. <value name="bMax"><shadow type="math_number"><field name="NUM">100</field></shadow></value>
  1104. <value name="cMin"><shadow type="math_number"><field name="NUM">0</field></shadow></value>
  1105. <value name="cMax"><shadow type="math_number"><field name="NUM">200</field></shadow></value>
  1106. </block>
  1107. <block type="math_random_int">
  1108. <value name="FROM">
  1109. <shadow type="math_number">
  1110. <field name="NUM">1</field>
  1111. </shadow>
  1112. </value>
  1113. <value name="TO">
  1114. <shadow type="math_number">
  1115. <field name="NUM">100</field>
  1116. </shadow>
  1117. </value>
  1118. </block>
  1119. <block type="math_random_randrange">
  1120. <value name="start"><shadow type="math_number"><field name="NUM">0</field></shadow></value>
  1121. <value name="stop"><shadow type="math_number"><field name="NUM">10</field></shadow></value>
  1122. <value name="step"><shadow type="math_number"><field name="NUM">2</field></shadow></value>
  1123. </block>
  1124. <block type="math_random_float"></block>
  1125. <block type="math_convert"></block>
  1126. <block type="math_number_bits_ops">
  1127. <value name="A">
  1128. <shadow type="math_number">
  1129. <field name="NUM">1</field>
  1130. </shadow>
  1131. </value>
  1132. <value name="B">
  1133. <shadow type="math_number">
  1134. <field name="NUM">1</field>
  1135. </shadow>
  1136. </value>
  1137. </block>
  1138. <block type="bit_inversion">
  1139. <value name="data"><shadow type="math_number"><field name="NUM">60</field></shadow></value>
  1140. </block>
  1141. <block type="CocoRobo_ten_convert_to">
  1142. <value name="int_num"><shadow type="math_number"><field name="NUM">10</field></shadow></value>
  1143. </block>
  1144. <block type="CocoRobo_convert_to_ten">
  1145. <value name="convert_str"><shadow type="text"><field name="TEXT">11</field></shadow></value>
  1146. </block>
  1147. <block type="CocoRobo_ten_converted_to_bytes">
  1148. <value name="convert_num"><shadow type="math_number"><field name="NUM">11</field></shadow></value>
  1149. </block>
  1150. <block type="CocoRobo_int_to_chr">
  1151. <value name="convert_num"><shadow type="math_number"><field name="NUM">97</field></shadow></value>
  1152. </block>
  1153. <block type="CocoRobo_chr_to_int">
  1154. <value name="convert_chr"><shadow type="text"><field name="TEXT">a</field></shadow></value>
  1155. </block>
  1156. <block type="CocoRobo_str_to_hex">
  1157. <value name="convert_chr"><shadow type="text"><field name="TEXT">abcdfg</field></shadow></value>
  1158. </block>
  1159. <block type="CocoRobo_hex_to_bin_str">
  1160. <value name="convert_chr"><shadow type="text"><field name="TEXT">313233</field></shadow></value>
  1161. </block>
  1162. <block type="CocoRobo_data_to_base64">
  1163. <value name="data"><shadow type="text"><field name="TEXT">cocorobo</field></shadow></value>
  1164. </block>
  1165. <block type="CocoRobo_base64_to_data">
  1166. <value name="data"><shadow type="text"><field name="TEXT">bXB5dGhvbg==</field></shadow></value>
  1167. </block>
  1168. </category>
  1169. <category id="catVariables" name="Variables" custom="VARIABLE" colour="#ffab2f">' +
  1170. </category>
  1171. <category id="catText" name="Text" colour="#33cc99">
  1172. <block type="text"><field name="TEXT"></field></block>
  1173. <block type="text_join"><mutation items="1"></mutation></block>
  1174. <block type="text_join"></block>
  1175. <block type="text_split_string_by_delimiter">
  1176. </block>
  1177. <block type="text_format">
  1178. <value name="FORMAT">
  1179. <shadow type="text"><field name="TEXT">Value: %.2f</field></shadow>
  1180. </value>
  1181. <value name="CONTENT">
  1182. <block type="tuple_create_with_items_insert">
  1183. <mutation items="1"></mutation>
  1184. <value name="ADD0">
  1185. <block type="math_number">
  1186. <field name="NUM">3.1415926</field>
  1187. </block>
  1188. </value>
  1189. </block>
  1190. </value>
  1191. </block>
  1192. <block type="text_format2">
  1193. <value name="FORMAT">
  1194. <shadow type="text"><field name="TEXT">Value: {:.3}</field></shadow>
  1195. </value>
  1196. <value name="CONTENT">
  1197. <block type="tuple_create_with_items_insert">
  1198. <mutation items="1"></mutation>
  1199. <value name="ADD0">
  1200. <block type="math_number">
  1201. <field name="NUM">3.1415926</field>
  1202. </block>
  1203. </value>
  1204. </block>
  1205. </value>
  1206. </block>
  1207. <block type="CocoRobo_text_ESC"></block>
  1208. <block type="text_append_text">
  1209. <value name="text_abc"><shadow type="text"><field name="TEXT">abc</field></shadow></value>
  1210. <value name="append_text"><shadow type="text"><field name="TEXT">def</field></shadow></value>
  1211. </block>
  1212. <block type="text_is_number">
  1213. <value name="TEXT">
  1214. <shadow type="text">
  1215. <field name="TEXT"></field>
  1216. </shadow>
  1217. </value>
  1218. </block>
  1219. <block type="text_length">
  1220. <value name="VALUE">
  1221. <shadow type="text">
  1222. <field name="TEXT"></field>
  1223. </shadow>
  1224. </value>
  1225. </block>
  1226. <block type="text_isEmpty">
  1227. <value name="VALUE">
  1228. <shadow type="text">
  1229. <field name="TEXT"></field>
  1230. </shadow>
  1231. </value>
  1232. </block>
  1233. <block type="text_indexOf">
  1234. <value name="VALUE">
  1235. <shadow type="text">
  1236. <field name="TEXT">abc</field>
  1237. </shadow>
  1238. </value>
  1239. <value name="FIND">
  1240. <shadow type="text">
  1241. <field name="TEXT">b</field>
  1242. </shadow>
  1243. </value>
  1244. </block>
  1245. <block type="text_charAt">
  1246. <value name="VALUE">
  1247. <shadow type="text">
  1248. <field name="TEXT">abc</field>
  1249. </shadow>
  1250. </value>
  1251. </block>
  1252. <block type="text_getSubstring">
  1253. <value name="STRING">
  1254. <shadow type="text">
  1255. <field name="TEXT">abc</field>
  1256. </shadow>
  1257. </value>
  1258. </block>
  1259. <block type="text_changeCase">
  1260. <value name="TEXT">
  1261. <shadow type="text">
  1262. <field name="TEXT"></field>
  1263. </shadow>
  1264. </value>
  1265. </block>
  1266. <block type="text_trim">
  1267. <value name="TEXT">
  1268. <shadow type="text">
  1269. <field name="TEXT"></field>
  1270. </shadow>
  1271. </value>
  1272. </block>
  1273. <block type="text_to_byte">
  1274. <value name="TEXT">
  1275. <shadow type="text">
  1276. <field name="TEXT">abc</field>
  1277. </shadow>
  1278. </value>
  1279. </block>
  1280. <block type="CocoRobo_bytes_decode">
  1281. <value name="bytes_decode"></value>
  1282. </block>
  1283. <block type="CocoRobo_ujson_dumps">
  1284. <value name="data"><shadow type="text_dict"><field name="TEXT">"Age":8</field></shadow></value>
  1285. </block>
  1286. <block type="CocoRobo_ujson_loads">
  1287. <value name="data"><shadow type="text"><field name="TEXT">{"Age":8}</field></shadow></value>
  1288. </block>
  1289. <block type="CocoRobo_code_annotation">
  1290. <value name="data"><shadow type="text"><field name="TEXT"></field></shadow></value>
  1291. </block>
  1292. </category>
  1293. <category id="catLists" name="Lists" colour="#40bfe4">
  1294. <block type="lists_create_with"><mutation items="0"></mutation></block>
  1295. <block type="lists_create_with"></block>
  1296. <block type="text_list"><field name="TEXT">0, 0, 0</field></block>
  1297. <block type="CocoRobo_return_list">
  1298. <value name="list_name"><block type="variables_get"><field name="VAR">my_list</field></block></value>
  1299. <value name="list_items"><shadow type="text_list"><field name="TEXT">0, 0, 0</field></shadow></value>
  1300. </block>
  1301. <block type="list_order_item">
  1302. <value name="list_name"><shadow type="text_list"><field name="TEXT"></field></shadow></value>
  1303. <value name="list_order_item"><shadow type="math_number"><field name="NUM">0</field></shadow></value>
  1304. </block>
  1305. <block type="lists_append">
  1306. <value name="list_name"><shadow type="text_list"><field name="TEXT"></field></shadow></value>
  1307. </block>
  1308. <block type="list_item_exist">
  1309. <value name="list_name"><shadow type="text_list"><field name="TEXT"></field></shadow></value>
  1310. <value name="list_item"><shadow type="text"><field name="TEXT">cocorobo</field></shadow></value>
  1311. </block>
  1312. <block type="lists_extend">
  1313. <value name="list_name"><shadow type="text_list"><field name="TEXT"></field></shadow></value>
  1314. <value name="extend_list"><shadow type="text_list"><field name="TEXT"></field></shadow></value>
  1315. </block>
  1316. <block type="lists_clear">
  1317. <value name="list_name"><shadow type="text_list"><field name="TEXT"></field></shadow></value>
  1318. </block>
  1319. <block type="lists_repeat">
  1320. <value name="NUM">
  1321. <shadow type="math_number">
  1322. <field name="NUM">5</field>
  1323. </shadow>
  1324. </value>
  1325. </block>
  1326. <block type="lists_length"></block>
  1327. <block type="lists_isEmpty"></block>
  1328. <block type="list_first_index">
  1329. <value name="elem"><shadow type="text"><field name="TEXT">cocorobo</field></shadow></value>
  1330. <value name="my_list"><shadow type="text_list"><field name="TEXT"></field></shadow></value>
  1331. </block>
  1332. <block type="set_list_order_item">
  1333. <value name="list_name"><shadow type="text_list"><field name="TEXT"></field></shadow></value>
  1334. <value name="list_order_item"><shadow type="math_number"><field name="NUM">0</field></shadow></value>
  1335. <value name="set_value"><shadow type="math_number"><field name="NUM">0</field></shadow></value>
  1336. </block>
  1337. <block type="insert_list_order_item">
  1338. <value name="list_name"><shadow type="text_list"><field name="TEXT"></field></shadow></value>
  1339. <value name="list_order_item"><shadow type="math_number"><field name="NUM">0</field></shadow></value>
  1340. <value name="set_value"><shadow type="math_number"><field name="NUM">0</field></shadow></value>
  1341. </block>
  1342. <block type="parts_of_list">
  1343. <value name="list_name"><shadow type="text_list"><field name="TEXT"></field></shadow></value>
  1344. <value name="start_item"><shadow type="math_number"><field name="NUM">0</field></shadow></value>
  1345. <value name="end_item"><shadow type="math_number"><field name="NUM">2</field></shadow></value>
  1346. </block>
  1347. <block type="lists_getIndex">
  1348. <mutation statement="true" at="true"></mutation>
  1349. <field name="MODE">REMOVE</field>
  1350. <field name="WHERE">FROM_START</field>
  1351. <value name="VALUE">
  1352. <shadow type="text_list"><field name="TEXT"></field></shadow>
  1353. </value>
  1354. </block>
  1355. <block type="lists_getIndex">
  1356. <mutation statement="false" at="true"></mutation>
  1357. <field name="MODE">GET_REMOVE</field>
  1358. <field name="WHERE">FROM_START</field>
  1359. <value name="VALUE">
  1360. <shadow type="text_list"><field name="TEXT"></field></shadow>
  1361. </value>
  1362. </block>
  1363. <block type="lists_split">
  1364. <value name="DELIM"><shadow type="text"><field name="TEXT">,</field></shadow></value>
  1365. </block>
  1366. <block type="lists_sort"></block>
  1367. </category>
  1368. <category id="catDictionary" name="Dictionary" colour="32">
  1369. <block type="text_dict"><field name="TEXT">"Age":8</field></block>
  1370. <block type="dict_create_with">
  1371. <value name="dict_name"><block type="variables_get"><field name="VAR">my_dict</field></block></value>
  1372. <value name="dict_items"><shadow type="text_dict"><field name="TEXT">"Age":8</field></shadow></value>
  1373. </block>
  1374. <block type="add_dict_key_value">
  1375. <value name="dict_name"><shadow type="text_dict"><field name="TEXT"></field></shadow></value>
  1376. <value name="dict_items"><shadow type="text"><field name="TEXT">Age</field></shadow></value>
  1377. <value name="add_value"><shadow type="math_number"><field name="NUM">10</field></shadow></value>
  1378. </block>
  1379. <block type="dict_key_value">
  1380. <value name="dict_name"><shadow type="text_dict"><field name="TEXT"></field></shadow></value>
  1381. <value name="dict_items"><shadow type="text"><field name="TEXT">Age</field></shadow></value>
  1382. </block>
  1383. <block type="dict_length">
  1384. <value name="dict_name"><shadow type="text_dict"><field name="TEXT"></field></shadow></value>
  1385. </block>
  1386. <block type="dict_key_exist">
  1387. <value name="dict_name"><shadow type="text_dict"><field name="TEXT"></field></shadow></value>
  1388. <value name="dict_items"><shadow type="text"><field name="TEXT">Age</field></shadow></value>
  1389. </block>
  1390. <block type="dict_key_or_val_list">
  1391. <value name="dict_name"><shadow type="text_dict"><field name="TEXT"></field></shadow></value>
  1392. </block>
  1393. </category>
  1394. <category id="catTuples" name="Tuples" colour="192">
  1395. <block type="tuple_create_with_items_insert"></block>
  1396. <block type="text_tuple"><field name="TEXT">"cocorobo",</field></block>
  1397. <block type="tuple_create_with">
  1398. <value name="tuple_name"><block type="variables_get"><field name="VAR">my_tuple</field></block></value>
  1399. <value name="tuple_items"><shadow type="text_tuple"><field name="TEXT">"cocorobo",</field></shadow></value>
  1400. </block>
  1401. <block type="tuple_order_item">
  1402. <value name="tuple_name"><shadow type="text_tuple"><field name="TEXT"></field></shadow></value>
  1403. <value name="tuple_order_item"><shadow type="math_number"><field name="NUM">0</field></shadow></value>
  1404. </block>
  1405. <block type="tuple_min_max_len">
  1406. <value name="tuple_name"><shadow type="text_tuple"><field name="TEXT"></field></shadow></value>
  1407. </block>
  1408. <block type="tuple_item_exist">
  1409. <value name="tuple_name"><shadow type="text_tuple"><field name="TEXT"></field></shadow></value>
  1410. <value name="tuple_item"><shadow type="text"><field name="TEXT">cocorobo</field></shadow></value>
  1411. </block>
  1412. <block type="parts_of_tuple">
  1413. <value name="tuple_name"><shadow type="text_tuple"><field name="TEXT"></field></shadow></value>
  1414. <value name="tuple_item"><shadow type="math_number"><field name="NUM">2</field></shadow></value>
  1415. </block>
  1416. <block type="parts_of_tuple2">
  1417. <value name="tuple_name"><shadow type="text_tuple"><field name="TEXT"></field></shadow></value>
  1418. <value name="start_item"><shadow type="math_number"><field name="NUM">0</field></shadow></value>
  1419. <value name="end_item"><shadow type="math_number"><field name="NUM">2</field></shadow></value>
  1420. </block>
  1421. <block type="list_to_tuple">
  1422. <value name="list_name"><shadow type="text_list"><field name="TEXT"></field></shadow></value>
  1423. </block>
  1424. </category>
  1425. <category id="catSet" name="Set" colour="160">
  1426. <block type="set_create_with_items_insert"></block>
  1427. <block type="text_set"><field name="TEXT">"string", 0.9, ("tuple",)</field></block>
  1428. <block type="set_create_with">
  1429. <value name="set_name"><block type="variables_get"><field name="VAR">my_set</field></block></value>
  1430. <value name="set_items"><shadow type="text_set"></shadow></value>
  1431. </block>
  1432. <block type="sets_update_ways">
  1433. <value name="set_name"><block type="variables_get"><field name="VAR">my_set</field></block></value>
  1434. <value name="set_1_name"><shadow type="text_set"></shadow></value>
  1435. </block>
  1436. <block type="set_update_with">
  1437. <value name="set_name"><shadow type="text_set"></shadow></value>
  1438. <value name="set_items"></value>
  1439. </block>
  1440. <block type="set_subset_superset">
  1441. <value name="set_name"><shadow type="text_set"></shadow></value>
  1442. <value name="set_1_name"><shadow type="text_set"></shadow></value>
  1443. </block>
  1444. <block type="intersection_of_sets">
  1445. <value name="set_name"><shadow type="text_set"></shadow></value>
  1446. <value name="set_1_name"><shadow type="text_set"></shadow></value>
  1447. </block>
  1448. <block type="len_of_sets">
  1449. <value name="set_name"><shadow type="text_set"></shadow></value>
  1450. </block>
  1451. <block type="get_sets_pop">
  1452. <value name="set_name"><shadow type="text_set"></shadow></value>
  1453. </block>
  1454. </category>
  1455. <category id="catFunctions" name="Functions" colour="#ff6381" custom="PROCEDURE">
  1456. </category>
  1457. <category id="catOutput" name="Output" colour="#ff8b2c" >
  1458. <block type="esp32_main_controller_io_from_digital_pin">
  1459. <value name="digital_pin_input">
  1460. <shadow type="math_number">
  1461. <field name="NUM">1</field>
  1462. </shadow>
  1463. </value>
  1464. </block>
  1465. <block type="esp32_main_controller_io_set_digital_pin">
  1466. <value name="digital_pin_input">
  1467. <shadow type="math_number">
  1468. <field name="NUM">1</field>
  1469. </shadow>
  1470. </value>
  1471. <value name="high_low">
  1472. <shadow type="esp32_main_controller_io_high_low"></shadow>
  1473. </value>
  1474. </block>
  1475. <block type="esp32_main_controller_io_from_analog_pin"></block>
  1476. </category>
  1477. <category id="catFiles" name="Files" colour="32">
  1478. <block type="iot_system_run">
  1479. <value name="PATH">
  1480. <shadow type="text">
  1481. <field name="TEXT">/your_python_code.py</field>
  1482. </shadow>
  1483. </value>
  1484. </block>
  1485. <block type="iot_system_create_file">
  1486. <value name="filename">
  1487. <shadow type="text">
  1488. <field name="TEXT">cocorobo.txt</field>
  1489. </shadow>
  1490. </value>'
  1491. <value name="PATH">
  1492. <shadow type="text">
  1493. <field name="TEXT">/</field>
  1494. </shadow>
  1495. </value>'
  1496. </block>
  1497. <block type="iot_system_open_file">
  1498. <value name="filename">
  1499. <shadow type="text">
  1500. <field name="TEXT">cocorobo.txt</field>
  1501. </shadow>
  1502. </value>'
  1503. <value name="PATH">
  1504. <shadow type="text">
  1505. <field name="TEXT">/</field>
  1506. </shadow>
  1507. </value>
  1508. </block>
  1509. <block type="iot_system_write_file">
  1510. <value name="WPATH">
  1511. <shadow type="text">
  1512. <field name="TEXT"></field>
  1513. </shadow>
  1514. </value>
  1515. </block>
  1516. <block type="iot_system_close_file"></block>
  1517. <block type="iot_system_input_file">
  1518. <value name="filename">
  1519. <shadow type="text">
  1520. <field name="TEXT">cocorobo.txt</field>
  1521. </shadow>
  1522. </value>'
  1523. <value name="PATH">
  1524. <shadow type="text">
  1525. <field name="TEXT">/</field>
  1526. </shadow>
  1527. </value>'
  1528. </block>
  1529. <block type="iot_system_delete_file">
  1530. <value name="PATH">
  1531. <shadow type="text">
  1532. <field name="TEXT">/cocorobo.txt</field>
  1533. </shadow>
  1534. </value>
  1535. </block>
  1536. </category>
  1537. <category id="catMainBoard" name="Main Board" colour="#3163ed">
  1538. <category id="time" name="Basics" colour="#d42b03">
  1539. </category>
  1540. <category id="catBasics" name="Basics" colour="#d42b03">
  1541. </category>
  1542. </category>
  1543. </xml>`};var GR={exports:{}},WR={exports:{}},N7=WR.exports,gF;function P7(){return gF||(gF=1,function(e,t){(function(n,s){e.exports=s(sA())})(N7,function(n){var s=n.__namespace__,i=function(ie,Ce){return[Ce.quote_(ie.getFieldValue("COLOUR")),ce.ATOMIC]},r=function(ie,Ce){return Ce.definitions_.import_random="import random",["'#%06x' % random.randint(0, 2**24 - 1)",ce.FUNCTION_CALL]},a=function(ie,Ce){const U=Ce.provideFunction_("colour_rgb",`
  1544. def ${Ce.FUNCTION_NAME_PLACEHOLDER_}(r, g, b):
  1545. r = round(min(100, max(0, r)) * 2.55)
  1546. g = round(min(100, max(0, g)) * 2.55)
  1547. b = round(min(100, max(0, b)) * 2.55)
  1548. return '#%02x%02x%02x' % (r, g, b)
  1549. `),se=Ce.valueToCode(ie,"RED",ce.NONE)||0,ke=Ce.valueToCode(ie,"GREEN",ce.NONE)||0;return ie=Ce.valueToCode(ie,"BLUE",ce.NONE)||0,[U+"("+se+", "+ke+", "+ie+")",ce.FUNCTION_CALL]},c=function(ie,Ce){const U=Ce.provideFunction_("colour_blend",`
  1550. def ${Ce.FUNCTION_NAME_PLACEHOLDER_}(colour1, colour2, ratio):
  1551. r1, r2 = int(colour1[1:3], 16), int(colour2[1:3], 16)
  1552. g1, g2 = int(colour1[3:5], 16), int(colour2[3:5], 16)
  1553. b1, b2 = int(colour1[5:7], 16), int(colour2[5:7], 16)
  1554. ratio = min(1, max(0, ratio))
  1555. r = round(r1 * (1 - ratio) + r2 * ratio)
  1556. g = round(g1 * (1 - ratio) + g2 * ratio)
  1557. b = round(b1 * (1 - ratio) + b2 * ratio)
  1558. return '#%02x%02x%02x' % (r, g, b)
  1559. `),se=Ce.valueToCode(ie,"COLOUR1",ce.NONE)||"'#000000'",ke=Ce.valueToCode(ie,"COLOUR2",ce.NONE)||"'#000000'";return ie=Ce.valueToCode(ie,"RATIO",ce.NONE)||0,[U+"("+se+", "+ke+", "+ie+")",ce.FUNCTION_CALL]},u=function(ie,Ce){return["[]",ce.ATOMIC]},h=function(ie,Ce){const U=Array(ie.itemCount_);for(let se=0;se<ie.itemCount_;se++)U[se]=Ce.valueToCode(ie,"ADD"+se,ce.NONE)||"None";return["["+U.join(", ")+"]",ce.ATOMIC]},f=function(ie,Ce){const U=Ce.valueToCode(ie,"ITEM",ce.NONE)||"None";return ie=Ce.valueToCode(ie,"NUM",ce.MULTIPLICATIVE)||"0",["["+U+"] * "+ie,ce.MULTIPLICATIVE]},p=function(ie,Ce){return["len("+(Ce.valueToCode(ie,"VALUE",ce.NONE)||"[]")+")",ce.FUNCTION_CALL]},_=function(ie,Ce){return["not len("+(Ce.valueToCode(ie,"VALUE",ce.NONE)||"[]")+")",ce.LOGICAL_NOT]},E=function(ie,Ce){const U=Ce.valueToCode(ie,"FIND",ce.NONE)||"[]",se=Ce.valueToCode(ie,"VALUE",ce.NONE)||"''";let ke=" -1",je="",Rt=" - 1";return ie.workspace.options.oneBasedIndex&&(ke=" 0",je=" + 1",Rt=""),[(ie.getFieldValue("END")==="FIRST"?Ce.provideFunction_("first_index",`
  1560. def ${Ce.FUNCTION_NAME_PLACEHOLDER_}(my_list, elem):
  1561. try: index = my_list.index(elem)${je}
  1562. except: index =${ke}
  1563. return index
  1564. `):Ce.provideFunction_("last_index",`
  1565. def ${Ce.FUNCTION_NAME_PLACEHOLDER_}(my_list, elem):
  1566. try: index = len(my_list) - my_list[::-1].index(elem)${Rt}
  1567. except: index =${ke}
  1568. return index
  1569. `))+"("+se+", "+U+")",ce.FUNCTION_CALL]},v=function(ie,Ce){const U=ie.getFieldValue("MODE")||"GET",se=ie.getFieldValue("WHERE")||"FROM_START";var ke=Ce.valueToCode(ie,"VALUE",se==="RANDOM"?ce.NONE:ce.MEMBER)||"[]";switch(se){case"FIRST":if(U==="GET")return[ke+"[0]",ce.MEMBER];if(U==="GET_REMOVE")return[ke+".pop(0)",ce.FUNCTION_CALL];if(U==="REMOVE")return ke+`.pop(0)
  1570. `;break;case"LAST":if(U==="GET")return[ke+"[-1]",ce.MEMBER];if(U==="GET_REMOVE")return[ke+".pop()",ce.FUNCTION_CALL];if(U==="REMOVE")return ke+`.pop()
  1571. `;break;case"FROM_START":if(ie=Ce.getAdjustedInt(ie,"AT"),U==="GET")return[ke+"["+ie+"]",ce.MEMBER];if(U==="GET_REMOVE")return[ke+".pop("+ie+")",ce.FUNCTION_CALL];if(U==="REMOVE")return ke+".pop("+ie+`)
  1572. `;break;case"FROM_END":if(ie=Ce.getAdjustedInt(ie,"AT",1,!0),U==="GET")return[ke+"["+ie+"]",ce.MEMBER];if(U==="GET_REMOVE")return[ke+".pop("+ie+")",ce.FUNCTION_CALL];if(U==="REMOVE")return ke+".pop("+ie+`)
  1573. `;break;case"RANDOM":if(Ce.definitions_.import_random="import random",U==="GET")return["random.choice("+ke+")",ce.FUNCTION_CALL];if(ke=Ce.provideFunction_("lists_remove_random_item",`
  1574. def ${Ce.FUNCTION_NAME_PLACEHOLDER_}(myList):
  1575. x = int(random.random() * len(myList))
  1576. return myList.pop(x)
  1577. `)+"("+ke+")",U==="GET_REMOVE")return[ke,ce.FUNCTION_CALL];if(U==="REMOVE")return ke+`
  1578. `}throw Error("Unhandled combination (lists_getIndex).")},b=function(ie,Ce){let U=Ce.valueToCode(ie,"LIST",ce.MEMBER)||"[]";const se=ie.getFieldValue("MODE")||"GET";var ke=ie.getFieldValue("WHERE")||"FROM_START";const je=Ce.valueToCode(ie,"TO",ce.NONE)||"None";switch(ke){case"FIRST":if(se==="SET")return U+"[0] = "+je+`
  1579. `;if(se==="INSERT")return U+".insert(0, "+je+`)
  1580. `;break;case"LAST":if(se==="SET")return U+"[-1] = "+je+`
  1581. `;if(se==="INSERT")return U+".append("+je+`)
  1582. `;break;case"FROM_START":if(Ce=Ce.getAdjustedInt(ie,"AT"),se==="SET")return U+"["+Ce+"] = "+je+`
  1583. `;if(se==="INSERT")return U+".insert("+Ce+", "+je+`)
  1584. `;break;case"FROM_END":if(Ce=Ce.getAdjustedInt(ie,"AT",1,!0),se==="SET")return U+"["+Ce+"] = "+je+`
  1585. `;if(se==="INSERT")return U+".insert("+Ce+", "+je+`)
  1586. `;break;case"RANDOM":if(Ce.definitions_.import_random="import random",U.match(/^\w+$/)?ie="":(ie=Ce.nameDB_.getDistinctName("tmp_list",s.NameType$$module$build$src$core$names.VARIABLE),ke=ie+" = "+U+`
  1587. `,U=ie,ie=ke),Ce=Ce.nameDB_.getDistinctName("tmp_x",s.NameType$$module$build$src$core$names.VARIABLE),ie+=Ce+" = int(random.random() * len("+U+`))
  1588. `,se==="SET")return ie+(U+"["+Ce+"] = "+je+`
  1589. `);if(se==="INSERT")return ie+(U+".insert("+Ce+", "+je+`)
  1590. `)}throw Error("Unhandled combination (lists_setIndex).")},y=function(ie,Ce){const U=Ce.valueToCode(ie,"LIST",ce.MEMBER)||"[]";var se=ie.getFieldValue("WHERE1");const ke=ie.getFieldValue("WHERE2");switch(se){case"FROM_START":se=Ce.getAdjustedInt(ie,"AT1"),se===0&&(se="");break;case"FROM_END":se=Ce.getAdjustedInt(ie,"AT1",1,!0);break;case"FIRST":se="";break;default:throw Error("Unhandled option (lists_getSublist)")}switch(ke){case"FROM_START":ie=Ce.getAdjustedInt(ie,"AT2",1);break;case"FROM_END":ie=Ce.getAdjustedInt(ie,"AT2",0,!0),s.isNumber$$module$build$src$core$utils$string(String(ie))?ie===0&&(ie=""):(Ce.definitions_.import_sys="import sys",ie+=" or sys.maxsize");break;case"LAST":ie="";break;default:throw Error("Unhandled option (lists_getSublist)")}return[U+"["+se+" : "+ie+"]",ce.MEMBER]},S=function(ie,Ce){const U=Ce.valueToCode(ie,"LIST",ce.NONE)||"[]",se=ie.getFieldValue("TYPE");return ie=ie.getFieldValue("DIRECTION")==="1"?"False":"True",[Ce.provideFunction_("lists_sort",`
  1591. def ${Ce.FUNCTION_NAME_PLACEHOLDER_}(my_list, type, reverse):
  1592. def try_float(s):
  1593. try:
  1594. return float(s)
  1595. except:
  1596. return 0
  1597. key_funcs = {
  1598. "NUMERIC": try_float,
  1599. "TEXT": str,
  1600. "IGNORE_CASE": lambda s: str(s).lower()
  1601. }
  1602. key_func = key_funcs[type]
  1603. list_cpy = list(my_list)
  1604. return sorted(list_cpy, key=key_func, reverse=reverse)
  1605. `)+"("+U+', "'+se+'", '+ie+")",ce.FUNCTION_CALL]},L=function(ie,Ce){var U=ie.getFieldValue("MODE");if(U==="SPLIT")U=Ce.valueToCode(ie,"INPUT",ce.MEMBER)||"''",ie=Ce.valueToCode(ie,"DELIM",ce.NONE),ie=U+".split("+ie+")";else if(U==="JOIN")U=Ce.valueToCode(ie,"INPUT",ce.NONE)||"[]",ie=(Ce.valueToCode(ie,"DELIM",ce.MEMBER)||"''")+".join("+U+")";else throw Error("Unknown mode: "+U);return[ie,ce.FUNCTION_CALL]},I=function(ie,Ce){return["list(reversed("+(Ce.valueToCode(ie,"LIST",ce.NONE)||"[]")+"))",ce.FUNCTION_CALL]},R=function(ie,Ce){let U=0,se="",ke,je;Ce.STATEMENT_PREFIX&&(se+=Ce.injectId(Ce.STATEMENT_PREFIX,ie));do je=Ce.valueToCode(ie,"IF"+U,ce.NONE)||"False",ke=Ce.statementToCode(ie,"DO"+U)||Ce.PASS,Ce.STATEMENT_SUFFIX&&(ke=Ce.prefixLines(Ce.injectId(Ce.STATEMENT_SUFFIX,ie),Ce.INDENT)+ke),se+=(U===0?"if ":"elif ")+je+`:
  1606. `+ke,U++;while(ie.getInput("IF"+U));return(ie.getInput("ELSE")||Ce.STATEMENT_SUFFIX)&&(ke=Ce.statementToCode(ie,"ELSE")||Ce.PASS,Ce.STATEMENT_SUFFIX&&(ke=Ce.prefixLines(Ce.injectId(Ce.STATEMENT_SUFFIX,ie),Ce.INDENT)+ke),se+=`else:
  1607. `+ke),se},w=function(ie,Ce){const U={EQ:"==",NEQ:"!=",LT:"<",LTE:"<=",GT:">",GTE:">="}[ie.getFieldValue("OP")],se=ce.RELATIONAL,ke=Ce.valueToCode(ie,"A",se)||"0";return ie=Ce.valueToCode(ie,"B",se)||"0",[ke+" "+U+" "+ie,se]},k=function(ie,Ce){const U=ie.getFieldValue("OP")==="AND"?"and":"or",se=U==="and"?ce.LOGICAL_AND:ce.LOGICAL_OR;let ke=Ce.valueToCode(ie,"A",se);return ie=Ce.valueToCode(ie,"B",se),ke||ie?(Ce=U==="and"?"True":"False",ke||(ke=Ce),ie||(ie=Ce)):ie=ke="False",[ke+" "+U+" "+ie,se]},D=function(ie,Ce){return["not "+(Ce.valueToCode(ie,"BOOL",ce.LOGICAL_NOT)||"True"),ce.LOGICAL_NOT]},P=function(ie,Ce){return[ie.getFieldValue("BOOL")==="TRUE"?"True":"False",ce.ATOMIC]},B=function(ie,Ce){return["None",ce.ATOMIC]},F=function(ie,Ce){const U=Ce.valueToCode(ie,"IF",ce.CONDITIONAL)||"False",se=Ce.valueToCode(ie,"THEN",ce.CONDITIONAL)||"None";return ie=Ce.valueToCode(ie,"ELSE",ce.CONDITIONAL)||"None",[se+" if "+U+" else "+ie,ce.CONDITIONAL]},X=function(ie,Ce){let U;U=ie.getField("TIMES")?String(parseInt(ie.getFieldValue("TIMES"),10)):Ce.valueToCode(ie,"TIMES",ce.NONE)||"0",U=s.isNumber$$module$build$src$core$utils$string(U)?parseInt(U,10):"int("+U+")";let se=Ce.statementToCode(ie,"DO");return se=Ce.addLoopTrap(se,ie)||Ce.PASS,"for "+Ce.nameDB_.getDistinctName("count",s.NameType$$module$build$src$core$names.VARIABLE)+" in range("+U+`):
  1608. `+se},G=function(ie,Ce){const U=ie.getFieldValue("MODE")==="UNTIL";let se=Ce.valueToCode(ie,"BOOL",U?ce.LOGICAL_NOT:ce.NONE)||"False",ke=Ce.statementToCode(ie,"DO");return ke=Ce.addLoopTrap(ke,ie)||Ce.PASS,U&&(se="not "+se),"while "+se+`:
  1609. `+ke},re=function(ie,Ce){const U=Ce.getVariableName(ie.getFieldValue("VAR"));var se=Ce.valueToCode(ie,"FROM",ce.NONE)||"0",ke=Ce.valueToCode(ie,"TO",ce.NONE)||"0",je=Ce.valueToCode(ie,"BY",ce.NONE)||"1";let Rt=Ce.statementToCode(ie,"DO");Rt=Ce.addLoopTrap(Rt,ie)||Ce.PASS;let Qt="";ie=function(){return Ce.provideFunction_("upRange",`
  1610. def ${Ce.FUNCTION_NAME_PLACEHOLDER_}(start, stop, step):
  1611. while start <= stop:
  1612. yield start
  1613. start += abs(step)
  1614. `)};const Cn=function(){return Ce.provideFunction_("downRange",`
  1615. def ${Ce.FUNCTION_NAME_PLACEHOLDER_}(start, stop, step):
  1616. while start >= stop:
  1617. yield start
  1618. start -= abs(step)
  1619. `)};if(s.isNumber$$module$build$src$core$utils$string(se)&&s.isNumber$$module$build$src$core$utils$string(ke)&&s.isNumber$$module$build$src$core$utils$string(je))se=Number(se),ke=Number(ke),je=Math.abs(Number(je)),se%1===0&&ke%1===0&&je%1===0?(se<=ke?(ke++,ie=se===0&&je===1?ke:se+", "+ke,je!==1&&(ie+=", "+je)):(ke--,ie=se+", "+ke+", -"+je),ie="range("+ie+")"):(ie=se<ke?ie():Cn(),ie+="("+se+", "+ke+", "+je+")");else{const fs=function(ps,js){return s.isNumber$$module$build$src$core$utils$string(ps)?ps=String(Number(ps)):ps.match(/^\w+$/)||(js=Ce.nameDB_.getDistinctName(U+js,s.NameType$$module$build$src$core$names.VARIABLE),Qt+=js+" = "+ps+`
  1620. `,ps=js),ps};se=fs(se,"_start"),ke=fs(ke,"_end"),je=fs(je,"_inc"),typeof se=="number"&&typeof ke=="number"?(ie=se<ke?ie():Cn(),ie+="("+se+", "+ke+", "+je+")"):ie="("+se+" <= "+ke+") and "+ie()+"("+se+", "+ke+", "+je+") or "+Cn()+"("+se+", "+ke+", "+je+")"}return Qt+="for "+U+" in "+ie+`:
  1621. `+Rt},_e=function(ie,Ce){const U=Ce.getVariableName(ie.getFieldValue("VAR")),se=Ce.valueToCode(ie,"LIST",ce.RELATIONAL)||"[]";let ke=Ce.statementToCode(ie,"DO");return ke=Ce.addLoopTrap(ke,ie)||Ce.PASS,"for "+U+" in "+se+`:
  1622. `+ke},J=function(ie,Ce){let U="";if(Ce.STATEMENT_PREFIX&&(U+=Ce.injectId(Ce.STATEMENT_PREFIX,ie)),Ce.STATEMENT_SUFFIX&&(U+=Ce.injectId(Ce.STATEMENT_SUFFIX,ie)),Ce.STATEMENT_PREFIX){const se=ie.getSurroundLoop();se&&!se.suppressPrefixSuffix&&(U+=Ce.injectId(Ce.STATEMENT_PREFIX,se))}switch(ie.getFieldValue("FLOW")){case"BREAK":return U+`break
  1623. `;case"CONTINUE":return U+`continue
  1624. `}throw Error("Unknown flow statement.")},Y=function(ie,Ce){return ie=Number(ie.getFieldValue("NUM")),ie===1/0?['float("inf")',ce.FUNCTION_CALL]:ie===-1/0?['-float("inf")',ce.UNARY_SIGN]:[String(ie),0>ie?ce.UNARY_SIGN:ce.ATOMIC]},ae=function(ie,Ce){var U={ADD:[" + ",ce.ADDITIVE],MINUS:[" - ",ce.ADDITIVE],MULTIPLY:[" * ",ce.MULTIPLICATIVE],DIVIDE:[" / ",ce.MULTIPLICATIVE],POWER:[" ** ",ce.EXPONENTIATION]}[ie.getFieldValue("OP")];const se=U[0];U=U[1];const ke=Ce.valueToCode(ie,"A",U)||"0";return ie=Ce.valueToCode(ie,"B",U)||"0",[ke+se+ie,U]},Z=function(ie,Ce){const U=ie.getFieldValue("OP");let se;if(U==="NEG")return se=Ce.valueToCode(ie,"NUM",ce.UNARY_SIGN)||"0",["-"+se,ce.UNARY_SIGN];switch(Ce.definitions_.import_math="import math",ie=U==="SIN"||U==="COS"||U==="TAN"?Ce.valueToCode(ie,"NUM",ce.MULTIPLICATIVE)||"0":Ce.valueToCode(ie,"NUM",ce.NONE)||"0",U){case"ABS":se="math.fabs("+ie+")";break;case"ROOT":se="math.sqrt("+ie+")";break;case"LN":se="math.log("+ie+")";break;case"LOG10":se="math.log10("+ie+")";break;case"EXP":se="math.exp("+ie+")";break;case"POW10":se="math.pow(10,"+ie+")";break;case"ROUND":se="round("+ie+")";break;case"ROUNDUP":se="math.ceil("+ie+")";break;case"ROUNDDOWN":se="math.floor("+ie+")";break;case"SIN":se="math.sin("+ie+" / 180.0 * math.pi)";break;case"COS":se="math.cos("+ie+" / 180.0 * math.pi)";break;case"TAN":se="math.tan("+ie+" / 180.0 * math.pi)"}if(se)return[se,ce.FUNCTION_CALL];switch(U){case"ASIN":se="math.asin("+ie+") / math.pi * 180";break;case"ACOS":se="math.acos("+ie+") / math.pi * 180";break;case"ATAN":se="math.atan("+ie+") / math.pi * 180";break;default:throw Error("Unknown math operator: "+U)}return[se,ce.MULTIPLICATIVE]},Q=function(ie,Ce){const U={PI:["math.pi",ce.MEMBER],E:["math.e",ce.MEMBER],GOLDEN_RATIO:["(1 + math.sqrt(5)) / 2",ce.MULTIPLICATIVE],SQRT2:["math.sqrt(2)",ce.MEMBER],SQRT1_2:["math.sqrt(1.0 / 2)",ce.MEMBER],INFINITY:["float('inf')",ce.ATOMIC]};return ie=ie.getFieldValue("CONSTANT"),ie!=="INFINITY"&&(Ce.definitions_.import_math="import math"),U[ie]},he=function(ie,Ce){var U={EVEN:[" % 2 == 0",ce.MULTIPLICATIVE,ce.RELATIONAL],ODD:[" % 2 == 1",ce.MULTIPLICATIVE,ce.RELATIONAL],WHOLE:[" % 1 == 0",ce.MULTIPLICATIVE,ce.RELATIONAL],POSITIVE:[" > 0",ce.RELATIONAL,ce.RELATIONAL],NEGATIVE:[" < 0",ce.RELATIONAL,ce.RELATIONAL],DIVISIBLE_BY:[null,ce.MULTIPLICATIVE,ce.RELATIONAL],PRIME:[null,ce.NONE,ce.FUNCTION_CALL]};const se=ie.getFieldValue("PROPERTY"),[ke,je,Rt]=U[se];if(U=Ce.valueToCode(ie,"NUMBER_TO_CHECK",je)||"0",se==="PRIME")Ce.definitions_.import_math="import math",Ce.definitions_.from_numbers_import_Number="from numbers import Number",ie=Ce.provideFunction_("math_isPrime",`
  1625. def ${Ce.FUNCTION_NAME_PLACEHOLDER_}(n):
  1626. # https://en.wikipedia.org/wiki/Primality_test#Naive_methods
  1627. # If n is not a number but a string, try parsing it.
  1628. if not isinstance(n, Number):
  1629. try:
  1630. n = float(n)
  1631. except:
  1632. return False
  1633. if n == 2 or n == 3:
  1634. return True
  1635. # False if n is negative, is 1, or not whole, or if n is divisible by 2 or 3.
  1636. if n <= 1 or n % 1 != 0 or n % 2 == 0 or n % 3 == 0:
  1637. return False
  1638. # Check all the numbers of form 6k +/- 1, up to sqrt(n).
  1639. for x in range(6, int(math.sqrt(n)) + 2, 6):
  1640. if n % (x - 1) == 0 or n % (x + 1) == 0:
  1641. return False
  1642. return True
  1643. `)+"("+U+")";else if(se==="DIVISIBLE_BY"){if(ie=Ce.valueToCode(ie,"DIVISOR",ce.MULTIPLICATIVE)||"0",ie==="0")return["False",ce.ATOMIC];ie=U+" % "+ie+" == 0"}else ie=U+ke;return[ie,Rt]},ge=function(ie,Ce){Ce.definitions_.from_numbers_import_Number="from numbers import Number";const U=Ce.valueToCode(ie,"DELTA",ce.ADDITIVE)||"0";return ie=Ce.getVariableName(ie.getFieldValue("VAR")),ie+" = ("+ie+" if isinstance("+ie+", Number) else 0) + "+U+`
  1644. `},Ie=function(ie,Ce){const U=ie.getFieldValue("OP");switch(ie=Ce.valueToCode(ie,"LIST",ce.NONE)||"[]",U){case"SUM":Ce="sum("+ie+")";break;case"MIN":Ce="min("+ie+")";break;case"MAX":Ce="max("+ie+")";break;case"AVERAGE":Ce.definitions_.from_numbers_import_Number="from numbers import Number",Ce=Ce.provideFunction_("math_mean",`
  1645. def ${Ce.FUNCTION_NAME_PLACEHOLDER_}(myList):
  1646. localList = [e for e in myList if isinstance(e, Number)]
  1647. if not localList: return
  1648. return float(sum(localList)) / len(localList)
  1649. `)+"("+ie+")";break;case"MEDIAN":Ce.definitions_.from_numbers_import_Number="from numbers import Number",Ce=Ce.provideFunction_("math_median",`
  1650. def ${Ce.FUNCTION_NAME_PLACEHOLDER_}(myList):
  1651. localList = sorted([e for e in myList if isinstance(e, Number)])
  1652. if not localList: return
  1653. if len(localList) % 2 == 0:
  1654. return (localList[len(localList) // 2 - 1] + localList[len(localList) // 2]) / 2.0
  1655. else:
  1656. return localList[(len(localList) - 1) // 2]
  1657. `)+"("+ie+")";break;case"MODE":Ce=Ce.provideFunction_("math_modes",`
  1658. def ${Ce.FUNCTION_NAME_PLACEHOLDER_}(some_list):
  1659. modes = []
  1660. # Using a lists of [item, count] to keep count rather than dict
  1661. # to avoid "unhashable" errors when the counted item is itself a list or dict.
  1662. counts = []
  1663. maxCount = 1
  1664. for item in some_list:
  1665. found = False
  1666. for count in counts:
  1667. if count[0] == item:
  1668. count[1] += 1
  1669. maxCount = max(maxCount, count[1])
  1670. found = True
  1671. if not found:
  1672. counts.append([item, 1])
  1673. for counted_item, item_count in counts:
  1674. if item_count == maxCount:
  1675. modes.append(counted_item)
  1676. return modes
  1677. `)+"("+ie+")";break;case"STD_DEV":Ce.definitions_.import_math="import math",Ce=Ce.provideFunction_("math_standard_deviation",`
  1678. def ${Ce.FUNCTION_NAME_PLACEHOLDER_}(numbers):
  1679. n = len(numbers)
  1680. if n == 0: return
  1681. mean = float(sum(numbers)) / n
  1682. variance = sum((x - mean) ** 2 for x in numbers) / n
  1683. return math.sqrt(variance)
  1684. `)+"("+ie+")";break;case"RANDOM":Ce.definitions_.import_random="import random",Ce="random.choice("+ie+")";break;default:throw Error("Unknown operator: "+U)}return[Ce,ce.FUNCTION_CALL]},be=function(ie,Ce){const U=Ce.valueToCode(ie,"DIVIDEND",ce.MULTIPLICATIVE)||"0";return ie=Ce.valueToCode(ie,"DIVISOR",ce.MULTIPLICATIVE)||"0",[U+" % "+ie,ce.MULTIPLICATIVE]},Ae=function(ie,Ce){const U=Ce.valueToCode(ie,"VALUE",ce.NONE)||"0",se=Ce.valueToCode(ie,"LOW",ce.NONE)||"0";return ie=Ce.valueToCode(ie,"HIGH",ce.NONE)||"float('inf')",["min(max("+U+", "+se+"), "+ie+")",ce.FUNCTION_CALL]},We=function(ie,Ce){Ce.definitions_.import_random="import random";const U=Ce.valueToCode(ie,"FROM",ce.NONE)||"0";return ie=Ce.valueToCode(ie,"TO",ce.NONE)||"0",["random.randint("+U+", "+ie+")",ce.FUNCTION_CALL]},$e=function(ie,Ce){return Ce.definitions_.import_random="import random",["random.random()",ce.FUNCTION_CALL]},ve=function(ie,Ce){Ce.definitions_.import_math="import math";const U=Ce.valueToCode(ie,"X",ce.NONE)||"0";return["math.atan2("+(Ce.valueToCode(ie,"Y",ce.NONE)||"0")+", "+U+") / math.pi * 180",ce.MULTIPLICATIVE]},Pe=function(ie,Ce){var U=[],se=ie.workspace,ke=s.allUsedVarModels$$module$build$src$core$variables(se)||[];for(var je of ke)ke=je.name,ie.getVars().indexOf(ke)===-1&&U.push(Ce.getVariableName(ke));for(se=s.allDeveloperVariables$$module$build$src$core$variables(se),je=0;je<se.length;je++)U.push(Ce.nameDB_.getName(se[je],s.NameType$$module$build$src$core$names.DEVELOPER_VARIABLE));se=U.length?Ce.INDENT+"global "+U.join(", ")+`
  1685. `:"",U=Ce.getProcedureName(ie.getFieldValue("NAME")),je="",Ce.STATEMENT_PREFIX&&(je+=Ce.injectId(Ce.STATEMENT_PREFIX,ie)),Ce.STATEMENT_SUFFIX&&(je+=Ce.injectId(Ce.STATEMENT_SUFFIX,ie)),je&&(je=Ce.prefixLines(je,Ce.INDENT)),ke="",Ce.INFINITE_LOOP_TRAP&&(ke=Ce.prefixLines(Ce.injectId(Ce.INFINITE_LOOP_TRAP,ie),Ce.INDENT));let Rt=Ce.statementToCode(ie,"STACK"),Qt=Ce.valueToCode(ie,"RETURN",ce.NONE)||"",Cn="";Rt&&Qt&&(Cn=je),Qt?Qt=Ce.INDENT+"return "+Qt+`
  1686. `:Rt||(Rt=Ce.PASS);const fs=[],ps=ie.getVars();for(let js=0;js<ps.length;js++)fs[js]=Ce.getVariableName(ps[js]);return se="def "+U+"("+fs.join(", ")+`):
  1687. `+se+je+ke+Rt+Cn+Qt,se=Ce.scrub_(ie,se),Ce.definitions_["%"+U]=se,null},Be=function(ie,Ce){const U=Ce.getProcedureName(ie.getFieldValue("NAME")),se=[],ke=ie.getVars();for(let je=0;je<ke.length;je++)se[je]=Ce.valueToCode(ie,"ARG"+je,ce.NONE)||"None";return[U+"("+se.join(", ")+")",ce.FUNCTION_CALL]},ot=function(ie,Ce){return Ce.forBlock.procedures_callreturn(ie,Ce)[0]+`
  1688. `},Xe=function(ie,Ce){let U="if "+(Ce.valueToCode(ie,"CONDITION",ce.NONE)||"False")+`:
  1689. `;return Ce.STATEMENT_SUFFIX&&(U+=Ce.prefixLines(Ce.injectId(Ce.STATEMENT_SUFFIX,ie),Ce.INDENT)),ie.hasReturnValue_?(ie=Ce.valueToCode(ie,"VALUE",ce.NONE)||"None",U+=Ce.INDENT+"return "+ie+`
  1690. `):U+=Ce.INDENT+`return
  1691. `,U},ee=function(ie,Ce){return[Ce.quote_(ie.getFieldValue("TEXT")),ce.ATOMIC]},pe=function(ie,Ce){return ie=Ce.multiline_quote_(ie.getFieldValue("TEXT")),Ce=ie.indexOf("+")!==-1?ce.ADDITIVE:ce.ATOMIC,[ie,Ce]},Oe=function(ie,Ce){switch(ie.itemCount_){case 0:return["''",ce.ATOMIC];case 1:return ie=Ce.valueToCode(ie,"ADD0",ce.NONE)||"''",En(ie);case 2:var U=Ce.valueToCode(ie,"ADD0",ce.NONE)||"''";return ie=Ce.valueToCode(ie,"ADD1",ce.NONE)||"''",[En(U)[0]+" + "+En(ie)[0],ce.ADDITIVE];default:U=[];for(let se=0;se<ie.itemCount_;se++)U[se]=Ce.valueToCode(ie,"ADD"+se,ce.NONE)||"''";return ie=Ce.nameDB_.getDistinctName("x",s.NameType$$module$build$src$core$names.VARIABLE),["''.join([str("+ie+") for "+ie+" in ["+U.join(", ")+"]])",ce.FUNCTION_CALL]}},ze=function(ie,Ce){const U=Ce.getVariableName(ie.getFieldValue("VAR"));return ie=Ce.valueToCode(ie,"TEXT",ce.NONE)||"''",U+" = str("+U+") + "+En(ie)[0]+`
  1692. `},Ze=function(ie,Ce){return["len("+(Ce.valueToCode(ie,"VALUE",ce.NONE)||"''")+")",ce.FUNCTION_CALL]},De=function(ie,Ce){return["not len("+(Ce.valueToCode(ie,"VALUE",ce.NONE)||"''")+")",ce.LOGICAL_NOT]},me=function(ie,Ce){const U=ie.getFieldValue("END")==="FIRST"?"find":"rfind",se=Ce.valueToCode(ie,"FIND",ce.NONE)||"''";return Ce=(Ce.valueToCode(ie,"VALUE",ce.MEMBER)||"''")+"."+U+"("+se+")",ie.workspace.options.oneBasedIndex?[Ce+" + 1",ce.ADDITIVE]:[Ce,ce.FUNCTION_CALL]},Te=function(ie,Ce){const U=ie.getFieldValue("WHERE")||"FROM_START",se=Ce.valueToCode(ie,"VALUE",U==="RANDOM"?ce.NONE:ce.MEMBER)||"''";switch(U){case"FIRST":return[se+"[0]",ce.MEMBER];case"LAST":return[se+"[-1]",ce.MEMBER];case"FROM_START":return ie=Ce.getAdjustedInt(ie,"AT"),[se+"["+ie+"]",ce.MEMBER];case"FROM_END":return ie=Ce.getAdjustedInt(ie,"AT",1,!0),[se+"["+ie+"]",ce.MEMBER];case"RANDOM":return Ce.definitions_.import_random="import random",[Ce.provideFunction_("text_random_letter",`
  1693. def ${Ce.FUNCTION_NAME_PLACEHOLDER_}(text):
  1694. x = int(random.random() * len(text))
  1695. return text[x]
  1696. `)+"("+se+")",ce.FUNCTION_CALL]}throw Error("Unhandled option (text_charAt).")},Ue=function(ie,Ce){var U=ie.getFieldValue("WHERE1");const se=ie.getFieldValue("WHERE2"),ke=Ce.valueToCode(ie,"STRING",ce.MEMBER)||"''";switch(U){case"FROM_START":U=Ce.getAdjustedInt(ie,"AT1"),U===0&&(U="");break;case"FROM_END":U=Ce.getAdjustedInt(ie,"AT1",1,!0);break;case"FIRST":U="";break;default:throw Error("Unhandled option (text_getSubstring)")}switch(se){case"FROM_START":ie=Ce.getAdjustedInt(ie,"AT2",1);break;case"FROM_END":ie=Ce.getAdjustedInt(ie,"AT2",0,!0),s.isNumber$$module$build$src$core$utils$string(String(ie))?ie===0&&(ie=""):(Ce.definitions_.import_sys="import sys",ie+=" or sys.maxsize");break;case"LAST":ie="";break;default:throw Error("Unhandled option (text_getSubstring)")}return[ke+"["+U+" : "+ie+"]",ce.MEMBER]},qe=function(ie,Ce){const U={UPPERCASE:".upper()",LOWERCASE:".lower()",TITLECASE:".title()"}[ie.getFieldValue("CASE")];return[(Ce.valueToCode(ie,"TEXT",ce.MEMBER)||"''")+U,ce.FUNCTION_CALL]},ct=function(ie,Ce){const U={LEFT:".lstrip()",RIGHT:".rstrip()",BOTH:".strip()"}[ie.getFieldValue("MODE")];return[(Ce.valueToCode(ie,"TEXT",ce.MEMBER)||"''")+U,ce.FUNCTION_CALL]},Ne=function(ie,Ce){return"print("+(Ce.valueToCode(ie,"TEXT",ce.NONE)||"''")+`)
  1697. `},Se=function(ie,Ce){var U=Ce.provideFunction_("text_prompt",`
  1698. def ${Ce.FUNCTION_NAME_PLACEHOLDER_}(msg):
  1699. try:
  1700. return raw_input(msg)
  1701. except NameError:
  1702. return input(msg)
  1703. `);return Ce=ie.getField("TEXT")?Ce.quote_(ie.getFieldValue("TEXT")):Ce.valueToCode(ie,"TEXT",ce.NONE)||"''",U=U+"("+Ce+")",ie.getFieldValue("TYPE")==="NUMBER"&&(U="float("+U+")"),[U,ce.FUNCTION_CALL]},Je=function(ie,Ce){const U=Ce.valueToCode(ie,"TEXT",ce.MEMBER)||"''";return ie=Ce.valueToCode(ie,"SUB",ce.NONE)||"''",[U+".count("+ie+")",ce.FUNCTION_CALL]},ut=function(ie,Ce){const U=Ce.valueToCode(ie,"TEXT",ce.MEMBER)||"''",se=Ce.valueToCode(ie,"FROM",ce.NONE)||"''";return ie=Ce.valueToCode(ie,"TO",ce.NONE)||"''",[U+".replace("+se+", "+ie+")",ce.MEMBER]},Mt=function(ie,Ce){return[(Ce.valueToCode(ie,"TEXT",ce.MEMBER)||"''")+"[::-1]",ce.MEMBER]},mt=function(ie,Ce){return[Ce.getVariableName(ie.getFieldValue("VAR")),ce.ATOMIC]},qt=function(ie,Ce){const U=Ce.valueToCode(ie,"VALUE",ce.NONE)||"0";return Ce.getVariableName(ie.getFieldValue("VAR"))+" = "+U+`
  1704. `},ce;(function(ie){ie[ie.ATOMIC=0]="ATOMIC",ie[ie.COLLECTION=1]="COLLECTION",ie[ie.STRING_CONVERSION=1]="STRING_CONVERSION",ie[ie.MEMBER=2.1]="MEMBER",ie[ie.FUNCTION_CALL=2.2]="FUNCTION_CALL",ie[ie.EXPONENTIATION=3]="EXPONENTIATION",ie[ie.UNARY_SIGN=4]="UNARY_SIGN",ie[ie.BITWISE_NOT=4]="BITWISE_NOT",ie[ie.MULTIPLICATIVE=5]="MULTIPLICATIVE",ie[ie.ADDITIVE=6]="ADDITIVE",ie[ie.BITWISE_SHIFT=7]="BITWISE_SHIFT",ie[ie.BITWISE_AND=8]="BITWISE_AND",ie[ie.BITWISE_XOR=9]="BITWISE_XOR",ie[ie.BITWISE_OR=10]="BITWISE_OR",ie[ie.RELATIONAL=11]="RELATIONAL",ie[ie.LOGICAL_NOT=12]="LOGICAL_NOT",ie[ie.LOGICAL_AND=13]="LOGICAL_AND",ie[ie.LOGICAL_OR=14]="LOGICAL_OR",ie[ie.CONDITIONAL=15]="CONDITIONAL",ie[ie.LAMBDA=16]="LAMBDA",ie[ie.NONE=99]="NONE"})(ce||(ce={}));var q=class extends s.CodeGenerator$$module$build$src$core$generator{constructor(ie="Python"){super(ie),this.ORDER_OVERRIDES=[[ce.FUNCTION_CALL,ce.MEMBER],[ce.FUNCTION_CALL,ce.FUNCTION_CALL],[ce.MEMBER,ce.MEMBER],[ce.MEMBER,ce.FUNCTION_CALL],[ce.LOGICAL_NOT,ce.LOGICAL_NOT],[ce.LOGICAL_AND,ce.LOGICAL_AND],[ce.LOGICAL_OR,ce.LOGICAL_OR]],this.PASS="",this.isInitialized=!1;for(const Ce in ce)ie=ce[Ce],typeof ie!="string"&&(this["ORDER_"+Ce]=ie);this.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip")}init(ie){super.init(ie),this.PASS=this.INDENT+`pass
  1705. `,this.nameDB_?this.nameDB_.reset():this.nameDB_=new s.Names$$module$build$src$core$names(this.RESERVED_WORDS_),this.nameDB_.setVariableMap(ie.getVariableMap()),this.nameDB_.populateVariables(ie),this.nameDB_.populateProcedures(ie);const Ce=[];var U=s.allDeveloperVariables$$module$build$src$core$variables(ie);for(let se=0;se<U.length;se++)Ce.push(this.nameDB_.getName(U[se],s.Names$$module$build$src$core$names.DEVELOPER_VARIABLE_TYPE)+" = None");for(ie=s.allUsedVarModels$$module$build$src$core$variables(ie),U=0;U<ie.length;U++)Ce.push(this.getVariableName(ie[U].getId())+" = None");this.definitions_.variables=Ce.join(`
  1706. `),this.isInitialized=!0}finish(ie){const Ce=[],U=[];for(let se in this.definitions_){const ke=this.definitions_[se];ke.match(/^(from\s+\S+\s+)?import\s+\S+/)?Ce.push(ke):U.push(ke)}return ie=super.finish(ie),this.isInitialized=!1,this.nameDB_.reset(),(Ce.join(`
  1707. `)+`
  1708. `+U.join(`
  1709. `)).replace(/\n\n+/g,`
  1710. `).replace(/\n*$/,`
  1711. `)+ie}scrubNakedValue(ie){return ie+`
  1712. `}quote_(ie){ie=ie.replace(/\\/g,"\\\\").replace(/\n/g,`\\
  1713. `);let Ce="'";return ie.indexOf("'")!==-1&&(ie.indexOf('"')===-1?Ce='"':ie=ie.replace(/'/g,"\\'")),Ce+ie+Ce}multiline_quote_(ie){return ie.split(/\n/g).map(this.quote_).join(` + '\\n' +
  1714. `)}scrub_(ie,Ce,U=!1){let se="";if(!ie.outputConnection||!ie.outputConnection.targetConnection){var ke=ie.getCommentText();ke&&(ke=s.wrap$$module$build$src$core$utils$string(ke,this.COMMENT_WRAP-3),se+=this.prefixLines(ke+`
  1715. `,"# "));for(let je=0;je<ie.inputList.length;je++)ie.inputList[je].type===s.inputTypes$$module$build$src$core$inputs$input_types.VALUE&&(ke=ie.inputList[je].connection.targetBlock())&&(ke=this.allNestedComments(ke))&&(se+=this.prefixLines(ke,"# "))}return ie=ie.nextConnection&&ie.nextConnection.targetBlock(),U=U?"":this.blockToCode(ie),se+Ce+U}getAdjustedInt(ie,Ce,U=0,se=!1){ie.workspace.options.oneBasedIndex&&U--;const ke=ie.workspace.options.oneBasedIndex?"1":"0";return ie=this.valueToCode(ie,Ce,U?ce.ADDITIVE:ce.NONE)||ke,s.isNumber$$module$build$src$core$utils$string(ie)?(ie=parseInt(ie,10)+U,se&&(ie=-ie)):(ie=0<U?"int("+ie+" + "+U+")":0>U?"int("+ie+" - "+-U+")":"int("+ie+")",se&&(ie="-"+ie)),ie}},ne={};ne.colour_blend=c,ne.colour_picker=i,ne.colour_random=r,ne.colour_rgb=a;var Le={};Le.lists_create_empty=u,Le.lists_create_with=h,Le.lists_getIndex=v,Le.lists_getSublist=y,Le.lists_indexOf=E,Le.lists_isEmpty=_,Le.lists_length=p,Le.lists_repeat=f,Le.lists_reverse=I,Le.lists_setIndex=b,Le.lists_sort=S,Le.lists_split=L;var ue={};ue.controls_if=R,ue.controls_ifelse=R,ue.logic_boolean=P,ue.logic_compare=w,ue.logic_negate=D,ue.logic_null=B,ue.logic_operation=k,ue.logic_ternary=F;var Fe={};Fe.controls_flow_statements=J,Fe.controls_for=re,Fe.controls_forEach=_e,Fe.controls_repeat=X,Fe.controls_repeat_ext=X,Fe.controls_whileUntil=G;var ye={};ye.math_arithmetic=ae,ye.math_atan2=ve,ye.math_change=ge,ye.math_constant=Q,ye.math_constrain=Ae,ye.math_modulo=be,ye.math_number=Y,ye.math_number_property=he,ye.math_on_list=Ie,ye.math_random_float=$e,ye.math_random_int=We,ye.math_round=Z,ye.math_single=Z,ye.math_trig=Z;var ft={};ft.procedures_callnoreturn=ot,ft.procedures_callreturn=Be,ft.procedures_defnoreturn=Pe,ft.procedures_defreturn=Pe,ft.procedures_ifreturn=Xe;var Kt=/^\s*'([^']|\\')*'\s*$/,En=function(ie){return Kt.test(ie)?[ie,ce.ATOMIC]:["str("+ie+")",ce.FUNCTION_CALL]},Rn={};Rn.text=ee,Rn.text_append=ze,Rn.text_changeCase=qe,Rn.text_charAt=Te,Rn.text_count=Je,Rn.text_getSubstring=Ue,Rn.text_indexOf=me,Rn.text_isEmpty=De,Rn.text_join=Oe,Rn.text_length=Ze,Rn.text_multiline=pe,Rn.text_print=Ne,Rn.text_prompt=Se,Rn.text_prompt_ext=Se,Rn.text_replace=ut,Rn.text_reverse=Mt,Rn.text_trim=ct;var Lo={};Lo.variables_get=mt,Lo.variables_set=qt;var Ln={};Ln.variables_get_dynamic=mt,Ln.variables_set_dynamic=qt;var Zn=new q;Zn.addReservedWords("math,random,Number");var On=Object.assign({},ne,Le,ue,Fe,ye,ft,Rn,Lo,Ln);for(const ie in On)Zn.forBlock[ie]=On[ie];var xo={};return xo.Order=ce,xo.PythonGenerator=q,xo.pythonGenerator=Zn,xo.__namespace__=s,xo})}(WR)),WR.exports}var D7=GR.exports,mF;function x7(){return mF||(mF=1,function(e,t){(function(n,s){e.exports=s(_P(),P7())})(D7,function(n,s){/**
  1716. * @license
  1717. * Copyright 2020 Google LLC
  1718. * SPDX-License-Identifier: Apache-2.0
  1719. */return s})}(GR)),GR.exports}var ni=x7();const Et={Common:"328",System:"#22398e",onboard_RGB:"0",Event:"32",Show:"#5bb2d6",Music:"192",Audio:"#24c48e",AI:"#24c48e",Pin:"#ff8b2c",Radio:"328",Wifi:"#386dc8",IoT_OneNet:"64",IoT_TinyWebIO:"160",IoT_Blynk:"#24c48e",IoT_MQTT:"288",IoT_OneNet_WeChat:"64",Neopixel:"288",Bluebit:"#336699",General:"260",Sensor:"260",Weather:"192",Logic:"#4c97ff",Loop:"120",Math:"#5472ea",Text:"#33cc99",List:"#40bfe4",Variables:"330",Functions:"290",Tuple:"192",Dictionary:"32",Set:"160",File:"#22398e",Network:"#183895",UART:"260",Box:"#24c48e",Microbit:"160",Accelerometer:"0",Button:"32",Compass:"64",Image:"128",Light:"224",Radio2:"288",AI_LCD:"#BA2FBA",AI_camera:"#008CFF",AI_face:"#6533CB",AI_20classid:"#3B67CC",AI_number:"#068227",AI_color:"#7C658C",Procedures:"#ff6381"};C.Python=ni.pythonGenerator;C.Blocks.custom_text_block={init:function(){this.appendDummyInput().appendField(C.Msg.numpy_mnist_clear).appendField(new C.FieldTextInput("张三丰"),"TEXT_INPUT"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setHelpUrl(""),this.setStyle("custom_text_blocks")}};C.Blocks.CocoRobo_return={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Et.Logic,tooltip:C.Msg.CocoRobo_RETURN_TOOLTIP,message0:C.Msg.CocoRobo_RETURN_MESSAGE0,args0:[{type:"input_value",name:"VAR"}]})}};C.Blocks.CocoRobo_try_except={init:function(){this.jsonInit({message0:"",previousStatement:null,nextStatement:null,colour:Et.Logic,tooltip:C.Msg.CocoRobo_try_except_TOOLTIP,helpUrl:""}),this.appendStatementInput("TRY").appendField("try"),this.appendStatementInput("EXCEPT").appendField("except")}};C.Blocks.CocoRobo_try_except_finally={init:function(){this.jsonInit({message0:"",previousStatement:null,nextStatement:null,colour:Et.Logic,tooltip:C.Msg.CocoRobo_try_except_finally_TOOLTIP,helpUrl:""}),this.appendStatementInput("TRY").appendField("try"),this.appendStatementInput("EXCEPT").appendField("except"),this.appendStatementInput("FINALLY").appendField("finally")}};C.Blocks.CocoRobo_type={init:function(){this.jsonInit({message0:"值 %1 的类型",args0:[{type:"input_value",name:"VAR"}],output:null,colour:Et.Logic,tooltip:"返回当前值的类型",helpUrl:""})}};C.Blocks.CocoRobo_type_is={init:function(){this.jsonInit({message0:"值 %1 的类型为 %2",args0:[{type:"input_value",name:"VAR"},{name:"TYPE",options:[["int","int"],["float","float"],["bool","bool"],["str","str"],["list","list"],["tuple","tuple"],["set","set"],["dict","dict"],["bytes","bytes"],["bytearray","bytearray"],["complex","complex"]],type:"field_dropdown"}],output:"Boolean",colour:Et.Logic,helpUrl:C.Msg.CocoRobo_TYPE_IS_HELPURL});var e=this;this.setTooltip(function(){return C.Msg.CocoRobo_TYPE_IS_TOOLTIP.replace("%2",e.getFieldValue("TYPE"))})}};C.Blocks.CocoRobo_eval={init:function(){this.jsonInit({message0:"计算表达式 %1 的结果",args0:[{check:"String",type:"input_value",name:"VAR"}],output:null,colour:Et.Logic,tooltip:"计算字符串表达式,并返回结果",helpUrl:""})}};C.controls={HUE:"#9d64fd"};C.Blocks.controls_repeat_forever={init:function(){this.jsonInit({message0:C.Msg.CONTROLS_REPEAT_FOREVER,previousStatement:null,nextStatement:null,colour:C.controls.HUE,tooltip:C.Msg.CONTROLS_REPEAT_FOREVER_TOOLTIP,helpUrl:C.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO").appendField(C.Msg.CONTROLS_REPEAT_INPUT_DO)}};C.Blocks.controls_repeat_ext={init:function(){this.jsonInit({message0:C.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES",check:"Number"}],previousStatement:null,nextStatement:null,colour:C.controls.HUE,tooltip:C.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:C.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO").appendField(C.Msg.CONTROLS_REPEAT_INPUT_DO)}};C.Blocks.controls_repeat={init:function(){this.jsonInit({message0:C.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"field_number",name:"TIMES",value:10,min:0,precision:1}],previousStatement:null,nextStatement:null,colour:C.controls.HUE,tooltip:C.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:C.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO").appendField(C.Msg.CONTROLS_REPEAT_INPUT_DO)}};C.Blocks.controls_whileUntil={init:function(){var e=[[C.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[C.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]];this.setHelpUrl(C.Msg.CONTROLS_WHILEUNTIL_HELPURL),this.setColour(C.controls.HUE),this.appendValueInput("BOOL").setCheck("Boolean").appendField(new C.FieldDropdown(e),"MODE"),this.appendStatementInput("DO").appendField(C.Msg.CONTROLS_WHILEUNTIL_INPUT_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip(function(){var n=t.getFieldValue("MODE");return{WHILE:C.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:C.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[n]})}};C.Blocks.controls_for={init:function(){this.jsonInit({message0:C.Msg.CONTROLS_FOR_TITLE,args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"FROM",check:"Number",align:"RIGHT"},{type:"input_value",name:"TO",check:"Number",align:"RIGHT"},{type:"input_value",name:"BY",check:"Number",align:"RIGHT"}],inputsInline:!0,previousStatement:null,nextStatement:null,colour:C.controls.HUE,helpUrl:C.Msg.CONTROLS_FOR_HELPURL}),this.appendStatementInput("DO").appendField(C.Msg.CONTROLS_FOR_INPUT_DO);var e=this;this.setTooltip(function(){return C.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",e.getFieldValue("VAR"))})}};C.Blocks.controls_forEach={init:function(){this.jsonInit({message0:C.Msg.CONTROLS_FOREACH_TITLE,args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"LIST",check:"Array"}],previousStatement:null,nextStatement:null,colour:C.controls.HUE,helpUrl:C.Msg.CONTROLS_FOREACH_HELPURL}),this.appendStatementInput("DO").appendField(C.Msg.CONTROLS_FOREACH_INPUT_DO);var e=this;this.setTooltip(function(){return C.Msg.CONTROLS_FOREACH_TOOLTIP.replace("%1",e.getFieldValue("VAR"))})},customContextMenu:C.Blocks.controls_for.customContextMenu};C.Blocks.controls_flow_statements={init:function(){var e=[[C.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[C.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];this.setHelpUrl(C.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL),this.setColour(C.controls.HUE),this.appendDummyInput().appendField(new C.FieldDropdown(e),"FLOW"),this.setPreviousStatement(!0);var t=this;this.setTooltip(function(){var n=t.getFieldValue("FLOW");return{BREAK:C.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:C.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[n]})},onchange:function(e){if(!this.workspace.isDragging()){e=!1;var t=this;do{if(this.LOOP_TYPES.indexOf(t.type)!=-1){e=!0;break}t=t.getSurroundParent()}while(t);e?(this.setWarningText(null),this.isInFlyout||this.setDisabled(!1)):(this.setWarningText(C.Msg.CONTROLS_FLOW_STATEMENTS_WARNING),this.isInFlyout||this.getInheritedDisabled()||this.setDisabled(!0))}},LOOP_TYPES:"controls_repeat_forever controls_repeat controls_repeat_ext controls_forEach controls_for controls_whileUntil tello_repeat_forever".split(" ")};C.Blocks.controls_if={init:function(){this.setHelpUrl(C.Msg.CONTROLS_IF_HELPURL),this.setColour(Et.Logic),this.appendValueInput("IF0").setCheck("Boolean").appendField(C.Msg.CONTROLS_IF_MSG_IF),this.appendStatementInput("DO0").appendField(C.Msg.CONTROLS_IF_MSG_THEN),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new C.icons.MutatorIcon(["controls_if_elseif","controls_if_else"],this));var e=this;this.setTooltip(function(){if(e.elseifCount_||e.elseCount_){if(!e.elseifCount_&&e.elseCount_)return C.Msg.CONTROLS_IF_TOOLTIP_2;if(e.elseifCount_&&!e.elseCount_)return C.Msg.CONTROLS_IF_TOOLTIP_3;if(e.elseifCount_&&e.elseCount_)return C.Msg.CONTROLS_IF_TOOLTIP_4}else return C.Msg.CONTROLS_IF_TOOLTIP_1;return""}),this.elseCount_=this.elseifCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var e=document.createElement("mutation");return this.elseifCount_&&e.setAttribute("elseif",this.elseifCount_),this.elseCount_&&e.setAttribute("else",1),e},domToMutation:function(e){this.elseifCount_=parseInt(e.getAttribute("elseif"),10)||0,this.elseCount_=parseInt(e.getAttribute("else"),10)||0,this.updateShape_()},decompose:function(e){var t=e.newBlock("controls_if_if");t.initSvg();for(var n=t.nextConnection,s=1;s<=this.elseifCount_;s++){var i=e.newBlock("controls_if_elseif");i.initSvg(),n.connect(i.previousConnection),n=i.nextConnection}return this.elseCount_&&(e=e.newBlock("controls_if_else"),e.initSvg(),n.connect(e.previousConnection)),t},compose:function(e){var t=e.nextConnection.targetBlock();this.elseCount_=this.elseifCount_=0,e=[null];for(var n=[null],s=null;t;){switch(t.type){case"controls_if_elseif":this.elseifCount_++,e.push(t.valueConnection_),n.push(t.statementConnection_);break;case"controls_if_else":this.elseCount_++,s=t.statementConnection_;break;default:throw"Unknown block type."}t=t.nextConnection&&t.nextConnection.targetBlock()}for(this.updateShape_(),t=1;t<=this.elseifCount_;t++)C.icons.MutatorIcon.reconnect(e[t],this,"IF"+t),C.icons.MutatorIcon.reconnect(n[t],this,"DO"+t);C.icons.MutatorIcon.reconnect(s,this,"ELSE")},saveConnections:function(e){e=e.nextConnection.targetBlock();for(var t=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+t),s=this.getInput("DO"+t);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,t++;break;case"controls_if_else":s=this.getInput("ELSE"),e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var e=1;this.getInput("IF"+e);)this.removeInput("IF"+e),this.removeInput("DO"+e),e++;for(e=1;e<=this.elseifCount_;e++)this.appendValueInput("IF"+e).setCheck("Boolean").appendField(C.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+e).appendField(C.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(C.Msg.CONTROLS_IF_MSG_ELSE)}};C.Blocks.controls_if_elseif={init:function(){this.setColour(Et.Logic),this.appendDummyInput().appendField(C.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(C.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}};C.Blocks.controls_if_else={init:function(){this.setColour(Et.Logic),this.appendDummyInput().appendField(C.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(C.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}};C.Blocks.controls_if_if={init:function(){this.setColour(Et.Logic),this.appendDummyInput().appendField(C.Msg.CONTROLS_IF_IF_TITLE_IF),this.setNextStatement(!0),this.setTooltip(C.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}};C.Blocks.logic_compare={init:function(){var e=[["==","EQ"],["!=","NEQ"],[">","LT"],[">=","LTE"],["<","GT"],["<=","GTE"]],t=[["==","EQ"],["!=","NEQ"],["<","LT"],["<=","LTE"],[">","GT"],[">=","GTE"]],n=this.RTL?e:t;this.setHelpUrl(C.Msg.LOGIC_COMPARE_HELPURL),this.setColour(Et.Logic),this.setOutput(!0,"Boolean"),this.appendValueInput("A"),this.appendValueInput("B").appendField(new C.FieldDropdown(n),"OP"),this.setInputsInline(!0);var s=this;this.setTooltip(function(){var i=s.getFieldValue("OP"),r={EQ:C.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:C.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:C.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:C.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:C.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:C.Msg.LOGIC_COMPARE_TOOLTIP_GTE};return r[i]}),this.prevBlocks_=[null,null]},onchange:function(e){var t=this.getInputTargetBlock("A"),n=this.getInputTargetBlock("B");if(t&&n&&!t.outputConnection.checkType_(n.outputConnection)){C.Events.setGroup(e.group);for(var s=0;s<this.prevBlocks_.length;s++){var i=this.prevBlocks_[s];(i===t||i===n)&&(i.unplug(),i.bumpNeighbours_())}C.Events.setGroup(!1)}this.prevBlocks_[0]=t,this.prevBlocks_[1]=n}};C.Blocks.logic_operation={init:function(){var e=[[C.Msg.LOGIC_OPERATION_AND,"AND"],[C.Msg.LOGIC_OPERATION_OR,"OR"]];this.setHelpUrl(C.Msg.LOGIC_OPERATION_HELPURL),this.setColour(Et.Logic),this.setOutput(!0,"Boolean"),this.appendValueInput("A").setCheck("Boolean"),this.appendValueInput("B").setCheck("Boolean").appendField(new C.FieldDropdown(e),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip(function(){var n=t.getFieldValue("OP"),s={AND:C.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:C.Msg.LOGIC_OPERATION_TOOLTIP_OR};return s[n]})}};C.Blocks.logic_negate={init:function(){this.jsonInit({message0:C.Msg.LOGIC_NEGATE_TITLE,args0:[{type:"input_value",name:"BOOL",check:"Boolean"}],output:"Boolean",colour:Et.Logic,tooltip:C.Msg.LOGIC_NEGATE_TOOLTIP,helpUrl:C.Msg.LOGIC_NEGATE_HELPURL})}};C.Blocks.logic_boolean={init:function(){this.jsonInit({message0:"%1",args0:[{type:"field_dropdown",name:"BOOL",options:[[C.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[C.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]]}],output:"Boolean",colour:Et.Logic,tooltip:C.Msg.LOGIC_BOOLEAN_TOOLTIP,helpUrl:C.Msg.LOGIC_BOOLEAN_HELPURL})}};C.Blocks.logic_null={init:function(){this.jsonInit({message0:C.Msg.LOGIC_NULL,output:null,colour:Et.Logic,tooltip:C.Msg.LOGIC_NULL_TOOLTIP,helpUrl:C.Msg.LOGIC_NULL_HELPURL})}};C.Blocks.logic_ternary={init:function(){this.setHelpUrl(C.Msg.LOGIC_TERNARY_HELPURL),this.setColour(Et.Logic),this.appendValueInput("IF").setCheck("Boolean").appendField(C.Msg.LOGIC_TERNARY_CONDITION),this.appendValueInput("THEN").appendField(C.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("ELSE").appendField(C.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setTooltip(C.Msg.LOGIC_TERNARY_TOOLTIP),this.prevParentConnection_=null},onchange:function(e){var t=this.getInputTargetBlock("THEN"),n=this.getInputTargetBlock("ELSE"),s=this.outputConnection.targetConnection;if((t||n)&&s)for(var i=0;i<2;i++){var r=i==1?t:n;r&&!r.outputConnection.checkType_(s)&&(C.Events.setGroup(e.group),s===this.prevParentConnection_?(this.unplug(),s.getSourceBlock().bumpNeighbours_()):(r.unplug(),r.bumpNeighbours_()),C.Events.setGroup(!1))}this.prevParentConnection_=s}};C.Blocks.logic_isIn={init:function(){var e=[["is in","IN"],["is not in","NOTIN"]];this.setColour(Et.Logic),this.setOutput(!0,"Boolean"),this.appendValueInput("ITEM"),this.appendValueInput("LIST").setCheck(["Array","String"]).appendField(new C.FieldDropdown(e),"OP"),this.setInputsInline(!0)}};C.Blocks.logic_none={init:function(){this.appendDummyInput().appendField("None"),this.setColour(Et.Logic),this.setOutput(!0)}};C.Python=ni.pythonGenerator;C.Blocks.CocoRobo_return={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Et.Logic,tooltip:C.Msg.CocoRobo_RETURN_TOOLTIP,message0:C.Msg.CocoRobo_RETURN_MESSAGE0,args0:[{type:"input_value",name:"VAR"}]})}};C.Blocks.CocoRobo_try_except={init:function(){this.jsonInit({message0:"",previousStatement:null,nextStatement:null,colour:Et.Logic,tooltip:C.Msg.CocoRobo_try_except_TOOLTIP,helpUrl:""}),this.appendStatementInput("TRY").appendField("try"),this.appendStatementInput("EXCEPT").appendField("except")}};C.Blocks.CocoRobo_try_except_finally={init:function(){this.jsonInit({message0:"",previousStatement:null,nextStatement:null,colour:Et.Logic,tooltip:C.Msg.CocoRobo_try_except_finally_TOOLTIP,helpUrl:""}),this.appendStatementInput("TRY").appendField("try"),this.appendStatementInput("EXCEPT").appendField("except"),this.appendStatementInput("FINALLY").appendField("finally")}};C.Blocks.CocoRobo_type={init:function(){this.jsonInit({message0:C.Msg.CocoRobo_TYPE_MESSAGE0,args0:[{type:"input_value",name:"VAR"}],output:null,colour:Et.Logic,tooltip:C.Msg.CocoRobo_TYPE_TOOLTIP,helpUrl:C.Msg.CocoRobo_TYPE_HELPURL})}};C.Blocks.CocoRobo_type_is={init:function(){this.jsonInit({message0:C.Msg.CocoRobo_TYPE_IS_MESSAGE0,args0:[{type:"input_value",name:"VAR"},{name:"TYPE",options:[["int","int"],["float","float"],["bool","bool"],["str","str"],["list","list"],["tuple","tuple"],["set","set"],["dict","dict"],["bytes","bytes"],["bytearray","bytearray"],["complex","complex"]],type:"field_dropdown"}],output:"Boolean",colour:Et.Logic,helpUrl:C.Msg.CocoRobo_TYPE_IS_HELPURL});var e=this;this.setTooltip(function(){return C.Msg.CocoRobo_TYPE_IS_TOOLTIP.replace("%2",e.getFieldValue("TYPE"))})}};C.Blocks.CocoRobo_eval={init:function(){this.jsonInit({message0:C.Msg.CocoRobo_EVAL_MESSAGE0,args0:[{check:"String",type:"input_value",name:"VAR"}],output:null,colour:Et.Logic,tooltip:C.Msg.CocoRobo_EVAL_TOOLTIP,helpUrl:C.Msg.CocoRobo_EVAL_HELPURL})}};C.Python=ni.pythonGenerator;C.math={HUE:"#5472ea"};C.Blocks.math_degrad={init:function(){this.appendValueInput("convert").setCheck(null).appendField(new C.FieldDropdown([[C.Msg.math_degrad_rad,"radians"],[C.Msg.math_degrad_deg,"degrees"]]),"rad_deg"),this.setOutput(!0,null),this.setColour("#5472ea"),this.setHelpUrl("");var e=this;this.setTooltip(function(){var t=e.getFieldValue("rad_deg"),n={radians:C.Msg.Math_Degrad_RAD_TOOLTIP,degrees:C.Msg.Math_Degrad_DEG_TOOLTIP};return n[t]})}};C.Blocks.math_angle={init:function(){this.jsonInit({inputsInline:!0,output:"Number",colour:Et.Math,helpUrl:"",tooltip:"",message0:"%1",args0:[{name:"angle",type:"field_angle"}]})}};C.Blocks.math_keep_decimal={init:function(){this.jsonInit({inputsInline:!0,output:"Number",colour:Et.Math,helpUrl:C.Msg.MATH_KEEP_DECIMAL_HELPURL,tooltip:C.Msg.MATH_KEEP_DECIMAL_TOOLTIP,message0:C.Msg.MATH_KEEP_DECIMAL_MESSAGE0,args0:[{check:"Number",type:"input_value",name:"NUM"},{check:"Number",type:"input_value",name:"PLACE"}]})}};C.Blocks.math_division_consult={init:function(){this.jsonInit({message0:C.Msg.MATH_DIVISION_CONSULT_TITLE,args0:[{type:"input_value",name:"DIVIDEND",check:"Number"},{type:"input_value",name:"DIVISOR",check:"Number"}],inputsInline:!0,output:"Number",colour:C.math.HUE,tooltip:C.Msg.MATH_DIVISION_CONSULT_TOOLTIP,helpUrl:C.Msg.MATH_DIVISION_CONSULT_HELPURL})}};C.Blocks.labplus_mapping={init:function(){this.jsonInit({colour:230,args0:[{name:"inputNum",type:"input_value",check:"Number"},{name:"bMin",type:"input_value",check:"Number"},{name:"bMax",type:"input_value",check:"Number"},{name:"cMin",type:"input_value",check:"Number"},{name:"cMax",type:"input_value",check:"Number"}],output:"Number",message0:C.Msg.labplus_mapping_MESSAGE0,tooltip:C.Msg.labplus_mapping_TOOLTIP,helpUrl:C.Msg.labplus_mapping_HELPURL})}};C.Blocks.math_random_randrange={init:function(){this.jsonInit({inputsInline:!0,output:"Number",colour:Et.Math,helpUrl:C.Msg.MATH_RANDOM_RANDRANGE_HELPURL,tooltip:C.Msg.MATH_RANDOM_RANDRANGE_TOOLTIP,message0:C.Msg.MATH_RANDOM_RANDRANGE_MESSAGE0,args0:[{check:"Number",type:"input_value",name:"start"},{check:"Number",type:"input_value",name:"stop"},{check:"Number",type:"input_value",name:"step"}]})}};C.Blocks.math_random_float={init:function(){this.jsonInit({message0:C.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM,output:"Number",colour:Et.Math,tooltip:C.Msg.MATH_RANDOM_FLOAT_TOOLTIP,helpUrl:C.Msg.MATH_RANDOM_FLOAT_HELPURL})}};C.Blocks.math_convert={init:function(){this.jsonInit({message0:C.Msg.MATH_CONVERT_MESSAGE0,args0:[{type:"field_dropdown",options:[["int","int"],["float","float"]],name:"TYPE0"},{type:"input_value",name:"INPUT0",check:["Number","String"]}],output:"Number",colour:Et.Math,tooltip:C.Msg.MATH_CONVERT_TOOLTIP,helpUrl:C.Msg.MATH_CONVERT_HELPURL})}};C.Blocks.math_number_bits_ops={init:function(){this.jsonInit({message0:C.Msg.MATH_NUMBER_BITS_OPS_MESSAGE0,args0:[{type:"input_value",name:"A",check:"Number"},{type:"field_dropdown",options:[["|"," | "],["&"," & "],["^"," ^ "],["<<"," << "],[">>"," >> "]],name:"OP"},{type:"input_value",name:"B",check:"Number"}],inputsInline:!0,output:"Number",colour:Et.Math,tooltip:C.Msg.MATH_NUMBER_BITS_OPS_TOOLTIP,helpUrl:C.Msg.MATH_NUMBER_BITS_OPS_HELPURL})}};C.Blocks.bit_inversion={init:function(){this.jsonInit({inputsInline:!0,output:"Number",colour:Et.Math,helpUrl:C.Msg.BIT_INVERSION_HELPURL,tooltip:C.Msg.BIT_INVERSION_TOOLTIP,message0:C.Msg.BIT_INVERSION_MESSAGE0,args0:[{type:"input_value",name:"data"}]})}};C.Blocks.CocoRobo_ten_convert_to={init:function(){this.jsonInit({inputsInline:!0,output:"String",colour:Et.Math,helpUrl:C.Msg.CocoRobo_TEN_CONVERT_TO_HELPURL,message0:C.Msg.CocoRobo_TEN_CONVERT_TO_MESSAGE0,args0:[{check:"Number",type:"input_value",name:"int_num"},{options:[[C.Msg.CocoRobo_BIN,"bin"],[C.Msg.CocoRobo_OCT,"oct"],[C.Msg.CocoRobo_HEX,"hex"]],type:"field_dropdown",name:"ten_convert_to"}]});var e=this;this.setTooltip(function(){return C.Msg.CocoRobo_TEN_CONVERT_TO_TOOLTIP.replace("%2",e.getFieldValue("ten_convert_to"))})}};C.Blocks.CocoRobo_convert_to_ten={init:function(){this.jsonInit({inputsInline:!0,output:"Number",colour:Et.Math,helpUrl:C.Msg.CocoRobo_CONVERT_TO_TEN_HELPURL,message0:C.Msg.CocoRobo_CONVERT_TO_TEN_MESSAGE0,args0:[{options:[[C.Msg.CocoRobo_BIN,"2"],[C.Msg.CocoRobo_OCT,"8"],[C.Msg.CocoRobo_HEX,"16"]],type:"field_dropdown",name:"convert_choice"},{check:"String",type:"input_value",name:"convert_str"}]});var e=this;this.setTooltip(function(){var t=e.getFieldValue("convert_choice"),n={2:C.Msg.CocoRobo_CONVERT_TO_TEN_TOOLTIP.replace("%2","bin"),8:C.Msg.CocoRobo_CONVERT_TO_TEN_TOOLTIP.replace("%2","oct"),16:C.Msg.CocoRobo_CONVERT_TO_TEN_TOOLTIP.replace("%2","hex")};return n[t]})}};C.Blocks.CocoRobo_high_low={init:function(){this.jsonInit({inputsInline:!0,output:"Number",colour:Et.Pin,helpUrl:C.Msg.CocoRobo_HIGH_LOW_HELPURL,tooltip:C.Msg.CocoRobo_HIGH_LOW_TOOLTIP,message0:C.Msg.CocoRobo_HIGH_LOW_MESSAGE0,args0:[{options:[["HIGH","1"],["LOW","0"]],type:"field_dropdown",name:"high_low"}]})}};C.Blocks.CocoRobo_start_new_thread={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Et.Event,helpUrl:C.Msg.CocoRobo_START_NEW_THREAD_HELPURL,tooltip:C.Msg.CocoRobo_START_NEW_THREAD_TOOLTIP,message0:C.Msg.CocoRobo_START_NEW_THREAD_MESSAGE0,args0:[{options:[["1","1"],["2","2"],["3","3"],["4","4"]],type:"field_dropdown",name:"thread_name"}]}),this.appendStatementInput("DO").appendField(C.Msg.CONTROLS_REPEAT_INPUT_DO)}};C.Blocks.CocoRobo_lock_object_acquire_lock={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Et.Event,helpUrl:C.Msg.CocoRobo_LOCK_OBJECT_ACQUIRE_LOCK_HELPURL,tooltip:C.Msg.CocoRobo_LOCK_OBJECT_ACQUIRE_LOCK_TOOLTIP,message0:C.Msg.CocoRobo_LOCK_OBJECT_ACQUIRE_LOCK_MESSAGE0,args0:[{type:"field_input",name:"thread_lock_object",text:"lock"}]})}};C.Blocks.CocoRobo_ten_converted_to_bytes={init:function(){this.jsonInit({inputsInline:!0,output:null,colour:Et.Math,helpUrl:C.Msg.CocoRobo_TEN_CONVERTED_TO_BYTES_HELPURL,message0:C.Msg.CocoRobo_TEN_CONVERTED_TO_BYTES_MESSAGE0,args0:[{options:[["2","'<H'"],["4","'<L'"]],type:"field_dropdown",name:"convert_choice"},{check:"Number",type:"input_value",name:"convert_num"}]});var e=this;this.setTooltip(function(){var t=e.getFieldValue("convert_choice"),n={"'<HH'":C.Msg.CocoRobo_TEN_CONVERTED_TO_BYTES_TOOLTIP.replace("%1","2"),"'<LL'":C.Msg.CocoRobo_TEN_CONVERTED_TO_BYTES_TOOLTIP.replace("%1","4")};return n[t]})}};C.Blocks.CocoRobo_int_to_chr={init:function(){this.jsonInit({inputsInline:!0,output:"String",colour:Et.Math,helpUrl:C.Msg.CocoRobo_INT_TO_CHR_HELPURL,tooltip:C.Msg.CocoRobo_INT_TO_CHR_TOOLTIP,message0:C.Msg.CocoRobo_INT_TO_CHR_MESSAGE0,args0:[{check:"Number",type:"input_value",name:"convert_num"}]})}};C.Blocks.CocoRobo_hcsr04_obj={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Et.General,helpUrl:C.Msg.CocoRobo_HCSR04_OBJ_HELPURL,tooltip:C.Msg.CocoRobo_HCSR04_OBJ_TOOLTIP,message0:C.Msg.CocoRobo_HCSR04_OBJ_MESSAGE0,args0:[{text:"hcsr04",type:"field_input",name:"hcsr04_name"},{check:"Number",type:"input_value",name:"trigger"},{check:"Number",type:"input_value",name:"echo"}]})}};C.Blocks.CocoRobo_hcsr04_distance={init:function(){this.jsonInit({inputsInline:!0,output:"Number",colour:Et.General,helpUrl:C.Msg.CocoRobo_HCSR04_DISTANCE_HELPURL,tooltip:C.Msg.CocoRobo_HCSR04_DISTANCE_TOOLTIP,message0:C.Msg.CocoRobo_HCSR04_DISTANCE_MESSAGE0,args0:[{text:"hcsr04",type:"field_input",name:"hcsr04_name"},{options:[["mm","mm"],["cm","cm"]],type:"field_dropdown",name:"unit"}]})}};C.Blocks.CocoRobo_hcsr04_distance_mm={init:function(){this.jsonInit({inputsInline:!0,output:"Number",colour:Et.Pin,helpUrl:C.Msg.CocoRobo_HCSR04_DISTANCE_MM_HELPURL,tooltip:C.Msg.CocoRobo_HCSR04_DISTANCE_MM_TOOLTIP,message0:C.Msg.CocoRobo_HCSR04_DISTANCE_MM_MESSAGE0,args0:[{text:"hcsr04",type:"field_input",name:"hcsr04_name"}]})}};C.Blocks.CocoRobo_pm2_5_MIC={init:function(){this.jsonInit({inputsInline:!0,output:"Number",colour:Et.General,helpUrl:C.Msg.CocoRobo_PM2_5_MIC_HELPURL,tooltip:C.Msg.CocoRobo_PM2_5_MIC_TOOLTIP,message0:C.Msg.CocoRobo_PM2_5_MIC_MESSAGE0,args0:[{check:"Number",type:"input_value",name:"rx"},{options:[["PM1.0ug/m3","_pm_data[0]"],["PM2.5ug/m3","_pm_data[1]"],["PM10ug/m3","_pm_data[2]"]],type:"field_dropdown",name:"unit"}]})}};C.Blocks.CocoRobo_pm2_5_LitresAir={init:function(){this.jsonInit({inputsInline:!0,output:"Number",colour:Et.General,helpUrl:C.Msg.CocoRobo_PM2_5_LitresAir_HELPURL,tooltip:C.Msg.CocoRobo_PM2_5_LitresAir_TOOLTIP,message0:C.Msg.CocoRobo_PM2_5_LitresAir_MESSAGE0,args0:[{check:"Number",type:"input_value",name:"rx"},{options:[["0.3um","_pm_data[3]"],["0.5um","_pm_data[4]"],["1um","_pm_data[5]"],["2.5um","_pm_data[6]"],["5um","_pm_data[7]"],["10um","_pm_data[8]"]],type:"field_dropdown",name:"unit"}]})}};C.Blocks.CocoRobo_mac_address={init:function(){this.jsonInit({inputsInline:!0,output:"String",colour:SOFTWARE_KEY=="X"?Et.System:Et.Wifi,helpUrl:C.Msg.CocoRobo_MAC_ADDRESS_HELPURL,tooltip:C.Msg.CocoRobo_MAC_ADDRESS_TOOLTIP,message0:C.Msg.CocoRobo_MAC_ADDRESS_MESSAGE0})}};C.Blocks.CocoRobo_ujson_loads={init:function(){this.jsonInit({inputsInline:!0,output:null,colour:Et.Text,helpUrl:C.Msg.CocoRobo_UJSON_LOADS_HELPURL,tooltip:C.Msg.CocoRobo_UJSON_LOADS_TOOLTIP,message0:C.Msg.CocoRobo_UJSON_LOADS_MESSAGE0,args0:[{check:"String",type:"input_value",name:"data"}]})}};C.Blocks.CocoRobo_code_annotation={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Et.Text,helpUrl:C.Msg.CocoRobo_code_annotation_HELPURL,tooltip:C.Msg.CocoRobo_code_annotation_TOOLTIP,message0:C.Msg.CocoRobo_code_annotation_MESSAGE0,args0:[{check:"String",type:"input_value",name:"data"}]})}};C.Blocks.CocoRobo_ujson_dumps={init:function(){this.jsonInit({inputsInline:!0,output:"String",colour:Et.Text,helpUrl:C.Msg.CocoRobo_UJSON_DUMPS_HELPURL,tooltip:C.Msg.CocoRobo_UJSON_DUMPS_TOOLTIP,message0:C.Msg.CocoRobo_UJSON_DUMPS_MESSAGE0,args0:[{type:"input_value",name:"data"}]})}};C.Blocks.CocoRobo_base64_to_data={init:function(){this.jsonInit({inputsInline:!0,output:null,colour:Et.Math,helpUrl:C.Msg.CocoRobo_BASE64_TO_DATA_HELPURL,tooltip:C.Msg.CocoRobo_BASE64_TO_DATA_TOOLTIP,message0:C.Msg.CocoRobo_BASE64_TO_DATA_MESSAGE0,args0:[{type:"input_value",name:"data"}]})}};C.Blocks.CocoRobo_data_to_base64={init:function(){this.jsonInit({inputsInline:!0,output:null,colour:Et.Math,helpUrl:C.Msg.CocoRobo_DATA_TO_BASE64_HELPURL,tooltip:C.Msg.CocoRobo_DATA_TO_BASE64_TOOLTIP,message0:C.Msg.CocoRobo_DATA_TO_BASE64_MESSAGE0,args0:[{type:"input_value",name:"data"}]})}};C.Blocks.CocoRobo_hex_to_bin_str={init:function(){this.jsonInit({inputsInline:!0,output:null,colour:Et.Math,helpUrl:C.Msg.CocoRobo_HEX_TO_BIN_STR_HELPURL,tooltip:C.Msg.CocoRobo_HEX_TO_BIN_STR_TOOLTIP,message0:C.Msg.CocoRobo_HEX_TO_BIN_STR_MESSAGE0,args0:[{check:"String",type:"input_value",name:"convert_chr"}]})}};C.Blocks.CocoRobo_str_to_hex={init:function(){this.jsonInit({inputsInline:!0,output:null,colour:Et.Math,helpUrl:C.Msg.CocoRobo_STR_TO_HEX_HELPURL,tooltip:C.Msg.CocoRobo_STR_TO_HEX_TOOLTIP,message0:C.Msg.CocoRobo_STR_TO_HEX_MESSAGE0,args0:[{check:"String",type:"input_value",name:"convert_chr"}]})}};C.Blocks.CocoRobo_chr_to_int={init:function(){this.jsonInit({inputsInline:!0,output:"String",colour:Et.Math,helpUrl:C.Msg.CocoRobo_CHR_TO_INT_HELPURL,tooltip:C.Msg.CocoRobo_CHR_TO_INT_TOOLTIP,message0:C.Msg.CocoRobo_CHR_TO_INT_MESSAGE0,args0:[{check:"String",type:"input_value",name:"convert_chr"}]})}};C.Blocks.math_single={init:function(){this.jsonInit({message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[[C.Msg.MATH_SINGLE_OP_ROOT,"ROOT"],[C.Msg.MATH_SINGLE_OP_ABSOLUTE,"ABS"],["-","NEG"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]},{type:"input_value",name:"NUM",check:"Number"}],output:"Number",colour:Et.Math,helpUrl:C.Msg.MATH_SINGLE_HELPURL});var e=this;this.setTooltip(function(){var t=e.getFieldValue("OP"),n={ROOT:C.Msg.MATH_SINGLE_TOOLTIP_ROOT,ABS:C.Msg.MATH_SINGLE_TOOLTIP_ABS,NEG:C.Msg.MATH_SINGLE_TOOLTIP_NEG,LN:C.Msg.MATH_SINGLE_TOOLTIP_LN,LOG10:C.Msg.MATH_SINGLE_TOOLTIP_LOG10,EXP:C.Msg.MATH_SINGLE_TOOLTIP_EXP,POW10:C.Msg.MATH_SINGLE_TOOLTIP_POW10};return n[t]})}};C.Blocks.math_number={init:function(){this.setHelpUrl(C.Msg.MATH_NUMBER_HELPURL),this.setColour(Et.Math),this.appendDummyInput().appendField(new C.FieldNumber("0"),"NUM"),this.setOutput(!0,"Number");var e=this;this.setTooltip(function(){var t=e.getParent();return t&&t.getInputsInline()&&t.tooltip||C.Msg.MATH_NUMBER_TOOLTIP})}};C.Blocks.math_arithmetic={init:function(){this.jsonInit({message0:"%1 %2 %3",args0:[{type:"input_value",name:"A",check:["Number","String"]},{type:"field_dropdown",name:"OP",options:[[C.Msg.MATH_ADDITION_SYMBOL,"ADD"],[C.Msg.MATH_SUBTRACTION_SYMBOL,"MINUS"],[C.Msg.MATH_MULTIPLICATION_SYMBOL,"MULTIPLY"],[C.Msg.MATH_DIVISION_SYMBOL,"DIVIDE"],[C.Msg.MATH_POWER_SYMBOL,"POWER"]]},{type:"input_value",name:"B",check:["Number","String"]}],inputsInline:!0,output:"Number",colour:Et.Math,helpUrl:C.Msg.MATH_ARITHMETIC_HELPURL});var e=this;this.setTooltip(function(){var t=e.getFieldValue("OP"),n={ADD:C.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:C.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:C.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:C.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:C.Msg.MATH_ARITHMETIC_TOOLTIP_POWER,MODULO:"Computes the remainder of division."};return n[t]})}};C.Blocks.math_trig={init:function(){this.jsonInit({message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[[C.Msg.MATH_TRIG_SIN,"SIN"],[C.Msg.MATH_TRIG_COS,"COS"],[C.Msg.MATH_TRIG_TAN,"TAN"],[C.Msg.MATH_TRIG_ASIN,"ASIN"],[C.Msg.MATH_TRIG_ACOS,"ACOS"],[C.Msg.MATH_TRIG_ATAN,"ATAN"]]},{type:"input_value",name:"NUM",check:"Number"}],output:"Number",colour:Et.Math,helpUrl:C.Msg.MATH_TRIG_HELPURL});var e=this;this.setTooltip(function(){var t=e.getFieldValue("OP"),n={SIN:C.Msg.MATH_TRIG_TOOLTIP_SIN,COS:C.Msg.MATH_TRIG_TOOLTIP_COS,TAN:C.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:C.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:C.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:C.Msg.MATH_TRIG_TOOLTIP_ATAN};return n[t]})}};C.Blocks.math_constant={init:function(){this.jsonInit({message0:"%1",args0:[{type:"field_dropdown",name:"CONSTANT",options:[["π","PI"],["e","E"],["φ","GOLDEN_RATIO"],["sqrt(2)","SQRT2"],["sqrt(½)","SQRT1_2"],["∞","INFINITY"]]}],output:"Number",colour:Et.Math,tooltip:C.Msg.MATH_CONSTANT_TOOLTIP,helpUrl:C.Msg.MATH_CONSTANT_HELPURL})}};C.Blocks.math_number_property={init:function(){var e=[[C.Msg.MATH_IS_EVEN,"EVEN"],[C.Msg.MATH_IS_ODD,"ODD"],[C.Msg.MATH_IS_PRIME,"PRIME"],[C.Msg.MATH_IS_WHOLE,"WHOLE"],[C.Msg.MATH_IS_POSITIVE,"POSITIVE"],[C.Msg.MATH_IS_NEGATIVE,"NEGATIVE"],[C.Msg.MATH_IS_DIVISIBLE_BY,"DIVISIBLE_BY"]];this.setColour(Et.Math),this.appendValueInput("NUMBER_TO_CHECK").setCheck("Number");var t=new C.FieldDropdown(e,function(n){var s=n=="DIVISIBLE_BY";this.sourceBlock_.updateShape_(s)});this.appendDummyInput().appendField(t,"PROPERTY"),this.setInputsInline(!0),this.setOutput(!0,"Boolean"),this.setTooltip(C.Msg.MATH_IS_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation"),t=this.getFieldValue("PROPERTY")=="DIVISIBLE_BY";return e.setAttribute("divisor_input",t),e},domToMutation:function(e){var t=e.getAttribute("divisor_input")=="true";this.updateShape_(t)},updateShape_:function(e){var t=this.getInput("DIVISOR");e?t||this.appendValueInput("DIVISOR").setCheck("Number"):t&&this.removeInput("DIVISOR")}};C.Blocks.math_round={init:function(){this.jsonInit({message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[[C.Msg.MATH_ROUND_OPERATOR_ROUND,"ROUND"],[C.Msg.MATH_ROUND_OPERATOR_ROUNDUP,"ROUNDUP"],[C.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN,"ROUNDDOWN"]]},{type:"input_value",name:"NUM",check:"Number"}],output:"Number",colour:Et.Math,tooltip:C.Msg.MATH_ROUND_TOOLTIP,helpUrl:C.Msg.MATH_ROUND_HELPURL})}};C.Blocks.math_on_list={init:function(){var e=[[C.Msg.MATH_ONLIST_OPERATOR_SUM,"SUM"],[C.Msg.MATH_ONLIST_OPERATOR_MIN,"MIN"],[C.Msg.MATH_ONLIST_OPERATOR_MAX,"MAX"],[C.Msg.MATH_ONLIST_OPERATOR_AVERAGE,"AVERAGE"],[C.Msg.MATH_ONLIST_OPERATOR_MEDIAN,"MEDIAN"],[C.Msg.MATH_ONLIST_OPERATOR_MODE,"MODE"],[C.Msg.MATH_ONLIST_OPERATOR_STD_DEV,"STD_DEV"],[C.Msg.MATH_ONLIST_OPERATOR_RANDOM,"RANDOM"]],t=this;this.setHelpUrl(C.Msg.MATH_ONLIST_HELPURL),this.setColour(Et.Math),this.setOutput(!0,"Number");var n=new C.FieldDropdown(e,function(s){t.updateType_(s)});this.appendValueInput("LIST").setCheck("Array").appendField(n,"OP"),this.setTooltip(function(){var s=t.getFieldValue("OP"),i={SUM:C.Msg.MATH_ONLIST_TOOLTIP_SUM,MIN:C.Msg.MATH_ONLIST_TOOLTIP_MIN,MAX:C.Msg.MATH_ONLIST_TOOLTIP_MAX,AVERAGE:C.Msg.MATH_ONLIST_TOOLTIP_AVERAGE,MEDIAN:C.Msg.MATH_ONLIST_TOOLTIP_MEDIAN,MODE:C.Msg.MATH_ONLIST_TOOLTIP_MODE,STD_DEV:C.Msg.MATH_ONLIST_TOOLTIP_STD_DEV,RANDOM:C.Msg.MATH_ONLIST_TOOLTIP_RANDOM};return i[s]})},updateType_:function(e){e=="MODE"?this.outputConnection.setCheck("Array"):this.outputConnection.setCheck("Number")},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("op",this.getFieldValue("OP")),e},domToMutation:function(e){this.updateType_(e.getAttribute("op"))}};C.Blocks.math_modulo={init:function(){this.jsonInit({message0:C.Msg.MATH_MODULO_TITLE,args0:[{type:"input_value",name:"DIVIDEND",check:"Number"},{type:"input_value",name:"DIVISOR",check:"Number"}],inputsInline:!0,output:"Number",colour:Et.Math,tooltip:C.Msg.MATH_MODULO_TOOLTIP,helpUrl:C.Msg.MATH_MODULO_HELPURL})}};C.Blocks.math_constrain={init:function(){this.jsonInit({message0:C.Msg.MATH_CONSTRAIN_TITLE,args0:[{type:"input_value",name:"VALUE",check:"Number"},{type:"input_value",name:"LOW",check:"Number"},{type:"input_value",name:"HIGH",check:"Number"}],inputsInline:!0,output:"Number",colour:Et.Math,tooltip:C.Msg.MATH_CONSTRAIN_TOOLTIP,helpUrl:C.Msg.MATH_CONSTRAIN_HELPURL})}};C.Blocks.labplus_mapping={init:function(){this.jsonInit({inputsInline:!0,colour:Et.Math,args0:[{name:"inputNum",type:"input_value",check:"Number"},{name:"bMin",type:"input_value",check:"Number"},{name:"bMax",type:"input_value",check:"Number"},{name:"cMin",type:"input_value",check:"Number"},{name:"cMax",type:"input_value",check:"Number"}],output:"Number",message0:C.Msg.labplus_mapping_MESSAGE0,tooltip:C.Msg.labplus_mapping_TOOLTIP,helpUrl:C.Msg.labplus_mapping_HELPURL})}};C.Blocks.math_random_int={init:function(){this.jsonInit({message0:C.Msg.MATH_RANDOM_INT_TITLE,args0:[{type:"input_value",name:"FROM",check:"Number"},{type:"input_value",name:"TO",check:"Number"}],inputsInline:!0,output:"Number",colour:Et.Math,tooltip:C.Msg.MATH_RANDOM_INT_TOOLTIP,helpUrl:C.Msg.MATH_RANDOM_INT_HELPURL})}};C.Blocks.math_convert={init:function(){this.jsonInit({message0:C.Msg.MATH_CONVERT_MESSAGE0,args0:[{type:"field_dropdown",options:[["int","int"],["float","float"]],name:"TYPE0"},{type:"input_value",name:"INPUT0",check:["Number","String"]}],output:"Number",colour:Et.Math,tooltip:C.Msg.MATH_CONVERT_TOOLTIP,helpUrl:C.Msg.MATH_CONVERT_HELPURL})}};C.Python=ni.pythonGenerator;C.variables={HUE:"#ffab2f"};C.Blocks.variables_get={init:function(){this.setHelpUrl(C.Msg.VARIABLES_GET_HELPURL),this.setColour(C.variables.HUE),this.appendDummyInput().appendField(new C.FieldVariable(C.Msg.VARIABLES_DEFAULT_NAME),"VAR"),this.setOutput(!0),this.setTooltip(C.Msg.VARIABLES_GET_TOOLTIP),this.contextMenuMsg_=C.Msg.VARIABLES_GET_CREATE_SET},contextMenuType_:"variables_set",customContextMenu:function(e){var t={enabled:!0},n=this.getFieldValue("VAR");t.text=this.contextMenuMsg_.replace("%1",n),n=goog.dom.createDom("field",null,n),n.setAttribute("name","VAR"),n=goog.dom.createDom("block",null,n),n.setAttribute("type",this.contextMenuType_),t.callback=C.ContextMenu.callbackFactory(this,n),e.push(t)}};C.Blocks.variables_set={init:function(){this.jsonInit({message0:C.Msg.VARIABLES_SET,args0:[{type:"field_variable",name:"VAR",variable:C.Msg.VARIABLES_DEFAULT_NAME},{type:"input_value",name:"VALUE"}],previousStatement:null,nextStatement:null,colour:C.variables.HUE,tooltip:C.Msg.VARIABLES_SET_TOOLTIP,helpUrl:C.Msg.VARIABLES_SET_HELPURL})},contextMenuType_:"variables_get",customContextMenu:C.Blocks.variables_get.customContextMenu};C.Blocks.math_change={init:function(){this.jsonInit({message0:C.Msg.MATH_CHANGE_TITLE,args0:[{type:"field_variable",name:"VAR",variable:C.Msg.MATH_CHANGE_TITLE_ITEM},{type:"input_value",name:"DELTA",check:"Number"}],previousStatement:null,nextStatement:null,colour:C.variables.HUE,helpUrl:C.Msg.MATH_CHANGE_HELPURL});var e=this;this.setTooltip(function(){return C.Msg.MATH_CHANGE_TOOLTIP.replace("%1",e.getField("VAR").variable.name)})}};C.Python=ni.pythonGenerator;C.texts={HUE:"#33cc99"};C.Blocks.text={init:function(){this.setHelpUrl(C.Msg.TEXT_TEXT_HELPURL),this.setColour(C.texts.HUE),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new C.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,"String");var e=this;this.setTooltip(function(){var t=e.getParent();return t&&t.getInputsInline()&&t.tooltip||C.Msg.TEXT_TEXT_TOOLTIP})},newQuote_:function(e){if(e==this.RTL)var t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAqUlEQVQI1z3KvUpCcRiA8ef9E4JNHhI0aFEacm1o0BsI0Slx8wa8gLauoDnoBhq7DcfWhggONDmJJgqCPA7neJ7p934EOOKOnM8Q7PDElo/4x4lFb2DmuUjcUzS3URnGib9qaPNbuXvBO3sGPHJDRG6fGVdMSeWDP2q99FQdFrz26Gu5Tq7dFMzUvbXy8KXeAj57cOklgA+u1B5AoslLtGIHQMaCVnwDnADZIFIrXsoXrgAAAABJRU5ErkJggg==";else var t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAn0lEQVQI1z3OMa5BURSF4f/cQhAKjUQhuQmFNwGJEUi0RKN5rU7FHKhpjEH3TEMtkdBSCY1EIv8r7nFX9e29V7EBAOvu7RPjwmWGH/VuF8CyN9/OAdvqIXYLvtRaNjx9mMTDyo+NjAN1HNcl9ZQ5oQMM3dgDUqDo1l8DzvwmtZN7mnD+PkmLa+4mhrxVA9fRowBWmVBhFy5gYEjKMfz9AylsaRRgGzvZAAAAAElFTkSuQmCC";return new C.FieldImage(t,12,12,'"')}};C.Blocks.text_join={init:function(){this.setHelpUrl(C.Msg.TEXT_JOIN_HELPURL),this.setColour(C.texts.HUE),this.itemCount_=2,this.updateShape_(),this.setOutput(!0,"String"),this.setMutator(new C.icons.MutatorIcon(["text_create_join_item"],this)),this.setTooltip(C.Msg.TEXT_JOIN_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("text_create_join_container");t.initSvg();for(var n=t.getInput("STACK").connection,s=0;s<this.itemCount_;s++){var i=e.newBlock("text_create_join_item");i.initSvg(),n.connect(i.previousConnection),n=i.nextConnection}return t},compose:function(e){for(var t=e.getInputTargetBlock("STACK"),n=[];t;)n.push(t.valueConnection_),t=t.nextConnection&&t.nextConnection.targetBlock();for(var s=0;s<this.itemCount_;s++){var i=this.getInput("ADD"+s).connection.targetConnection;i&&n.indexOf(i)==-1&&i.disconnect()}this.itemCount_=n.length,this.updateShape_();for(var s=0;s<this.itemCount_;s++)C.icons.MutatorIcon.reconnect(n[s],this,"ADD"+s)},saveConnections:function(e){for(var t=e.getInputTargetBlock("STACK"),n=0;t;){var s=this.getInput("ADD"+n);t.valueConnection_=s&&s.connection.targetConnection,n++,t=t.nextConnection&&t.nextConnection.targetBlock()}},updateShape_:function(){this.itemCount_&&this.getInput("EMPTY")?this.removeInput("EMPTY"):!this.itemCount_&&!this.getInput("EMPTY")&&this.appendDummyInput("EMPTY").appendField(this.newQuote_(!0)).appendField(this.newQuote_(!1));for(var e=0;e<this.itemCount_;e++)if(!this.getInput("ADD"+e)){var t=this.appendValueInput("ADD"+e);e==0&&t.appendField(C.Msg.TEXT_JOIN_TITLE_CREATEWITH)}for(;this.getInput("ADD"+e);)this.removeInput("ADD"+e),e++},newQuote_:C.Blocks.text.newQuote_};C.Blocks.text_split_string_by_delimiter={init:function(){this.appendValueInput("string_input").setCheck(null).appendField(C.Msg.text_additional_delimiter_string),this.appendDummyInput().appendField(C.Msg.text_additional_delimiter_deli).appendField(new C.FieldTextInput(","),"delimiter").appendField(C.Msg.text_additional_delimiter_end),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(C.texts.HUE),this.setTooltip(C.Msg.Text_Split_String_By_Delimiter_TOOLTIP),this.setHelpUrl("")}};C.Blocks.text_format={init:function(){this.jsonInit({inputsInline:!1,output:"String",colour:C.texts.HUE,helpUrl:C.Msg.TEXT_FORMAT_HELPURL,tooltip:C.Msg.TEXT_FORMAT_TOOLTIP,message0:C.Msg.TEXT_FORMAT_MESSAGE0,args0:[{type:"input_value",name:"FORMAT",check:"String"},{type:"input_value",name:"CONTENT"}]})}};C.Blocks.text_format2={init:function(){this.jsonInit({inputsInline:!1,output:"String",colour:C.texts.HUE,helpUrl:C.Msg.TEXT_FORMAT2_HELPURL,tooltip:C.Msg.TEXT_FORMAT2_TOOLTIP,message0:C.Msg.TEXT_FORMAT2_MESSAGE0,args0:[{type:"input_value",name:"FORMAT",check:"String"},{type:"input_value",name:"CONTENT"}]})}};C.Blocks.tuple_create_with_items_insert={init:function(){this.setHelpUrl(C.Msg.TUPLE_CREATE_WITH_ITEMS_INSERT_HELPURL),this.setColour(C.texts.HUE),this.itemCount_=3,this.updateShape_(),this.setOutput(!0),this.setMutator(new C.icons.MutatorIcon(["tuple_create_with_item"],this)),this.setTooltip(C.Msg.TUPLE_CREATE_WITH_ITEMS_INSERT_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("tuple_create_with_container");t.initSvg();for(var n=t.getInput("STACK").connection,s=0;s<this.itemCount_;s++){var i=e.newBlock("tuple_create_with_item");i.initSvg(),n.connect(i.previousConnection),n=i.nextConnection}return t},compose:function(e){var t=e.getInputTargetBlock("STACK");for(e=[];t;)e.push(t.valueConnection_),t=t.nextConnection&&t.nextConnection.targetBlock();for(t=0;t<this.itemCount_;t++){var n=this.getInput("ADD"+t).connection.targetConnection;n&&e.indexOf(n)==-1&&n.disconnect()}for(this.itemCount_=e.length,this.updateShape_(),t=0;t<this.itemCount_;t++)C.icons.MutatorIcon.reconnect(e[t],this,"ADD"+t)},saveConnections:function(e){e=e.getInputTargetBlock("STACK");for(var t=0;e;){var n=this.getInput("ADD"+t);e.valueConnection_=n&&n.connection.targetConnection,t++,e=e.nextConnection&&e.nextConnection.targetBlock()}},updateShape_:function(){this.itemCount_&&this.getInput("EMPTY")?this.removeInput("EMPTY"):this.itemCount_||this.getInput("EMPTY")||this.appendDummyInput("EMPTY").appendField(C.Msg.TUPLE_CREATE_EMPTY_TITLE);for(var e=0;e<this.itemCount_;e++)if(!this.getInput("ADD"+e)){var t=this.appendValueInput("ADD"+e);e==0&&t.appendField(C.Msg.TUPLE_CREATE_WITH_INPUT_WITH)}for(;this.getInput("ADD"+e);)this.removeInput("ADD"+e),e++}};C.Blocks.tuple_create_with_item={init:function(){this.setColour(C.texts.HUE),this.appendDummyInput().appendField(C.Msg.TUPLE_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(C.Msg.TUPLE_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}};C.Blocks.tuple_create_with_container={init:function(){this.setColour(C.texts.HUE),this.appendDummyInput().appendField(C.Msg.TUPLE_CREATE_WITH_CONTAINER_TITLE_ADD),this.appendStatementInput("STACK"),this.setTooltip(C.Msg.TUPLE_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}};C.Blocks.tuple_create_with={init:function(){this.jsonInit({colour:C.texts.HUE,args0:[{type:"input_value",name:"tuple_name"},{type:"input_value",name:"tuple_items"}],inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:C.Msg.tuple_create_with_HELPURL,tooltip:C.Msg.tuple_create_with_TOOLTIP,message0:C.Msg.tuple_create_with_MESSAGE0})}};C.Blocks.CocoRobo_text_ESC={init:function(){this.jsonInit({inputsInline:!0,output:null,colour:C.texts.HUE,helpUrl:C.Msg.CocoRobo_TEXT_ESC_HELPURL,tooltip:C.Msg.CocoRobo_TEXT_ESC_TOOLTIP,message0:C.Msg.CocoRobo_TEXT_ESC_MESSAGE0,args0:[{options:[["\\n","\\n"],["\\n\\n","\\n\\n"],["\\r","\\r"],["\\r\\n","\\r\\n"],["\\b","\\b"],["\\other","\\other"],["\\","\\"],["\\\\","\\\\"]],type:"field_dropdown",name:"mode"}]})}};C.Blocks.text_append_text={init:function(){this.jsonInit({colour:Et.Text,args0:[{type:"input_value",name:"text_abc"},{type:"input_value",name:"append_text"}],output:"String",inputsInline:!0,helpUrl:C.Msg.TEXT_APPEND_TEXT_HELPURL,tooltip:C.Msg.TEXT_APPEND_TEXT_TOOLTIP,message0:C.Msg.TEXT_APPEND_TEXT_MESSAGE0})}};C.Blocks.text_is_number={init:function(){this.jsonInit({inputsInline:!0,output:"Boolean",colour:Et.Text,helpUrl:C.Msg.TEXT_IS_NUMBER_HELPURL,message0:C.Msg.TEXT_IS_NUMBER_MESSAGE0,args0:[{type:"input_value",name:"TEXT",check:"String"},{options:[[C.Msg.TEXT_IS_DIGIT,".isdigit()"],[C.Msg.TEXT_IS_ALPHA,".isalpha()"]],type:"field_dropdown",name:"TYPE"}]});var e=this;this.setTooltip(function(){var t=e.getFieldValue("TYPE"),n={".isdigit()":C.Msg.TEXT_IS_NUMBER_TOOLTIP.replace("%1",C.Msg.TEXT_IS_DIGIT),".isalpha()":C.Msg.TEXT_IS_NUMBER_TOOLTIP.replace("%1",C.Msg.TEXT_IS_ALPHA)};return n[t]})}};C.Blocks.text_length={init:function(){this.jsonInit({message0:C.Msg.TEXT_LENGTH_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Number",colour:Et.Text,tooltip:C.Msg.TEXT_LENGTH_TOOLTIP,helpUrl:C.Msg.TEXT_LENGTH_HELPURL})}};C.Blocks.text_isEmpty={init:function(){this.jsonInit({message0:C.Msg.TEXT_ISEMPTY_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Boolean",colour:Et.Text,tooltip:C.Msg.TEXT_ISEMPTY_TOOLTIP,helpUrl:C.Msg.TEXT_ISEMPTY_HELPURL})}};C.Blocks.text_indexOf={init:function(){var e=[[C.Msg.TEXT_INDEXOF_OPERATOR_FIRST,"FIRST"],[C.Msg.TEXT_INDEXOF_OPERATOR_LAST,"LAST"]];this.setHelpUrl(C.Msg.TEXT_INDEXOF_HELPURL),this.setColour(Et.Text),this.setOutput(!0,"Number"),this.appendValueInput("VALUE").setCheck("String").appendField(C.Msg.TEXT_INDEXOF_INPUT_INTEXT),this.appendValueInput("FIND").setCheck("String").appendField(new C.FieldDropdown(e),"END"),C.Msg.TEXT_INDEXOF_TAIL&&this.appendDummyInput().appendField(C.Msg.TEXT_INDEXOF_TAIL),this.setInputsInline(!0);var t=this;this.setTooltip(function(){return C.Msg.TEXT_INDEXOF_TOOLTIP.replace("%1",t.workspace.options.oneBasedIndex?"0":"-1")})}};C.Blocks.text_charAt={init:function(){this.WHERE_OPTIONS=[[C.Msg.TEXT_CHARAT_FROM_START,"FROM_START"],[C.Msg.TEXT_CHARAT_FROM_END,"FROM_END"],[C.Msg.TEXT_CHARAT_FIRST,"FIRST"],[C.Msg.TEXT_CHARAT_LAST,"LAST"],[C.Msg.TEXT_CHARAT_RANDOM,"RANDOM"]],this.setHelpUrl(C.Msg.TEXT_CHARAT_HELPURL),this.setColour(Et.Text),this.setOutput(!0,"String"),this.appendValueInput("VALUE").setCheck("String").appendField(C.Msg.TEXT_CHARAT_INPUT_INTEXT),this.appendDummyInput("AT"),this.setInputsInline(!0),this.updateAt_(!0);var e=this;this.setTooltip(function(){var t=e.getFieldValue("WHERE"),n=C.Msg.TEXT_CHARAT_TOOLTIP;if(t=="FROM_START"||t=="FROM_END"){var s=t=="FROM_START"?C.Msg.LISTS_INDEX_FROM_START_TOOLTIP:C.Msg.LISTS_INDEX_FROM_END_TOOLTIP;n+=" "+s.replace("%1",e.workspace.options.oneBasedIndex?"#1":"#0")}return n})},mutationToDom:function(){var e=document.createElement("mutation"),t=this.getInput("AT").type==C.INPUT_VALUE;return e.setAttribute("at",t),e},domToMutation:function(e){var t=e.getAttribute("at")!="false";this.updateAt_(t)},updateAt_:function(e){this.removeInput("AT"),this.removeInput("ORDINAL",!0),e?(this.appendValueInput("AT").setCheck("Number"),C.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL").appendField(C.Msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT"),C.Msg.TEXT_CHARAT_TAIL&&(this.removeInput("TAIL",!0),this.appendDummyInput("TAIL").appendField(C.Msg.TEXT_CHARAT_TAIL));var t=new C.FieldDropdown(this.WHERE_OPTIONS,function(n){var s=n=="FROM_START"||n=="FROM_END";if(s!=e){var i=this.sourceBlock_;return i.updateAt_(s),i.setFieldValue(n,"WHERE"),null}});this.getInput("AT").appendField(t,"WHERE")}};C.Blocks.text_getSubstring={init:function(){this.WHERE_OPTIONS_1=[[C.Msg.TEXT_GET_SUBSTRING_START_FROM_START,"FROM_START"],[C.Msg.TEXT_GET_SUBSTRING_START_FROM_END,"FROM_END"],[C.Msg.TEXT_GET_SUBSTRING_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[C.Msg.TEXT_GET_SUBSTRING_END_FROM_START,"FROM_START"],[C.Msg.TEXT_GET_SUBSTRING_END_FROM_END,"FROM_END"],[C.Msg.TEXT_GET_SUBSTRING_END_LAST,"LAST"]],this.setHelpUrl(C.Msg.TEXT_GET_SUBSTRING_HELPURL),this.setColour(Et.Text),this.appendValueInput("STRING").setCheck("String").appendField(C.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),C.Msg.TEXT_GET_SUBSTRING_TAIL&&this.appendDummyInput("TAIL").appendField(C.Msg.TEXT_GET_SUBSTRING_TAIL),this.setInputsInline(!0),this.setOutput(!0,"String"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(C.Msg.TEXT_GET_SUBSTRING_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation"),t=this.getInput("AT1").type==C.INPUT_VALUE;e.setAttribute("at1",t);var n=this.getInput("AT2").type==C.INPUT_VALUE;return e.setAttribute("at2",n),e},domToMutation:function(e){var t=e.getAttribute("at1")=="true",n=e.getAttribute("at2")=="true";this.updateAt_(1,t),this.updateAt_(2,n)},updateAt_:function(e,t){this.removeInput("AT"+e),this.removeInput("ORDINAL"+e,!0),t?(this.appendValueInput("AT"+e).setCheck("Number"),C.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL"+e).appendField(C.Msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT"+e),e==2&&C.Msg.TEXT_GET_SUBSTRING_TAIL&&(this.removeInput("TAIL",!0),this.appendDummyInput("TAIL").appendField(C.Msg.TEXT_GET_SUBSTRING_TAIL));var n=new C.FieldDropdown(this["WHERE_OPTIONS_"+e],function(s){var i=s=="FROM_START"||s=="FROM_END";if(i!=t){var r=this.sourceBlock_;return r.updateAt_(e,i),r.setFieldValue(s,"WHERE"+e),null}});this.getInput("AT"+e).appendField(n,"WHERE"+e),e==1&&this.moveInputBefore("AT1","AT2")}};C.Blocks.text_changeCase={init:function(){var e=[[C.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE,"UPPERCASE"],[C.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE,"LOWERCASE"],[C.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE,"TITLECASE"]];this.setHelpUrl(C.Msg.TEXT_CHANGECASE_HELPURL),this.setColour(Et.Text),this.appendValueInput("TEXT").setCheck("String").appendField(new C.FieldDropdown(e),"CASE"),this.setOutput(!0,"String"),this.setTooltip(C.Msg.TEXT_CHANGECASE_TOOLTIP)}};C.Blocks.text_trim={init:function(){var e=[[C.Msg.TEXT_TRIM_OPERATOR_BOTH,"BOTH"],[C.Msg.TEXT_TRIM_OPERATOR_LEFT,"LEFT"],[C.Msg.TEXT_TRIM_OPERATOR_RIGHT,"RIGHT"]];this.setHelpUrl(C.Msg.TEXT_TRIM_HELPURL),this.setColour(Et.Text),this.appendValueInput("TEXT").setCheck("String").appendField(new C.FieldDropdown(e),"MODE"),this.setOutput(!0,"String"),this.setTooltip(C.Msg.TEXT_TRIM_TOOLTIP)}};C.Blocks.text_print={init:function(){this.jsonInit({message0:C.Msg.TEXT_PRINT_TITLE,args0:[{type:"input_value",name:"TEXT"}],previousStatement:null,nextStatement:null,colour:Et.Text,tooltip:C.Msg.TEXT_PRINT_TOOLTIP,helpUrl:C.Msg.TEXT_PRINT_HELPURL})}};C.Blocks.text_to_byte={init:function(){this.jsonInit({inputsInline:!0,output:null,colour:"#33cc99",helpUrl:C.Msg.TEXT_TO_BYTE_HELPURL,tooltip:C.Msg.TEXT_TO_BYTE_TOOLTIP,message0:C.Msg.TEXT_TO_BYTE_MESSAGE0,args0:[{type:"input_value",name:"TEXT",check:"String"}]})}};C.Blocks.other_to_byte={init:function(){this.jsonInit({inputsInline:!0,output:null,colour:Et.Text,helpUrl:C.Msg.OTHER_TO_BYTE_HELPURL,tooltip:C.Msg.OTHER_TO_BYTE_TOOLTIP,message0:C.Msg.OTHER_TO_BYTE_MESSAGE0,args0:[{type:"input_value",name:"input_var"}]})}};C.Blocks.bit_inversion={init:function(){this.jsonInit({inputsInline:!0,output:"Number",colour:Et.Math,helpUrl:C.Msg.BIT_INVERSION_HELPURL,tooltip:C.Msg.BIT_INVERSION_TOOLTIP,message0:C.Msg.BIT_INVERSION_MESSAGE0,args0:[{type:"input_value",name:"data"}]})}};C.Blocks.CocoRobo_bytes_decode={init:function(){this.jsonInit({inputsInline:!0,output:"String",colour:Et.Text,helpUrl:C.Msg.CocoRobo_BYTES_DECODE_HELPURL,tooltip:C.Msg.CocoRobo_BYTES_DECODE_TOOLTIP,message0:C.Msg.CocoRobo_BYTES_DECODE_MESSAGE0,args0:[{type:"input_value",name:"bytes_decode"}]})}};C.Blocks.CocoRobo_ujson_dumps={init:function(){this.jsonInit({inputsInline:!0,output:"String",colour:Et.Text,helpUrl:C.Msg.CocoRobo_UJSON_DUMPS_HELPURL,tooltip:C.Msg.CocoRobo_UJSON_DUMPS_TOOLTIP,message0:C.Msg.CocoRobo_UJSON_DUMPS_MESSAGE0,args0:[{type:"input_value",name:"data"}]})}};C.Blocks.CocoRobo_ujson_loads={init:function(){this.jsonInit({inputsInline:!0,output:null,colour:Et.Text,helpUrl:C.Msg.CocoRobo_UJSON_LOADS_HELPURL,tooltip:C.Msg.CocoRobo_UJSON_LOADS_TOOLTIP,message0:C.Msg.CocoRobo_UJSON_LOADS_MESSAGE0,args0:[{check:"String",type:"input_value",name:"data"}]})}};C.Blocks.CocoRobo_code_annotation={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Et.Text,helpUrl:C.Msg.CocoRobo_code_annotation_HELPURL,tooltip:C.Msg.CocoRobo_code_annotation_TOOLTIP,message0:C.Msg.CocoRobo_code_annotation_MESSAGE0,args0:[{check:"String",type:"input_value",name:"data"}]})}};C.Blocks.text_dict={init:function(){this.setHelpUrl(C.Msg.TEXT_TEXT_HELPURL),this.setColour(32),this.appendDummyInput().appendField(C.Msg.TEXT_DICT_START).appendField(new C.FieldTextInput(""),"TEXT").appendField(C.Msg.TEXT_DICT_END),this.setOutput(!0,"Array"),this.setTooltip(C.Msg.Text_Dict_TOOLTIP)}};C.Python=ni.pythonGenerator;C.lists={HUE:Et.List};C.Blocks.lists_create_with={init:function(){this.setHelpUrl(C.Msg.LISTS_CREATE_WITH_HELPURL),this.setColour(Et.List),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Array"),this.setMutator(new C.icons.MutatorIcon(["lists_create_with_item"],this)),this.setInputsInline(!0),this.setTooltip(C.Msg.LISTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("lists_create_with_container");t.initSvg();for(var n=t.getInput("STACK").connection,s=0;s<this.itemCount_;s++){var i=e.newBlock("lists_create_with_item");i.initSvg(),n.connect(i.previousConnection),n=i.nextConnection}return t},compose:function(e){for(var t=e.getInputTargetBlock("STACK"),n=[];t;)n.push(t.valueConnection_),t=t.nextConnection&&t.nextConnection.targetBlock();for(var s=0;s<this.itemCount_;s++){var i=this.getInput("ADD"+s).connection.targetConnection;i&&n.indexOf(i)==-1&&i.disconnect()}this.itemCount_=n.length,this.updateShape_();for(var s=0;s<this.itemCount_;s++)C.icons.MutatorIcon.reconnect(n[s],this,"ADD"+s)},saveConnections:function(e){for(var t=e.getInputTargetBlock("STACK"),n=0;t;){var s=this.getInput("ADD"+n);t.valueConnection_=s&&s.connection.targetConnection,n++,t=t.nextConnection&&t.nextConnection.targetBlock()}},updateShape_:function(){this.itemCount_&&this.getInput("EMPTY")?this.removeInput("EMPTY"):!this.itemCount_&&!this.getInput("EMPTY")&&this.appendDummyInput("EMPTY").appendField(C.Msg.LISTS_CREATE_EMPTY_TITLE);for(var e=0;e<this.itemCount_;e++)if(!this.getInput("ADD"+e)){var t=this.appendValueInput("ADD"+e);e==0&&t.appendField(C.Msg.LISTS_CREATE_WITH_INPUT_WITH)}for(this.itemCount_>3?this.setInputsInline(!1):this.setInputsInline(!0);this.getInput("ADD"+e);)this.removeInput("ADD"+e),e++}};C.Blocks.lists_create_with_container={init:function(){this.setColour(C.lists.HUE),this.appendDummyInput().appendField(C.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD),this.appendStatementInput("STACK"),this.setTooltip(C.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}};C.Blocks.lists_create_with_item={init:function(){this.setColour(C.lists.HUE),this.appendDummyInput().appendField(C.Msg.LISTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(C.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}};C.Blocks.text_list={init:function(){this.setHelpUrl(C.Msg.TEXT_TEXT_HELPURL),this.setColour("#40bfe4"),this.setTooltip(C.Msg.Text_List_TOOLTIP),this.appendDummyInput().appendField(C.Msg.TEXT_LIST_START).appendField(new C.FieldTextInput(""),"TEXT").appendField(C.Msg.TEXT_LIST_END),this.setOutput(!0,"Array")}};C.Blocks.CocoRobo_return_list={init:function(){this.jsonInit({colour:Et.List,args0:[{type:"input_value",name:"list_name"},{type:"input_value",name:"list_items"}],nextStatement:null,previousStatement:null,helpUrl:C.Msg.CocoRobo_HELPURL,tooltip:C.Msg.CocoRobo_return_list_TOOLTIP,message0:C.Msg.CocoRobo_return_list_MESSAGE0,inputsInline:!0})}};C.Python.quote_empty=function(e){return e};C.Blocks.list_order_item={init:function(){this.jsonInit({colour:Et.List,args0:[{type:"input_value",name:"list_name"},{options:[[C.Msg.CocoRobo_ORDER,"["],[C.Msg.CocoRobo_REVERSE_ORDER,"[-"]],type:"field_dropdown",name:"list_order"},{check:"Number",type:"input_value",name:"list_order_item"}],output:["Number","String","Boolean","Array"],inputsInline:!0,helpUrl:C.Msg.LIST_ORDER_ITEM_HELPURL,tooltip:C.Msg.LIST_ORDER_ITEM_TOOLTIP,message0:C.Msg.LIST_ORDER_ITEM_MESSAGE0})}};C.Blocks.lists_append={init:function(){this.jsonInit({message0:C.Msg.CocoRobo_lists_append_MESSAGE0,args0:[{check:"Array",type:"input_value",name:"list_name"},{type:"input_value",name:"last_item",check:["String","Number"]}],nextStatement:null,previousStatement:null,inputsInline:!0,colour:Et.List,tooltip:C.Msg.CocoRobo_lists_append_TOOLTIP,helpUrl:C.Msg.CocoRobo_lists_append_HELPURL})}};C.Blocks.lists_extend={init:function(){this.jsonInit({message0:C.Msg.CocoRobo_lists_extend_MESSAGE0,args0:[{check:"Array",type:"input_value",name:"list_name"},{type:"input_value",name:"extend_list",check:"Array"}],nextStatement:null,previousStatement:null,inputsInline:!0,colour:Et.List,tooltip:C.Msg.CocoRobo_lists_extend_TOOLTIP,helpUrl:C.Msg.CocoRobo_lists_extend_HELPURL})}};C.Blocks.CocoRobo_return_list={init:function(){this.jsonInit({colour:Et.List,args0:[{type:"input_value",name:"list_name"},{type:"input_value",name:"list_items"}],nextStatement:null,previousStatement:null,helpUrl:C.Msg.CocoRobo_HELPURL,tooltip:C.Msg.CocoRobo_return_list_TOOLTIP,message0:C.Msg.CocoRobo_return_list_MESSAGE0,inputsInline:!0})}};C.Blocks.list_item_exist={init:function(){this.jsonInit({colour:Et.List,args0:[{type:"input_value",name:"list_name"},{type:"input_value",name:"list_item"}],output:"Boolean",inputsInline:!0,helpUrl:C.Msg.LIST_ITEM_EXIST_HELPURL,tooltip:C.Msg.LIST_ITEM_EXIST_TOOLTIP,message0:C.Msg.LIST_ITEM_EXIST_MESSAGE0})}};C.Blocks.set_list_order_item={init:function(){this.jsonInit({colour:Et.List,args0:[{type:"input_value",name:"list_name"},{options:[[C.Msg.CocoRobo_ORDER,"["],[C.Msg.CocoRobo_REVERSE_ORDER,"[-"]],type:"field_dropdown",name:"list_order"},{check:"Number",type:"input_value",name:"list_order_item"},{type:"input_value",name:"set_value"}],inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:C.Msg.SET_LIST_ORDER_ITEM_HELPURL,tooltip:C.Msg.SET_LIST_ORDER_ITEM_TOOLTIP,message0:C.Msg.SET_LIST_ORDER_ITEM_MESSAGE0})}};C.Blocks.insert_list_order_item={init:function(){this.jsonInit({colour:Et.List,args0:[{type:"input_value",name:"list_name"},{options:[[C.Msg.CocoRobo_ORDER,"("],[C.Msg.CocoRobo_REVERSE_ORDER,"(-"]],type:"field_dropdown",name:"list_order"},{check:"Number",type:"input_value",name:"list_order_item"},{type:"input_value",name:"set_value"}],inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:C.Msg.INSERT_LIST_ORDER_ITEM_HELPURL,tooltip:C.Msg.INSERT_LIST_ORDER_ITEM_TOOLTIP,message0:C.Msg.INSERT_LIST_ORDER_ITEM_MESSAGE0})}};C.Blocks.list_order_item={init:function(){this.jsonInit({colour:Et.List,args0:[{type:"input_value",name:"list_name"},{options:[[C.Msg.CocoRobo_ORDER,"["],[C.Msg.CocoRobo_REVERSE_ORDER,"[-"]],type:"field_dropdown",name:"list_order"},{check:"Number",type:"input_value",name:"list_order_item"}],output:["Number","String","Boolean","Array"],inputsInline:!0,helpUrl:C.Msg.LIST_ORDER_ITEM_HELPURL,tooltip:C.Msg.LIST_ORDER_ITEM_TOOLTIP,message0:C.Msg.LIST_ORDER_ITEM_MESSAGE0})}};C.Blocks.parts_of_list={init:function(){this.jsonInit({colour:Et.List,args0:[{type:"input_value",name:"list_name"},{options:[[C.Msg.CocoRobo_ORDER,"["],[C.Msg.CocoRobo_REVERSE_ORDER,"[-"]],type:"field_dropdown",name:"list_start_order"},{check:"Number",type:"input_value",name:"start_item"},{options:[[C.Msg.CocoRobo_ORDER,":"],[C.Msg.CocoRobo_REVERSE_ORDER,":-"]],type:"field_dropdown",name:"list_end_order"},{check:"Number",type:"input_value",name:"end_item"}],output:null,inputsInline:!0,helpUrl:C.Msg.PARTS_OF_LIST_HELPURL,tooltip:C.Msg.PARTS_OF_LIST_TOOLTIP,message0:C.Msg.PARTS_OF_LIST_MESSAGE0})}};C.Blocks.list_to_tuple={init:function(){this.jsonInit({colour:Et.Tuple,args0:[{check:"Array",type:"input_value",name:"list_name"}],output:null,inputsInline:!0,helpUrl:C.Msg.LIST_TO_TUPLE_HELPURL,tooltip:C.Msg.LIST_TO_TUPLE_TOOLTIP,message0:C.Msg.LIST_TO_TUPLE_MESSAGE0})}};C.Blocks.lists_clear={init:function(){this.jsonInit({message0:C.Msg.CocoRobo_lists_clear_MESSAGE0,args0:[{check:"Array",type:"input_value",name:"list_name"}],nextStatement:null,previousStatement:null,inputsInline:!0,colour:Et.List,tooltip:C.Msg.CocoRobo_lists_clear_TOOLTIP,helpUrl:C.Msg.CocoRobo_lists_clear_HELPURL})}};C.Blocks.lists_repeat={init:function(){this.jsonInit({message0:C.Msg.LISTS_REPEAT_TITLE,args0:[{type:"input_value",name:"ITEM"},{type:"input_value",name:"NUM",check:"Number"}],output:"Array",colour:Et.List,tooltip:C.Msg.LISTS_REPEAT_TOOLTIP,helpUrl:C.Msg.LISTS_REPEAT_HELPURL})}};C.Blocks.lists_length={init:function(){this.jsonInit({message0:C.Msg.LISTS_LENGTH_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Number",colour:Et.List,tooltip:C.Msg.LISTS_LENGTH_TOOLTIP,helpUrl:C.Msg.LISTS_LENGTH_HELPURL})}};C.Blocks.lists_isEmpty={init:function(){this.jsonInit({message0:C.Msg.LISTS_ISEMPTY_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Boolean",colour:Et.List,tooltip:C.Msg.LISTS_ISEMPTY_TOOLTIP,helpUrl:C.Msg.LISTS_ISEMPTY_HELPURL})}};C.Blocks.lists_indexOf={init:function(){var e=[[C.Msg.LISTS_INDEX_OF_FIRST,"FIRST"],[C.Msg.LISTS_INDEX_OF_LAST,"LAST"]];this.setHelpUrl(C.Msg.LISTS_INDEX_OF_HELPURL),this.setColour(Et.List),this.setOutput(!0,"Number"),this.appendValueInput("VALUE").setCheck(["Array","String"]).appendField(C.Msg.LISTS_INDEX_OF_INPUT_IN_LIST),this.appendValueInput("FIND").appendField(new C.FieldDropdown(e),"END"),this.setInputsInline(!0),this.setTooltip(function(){return C.Msg.LISTS_INDEX_OF_TOOLTIP.replace("%1",this.workspace.options.oneBasedIndex?"0":"-1")})}};C.Blocks.lists_index={init:function(){this.setHelpUrl(C.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Et.List),this.appendValueInput("ITEM").setCheck("Number").appendField("get"),this.appendValueInput("LIST").setCheck(["Array","String"]).appendField("th item of"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("Get's the ith item from the list")}};C.Blocks.lists_getIndex={init:function(){var e=[[C.Msg.LISTS_GET_INDEX_GET,"GET"],[C.Msg.LISTS_GET_INDEX_GET_REMOVE,"GET_REMOVE"],[C.Msg.LISTS_GET_INDEX_REMOVE,"REMOVE"]];this.WHERE_OPTIONS=[[C.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[C.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[C.Msg.LISTS_GET_INDEX_FIRST,"FIRST"],[C.Msg.LISTS_GET_INDEX_LAST,"LAST"],[C.Msg.LISTS_GET_INDEX_RANDOM,"RANDOM"]],this.setHelpUrl(C.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Et.List);var t=new C.FieldDropdown(e,function(s){var i=s=="REMOVE";this.sourceBlock_.updateStatement_(i)});this.appendValueInput("VALUE").setCheck("Array").appendField(C.Msg.LISTS_GET_INDEX_INPUT_IN_LIST),this.appendDummyInput().appendField(t,"MODE").appendField("","SPACE"),this.appendDummyInput("AT"),C.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(C.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var n=this;this.setTooltip(function(){var s=n.getFieldValue("MODE"),i=n.getFieldValue("WHERE"),r="";switch(s+" "+i){case"GET FROM_START":case"GET FROM_END":r=C.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET FIRST":r=C.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST;break;case"GET LAST":r=C.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST;break;case"GET RANDOM":r=C.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":r=C.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE FIRST":r=C.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST;break;case"GET_REMOVE LAST":r=C.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST;break;case"GET_REMOVE RANDOM":r=C.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM;break;case"REMOVE FROM_START":case"REMOVE FROM_END":r=C.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM;break;case"REMOVE FIRST":r=C.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST;break;case"REMOVE LAST":r=C.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST;break;case"REMOVE RANDOM":r=C.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM;break}if(i=="FROM_START"||i=="FROM_END"){var a=i=="FROM_START"?C.Msg.LISTS_INDEX_FROM_START_TOOLTIP:C.Msg.LISTS_INDEX_FROM_END_TOOLTIP;r+=" "+a.replace("%1",n.workspace.options.oneBasedIndex?"#1":"#0")}return r})},mutationToDom:function(){var e=document.createElement("mutation"),t=!this.outputConnection;e.setAttribute("statement",t);var n=this.getInput("AT").type==C.INPUT_VALUE;return e.setAttribute("at",n),e},domToMutation:function(e){var t=e.getAttribute("statement")=="true";this.updateStatement_(t);var n=e.getAttribute("at")!="false";this.updateAt_(n)},updateStatement_:function(e){var t=!this.outputConnection;e!=t&&(this.unplug(!0,!0),e?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(e){this.removeInput("AT"),this.removeInput("ORDINAL",!0),e?(this.appendValueInput("AT").setCheck("Number"),C.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL").appendField(C.Msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT");var t=new C.FieldDropdown(this.WHERE_OPTIONS,function(n){var s=n=="FROM_START"||n=="FROM_END";if(s!=e){var i=this.sourceBlock_;return i.updateAt_(s),i.setFieldValue(n,"WHERE"),null}});this.getInput("AT").appendField(t,"WHERE"),C.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}};C.Blocks.lists_setIndex={init:function(){var e=[[C.Msg.LISTS_SET_INDEX_SET,"SET"],[C.Msg.LISTS_SET_INDEX_INSERT,"INSERT"]];this.WHERE_OPTIONS=[[C.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[C.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[C.Msg.LISTS_GET_INDEX_FIRST,"FIRST"],[C.Msg.LISTS_GET_INDEX_LAST,"LAST"],[C.Msg.LISTS_GET_INDEX_RANDOM,"RANDOM"]],this.setHelpUrl(C.Msg.LISTS_SET_INDEX_HELPURL),this.setColour(Et.List),this.appendValueInput("LIST").setCheck("Array").appendField(C.Msg.LISTS_SET_INDEX_INPUT_IN_LIST),this.appendDummyInput().appendField(new C.FieldDropdown(e),"MODE").appendField("","SPACE"),this.appendDummyInput("AT"),this.appendValueInput("TO").appendField(C.Msg.LISTS_SET_INDEX_INPUT_TO),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(C.Msg.LISTS_SET_INDEX_TOOLTIP),this.updateAt_(!0);var t=this;this.setTooltip(function(){var n=t.getFieldValue("MODE"),s=t.getFieldValue("WHERE"),i="";switch(n+" "+s){case"SET FROM_START":case"SET FROM_END":i=C.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM;break;case"SET FIRST":i=C.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST;break;case"SET LAST":i=C.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST;break;case"SET RANDOM":i=C.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM;break;case"INSERT FROM_START":case"INSERT FROM_END":i=C.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM;break;case"INSERT FIRST":i=C.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST;break;case"INSERT LAST":i=C.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST;break;case"INSERT RANDOM":i=C.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM;break}return(s=="FROM_START"||s=="FROM_END")&&(i+=" "+C.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",t.workspace.options.oneBasedIndex?"#1":"#0")),i})},mutationToDom:function(){var e=document.createElement("mutation"),t=this.getInput("AT").type==C.INPUT_VALUE;return e.setAttribute("at",t),e},domToMutation:function(e){var t=e.getAttribute("at")!="false";this.updateAt_(t)},updateAt_:function(e){this.removeInput("AT"),this.removeInput("ORDINAL",!0),e?(this.appendValueInput("AT").setCheck("Number"),C.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL").appendField(C.Msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT");var t=new C.FieldDropdown(this.WHERE_OPTIONS,function(n){var s=n=="FROM_START"||n=="FROM_END";if(s!=e){var i=this.sourceBlock_;return i.updateAt_(s),i.setFieldValue(n,"WHERE"),null}});this.moveInputBefore("AT","TO"),this.getInput("ORDINAL")&&this.moveInputBefore("ORDINAL","TO"),this.getInput("AT").appendField(t,"WHERE")}};C.Blocks.lists_getSublist={init:function(){this.WHERE_OPTIONS_1=[[C.Msg.LISTS_GET_SUBLIST_START_FROM_START,"FROM_START"],[C.Msg.LISTS_GET_SUBLIST_START_FROM_END,"FROM_END"],[C.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[C.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[C.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[C.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(C.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Et.List),this.appendValueInput("LIST").setCheck(["Array","String"]).appendField(C.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),C.Msg.LISTS_GET_SUBLIST_TAIL&&this.appendDummyInput("TAIL").appendField(C.Msg.LISTS_GET_SUBLIST_TAIL),this.setInputsInline(!0),this.setOutput(!0,"Array"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(C.Msg.LISTS_GET_SUBLIST_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation"),t=this.getInput("AT1").type==C.INPUT_VALUE;e.setAttribute("at1",t);var n=this.getInput("AT2").type==C.INPUT_VALUE;return e.setAttribute("at2",n),e},domToMutation:function(e){var t=e.getAttribute("at1")=="true",n=e.getAttribute("at2")=="true";this.updateAt_(1,t),this.updateAt_(2,n)},updateAt_:function(e,t){this.removeInput("AT"+e),this.removeInput("ORDINAL"+e,!0),t?(this.appendValueInput("AT"+e).setCheck("Number"),C.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL"+e).appendField(C.Msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT"+e);var n=new C.FieldDropdown(this["WHERE_OPTIONS_"+e],function(s){var i=s=="FROM_START"||s=="FROM_END";if(i!=t){var r=this.sourceBlock_;return r.updateAt_(e,i),r.setFieldValue(s,"WHERE"+e),null}});this.getInput("AT"+e).appendField(n,"WHERE"+e),e==1&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2")),C.Msg.LISTS_GET_SUBLIST_TAIL&&this.moveInputBefore("TAIL",null)}};C.Blocks.lists_sort={init:function(){this.jsonInit({message0:C.Msg.LISTS_SORT_TITLE,args0:[{type:"field_dropdown",name:"TYPE",options:[[C.Msg.LISTS_SORT_TYPE_NUMERIC,"NUMERIC"],[C.Msg.LISTS_SORT_TYPE_TEXT,"TEXT"],[C.Msg.LISTS_SORT_TYPE_IGNORECASE,"IGNORE_CASE"]]},{type:"field_dropdown",name:"DIRECTION",options:[[C.Msg.LISTS_SORT_ORDER_ASCENDING,"1"],[C.Msg.LISTS_SORT_ORDER_DESCENDING,"-1"]]},{type:"input_value",name:"LIST",check:"Array"}],output:"Array",colour:Et.List,tooltip:C.Msg.LISTS_SORT_TOOLTIP,helpUrl:C.Msg.LISTS_SORT_HELPURL})}};C.Blocks.lists_split={init:function(){var e=this,t=new C.FieldDropdown([[C.Msg.LISTS_SPLIT_LIST_FROM_TEXT,"SPLIT"],[C.Msg.LISTS_SPLIT_TEXT_FROM_LIST,"JOIN"]],function(n){e.updateType_(n)});this.setHelpUrl(C.Msg.LISTS_SPLIT_HELPURL),this.setColour(Et.List),this.appendValueInput("INPUT").setCheck("String").appendField(t,"MODE"),this.appendValueInput("DELIM").setCheck("String").appendField(C.Msg.LISTS_SPLIT_WITH_DELIMITER),this.setInputsInline(!0),this.setOutput(!0,"Array"),this.setTooltip(function(){var n=e.getFieldValue("MODE");if(n=="SPLIT")return C.Msg.LISTS_SPLIT_TOOLTIP_SPLIT;if(n=="JOIN")return C.Msg.LISTS_SPLIT_TOOLTIP_JOIN;throw"Unknown mode: "+n})},updateType_:function(e){e=="SPLIT"?(this.outputConnection.setCheck("Array"),this.getInput("INPUT").setCheck("String")):(this.outputConnection.setCheck("String"),this.getInput("INPUT").setCheck("Array"))},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("mode",this.getFieldValue("MODE")),e},domToMutation:function(e){this.updateType_(e.getAttribute("mode"))}};C.Blocks.list_first_index={init:function(){this.jsonInit({inputsInline:!0,output:"Number",colour:Et.List,helpUrl:C.Msg.LIST_FIRST_INDEX_HELPURL,message0:C.Msg.LIST_FIRST_INDEX_MESSAGE0,args0:[{type:"input_value",name:"elem"},{check:"Array",type:"input_value",name:"my_list"},{options:[[C.Msg.FIRST,"first"],[C.Msg.LAST,"last"]],type:"field_dropdown",name:"last_or_first"}]});var e=this;this.setTooltip(function(){var t=e.getFieldValue("last_or_first"),n={first:C.Msg.LIST_FIRST_INDEX_TOOLTIP.replace("%3",C.Msg.FIRST),last:C.Msg.LIST_FIRST_INDEX_TOOLTIP.replace("%3",C.Msg.LAST)};return n[t]})}};C.Python=ni.pythonGenerator;C.dictionary={HUE:Et.Dictionary};C.typeOf=function(e){var t=typeof e;if(t=="object")if(e){if(e instanceof Array)return"array";if(e instanceof Object)return t;var n=Object.prototype.toString.call(e);if(n=="[object Window]")return"object";if(n=="[object Array]"||typeof e.length=="number"&&typeof e.splice<"u"&&typeof e.propertyIsEnumerable<"u"&&!e.propertyIsEnumerable("splice"))return"array";if(n=="[object Function]"||typeof e.call<"u"&&typeof e.propertyIsEnumerable<"u"&&!e.propertyIsEnumerable("call"))return"function"}else return"null";else if(t=="function"&&typeof e.call>"u")return"object";return t};C.Blocks.dict_create_with_items_insert={init:function(){this.setColour(Et.Dictionary),this.appendDummyInput("").appendField(new C.FieldLabel(C.Msg.DICT_CREATE_WITH_INPUT_WITH),"TIP"),this.itemCount_=3,this.setOutput(!0),this.setMutator(new C.icons.MutatorIcon(["dict_create_with_item"],this)),this.setTooltip(C.Msg.DICT_CREATE_WITH_INPUT_WITH)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("dict_create_with_container");t.initSvg();for(var n=t.getInput("STACK").connection,s=0;s<this.itemCount_;s++){var i=e.newBlock("dict_create_with_item");i.initSvg(),n.connect(i.previousConnection),n=i.nextConnection}return t},compose:function(e){e=e.getInputTargetBlock("STACK");for(var t=[],n=0;e;)t[n]=e.valueConnection_,e=e.nextConnection&&e.nextConnection.targetBlock(),n++;for(this.itemCount_=n,this.updateShape_(),n=0;n<this.itemCount_;n++)t[n]&&this.getInput("ADD"+n).connection.connect(t[n])},saveConnections:function(e){e=e.getInputTargetBlock("STACK");for(var t=0;e;){var n=this.getInput("ADD"+t);e.valueConnection_=n&&n.connection.targetConnection,t++,e=e.nextConnection&&e.nextConnection.targetBlock()}},updateShape_:function(){this.getInput("EMPTY")&&this.removeInput("EMPTY");for(var e=[],t=0;this.getInput("ADD"+t);t++)e.push(this.getFieldValue("KEY"+t)),this.removeInput("ADD"+t);if(this.itemCount_==0)this.getField("TIP").setText(C.Msg.DICT_CREATE_EMPTY_TITLE);else for(this.getField("TIP").setText(C.Msg.DICT_CREATE_WITH_INPUT_WITH),t=0;t<this.itemCount_;t++)this.appendValueInput("ADD"+t).setCheck(null).setAlign(C.ALIGN_RIGHT).appendField(new C.FieldTextInput(e.length>t?e[t]:t==0?"key_0":"key_"+t),"KEY"+t).appendField(":")},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){C.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}};C.Blocks.dict_create_with_item={init:function(){this.setColour(Et.Dictionary),this.appendDummyInput().appendField(C.Msg.VARIABLES_DEFAULT_NAME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(C.Msg.DICT_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}};C.Blocks.dict_create_with_container={init:function(){this.setColour(Et.Dictionary),this.appendDummyInput().appendField(C.Msg.DICT_CREATE_WITH_CONTAINER_TITLE_ADD),this.appendStatementInput("STACK"),this.setTooltip(C.Msg.DICT_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}};C.Blocks.dict_create_with={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Et.Dictionary,helpUrl:C.Msg.DICT_CREATE_WITH_HELPURL,tooltip:C.Msg.DICT_CREATE_WITH_TOOLTIP,message0:C.Msg.DICT_CREATE_WITH_MESSAGE0,args0:[{type:"input_value",name:"dict_name"},{type:"input_value",name:"dict_items"}]})}};C.Blocks.dict_key_value={init:function(){this.jsonInit({colour:Et.Dictionary,args0:[{type:"input_value",name:"dict_name"},{type:"input_value",name:"dict_items"}],output:["String","Number","Boolean","Array"],inputsInline:!0,helpUrl:C.Msg.DICT_KEY_VALUE_HELPURL,tooltip:C.Msg.DICT_KEY_VALUE_TOOLTIP,message0:C.Msg.DICT_KEY_VALUE_MESSAGE0})}};C.Blocks.add_dict_key_value={init:function(){this.jsonInit({colour:Et.Dictionary,args0:[{type:"input_value",name:"dict_name"},{type:"input_value",name:"dict_items"},{type:"input_value",name:"add_value"}],inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:C.Msg.ADD_DICT_KEY_VALUE_HELPURL,tooltip:C.Msg.ADD_DICT_KEY_VALUE_TOOLTIP,message0:C.Msg.ADD_DICT_KEY_VALUE_MESSAGE0})}};C.Blocks.dict_length={init:function(){this.jsonInit({colour:Et.Dictionary,args0:[{type:"input_value",name:"dict_name"}],output:"Number",inputsInline:!0,helpUrl:C.Msg.DICT_LENGTH_HELPURL,tooltip:C.Msg.DICT_LENGTH_TOOLTIP,message0:C.Msg.DICT_LENGTH_MESSAGE0})}};C.Blocks.dict_key_exist={init:function(){this.jsonInit({colour:Et.Dictionary,args0:[{type:"input_value",name:"dict_name"},{type:"input_value",name:"dict_items"}],output:"Boolean",inputsInline:!0,helpUrl:C.Msg.DICT_KEY_EXIST_HELPURL,tooltip:C.Msg.DICT_KEY_EXIST_TOOLTIP,message0:C.Msg.DICT_KEY_EXIST_MESSAGE0})}};C.Blocks.dict_key_or_val_list={init:function(){this.jsonInit({colour:Et.Dictionary,args0:[{type:"input_value",name:"dict_name"},{options:[[C.Msg.DICT_KEYS,"keys"],[C.Msg.DICT_VALUES,"values"]],type:"field_dropdown",name:"key_or_val"}],output:"Array",inputsInline:!0,helpUrl:C.Msg.DICT_KEY_OR_VAL_LIST_HELPURL,message0:C.Msg.DICT_KEY_OR_VAL_LIST_MESSAGE0});var e=this;this.setTooltip(function(){var t=e.getFieldValue("key_or_val"),n={keys:C.Msg.DICT_KEY_OR_VAL_LIST_TOOLTIP.replace("%2",C.Msg.DICT_KEYS),values:C.Msg.DICT_KEY_OR_VAL_LIST_TOOLTIP.replace("%2",C.Msg.DICT_VALUES)};return n[t]})}};C.Python=ni.pythonGenerator;C.tuples={HUE:Et.Tuples};C.Blocks.tuple_create_with_items_insert={init:function(){this.setHelpUrl(C.Msg.TUPLE_CREATE_WITH_ITEMS_INSERT_HELPURL),this.setColour(Et.Tuple),this.itemCount_=3,this.updateShape_(),this.setOutput(!0),this.setMutator(new C.icons.MutatorIcon(["tuple_create_with_item"],this)),this.setTooltip(C.Msg.TUPLE_CREATE_WITH_ITEMS_INSERT_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("tuple_create_with_container");t.initSvg();for(var n=t.getInput("STACK").connection,s=0;s<this.itemCount_;s++){var i=e.newBlock("tuple_create_with_item");i.initSvg(),n.connect(i.previousConnection),n=i.nextConnection}return t},compose:function(e){var t=e.getInputTargetBlock("STACK");for(e=[];t;)e.push(t.valueConnection_),t=t.nextConnection&&t.nextConnection.targetBlock();for(t=0;t<this.itemCount_;t++){var n=this.getInput("ADD"+t).connection.targetConnection;n&&e.indexOf(n)==-1&&n.disconnect()}for(this.itemCount_=e.length,this.updateShape_(),t=0;t<this.itemCount_;t++)C.icons.MutatorIcon.reconnect(e[t],this,"ADD"+t)},saveConnections:function(e){e=e.getInputTargetBlock("STACK");for(var t=0;e;){var n=this.getInput("ADD"+t);e.valueConnection_=n&&n.connection.targetConnection,t++,e=e.nextConnection&&e.nextConnection.targetBlock()}},updateShape_:function(){this.itemCount_&&this.getInput("EMPTY")?this.removeInput("EMPTY"):this.itemCount_||this.getInput("EMPTY")||this.appendDummyInput("EMPTY").appendField(C.Msg.TUPLE_CREATE_EMPTY_TITLE);for(var e=0;e<this.itemCount_;e++)if(!this.getInput("ADD"+e)){var t=this.appendValueInput("ADD"+e);e==0&&t.appendField(C.Msg.TUPLE_CREATE_WITH_INPUT_WITH)}for(;this.getInput("ADD"+e);)this.removeInput("ADD"+e),e++}};C.Blocks.tuple_create_with_item={init:function(){this.setColour(Et.Tuple),this.appendDummyInput().appendField(C.Msg.TUPLE_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(C.Msg.TUPLE_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}};C.Blocks.tuple_create_with_container={init:function(){this.setColour(Et.Tuple),this.appendDummyInput().appendField(C.Msg.TUPLE_CREATE_WITH_CONTAINER_TITLE_ADD),this.appendStatementInput("STACK"),this.setTooltip(C.Msg.TUPLE_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}};C.Blocks.text_tuple={init:function(){this.setHelpUrl(C.Msg.TEXT_TEXT_HELPURL),this.setColour(192),this.appendDummyInput().appendField(C.Msg.TEXT_TUPLE_START).appendField(new C.FieldTextInput(""),"TEXT").appendField(C.Msg.TEXT_TUPLE_END),this.setOutput(!0,"Array"),this.setTooltip(C.Msg.Text_Tuple_TOOLTIP)}};C.Blocks.tuple_create_with={init:function(){this.jsonInit({colour:Et.Tuple,args0:[{type:"input_value",name:"tuple_name"},{type:"input_value",name:"tuple_items"}],inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:C.Msg.tuple_create_with_HELPURL,tooltip:C.Msg.tuple_create_with_TOOLTIP,message0:C.Msg.tuple_create_with_MESSAGE0})}};C.Blocks.tuple_order_item={init:function(){this.jsonInit({colour:Et.Tuple,args0:[{type:"input_value",name:"tuple_name"},{options:[[C.Msg.CocoRobo_ORDER,"["],[C.Msg.CocoRobo_REVERSE_ORDER,"[-"]],type:"field_dropdown",name:"tuple_order"},{check:"Number",type:"input_value",name:"tuple_order_item"}],output:["Number","String","Boolean","Array"],inputsInline:!0,helpUrl:C.Msg.tuple_order_item_HELPURL,tooltip:C.Msg.tuple_order_item_TOOLTIP,message0:C.Msg.tuple_order_item_MESSAGE0})}};C.Blocks.tuple_min_max_len={init:function(){this.jsonInit({colour:Et.Tuple,args0:[{type:"input_value",name:"tuple_name"},{options:[[C.Msg.CocoRobo_MIN,"min"],[C.Msg.CocoRobo_MAX,"max"],[C.Msg.CocoRobo_LENTH,"len"]],type:"field_dropdown",name:"tuple_min_max_len"}],output:["Number","String"],inputsInline:!0,helpUrl:C.Msg.TUPLE_MIN_MAX_LEN_HELPURL,message0:C.Msg.TUPLE_MIN_MAX_LEN_MESSAGE0});var e=this;this.setTooltip(function(){var t=e.getFieldValue("tuple_min_max_len"),n={min:C.Msg.TUPLE_MIN_MAX_LEN_TOOLTIP.replace("%2",C.Msg.CocoRobo_MIN),max:C.Msg.TUPLE_MIN_MAX_LEN_TOOLTIP.replace("%2",C.Msg.CocoRobo_MAX),len:C.Msg.TUPLE_MIN_MAX_LEN_TOOLTIP.replace("%2",C.Msg.CocoRobo_LENTH)};return n[t]})}};C.Blocks.tuple_item_exist={init:function(){this.jsonInit({colour:Et.Tuple,args0:[{type:"input_value",name:"tuple_name"},{type:"input_value",name:"tuple_item"}],output:"Boolean",inputsInline:!0,helpUrl:C.Msg.TUPLE_ITEM_EXIST_HELPURL,tooltip:C.Msg.TUPLE_ITEM_EXIST_TOOLTIP,message0:C.Msg.TUPLE_ITEM_EXIST_MESSAGE0})}};C.Blocks.parts_of_tuple={init:function(){this.jsonInit({colour:Et.Tuple,args0:[{type:"input_value",name:"tuple_name"},{check:"Number",type:"input_value",name:"tuple_item"}],output:null,inputsInline:!0,helpUrl:C.Msg.PARTS_OF_TUPLE_HELPURL,tooltip:C.Msg.PARTS_OF_TUPLE_TOOLTIP,message0:C.Msg.PARTS_OF_TUPLE_MESSAGE0})}};C.Blocks.parts_of_tuple2={init:function(){this.jsonInit({colour:Et.Tuple,args0:[{type:"input_value",name:"tuple_name"},{options:[[C.Msg.CocoRobo_ORDER,"["],[C.Msg.CocoRobo_REVERSE_ORDER,"[-"]],type:"field_dropdown",name:"tuple_start_order"},{check:"Number",type:"input_value",name:"start_item"},{options:[[C.Msg.CocoRobo_ORDER,":"],[C.Msg.CocoRobo_REVERSE_ORDER,":-"]],type:"field_dropdown",name:"tuple_end_order"},{check:"Number",type:"input_value",name:"end_item"}],output:null,inputsInline:!0,helpUrl:C.Msg.PARTS_OF_TUPLE2_HELPURL,tooltip:C.Msg.PARTS_OF_TUPLE2_TOOLTIP,message0:C.Msg.PARTS_OF_TUPLE2_MESSAGE0})}};C.Python=ni.pythonGenerator;C.set={HUE:Et.Set};C.Blocks.set_create_with_items_insert={init:function(){this.setHelpUrl(C.Msg.SET_CREATE_WITH_ITEMS_INSERT_HELPURL),this.setColour(Et.Set),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Array"),this.setMutator(new C.icons.MutatorIcon(["set_create_with_item"],this)),this.setTooltip(C.Msg.SET_CREATE_WITH_ITEMS_INSERT_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("set_create_with_container");t.initSvg();for(var n=t.getInput("STACK").connection,s=0;s<this.itemCount_;s++){var i=e.newBlock("set_create_with_item");i.initSvg(),n.connect(i.previousConnection),n=i.nextConnection}return t},compose:function(e){var t=e.getInputTargetBlock("STACK");for(e=[];t;)e.push(t.valueConnection_),t=t.nextConnection&&t.nextConnection.targetBlock();for(t=0;t<this.itemCount_;t++){var n=this.getInput("ADD"+t).connection.targetConnection;n&&e.indexOf(n)==-1&&n.disconnect()}for(this.itemCount_=e.length,this.updateShape_(),t=0;t<this.itemCount_;t++)C.icons.MutatorIcon.reconnect(e[t],this,"ADD"+t)},saveConnections:function(e){e=e.getInputTargetBlock("STACK");for(var t=0;e;){var n=this.getInput("ADD"+t);e.valueConnection_=n&&n.connection.targetConnection,t++,e=e.nextConnection&&e.nextConnection.targetBlock()}},updateShape_:function(){this.itemCount_&&this.getInput("EMPTY")?this.removeInput("EMPTY"):this.itemCount_||this.getInput("EMPTY")||this.appendDummyInput("EMPTY").appendField(C.Msg.SET_CREATE_EMPTY_TITLE);for(var e=0;e<this.itemCount_;e++)if(!this.getInput("ADD"+e)){var t=this.appendValueInput("ADD"+e);e==0&&t.appendField(C.Msg.SET_CREATE_WITH_INPUT_WITH)}for(;this.getInput("ADD"+e);)this.removeInput("ADD"+e),e++}};C.Blocks.set_create_with_item={init:function(){this.setColour(Et.Set),this.appendDummyInput().appendField(C.Msg.SET_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(C.Msg.SET_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}};C.Blocks.set_create_with_container={init:function(){this.setColour(Et.Set),this.appendDummyInput().appendField(C.Msg.SET_CREATE_WITH_CONTAINER_TITLE_ADD),this.appendStatementInput("STACK"),this.setTooltip(C.Msg.SET_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}};C.Blocks.text_set={init:function(){this.setHelpUrl(C.Msg.TEXT_SET_HELPURL),this.setColour(Et.Set),this.appendDummyInput().appendField(C.Msg.TEXT_SET_START).appendField(new C.FieldTextInput(""),"TEXT").appendField(C.Msg.TEXT_SET_END),this.setOutput(!0,"Array"),this.setTooltip(C.Msg.Text_Set_TOOLTIP)}};C.Blocks.set_create_with={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Et.Set,helpUrl:C.Msg.SET_CREATE_WITH_HELPURL,tooltip:C.Msg.SET_CREATE_WITH_TOOLTIP,message0:C.Msg.SET_CREATE_WITH_MESSAGE0,args0:[{type:"input_value",name:"set_name"},{type:"input_value",name:"set_items"}]})}};C.Blocks.sets_update_ways={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Et.Set,helpUrl:C.Msg.SETS_UPDATE_WAYS_HELPURL,message0:C.Msg.SETS_UPDATE_WAYS_MESSAGE0,args0:[{type:"input_value",name:"set_name"},{type:"input_value",name:"set_1_name"},{options:[[C.Msg.CocoRobo_INTERSECTION,".intersection_update"],[C.Msg.CocoRobo_UNION,".update"],[C.Msg.CocoRobo_DIFFERENCE,".difference_update"]],type:"field_dropdown",name:"sets_update_ways"}]});var e=this;this.setTooltip(function(){var t=e.getFieldValue("sets_update_ways"),n={".intersection_update":C.Msg.SETS_UPDATE_WAYS_TOOLTIP.replace("%3",C.Msg.CocoRobo_INTERSECTION),".update":C.Msg.SETS_UPDATE_WAYS_TOOLTIP.replace("%3",C.Msg.CocoRobo_UNION),".difference_update":C.Msg.SETS_UPDATE_WAYS_TOOLTIP.replace("%3",C.Msg.CocoRobo_DIFFERENCE)};return n[t]})}};C.Blocks.get_sets_pop={init:function(){this.jsonInit({inputsInline:!0,output:null,colour:Et.Set,helpUrl:C.Msg.GET_SETS_POP_HELPURL,tooltip:C.Msg.GET_SETS_POP_TOOLTIP,message0:C.Msg.GET_SETS_POP_MESSAGE0,args0:[{type:"input_value",name:"set_name"}]})}};C.Blocks.len_of_sets={init:function(){this.jsonInit({inputsInline:!0,output:"Number",colour:Et.Set,helpUrl:C.Msg.LEN_OF_SETS_HELPURL,tooltip:C.Msg.LEN_OF_SETS_TOOLTIP,message0:C.Msg.LEN_OF_SETS_MESSAGE0,args0:[{type:"input_value",name:"set_name"}]})}};C.Blocks.intersection_of_sets={init:function(){this.jsonInit({inputsInline:!0,output:"Array",colour:Et.Set,helpUrl:C.Msg.INTERSECTION_OF_SETS_HELPURL,message0:C.Msg.INTERSECTION_OF_SETS_MESSAGE0,args0:[{options:[[C.Msg.CocoRobo_INTERSECTION," & "],[C.Msg.CocoRobo_UNION," | "],[C.Msg.CocoRobo_DIFFERENCE," - "]],type:"field_dropdown",name:"set_operation_type"},{type:"input_value",name:"set_name"},{type:"input_value",name:"set_1_name"}]});var e=this;this.setTooltip(function(){var t=e.getFieldValue("set_operation_type"),n={" & ":C.Msg.INTERSECTION_OF_SETS_TOOLTIP.replace("%1",C.Msg.CocoRobo_INTERSECTION)," | ":C.Msg.INTERSECTION_OF_SETS_TOOLTIP.replace("%1",C.Msg.CocoRobo_UNION)," - ":C.Msg.INTERSECTION_OF_SETS_TOOLTIP.replace("%1",C.Msg.CocoRobo_DIFFERENCE)};return n[t]})}};C.Blocks.set_update_with={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:Et.Set,helpUrl:C.Msg.SET_UPDATE_WITH_HELPURL,tooltip:C.Msg.SET_UPDATE_WITH_TOOLTIP,message0:C.Msg.SET_UPDATE_WITH_MESSAGE0,args0:[{type:"input_value",name:"set_name"},{type:"input_value",name:"set_items"}]})}};C.Blocks.set_subset_superset={init:function(){this.jsonInit({inputsInline:!0,output:"Boolean",colour:Et.Set,helpUrl:C.Msg.SUBSET_SUPERSET_HELPURL,message0:C.Msg.SUBSET_SUPERSET_MESSAGE0,args0:[{type:"input_value",name:"set_name"},{type:"input_value",name:"set_1_name"},{options:[[C.Msg.CocoRobo_SUBSET,".issubset"],[C.Msg.CocoRobo_SUPERSET,".issuperset"]],type:"field_dropdown",name:"subset_superset"}]});var e=this;this.setTooltip(function(){var t=e.getFieldValue("subset_superset"),n={".issubset":C.Msg.SUBSET_SUPERSET_TOOLTIP.replace("%3",C.Msg.CocoRobo_SUBSET),".issuperset":C.Msg.SUBSET_SUPERSET_TOOLTIP.replace("%3",C.Msg.CocoRobo_SUPERSET)};return n[t]})}};const Hu=C||{};Hu.array={};Hu.typeOf=function(e){var t=typeof e;if(t=="object")if(e){if(e instanceof Array)return"array";if(e instanceof Object)return t;var n=Object.prototype.toString.call(e);if(n=="[object Window]")return"object";if(n=="[object Array]"||typeof e.length=="number"&&typeof e.splice<"u"&&typeof e.propertyIsEnumerable<"u"&&!e.propertyIsEnumerable("splice"))return"array";if(n=="[object Function]"||typeof e.call<"u"&&typeof e.propertyIsEnumerable<"u"&&!e.propertyIsEnumerable("call"))return"function"}else return"null";else if(t=="function"&&typeof e.call>"u")return"object";return t};Hu.isArrayLike=function(e){var t=Hu.typeOf(e);return t=="array"||t=="object"&&typeof e.length=="number"};Hu.array.equals=function(e,t,n){if(!Hu.isArrayLike(e)||!Hu.isArrayLike(t)||e.length!=t.length)return!1;var s=e.length;n=n||Hu.array.defaultCompareEquality;for(var i=0;i<s;i++)if(!n(e[i],t[i]))return!1;return!0};Hu.array.defaultCompareEquality=function(e,t){return e===t};C.Python=ni.pythonGenerator;C.Blocks.procedures_defnoreturn={init:function(){var e=new C.FieldTextInput(C.Msg.PROCEDURES_DEFNORETURN_PROCEDURE,C.Procedures.rename);e.setSpellcheck(!1),this.setInputsInline(!0),this.appendDummyInput().appendField(C.Msg.PROCEDURES_DEFNORETURN_TITLE).appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new C.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&C.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(C.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setColour(Et.Procedures),this.setTooltip(C.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(C.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(e){this.hasStatements_!==e&&(e?(this.appendStatementInput("STACK").appendField(C.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=e)},updateParams_:function(){for(var e=!1,t={},n=0;n<this.arguments_.length;n++){if(t["arg_"+this.arguments_[n].toLowerCase()]){e=!0;break}t["arg_"+this.arguments_[n].toLowerCase()]=!0}e?this.setWarningText(C.Msg.PROCEDURES_DEF_DUPLICATE_WARNING):this.setWarningText(null),e="",this.arguments_.length&&(e=C.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),C.Events.disable();try{this.setFieldValue(e,"PARAMS")}finally{C.Events.enable()}},mutationToDom:function(e){var t=document.createElement("mutation");e&&t.setAttribute("name",this.getFieldValue("NAME"));for(var n=0;n<this.arguments_.length;n++){var s=document.createElement("arg");s.setAttribute("name",this.arguments_[n]),e&&this.paramIds_&&s.setAttribute("paramId",this.paramIds_[n]),t.appendChild(s)}return this.hasStatements_||t.setAttribute("statements","false"),t},domToMutation:function(e){this.arguments_=[];for(var t=0,n;n=e.childNodes[t];t++)n.nodeName.toLowerCase()=="arg"&&this.arguments_.push(n.getAttribute("name"));this.updateParams_(),C.Procedures.mutateCallers(this),this.setStatements_(e.getAttribute("statements")!=="false")},decompose:function(e){var t=e.newBlock("procedures_mutatorcontainer");t.initSvg(),this.getInput("RETURN")?t.setFieldValue(this.hasStatements_?"TRUE":"FALSE","STATEMENTS"):t.getInput("STATEMENT_INPUT").setVisible(!1);for(var n=t.getInput("STACK").connection,s=0;s<this.arguments_.length;s++){var i=e.newBlock("procedures_mutatorarg");i.initSvg(),i.setFieldValue(this.arguments_[s],"NAME"),i.oldLocation=s,n.connect(i.previousConnection),n=i.nextConnection}return C.Procedures.mutateCallers(this),t},compose:function(e){this.arguments_=[],this.paramIds_=[];for(var t=e.getInputTargetBlock("STACK");t;)this.arguments_.push(t.getFieldValue("NAME")),this.paramIds_.push(t.id),t=t.nextConnection&&t.nextConnection.targetBlock();this.updateParams_(),C.Procedures.mutateCallers(this),e=e.getFieldValue("STATEMENTS"),e!==null&&(e=e=="TRUE",this.hasStatements_!=e)&&(e?(this.setStatements_(!0),C.icons.MutatorIcon.reconnect(this.statementConnection_,this,"STACK"),this.statementConnection_=null):(e=this.getInput("STACK").connection,(this.statementConnection_=e.targetConnection)&&(e=e.targetBlock(),e.unplug(),e.bumpNeighbours_()),this.setStatements_(!1)))},getProcedureDef:function(){return[this.getFieldValue("NAME"),this.arguments_,!1]},getVars:function(){return this.arguments_},renameVar:function(e,t){for(var n=!1,s=0;s<this.arguments_.length;s++)C.Names.equals(e,this.arguments_[s])&&(this.arguments_[s]=t,n=!0);if(n&&(this.updateParams_(),this.mutator.isVisible())){n=this.mutator.workspace_.getAllBlocks(),s=0;for(var i;i=n[s];s++)i.type=="procedures_mutatorarg"&&C.Names.equals(e,i.getFieldValue("NAME"))&&i.setFieldValue(t,"NAME")}},customContextMenu:function(e){var t={enabled:!0},n=this.getFieldValue("NAME");t.text=C.Msg.PROCEDURES_CREATE_DO.replace("%1",n);var s=C.dom.createDom("mutation");s.setAttribute("name",n);for(var i=0;i<this.arguments_.length;i++)n=C.dom.createDom("arg"),n.setAttribute("name",this.arguments_[i]),s.appendChild(n);if(s=C.dom.createDom("block",null,s),s.setAttribute("type",this.callType_),t.callback=C.ContextMenu.callbackFactory(this,s),e.push(t),!this.isCollapsed())for(i=0;i<this.arguments_.length;i++)t={enabled:!0},n=this.arguments_[i],t.text=C.Msg.VARIABLES_SET_CREATE_GET.replace("%1",n),s=C.dom.createDom("field",null,n),s.setAttribute("name","VAR"),s=C.dom.createDom("block",null,s),s.setAttribute("type","variables_get"),t.callback=C.ContextMenu.callbackFactory(this,s),e.push(t)},callType_:"procedures_callnoreturn"};C.Blocks.procedures_defreturn={init:function(){var e=new C.FieldTextInput(C.Msg.PROCEDURES_DEFRETURN_PROCEDURE,C.Procedures.rename);e.setSpellcheck(!1),this.setInputsInline(!0),this.appendDummyInput().appendField(C.Msg.PROCEDURES_DEFRETURN_TITLE).appendField(e,"NAME").appendField("","PARAMS"),this.appendValueInput("RETURN").setAlign(C.ALIGN_RIGHT).appendField(C.Msg.PROCEDURES_DEFRETURN_RETURN),this.setMutator(new C.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&C.Msg.PROCEDURES_DEFRETURN_COMMENT&&this.setCommentText(C.Msg.PROCEDURES_DEFRETURN_COMMENT),this.setColour(Et.Procedures),this.setTooltip(C.Msg.PROCEDURES_DEFRETURN_TOOLTIP),this.setHelpUrl(C.Msg.PROCEDURES_DEFRETURN_HELPURL),this.arguments_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:C.Blocks.procedures_defnoreturn.setStatements_,updateParams_:C.Blocks.procedures_defnoreturn.updateParams_,mutationToDom:C.Blocks.procedures_defnoreturn.mutationToDom,domToMutation:C.Blocks.procedures_defnoreturn.domToMutation,decompose:C.Blocks.procedures_defnoreturn.decompose,compose:C.Blocks.procedures_defnoreturn.compose,getProcedureDef:function(){return[this.getFieldValue("NAME"),this.arguments_,!0]},getVars:C.Blocks.procedures_defnoreturn.getVars,renameVar:C.Blocks.procedures_defnoreturn.renameVar,customContextMenu:C.Blocks.procedures_defnoreturn.customContextMenu,callType_:"procedures_callreturn"};C.Blocks.procedures_mutatorcontainer={init:function(){this.appendDummyInput().appendField(C.Msg.PROCEDURES_MUTATORCONTAINER_TITLE),this.appendStatementInput("STACK"),this.appendDummyInput("STATEMENT_INPUT").appendField(C.Msg.PROCEDURES_ALLOW_STATEMENTS).appendField(new C.FieldCheckbox("TRUE"),"STATEMENTS"),this.setColour(Et.Procedures),this.setTooltip(C.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP),this.contextMenu=!1}};C.Blocks.procedures_mutatorarg={init:function(){var e=new C.FieldTextInput("x",this.validator_);this.appendDummyInput().appendField(C.Msg.PROCEDURES_MUTATORARG_TITLE).appendField(e,"NAME"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(Et.Procedures),this.setTooltip(C.Msg.PROCEDURES_MUTATORARG_TOOLTIP),this.contextMenu=!1,e.onFinishEditing_=this.createNewVar_,e.onFinishEditing_("x")},validator_:function(e){return(e=e.replace(/[\s\xa0]+/g," ").replace(/^ | $/g,""))||null},createNewVar_:function(e){var t=this.sourceBlock_;t&&t.workspace&&t.workspace.options&&t.workspace.options.parentWorkspace&&t.workspace.options.parentWorkspace.createVariable(e)}};C.Blocks.procedures_callnoreturn={init:function(){this.appendDummyInput("TOPROW").appendField(this.id,"NAME"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(Et.Procedures),this.setHelpUrl(C.Msg.PROCEDURES_CALLNORETURN_HELPURL),this.arguments_=[],this.quarkConnections_={},this.quarkIds_=null},getProcedureCall:function(){return this.getFieldValue("NAME")},renameProcedure:function(e,t){C.Names.equals(e,this.getProcedureCall())&&(this.setFieldValue(t,"NAME"),this.setTooltip((this.outputConnection?C.Msg.PROCEDURES_CALLRETURN_TOOLTIP:C.Msg.PROCEDURES_CALLNORETURN_TOOLTIP).replace("%1",t)))},setProcedureParameters_:function(e,t){var n=C.Procedures.getDefinition(this.getProcedureCall(),this.workspace),s=n&&n.mutator;if(s||(this.quarkConnections_={},this.quarkIds_=null),t)if(Hu.array.equals(this.arguments_,e))this.quarkIds_=t;else{if(t.length!=e.length)throw"Error: paramNames and paramIds must be the same length.";this.setCollapsed(!1),this.quarkIds_||(this.quarkConnections_={},e.join(`
  1720. `)==this.arguments_.join(`
  1721. `)?this.quarkIds_=t:this.quarkIds_=[]),n=this.rendered,this.rendered=!1;for(var i=0;i<this.arguments_.length;i++){var r=this.getInput("ARG"+i);r&&(r=r.connection.targetConnection,this.quarkConnections_[this.quarkIds_[i]]=r,s&&r&&t.indexOf(this.quarkIds_[i])==-1&&(r.disconnect(),r.getSourceBlock().bumpNeighbours_()))}if(this.arguments_=[].concat(e),this.updateShape_(),this.quarkIds_=t)for(i=0;i<this.arguments_.length;i++)s=this.quarkIds_[i],s in this.quarkConnections_&&(r=this.quarkConnections_[s],C.icons.MutatorIcon.reconnect(r,this,"ARG"+i)||delete this.quarkConnections_[s]);(this.rendered=n)&&this.render()}},updateShape_:function(){for(var e=0;e<this.arguments_.length;e++){var t=this.getField("ARGNAME"+e);if(t){C.Events.disable();try{t.setValue(this.arguments_[e])}finally{C.Events.enable()}}else t=new C.FieldLabel(this.arguments_[e]),this.appendValueInput("ARG"+e).setAlign(C.ALIGN_RIGHT).appendField(t,"ARGNAME"+e).init()}for(;this.getInput("ARG"+e);)this.removeInput("ARG"+e),e++;(e=this.getInput("TOPROW"))&&(this.arguments_.length?this.getField("WITH")||(e.appendField(C.Msg.PROCEDURES_CALL_BEFORE_PARAMS,"WITH"),e.init()):this.getField("WITH")&&e.removeField("WITH"))},mutationToDom:function(){var e=document.createElement("mutation");e.setAttribute("name",this.getProcedureCall());for(var t=0;t<this.arguments_.length;t++){var n=document.createElement("arg");n.setAttribute("name",this.arguments_[t]),e.appendChild(n)}return e},domToMutation:function(e){var t=e.getAttribute("name");this.renameProcedure(this.getProcedureCall(),t),t=[];for(var n=[],s=0,i;i=e.childNodes[s];s++)i.nodeName.toLowerCase()=="arg"&&(t.push(i.getAttribute("name")),n.push(i.getAttribute("paramId")));this.setProcedureParameters_(t,n)},renameVar:function(e,t){for(var n=0;n<this.arguments_.length;n++)C.Names.equals(e,this.arguments_[n])&&(this.arguments_[n]=t,this.getField("ARGNAME"+n).setValue(t))},onchange:function(e){if(this.workspace&&!this.workspace.isFlyout)if(e.type==C.Events.CREATE&&e.ids.indexOf(this.id)!=-1){var t=this.getProcedureCall();if(t=C.Procedures.getDefinition(t,this.workspace),!t||t.type==this.defType_&&JSON.stringify(t.arguments_)==JSON.stringify(this.arguments_)||(t=null),!t){C.Events.setGroup(e.group),e=C.dom.createDom("xml"),t=C.dom.createDom("block"),t.setAttribute("type",this.defType_);var n=this.getRelativeToSurfaceXY(),s=n.y+2*C.SNAP_RADIUS;t.setAttribute("x",n.x+C.SNAP_RADIUS*(this.RTL?-1:1)),t.setAttribute("y",s),n=this.mutationToDom(),t.appendChild(n),n=C.dom.createDom("field"),n.setAttribute("name","NAME"),n.appendChild(document.createTextNode(this.getProcedureCall())),t.appendChild(n),e.appendChild(t),C.Xml.domToWorkspace(e,this.workspace),C.Events.setGroup(!1)}}else e.type==C.Events.DELETE&&(t=this.getProcedureCall(),t=C.Procedures.getDefinition(t,this.workspace),t||(C.Events.setGroup(e.group),this.dispose(!0,!1),C.Events.setGroup(!1)))},customContextMenu:function(e){var t={enabled:!0};t.text=C.Msg.PROCEDURES_HIGHLIGHT_DEF;var n=this.getProcedureCall(),s=this.workspace;t.callback=function(){var i=C.Procedures.getDefinition(n,s);i&&i.select()},e.push(t)},defType_:"procedures_defnoreturn"};C.Blocks.procedures_callreturn={init:function(){this.appendDummyInput("TOPROW").appendField("","NAME"),this.setOutput(!0),this.setColour(Et.Procedures),this.setHelpUrl(C.Msg.PROCEDURES_CALLRETURN_HELPURL),this.arguments_=[],this.quarkConnections_={},this.quarkIds_=null},getProcedureCall:C.Blocks.procedures_callnoreturn.getProcedureCall,renameProcedure:C.Blocks.procedures_callnoreturn.renameProcedure,setProcedureParameters_:C.Blocks.procedures_callnoreturn.setProcedureParameters_,updateShape_:C.Blocks.procedures_callnoreturn.updateShape_,mutationToDom:C.Blocks.procedures_callnoreturn.mutationToDom,domToMutation:C.Blocks.procedures_callnoreturn.domToMutation,renameVar:C.Blocks.procedures_callnoreturn.renameVar,onchange:C.Blocks.procedures_callnoreturn.onchange,customContextMenu:C.Blocks.procedures_callnoreturn.customContextMenu,defType_:"procedures_defreturn"};C.Blocks.procedures_ifreturn={init:function(){this.appendValueInput("CONDITION").setCheck("Boolean").appendField(C.Msg.CONTROLS_IF_MSG_IF),this.appendValueInput("VALUE").appendField(C.Msg.PROCEDURES_DEFRETURN_RETURN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(Et.Procedures),this.setTooltip(C.Msg.PROCEDURES_IFRETURN_TOOLTIP),this.setHelpUrl(C.Msg.PROCEDURES_IFRETURN_HELPURL),this.hasReturnValue_=!0},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("value",Number(this.hasReturnValue_)),e},domToMutation:function(e){this.hasReturnValue_=e.getAttribute("value")==1,this.hasReturnValue_||(this.removeInput("VALUE"),this.appendDummyInput("VALUE").appendField(C.Msg.PROCEDURES_DEFRETURN_RETURN))},onchange:function(e){if(!this.workspace.isDragging()){e=!1;var t=this;do{if(this.FUNCTION_TYPES.indexOf(t.type)!=-1){e=!0;break}t=t.getSurroundParent()}while(t);e?(t.type=="procedures_defnoreturn"&&this.hasReturnValue_?(this.removeInput("VALUE"),this.appendDummyInput("VALUE").appendField(C.Msg.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!1):t.type!="procedures_defreturn"||this.hasReturnValue_||(this.removeInput("VALUE"),this.appendValueInput("VALUE").appendField(C.Msg.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!0),this.setWarningText(null),this.isInFlyout||this.setDisabled(!1)):(this.setWarningText(C.Msg.PROCEDURES_IFRETURN_WARNING),this.isInFlyout||this.getInheritedDisabled()||this.setDisabled(!0))}},FUNCTION_TYPES:["procedures_defnoreturn","procedures_defreturn"]};C.Python=ni.pythonGenerator;const iA="#ff8027";C.Blocks.esp32_main_controller_io_from_digital_pin={init:function(){this.appendDummyInput().appendField(C.Msg.digital_get),this.appendValueInput("digital_pin_input").setCheck(null),this.appendDummyInput().appendField(C.Msg.digital_get_value),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(iA),this.setHelpUrl(""),this.setTooltip(C.Msg.digital_get_value_title)}};C.Blocks.esp32_main_controller_io_set_digital_pin={init:function(){this.appendDummyInput().appendField("").appendField(C.Msg.digital_set),this.appendValueInput("digital_pin_input").setCheck(null),this.appendDummyInput().appendField(C.Msg.digital_set_as),this.appendValueInput("high_low").setCheck(null),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(iA),this.setHelpUrl("");var e=this;this.setTooltip(function(){var t=e.getFieldValue("digital_set_type"),n={1:C.Msg.Esp32_Main_Controller_Io_Set_Digital_Pin_TOOLTIP.replace("%1",C.Msg.time_iot_module),2:C.Msg.Esp32_Main_Controller_Io_Set_Digital_Pin_TOOLTIP.replace("%1",C.Msg.time_ai_module)};return n[t]})}};C.Blocks.esp32_main_controller_io_high_low={init:function(){this.appendDummyInput().appendField(new C.FieldDropdown([[C.Msg.io_high,"1"],[C.Msg.io_low,"0"]]),"high_low"),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(iA),this.setHelpUrl("");var e=this;this.setTooltip(function(){var t=e.getFieldValue("high_low"),n={1:C.Msg.Esp32_Main_Controller_Io_High_Low_TOOLTIP.replace("%1",C.Msg.io_high),0:C.Msg.Esp32_Main_Controller_Io_High_Low_TOOLTIP.replace("%1",C.Msg.io_low)};return n[t]})}};C.Blocks.esp32_main_controller_io_from_analog_pin={init:function(){this.appendDummyInput().appendField(C.Msg.analog_get_moudule).appendField(new C.FieldDropdown([["34","34"],["35","35"],["36","36"]]),"gpio"),this.appendDummyInput().appendField(C.Msg.analog_get_value),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(iA),this.setTooltip(C.Msg.Esp32_Main_Controller_Io_From_Analog_Pin_TOOLTIP),this.setHelpUrl("")}};C.Python=ni.pythonGenerator;C.Blocks.iot_system_run={init:function(){this.appendDummyInput().appendField(C.Msg.SYSTEM_RUN),this.appendValueInput("PATH").setCheck(null).appendField(C.Msg.system_code_path),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(32),this.setTooltip(C.Msg.Iot_System_Run_TOOLTIP),this.setHelpUrl("")}};C.Blocks.iot_system_create_file={init:function(){this.appendDummyInput().appendField(C.Msg.SYSTEM_CREATE_FILE),this.appendValueInput("filename").setCheck(null).appendField(C.Msg.SYSTEM_CREATE_F),this.appendValueInput("PATH").setCheck(null).appendField(C.Msg.SYSTEM_CREATE_F_1),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(32),this.setTooltip(C.Msg.Iot_System_Create_File_TOOLTIP),this.setHelpUrl("")}};C.Blocks.iot_system_open_file={init:function(){this.appendDummyInput().appendField(C.Msg.SYSTEM_OPEN_FILE),this.appendValueInput("filename").setCheck(null).appendField(C.Msg.SYSTEM_WRITE_F),this.appendValueInput("PATH").setCheck(null).appendField(C.Msg.SYSTEM_CREATE_F_1),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(32),this.setHelpUrl(""),this.setTooltip(C.Msg.Iot_System_Open_File_TOOLTIP)}};C.Blocks.iot_system_write_file={init:function(){this.appendDummyInput().appendField(C.Msg.SYSTEM_WRITE_FILE),this.appendValueInput("WPATH").setCheck(null).appendField(C.Msg.SYSTEM_WRITE_W),this.appendDummyInput().appendField(C.Msg.SYSTEM_WRITE_S).appendField(new C.FieldDropdown([[C.Msg.SYSTEM_WRITE_S_N,"newline"],[C.Msg.SYSTEM_WRITE_S_C,"comma"],[C.Msg.SYSTEM_WRITE_S_S,"space"],[C.Msg.SYSTEM_WRITE_S_SE,"semicolon"]]),"separator"),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(32),this.setHelpUrl("");var e=this;this.setTooltip(function(){var t=e.getFieldValue("separator"),n={newline:C.Msg.Iot_System_Write_File_TOOLTIP.replace("%1",C.Msg.SYSTEM_WRITE_S_N),comma:C.Msg.Iot_System_Write_File_TOOLTIP.replace("%1",C.Msg.SYSTEM_WRITE_S_C),space:C.Msg.Iot_System_Write_File_TOOLTIP.replace("%1",C.Msg.SYSTEM_WRITE_S_S),semicolon:C.Msg.Iot_System_Write_File_TOOLTIP.replace("%1",C.Msg.SYSTEM_WRITE_S_SE)};return n[t]})}};C.Blocks.iot_system_close_file={init:function(){this.appendDummyInput().appendField(C.Msg.SYSTEM_CLOSE_FILE),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(32),this.setHelpUrl(""),this.setTooltip(C.Msg.SYSTEM_CLOSE_FILE)}};C.Blocks.iot_system_delete_file={init:function(){this.appendDummyInput().appendField(C.Msg.iot_system_delete),this.appendValueInput("PATH").setCheck(null).appendField(C.Msg.SYSTEM_CREATE_F_1),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(32),this.setTooltip(C.Msg.iot_system_delete_file_TOOLTIP),this.setHelpUrl("")}};C.Blocks.iot_system_input_file={init:function(){this.appendDummyInput().appendField(C.Msg.SYSTEM_INPUT_FILE),this.appendValueInput("filename").setCheck(null).appendField(C.Msg.SYSTEM_WRITE_F),this.appendValueInput("PATH").setCheck(null).appendField(C.Msg.SYSTEM_CREATE_F_1),this.appendDummyInput().appendField(C.Msg.SYSTEM_WRITE_S).appendField(new C.FieldDropdown([[C.Msg.SYSTEM_WRITE_S_N,"newline"],[C.Msg.SYSTEM_WRITE_S_C,"comma"],[C.Msg.SYSTEM_WRITE_S_S,"space"],[C.Msg.SYSTEM_WRITE_S_SE,"semicolon"]]),"separator"),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(32),this.setHelpUrl("");var e=this;this.setTooltip(function(){var t=e.getFieldValue("separator"),n={newline:C.Msg.Iot_System_Input_File_TOOLTIP.replace("%1",C.Msg.SYSTEM_WRITE_S_N),comma:C.Msg.Iot_System_Input_File_TOOLTIP.replace("%1",C.Msg.SYSTEM_WRITE_S_C),space:C.Msg.Iot_System_Input_File_TOOLTIP.replace("%1",C.Msg.SYSTEM_WRITE_S_S),semicolon:C.Msg.Iot_System_Input_File_TOOLTIP.replace("%1",C.Msg.SYSTEM_WRITE_S_SE)};return n[t]})}};const B7={...C,...C,...C,...C,...C,...C,...C,...C,...C,...C,...C,...C},F7=C.Theme.defineTheme("CUSTOM_THEME",{base:C.Themes.Classic,categoryStyles:{custom_category:{colour:"#5ba5a5"}},blockStyles:{custom_text_blocks:{colourPrimary:"#5ba5a5",colourSecondary:"#5ba5a5",colourTertiary:"#C5EAFF"}},componentStyles:{workspaceBackgroundColour:"#fff",toolboxBackgroundColour:"rgba(236, 241, 247, 0.8)",toolboxForegroundColour:"#000",flyoutBackgroundColour:"#d0f0ffbf",flyoutForegroundColour:"#333",flyoutOpacity:1,scrollbarColour:"#aaa",scrollbarOpacity:.4,insertionMarkerColour:"#f5f5f5",insertionMarkerOpacity:.3,cursorColour:"#f5f5f5"}}),gt={Python:ni.pythonGenerator||{Msg:Object.create(null)}};gt.Python.math_degrad=function(e){var t=e.getFieldValue("rad_deg"),n=gt.Python.valueToCode(e,"convert",gt.Python.ORDER_ATOMIC);gt.Python.definitions_.import_math=`import math
  1722. `;var s="math."+t+"("+n+")";return[s,gt.Python.ORDER_NONE]};gt.Python.math_angle=function(e){return[e.getFieldValue("angle"),gt.Python.ORDER_ATOMIC]};gt.Python.math_keep_decimal=function(e){var t=gt.Python.valueToCode(e,"NUM",gt.Python.ORDER_ATOMIC);return e=gt.Python.valueToCode(e,"PLACE",gt.Python.ORDER_ATOMIC),["round("+t+", "+e+")",gt.Python.ORDER_ATOMIC]};gt.Python.math_division_consult=function(e){var t=gt.Python.valueToCode(e,"DIVIDEND",gt.Python.ORDER_MULTIPLICATIVE)||"0";return e=gt.Python.valueToCode(e,"DIVISOR",gt.Python.ORDER_MULTIPLICATIVE)||"0",[t+" // "+e,gt.Python.ORDER_MULTIPLICATIVE]};gt.Python.labplus_mapping=function(e){gt.Python.definitions_.import_microbit="from microbit import *";var t=gt.Python.valueToCode(e,"inputNum",gt.Python.ORDER_ATOMIC);gt.Python.valueToCode(e,"outputNum",gt.Python.ORDER_ATOMIC);var n=gt.Python.valueToCode(e,"bMin",gt.Python.ORDER_ATOMIC),s=gt.Python.valueToCode(e,"bMax",gt.Python.ORDER_ATOMIC),i=gt.Python.valueToCode(e,"cMin",gt.Python.ORDER_ATOMIC);return e=gt.Python.valueToCode(e,"cMax",gt.Python.ORDER_ATOMIC),gt.Python.definitions_.labplus_mapping=`def numberMap(inputNum,bMin,bMax,cMin,cMax):
  1723. outputNum = 0
  1724. outputNum =((cMax - cMin) / (bMax - bMin))*(inputNum - bMin)+cMin
  1725. return outputNum
  1726. `,["numberMap("+t+","+n+","+s+","+i+","+e+")",gt.Python.ORDER_ATOMIC]};gt.Python.math_random_randrange=function(e){gt.Python.definitions_.import_time="import time",gt.Python.definitions_.import_random="import random";var t=gt.Python.valueToCode(e,"start",gt.Python.ORDER_ATOMIC),n=gt.Python.valueToCode(e,"stop",gt.Python.ORDER_ATOMIC);return e=gt.Python.valueToCode(e,"step",gt.Python.ORDER_ATOMIC),["random.randrange("+t+", "+n+", "+e+")",gt.Python.ORDER_ATOMIC]};gt.Python.bit_inversion=function(e){return["~"+gt.Python.valueToCode(e,"data",gt.Python.ORDER_ATOMIC),gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_ten_convert_to=function(e){var t=gt.Python.valueToCode(e,"int_num",gt.Python.ORDER_ATOMIC);return[e.getFieldValue("ten_convert_to")+"("+t+")",gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_convert_to_ten=function(e){var t=gt.Python.valueToCode(e,"convert_str",gt.Python.ORDER_ATOMIC);return e=e.getFieldValue("convert_choice"),["int("+t+", "+e+")",gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_ten_convert_to=function(e){var t=gt.Python.valueToCode(e,"int_num",gt.Python.ORDER_ATOMIC);return[e.getFieldValue("ten_convert_to")+"("+t+")",gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_high_low=function(e){return[e.getFieldValue("high_low"),gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_baudrate=function(e){return[e.getFieldValue("baudrate"),gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_start_new_thread=function(e){gt.Python.definitions_.import_thread="import _thread";var t=e.getFieldValue("thread_name"),n=gt.Python.statementToCode(e,"DO"),n=gt.Python.addLoopTrap(n,e.id)||gt.Python.PASS;return gt.Python.codeFunctions_["thread_"+t]="def thread_"+t+`():
  1727. `+n,"_thread.start_new_thread(thread_"+t+`, ())
  1728. `};gt.Python.CocoRobo_ten_converted_to_bytes=function(e){gt.Python.definitions_.import_struct="import struct";var t=gt.Python.valueToCode(e,"convert_num",gt.Python.ORDER_ATOMIC);return["struct.pack("+e.getFieldValue("convert_choice")+", "+t+")",gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_int_to_chr=function(e){return["chr("+gt.Python.valueToCode(e,"convert_num",gt.Python.ORDER_ATOMIC)+")",gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_hcsr04_obj=function(e){gt.Python.definitions_.from_hcsr04_import_HCSR04="from hcsr04 import HCSR04";var t=e.getFieldValue("hcsr04_name"),n=gt.Python.valueToCode(e,"trigger",gt.Python.ORDER_ATOMIC);return e=gt.Python.valueToCode(e,"echo",gt.Python.ORDER_ATOMIC),gt.Python.definitions_["CocoRobo_hcsr04_object"+t]=t+" = HCSR04(trigger_pin=Pin.P"+n+", echo_pin=Pin.P"+e+")",`
  1729. `};gt.Python.CocoRobo_hcsr04_distance=function(e){gt.Python.definitions_.from_hcsr04_import_HCSR04="from hcsr04 import HCSR04";var t=e.getFieldValue("hcsr04_name");return e=e.getFieldValue("unit"),[t+".distance_"+e+"()",gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_hcsr04_distance_mm=function(e){return gt.Python.definitions_.from_hcsr04_import_HCSR04="from hcsr04 import HCSR04",[e.getFieldValue("hcsr04_name")+".distance_mm()",gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_pm2_5_MIC=function(e){gt.Python.definitions_.machine_Timer="from machine import Timer";var t=gt.Python.valueToCode(e,"rx",gt.Python.ORDER_ATOMIC);return gt.Python.codeFunctions_.CocoRobo_pm2_5="uart=UART(1, baudrate=9600, rx=Pin.P"+t+`, timeout=200)
  1730. _pm_data = [None, None, None, None, None, None, None, None, None]
  1731. def timer13_tick(_):
  1732. global _pm_data
  1733. try:
  1734. if uart.any():
  1735. d = uart.read(0x42)
  1736. if d[0] == 0x42 and d[1] == 0x4d:
  1737. _pm_data = [d[5], d[7], d[9], d[17], d[19], d[21], d[23], d[25], d[27]]
  1738. except: pass
  1739. tim13 = Timer(13)
  1740. tim13.init(period=1000, mode=Timer.PERIODIC, callback=timer13_tick)`,[e.getFieldValue("unit"),gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_pm2_5_LitresAir=function(e){gt.Python.definitions_.machine_Timer="from machine import Timer";var t=gt.Python.valueToCode(e,"rx",gt.Python.ORDER_ATOMIC);return gt.Python.codeFunctions_.CocoRobo_pm2_5="uart=UART(1, baudrate=9600, rx=Pin.P"+t+`, timeout=200)
  1741. _pm_data = [None, None, None, None, None, None, None, None, None]
  1742. def timer13_tick(_):
  1743. global _pm_data
  1744. try:
  1745. if uart.any():
  1746. d = uart.read(0x42)
  1747. if d[0] == 0x42 and d[1] == 0x4d:
  1748. _pm_data = [d[5], d[7], d[9], d[17], d[19], d[21], d[23], d[25], d[27]]
  1749. except: pass
  1750. tim13 = Timer(13)
  1751. tim13.init(period=1000, mode=Timer.PERIODIC, callback=timer13_tick)`,[e.getFieldValue("unit"),gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_mac_address=function(e){return gt.Python.definitions_.import_machine="import machine",gt.Python.definitions_.import_ubinascii="import ubinascii",["ubinascii.hexlify(machine.unique_id()).decode().upper()",gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_ujson_loads=function(e){return gt.Python.definitions_.import_ujson="import json",["json.loads("+gt.Python.valueToCode(e,"data",gt.Python.ORDER_ATOMIC)+")",gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_code_annotation=function(e){var t=gt.Python.valueToCode(e,"data",gt.Python.ORDER_ATOMIC);return"# "+t.replace('"',"").replace('"',"")+`
  1752. `};gt.Python.CocoRobo_ujson_dumps=function(e){return gt.Python.definitions_.import_ujson="import json",["json.dumps("+gt.Python.valueToCode(e,"data",gt.Python.ORDER_ATOMIC)+")",gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_base64_to_data=function(e){return gt.Python.definitions_.v831_import_base64="import base64",["base64.b64decode("+gt.Python.valueToCode(e,"data",gt.Python.ORDER_ATOMIC)+")",gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_data_to_base64=function(e){return gt.Python.definitions_.v831_import_base64="import base64",["base64.b64encode("+gt.Python.valueToCode(e,"data",gt.Python.ORDER_ATOMIC)+".encode('utf-8'))",gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_hex_to_bin_str=function(e){return["bytes.fromhex("+gt.Python.valueToCode(e,"convert_chr",gt.Python.ORDER_ATOMIC)+")",gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_str_to_hex=function(e){return[gt.Python.valueToCode(e,"convert_chr",gt.Python.ORDER_ATOMIC)+".encode().hex()",gt.Python.ORDER_ATOMIC]};gt.Python.CocoRobo_chr_to_int=function(e){return["ord("+gt.Python.valueToCode(e,"convert_chr",gt.Python.ORDER_ATOMIC)+")",gt.Python.ORDER_ATOMIC]};gt.Python.math_convert=function(e){var t=e.getFieldValue("TYPE0");return e=gt.Python.valueToCode(e,"INPUT0",gt.Python.ORDER_ATOMIC),[t+"("+e+")",gt.Python.ORDER_FUNCTION_CALL]};gt.Python.math_number_bits_ops=function(e){var t={" | ":[" | ",gt.Python.ORDER_BITWISE_OR]," & ":[" & ",gt.Python.ORDER_BITWISE_AND]," ^ ":[" ^ ",gt.Python.ORDER_BITWISE_XOR]," >> ":[" >> ",gt.Python.ORDER_BITWISE_SHIFT]," << ":[" << ",gt.Python.ORDER_BITWISE_SHIFT]}[e.getFieldValue("OP")],n=t[0];t=t[1];var s=gt.Python.valueToCode(e,"A",t)||"0";return e=gt.Python.valueToCode(e,"B",t)||"0",[s+n+e,t]};gt.Python.controls_repeat_forever=function(e){var t=gt.Python.statementToCode(e,"DO");return t=gt.Python.addLoopTrap(t,e.id)||gt.Python.PASS,`while True:
  1753. `+t};const ns={Python:ni.pythonGenerator||{Msg:Object.create(null)}};ns.Python.CocoRobo_type=function(e){return["type("+(ns.Python.valueToCode(e,"VAR",ns.Python.ORDER_ATOMIC)||"None")+")",ns.Python.ORDER_ATOMIC]};ns.Python.CocoRobo_type_is=function(e){var t=ns.Python.valueToCode(e,"VAR",ns.Python.ORDER_ATOMIC)||"None";return e=e.getFieldValue("TYPE"),["type("+t+") == "+e,ns.Python.ORDER_ATOMIC]};ns.Python.CocoRobo_eval=function(e){return["eval("+(ns.Python.valueToCode(e,"VAR",ns.Python.ORDER_ATOMIC)||"None")+")",ns.Python.ORDER_ATOMIC]};ns.Python.CocoRobo_return=function(e){return"return "+(ns.Python.valueToCode(e,"VAR",ns.Python.ORDER_ATOMIC)||"None")+`
  1754. `};ns.Python.CocoRobo_try_except=function(e){var t=ns.Python.statementToCode(e,"TRY")||ns.Python.PASS;return e=ns.Python.statementToCode(e,"EXCEPT")||ns.Python.PASS,`try:
  1755. `+t+`except:
  1756. `+e};ns.Python.CocoRobo_try_except_finally=function(e){var t=ns.Python.statementToCode(e,"TRY")||ns.Python.PASS,n=ns.Python.statementToCode(e,"EXCEPT")||ns.Python.PASS;return e=ns.Python.statementToCode(e,"FINALLY")||ns.Python.PASS,`try:
  1757. `+t+`except:
  1758. `+n+`finally:
  1759. `+e};const dn={Python:ni.pythonGenerator||{Msg:Object.create(null)}};dn.Python.text_join=function(e){var t;if(e.itemCount_==0)return["''",dn.Dart.ORDER_ATOMIC];if(e.itemCount_==1){var n=dn.Dart.valueToCode(e,"ADD0",dn.Dart.ORDER_UNARY_POSTFIX)||"''";return t=n+".toString()",[t,dn.Dart.ORDER_UNARY_POSTFIX]}else{t=new Array(e.itemCount_);for(var s=0;s<e.itemCount_;s++)t[s]=dn.Dart.valueToCode(e,"ADD"+s,dn.Dart.ORDER_NONE)||"''";return t="["+t.join(",")+"].join()",[t,dn.Dart.ORDER_UNARY_POSTFIX]}};dn.Python.text_split_string_by_delimiter=function(e){var t=dn.Python.valueToCode(e,"string_input",dn.Python.ORDER_ATOMIC),n=e.getFieldValue("delimiter"),s=t+'.split("'+n+'")';return[s,dn.Python.ORDER_NONE]};dn.Python.text_format=function(e){var t=dn.Python.valueToCode(e,"FORMAT",dn.Python.ORDER_ATOMIC);let n=dn.Python.valueToCode(e,"CONTENT",dn.Python.ORDER_ATOMIC);return[t+" % "+n,dn.Python.ORDER_ATOMIC]};dn.Python.tuple_create_with_items_insert=function(e){for(var t=Array(e.itemCount_),n=0;n<e.itemCount_;n++)t[n]=dn.Python.valueToCode(e,"ADD"+n,dn.Python.ORDER_NONE)||"None";return[e.itemCount_==1?"("+t[0]+",)":"("+t.join(", ")+")",dn.Python.ORDER_ATOMIC]};dn.Python.text_format2=function(e){var t=dn.Python.valueToCode(e,"FORMAT",dn.Python.ORDER_ATOMIC);return e=dn.Python.valueToCode(e,"CONTENT",dn.Python.ORDER_ATOMIC),[t+".format"+e,dn.Python.ORDER_ATOMIC]};dn.Python.CocoRobo_text_ESC=function(e){return['"'+e.getFieldValue("mode")+'"',dn.Python.ORDER_ATOMIC]};dn.Python.text_append_text=function(e){var t=dn.Python.valueToCode(e,"text_abc",dn.Python.ORDER_ATOMIC);return e=dn.Python.valueToCode(e,"append_text",dn.Python.ORDER_ATOMIC),["str("+t+") + str("+e+")",dn.Python.ORDER_ATOMIC]};dn.Python.text_is_number=function(e){var t=dn.Python.valueToCode(e,"TEXT",dn.Python.ORDER_ATOMIC);return e=e.getFieldValue("TYPE"),[t+e,dn.Python.ORDER_ATOMIC]};dn.Python.text_to_byte=function(e){return["bytes("+dn.Python.valueToCode(e,"TEXT",dn.Python.ORDER_ATOMIC)+", 'utf-8')",dn.Python.ORDER_ATOMIC]};dn.Python.other_to_byte=function(e){return["bytes("+dn.Python.valueToCode(e,"input_var",dn.Python.ORDER_ATOMIC)+")",dn.Python.ORDER_ATOMIC]};dn.Python.bit_inversion=function(e){return["~"+dn.Python.valueToCode(e,"data",dn.Python.ORDER_ATOMIC),dn.Python.ORDER_ATOMIC]};dn.Python.CocoRobo_bytes_decode=function(e){return[dn.Python.valueToCode(e,"bytes_decode",dn.Python.ORDER_ATOMIC)+".decode('UTF-8','ignore')",dn.Python.ORDER_ATOMIC]};dn.Python.CocoRobo_ujson_dumps=function(e){return dn.Python.definitions_.import_ujson="import json",["json.dumps("+dn.Python.valueToCode(e,"data",dn.Python.ORDER_ATOMIC)+")",dn.Python.ORDER_ATOMIC]};dn.Python.CocoRobo_ujson_loads=function(e){return dn.Python.definitions_.import_ujson="import json",["json.loads("+dn.Python.valueToCode(e,"data",dn.Python.ORDER_ATOMIC)+")",dn.Python.ORDER_ATOMIC]};dn.Python.CocoRobo_code_annotation=function(e){var t=dn.Python.valueToCode(e,"data",dn.Python.ORDER_ATOMIC);return"# "+t.replace("'","").replace("'","")+`
  1760. `};dn.Python.text_dict=function(e){return["{"+dn.Python.quote_empty(e.getFieldValue("TEXT"))+"}",dn.Python.ORDER_ATOMIC]};const dt={Python:ni.pythonGenerator||{Msg:Object.create(null)}};dt.Python.lists_create_with=function(e){for(var t=Array(e.itemCount_),n=0;n<e.itemCount_;n++)t[n]=dt.Python.valueToCode(e,"ADD"+n,dt.Python.ORDER_NONE)||"None";return["["+t.join(", ")+"]",dt.Python.ORDER_ATOMIC]};dt.Python.text_list=function(e){return["["+dt.Python.quote_empty(e.getFieldValue("TEXT"))+"]",dt.Python.ORDER_ATOMIC]};dt.Python.lists_create_with_object=function(e){for(var t=Array(e.itemCount_),n=0;n<e.itemCount_;n++)t[n]=dt.Python.valueToCode(e,"ADD"+n,dt.Python.ORDER_NONE)||"None";return["["+t.join(", ")+"]",dt.Python.ORDER_ATOMIC]};dt.Python.CocoRobo_return_list=function(e){var t=dt.Python.valueToCode(e,"list_name",dt.Python.ORDER_ATOMIC);return e=dt.Python.valueToCode(e,"list_items",dt.Python.ORDER_ATOMIC),t+" = "+e+`
  1761. `};dt.Python.lists_append=function(e){var t=dt.Python.valueToCode(e,"list_name",dt.Python.ORDER_ATOMIC);return e=dt.Python.valueToCode(e,"last_item",dt.Python.ORDER_ATOMIC),t+".append("+e+`)
  1762. `};dt.Python.lists_extend=function(e){var t=dt.Python.valueToCode(e,"list_name",dt.Python.ORDER_ATOMIC);return e=dt.Python.valueToCode(e,"extend_list",dt.Python.ORDER_ATOMIC),t+".extend("+e+`)
  1763. `};dt.Python.lists_clear=function(e){return dt.Python.valueToCode(e,"list_name",dt.Python.ORDER_ATOMIC)+`.clear()
  1764. `};dt.Python.list_order_item=function(e){var t=dt.Python.valueToCode(e,"list_name",dt.Python.ORDER_ATOMIC),n=e.getFieldValue("list_order");return e=dt.Python.valueToCode(e,"list_order_item",dt.Python.ORDER_ATOMIC),[t+n+e+"]",dt.Python.ORDER_ATOMIC]};dt.Python.lists_clear=function(e){return dt.Python.valueToCode(e,"list_name",dt.Python.ORDER_ATOMIC)+`.clear()
  1765. `};dt.Python.parts_of_list=function(e){var t=dt.Python.valueToCode(e,"list_name",dt.Python.ORDER_ATOMIC),n=e.getFieldValue("list_start_order"),s=e.getFieldValue("list_end_order"),i=dt.Python.valueToCode(e,"start_item",dt.Python.ORDER_ATOMIC);switch(e=dt.Python.valueToCode(e,"end_item",dt.Python.ORDER_ATOMIC),s){case":":var r=parseInt(e)+1;break;case":-":r=e-1}return[t+n+i+s+r+"]",dt.Python.ORDER_ATOMIC]};dt.Python.list_to_tuple=function(e){return["tuple("+dt.Python.valueToCode(e,"list_name",dt.Python.ORDER_ATOMIC)+")",dt.Python.ORDER_ATOMIC]};dt.Python.list_order_item=function(e){var t=dt.Python.valueToCode(e,"list_name",dt.Python.ORDER_ATOMIC),n=e.getFieldValue("list_order");return e=dt.Python.valueToCode(e,"list_order_item",dt.Python.ORDER_ATOMIC),[t+n+e+"]",dt.Python.ORDER_ATOMIC]};dt.Python.set_list_order_item=function(e){var t=dt.Python.valueToCode(e,"list_name",dt.Python.ORDER_ATOMIC),n=e.getFieldValue("list_order"),s=dt.Python.valueToCode(e,"list_order_item",dt.Python.ORDER_ATOMIC);return e=dt.Python.valueToCode(e,"set_value",dt.Python.ORDER_ATOMIC),t+n+s+"] = "+e+`
  1766. `};dt.Python.insert_list_order_item=function(e){var t=dt.Python.valueToCode(e,"list_name",dt.Python.ORDER_ATOMIC),n=e.getFieldValue("list_order"),s=dt.Python.valueToCode(e,"list_order_item",dt.Python.ORDER_ATOMIC);return e=dt.Python.valueToCode(e,"set_value",dt.Python.ORDER_ATOMIC),t+".insert"+n+s+", "+e+`)
  1767. `};dt.Python.list_item_exist=function(e){var t=dt.Python.valueToCode(e,"list_name",dt.Python.ORDER_ATOMIC);return[dt.Python.valueToCode(e,"list_item",dt.Python.ORDER_ATOMIC)+" in "+t,dt.Python.ORDER_ATOMIC]};dt.Python.lists_repeat=function(e){var t=dt.Python.valueToCode(e,"ITEM",dt.Python.ORDER_NONE)||"None";return e=dt.Python.valueToCode(e,"NUM",dt.Python.ORDER_MULTIPLICATIVE)||"0",["["+t+"] * "+e,dt.Python.ORDER_MULTIPLICATIVE]};dt.Python.lists_length=function(e){return["len("+(dt.Python.valueToCode(e,"VALUE",dt.Python.ORDER_NONE)||"[]")+")",dt.Python.ORDER_FUNCTION_CALL]};dt.Python.lists_isEmpty=function(e){return["not len("+(dt.Python.valueToCode(e,"VALUE",dt.Python.ORDER_NONE)||"[]")+")",dt.Python.ORDER_LOGICAL_NOT]};dt.Python.lists_indexOf=function(e){var t=dt.Python.valueToCode(e,"FIND",dt.Python.ORDER_NONE)||"[]",n=dt.Python.valueToCode(e,"VALUE",dt.Python.ORDER_NONE)||"''";if(e.workspace.options.oneBasedIndex)var s=" 0",i=" + 1",r="";else s=" -1",i="",r=" - 1";return e.getFieldValue("END")=="FIRST"?(e=dt.Python.provideFunction_("first_index",["def "+dt.Python.FUNCTION_NAME_PLACEHOLDER_+"(my_list, elem):"," try: index = my_list.index(elem)"+i," except: index ="+s," return index"]),[e+"("+n+", "+t+")",dt.Python.ORDER_FUNCTION_CALL]):(e=dt.Python.provideFunction_("last_index",["def "+dt.Python.FUNCTION_NAME_PLACEHOLDER_+"(my_list, elem):"," try: index = len(my_list) - my_list[::-1].index(elem)"+r," except: index ="+s," return index"]),[e+"("+n+", "+t+")",dt.Python.ORDER_FUNCTION_CALL])};dt.Python.lists_getIndex=function(e){var t=e.getFieldValue("MODE")||"GET",n=e.getFieldValue("WHERE")||"FROM_START",s=dt.Python.valueToCode(e,"VALUE",n=="RANDOM"?dt.Python.ORDER_NONE:dt.Python.ORDER_MEMBER)||"[]";switch(n){case"FIRST":if(t=="GET")return[s+"[0]",dt.Python.ORDER_MEMBER];if(t=="GET_REMOVE")return[s+".pop(0)",dt.Python.ORDER_FUNCTION_CALL];if(t=="REMOVE")return s+`.pop(0)
  1768. `;break;case"LAST":if(t=="GET")return[s+"[-1]",dt.Python.ORDER_MEMBER];if(t=="GET_REMOVE")return[s+".pop()",dt.Python.ORDER_FUNCTION_CALL];if(t=="REMOVE")return s+`.pop()
  1769. `;break;case"FROM_START":if(e=dt.Python.valueToCode(e,"AT",dt.Python.ORDER_ATOMIC),t=="GET")return[s+"["+e+"]",dt.Python.ORDER_MEMBER];if(t=="GET_REMOVE")return[s+".pop("+e+")",dt.Python.ORDER_FUNCTION_CALL];if(t=="REMOVE")return s+".pop("+e+`)
  1770. `;break;case"FROM_END":if(e=dt.Python.getAdjustedInt(e,"AT",1,!0),t=="GET")return[s+"["+e+"]",dt.Python.ORDER_MEMBER];if(t=="GET_REMOVE")return[s+".pop("+e+")",dt.Python.ORDER_FUNCTION_CALL];if(t=="REMOVE")return s+".pop("+e+`)
  1771. `;break;case"RANDOM":if(dt.Python.definitions_.import_random="import random",t=="GET")return["random.choice("+s+")",dt.Python.ORDER_FUNCTION_CALL];if(s=dt.Python.provideFunction_("lists_remove_random_item",["def "+dt.Python.FUNCTION_NAME_PLACEHOLDER_+"(myList):"," x = int(random.random() * len(myList))"," return myList.pop(x)"])+"("+s+")",t=="GET_REMOVE")return[s,dt.Python.ORDER_FUNCTION_CALL];if(t=="REMOVE")return s+`
  1772. `}throw"Unhandled combination (lists_getIndex)."};dt.Python.lists_setIndex=function(e){var t=dt.Python.valueToCode(e,"LIST",dt.Python.ORDER_MEMBER)||"[]",n=e.getFieldValue("MODE")||"GET",s=e.getFieldValue("WHERE")||"FROM_START",i=dt.Python.valueToCode(e,"TO",dt.Python.ORDER_NONE)||"None";switch(s){case"FIRST":if(n=="SET")return t+"[0] = "+i+`
  1773. `;if(n=="INSERT")return t+".insert(0, "+i+`)
  1774. `;break;case"LAST":if(n=="SET")return t+"[-1] = "+i+`
  1775. `;if(n=="INSERT")return t+".append("+i+`)
  1776. `;break;case"FROM_START":if(e=dt.Python.getAdjustedInt(e,"AT"),n=="SET")return t+"["+e+"] = "+i+`
  1777. `;if(n=="INSERT")return t+".insert("+e+", "+i+`)
  1778. `;break;case"FROM_END":if(e=dt.Python.getAdjustedInt(e,"AT",1,!0),n=="SET")return t+"["+e+"] = "+i+`
  1779. `;if(n=="INSERT")return t+".insert("+e+", "+i+`)
  1780. `;break;case"RANDOM":if(dt.Python.definitions_.import_random="import random",t.match(/^\w+$/)?e="":(e=dt.Python.variableDB_.getDistinctName("tmp_list",dt.Variables.NAME_TYPE),s=e+" = "+t+`
  1781. `,t=e,e=s),s=dt.Python.variableDB_.getDistinctName("tmp_x",dt.Variables.NAME_TYPE),e+=s+" = int(random.random() * len("+t+`))
  1782. `,n=="SET")return e+(t+"["+s+"] = "+i+`
  1783. `);if(n=="INSERT")return e+(t+".insert("+s+", "+i+`)
  1784. `)}throw"Unhandled combination (lists_setIndex)."};dt.Python.lists_getSublist=function(e){var t=dt.Python.valueToCode(e,"LIST",dt.Python.ORDER_MEMBER)||"[]",n=e.getFieldValue("WHERE1"),s=e.getFieldValue("WHERE2");switch(n){case"FROM_START":n=dt.Python.getAdjustedInt(e,"AT1"),n=="0"&&(n="");break;case"FROM_END":n=dt.Python.getAdjustedInt(e,"AT1",1,!0);break;case"FIRST":n="";break;default:throw"Unhandled option (lists_getSublist)"}switch(s){case"FROM_START":e=dt.Python.getAdjustedInt(e,"AT2",1);break;case"FROM_END":e=dt.Python.getAdjustedInt(e,"AT2",0,!0),dt.isNumber(String(e))?e=="0"&&(e=""):(dt.Python.definitions_.import_sys="import sys",e+=" or sys.maxsize");break;case"LAST":e="";break;default:throw"Unhandled option (lists_getSublist)"}return[t+"["+n+" : "+e+"]",dt.Python.ORDER_MEMBER]};dt.Python.lists_sort=function(e){var t=dt.Python.valueToCode(e,"LIST",dt.Python.ORDER_NONE)||"[]",n=e.getFieldValue("TYPE");return e=e.getFieldValue("DIRECTION")==="1"?"False":"True",[dt.Python.provideFunction_("lists_sort",["def "+dt.Python.FUNCTION_NAME_PLACEHOLDER_+"(my_list, type, reverse):"," def try_float(s):"," try:"," return float(s)"," except:"," return 0"," key_funcs = {",' "NUMERIC": try_float,',' "TEXT": str,',' "IGNORE_CASE": lambda s: str(s).lower()'," }"," key_func = key_funcs[type]"," list_cpy = list(my_list)"," return sorted(list_cpy, key=key_func, reverse=reverse)"])+"("+t+', "'+n+'", '+e+")",dt.Python.ORDER_FUNCTION_CALL]};dt.Python.lists_split=function(e){var t=e.getFieldValue("MODE");if(t=="SPLIT")t=dt.Python.valueToCode(e,"INPUT",dt.Python.ORDER_MEMBER)||"''",e=dt.Python.valueToCode(e,"DELIM",dt.Python.ORDER_NONE),e=t+".split("+e+")";else if(t=="JOIN")t=dt.Python.valueToCode(e,"INPUT",dt.Python.ORDER_NONE)||"[]",e=dt.Python.valueToCode(e,"DELIM",dt.Python.ORDER_MEMBER)||"''",e=e+".join("+t+")";else throw"Unknown mode: "+t;return[e,dt.Python.ORDER_FUNCTION_CALL]};dt.Python.list_first_index=function(e){var t=dt.Python.valueToCode(e,"elem",dt.Python.ORDER_ATOMIC),n=dt.Python.valueToCode(e,"my_list",dt.Python.ORDER_ATOMIC);return e=e.getFieldValue("last_or_first"),dt.Python.codeFunctions_.list_first_index=`def first_index(my_list, elem):
  1785. try: index = my_list.index(elem)
  1786. except: index = 0
  1787. return index`,dt.Python.codeFunctions_.list_last_index=`def last_index(my_list, elem):
  1788. try: index = len(my_list) - my_list[::-1].index(elem) - 1
  1789. except: index = 0
  1790. return index`,[e+"_index("+n+", "+t+")",dt.Python.ORDER_ATOMIC]};const qn={Python:ni.pythonGenerator||{Msg:Object.create(null)}};qn.Python.text_dict=function(e){return["{"+qn.Python.quote_empty(e.getFieldValue("TEXT"))+"}",qn.Python.ORDER_ATOMIC]};qn.Python.dict_create_with=function(e){var t=qn.Python.valueToCode(e,"dict_name",qn.Python.ORDER_ATOMIC);return e=qn.Python.valueToCode(e,"dict_items",qn.Python.ORDER_ATOMIC),t+" = "+e+`
  1791. `};qn.Python.dict_key_value=function(e){var t=qn.Python.valueToCode(e,"dict_name",qn.Python.ORDER_ATOMIC);return e=qn.Python.valueToCode(e,"dict_items",qn.Python.ORDER_ATOMIC),[t+".get("+e+")",qn.Python.ORDER_ATOMIC]};qn.Python.add_dict_key_value=function(e){var t=qn.Python.valueToCode(e,"dict_name",qn.Python.ORDER_ATOMIC),n=qn.Python.valueToCode(e,"dict_items",qn.Python.ORDER_ATOMIC);return e=qn.Python.valueToCode(e,"add_value",qn.Python.ORDER_ATOMIC),t+"["+n+"] = "+e+`
  1792. `};qn.Python.dict_length=function(e){return["len("+qn.Python.valueToCode(e,"dict_name",qn.Python.ORDER_ATOMIC)+")",qn.Python.ORDER_ATOMIC]};qn.Python.dict_key_exist=function(e){var t=qn.Python.valueToCode(e,"dict_name",qn.Python.ORDER_ATOMIC);return[qn.Python.valueToCode(e,"dict_items",qn.Python.ORDER_ATOMIC)+" in "+t,qn.Python.ORDER_ATOMIC]};qn.Python.dict_key_or_val_list=function(e){var t=qn.Python.valueToCode(e,"dict_name",qn.Python.ORDER_ATOMIC);return e=e.getFieldValue("key_or_val"),["list("+t+"."+e+"())",qn.Python.ORDER_ATOMIC]};qn.Python.dict_create_with_items_insert=function(){for(var e=Array(this.itemCount_),t=0;t<this.itemCount_;t++){var n=this.getFieldValue("KEY"+t);e[t]='"'+n+'":'+(qn.Python.valueToCode(this,"ADD"+t,qn.Python.ORDER_NONE)||"0")}return e="{"+e.join(", ")+"}",[e,qn.Python.ORDER_ATOMIC]};qn.Python.pinyin_dict_create_with_items_insert=function(){for(var e=Array(this.itemCount_),t=0;t<this.itemCount_;t++){var n=this.getFieldValue("KEY"+t);e[t]='"'+n+'":'+(qn.Python.valueToCode(this,"ADD"+t,qn.Python.ORDER_NONE)||"0")}return e="{"+e.join(", ")+"}",[e,qn.Python.ORDER_ATOMIC]};const Un={Python:ni.pythonGenerator||{Msg:Object.create(null)}};Un.Python.text_tuple=function(e){return["("+Un.Python.quote_empty(e.getFieldValue("TEXT"))+")",Un.Python.ORDER_ATOMIC]};Un.Python.set_tuple_order_item=function(e){var t=Un.Python.valueToCode(e,"tuple_name",Un.Python.ORDER_ATOMIC),n=e.getFieldValue("tuple_order"),s=Un.Python.valueToCode(e,"tuple_order_item",Un.Python.ORDER_ATOMIC);return e=Un.Python.valueToCode(e,"set_value",Un.Python.ORDER_ATOMIC),t+n+s+"] = "+e+`
  1793. `};Un.Python.tuple_create_with_items_insert=function(e){for(var t=Array(e.itemCount_),n=0;n<e.itemCount_;n++)t[n]=Un.Python.valueToCode(e,"ADD"+n,Un.Python.ORDER_NONE)||"None";return[e.itemCount_==1?"("+t[0]+",)":"("+t.join(", ")+")",Un.Python.ORDER_ATOMIC]};Un.Python.tuple_create_with=function(e){var t=Un.Python.valueToCode(e,"tuple_name",Un.Python.ORDER_ATOMIC);return e=Un.Python.valueToCode(e,"tuple_items",Un.Python.ORDER_ATOMIC),t+" = "+e+`
  1794. `};Un.Python.tuple_order_item=function(e){var t=Un.Python.valueToCode(e,"tuple_name",Un.Python.ORDER_ATOMIC),n=e.getFieldValue("tuple_order");return e=Un.Python.valueToCode(e,"tuple_order_item",Un.Python.ORDER_ATOMIC),[t+n+e+"]",Un.Python.ORDER_ATOMIC]};Un.Python.tuple_min_max_len=function(e){var t=Un.Python.valueToCode(e,"tuple_name",Un.Python.ORDER_ATOMIC);return[e.getFieldValue("tuple_min_max_len")+"("+t+")",Un.Python.ORDER_ATOMIC]};Un.Python.tuple_item_exist=function(e){var t=Un.Python.valueToCode(e,"tuple_name",Un.Python.ORDER_ATOMIC);return[Un.Python.valueToCode(e,"tuple_item",Un.Python.ORDER_ATOMIC)+" in "+t,Un.Python.ORDER_ATOMIC]};Un.Python.parts_of_tuple=function(e){var t=Un.Python.valueToCode(e,"tuple_name",Un.Python.ORDER_ATOMIC);return e=Un.Python.valueToCode(e,"tuple_item",Un.Python.ORDER_ATOMIC),[t+"["+e+":]",Un.Python.ORDER_ATOMIC]};Un.Python.parts_of_tuple2=function(e){var t=Un.Python.valueToCode(e,"tuple_name",Un.Python.ORDER_ATOMIC),n=e.getFieldValue("tuple_start_order"),s=e.getFieldValue("tuple_end_order"),i=Un.Python.valueToCode(e,"start_item",Un.Python.ORDER_ATOMIC);switch(e=Un.Python.valueToCode(e,"end_item",Un.Python.ORDER_ATOMIC),s){case":":var r=parseInt(e)+1;break;case":-":r=e-1}return[t+n+i+s+r+"]",Un.Python.ORDER_ATOMIC]};const Jn={Python:ni.pythonGenerator||{Msg:Object.create(null)}};Jn.Python.set_create_with_items_insert=function(e){var t=Array(e.itemCount_);if(e.itemCount_==0)e="set()";else{for(var n=0;n<e.itemCount_;n++)t[n]=Jn.Python.valueToCode(e,"ADD"+n,Jn.Python.ORDER_NONE)||"None";e="{"+t.join(", ")+"}"}return[e,Jn.Python.ORDER_ATOMIC]};Jn.Python.text_set=function(e){return["{"+Jn.Python.quote_empty(e.getFieldValue("TEXT"))+"}",Jn.Python.ORDER_ATOMIC]};Jn.Python.set_create_with=function(e){var t=Jn.Python.valueToCode(e,"set_name",Jn.Python.ORDER_ATOMIC);return e=Jn.Python.valueToCode(e,"set_items",Jn.Python.ORDER_ATOMIC),t+" = "+e+`
  1795. `};Jn.Python.sets_update_ways=function(e){var t=e.getFieldValue("sets_update_ways"),n=Jn.Python.valueToCode(e,"set_name",Jn.Python.ORDER_ATOMIC);return e=Jn.Python.valueToCode(e,"set_1_name",Jn.Python.ORDER_ATOMIC),n+t+"("+e+`)
  1796. `};Jn.Python.get_sets_pop=function(e){return[Jn.Python.valueToCode(e,"set_name",Jn.Python.ORDER_ATOMIC)+".pop()",Jn.Python.ORDER_ATOMIC]};Jn.Python.len_of_sets=function(e){return["len("+Jn.Python.valueToCode(e,"set_name",Jn.Python.ORDER_ATOMIC)+")",Jn.Python.ORDER_ATOMIC]};Jn.Python.intersection_of_sets=function(e){var t=e.getFieldValue("set_operation_type"),n=Jn.Python.valueToCode(e,"set_name",Jn.Python.ORDER_ATOMIC);return e=Jn.Python.valueToCode(e,"set_1_name",Jn.Python.ORDER_ATOMIC),[n+t+e,Jn.Python.ORDER_ATOMIC]};Jn.Python.set_update_with=function(e){var t=Jn.Python.valueToCode(e,"set_name",Jn.Python.ORDER_ATOMIC);return e=Jn.Python.valueToCode(e,"set_items",Jn.Python.ORDER_ATOMIC),t+".update("+e+`)
  1797. `};Jn.Python.set_subset_superset=function(e){var t=e.getFieldValue("subset_superset"),n=Jn.Python.valueToCode(e,"set_name",Jn.Python.ORDER_ATOMIC);return e=Jn.Python.valueToCode(e,"set_1_name",Jn.Python.ORDER_ATOMIC),[n+t+"("+e+")",Jn.Python.ORDER_ATOMIC]};Blockly.Python=ni.pythonGenerator||{Msg:Object.create(null)};Blockly.Python.esp32_main_controller_io_from_digital_pin=function(e){var t=Blockly.Python.valueToCode(e,"digital_pin_input",Blockly.Python.ORDER_ATOMIC),n="";return Blockly.Python.definitions_.import_from_digital_pin_setup=`from machine import Pin
  1798. `,Blockly.Python.definitions_["import_from_digital_pin_"+t]=`
  1799. _PIN_IN_${t} = Pin(${t}, Pin.IN)
  1800. `,n="_PIN_IN_"+t+".value()",[n,Blockly.Python.ORDER_CONDITIONAL]};Blockly.Python.esp32_main_controller_io_set_digital_pin=function(e){var t=Blockly.Python.valueToCode(e,"high_low",Blockly.Python.ORDER_ATOMIC).slice(1,2),n=Blockly.Python.valueToCode(e,"digital_pin_input",Blockly.Python.ORDER_ATOMIC);return Blockly.Python.definitions_.import_from_digital_pin_setup=`from machine import Pin
  1801. `,Blockly.Python.definitions_["import_from_digital_pin_"+n]=`
  1802. _PIN_OUT_${n} = Pin(${n}, Pin.OUT)
  1803. `,`_PIN_OUT_${n}.value(${t})
  1804. `};Blockly.Python.esp32_main_controller_io_high_low=function(e){var t=e.getFieldValue("high_low"),n=t;return[n,Blockly.Python.ORDER_NONE]};Blockly.Python.esp32_main_controller_io_from_analog_pin=function(e){var t=e.getFieldValue("gpio");Blockly.Python.definitions_.import_setup=`import machine
  1805. from machine import Pin, ADC
  1806. `,Blockly.Python.definitions_["import_"+t+"_setup"]="_PWM_PIN_IN_"+t+" = ADC(Pin("+t+`))
  1807. _PWM_PIN_IN_`+t+`.atten(ADC.ATTN_11DB)
  1808. _PWM_PIN_IN_`+t+`.width(ADC.WIDTH_10BIT)
  1809. `;var n="_PWM_PIN_IN_"+t+".read()";return[n,Blockly.Python.ORDER_CONDITIONAL]};const U7=Blockly;Blockly.Python=ni.pythonGenerator||{Msg:Object.create(null)};Blockly.Python.iot_system_run=function(e){var t=Blockly.Python.valueToCode(e,"PATH",Blockly.Python.ORDER_ATOMIC),n="exec(open("+t+`).read())
  1810. `;return n};Blockly.Python.iot_system_create_file=function(e){var t=Blockly.Python.valueToCode(e,"filename",Blockly.Python.ORDER_ATOMIC).replace('"',"").replace('"',""),n=Blockly.Python.valueToCode(e,"PATH",Blockly.Python.ORDER_ATOMIC).replace('"',"").replace('"',""),s=`def _CREATE_TEXT_FILE(_path):
  1811. `;return s+=` f = open(_path, 'w')
  1812. `,s+=` f.close()
  1813. `,Blockly.Python.addFunction("_CREATE_TEXT_FILE",s),s='_CREATE_TEXT_FILE("'+n+t+`")
  1814. `,s};Blockly.Python.iot_system_open_file=function(e){var t=Blockly.Python.valueToCode(e,"filename",Blockly.Python.ORDER_ATOMIC).replace('"',"").replace('"',""),n=Blockly.Python.valueToCode(e,"PATH",Blockly.Python.ORDER_ATOMIC).replace('"',"").replace('"',""),s='f = open("'+n+t+`", 'a')
  1815. `;return s};Blockly.Python.iot_system_write_file=function(e){var t=Blockly.Python.valueToCode(e,"WPATH",Blockly.Python.ORDER_ATOMIC),n=e.getFieldValue("separator"),s="";return n=="newline"?s="f.write("+t+` + '\\r\\n')
  1816. `:n=="comma"?s="f.write("+t+` + ',')
  1817. `:n=="space"?s="f.write("+t+` + ' ')
  1818. `:n=="semicolon"&&(s="f.write("+t+` + ';')
  1819. `),s};Blockly.Python.iot_system_close_file=function(e){var t=`f.close()
  1820. `;return t};Blockly.Python.iot_system_delete_file=function(e){var t=Blockly.Python.valueToCode(e,"PATH",Blockly.Python.ORDER_ATOMIC);Blockly.Python.definitions_["import os"]="import os";var n="os.remove("+t+`)
  1821. `;return n};Blockly.Python.iot_system_input_file=function(e){var t=Blockly.Python.valueToCode(e,"filename",Blockly.Python.ORDER_ATOMIC).replace('"',"").replace('"',""),n=Blockly.Python.valueToCode(e,"PATH",Blockly.Python.ORDER_ATOMIC).replace('"',"").replace('"',""),s=e.getFieldValue("separator");Blockly.Python.definitions_._GET_LIST_FROM_FILE=`def _GET_LIST_FROM_FILE(_path, _sep):
  1822. f = open(_path, 'r')
  1823. result = f.read().split(_sep)
  1824. f.close()
  1825. return result
  1826. `;let i='_GET_LIST_FROM_FILE("'+n+t+`", '\\r\\n')`;return s=="newline"?i='_GET_LIST_FROM_FILE("'+n+t+`", '\\r\\n')`:s=="comma"?i='_GET_LIST_FROM_FILE("'+n+t+`", ',')`:s=="space"?i='_GET_LIST_FROM_FILE("'+n+t+`", ' ')`:s=="semicolon"&&(i='_GET_LIST_FROM_FILE("'+n+t+`", ';')`),[i,Blockly.Python.ORDER_NONE]};const H7=Blockly,V7={...gt,...ns,...dn,...dt,...qn,...Un,...Jn,...U7,...H7};let mk=[],oX=[];(()=>{let e="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=0,n=0;t<e.length;t++)(t%2?oX:mk).push(n=n+e[t])})();function G7(e){if(e<768)return!1;for(let t=0,n=mk.length;;){let s=t+n>>1;if(e<mk[s])n=s;else if(e>=oX[s])t=s+1;else return!0;if(t==n)return!1}}function _F(e){return e>=127462&&e<=127487}const TF=8205;function W7(e,t,n=!0,s=!0){return(n?sX:X7)(e,t,s)}function sX(e,t,n){if(t==e.length)return t;t&&iX(e.charCodeAt(t))&&rX(e.charCodeAt(t-1))&&t--;let s=FL(e,t);for(t+=EF(s);t<e.length;){let i=FL(e,t);if(s==TF||i==TF||n&&G7(i))t+=EF(i),s=i;else if(_F(i)){let r=0,a=t-2;for(;a>=0&&_F(FL(e,a));)r++,a-=2;if(r%2==0)break;t+=2}else break}return t}function X7(e,t,n){for(;t>0;){let s=sX(e,t-2,n);if(s<t)return s;t--}return 0}function FL(e,t){let n=e.charCodeAt(t);if(!rX(n)||t+1==e.length)return n;let s=e.charCodeAt(t+1);return iX(s)?(n-55296<<10)+(s-56320)+65536:n}function iX(e){return e>=56320&&e<57344}function rX(e){return e>=55296&&e<56320}function EF(e){return e<65536?1:2}let Fo=class lX{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,n,s){[t,n]=RE(this,t,n);let i=[];return this.decompose(0,t,i,2),s.length&&s.decompose(0,s.length,i,3),this.decompose(n,this.length,i,1),xu.from(i,this.length-(n-t)+s.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,n=this.length){[t,n]=RE(this,t,n);let s=[];return this.decompose(t,n,s,0),xu.from(s,n-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let n=this.scanIdentical(t,1),s=this.length-this.scanIdentical(t,-1),i=new VS(this),r=new VS(t);for(let a=n,c=n;;){if(i.next(a),r.next(a),a=0,i.lineBreak!=r.lineBreak||i.done!=r.done||i.value!=r.value)return!1;if(c+=i.value.length,i.done||c>=s)return!0}}iter(t=1){return new VS(this,t)}iterRange(t,n=this.length){return new aX(this,t,n)}iterLines(t,n){let s;if(t==null)s=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(t).from;s=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new cX(s)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(t.length==0)throw new RangeError("A document must have at least one line");return t.length==1&&!t[0]?lX.empty:t.length<=32?new Js(t):xu.from(Js.split(t,[]))}};class Js extends Fo{constructor(t,n=z7(t)){super(),this.text=t,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(t,n,s,i){for(let r=0;;r++){let a=this.text[r],c=i+a.length;if((n?s:c)>=t)return new Y7(i,c,s,a);i=c+1,s++}}decompose(t,n,s,i){let r=t<=0&&n>=this.length?this:new Js(vF(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let a=s.pop(),c=XR(r.text,a.text.slice(),0,r.length);if(c.length<=32)s.push(new Js(c,a.length+r.length));else{let u=c.length>>1;s.push(new Js(c.slice(0,u)),new Js(c.slice(u)))}}else s.push(r)}replace(t,n,s){if(!(s instanceof Js))return super.replace(t,n,s);[t,n]=RE(this,t,n);let i=XR(this.text,XR(s.text,vF(this.text,0,t)),n),r=this.length+s.length-(n-t);return i.length<=32?new Js(i,r):xu.from(Js.split(i,[]),r)}sliceString(t,n=this.length,s=`
  1827. `){[t,n]=RE(this,t,n);let i="";for(let r=0,a=0;r<=n&&a<this.text.length;a++){let c=this.text[a],u=r+c.length;r>t&&a&&(i+=s),t<u&&n>r&&(i+=c.slice(Math.max(0,t-r),n-r)),r=u+1}return i}flatten(t){for(let n of this.text)t.push(n)}scanIdentical(){return 0}static split(t,n){let s=[],i=-1;for(let r of t)s.push(r),i+=r.length+1,s.length==32&&(n.push(new Js(s,i)),s=[],i=-1);return i>-1&&n.push(new Js(s,i)),n}}class xu extends Fo{constructor(t,n){super(),this.children=t,this.length=n,this.lines=0;for(let s of t)this.lines+=s.lines}lineInner(t,n,s,i){for(let r=0;;r++){let a=this.children[r],c=i+a.length,u=s+a.lines-1;if((n?u:c)>=t)return a.lineInner(t,n,s,i);i=c+1,s=u+1}}decompose(t,n,s,i){for(let r=0,a=0;a<=n&&r<this.children.length;r++){let c=this.children[r],u=a+c.length;if(t<=u&&n>=a){let h=i&((a<=t?1:0)|(u>=n?2:0));a>=t&&u<=n&&!h?s.push(c):c.decompose(t-a,n-a,s,h)}a=u+1}}replace(t,n,s){if([t,n]=RE(this,t,n),s.lines<this.lines)for(let i=0,r=0;i<this.children.length;i++){let a=this.children[i],c=r+a.length;if(t>=r&&n<=c){let u=a.replace(t-r,n-r,s),h=this.lines-a.lines+u.lines;if(u.lines<h>>4&&u.lines>h>>6){let f=this.children.slice();return f[i]=u,new xu(f,this.length-(n-t)+s.length)}return super.replace(r,c,u)}r=c+1}return super.replace(t,n,s)}sliceString(t,n=this.length,s=`
  1828. `){[t,n]=RE(this,t,n);let i="";for(let r=0,a=0;r<this.children.length&&a<=n;r++){let c=this.children[r],u=a+c.length;a>t&&r&&(i+=s),t<u&&n>a&&(i+=c.sliceString(t-a,n-a,s)),a=u+1}return i}flatten(t){for(let n of this.children)n.flatten(t)}scanIdentical(t,n){if(!(t instanceof xu))return 0;let s=0,[i,r,a,c]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,r+=n){if(i==a||r==c)return s;let u=this.children[i],h=t.children[r];if(u!=h)return s+u.scanIdentical(h,n);s+=u.length+1}}static from(t,n=t.reduce((s,i)=>s+i.length+1,-1)){let s=0;for(let E of t)s+=E.lines;if(s<32){let E=[];for(let v of t)v.flatten(E);return new Js(E,n)}let i=Math.max(32,s>>5),r=i<<1,a=i>>1,c=[],u=0,h=-1,f=[];function p(E){let v;if(E.lines>r&&E instanceof xu)for(let b of E.children)p(b);else E.lines>a&&(u>a||!u)?(_(),c.push(E)):E instanceof Js&&u&&(v=f[f.length-1])instanceof Js&&E.lines+v.lines<=32?(u+=E.lines,h+=E.length+1,f[f.length-1]=new Js(v.text.concat(E.text),v.length+1+E.length)):(u+E.lines>i&&_(),u+=E.lines,h+=E.length+1,f.push(E))}function _(){u!=0&&(c.push(f.length==1?f[0]:xu.from(f,h)),h=-1,u=f.length=0)}for(let E of t)p(E);return _(),c.length==1?c[0]:new xu(c,n)}}Fo.empty=new Js([""],0);function z7(e){let t=-1;for(let n of e)t+=n.length+1;return t}function XR(e,t,n=0,s=1e9){for(let i=0,r=0,a=!0;r<e.length&&i<=s;r++){let c=e[r],u=i+c.length;u>=n&&(u>s&&(c=c.slice(0,s-i)),i<n&&(c=c.slice(n-i)),a?(t[t.length-1]+=c,a=!1):t.push(c)),i=u+1}return t}function vF(e,t,n){return XR(e,[""],t,n)}class VS{constructor(t,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[n>0?1:(t instanceof Js?t.text.length:t.children.length)<<1]}nextInner(t,n){for(this.done=this.lineBreak=!1;;){let s=this.nodes.length-1,i=this.nodes[s],r=this.offsets[s],a=r>>1,c=i instanceof Js?i.text.length:i.children.length;if(a==(n>0?c:0)){if(s==0)return this.done=!0,this.value="",this;n>0&&this.offsets[s-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(n>0?0:1)){if(this.offsets[s]+=n,t==0)return this.lineBreak=!0,this.value=`
  1829. `,this;t--}else if(i instanceof Js){let u=i.text[a+(n<0?-1:0)];if(this.offsets[s]+=n,u.length>Math.max(0,t))return this.value=t==0?u:n>0?u.slice(t):u.slice(0,u.length-t),this;t-=u.length}else{let u=i.children[a+(n<0?-1:0)];t>u.length?(t-=u.length,this.offsets[s]+=n):(n<0&&this.offsets[s]--,this.nodes.push(u),this.offsets.push(n>0?1:(u instanceof Js?u.text.length:u.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class aX{constructor(t,n,s){this.value="",this.done=!1,this.cursor=new VS(t,n>s?-1:1),this.pos=n>s?t.length:0,this.from=Math.min(n,s),this.to=Math.max(n,s)}nextInner(t,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let s=n<0?this.pos-this.from:this.to-this.pos;t>s&&(t=s),s-=t;let{value:i}=this.cursor.next(t);return this.pos+=(i.length+t)*n,this.value=i.length<=s?i:n<0?i.slice(i.length-s):i.slice(0,s),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class cX{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:n,lineBreak:s,value:i}=this.inner.next(t);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):s?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Fo.prototype[Symbol.iterator]=function(){return this.iter()},VS.prototype[Symbol.iterator]=aX.prototype[Symbol.iterator]=cX.prototype[Symbol.iterator]=function(){return this});class Y7{constructor(t,n,s,i){this.from=t,this.to=n,this.number=s,this.text=i}get length(){return this.to-this.from}}function RE(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function nr(e,t,n=!0,s=!0){return W7(e,t,n,s)}function K7(e){return e>=56320&&e<57344}function j7(e){return e>=55296&&e<56320}function Al(e,t){let n=e.charCodeAt(t);if(!j7(n)||t+1==e.length)return n;let s=e.charCodeAt(t+1);return K7(s)?(n-55296<<10)+(s-56320)+65536:n}function TP(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}function Bu(e){return e<65536?1:2}const _k=/\r\n?|\n/;var tr=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(tr||(tr={}));class Yu{constructor(t){this.sections=t}get length(){let t=0;for(let n=0;n<this.sections.length;n+=2)t+=this.sections[n];return t}get newLength(){let t=0;for(let n=0;n<this.sections.length;n+=2){let s=this.sections[n+1];t+=s<0?this.sections[n]:s}return t}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(t){for(let n=0,s=0,i=0;n<this.sections.length;){let r=this.sections[n++],a=this.sections[n++];a<0?(t(s,i,r),i+=r):i+=a,s+=r}}iterChangedRanges(t,n=!1){Tk(this,t,n)}get invertedDesc(){let t=[];for(let n=0;n<this.sections.length;){let s=this.sections[n++],i=this.sections[n++];i<0?t.push(s,i):t.push(i,s)}return new Yu(t)}composeDesc(t){return this.empty?t:t.empty?this:uX(this,t)}mapDesc(t,n=!1){return t.empty?this:Ek(this,t,n)}mapPos(t,n=-1,s=tr.Simple){let i=0,r=0;for(let a=0;a<this.sections.length;){let c=this.sections[a++],u=this.sections[a++],h=i+c;if(u<0){if(h>t)return r+(t-i);r+=c}else{if(s!=tr.Simple&&h>=t&&(s==tr.TrackDel&&i<t&&h>t||s==tr.TrackBefore&&i<t||s==tr.TrackAfter&&h>t))return null;if(h>t||h==t&&n<0&&!c)return t==i||n<0?r:r+u;r+=u}i=h}if(t>i)throw new RangeError(`Position ${t} is out of range for changeset of length ${i}`);return r}touchesRange(t,n=t){for(let s=0,i=0;s<this.sections.length&&i<=n;){let r=this.sections[s++],a=this.sections[s++],c=i+r;if(a>=0&&i<=n&&c>=t)return i<t&&c>n?"cover":!0;i=c}return!1}toString(){let t="";for(let n=0;n<this.sections.length;){let s=this.sections[n++],i=this.sections[n++];t+=(t?" ":"")+s+(i>=0?":"+i:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Yu(t)}static create(t){return new Yu(t)}}class yi extends Yu{constructor(t,n){super(t),this.inserted=n}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return Tk(this,(n,s,i,r,a)=>t=t.replace(i,i+(s-n),a),!1),t}mapDesc(t,n=!1){return Ek(this,t,n,!0)}invert(t){let n=this.sections.slice(),s=[];for(let i=0,r=0;i<n.length;i+=2){let a=n[i],c=n[i+1];if(c>=0){n[i]=c,n[i+1]=a;let u=i>>1;for(;s.length<u;)s.push(Fo.empty);s.push(a?t.slice(r,r+a):Fo.empty)}r+=a}return new yi(n,s)}compose(t){return this.empty?t:t.empty?this:uX(this,t,!0)}map(t,n=!1){return t.empty?this:Ek(this,t,n,!0)}iterChanges(t,n=!1){Tk(this,t,n)}get desc(){return Yu.create(this.sections)}filter(t){let n=[],s=[],i=[],r=new dy(this);e:for(let a=0,c=0;;){let u=a==t.length?1e9:t[a++];for(;c<u||c==u&&r.len==0;){if(r.done)break e;let f=Math.min(r.len,u-c);Rr(i,f,-1);let p=r.ins==-1?-1:r.off==0?r.ins:0;Rr(n,f,p),p>0&&tp(s,n,r.text),r.forward(f),c+=f}let h=t[a++];for(;c<h;){if(r.done)break e;let f=Math.min(r.len,h-c);Rr(n,f,-1),Rr(i,f,r.ins==-1?-1:r.off==0?r.ins:0),r.forward(f),c+=f}}return{changes:new yi(n,s),filtered:Yu.create(i)}}toJSON(){let t=[];for(let n=0;n<this.sections.length;n+=2){let s=this.sections[n],i=this.sections[n+1];i<0?t.push(s):i==0?t.push([s]):t.push([s].concat(this.inserted[n>>1].toJSON()))}return t}static of(t,n,s){let i=[],r=[],a=0,c=null;function u(f=!1){if(!f&&!i.length)return;a<n&&Rr(i,n-a,-1);let p=new yi(i,r);c=c?c.compose(p.map(c)):p,i=[],r=[],a=0}function h(f){if(Array.isArray(f))for(let p of f)h(p);else if(f instanceof yi){if(f.length!=n)throw new RangeError(`Mismatched change set length (got ${f.length}, expected ${n})`);u(),c=c?c.compose(f.map(c)):f}else{let{from:p,to:_=p,insert:E}=f;if(p>_||p<0||_>n)throw new RangeError(`Invalid change range ${p} to ${_} (in doc of length ${n})`);let v=E?typeof E=="string"?Fo.of(E.split(s||_k)):E:Fo.empty,b=v.length;if(p==_&&b==0)return;p<a&&u(),p>a&&Rr(i,p-a,-1),Rr(i,_-p,b),tp(r,i,v),a=_}}return h(t),u(!c),c}static empty(t){return new yi(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],s=[];for(let i=0;i<t.length;i++){let r=t[i];if(typeof r=="number")n.push(r,-1);else{if(!Array.isArray(r)||typeof r[0]!="number"||r.some((a,c)=>c&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)n.push(r[0],0);else{for(;s.length<i;)s.push(Fo.empty);s[i]=Fo.of(r.slice(1)),n.push(r[0],s[i].length)}}}return new yi(n,s)}static createSet(t,n){return new yi(t,n)}}function Rr(e,t,n,s=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:s?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function tp(e,t,n){if(n.length==0)return;let s=t.length-2>>1;if(s<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<s;)e.push(Fo.empty);e.push(n)}}function Tk(e,t,n){let s=e.inserted;for(let i=0,r=0,a=0;a<e.sections.length;){let c=e.sections[a++],u=e.sections[a++];if(u<0)i+=c,r+=c;else{let h=i,f=r,p=Fo.empty;for(;h+=c,f+=u,u&&s&&(p=p.append(s[a-2>>1])),!(n||a==e.sections.length||e.sections[a+1]<0);)c=e.sections[a++],u=e.sections[a++];t(i,h,r,f,p),i=h,r=f}}}function Ek(e,t,n,s=!1){let i=[],r=s?[]:null,a=new dy(e),c=new dy(t);for(let u=-1;;){if(a.done&&c.len||c.done&&a.len)throw new Error("Mismatched change set lengths");if(a.ins==-1&&c.ins==-1){let h=Math.min(a.len,c.len);Rr(i,h,-1),a.forward(h),c.forward(h)}else if(c.ins>=0&&(a.ins<0||u==a.i||a.off==0&&(c.len<a.len||c.len==a.len&&!n))){let h=c.len;for(Rr(i,c.ins,-1);h;){let f=Math.min(a.len,h);a.ins>=0&&u<a.i&&a.len<=f&&(Rr(i,0,a.ins),r&&tp(r,i,a.text),u=a.i),a.forward(f),h-=f}c.next()}else if(a.ins>=0){let h=0,f=a.len;for(;f;)if(c.ins==-1){let p=Math.min(f,c.len);h+=p,f-=p,c.forward(p)}else if(c.ins==0&&c.len<f)f-=c.len,c.next();else break;Rr(i,h,u<a.i?a.ins:0),r&&u<a.i&&tp(r,i,a.text),u=a.i,a.forward(a.len-f)}else{if(a.done&&c.done)return r?yi.createSet(i,r):Yu.create(i);throw new Error("Mismatched change set lengths")}}}function uX(e,t,n=!1){let s=[],i=n?[]:null,r=new dy(e),a=new dy(t);for(let c=!1;;){if(r.done&&a.done)return i?yi.createSet(s,i):Yu.create(s);if(r.ins==0)Rr(s,r.len,0,c),r.next();else if(a.len==0&&!a.done)Rr(s,0,a.ins,c),i&&tp(i,s,a.text),a.next();else{if(r.done||a.done)throw new Error("Mismatched change set lengths");{let u=Math.min(r.len2,a.len),h=s.length;if(r.ins==-1){let f=a.ins==-1?-1:a.off?0:a.ins;Rr(s,u,f,c),i&&f&&tp(i,s,a.text)}else a.ins==-1?(Rr(s,r.off?0:r.len,u,c),i&&tp(i,s,r.textBit(u))):(Rr(s,r.off?0:r.len,a.off?0:a.ins,c),i&&!a.off&&tp(i,s,a.text));c=(r.ins>u||a.ins>=0&&a.len>u)&&(c||s.length>h),r.forward2(u),a.forward(u)}}}}class dy{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length?Fo.empty:t[n]}textBit(t){let{inserted:n}=this.set,s=this.i-2>>1;return s>=n.length&&!t?Fo.empty:n[s].slice(this.off,t==null?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){this.ins==-1?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class lm{constructor(t,n,s){this.from=t,this.to=n,this.flags=s}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 t=this.flags&7;return t==7?null:t}get goalColumn(){let t=this.flags>>6;return t==16777215?void 0:t}map(t,n=-1){let s,i;return this.empty?s=i=t.mapPos(this.from,n):(s=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),s==this.from&&i==this.to?this:new lm(s,i,this.flags)}extend(t,n=t){if(t<=this.anchor&&n>=this.anchor)return xt.range(t,n);let s=Math.abs(t-this.anchor)>Math.abs(n-this.anchor)?t:n;return xt.range(this.anchor,s)}eq(t,n=!1){return this.anchor==t.anchor&&this.head==t.head&&(!n||!this.empty||this.assoc==t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return xt.range(t.anchor,t.head)}static create(t,n,s){return new lm(t,n,s)}}class xt{constructor(t,n){this.ranges=t,this.mainIndex=n}map(t,n=-1){return t.empty?this:xt.create(this.ranges.map(s=>s.map(t,n)),this.mainIndex)}eq(t,n=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let s=0;s<this.ranges.length;s++)if(!this.ranges[s].eq(t.ranges[s],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new xt([this.main],0)}addRange(t,n=!0){return xt.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let s=this.ranges.slice();return s[n]=t,xt.create(s,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(t=>t.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!="number"||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new xt(t.ranges.map(n=>lm.fromJSON(n)),t.main)}static single(t,n=t){return new xt([xt.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw new RangeError("A selection needs at least one range");for(let s=0,i=0;i<t.length;i++){let r=t[i];if(r.empty?r.from<=s:r.from<s)return xt.normalized(t.slice(),n);s=r.to}return new xt(t,n)}static cursor(t,n=0,s,i){return lm.create(t,t,(n==0?0:n<0?8:16)|(s==null?7:Math.min(6,s))|(i??16777215)<<6)}static range(t,n,s,i){let r=(s??16777215)<<6|(i==null?7:Math.min(6,i));return n<t?lm.create(n,t,48|r):lm.create(t,n,(n>t?8:0)|r)}static normalized(t,n=0){let s=t[n];t.sort((i,r)=>i.from-r.from),n=t.indexOf(s);for(let i=1;i<t.length;i++){let r=t[i],a=t[i-1];if(r.empty?r.from<=a.to:r.from<a.to){let c=a.from,u=Math.max(r.to,a.to);i<=n&&n--,t.splice(--i,2,r.anchor>r.head?xt.range(u,c):xt.range(c,u))}}return new xt(t,n)}}function dX(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let EP=0;class mn{constructor(t,n,s,i,r){this.combine=t,this.compareInput=n,this.compare=s,this.isStatic=i,this.id=EP++,this.default=t([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(t={}){return new mn(t.combine||(n=>n),t.compareInput||((n,s)=>n===s),t.compare||(t.combine?(n,s)=>n===s:vP),!!t.static,t.enables)}of(t){return new zR([],this,0,t)}compute(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new zR(t,this,1,n)}computeN(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new zR(t,this,2,n)}from(t,n){return n||(n=s=>s),this.compute([t],s=>n(s.field(t)))}}function vP(e,t){return e==t||e.length==t.length&&e.every((n,s)=>n===t[s])}class zR{constructor(t,n,s,i){this.dependencies=t,this.facet=n,this.type=s,this.value=i,this.id=EP++}dynamicSlot(t){var n;let s=this.value,i=this.facet.compareInput,r=this.id,a=t[r]>>1,c=this.type==2,u=!1,h=!1,f=[];for(let p of this.dependencies)p=="doc"?u=!0:p=="selection"?h=!0:((n=t[p.id])!==null&&n!==void 0?n:1)&1||f.push(t[p.id]);return{create(p){return p.values[a]=s(p),1},update(p,_){if(u&&_.docChanged||h&&(_.docChanged||_.selection)||vk(p,f)){let E=s(p);if(c?!bF(E,p.values[a],i):!i(E,p.values[a]))return p.values[a]=E,1}return 0},reconfigure:(p,_)=>{let E,v=_.config.address[r];if(v!=null){let b=zC(_,v);if(this.dependencies.every(y=>y instanceof mn?_.facet(y)===p.facet(y):y instanceof Wi?_.field(y,!1)==p.field(y,!1):!0)||(c?bF(E=s(p),b,i):i(E=s(p),b)))return p.values[a]=b,0}else E=s(p);return p.values[a]=E,1}}}}function bF(e,t,n){if(e.length!=t.length)return!1;for(let s=0;s<e.length;s++)if(!n(e[s],t[s]))return!1;return!0}function vk(e,t){let n=!1;for(let s of t)GS(e,s)&1&&(n=!0);return n}function Q7(e,t,n){let s=n.map(u=>e[u.id]),i=n.map(u=>u.type),r=s.filter(u=>!(u&1)),a=e[t.id]>>1;function c(u){let h=[];for(let f=0;f<s.length;f++){let p=zC(u,s[f]);if(i[f]==2)for(let _ of p)h.push(_);else h.push(p)}return t.combine(h)}return{create(u){for(let h of s)GS(u,h);return u.values[a]=c(u),1},update(u,h){if(!vk(u,r))return 0;let f=c(u);return t.compare(f,u.values[a])?0:(u.values[a]=f,1)},reconfigure(u,h){let f=vk(u,s),p=h.config.facets[t.id],_=h.facet(t);if(p&&!f&&vP(n,p))return u.values[a]=_,0;let E=c(u);return t.compare(E,_)?(u.values[a]=_,0):(u.values[a]=E,1)}}}const OF=mn.define({static:!0});class Wi{constructor(t,n,s,i,r){this.id=t,this.createF=n,this.updateF=s,this.compareF=i,this.spec=r,this.provides=void 0}static define(t){let n=new Wi(EP++,t.create,t.update,t.compare||((s,i)=>s===i),t);return t.provide&&(n.provides=t.provide(n)),n}create(t){let n=t.facet(OF).find(s=>s.field==this);return((n==null?void 0:n.create)||this.createF)(t)}slot(t){let n=t[this.id]>>1;return{create:s=>(s.values[n]=this.create(s),1),update:(s,i)=>{let r=s.values[n],a=this.updateF(r,i);return this.compareF(r,a)?0:(s.values[n]=a,1)},reconfigure:(s,i)=>i.config.address[this.id]!=null?(s.values[n]=i.field(this),0):(s.values[n]=this.create(s),1)}}init(t){return[this,OF.of({field:this,create:t})]}get extension(){return this}}const nm={lowest:4,low:3,default:2,high:1,highest:0};function uS(e){return t=>new hX(t,e)}const Mp={highest:uS(nm.highest),high:uS(nm.high),default:uS(nm.default),low:uS(nm.low),lowest:uS(nm.lowest)};class hX{constructor(t,n){this.inner=t,this.prec=n}}class r${of(t){return new bk(this,t)}reconfigure(t){return r$.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class bk{constructor(t,n){this.compartment=t,this.inner=n}}class XC{constructor(t,n,s,i,r,a){for(this.base=t,this.compartments=n,this.dynamicSlots=s,this.address=i,this.staticValues=r,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<s.length;)this.statusTemplate.push(0)}staticFacet(t){let n=this.address[t.id];return n==null?t.default:this.staticValues[n>>1]}static resolve(t,n,s){let i=[],r=Object.create(null),a=new Map;for(let _ of q7(t,n,a))_ instanceof Wi?i.push(_):(r[_.facet.id]||(r[_.facet.id]=[])).push(_);let c=Object.create(null),u=[],h=[];for(let _ of i)c[_.id]=h.length<<1,h.push(E=>_.slot(E));let f=s==null?void 0:s.config.facets;for(let _ in r){let E=r[_],v=E[0].facet,b=f&&f[_]||[];if(E.every(y=>y.type==0))if(c[v.id]=u.length<<1|1,vP(b,E))u.push(s.facet(v));else{let y=v.combine(E.map(S=>S.value));u.push(s&&v.compare(y,s.facet(v))?s.facet(v):y)}else{for(let y of E)y.type==0?(c[y.id]=u.length<<1|1,u.push(y.value)):(c[y.id]=h.length<<1,h.push(S=>y.dynamicSlot(S)));c[v.id]=h.length<<1,h.push(y=>Q7(y,v,E))}}let p=h.map(_=>_(c));return new XC(t,a,p,c,u,r)}}function q7(e,t,n){let s=[[],[],[],[],[]],i=new Map;function r(a,c){let u=i.get(a);if(u!=null){if(u<=c)return;let h=s[u].indexOf(a);h>-1&&s[u].splice(h,1),a instanceof bk&&n.delete(a.compartment)}if(i.set(a,c),Array.isArray(a))for(let h of a)r(h,c);else if(a instanceof bk){if(n.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=t.get(a.compartment)||a.inner;n.set(a.compartment,h),r(h,c)}else if(a instanceof hX)r(a.inner,a.prec);else if(a instanceof Wi)s[c].push(a),a.provides&&r(a.provides,c);else if(a instanceof zR)s[c].push(a),a.facet.extensions&&r(a.facet.extensions,nm.default);else{let h=a.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(h,c)}}return r(e,nm.default),s.reduce((a,c)=>a.concat(c))}function GS(e,t){if(t&1)return 2;let n=t>>1,s=e.status[n];if(s==4)throw new Error("Cyclic dependency between fields and/or facets");if(s&2)return s;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function zC(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}const fX=mn.define(),Ok=mn.define({combine:e=>e.some(t=>t),static:!0}),pX=mn.define({combine:e=>e.length?e[0]:void 0,static:!0}),gX=mn.define(),mX=mn.define(),_X=mn.define(),TX=mn.define({combine:e=>e.length?e[0]:!1});class Mh{constructor(t,n){this.type=t,this.value=n}static define(){return new J7}}class J7{of(t){return new Mh(this,t)}}class Z7{constructor(t){this.map=t}of(t){return new Qn(this,t)}}class Qn{constructor(t,n){this.type=t,this.value=n}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new Qn(this.type,n)}is(t){return this.type==t}static define(t={}){return new Z7(t.map||(n=>n))}static mapEffects(t,n){if(!t.length)return t;let s=[];for(let i of t){let r=i.map(n);r&&s.push(r)}return s}}Qn.reconfigure=Qn.define();Qn.appendConfig=Qn.define();class ui{constructor(t,n,s,i,r,a){this.startState=t,this.changes=n,this.selection=s,this.effects=i,this.annotations=r,this.scrollIntoView=a,this._doc=null,this._state=null,s&&dX(s,n.newLength),r.some(c=>c.type==ui.time)||(this.annotations=r.concat(ui.time.of(Date.now())))}static create(t,n,s,i,r,a){return new ui(t,n,s,i,r,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(t){for(let n of this.annotations)if(n.type==t)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(ui.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]=="."))}}ui.time=Mh.define();ui.userEvent=Mh.define();ui.addToHistory=Mh.define();ui.remote=Mh.define();function eJ(e,t){let n=[];for(let s=0,i=0;;){let r,a;if(s<e.length&&(i==t.length||t[i]>=e[s]))r=e[s++],a=e[s++];else if(i<t.length)r=t[i++],a=t[i++];else return n;!n.length||n[n.length-1]<r?n.push(r,a):n[n.length-1]<a&&(n[n.length-1]=a)}}function EX(e,t,n){var s;let i,r,a;return n?(i=t.changes,r=yi.empty(t.changes.length),a=e.changes.compose(t.changes)):(i=t.changes.map(e.changes),r=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(i)),{changes:a,selection:t.selection?t.selection.map(r):(s=e.selection)===null||s===void 0?void 0:s.map(i),effects:Qn.mapEffects(e.effects,i).concat(Qn.mapEffects(t.effects,r)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function Sk(e,t,n){let s=t.selection,i=dE(t.annotations);return t.userEvent&&(i=i.concat(ui.userEvent.of(t.userEvent))),{changes:t.changes instanceof yi?t.changes:yi.of(t.changes||[],n,e.facet(pX)),selection:s&&(s instanceof xt?s:xt.single(s.anchor,s.head)),effects:dE(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function vX(e,t,n){let s=Sk(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let r=1;r<t.length;r++){t[r].filter===!1&&(n=!1);let a=!!t[r].sequential;s=EX(s,Sk(e,t[r],a?s.changes.newLength:e.doc.length),a)}let i=ui.create(e,s.changes,s.selection,s.effects,s.annotations,s.scrollIntoView);return nJ(n?tJ(i):i)}function tJ(e){let t=e.startState,n=!0;for(let i of t.facet(gX)){let r=i(e);if(r===!1){n=!1;break}Array.isArray(r)&&(n=n===!0?r:eJ(n,r))}if(n!==!0){let i,r;if(n===!1)r=e.changes.invertedDesc,i=yi.empty(t.doc.length);else{let a=e.changes.filter(n);i=a.changes,r=a.filtered.mapDesc(a.changes).invertedDesc}e=ui.create(t,i,e.selection&&e.selection.map(r),Qn.mapEffects(e.effects,r),e.annotations,e.scrollIntoView)}let s=t.facet(mX);for(let i=s.length-1;i>=0;i--){let r=s[i](e);r instanceof ui?e=r:Array.isArray(r)&&r.length==1&&r[0]instanceof ui?e=r[0]:e=vX(t,dE(r),!1)}return e}function nJ(e){let t=e.startState,n=t.facet(_X),s=e;for(let i=n.length-1;i>=0;i--){let r=n[i](e);r&&Object.keys(r).length&&(s=EX(s,Sk(t,r,e.changes.newLength),!0))}return s==e?e:ui.create(t,e.changes,e.selection,s.effects,s.annotations,s.scrollIntoView)}const oJ=[];function dE(e){return e==null?oJ:Array.isArray(e)?e:[e]}var ks=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(ks||(ks={}));const sJ=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let yk;try{yk=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function iJ(e){if(yk)return yk.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||sJ.test(n)))return!0}return!1}function rJ(e){return t=>{if(!/\S/.test(t))return ks.Space;if(iJ(t))return ks.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return ks.Word;return ks.Other}}class $o{constructor(t,n,s,i,r,a){this.config=t,this.doc=n,this.selection=s,this.values=i,this.status=t.statusTemplate.slice(),this.computeSlot=r,a&&(a._state=this);for(let c=0;c<this.config.dynamicSlots.length;c++)GS(this,c<<1);this.computeSlot=null}field(t,n=!0){let s=this.config.address[t.id];if(s==null){if(n)throw new RangeError("Field is not present in this state");return}return GS(this,s),zC(this,s)}update(...t){return vX(this,t,!0)}applyTransaction(t){let n=this.config,{base:s,compartments:i}=n;for(let c of t.effects)c.is(r$.reconfigure)?(n&&(i=new Map,n.compartments.forEach((u,h)=>i.set(h,u)),n=null),i.set(c.value.compartment,c.value.extension)):c.is(Qn.reconfigure)?(n=null,s=c.value):c.is(Qn.appendConfig)&&(n=null,s=dE(s).concat(c.value));let r;n?r=t.startState.values.slice():(n=XC.resolve(s,i,this),r=new $o(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(u,h)=>h.reconfigure(u,this),null).values);let a=t.startState.facet(Ok)?t.newSelection:t.newSelection.asSingle();new $o(n,t.newDoc,a,r,(c,u)=>u.update(c,t),t)}replaceSelection(t){return typeof t=="string"&&(t=this.toText(t)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:t},range:xt.cursor(n.from+t.length)}))}changeByRange(t){let n=this.selection,s=t(n.ranges[0]),i=this.changes(s.changes),r=[s.range],a=dE(s.effects);for(let c=1;c<n.ranges.length;c++){let u=t(n.ranges[c]),h=this.changes(u.changes),f=h.map(i);for(let _=0;_<c;_++)r[_]=r[_].map(f);let p=i.mapDesc(h,!0);r.push(u.range.map(p)),i=i.compose(f),a=Qn.mapEffects(a,f).concat(Qn.mapEffects(dE(u.effects),p))}return{changes:i,selection:xt.create(r,n.mainIndex),effects:a}}changes(t=[]){return t instanceof yi?t:yi.of(t,this.doc.length,this.facet($o.lineSeparator))}toText(t){return Fo.of(t.split(this.facet($o.lineSeparator)||_k))}sliceDoc(t=0,n=this.doc.length){return this.doc.sliceString(t,n,this.lineBreak)}facet(t){let n=this.config.address[t.id];return n==null?t.default:(GS(this,n),zC(this,n))}toJSON(t){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let s in t){let i=t[s];i instanceof Wi&&this.config.address[i.id]!=null&&(n[s]=i.spec.toJSON(this.field(t[s]),this))}return n}static fromJSON(t,n={},s){if(!t||typeof t.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(s){for(let r in s)if(Object.prototype.hasOwnProperty.call(t,r)){let a=s[r],c=t[r];i.push(a.init(u=>a.spec.fromJSON(c,u)))}}return $o.create({doc:t.doc,selection:xt.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=XC.resolve(t.extensions||[],new Map),s=t.doc instanceof Fo?t.doc:Fo.of((t.doc||"").split(n.staticFacet($o.lineSeparator)||_k)),i=t.selection?t.selection instanceof xt?t.selection:xt.single(t.selection.anchor,t.selection.head):xt.single(0);return dX(i,s.length),n.staticFacet(Ok)||(i=i.asSingle()),new $o(n,s,i,n.dynamicSlots.map(()=>null),(r,a)=>a.create(r),null)}get tabSize(){return this.facet($o.tabSize)}get lineBreak(){return this.facet($o.lineSeparator)||`
  1830. `}get readOnly(){return this.facet(TX)}phrase(t,...n){for(let s of this.facet($o.phrases))if(Object.prototype.hasOwnProperty.call(s,t)){t=s[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(s,i)=>{if(i=="$")return"$";let r=+(i||1);return!r||r>n.length?s:n[r-1]})),t}languageDataAt(t,n,s=-1){let i=[];for(let r of this.facet(fX))for(let a of r(this,n,s))Object.prototype.hasOwnProperty.call(a,t)&&i.push(a[t]);return i}charCategorizer(t){return rJ(this.languageDataAt("wordChars",t).join(""))}wordAt(t){let{text:n,from:s,length:i}=this.doc.lineAt(t),r=this.charCategorizer(t),a=t-s,c=t-s;for(;a>0;){let u=nr(n,a,!1);if(r(n.slice(u,a))!=ks.Word)break;a=u}for(;c<i;){let u=nr(n,c);if(r(n.slice(c,u))!=ks.Word)break;c=u}return a==c?null:xt.range(a+s,c+s)}}$o.allowMultipleSelections=Ok;$o.tabSize=mn.define({combine:e=>e.length?e[0]:4});$o.lineSeparator=pX;$o.readOnly=TX;$o.phrases=mn.define({compare(e,t){let n=Object.keys(e),s=Object.keys(t);return n.length==s.length&&n.every(i=>e[i]==t[i])}});$o.languageData=fX;$o.changeFilter=gX;$o.transactionFilter=mX;$o.transactionExtender=_X;r$.reconfigure=Qn.define();function od(e,t,n={}){let s={};for(let i of e)for(let r of Object.keys(i)){let a=i[r],c=s[r];if(c===void 0)s[r]=a;else if(!(c===a||a===void 0))if(Object.hasOwnProperty.call(n,r))s[r]=n[r](c,a);else throw new Error("Config merge conflict for field "+r)}for(let i in t)s[i]===void 0&&(s[i]=t[i]);return s}class Cm{eq(t){return this==t}range(t,n=t){return $k.create(t,n,this)}}Cm.prototype.startSide=Cm.prototype.endSide=0;Cm.prototype.point=!1;Cm.prototype.mapMode=tr.TrackDel;let $k=class bX{constructor(t,n,s){this.from=t,this.to=n,this.value=s}static create(t,n,s){return new bX(t,n,s)}};function Ik(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class bP{constructor(t,n,s,i){this.from=t,this.to=n,this.value=s,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(t,n,s,i=0){let r=s?this.to:this.from;for(let a=i,c=r.length;;){if(a==c)return a;let u=a+c>>1,h=r[u]-t||(s?this.value[u].endSide:this.value[u].startSide)-n;if(u==a)return h>=0?a:c;h>=0?c=u:a=u+1}}between(t,n,s,i){for(let r=this.findIndex(n,-1e9,!0),a=this.findIndex(s,1e9,!1,r);r<a;r++)if(i(this.from[r]+t,this.to[r]+t,this.value[r])===!1)return!1}map(t,n){let s=[],i=[],r=[],a=-1,c=-1;for(let u=0;u<this.value.length;u++){let h=this.value[u],f=this.from[u]+t,p=this.to[u]+t,_,E;if(f==p){let v=n.mapPos(f,h.startSide,h.mapMode);if(v==null||(_=E=v,h.startSide!=h.endSide&&(E=n.mapPos(f,h.endSide),E<_)))continue}else if(_=n.mapPos(f,h.startSide),E=n.mapPos(p,h.endSide),_>E||_==E&&h.startSide>0&&h.endSide<=0)continue;(E-_||h.endSide-h.startSide)<0||(a<0&&(a=_),h.point&&(c=Math.max(c,E-_)),s.push(h),i.push(_-a),r.push(E-a))}return{mapped:s.length?new bP(i,r,s,c):null,pos:a}}}class No{constructor(t,n,s,i){this.chunkPos=t,this.chunk=n,this.nextLayer=s,this.maxPoint=i}static create(t,n,s,i){return new No(t,n,s,i)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let n of this.chunk)t+=n.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:n=[],sort:s=!1,filterFrom:i=0,filterTo:r=this.length}=t,a=t.filter;if(n.length==0&&!a)return this;if(s&&(n=n.slice().sort(Ik)),this.isEmpty)return n.length?No.of(n):this;let c=new OX(this,null,-1).goto(0),u=0,h=[],f=new vh;for(;c.value||u<n.length;)if(u<n.length&&(c.from-n[u].from||c.startSide-n[u].value.startSide)>=0){let p=n[u++];f.addInner(p.from,p.to,p.value)||h.push(p)}else c.rangeIndex==1&&c.chunkIndex<this.chunk.length&&(u==n.length||this.chunkEnd(c.chunkIndex)<n[u].from)&&(!a||i>this.chunkEnd(c.chunkIndex)||r<this.chunkPos[c.chunkIndex])&&f.addChunk(this.chunkPos[c.chunkIndex],this.chunk[c.chunkIndex])?c.nextChunk():((!a||i>c.to||r<c.from||a(c.from,c.to,c.value))&&(f.addInner(c.from,c.to,c.value)||h.push($k.create(c.from,c.to,c.value))),c.next());return f.finishInner(this.nextLayer.isEmpty&&!h.length?No.empty:this.nextLayer.update({add:h,filter:a,filterFrom:i,filterTo:r}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],s=[],i=-1;for(let a=0;a<this.chunk.length;a++){let c=this.chunkPos[a],u=this.chunk[a],h=t.touchesRange(c,c+u.length);if(h===!1)i=Math.max(i,u.maxPoint),n.push(u),s.push(t.mapPos(c));else if(h===!0){let{mapped:f,pos:p}=u.map(c,t);f&&(i=Math.max(i,f.maxPoint),n.push(f),s.push(p))}}let r=this.nextLayer.map(t);return n.length==0?r:new No(s,n,r||No.empty,i)}between(t,n,s){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let r=this.chunkPos[i],a=this.chunk[i];if(n>=r&&t<=r+a.length&&a.between(r,t-r,n-r,s)===!1)return}this.nextLayer.between(t,n,s)}}iter(t=0){return hy.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,n=0){return hy.from(t).goto(n)}static compare(t,n,s,i,r=-1){let a=t.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=r),c=n.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=r),u=SF(a,c,s),h=new dS(a,u,r),f=new dS(c,u,r);s.iterGaps((p,_,E)=>yF(h,p,f,_,E,i)),s.empty&&s.length==0&&yF(h,0,f,0,0,i)}static eq(t,n,s=0,i){i==null&&(i=999999999);let r=t.filter(f=>!f.isEmpty&&n.indexOf(f)<0),a=n.filter(f=>!f.isEmpty&&t.indexOf(f)<0);if(r.length!=a.length)return!1;if(!r.length)return!0;let c=SF(r,a),u=new dS(r,c,0).goto(s),h=new dS(a,c,0).goto(s);for(;;){if(u.to!=h.to||!Rk(u.active,h.active)||u.point&&(!h.point||!u.point.eq(h.point)))return!1;if(u.to>i)return!0;u.next(),h.next()}}static spans(t,n,s,i,r=-1){let a=new dS(t,null,r).goto(n),c=n,u=a.openStart;for(;;){let h=Math.min(a.to,s);if(a.point){let f=a.activeForPoint(a.to),p=a.pointFrom<n?f.length+1:a.point.startSide<0?f.length:Math.min(f.length,u);i.point(c,h,a.point,f,p,a.pointRank),u=Math.min(a.openEnd(h),f.length)}else h>c&&(i.span(c,h,a.active,u),u=a.openEnd(h));if(a.to>s)return u+(a.point&&a.to>s?1:0);c=a.to,a.next()}}static of(t,n=!1){let s=new vh;for(let i of t instanceof $k?[t]:n?lJ(t):t)s.add(i.from,i.to,i.value);return s.finish()}static join(t){if(!t.length)return No.empty;let n=t[t.length-1];for(let s=t.length-2;s>=0;s--)for(let i=t[s];i!=No.empty;i=i.nextLayer)n=new No(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}No.empty=new No([],[],null,-1);function lJ(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let s=e[n];if(Ik(t,s)>0)return e.slice().sort(Ik);t=s}return e}No.empty.nextLayer=No.empty;class vh{finishChunk(t){this.chunks.push(new bP(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,n,s){this.addInner(t,n,s)||(this.nextLayer||(this.nextLayer=new vh)).add(t,n,s)}addInner(t,n,s){let i=t-this.lastTo||s.startSide-this.last.endSide;if(i<=0&&(t-this.lastFrom||s.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(n-this.chunkStart),this.last=s,this.lastFrom=t,this.lastTo=n,this.value.push(s),s.point&&(this.maxPoint=Math.max(this.maxPoint,n-t)),!0)}addChunk(t,n){if((t-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(t);let s=n.value.length-1;return this.last=n.value[s],this.lastFrom=n.from[s]+t,this.lastTo=n.to[s]+t,!0}finish(){return this.finishInner(No.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return t;let n=No.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,n}}function SF(e,t,n){let s=new Map;for(let r of e)for(let a=0;a<r.chunk.length;a++)r.chunk[a].maxPoint<=0&&s.set(r.chunk[a],r.chunkPos[a]);let i=new Set;for(let r of t)for(let a=0;a<r.chunk.length;a++){let c=s.get(r.chunk[a]);c!=null&&(n?n.mapPos(c):c)==r.chunkPos[a]&&!(n!=null&&n.touchesRange(c,c+r.chunk[a].length))&&i.add(r.chunk[a])}return i}class OX{constructor(t,n,s,i=0){this.layer=t,this.skip=n,this.minPoint=s,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,n,!1),this}gotoInner(t,n,s){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<t||i.maxPoint<this.minPoint))break;this.chunkIndex++,s=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],n,!0);(!s||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(t,n){(this.to-t||this.endSide-n)<0&&this.gotoInner(t,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let t=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],s=t+n.from[this.rangeIndex];if(this.from=s,this.to=t+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class hy{constructor(t){this.heap=t}static from(t,n=null,s=-1){let i=[];for(let r=0;r<t.length;r++)for(let a=t[r];!a.isEmpty;a=a.nextLayer)a.maxPoint>=s&&i.push(new OX(a,n,s,r));return i.length==1?i[0]:new hy(i)}get startSide(){return this.value?this.value.startSide:0}goto(t,n=-1e9){for(let s of this.heap)s.goto(t,n);for(let s=this.heap.length>>1;s>=0;s--)UL(this.heap,s);return this.next(),this}forward(t,n){for(let s of this.heap)s.forward(t,n);for(let s=this.heap.length>>1;s>=0;s--)UL(this.heap,s);(this.to-t||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 t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),UL(this.heap,0)}}}function UL(e,t){for(let n=e[t];;){let s=(t<<1)+1;if(s>=e.length)break;let i=e[s];if(s+1<e.length&&i.compare(e[s+1])>=0&&(i=e[s+1],s++),n.compare(i)<0)break;e[s]=n,e[t]=i,t=s}}class dS{constructor(t,n,s){this.minPoint=s,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=hy.from(t,n,s)}goto(t,n=-1e9){return this.cursor.goto(t,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=n,this.openStart=-1,this.next(),this}forward(t,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(t,n)}removeActive(t){D0(this.active,t),D0(this.activeTo,t),D0(this.activeRank,t),this.minActive=$F(this.active,this.activeTo)}addActive(t){let n=0,{value:s,to:i,rank:r}=this.cursor;for(;n<this.activeRank.length&&(r-this.activeRank[n]||i-this.activeTo[n])>0;)n++;x0(this.active,n,s),x0(this.activeTo,n,i),x0(this.activeRank,n,r),t&&x0(t,n,this.cursor.from),this.minActive=$F(this.active,this.activeTo)}next(){let t=this.to,n=this.point;this.point=null;let s=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>t){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),s&&D0(s,i)}else if(this.cursor.value)if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(s),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=r,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=r.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(s){this.openStart=0;for(let i=s.length-1;i>=0&&s[i]<t;i--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let n=[];for(let s=this.active.length-1;s>=0&&!(this.activeRank[s]<this.pointRank);s--)(this.activeTo[s]>t||this.activeTo[s]==t&&this.active[s].endSide>=this.point.endSide)&&n.push(this.active[s]);return n.reverse()}openEnd(t){let n=0;for(let s=this.activeTo.length-1;s>=0&&this.activeTo[s]>t;s--)n++;return n}}function yF(e,t,n,s,i,r){e.goto(t),n.goto(s);let a=s+i,c=s,u=s-t;for(;;){let h=e.to+u-n.to,f=h||e.endSide-n.endSide,p=f<0?e.to+u:n.to,_=Math.min(p,a);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&Rk(e.activeForPoint(e.to),n.activeForPoint(n.to))||r.comparePoint(c,_,e.point,n.point):_>c&&!Rk(e.active,n.active)&&r.compareRange(c,_,e.active,n.active),p>a)break;(h||e.openEnd!=n.openEnd)&&r.boundChange&&r.boundChange(p),c=p,f<=0&&e.next(),f>=0&&n.next()}}function Rk(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!e[n].eq(t[n]))return!1;return!0}function D0(e,t){for(let n=t,s=e.length-1;n<s;n++)e[n]=e[n+1];e.pop()}function x0(e,t,n){for(let s=e.length-1;s>=t;s--)e[s+1]=e[s];e[t]=n}function $F(e,t){let n=-1,s=1e9;for(let i=0;i<t.length;i++)(t[i]-s||e[i].endSide-e[n].endSide)<0&&(n=i,s=t[i]);return n}function sv(e,t,n=e.length){let s=0;for(let i=0;i<n;)e.charCodeAt(i)==9?(s+=t-s%t,i++):(s++,i=nr(e,i));return s}function Ck(e,t,n,s){for(let i=0,r=0;;){if(r>=t)return i;if(i==e.length)break;r+=e.charCodeAt(i)==9?n-r%n:1,i=nr(e,i)}return s===!0?-1:e.length}const Mk="ͼ",IF=typeof Symbol>"u"?"__"+Mk:Symbol.for(Mk),Ak=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),RF=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class pp{constructor(t,n){this.rules=[];let{finish:s}=n||{};function i(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function r(a,c,u,h){let f=[],p=/^@(\w+)\b/.exec(a[0]),_=p&&p[1]=="keyframes";if(p&&c==null)return u.push(a[0]+";");for(let E in c){let v=c[E];if(/&/.test(E))r(E.split(/,\s*/).map(b=>a.map(y=>b.replace(/&/,y))).reduce((b,y)=>b.concat(y)),v,u);else if(v&&typeof v=="object"){if(!p)throw new RangeError("The value of a property ("+E+") should be a primitive value.");r(i(E),v,f,_)}else v!=null&&f.push(E.replace(/_.*/,"").replace(/[A-Z]/g,b=>"-"+b.toLowerCase())+": "+v+";")}(f.length||_)&&u.push((s&&!p&&!h?a.map(s):a).join(", ")+" {"+f.join(" ")+"}")}for(let a in t)r(i(a),t[a],this.rules)}getRules(){return this.rules.join(`
  1831. `)}static newName(){let t=RF[IF]||1;return RF[IF]=t+1,Mk+t.toString(36)}static mount(t,n,s){let i=t[Ak],r=s&&s.nonce;i?r&&i.setNonce(r):i=new aJ(t,r),i.mount(Array.isArray(n)?n:[n],t)}}let CF=new Map;class aJ{constructor(t,n){let s=t.ownerDocument||t,i=s.defaultView;if(!t.head&&t.adoptedStyleSheets&&i.CSSStyleSheet){let r=CF.get(s);if(r)return t[Ak]=r;this.sheet=new i.CSSStyleSheet,CF.set(s,this)}else this.styleTag=s.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],t[Ak]=this}mount(t,n){let s=this.sheet,i=0,r=0;for(let a=0;a<t.length;a++){let c=t[a],u=this.modules.indexOf(c);if(u<r&&u>-1&&(this.modules.splice(u,1),r--,u=-1),u==-1){if(this.modules.splice(r++,0,c),s)for(let h=0;h<c.rules.length;h++)s.insertRule(c.rules[h],i++)}else{for(;r<u;)i+=this.modules[r++].rules.length;i+=c.rules.length,r++}}if(s)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let a="";for(let u=0;u<this.modules.length;u++)a+=this.modules[u].getRules()+`
  1832. `;this.styleTag.textContent=a;let c=n.head||n;this.styleTag.parentNode!=c&&c.insertBefore(this.styleTag,c.firstChild)}}setNonce(t){this.styleTag&&this.styleTag.getAttribute("nonce")!=t&&this.styleTag.setAttribute("nonce",t)}}var gp={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},fy={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},cJ=typeof navigator<"u"&&/Mac/.test(navigator.platform),uJ=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var er=0;er<10;er++)gp[48+er]=gp[96+er]=String(er);for(var er=1;er<=24;er++)gp[er+111]="F"+er;for(var er=65;er<=90;er++)gp[er]=String.fromCharCode(er+32),fy[er]=String.fromCharCode(er);for(var HL in gp)fy.hasOwnProperty(HL)||(fy[HL]=gp[HL]);function dJ(e){var t=cJ&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||uJ&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?fy:gp)[e.keyCode]||e.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 py(e){let t;return e.nodeType==11?t=e.getSelection?e:e.ownerDocument:t=e,t.getSelection()}function Lk(e,t){return t?e==t||e.contains(t.nodeType!=1?t.parentNode:t):!1}function YR(e,t){if(!t.anchorNode)return!1;try{return Lk(e,t.anchorNode)}catch{return!1}}function CE(e){return e.nodeType==3?Am(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function WS(e,t,n,s){return n?MF(e,t,n,s,-1)||MF(e,t,n,s,1):!1}function Mm(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function YC(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function MF(e,t,n,s,i){for(;;){if(e==n&&t==s)return!0;if(t==(i<0?0:Qu(e))){if(e.nodeName=="DIV")return!1;let r=e.parentNode;if(!r||r.nodeType!=1)return!1;t=Mm(e)+(i<0?0:1),e=r}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.nodeType==1&&e.contentEditable=="false")return!1;t=i<0?Qu(e):0}else return!1}}function Qu(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function l$(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function hJ(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function SX(e,t){let n=t.width/e.offsetWidth,s=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(s>.995&&s<1.005||!isFinite(s)||Math.abs(t.height-e.offsetHeight)<1)&&(s=1),{scaleX:n,scaleY:s}}function fJ(e,t,n,s,i,r,a,c){let u=e.ownerDocument,h=u.defaultView||window;for(let f=e,p=!1;f&&!p;)if(f.nodeType==1){let _,E=f==u.body,v=1,b=1;if(E)_=hJ(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(f).position)&&(p=!0),f.scrollHeight<=f.clientHeight&&f.scrollWidth<=f.clientWidth){f=f.assignedSlot||f.parentNode;continue}let L=f.getBoundingClientRect();({scaleX:v,scaleY:b}=SX(f,L)),_={left:L.left,right:L.left+f.clientWidth*v,top:L.top,bottom:L.top+f.clientHeight*b}}let y=0,S=0;if(i=="nearest")t.top<_.top?(S=-(_.top-t.top+a),n>0&&t.bottom>_.bottom+S&&(S=t.bottom-_.bottom+S+a)):t.bottom>_.bottom&&(S=t.bottom-_.bottom+a,n<0&&t.top-S<_.top&&(S=-(_.top+S-t.top+a)));else{let L=t.bottom-t.top,I=_.bottom-_.top;S=(i=="center"&&L<=I?t.top+L/2-I/2:i=="start"||i=="center"&&n<0?t.top-a:t.bottom-I+a)-_.top}if(s=="nearest"?t.left<_.left?(y=-(_.left-t.left+r),n>0&&t.right>_.right+y&&(y=t.right-_.right+y+r)):t.right>_.right&&(y=t.right-_.right+r,n<0&&t.left<_.left+y&&(y=-(_.left+y-t.left+r))):y=(s=="center"?t.left+(t.right-t.left)/2-(_.right-_.left)/2:s=="start"==c?t.left-r:t.right-(_.right-_.left)+r)-_.left,y||S)if(E)h.scrollBy(y,S);else{let L=0,I=0;if(S){let R=f.scrollTop;f.scrollTop+=S/b,I=(f.scrollTop-R)*b}if(y){let R=f.scrollLeft;f.scrollLeft+=y/v,L=(f.scrollLeft-R)*v}t={left:t.left-L,top:t.top-I,right:t.right-L,bottom:t.bottom-I},L&&Math.abs(L-y)<1&&(s="nearest"),I&&Math.abs(I-S)<1&&(i="nearest")}if(E)break;f=f.assignedSlot||f.parentNode}else if(f.nodeType==11)f=f.host;else break}function pJ(e){let t=e.ownerDocument,n,s;for(let i=e.parentNode;i&&!(i==t.body||n&&s);)if(i.nodeType==1)!s&&i.scrollHeight>i.clientHeight&&(s=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:s}}class gJ{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:n,focusNode:s}=t;this.set(n,Math.min(t.anchorOffset,n?Qu(n):0),s,Math.min(t.focusOffset,s?Qu(s):0))}set(t,n,s,i){this.anchorNode=t,this.anchorOffset=n,this.focusNode=s,this.focusOffset=i}}let xT=null;function yX(e){if(e.setActive)return e.setActive();if(xT)return e.focus(xT);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(xT==null?{get preventScroll(){return xT={preventScroll:!0},!0}}:void 0),!xT){xT=!1;for(let n=0;n<t.length;){let s=t[n++],i=t[n++],r=t[n++];s.scrollTop!=i&&(s.scrollTop=i),s.scrollLeft!=r&&(s.scrollLeft=r)}}}let AF;function Am(e,t,n=t){let s=AF||(AF=document.createRange());return s.setEnd(e,n),s.setStart(e,t),s}function hE(e,t,n,s){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};s&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=s);let r=new KeyboardEvent("keydown",i);r.synthetic=!0,e.dispatchEvent(r);let a=new KeyboardEvent("keyup",i);return a.synthetic=!0,e.dispatchEvent(a),r.defaultPrevented||a.defaultPrevented}function mJ(e){for(;e;){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function $X(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}function _J(e,t){let n=t.focusNode,s=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=s)return!1;for(s=Math.min(s,Qu(n));;)if(s){if(n.nodeType!=1)return!1;let i=n.childNodes[s-1];i.contentEditable=="false"?s--:(n=i,s=Qu(n))}else{if(n==e)return!0;s=Mm(n),n=n.parentNode}}function IX(e){return e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function RX(e,t){for(let n=e,s=t;;){if(n.nodeType==3&&s>0)return{node:n,offset:s};if(n.nodeType==1&&s>0){if(n.contentEditable=="false")return null;n=n.childNodes[s-1],s=Qu(n)}else if(n.parentNode&&!YC(n))s=Mm(n),n=n.parentNode;else return null}}function CX(e,t){for(let n=e,s=t;;){if(n.nodeType==3&&s<n.nodeValue.length)return{node:n,offset:s};if(n.nodeType==1&&s<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[s],s=0}else if(n.parentNode&&!YC(n))s=Mm(n)+1,n=n.parentNode;else return null}}class Ar{constructor(t,n,s=!0){this.node=t,this.offset=n,this.precise=s}static before(t,n){return new Ar(t.parentNode,Mm(t),n)}static after(t,n){return new Ar(t.parentNode,Mm(t)+1,n)}}const OP=[];class hs{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(t){let n=this.posAtStart;for(let s of this.children){if(s==t)return n;n+=s.length+s.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}sync(t,n){if(this.flags&2){let s=this.dom,i=null,r;for(let a of this.children){if(a.flags&7){if(!a.dom&&(r=i?i.nextSibling:s.firstChild)){let c=hs.get(r);(!c||!c.parent&&c.canReuseDOM(a))&&a.reuseDOM(r)}a.sync(t,n),a.flags&=-8}if(r=i?i.nextSibling:s.firstChild,n&&!n.written&&n.node==s&&r!=a.dom&&(n.written=!0),a.dom.parentNode==s)for(;r&&r!=a.dom;)r=LF(r);else s.insertBefore(a.dom,r);i=a.dom}for(r=i?i.nextSibling:s.firstChild,r&&n&&n.node==s&&(n.written=!0);r;)r=LF(r)}else if(this.flags&1)for(let s of this.children)s.flags&7&&(s.sync(t,n),s.flags&=-8)}reuseDOM(t){}localPosFromDOM(t,n){let s;if(t==this.dom)s=this.dom.childNodes[n];else{let i=Qu(t)==0?0:n==0?-1:1;for(;;){let r=t.parentNode;if(r==this.dom)break;i==0&&r.firstChild!=r.lastChild&&(t==r.firstChild?i=-1:i=1),t=r}i<0?s=t:s=t.nextSibling}if(s==this.dom.firstChild)return 0;for(;s&&!hs.get(s);)s=s.nextSibling;if(!s)return this.length;for(let i=0,r=0;;i++){let a=this.children[i];if(a.dom==s)return r;r+=a.length+a.breakAfter}}domBoundsAround(t,n,s=0){let i=-1,r=-1,a=-1,c=-1;for(let u=0,h=s,f=s;u<this.children.length;u++){let p=this.children[u],_=h+p.length;if(h<t&&_>n)return p.domBoundsAround(t,n,h);if(_>=t&&i==-1&&(i=u,r=h),h>n&&p.dom.parentNode==this.dom){a=u,c=f;break}f=_,h=_+p.breakAfter}return{from:r,to:c<0?s+this.length:c,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a<this.children.length&&a>=0?this.children[a].dom:null}}markDirty(t=!1){this.flags|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let n=this.parent;n;n=n.parent){if(t&&(n.flags|=2),n.flags&1)return;n.flags|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,this.flags&7&&this.markParentsDirty(!0))}setDOM(t){this.dom!=t&&(this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this)}get rootView(){for(let t=this;;){let n=t.parent;if(!n)return t;t=n}}replaceChildren(t,n,s=OP){this.markDirty();for(let i=t;i<n;i++){let r=this.children[i];r.parent==this&&s.indexOf(r)<0&&r.destroy()}s.length<250?this.children.splice(t,n-t,...s):this.children=[].concat(this.children.slice(0,t),s,this.children.slice(n));for(let i=0;i<s.length;i++)s[i].setParent(this)}ignoreMutation(t){return!1}ignoreEvent(t){return!1}childCursor(t=this.length){return new MX(this.children,t,this.children.length)}childPos(t,n=1){return this.childCursor().findPos(t,n)}toString(){let t=this.constructor.name.replace("View","");return t+(this.children.length?"("+this.children.join()+")":this.length?"["+(t=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(t){return t.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(t,n,s,i,r,a){return!1}become(t){return!1}canReuseDOM(t){return t.constructor==this.constructor&&!((this.flags|t.flags)&8)}getSide(){return 0}destroy(){for(let t of this.children)t.parent==this&&t.destroy();this.parent=null}}hs.prototype.breakAfter=0;function LF(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class MX{constructor(t,n,s){this.children=t,this.pos=n,this.i=s,this.off=0}findPos(t,n=1){for(;;){if(t>this.pos||t==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let s=this.children[--this.i];this.pos-=s.length+s.breakAfter}}}function AX(e,t,n,s,i,r,a,c,u){let{children:h}=e,f=h.length?h[t]:null,p=r.length?r[r.length-1]:null,_=p?p.breakAfter:a;if(!(t==s&&f&&!a&&!_&&r.length<2&&f.merge(n,i,r.length?p:null,n==0,c,u))){if(s<h.length){let E=h[s];E&&(i<E.length||E.breakAfter&&(p!=null&&p.breakAfter))?(t==s&&(E=E.split(i),i=0),!_&&p&&E.merge(0,i,p,!0,0,u)?r[r.length-1]=E:((i||E.children.length&&!E.children[0].length)&&E.merge(0,i,null,!1,0,u),r.push(E))):E!=null&&E.breakAfter&&(p?p.breakAfter=1:a=1),s++}for(f&&(f.breakAfter=a,n>0&&(!a&&r.length&&f.merge(n,f.length,r[0],!1,c,0)?f.breakAfter=r.shift().breakAfter:(n<f.length||f.children.length&&f.children[f.children.length-1].length==0)&&f.merge(n,f.length,null,!1,c,0),t++));t<s&&r.length;)if(h[s-1].become(r[r.length-1]))s--,r.pop(),u=r.length?0:c;else if(h[t].become(r[0]))t++,r.shift(),c=r.length?0:u;else break;!r.length&&t&&s<h.length&&!h[t-1].breakAfter&&h[s].merge(0,0,h[t-1],!1,c,u)&&t--,(t<s||r.length)&&e.replaceChildren(t,s,r)}}function LX(e,t,n,s,i,r){let a=e.childCursor(),{i:c,off:u}=a.findPos(n,1),{i:h,off:f}=a.findPos(t,-1),p=t-n;for(let _ of s)p+=_.length;e.length+=p,AX(e,h,f,c,u,s,0,i,r)}let Ll=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},wk=typeof document<"u"?document:{documentElement:{style:{}}};const kk=/Edge\/(\d+)/.exec(Ll.userAgent),wX=/MSIE \d/.test(Ll.userAgent),Nk=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ll.userAgent),rA=!!(wX||Nk||kk),wF=!rA&&/gecko\/(\d+)/i.test(Ll.userAgent),VL=!rA&&/Chrome\/(\d+)/.exec(Ll.userAgent),kF="webkitFontSmoothing"in wk.documentElement.style,kX=!rA&&/Apple Computer/.test(Ll.vendor),NF=kX&&(/Mobile\/\w+/.test(Ll.userAgent)||Ll.maxTouchPoints>2);var _n={mac:NF||/Mac/.test(Ll.platform),windows:/Win/.test(Ll.platform),linux:/Linux|X11/.test(Ll.platform),ie:rA,ie_version:wX?wk.documentMode||6:Nk?+Nk[1]:kk?+kk[1]:0,gecko:wF,gecko_version:wF?+(/Firefox\/(\d+)/.exec(Ll.userAgent)||[0,0])[1]:0,chrome:!!VL,chrome_version:VL?+VL[1]:0,ios:NF,android:/Android\b/.test(Ll.userAgent),webkit:kF,safari:kX,webkit_version:kF?+(/\bAppleWebKit\/(\d+)/.exec(Ll.userAgent)||[0,0])[1]:0,tabSize:wk.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const TJ=256;class Wc extends hs{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){t.nodeType==3&&this.createDOM(t)}merge(t,n,s){return this.flags&8||s&&(!(s instanceof Wc)||this.length-(n-t)+s.length>TJ||s.flags&8)?!1:(this.text=this.text.slice(0,t)+(s?s.text:"")+this.text.slice(n),this.markDirty(),!0)}split(t){let n=new Wc(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(t,n){return t==this.dom?n:n?this.text.length:0}domAtPos(t){return new Ar(this.dom,t)}domBoundsAround(t,n,s){return{from:s,to:s+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,n){return EJ(this.dom,t,n)}}class bh extends hs{constructor(t,n=[],s=0){super(),this.mark=t,this.children=n,this.length=s;for(let i of n)i.setParent(this)}setAttrs(t){if($X(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)t.setAttribute(n,this.mark.attrs[n]);return t}canReuseDOM(t){return super.canReuseDOM(t)&&!((this.flags|t.flags)&8)}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.flags|=6)}sync(t,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t,n)}merge(t,n,s,i,r,a){return s&&(!(s instanceof bh&&s.mark.eq(this.mark))||t&&r<=0||n<this.length&&a<=0)?!1:(LX(this,t,n,s?s.children.slice():[],r-1,a-1),this.markDirty(),!0)}split(t){let n=[],s=0,i=-1,r=0;for(let c of this.children){let u=s+c.length;u>t&&n.push(s<t?c.split(t-s):c),i<0&&s>=t&&(i=r),s=u,r++}let a=this.length-t;return this.length=t,i>-1&&(this.children.length=i,this.markDirty()),new bh(this.mark,n,a)}domAtPos(t){return NX(this,t)}coordsAt(t,n){return DX(this,t,n)}}function EJ(e,t,n){let s=e.nodeValue.length;t>s&&(t=s);let i=t,r=t,a=0;t==0&&n<0||t==s&&n>=0?_n.chrome||_n.gecko||(t?(i--,a=1):r<s&&(r++,a=-1)):n<0?i--:r<s&&r++;let c=Am(e,i,r).getClientRects();if(!c.length)return null;let u=c[(a?a<0:n>=0)?0:c.length-1];return _n.safari&&!a&&u.width==0&&(u=Array.prototype.find.call(c,h=>h.width)||u),a?l$(u,a<0):u||null}class np extends hs{static create(t,n,s){return new np(t,n,s)}constructor(t,n,s){super(),this.widget=t,this.length=n,this.side=s,this.prevWidget=null}split(t){let n=np.create(this.widget,this.length-t,this.side);return this.length-=t,n}sync(t){(!this.dom||!this.widget.updateDOM(this.dom,t))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(t,n,s,i,r,a){return s&&(!(s instanceof np)||!this.widget.compare(s.widget)||t>0&&r<=0||n<this.length&&a<=0)?!1:(this.length=t+(s?s.length:0)+(this.length-n),!0)}become(t){return t instanceof np&&t.side==this.side&&this.widget.constructor==t.widget.constructor?(this.widget.compare(t.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get overrideDOMText(){if(this.length==0)return Fo.empty;let t=this;for(;t.parent;)t=t.parent;let{view:n}=t,s=n&&n.state.doc,i=this.posAtStart;return s?s.slice(i,i+this.length):Fo.empty}domAtPos(t){return(this.length?t==0:this.side>0)?Ar.before(this.dom):Ar.after(this.dom,t==this.length)}domBoundsAround(){return null}coordsAt(t,n){let s=this.widget.coordsAt(this.dom,t,n);if(s)return s;let i=this.dom.getClientRects(),r=null;if(!i.length)return null;let a=this.side?this.side<0:t>0;for(let c=a?i.length-1:0;r=i[c],!(t>0?c==0:c==i.length-1||r.top<r.bottom);c+=a?-1:1);return l$(r,!a)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class ME extends hs{constructor(t){super(),this.side=t}get length(){return 0}merge(){return!1}become(t){return t instanceof ME&&t.side==this.side}split(){return new ME(this.side)}sync(){if(!this.dom){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),this.setDOM(t)}}getSide(){return this.side}domAtPos(t){return this.side>0?Ar.before(this.dom):Ar.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Fo.empty}get isHidden(){return!0}}Wc.prototype.children=np.prototype.children=ME.prototype.children=OP;function NX(e,t){let n=e.dom,{children:s}=e,i=0;for(let r=0;i<s.length;i++){let a=s[i],c=r+a.length;if(!(c==r&&a.getSide()<=0)){if(t>r&&t<c&&a.dom.parentNode==n)return a.domAtPos(t-r);if(t<=r)break;r=c}}for(let r=i;r>0;r--){let a=s[r-1];if(a.dom.parentNode==n)return a.domAtPos(a.length)}for(let r=i;r<s.length;r++){let a=s[r];if(a.dom.parentNode==n)return a.domAtPos(0)}return new Ar(n,0)}function PX(e,t,n){let s,{children:i}=e;n>0&&t instanceof bh&&i.length&&(s=i[i.length-1])instanceof bh&&s.mark.eq(t.mark)?PX(s,t.children[0],n-1):(i.push(t),t.setParent(e)),e.length+=t.length}function DX(e,t,n){let s=null,i=-1,r=null,a=-1;function c(h,f){for(let p=0,_=0;p<h.children.length&&_<=f;p++){let E=h.children[p],v=_+E.length;v>=f&&(E.children.length?c(E,f-_):(!r||r.isHidden&&n>0)&&(v>f||_==v&&E.getSide()>0)?(r=E,a=f-_):(_<f||_==v&&E.getSide()<0&&!E.isHidden)&&(s=E,i=f-_)),_=v}}c(e,t);let u=(n<0?s:r)||s||r;return u?u.coordsAt(Math.max(0,u==s?i:a),n):vJ(e)}function vJ(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=CE(t);return n[n.length-1]||null}function Pk(e,t){for(let n in e)n=="class"&&t.class?t.class+=" "+e.class:n=="style"&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}const PF=Object.create(null);function KC(e,t,n){if(e==t)return!0;e||(e=PF),t||(t=PF);let s=Object.keys(e),i=Object.keys(t);if(s.length-(n&&s.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let r of s)if(r!=n&&(i.indexOf(r)==-1||e[r]!==t[r]))return!1;return!0}function Dk(e,t,n){let s=!1;if(t)for(let i in t)n&&i in n||(s=!0,i=="style"?e.style.cssText="":e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(s=!0,i=="style"?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return s}function bJ(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let s=e.attributes[n];t[s.name]=s.value}return t}class sd{eq(t){return!1}updateDOM(t,n){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(t){return!0}coordsAt(t,n,s){return null}get isHidden(){return!1}get editable(){return!1}destroy(t){}}var sl=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(sl||(sl={}));class wn extends Cm{constructor(t,n,s,i){super(),this.startSide=t,this.endSide=n,this.widget=s,this.spec=i}get heightRelevant(){return!1}static mark(t){return new a$(t)}static widget(t){let n=Math.max(-1e4,Math.min(1e4,t.side||0)),s=!!t.block;return n+=s&&!t.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new mp(t,n,n,s,t.widget||null,!1)}static replace(t){let n=!!t.block,s,i;if(t.isBlockGap)s=-5e8,i=4e8;else{let{start:r,end:a}=xX(t,n);s=(r?n?-3e8:-1:5e8)-1,i=(a?n?2e8:1:-6e8)+1}return new mp(t,s,i,n,t.widget||null,!0)}static line(t){return new c$(t)}static set(t,n=!1){return No.of(t,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}wn.none=No.empty;class a$ extends wn{constructor(t){let{start:n,end:s}=xX(t);super(n?-1:5e8,s?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){var n,s;return this==t||t instanceof a$&&this.tagName==t.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(t.class||((s=t.attrs)===null||s===void 0?void 0:s.class))&&KC(this.attrs,t.attrs,"class")}range(t,n=t){if(t>=n)throw new RangeError("Mark decorations may not be empty");return super.range(t,n)}}a$.prototype.point=!1;class c$ extends wn{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof c$&&this.spec.class==t.spec.class&&KC(this.spec.attributes,t.spec.attributes)}range(t,n=t){if(n!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,n)}}c$.prototype.mapMode=tr.TrackBefore;c$.prototype.point=!0;class mp extends wn{constructor(t,n,s,i,r,a){super(n,s,r,t),this.block=i,this.isReplace=a,this.mapMode=i?n<=0?tr.TrackBefore:tr.TrackAfter:tr.TrackDel}get type(){return this.startSide!=this.endSide?sl.WidgetRange:this.startSide<=0?sl.WidgetBefore:sl.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof mp&&OJ(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,n=t){if(this.isReplace&&(t>n||t==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,n)}}mp.prototype.point=!0;function xX(e,t=!1){let{inclusiveStart:n,inclusiveEnd:s}=e;return n==null&&(n=e.inclusive),s==null&&(s=e.inclusive),{start:n??t,end:s??t}}function OJ(e,t){return e==t||!!(e&&t&&e.compare(t))}function KR(e,t,n,s=0){let i=n.length-1;i>=0&&n[i]+s>=e?n[i]=Math.max(n[i],t):n.push(e,t)}class ai extends hs{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,n,s,i,r,a){if(s){if(!(s instanceof ai))return!1;this.dom||s.transferDOM(this)}return i&&this.setDeco(s?s.attrs:null),LX(this,t,n,s?s.children.slice():[],r,a),!0}split(t){let n=new ai;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:s,off:i}=this.childPos(t);i&&(n.append(this.children[s].split(i),0),this.children[s].merge(i,this.children[s].length,null,!1,0,0),s++);for(let r=s;r<this.children.length;r++)n.append(this.children[r],0);for(;s>0&&this.children[s-1].length==0;)this.children[--s].destroy();return this.children.length=s,this.markDirty(),this.length=t,n}transferDOM(t){this.dom&&(this.markDirty(),t.setDOM(this.dom),t.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){KC(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,n){PX(this,t,n)}addLineDeco(t){let n=t.spec.attributes,s=t.spec.class;n&&(this.attrs=Pk(n,this.attrs||{})),s&&(this.attrs=Pk({class:s},this.attrs||{}))}domAtPos(t){return NX(this,t)}reuseDOM(t){t.nodeName=="DIV"&&(this.setDOM(t),this.flags|=6)}sync(t,n){var s;this.dom?this.flags&4&&($X(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&&(Dk(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t,n);let i=this.dom.lastChild;for(;i&&hs.get(i)instanceof bh;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((s=hs.get(i))===null||s===void 0?void 0:s.isEditable)==!1&&(!_n.ios||!this.children.some(r=>r instanceof Wc))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let t=0,n;for(let s of this.children){if(!(s instanceof Wc)||/[^ -~]/.test(s.text))return null;let i=CE(s.dom);if(i.length!=1)return null;t+=i[0].width,n=i[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:n}:null}coordsAt(t,n){let s=DX(this,t,n);if(!this.children.length&&s&&this.parent){let{heightOracle:i}=this.parent.view.viewState,r=s.bottom-s.top;if(Math.abs(r-i.lineHeight)<2&&i.textHeight<r){let a=(r-i.textHeight)/2;return{top:s.top+a,bottom:s.bottom-a,left:s.left,right:s.left}}}return s}become(t){return t instanceof ai&&this.children.length==0&&t.children.length==0&&KC(this.attrs,t.attrs)&&this.breakAfter==t.breakAfter}covers(){return!0}static find(t,n){for(let s=0,i=0;s<t.children.length;s++){let r=t.children[s],a=i+r.length;if(a>=n){if(r instanceof ai)return r;if(a>n)break}i=a+r.breakAfter}return null}}class _h extends hs{constructor(t,n,s){super(),this.widget=t,this.length=n,this.deco=s,this.breakAfter=0,this.prevWidget=null}merge(t,n,s,i,r,a){return s&&(!(s instanceof _h)||!this.widget.compare(s.widget)||t>0&&r<=0||n<this.length&&a<=0)?!1:(this.length=t+(s?s.length:0)+(this.length-n),!0)}domAtPos(t){return t==0?Ar.before(this.dom):Ar.after(this.dom,t==this.length)}split(t){let n=this.length-t;this.length=t;let s=new _h(this.widget,n,this.deco);return s.breakAfter=this.breakAfter,s}get children(){return OP}sync(t){(!this.dom||!this.widget.updateDOM(this.dom,t))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Fo.empty}domBoundsAround(){return null}become(t){return t instanceof _h&&t.widget.constructor==this.widget.constructor?(t.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,this.deco=t.deco,this.breakAfter=t.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(t,n){let s=this.widget.coordsAt(this.dom,t,n);return s||(this.widget instanceof xk?null:l$(this.dom.getBoundingClientRect(),this.length?t==0:n<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(t){let{startSide:n,endSide:s}=this.deco;return n==s?!1:t<0?n<0:s>0}}class xk extends sd{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class XS{constructor(t,n,s,i){this.doc=t,this.pos=n,this.end=s,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let t=this.content[this.content.length-1];return!(t.breakAfter||t instanceof _h&&t.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new ai),this.atCursorPos=!0),this.curLine}flushBuffer(t=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(B0(new ME(-1),t),t.length),this.pendingBuffer=0)}addBlockWidget(t){this.flushBuffer(),this.curLine=null,this.content.push(t)}finish(t){this.pendingBuffer&&t<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(t&&this.content.length&&this.content[this.content.length-1]instanceof _h)&&this.getLine()}buildText(t,n,s){for(;t>0;){if(this.textOff==this.text.length){let{value:r,lineBreak:a,done:c}=this.cursor.next(this.skip);if(this.skip=0,c)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,t--;continue}else this.text=r,this.textOff=0}let i=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(n.slice(n.length-s)),this.getLine().append(B0(new Wc(this.text.slice(this.textOff,this.textOff+i)),n),s),this.atCursorPos=!0,this.textOff+=i,t-=i,s=0}}span(t,n,s,i){this.buildText(n-t,s,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(t,n,s,i,r,a){if(this.disallowBlockEffectsFor[a]&&s instanceof mp){if(s.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 c=n-t;if(s instanceof mp)if(s.block)s.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new _h(s.widget||AE.block,c,s));else{let u=np.create(s.widget||AE.inline,c,c?0:s.startSide),h=this.atCursorPos&&!u.isEditable&&r<=i.length&&(t<n||s.startSide>0),f=!u.isEditable&&(t<n||r>i.length||s.startSide<=0),p=this.getLine();this.pendingBuffer==2&&!h&&!u.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),h&&(p.append(B0(new ME(1),i),r),r=i.length+Math.max(0,r-i.length)),p.append(B0(u,i),r),this.atCursorPos=f,this.pendingBuffer=f?t<n||r>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(s);c&&(this.textOff+c<=this.text.length?this.textOff+=c:(this.skip+=c-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=r)}static build(t,n,s,i,r){let a=new XS(t,n,s,r);return a.openEnd=No.spans(i,n,s,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}function B0(e,t){for(let n of t)e=new bh(n,[e],e.length);return e}class AE extends sd{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}AE.inline=new AE("span");AE.block=new AE("div");var Rs=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(Rs||(Rs={}));const Lm=Rs.LTR,SP=Rs.RTL;function BX(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<+e[n]);return t}const SJ=BX("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),yJ=BX("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Bk=Object.create(null),Cu=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),n=e.charCodeAt(1);Bk[t]=n,Bk[n]=-t}function FX(e){return e<=247?SJ[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?yJ[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}const $J=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class op{get dir(){return this.level%2?SP:Lm}constructor(t,n,s){this.from=t,this.to=n,this.level=s}side(t,n){return this.dir==n==t?this.to:this.from}forward(t,n){return t==(this.dir==n)}static find(t,n,s,i){let r=-1;for(let a=0;a<t.length;a++){let c=t[a];if(c.from<=n&&c.to>=n){if(c.level==s)return a;(r<0||(i!=0?i<0?c.from<n:c.to>n:t[r].level>c.level))&&(r=a)}}if(r<0)throw new RangeError("Index out of range");return r}}function UX(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let s=e[n],i=t[n];if(s.from!=i.from||s.to!=i.to||s.direction!=i.direction||!UX(s.inner,i.inner))return!1}return!0}const us=[];function IJ(e,t,n,s,i){for(let r=0;r<=s.length;r++){let a=r?s[r-1].to:t,c=r<s.length?s[r].from:n,u=r?256:i;for(let h=a,f=u,p=u;h<c;h++){let _=FX(e.charCodeAt(h));_==512?_=f:_==8&&p==4&&(_=16),us[h]=_==4?2:_,_&7&&(p=_),f=_}for(let h=a,f=u,p=u;h<c;h++){let _=us[h];if(_==128)h<c-1&&f==us[h+1]&&f&24?_=us[h]=f:us[h]=256;else if(_==64){let E=h+1;for(;E<c&&us[E]==64;)E++;let v=h&&f==8||E<n&&us[E]==8?p==1?1:8:256;for(let b=h;b<E;b++)us[b]=v;h=E-1}else _==8&&p==1&&(us[h]=1);f=_,_&7&&(p=_)}}}function RJ(e,t,n,s,i){let r=i==1?2:1;for(let a=0,c=0,u=0;a<=s.length;a++){let h=a?s[a-1].to:t,f=a<s.length?s[a].from:n;for(let p=h,_,E,v;p<f;p++)if(E=Bk[_=e.charCodeAt(p)])if(E<0){for(let b=c-3;b>=0;b-=3)if(Cu[b+1]==-E){let y=Cu[b+2],S=y&2?i:y&4?y&1?r:i:0;S&&(us[p]=us[Cu[b]]=S),c=b;break}}else{if(Cu.length==189)break;Cu[c++]=p,Cu[c++]=_,Cu[c++]=u}else if((v=us[p])==2||v==1){let b=v==i;u=b?0:1;for(let y=c-3;y>=0;y-=3){let S=Cu[y+2];if(S&2)break;if(b)Cu[y+2]|=2;else{if(S&4)break;Cu[y+2]|=4}}}}}function CJ(e,t,n,s){for(let i=0,r=s;i<=n.length;i++){let a=i?n[i-1].to:e,c=i<n.length?n[i].from:t;for(let u=a;u<c;){let h=us[u];if(h==256){let f=u+1;for(;;)if(f==c){if(i==n.length)break;f=n[i++].to,c=i<n.length?n[i].from:t}else if(us[f]==256)f++;else break;let p=r==1,_=(f<t?us[f]:s)==1,E=p==_?p?1:2:s;for(let v=f,b=i,y=b?n[b-1].to:e;v>u;)v==y&&(v=n[--b].from,y=b?n[b-1].to:e),us[--v]=E;u=f}else r=h,u++}}}function Fk(e,t,n,s,i,r,a){let c=s%2?2:1;if(s%2==i%2)for(let u=t,h=0;u<n;){let f=!0,p=!1;if(h==r.length||u<r[h].from){let b=us[u];b!=c&&(f=!1,p=b==16)}let _=!f&&c==1?[]:null,E=f?s:s+1,v=u;e:for(;;)if(h<r.length&&v==r[h].from){if(p)break e;let b=r[h];if(!f)for(let y=b.to,S=h+1;;){if(y==n)break e;if(S<r.length&&r[S].from==y)y=r[S++].to;else{if(us[y]==c)break e;break}}if(h++,_)_.push(b);else{b.from>u&&a.push(new op(u,b.from,E));let y=b.direction==Lm!=!(E%2);Uk(e,y?s+1:s,i,b.inner,b.from,b.to,a),u=b.to}v=b.to}else{if(v==n||(f?us[v]!=c:us[v]==c))break;v++}_?Fk(e,u,v,s+1,i,_,a):u<v&&a.push(new op(u,v,E)),u=v}else for(let u=n,h=r.length;u>t;){let f=!0,p=!1;if(!h||u>r[h-1].to){let b=us[u-1];b!=c&&(f=!1,p=b==16)}let _=!f&&c==1?[]:null,E=f?s:s+1,v=u;e:for(;;)if(h&&v==r[h-1].to){if(p)break e;let b=r[--h];if(!f)for(let y=b.from,S=h;;){if(y==t)break e;if(S&&r[S-1].to==y)y=r[--S].from;else{if(us[y-1]==c)break e;break}}if(_)_.push(b);else{b.to<u&&a.push(new op(b.to,u,E));let y=b.direction==Lm!=!(E%2);Uk(e,y?s+1:s,i,b.inner,b.from,b.to,a),u=b.from}v=b.from}else{if(v==t||(f?us[v-1]!=c:us[v-1]==c))break;v--}_?Fk(e,v,u,s+1,i,_,a):v<u&&a.push(new op(v,u,E)),u=v}}function Uk(e,t,n,s,i,r,a){let c=t%2?2:1;IJ(e,i,r,s,c),RJ(e,i,r,s,c),CJ(i,r,s,c),Fk(e,i,r,t,n,s,a)}function MJ(e,t,n){if(!e)return[new op(0,0,t==SP?1:0)];if(t==Lm&&!n.length&&!$J.test(e))return HX(e.length);if(n.length)for(;e.length>us.length;)us[us.length]=256;let s=[],i=t==Lm?0:1;return Uk(e,i,i,n,0,e.length,s),s}function HX(e){return[new op(0,e,0)]}let VX="";function AJ(e,t,n,s,i){var r;let a=s.head-e.from,c=op.find(t,a,(r=s.bidiLevel)!==null&&r!==void 0?r:-1,s.assoc),u=t[c],h=u.side(i,n);if(a==h){let _=c+=i?1:-1;if(_<0||_>=t.length)return null;u=t[c=_],a=u.side(!i,n),h=u.side(i,n)}let f=nr(e.text,a,u.forward(i,n));(f<u.from||f>u.to)&&(f=h),VX=e.text.slice(Math.min(a,f),Math.max(a,f));let p=c==(i?t.length-1:0)?null:t[c+(i?1:-1)];return p&&f==h&&p.level+(i?0:1)<u.level?xt.cursor(p.side(!i,n)+e.from,p.forward(i,n)?1:-1,p.level):xt.cursor(f+e.from,u.forward(i,n)?-1:1,u.level)}function LJ(e,t,n){for(let s=t;s<n;s++){let i=FX(e.charCodeAt(s));if(i==1)return Lm;if(i==2||i==4)return SP}return Lm}const GX=mn.define(),WX=mn.define(),XX=mn.define(),zX=mn.define(),Hk=mn.define(),YX=mn.define(),KX=mn.define(),yP=mn.define(),$P=mn.define(),jX=mn.define({combine:e=>e.some(t=>t)}),QX=mn.define({combine:e=>e.some(t=>t)}),qX=mn.define();class fE{constructor(t,n="nearest",s="nearest",i=5,r=5,a=!1){this.range=t,this.y=n,this.x=s,this.yMargin=i,this.xMargin=r,this.isSnapshot=a}map(t){return t.empty?this:new fE(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new fE(xt.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const F0=Qn.define({map:(e,t)=>e.map(t)}),JX=Qn.define();function kl(e,t,n){let s=e.facet(zX);s.length?s[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}const dh=mn.define({combine:e=>e.length?e[0]:!0});let wJ=0;const $S=mn.define();class ei{constructor(t,n,s,i,r){this.id=t,this.create=n,this.domEventHandlers=s,this.domEventObservers=i,this.extension=r(this)}static define(t,n){const{eventHandlers:s,eventObservers:i,provide:r,decorations:a}=n||{};return new ei(wJ++,t,s,i,c=>{let u=[$S.of(c)];return a&&u.push(gy.of(h=>{let f=h.plugin(c);return f?a(f):wn.none})),r&&u.push(r(c)),u})}static fromClass(t,n){return ei.define(s=>new t(s),n)}}class GL{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}update(t){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(s){if(kl(n.state,s,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(n){kl(t.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(s){kl(t.state,s,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const ZX=mn.define(),IP=mn.define(),gy=mn.define(),e4=mn.define(),RP=mn.define(),t4=mn.define();function DF(e,t){let n=e.state.facet(t4);if(!n.length)return n;let s=n.map(r=>r instanceof Function?r(e):r),i=[];return No.spans(s,t.from,t.to,{point(){},span(r,a,c,u){let h=r-t.from,f=a-t.from,p=i;for(let _=c.length-1;_>=0;_--,u--){let E=c[_].spec.bidiIsolate,v;if(E==null&&(E=LJ(t.text,h,f)),u>0&&p.length&&(v=p[p.length-1]).to==h&&v.direction==E)v.to=f,p=v.inner;else{let b={from:h,to:f,direction:E,inner:[]};p.push(b),p=b.inner}}}}),i}const n4=mn.define();function CP(e){let t=0,n=0,s=0,i=0;for(let r of e.state.facet(n4)){let a=r(e);a&&(a.left!=null&&(t=Math.max(t,a.left)),a.right!=null&&(n=Math.max(n,a.right)),a.top!=null&&(s=Math.max(s,a.top)),a.bottom!=null&&(i=Math.max(i,a.bottom)))}return{left:t,right:n,top:s,bottom:i}}const IS=mn.define();class oc{constructor(t,n,s,i){this.fromA=t,this.toA=n,this.fromB=s,this.toB=i}join(t){return new oc(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let n=t.length,s=this;for(;n>0;n--){let i=t[n-1];if(!(i.fromA>s.toA)){if(i.toA<s.fromA)break;s=s.join(i),t.splice(n-1,1)}}return t.splice(n,0,s),t}static extendWithRanges(t,n){if(n.length==0)return t;let s=[];for(let i=0,r=0,a=0,c=0;;i++){let u=i==t.length?null:t[i],h=a-c,f=u?u.fromB:1e9;for(;r<n.length&&n[r]<f;){let p=n[r],_=n[r+1],E=Math.max(c,p),v=Math.min(f,_);if(E<=v&&new oc(E+h,v+h,E,v).addToSet(s),_>f)break;r+=2}if(!u)return s;new oc(u.fromA,u.toA,u.fromB,u.toB).addToSet(s),a=u.toA,c=u.toB}}}class jC{constructor(t,n,s){this.view=t,this.state=n,this.transactions=s,this.flags=0,this.startState=t.state,this.changes=yi.empty(this.startState.doc.length);for(let r of s)this.changes=this.changes.compose(r.changes);let i=[];this.changes.iterChangedRanges((r,a,c,u)=>i.push(new oc(r,a,c,u))),this.changedRanges=i}static create(t,n,s){return new jC(t,n,s)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(t=>t.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class xF extends hs{get length(){return this.view.state.doc.length}constructor(t){super(),this.view=t,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=wn.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new ai],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new oc(0,0,0,t.state.doc.length)],0,null)}update(t){var n;let s=t.changedRanges;this.minWidth>0&&s.length&&(s.every(({fromA:h,toA:f})=>f<this.minWidthFrom||h>this.minWidthTo)?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(t);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!FJ(t.changes,this.hasComposition)&&!t.selectionSet&&(i=t.state.selection.main.head));let r=i>-1?NJ(this.view,t.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:h,to:f}=this.hasComposition;s=new oc(h,f,t.changes.mapPos(h,-1),t.changes.mapPos(f,1)).addToSet(s.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(_n.ie||_n.chrome)&&!r&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,c=this.updateDeco(),u=xJ(a,c,t.changes);return s=oc.extendWithRanges(s,u),!(this.flags&7)&&s.length==0?!1:(this.updateInner(s,t.startState.doc.length,r),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,n,s){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,n,s);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let a=_n.chrome||_n.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,a),this.flags&=-8,a&&(a.written||i.selectionRange.focusNode!=a.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(a=>a.flags&=-9);let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let a of this.children)a instanceof _h&&a.widget instanceof xk&&r.push(a.dom);i.updateGaps(r)}updateChildren(t,n,s){let i=s?s.range.addToSet(t.slice()):t,r=this.childCursor(n);for(let a=i.length-1;;a--){let c=a>=0?i[a]:null;if(!c)break;let{fromA:u,toA:h,fromB:f,toB:p}=c,_,E,v,b;if(s&&s.range.fromB<p&&s.range.toB>f){let R=XS.build(this.view.state.doc,f,s.range.fromB,this.decorations,this.dynamicDecorationMap),w=XS.build(this.view.state.doc,s.range.toB,p,this.decorations,this.dynamicDecorationMap);E=R.breakAtStart,v=R.openStart,b=w.openEnd;let k=this.compositionView(s);w.breakAtStart?k.breakAfter=1:w.content.length&&k.merge(k.length,k.length,w.content[0],!1,w.openStart,0)&&(k.breakAfter=w.content[0].breakAfter,w.content.shift()),R.content.length&&k.merge(0,0,R.content[R.content.length-1],!0,0,R.openEnd)&&R.content.pop(),_=R.content.concat(k).concat(w.content)}else({content:_,breakAtStart:E,openStart:v,openEnd:b}=XS.build(this.view.state.doc,f,p,this.decorations,this.dynamicDecorationMap));let{i:y,off:S}=r.findPos(h,1),{i:L,off:I}=r.findPos(u,-1);AX(this,L,I,y,S,_,E,v,b)}s&&this.fixCompositionDOM(s)}updateEditContextFormatting(t){this.editContextFormatting=this.editContextFormatting.map(t.changes);for(let n of t.transactions)for(let s of n.effects)s.is(JX)&&(this.editContextFormatting=s.value)}compositionView(t){let n=new Wc(t.text.nodeValue);n.flags|=8;for(let{deco:i}of t.marks)n=new bh(i,[n],n.length);let s=new ai;return s.append(n,0),s}fixCompositionDOM(t){let n=(r,a)=>{a.flags|=8|(a.children.some(u=>u.flags&7)?1:0),this.markedForComposition.add(a);let c=hs.get(r);c&&c!=a&&(c.dom=null),a.setDOM(r)},s=this.childPos(t.range.fromB,1),i=this.children[s.i];n(t.line,i);for(let r=t.marks.length-1;r>=-1;r--)s=i.childPos(s.off,1),i=i.children[s.i],n(r>=0?t.marks[r].node:t.text,i)}updateSelection(t=!1,n=!1){(t||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let s=this.view.root.activeElement,i=s==this.dom,r=!i&&!(this.view.state.facet(dh)||this.dom.tabIndex>-1)&&YR(this.dom,this.view.observer.selectionRange)&&!(s&&this.dom.contains(s));if(!(i||n||r))return;let a=this.forceSelection;this.forceSelection=!1;let c=this.view.state.selection.main,u=this.moveToLine(this.domAtPos(c.anchor)),h=c.empty?u:this.moveToLine(this.domAtPos(c.head));if(_n.gecko&&c.empty&&!this.hasComposition&&kJ(u)){let p=document.createTextNode("");this.view.observer.ignore(()=>u.node.insertBefore(p,u.node.childNodes[u.offset]||null)),u=h=new Ar(p,0),a=!0}let f=this.view.observer.selectionRange;(a||!f.focusNode||(!WS(u.node,u.offset,f.anchorNode,f.anchorOffset)||!WS(h.node,h.offset,f.focusNode,f.focusOffset))&&!this.suppressWidgetCursorChange(f,c))&&(this.view.observer.ignore(()=>{_n.android&&_n.chrome&&this.dom.contains(f.focusNode)&&BJ(f.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let p=py(this.view.root);if(p)if(c.empty){if(_n.gecko){let _=PJ(u.node,u.offset);if(_&&_!=3){let E=(_==1?RX:CX)(u.node,u.offset);E&&(u=new Ar(E.node,E.offset))}}p.collapse(u.node,u.offset),c.bidiLevel!=null&&p.caretBidiLevel!==void 0&&(p.caretBidiLevel=c.bidiLevel)}else if(p.extend){p.collapse(u.node,u.offset);try{p.extend(h.node,h.offset)}catch{}}else{let _=document.createRange();c.anchor>c.head&&([u,h]=[h,u]),_.setEnd(h.node,h.offset),_.setStart(u.node,u.offset),p.removeAllRanges(),p.addRange(_)}r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),s&&s.focus())}),this.view.observer.setSelectionRange(u,h)),this.impreciseAnchor=u.precise?null:new Ar(f.anchorNode,f.anchorOffset),this.impreciseHead=h.precise?null:new Ar(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(t,n){return this.hasComposition&&n.empty&&WS(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,n=t.state.selection.main,s=py(t.root),{anchorNode:i,anchorOffset:r}=t.observer.selectionRange;if(!s||!n.empty||!n.assoc||!s.modify)return;let a=ai.find(this,n.head);if(!a)return;let c=a.posAtStart;if(n.head==c||n.head==c+a.length)return;let u=this.coordsAt(n.head,-1),h=this.coordsAt(n.head,1);if(!u||!h||u.bottom>h.top)return;let f=this.domAtPos(n.head+n.assoc);s.collapse(f.node,f.offset),s.modify("move",n.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let p=t.observer.selectionRange;t.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=n.from&&s.collapse(i,r)}moveToLine(t){let n=this.dom,s;if(t.node!=n)return t;for(let i=t.offset;!s&&i<n.childNodes.length;i++){let r=hs.get(n.childNodes[i]);r instanceof ai&&(s=r.domAtPos(0))}for(let i=t.offset-1;!s&&i>=0;i--){let r=hs.get(n.childNodes[i]);r instanceof ai&&(s=r.domAtPos(r.length))}return s?new Ar(s.node,s.offset,!0):t}nearest(t){for(let n=t;n;){let s=hs.get(n);if(s&&s.rootView==this)return s;n=n.parentNode}return null}posFromDOM(t,n){let s=this.nearest(t);if(!s)throw new RangeError("Trying to find position for a DOM position outside of the document");return s.localPosFromDOM(t,n)+s.posAtStart}domAtPos(t){let{i:n,off:s}=this.childCursor().findPos(t,-1);for(;n<this.children.length-1;){let i=this.children[n];if(s<i.length||i instanceof ai)break;n++,s=0}return this.children[n].domAtPos(s)}coordsAt(t,n){let s=null,i=0;for(let r=this.length,a=this.children.length-1;a>=0;a--){let c=this.children[a],u=r-c.breakAfter,h=u-c.length;if(u<t)break;if(h<=t&&(h<t||c.covers(-1))&&(u>t||c.covers(1))&&(!s||c instanceof ai&&!(s instanceof ai&&n>=0)))s=c,i=h;else if(s&&h==t&&u==t&&c instanceof _h&&Math.abs(n)<2){if(c.deco.startSide<0)break;a&&(s=null)}r=h}return s?s.coordsAt(t-i,n):null}coordsForChar(t){let{i:n,off:s}=this.childPos(t,1),i=this.children[n];if(!(i instanceof ai))return null;for(;i.children.length;){let{i:c,off:u}=i.childPos(s,1);for(;;c++){if(c==i.children.length)return null;if((i=i.children[c]).length)break}s=u}if(!(i instanceof Wc))return null;let r=nr(i.text,s);if(r==s)return null;let a=Am(i.dom,s,r).getClientRects();for(let c=0;c<a.length;c++){let u=a[c];if(c==a.length-1||u.top<u.bottom&&u.left<u.right)return u}return null}measureVisibleLineHeights(t){let n=[],{from:s,to:i}=t,r=this.view.contentDOM.clientWidth,a=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,c=-1,u=this.view.textDirection==Rs.LTR;for(let h=0,f=0;f<this.children.length;f++){let p=this.children[f],_=h+p.length;if(_>i)break;if(h>=s){let E=p.dom.getBoundingClientRect();if(n.push(E.height),a){let v=p.dom.lastChild,b=v?CE(v):[];if(b.length){let y=b[b.length-1],S=u?y.right-E.left:E.right-y.left;S>c&&(c=S,this.minWidth=r,this.minWidthFrom=h,this.minWidthTo=_)}}}h=_+p.breakAfter}return n}textDirectionAt(t){let{i:n}=this.childPos(t,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?Rs.RTL:Rs.LTR}measureTextSize(){for(let r of this.children)if(r instanceof ai){let a=r.measureTextSize();if(a)return a}let t=document.createElement("div"),n,s,i;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(t);let r=CE(t.firstChild)[0];n=t.getBoundingClientRect().height,s=r?r.width/27:7,i=r?r.height:n,t.remove()}),{lineHeight:n,charWidth:s,textHeight:i}}childCursor(t=this.length){let n=this.children.length;return n&&(t-=this.children[--n].length),new MX(this.children,t,n)}computeBlockGapDeco(){let t=[],n=this.view.viewState;for(let s=0,i=0;;i++){let r=i==n.viewports.length?null:n.viewports[i],a=r?r.from-1:this.length;if(a>s){let c=(n.lineBlockAt(a).bottom-n.lineBlockAt(s).top)/this.view.scaleY;t.push(wn.replace({widget:new xk(c),block:!0,inclusive:!0,isBlockGap:!0}).range(s,a))}if(!r)break;s=r.to+1}return wn.set(t)}updateDeco(){let t=1,n=this.view.state.facet(gy).map(r=>(this.dynamicDecorationMap[t++]=typeof r=="function")?r(this.view):r),s=!1,i=this.view.state.facet(e4).map((r,a)=>{let c=typeof r=="function";return c&&(s=!0),c?r(this.view):r});for(i.length&&(this.dynamicDecorationMap[t++]=s,n.push(No.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];t<this.decorations.length;)this.dynamicDecorationMap[t++]=!1;return this.decorations}scrollIntoView(t){if(t.isSnapshot){let h=this.view.viewState.lineBlockAt(t.range.head);this.view.scrollDOM.scrollTop=h.top-t.yMargin,this.view.scrollDOM.scrollLeft=t.xMargin;return}for(let h of this.view.state.facet(qX))try{if(h(this.view,t.range,t))return!0}catch(f){kl(this.view.state,f,"scroll handler")}let{range:n}=t,s=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),i;if(!s)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(s={left:Math.min(s.left,i.left),top:Math.min(s.top,i.top),right:Math.max(s.right,i.right),bottom:Math.max(s.bottom,i.bottom)});let r=CP(this.view),a={left:s.left-r.left,top:s.top-r.top,right:s.right+r.right,bottom:s.bottom+r.bottom},{offsetWidth:c,offsetHeight:u}=this.view.scrollDOM;fJ(this.view.scrollDOM,a,n.head<n.anchor?-1:1,t.x,t.y,Math.max(Math.min(t.xMargin,c),-c),Math.max(Math.min(t.yMargin,u),-u),this.view.textDirection==Rs.LTR)}}function kJ(e){return e.node.nodeType==1&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable=="false")&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable=="false")}function o4(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let s=RX(n.focusNode,n.focusOffset),i=CX(n.focusNode,n.focusOffset),r=s||i;if(i&&s&&i.node!=s.node){let c=hs.get(i.node);if(!c||c instanceof Wc&&c.text!=i.node.nodeValue)r=i;else if(e.docView.lastCompositionAfterCursor){let u=hs.get(s.node);!u||u instanceof Wc&&u.text!=s.node.nodeValue||(r=i)}}if(e.docView.lastCompositionAfterCursor=r!=s,!r)return null;let a=t-r.offset;return{from:a,to:a+r.node.nodeValue.length,node:r.node}}function NJ(e,t,n){let s=o4(e,n);if(!s)return null;let{node:i,from:r,to:a}=s,c=i.nodeValue;if(/[\n\r]/.test(c)||e.state.doc.sliceString(s.from,s.to)!=c)return null;let u=t.invertedDesc,h=new oc(u.mapPos(r),u.mapPos(a),r,a),f=[];for(let p=i.parentNode;;p=p.parentNode){let _=hs.get(p);if(_ instanceof bh)f.push({node:p,deco:_.mark});else{if(_ instanceof ai||p.nodeName=="DIV"&&p.parentNode==e.contentDOM)return{range:h,text:i,marks:f,line:p};if(p!=e.contentDOM)f.push({node:p,deco:new a$({inclusive:!0,attributes:bJ(p),tagName:p.tagName.toLowerCase()})});else return null}}}function PJ(e,t){return e.nodeType!=1?0:(t&&e.childNodes[t-1].contentEditable=="false"?1:0)|(t<e.childNodes.length&&e.childNodes[t].contentEditable=="false"?2:0)}let DJ=class{constructor(){this.changes=[]}compareRange(t,n){KR(t,n,this.changes)}comparePoint(t,n){KR(t,n,this.changes)}boundChange(t){KR(t,t,this.changes)}};function xJ(e,t,n){let s=new DJ;return No.compare(e,t,n,s),s.changes}function BJ(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function FJ(e,t){let n=!1;return t&&e.iterChangedRanges((s,i)=>{s<t.to&&i>t.from&&(n=!0)}),n}function UJ(e,t,n=1){let s=e.charCategorizer(t),i=e.doc.lineAt(t),r=t-i.from;if(i.length==0)return xt.cursor(t);r==0?n=1:r==i.length&&(n=-1);let a=r,c=r;n<0?a=nr(i.text,r,!1):c=nr(i.text,r);let u=s(i.text.slice(a,c));for(;a>0;){let h=nr(i.text,a,!1);if(s(i.text.slice(h,a))!=u)break;a=h}for(;c<i.length;){let h=nr(i.text,c);if(s(i.text.slice(c,h))!=u)break;c=h}return xt.range(a+i.from,c+i.from)}function HJ(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function VJ(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function WL(e,t){return e.top<t.bottom-1&&e.bottom>t.top+1}function BF(e,t){return t<e.top?{top:t,left:e.left,right:e.right,bottom:e.bottom}:e}function FF(e,t){return t>e.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function Vk(e,t,n){let s,i,r,a,c=!1,u,h,f,p;for(let v=e.firstChild;v;v=v.nextSibling){let b=CE(v);for(let y=0;y<b.length;y++){let S=b[y];i&&WL(i,S)&&(S=BF(FF(S,i.bottom),i.top));let L=HJ(t,S),I=VJ(n,S);if(L==0&&I==0)return v.nodeType==3?UF(v,t,n):Vk(v,t,n);if(!s||a>I||a==I&&r>L){s=v,i=S,r=L,a=I;let R=I?n<S.top?-1:1:L?t<S.left?-1:1:0;c=!R||(R>0?y<b.length-1:y>0)}L==0?n>S.bottom&&(!f||f.bottom<S.bottom)?(u=v,f=S):n<S.top&&(!p||p.top>S.top)&&(h=v,p=S):f&&WL(f,S)?f=FF(f,S.bottom):p&&WL(p,S)&&(p=BF(p,S.top))}}if(f&&f.bottom>=n?(s=u,i=f):p&&p.top<=n&&(s=h,i=p),!s)return{node:e,offset:0};let _=Math.max(i.left,Math.min(i.right,t));if(s.nodeType==3)return UF(s,_,n);if(c&&s.contentEditable!="false")return Vk(s,_,n);let E=Array.prototype.indexOf.call(e.childNodes,s)+(t>=(i.left+i.right)/2?1:0);return{node:e,offset:E}}function UF(e,t,n){let s=e.nodeValue.length,i=-1,r=1e9,a=0;for(let c=0;c<s;c++){let u=Am(e,c,c+1).getClientRects();for(let h=0;h<u.length;h++){let f=u[h];if(f.top==f.bottom)continue;a||(a=t-f.left);let p=(f.top>n?f.top-n:n-f.bottom)-1;if(f.left-1<=t&&f.right+1>=t&&p<r){let _=t>=(f.left+f.right)/2,E=_;if((_n.chrome||_n.gecko)&&Am(e,c).getBoundingClientRect().left==f.right&&(E=!_),p<=0)return{node:e,offset:c+(E?1:0)};i=c+(E?1:0),r=p}}}return{node:e,offset:i>-1?i:a>0?e.nodeValue.length:0}}function s4(e,t,n,s=-1){var i,r;let a=e.contentDOM.getBoundingClientRect(),c=a.top+e.viewState.paddingTop,u,{docHeight:h}=e.viewState,{x:f,y:p}=t,_=p-c;if(_<0)return 0;if(_>h)return e.state.doc.length;for(let R=e.viewState.heightOracle.textHeight/2,w=!1;u=e.elementAtHeight(_),u.type!=sl.Text;)for(;_=s>0?u.bottom+R:u.top-R,!(_>=0&&_<=h);){if(w)return n?null:0;w=!0,s=-s}p=c+_;let E=u.from;if(E<e.viewport.from)return e.viewport.from==0?0:n?null:HF(e,a,u,f,p);if(E>e.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:HF(e,a,u,f,p);let v=e.dom.ownerDocument,b=e.root.elementFromPoint?e.root:v,y=b.elementFromPoint(f,p);y&&!e.contentDOM.contains(y)&&(y=null),y||(f=Math.max(a.left+1,Math.min(a.right-1,f)),y=b.elementFromPoint(f,p),y&&!e.contentDOM.contains(y)&&(y=null));let S,L=-1;if(y&&((i=e.docView.nearest(y))===null||i===void 0?void 0:i.isEditable)!=!1){if(v.caretPositionFromPoint){let R=v.caretPositionFromPoint(f,p);R&&({offsetNode:S,offset:L}=R)}else if(v.caretRangeFromPoint){let R=v.caretRangeFromPoint(f,p);R&&({startContainer:S,startOffset:L}=R,(!e.contentDOM.contains(S)||_n.safari&&GJ(S,L,f)||_n.chrome&&WJ(S,L,f))&&(S=void 0))}S&&(L=Math.min(Qu(S),L))}if(!S||!e.docView.dom.contains(S)){let R=ai.find(e.docView,E);if(!R)return _>u.top+u.height/2?u.to:u.from;({node:S,offset:L}=Vk(R.dom,f,p))}let I=e.docView.nearest(S);if(!I)return null;if(I.isWidget&&((r=I.dom)===null||r===void 0?void 0:r.nodeType)==1){let R=I.dom.getBoundingClientRect();return t.y<R.top||t.y<=R.bottom&&t.x<=(R.left+R.right)/2?I.posAtStart:I.posAtEnd}else return I.localPosFromDOM(S,L)+I.posAtStart}function HF(e,t,n,s,i){let r=Math.round((s-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>e.defaultLineHeight*1.5){let c=e.viewState.heightOracle.textHeight,u=Math.floor((i-n.top-(e.defaultLineHeight-c)*.5)/c);r+=u*e.viewState.heightOracle.lineLength}let a=e.state.sliceDoc(n.from,n.to);return n.from+Ck(a,r,e.state.tabSize)}function GJ(e,t,n){let s;if(e.nodeType!=3||t!=(s=e.nodeValue.length))return!1;for(let i=e.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return Am(e,s-1,s).getBoundingClientRect().left>n}function WJ(e,t,n){if(t!=0)return!1;for(let i=e;;){let r=i.parentNode;if(!r||r.nodeType!=1||r.firstChild!=i)return!1;if(r.classList.contains("cm-line"))break;i=r}let s=e.nodeType==1?e.getBoundingClientRect():Am(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-s.left>5}function Gk(e,t){let n=e.lineBlockAt(t);if(Array.isArray(n.type)){for(let s of n.type)if(s.to>t||s.to==t&&(s.to==n.to||s.type==sl.Text))return s}return n}function XJ(e,t,n,s){let i=Gk(e,t.head),r=!s||i.type!=sl.Text||!(e.lineWrapping||i.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head);if(r){let a=e.dom.getBoundingClientRect(),c=e.textDirectionAt(i.from),u=e.posAtCoords({x:n==(c==Rs.LTR)?a.right-1:a.left+1,y:(r.top+r.bottom)/2});if(u!=null)return xt.cursor(u,n?-1:1)}return xt.cursor(n?i.to:i.from,n?-1:1)}function VF(e,t,n,s){let i=e.state.doc.lineAt(t.head),r=e.bidiSpans(i),a=e.textDirectionAt(i.from);for(let c=t,u=null;;){let h=AJ(i,r,a,c,n),f=VX;if(!h){if(i.number==(n?e.state.doc.lines:1))return c;f=`
  1833. `,i=e.state.doc.line(i.number+(n?1:-1)),r=e.bidiSpans(i),h=e.visualLineSide(i,!n)}if(u){if(!u(f))return c}else{if(!s)return h;u=s(f)}c=h}}function zJ(e,t,n){let s=e.state.charCategorizer(t),i=s(n);return r=>{let a=s(r);return i==ks.Space&&(i=a),i==a}}function YJ(e,t,n,s){let i=t.head,r=n?1:-1;if(i==(n?e.state.doc.length:0))return xt.cursor(i,t.assoc);let a=t.goalColumn,c,u=e.contentDOM.getBoundingClientRect(),h=e.coordsAtPos(i,t.assoc||-1),f=e.documentTop;if(h)a==null&&(a=h.left-u.left),c=r<0?h.top:h.bottom;else{let E=e.viewState.lineBlockAt(i);a==null&&(a=Math.min(u.right-u.left,e.defaultCharacterWidth*(i-E.from))),c=(r<0?E.top:E.bottom)+f}let p=u.left+a,_=s??e.viewState.heightOracle.textHeight>>1;for(let E=0;;E+=10){let v=c+(_+E)*r,b=s4(e,{x:p,y:v},!1,r);if(v<u.top||v>u.bottom||(r<0?b<i:b>i)){let y=e.docView.coordsForChar(b),S=!y||v<y.top?-1:1;return xt.cursor(b,S,void 0,a)}}}function jR(e,t,n){for(;;){let s=0;for(let i of e)i.between(t-1,t+1,(r,a,c)=>{if(t>r&&t<a){let u=s||n||(t-r<a-t?-1:1);t=u<0?r:a,s=u}});if(!s)return t}}function XL(e,t,n){let s=jR(e.state.facet(RP).map(i=>i(e)),n.from,t.head>n.from?-1:1);return s==n.from?n:xt.cursor(s,s<n.from?1:-1)}const RS="￿";class KJ{constructor(t,n){this.points=t,this.text="",this.lineSeparator=n.facet($o.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=RS}readRange(t,n){if(!t)return this;let s=t.parentNode;for(let i=t;;){this.findPointBefore(s,i);let r=this.text.length;this.readNode(i);let a=i.nextSibling;if(a==n)break;let c=hs.get(i),u=hs.get(a);(c&&u?c.breakAfter:(c?c.breakAfter:YC(i))||YC(a)&&(i.nodeName!="BR"||i.cmIgnore)&&this.text.length>r)&&this.lineBreak(),i=a}return this.findPointBefore(s,n),this}readTextNode(t){let n=t.nodeValue;for(let s of this.points)s.node==t&&(s.pos=this.text.length+Math.min(s.offset,n.length));for(let s=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,a=1,c;if(this.lineSeparator?(r=n.indexOf(this.lineSeparator,s),a=this.lineSeparator.length):(c=i.exec(n))&&(r=c.index,a=c[0].length),this.append(n.slice(s,r<0?n.length:r)),r<0)break;if(this.lineBreak(),a>1)for(let u of this.points)u.node==t&&u.pos>this.text.length&&(u.pos-=a-1);s=r+a}}readNode(t){if(t.cmIgnore)return;let n=hs.get(t),s=n&&n.overrideDOMText;if(s!=null){this.findPointInside(t,s.length);for(let i=s.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else t.nodeType==3?this.readTextNode(t):t.nodeName=="BR"?t.nextSibling&&this.lineBreak():t.nodeType==1&&this.readRange(t.firstChild,null)}findPointBefore(t,n){for(let s of this.points)s.node==t&&t.childNodes[s.offset]==n&&(s.pos=this.text.length)}findPointInside(t,n){for(let s of this.points)(t.nodeType==3?s.node==t:t.contains(s.node))&&(s.pos=this.text.length+(jJ(t,s.node,s.offset)?n:0))}}function jJ(e,t,n){for(;;){if(!t||n<Qu(t))return!1;if(t==e)return!0;n=Mm(t)+1,t=t.parentNode}}class GF{constructor(t,n){this.node=t,this.offset=n,this.pos=-1}}class QJ{constructor(t,n,s,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:r,impreciseAnchor:a}=t.docView;if(t.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=t.docView.domBoundsAround(n,s,0))){let c=r||a?[]:ZJ(t),u=new KJ(c,t.state);u.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=u.text,this.newSel=eZ(c,this.bounds.from)}else{let c=t.observer.selectionRange,u=r&&r.node==c.focusNode&&r.offset==c.focusOffset||!Lk(t.contentDOM,c.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(c.focusNode,c.focusOffset),h=a&&a.node==c.anchorNode&&a.offset==c.anchorOffset||!Lk(t.contentDOM,c.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(c.anchorNode,c.anchorOffset),f=t.viewport;if((_n.ios||_n.chrome)&&t.state.selection.main.empty&&u!=h&&(f.from>0||f.to<t.state.doc.length)){let p=Math.min(u,h),_=Math.max(u,h),E=f.from-p,v=f.to-_;(E==0||E==1||p==0)&&(v==0||v==-1||_==t.state.doc.length)&&(u=0,h=t.state.doc.length)}this.newSel=xt.single(h,u)}}}function i4(e,t){let n,{newSel:s}=t,i=e.state.selection.main,r=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:a,to:c}=t.bounds,u=i.from,h=null;(r===8||_n.android&&t.text.length<c-a)&&(u=i.to,h="end");let f=JJ(e.state.doc.sliceString(a,c,RS),t.text,u-a,h);f&&(_n.chrome&&r==13&&f.toB==f.from+2&&t.text.slice(f.from,f.toB)==RS+RS&&f.toB--,n={from:a+f.from,to:a+f.toA,insert:Fo.of(t.text.slice(f.from,f.toB).split(RS))})}else s&&(!e.hasFocus&&e.state.facet(dh)||s.main.eq(i))&&(s=null);if(!n&&!s)return!1;if(!n&&t.typeOver&&!i.empty&&s&&s.main.empty?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,i.to))}:(_n.mac||_n.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute("autocorrect")=="off"?(s&&n.insert.length==2&&(s=xt.single(s.main.anchor-1,s.main.head-1)),n={from:i.from,to:i.to,insert:Fo.of([" "])}):_n.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
  1834. `&&e.lineWrapping&&(s&&(s=xt.single(s.main.anchor-1,s.main.head-1)),n={from:i.from,to:i.to,insert:Fo.of([" "])}),n)return MP(e,n,s,r);if(s&&!s.main.eq(i)){let a=!1,c="select";return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin=="select"&&(a=!0),c=e.inputState.lastSelectionOrigin),e.dispatch({selection:s,scrollIntoView:a,userEvent:c}),!0}else return!1}function MP(e,t,n,s=-1){if(_n.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(_n.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==" ")&&t.insert.length==1&&t.insert.lines==2&&hE(e.contentDOM,"Enter",13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||s==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&hE(e.contentDOM,"Backspace",8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&hE(e.contentDOM,"Delete",46)))return!0;let r=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a,c=()=>a||(a=qJ(e,t,n));return e.state.facet(YX).some(u=>u(e,t.from,t.to,r,c))||e.dispatch(c()),!0}function qJ(e,t,n){let s,i=e.state,r=i.selection.main;if(t.from>=r.from&&t.to<=r.to&&t.to-t.from>=(r.to-r.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let c=r.from<t.from?i.sliceDoc(r.from,t.from):"",u=r.to>t.to?i.sliceDoc(t.to,r.to):"";s=i.replaceSelection(e.state.toText(c+t.insert.sliceString(0,void 0,e.state.lineBreak)+u))}else{let c=i.changes(t),u=n&&n.main.to<=c.newLength?n.main:void 0;if(i.selection.ranges.length>1&&e.inputState.composing>=0&&t.to<=r.to&&t.to>=r.to-10){let h=e.state.sliceDoc(t.from,t.to),f,p=n&&o4(e,n.main.head);if(p){let v=t.insert.length-(t.to-t.from);f={from:p.from,to:p.to-v}}else f=e.state.doc.lineAt(r.head);let _=r.to-t.to,E=r.to-r.from;s=i.changeByRange(v=>{if(v.from==r.from&&v.to==r.to)return{changes:c,range:u||v.map(c)};let b=v.to-_,y=b-h.length;if(v.to-v.from!=E||e.state.sliceDoc(y,b)!=h||v.to>=f.from&&v.from<=f.to)return{range:v};let S=i.changes({from:y,to:b,insert:t.insert}),L=v.to-r.to;return{changes:S,range:u?xt.range(Math.max(0,u.anchor+L),Math.max(0,u.head+L)):v.map(S)}})}else s={changes:c,selection:u&&i.selection.replaceRange(u)}}let a="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,a+=".compose",e.inputState.compositionFirstChange&&(a+=".start",e.inputState.compositionFirstChange=!1)),i.update(s,{userEvent:a,scrollIntoView:!0})}function JJ(e,t,n,s){let i=Math.min(e.length,t.length),r=0;for(;r<i&&e.charCodeAt(r)==t.charCodeAt(r);)r++;if(r==i&&e.length==t.length)return null;let a=e.length,c=t.length;for(;a>0&&c>0&&e.charCodeAt(a-1)==t.charCodeAt(c-1);)a--,c--;if(s=="end"){let u=Math.max(0,r-Math.min(a,c));n-=a+u-r}if(a<r&&e.length<t.length){let u=n<=r&&n>=a?r-n:0;r-=u,c=r+(c-a),a=r}else if(c<r){let u=n<=r&&n>=c?r-n:0;r-=u,a=r+(a-c),c=r}return{from:r,toA:a,toB:c}}function ZJ(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:s,focusNode:i,focusOffset:r}=e.observer.selectionRange;return n&&(t.push(new GF(n,s)),(i!=n||r!=s)&&t.push(new GF(i,r))),t}function eZ(e,t){if(e.length==0)return null;let n=e[0].pos,s=e.length==2?e[1].pos:n;return n>-1&&s>-1?xt.single(n+t,s+t):null}class tZ{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,_n.safari&&t.contentDOM.addEventListener("input",()=>null),_n.gecko&&_Z(t.contentDOM.ownerDocument)}handleEvent(t){!cZ(this.view,t)||this.ignoreDuringComposition(t)||t.type=="keydown"&&this.keydown(t)||this.runHandlers(t.type,t)}runHandlers(t,n){let s=this.handlers[t];if(s){for(let i of s.observers)i(this.view,n);for(let i of s.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(t){let n=nZ(t),s=this.handlers,i=this.view.contentDOM;for(let r in n)if(r!="scroll"){let a=!n[r].handlers.length,c=s[r];c&&a!=!c.handlers.length&&(i.removeEventListener(r,this.handleEvent),c=null),c||i.addEventListener(r,this.handleEvent,{passive:a})}for(let r in s)r!="scroll"&&!n[r]&&i.removeEventListener(r,this.handleEvent);this.handlers=n}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&t.keyCode!=27&&l4.indexOf(t.keyCode)<0&&(this.tabFocusMode=-1),_n.android&&_n.chrome&&!t.synthetic&&(t.keyCode==13||t.keyCode==8))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;let n;return _n.ios&&!t.synthetic&&!t.altKey&&!t.metaKey&&((n=r4.find(s=>s.keyCode==t.keyCode))&&!t.ctrlKey||oZ.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(this.pendingIOSKey=n||t,setTimeout(()=>this.flushIOSKey(),250),!0):(t.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(t){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&t&&t.from<t.to&&/^\S+$/.test(t.insert.toString())?!1:(this.pendingIOSKey=void 0,hE(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(t){return/^key/.test(t.type)?this.composing>0?!0:_n.safari&&!_n.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.view.observer.update(t),this.mouseSelection&&this.mouseSelection.update(t),this.draggedContent&&t.docChanged&&(this.draggedContent=this.draggedContent.map(t.changes)),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function WF(e,t){return(n,s)=>{try{return t.call(e,s,n)}catch(i){kl(n.state,i)}}}function nZ(e){let t=Object.create(null);function n(s){return t[s]||(t[s]={observers:[],handlers:[]})}for(let s of e){let i=s.spec;if(i&&i.domEventHandlers)for(let r in i.domEventHandlers){let a=i.domEventHandlers[r];a&&n(r).handlers.push(WF(s.value,a))}if(i&&i.domEventObservers)for(let r in i.domEventObservers){let a=i.domEventObservers[r];a&&n(r).observers.push(WF(s.value,a))}}for(let s in Xc)n(s).handlers.push(Xc[s]);for(let s in rc)n(s).observers.push(rc[s]);return t}const r4=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],oZ="dthko",l4=[16,17,18,20,91,92,224,225],U0=6;function H0(e){return Math.max(0,e)*.7+8}function sZ(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}class iZ{constructor(t,n,s,i){this.view=t,this.startEvent=n,this.style=s,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=pJ(t.contentDOM),this.atoms=t.state.facet(RP).map(a=>a(t));let r=t.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=t.state.facet($o.allowMultipleSelections)&&rZ(t,n),this.dragging=aZ(t,n)&&u4(n)==1?null:!1}start(t){this.dragging===!1&&this.select(t)}move(t){if(t.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&sZ(this.startEvent,t)<10)return;this.select(this.lastEvent=t);let n=0,s=0,i=0,r=0,a=this.view.win.innerWidth,c=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:r,bottom:c}=this.scrollParents.y.getBoundingClientRect());let u=CP(this.view);t.clientX-u.left<=i+U0?n=-H0(i-t.clientX):t.clientX+u.right>=a-U0&&(n=H0(t.clientX-a)),t.clientY-u.top<=r+U0?s=-H0(r-t.clientY):t.clientY+u.bottom>=c-U0&&(s=H0(t.clientY-c)),this.setScrollSpeed(n,s)}up(t){this.dragging==null&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,n){this.scrollSpeed={x:t,y:n},t||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:t,y:n}=this.scrollSpeed;t&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=t,t=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(t||n)&&this.view.win.scrollBy(t,n),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(t){let n=null;for(let s=0;s<t.ranges.length;s++){let i=t.ranges[s],r=null;if(i.empty){let a=jR(this.atoms,i.from,0);a!=i.from&&(r=xt.cursor(a,-1))}else{let a=jR(this.atoms,i.from,-1),c=jR(this.atoms,i.to,1);(a!=i.from||c!=i.to)&&(r=xt.range(i.from==i.anchor?a:c,i.from==i.head?a:c))}r&&(n||(n=t.ranges.slice()),n[s]=r)}return n?xt.create(n,t.mainIndex):t}select(t){let{view:n}=this,s=this.skipAtoms(this.style.get(t,this.extend,this.multiple));(this.mustSelect||!s.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:s,userEvent:"select.pointer"}),this.mustSelect=!1}update(t){t.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(t)&&setTimeout(()=>this.select(this.lastEvent),20)}}function rZ(e,t){let n=e.state.facet(GX);return n.length?n[0](t):_n.mac?t.metaKey:t.ctrlKey}function lZ(e,t){let n=e.state.facet(WX);return n.length?n[0](t):_n.mac?!t.altKey:!t.ctrlKey}function aZ(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let s=py(e.root);if(!s||s.rangeCount==0)return!0;let i=s.getRangeAt(0).getClientRects();for(let r=0;r<i.length;r++){let a=i[r];if(a.left<=t.clientX&&a.right>=t.clientX&&a.top<=t.clientY&&a.bottom>=t.clientY)return!0}return!1}function cZ(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,s;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(s=hs.get(n))&&s.ignoreEvent(t))return!1;return!0}const Xc=Object.create(null),rc=Object.create(null),a4=_n.ie&&_n.ie_version<15||_n.ios&&_n.webkit_version<604;function uZ(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),c4(e,n.value)},50)}function lA(e,t,n){for(let s of e.facet(t))n=s(n,e);return n}function c4(e,t){t=lA(e.state,yP,t);let{state:n}=e,s,i=1,r=n.toText(t),a=r.lines==n.selection.ranges.length;if(Wk!=null&&n.selection.ranges.every(u=>u.empty)&&Wk==r.toString()){let u=-1;s=n.changeByRange(h=>{let f=n.doc.lineAt(h.from);if(f.from==u)return{range:h};u=f.from;let p=n.toText((a?r.line(i++).text:t)+n.lineBreak);return{changes:{from:f.from,insert:p},range:xt.cursor(h.from+p.length)}})}else a?s=n.changeByRange(u=>{let h=r.line(i++);return{changes:{from:u.from,to:u.to,insert:h.text},range:xt.cursor(u.from+h.length)}}):s=n.replaceSelection(r);e.dispatch(s,{userEvent:"input.paste",scrollIntoView:!0})}rc.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft};Xc.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1);rc.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")};rc.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")};Xc.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let s of e.state.facet(XX))if(n=s(e,t),n)break;if(!n&&t.button==0&&(n=fZ(e,t)),n){let s=!e.hasFocus;e.inputState.startMouseSelection(new iZ(e,t,n,s)),s&&e.observer.ignore(()=>{yX(e.contentDOM);let r=e.root.activeElement;r&&!r.contains(e.contentDOM)&&r.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),i.dragging===!1}return!1};function XF(e,t,n,s){if(s==1)return xt.cursor(t,n);if(s==2)return UJ(e.state,t,n);{let i=ai.find(e.docView,t),r=e.state.doc.lineAt(i?i.posAtEnd:t),a=i?i.posAtStart:r.from,c=i?i.posAtEnd:r.to;return c<e.state.doc.length&&c==r.to&&c++,xt.range(a,c)}}let zF=(e,t,n)=>t>=n.top&&t<=n.bottom&&e>=n.left&&e<=n.right;function dZ(e,t,n,s){let i=ai.find(e.docView,t);if(!i)return 1;let r=t-i.posAtStart;if(r==0)return 1;if(r==i.length)return-1;let a=i.coordsAt(r,-1);if(a&&zF(n,s,a))return-1;let c=i.coordsAt(r,1);return c&&zF(n,s,c)?1:a&&a.bottom>=s?-1:1}function YF(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:dZ(e,n,t.clientX,t.clientY)}}const hZ=_n.ie&&_n.ie_version<=11;let KF=null,jF=0,QF=0;function u4(e){if(!hZ)return e.detail;let t=KF,n=QF;return KF=e,QF=Date.now(),jF=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(jF+1)%3:1}function fZ(e,t){let n=YF(e,t),s=u4(t),i=e.state.selection;return{update(r){r.docChanged&&(n.pos=r.changes.mapPos(n.pos),i=i.map(r.changes))},get(r,a,c){let u=YF(e,r),h,f=XF(e,u.pos,u.bias,s);if(n.pos!=u.pos&&!a){let p=XF(e,n.pos,n.bias,s),_=Math.min(p.from,f.from),E=Math.max(p.to,f.to);f=_<f.from?xt.range(_,E):xt.range(E,_)}return a?i.replaceRange(i.main.extend(f.from,f.to)):c&&s==1&&i.ranges.length>1&&(h=pZ(i,u.pos))?h:c?i.addRange(f):xt.create([f])}}}function pZ(e,t){for(let n=0;n<e.ranges.length;n++){let{from:s,to:i}=e.ranges[n];if(s<=t&&i>=t)return xt.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}Xc.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let i=e.docView.nearest(t.target);if(i&&i.isWidget){let r=i.posAtStart,a=r+i.length;(r>=n.to||a<=n.from)&&(n=xt.range(r,a))}}let{inputState:s}=e;return s.mouseSelection&&(s.mouseSelection.dragging=!0),s.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",lA(e.state,$P,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove"),!1};Xc.dragend=e=>(e.inputState.draggedContent=null,!1);function qF(e,t,n,s){if(n=lA(e.state,yP,n),!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:r}=e.inputState,a=s&&r&&lZ(e,t)?{from:r.from,to:r.to}:null,c={from:i,insert:n},u=e.state.changes(a?[a,c]:c);e.focus(),e.dispatch({changes:u,selection:{anchor:u.mapPos(i,-1),head:u.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"}),e.inputState.draggedContent=null}Xc.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let s=Array(n.length),i=0,r=()=>{++i==n.length&&qF(e,t,s.filter(a=>a!=null).join(e.state.lineBreak),!1)};for(let a=0;a<n.length;a++){let c=new FileReader;c.onerror=r,c.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(c.result)||(s[a]=c.result),r()},c.readAsText(n[a])}return!0}else{let s=t.dataTransfer.getData("Text");if(s)return qF(e,t,s,!0),!0}return!1};Xc.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=a4?null:t.clipboardData;return n?(c4(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(uZ(e),!1)};function gZ(e,t){let n=e.dom.parentNode;if(!n)return;let s=n.appendChild(document.createElement("textarea"));s.style.cssText="position: fixed; left: -10000px; top: 10px",s.value=t,s.focus(),s.selectionEnd=t.length,s.selectionStart=0,setTimeout(()=>{s.remove(),e.focus()},50)}function mZ(e){let t=[],n=[],s=!1;for(let i of e.selection.ranges)i.empty||(t.push(e.sliceDoc(i.from,i.to)),n.push(i));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let a=e.doc.lineAt(r);a.number>i&&(t.push(a.text),n.push({from:a.from,to:Math.min(e.doc.length,a.to+1)})),i=a.number}s=!0}return{text:lA(e,$P,t.join(e.lineBreak)),ranges:n,linewise:s}}let Wk=null;Xc.copy=Xc.cut=(e,t)=>{let{text:n,ranges:s,linewise:i}=mZ(e.state);if(!n&&!i)return!1;Wk=i?n:null,t.type=="cut"&&!e.state.readOnly&&e.dispatch({changes:s,scrollIntoView:!0,userEvent:"delete.cut"});let r=a4?null:t.clipboardData;return r?(r.clearData(),r.setData("text/plain",n),!0):(gZ(e,n),!1)};const d4=Mh.define();function h4(e,t){let n=[];for(let s of e.facet(KX)){let i=s(e,t);i&&n.push(i)}return n?e.update({effects:n,annotations:d4.of(!0)}):null}function f4(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=h4(e.state,t);n?e.dispatch(n):e.update([])}},10)}rc.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),f4(e)};rc.blur=e=>{e.observer.clearSelectionRange(),f4(e)};rc.compositionstart=rc.compositionupdate=e=>{e.observer.editContext||(e.inputState.compositionFirstChange==null&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))};rc.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,_n.chrome&&_n.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))};rc.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()};Xc.beforeinput=(e,t)=>{var n,s;if(t.inputType=="insertReplacementText"&&e.observer.editContext){let r=(n=t.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),a=t.getTargetRanges();if(r&&a.length){let c=a[0],u=e.posAtDOM(c.startContainer,c.startOffset),h=e.posAtDOM(c.endContainer,c.endOffset);return MP(e,{from:u,to:h,insert:e.state.toText(r)},null),!0}}let i;if(_n.chrome&&_n.android&&(i=r4.find(r=>r.inputType==t.inputType))&&(e.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let r=((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0;setTimeout(()=>{var a;(((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0)>r+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return _n.ios&&t.inputType=="deleteContentForward"&&e.observer.flushSoon(),_n.safari&&t.inputType=="insertText"&&e.inputState.composing>=0&&setTimeout(()=>rc.compositionend(e,t),20),!1};const JF=new Set;function _Z(e){JF.has(e)||(JF.add(e),e.addEventListener("copy",()=>{}),e.addEventListener("cut",()=>{}))}const ZF=["pre-wrap","normal","pre-line","break-spaces"];let LE=!1;function eU(){LE=!1}class TZ{constructor(t){this.lineWrapping=t,this.doc=Fo.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(t,n){let s=this.doc.lineAt(n).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(s+=Math.max(0,Math.ceil((n-t-s*this.lineLength*.5)/this.lineLength))),this.lineHeight*s}heightForLine(t){return this.lineWrapping?(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return ZF.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let n=!1;for(let s=0;s<t.length;s++){let i=t[s];i<0?s++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(t,n,s,i,r,a){let c=ZF.indexOf(t)>-1,u=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=c;if(this.lineWrapping=c,this.lineHeight=n,this.charWidth=s,this.textHeight=i,this.lineLength=r,u){this.heightSamples={};for(let h=0;h<a.length;h++){let f=a[h];f<0?h++:this.heightSamples[Math.floor(f*10)]=!0}}return u}}class EZ{constructor(t,n){this.from=t,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class Fu{constructor(t,n,s,i,r){this.from=t,this.length=n,this.top=s,this.height=i,this._content=r}get type(){return typeof this._content=="number"?sl.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof mp?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(t){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new Fu(this.from,this.length+t.length,this.top,this.height+t.height,n)}}var $s=function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e}($s||($s={}));const QR=.001;class il{constructor(t,n,s=2){this.length=t,this.height=n,this.flags=s}get outdated(){return(this.flags&2)>0}set outdated(t){this.flags=(t?2:0)|this.flags&-3}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>QR&&(LE=!0),this.height=t)}replace(t,n,s){return il.of(s)}decomposeLeft(t,n){n.push(this)}decomposeRight(t,n){n.push(this)}applyChanges(t,n,s,i){let r=this,a=s.doc;for(let c=i.length-1;c>=0;c--){let{fromA:u,toA:h,fromB:f,toB:p}=i[c],_=r.lineAt(u,$s.ByPosNoHeight,s.setDoc(n),0,0),E=_.to>=h?_:r.lineAt(h,$s.ByPosNoHeight,s,0,0);for(p+=E.to-h,h=E.to;c>0&&_.from<=i[c-1].toA;)u=i[c-1].fromA,f=i[c-1].fromB,c--,u<_.from&&(_=r.lineAt(u,$s.ByPosNoHeight,s,0,0));f+=_.from-u,u=_.from;let v=AP.build(s.setDoc(a),t,f,p);r=QC(r,r.replace(u,h,v))}return r.updateHeight(s,0)}static empty(){return new ra(0,0)}static of(t){if(t.length==1)return t[0];let n=0,s=t.length,i=0,r=0;for(;;)if(n==s)if(i>r*2){let c=t[n-1];c.break?t.splice(--n,1,c.left,null,c.right):t.splice(--n,1,c.left,c.right),s+=1+c.break,i-=c.size}else if(r>i*2){let c=t[s];c.break?t.splice(s,1,c.left,null,c.right):t.splice(s,1,c.left,c.right),s+=2+c.break,r-=c.size}else break;else if(i<r){let c=t[n++];c&&(i+=c.size)}else{let c=t[--s];c&&(r+=c.size)}let a=0;return t[n-1]==null?(a=1,n--):t[n]==null&&(a=1,s++),new vZ(il.of(t.slice(0,n)),a,il.of(t.slice(s)))}}function QC(e,t){return e==t?e:(e.constructor!=t.constructor&&(LE=!0),t)}il.prototype.size=1;class p4 extends il{constructor(t,n,s){super(t,n),this.deco=s}blockAt(t,n,s,i){return new Fu(i,this.length,s,this.height,this.deco||0)}lineAt(t,n,s,i,r){return this.blockAt(0,s,i,r)}forEachLine(t,n,s,i,r,a){t<=r+this.length&&n>=r&&a(this.blockAt(0,s,i,r))}updateHeight(t,n=0,s=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class ra extends p4{constructor(t,n){super(t,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(t,n,s,i){return new Fu(i,this.length,s,this.height,this.breaks)}replace(t,n,s){let i=s[0];return s.length==1&&(i instanceof ra||i instanceof Zi&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Zi?i=new ra(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):il.of(s)}updateHeight(t,n=0,s=!1,i){return i&&i.from<=n&&i.more?this.setHeight(i.heights[i.index++]):(s||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Zi extends il{constructor(t){super(t,0)}heightMetrics(t,n){let s=t.doc.lineAt(n).number,i=t.doc.lineAt(n+this.length).number,r=i-s+1,a,c=0;if(t.lineWrapping){let u=Math.min(this.height,t.lineHeight*r);a=u/r,this.length>r+1&&(c=(this.height-u)/(this.length-r-1))}else a=this.height/r;return{firstLine:s,lastLine:i,perLine:a,perChar:c}}blockAt(t,n,s,i){let{firstLine:r,lastLine:a,perLine:c,perChar:u}=this.heightMetrics(n,i);if(n.lineWrapping){let h=i+(t<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(t-s)/this.height))*this.length)),f=n.doc.lineAt(h),p=c+f.length*u,_=Math.max(s,t-p/2);return new Fu(f.from,f.length,_,p,0)}else{let h=Math.max(0,Math.min(a-r,Math.floor((t-s)/c))),{from:f,length:p}=n.doc.line(r+h);return new Fu(f,p,s+c*h,c,0)}}lineAt(t,n,s,i,r){if(n==$s.ByHeight)return this.blockAt(t,s,i,r);if(n==$s.ByPosNoHeight){let{from:E,to:v}=s.doc.lineAt(t);return new Fu(E,v-E,0,0,0)}let{firstLine:a,perLine:c,perChar:u}=this.heightMetrics(s,r),h=s.doc.lineAt(t),f=c+h.length*u,p=h.number-a,_=i+c*p+u*(h.from-r-p);return new Fu(h.from,h.length,Math.max(i,Math.min(_,i+this.height-f)),f,0)}forEachLine(t,n,s,i,r,a){t=Math.max(t,r),n=Math.min(n,r+this.length);let{firstLine:c,perLine:u,perChar:h}=this.heightMetrics(s,r);for(let f=t,p=i;f<=n;){let _=s.doc.lineAt(f);if(f==t){let v=_.number-c;p+=u*v+h*(t-r-v)}let E=u+h*_.length;a(new Fu(_.from,_.length,p,E,0)),p+=E,f=_.to+1}}replace(t,n,s){let i=this.length-n;if(i>0){let r=s[s.length-1];r instanceof Zi?s[s.length-1]=new Zi(r.length+i):s.push(null,new Zi(i-1))}if(t>0){let r=s[0];r instanceof Zi?s[0]=new Zi(t+r.length):s.unshift(new Zi(t-1),null)}return il.of(s)}decomposeLeft(t,n){n.push(new Zi(t-1),null)}decomposeRight(t,n){n.push(null,new Zi(this.length-t-1))}updateHeight(t,n=0,s=!1,i){let r=n+this.length;if(i&&i.from<=n+this.length&&i.more){let a=[],c=Math.max(n,i.from),u=-1;for(i.from>n&&a.push(new Zi(i.from-n-1).updateHeight(t,n));c<=r&&i.more;){let f=t.doc.lineAt(c).length;a.length&&a.push(null);let p=i.heights[i.index++];u==-1?u=p:Math.abs(p-u)>=QR&&(u=-2);let _=new ra(f,p);_.outdated=!1,a.push(_),c+=f+1}c<=r&&a.push(null,new Zi(r-c).updateHeight(t,c));let h=il.of(a);return(u<0||Math.abs(h.height-this.height)>=QR||Math.abs(u-this.heightMetrics(t,n).perLine)>=QR)&&(LE=!0),QC(this,h)}else(s||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class vZ extends il{constructor(t,n,s){super(t.length+n+s.length,t.height+s.height,n|(t.outdated||s.outdated?2:0)),this.left=t,this.right=s,this.size=t.size+s.size}get break(){return this.flags&1}blockAt(t,n,s,i){let r=s+this.left.height;return t<r?this.left.blockAt(t,n,s,i):this.right.blockAt(t,n,r,i+this.left.length+this.break)}lineAt(t,n,s,i,r){let a=i+this.left.height,c=r+this.left.length+this.break,u=n==$s.ByHeight?t<a:t<c,h=u?this.left.lineAt(t,n,s,i,r):this.right.lineAt(t,n,s,a,c);if(this.break||(u?h.to<c:h.from>c))return h;let f=n==$s.ByPosNoHeight?$s.ByPosNoHeight:$s.ByPos;return u?h.join(this.right.lineAt(c,f,s,a,c)):this.left.lineAt(c,f,s,i,r).join(h)}forEachLine(t,n,s,i,r,a){let c=i+this.left.height,u=r+this.left.length+this.break;if(this.break)t<u&&this.left.forEachLine(t,n,s,i,r,a),n>=u&&this.right.forEachLine(t,n,s,c,u,a);else{let h=this.lineAt(u,$s.ByPos,s,i,r);t<h.from&&this.left.forEachLine(t,h.from-1,s,i,r,a),h.to>=t&&h.from<=n&&a(h),n>h.to&&this.right.forEachLine(h.to+1,n,s,c,u,a)}}replace(t,n,s){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(t,n,s),this.right);if(t>this.left.length)return this.balanced(this.left,this.right.replace(t-i,n-i,s));let r=[];t>0&&this.decomposeLeft(t,r);let a=r.length;for(let c of s)r.push(c);if(t>0&&tU(r,a-1),n<this.length){let c=r.length;this.decomposeRight(n,r),tU(r,c)}return il.of(r)}decomposeLeft(t,n){let s=this.left.length;if(t<=s)return this.left.decomposeLeft(t,n);n.push(this.left),this.break&&(s++,t>=s&&n.push(null)),t>s&&this.right.decomposeLeft(t-s,n)}decomposeRight(t,n){let s=this.left.length,i=s+this.break;if(t>=i)return this.right.decomposeRight(t-i,n);t<s&&this.left.decomposeRight(t,n),this.break&&t<i&&n.push(null),n.push(this.right)}balanced(t,n){return t.size>2*n.size||n.size>2*t.size?il.of(this.break?[t,null,n]:[t,n]):(this.left=QC(this.left,t),this.right=QC(this.right,n),this.setHeight(t.height+n.height),this.outdated=t.outdated||n.outdated,this.size=t.size+n.size,this.length=t.length+this.break+n.length,this)}updateHeight(t,n=0,s=!1,i){let{left:r,right:a}=this,c=n+r.length+this.break,u=null;return i&&i.from<=n+r.length&&i.more?u=r=r.updateHeight(t,n,s,i):r.updateHeight(t,n,s),i&&i.from<=c+a.length&&i.more?u=a=a.updateHeight(t,c,s,i):a.updateHeight(t,c,s),u?this.balanced(r,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function tU(e,t){let n,s;e[t]==null&&(n=e[t-1])instanceof Zi&&(s=e[t+1])instanceof Zi&&e.splice(t-1,3,new Zi(n.length+1+s.length))}const bZ=5;class AP{constructor(t,n){this.pos=t,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,n){if(this.lineStart>-1){let s=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof ra?i.length+=s-this.pos:(s>this.pos||!this.isCovered)&&this.nodes.push(new ra(s-this.pos,-1)),this.writtenTo=s,n>s&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(t,n,s){if(t<n||s.heightRelevant){let i=s.widget?s.widget.estimatedHeight:0,r=s.widget?s.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let a=n-t;s.block?this.addBlock(new p4(a,i,s)):(a||r||i>=bZ)&&this.addLineDeco(i,r,a)}else n>t&&this.span(t,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:t,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=n,this.writtenTo<t&&((this.writtenTo<t-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new ra(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,n){let s=new Zi(n-t);return this.oracle.doc.lineAt(t).to==n&&(s.flags|=4),s}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof ra)return t;let n=new ra(0,-1);return this.nodes.push(n),n}addBlock(t){this.enterLine();let n=t.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,n&&n.endSide>0&&(this.covering=t)}addLineDeco(t,n,s){let i=this.ensureLine();i.length+=s,i.collapsed+=s,i.widgetHeight=Math.max(i.widgetHeight,t),i.breaks+=n,this.writtenTo=this.pos=this.pos+s}finish(t){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof ra)&&!this.isCovered?this.nodes.push(new ra(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let s=t;for(let i of this.nodes)i instanceof ra&&i.updateHeight(this.oracle,s),s+=i?i.length:1;return this.nodes}static build(t,n,s,i){let r=new AP(s,t);return No.spans(n,s,i,r,0),r.finish(s)}}function OZ(e,t,n){let s=new SZ;return No.compare(e,t,n,s,0),s.changes}class SZ{constructor(){this.changes=[]}compareRange(){}comparePoint(t,n,s,i){(t<n||s&&s.heightRelevant||i&&i.heightRelevant)&&KR(t,n,this.changes,5)}}function yZ(e,t){let n=e.getBoundingClientRect(),s=e.ownerDocument,i=s.defaultView||window,r=Math.max(0,n.left),a=Math.min(i.innerWidth,n.right),c=Math.max(0,n.top),u=Math.min(i.innerHeight,n.bottom);for(let h=e.parentNode;h&&h!=s.body;)if(h.nodeType==1){let f=h,p=window.getComputedStyle(f);if((f.scrollHeight>f.clientHeight||f.scrollWidth>f.clientWidth)&&p.overflow!="visible"){let _=f.getBoundingClientRect();r=Math.max(r,_.left),a=Math.min(a,_.right),c=Math.max(c,_.top),u=Math.min(h==e.parentNode?i.innerHeight:u,_.bottom)}h=p.position=="absolute"||p.position=="fixed"?f.offsetParent:f.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:r-n.left,right:Math.max(r,a)-n.left,top:c-(n.top+t),bottom:Math.max(c,u)-(n.top+t)}}function $Z(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class zL{constructor(t,n,s,i){this.from=t,this.to=n,this.size=s,this.displaySize=i}static same(t,n){if(t.length!=n.length)return!1;for(let s=0;s<t.length;s++){let i=t[s],r=n[s];if(i.from!=r.from||i.to!=r.to||i.size!=r.size)return!1}return!0}draw(t,n){return wn.replace({widget:new IZ(this.displaySize*(n?t.scaleY:t.scaleX),n)}).range(this.from,this.to)}}class IZ extends sd{constructor(t,n){super(),this.size=t,this.vertical=n}eq(t){return t.size==this.size&&t.vertical==this.vertical}toDOM(){let t=document.createElement("div");return this.vertical?t.style.height=this.size+"px":(t.style.width=this.size+"px",t.style.height="2px",t.style.display="inline-block"),t}get estimatedHeight(){return this.vertical?this.size:-1}}class nU{constructor(t){this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=oU,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Rs.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet(IP).some(s=>typeof s!="function"&&s.class=="cm-lineWrapping");this.heightOracle=new TZ(n),this.stateDeco=t.facet(gy).filter(s=>typeof s!="function"),this.heightMap=il.empty().applyChanges(this.stateDeco,Fo.empty,this.heightOracle.setDoc(t.doc),[new oc(0,0,0,t.doc.length)]);for(let s=0;s<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());s++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=wn.set(this.lineGaps.map(s=>s.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:n}=this.state.selection;for(let s=0;s<=1;s++){let i=s?n.head:n.anchor;if(!t.some(({from:r,to:a})=>i>=r&&i<=a)){let{from:r,to:a}=this.lineBlockAt(i);t.push(new V0(r,a))}}return this.viewports=t.sort((s,i)=>s.from-i.from),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7e6?oU:new LP(this.heightOracle,this.heightMap,this.viewports),t.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,t=>{this.viewportLines.push(CS(t,this.scaler))})}update(t,n=null){this.state=t.state;let s=this.stateDeco;this.stateDeco=this.state.facet(gy).filter(f=>typeof f!="function");let i=t.changedRanges,r=oc.extendWithRanges(i,OZ(s,this.stateDeco,t?t.changes:yi.empty(this.state.doc.length))),a=this.heightMap.height,c=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);eU(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),r),(this.heightMap.height!=a||LE)&&(t.flags|=2),c?(this.scrollAnchorPos=t.changes.mapPos(c.from,-1),this.scrollAnchorHeight=c.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let u=r.length?this.mapViewport(this.viewport,t.changes):this.viewport;(n&&(n.range.head<u.from||n.range.head>u.to)||!this.viewportIsAppropriate(u))&&(u=this.getViewport(0,n));let h=u.from!=this.viewport.from||u.to!=this.viewport.to;this.viewport=u,t.flags|=this.updateForViewport(),(h||!t.changes.empty||t.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(t.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(QX)&&(this.mustEnforceCursorAssoc=!0)}measure(t){let n=t.contentDOM,s=window.getComputedStyle(n),i=this.heightOracle,r=s.whiteSpace;this.defaultTextDirection=s.direction=="rtl"?Rs.RTL:Rs.LTR;let a=this.heightOracle.mustRefreshForWrapping(r),c=n.getBoundingClientRect(),u=a||this.mustMeasureContent||this.contentDOMHeight!=c.height;this.contentDOMHeight=c.height,this.mustMeasureContent=!1;let h=0,f=0;if(c.width&&c.height){let{scaleX:R,scaleY:w}=SX(n,c);(R>.005&&Math.abs(this.scaleX-R)>.005||w>.005&&Math.abs(this.scaleY-w)>.005)&&(this.scaleX=R,this.scaleY=w,h|=16,a=u=!0)}let p=(parseInt(s.paddingTop)||0)*this.scaleY,_=(parseInt(s.paddingBottom)||0)*this.scaleY;(this.paddingTop!=p||this.paddingBottom!=_)&&(this.paddingTop=p,this.paddingBottom=_,h|=18),this.editorWidth!=t.scrollDOM.clientWidth&&(i.lineWrapping&&(u=!0),this.editorWidth=t.scrollDOM.clientWidth,h|=16);let E=t.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=E&&(this.scrollAnchorHeight=-1,this.scrollTop=E),this.scrolledToBottom=IX(t.scrollDOM);let v=(this.printing?$Z:yZ)(n,this.paddingTop),b=v.top-this.pixelViewport.top,y=v.bottom-this.pixelViewport.bottom;this.pixelViewport=v;let S=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(S!=this.inView&&(this.inView=S,S&&(u=!0)),!this.inView&&!this.scrollTarget)return 0;let L=c.width;if((this.contentDOMWidth!=L||this.editorHeight!=t.scrollDOM.clientHeight)&&(this.contentDOMWidth=c.width,this.editorHeight=t.scrollDOM.clientHeight,h|=16),u){let R=t.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(R)&&(a=!0),a||i.lineWrapping&&Math.abs(L-this.contentDOMWidth)>i.charWidth){let{lineHeight:w,charWidth:k,textHeight:D}=t.docView.measureTextSize();a=w>0&&i.refresh(r,w,k,D,L/k,R),a&&(t.docView.minWidth=0,h|=16)}b>0&&y>0?f=Math.max(b,y):b<0&&y<0&&(f=Math.min(b,y)),eU();for(let w of this.viewports){let k=w.from==this.viewport.from?R:t.docView.measureVisibleLineHeights(w);this.heightMap=(a?il.empty().applyChanges(this.stateDeco,Fo.empty,this.heightOracle,[new oc(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(i,0,a,new EZ(w.from,k))}LE&&(h|=2)}let I=!this.viewportIsAppropriate(this.viewport,f)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return I&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(f,this.scrollTarget),h|=this.updateForViewport()),(h&2||I)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,t)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,n){let s=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),i=this.heightMap,r=this.heightOracle,{visibleTop:a,visibleBottom:c}=this,u=new V0(i.lineAt(a-s*1e3,$s.ByHeight,r,0,0).from,i.lineAt(c+(1-s)*1e3,$s.ByHeight,r,0,0).to);if(n){let{head:h}=n.range;if(h<u.from||h>u.to){let f=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),p=i.lineAt(h,$s.ByPos,r,0,0),_;n.y=="center"?_=(p.top+p.bottom)/2-f/2:n.y=="start"||n.y=="nearest"&&h<u.from?_=p.top:_=p.bottom-f,u=new V0(i.lineAt(_-1e3/2,$s.ByHeight,r,0,0).from,i.lineAt(_+f+1e3/2,$s.ByHeight,r,0,0).to)}}return u}mapViewport(t,n){let s=n.mapPos(t.from,-1),i=n.mapPos(t.to,1);return new V0(this.heightMap.lineAt(s,$s.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,$s.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:t,to:n},s=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(t,$s.ByPos,this.heightOracle,0,0),{bottom:r}=this.heightMap.lineAt(n,$s.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:c}=this;return(t==0||i<=a-Math.max(10,Math.min(-s,250)))&&(n==this.state.doc.length||r>=c+Math.max(10,Math.min(s,250)))&&i>a-2*1e3&&r<c+2*1e3}mapLineGaps(t,n){if(!t.length||n.empty)return t;let s=[];for(let i of t)n.touchesRange(i.from,i.to)||s.push(new zL(n.mapPos(i.from),n.mapPos(i.to),i.size,i.displaySize));return s}ensureLineGaps(t,n){let s=this.heightOracle.lineWrapping,i=s?1e4:2e3,r=i>>1,a=i<<1;if(this.defaultTextDirection!=Rs.LTR&&!s)return[];let c=[],u=(f,p,_,E)=>{if(p-f<r)return;let v=this.state.selection.main,b=[v.from];v.empty||b.push(v.to);for(let S of b)if(S>f&&S<p){u(f,S-10,_,E),u(S+10,p,_,E);return}let y=CZ(t,S=>S.from>=_.from&&S.to<=_.to&&Math.abs(S.from-f)<r&&Math.abs(S.to-p)<r&&!b.some(L=>S.from<L&&S.to>L));if(!y){if(p<_.to&&n&&s&&n.visibleRanges.some(I=>I.from<=p&&I.to>=p)){let I=n.moveToLineBoundary(xt.cursor(p),!1,!0).head;I>f&&(p=I)}let S=this.gapSize(_,f,p,E),L=s||S<2e6?S:2e6;y=new zL(f,p,S,L)}c.push(y)},h=f=>{if(f.length<a||f.type!=sl.Text)return;let p=RZ(f.from,f.to,this.stateDeco);if(p.total<a)return;let _=this.scrollTarget?this.scrollTarget.range.head:null,E,v;if(s){let b=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,y,S;if(_!=null){let L=W0(p,_),I=((this.visibleBottom-this.visibleTop)/2+b)/f.height;y=L-I,S=L+I}else y=(this.visibleTop-f.top-b)/f.height,S=(this.visibleBottom-f.top+b)/f.height;E=G0(p,y),v=G0(p,S)}else{let b=p.total*this.heightOracle.charWidth,y=i*this.heightOracle.charWidth,S=0;if(b>2e6)for(let k of t)k.from>=f.from&&k.from<f.to&&k.size!=k.displaySize&&k.from*this.heightOracle.charWidth+S<this.pixelViewport.left&&(S=k.size-k.displaySize);let L=this.pixelViewport.left+S,I=this.pixelViewport.right+S,R,w;if(_!=null){let k=W0(p,_),D=((I-L)/2+y)/b;R=k-D,w=k+D}else R=(L-y)/b,w=(I+y)/b;E=G0(p,R),v=G0(p,w)}E>f.from&&u(f.from,E,f,p),v<f.to&&u(v,f.to,f,p)};for(let f of this.viewportLines)Array.isArray(f.type)?f.type.forEach(h):h(f);return c}gapSize(t,n,s,i){let r=W0(i,s)-W0(i,n);return this.heightOracle.lineWrapping?t.height*r:i.total*this.heightOracle.charWidth*r}updateLineGaps(t){zL.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=wn.set(t.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(t){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let s=[];No.spans(n,this.viewport.from,this.viewport.to,{span(r,a){s.push({from:r,to:a})},point(){}},20);let i=0;if(s.length!=this.visibleRanges.length)i=12;else for(let r=0;r<s.length&&!(i&8);r++){let a=this.visibleRanges[r],c=s[r];(a.from!=c.from||a.to!=c.to)&&(i|=4,t&&t.mapPos(a.from,-1)==c.from&&t.mapPos(a.to,1)==c.to||(i|=8))}return this.visibleRanges=s,i}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find(n=>n.from<=t&&n.to>=t)||CS(this.heightMap.lineAt(t,$s.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=t&&n.bottom>=t)||CS(this.heightMap.lineAt(this.scaler.fromDOM(t),$s.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(t){let n=this.lineBlockAtHeight(t+8);return n.from>=this.viewport.from||this.viewportLines[0].top-t>200?n:this.viewportLines[0]}elementAtHeight(t){return CS(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class V0{constructor(t,n){this.from=t,this.to=n}}function RZ(e,t,n){let s=[],i=e,r=0;return No.spans(n,e,t,{span(){},point(a,c){a>i&&(s.push({from:i,to:a}),r+=a-i),i=c}},20),i<t&&(s.push({from:i,to:t}),r+=t-i),{total:r,ranges:s}}function G0({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let s=Math.floor(e*n);for(let i=0;;i++){let{from:r,to:a}=t[i],c=a-r;if(s<=c)return r+s;s-=c}}function W0(e,t){let n=0;for(let{from:s,to:i}of e.ranges){if(t<=i){n+=t-s;break}n+=i-s}return n/e.total}function CZ(e,t){for(let n of e)if(t(n))return n}const oU={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};class LP{constructor(t,n,s){let i=0,r=0,a=0;this.viewports=s.map(({from:c,to:u})=>{let h=n.lineAt(c,$s.ByPos,t,0,0).top,f=n.lineAt(u,$s.ByPos,t,0,0).bottom;return i+=f-h,{from:c,to:u,top:h,bottom:f,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let c of this.viewports)c.domTop=a+(c.top-r)*this.scale,a=c.domBottom=c.domTop+(c.bottom-c.top),r=c.bottom}toDOM(t){for(let n=0,s=0,i=0;;n++){let r=n<this.viewports.length?this.viewports[n]:null;if(!r||t<r.top)return i+(t-s)*this.scale;if(t<=r.bottom)return r.domTop+(t-r.top);s=r.bottom,i=r.domBottom}}fromDOM(t){for(let n=0,s=0,i=0;;n++){let r=n<this.viewports.length?this.viewports[n]:null;if(!r||t<r.domTop)return s+(t-i)/this.scale;if(t<=r.domBottom)return r.top+(t-r.domTop);s=r.bottom,i=r.domBottom}}eq(t){return t instanceof LP?this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((n,s)=>n.from==t.viewports[s].from&&n.to==t.viewports[s].to):!1}}function CS(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),s=t.toDOM(e.bottom);return new Fu(e.from,e.length,n,s-n,Array.isArray(e._content)?e._content.map(i=>CS(i,t)):e._content)}const X0=mn.define({combine:e=>e.join(" ")}),Xk=mn.define({combine:e=>e.indexOf(!0)>-1}),zk=pp.newName(),g4=pp.newName(),m4=pp.newName(),_4={"&light":"."+g4,"&dark":"."+m4};function Yk(e,t,n){return new pp(t,{finish(s){return/&/.test(s)?s.replace(/&\w*/,i=>{if(i=="&")return e;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):e+" "+s}})}const MZ=Yk("."+zk,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,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"}},_4),AZ={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},YL=_n.ie&&_n.ie_version<=11;class LZ{constructor(t){this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new gJ,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver(n=>{for(let s of n)this.queue.push(s);(_n.ie&&_n.ie_version<=11||_n.ios&&t.composing)&&n.some(s=>s.type=="childList"&&s.removedNodes.length||s.type=="characterData"&&s.oldValue.length>s.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&t.constructor.EDIT_CONTEXT!==!1&&!(_n.chrome&&_n.chrome_version<126)&&(this.editContext=new kZ(t),t.state.facet(dh)&&(t.contentDOM.editContext=this.editContext.editContext)),YL&&(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),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(t.scrollDOM)),this.addWindowListeners(this.win=t.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{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(t){this.view.inputState.runHandlers("scroll",t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(t){(t.type=="change"||!t.type)&&!t.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some((n,s)=>n!=t[s]))){this.gapIntersection.disconnect();for(let n of t)this.gapIntersection.observe(n);this.gaps=t}}onSelectionChange(t){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:s}=this,i=this.selectionRange;if(s.state.facet(dh)?s.root.activeElement!=this.dom:!YR(this.dom,i))return;let r=i.anchorNode&&s.docView.nearest(i.anchorNode);if(r&&r.ignoreEvent(t)){n||(this.selectionChanged=!1);return}(_n.ie&&_n.ie_version<=11||_n.android&&_n.chrome)&&!s.state.selection.main.empty&&i.focusNode&&WS(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,n=py(t.root);if(!n)return!1;let s=_n.safari&&t.root.nodeType==11&&t.root.activeElement==this.dom&&wZ(this.view,n)||n;if(!s||this.selectionRange.eq(s))return!1;let i=YR(this.dom,s);return i&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime<Date.now()-300&&_J(this.dom,s)?(this.view.inputState.lastFocusTime=0,t.docView.updateSelection(),!1):(this.selectionRange.setRange(s),i&&(this.selectionChanged=!0),!0)}setSelectionRange(t,n){this.selectionRange.set(t.node,t.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let t=0,n=null;for(let s=this.dom;s;)if(s.nodeType==1)!n&&t<this.scrollTargets.length&&this.scrollTargets[t]==s?t++:n||(n=this.scrollTargets.slice(0,t)),n&&n.push(s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;if(t<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,t)),n){for(let s of this.scrollTargets)s.removeEventListener("scroll",this.onScroll);for(let s of this.scrollTargets=n)s.addEventListener("scroll",this.onScroll)}}ignore(t){if(!this.active)return t();try{return this.stop(),t()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,AZ),YL&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),YL&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(t,n){var s;if(!this.delayedAndroidKey){let i=()=>{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=r.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&r.force&&hE(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||t=="Enter")&&(this.delayedAndroidKey={key:t,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((s=this.delayedAndroidKey)===null||s===void 0)&&s.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();t.length&&(this.queue=[]);let n=-1,s=-1,i=!1;for(let r of t){let a=this.readMutation(r);a&&(a.typeOver&&(i=!0),n==-1?{from:n,to:s}=a:(n=Math.min(a.from,n),s=Math.max(a.to,s)))}return{from:n,to:s,typeOver:i}}readChange(){let{from:t,to:n,typeOver:s}=this.processRecords(),i=this.selectionChanged&&YR(this.dom,this.selectionRange);if(t<0&&!i)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new QJ(this.view,t,n,s);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let s=this.view.state,i=i4(this.view,n);return this.view.state==s&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(t){let n=this.view.docView.nearest(t.target);if(!n||n.ignoreMutation(t))return null;if(n.markDirty(t.type=="attributes"),t.type=="attributes"&&(n.flags|=4),t.type=="childList"){let s=sU(n,t.previousSibling||t.target.previousSibling,-1),i=sU(n,t.nextSibling||t.target.nextSibling,1);return{from:s?n.posAfter(s):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return t.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}update(t){this.editContext&&(this.editContext.update(t),t.startState.facet(dh)!=t.state.facet(dh)&&(t.view.contentDOM.editContext=t.state.facet(dh)?this.editContext.editContext:null))}destroy(){var t,n,s;this.stop(),(t=this.intersection)===null||t===void 0||t.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(s=this.resizeScroll)===null||s===void 0||s.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function sU(e,t,n){for(;t;){let s=hs.get(t);if(s&&s.parent==e)return s;let i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}function iU(e,t){let n=t.startContainer,s=t.startOffset,i=t.endContainer,r=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);return WS(a.node,a.offset,i,r)&&([n,s,i,r]=[i,r,n,s]),{anchorNode:n,anchorOffset:s,focusNode:i,focusOffset:r}}function wZ(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return iU(e,i)}let n=null;function s(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",s,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",s,!0),n?iU(e,n):null}class kZ{constructor(t){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(t.state);let n=this.editContext=new window.EditContext({text:t.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,t.state.selection.main.anchor))),selectionEnd:this.toContextPos(t.state.selection.main.head)});this.handlers.textupdate=s=>{let{anchor:i}=t.state.selection.main,r=this.toEditorPos(s.updateRangeStart),a=this.toEditorPos(s.updateRangeEnd);t.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:s.updateRangeStart,editorBase:r,drifted:!1});let c={from:r,to:a,insert:Fo.of(s.text.split(`
  1835. `))};if(c.from==this.from&&i<this.from?c.from=i:c.to==this.to&&i>this.to&&(c.to=i),!(c.from==c.to&&!c.insert.length)){if(this.pendingContextChange=c,!t.state.readOnly){let u=this.to-this.from+(c.to-c.from+c.insert.length);MP(t,c,xt.single(this.toEditorPos(s.selectionStart,u),this.toEditorPos(s.selectionEnd,u)))}this.pendingContextChange&&(this.revertPending(t.state),this.setSelection(t.state))}},this.handlers.characterboundsupdate=s=>{let i=[],r=null;for(let a=this.toEditorPos(s.rangeStart),c=this.toEditorPos(s.rangeEnd);a<c;a++){let u=t.coordsForChar(a);r=u&&new DOMRect(u.left,u.top,u.right-u.left,u.bottom-u.top)||r||new DOMRect,i.push(r)}n.updateCharacterBounds(s.rangeStart,i)},this.handlers.textformatupdate=s=>{let i=[];for(let r of s.getTextFormats()){let a=r.underlineStyle,c=r.underlineThickness;if(a!="None"&&c!="None"){let u=this.toEditorPos(r.rangeStart),h=this.toEditorPos(r.rangeEnd);if(u<h){let f=`text-decoration: underline ${a=="Dashed"?"dashed ":a=="Squiggle"?"wavy ":""}${c=="Thin"?1:2}px`;i.push(wn.mark({attributes:{style:f}}).range(u,h))}}}t.dispatch({effects:JX.of(wn.set(i))})},this.handlers.compositionstart=()=>{t.inputState.composing<0&&(t.inputState.composing=0,t.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(t.inputState.composing=-1,t.inputState.compositionFirstChange=null,this.composing){let{drifted:s}=this.composing;this.composing=null,s&&this.reset(t.state)}};for(let s in this.handlers)n.addEventListener(s,this.handlers[s]);this.measureReq={read:s=>{this.editContext.updateControlBounds(s.contentDOM.getBoundingClientRect());let i=py(s.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let n=0,s=!1,i=this.pendingContextChange;return t.changes.iterChanges((r,a,c,u,h)=>{if(s)return;let f=h.length-(a-r);if(i&&a>=i.to)if(i.from==r&&i.to==a&&i.insert.eq(h)){i=this.pendingContextChange=null,n+=f,this.to+=f;return}else i=null,this.revertPending(t.state);if(r+=n,a+=n,a<=this.from)this.from+=f,this.to+=f;else if(r<this.to){if(r<this.from||a>this.to||this.to-this.from+h.length>3e4){s=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(a),h.toString()),this.to+=f}n+=f}),i&&!s&&this.revertPending(t.state),!s}update(t){let n=this.pendingContextChange;this.composing&&(this.composing.drifted||t.transactions.some(s=>!s.isUserEvent("input.type")&&s.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=t.changes.mapPos(this.composing.editorBase)):!this.applyEdits(t)||!this.rangeIsValid(t.state)?(this.pendingContextChange=null,this.reset(t.state)):(t.docChanged||t.selectionSet||n)&&this.setSelection(t.state),(t.geometryChanged||t.docChanged||t.selectionSet)&&t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:n}=t.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(t.doc.length,n+1e4)}reset(t){this.resetRange(t),this.editContext.updateText(0,this.editContext.text.length,t.doc.sliceString(this.from,this.to)),this.setSelection(t)}revertPending(t){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),t.doc.sliceString(n.from,n.to))}setSelection(t){let{main:n}=t.selection,s=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=s||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(s,i)}rangeIsValid(t){let{head:n}=t.selection.main;return!(this.from>0&&n-this.from<500||this.to<t.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(t,n=this.to-this.from){t=Math.min(t,n);let s=this.composing;return s&&s.drifted?s.editorBase+(t-s.contextBase):t+this.from}toContextPos(t){let n=this.composing;return n&&n.drifted?n.contextBase+(t-n.editorBase):t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class hn{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:s}=t;this.dispatchTransactions=t.dispatchTransactions||s&&(i=>i.forEach(r=>s(r,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=t.root||mJ(t.parent)||document,this.viewState=new nU(t.state||$o.create(t)),t.scrollTo&&t.scrollTo.is(F0)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet($S).map(i=>new GL(i));for(let i of this.plugins)i.update(this);this.observer=new LZ(this),this.inputState=new tZ(this),this.inputState.ensureHandlers(this.plugins),this.docView=new xF(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...t){let n=t.length==1&&t[0]instanceof ui?t:t.length==1&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(n,this)}update(t){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,s=!1,i,r=this.state;for(let _ of t){if(_.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=_.state}if(this.destroyed){this.viewState.state=r;return}let a=this.hasFocus,c=0,u=null;t.some(_=>_.annotation(d4))?(this.inputState.notifiedFocused=a,c=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,u=h4(r,a),u||(c=1));let h=this.observer.delayedAndroidKey,f=null;if(h?(this.observer.clearDelayedAndroidKey(),f=this.observer.readChange(),(f&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(f=null)):this.observer.clear(),r.facet($o.phrases)!=this.state.facet($o.phrases))return this.setState(r);i=jC.create(this,r,t),i.flags|=c;let p=this.viewState.scrollTarget;try{this.updateState=2;for(let _ of t){if(p&&(p=p.map(_.changes)),_.scrollIntoView){let{main:E}=_.state.selection;p=new fE(E.empty?E:xt.cursor(E.head,E.head>E.anchor?-1:1))}for(let E of _.effects)E.is(F0)&&(p=E.value.clip(this.state))}this.viewState.update(i,p),this.bidiCache=qC.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(IS)!=this.styleModules&&this.mountStyles(),s=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(_=>_.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(X0)!=i.state.facet(X0)&&(this.viewState.mustMeasureContent=!0),(n||s||p||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let _ of this.state.facet(Hk))try{_(i)}catch(E){kl(this.state,E,"update listener")}(u||f)&&Promise.resolve().then(()=>{u&&this.state==u.startState&&this.dispatch(u),f&&!i4(this,f)&&h.force&&hE(this.contentDOM,h.key,h.keyCode)})}setState(t){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=t;return}this.updateState=2;let n=this.hasFocus;try{for(let s of this.plugins)s.destroy(this);this.viewState=new nU(t),this.plugins=t.facet($S).map(s=>new GL(s)),this.pluginMap.clear();for(let s of this.plugins)s.update(this);this.docView.destroy(),this.docView=new xF(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(t){let n=t.startState.facet($S),s=t.state.facet($S);if(n!=s){let i=[];for(let r of s){let a=n.indexOf(r);if(a<0)i.push(new GL(r));else{let c=this.plugins[a];c.mustUpdate=t,i.push(c)}}for(let r of this.plugins)r.mustUpdate!=t&&r.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=t;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=s&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let t of this.plugins){let n=t.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(s){kl(this.state,s,"doc view update listener")}}}measure(t=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,t&&this.observer.forceFlush();let n=null,s=this.scrollDOM,i=s.scrollTop*this.scaleY,{scrollAnchorPos:r,scrollAnchorHeight:a}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let c=0;;c++){if(a<0)if(IX(s))r=-1,a=this.viewState.heightMap.height;else{let E=this.viewState.scrollAnchorAt(i);r=E.from,a=E.top}this.updateState=1;let u=this.viewState.measure(this);if(!u&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(c>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];u&4||([this.measureRequests,h]=[h,this.measureRequests]);let f=h.map(E=>{try{return E.read(this)}catch(v){return kl(this.state,v),rU}}),p=jC.create(this,this.state,[]),_=!1;p.flags|=u,n?n.flags|=u:n=p,this.updateState=2,p.empty||(this.updatePlugins(p),this.inputState.update(p),this.updateAttrs(),_=this.docView.update(p),_&&this.docViewUpdate());for(let E=0;E<h.length;E++)if(f[E]!=rU)try{let v=h[E];v.write&&v.write(f[E],this)}catch(v){kl(this.state,v)}if(_&&this.docView.updateSelection(!0),!p.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let v=(r<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(r).top)-a;if(v>1||v<-1){i=i+v,s.scrollTop=i/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let c of this.state.facet(Hk))c(n)}get themeClasses(){return zk+" "+(this.state.facet(Xk)?m4:g4)+" "+this.state.facet(X0)}updateAttrs(){let t=lU(this,ZX,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(dh)?"true":"false",class:"cm-content",style:`${_n.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),lU(this,IP,n);let s=this.observer.ignore(()=>{let i=Dk(this.contentDOM,this.contentAttrs,n),r=Dk(this.dom,this.editorAttrs,t);return i||r});return this.editorAttrs=t,this.contentAttrs=n,s}showAnnouncements(t){let n=!0;for(let s of t)for(let i of s.effects)if(i.is(hn.announce)){n&&(this.announceDOM.textContent=""),n=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(IS);let t=this.state.facet(hn.cspNonce);pp.mount(this.root,this.styleModules.concat(MZ).reverse(),t?{nonce:t}: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(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),t){if(this.measureRequests.indexOf(t)>-1)return;if(t.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===t.key){this.measureRequests[n]=t;return}}this.measureRequests.push(t)}}plugin(t){let n=this.pluginMap.get(t);return(n===void 0||n&&n.spec!=t)&&this.pluginMap.set(t,n=this.plugins.find(s=>s.spec==t)||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(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,n,s){return XL(this,t,VF(this,t,n,s))}moveByGroup(t,n){return XL(this,t,VF(this,t,n,s=>zJ(this,t.head,s)))}visualLineSide(t,n){let s=this.bidiSpans(t),i=this.textDirectionAt(t.from),r=s[n?s.length-1:0];return xt.cursor(r.side(n,i)+t.from,r.forward(!n,i)?1:-1)}moveToLineBoundary(t,n,s=!0){return XJ(this,t,n,s)}moveVertically(t,n,s){return XL(this,t,YJ(this,t,n,s))}domAtPos(t){return this.docView.domAtPos(t)}posAtDOM(t,n=0){return this.docView.posFromDOM(t,n)}posAtCoords(t,n=!0){return this.readMeasured(),s4(this,t,n)}coordsAtPos(t,n=1){this.readMeasured();let s=this.docView.coordsAt(t,n);if(!s||s.left==s.right)return s;let i=this.state.doc.lineAt(t),r=this.bidiSpans(i),a=r[op.find(r,t-i.from,-1,n)];return l$(s,a.dir==Rs.LTR==n>0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(jX)||t<this.viewport.from||t>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>NZ)return HX(t.length);let n=this.textDirectionAt(t.from),s;for(let r of this.bidiCache)if(r.from==t.from&&r.dir==n&&(r.fresh||UX(r.isolates,s=DF(this,t))))return r.order;s||(s=DF(this,t));let i=MJ(t.text,n,s);return this.bidiCache.push(new qC(t.from,t.to,n,s,!0,i)),i}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||_n.safari&&((t=this.inputState)===null||t===void 0?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{yX(this.contentDOM),this.docView.updateSelection()})}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((t.nodeType==9?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,n={}){return F0.of(new fE(typeof t=="number"?xt.cursor(t):t,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:n}=this.scrollDOM,s=this.viewState.scrollAnchorAt(t);return F0.of(new fE(xt.cursor(s.from),"start","start",s.top-t,n,!0))}setTabFocusMode(t){t==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof t=="boolean"?this.inputState.tabFocusMode=t?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return ei.define(()=>({}),{eventHandlers:t})}static domEventObservers(t){return ei.define(()=>({}),{eventObservers:t})}static theme(t,n){let s=pp.newName(),i=[X0.of(s),IS.of(Yk(`.${s}`,t))];return n&&n.dark&&i.push(Xk.of(!0)),i}static baseTheme(t){return Mp.lowest(IS.of(Yk("."+zk,t,_4)))}static findFromDOM(t){var n;let s=t.querySelector(".cm-content"),i=s&&hs.get(s)||hs.get(t);return((n=i==null?void 0:i.rootView)===null||n===void 0?void 0:n.view)||null}}hn.styleModule=IS;hn.inputHandler=YX;hn.clipboardInputFilter=yP;hn.clipboardOutputFilter=$P;hn.scrollHandler=qX;hn.focusChangeEffect=KX;hn.perLineTextDirection=jX;hn.exceptionSink=zX;hn.updateListener=Hk;hn.editable=dh;hn.mouseSelectionStyle=XX;hn.dragMovesSelection=WX;hn.clickAddsSelectionRange=GX;hn.decorations=gy;hn.outerDecorations=e4;hn.atomicRanges=RP;hn.bidiIsolatedRanges=t4;hn.scrollMargins=n4;hn.darkTheme=Xk;hn.cspNonce=mn.define({combine:e=>e.length?e[0]:""});hn.contentAttributes=IP;hn.editorAttributes=ZX;hn.lineWrapping=hn.contentAttributes.of({class:"cm-lineWrapping"});hn.announce=Qn.define();const NZ=4096,rU={};class qC{constructor(t,n,s,i,r,a){this.from=t,this.to=n,this.dir=s,this.isolates=i,this.fresh=r,this.order=a}static update(t,n){if(n.empty&&!t.some(r=>r.fresh))return t;let s=[],i=t.length?t[t.length-1].dir:Rs.LTR;for(let r=Math.max(0,t.length-10);r<t.length;r++){let a=t[r];a.dir==i&&!n.touchesRange(a.from,a.to)&&s.push(new qC(n.mapPos(a.from,1),n.mapPos(a.to,-1),a.dir,a.isolates,!1,a.order))}return s}}function lU(e,t,n){for(let s=e.state.facet(t),i=s.length-1;i>=0;i--){let r=s[i],a=typeof r=="function"?r(e):r;a&&Pk(a,n)}return n}const PZ=_n.mac?"mac":_n.windows?"win":_n.linux?"linux":"key";function DZ(e,t){const n=e.split(/-(?!$)/);let s=n[n.length-1];s=="Space"&&(s=" ");let i,r,a,c;for(let u=0;u<n.length-1;++u){const h=n[u];if(/^(cmd|meta|m)$/i.test(h))c=!0;else if(/^a(lt)?$/i.test(h))i=!0;else if(/^(c|ctrl|control)$/i.test(h))r=!0;else if(/^s(hift)?$/i.test(h))a=!0;else if(/^mod$/i.test(h))t=="mac"?c=!0:r=!0;else throw new Error("Unrecognized modifier name: "+h)}return i&&(s="Alt-"+s),r&&(s="Ctrl-"+s),c&&(s="Meta-"+s),a&&(s="Shift-"+s),s}function z0(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n!==!1&&t.shiftKey&&(e="Shift-"+e),e}const xZ=Mp.default(hn.domEventHandlers({keydown(e,t){return E4(T4(t.state),e,t,"editor")}})),u$=mn.define({enables:xZ}),aU=new WeakMap;function T4(e){let t=e.facet(u$),n=aU.get(t);return n||aU.set(t,n=UZ(t.reduce((s,i)=>s.concat(i),[]))),n}function BZ(e,t,n){return E4(T4(e.state),t,e,n)}let Zf=null;const FZ=4e3;function UZ(e,t=PZ){let n=Object.create(null),s=Object.create(null),i=(a,c)=>{let u=s[a];if(u==null)s[a]=c;else if(u!=c)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},r=(a,c,u,h,f)=>{var p,_;let E=n[a]||(n[a]=Object.create(null)),v=c.split(/ (?!$)/).map(S=>DZ(S,t));for(let S=1;S<v.length;S++){let L=v.slice(0,S).join(" ");i(L,!0),E[L]||(E[L]={preventDefault:!0,stopPropagation:!1,run:[I=>{let R=Zf={view:I,prefix:L,scope:a};return setTimeout(()=>{Zf==R&&(Zf=null)},FZ),!0}]})}let b=v.join(" ");i(b,!1);let y=E[b]||(E[b]={preventDefault:!1,stopPropagation:!1,run:((_=(p=E._any)===null||p===void 0?void 0:p.run)===null||_===void 0?void 0:_.slice())||[]});u&&y.run.push(u),h&&(y.preventDefault=!0),f&&(y.stopPropagation=!0)};for(let a of e){let c=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let h of c){let f=n[h]||(n[h]=Object.create(null));f._any||(f._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:p}=a;for(let _ in f)f[_].run.push(E=>p(E,Kk))}let u=a[t]||a.key;if(u)for(let h of c)r(h,u,a.run,a.preventDefault,a.stopPropagation),a.shift&&r(h,"Shift-"+u,a.shift,a.preventDefault,a.stopPropagation)}return n}let Kk=null;function E4(e,t,n,s){Kk=t;let i=dJ(t),r=Al(i,0),a=Bu(r)==i.length&&i!=" ",c="",u=!1,h=!1,f=!1;Zf&&Zf.view==n&&Zf.scope==s&&(c=Zf.prefix+" ",l4.indexOf(t.keyCode)<0&&(h=!0,Zf=null));let p=new Set,_=y=>{if(y){for(let S of y.run)if(!p.has(S)&&(p.add(S),S(n)))return y.stopPropagation&&(f=!0),!0;y.preventDefault&&(y.stopPropagation&&(f=!0),h=!0)}return!1},E=e[s],v,b;return E&&(_(E[c+z0(i,t,!a)])?u=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(_n.windows&&t.ctrlKey&&t.altKey)&&(v=gp[t.keyCode])&&v!=i?(_(E[c+z0(v,t,!0)])||t.shiftKey&&(b=fy[t.keyCode])!=i&&b!=v&&_(E[c+z0(b,t,!1)]))&&(u=!0):a&&t.shiftKey&&_(E[c+z0(i,t,!0)])&&(u=!0),!u&&_(E._any)&&(u=!0)),h&&(u=!0),u&&f&&t.stopPropagation(),Kk=null,u}class d${constructor(t,n,s,i,r){this.className=t,this.left=n,this.top=s,this.width=i,this.height=r}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,n){return n.className!=this.className?!1:(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",this.width!=null&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,n,s){if(s.empty){let i=t.coordsAtPos(s.head,s.assoc||1);if(!i)return[];let r=v4(t);return[new d$(n,i.left-r.left,i.top-r.top,null,i.bottom-i.top)]}else return HZ(t,n,s)}}function v4(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==Rs.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function cU(e,t,n,s){let i=e.coordsAtPos(t,n*2);if(!i)return s;let r=e.dom.getBoundingClientRect(),a=(i.top+i.bottom)/2,c=e.posAtCoords({x:r.left+1,y:a}),u=e.posAtCoords({x:r.right-1,y:a});return c==null||u==null?s:{from:Math.max(s.from,Math.min(c,u)),to:Math.min(s.to,Math.max(c,u))}}function HZ(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let s=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),r=e.textDirection==Rs.LTR,a=e.contentDOM,c=a.getBoundingClientRect(),u=v4(e),h=a.querySelector(".cm-line"),f=h&&window.getComputedStyle(h),p=c.left+(f?parseInt(f.paddingLeft)+Math.min(0,parseInt(f.textIndent)):0),_=c.right-(f?parseInt(f.paddingRight):0),E=Gk(e,s),v=Gk(e,i),b=E.type==sl.Text?E:null,y=v.type==sl.Text?v:null;if(b&&(e.lineWrapping||E.widgetLineBreaks)&&(b=cU(e,s,1,b)),y&&(e.lineWrapping||v.widgetLineBreaks)&&(y=cU(e,i,-1,y)),b&&y&&b.from==y.from&&b.to==y.to)return L(I(n.from,n.to,b));{let w=b?I(n.from,null,b):R(E,!1),k=y?I(null,n.to,y):R(v,!0),D=[];return(b||E).to<(y||v).from-(b&&y?1:0)||E.widgetLineBreaks>1&&w.bottom+e.defaultLineHeight/2<k.top?D.push(S(p,w.bottom,_,k.top)):w.bottom<k.top&&e.elementAtHeight((w.bottom+k.top)/2).type==sl.Text&&(w.bottom=k.top=(w.bottom+k.top)/2),L(w).concat(D).concat(L(k))}function S(w,k,D,P){return new d$(t,w-u.left,k-u.top,D-w,P-k)}function L({top:w,bottom:k,horizontal:D}){let P=[];for(let B=0;B<D.length;B+=2)P.push(S(D[B],w,D[B+1],k));return P}function I(w,k,D){let P=1e9,B=-1e9,F=[];function X(_e,J,Y,ae,Z){let Q=e.coordsAtPos(_e,_e==D.to?-2:2),he=e.coordsAtPos(Y,Y==D.from?2:-2);!Q||!he||(P=Math.min(Q.top,he.top,P),B=Math.max(Q.bottom,he.bottom,B),Z==Rs.LTR?F.push(r&&J?p:Q.left,r&&ae?_:he.right):F.push(!r&&ae?p:he.left,!r&&J?_:Q.right))}let G=w??D.from,re=k??D.to;for(let _e of e.visibleRanges)if(_e.to>G&&_e.from<re)for(let J=Math.max(_e.from,G),Y=Math.min(_e.to,re);;){let ae=e.state.doc.lineAt(J);for(let Z of e.bidiSpans(ae)){let Q=Z.from+ae.from,he=Z.to+ae.from;if(Q>=Y)break;he>J&&X(Math.max(Q,J),w==null&&Q<=G,Math.min(he,Y),k==null&&he>=re,Z.dir)}if(J=ae.to+1,J>=Y)break}return F.length==0&&X(G,w==null,re,k==null,e.textDirection),{top:P,bottom:B,horizontal:F}}function R(w,k){let D=c.top+(k?w.top:w.bottom);return{top:D,bottom:D,horizontal:[]}}}function VZ(e,t){return e.constructor==t.constructor&&e.eq(t)}class GZ{constructor(t,n){this.view=t,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=t.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(t.state),t.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,t)}update(t){t.startState.facet(qR)!=t.state.facet(qR)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&(this.scale(),t.view.requestMeasure(this.measureReq))}docViewUpdate(t){this.layer.updateOnDocViewUpdate!==!1&&t.requestMeasure(this.measureReq)}setOrder(t){let n=0,s=t.facet(qR);for(;n<s.length&&s[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:t,scaleY:n}=this.view;(t!=this.scaleX||n!=this.scaleY)&&(this.scaleX=t,this.scaleY=n,this.dom.style.transform=`scale(${1/t}, ${1/n})`)}draw(t){if(t.length!=this.drawn.length||t.some((n,s)=>!VZ(n,this.drawn[s]))){let n=this.dom.firstChild,s=0;for(let i of t)i.update&&n&&i.constructor&&this.drawn[s].constructor&&i.update(n,this.drawn[s])?(n=n.nextSibling,s++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=t}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const qR=mn.define();function b4(e){return[ei.define(t=>new GZ(t,e)),qR.of(e)]}const O4=!(_n.ios&&_n.webkit&&_n.webkit_version<534),my=mn.define({combine(e){return od(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,n)=>Math.min(t,n),drawRangeCursor:(t,n)=>t||n})}});function WZ(e={}){return[my.of(e),XZ,zZ,YZ,QX.of(!0)]}function S4(e){return e.startState.facet(my)!=e.state.facet(my)}const XZ=b4({above:!0,markers(e){let{state:t}=e,n=t.facet(my),s=[];for(let i of t.selection.ranges){let r=i==t.selection.main;if(i.empty?!r||O4:n.drawRangeCursor){let a=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",c=i.empty?i:xt.cursor(i.head,i.head>i.anchor?-1:1);for(let u of d$.forRange(e,a,c))s.push(u)}}return s},update(e,t){e.transactions.some(s=>s.selection)&&(t.style.animationName=t.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=S4(e);return n&&uU(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){uU(t.state,e)},class:"cm-cursorLayer"});function uU(e,t){t.style.animationDuration=e.facet(my).cursorBlinkRate+"ms"}const zZ=b4({above:!1,markers(e){return e.state.selection.ranges.map(t=>t.empty?[]:d$.forRange(e,"cm-selectionBackground",t)).reduce((t,n)=>t.concat(n))},update(e,t){return e.docChanged||e.selectionSet||e.viewportChanged||S4(e)},class:"cm-selectionLayer"}),jk={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};O4&&(jk[".cm-line"].caretColor=jk[".cm-content"].caretColor="transparent !important");const YZ=Mp.highest(hn.theme(jk)),y4=Qn.define({map(e,t){return e==null?null:t.mapPos(e)}}),MS=Wi.define({create(){return null},update(e,t){return e!=null&&(e=t.changes.mapPos(e)),t.effects.reduce((n,s)=>s.is(y4)?s.value:n,e)}}),KZ=ei.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let n=e.state.field(MS);n==null?this.cursor!=null&&((t=this.cursor)===null||t===void 0||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(MS)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,t=e.state.field(MS),n=t!=null&&e.coordsAtPos(t);if(!n)return null;let s=e.scrollDOM.getBoundingClientRect();return{left:n.left-s.left+e.scrollDOM.scrollLeft*e.scaleX,top:n.top-s.top+e.scrollDOM.scrollTop*e.scaleY,height:n.bottom-n.top}}drawCursor(e){if(this.cursor){let{scaleX:t,scaleY:n}=this.view;e?(this.cursor.style.left=e.left/t+"px",this.cursor.style.top=e.top/n+"px",this.cursor.style.height=e.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(MS)!=e&&this.view.dispatch({effects:y4.of(e)})}},{eventObservers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){(e.target==this.view.contentDOM||!this.view.contentDOM.contains(e.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function jZ(){return[MS,KZ]}function dU(e,t,n,s,i){t.lastIndex=0;for(let r=e.iterRange(n,s),a=n,c;!r.next().done;a+=r.value.length)if(!r.lineBreak)for(;c=t.exec(r.value);)i(a+c.index,c)}function QZ(e,t){let n=e.visibleRanges;if(n.length==1&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;let s=[];for(let{from:i,to:r}of n)i=Math.max(e.state.doc.lineAt(i).from,i-t),r=Math.min(e.state.doc.lineAt(r).to,r+t),s.length&&s[s.length-1].to>=i?s[s.length-1].to=r:s.push({from:i,to:r});return s}class qZ{constructor(t){const{regexp:n,decoration:s,decorate:i,boundary:r,maxLength:a=1e3}=t;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(c,u,h,f)=>i(f,h,h+c[0].length,c,u);else if(typeof s=="function")this.addMatch=(c,u,h,f)=>{let p=s(c,u,h);p&&f(h,h+c[0].length,p)};else if(s)this.addMatch=(c,u,h,f)=>f(h,h+c[0].length,s);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=a}createDeco(t){let n=new vh,s=n.add.bind(n);for(let{from:i,to:r}of QZ(t,this.maxLength))dU(t.state.doc,this.regexp,i,r,(a,c)=>this.addMatch(c,t,a,s));return n.finish()}updateDeco(t,n){let s=1e9,i=-1;return t.docChanged&&t.changes.iterChanges((r,a,c,u)=>{u>=t.view.viewport.from&&c<=t.view.viewport.to&&(s=Math.min(c,s),i=Math.max(u,i))}),t.viewportMoved||i-s>1e3?this.createDeco(t.view):i>-1?this.updateRange(t.view,n.map(t.changes),s,i):n}updateRange(t,n,s,i){for(let r of t.visibleRanges){let a=Math.max(r.from,s),c=Math.min(r.to,i);if(c>a){let u=t.state.doc.lineAt(a),h=u.to<c?t.state.doc.lineAt(c):u,f=Math.max(r.from,u.from),p=Math.min(r.to,h.to);if(this.boundary){for(;a>u.from;a--)if(this.boundary.test(u.text[a-1-u.from])){f=a;break}for(;c<h.to;c++)if(this.boundary.test(h.text[c-h.from])){p=c;break}}let _=[],E,v=(b,y,S)=>_.push(S.range(b,y));if(u==h)for(this.regexp.lastIndex=f-u.from;(E=this.regexp.exec(u.text))&&E.index<p-u.from;)this.addMatch(E,t,E.index+u.from,v);else dU(t.state.doc,this.regexp,f,p,(b,y)=>this.addMatch(y,t,b,v));n=n.update({filterFrom:f,filterTo:p,filter:(b,y)=>b<f||y>p,add:_})}}return n}}const Qk=/x/.unicode!=null?"gu":"g",JZ=new RegExp(`[\0-\b
  1836. --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Qk),ZZ={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let KL=null;function eee(){var e;if(KL==null&&typeof document<"u"&&document.body){let t=document.body.style;KL=((e=t.tabSize)!==null&&e!==void 0?e:t.MozTabSize)!=null}return KL||!1}const JR=mn.define({combine(e){let t=od(e,{render:null,specialChars:JZ,addSpecialChars:null});return(t.replaceTabs=!eee())&&(t.specialChars=new RegExp(" |"+t.specialChars.source,Qk)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,Qk)),t}});function tee(e={}){return[JR.of(e),nee()]}let hU=null;function nee(){return hU||(hU=ei.fromClass(class{constructor(e){this.view=e,this.decorations=wn.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(JR)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new qZ({regexp:e.specialChars,decoration:(t,n,s)=>{let{doc:i}=n.state,r=Al(t[0],0);if(r==9){let a=i.lineAt(s),c=n.state.tabSize,u=sv(a.text,c,s-a.from);return wn.replace({widget:new ree((c-u%c)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=wn.replace({widget:new iee(e,r)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(JR);e.startState.facet(JR)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))}const oee="•";function see(e){return e>=32?oee:e==10?"␤":String.fromCharCode(9216+e)}class iee extends sd{constructor(t,n){super(),this.options=t,this.code=n}eq(t){return t.code==this.code}toDOM(t){let n=see(this.code),s=t.state.phrase("Control character")+" "+(ZZ[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,s,n);if(i)return i;let r=document.createElement("span");return r.textContent=n,r.title=s,r.setAttribute("aria-label",s),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class ree extends sd{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent=" ",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}function lee(){return cee}const aee=wn.line({class:"cm-activeLine"}),cee=ei.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let s of e.state.selection.ranges){let i=e.lineBlockAt(s.head);i.from>t&&(n.push(aee.range(i.from)),t=i.from)}return wn.set(n)}},{decorations:e=>e.decorations});class uee extends sd{constructor(t){super(),this.content=t}toDOM(t){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(t):this.content.cloneNode(!0)),typeof this.content=="string"?n.setAttribute("aria-label","placeholder "+this.content):n.setAttribute("aria-hidden","true"),n}coordsAt(t){let n=t.firstChild?CE(t.firstChild):[];if(!n.length)return null;let s=window.getComputedStyle(t.parentNode),i=l$(n[0],s.direction!="rtl"),r=parseInt(s.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 dee(e){return ei.fromClass(class{constructor(t){this.view=t,this.placeholder=e?wn.set([wn.widget({widget:new uee(e),side:1}).range(0)]):wn.none}get decorations(){return this.view.state.doc.length?wn.none:this.placeholder}},{decorations:t=>t.decorations})}const qk=2e3;function hee(e,t,n){let s=Math.min(t.line,n.line),i=Math.max(t.line,n.line),r=[];if(t.off>qk||n.off>qk||t.col<0||n.col<0){let a=Math.min(t.off,n.off),c=Math.max(t.off,n.off);for(let u=s;u<=i;u++){let h=e.doc.line(u);h.length<=c&&r.push(xt.range(h.from+a,h.to+c))}}else{let a=Math.min(t.col,n.col),c=Math.max(t.col,n.col);for(let u=s;u<=i;u++){let h=e.doc.line(u),f=Ck(h.text,a,e.tabSize,!0);if(f<0)r.push(xt.cursor(h.to));else{let p=Ck(h.text,c,e.tabSize);r.push(xt.range(h.from+f,h.from+p))}}}return r}function fee(e,t){let n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}function fU(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),s=e.state.doc.lineAt(n),i=n-s.from,r=i>qk?-1:i==s.length?fee(e,t.clientX):sv(s.text,e.state.tabSize,n-s.from);return{line:s.number,col:r,off:i}}function pee(e,t){let n=fU(e,t),s=e.state.selection;return n?{update(i){if(i.docChanged){let r=i.changes.mapPos(i.startState.doc.line(n.line).from),a=i.state.doc.lineAt(r);n={line:a.number,col:n.col,off:Math.min(n.off,a.length)},s=s.map(i.changes)}},get(i,r,a){let c=fU(e,i);if(!c)return s;let u=hee(e.state,n,c);return u.length?a?xt.create(u.concat(s.ranges)):xt.create(u):s}}:null}function gee(e){let t=n=>n.altKey&&n.button==0;return hn.mouseSelectionStyle.of((n,s)=>t(s)?pee(n,s):null)}const mee={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},_ee={style:"cursor: crosshair"};function Tee(e={}){let[t,n]=mee[e.key||"Alt"],s=ei.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==t||n(i))},keyup(i){(i.keyCode==t||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[s,hn.contentAttributes.of(i=>{var r;return!((r=i.plugin(s))===null||r===void 0)&&r.isDown?_ee:null})]}const hS="-10000px";class $4{constructor(t,n,s,i){this.facet=n,this.createTooltipView=s,this.removeTooltipView=i,this.input=t.state.facet(n),this.tooltips=this.input.filter(a=>a);let r=null;this.tooltipViews=this.tooltips.map(a=>r=s(a,r))}update(t,n){var s;let i=t.state.facet(this.facet),r=i.filter(u=>u);if(i===this.input){for(let u of this.tooltipViews)u.update&&u.update(t);return!1}let a=[],c=n?[]:null;for(let u=0;u<r.length;u++){let h=r[u],f=-1;if(h){for(let p=0;p<this.tooltips.length;p++){let _=this.tooltips[p];_&&_.create==h.create&&(f=p)}if(f<0)a[u]=this.createTooltipView(h,u?a[u-1]:null),c&&(c[u]=!!h.above);else{let p=a[u]=this.tooltipViews[f];c&&(c[u]=n[f]),p.update&&p.update(t)}}}for(let u of this.tooltipViews)a.indexOf(u)<0&&(this.removeTooltipView(u),(s=u.destroy)===null||s===void 0||s.call(u));return n&&(c.forEach((u,h)=>n[h]=u),n.length=c.length),this.input=i,this.tooltips=r,this.tooltipViews=a,!0}}function Eee(e){let{win:t}=e;return{top:0,left:0,bottom:t.innerHeight,right:t.innerWidth}}const jL=mn.define({combine:e=>{var t,n,s;return{position:_n.ios?"absolute":((t=e.find(i=>i.position))===null||t===void 0?void 0:t.position)||"fixed",parent:((n=e.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((s=e.find(i=>i.tooltipSpace))===null||s===void 0?void 0:s.tooltipSpace)||Eee}}}),pU=new WeakMap,wP=ei.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(jL);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new $4(e,kP,(n,s)=>this.createTooltip(n,s),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),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(),e.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 e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let n=t||e.geometryChanged,s=e.state.facet(jL);if(s.position!=this.position&&!this.madeAbsolute){this.position=s.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(s.parent!=this.parent){this.parent&&this.container.remove(),this.parent=s.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),s=t?t.dom:null;if(n.dom.classList.add("cm-tooltip"),e.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=hS,n.dom.style.left="0px",this.container.insertBefore(n.dom,s),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let s of this.manager.tooltipViews)s.dom.remove(),(e=s.destroy)===null||e===void 0||e.call(s);this.parent&&this.container.remove(),(t=this.resizeObserver)===null||t===void 0||t.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:r}=this.manager.tooltipViews[0];if(_n.gecko)n=r.offsetParent!=this.container.ownerDocument.body;else if(r.style.top==hS&&r.style.left=="0px"){let a=r.getBoundingClientRect();n=Math.abs(a.top+1e4)>1||Math.abs(a.left)>1}}if(n||this.position=="absolute")if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(e=r.width/this.parent.offsetWidth,t=r.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);let s=this.view.scrollDOM.getBoundingClientRect(),i=CP(this.view);return{visible:{left:s.left+i.left,top:s.top+i.top,right:s.right-i.right,bottom:s.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((r,a)=>{let c=this.manager.tooltipViews[a];return c.getCoords?c.getCoords(r.pos):this.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(({dom:r})=>r.getBoundingClientRect()),space:this.view.state.facet(jL).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(e){var t;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let c of this.manager.tooltipViews)c.dom.style.position="absolute"}let{visible:n,space:s,scaleX:i,scaleY:r}=e,a=[];for(let c=0;c<this.manager.tooltips.length;c++){let u=this.manager.tooltips[c],h=this.manager.tooltipViews[c],{dom:f}=h,p=e.pos[c],_=e.size[c];if(!p||u.clip!==!1&&(p.bottom<=Math.max(n.top,s.top)||p.top>=Math.min(n.bottom,s.bottom)||p.right<Math.max(n.left,s.left)-.1||p.left>Math.min(n.right,s.right)+.1)){f.style.top=hS;continue}let E=u.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,v=E?7:0,b=_.right-_.left,y=(t=pU.get(h))!==null&&t!==void 0?t:_.bottom-_.top,S=h.offset||bee,L=this.view.textDirection==Rs.LTR,I=_.width>s.right-s.left?L?s.left:s.right-_.width:L?Math.max(s.left,Math.min(p.left-(E?14:0)+S.x,s.right-b)):Math.min(Math.max(s.left,p.left-b+(E?14:0)-S.x),s.right-b),R=this.above[c];!u.strictSide&&(R?p.top-y-v-S.y<s.top:p.bottom+y+v+S.y>s.bottom)&&R==s.bottom-p.bottom>p.top-s.top&&(R=this.above[c]=!R);let w=(R?p.top-s.top:s.bottom-p.bottom)-v;if(w<y&&h.resize!==!1){if(w<this.view.defaultLineHeight){f.style.top=hS;continue}pU.set(h,y),f.style.height=(y=w)/r+"px"}else f.style.height&&(f.style.height="");let k=R?p.top-y-v-S.y:p.bottom+v+S.y,D=I+b;if(h.overlap!==!0)for(let P of a)P.left<D&&P.right>I&&P.top<k+y&&P.bottom>k&&(k=R?P.top-y-2-v:P.bottom+v+2);if(this.position=="absolute"?(f.style.top=(k-e.parent.top)/r+"px",gU(f,(I-e.parent.left)/i)):(f.style.top=k/r+"px",gU(f,I/i)),E){let P=p.left+(L?S.x:-S.x)-(I+14-7);E.style.left=P/i+"px"}h.overlap!==!0&&a.push({left:I,top:k,right:D,bottom:k+y}),f.classList.toggle("cm-tooltip-above",R),f.classList.toggle("cm-tooltip-below",!R),h.positioned&&h.positioned(e.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 e of this.manager.tooltipViews)e.dom.style.top=hS}},{eventObservers:{scroll(){this.maybeMeasure()}}});function gU(e,t){let n=parseInt(e.style.left,10);(isNaN(n)||Math.abs(t-n)>1)&&(e.style.left=t+"px")}const vee=hn.baseTheme({".cm-tooltip":{zIndex:500,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"}}}),bee={x:0,y:0},kP=mn.define({enables:[wP,vee]}),JC=mn.define({combine:e=>e.reduce((t,n)=>t.concat(n),[])});class aA{static create(t){return new aA(t)}constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new $4(t,JC,(n,s)=>this.createHostedView(n,s),n=>n.dom.remove())}createHostedView(t,n){let s=t.create(this.view);return s.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(s.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&s.mount&&s.mount(this.view),s}mount(t){for(let n of this.manager.tooltipViews)n.mount&&n.mount(t);this.mounted=!0}positioned(t){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(t)}update(t){this.manager.update(t)}destroy(){var t;for(let n of this.manager.tooltipViews)(t=n.destroy)===null||t===void 0||t.call(n)}passProp(t){let n;for(let s of this.manager.tooltipViews){let i=s[t];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)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")}}const Oee=kP.compute([JC],e=>{let t=e.facet(JC);return t.length===0?null:{pos:Math.min(...t.map(n=>n.pos)),end:Math.max(...t.map(n=>{var s;return(s=n.end)!==null&&s!==void 0?s:n.pos})),create:aA.create,above:t[0].above,arrow:t.some(n=>n.arrow)}});class See{constructor(t,n,s,i,r){this.view=t,this.source=n,this.field=s,this.setHover=i,this.hoverTime=r,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let t=Date.now()-this.lastMove.time;t<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-t):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:t,lastMove:n}=this,s=t.docView.nearest(n.target);if(!s)return;let i,r=1;if(s instanceof np)i=s.posAtStart;else{if(i=t.posAtCoords(n),i==null)return;let c=t.coordsAtPos(i);if(!c||n.y<c.top||n.y>c.bottom||n.x<c.left-t.defaultCharacterWidth||n.x>c.right+t.defaultCharacterWidth)return;let u=t.bidiSpans(t.state.doc.lineAt(i)).find(f=>f.from<=i&&f.to>=i),h=u&&u.dir==Rs.RTL?-1:1;r=n.x<c.left?-h:h}let a=this.source(t,i,r);if(a!=null&&a.then){let c=this.pending={pos:i};a.then(u=>{this.pending==c&&(this.pending=null,u&&!(Array.isArray(u)&&!u.length)&&t.dispatch({effects:this.setHover.of(Array.isArray(u)?u:[u])}))},u=>kl(t.state,u,"hover tooltip"))}else a&&!(Array.isArray(a)&&!a.length)&&t.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])})}get tooltip(){let t=this.view.plugin(wP),n=t?t.manager.tooltips.findIndex(s=>s.create==aA.create):-1;return n>-1?t.manager.tooltipViews[n]:null}mousemove(t){var n,s;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:r}=this;if(i.length&&r&&!yee(r.dom,t)||this.pending){let{pos:a}=i[0]||this.pending,c=(s=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&s!==void 0?s:a;(a==c?this.view.posAtCoords(this.lastMove)!=a:!$ee(this.view,a,c,t.clientX,t.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:s}=this;s&&s.dom.contains(t.relatedTarget)?this.watchTooltipLeave(s.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(t){let n=s=>{t.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(s.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};t.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Y0=4;function yee(e,t){let{left:n,right:s,top:i,bottom:r}=e.getBoundingClientRect(),a;if(a=e.querySelector(".cm-tooltip-arrow")){let c=a.getBoundingClientRect();i=Math.min(c.top,i),r=Math.max(c.bottom,r)}return t.clientX>=n-Y0&&t.clientX<=s+Y0&&t.clientY>=i-Y0&&t.clientY<=r+Y0}function $ee(e,t,n,s,i,r){let a=e.scrollDOM.getBoundingClientRect(),c=e.documentTop+e.documentPadding.top+e.contentHeight;if(a.left>s||a.right<s||a.top>i||Math.min(a.bottom,c)<i)return!1;let u=e.posAtCoords({x:s,y:i},!1);return u>=t&&u<=n}function Iee(e,t={}){let n=Qn.define(),s=Wi.define({create(){return[]},update(i,r){if(i.length&&(t.hideOnChange&&(r.docChanged||r.selection)?i=[]:t.hideOn&&(i=i.filter(a=>!t.hideOn(r,a))),r.docChanged)){let a=[];for(let c of i){let u=r.changes.mapPos(c.pos,-1,tr.TrackDel);if(u!=null){let h=Object.assign(Object.create(null),c);h.pos=u,h.end!=null&&(h.end=r.changes.mapPos(h.end)),a.push(h)}}i=a}for(let a of r.effects)a.is(n)&&(i=a.value),a.is(Ree)&&(i=[]);return i},provide:i=>JC.from(i)});return{active:s,extension:[s,ei.define(i=>new See(i,e,s,n,t.hoverTime||300)),Oee]}}function I4(e,t){let n=e.plugin(wP);if(!n)return null;let s=n.manager.tooltips.indexOf(t);return s<0?null:n.manager.tooltipViews[s]}const Ree=Qn.define(),mU=mn.define({combine(e){let t,n;for(let s of e)t=t||s.topContainer,n=n||s.bottomContainer;return{topContainer:t,bottomContainer:n}}});function _y(e,t){let n=e.plugin(R4),s=n?n.specs.indexOf(t):-1;return s>-1?n.panels[s]:null}const R4=ei.fromClass(class{constructor(e){this.input=e.state.facet(Ty),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(e));let t=e.state.facet(mU);this.top=new K0(e,!0,t.topContainer),this.bottom=new K0(e,!1,t.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(e){let t=e.state.facet(mU);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new K0(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new K0(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(Ty);if(n!=this.input){let s=n.filter(u=>u),i=[],r=[],a=[],c=[];for(let u of s){let h=this.specs.indexOf(u),f;h<0?(f=u(e.view),c.push(f)):(f=this.panels[h],f.update&&f.update(e)),i.push(f),(f.top?r:a).push(f)}this.specs=s,this.panels=i,this.top.sync(r),this.bottom.sync(a);for(let u of c)u.dom.classList.add("cm-panel"),u.mount&&u.mount()}else for(let s of this.panels)s.update&&s.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>hn.scrollMargins.of(t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class K0{constructor(t,n,s){this.view=t,this.top=n,this.container=s,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let n of this.panels)n.destroy&&t.indexOf(n)<0&&n.destroy();this.panels=t,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 t=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;t!=n.dom;)t=_U(t);t=t.nextSibling}else this.dom.insertBefore(n.dom,t);for(;t;)t=_U(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function _U(e){let t=e.nextSibling;return e.remove(),t}const Ty=mn.define({enables:R4});class Oh extends Cm{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}Oh.prototype.elementClass="";Oh.prototype.toDOM=void 0;Oh.prototype.mapMode=tr.TrackBefore;Oh.prototype.startSide=Oh.prototype.endSide=-1;Oh.prototype.point=!0;const ZR=mn.define(),Cee=mn.define(),Mee={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>No.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},zS=mn.define();function Aee(e){return[C4(),zS.of(Object.assign(Object.assign({},Mee),e))]}const TU=mn.define({combine:e=>e.some(t=>t)});function C4(e){return[Lee]}const Lee=ei.fromClass(class{constructor(e){this.view=e,this.prevViewport=e.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=e.state.facet(zS).map(t=>new vU(e,t));for(let t of this.gutters)this.dom.appendChild(t.dom);this.fixed=!e.state.facet(TU),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,s=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(s<(n.to-n.from)*.8)}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(TU)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&this.dom.remove();let n=No.iter(this.view.state.facet(ZR),this.view.viewport.from),s=[],i=this.gutters.map(r=>new wee(r,this.view.viewport,-this.view.documentPadding.top));for(let r of this.view.viewportLineBlocks)if(s.length&&(s=[]),Array.isArray(r.type)){let a=!0;for(let c of r.type)if(c.type==sl.Text&&a){Jk(n,s,c.from);for(let u of i)u.line(this.view,c,s);a=!1}else if(c.widget)for(let u of i)u.widget(this.view,c)}else if(r.type==sl.Text){Jk(n,s,r.from);for(let a of i)a.line(this.view,r,s)}else if(r.widget)for(let a of i)a.widget(this.view,r);for(let r of i)r.finish();e&&this.view.scrollDOM.insertBefore(this.dom,t)}updateGutters(e){let t=e.startState.facet(zS),n=e.state.facet(zS),s=e.docChanged||e.heightChanged||e.viewportChanged||!No.eq(e.startState.facet(ZR),e.state.facet(ZR),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let i of this.gutters)i.update(e)&&(s=!0);else{s=!0;let i=[];for(let r of n){let a=t.indexOf(r);a<0?i.push(new vU(this.view,r)):(this.gutters[a].update(e),i.push(this.gutters[a]))}for(let r of this.gutters)r.dom.remove(),i.indexOf(r)<0&&r.destroy();for(let r of i)this.dom.appendChild(r.dom);this.gutters=i}return s}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove()}},{provide:e=>hn.scrollMargins.of(t=>{let n=t.plugin(e);return!n||n.gutters.length==0||!n.fixed?null:t.textDirection==Rs.LTR?{left:n.dom.offsetWidth*t.scaleX}:{right:n.dom.offsetWidth*t.scaleX}})});function EU(e){return Array.isArray(e)?e:[e]}function Jk(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class wee{constructor(t,n,s){this.gutter=t,this.height=s,this.i=0,this.cursor=No.iter(t.markers,n.from)}addElement(t,n,s){let{gutter:i}=this,r=(n.top-this.height)/t.scaleY,a=n.height/t.scaleY;if(this.i==i.elements.length){let c=new M4(t,a,r,s);i.elements.push(c),i.dom.appendChild(c.dom)}else i.elements[this.i].update(t,a,r,s);this.height=n.bottom,this.i++}line(t,n,s){let i=[];Jk(this.cursor,i,n.from),s.length&&(i=i.concat(s));let r=this.gutter.config.lineMarker(t,n,i);r&&i.unshift(r);let a=this.gutter;i.length==0&&!a.config.renderEmptyElements||this.addElement(t,n,i)}widget(t,n){let s=this.gutter.config.widgetMarker(t,n.widget,n),i=s?[s]:null;for(let r of t.state.facet(Cee)){let a=r(t,n.widget,n);a&&(i||(i=[])).push(a)}i&&this.addElement(t,n,i)}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let n=t.elements.pop();t.dom.removeChild(n.dom),n.destroy()}}}class vU{constructor(t,n){this.view=t,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 s in n.domEventHandlers)this.dom.addEventListener(s,i=>{let r=i.target,a;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let u=r.getBoundingClientRect();a=(u.top+u.bottom)/2}else a=i.clientY;let c=t.lineBlockAtHeight(a-t.documentTop);n.domEventHandlers[s](t,c,i)&&i.preventDefault()});this.markers=EU(n.markers(t)),n.initialSpacer&&(this.spacer=new M4(t,0,0,[n.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let n=this.markers;if(this.markers=EU(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],t);i!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[i])}let s=t.view.viewport;return!No.eq(this.markers,n,s.from,s.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(t):!1)}destroy(){for(let t of this.elements)t.destroy()}}class M4{constructor(t,n,s,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,n,s,i)}update(t,n,s,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=s&&(this.dom.style.marginTop=(this.above=s)?s+"px":""),kee(this.markers,i)||this.setMarkers(t,i)}setMarkers(t,n){let s="cm-gutterElement",i=this.dom.firstChild;for(let r=0,a=0;;){let c=a,u=r<n.length?n[r++]:null,h=!1;if(u){let f=u.elementClass;f&&(s+=" "+f);for(let p=a;p<this.markers.length;p++)if(this.markers[p].compare(u)){c=p,h=!0;break}}else c=this.markers.length;for(;a<c;){let f=this.markers[a++];if(f.toDOM){f.destroy(i);let p=i.nextSibling;i.remove(),i=p}}if(!u)break;u.toDOM&&(h?i=i.nextSibling:this.dom.insertBefore(u.toDOM(t),i)),h&&a++}this.dom.className=s,this.markers=n}destroy(){this.setMarkers(null,[])}}function kee(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}const Nee=mn.define(),Pee=mn.define(),tE=mn.define({combine(e){return od(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,n){let s=Object.assign({},t);for(let i in n){let r=s[i],a=n[i];s[i]=r?(c,u,h)=>r(c,u,h)||a(c,u,h):a}return s}})}});class QL extends Oh{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function qL(e,t){return e.state.facet(tE).formatNumber(t,e.state)}const Dee=zS.compute([tE],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(t){return t.state.facet(Nee)},lineMarker(t,n,s){return s.some(i=>i.toDOM)?null:new QL(qL(t,t.state.doc.lineAt(n.from).number))},widgetMarker:(t,n,s)=>{for(let i of t.state.facet(Pee)){let r=i(t,n,s);if(r)return r}return null},lineMarkerChange:t=>t.startState.facet(tE)!=t.state.facet(tE),initialSpacer(t){return new QL(qL(t,bU(t.state.doc.lines)))},updateSpacer(t,n){let s=qL(n.view,bU(n.view.state.doc.lines));return s==t.number?t:new QL(s)},domEventHandlers:e.facet(tE).domEventHandlers}));function xee(e={}){return[tE.of(e),C4(),Dee]}function bU(e){let t=9;for(;t<e;)t=t*10+9;return t}const Bee=new class extends Oh{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},Fee=ZR.compute(["selection"],e=>{let t=[],n=-1;for(let s of e.selection.ranges){let i=e.doc.lineAt(s.head).from;i>n&&(n=i,t.push(Bee.range(i)))}return No.of(t)});function Uee(){return Fee}const A4=1024;let Hee=0;class JL{constructor(t,n){this.from=t,this.to=n}}class Eo{constructor(t={}){this.id=Hee++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof t!="function"&&(t=Ul.match(t)),n=>{let s=t(n);return s===void 0?null:[this,s]}}}Eo.closedBy=new Eo({deserialize:e=>e.split(" ")});Eo.openedBy=new Eo({deserialize:e=>e.split(" ")});Eo.group=new Eo({deserialize:e=>e.split(" ")});Eo.isolate=new Eo({deserialize:e=>{if(e&&e!="rtl"&&e!="ltr"&&e!="auto")throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}});Eo.contextHash=new Eo({perNode:!0});Eo.lookAhead=new Eo({perNode:!0});Eo.mounted=new Eo({perNode:!0});class ZC{constructor(t,n,s){this.tree=t,this.overlay=n,this.parser=s}static get(t){return t&&t.props&&t.props[Eo.mounted.id]}}const Vee=Object.create(null);class Ul{constructor(t,n,s,i=0){this.name=t,this.props=n,this.id=s,this.flags=i}static define(t){let n=t.props&&t.props.length?Object.create(null):Vee,s=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new Ul(t.name||"",n,t.id,s);if(t.props){for(let r of t.props)if(Array.isArray(r)||(r=r(i)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[r[0].id]=r[1]}}return i}prop(t){return this.props[t.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(t){if(typeof t=="string"){if(this.name==t)return!0;let n=this.prop(Eo.group);return n?n.indexOf(t)>-1:!1}return this.id==t}static match(t){let n=Object.create(null);for(let s in t)for(let i of s.split(" "))n[i]=t[s];return s=>{for(let i=s.prop(Eo.group),r=-1;r<(i?i.length:0);r++){let a=n[r<0?s.name:i[r]];if(a)return a}}}}Ul.none=new Ul("",Object.create(null),0,8);class NP{constructor(t){this.types=t;for(let n=0;n<t.length;n++)if(t[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let n=[];for(let s of this.types){let i=null;for(let r of t){let a=r(s);a&&(i||(i=Object.assign({},s.props)),i[a[0].id]=a[1])}n.push(i?new Ul(s.name,i,s.id,s.flags):s)}return new NP(n)}}const j0=new WeakMap,OU=new WeakMap;var $i;(function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"})($i||($i={}));let or=class Zk{constructor(t,n,s,i,r){if(this.type=t,this.children=n,this.positions=s,this.length=i,this.props=null,r&&r.length){this.props=Object.create(null);for(let[a,c]of r)this.props[typeof a=="number"?a:a.id]=c}}toString(){let t=ZC.get(this);if(t&&!t.overlay)return t.tree.toString();let n="";for(let s of this.children){let i=s.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(t=0){return new tN(this.topNode,t)}cursorAt(t,n=0,s=0){let i=j0.get(this)||this.topNode,r=new tN(i);return r.moveTo(t,n),j0.set(this,r._tree),r}get topNode(){return new Dl(this,0,0,null)}resolve(t,n=0){let s=Ey(j0.get(this)||this.topNode,t,n,!1);return j0.set(this,s),s}resolveInner(t,n=0){let s=Ey(OU.get(this)||this.topNode,t,n,!0);return OU.set(this,s),s}resolveStack(t,n=0){return Xee(this,t,n)}iterate(t){let{enter:n,leave:s,from:i=0,to:r=this.length}=t,a=t.mode||0,c=(a&$i.IncludeAnonymous)>0;for(let u=this.cursor(a|$i.IncludeAnonymous);;){let h=!1;if(u.from<=r&&u.to>=i&&(!c&&u.type.isAnonymous||n(u)!==!1)){if(u.firstChild())continue;h=!0}for(;h&&s&&(c||!u.type.isAnonymous)&&s(u),!u.nextSibling();){if(!u.parent())return;h=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let n in this.props)t.push([+n,this.props[n]]);return t}balance(t={}){return this.children.length<=8?this:xP(Ul.none,this.children,this.positions,0,this.children.length,0,this.length,(n,s,i)=>new Zk(this.type,n,s,i,this.propValues),t.makeTree||((n,s,i)=>new Zk(Ul.none,n,s,i)))}static build(t){return zee(t)}};or.empty=new or(Ul.none,[],[],0);class PP{constructor(t,n){this.buffer=t,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 PP(this.buffer,this.index)}}class _p{constructor(t,n,s){this.buffer=t,this.length=n,this.set=s}get type(){return Ul.none}toString(){let t=[];for(let n=0;n<this.buffer.length;)t.push(this.childString(n)),n=this.buffer[n+3];return t.join(",")}childString(t){let n=this.buffer[t],s=this.buffer[t+3],i=this.set.types[n],r=i.name;if(/\W/.test(r)&&!i.isError&&(r=JSON.stringify(r)),t+=4,s==t)return r;let a=[];for(;t<s;)a.push(this.childString(t)),t=this.buffer[t+3];return r+"("+a.join(",")+")"}findChild(t,n,s,i,r){let{buffer:a}=this,c=-1;for(let u=t;u!=n&&!(L4(r,i,a[u+1],a[u+2])&&(c=u,s>0));u=a[u+3]);return c}slice(t,n,s){let i=this.buffer,r=new Uint16Array(n-t),a=0;for(let c=t,u=0;c<n;){r[u++]=i[c++],r[u++]=i[c++]-s;let h=r[u++]=i[c++]-s;r[u++]=i[c++]-t,a=Math.max(a,h)}return new _p(r,a,this.set)}}function L4(e,t,n,s){switch(e){case-2:return n<t;case-1:return s>=t&&n<t;case 0:return n<t&&s>t;case 1:return n<=t&&s>t;case 2:return s>t;case 4:return!0}}function Ey(e,t,n,s){for(var i;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let a=!s&&e instanceof Dl&&e.index<0?null:e.parent;if(!a)return e;e=a}let r=s?0:$i.IgnoreOverlays;if(s)for(let a=e,c=a.parent;c;a=c,c=a.parent)a instanceof Dl&&a.index<0&&((i=c.enter(t,n,r))===null||i===void 0?void 0:i.from)!=a.from&&(e=c);for(;;){let a=e.enter(t,n,r);if(!a)return e;e=a}}class w4{cursor(t=0){return new tN(this,t)}getChild(t,n=null,s=null){let i=SU(this,t,n,s);return i.length?i[0]:null}getChildren(t,n=null,s=null){return SU(this,t,n,s)}resolve(t,n=0){return Ey(this,t,n,!1)}resolveInner(t,n=0){return Ey(this,t,n,!0)}matchContext(t){return eN(this.parent,t)}enterUnfinishedNodesBefore(t){let n=this.childBefore(t),s=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(s=n,n=i.prevSibling):n=i}return s}get node(){return this}get next(){return this.parent}}class Dl extends w4{constructor(t,n,s,i){super(),this._tree=t,this.from=n,this.index=s,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,s,i,r=0){for(let a=this;;){for(let{children:c,positions:u}=a._tree,h=n>0?c.length:-1;t!=h;t+=n){let f=c[t],p=u[t]+a.from;if(L4(i,s,p,p+f.length)){if(f instanceof _p){if(r&$i.ExcludeBuffers)continue;let _=f.findChild(0,f.buffer.length,n,s-p,i);if(_>-1)return new Vu(new Gee(a,f,t,p),null,_)}else if(r&$i.IncludeAnonymous||!f.type.isAnonymous||DP(f)){let _;if(!(r&$i.IgnoreMounts)&&(_=ZC.get(f))&&!_.overlay)return new Dl(_.tree,p,t,a);let E=new Dl(f,p,t,a);return r&$i.IncludeAnonymous||!E.type.isAnonymous?E:E.nextChild(n<0?f.children.length-1:0,n,s,i)}}}if(r&$i.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?t=a.index+n:t=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(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,n,s=0){let i;if(!(s&$i.IgnoreOverlays)&&(i=ZC.get(this._tree))&&i.overlay){let r=t-this.from;for(let{from:a,to:c}of i.overlay)if((n>0?a<=r:a<r)&&(n<0?c>=r:c>r))return new Dl(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,s)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function SU(e,t,n,s){let i=e.cursor(),r=[];if(!i.firstChild())return r;if(n!=null){for(let a=!1;!a;)if(a=i.type.is(n),!i.nextSibling())return r}for(;;){if(s!=null&&i.type.is(s))return r;if(i.type.is(t)&&r.push(i.node),!i.nextSibling())return s==null?r:[]}}function eN(e,t,n=t.length-1){for(let s=e;n>=0;s=s.parent){if(!s)return!1;if(!s.type.isAnonymous){if(t[n]&&t[n]!=s.name)return!1;n--}}return!0}class Gee{constructor(t,n,s,i){this.parent=t,this.buffer=n,this.index=s,this.start=i}}class Vu extends w4{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,n,s){super(),this.context=t,this._parent=n,this.index=s,this.type=t.buffer.set.types[t.buffer.buffer[s]]}child(t,n,s){let{buffer:i}=this.context,r=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,s);return r<0?null:new Vu(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,n,s=0){if(s&$i.ExcludeBuffers)return null;let{buffer:i}=this.context,r=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return r<0?null:new Vu(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new Vu(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Vu(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],n=[],{buffer:s}=this.context,i=this.index+4,r=s.buffer[this.index+3];if(r>i){let a=s.buffer[this.index+1];t.push(s.slice(i,r,a)),n.push(0)}return new or(this.type,t,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function k4(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let a=e[r];(a.from>n.from||a.to<n.to)&&(n=a,t=r)}let s=n instanceof Dl&&n.index<0?null:n.parent,i=e.slice();return s?i[t]=s:i.splice(t,1),new Wee(i,n)}class Wee{constructor(t,n){this.heads=t,this.node=n}get next(){return k4(this.heads)}}function Xee(e,t,n){let s=e.resolveInner(t,n),i=null;for(let r=s instanceof Dl?s:s.context.parent;r;r=r.parent)if(r.index<0){let a=r.parent;(i||(i=[s])).push(a.resolve(t,n)),r=a}else{let a=ZC.get(r.tree);if(a&&a.overlay&&a.overlay[0].from<=t&&a.overlay[a.overlay.length-1].to>=t){let c=new Dl(a.tree,a.overlay[0].from+r.from,-1,r);(i||(i=[s])).push(Ey(c,t,n,!1))}}return i?k4(i):s}class tN{get name(){return this.type.name}constructor(t,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof Dl)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let s=t._parent;s;s=s._parent)this.stack.unshift(s.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return t?(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0):!1}yieldBuf(t,n){this.index=t;let{start:s,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[t]],this.from=s+i.buffer[t+1],this.to=s+i.buffer[t+2],!0}yield(t){return t?t instanceof Dl?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,n,s){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,n,s,this.mode));let{buffer:i}=this.buffer,r=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.buffer.start,s);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,n,s=this.mode){return this.buffer?s&$i.ExcludeBuffers?!1:this.enterChild(1,t,n):this.yield(this._tree.enter(t,n,s))}parent(){if(!this.buffer)return this.yieldNode(this.mode&$i.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&$i.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode)):!1;let{buffer:n}=this.buffer,s=this.stack.length-1;if(t<0){let i=s<0?0:this.stack[s]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(s<0?n.buffer.length:n.buffer[this.stack[s]+3]))return this.yieldBuf(i)}return s<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let n,s,{buffer:i}=this;if(i){if(t>0){if(this.index<i.buffer.buffer.length)return!1}else for(let r=0;r<this.index;r++)if(i.buffer.buffer[r+3]<this.index)return!1;({index:n,parent:s}=i)}else({index:n,_parent:s}=this._tree);for(;s;{index:n,_parent:s}=s)if(n>-1)for(let r=n+t,a=t<0?-1:s._tree.children.length;r!=a;r+=t){let c=s._tree.children[r];if(this.mode&$i.IncludeAnonymous||c instanceof _p||!c.type.isAnonymous||DP(c))return!1}return!0}move(t,n){if(n&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,n=0){for(;(this.from==this.to||(n<1?this.from>=t:this.from>t)||(n>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,n););return this}get node(){if(!this.buffer)return this._tree;let t=this.bufferNode,n=null,s=0;if(t&&t.context==this.buffer)e:for(let i=this.index,r=this.stack.length;r>=0;){for(let a=t;a;a=a._parent)if(a.index==i){if(i==this.index)return a;n=a,s=r+1;break e}i=this.stack[--r]}for(let i=s;i<this.stack.length;i++)n=new Vu(this.buffer,n,this.stack[i]);return this.bufferNode=new Vu(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(t,n){for(let s=0;;){let i=!1;if(this.type.isAnonymous||t(this)!==!1){if(this.firstChild()){s++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&n&&n(this),i=this.type.isAnonymous,!s)return;if(this.nextSibling())break;this.parent(),s--,i=!0}}}matchContext(t){if(!this.buffer)return eN(this.node.parent,t);let{buffer:n}=this.buffer,{types:s}=n.set;for(let i=t.length-1,r=this.stack.length-1;i>=0;r--){if(r<0)return eN(this._tree,t,i);let a=s[n.buffer[this.stack[r]]];if(!a.isAnonymous){if(t[i]&&t[i]!=a.name)return!1;i--}}return!0}}function DP(e){return e.children.some(t=>t instanceof _p||!t.type.isAnonymous||DP(t))}function zee(e){var t;let{buffer:n,nodeSet:s,maxBufferLength:i=A4,reused:r=[],minRepeatType:a=s.types.length}=e,c=Array.isArray(n)?new PP(n,n.length):n,u=s.types,h=0,f=0;function p(w,k,D,P,B,F){let{id:X,start:G,end:re,size:_e}=c,J=f,Y=h;for(;_e<0;)if(c.next(),_e==-1){let ge=r[X];D.push(ge),P.push(G-w);return}else if(_e==-3){h=X;return}else if(_e==-4){f=X;return}else throw new RangeError(`Unrecognized record size: ${_e}`);let ae=u[X],Z,Q,he=G-w;if(re-G<=i&&(Q=y(c.pos-k,B))){let ge=new Uint16Array(Q.size-Q.skip),Ie=c.pos-Q.size,be=ge.length;for(;c.pos>Ie;)be=S(Q.start,ge,be);Z=new _p(ge,re-Q.start,s),he=Q.start-w}else{let ge=c.pos-_e;c.next();let Ie=[],be=[],Ae=X>=a?X:-1,We=0,$e=re;for(;c.pos>ge;)Ae>=0&&c.id==Ae&&c.size>=0?(c.end<=$e-i&&(v(Ie,be,G,We,c.end,$e,Ae,J,Y),We=Ie.length,$e=c.end),c.next()):F>2500?_(G,ge,Ie,be):p(G,ge,Ie,be,Ae,F+1);if(Ae>=0&&We>0&&We<Ie.length&&v(Ie,be,G,We,G,$e,Ae,J,Y),Ie.reverse(),be.reverse(),Ae>-1&&We>0){let ve=E(ae,Y);Z=xP(ae,Ie,be,0,Ie.length,0,re-G,ve,ve)}else Z=b(ae,Ie,be,re-G,J-re,Y)}D.push(Z),P.push(he)}function _(w,k,D,P){let B=[],F=0,X=-1;for(;c.pos>k;){let{id:G,start:re,end:_e,size:J}=c;if(J>4)c.next();else{if(X>-1&&re<X)break;X<0&&(X=_e-i),B.push(G,re,_e),F++,c.next()}}if(F){let G=new Uint16Array(F*4),re=B[B.length-2];for(let _e=B.length-3,J=0;_e>=0;_e-=3)G[J++]=B[_e],G[J++]=B[_e+1]-re,G[J++]=B[_e+2]-re,G[J++]=J;D.push(new _p(G,B[2]-re,s)),P.push(re-w)}}function E(w,k){return(D,P,B)=>{let F=0,X=D.length-1,G,re;if(X>=0&&(G=D[X])instanceof or){if(!X&&G.type==w&&G.length==B)return G;(re=G.prop(Eo.lookAhead))&&(F=P[X]+G.length+re)}return b(w,D,P,B,F,k)}}function v(w,k,D,P,B,F,X,G,re){let _e=[],J=[];for(;w.length>P;)_e.push(w.pop()),J.push(k.pop()+D-B);w.push(b(s.types[X],_e,J,F-B,G-F,re)),k.push(B-D)}function b(w,k,D,P,B,F,X){if(F){let G=[Eo.contextHash,F];X=X?[G].concat(X):[G]}if(B>25){let G=[Eo.lookAhead,B];X=X?[G].concat(X):[G]}return new or(w,k,D,P,X)}function y(w,k){let D=c.fork(),P=0,B=0,F=0,X=D.end-i,G={size:0,start:0,skip:0};e:for(let re=D.pos-w;D.pos>re;){let _e=D.size;if(D.id==k&&_e>=0){G.size=P,G.start=B,G.skip=F,F+=4,P+=4,D.next();continue}let J=D.pos-_e;if(_e<0||J<re||D.start<X)break;let Y=D.id>=a?4:0,ae=D.start;for(D.next();D.pos>J;){if(D.size<0)if(D.size==-3)Y+=4;else break e;else D.id>=a&&(Y+=4);D.next()}B=ae,P+=_e,F+=Y}return(k<0||P==w)&&(G.size=P,G.start=B,G.skip=F),G.size>4?G:void 0}function S(w,k,D){let{id:P,start:B,end:F,size:X}=c;if(c.next(),X>=0&&P<a){let G=D;if(X>4){let re=c.pos-(X-4);for(;c.pos>re;)D=S(w,k,D)}k[--D]=G,k[--D]=F-w,k[--D]=B-w,k[--D]=P}else X==-3?h=P:X==-4&&(f=P);return D}let L=[],I=[];for(;c.pos>0;)p(e.start||0,e.bufferStart||0,L,I,-1,0);let R=(t=e.length)!==null&&t!==void 0?t:L.length?I[0]+L[0].length:0;return new or(u[e.topID],L.reverse(),I.reverse(),R)}const yU=new WeakMap;function eC(e,t){if(!e.isAnonymous||t instanceof _p||t.type!=e)return 1;let n=yU.get(t);if(n==null){n=1;for(let s of t.children){if(s.type!=e||!(s instanceof or)){n=1;break}n+=eC(e,s)}yU.set(t,n)}return n}function xP(e,t,n,s,i,r,a,c,u){let h=0;for(let v=s;v<i;v++)h+=eC(e,t[v]);let f=Math.ceil(h*1.5/8),p=[],_=[];function E(v,b,y,S,L){for(let I=y;I<S;){let R=I,w=b[I],k=eC(e,v[I]);for(I++;I<S;I++){let D=eC(e,v[I]);if(k+D>=f)break;k+=D}if(I==R+1){if(k>f){let D=v[R];E(D.children,D.positions,0,D.children.length,b[R]+L);continue}p.push(v[R])}else{let D=b[I-1]+v[I-1].length-w;p.push(xP(e,v,b,R,I,w,D,null,u))}_.push(w+L-r)}}return E(t,n,s,i,0),(c||u)(p,_,a)}class Yee{constructor(){this.map=new WeakMap}setBuffer(t,n,s){let i=this.map.get(t);i||this.map.set(t,i=new Map),i.set(n,s)}getBuffer(t,n){let s=this.map.get(t);return s&&s.get(n)}set(t,n){t instanceof Vu?this.setBuffer(t.context.buffer,t.index,n):t instanceof Dl&&this.map.set(t.tree,n)}get(t){return t instanceof Vu?this.getBuffer(t.context.buffer,t.index):t instanceof Dl?this.map.get(t.tree):void 0}cursorSet(t,n){t.buffer?this.setBuffer(t.buffer.buffer,t.index,n):this.map.set(t.tree,n)}cursorGet(t){return t.buffer?this.getBuffer(t.buffer.buffer,t.index):this.map.get(t.tree)}}class Em{constructor(t,n,s,i,r=!1,a=!1){this.from=t,this.to=n,this.tree=s,this.offset=i,this.open=(r?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],s=!1){let i=[new Em(0,t.length,t,0,!1,s)];for(let r of n)r.to>t.length&&i.push(r);return i}static applyChanges(t,n,s=128){if(!n.length)return t;let i=[],r=1,a=t.length?t[0]:null;for(let c=0,u=0,h=0;;c++){let f=c<n.length?n[c]:null,p=f?f.fromA:1e9;if(p-u>=s)for(;a&&a.from<p;){let _=a;if(u>=_.from||p<=_.to||h){let E=Math.max(_.from,u)-h,v=Math.min(_.to,p)-h;_=E>=v?null:new Em(E,v,_.tree,_.offset+h,c>0,!!f)}if(_&&i.push(_),a.to>p)break;a=r<t.length?t[r++]:null}if(!f)break;u=f.toA,h=f.toA-f.toB}return i}}class N4{startParse(t,n,s){return typeof t=="string"&&(t=new Kee(t)),s=s?s.length?s.map(i=>new JL(i.from,i.to)):[new JL(0,0)]:[new JL(0,t.length)],this.createParse(t,n||[],s)}parse(t,n,s){let i=this.startParse(t,n,s);for(;;){let r=i.advance();if(r)return r}}}class Kee{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,n){return this.string.slice(t,n)}}new Eo({perNode:!0});let jee=0,rh=class nN{constructor(t,n,s,i){this.name=t,this.set=n,this.base=s,this.modified=i,this.id=jee++}toString(){let{name:t}=this;for(let n of this.modified)n.name&&(t=`${n.name}(${t})`);return t}static define(t,n){let s=typeof t=="string"?t:"?";if(t instanceof nN&&(n=t),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new nN(s,[],null,[]);if(i.set.push(i),n)for(let r of n.set)i.set.push(r);return i}static defineModifier(t){let n=new eM(t);return s=>s.modified.indexOf(n)>-1?s:eM.get(s.base||s,s.modified.concat(n).sort((i,r)=>i.id-r.id))}},Qee=0;class eM{constructor(t){this.name=t,this.instances=[],this.id=Qee++}static get(t,n){if(!n.length)return t;let s=n[0].instances.find(c=>c.base==t&&qee(n,c.modified));if(s)return s;let i=[],r=new rh(t.name,i,t,n);for(let c of n)c.instances.push(r);let a=Jee(n);for(let c of t.set)if(!c.modified.length)for(let u of a)i.push(eM.get(c,u));return r}}function qee(e,t){return e.length==t.length&&e.every((n,s)=>n==t[s])}function Jee(e){let t=[[]];for(let n=0;n<e.length;n++)for(let s=0,i=t.length;s<i;s++)t.push(t[s].concat(e[n]));return t.sort((n,s)=>s.length-n.length)}function P4(e){let t=Object.create(null);for(let n in e){let s=e[n];Array.isArray(s)||(s=[s]);for(let i of n.split(" "))if(i){let r=[],a=2,c=i;for(let p=0;;){if(c=="..."&&p>0&&p+3==i.length){a=1;break}let _=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(c);if(!_)throw new RangeError("Invalid path: "+i);if(r.push(_[0]=="*"?"":_[0][0]=='"'?JSON.parse(_[0]):_[0]),p+=_[0].length,p==i.length)break;let E=i[p++];if(p==i.length&&E=="!"){a=0;break}if(E!="/")throw new RangeError("Invalid path: "+i);c=i.slice(p)}let u=r.length-1,h=r[u];if(!h)throw new RangeError("Invalid path: "+i);let f=new tM(s,a,u>0?r.slice(0,u):null);t[h]=f.sort(t[h])}}return D4.add(t)}const D4=new Eo;class tM{constructor(t,n,s,i){this.tags=t,this.mode=n,this.context=s,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}}tM.empty=new tM([],2,null);function x4(e,t){let n=Object.create(null);for(let r of e)if(!Array.isArray(r.tag))n[r.tag.id]=r.class;else for(let a of r.tag)n[a.id]=r.class;let{scope:s,all:i=null}=t||{};return{style:r=>{let a=i;for(let c of r)for(let u of c.set){let h=n[u.id];if(h){a=a?a+" "+h:h;break}}return a},scope:s}}function Zee(e,t){let n=null;for(let s of e){let i=s.style(t);i&&(n=n?n+" "+i:i)}return n}function ete(e,t,n,s=0,i=e.length){let r=new tte(s,Array.isArray(t)?t:[t],n);r.highlightRange(e.cursor(),s,i,"",r.highlighters),r.flush(i)}class tte{constructor(t,n,s){this.at=t,this.highlighters=n,this.span=s,this.class=""}startSpan(t,n){n!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=n)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,n,s,i,r){let{type:a,from:c,to:u}=t;if(c>=s||u<=n)return;a.isTop&&(r=this.highlighters.filter(E=>!E.scope||E.scope(a)));let h=i,f=nte(t)||tM.empty,p=Zee(r,f.tags);if(p&&(h&&(h+=" "),h+=p,f.mode==1&&(i+=(i?" ":"")+p)),this.startSpan(Math.max(n,c),h),f.opaque)return;let _=t.tree&&t.tree.prop(Eo.mounted);if(_&&_.overlay){let E=t.node.enter(_.overlay[0].from+c,1),v=this.highlighters.filter(y=>!y.scope||y.scope(_.tree.type)),b=t.firstChild();for(let y=0,S=c;;y++){let L=y<_.overlay.length?_.overlay[y]:null,I=L?L.from+c:u,R=Math.max(n,S),w=Math.min(s,I);if(R<w&&b)for(;t.from<w&&(this.highlightRange(t,R,w,i,r),this.startSpan(Math.min(w,t.to),h),!(t.to>=I||!t.nextSibling())););if(!L||I>s)break;S=L.to+c,S>n&&(this.highlightRange(E.cursor(),Math.max(n,L.from+c),Math.min(s,S),"",v),this.startSpan(Math.min(s,S),h))}b&&t.parent()}else if(t.firstChild()){_&&(i="");do if(!(t.to<=n)){if(t.from>=s)break;this.highlightRange(t,n,s,i,r),this.startSpan(Math.min(s,t.to),h)}while(t.nextSibling());t.parent()}}}function nte(e){let t=e.type.prop(D4);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}const on=rh.define,Q0=on(),jf=on(),$U=on(jf),IU=on(jf),Qf=on(),q0=on(Qf),ZL=on(Qf),Nu=on(),qg=on(Nu),Mu=on(),Au=on(),oN=on(),fS=on(oN),J0=on(),Ft={comment:Q0,lineComment:on(Q0),blockComment:on(Q0),docComment:on(Q0),name:jf,variableName:on(jf),typeName:$U,tagName:on($U),propertyName:IU,attributeName:on(IU),className:on(jf),labelName:on(jf),namespace:on(jf),macroName:on(jf),literal:Qf,string:q0,docString:on(q0),character:on(q0),attributeValue:on(q0),number:ZL,integer:on(ZL),float:on(ZL),bool:on(Qf),regexp:on(Qf),escape:on(Qf),color:on(Qf),url:on(Qf),keyword:Mu,self:on(Mu),null:on(Mu),atom:on(Mu),unit:on(Mu),modifier:on(Mu),operatorKeyword:on(Mu),controlKeyword:on(Mu),definitionKeyword:on(Mu),moduleKeyword:on(Mu),operator:Au,derefOperator:on(Au),arithmeticOperator:on(Au),logicOperator:on(Au),bitwiseOperator:on(Au),compareOperator:on(Au),updateOperator:on(Au),definitionOperator:on(Au),typeOperator:on(Au),controlOperator:on(Au),punctuation:oN,separator:on(oN),bracket:fS,angleBracket:on(fS),squareBracket:on(fS),paren:on(fS),brace:on(fS),content:Nu,heading:qg,heading1:on(qg),heading2:on(qg),heading3:on(qg),heading4:on(qg),heading5:on(qg),heading6:on(qg),contentSeparator:on(Nu),list:on(Nu),quote:on(Nu),emphasis:on(Nu),strong:on(Nu),link:on(Nu),monospace:on(Nu),strikethrough:on(Nu),inserted:on(),deleted:on(),changed:on(),invalid:on(),meta:J0,documentMeta:on(J0),annotation:on(J0),processingInstruction:on(J0),definition:rh.defineModifier("definition"),constant:rh.defineModifier("constant"),function:rh.defineModifier("function"),standard:rh.defineModifier("standard"),local:rh.defineModifier("local"),special:rh.defineModifier("special")};for(let e in Ft){let t=Ft[e];t instanceof rh&&(t.name=e)}x4([{tag:Ft.link,class:"tok-link"},{tag:Ft.heading,class:"tok-heading"},{tag:Ft.emphasis,class:"tok-emphasis"},{tag:Ft.strong,class:"tok-strong"},{tag:Ft.keyword,class:"tok-keyword"},{tag:Ft.atom,class:"tok-atom"},{tag:Ft.bool,class:"tok-bool"},{tag:Ft.url,class:"tok-url"},{tag:Ft.labelName,class:"tok-labelName"},{tag:Ft.inserted,class:"tok-inserted"},{tag:Ft.deleted,class:"tok-deleted"},{tag:Ft.literal,class:"tok-literal"},{tag:Ft.string,class:"tok-string"},{tag:Ft.number,class:"tok-number"},{tag:[Ft.regexp,Ft.escape,Ft.special(Ft.string)],class:"tok-string2"},{tag:Ft.variableName,class:"tok-variableName"},{tag:Ft.local(Ft.variableName),class:"tok-variableName tok-local"},{tag:Ft.definition(Ft.variableName),class:"tok-variableName tok-definition"},{tag:Ft.special(Ft.variableName),class:"tok-variableName2"},{tag:Ft.definition(Ft.propertyName),class:"tok-propertyName tok-definition"},{tag:Ft.typeName,class:"tok-typeName"},{tag:Ft.namespace,class:"tok-namespace"},{tag:Ft.className,class:"tok-className"},{tag:Ft.macroName,class:"tok-macroName"},{tag:Ft.propertyName,class:"tok-propertyName"},{tag:Ft.operator,class:"tok-operator"},{tag:Ft.comment,class:"tok-comment"},{tag:Ft.meta,class:"tok-meta"},{tag:Ft.invalid,class:"tok-invalid"},{tag:Ft.punctuation,class:"tok-punctuation"}]);var ew;const nE=new Eo;function ote(e){return mn.define({combine:e?t=>t.concat(e):void 0})}const ste=new Eo;class Dc{constructor(t,n,s=[],i=""){this.data=t,this.name=i,$o.prototype.hasOwnProperty("tree")||Object.defineProperty($o.prototype,"tree",{get(){return Vi(this)}}),this.parser=n,this.extension=[Tp.of(this),$o.languageData.of((r,a,c)=>{let u=RU(r,a,c),h=u.type.prop(nE);if(!h)return[];let f=r.facet(h),p=u.type.prop(ste);if(p){let _=u.resolve(a-u.from,c);for(let E of p)if(E.test(_,r)){let v=r.facet(E.facet);return E.type=="replace"?v:v.concat(f)}}return f})].concat(s)}isActiveAt(t,n,s=-1){return RU(t,n,s).type.prop(nE)==this.data}findRegions(t){let n=t.facet(Tp);if((n==null?void 0:n.data)==this.data)return[{from:0,to:t.doc.length}];if(!n||!n.allowsNesting)return[];let s=[],i=(r,a)=>{if(r.prop(nE)==this.data){s.push({from:a,to:a+r.length});return}let c=r.prop(Eo.mounted);if(c){if(c.tree.prop(nE)==this.data){if(c.overlay)for(let u of c.overlay)s.push({from:u.from+a,to:u.to+a});else s.push({from:a,to:a+r.length});return}else if(c.overlay){let u=s.length;if(i(c.tree,c.overlay[0].from+a),s.length>u)return}}for(let u=0;u<r.children.length;u++){let h=r.children[u];h instanceof or&&i(h,r.positions[u]+a)}};return i(Vi(t),0),s}get allowsNesting(){return!0}}Dc.setState=Qn.define();function RU(e,t,n){let s=e.facet(Tp),i=Vi(e).topNode;if(!s||s.allowsNesting)for(let r=i;r;r=r.enter(t,n,$i.ExcludeBuffers))r.type.isTop&&(i=r);return i}class nM extends Dc{constructor(t,n,s){super(t,n,[],s),this.parser=n}static define(t){let n=ote(t.languageData);return new nM(n,t.parser.configure({props:[nE.add(s=>s.isTop?n:void 0)]}),t.name)}configure(t,n){return new nM(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Vi(e){let t=e.field(Dc.state,!1);return t?t.tree:or.empty}class ite{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,n){let s=this.cursorPos-this.string.length;return t<s||n>=this.cursorPos?this.doc.sliceString(t,n):this.string.slice(t-s,n-s)}}let pS=null;class oM{constructor(t,n,s=[],i,r,a,c,u){this.parser=t,this.state=n,this.fragments=s,this.tree=i,this.treeLen=r,this.viewport=a,this.skipped=c,this.scheduleOn=u,this.parse=null,this.tempSkipped=[]}static create(t,n,s){return new oM(t,n,[],or.empty,0,s,[],null)}startParse(){return this.parser.startParse(new ite(this.state.doc),this.fragments)}work(t,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=or.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var s;if(typeof t=="number"){let i=Date.now()+t;t=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(Em.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(s=this.parse.stoppedAt)!==null&&s!==void 0?s:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(t())return!1}})}takeTree(){let t,n;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=t,this.tree=n,this.fragments=this.withoutTempSkipped(Em.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let n=pS;pS=this;try{return t()}finally{pS=n}}withoutTempSkipped(t){for(let n;n=this.tempSkipped.pop();)t=CU(t,n.from,n.to);return t}changes(t,n){let{fragments:s,tree:i,treeLen:r,viewport:a,skipped:c}=this;if(this.takeTree(),!t.empty){let u=[];if(t.iterChangedRanges((h,f,p,_)=>u.push({fromA:h,toA:f,fromB:p,toB:_})),s=Em.applyChanges(s,u),i=or.empty,r=0,a={from:t.mapPos(a.from,-1),to:t.mapPos(a.to,1)},this.skipped.length){c=[];for(let h of this.skipped){let f=t.mapPos(h.from,1),p=t.mapPos(h.to,-1);f<p&&c.push({from:f,to:p})}}}return new oM(this.parser,n,s,i,r,a,c,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let n=this.skipped.length;for(let s=0;s<this.skipped.length;s++){let{from:i,to:r}=this.skipped[s];i<t.to&&r>t.from&&(this.fragments=CU(this.fragments,i,r),this.skipped.splice(s--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,n){this.skipped.push({from:t,to:n})}static getSkippingParser(t){return new class extends N4{createParse(n,s,i){let r=i[0].from,a=i[i.length-1].to;return{parsedPos:r,advance(){let u=pS;if(u){for(let h of i)u.tempSkipped.push(h);t&&(u.scheduleOn=u.scheduleOn?Promise.all([u.scheduleOn,t]):t)}return this.parsedPos=a,new or(Ul.none,[],[],a-r)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let n=this.fragments;return this.treeLen>=t&&n.length&&n[0].from==0&&n[0].to>=t}static get(){return pS}}function CU(e,t,n){return Em.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class wE{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),s=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,s)||n.takeTree(),new wE(n)}static init(t){let n=Math.min(3e3,t.doc.length),s=oM.create(t.facet(Tp).parser,t,{from:0,to:n});return s.work(20,n)||s.takeTree(),new wE(s)}}Dc.state=Wi.define({create:wE.init,update(e,t){for(let n of t.effects)if(n.is(Dc.setState))return n.value;return t.startState.facet(Tp)!=t.state.facet(Tp)?wE.init(t.state):e.apply(t)}});let B4=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<"u"&&(B4=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const tw=typeof navigator<"u"&&(!((ew=navigator.scheduling)===null||ew===void 0)&&ew.isInputPending)?()=>navigator.scheduling.isInputPending():null,rte=ei.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 n=this.view.state.field(Dc.state).context;(n.updateViewport(t.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:t}=this.view,n=t.field(Dc.state);(n.tree!=n.context.tree||!n.context.isDone(t.doc.length))&&(this.working=B4(this.work))}work(t){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:s,viewport:{to:i}}=this.view,r=s.field(Dc.state);if(r.tree==r.context.tree&&r.context.isDone(i+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,t&&!tw?Math.max(25,t.timeRemaining()-5):1e9),c=r.context.treeLen<i&&s.doc.length>i+1e3,u=r.context.work(()=>tw&&tw()||Date.now()>a,i+(c?0:1e5));this.chunkBudget-=Date.now()-n,(u||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:Dc.setState.of(new wE(r.context))})),this.chunkBudget>0&&!(u&&!c)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(n=>kl(this.view.state,n)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Tp=mn.define({combine(e){return e.length?e[0]:null},enables:e=>[Dc.state,rte,hn.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]});class lte{constructor(t,n=[]){this.language=t,this.support=n,this.extension=[t,n]}}const ate=mn.define(),h$=mn.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(n=>n!=t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function sM(e){let t=e.facet(h$);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function vy(e,t){let n="",s=e.tabSize,i=e.facet(h$)[0];if(i==" "){for(;t>=s;)n+=" ",t-=s;i=" "}for(let r=0;r<t;r++)n+=i;return n}function BP(e,t){e instanceof $o&&(e=new cA(e));for(let s of e.state.facet(ate)){let i=s(e,t);if(i!==void 0)return i}let n=Vi(e.state);return n.length>=t?cte(e,n,t):null}class cA{constructor(t,n={}){this.state=t,this.options=n,this.unit=sM(t)}lineAt(t,n=1){let s=this.state.doc.lineAt(t),{simulateBreak:i,simulateDoubleBreak:r}=this.options;return i!=null&&i>=s.from&&i<=s.to?r&&i==t?{text:"",from:t}:(n<0?i<t:i<=t)?{text:s.text.slice(i-s.from),from:i}:{text:s.text.slice(0,i-s.from),from:s.from}:s}textAfterPos(t,n=1){if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";let{text:s,from:i}=this.lineAt(t,n);return s.slice(t-i,Math.min(s.length,t+100-i))}column(t,n=1){let{text:s,from:i}=this.lineAt(t,n),r=this.countColumn(s,t-i),a=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return a>-1&&(r+=a-this.countColumn(s,s.search(/\S|$/))),r}countColumn(t,n=t.length){return sv(t,this.state.tabSize,n)}lineIndent(t,n=1){let{text:s,from:i}=this.lineAt(t,n),r=this.options.overrideIndentation;if(r){let a=r(i);if(a>-1)return a}return this.countColumn(s,s.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const F4=new Eo;function cte(e,t,n){let s=t.resolveStack(n),i=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=s.node){let r=[];for(let a=i;a&&!(a.from==s.node.from&&a.type==s.node.type);a=a.parent)r.push(a);for(let a=r.length-1;a>=0;a--)s={node:r[a],next:s}}return U4(s,e,n)}function U4(e,t,n){for(let s=e;s;s=s.next){let i=dte(s.node);if(i)return i(FP.create(t,n,s))}return 0}function ute(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function dte(e){let t=e.type.prop(F4);if(t)return t;let n=e.firstChild,s;if(n&&(s=n.type.prop(Eo.closedBy))){let i=e.lastChild,r=i&&s.indexOf(i.name)>-1;return a=>H4(a,!0,1,void 0,r&&!ute(a)?i.from:void 0)}return e.parent==null?hte:null}function hte(){return 0}class FP extends cA{constructor(t,n,s){super(t.state,t.options),this.base=t,this.pos=n,this.context=s}get node(){return this.context.node}static create(t,n,s){return new FP(t,n,s)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let n=this.state.doc.lineAt(t.from);for(;;){let s=t.resolve(n.from);for(;s.parent&&s.parent.from==s.from;)s=s.parent;if(fte(s,t))break;n=this.state.doc.lineAt(s.from)}return this.lineIndent(n.from)}continue(){return U4(this.context.next,this.base,this.pos)}}function fte(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function pte(e){let t=e.node,n=t.childAfter(t.from),s=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,r=e.state.doc.lineAt(n.from),a=i==null||i<=r.from?r.to:Math.min(r.to,i);for(let c=n.to;;){let u=t.childAfter(c);if(!u||u==s)return null;if(!u.type.isSkipped){if(u.from>=a)return null;let h=/^ */.exec(r.text.slice(n.to-r.from))[0].length;return{from:n.from,to:n.to+h}}c=u.to}}function nw({closing:e,align:t=!0,units:n=1}){return s=>H4(s,t,n,e)}function H4(e,t,n,s,i){let r=e.textAfter,a=r.match(/^\s*/)[0].length,c=s&&r.slice(a,a+s.length)==s||i==e.pos+a,u=t?pte(e):null;return u?c?e.column(u.from):e.column(u.to):e.baseIndent+(c?0:e.unit*n)}const gte=200;function mte(){return $o.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:s}=e.newSelection.main,i=n.lineAt(s);if(s>i.from+gte)return e;let r=n.sliceString(i.from,s);if(!t.some(h=>h.test(r)))return e;let{state:a}=e,c=-1,u=[];for(let{head:h}of a.selection.ranges){let f=a.doc.lineAt(h);if(f.from==c)continue;c=f.from;let p=BP(a,f.from);if(p==null)continue;let _=/^\s*/.exec(f.text)[0],E=vy(a,p);_!=E&&u.push({from:f.from,to:f.from+_.length,insert:E})}return u.length?[e,{changes:u,sequential:!0}]:e})}const _te=mn.define(),V4=new Eo;function Tte(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}function Ete(e,t,n){let s=Vi(e);if(s.length<n)return null;let i=s.resolveStack(n,1),r=null;for(let a=i;a;a=a.next){let c=a.node;if(c.to<=n||c.from>n)continue;if(r&&c.from<t)break;let u=c.type.prop(V4);if(u&&(c.to<s.length-50||s.length==e.doc.length||!vte(c))){let h=u(c,e);h&&h.from<=n&&h.from>=t&&h.to>n&&(r=h)}}return r}function vte(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function iM(e,t,n){for(let s of e.facet(_te)){let i=s(e,t,n);if(i)return i}return Ete(e,t,n)}function G4(e,t){let n=t.mapPos(e.from,1),s=t.mapPos(e.to,-1);return n>=s?void 0:{from:n,to:s}}const uA=Qn.define({map:G4}),f$=Qn.define({map:G4});function W4(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(s=>s.from<=n&&s.to>=n)||t.push(e.lineBlockAt(n));return t}const wm=Wi.define({create(){return wn.none},update(e,t){e=e.map(t.changes);for(let n of t.effects)if(n.is(uA)&&!bte(e,n.value.from,n.value.to)){let{preparePlaceholder:s}=t.state.facet(Y4),i=s?wn.replace({widget:new Cte(s(t.state,n.value))}):MU;e=e.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(f$)&&(e=e.update({filter:(s,i)=>n.value.from!=s||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));if(t.selection){let n=!1,{head:s}=t.selection.main;e.between(s,s,(i,r)=>{i<s&&r>s&&(n=!0)}),n&&(e=e.update({filterFrom:s,filterTo:s,filter:(i,r)=>r<=s||i>=s}))}return e},provide:e=>hn.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(s,i)=>{n.push(s,i)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n<e.length;){let s=e[n++],i=e[n++];if(typeof s!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");t.push(MU.range(s,i))}return wn.set(t,!0)}});function rM(e,t,n){var s;let i=null;return(s=e.field(wm,!1))===null||s===void 0||s.between(t,n,(r,a)=>{(!i||i.from>r)&&(i={from:r,to:a})}),i}function bte(e,t,n){let s=!1;return e.between(t,t,(i,r)=>{i==t&&r==n&&(s=!0)}),s}function X4(e,t){return e.field(wm,!1)?t:t.concat(Qn.appendConfig.of(K4()))}const Ote=e=>{for(let t of W4(e)){let n=iM(e.state,t.from,t.to);if(n)return e.dispatch({effects:X4(e.state,[uA.of(n),z4(e,n)])}),!0}return!1},Ste=e=>{if(!e.state.field(wm,!1))return!1;let t=[];for(let n of W4(e)){let s=rM(e.state,n.from,n.to);s&&t.push(f$.of(s),z4(e,s,!1))}return t.length&&e.dispatch({effects:t}),t.length>0};function z4(e,t,n=!0){let s=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return hn.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${s} ${e.state.phrase("to")} ${i}.`)}const yte=e=>{let{state:t}=e,n=[];for(let s=0;s<t.doc.length;){let i=e.lineBlockAt(s),r=iM(t,i.from,i.to);r&&n.push(uA.of(r)),s=(r?e.lineBlockAt(r.to):i).to+1}return n.length&&e.dispatch({effects:X4(e.state,n)}),!!n.length},$te=e=>{let t=e.state.field(wm,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(s,i)=>{n.push(f$.of({from:s,to:i}))}),e.dispatch({effects:n}),!0},Ite=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Ote},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:Ste},{key:"Ctrl-Alt-[",run:yte},{key:"Ctrl-Alt-]",run:$te}],Rte={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Y4=mn.define({combine(e){return od(e,Rte)}});function K4(e){return[wm,Lte]}function j4(e,t){let{state:n}=e,s=n.facet(Y4),i=a=>{let c=e.lineBlockAt(e.posAtDOM(a.target)),u=rM(e.state,c.from,c.to);u&&e.dispatch({effects:f$.of(u)}),a.preventDefault()};if(s.placeholderDOM)return s.placeholderDOM(e,i,t);let r=document.createElement("span");return r.textContent=s.placeholderText,r.setAttribute("aria-label",n.phrase("folded code")),r.title=n.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=i,r}const MU=wn.replace({widget:new class extends sd{toDOM(e){return j4(e,null)}}});class Cte extends sd{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return j4(t,this.value)}}const Mte={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class ow extends Oh{constructor(t,n){super(),this.config=t,this.open=n}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){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=t.state.phrase(this.open?"Fold line":"Unfold line"),n}}function Ate(e={}){let t=Object.assign(Object.assign({},Mte),e),n=new ow(t,!0),s=new ow(t,!1),i=ei.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(Tp)!=a.state.facet(Tp)||a.startState.field(wm,!1)!=a.state.field(wm,!1)||Vi(a.startState)!=Vi(a.state)||t.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let c=new vh;for(let u of a.viewportLineBlocks){let h=rM(a.state,u.from,u.to)?s:iM(a.state,u.from,u.to)?n:null;h&&c.add(u.from,u.from,h)}return c.finish()}}),{domEventHandlers:r}=t;return[i,Aee({class:"cm-foldGutter",markers(a){var c;return((c=a.plugin(i))===null||c===void 0?void 0:c.markers)||No.empty},initialSpacer(){return new ow(t,!1)},domEventHandlers:Object.assign(Object.assign({},r),{click:(a,c,u)=>{if(r.click&&r.click(a,c,u))return!0;let h=rM(a.state,c.from,c.to);if(h)return a.dispatch({effects:f$.of(h)}),!0;let f=iM(a.state,c.from,c.to);return f?(a.dispatch({effects:uA.of(f)}),!0):!1}})}),K4()]}const Lte=hn.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class dA{constructor(t,n){this.specs=t;let s;function i(c){let u=pp.newName();return(s||(s=Object.create(null)))["."+u]=c,u}const r=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,a=n.scope;this.scope=a instanceof Dc?c=>c.prop(nE)==a.data:a?c=>c==a:void 0,this.style=x4(t.map(c=>({tag:c.tag,class:c.class||i(Object.assign({},c,{tag:null}))})),{all:r}).style,this.module=s?new pp(s):null,this.themeType=n.themeType}static define(t,n){return new dA(t,n||{})}}const sN=mn.define(),Q4=mn.define({combine(e){return e.length?[e[0]]:null}});function sw(e){let t=e.facet(sN);return t.length?t:e.facet(Q4)}function wte(e,t){let n=[Nte],s;return e instanceof dA&&(e.module&&n.push(hn.styleModule.of(e.module)),s=e.themeType),t!=null&&t.fallback?n.push(Q4.of(e)):s?n.push(sN.computeN([hn.darkTheme],i=>i.facet(hn.darkTheme)==(s=="dark")?[e]:[])):n.push(sN.of(e)),n}class kte{constructor(t){this.markCache=Object.create(null),this.tree=Vi(t.state),this.decorations=this.buildDeco(t,sw(t.state)),this.decoratedTo=t.viewport.to}update(t){let n=Vi(t.state),s=sw(t.state),i=s!=sw(t.startState),{viewport:r}=t.view,a=t.changes.mapPos(this.decoratedTo,1);n.length<r.to&&!i&&n.type==this.tree.type&&a>=r.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=a):(n!=this.tree||t.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(t.view,s),this.decoratedTo=r.to)}buildDeco(t,n){if(!n||!this.tree.length)return wn.none;let s=new vh;for(let{from:i,to:r}of t.visibleRanges)ete(this.tree,n,(a,c,u)=>{s.add(a,c,this.markCache[u]||(this.markCache[u]=wn.mark({class:u})))},i,r);return s.finish()}}const Nte=Mp.high(ei.fromClass(kte,{decorations:e=>e.decorations})),Pte=dA.define([{tag:Ft.meta,color:"#404740"},{tag:Ft.link,textDecoration:"underline"},{tag:Ft.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Ft.emphasis,fontStyle:"italic"},{tag:Ft.strong,fontWeight:"bold"},{tag:Ft.strikethrough,textDecoration:"line-through"},{tag:Ft.keyword,color:"#708"},{tag:[Ft.atom,Ft.bool,Ft.url,Ft.contentSeparator,Ft.labelName],color:"#219"},{tag:[Ft.literal,Ft.inserted],color:"#164"},{tag:[Ft.string,Ft.deleted],color:"#a11"},{tag:[Ft.regexp,Ft.escape,Ft.special(Ft.string)],color:"#e40"},{tag:Ft.definition(Ft.variableName),color:"#00f"},{tag:Ft.local(Ft.variableName),color:"#30a"},{tag:[Ft.typeName,Ft.namespace],color:"#085"},{tag:Ft.className,color:"#167"},{tag:[Ft.special(Ft.variableName),Ft.macroName],color:"#256"},{tag:Ft.definition(Ft.propertyName),color:"#00c"},{tag:Ft.comment,color:"#940"},{tag:Ft.invalid,color:"#f00"}]),Dte=hn.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),q4=1e4,J4="()[]{}",Z4=mn.define({combine(e){return od(e,{afterCursor:!0,brackets:J4,maxScanDistance:q4,renderMatch:Fte})}}),xte=wn.mark({class:"cm-matchingBracket"}),Bte=wn.mark({class:"cm-nonmatchingBracket"});function Fte(e){let t=[],n=e.matched?xte:Bte;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}const Ute=Wi.define({create(){return wn.none},update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],s=t.state.facet(Z4);for(let i of t.state.selection.ranges){if(!i.empty)continue;let r=Gu(t.state,i.head,-1,s)||i.head>0&&Gu(t.state,i.head-1,1,s)||s.afterCursor&&(Gu(t.state,i.head,1,s)||i.head<t.state.doc.length&&Gu(t.state,i.head+1,-1,s));r&&(n=n.concat(s.renderMatch(r,t.state)))}return wn.set(n,!0)},provide:e=>hn.decorations.from(e)}),Hte=[Ute,Dte];function Vte(e={}){return[Z4.of(e),Hte]}const Gte=new Eo;function iN(e,t,n){let s=e.prop(t<0?Eo.openedBy:Eo.closedBy);if(s)return s;if(e.name.length==1){let i=n.indexOf(e.name);if(i>-1&&i%2==(t<0?1:0))return[n[i+t]]}return null}function rN(e){let t=e.type.prop(Gte);return t?t(e.node):e}function Gu(e,t,n,s={}){let i=s.maxScanDistance||q4,r=s.brackets||J4,a=Vi(e),c=a.resolveInner(t,n);for(let u=c;u;u=u.parent){let h=iN(u.type,n,r);if(h&&u.from<u.to){let f=rN(u);if(f&&(n>0?t>=f.from&&t<f.to:t>f.from&&t<=f.to))return Wte(e,t,n,u,f,h,r)}}return Xte(e,t,n,a,c.type,i,r)}function Wte(e,t,n,s,i,r,a){let c=s.parent,u={from:i.from,to:i.to},h=0,f=c==null?void 0:c.cursor();if(f&&(n<0?f.childBefore(s.from):f.childAfter(s.to)))do if(n<0?f.to<=s.from:f.from>=s.to){if(h==0&&r.indexOf(f.type.name)>-1&&f.from<f.to){let p=rN(f);return{start:u,end:p?{from:p.from,to:p.to}:void 0,matched:!0}}else if(iN(f.type,n,a))h++;else if(iN(f.type,-n,a)){if(h==0){let p=rN(f);return{start:u,end:p&&p.from<p.to?{from:p.from,to:p.to}:void 0,matched:!1}}h--}}while(n<0?f.prevSibling():f.nextSibling());return{start:u,matched:!1}}function Xte(e,t,n,s,i,r,a){let c=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),u=a.indexOf(c);if(u<0||u%2==0!=n>0)return null;let h={from:n<0?t-1:t,to:n>0?t+1:t},f=e.doc.iterRange(t,n>0?e.doc.length:0),p=0;for(let _=0;!f.next().done&&_<=r;){let E=f.value;n<0&&(_+=E.length);let v=t+_*n;for(let b=n>0?0:E.length-1,y=n>0?E.length:-1;b!=y;b+=n){let S=a.indexOf(E[b]);if(!(S<0||s.resolveInner(v+b,1).type!=i))if(S%2==0==n>0)p++;else{if(p==1)return{start:h,end:{from:v+b,to:v+b+1},matched:S>>1==u>>1};p--}}n>0&&(_+=E.length)}return f.done?{start:h,matched:!1}:null}const zte=Object.create(null),AU=[Ul.none],LU=[],wU=Object.create(null),Yte=Object.create(null);for(let[e,t]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"]])Yte[e]=Kte(zte,t);function iw(e,t){LU.indexOf(e)>-1||(LU.push(e),console.warn(t))}function Kte(e,t){let n=[];for(let c of t.split(" ")){let u=[];for(let h of c.split(".")){let f=e[h]||Ft[h];f?typeof f=="function"?u.length?u=u.map(f):iw(h,`Modifier ${h} used at start of tag`):u.length?iw(h,`Tag ${h} used as modifier`):u=Array.isArray(f)?f:[f]:iw(h,`Unknown highlighting tag ${h}`)}for(let h of u)n.push(h)}if(!n.length)return 0;let s=t.replace(/ /g,"_"),i=s+" "+n.map(c=>c.id),r=wU[i];if(r)return r.id;let a=wU[i]=Ul.define({id:AU.length,name:s,props:[P4({[s]:n})]});return AU.push(a),a.id}Rs.RTL,Rs.LTR;const jte=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),s=HP(e.state,n.from);return s.line?Qte(e):s.block?Jte(e):!1};function UP(e,t){return({state:n,dispatch:s})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(s(n.update(i)),!0):!1}}const Qte=UP(tne,0),qte=UP(ez,0),Jte=UP((e,t)=>ez(e,t,ene(t)),0);function HP(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}const gS=50;function Zte(e,{open:t,close:n},s,i){let r=e.sliceDoc(s-gS,s),a=e.sliceDoc(i,i+gS),c=/\s*$/.exec(r)[0].length,u=/^\s*/.exec(a)[0].length,h=r.length-c;if(r.slice(h-t.length,h)==t&&a.slice(u,u+n.length)==n)return{open:{pos:s-c,margin:c&&1},close:{pos:i+u,margin:u&&1}};let f,p;i-s<=2*gS?f=p=e.sliceDoc(s,i):(f=e.sliceDoc(s,s+gS),p=e.sliceDoc(i-gS,i));let _=/^\s*/.exec(f)[0].length,E=/\s*$/.exec(p)[0].length,v=p.length-E-n.length;return f.slice(_,_+t.length)==t&&p.slice(v,v+n.length)==n?{open:{pos:s+_+t.length,margin:/\s/.test(f.charAt(_+t.length))?1:0},close:{pos:i-E-n.length,margin:/\s/.test(p.charAt(v-1))?1:0}}:null}function ene(e){let t=[];for(let n of e.selection.ranges){let s=e.doc.lineAt(n.from),i=n.to<=s.to?s:e.doc.lineAt(n.to);i.from>s.from&&i.from==n.to&&(i=n.to==s.to+1?s:e.doc.lineAt(n.to-1));let r=t.length-1;r>=0&&t[r].to>s.from?t[r].to=i.to:t.push({from:s.from+/^\s*/.exec(s.text)[0].length,to:i.to})}return t}function ez(e,t,n=t.selection.ranges){let s=n.map(r=>HP(t,r.from).block);if(!s.every(r=>r))return null;let i=n.map((r,a)=>Zte(t,s[a],r.from,r.to));if(e!=2&&!i.every(r=>r))return{changes:t.changes(n.map((r,a)=>i[a]?[]:[{from:r.from,insert:s[a].open+" "},{from:r.to,insert:" "+s[a].close}]))};if(e!=1&&i.some(r=>r)){let r=[];for(let a=0,c;a<i.length;a++)if(c=i[a]){let u=s[a],{open:h,close:f}=c;r.push({from:h.pos-u.open.length,to:h.pos+h.margin},{from:f.pos-f.margin,to:f.pos+u.close.length})}return{changes:r}}return null}function tne(e,t,n=t.selection.ranges){let s=[],i=-1;for(let{from:r,to:a}of n){let c=s.length,u=1e9,h=HP(t,r).line;if(h){for(let f=r;f<=a;){let p=t.doc.lineAt(f);if(p.from>i&&(r==a||a>p.from)){i=p.from;let _=/^\s*/.exec(p.text)[0].length,E=_==p.length,v=p.text.slice(_,_+h.length)==h?_:-1;_<p.text.length&&_<u&&(u=_),s.push({line:p,comment:v,token:h,indent:_,empty:E,single:!1})}f=p.to+1}if(u<1e9)for(let f=c;f<s.length;f++)s[f].indent<s[f].line.text.length&&(s[f].indent=u);s.length==c+1&&(s[c].single=!0)}}if(e!=2&&s.some(r=>r.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:c,token:u,indent:h,empty:f,single:p}of s)(p||!f)&&r.push({from:c.from+h,insert:u+" "});let a=t.changes(r);return{changes:a,selection:t.selection.map(a,1)}}else if(e!=1&&s.some(r=>r.comment>=0)){let r=[];for(let{line:a,comment:c,token:u}of s)if(c>=0){let h=a.from+c,f=h+u.length;a.text[f-a.from]==" "&&f++,r.push({from:h,to:f})}return{changes:r}}return null}const lN=Mh.define(),nne=Mh.define(),one=mn.define(),tz=mn.define({combine(e){return od(e,{minDepth:100,newGroupDelay:500,joinToEvent:(t,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,n)=>(s,i)=>t(s,i)||n(s,i)})}}),nz=Wi.define({create(){return Wu.empty},update(e,t){let n=t.state.facet(tz),s=t.annotation(lN);if(s){let u=Nl.fromTransaction(t,s.selection),h=s.side,f=h==0?e.undone:e.done;return u?f=lM(f,f.length,n.minDepth,u):f=iz(f,t.startState.selection),new Wu(h==0?s.rest:f,h==0?f:s.rest)}let i=t.annotation(nne);if((i=="full"||i=="before")&&(e=e.isolate()),t.annotation(ui.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let r=Nl.fromTransaction(t),a=t.annotation(ui.time),c=t.annotation(ui.userEvent);return r?e=e.addChanges(r,a,c,n,t):t.selection&&(e=e.addSelection(t.startState.selection,a,c,n.newGroupDelay)),(i=="full"||i=="after")&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(t=>t.toJSON()),undone:e.undone.map(t=>t.toJSON())}},fromJSON(e){return new Wu(e.done.map(Nl.fromJSON),e.undone.map(Nl.fromJSON))}});function sne(e={}){return[nz,tz.of(e),hn.domEventHandlers({beforeinput(t,n){let s=t.inputType=="historyUndo"?oz:t.inputType=="historyRedo"?aN:null;return s?(t.preventDefault(),s(n)):!1}})]}function hA(e,t){return function({state:n,dispatch:s}){if(!t&&n.readOnly)return!1;let i=n.field(nz,!1);if(!i)return!1;let r=i.pop(e,n,t);return r?(s(r),!0):!1}}const oz=hA(0,!1),aN=hA(1,!1),ine=hA(0,!0),rne=hA(1,!0);class Nl{constructor(t,n,s,i,r){this.changes=t,this.effects=n,this.mapped=s,this.startSelection=i,this.selectionsAfter=r}setSelAfter(t){return new Nl(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,n,s;return{changes:(t=this.changes)===null||t===void 0?void 0:t.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(s=this.startSelection)===null||s===void 0?void 0:s.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(t){return new Nl(t.changes&&yi.fromJSON(t.changes),[],t.mapped&&Yu.fromJSON(t.mapped),t.startSelection&&xt.fromJSON(t.startSelection),t.selectionsAfter.map(xt.fromJSON))}static fromTransaction(t,n){let s=Ja;for(let i of t.startState.facet(one)){let r=i(t);r.length&&(s=s.concat(r))}return!s.length&&t.changes.empty?null:new Nl(t.changes.invert(t.startState.doc),s,void 0,n||t.startState.selection,Ja)}static selection(t){return new Nl(void 0,Ja,void 0,void 0,t)}}function lM(e,t,n,s){let i=t+1>n+20?t-n-1:0,r=e.slice(i,t);return r.push(s),r}function lne(e,t){let n=[],s=!1;return e.iterChangedRanges((i,r)=>n.push(i,r)),t.iterChangedRanges((i,r,a,c)=>{for(let u=0;u<n.length;){let h=n[u++],f=n[u++];c>=h&&a<=f&&(s=!0)}}),s}function ane(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((n,s)=>n.empty!=t.ranges[s].empty).length===0}function sz(e,t){return e.length?t.length?e.concat(t):e:t}const Ja=[],cne=200;function iz(e,t){if(e.length){let n=e[e.length-1],s=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-cne));return s.length&&s[s.length-1].eq(t)?e:(s.push(t),lM(e,e.length-1,1e9,n.setSelAfter(s)))}else return[Nl.selection([t])]}function une(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function rw(e,t){if(!e.length)return e;let n=e.length,s=Ja;for(;n;){let i=dne(e[n-1],t,s);if(i.changes&&!i.changes.empty||i.effects.length){let r=e.slice(0,n);return r[n-1]=i,r}else t=i.mapped,n--,s=i.selectionsAfter}return s.length?[Nl.selection(s)]:Ja}function dne(e,t,n){let s=sz(e.selectionsAfter.length?e.selectionsAfter.map(c=>c.map(t)):Ja,n);if(!e.changes)return Nl.selection(s);let i=e.changes.map(t),r=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(r):r;return new Nl(i,Qn.mapEffects(e.effects,t),a,e.startSelection.map(r),s)}const hne=/^(input\.type|delete)($|\.)/;class Wu{constructor(t,n,s=0,i=void 0){this.done=t,this.undone=n,this.prevTime=s,this.prevUserEvent=i}isolate(){return this.prevTime?new Wu(this.done,this.undone):this}addChanges(t,n,s,i,r){let a=this.done,c=a[a.length-1];return c&&c.changes&&!c.changes.empty&&t.changes&&(!s||hne.test(s))&&(!c.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(r,lne(c.changes,t.changes))||s=="input.type.compose")?a=lM(a,a.length-1,i.minDepth,new Nl(t.changes.compose(c.changes),sz(Qn.mapEffects(t.effects,c.changes),c.effects),c.mapped,c.startSelection,Ja)):a=lM(a,a.length,i.minDepth,t),new Wu(a,Ja,n,s)}addSelection(t,n,s,i){let r=this.done.length?this.done[this.done.length-1].selectionsAfter:Ja;return r.length>0&&n-this.prevTime<i&&s==this.prevUserEvent&&s&&/^select($|\.)/.test(s)&&ane(r[r.length-1],t)?this:new Wu(iz(this.done,t),this.undone,n,s)}addMapping(t){return new Wu(rw(this.done,t),rw(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,n,s){let i=t==0?this.done:this.undone;if(i.length==0)return null;let r=i[i.length-1],a=r.selectionsAfter[0]||n.selection;if(s&&r.selectionsAfter.length)return n.update({selection:r.selectionsAfter[r.selectionsAfter.length-1],annotations:lN.of({side:t,rest:une(i),selection:a}),userEvent:t==0?"select.undo":"select.redo",scrollIntoView:!0});if(r.changes){let c=i.length==1?Ja:i.slice(0,i.length-1);return r.mapped&&(c=rw(c,r.mapped)),n.update({changes:r.changes,selection:r.startSelection,effects:r.effects,annotations:lN.of({side:t,rest:c,selection:a}),filter:!1,userEvent:t==0?"undo":"redo",scrollIntoView:!0})}else return null}}Wu.empty=new Wu(Ja,Ja);const fne=[{key:"Mod-z",run:oz,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:aN,preventDefault:!0},{linux:"Ctrl-Shift-z",run:aN,preventDefault:!0},{key:"Mod-u",run:ine,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:rne,preventDefault:!0}];function iv(e,t){return xt.create(e.ranges.map(t),e.mainIndex)}function id(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function qc({state:e,dispatch:t},n){let s=iv(e.selection,n);return s.eq(e.selection,!0)?!1:(t(id(e,s)),!0)}function fA(e,t){return xt.cursor(t?e.to:e.from)}function rz(e,t){return qc(e,n=>n.empty?e.moveByChar(n,t):fA(n,t))}function xr(e){return e.textDirectionAt(e.state.selection.main.head)==Rs.LTR}const lz=e=>rz(e,!xr(e)),az=e=>rz(e,xr(e));function cz(e,t){return qc(e,n=>n.empty?e.moveByGroup(n,t):fA(n,t))}const pne=e=>cz(e,!xr(e)),gne=e=>cz(e,xr(e));function mne(e,t,n){if(t.type.prop(n))return!0;let s=t.to-t.from;return s&&(s>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function pA(e,t,n){let s=Vi(e).resolveInner(t.head),i=n?Eo.closedBy:Eo.openedBy;for(let u=t.head;;){let h=n?s.childAfter(u):s.childBefore(u);if(!h)break;mne(e,h,i)?s=h:u=n?h.to:h.from}let r=s.type.prop(i),a,c;return r&&(a=n?Gu(e,s.from,1):Gu(e,s.to,-1))&&a.matched?c=n?a.end.to:a.end.from:c=n?s.to:s.from,xt.cursor(c,n?-1:1)}const _ne=e=>qc(e,t=>pA(e.state,t,!xr(e))),Tne=e=>qc(e,t=>pA(e.state,t,xr(e)));function uz(e,t){return qc(e,n=>{if(!n.empty)return fA(n,t);let s=e.moveVertically(n,t);return s.head!=n.head?s:e.moveToLineBoundary(n,t)})}const dz=e=>uz(e,!1),hz=e=>uz(e,!0);function fz(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,s=0,i;if(t){for(let r of e.state.facet(hn.scrollMargins)){let a=r(e);a!=null&&a.top&&(n=Math.max(a==null?void 0:a.top,n)),a!=null&&a.bottom&&(s=Math.max(a==null?void 0:a.bottom,s))}i=e.scrollDOM.clientHeight-n-s}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:s,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function pz(e,t){let n=fz(e),{state:s}=e,i=iv(s.selection,a=>a.empty?e.moveVertically(a,t,n.height):fA(a,t));if(i.eq(s.selection))return!1;let r;if(n.selfScroll){let a=e.coordsAtPos(s.selection.main.head),c=e.scrollDOM.getBoundingClientRect(),u=c.top+n.marginTop,h=c.bottom-n.marginBottom;a&&a.top>u&&a.bottom<h&&(r=hn.scrollIntoView(i.main.head,{y:"start",yMargin:a.top-u}))}return e.dispatch(id(s,i),{effects:r}),!0}const kU=e=>pz(e,!1),cN=e=>pz(e,!0);function Ap(e,t,n){let s=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?s.to:s.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==s.from&&s.length){let r=/^\s*/.exec(e.state.sliceDoc(s.from,Math.min(s.from+100,s.to)))[0].length;r&&t.head!=s.from+r&&(i=xt.cursor(s.from+r))}return i}const Ene=e=>qc(e,t=>Ap(e,t,!0)),vne=e=>qc(e,t=>Ap(e,t,!1)),bne=e=>qc(e,t=>Ap(e,t,!xr(e))),One=e=>qc(e,t=>Ap(e,t,xr(e))),Sne=e=>qc(e,t=>xt.cursor(e.lineBlockAt(t.head).from,1)),yne=e=>qc(e,t=>xt.cursor(e.lineBlockAt(t.head).to,-1));function $ne(e,t,n){let s=!1,i=iv(e.selection,r=>{let a=Gu(e,r.head,-1)||Gu(e,r.head,1)||r.head>0&&Gu(e,r.head-1,1)||r.head<e.doc.length&&Gu(e,r.head+1,-1);if(!a||!a.end)return r;s=!0;let c=a.start.from==r.head?a.end.to:a.end.from;return xt.cursor(c)});return s?(t(id(e,i)),!0):!1}const Ine=({state:e,dispatch:t})=>$ne(e,t);function dc(e,t){let n=iv(e.state.selection,s=>{let i=t(s);return xt.range(s.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(e.state.selection)?!1:(e.dispatch(id(e.state,n)),!0)}function gz(e,t){return dc(e,n=>e.moveByChar(n,t))}const mz=e=>gz(e,!xr(e)),_z=e=>gz(e,xr(e));function Tz(e,t){return dc(e,n=>e.moveByGroup(n,t))}const Rne=e=>Tz(e,!xr(e)),Cne=e=>Tz(e,xr(e)),Mne=e=>dc(e,t=>pA(e.state,t,!xr(e))),Ane=e=>dc(e,t=>pA(e.state,t,xr(e)));function Ez(e,t){return dc(e,n=>e.moveVertically(n,t))}const vz=e=>Ez(e,!1),bz=e=>Ez(e,!0);function Oz(e,t){return dc(e,n=>e.moveVertically(n,t,fz(e).height))}const NU=e=>Oz(e,!1),PU=e=>Oz(e,!0),Lne=e=>dc(e,t=>Ap(e,t,!0)),wne=e=>dc(e,t=>Ap(e,t,!1)),kne=e=>dc(e,t=>Ap(e,t,!xr(e))),Nne=e=>dc(e,t=>Ap(e,t,xr(e))),Pne=e=>dc(e,t=>xt.cursor(e.lineBlockAt(t.head).from)),Dne=e=>dc(e,t=>xt.cursor(e.lineBlockAt(t.head).to)),DU=({state:e,dispatch:t})=>(t(id(e,{anchor:0})),!0),xU=({state:e,dispatch:t})=>(t(id(e,{anchor:e.doc.length})),!0),BU=({state:e,dispatch:t})=>(t(id(e,{anchor:e.selection.main.anchor,head:0})),!0),FU=({state:e,dispatch:t})=>(t(id(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),xne=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0),Bne=({state:e,dispatch:t})=>{let n=gA(e).map(({from:s,to:i})=>xt.range(s,Math.min(i+1,e.doc.length)));return t(e.update({selection:xt.create(n),userEvent:"select"})),!0},Fne=({state:e,dispatch:t})=>{let n=iv(e.selection,s=>{let i=Vi(e),r=i.resolveStack(s.from,1);if(s.empty){let a=i.resolveStack(s.from,-1);a.node.from>=r.node.from&&a.node.to<=r.node.to&&(r=a)}for(let a=r;a;a=a.next){let{node:c}=a;if((c.from<s.from&&c.to>=s.to||c.to>s.to&&c.from<=s.from)&&a.next)return xt.range(c.to,c.from)}return s});return n.eq(e.selection)?!1:(t(id(e,n)),!0)},Une=({state:e,dispatch:t})=>{let n=e.selection,s=null;return n.ranges.length>1?s=xt.create([n.main]):n.main.empty||(s=xt.create([xt.cursor(n.main.head)])),s?(t(id(e,s)),!0):!1};function p$(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:s}=e,i=s.changeByRange(r=>{let{from:a,to:c}=r;if(a==c){let u=t(r);u<a?(n="delete.backward",u=Z0(e,u,!1)):u>a&&(n="delete.forward",u=Z0(e,u,!0)),a=Math.min(a,u),c=Math.max(c,u)}else a=Z0(e,a,!1),c=Z0(e,c,!0);return a==c?{range:r}:{changes:{from:a,to:c},range:xt.cursor(a,a<r.head?-1:1)}});return i.changes.empty?!1:(e.dispatch(s.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?hn.announce.of(s.phrase("Selection deleted")):void 0})),!0)}function Z0(e,t,n){if(e instanceof hn)for(let s of e.state.facet(hn.atomicRanges).map(i=>i(e)))s.between(t,t,(i,r)=>{i<t&&r>t&&(t=n?r:i)});return t}const Sz=(e,t,n)=>p$(e,s=>{let i=s.from,{state:r}=e,a=r.doc.lineAt(i),c,u;if(n&&!t&&i>a.from&&i<a.from+200&&!/[^ \t]/.test(c=a.text.slice(0,i-a.from))){if(c[c.length-1]==" ")return i-1;let h=sv(c,r.tabSize),f=h%sM(r)||sM(r);for(let p=0;p<f&&c[c.length-1-p]==" ";p++)i--;u=i}else u=nr(a.text,i-a.from,t,t)+a.from,u==i&&a.number!=(t?r.doc.lines:1)?u+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(a.text.slice(u-a.from,i-a.from))&&(u=nr(a.text,u-a.from,!1,!1)+a.from);return u}),uN=e=>Sz(e,!1,!0),yz=e=>Sz(e,!0,!1),$z=(e,t)=>p$(e,n=>{let s=n.head,{state:i}=e,r=i.doc.lineAt(s),a=i.charCategorizer(s);for(let c=null;;){if(s==(t?r.to:r.from)){s==n.head&&r.number!=(t?i.doc.lines:1)&&(s+=t?1:-1);break}let u=nr(r.text,s-r.from,t)+r.from,h=r.text.slice(Math.min(s,u)-r.from,Math.max(s,u)-r.from),f=a(h);if(c!=null&&f!=c)break;(h!=" "||s!=n.head)&&(c=f),s=u}return s}),Iz=e=>$z(e,!1),Hne=e=>$z(e,!0),Vne=e=>p$(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),Gne=e=>p$(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),Wne=e=>p$(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),Xne=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(s=>({changes:{from:s.from,to:s.to,insert:Fo.of(["",""])},range:xt.cursor(s.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},zne=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(s=>{if(!s.empty||s.from==0||s.from==e.doc.length)return{range:s};let i=s.from,r=e.doc.lineAt(i),a=i==r.from?i-1:nr(r.text,i-r.from,!1)+r.from,c=i==r.to?i+1:nr(r.text,i-r.from,!0)+r.from;return{changes:{from:a,to:c,insert:e.doc.slice(i,c).append(e.doc.slice(a,i))},range:xt.cursor(c)}});return n.changes.empty?!1:(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function gA(e){let t=[],n=-1;for(let s of e.selection.ranges){let i=e.doc.lineAt(s.from),r=e.doc.lineAt(s.to);if(!s.empty&&s.to==r.from&&(r=e.doc.lineAt(s.to-1)),n>=i.number){let a=t[t.length-1];a.to=r.to,a.ranges.push(s)}else t.push({from:i.from,to:r.to,ranges:[s]});n=r.number+1}return t}function Rz(e,t,n){if(e.readOnly)return!1;let s=[],i=[];for(let r of gA(e)){if(n?r.to==e.doc.length:r.from==0)continue;let a=e.doc.lineAt(n?r.to+1:r.from-1),c=a.length+1;if(n){s.push({from:r.to,to:a.to},{from:r.from,insert:a.text+e.lineBreak});for(let u of r.ranges)i.push(xt.range(Math.min(e.doc.length,u.anchor+c),Math.min(e.doc.length,u.head+c)))}else{s.push({from:a.from,to:r.from},{from:r.to,insert:e.lineBreak+a.text});for(let u of r.ranges)i.push(xt.range(u.anchor-c,u.head-c))}}return s.length?(t(e.update({changes:s,scrollIntoView:!0,selection:xt.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Yne=({state:e,dispatch:t})=>Rz(e,t,!1),Kne=({state:e,dispatch:t})=>Rz(e,t,!0);function Cz(e,t,n){if(e.readOnly)return!1;let s=[];for(let i of gA(e))n?s.push({from:i.from,insert:e.doc.slice(i.from,i.to)+e.lineBreak}):s.push({from:i.to,insert:e.lineBreak+e.doc.slice(i.from,i.to)});return t(e.update({changes:s,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const jne=({state:e,dispatch:t})=>Cz(e,t,!1),Qne=({state:e,dispatch:t})=>Cz(e,t,!0),qne=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(gA(t).map(({from:i,to:r})=>(i>0?i--:r<t.doc.length&&r++,{from:i,to:r}))),s=iv(t.selection,i=>{let r;if(e.lineWrapping){let a=e.lineBlockAt(i.head),c=e.coordsAtPos(i.head,i.assoc||1);c&&(r=a.bottom+e.documentTop-c.bottom+e.defaultLineHeight/2)}return e.moveVertically(i,!0,r)}).map(n);return e.dispatch({changes:n,selection:s,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Jne(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=Vi(e).resolveInner(t),s=n.childBefore(t),i=n.childAfter(t),r;return s&&i&&s.to<=t&&i.from>=t&&(r=s.type.prop(Eo.closedBy))&&r.indexOf(i.name)>-1&&e.doc.lineAt(s.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(s.to,i.from))?{from:s.to,to:i.from}:null}const UU=Mz(!1),Zne=Mz(!0);function Mz(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let s=t.changeByRange(i=>{let{from:r,to:a}=i,c=t.doc.lineAt(r),u=!e&&r==a&&Jne(t,r);e&&(r=a=(a<=c.to?c:t.doc.lineAt(a)).to);let h=new cA(t,{simulateBreak:r,simulateDoubleBreak:!!u}),f=BP(h,r);for(f==null&&(f=sv(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize));a<c.to&&/\s/.test(c.text[a-c.from]);)a++;u?{from:r,to:a}=u:r>c.from&&r<c.from+100&&!/\S/.test(c.text.slice(0,r))&&(r=c.from);let p=["",vy(t,f)];return u&&p.push(vy(t,h.lineIndent(c.from,-1))),{changes:{from:r,to:a,insert:Fo.of(p)},range:xt.cursor(r+1+p[1].length)}});return n(t.update(s,{scrollIntoView:!0,userEvent:"input"})),!0}}function VP(e,t){let n=-1;return e.changeByRange(s=>{let i=[];for(let a=s.from;a<=s.to;){let c=e.doc.lineAt(a);c.number>n&&(s.empty||s.to>c.from)&&(t(c,i,s),n=c.number),a=c.to+1}let r=e.changes(i);return{changes:i,range:xt.range(r.mapPos(s.anchor,1),r.mapPos(s.head,1))}})}const eoe=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),s=new cA(e,{overrideIndentation:r=>{let a=n[r];return a??-1}}),i=VP(e,(r,a,c)=>{let u=BP(s,r.from);if(u==null)return;/\S/.test(r.text)||(u=0);let h=/^\s*/.exec(r.text)[0],f=vy(e,u);(h!=f||c.from<r.from+h.length)&&(n[r.from]=u,a.push({from:r.from,to:r.from+h.length,insert:f}))});return i.changes.empty||t(e.update(i,{userEvent:"indent"})),!0},Az=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(VP(e,(n,s)=>{s.push({from:n.from,insert:e.facet(h$)})}),{userEvent:"input.indent"})),!0),Lz=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(VP(e,(n,s)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let r=sv(i,e.tabSize),a=0,c=vy(e,Math.max(0,r-sM(e)));for(;a<i.length&&a<c.length&&i.charCodeAt(a)==c.charCodeAt(a);)a++;s.push({from:n.from+a,to:n.from+i.length,insert:c.slice(a)})}),{userEvent:"delete.dedent"})),!0),toe=e=>(e.setTabFocusMode(),!0),noe=[{key:"Ctrl-b",run:lz,shift:mz,preventDefault:!0},{key:"Ctrl-f",run:az,shift:_z},{key:"Ctrl-p",run:dz,shift:vz},{key:"Ctrl-n",run:hz,shift:bz},{key:"Ctrl-a",run:Sne,shift:Pne},{key:"Ctrl-e",run:yne,shift:Dne},{key:"Ctrl-d",run:yz},{key:"Ctrl-h",run:uN},{key:"Ctrl-k",run:Vne},{key:"Ctrl-Alt-h",run:Iz},{key:"Ctrl-o",run:Xne},{key:"Ctrl-t",run:zne},{key:"Ctrl-v",run:cN}],ooe=[{key:"ArrowLeft",run:lz,shift:mz,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:pne,shift:Rne,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:bne,shift:kne,preventDefault:!0},{key:"ArrowRight",run:az,shift:_z,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:gne,shift:Cne,preventDefault:!0},{mac:"Cmd-ArrowRight",run:One,shift:Nne,preventDefault:!0},{key:"ArrowUp",run:dz,shift:vz,preventDefault:!0},{mac:"Cmd-ArrowUp",run:DU,shift:BU},{mac:"Ctrl-ArrowUp",run:kU,shift:NU},{key:"ArrowDown",run:hz,shift:bz,preventDefault:!0},{mac:"Cmd-ArrowDown",run:xU,shift:FU},{mac:"Ctrl-ArrowDown",run:cN,shift:PU},{key:"PageUp",run:kU,shift:NU},{key:"PageDown",run:cN,shift:PU},{key:"Home",run:vne,shift:wne,preventDefault:!0},{key:"Mod-Home",run:DU,shift:BU},{key:"End",run:Ene,shift:Lne,preventDefault:!0},{key:"Mod-End",run:xU,shift:FU},{key:"Enter",run:UU,shift:UU},{key:"Mod-a",run:xne},{key:"Backspace",run:uN,shift:uN},{key:"Delete",run:yz},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Iz},{key:"Mod-Delete",mac:"Alt-Delete",run:Hne},{mac:"Mod-Backspace",run:Gne},{mac:"Mod-Delete",run:Wne}].concat(noe.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),soe=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:_ne,shift:Mne},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Tne,shift:Ane},{key:"Alt-ArrowUp",run:Yne},{key:"Shift-Alt-ArrowUp",run:jne},{key:"Alt-ArrowDown",run:Kne},{key:"Shift-Alt-ArrowDown",run:Qne},{key:"Escape",run:Une},{key:"Mod-Enter",run:Zne},{key:"Alt-l",mac:"Ctrl-l",run:Bne},{key:"Mod-i",run:Fne,preventDefault:!0},{key:"Mod-[",run:Lz},{key:"Mod-]",run:Az},{key:"Mod-Alt-\\",run:eoe},{key:"Shift-Mod-k",run:qne},{key:"Shift-Mod-\\",run:Ine},{key:"Mod-/",run:jte},{key:"Alt-A",run:qte},{key:"Ctrl-m",mac:"Shift-Alt-m",run:toe}].concat(ooe),ioe={key:"Tab",run:Az,shift:Lz};function Es(){var e=arguments[0];typeof e=="string"&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s)){var i=n[s];typeof i=="string"?e.setAttribute(s,i):i!=null&&(e[s]=i)}t++}for(;t<arguments.length;t++)wz(e,arguments[t]);return e}function wz(e,t){if(typeof t=="string")e.appendChild(document.createTextNode(t));else if(t!=null)if(t.nodeType!=null)e.appendChild(t);else if(Array.isArray(t))for(var n=0;n<t.length;n++)wz(e,t[n]);else throw new RangeError("Unsupported child node: "+t)}const HU=typeof String.prototype.normalize=="function"?e=>e.normalize("NFKD"):e=>e;class kE{constructor(t,n,s=0,i=t.length,r,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(s,i),this.bufferStart=s,this.normalize=r?c=>r(HU(c)):HU,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 Al(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let n=TP(t),s=this.bufferStart+this.bufferPos;this.bufferPos+=Bu(t);let i=this.normalize(n);if(i.length)for(let r=0,a=s;;r++){let c=i.charCodeAt(r),u=this.match(c,a,this.bufferPos+this.bufferStart);if(r==i.length-1){if(u)return this.value=u,this;break}a==s&&r<n.length&&n.charCodeAt(r)==c&&a++}}}match(t,n,s){let i=null;for(let r=0;r<this.matches.length;r+=2){let a=this.matches[r],c=!1;this.query.charCodeAt(a)==t&&(a==this.query.length-1?i={from:this.matches[r+1],to:s}:(this.matches[r]++,c=!0)),c||(this.matches.splice(r,2),r-=2)}return this.query.charCodeAt(0)==t&&(this.query.length==1?i={from:n,to:s}:this.matches.push(1,n)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(kE.prototype[Symbol.iterator]=function(){return this});const kz={from:-1,to:-1,match:/.*/.exec("")},GP="gm"+(/x/.unicode==null?"":"u");class Nz{constructor(t,n,s,i=0,r=t.length){if(this.text=t,this.to=r,this.curLine="",this.done=!1,this.value=kz,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new Pz(t,n,s,i,r);this.re=new RegExp(n,GP+(s!=null&&s.ignoreCase?"i":"")),this.test=s==null?void 0:s.test,this.iter=t.iter();let a=t.lineAt(i);this.curLineStart=a.from,this.matchPos=aM(t,i),this.getLine(this.curLineStart)}getLine(t){this.iter.next(t),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let s=this.curLineStart+n.index,i=s+n[0].length;if(this.matchPos=aM(this.text,i+(s==i?1:0)),s==this.curLineStart+this.curLine.length&&this.nextLine(),(s<i||s>this.value.to)&&(!this.test||this.test(s,i,n)))return this.value={from:s,to:i,match:n},this;t=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),t=0;else return this.done=!0,this}}}const lw=new WeakMap;class pE{constructor(t,n){this.from=t,this.text=n}get to(){return this.from+this.text.length}static get(t,n,s){let i=lw.get(t);if(!i||i.from>=s||i.to<=n){let c=new pE(n,t.sliceString(n,s));return lw.set(t,c),c}if(i.from==n&&i.to==s)return i;let{text:r,from:a}=i;return a>n&&(r=t.sliceString(n,a)+r,a=n),i.to<s&&(r+=t.sliceString(i.to,s)),lw.set(t,new pE(a,r)),new pE(n,r.slice(n-a,s-a))}}class Pz{constructor(t,n,s,i,r){this.text=t,this.to=r,this.done=!1,this.value=kz,this.matchPos=aM(t,i),this.re=new RegExp(n,GP+(s!=null&&s.ignoreCase?"i":"")),this.test=s==null?void 0:s.test,this.flat=pE.get(t,i,this.chunkEnd(i+5e3))}chunkEnd(t){return t>=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==t&&(this.re.lastIndex=t+1,n=this.re.exec(this.flat.text)),n){let s=this.flat.from+n.index,i=s+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(s,i,n)))return this.value={from:s,to:i,match:n},this.matchPos=aM(this.text,i+(s==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=pE.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(Nz.prototype[Symbol.iterator]=Pz.prototype[Symbol.iterator]=function(){return this});function roe(e){try{return new RegExp(e,GP),!0}catch{return!1}}function aM(e,t){if(t>=e.length)return t;let n=e.lineAt(t),s;for(;t<n.to&&(s=n.text.charCodeAt(t-n.from))>=56320&&s<57344;)t++;return t}function dN(e){let t=String(e.state.doc.lineAt(e.state.selection.main.head).number),n=Es("input",{class:"cm-textfield",name:"line",value:t}),s=Es("form",{class:"cm-gotoLine",onkeydown:r=>{r.keyCode==27?(r.preventDefault(),e.dispatch({effects:cM.of(!1)}),e.focus()):r.keyCode==13&&(r.preventDefault(),i())},onsubmit:r=>{r.preventDefault(),i()}},Es("label",e.state.phrase("Go to line"),": ",n)," ",Es("button",{class:"cm-button",type:"submit"},e.state.phrase("go")));function i(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!r)return;let{state:a}=e,c=a.doc.lineAt(a.selection.main.head),[,u,h,f,p]=r,_=f?+f.slice(1):0,E=h?+h:c.number;if(h&&p){let y=E/100;u&&(y=y*(u=="-"?-1:1)+c.number/a.doc.lines),E=Math.round(a.doc.lines*y)}else h&&u&&(E=E*(u=="-"?-1:1)+c.number);let v=a.doc.line(Math.max(1,Math.min(a.doc.lines,E))),b=xt.cursor(v.from+Math.max(0,Math.min(_,v.length)));e.dispatch({effects:[cM.of(!1),hn.scrollIntoView(b.from,{y:"center"})],selection:b}),e.focus()}return{dom:s}}const cM=Qn.define(),VU=Wi.define({create(){return!0},update(e,t){for(let n of t.effects)n.is(cM)&&(e=n.value);return e},provide:e=>Ty.from(e,t=>t?dN:null)}),loe=e=>{let t=_y(e,dN);if(!t){let n=[cM.of(!0)];e.state.field(VU,!1)==null&&n.push(Qn.appendConfig.of([VU,aoe])),e.dispatch({effects:n}),t=_y(e,dN)}return t&&t.dom.querySelector("input").select(),!0},aoe=hn.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),coe={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},uoe=mn.define({combine(e){return od(e,coe,{highlightWordAroundCursor:(t,n)=>t||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function doe(e){return[moe,goe]}const hoe=wn.mark({class:"cm-selectionMatch"}),foe=wn.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function GU(e,t,n,s){return(n==0||e(t.sliceDoc(n-1,n))!=ks.Word)&&(s==t.doc.length||e(t.sliceDoc(s,s+1))!=ks.Word)}function poe(e,t,n,s){return e(t.sliceDoc(n,n+1))==ks.Word&&e(t.sliceDoc(s-1,s))==ks.Word}const goe=ei.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(uoe),{state:n}=e,s=n.selection;if(s.ranges.length>1)return wn.none;let i=s.main,r,a=null;if(i.empty){if(!t.highlightWordAroundCursor)return wn.none;let u=n.wordAt(i.head);if(!u)return wn.none;a=n.charCategorizer(i.head),r=n.sliceDoc(u.from,u.to)}else{let u=i.to-i.from;if(u<t.minSelectionLength||u>200)return wn.none;if(t.wholeWords){if(r=n.sliceDoc(i.from,i.to),a=n.charCategorizer(i.head),!(GU(a,n,i.from,i.to)&&poe(a,n,i.from,i.to)))return wn.none}else if(r=n.sliceDoc(i.from,i.to),!r)return wn.none}let c=[];for(let u of e.visibleRanges){let h=new kE(n.doc,r,u.from,u.to);for(;!h.next().done;){let{from:f,to:p}=h.value;if((!a||GU(a,n,f,p))&&(i.empty&&f<=i.from&&p>=i.to?c.push(foe.range(f,p)):(f>=i.to||p<=i.from)&&c.push(hoe.range(f,p)),c.length>t.maxMatches))return wn.none}}return wn.set(c)}},{decorations:e=>e.decorations}),moe=hn.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),_oe=({state:e,dispatch:t})=>{let{selection:n}=e,s=xt.create(n.ranges.map(i=>e.wordAt(i.head)||xt.cursor(i.head)),n.mainIndex);return s.eq(n)?!1:(t(e.update({selection:s})),!0)};function Toe(e,t){let{main:n,ranges:s}=e.selection,i=e.wordAt(n.head),r=i&&i.from==n.from&&i.to==n.to;for(let a=!1,c=new kE(e.doc,t,s[s.length-1].to);;)if(c.next(),c.done){if(a)return null;c=new kE(e.doc,t,0,Math.max(0,s[s.length-1].from-1)),a=!0}else{if(a&&s.some(u=>u.from==c.value.from))continue;if(r){let u=e.wordAt(c.value.from);if(!u||u.from!=c.value.from||u.to!=c.value.to)continue}return c.value}}const Eoe=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(r=>r.from===r.to))return _oe({state:e,dispatch:t});let s=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(r=>e.sliceDoc(r.from,r.to)!=s))return!1;let i=Toe(e,s);return i?(t(e.update({selection:e.selection.addRange(xt.range(i.from,i.to),!1),effects:hn.scrollIntoView(i.to)})),!0):!1},rv=mn.define({combine(e){return od(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new Loe(t),scrollToMatch:t=>hn.scrollIntoView(t)})}});class Dz{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||roe(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,(n,s)=>s=="n"?`
  1837. `:s=="r"?"\r":s=="t"?" ":"\\")}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new Soe(this):new boe(this)}getCursor(t,n=0,s){let i=t.doc?t:$o.create({doc:t});return s==null&&(s=i.doc.length),this.regexp?YT(this,i,n,s):zT(this,i,n,s)}}class xz{constructor(t){this.spec=t}}function zT(e,t,n,s){return new kE(t.doc,e.unquoted,n,s,e.caseSensitive?void 0:i=>i.toLowerCase(),e.wholeWord?voe(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}function voe(e,t){return(n,s,i,r)=>((r>n||r+i.length<s)&&(r=Math.max(0,n-2),i=e.sliceString(r,Math.min(e.length,s+2))),(t(uM(i,n-r))!=ks.Word||t(dM(i,n-r))!=ks.Word)&&(t(dM(i,s-r))!=ks.Word||t(uM(i,s-r))!=ks.Word))}class boe extends xz{constructor(t){super(t)}nextMatch(t,n,s){let i=zT(this.spec,t,s,t.doc.length).nextOverlapping();if(i.done){let r=Math.min(t.doc.length,n+this.spec.unquoted.length);i=zT(this.spec,t,0,r).nextOverlapping()}return i.done||i.value.from==n&&i.value.to==s?null:i.value}prevMatchInRange(t,n,s){for(let i=s;;){let r=Math.max(n,i-1e4-this.spec.unquoted.length),a=zT(this.spec,t,r,i),c=null;for(;!a.nextOverlapping().done;)c=a.value;if(c)return c;if(r==n)return null;i-=1e4}}prevMatch(t,n,s){let i=this.prevMatchInRange(t,0,n);return i||(i=this.prevMatchInRange(t,Math.max(0,s-this.spec.unquoted.length),t.doc.length)),i&&(i.from!=n||i.to!=s)?i:null}getReplacement(t){return this.spec.unquote(this.spec.replace)}matchAll(t,n){let s=zT(this.spec,t,0,t.doc.length),i=[];for(;!s.next().done;){if(i.length>=n)return null;i.push(s.value)}return i}highlight(t,n,s,i){let r=zT(this.spec,t,Math.max(0,n-this.spec.unquoted.length),Math.min(s+this.spec.unquoted.length,t.doc.length));for(;!r.next().done;)i(r.value.from,r.value.to)}}function YT(e,t,n,s){return new Nz(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?Ooe(t.charCategorizer(t.selection.main.head)):void 0},n,s)}function uM(e,t){return e.slice(nr(e,t,!1),t)}function dM(e,t){return e.slice(t,nr(e,t))}function Ooe(e){return(t,n,s)=>!s[0].length||(e(uM(s.input,s.index))!=ks.Word||e(dM(s.input,s.index))!=ks.Word)&&(e(dM(s.input,s.index+s[0].length))!=ks.Word||e(uM(s.input,s.index+s[0].length))!=ks.Word)}class Soe extends xz{nextMatch(t,n,s){let i=YT(this.spec,t,s,t.doc.length).next();return i.done&&(i=YT(this.spec,t,0,n).next()),i.done?null:i.value}prevMatchInRange(t,n,s){for(let i=1;;i++){let r=Math.max(n,s-i*1e4),a=YT(this.spec,t,r,s),c=null;for(;!a.next().done;)c=a.value;if(c&&(r==n||c.from>r+10))return c;if(r==n)return null}}prevMatch(t,n,s){return this.prevMatchInRange(t,0,n)||this.prevMatchInRange(t,s,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(n,s)=>s=="$"?"$":s=="&"?t.match[0]:s!="0"&&+s<t.match.length?t.match[s]:n)}matchAll(t,n){let s=YT(this.spec,t,0,t.doc.length),i=[];for(;!s.next().done;){if(i.length>=n)return null;i.push(s.value)}return i}highlight(t,n,s,i){let r=YT(this.spec,t,Math.max(0,n-250),Math.min(s+250,t.doc.length));for(;!r.next().done;)i(r.value.from,r.value.to)}}const by=Qn.define(),WP=Qn.define(),ap=Wi.define({create(e){return new aw(hN(e).create(),null)},update(e,t){for(let n of t.effects)n.is(by)?e=new aw(n.value.create(),e.panel):n.is(WP)&&(e=new aw(e.query,n.value?XP:null));return e},provide:e=>Ty.from(e,t=>t.panel)});class aw{constructor(t,n){this.query=t,this.panel=n}}const yoe=wn.mark({class:"cm-searchMatch"}),$oe=wn.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Ioe=ei.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(ap))}update(e){let t=e.state.field(ap);(t!=e.startState.field(ap)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return wn.none;let{view:n}=this,s=new vh;for(let i=0,r=n.visibleRanges,a=r.length;i<a;i++){let{from:c,to:u}=r[i];for(;i<a-1&&u>r[i+1].from-2*250;)u=r[++i].to;e.highlight(n.state,c,u,(h,f)=>{let p=n.state.selection.ranges.some(_=>_.from==h&&_.to==f);s.add(h,f,p?$oe:yoe)})}return s.finish()}},{decorations:e=>e.decorations});function g$(e){return t=>{let n=t.state.field(ap,!1);return n&&n.query.spec.valid?e(t,n):Uz(t)}}const hM=g$((e,{query:t})=>{let{to:n}=e.state.selection.main,s=t.nextMatch(e.state,n,n);if(!s)return!1;let i=xt.single(s.from,s.to),r=e.state.facet(rv);return e.dispatch({selection:i,effects:[zP(e,s),r.scrollToMatch(i.main,e)],userEvent:"select.search"}),Fz(e),!0}),fM=g$((e,{query:t})=>{let{state:n}=e,{from:s}=n.selection.main,i=t.prevMatch(n,s,s);if(!i)return!1;let r=xt.single(i.from,i.to),a=e.state.facet(rv);return e.dispatch({selection:r,effects:[zP(e,i),a.scrollToMatch(r.main,e)],userEvent:"select.search"}),Fz(e),!0}),Roe=g$((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:xt.create(n.map(s=>xt.range(s.from,s.to))),userEvent:"select.search.matches"}),!0)}),Coe=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:s,to:i}=n.main,r=[],a=0;for(let c=new kE(e.doc,e.sliceDoc(s,i));!c.next().done;){if(r.length>1e3)return!1;c.value.from==s&&(a=r.length),r.push(xt.range(c.value.from,c.value.to))}return t(e.update({selection:xt.create(r,a),userEvent:"select.search.matches"})),!0},WU=g$((e,{query:t})=>{let{state:n}=e,{from:s,to:i}=n.selection.main;if(n.readOnly)return!1;let r=t.nextMatch(n,s,s);if(!r)return!1;let a=r,c=[],u,h,f=[];if(a.from==s&&a.to==i&&(h=n.toText(t.getReplacement(a)),c.push({from:a.from,to:a.to,insert:h}),a=t.nextMatch(n,a.from,a.to),f.push(hn.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(s).number)+"."))),a){let p=c.length==0||c[0].from>=r.to?0:r.to-r.from-h.length;u=xt.single(a.from-p,a.to-p),f.push(zP(e,a)),f.push(n.facet(rv).scrollToMatch(u.main,e))}return e.dispatch({changes:c,selection:u,effects:f,userEvent:"input.replace"}),!0}),Moe=g$((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(i=>{let{from:r,to:a}=i;return{from:r,to:a,insert:t.getReplacement(i)}});if(!n.length)return!1;let s=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:hn.announce.of(s),userEvent:"input.replace.all"}),!0});function XP(e){return e.state.facet(rv).createPanel(e)}function hN(e,t){var n,s,i,r,a;let c=e.selection.main,u=c.empty||c.to>c.from+100?"":e.sliceDoc(c.from,c.to);if(t&&!u)return t;let h=e.facet(rv);return new Dz({search:((n=t==null?void 0:t.literal)!==null&&n!==void 0?n:h.literal)?u:u.replace(/\n/g,"\\n"),caseSensitive:(s=t==null?void 0:t.caseSensitive)!==null&&s!==void 0?s:h.caseSensitive,literal:(i=t==null?void 0:t.literal)!==null&&i!==void 0?i:h.literal,regexp:(r=t==null?void 0:t.regexp)!==null&&r!==void 0?r:h.regexp,wholeWord:(a=t==null?void 0:t.wholeWord)!==null&&a!==void 0?a:h.wholeWord})}function Bz(e){let t=_y(e,XP);return t&&t.dom.querySelector("[main-field]")}function Fz(e){let t=Bz(e);t&&t==e.root.activeElement&&t.select()}const Uz=e=>{let t=e.state.field(ap,!1);if(t&&t.panel){let n=Bz(e);if(n&&n!=e.root.activeElement){let s=hN(e.state,t.query.spec);s.valid&&e.dispatch({effects:by.of(s)}),n.focus(),n.select()}}else e.dispatch({effects:[WP.of(!0),t?by.of(hN(e.state,t.query.spec)):Qn.appendConfig.of(koe)]});return!0},Hz=e=>{let t=e.state.field(ap,!1);if(!t||!t.panel)return!1;let n=_y(e,XP);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:WP.of(!1)}),!0},Aoe=[{key:"Mod-f",run:Uz,scope:"editor search-panel"},{key:"F3",run:hM,shift:fM,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:hM,shift:fM,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Hz,scope:"editor search-panel"},{key:"Mod-Shift-l",run:Coe},{key:"Mod-Alt-g",run:loe},{key:"Mod-d",run:Eoe,preventDefault:!0}];class Loe{constructor(t){this.view=t;let n=this.query=t.state.field(ap).query.spec;this.commit=this.commit.bind(this),this.searchField=Es("input",{value:n.search,placeholder:oa(t,"Find"),"aria-label":oa(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Es("input",{value:n.replace,placeholder:oa(t,"Replace"),"aria-label":oa(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Es("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=Es("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=Es("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function s(i,r,a){return Es("button",{class:"cm-button",name:i,onclick:r,type:"button"},a)}this.dom=Es("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,s("next",()=>hM(t),[oa(t,"next")]),s("prev",()=>fM(t),[oa(t,"previous")]),s("select",()=>Roe(t),[oa(t,"all")]),Es("label",null,[this.caseField,oa(t,"match case")]),Es("label",null,[this.reField,oa(t,"regexp")]),Es("label",null,[this.wordField,oa(t,"by word")]),...t.state.readOnly?[]:[Es("br"),this.replaceField,s("replace",()=>WU(t),[oa(t,"replace")]),s("replaceAll",()=>Moe(t),[oa(t,"replace all")])],Es("button",{name:"close",onclick:()=>Hz(t),"aria-label":oa(t,"close"),type:"button"},["×"])])}commit(){let t=new Dz({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:by.of(t)}))}keydown(t){BZ(this.view,t,"search-panel")?t.preventDefault():t.keyCode==13&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?fM:hM)(this.view)):t.keyCode==13&&t.target==this.replaceField&&(t.preventDefault(),WU(this.view))}update(t){for(let n of t.transactions)for(let s of n.effects)s.is(by)&&!s.value.eq(this.query)&&this.setQuery(s.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(rv).top}}function oa(e,t){return e.state.phrase(t)}const eR=30,tR=/[\s\.,:;?!]/;function zP(e,{from:t,to:n}){let s=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,r=Math.max(s.from,t-eR),a=Math.min(i,n+eR),c=e.state.sliceDoc(r,a);if(r!=s.from){for(let u=0;u<eR;u++)if(!tR.test(c[u+1])&&tR.test(c[u])){c=c.slice(u);break}}if(a!=i){for(let u=c.length-1;u>c.length-eR;u--)if(!tR.test(c[u-1])&&tR.test(c[u])){c=c.slice(0,u);break}}return hn.announce.of(`${e.state.phrase("current match")}. ${c} ${e.state.phrase("on line")} ${s.number}.`)}const woe=hn.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"}}),koe=[ap,Mp.low(Ioe),woe];class Vz{constructor(t,n,s,i){this.state=t,this.pos=n,this.explicit=s,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let n=Vi(this.state).resolveInner(this.pos,-1);for(;n&&t.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(t){let n=this.state.doc.lineAt(this.pos),s=Math.max(n.from,this.pos-250),i=n.text.slice(s-n.from,this.pos-n.from),r=i.search(Wz(t,!1));return r<0?null:{from:s+r,to:this.pos,text:i.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(t,n,s){t=="abort"&&this.abortListeners&&(this.abortListeners.push(n),s&&s.onDocChange&&(this.abortOnDocChange=!0))}}function XU(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function Noe(e){let t=Object.create(null),n=Object.create(null);for(let{label:i}of e){t[i[0]]=!0;for(let r=1;r<i.length;r++)n[i[r]]=!0}let s=XU(t)+XU(n)+"*$";return[new RegExp("^"+s),new RegExp(s)]}function Gz(e){let t=e.map(i=>typeof i=="string"?{label:i}:i),[n,s]=t.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:Noe(t);return i=>{let r=i.matchBefore(s);return r||i.explicit?{from:r?r.from:i.pos,options:t,validFor:n}:null}}function Poe(e,t){return n=>{for(let s=Vi(n.state).resolveInner(n.pos,-1);s;s=s.parent){if(e.indexOf(s.name)>-1)return null;if(s.type.isTop)break}return t(n)}}let zU=class{constructor(t,n,s,i){this.completion=t,this.source=n,this.match=s,this.score=i}};function vm(e){return e.selection.main.from}function Wz(e,t){var n;let{source:s}=e,i=t&&s[0]!="^",r=s[s.length-1]!="$";return!i&&!r?e:new RegExp(`${i?"^":""}(?:${s})${r?"$":""}`,(n=e.flags)!==null&&n!==void 0?n:e.ignoreCase?"i":"")}const YP=Mh.define();function Doe(e,t,n,s){let{main:i}=e.selection,r=n-i.from,a=s-i.from;return Object.assign(Object.assign({},e.changeByRange(c=>{if(c!=i&&n!=s&&e.sliceDoc(c.from+r,c.from+a)!=e.sliceDoc(n,s))return{range:c};let u=e.toText(t);return{changes:{from:c.from+r,to:s==i.from?c.to:c.from+a,insert:u},range:xt.cursor(c.from+r+u.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const YU=new WeakMap;function xoe(e){if(!Array.isArray(e))return e;let t=YU.get(e);return t||YU.set(e,t=Gz(e)),t}const pM=Qn.define(),Oy=Qn.define();class Boe{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<t.length;){let s=Al(t,n),i=Bu(s);this.chars.push(s);let r=t.slice(n,n+i),a=r.toUpperCase();this.folded.push(Al(a==r?r.toLowerCase():a,0)),n+=i}this.astral=t.length!=this.chars.length}ret(t,n){return this.score=t,this.matched=n,this}match(t){if(this.pattern.length==0)return this.ret(-100,[]);if(t.length<this.pattern.length)return null;let{chars:n,folded:s,any:i,precise:r,byWord:a}=this;if(n.length==1){let L=Al(t,0),I=Bu(L),R=I==t.length?0:-100;if(L!=n[0])if(L==s[0])R+=-200;else return null;return this.ret(R,[0,I])}let c=t.indexOf(this.pattern);if(c==0)return this.ret(t.length==this.pattern.length?0:-100,[0,this.pattern.length]);let u=n.length,h=0;if(c<0){for(let L=0,I=Math.min(t.length,200);L<I&&h<u;){let R=Al(t,L);(R==n[h]||R==s[h])&&(i[h++]=L),L+=Bu(R)}if(h<u)return null}let f=0,p=0,_=!1,E=0,v=-1,b=-1,y=/[a-z]/.test(t),S=!0;for(let L=0,I=Math.min(t.length,200),R=0;L<I&&p<u;){let w=Al(t,L);c<0&&(f<u&&w==n[f]&&(r[f++]=L),E<u&&(w==n[E]||w==s[E]?(E==0&&(v=L),b=L+1,E++):E=0));let k,D=w<255?w>=48&&w<=57||w>=97&&w<=122?2:w>=65&&w<=90?1:0:(k=TP(w))!=k.toLowerCase()?1:k!=k.toUpperCase()?2:0;(!L||D==1&&y||R==0&&D!=0)&&(n[p]==w||s[p]==w&&(_=!0)?a[p++]=L:a.length&&(S=!1)),R=D,L+=Bu(w)}return p==u&&a[0]==0&&S?this.result(-100+(_?-200:0),a,t):E==u&&v==0?this.ret(-200-t.length+(b==t.length?0:-100),[0,b]):c>-1?this.ret(-700-t.length,[c,c+this.pattern.length]):E==u?this.ret(-900-t.length,[v,b]):p==u?this.result(-100+(_?-200:0)+-700+(S?0:-1100),a,t):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,t)}result(t,n,s){let i=[],r=0;for(let a of n){let c=a+(this.astral?Bu(Al(s,a)):1);r&&i[r-1]==a?i[r-1]=c:(i[r++]=a,i[r++]=c)}return this.ret(t-s.length,i)}}class Foe{constructor(t){this.pattern=t,this.matched=[],this.score=0,this.folded=t.toLowerCase()}match(t){if(t.length<this.pattern.length)return null;let n=t.slice(0,this.pattern.length),s=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return s==null?null:(this.matched=[0,n.length],this.score=s+(t.length==this.pattern.length?0:-100),this)}}const Ui=mn.define({combine(e){return od(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Uoe,filterStrict:!1,compareCompletions:(t,n)=>t.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,n)=>t&&n,closeOnBlur:(t,n)=>t&&n,icons:(t,n)=>t&&n,tooltipClass:(t,n)=>s=>KU(t(s),n(s)),optionClass:(t,n)=>s=>KU(t(s),n(s)),addToOptions:(t,n)=>t.concat(n),filterStrict:(t,n)=>t||n})}});function KU(e,t){return e?t?e+" "+t:e:t}function Uoe(e,t,n,s,i,r){let a=e.textDirection==Rs.RTL,c=a,u=!1,h="top",f,p,_=t.left-i.left,E=i.right-t.right,v=s.right-s.left,b=s.bottom-s.top;if(c&&_<Math.min(v,E)?c=!1:!c&&E<Math.min(v,_)&&(c=!0),v<=(c?_:E))f=Math.max(i.top,Math.min(n.top,i.bottom-b))-t.top,p=Math.min(400,c?_:E);else{u=!0,p=Math.min(400,(a?t.right:i.right-t.left)-30);let L=i.bottom-t.bottom;L>=b||L>t.top?f=n.bottom-t.top:(h="bottom",f=t.bottom-n.top)}let y=(t.bottom-t.top)/r.offsetHeight,S=(t.right-t.left)/r.offsetWidth;return{style:`${h}: ${f/y}px; max-width: ${p/S}px`,class:"cm-completionInfo-"+(u?a?"left-narrow":"right-narrow":c?"left":"right")}}function Hoe(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(n){let s=document.createElement("div");return s.classList.add("cm-completionIcon"),n.type&&s.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),s.setAttribute("aria-hidden","true"),s},position:20}),t.push({render(n,s,i,r){let a=document.createElement("span");a.className="cm-completionLabel";let c=n.displayLabel||n.label,u=0;for(let h=0;h<r.length;){let f=r[h++],p=r[h++];f>u&&a.appendChild(document.createTextNode(c.slice(u,f)));let _=a.appendChild(document.createElement("span"));_.appendChild(document.createTextNode(c.slice(f,p))),_.className="cm-completionMatchedText",u=p}return u<c.length&&a.appendChild(document.createTextNode(c.slice(u))),a},position:50},{render(n){if(!n.detail)return null;let s=document.createElement("span");return s.className="cm-completionDetail",s.textContent=n.detail,s},position:80}),t.sort((n,s)=>n.position-s.position).map(n=>n.render)}function cw(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let i=Math.floor(t/n);return{from:i*n,to:(i+1)*n}}let s=Math.floor((e-t)/n);return{from:e-(s+1)*n,to:e-s*n}}class Voe{constructor(t,n,s){this.view=t,this.stateField=n,this.applyCompletion=s,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:u=>this.placeInfo(u),key:this},this.space=null,this.currentClass="";let i=t.state.field(n),{options:r,selected:a}=i.open,c=t.state.facet(Ui);this.optionContent=Hoe(c),this.optionClass=c.optionClass,this.tooltipClass=c.tooltipClass,this.range=cw(r.length,a,c.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",u=>{let{options:h}=t.state.field(n).open;for(let f=u.target,p;f&&f!=this.dom;f=f.parentNode)if(f.nodeName=="LI"&&(p=/-(\d+)$/.exec(f.id))&&+p[1]<h.length){this.applyCompletion(t,h[+p[1]]),u.preventDefault();return}}),this.dom.addEventListener("focusout",u=>{let h=t.state.field(this.stateField,!1);h&&h.tooltip&&t.state.facet(Ui).closeOnBlur&&u.relatedTarget!=t.contentDOM&&t.dispatch({effects:Oy.of(null)})}),this.showOptions(r,i.id)}mount(){this.updateSel()}showOptions(t,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(t){var n;let s=t.state.field(this.stateField),i=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),s!=i){let{options:r,selected:a,disabled:c}=s.open;(!i.open||i.open.options!=r)&&(this.range=cw(r.length,a,t.state.facet(Ui).maxRenderedOptions),this.showOptions(r,s.id)),this.updateSel(),c!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!c)}}updateTooltipClass(t){let n=this.tooltipClass(t);if(n!=this.currentClass){for(let s of this.currentClass.split(" "))s&&this.dom.classList.remove(s);for(let s of n.split(" "))s&&this.dom.classList.add(s);this.currentClass=n}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),n=t.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=cw(n.options.length,n.selected,this.view.state.facet(Ui).maxRenderedOptions),this.showOptions(n.options,t.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:s}=n.options[n.selected],{info:i}=s;if(!i)return;let r=typeof i=="string"?document.createTextNode(i):i(s);if(!r)return;"then"in r?r.then(a=>{a&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(a,s)}).catch(a=>kl(this.view.state,a,"completion info")):this.addInfoPane(r,s)}}addInfoPane(t,n){this.destroyInfo();let s=this.info=document.createElement("div");if(s.className="cm-tooltip cm-completionInfo",t.nodeType!=null)s.appendChild(t),this.infoDestroy=null;else{let{dom:i,destroy:r}=t;s.appendChild(i),this.infoDestroy=r||null}this.dom.appendChild(s),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){let n=null;for(let s=this.list.firstChild,i=this.range.from;s;s=s.nextSibling,i++)s.nodeName!="LI"||!s.id?i--:i==t?s.hasAttribute("aria-selected")||(s.setAttribute("aria-selected","true"),n=s):s.hasAttribute("aria-selected")&&s.removeAttribute("aria-selected");return n&&Woe(this.list,n),n}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let n=this.dom.getBoundingClientRect(),s=this.info.getBoundingClientRect(),i=t.getBoundingClientRect(),r=this.space;if(!r){let a=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:a.innerWidth,bottom:a.innerHeight}}return i.top>Math.min(r.bottom,n.bottom)-10||i.bottom<Math.max(r.top,n.top)+10?null:this.view.state.facet(Ui).positionInfo(this.view,n,i,s,r,this.dom)}placeInfo(t){this.info&&(t?(t.style&&(this.info.style.cssText=t.style),this.info.className="cm-tooltip cm-completionInfo "+(t.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(t,n,s){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions"));let r=null;for(let a=s.from;a<s.to;a++){let{completion:c,match:u}=t[a],{section:h}=c;if(h){let _=typeof h=="string"?h:h.name;if(_!=r&&(a>s.from||s.from==0))if(r=_,typeof h!="string"&&h.header)i.appendChild(h.header(h));else{let E=i.appendChild(document.createElement("completion-section"));E.textContent=_}}const f=i.appendChild(document.createElement("li"));f.id=n+"-"+a,f.setAttribute("role","option");let p=this.optionClass(c);p&&(f.className=p);for(let _ of this.optionContent){let E=_(c,this.view.state,this.view,u);E&&f.appendChild(E)}}return s.from&&i.classList.add("cm-completionListIncompleteTop"),s.to<t.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function Goe(e,t){return n=>new Voe(n,e,t)}function Woe(e,t){let n=e.getBoundingClientRect(),s=t.getBoundingClientRect(),i=n.height/e.offsetHeight;s.top<n.top?e.scrollTop-=(n.top-s.top)/i:s.bottom>n.bottom&&(e.scrollTop+=(s.bottom-n.bottom)/i)}function jU(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}function Xoe(e,t){let n=[],s=null,i=h=>{n.push(h);let{section:f}=h.completion;if(f){s||(s=[]);let p=typeof f=="string"?f:f.name;s.some(_=>_.name==p)||s.push(typeof f=="string"?{name:p}:f)}},r=t.facet(Ui);for(let h of e)if(h.hasResult()){let f=h.result.getMatch;if(h.result.filter===!1)for(let p of h.result.options)i(new zU(p,h.source,f?f(p):[],1e9-n.length));else{let p=t.sliceDoc(h.from,h.to),_,E=r.filterStrict?new Foe(p):new Boe(p);for(let v of h.result.options)if(_=E.match(v.label)){let b=v.displayLabel?f?f(v,_.matched):[]:_.matched;i(new zU(v,h.source,b,_.score+(v.boost||0)))}}}if(s){let h=Object.create(null),f=0,p=(_,E)=>{var v,b;return((v=_.rank)!==null&&v!==void 0?v:1e9)-((b=E.rank)!==null&&b!==void 0?b:1e9)||(_.name<E.name?-1:1)};for(let _ of s.sort(p))f-=1e5,h[_.name]=f;for(let _ of n){let{section:E}=_.completion;E&&(_.score+=h[typeof E=="string"?E:E.name])}}let a=[],c=null,u=r.compareCompletions;for(let h of n.sort((f,p)=>p.score-f.score||u(f.completion,p.completion))){let f=h.completion;!c||c.label!=f.label||c.detail!=f.detail||c.type!=null&&f.type!=null&&c.type!=f.type||c.apply!=f.apply||c.boost!=f.boost?a.push(h):jU(h.completion)>jU(c)&&(a[a.length-1]=h),c=h.completion}return a}class oE{constructor(t,n,s,i,r,a){this.options=t,this.attrs=n,this.tooltip=s,this.timestamp=i,this.selected=r,this.disabled=a}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new oE(this.options,QU(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,s,i,r,a){if(i&&!a&&t.some(h=>h.isPending))return i.setDisabled();let c=Xoe(t,n);if(!c.length)return i&&t.some(h=>h.isPending)?i.setDisabled():null;let u=n.facet(Ui).selectOnOpen?0:-1;if(i&&i.selected!=u&&i.selected!=-1){let h=i.options[i.selected].completion;for(let f=0;f<c.length;f++)if(c[f].completion==h){u=f;break}}return new oE(c,QU(s,u),{pos:t.reduce((h,f)=>f.hasResult()?Math.min(h,f.from):h,1e8),create:qoe,above:r.aboveCursor},i?i.timestamp:Date.now(),u,!1)}map(t){return new oE(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new oE(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class gM{constructor(t,n,s){this.active=t,this.id=n,this.open=s}static start(){return new gM(joe,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,s=n.facet(Ui),r=(s.override||n.languageDataAt("autocomplete",vm(n)).map(xoe)).map(u=>(this.active.find(f=>f.source==u)||new Za(u,this.active.some(f=>f.state!=0)?1:0)).update(t,s));r.length==this.active.length&&r.every((u,h)=>u==this.active[h])&&(r=this.active);let a=this.open,c=t.effects.some(u=>u.is(KP));a&&t.docChanged&&(a=a.map(t.changes)),t.selection||r.some(u=>u.hasResult()&&t.changes.touchesRange(u.from,u.to))||!zoe(r,this.active)||c?a=oE.build(r,n,this.id,a,s,c):a&&a.disabled&&!r.some(u=>u.isPending)&&(a=null),!a&&r.every(u=>!u.isPending)&&r.some(u=>u.hasResult())&&(r=r.map(u=>u.hasResult()?new Za(u.source,0):u));for(let u of t.effects)u.is(zz)&&(a=a&&a.setSelected(u.value,this.id));return r==this.active&&a==this.open?this:new gM(r,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Yoe:Koe}}function zoe(e,t){if(e==t)return!0;for(let n=0,s=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;s<t.length&&!t[s].hasResult();)s++;let i=n==e.length,r=s==t.length;if(i||r)return i==r;if(e[n++].result!=t[s++].result)return!1}}const Yoe={"aria-autocomplete":"list"},Koe={};function QU(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}const joe=[];function Xz(e,t){if(e.isUserEvent("input.complete")){let s=e.annotation(YP);if(s&&t.activateOnCompletion(s))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:e.docChanged?16:0}class Za{constructor(t,n,s=!1){this.source=t,this.state=n,this.explicit=s}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let s=Xz(t,n),i=this;(s&8||s&16&&this.touches(t))&&(i=new Za(i.source,0)),s&4&&i.state==0&&(i=new Za(this.source,1)),i=i.updateFor(t,s);for(let r of t.effects)if(r.is(pM))i=new Za(i.source,1,r.value);else if(r.is(Oy))i=new Za(i.source,0);else if(r.is(KP))for(let a of r.value)a.source==i.source&&(i=a);return i}updateFor(t,n){return this.map(t.changes)}map(t){return this}touches(t){return t.changes.touchesRange(vm(t.state))}}class gE extends Za{constructor(t,n,s,i,r,a){super(t,3,n),this.limit=s,this.result=i,this.from=r,this.to=a}hasResult(){return!0}updateFor(t,n){var s;if(!(n&3))return this.map(t.changes);let i=this.result;i.map&&!t.changes.empty&&(i=i.map(i,t.changes));let r=t.changes.mapPos(this.from),a=t.changes.mapPos(this.to,1),c=vm(t.state);if(c>a||!i||n&2&&(vm(t.startState)==this.from||c<this.limit))return new Za(this.source,n&4?1:0);let u=t.changes.mapPos(this.limit);return Qoe(i.validFor,t.state,r,a)?new gE(this.source,this.explicit,u,i,r,a):i.update&&(i=i.update(i,r,a,new Vz(t.state,c,!1)))?new gE(this.source,this.explicit,u,i,i.from,(s=i.to)!==null&&s!==void 0?s:vm(t.state)):new Za(this.source,1,this.explicit)}map(t){return t.empty?this:(this.result.map?this.result.map(this.result,t):this.result)?new gE(this.source,this.explicit,t.mapPos(this.limit),this.result,t.mapPos(this.from),t.mapPos(this.to,1)):new Za(this.source,0)}touches(t){return t.changes.touchesRange(this.from,this.to)}}function Qoe(e,t,n,s){if(!e)return!1;let i=t.sliceDoc(n,s);return typeof e=="function"?e(i,n,s,t):Wz(e,!0).test(i)}const KP=Qn.define({map(e,t){return e.map(n=>n.map(t))}}),zz=Qn.define(),wl=Wi.define({create(){return gM.start()},update(e,t){return e.update(t)},provide:e=>[kP.from(e,t=>t.tooltip),hn.contentAttributes.from(e,t=>t.attrs)]});function jP(e,t){const n=t.completion.apply||t.completion.label;let s=e.state.field(wl).active.find(i=>i.source==t.source);return s instanceof gE?(typeof n=="string"?e.dispatch(Object.assign(Object.assign({},Doe(e.state,n,s.from,s.to)),{annotations:YP.of(t.completion)})):n(e,t.completion,s.from,s.to),!0):!1}const qoe=Goe(wl,jP);function nR(e,t="option"){return n=>{let s=n.state.field(wl,!1);if(!s||!s.open||s.open.disabled||Date.now()-s.open.timestamp<n.state.facet(Ui).interactionDelay)return!1;let i=1,r;t=="page"&&(r=I4(n,s.open.tooltip))&&(i=Math.max(2,Math.floor(r.dom.offsetHeight/r.dom.querySelector("li").offsetHeight)-1));let{length:a}=s.open.options,c=s.open.selected>-1?s.open.selected+i*(e?1:-1):e?0:a-1;return c<0?c=t=="page"?0:a-1:c>=a&&(c=t=="page"?a-1:0),n.dispatch({effects:zz.of(c)}),!0}}const Joe=e=>{let t=e.state.field(wl,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(Ui).interactionDelay?!1:jP(e,t.open.options[t.open.selected])},qU=e=>e.state.field(wl,!1)?(e.dispatch({effects:pM.of(!0)}),!0):!1,Zoe=e=>{let t=e.state.field(wl,!1);return!t||!t.active.some(n=>n.state!=0)?!1:(e.dispatch({effects:Oy.of(null)}),!0)};class ese{constructor(t,n){this.active=t,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const tse=50,nse=1e3,ose=ei.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(wl).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(wl),n=e.state.facet(Ui);if(!e.selectionSet&&!e.docChanged&&e.startState.field(wl)==t)return;let s=e.transactions.some(r=>{let a=Xz(r,n);return a&8||(r.selection||r.docChanged)&&!(a&3)});for(let r=0;r<this.running.length;r++){let a=this.running[r];if(s||a.context.abortOnDocChange&&e.docChanged||a.updates.length+e.transactions.length>tse&&Date.now()-a.time>nse){for(let c of a.context.abortListeners)try{c()}catch(u){kl(this.view.state,u)}a.context.abortListeners=null,this.running.splice(r--,1)}else a.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(r=>r.effects.some(a=>a.is(pM)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(r=>r.isPending&&!this.running.some(a=>a.active.source==r.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let r of e.transactions)r.isUserEvent("input.type")?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(wl);for(let n of t.active)n.isPending&&!this.running.some(s=>s.active.source==n.source)&&this.startQuery(n);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Ui).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=vm(t),s=new Vz(t,n,e.explicit,this.view),i=new ese(e,s);this.running.push(i),Promise.resolve(e.source(s)).then(r=>{i.context.aborted||(i.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:Oy.of(null)}),kl(this.view.state,r)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Ui).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(Ui),s=this.view.state.field(wl);for(let i=0;i<this.running.length;i++){let r=this.running[i];if(r.done===void 0)continue;if(this.running.splice(i--,1),r.done){let c=vm(r.updates.length?r.updates[0].startState:this.view.state),u=Math.min(c,r.done.from+(r.active.explicit?0:1)),h=new gE(r.active.source,r.active.explicit,u,r.done,r.done.from,(e=r.done.to)!==null&&e!==void 0?e:c);for(let f of r.updates)h=h.update(f,n);if(h.hasResult()){t.push(h);continue}}let a=s.active.find(c=>c.source==r.active.source);if(a&&a.isPending)if(r.done==null){let c=new Za(r.active.source,0);for(let u of r.updates)c=c.update(u,n);c.isPending||t.push(c)}else this.startQuery(a)}(t.length||s.open&&s.open.disabled)&&this.view.dispatch({effects:KP.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(wl,!1);if(t&&t.tooltip&&this.view.state.facet(Ui).closeOnBlur){let n=t.open&&I4(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Oy.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:pM.of(!1)}),20),this.composing=0}}}),sse=typeof navigator=="object"&&/Win/.test(navigator.platform),ise=Mp.highest(hn.domEventHandlers({keydown(e,t){let n=t.state.field(wl,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(sse&&e.altKey)||e.metaKey)return!1;let s=n.open.options[n.open.selected],i=n.active.find(a=>a.source==s.source),r=s.completion.commitCharacters||i.result.commitCharacters;return r&&r.indexOf(e.key)>-1&&jP(t,s),!1}})),Yz=hn.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class rse{constructor(t,n,s,i){this.field=t,this.line=n,this.from=s,this.to=i}}class QP{constructor(t,n,s){this.field=t,this.from=n,this.to=s}map(t){let n=t.mapPos(this.from,-1,tr.TrackDel),s=t.mapPos(this.to,1,tr.TrackDel);return n==null||s==null?null:new QP(this.field,n,s)}}class qP{constructor(t,n){this.lines=t,this.fieldPositions=n}instantiate(t,n){let s=[],i=[n],r=t.doc.lineAt(n),a=/^\s*/.exec(r.text)[0];for(let u of this.lines){if(s.length){let h=a,f=/^\t*/.exec(u)[0].length;for(let p=0;p<f;p++)h+=t.facet(h$);i.push(n+h.length-f),u=h+u.slice(f)}s.push(u),n+=u.length+1}let c=this.fieldPositions.map(u=>new QP(u.field,i[u.line]+u.from,i[u.line]+u.to));return{text:s,ranges:c}}static parse(t){let n=[],s=[],i=[],r;for(let a of t.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(a);){let c=r[1]?+r[1]:null,u=r[2]||r[3]||"",h=-1,f=u.replace(/\\[{}]/g,p=>p[1]);for(let p=0;p<n.length;p++)(c!=null?n[p].seq==c:f&&n[p].name==f)&&(h=p);if(h<0){let p=0;for(;p<n.length&&(c==null||n[p].seq!=null&&n[p].seq<c);)p++;n.splice(p,0,{seq:c,name:f}),h=p;for(let _ of i)_.field>=h&&_.field++}i.push(new rse(h,s.length,r.index,r.index+f.length)),a=a.slice(0,r.index)+u+a.slice(r.index+r[0].length)}a=a.replace(/\\([{}])/g,(c,u,h)=>{for(let f of i)f.line==s.length&&f.from>h&&(f.from--,f.to--);return u}),s.push(a)}return new qP(s,i)}}let lse=wn.widget({widget:new class extends sd{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),ase=wn.mark({class:"cm-snippetField"});class lv{constructor(t,n){this.ranges=t,this.active=n,this.deco=wn.set(t.map(s=>(s.from==s.to?lse:ase).range(s.from,s.to)))}map(t){let n=[];for(let s of this.ranges){let i=s.map(t);if(!i)return null;n.push(i)}return new lv(n,this.active)}selectionInsideField(t){return t.ranges.every(n=>this.ranges.some(s=>s.field==this.active&&s.from<=n.from&&s.to>=n.to))}}const m$=Qn.define({map(e,t){return e&&e.map(t)}}),cse=Qn.define(),Sy=Wi.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(m$))return n.value;if(n.is(cse)&&e)return new lv(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>hn.decorations.from(e,t=>t?t.deco:wn.none)});function JP(e,t){return xt.create(e.filter(n=>n.field==t).map(n=>xt.range(n.from,n.to)))}function use(e){let t=qP.parse(e);return(n,s,i,r)=>{let{text:a,ranges:c}=t.instantiate(n.state,i),{main:u}=n.state.selection,h={changes:{from:i,to:r==u.from?u.to:r,insert:Fo.of(a)},scrollIntoView:!0,annotations:s?[YP.of(s),ui.userEvent.of("input.complete")]:void 0};if(c.length&&(h.selection=JP(c,0)),c.some(f=>f.field>0)){let f=new lv(c,0),p=h.effects=[m$.of(f)];n.state.field(Sy,!1)===void 0&&p.push(Qn.appendConfig.of([Sy,gse,mse,Yz]))}n.dispatch(n.state.update(h))}}function Kz(e){return({state:t,dispatch:n})=>{let s=t.field(Sy,!1);if(!s||e<0&&s.active==0)return!1;let i=s.active+e,r=e>0&&!s.ranges.some(a=>a.field==i+e);return n(t.update({selection:JP(s.ranges,i),effects:m$.of(r?null:new lv(s.ranges,i)),scrollIntoView:!0})),!0}}const dse=({state:e,dispatch:t})=>e.field(Sy,!1)?(t(e.update({effects:m$.of(null)})),!0):!1,hse=Kz(1),fse=Kz(-1),pse=[{key:"Tab",run:hse,shift:fse},{key:"Escape",run:dse}],JU=mn.define({combine(e){return e.length?e[0]:pse}}),gse=Mp.highest(u$.compute([JU],e=>e.facet(JU)));function qd(e,t){return Object.assign(Object.assign({},t),{apply:use(e)})}const mse=hn.domEventHandlers({mousedown(e,t){let n=t.state.field(Sy,!1),s;if(!n||(s=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(r=>r.from<=s&&r.to>=s);return!i||i.field==n.active?!1:(t.dispatch({selection:JP(n.ranges,i.field),effects:m$.of(n.ranges.some(r=>r.field>i.field)?new lv(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),yy={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},am=Qn.define({map(e,t){let n=t.mapPos(e,-1,tr.TrackAfter);return n??void 0}}),ZP=new class extends Cm{};ZP.startSide=1;ZP.endSide=-1;const jz=Wi.define({create(){return No.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:s=>s>=n.from&&s<=n.to})}for(let n of t.effects)n.is(am)&&(e=e.update({add:[ZP.range(n.value,n.value+1)]}));return e}});function _se(){return[Ese,jz]}const uw="()[]{}<>";function Qz(e){for(let t=0;t<uw.length;t+=2)if(uw.charCodeAt(t)==e)return uw.charAt(t+1);return TP(e<128?e:e+1)}function qz(e,t){return e.languageDataAt("closeBrackets",t)[0]||yy}const Tse=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Ese=hn.inputHandler.of((e,t,n,s)=>{if((Tse?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(s.length>2||s.length==2&&Bu(Al(s,0))==1||t!=i.from||n!=i.to)return!1;let r=Ose(e.state,s);return r?(e.dispatch(r),!0):!1}),vse=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let s=qz(e,e.selection.main.head).brackets||yy.brackets,i=null,r=e.changeByRange(a=>{if(a.empty){let c=Sse(e.doc,a.head);for(let u of s)if(u==c&&mA(e.doc,a.head)==Qz(Al(u,0)))return{changes:{from:a.head-u.length,to:a.head+u.length},range:xt.cursor(a.head-u.length)}}return{range:i=a}});return i||t(e.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},bse=[{key:"Backspace",run:vse}];function Ose(e,t){let n=qz(e,e.selection.main.head),s=n.brackets||yy.brackets;for(let i of s){let r=Qz(Al(i,0));if(t==i)return r==i?Ise(e,i,s.indexOf(i+i+i)>-1,n):yse(e,i,r,n.before||yy.before);if(t==r&&Jz(e,e.selection.main.from))return $se(e,i,r)}return null}function Jz(e,t){let n=!1;return e.field(jz).between(0,e.doc.length,s=>{s==t&&(n=!0)}),n}function mA(e,t){let n=e.sliceString(t,t+2);return n.slice(0,Bu(Al(n,0)))}function Sse(e,t){let n=e.sliceString(t-2,t);return Bu(Al(n,0))==n.length?n:n.slice(1)}function yse(e,t,n,s){let i=null,r=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:n,from:a.to}],effects:am.of(a.to+t.length),range:xt.range(a.anchor+t.length,a.head+t.length)};let c=mA(e.doc,a.head);return!c||/\s/.test(c)||s.indexOf(c)>-1?{changes:{insert:t+n,from:a.head},effects:am.of(a.head+t.length),range:xt.cursor(a.head+t.length)}:{range:i=a}});return i?null:e.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function $se(e,t,n){let s=null,i=e.changeByRange(r=>r.empty&&mA(e.doc,r.head)==n?{changes:{from:r.head,to:r.head+n.length,insert:n},range:xt.cursor(r.head+n.length)}:s={range:r});return s?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function Ise(e,t,n,s){let i=s.stringPrefixes||yy.stringPrefixes,r=null,a=e.changeByRange(c=>{if(!c.empty)return{changes:[{insert:t,from:c.from},{insert:t,from:c.to}],effects:am.of(c.to+t.length),range:xt.range(c.anchor+t.length,c.head+t.length)};let u=c.head,h=mA(e.doc,u),f;if(h==t){if(ZU(e,u))return{changes:{insert:t+t,from:u},effects:am.of(u+t.length),range:xt.cursor(u+t.length)};if(Jz(e,u)){let _=n&&e.sliceDoc(u,u+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:u,to:u+_.length,insert:_},range:xt.cursor(u+_.length)}}}else{if(n&&e.sliceDoc(u-2*t.length,u)==t+t&&(f=e2(e,u-2*t.length,i))>-1&&ZU(e,f))return{changes:{insert:t+t+t+t,from:u},effects:am.of(u+t.length),range:xt.cursor(u+t.length)};if(e.charCategorizer(u)(h)!=ks.Word&&e2(e,u,i)>-1&&!Rse(e,u,t,i))return{changes:{insert:t+t,from:u},effects:am.of(u+t.length),range:xt.cursor(u+t.length)}}return{range:r=c}});return r?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function ZU(e,t){let n=Vi(e).resolveInner(t+1);return n.parent&&n.from==t}function Rse(e,t,n,s){let i=Vi(e).resolveInner(t,-1),r=s.reduce((a,c)=>Math.max(a,c.length),0);for(let a=0;a<5;a++){let c=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+r)),u=c.indexOf(n);if(!u||u>-1&&s.indexOf(c.slice(0,u))>-1){let f=i.firstChild;for(;f&&f.from==i.from&&f.to-f.from>n.length+u;){if(e.sliceDoc(f.to-n.length,f.to)==n)return!1;f=f.firstChild}return!0}let h=i.to==t&&i.parent;if(!h)break;i=h}return!1}function e2(e,t,n){let s=e.charCategorizer(t);if(s(e.sliceDoc(t-1,t))!=ks.Word)return t;for(let i of n){let r=t-i.length;if(e.sliceDoc(r,t)==i&&s(e.sliceDoc(r-1,r))!=ks.Word)return r}return-1}function Cse(e={}){return[ise,wl,Ui.of(e),ose,Mse,Yz]}const Zz=[{key:"Ctrl-Space",run:qU},{mac:"Alt-`",run:qU},{key:"Escape",run:Zoe},{key:"ArrowDown",run:nR(!0)},{key:"ArrowUp",run:nR(!1)},{key:"PageDown",run:nR(!0,"page")},{key:"PageUp",run:nR(!1,"page")},{key:"Enter",run:Joe}],Mse=Mp.highest(u$.computeN([Ui],e=>e.facet(Ui).defaultKeymap?[Zz]:[]));class t2{constructor(t,n,s){this.from=t,this.to=n,this.diagnostic=s}}class om{constructor(t,n,s){this.diagnostics=t,this.panel=n,this.selected=s}static init(t,n,s){let i=t,r=s.facet($y).markerFilter;r&&(i=r(i,s));let a=t.slice().sort((p,_)=>p.from-_.from||p.to-_.to),c=new vh,u=[],h=0;for(let p=0;;){let _=p==a.length?null:a[p];if(!_&&!u.length)break;let E,v;for(u.length?(E=h,v=u.reduce((y,S)=>Math.min(y,S.to),_&&_.from>E?_.from:1e8)):(E=_.from,v=_.to,u.push(_),p++);p<a.length;){let y=a[p];if(y.from==E&&(y.to>y.from||y.to==E))u.push(y),p++,v=Math.min(y.to,v);else{v=Math.min(y.from,v);break}}let b=Vse(u);if(u.some(y=>y.from==y.to||y.from==y.to-1&&s.doc.lineAt(y.from).to==y.from))c.add(E,E,wn.widget({widget:new Bse(b),diagnostics:u.slice()}));else{let y=u.reduce((S,L)=>L.markClass?S+" "+L.markClass:S,"");c.add(E,v,wn.mark({class:"cm-lintRange cm-lintRange-"+b+y,diagnostics:u.slice(),inclusiveEnd:u.some(S=>S.to>v)}))}h=v;for(let y=0;y<u.length;y++)u[y].to<=h&&u.splice(y--,1)}let f=c.finish();return new om(f,n,NE(f))}}function NE(e,t=null,n=0){let s=null;return e.between(n,1e9,(i,r,{spec:a})=>{if(!(t&&a.diagnostics.indexOf(t)<0))if(!s)s=new t2(i,r,t||a.diagnostics[0]);else{if(a.diagnostics.indexOf(s.diagnostic)<0)return!1;s=new t2(s.from,r,s.diagnostic)}}),s}function Ase(e,t){let n=t.pos,s=t.end||n,i=e.state.facet($y).hideOn(e,n,s);if(i!=null)return i;let r=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(a=>a.is(e8))||e.changes.touchesRange(r.from,Math.max(r.to,s)))}function Lse(e,t){return e.field(ca,!1)?t:t.concat(Qn.appendConfig.of(Gse))}const e8=Qn.define(),eD=Qn.define(),t8=Qn.define(),ca=Wi.define({create(){return new om(wn.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),s=null,i=e.panel;if(e.selected){let r=t.changes.mapPos(e.selected.from,1);s=NE(n,e.selected.diagnostic,r)||NE(n,null,r)}!n.size&&i&&t.state.facet($y).autoPanel&&(i=null),e=new om(n,i,s)}for(let n of t.effects)if(n.is(e8)){let s=t.state.facet($y).autoPanel?n.value.length?Iy.open:null:e.panel;e=om.init(n.value,s,t.state)}else n.is(eD)?e=new om(e.diagnostics,n.value?Iy.open:null,e.selected):n.is(t8)&&(e=new om(e.diagnostics,e.panel,n.value));return e},provide:e=>[Ty.from(e,t=>t.panel),hn.decorations.from(e,t=>t.diagnostics)]}),wse=wn.mark({class:"cm-lintRange cm-lintRange-active"});function kse(e,t,n){let{diagnostics:s}=e.state.field(ca),i,r=-1,a=-1;s.between(t-(n<0?1:0),t+(n>0?1:0),(u,h,{spec:f})=>{if(t>=u&&t<=h&&(u==h||(t>u||n>0)&&(t<h||n<0)))return i=f.diagnostics,r=u,a=h,!1});let c=e.state.facet($y).tooltipFilter;return i&&c&&(i=c(i,e.state)),i?{pos:r,end:a,above:e.state.doc.lineAt(r).to<a,create(){return{dom:Nse(e,i)}}}:null}function Nse(e,t){return Es("ul",{class:"cm-tooltip-lint"},t.map(n=>o8(e,n,!1)))}const Pse=e=>{let t=e.state.field(ca,!1);(!t||!t.panel)&&e.dispatch({effects:Lse(e.state,[eD.of(!0)])});let n=_y(e,Iy.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},n2=e=>{let t=e.state.field(ca,!1);return!t||!t.panel?!1:(e.dispatch({effects:eD.of(!1)}),!0)},Dse=e=>{let t=e.state.field(ca,!1);if(!t)return!1;let n=e.state.selection.main,s=t.diagnostics.iter(n.to+1);return!s.value&&(s=t.diagnostics.iter(0),!s.value||s.from==n.from&&s.to==n.to)?!1:(e.dispatch({selection:{anchor:s.from,head:s.to},scrollIntoView:!0}),!0)},xse=[{key:"Mod-Shift-m",run:Pse,preventDefault:!0},{key:"F8",run:Dse}],$y=mn.define({combine(e){return Object.assign({sources:e.map(t=>t.source).filter(t=>t!=null)},od(e.map(t=>t.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(t,n)=>t?n?s=>t(s)||n(s):t:n}))}});function n8(e){let t=[];if(e)e:for(let{name:n}of e){for(let s=0;s<n.length;s++){let i=n[s];if(/[a-zA-Z]/.test(i)&&!t.some(r=>r.toLowerCase()==i.toLowerCase())){t.push(i);continue e}}t.push("")}return t}function o8(e,t,n){var s;let i=n?n8(t.actions):[];return Es("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},Es("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),(s=t.actions)===null||s===void 0?void 0:s.map((r,a)=>{let c=!1,u=_=>{if(_.preventDefault(),c)return;c=!0;let E=NE(e.state.field(ca).diagnostics,t);E&&r.apply(e,E.from,E.to)},{name:h}=r,f=i[a]?h.indexOf(i[a]):-1,p=f<0?h:[h.slice(0,f),Es("u",h.slice(f,f+1)),h.slice(f+1)];return Es("button",{type:"button",class:"cm-diagnosticAction",onclick:u,onmousedown:u,"aria-label":` Action: ${h}${f<0?"":` (access key "${i[a]})"`}.`},p)}),t.source&&Es("div",{class:"cm-diagnosticSource"},t.source))}class Bse extends sd{constructor(t){super(),this.sev=t}eq(t){return t.sev==this.sev}toDOM(){return Es("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class o2{constructor(t,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=o8(t,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Iy{constructor(t){this.view=t,this.items=[];let n=i=>{if(i.keyCode==27)n2(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:r}=this.items[this.selectedIndex],a=n8(r.actions);for(let c=0;c<a.length;c++)if(a[c].toUpperCase().charCodeAt(0)==i.keyCode){let u=NE(this.view.state.field(ca).diagnostics,r);u&&r.actions[c].apply(t,u.from,u.to)}}else return;i.preventDefault()},s=i=>{for(let r=0;r<this.items.length;r++)this.items[r].dom.contains(i.target)&&this.moveSelection(r)};this.list=Es("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:s}),this.dom=Es("div",{class:"cm-panel-lint"},this.list,Es("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>n2(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(ca).selected;if(!t)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==t.diagnostic)return n;return-1}update(){let{diagnostics:t,selected:n}=this.view.state.field(ca),s=0,i=!1,r=null,a=new Set;for(t.between(0,this.view.state.doc.length,(c,u,{spec:h})=>{for(let f of h.diagnostics){if(a.has(f))continue;a.add(f);let p=-1,_;for(let E=s;E<this.items.length;E++)if(this.items[E].diagnostic==f){p=E;break}p<0?(_=new o2(this.view,f),this.items.splice(s,0,_),i=!0):(_=this.items[p],p>s&&(this.items.splice(s,p-s),i=!0)),n&&_.diagnostic==n.diagnostic?_.dom.hasAttribute("aria-selected")||(_.dom.setAttribute("aria-selected","true"),r=_):_.dom.hasAttribute("aria-selected")&&_.dom.removeAttribute("aria-selected"),s++}});s<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new o2(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),r?(this.list.setAttribute("aria-activedescendant",r.id),this.view.requestMeasure({key:this,read:()=>({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:c,panel:u})=>{let h=u.height/this.list.offsetHeight;c.top<u.top?this.list.scrollTop-=(u.top-c.top)/h:c.bottom>u.bottom&&(this.list.scrollTop+=(c.bottom-u.bottom)/h)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let t=this.list.firstChild;function n(){let s=t;t=s.nextSibling,s.remove()}for(let s of this.items)if(s.dom.parentNode==this.list){for(;t!=s.dom;)n();t=s.dom.nextSibling}else this.list.insertBefore(s.dom,t);for(;t;)n()}moveSelection(t){if(this.selectedIndex<0)return;let n=this.view.state.field(ca),s=NE(n.diagnostics,this.items[t].diagnostic);s&&this.view.dispatch({selection:{anchor:s.from,head:s.to},scrollIntoView:!0,effects:t8.of(s)})}static open(t){return new Iy(t)}}function Fse(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function oR(e){return Fse(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const Use=hn.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:oR("#d11")},".cm-lintRange-warning":{backgroundImage:oR("orange")},".cm-lintRange-info":{backgroundImage:oR("#999")},".cm-lintRange-hint":{backgroundImage:oR("#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}}});function Hse(e){return e=="error"?4:e=="warning"?3:e=="info"?2:1}function Vse(e){let t="hint",n=1;for(let s of e){let i=Hse(s.severity);i>n&&(n=i,t=s.severity)}return t}const Gse=[ca,hn.decorations.compute([ca],e=>{let{selected:t,panel:n}=e.field(ca);return!t||!n||t.from==t.to?wn.none:wn.set([wse.range(t.from,t.to)])}),Iee(kse,{hideOn:Ase}),Use],Wse=[xee(),Uee(),tee(),sne(),Ate(),WZ(),jZ(),$o.allowMultipleSelections.of(!0),mte(),wte(Pte,{fallback:!0}),Vte(),_se(),Cse(),gee(),Tee(),lee(),doe(),u$.of([...bse,...soe,...Aoe,...fne,...Ite,...Zz,...xse])];/*!
  1838. * VueCodemirror v6.1.1
  1839. * Copyright (c) Surmon. All rights reserved.
  1840. * Released under the MIT License.
  1841. * Surmon
  1842. */var Xse=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[Wse]}),zse=Symbol("vue-codemirror-global-config"),tl,Yse=function(e){var t=e.onUpdate,n=e.onChange,s=e.onFocus,i=e.onBlur,r=function(a,c){var u={};for(var h in a)Object.prototype.hasOwnProperty.call(a,h)&&c.indexOf(h)<0&&(u[h]=a[h]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function"){var f=0;for(h=Object.getOwnPropertySymbols(a);f<h.length;f++)c.indexOf(h[f])<0&&Object.prototype.propertyIsEnumerable.call(a,h[f])&&(u[h[f]]=a[h[f]])}return u}(e,["onUpdate","onChange","onFocus","onBlur"]);return $o.create({doc:r.doc,selection:r.selection,extensions:(Array.isArray(r.extensions)?r.extensions:[r.extensions]).concat([hn.updateListener.of(function(a){t(a),a.docChanged&&n(a.state.doc.toString(),a),a.focusChanged&&(a.view.hasFocus?s(a):i(a))})])})},KT=function(e){var t=new r$;return{compartment:t,run:function(n){t.get(e.state)?e.dispatch({effects:t.reconfigure(n)}):e.dispatch({effects:Qn.appendConfig.of(t.of(n))})}}},s2=function(e,t){var n=KT(e),s=n.compartment,i=n.run;return function(r){var a=s.get(e.state);i(r??a!==t?t:[])}},sR={type:Boolean,default:void 0},Kse={autofocus:sR,disabled:sR,indentWithTab:sR,tabSize:Number,placeholder:String,style:Object,autoDestroy:sR,phrases:Object,root:Object,extensions:Array,selection:Object},jse={modelValue:{type:String,default:""}},Qse=Object.assign(Object.assign({},Kse),jse);(function(e){e.Change="change",e.Update="update",e.Focus="focus",e.Blur="blur",e.Ready="ready",e.ModelUpdate="update:modelValue"})(tl||(tl={}));var sm={};sm[tl.Change]=function(e,t){return!0},sm[tl.Update]=function(e){return!0},sm[tl.Focus]=function(e){return!0},sm[tl.Blur]=function(e){return!0},sm[tl.Ready]=function(e){return!0};var s8={};s8[tl.ModelUpdate]=sm[tl.Change];var qse=Object.assign(Object.assign({},sm),s8),Jse=Re({name:"VueCodemirror",props:Object.assign({},Qse),emits:Object.assign({},qse),setup:function(e,t){var n=lo(),s=lo(),i=lo(),r=Object.assign(Object.assign({},Xse),It(zse,{})),a=x(function(){var c={};return Object.keys(uo(e)).forEach(function(u){var h;u!=="modelValue"&&(c[u]=(h=e[u])!==null&&h!==void 0?h:r[u])}),c});return rn(function(){var c;s.value=Yse({doc:e.modelValue,selection:a.value.selection,extensions:(c=r.extensions)!==null&&c!==void 0?c:[],onFocus:function(h){return t.emit(tl.Focus,h)},onBlur:function(h){return t.emit(tl.Blur,h)},onUpdate:function(h){return t.emit(tl.Update,h)},onChange:function(h,f){h!==e.modelValue&&(t.emit(tl.Change,h,f),t.emit(tl.ModelUpdate,h,f))}}),i.value=function(h){return new hn(Object.assign({},h))}({state:s.value,parent:n.value,root:a.value.root});var u=function(h){var f=function(){return h.state.doc.toString()},p=KT(h).run,_=s2(h,[hn.editable.of(!1),$o.readOnly.of(!0)]),E=s2(h,u$.of([ioe])),v=KT(h).run,b=KT(h).run,y=KT(h).run,S=KT(h).run;return{focus:function(){return h.focus()},getDoc:f,setDoc:function(L){L!==f()&&h.dispatch({changes:{from:0,to:h.state.doc.length,insert:L}})},reExtensions:p,toggleDisabled:_,toggleIndentWithTab:E,setTabSize:function(L){v([$o.tabSize.of(L),h$.of(" ".repeat(L))])},setPhrases:function(L){b([$o.phrases.of(L)])},setPlaceholder:function(L){y(dee(L))},setStyle:function(L){L===void 0&&(L={}),S(hn.theme({"&":Object.assign({},L)}))}}}(i.value);tt(function(){return e.modelValue},function(h){h!==u.getDoc()&&u.setDoc(h)}),tt(function(){return e.extensions},function(h){return u.reExtensions(h||[])},{immediate:!0}),tt(function(){return a.value.disabled},function(h){return u.toggleDisabled(h)},{immediate:!0}),tt(function(){return a.value.indentWithTab},function(h){return u.toggleIndentWithTab(h)},{immediate:!0}),tt(function(){return a.value.tabSize},function(h){return u.setTabSize(h)},{immediate:!0}),tt(function(){return a.value.phrases},function(h){return u.setPhrases(h||{})},{immediate:!0}),tt(function(){return a.value.placeholder},function(h){return u.setPlaceholder(h)},{immediate:!0}),tt(function(){return a.value.style},function(h){return u.setStyle(h)},{immediate:!0}),a.value.autofocus&&u.focus(),t.emit(tl.Ready,{state:s.value,view:i.value,container:n.value})}),vo(function(){a.value.autoDestroy&&i.value&&function(c){c.destroy()}(i.value)}),function(){return Gt("div",{class:"v-codemirror",style:{display:"contents"},ref:n})}}}),Zse=Jse,i2={};let eie=class fN{constructor(t,n,s,i,r,a,c,u,h,f=0,p){this.p=t,this.stack=n,this.state=s,this.reducePos=i,this.pos=r,this.score=a,this.buffer=c,this.bufferBase=u,this.curContext=h,this.lookAhead=f,this.parent=p}toString(){return`[${this.stack.filter((t,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,n,s=0){let i=t.parser.context;return new fN(t,[],n,s,s,0,[],0,i?new r2(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var n;let s=t>>19,i=t&65535,{parser:r}=this.p,a=this.reducePos<this.pos-25;a&&this.setLookAhead(this.pos);let c=r.dynamicPrecedence(i);if(c&&(this.score+=c),s==0){this.pushState(r.getGoto(this.state,i,!0),this.reducePos),i<r.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,a?8:4,!0),this.reduceContext(i,this.reducePos);return}let u=this.stack.length-(s-1)*3-(t&262144?6:0),h=u?this.stack[u-2]:this.p.ranges[0].from,f=this.reducePos-h;f>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=f):this.p.lastBigReductionSize<f&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=f));let p=u?this.stack[u-1]:0,_=this.bufferBase+this.buffer.length-p;if(i<r.minRepeatTerm||t&131072){let E=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,h,E,_+4,!0)}if(t&262144)this.state=this.stack[u];else{let E=this.stack[u-3];this.state=r.getGoto(E,i,!0)}for(;this.stack.length>u;)this.stack.pop();this.reduceContext(i,h)}storeNode(t,n,s,i=4,r=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let a=this,c=this.buffer.length;if(c==0&&a.parent&&(c=a.bufferBase-a.parent.bufferBase,a=a.parent),c>0&&a.buffer[c-4]==0&&a.buffer[c-1]>-1){if(n==s)return;if(a.buffer[c-2]>=n){a.buffer[c-2]=s;return}}}if(!r||this.pos==s)this.buffer.push(t,n,s,i);else{let a=this.buffer.length;if(a>0&&this.buffer[a-4]!=0){let c=!1;for(let u=a;u>0&&this.buffer[u-2]>s;u-=4)if(this.buffer[u-1]>=0){c=!0;break}if(c)for(;a>0&&this.buffer[a-2]>s;)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,i>4&&(i-=4)}this.buffer[a]=t,this.buffer[a+1]=n,this.buffer[a+2]=s,this.buffer[a+3]=i}}shift(t,n,s,i){if(t&131072)this.pushState(t&65535,this.pos);else if(t&262144)this.pos=i,this.shiftContext(n,s),n<=this.p.parser.maxNode&&this.buffer.push(n,s,i,4);else{let r=t,{parser:a}=this.p;(i>this.pos||n<=a.maxNode)&&(this.pos=i,a.stateFlag(r,1)||(this.reducePos=i)),this.pushState(r,s),this.shiftContext(n,s),n<=a.maxNode&&this.buffer.push(n,s,i,4)}}apply(t,n,s,i){t&65536?this.reduce(t):this.shift(t,n,s,i)}useNode(t,n){let s=this.p.reused.length-1;(s<0||this.p.reused[s]!=t)&&(this.p.reused.push(t),s++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(n,i),this.buffer.push(s,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,n=t.buffer.length;for(;n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let s=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new fN(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,s,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,n){let s=t<=this.p.parser.maxNode;s&&this.storeNode(t,this.pos,n,4),this.storeNode(0,this.pos,n,s?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(t){for(let n=new tie(this);;){let s=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,t);if(s==0)return!1;if(!(s&65536))return!0;n.reduce(s)}}recoverByInsert(t){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let r=0,a;r<n.length;r+=2)(a=n[r+1])!=this.state&&this.p.parser.hasAction(a,t)&&i.push(n[r],a);if(this.stack.length<120)for(let r=0;i.length<8&&r<n.length;r+=2){let a=n[r+1];i.some((c,u)=>u&1&&c==a)||i.push(n[r],a)}n=i}let s=[];for(let i=0;i<n.length&&s.length<4;i+=2){let r=n[i+1];if(r==this.state)continue;let a=this.split();a.pushState(r,this.pos),a.storeNode(0,a.pos,a.pos,4,!0),a.shiftContext(n[i],this.pos),a.reducePos=this.pos,a.score-=200,s.push(a)}return s}forceReduce(){let{parser:t}=this.p,n=t.stateSlot(this.state,5);if(!(n&65536))return!1;if(!t.validAction(this.state,n)){let s=n>>19,i=n&65535,r=this.stack.length-s*3;if(r<0||t.getGoto(this.stack[r],i,!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:t}=this.p,n=[],s=(i,r)=>{if(!n.includes(i))return n.push(i),t.allActions(i,a=>{if(!(a&393216))if(a&65536){let c=(a>>19)-r;if(c>1){let u=a&65535,h=this.stack.length-c*3;if(h>=0&&t.getGoto(this.stack[h],u,!1)>=0)return c<<19|65536|u}}else{let c=s(a,r+1);if(c!=null)return c}})};return s(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:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=t.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(n)))}reduceContext(t,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(n)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let n=new r2(this.curContext.tracker,t);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(t){t>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}};class r2{constructor(t,n){this.tracker=t,this.context=n,this.hash=t.strict?t.hash(n):0}}class tie{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let n=t&65535,s=t>>19;s==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(s-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class mM{constructor(t,n,s){this.stack=t,this.pos=n,this.index=s,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new mM(t,n,n-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new mM(this.stack,this.pos,this.index)}}function iR(e,t=Uint16Array){if(typeof e!="string")return e;let n=null;for(let s=0,i=0;s<e.length;){let r=0;for(;;){let a=e.charCodeAt(s++),c=!1;if(a==126){r=65535;break}a>=92&&a--,a>=34&&a--;let u=a-32;if(u>=46&&(u-=46,c=!0),r+=u,c)break;r*=46}n?n[i++]=r:n=new t(r)}return n}class tC{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const l2=new tC;class nie{constructor(t,n){this.input=t,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=l2,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(t,n){let s=this.range,i=this.rangeIndex,r=this.pos+t;for(;r<s.from;){if(!i)return null;let a=this.ranges[--i];r-=s.from-a.to,s=a}for(;n<0?r>s.to:r>=s.to;){if(i==this.ranges.length-1)return null;let a=this.ranges[++i];r+=a.from-s.to,s=a}return r}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let n of this.ranges)if(n.to>t)return Math.max(t,n.from);return this.end}peek(t){let n=this.chunkOff+t,s,i;if(n>=0&&n<this.chunk.length)s=this.pos+t,i=this.chunk.charCodeAt(n);else{let r=this.resolveOffset(t,1);if(r==null)return-1;if(s=r,s>=this.chunk2Pos&&s<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(s-this.chunk2Pos);else{let a=this.rangeIndex,c=this.range;for(;c.to<=s;)c=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=s),s+this.chunk2.length>c.to&&(this.chunk2=this.chunk2.slice(0,c.to-s)),i=this.chunk2.charCodeAt(0)}}return s>=this.token.lookAhead&&(this.token.lookAhead=s+1),i}acceptToken(t,n=0){let s=n?this.resolveOffset(n,-1):this.pos;if(s==null||s<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=s}acceptTokenTo(t,n){this.token.value=t,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),n=this.pos+t.length;this.chunk=n>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,n){if(n?(this.token=n,n.start=t,n.lookAhead=t+1,n.value=n.extended=-1):this.token=l2,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,n){if(t>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,n-this.chunkPos);if(t>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,n-this.chunk2Pos);if(t>=this.range.from&&n<=this.range.to)return this.input.read(t,n);let s="";for(let i of this.ranges){if(i.from>=n)break;i.to>t&&(s+=this.input.read(Math.max(i.from,t),Math.min(i.to,n)))}return s}}class mE{constructor(t,n){this.data=t,this.id=n}token(t,n){let{parser:s}=n.p;oie(this.data,t,n,this.id,s.data,s.tokenPrecTable)}}mE.prototype.contextual=mE.prototype.fallback=mE.prototype.extend=!1;mE.prototype.fallback=mE.prototype.extend=!1;class _A{constructor(t,n={}){this.token=t,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function oie(e,t,n,s,i,r){let a=0,c=1<<s,{dialect:u}=n.p.parser;e:for(;c&e[a];){let h=e[a+1];for(let E=a+3;E<h;E+=2)if((e[E+1]&c)>0){let v=e[E];if(u.allows(v)&&(t.token.value==-1||t.token.value==v||sie(v,t.token.value,i,r))){t.acceptToken(v);break}}let f=t.next,p=0,_=e[a+2];if(t.next<0&&_>p&&e[h+_*3-3]==65535){a=e[h+_*3-1];continue e}for(;p<_;){let E=p+_>>1,v=h+E+(E<<1),b=e[v],y=e[v+1]||65536;if(f<b)_=E;else if(f>=y)p=E+1;else{a=e[v+2],t.advance();continue e}}break}}function a2(e,t,n){for(let s=t,i;(i=e[s])!=65535;s++)if(i==n)return s-t;return-1}function sie(e,t,n,s){let i=a2(n,s,t);return i<0||a2(n,s,e)<i}const sa=typeof process<"u"&&i2&&/\bparse\b/.test(i2.LOG);let dw=null;function c2(e,t,n){let s=e.cursor($i.IncludeAnonymous);for(s.moveTo(t);;)if(!(n<0?s.childBefore(t):s.childAfter(t)))for(;;){if((n<0?s.to<t:s.from>t)&&!s.type.isError)return n<0?Math.max(0,Math.min(s.to-1,t-25)):Math.min(e.length,Math.max(s.from+1,t+25));if(n<0?s.prevSibling():s.nextSibling())break;if(!s.parent())return n<0?0:e.length}}class iie{constructor(t,n){this.fragments=t,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 t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?c2(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?c2(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let s=this.trees[n],i=this.index[n];if(i==s.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let r=s.children[i],a=this.start[n]+s.positions[i];if(a>t)return this.nextStart=a,null;if(r instanceof or){if(a==t){if(a<this.safeFrom)return null;let c=a+r.length;if(c<=this.safeTo){let u=r.prop(Eo.lookAhead);if(!u||c+u<this.fragment.to)return r}}this.index[n]++,a+r.length>=Math.max(this.safeFrom,t)&&(this.trees.push(r),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+r.length}}}class rie{constructor(t,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(s=>new tC)}getActions(t){let n=0,s=null,{parser:i}=t.p,{tokenizers:r}=i,a=i.stateSlot(t.state,3),c=t.curContext?t.curContext.hash:0,u=0;for(let h=0;h<r.length;h++){if(!(1<<h&a))continue;let f=r[h],p=this.tokens[h];if(!(s&&!f.fallback)&&((f.contextual||p.start!=t.pos||p.mask!=a||p.context!=c)&&(this.updateCachedToken(p,f,t),p.mask=a,p.context=c),p.lookAhead>p.end+25&&(u=Math.max(p.lookAhead,u)),p.value!=0)){let _=n;if(p.extended>-1&&(n=this.addActions(t,p.extended,p.end,n)),n=this.addActions(t,p.value,p.end,n),!f.extend&&(s=p,n>_))break}}for(;this.actions.length>n;)this.actions.pop();return u&&t.setLookAhead(u),!s&&t.pos==this.stream.end&&(s=new tC,s.value=t.p.parser.eofTerm,s.start=s.end=t.pos,n=this.addActions(t,s.value,s.end,n)),this.mainToken=s,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let n=new tC,{pos:s,p:i}=t;return n.start=s,n.end=Math.min(s+1,i.stream.end),n.value=s==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(t,n,s){let i=this.stream.clipPos(s.pos);if(n.token(this.stream.reset(i,t),s),t.value>-1){let{parser:r}=s.p;for(let a=0;a<r.specialized.length;a++)if(r.specialized[a]==t.value){let c=r.specializers[a](this.stream.read(t.start,t.end),s);if(c>=0&&s.p.parser.dialect.allows(c>>1)){c&1?t.extended=c>>1:t.value=c>>1;break}}}else t.value=0,t.end=this.stream.clipPos(i+1)}putAction(t,n,s,i){for(let r=0;r<i;r+=3)if(this.actions[r]==t)return i;return this.actions[i++]=t,this.actions[i++]=n,this.actions[i++]=s,i}addActions(t,n,s,i){let{state:r}=t,{parser:a}=t.p,{data:c}=a;for(let u=0;u<2;u++)for(let h=a.stateSlot(r,u?2:1);;h+=3){if(c[h]==65535)if(c[h+1]==1)h=lh(c,h+2);else{i==0&&c[h+1]==2&&(i=this.putAction(lh(c,h+2),n,s,i));break}c[h]==n&&(i=this.putAction(lh(c,h+1),n,s,i))}return i}}class lie{constructor(t,n,s,i){this.parser=t,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new nie(n,i),this.tokens=new rie(t,this.stream),this.topTerm=t.top[1];let{from:r}=i[0];this.stacks=[eie.start(this,t.top[0],r)],this.fragments=s.length&&this.stream.end-r>t.bufferLength*4?new iie(s,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t=this.stacks,n=this.minStackPos,s=this.stacks=[],i,r;if(this.bigReductionCount>300&&t.length==1){let[a]=t;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<t.length;a++){let c=t[a];for(;;){if(this.tokens.mainToken=null,c.pos>n)s.push(c);else{if(this.advanceStack(c,s,t))continue;{i||(i=[],r=[]),i.push(c);let u=this.tokens.getMainToken(c);r.push(u.value,u.end)}}break}}if(!s.length){let a=i&&uie(i);if(a)return sa&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw sa&&i&&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&&i){let a=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,r,s);if(a)return sa&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(s.length>a)for(s.sort((c,u)=>u.score-c.score);s.length>a;)s.pop();s.some(c=>c.reducePos>n)&&this.recovering--}else if(s.length>1){e:for(let a=0;a<s.length-1;a++){let c=s[a];for(let u=a+1;u<s.length;u++){let h=s[u];if(c.sameState(h)||c.buffer.length>500&&h.buffer.length>500)if((c.score-h.score||c.buffer.length-h.buffer.length)>0)s.splice(u--,1);else{s.splice(a--,1);continue e}}}s.length>12&&s.splice(12,s.length-12)}this.minStackPos=s[0].pos;for(let a=1;a<s.length;a++)s[a].pos<this.minStackPos&&(this.minStackPos=s[a].pos);return null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,n,s){let i=t.pos,{parser:r}=this,a=sa?this.stackID(t)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let h=t.curContext&&t.curContext.tracker.strict,f=h?t.curContext.hash:0;for(let p=this.fragments.nodeAt(i);p;){let _=this.parser.nodeSet.types[p.type.id]==p.type?r.getGoto(t.state,p.type.id):-1;if(_>-1&&p.length&&(!h||(p.prop(Eo.contextHash)||0)==f))return t.useNode(p,_),sa&&console.log(a+this.stackID(t)+` (via reuse of ${r.getName(p.type.id)})`),!0;if(!(p instanceof or)||p.children.length==0||p.positions[0]>0)break;let E=p.children[0];if(E instanceof or&&p.positions[0]==0)p=E;else break}}let c=r.stateSlot(t.state,4);if(c>0)return t.reduce(c),sa&&console.log(a+this.stackID(t)+` (via always-reduce ${r.getName(c&65535)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let u=this.tokens.getActions(t);for(let h=0;h<u.length;){let f=u[h++],p=u[h++],_=u[h++],E=h==u.length||!s,v=E?t:t.split(),b=this.tokens.mainToken;if(v.apply(f,p,b?b.start:v.pos,_),sa&&console.log(a+this.stackID(v)+` (via ${f&65536?`reduce of ${r.getName(f&65535)}`:"shift"} for ${r.getName(p)} @ ${i}${v==t?"":", split"})`),E)return!0;v.pos>i?n.push(v):s.push(v)}return!1}advanceFully(t,n){let s=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>s)return u2(t,n),!0}}runRecovery(t,n,s){let i=null,r=!1;for(let a=0;a<t.length;a++){let c=t[a],u=n[a<<1],h=n[(a<<1)+1],f=sa?this.stackID(c)+" -> ":"";if(c.deadEnd&&(r||(r=!0,c.restart(),sa&&console.log(f+this.stackID(c)+" (restarted)"),this.advanceFully(c,s))))continue;let p=c.split(),_=f;for(let E=0;p.forceReduce()&&E<10&&(sa&&console.log(_+this.stackID(p)+" (via force-reduce)"),!this.advanceFully(p,s));E++)sa&&(_=this.stackID(p)+" -> ");for(let E of c.recoverByInsert(u))sa&&console.log(f+this.stackID(E)+" (via recover-insert)"),this.advanceFully(E,s);this.stream.end>c.pos?(h==c.pos&&(h++,u=0),c.recoverByDelete(u,h),sa&&console.log(f+this.stackID(c)+` (via recover-delete ${this.parser.getName(u)})`),u2(c,s)):(!i||i.score<c.score)&&(i=c)}return i}stackToTree(t){return t.close(),or.build({buffer:mM.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let n=(dw||(dw=new WeakMap)).get(t);return n||dw.set(t,n=String.fromCodePoint(this.nextStackID++)),n+t}}function u2(e,t){for(let n=0;n<t.length;n++){let s=t[n];if(s.pos==e.pos&&s.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}class aie{constructor(t,n,s){this.source=t,this.flags=n,this.disabled=s}allows(t){return!this.disabled||this.disabled[t]==0}}const hw=e=>e;class cie{constructor(t){this.start=t.start,this.shift=t.shift||hw,this.reduce=t.reduce||hw,this.reuse=t.reuse||hw,this.hash=t.hash||(()=>0),this.strict=t.strict!==!1}}class _M extends N4{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let n=t.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let c=0;c<t.repeatNodeCount;c++)n.push("");let s=Object.keys(t.topRules).map(c=>t.topRules[c][1]),i=[];for(let c=0;c<n.length;c++)i.push([]);function r(c,u,h){i[c].push([u,u.deserialize(String(h))])}if(t.nodeProps)for(let c of t.nodeProps){let u=c[0];typeof u=="string"&&(u=Eo[u]);for(let h=1;h<c.length;){let f=c[h++];if(f>=0)r(f,u,c[h++]);else{let p=c[h+-f];for(let _=-f;_>0;_--)r(c[h++],u,p);h++}}}this.nodeSet=new NP(n.map((c,u)=>Ul.define({name:u>=this.minRepeatTerm?void 0:c,id:u,props:i[u],top:s.indexOf(u)>-1,error:u==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(u)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=A4;let a=iR(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let c=0;c<this.specializerSpecs.length;c++)this.specialized[c]=this.specializerSpecs[c].term;this.specializers=this.specializerSpecs.map(d2),this.states=iR(t.states,Uint32Array),this.data=iR(t.stateData),this.goto=iR(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(c=>typeof c=="number"?new mE(a,c):c),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,n,s){let i=new lie(this,t,n,s);for(let r of this.wrappers)i=r(i,t,n,s);return i}getGoto(t,n,s=!1){let i=this.goto;if(n>=i[0])return-1;for(let r=i[n+1];;){let a=i[r++],c=a&1,u=i[r++];if(c&&s)return u;for(let h=r+(a>>1);r<h;r++)if(i[r]==t)return u;if(c)return-1}}hasAction(t,n){let s=this.data;for(let i=0;i<2;i++)for(let r=this.stateSlot(t,i?2:1),a;;r+=3){if((a=s[r])==65535)if(s[r+1]==1)a=s[r=lh(s,r+2)];else{if(s[r+1]==2)return lh(s,r+2);break}if(a==n||a==0)return lh(s,r+1)}return 0}stateSlot(t,n){return this.states[t*6+n]}stateFlag(t,n){return(this.stateSlot(t,0)&n)>0}validAction(t,n){return!!this.allActions(t,s=>s==n?!0:null)}allActions(t,n){let s=this.stateSlot(t,4),i=s?n(s):void 0;for(let r=this.stateSlot(t,1);i==null;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=lh(this.data,r+2);else break;i=n(lh(this.data,r+1))}return i}nextStates(t){let n=[];for(let s=this.stateSlot(t,1);;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=lh(this.data,s+2);else break;if(!(this.data[s+2]&1)){let i=this.data[s+1];n.some((r,a)=>a&1&&r==i)||n.push(this.data[s],i)}}return n}configure(t){let n=Object.assign(Object.create(_M.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let s=this.topRules[t.top];if(!s)throw new RangeError(`Invalid top rule name ${t.top}`);n.top=s}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(s=>{let i=t.tokenizers.find(r=>r.from==s);return i?i.to:s})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((s,i)=>{let r=t.specializers.find(c=>c.from==s.external);if(!r)return s;let a=Object.assign(Object.assign({},s),{external:r.to});return n.specializers[i]=d2(a),a})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let n=this.dynamicPrecedences;return n==null?0:n[t]||0}parseDialect(t){let n=Object.keys(this.dialects),s=n.map(()=>!1);if(t)for(let r of t.split(" ")){let a=n.indexOf(r);a>=0&&(s[a]=!0)}let i=null;for(let r=0;r<n.length;r++)if(!s[r])for(let a=this.dialects[n[r]],c;(c=this.data[a++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[c]=1;return new aie(t,s,i)}static deserialize(t){return new _M(t)}}function lh(e,t){return e[t]|e[t+1]<<16}function uie(e){let t=null;for(let n of e){let s=n.p.stoppedAt;(n.pos==n.p.stream.end||s!=null&&n.pos>s)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function d2(e){if(e.external){let t=e.extend?1:0;return(n,s)=>e.external(n,s)<<1|t}return e.get}const die=1,i8=194,r8=195,hie=196,h2=197,fie=198,pie=199,gie=200,mie=2,l8=3,f2=201,_ie=24,Tie=25,Eie=49,vie=50,bie=55,Oie=56,Sie=57,yie=59,$ie=60,Iie=61,Rie=62,Cie=63,Mie=65,Aie=238,Lie=71,wie=241,kie=242,Nie=243,Pie=244,Die=245,xie=246,Bie=247,Fie=248,a8=72,Uie=249,Hie=250,Vie=251,Gie=252,Wie=253,Xie=254,zie=255,Yie=256,Kie=73,jie=77,Qie=263,qie=112,Jie=130,Zie=151,ere=152,tre=155,km=10,Ry=13,tD=32,TA=9,nD=35,nre=40,ore=46,pN=123,p2=125,c8=39,u8=34,sre=92,ire=111,rre=120,lre=78,are=117,cre=85,ure=new Set([Tie,Eie,vie,Qie,Mie,Jie,Oie,Sie,Aie,Rie,Cie,a8,Kie,jie,$ie,Iie,Zie,ere,tre,qie]);function fw(e){return e==km||e==Ry}function pw(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}const dre=new _A((e,t)=>{let n;if(e.next<0)e.acceptToken(pie);else if(t.context.flags&nC)fw(e.next)&&e.acceptToken(fie,1);else if(((n=e.peek(-1))<0||fw(n))&&t.canShift(h2)){let s=0;for(;e.next==tD||e.next==TA;)e.advance(),s++;(e.next==km||e.next==Ry||e.next==nD)&&e.acceptToken(h2,-s)}else fw(e.next)&&e.acceptToken(hie,1)},{contextual:!0}),hre=new _A((e,t)=>{let n=t.context;if(n.flags)return;let s=e.peek(-1);if(s==km||s==Ry){let i=0,r=0;for(;;){if(e.next==tD)i++;else if(e.next==TA)i+=8-i%8;else break;e.advance(),r++}i!=n.indent&&e.next!=km&&e.next!=Ry&&e.next!=nD&&(i<n.indent?e.acceptToken(r8,-r):e.acceptToken(i8))}}),nC=1,d8=2,th=4,nh=8,oh=16,sh=32;function oC(e,t,n){this.parent=e,this.indent=t,this.flags=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n+(n<<6)}const fre=new oC(null,0,0);function pre(e){let t=0;for(let n=0;n<e.length;n++)t+=e.charCodeAt(n)==TA?8-t%8:1;return t}const g2=new Map([[wie,0],[kie,th],[Nie,nh],[Pie,nh|th],[Die,oh],[xie,oh|th],[Bie,oh|nh],[Fie,oh|nh|th],[Uie,sh],[Hie,sh|th],[Vie,sh|nh],[Gie,sh|nh|th],[Wie,sh|oh],[Xie,sh|oh|th],[zie,sh|oh|nh],[Yie,sh|oh|nh|th]].map(([e,t])=>[e,t|d8])),gre=new cie({start:fre,reduce(e,t,n,s){return e.flags&nC&&ure.has(t)||(t==Lie||t==a8)&&e.flags&d8?e.parent:e},shift(e,t,n,s){return t==i8?new oC(e,pre(s.read(s.pos,n.pos)),0):t==r8?e.parent:t==_ie||t==bie||t==yie||t==l8?new oC(e,0,nC):g2.has(t)?new oC(e,0,g2.get(t)|e.flags&nC):e},hash(e){return e.hash}}),mre=new _A(e=>{for(let t=0;t<5;t++){if(e.next!="print".charCodeAt(t))return;e.advance()}if(!/\w/.test(String.fromCharCode(e.next)))for(let t=0;;t++){let n=e.peek(t);if(!(n==tD||n==TA)){n!=nre&&n!=ore&&n!=km&&n!=Ry&&n!=nD&&e.acceptToken(die);return}}}),_re=new _A((e,t)=>{let{flags:n}=t.context,s=n&th?u8:c8,i=(n&nh)>0,r=!(n&oh),a=(n&sh)>0,c=e.pos;for(;!(e.next<0);)if(a&&e.next==pN)if(e.peek(1)==pN)e.advance(2);else{if(e.pos==c){e.acceptToken(l8,1);return}break}else if(r&&e.next==sre){if(e.pos==c){e.advance();let u=e.next;u>=0&&(e.advance(),Tre(e,u)),e.acceptToken(mie);return}break}else if(e.next==s&&(!i||e.peek(1)==s&&e.peek(2)==s)){if(e.pos==c){e.acceptToken(f2,i?3:1);return}break}else if(e.next==km){if(i)e.advance();else if(e.pos==c){e.acceptToken(f2);return}break}else e.advance();e.pos>c&&e.acceptToken(gie)});function Tre(e,t){if(t==ire)for(let n=0;n<2&&e.next>=48&&e.next<=55;n++)e.advance();else if(t==rre)for(let n=0;n<2&&pw(e.next);n++)e.advance();else if(t==are)for(let n=0;n<4&&pw(e.next);n++)e.advance();else if(t==cre)for(let n=0;n<8&&pw(e.next);n++)e.advance();else if(t==lre&&e.next==pN){for(e.advance();e.next>=0&&e.next!=p2&&e.next!=c8&&e.next!=u8&&e.next!=km;)e.advance();e.next==p2&&e.advance()}}const Ere=P4({'async "*" "**" FormatConversion FormatSpec':Ft.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":Ft.controlKeyword,"in not and or is del":Ft.operatorKeyword,"from def class global nonlocal lambda":Ft.definitionKeyword,import:Ft.moduleKeyword,"with as print":Ft.keyword,Boolean:Ft.bool,None:Ft.null,VariableName:Ft.variableName,"CallExpression/VariableName":Ft.function(Ft.variableName),"FunctionDefinition/VariableName":Ft.function(Ft.definition(Ft.variableName)),"ClassDefinition/VariableName":Ft.definition(Ft.className),PropertyName:Ft.propertyName,"CallExpression/MemberExpression/PropertyName":Ft.function(Ft.propertyName),Comment:Ft.lineComment,Number:Ft.number,String:Ft.string,FormatString:Ft.special(Ft.string),Escape:Ft.escape,UpdateOp:Ft.updateOperator,"ArithOp!":Ft.arithmeticOperator,BitOp:Ft.bitwiseOperator,CompareOp:Ft.compareOperator,AssignOp:Ft.definitionOperator,Ellipsis:Ft.punctuation,At:Ft.meta,"( )":Ft.paren,"[ ]":Ft.squareBracket,"{ }":Ft.brace,".":Ft.derefOperator,", ;":Ft.separator}),vre={__proto__:null,await:44,or:54,and:56,in:60,not:62,is:64,if:70,else:72,lambda:76,yield:94,from:96,async:102,for:104,None:162,True:164,False:164,del:178,pass:182,break:186,continue:190,return:194,raise:202,import:206,as:208,global:212,nonlocal:214,assert:218,type:223,elif:236,while:240,try:246,except:248,finally:250,with:254,def:258,class:268,match:279,case:285},bre=_M.deserialize({version:14,states:"##jO`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO'vQdO'#CnO*UQtO'#HTOOQS'#HU'#HUOOQS'#DU'#DUOOQS'#HT'#HTO*rQdO'#D_O+VQdO'#DfO+gQdO'#DjO+zOWO'#DuO,VOWO'#DvO.[QtO'#GuOOQS'#Gu'#GuO'vQdO'#GtO0ZQtO'#GtOOQS'#Eb'#EbO0rQdO'#EcOOQS'#Gs'#GsO0|QdO'#GrOOQV'#Gr'#GrO1XQdO'#FYOOQS'#G^'#G^O1^QdO'#FXOOQV'#IS'#ISOOQV'#Gq'#GqOOQV'#Fq'#FqQ`QeOOO'vQdO'#CqO1lQdO'#C}O1sQdO'#DRO2RQdO'#HYO2cQtO'#EVO'vQdO'#EWOOQS'#EY'#EYOOQS'#E['#E[OOQS'#E^'#E^O2wQdO'#E`O3_QdO'#EdO3rQdO'#EfO3zQtO'#EfO1XQdO'#EiO0rQdO'#ElO1XQdO'#EnO0rQdO'#EtO0rQdO'#EwO4VQdO'#EyO4^QdO'#FOO4iQdO'#EzO0rQdO'#FOO1XQdO'#FQO1XQdO'#FVO4nQdO'#F[P4uOdO'#GpPOOO)CBd)CBdOOQS'#Ce'#CeOOQS'#Cf'#CfOOQS'#Cg'#CgOOQS'#Ch'#ChOOQS'#Ci'#CiOOQS'#Cj'#CjOOQS'#Cl'#ClO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO5TQdO'#DoOOQS,5:Y,5:YO5hQdO'#HdOOQS,5:],5:]O5uQ!fO,5:]O5zQtO,59YO1lQdO,59bO1lQdO,59bO1lQdO,59bO8jQdO,59bO8oQdO,59bO8vQdO,59jO8}QdO'#HTO:TQdO'#HSOOQS'#HS'#HSOOQS'#D['#D[O:lQdO,59aO'vQdO,59aO:zQdO,59aOOQS,59y,59yO;PQdO,5:RO'vQdO,5:ROOQS,5:Q,5:QO;_QdO,5:QO;dQdO,5:XO'vQdO,5:XO'vQdO,5:VOOQS,5:U,5:UO;uQdO,5:UO;zQdO,5:WOOOW'#Fy'#FyO<POWO,5:aOOQS,5:a,5:aO<[QdO'#HwOOOW'#Dw'#DwOOOW'#Fz'#FzO<lOWO,5:bOOQS,5:b,5:bOOQS'#F}'#F}O<zQtO,5:iO?lQtO,5=`O@VQ#xO,5=`O@vQtO,5=`OOQS,5:},5:}OA_QeO'#GWOBqQdO,5;^OOQV,5=^,5=^OB|QtO'#IPOCkQdO,5;tOOQS-E:[-E:[OOQV,5;s,5;sO4dQdO'#FQOOQV-E9o-E9oOCsQtO,59]OEzQtO,59iOFeQdO'#HVOFpQdO'#HVO1XQdO'#HVOF{QdO'#DTOGTQdO,59mOGYQdO'#HZO'vQdO'#HZO0rQdO,5=tOOQS,5=t,5=tO0rQdO'#EROOQS'#ES'#ESOGwQdO'#GPOHXQdO,58|OHXQdO,58|O*xQdO,5:oOHgQtO'#H]OOQS,5:r,5:rOOQS,5:z,5:zOHzQdO,5;OOI]QdO'#IOO1XQdO'#H}OOQS,5;Q,5;QOOQS'#GT'#GTOIqQtO,5;QOJPQdO,5;QOJUQdO'#IQOOQS,5;T,5;TOJdQdO'#H|OOQS,5;W,5;WOJuQdO,5;YO4iQdO,5;`O4iQdO,5;cOJ}QtO'#ITO'vQdO'#ITOKXQdO,5;eO4VQdO,5;eO0rQdO,5;jO1XQdO,5;lOK^QeO'#EuOLjQgO,5;fO!!kQdO'#IUO4iQdO,5;jO!!vQdO,5;lO!#OQdO,5;qO!#ZQtO,5;vO'vQdO,5;vPOOO,5=[,5=[P!#bOSO,5=[P!#jOdO,5=[O!&bQtO1G.jO!&iQtO1G.jO!)YQtO1G.jO!)dQtO1G.jO!+}QtO1G.jO!,bQtO1G.jO!,uQdO'#HcO!-TQtO'#GuO0rQdO'#HcO!-_QdO'#HbOOQS,5:Z,5:ZO!-gQdO,5:ZO!-lQdO'#HeO!-wQdO'#HeO!.[QdO,5>OOOQS'#Ds'#DsOOQS1G/w1G/wOOQS1G.|1G.|O!/[QtO1G.|O!/cQtO1G.|O1lQdO1G.|O!0OQdO1G/UOOQS'#DZ'#DZO0rQdO,59tOOQS1G.{1G.{O!0VQdO1G/eO!0gQdO1G/eO!0oQdO1G/fO'vQdO'#H[O!0tQdO'#H[O!0yQtO1G.{O!1ZQdO,59iO!2aQdO,5=zO!2qQdO,5=zO!2yQdO1G/mO!3OQtO1G/mOOQS1G/l1G/lO!3`QdO,5=uO!4VQdO,5=uO0rQdO1G/qO!4tQdO1G/sO!4yQtO1G/sO!5ZQtO1G/qOOQS1G/p1G/pOOQS1G/r1G/rOOOW-E9w-E9wOOQS1G/{1G/{O!5kQdO'#HxO0rQdO'#HxO!5|QdO,5>cOOOW-E9x-E9xOOQS1G/|1G/|OOQS-E9{-E9{O!6[Q#xO1G2zO!6{QtO1G2zO'vQdO,5<jOOQS,5<j,5<jOOQS-E9|-E9|OOQS,5<r,5<rOOQS-E:U-E:UOOQV1G0x1G0xO1XQdO'#GRO!7dQtO,5>kOOQS1G1`1G1`O!8RQdO1G1`OOQS'#DV'#DVO0rQdO,5=qOOQS,5=q,5=qO!8WQdO'#FrO!8cQdO,59oO!8kQdO1G/XO!8uQtO,5=uOOQS1G3`1G3`OOQS,5:m,5:mO!9fQdO'#GtOOQS,5<k,5<kOOQS-E9}-E9}O!9wQdO1G.hOOQS1G0Z1G0ZO!:VQdO,5=wO!:gQdO,5=wO0rQdO1G0jO0rQdO1G0jO!:xQdO,5>jO!;ZQdO,5>jO1XQdO,5>jO!;lQdO,5>iOOQS-E:R-E:RO!;qQdO1G0lO!;|QdO1G0lO!<RQdO,5>lO!<aQdO,5>lO!<oQdO,5>hO!=VQdO,5>hO!=hQdO'#EpO0rQdO1G0tO!=sQdO1G0tO!=xQgO1G0zO!AvQgO1G0}O!EqQdO,5>oO!E{QdO,5>oO!FTQtO,5>oO0rQdO1G1PO!F_QdO1G1PO4iQdO1G1UO!!vQdO1G1WOOQV,5;a,5;aO!FdQfO,5;aO!FiQgO1G1QO!JjQdO'#GZO4iQdO1G1QO4iQdO1G1QO!JzQdO,5>pO!KXQdO,5>pO1XQdO,5>pOOQV1G1U1G1UO!KaQdO'#FSO!KrQ!fO1G1WO!KzQdO1G1WOOQV1G1]1G1]O4iQdO1G1]O!LPQdO1G1]O!LXQdO'#F^OOQV1G1b1G1bO!#ZQtO1G1bPOOO1G2v1G2vP!L^OSO1G2vOOQS,5=},5=}OOQS'#Dp'#DpO0rQdO,5=}O!LfQdO,5=|O!LyQdO,5=|OOQS1G/u1G/uO!MRQdO,5>PO!McQdO,5>PO!MkQdO,5>PO!NOQdO,5>PO!N`QdO,5>POOQS1G3j1G3jOOQS7+$h7+$hO!8kQdO7+$pO#!RQdO1G.|O#!YQdO1G.|OOQS1G/`1G/`OOQS,5<`,5<`O'vQdO,5<`OOQS7+%P7+%PO#!aQdO7+%POOQS-E9r-E9rOOQS7+%Q7+%QO#!qQdO,5=vO'vQdO,5=vOOQS7+$g7+$gO#!vQdO7+%PO##OQdO7+%QO##TQdO1G3fOOQS7+%X7+%XO##eQdO1G3fO##mQdO7+%XOOQS,5<_,5<_O'vQdO,5<_O##rQdO1G3aOOQS-E9q-E9qO#$iQdO7+%]OOQS7+%_7+%_O#$wQdO1G3aO#%fQdO7+%_O#%kQdO1G3gO#%{QdO1G3gO#&TQdO7+%]O#&YQdO,5>dO#&sQdO,5>dO#&sQdO,5>dOOQS'#Dx'#DxO#'UO&jO'#DzO#'aO`O'#HyOOOW1G3}1G3}O#'fQdO1G3}O#'nQdO1G3}O#'yQ#xO7+(fO#(jQtO1G2UP#)TQdO'#GOOOQS,5<m,5<mOOQS-E:P-E:POOQS7+&z7+&zOOQS1G3]1G3]OOQS,5<^,5<^OOQS-E9p-E9pOOQS7+$s7+$sO#)bQdO,5=`O#){QdO,5=`O#*^QtO,5<aO#*qQdO1G3cOOQS-E9s-E9sOOQS7+&U7+&UO#+RQdO7+&UO#+aQdO,5<nO#+uQdO1G4UOOQS-E:Q-E:QO#,WQdO1G4UOOQS1G4T1G4TOOQS7+&W7+&WO#,iQdO7+&WOOQS,5<p,5<pO#,tQdO1G4WOOQS-E:S-E:SOOQS,5<l,5<lO#-SQdO1G4SOOQS-E:O-E:OO1XQdO'#EqO#-jQdO'#EqO#-uQdO'#IRO#-}QdO,5;[OOQS7+&`7+&`O0rQdO7+&`O#.SQgO7+&fO!JmQdO'#GXO4iQdO7+&fO4iQdO7+&iO#2QQtO,5<tO'vQdO,5<tO#2[QdO1G4ZOOQS-E:W-E:WO#2fQdO1G4ZO4iQdO7+&kO0rQdO7+&kOOQV7+&p7+&pO!KrQ!fO7+&rO!KzQdO7+&rO`QeO1G0{OOQV-E:X-E:XO4iQdO7+&lO4iQdO7+&lOOQV,5<u,5<uO#2nQdO,5<uO!JmQdO,5<uOOQV7+&l7+&lO#2yQgO7+&lO#6tQdO,5<vO#7PQdO1G4[OOQS-E:Y-E:YO#7^QdO1G4[O#7fQdO'#IWO#7tQdO'#IWO1XQdO'#IWOOQS'#IW'#IWO#8PQdO'#IVOOQS,5;n,5;nO#8XQdO,5;nO0rQdO'#FUOOQV7+&r7+&rO4iQdO7+&rOOQV7+&w7+&wO4iQdO7+&wO#8^QfO,5;xOOQV7+&|7+&|POOO7+(b7+(bO#8cQdO1G3iOOQS,5<c,5<cO#8qQdO1G3hOOQS-E9u-E9uO#9UQdO,5<dO#9aQdO,5<dO#9tQdO1G3kOOQS-E9v-E9vO#:UQdO1G3kO#:^QdO1G3kO#:nQdO1G3kO#:UQdO1G3kOOQS<<H[<<H[O#:yQtO1G1zOOQS<<Hk<<HkP#;WQdO'#FtO8vQdO1G3bO#;eQdO1G3bO#;jQdO<<HkOOQS<<Hl<<HlO#;zQdO7+)QOOQS<<Hs<<HsO#<[QtO1G1yP#<{QdO'#FsO#=YQdO7+)RO#=jQdO7+)RO#=rQdO<<HwO#=wQdO7+({OOQS<<Hy<<HyO#>nQdO,5<bO'vQdO,5<bOOQS-E9t-E9tOOQS<<Hw<<HwOOQS,5<g,5<gO0rQdO,5<gO#>sQdO1G4OOOQS-E9y-E9yO#?^QdO1G4OO<[QdO'#H{OOOO'#D{'#D{OOOO'#F|'#F|O#?oO&jO,5:fOOOW,5>e,5>eOOOW7+)i7+)iO#?zQdO7+)iO#@SQdO1G2zO#@mQdO1G2zP'vQdO'#FuO0rQdO<<IpO1XQdO1G2YP1XQdO'#GSO#AOQdO7+)pO#AaQdO7+)pOOQS<<Ir<<IrP1XQdO'#GUP0rQdO'#GQOOQS,5;],5;]O#ArQdO,5>mO#BQQdO,5>mOOQS1G0v1G0vOOQS<<Iz<<IzOOQV-E:V-E:VO4iQdO<<JQOOQV,5<s,5<sO4iQdO,5<sOOQV<<JQ<<JQOOQV<<JT<<JTO#BYQtO1G2`P#BdQdO'#GYO#BkQdO7+)uO#BuQgO<<JVO4iQdO<<JVOOQV<<J^<<J^O4iQdO<<J^O!KrQ!fO<<J^O#FpQgO7+&gOOQV<<JW<<JWO#FzQgO<<JWOOQV1G2a1G2aO1XQdO1G2aO#JuQdO1G2aO4iQdO<<JWO1XQdO1G2bP0rQdO'#G[O#KQQdO7+)vO#K_QdO7+)vOOQS'#FT'#FTO0rQdO,5>rO#KgQdO,5>rOOQS,5>r,5>rO#KrQdO,5>qO#LTQdO,5>qOOQS1G1Y1G1YOOQS,5;p,5;pOOQV<<Jc<<JcO#L]QdO1G1dOOQS7+)T7+)TP#LbQdO'#FwO#LrQdO1G2OO#MVQdO1G2OO#MgQdO1G2OP#MrQdO'#FxO#NPQdO7+)VO#NaQdO7+)VO#NaQdO7+)VO#NiQdO7+)VO#NyQdO7+(|O8vQdO7+(|OOQSAN>VAN>VO$ dQdO<<LmOOQSAN>cAN>cO0rQdO1G1|O$ tQtO1G1|P$!OQdO'#FvOOQS1G2R1G2RP$!]QdO'#F{O$!jQdO7+)jO$#TQdO,5>gOOOO-E9z-E9zOOOW<<MT<<MTO$#cQdO7+(fOOQSAN?[AN?[OOQS7+'t7+'tO$#|QdO<<M[OOQS,5<q,5<qO$$_QdO1G4XOOQS-E:T-E:TOOQVAN?lAN?lOOQV1G2_1G2_O4iQdOAN?qO$$mQgOAN?qOOQVAN?xAN?xO4iQdOAN?xOOQV<<JR<<JRO4iQdOAN?rO4iQdO7+'{OOQV7+'{7+'{O1XQdO7+'{OOQVAN?rAN?rOOQS7+'|7+'|O$(hQdO<<MbOOQS1G4^1G4^O0rQdO1G4^OOQS,5<w,5<wO$(uQdO1G4]OOQS-E:Z-E:ZOOQU'#G_'#G_O$)WQfO7+'OO$)cQdO'#F_O$*jQdO7+'jO$*zQdO7+'jOOQS7+'j7+'jO$+VQdO<<LqO$+gQdO<<LqO$+gQdO<<LqO$+oQdO'#H^OOQS<<Lh<<LhO$+yQdO<<LhOOQS7+'h7+'hOOQS'#D|'#D|OOOO1G4R1G4RO$,dQdO1G4RO$,lQdO1G4RP!=hQdO'#GVOOQVG25]G25]O4iQdOG25]OOQVG25dG25dOOQVG25^G25^OOQV<<Kg<<KgO4iQdO<<KgOOQS7+)x7+)xP$,wQdO'#G]OOQU-E:]-E:]OOQV<<Jj<<JjO$-kQtO'#FaOOQS'#Fc'#FcO$-{QdO'#FbO$.mQdO'#FbOOQS'#Fb'#FbO$.rQdO'#IYO$)cQdO'#FiO$)cQdO'#FiO$/ZQdO'#FjO$)cQdO'#FkO$/bQdO'#IZOOQS'#IZ'#IZO$0PQdO,5;yOOQS<<KU<<KUO$0XQdO<<KUO$0iQdOANB]O$0yQdOANB]O$1RQdO'#H_OOQS'#H_'#H_O1sQdO'#DcO$1lQdO,5=xOOQSANBSANBSOOOO7+)m7+)mO$2TQdO7+)mOOQVLD*wLD*wOOQVANARANARO5uQ!fO'#GaO$2]QtO,5<SO$)cQdO'#FmOOQS,5<W,5<WOOQS'#Fd'#FdO$2}QdO,5;|O$3SQdO,5;|OOQS'#Fg'#FgO$)cQdO'#G`O$3tQdO,5<QO$4`QdO,5>tO$4pQdO,5>tO1XQdO,5<PO$5RQdO,5<TO$5WQdO,5<TO$)cQdO'#I[O$5]QdO'#I[O$5bQdO,5<UOOQS,5<V,5<VO'vQdO'#FpOOQU1G1e1G1eO4iQdO1G1eOOQSAN@pAN@pO$5gQdOG27wO$5wQdO,59}OOQS1G3d1G3dOOOO<<MX<<MXOOQS,5<{,5<{OOQS-E:_-E:_O$5|QtO'#FaO$6TQdO'#I]O$6cQdO'#I]O$6kQdO,5<XOOQS1G1h1G1hO$6pQdO1G1hO$6uQdO,5<zOOQS-E:^-E:^O$7aQdO,5=OO$7xQdO1G4`OOQS-E:b-E:bOOQS1G1k1G1kOOQS1G1o1G1oO$8YQdO,5>vO$)cQdO,5>vOOQS1G1p1G1pO$8hQtO,5<[OOQU7+'P7+'PO$+oQdO1G/iO$)cQdO,5<YO$8oQdO,5>wO$8vQdO,5>wOOQS1G1s1G1sOOQS7+'S7+'SP$)cQdO'#GdO$9OQdO1G4bO$9YQdO1G4bO$9bQdO1G4bOOQS7+%T7+%TO$9pQdO1G1tO$:OQtO'#FaO$:VQdO,5<}OOQS,5<},5<}O$:eQdO1G4cOOQS-E:a-E:aO$)cQdO,5<|O$:lQdO,5<|O$:qQdO7+)|OOQS-E:`-E:`O$:{QdO7+)|O$)cQdO,5<ZP$)cQdO'#GcO$;TQdO1G2hO$)cQdO1G2hP$;cQdO'#GbO$;jQdO<<MhO$;tQdO1G1uO$<SQdO7+(SO8vQdO'#C}O8vQdO,59bO8vQdO,59bO8vQdO,59bO$<bQtO,5=`O8vQdO1G.|O0rQdO1G/XO0rQdO7+$pP$<uQdO'#GOO'vQdO'#GtO$=SQdO,59bO$=XQdO,59bO$=`QdO,59mO$=eQdO1G/UO1sQdO'#DRO8vQdO,59j",stateData:"$>O~O%cOS%^OSSOS%]PQ~OPdOVaOfoOhYOopOs!POvqO!PrO!Q{O!T!SO!U!RO!XZO!][O!h`O!r`O!s`O!t`O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO#l!QO#o!TO#s!UO#u!VO#z!WO#}hO$P!XO%oRO%pRO%tSO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O~O%]!YO~OV!aO_!aOa!bOh!iO!X!kO!f!mO%j![O%k!]O%l!^O%m!_O%n!_O%o!`O%p!`O%q!aO%r!aO%s!aO~Ok%xXl%xXm%xXn%xXo%xXp%xXs%xXz%xX{%xX!x%xX#g%xX%[%xX%_%xX%z%xXg%xX!T%xX!U%xX%{%xX!W%xX![%xX!Q%xX#[%xXt%xX!m%xX~P%SOfoOhYO!XZO!][O!h`O!r`O!s`O!t`O%oRO%pRO%tSO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O~Oz%wX{%wX#g%wX%[%wX%_%wX%z%wX~Ok!pOl!qOm!oOn!oOo!rOp!sOs!tO!x%wX~P)pOV!zOg!|Oo0cOv0qO!PrO~P'vOV#OOo0cOv0qO!W#PO~P'vOV#SOa#TOo0cOv0qO![#UO~P'vOQ#XO%`#XO%a#ZO~OQ#^OR#[O%`#^O%a#`O~OV%iX_%iXa%iXh%iXk%iXl%iXm%iXn%iXo%iXp%iXs%iXz%iX!X%iX!f%iX%j%iX%k%iX%l%iX%m%iX%n%iX%o%iX%p%iX%q%iX%r%iX%s%iXg%iX!T%iX!U%iX~O&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O{%iX!x%iX#g%iX%[%iX%_%iX%z%iX%{%iX!W%iX![%iX!Q%iX#[%iXt%iX!m%iX~P,eOz#dO{%hX!x%hX#g%hX%[%hX%_%hX%z%hX~Oo0cOv0qO~P'vO#g#gO%[#iO%_#iO~O%uWO~O!T#nO#u!VO#z!WO#}hO~OopO~P'vOV#sOa#tO%uWO{wP~OV#xOo0cOv0qO!Q#yO~P'vO{#{O!x$QO%z#|O#g!yX%[!yX%_!yX~OV#xOo0cOv0qO#g#SX%[#SX%_#SX~P'vOo0cOv0qO#g#WX%[#WX%_#WX~P'vOh$WO%uWO~O!f$YO!r$YO%uWO~OV$eO~P'vO!U$gO#s$hO#u$iO~O{$jO~OV$qO~P'vOS$sO%[$rO%_$rO%c$tO~OV$}Oa$}Og%POo0cOv0qO~P'vOo0cOv0qO{%SO~P'vO&Y%UO~Oa!bOh!iO!X!kO!f!mOVba_bakbalbambanbaobapbasbazba{ba!xba#gba%[ba%_ba%jba%kba%lba%mba%nba%oba%pba%qba%rba%sba%zbagba!Tba!Uba%{ba!Wba![ba!Qba#[batba!mba~On%ZO~Oo%ZO~P'vOo0cO~P'vOk0eOl0fOm0dOn0dOo0mOp0nOs0rOg%wX!T%wX!U%wX%{%wX!W%wX![%wX!Q%wX#[%wX!m%wX~P)pO%{%]Og%vXz%vX!T%vX!U%vX!W%vX{%vX~Og%_Oz%`O!T%dO!U%cO~Og%_O~Oz%gO!T%dO!U%cO!W&SX~O!W%kO~Oz%lO{%nO!T%dO!U%cO![%}X~O![%rO~O![%sO~OQ#XO%`#XO%a%uO~OV%wOo0cOv0qO!PrO~P'vOQ#^OR#[O%`#^O%a%zO~OV!qa_!qaa!qah!qak!qal!qam!qan!qao!qap!qas!qaz!qa{!qa!X!qa!f!qa!x!qa#g!qa%[!qa%_!qa%j!qa%k!qa%l!qa%m!qa%n!qa%o!qa%p!qa%q!qa%r!qa%s!qa%z!qag!qa!T!qa!U!qa%{!qa!W!qa![!qa!Q!qa#[!qat!qa!m!qa~P#yOz%|O{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~P%SOV&OOopOvqO{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~P'vOz%|O{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~OPdOVaOopOvqO!PrO!Q{O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO#g$zX%[$zX%_$zX~P'vO#g#gO%[&TO%_&TO~O!f&UOh&sX%[&sXz&sX#[&sX#g&sX%_&sX#Z&sXg&sX~Oh!iO%[&WO~Okealeameaneaoeapeaseazea{ea!xea#gea%[ea%_ea%zeagea!Tea!Uea%{ea!Wea![ea!Qea#[eatea!mea~P%SOsqazqa{qa#gqa%[qa%_qa%zqa~Ok!pOl!qOm!oOn!oOo!rOp!sO!xqa~PEcO%z&YOz%yX{%yX~O%uWOz%yX{%yX~Oz&]O{wX~O{&_O~Oz%lO#g%}X%[%}X%_%}Xg%}X{%}X![%}X!m%}X%z%}X~OV0lOo0cOv0qO!PrO~P'vO%z#|O#gUa%[Ua%_Ua~Oz&hO#g&PX%[&PX%_&PXn&PX~P%SOz&kO!Q&jO#g#Wa%[#Wa%_#Wa~Oz&lO#[&nO#g&rX%[&rX%_&rXg&rX~O!f$YO!r$YO#Z&qO%uWO~O#Z&qO~Oz&sO#g&tX%[&tX%_&tX~Oz&uO#g&pX%[&pX%_&pX{&pX~O!X&wO%z&xO~Oz&|On&wX~P%SOn'PO~OPdOVaOopOvqO!PrO!Q{O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO%['UO~P'vOt'YO#p'WO#q'XOP#naV#naf#nah#nao#nas#nav#na!P#na!Q#na!T#na!U#na!X#na!]#na!h#na!r#na!s#na!t#na!{#na!}#na#P#na#R#na#T#na#X#na#Z#na#^#na#_#na#a#na#c#na#l#na#o#na#s#na#u#na#z#na#}#na$P#na%X#na%o#na%p#na%t#na%u#na&Z#na&[#na&]#na&^#na&_#na&`#na&a#na&b#na&c#na&d#na&e#na&f#na&g#na&h#na&i#na&j#na%Z#na%_#na~Oz'ZO#[']O{&xX~Oh'_O!X&wO~Oh!iO{$jO!X&wO~O{'eO~P%SO%['hO%_'hO~OS'iO%['hO%_'hO~OV!aO_!aOa!bOh!iO!X!kO!f!mO%l!^O%m!_O%n!_O%o!`O%p!`O%q!aO%r!aO%s!aOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~O%k!]O~P!#uO%kWi~P!#uOV!aO_!aOa!bOh!iO!X!kO!f!mO%o!`O%p!`O%q!aO%r!aO%s!aOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%kWi%lWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~O%m!_O%n!_O~P!&pO%mWi%nWi~P!&pOa!bOh!iO!X!kO!f!mOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%kWi%lWi%mWi%nWi%oWi%pWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~OV!aO_!aO%q!aO%r!aO%s!aO~P!)nOVWi_Wi%qWi%rWi%sWi~P!)nO!T%dO!U%cOg&VXz&VX~O%z'kO%{'kO~P,eOz'mOg&UX~Og'oO~Oz'pO{'rO!W&XX~Oo0cOv0qOz'pO{'sO!W&XX~P'vO!W'uO~Om!oOn!oOo!rOp!sOkjisjizji{ji!xji#gji%[ji%_ji%zji~Ol!qO~P!.aOlji~P!.aOk0eOl0fOm0dOn0dOo0mOp0nO~Ot'wO~P!/jOV'|Og'}Oo0cOv0qO~P'vOg'}Oz(OO~Og(QO~O!U(SO~Og(TOz(OO!T%dO!U%cO~P%SOk0eOl0fOm0dOn0dOo0mOp0nOgqa!Tqa!Uqa%{qa!Wqa![qa!Qqa#[qatqa!mqa~PEcOV'|Oo0cOv0qO!W&Sa~P'vOz(WO!W&Sa~O!W(XO~Oz(WO!T%dO!U%cO!W&Sa~P%SOV(]Oo0cOv0qO![%}a#g%}a%[%}a%_%}ag%}a{%}a!m%}a%z%}a~P'vOz(^O![%}a#g%}a%[%}a%_%}ag%}a{%}a!m%}a%z%}a~O![(aO~Oz(^O!T%dO!U%cO![%}a~P%SOz(dO!T%dO!U%cO![&Ta~P%SOz(gO{&lX![&lX!m&lX%z&lX~O{(kO![(mO!m(nO%z(jO~OV&OOopOvqO{%hi!x%hi#g%hi%[%hi%_%hi%z%hi~P'vOz(pO{%hi!x%hi#g%hi%[%hi%_%hi%z%hi~O!f&UOh&sa%[&saz&sa#[&sa#g&sa%_&sa#Z&sag&sa~O%[(uO~OV#sOa#tO%uWO~Oz&]O{wa~OopOvqO~P'vOz(^O#g%}a%[%}a%_%}ag%}a{%}a![%}a!m%}a%z%}a~P%SOz(zO#g%hX%[%hX%_%hX%z%hX~O%z#|O#gUi%[Ui%_Ui~O#g&Pa%[&Pa%_&Pan&Pa~P'vOz(}O#g&Pa%[&Pa%_&Pan&Pa~O%uWO#g&ra%[&ra%_&rag&ra~Oz)SO#g&ra%[&ra%_&rag&ra~Og)VO~OV)WOh$WO%uWO~O#Z)XO~O%uWO#g&ta%[&ta%_&ta~Oz)ZO#g&ta%[&ta%_&ta~Oo0cOv0qO#g&pa%[&pa%_&pa{&pa~P'vOz)^O#g&pa%[&pa%_&pa{&pa~OV)`Oa)`O%uWO~O%z)eO~Ot)hO#j)gOP#hiV#hif#hih#hio#his#hiv#hi!P#hi!Q#hi!T#hi!U#hi!X#hi!]#hi!h#hi!r#hi!s#hi!t#hi!{#hi!}#hi#P#hi#R#hi#T#hi#X#hi#Z#hi#^#hi#_#hi#a#hi#c#hi#l#hi#o#hi#s#hi#u#hi#z#hi#}#hi$P#hi%X#hi%o#hi%p#hi%t#hi%u#hi&Z#hi&[#hi&]#hi&^#hi&_#hi&`#hi&a#hi&b#hi&c#hi&d#hi&e#hi&f#hi&g#hi&h#hi&i#hi&j#hi%Z#hi%_#hi~Ot)iOP#kiV#kif#kih#kio#kis#kiv#ki!P#ki!Q#ki!T#ki!U#ki!X#ki!]#ki!h#ki!r#ki!s#ki!t#ki!{#ki!}#ki#P#ki#R#ki#T#ki#X#ki#Z#ki#^#ki#_#ki#a#ki#c#ki#l#ki#o#ki#s#ki#u#ki#z#ki#}#ki$P#ki%X#ki%o#ki%p#ki%t#ki%u#ki&Z#ki&[#ki&]#ki&^#ki&_#ki&`#ki&a#ki&b#ki&c#ki&d#ki&e#ki&f#ki&g#ki&h#ki&i#ki&j#ki%Z#ki%_#ki~OV)kOn&wa~P'vOz)lOn&wa~Oz)lOn&wa~P%SOn)pO~O%Y)tO~Ot)wO#p'WO#q)vOP#niV#nif#nih#nio#nis#niv#ni!P#ni!Q#ni!T#ni!U#ni!X#ni!]#ni!h#ni!r#ni!s#ni!t#ni!{#ni!}#ni#P#ni#R#ni#T#ni#X#ni#Z#ni#^#ni#_#ni#a#ni#c#ni#l#ni#o#ni#s#ni#u#ni#z#ni#}#ni$P#ni%X#ni%o#ni%p#ni%t#ni%u#ni&Z#ni&[#ni&]#ni&^#ni&_#ni&`#ni&a#ni&b#ni&c#ni&d#ni&e#ni&f#ni&g#ni&h#ni&i#ni&j#ni%Z#ni%_#ni~OV)zOo0cOv0qO{$jO~P'vOo0cOv0qO{&xa~P'vOz*OO{&xa~OV*SOa*TOg*WO%q*UO%uWO~O{$jO&{*YO~Oh'_O~Oh!iO{$jO~O%[*_O~O%[*aO%_*aO~OV$}Oa$}Oo0cOv0qOg&Ua~P'vOz*dOg&Ua~Oo0cOv0qO{*gO!W&Xa~P'vOz*hO!W&Xa~Oo0cOv0qOz*hO{*kO!W&Xa~P'vOo0cOv0qOz*hO!W&Xa~P'vOz*hO{*kO!W&Xa~Om0dOn0dOo0mOp0nOgjikjisjizji!Tji!Uji%{ji!Wji{ji![ji#gji%[ji%_ji!Qji#[jitji!mji%zji~Ol0fO~P!NkOlji~P!NkOV'|Og*pOo0cOv0qO~P'vOn*rO~Og*pOz*tO~Og*uO~OV'|Oo0cOv0qO!W&Si~P'vOz*vO!W&Si~O!W*wO~OV(]Oo0cOv0qO![%}i#g%}i%[%}i%_%}ig%}i{%}i!m%}i%z%}i~P'vOz*zO!T%dO!U%cO![&Ti~Oz*}O![%}i#g%}i%[%}i%_%}ig%}i{%}i!m%}i%z%}i~O![+OO~Oa+QOo0cOv0qO![&Ti~P'vOz*zO![&Ti~O![+SO~OV+UOo0cOv0qO{&la![&la!m&la%z&la~P'vOz+VO{&la![&la!m&la%z&la~O!]+YO&n+[O![!nX~O![+^O~O{(kO![+_O~O{(kO![+_O!m+`O~OV&OOopOvqO{%hq!x%hq#g%hq%[%hq%_%hq%z%hq~P'vOz$ri{$ri!x$ri#g$ri%[$ri%_$ri%z$ri~P%SOV&OOopOvqO~P'vOV&OOo0cOv0qO#g%ha%[%ha%_%ha%z%ha~P'vOz+aO#g%ha%[%ha%_%ha%z%ha~Oz$ia#g$ia%[$ia%_$ian$ia~P%SO#g&Pi%[&Pi%_&Pin&Pi~P'vOz+dO#g#Wq%[#Wq%_#Wq~O#[+eOz$va#g$va%[$va%_$vag$va~O%uWO#g&ri%[&ri%_&rig&ri~Oz+gO#g&ri%[&ri%_&rig&ri~OV+iOh$WO%uWO~O%uWO#g&ti%[&ti%_&ti~Oo0cOv0qO#g&pi%[&pi%_&pi{&pi~P'vO{#{Oz#eX!W#eX~Oz+mO!W&uX~O!W+oO~Ot+rO#j)gOP#hqV#hqf#hqh#hqo#hqs#hqv#hq!P#hq!Q#hq!T#hq!U#hq!X#hq!]#hq!h#hq!r#hq!s#hq!t#hq!{#hq!}#hq#P#hq#R#hq#T#hq#X#hq#Z#hq#^#hq#_#hq#a#hq#c#hq#l#hq#o#hq#s#hq#u#hq#z#hq#}#hq$P#hq%X#hq%o#hq%p#hq%t#hq%u#hq&Z#hq&[#hq&]#hq&^#hq&_#hq&`#hq&a#hq&b#hq&c#hq&d#hq&e#hq&f#hq&g#hq&h#hq&i#hq&j#hq%Z#hq%_#hq~On$|az$|a~P%SOV)kOn&wi~P'vOz+yOn&wi~Oz,TO{$jO#[,TO~O#q,VOP#nqV#nqf#nqh#nqo#nqs#nqv#nq!P#nq!Q#nq!T#nq!U#nq!X#nq!]#nq!h#nq!r#nq!s#nq!t#nq!{#nq!}#nq#P#nq#R#nq#T#nq#X#nq#Z#nq#^#nq#_#nq#a#nq#c#nq#l#nq#o#nq#s#nq#u#nq#z#nq#}#nq$P#nq%X#nq%o#nq%p#nq%t#nq%u#nq&Z#nq&[#nq&]#nq&^#nq&_#nq&`#nq&a#nq&b#nq&c#nq&d#nq&e#nq&f#nq&g#nq&h#nq&i#nq&j#nq%Z#nq%_#nq~O#[,WOz%Oa{%Oa~Oo0cOv0qO{&xi~P'vOz,YO{&xi~O{#{O%z,[Og&zXz&zX~O%uWOg&zXz&zX~Oz,`Og&yX~Og,bO~O%Y,eO~O!T%dO!U%cOg&Viz&Vi~OV$}Oa$}Oo0cOv0qOg&Ui~P'vO{,hOz$la!W$la~Oo0cOv0qO{,iOz$la!W$la~P'vOo0cOv0qO{*gO!W&Xi~P'vOz,lO!W&Xi~Oo0cOv0qOz,lO!W&Xi~P'vOz,lO{,oO!W&Xi~Og$hiz$hi!W$hi~P%SOV'|Oo0cOv0qO~P'vOn,qO~OV'|Og,rOo0cOv0qO~P'vOV'|Oo0cOv0qO!W&Sq~P'vOz$gi![$gi#g$gi%[$gi%_$gig$gi{$gi!m$gi%z$gi~P%SOV(]Oo0cOv0qO~P'vOa+QOo0cOv0qO![&Tq~P'vOz,sO![&Tq~O![,tO~OV(]Oo0cOv0qO![%}q#g%}q%[%}q%_%}qg%}q{%}q!m%}q%z%}q~P'vO{,uO~OV+UOo0cOv0qO{&li![&li!m&li%z&li~P'vOz,zO{&li![&li!m&li%z&li~O!]+YO&n+[O![!na~O{(kO![,}O~OV&OOo0cOv0qO#g%hi%[%hi%_%hi%z%hi~P'vOz-OO#g%hi%[%hi%_%hi%z%hi~O%uWO#g&rq%[&rq%_&rqg&rq~Oz-RO#g&rq%[&rq%_&rqg&rq~OV)`Oa)`O%uWO!W&ua~Oz-TO!W&ua~On$|iz$|i~P%SOV)kO~P'vOV)kOn&wq~P'vOt-XOP#myV#myf#myh#myo#mys#myv#my!P#my!Q#my!T#my!U#my!X#my!]#my!h#my!r#my!s#my!t#my!{#my!}#my#P#my#R#my#T#my#X#my#Z#my#^#my#_#my#a#my#c#my#l#my#o#my#s#my#u#my#z#my#}#my$P#my%X#my%o#my%p#my%t#my%u#my&Z#my&[#my&]#my&^#my&_#my&`#my&a#my&b#my&c#my&d#my&e#my&f#my&g#my&h#my&i#my&j#my%Z#my%_#my~O%Z-]O%_-]O~P`O#q-^OP#nyV#nyf#nyh#nyo#nys#nyv#ny!P#ny!Q#ny!T#ny!U#ny!X#ny!]#ny!h#ny!r#ny!s#ny!t#ny!{#ny!}#ny#P#ny#R#ny#T#ny#X#ny#Z#ny#^#ny#_#ny#a#ny#c#ny#l#ny#o#ny#s#ny#u#ny#z#ny#}#ny$P#ny%X#ny%o#ny%p#ny%t#ny%u#ny&Z#ny&[#ny&]#ny&^#ny&_#ny&`#ny&a#ny&b#ny&c#ny&d#ny&e#ny&f#ny&g#ny&h#ny&i#ny&j#ny%Z#ny%_#ny~Oz-aO{$jO#[-aO~Oo0cOv0qO{&xq~P'vOz-dO{&xq~O%z,[Og&zaz&za~OV*SOa*TO%q*UO%uWOg&ya~Oz-hOg&ya~O$S-lO~OV$}Oa$}Oo0cOv0qO~P'vOo0cOv0qO{-mOz$li!W$li~P'vOo0cOv0qOz$li!W$li~P'vO{-mOz$li!W$li~Oo0cOv0qO{*gO~P'vOo0cOv0qO{*gO!W&Xq~P'vOz-pO!W&Xq~Oo0cOv0qOz-pO!W&Xq~P'vOs-sO!T%dO!U%cOg&Oq!W&Oq![&Oqz&Oq~P!/jOa+QOo0cOv0qO![&Ty~P'vOz$ji![$ji~P%SOa+QOo0cOv0qO~P'vOV+UOo0cOv0qO~P'vOV+UOo0cOv0qO{&lq![&lq!m&lq%z&lq~P'vO{(kO![-xO!m-yO%z-wO~OV&OOo0cOv0qO#g%hq%[%hq%_%hq%z%hq~P'vO%uWO#g&ry%[&ry%_&ryg&ry~OV)`Oa)`O%uWO!W&ui~Ot-}OP#m!RV#m!Rf#m!Rh#m!Ro#m!Rs#m!Rv#m!R!P#m!R!Q#m!R!T#m!R!U#m!R!X#m!R!]#m!R!h#m!R!r#m!R!s#m!R!t#m!R!{#m!R!}#m!R#P#m!R#R#m!R#T#m!R#X#m!R#Z#m!R#^#m!R#_#m!R#a#m!R#c#m!R#l#m!R#o#m!R#s#m!R#u#m!R#z#m!R#}#m!R$P#m!R%X#m!R%o#m!R%p#m!R%t#m!R%u#m!R&Z#m!R&[#m!R&]#m!R&^#m!R&_#m!R&`#m!R&a#m!R&b#m!R&c#m!R&d#m!R&e#m!R&f#m!R&g#m!R&h#m!R&i#m!R&j#m!R%Z#m!R%_#m!R~Oo0cOv0qO{&xy~P'vOV*SOa*TO%q*UO%uWOg&yi~O$S-lO%Z.VO%_.VO~OV.aOh._O!X.^O!].`O!h.YO!s.[O!t.[O%p.XO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O~Oo0cOv0qOz$lq!W$lq~P'vO{.fOz$lq!W$lq~Oo0cOv0qO{*gO!W&Xy~P'vOz.gO!W&Xy~Oo0cOv.kO~P'vOs-sO!T%dO!U%cOg&Oy!W&Oy![&Oyz&Oy~P!/jO{(kO![.nO~O{(kO![.nO!m.oO~OV*SOa*TO%q*UO%uWO~Oh.tO!f.rOz$TX#[$TX%j$TXg$TX~Os$TX{$TX!W$TX![$TX~P$-VO%o.vO%p.vOs$UXz$UX{$UX#[$UX%j$UX!W$UXg$UX![$UX~O!h.xO~Oz.|O#[/OO%j.yOs&|X{&|X!W&|Xg&|X~Oa/RO~P$)oOh.tOs&}Xz&}X{&}X#[&}X%j&}X!W&}Xg&}X![&}X~Os/VO{$jO~Oo0cOv0qOz$ly!W$ly~P'vOo0cOv0qO{*gO!W&X!R~P'vOz/ZO!W&X!R~Og&RXs&RX!T&RX!U&RX!W&RX![&RXz&RX~P!/jOs-sO!T%dO!U%cOg&Qa!W&Qa![&Qaz&Qa~O{(kO![/^O~O!f.rOh$[as$[az$[a{$[a#[$[a%j$[a!W$[ag$[a![$[a~O!h/eO~O%o.vO%p.vOs$Uaz$Ua{$Ua#[$Ua%j$Ua!W$Uag$Ua![$Ua~O%j.yOs$Yaz$Ya{$Ya#[$Ya!W$Yag$Ya![$Ya~Os&|a{&|a!W&|ag&|a~P$)cOz/jOs&|a{&|a!W&|ag&|a~O!W/mO~Og/mO~O{/oO~O![/pO~Oo0cOv0qO{*gO!W&X!Z~P'vO{/sO~O%z/tO~P$-VOz/uO#[/OO%j.yOg'PX~Oz/uOg'PX~Og/wO~O!h/xO~O#[/OOs%Saz%Sa{%Sa%j%Sa!W%Sag%Sa![%Sa~O#[/OO%j.yOs%Waz%Wa{%Wa!W%Wag%Wa~Os&|i{&|i!W&|ig&|i~P$)cOz/zO#[/OO%j.yO!['Oa~O{$da~P%SOg'Pa~P$)cOz0SOg'Pa~Oa0UO!['Oi~P$)oOz0WO!['Oi~Oz0WO#[/OO%j.yO!['Oi~O#[/OO%j.yOg$biz$bi~O%z0ZO~P$-VO#[/OO%j.yOg%Vaz%Va~Og'Pi~P$)cO{0^O~Oa0UO!['Oq~P$)oOz0`O!['Oq~O#[/OO%j.yOz%Ui![%Ui~Oa0UO~P$)oOa0UO!['Oy~P$)oO#[/OO%j.yOg$ciz$ci~O#[/OO%j.yOz%Uq![%Uq~Oz+aO#g%ha%[%ha%_%ha%z%ha~P%SOV&OOo0cOv0qO~P'vOn0hO~Oo0hO~P'vO{0iO~Ot0jO~P!/jO&]&Z&j&h&i&g&f&d&e&c&b&`&a&_&^&[%u~",goto:"!=l'QPPPPPP'RP'Z*s+]+v,b,}-kP.YP'Z.y.y'ZPPP'Z2cPPPPPP2c5VPP5VP7g7p=xPP={>m>pPP'Z'ZPP?PPP'Z'ZPP'Z'Z'Z'Z'Z?T?}'ZP@QP@WD_G{HPPHSH^Hb'ZPPPHeHn'RP'R'RP'RP'RP'RP'RP'R'R'RP'RPP'RPP'RP'RPHtIQIYPIaIgPIaPIaIaPPPIaPKuPLOLYL`KuPIaLiPIaPLpLvPLzM`M}NhLzLzNnN{LzLzLzLz! a! g! j! o! r! |!!S!!`!!r!!x!#S!#Y!#v!#|!$S!$^!$d!$j!$|!%W!%^!%d!%n!%t!%z!&Q!&W!&^!&h!&n!&x!'O!'X!'_!'n!'v!(Q!(XPPPPPPPPPPP!(_!(b!(h!(q!({!)WPPPPPPPPPPPP!-z!/`!3`!6pPP!6x!7X!7b!8Z!8Q!8d!8j!8m!8p!8s!8{!9lPPPPPPPPPPPPPPPPP!9o!9s!9yP!:_!:c!:o!:x!;U!;l!;o!;r!;x!<O!<U!<XP!<a!<j!=f!=i]eOn#g$j)t,P'}`OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0r}!cQ#c#p$R$d$p%e%j%p%q&`'O'g(q(|)j*o*x+w,v/q0g!P!dQ#c#p$R$d$p$u%e%j%p%q&`'O'g(q(|)j*o*x+w,v/q0g!R!eQ#c#p$R$d$p$u$v%e%j%p%q&`'O'g(q(|)j*o*x+w,v/q0g!T!fQ#c#p$R$d$p$u$v$w%e%j%p%q&`'O'g(q(|)j*o*x+w,v/q0g!V!gQ#c#p$R$d$p$u$v$w$x%e%j%p%q&`'O'g(q(|)j*o*x+w,v/q0g!X!hQ#c#p$R$d$p$u$v$w$x$y%e%j%p%q&`'O'g(q(|)j*o*x+w,v/q0g!]!hQ!n#c#p$R$d$p$u$v$w$x$y$z%e%j%p%q&`'O'g(q(|)j*o*x+w,v/q0g'}TOTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0r&cVOYZ[dnprxy}!P!Q!U!i!k!o!p!q!s!t#[#d#g#y#{#}$Q$h$j$}%S%Z%^%`%g%l%n%w%|&Z&_&j&k&u&x'P'W'Z'l'm'p'r's'w(O(W(^(d(g(p(r(z)^)e)g)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+U+V+Y+a+d+k,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/Z/s0c0d0e0f0h0i0j0k0n0r%mXOYZ[dnrxy}!P!Q!U!i!k#[#d#g#y#{#}$Q$h$j$}%S%^%`%g%l%n%w%|&Z&_&j&k&u&x'P'W'Z'l'm'p'r's'w(O(W(^(d(g(p(r(z)^)e)g)p)t)z*O*Y*d*g*h*k*q*t*v*y*z*}+U+V+Y+a+d+k,P,X,Y,],g,h,i,k,l,o,s,u,w,y,z-O-d-f-m-p.f.g/Z0i0j0kQ#vqQ/[.kR0o0q't`OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0rh#jhz{$W$Z&l&q)S)X+f+g-RW#rq&].k0qQ$]|Q$a!OQ$n!VQ$o!WW$|!i'm*d,gS&[#s#tQ'S$iQ(s&UQ)U&nU)Y&s)Z+jW)a&w+m-T-{Q*Q']W*R'_,`-h.TQ+l)`S,_*S*TQ-Q+eQ-_,TQ-c,WQ.R-al.W-l.^._.a.z.|/R/j/o/t/y0U0Z0^Q/S.`Q/a.tQ/l/OU0P/u0S0[X0V/z0W0_0`R&Z#r!_!wYZ!P!Q!k%S%`%g'p'r's(O(W)g*g*h*k*q*t*v,h,i,k,l,o-m-p.f.g/ZR%^!vQ!{YQ%x#[Q&d#}Q&g$QR,{+YT.j-s/s![!jQ!n#c#p$R$d$p$u$v$w$x$y$z%e%j%p%q&`'O'g(q(|)j*o*x+w,v/q0gQ&X#kQ'c$oR*^'dR'l$|Q%V!mR/_.r'|_OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0rS#a_#b!P.[-l.^._.`.a.t.z.|/R/j/o/t/u/y/z0S0U0W0Z0[0^0_0`'|_OTYZ[adnoprtxy}!P!Q!R!U!X!c!d!e!f!g!h!i!k!o!p!q!s!t!z#O#S#T#[#d#g#x#y#{#}$Q$e$g$h$j$q$}%S%Z%^%`%c%g%l%n%w%|&O&Z&_&h&j&k&u&x&|'P'W'Z'l'm'p'r's'w'|(O(S(W(](^(d(g(p(r(z(})^)e)g)k)l)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+Q+U+V+Y+a+c+d+k+x+y,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/V/Z/s0c0d0e0f0h0i0j0k0l0n0rT#a_#bT#^^#_R(o%xa(l%x(n(o+`,{-y-z.oT+[(k+]R-z,{Q$PsQ+l)aR,^*RX#}s$O$P&fQ&y$aQ'a$nQ'd$oR)s'SQ)b&wV-S+m-T-{ZgOn$j)t,PXkOn)t,PQ$k!TQ&z$bQ&{$cQ'^$mQ'b$oQ)q'RQ)x'WQ){'XQ)|'YQ*Z'`S*]'c'dQ+s)gQ+u)hQ+v)iQ+z)oS+|)r*[Q,Q)vQ,R)wS,S)y)zQ,d*^Q-V+rQ-W+tQ-Y+{S-Z+},OQ-`,UQ-b,VQ-|-XQ.O-[Q.P-^Q.Q-_Q.p-}Q.q.RQ/W.dR/r/XWkOn)t,PR#mjQ'`$nS)r'S'aR,O)sQ,]*RR-f,^Q*['`Q+})rR-[,OZiOjn)t,PQ'f$pR*`'gT-j,e-ku.c-l.^._.a.t.z.|/R/j/o/t/u/y0S0U0Z0[0^t.c-l.^._.a.t.z.|/R/j/o/t/u/y0S0U0Z0[0^Q/S.`X0V/z0W0_0`!P.Z-l.^._.`.a.t.z.|/R/j/o/t/u/y/z0S0U0W0Z0[0^0_0`Q.w.YR/f.xg.z.].{/b/i/n/|0O0Q0]0a0bu.b-l.^._.a.t.z.|/R/j/o/t/u/y0S0U0Z0[0^X.u.W.b/a0PR/c.tV0R/u0S0[R/X.dQnOS#on,PR,P)tQ&^#uR(x&^S%m#R#wS(_%m(bT(b%p&`Q%a!yQ%h!}W(P%a%h(U(YQ(U%eR(Y%jQ&i$RR)O&iQ(e%qQ*{(`T+R(e*{Q'n%OR*e'nS'q%R%SY*i'q*j,m-q.hU*j'r's'tU,m*k*l*mS-q,n,oR.h-rQ#Y]R%t#YQ#_^R%y#_Q(h%vS+W(h+XR+X(iQ+](kR,|+]Q#b_R%{#bQ#ebQ%}#cW&Q#e%}({+bQ({&cR+b0gQ$OsS&e$O&fR&f$PQ&v$_R)_&vQ&V#jR(t&VQ&m$VS)T&m+hR+h)UQ$Z{R&p$ZQ&t$]R)[&tQ+n)bR-U+nQ#hfR&S#hQ)f&zR+q)fQ&}$dS)m&})nR)n'OQ'V$kR)u'VQ'[$lS*P'[,ZR,Z*QQ,a*VR-i,aWjOn)t,PR#ljQ-k,eR.U-kd.{.]/b/i/n/|0O0Q0]0a0bR/h.{U.s.W/a0PR/`.sQ/{/nS0X/{0YR0Y/|S/v/b/cR0T/vQ.}.]R/k.}R!ZPXmOn)t,PWlOn)t,PR'T$jYfOn$j)t,PR&R#g[sOn#g$j)t,PR&d#}&bQOYZ[dnprxy}!P!Q!U!i!k!o!p!q!s!t#[#d#g#y#{#}$Q$h$j$}%S%Z%^%`%g%l%n%w%|&Z&_&j&k&u&x'P'W'Z'l'm'p'r's'w(O(W(^(d(g(p(r(z)^)e)g)p)t)z*O*Y*d*g*h*k*q*r*t*v*y*z*}+U+V+Y+a+d+k,P,X,Y,],g,h,i,k,l,o,q,s,u,w,y,z-O-d-f-m-p-s.f.g/Z/s0c0d0e0f0h0i0j0k0n0rQ!nTQ#caQ#poU$Rt%c(SS$d!R$gQ$p!XQ$u!cQ$v!dQ$w!eQ$x!fQ$y!gQ$z!hQ%e!zQ%j#OQ%p#SQ%q#TQ&`#xQ'O$eQ'g$qQ(q&OU(|&h(}+cW)j&|)l+x+yQ*o'|Q*x(]Q+w)kQ,v+QQ/q/VR0g0lQ!yYQ!}ZQ$b!PQ$c!QQ%R!kQ't%S^'{%`%g(O(W*q*t*v^*f'p*h,k,l-p.g/ZQ*l'rQ*m'sQ+t)gQ,j*gQ,n*kQ-n,hQ-o,iQ-r,oQ.e-mR/Y.f[bOn#g$j)t,P!^!vYZ!P!Q!k%S%`%g'p'r's(O(W)g*g*h*k*q*t*v,h,i,k,l,o-m-p.f.g/ZQ#R[Q#fdS#wrxQ$UyW$_}$Q'P)pS$l!U$hW${!i'm*d,gS%v#[+Y`&P#d%|(p(r(z+a-O0kQ&a#yQ&b#{Q&c#}Q'j$}Q'z%^W([%l(^*y*}Q(`%nQ(i%wQ(v&ZS(y&_0iQ)P&jQ)Q&kU)]&u)^+kQ)d&xQ)y'WY)}'Z*O,X,Y-dQ*b'lS*n'w0jW+P(d*z,s,wW+T(g+V,y,zQ+p)eQ,U)zQ,c*YQ,x+UQ-P+dQ-e,]Q-v,uR.S-fhUOn#d#g$j%|&_'w(p(r)t,P%S!uYZ[drxy}!P!Q!U!i!k#[#y#{#}$Q$h$}%S%^%`%g%l%n%w&Z&j&k&u&x'P'W'Z'l'm'p'r's(O(W(^(d(g(z)^)e)g)p)z*O*Y*d*g*h*k*q*t*v*y*z*}+U+V+Y+a+d+k,X,Y,],g,h,i,k,l,o,s,u,w,y,z-O-d-f-m-p.f.g/Z0i0j0kQ#qpW%W!o!s0d0nQ%X!pQ%Y!qQ%[!tQ%f0cS'v%Z0hQ'x0eQ'y0fQ,p*rQ-u,qS.i-s/sR0p0rU#uq.k0qR(w&][cOn#g$j)t,PZ!xY#[#}$Q+YQ#W[Q#zrR$TxQ%b!yQ%i!}Q%o#RQ'j${Q(V%eQ(Z%jQ(c%pQ(f%qQ*|(`Q,f*bQ-t,pQ.m-uR/].lQ$StQ(R%cR*s(SQ.l-sR/}/sR#QZR#V[R%Q!iQ%O!iV*c'm*d,g!]!lQ!n#c#p$R$d$p$u$v$w$x$y$z%e%j%p%q&`'O'g(q(|)j*o*x+w,v/q0gR%T!kT#]^#_Q%x#[R,{+YQ(m%xS+_(n(oQ,}+`Q-x,{S.n-y-zR/^.oT+Z(k+]Q$`}Q&g$QQ)o'PR+{)pQ$XzQ)W&qR+i)XQ$XzQ&o$WQ)W&qR+i)XQ#khW$Vz$W&q)XQ$[{Q&r$ZZ)R&l)S+f+g-RR$^|R)c&wXlOn)t,PQ$f!RR'Q$gQ$m!UR'R$hR*X'_Q*V'_V-g,`-h.TQ.d-lQ/P.^R/Q._U.]-l.^._Q/U.aQ/b.tQ/g.zU/i.|/j/yQ/n/RQ/|/oQ0O/tU0Q/u0S0[Q0]0UQ0a0ZR0b0^R/T.`R/d.t",nodeNames:"⚠ print Escape { Comment Script AssignStatement * BinaryExpression BitOp BitOp BitOp BitOp ArithOp ArithOp @ ArithOp ** UnaryExpression ArithOp BitOp AwaitExpression await ) ( ParenthesizedExpression BinaryExpression or and CompareOp in not is UnaryExpression ConditionalExpression if else LambdaExpression lambda ParamList VariableName AssignOp , : NamedExpression AssignOp YieldExpression yield from TupleExpression ComprehensionExpression async for LambdaExpression ] [ ArrayExpression ArrayComprehensionExpression } { DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression CallExpression ArgList AssignOp MemberExpression . PropertyName Number String FormatString FormatReplacement FormatSelfDoc FormatConversion FormatSpec FormatReplacement FormatSelfDoc ContinuedString Ellipsis None Boolean TypeDef AssignOp UpdateStatement UpdateOp ExpressionStatement DeleteStatement del PassStatement pass BreakStatement break ContinueStatement continue ReturnStatement return YieldStatement PrintStatement RaiseStatement raise ImportStatement import as ScopeStatement global nonlocal AssertStatement assert TypeDefinition type TypeParamList TypeParam StatementGroup ; IfStatement Body elif WhileStatement while ForStatement TryStatement try except finally WithStatement with FunctionDefinition def ParamList AssignOp TypeDef ClassDefinition class DecoratedStatement Decorator At MatchStatement match MatchBody MatchClause case CapturePattern LiteralPattern ArithOp ArithOp AsPattern OrPattern LogicOp AttributePattern SequencePattern MappingPattern StarPattern ClassPattern PatternArgList KeywordPattern KeywordPattern Guard",maxTerm:277,context:gre,nodeProps:[["isolate",-5,4,71,72,73,77,""],["group",-15,6,85,87,88,90,92,94,96,98,99,100,102,105,108,110,"Statement Statement",-22,8,18,21,25,40,49,50,56,57,60,61,62,63,64,67,70,71,72,79,80,81,82,"Expression",-10,114,116,119,121,122,126,128,133,135,138,"Statement",-9,143,144,147,148,150,151,152,153,154,"Pattern"],["openedBy",23,"(",54,"[",58,"{"],["closedBy",24,")",55,"]",59,"}"]],propSources:[Ere],skippedNodes:[0,4],repeatNodeCount:34,tokenData:"!2|~R!`OX%TXY%oY[%T[]%o]p%Tpq%oqr'ars)Yst*xtu%Tuv,dvw-hwx.Uxy/tyz0[z{0r{|2S|}2p}!O3W!O!P4_!P!Q:Z!Q!R;k!R![>_![!]Do!]!^Es!^!_FZ!_!`Gk!`!aHX!a!b%T!b!cIf!c!dJU!d!eK^!e!hJU!h!i!#f!i!tJU!t!u!,|!u!wJU!w!x!.t!x!}JU!}#O!0S#O#P&o#P#Q!0j#Q#R!1Q#R#SJU#S#T%T#T#UJU#U#VK^#V#YJU#Y#Z!#f#Z#fJU#f#g!,|#g#iJU#i#j!.t#j#oJU#o#p!1n#p#q!1s#q#r!2a#r#s!2f#s$g%T$g;'SJU;'S;=`KW<%lOJU`%YT&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T`%lP;=`<%l%To%v]&n`%c_OX%TXY%oY[%T[]%o]p%Tpq%oq#O%T#O#P&o#P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To&tX&n`OY%TYZ%oZ]%T]^%o^#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc'f[&n`O!_%T!_!`([!`#T%T#T#U(r#U#f%T#f#g(r#g#h(r#h#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(cTmR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(yT!mR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk)aV&n`&[ZOr%Trs)vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk){V&n`Or%Trs*bs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk*iT&n`&^ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To+PZS_&n`OY*xYZ%TZ]*x]^%T^#o*x#o#p+r#p#q*x#q#r+r#r;'S*x;'S;=`,^<%lO*x_+wTS_OY+rZ]+r^;'S+r;'S;=`,W<%lO+r_,ZP;=`<%l+ro,aP;=`<%l*xj,kV%rQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-XT!xY&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-oV%lQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.]V&n`&ZZOw%Twx.rx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.wV&n`Ow%Twx/^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/eT&n`&]ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/{ThZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc0cTgR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk0yXVZ&n`Oz%Tz{1f{!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk1mVaR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk2ZV%oZ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc2wTzR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To3_W%pZ&n`O!_%T!_!`-Q!`!a3w!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Td4OT&{S&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk4fX!fQ&n`O!O%T!O!P5R!P!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5WV&n`O!O%T!O!P5m!P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5tT!rZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti6[a!hX&n`O!Q%T!Q![6T![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S6T#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti7fZ&n`O{%T{|8X|}%T}!O8X!O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8^V&n`O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8z]!hX&n`O!Q%T!Q![8s![!l%T!l!m9s!m#R%T#R#S8s#S#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti9zT!hX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk:bX%qR&n`O!P%T!P!Q:}!Q!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj;UV%sQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti;ro!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!d%T!d!e?q!e!g%T!g!h7a!h!l%T!l!m9s!m!q%T!q!rA]!r!z%T!z!{Bq!{#R%T#R#S>_#S#U%T#U#V?q#V#X%T#X#Y7a#Y#^%T#^#_9s#_#c%T#c#dA]#d#l%T#l#mBq#m#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti=xV&n`O!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti>fc!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S>_#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti?vY&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti@mY!hX&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiAbX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBUX!hX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBv]&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiCv]!hX&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToDvV{_&n`O!_%T!_!`E]!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TcEdT%{R&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkEzT#gZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkFbXmR&n`O!^%T!^!_F}!_!`([!`!a([!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjGUV%mQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkGrV%zZ&n`O!_%T!_!`([!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkH`WmR&n`O!_%T!_!`([!`!aHx!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjIPV%nQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkIoV_Q#}P&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToJ_]&n`&YS%uZO!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoKZP;=`<%lJUoKge&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!tJU!t!uLx!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#gLx#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoMRa&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUkN_V&n`&`ZOr%TrsNts#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkNyV&n`Or%Trs! `s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! gT&n`&bZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! }V&n`&_ZOw%Twx!!dx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!!iV&n`Ow%Twx!#Ox#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!#VT&n`&aZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!#oe&n`&YS%uZOr%Trs!%Qsw%Twx!&px!Q%T!Q![JU![!c%T!c!tJU!t!u!(`!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#g!(`#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!%XV&n`&dZOr%Trs!%ns#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!%sV&n`Or%Trs!&Ys#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&aT&n`&fZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&wV&n`&cZOw%Twx!'^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!'cV&n`Ow%Twx!'xx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!(PT&n`&eZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!(ia&n`&YS%uZOr%Trs!)nsw%Twx!+^x!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!)uV&n`&hZOr%Trs!*[s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*aV&n`Or%Trs!*vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*}T&n`&jZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!+eV&n`&gZOw%Twx!+zx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,PV&n`Ow%Twx!,fx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,mT&n`&iZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!-Vi&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!dJU!d!eLx!e!hJU!h!i!(`!i!}JU!}#R%T#R#SJU#S#T%T#T#UJU#U#VLx#V#YJU#Y#Z!(`#Z#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUo!.}a&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!0ZT!XZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc!0qT!WR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj!1XV%kQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!1sO!]~k!1zV%jR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!2fO![~i!2mT%tX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T",tokenizers:[mre,hre,dre,_re,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:e=>vre[e]||-1}],tokenPrec:7664}),m2=new Yee,h8=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function rR(e){return(t,n,s)=>{if(s)return!1;let i=t.node.getChild("VariableName");return i&&n(i,e),!0}}const Ore={FunctionDefinition:rR("function"),ClassDefinition:rR("class"),ForStatement(e,t,n){if(n){for(let s=e.node.firstChild;s;s=s.nextSibling)if(s.name=="VariableName")t(s,"variable");else if(s.name=="in")break}},ImportStatement(e,t){var n,s;let{node:i}=e,r=((n=i.firstChild)===null||n===void 0?void 0:n.name)=="from";for(let a=i.getChild("import");a;a=a.nextSibling)a.name=="VariableName"&&((s=a.nextSibling)===null||s===void 0?void 0:s.name)!="as"&&t(a,r?"variable":"namespace")},AssignStatement(e,t){for(let n=e.node.firstChild;n;n=n.nextSibling)if(n.name=="VariableName")t(n,"variable");else if(n.name==":"||n.name=="AssignOp")break},ParamList(e,t){for(let n=null,s=e.node.firstChild;s;s=s.nextSibling)s.name=="VariableName"&&(!n||!/\*|AssignOp/.test(n.name))&&t(s,"variable"),n=s},CapturePattern:rR("variable"),AsPattern:rR("variable"),__proto__:null};function f8(e,t){let n=m2.get(t);if(n)return n;let s=[],i=!0;function r(a,c){let u=e.sliceString(a.from,a.to);s.push({label:u,type:c})}return t.cursor($i.IncludeAnonymous).iterate(a=>{if(a.name){let c=Ore[a.name];if(c&&c(a,r,i)||!i&&h8.has(a.name))return!1;i=!1}else if(a.to-a.from>8192){for(let c of f8(e,a.node))s.push(c);return!1}}),m2.set(t,s),s}const _2=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,p8=["String","FormatString","Comment","PropertyName"];function Sre(e){let t=Vi(e.state).resolveInner(e.pos,-1);if(p8.indexOf(t.name)>-1)return null;let n=t.name=="VariableName"||t.to-t.from<20&&_2.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let s=[];for(let i=t;i;i=i.parent)h8.has(i.name)&&(s=s.concat(f8(e.state.doc,i)));return{options:s,from:n?t.from:e.pos,validFor:_2}}const yre=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(e=>({label:e,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(e=>({label:e,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(e=>({label:e,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(e=>({label:e,type:"function"}))),$re=[qd("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),qd("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),qd("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),qd("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),qd(`if \${}:
  1843. `,{label:"if",detail:"block",type:"keyword"}),qd("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),qd("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),qd("import ${module}",{label:"import",detail:"statement",type:"keyword"}),qd("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],Ire=Poe(p8,Gz(yre.concat($re)));function T2(e){let{node:t,pos:n}=e,s=e.lineIndent(n,-1),i=null;for(;;){let r=t.childBefore(n);if(r)if(r.name=="Comment")n=r.from;else if(r.name=="Body")e.baseIndentFor(r)+e.unit<=s&&(i=r),t=r;else if(r.type.is("Statement"))t=r;else break;else break}return i}function E2(e,t){let n=e.baseIndentFor(t),s=e.lineAt(e.pos,-1),i=s.from+s.text.length;return/^\s*($|#)/.test(s.text)&&e.node.to<i+100&&!/\S/.test(e.state.sliceDoc(i,e.node.to))&&e.lineIndent(e.pos,-1)<=n||/^\s*(else:|elif |except |finally:)/.test(e.textAfter)&&e.lineIndent(e.pos,-1)>n?null:n+e.unit}const gw=nM.define({name:"python",parser:bre.configure({props:[F4.add({Body:e=>{var t;let n=T2(e);return(t=E2(e,n||e.node))!==null&&t!==void 0?t:e.continue()},IfStatement:e=>/^\s*(else:|elif )/.test(e.textAfter)?e.baseIndent:e.continue(),"ForStatement WhileStatement":e=>/^\s*else:/.test(e.textAfter)?e.baseIndent:e.continue(),TryStatement:e=>/^\s*(except |finally:|else:)/.test(e.textAfter)?e.baseIndent:e.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":nw({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":nw({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":nw({closing:"]"}),"String FormatString":()=>null,Script:e=>{var t;let n=T2(e);return(t=n&&E2(e,n))!==null&&t!==void 0?t:e.continue()}}),V4.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":Tte,Body:(e,t)=>({from:e.from+1,to:e.to-(e.to==t.doc.length?0:1)})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/}});function Rre(){return new lte(gw,[gw.data.of({autocomplete:Sre}),gw.data.of({autocomplete:Ire})])}var Cre=!1;/*!
  1844. * pinia v2.3.0
  1845. * (c) 2024 Eduardo San Martin Morote
  1846. * @license MIT
  1847. */let g8;const EA=e=>g8=e,m8=Symbol();function gN(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var YS;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(YS||(YS={}));function Mre(){const e=YM(!0),t=e.run(()=>K({}));let n=[],s=[];const i=zu({install(r){EA(i),i._a=r,r.provide(m8,i),r.config.globalProperties.$pinia=i,s.forEach(a=>n.push(a)),s=[]},use(r){return!this._a&&!Cre?s.push(r):n.push(r),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}const _8=()=>{};function v2(e,t,n,s=_8){e.push(t);const i=()=>{const r=e.indexOf(t);r>-1&&(e.splice(r,1),s())};return!n&&Z1()&&eP(i),i}function BT(e,...t){e.slice().forEach(n=>{n(...t)})}const Are=e=>e(),b2=Symbol(),mw=Symbol();function mN(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],i=e[n];gN(i)&&gN(s)&&e.hasOwnProperty(n)&&!po(s)&&!lp(s)?e[n]=mN(i,s):e[n]=s}return e}const Lre=Symbol();function wre(e){return!gN(e)||!e.hasOwnProperty(Lre)}const{assign:Vf}=Object;function kre(e){return!!(po(e)&&e.effect)}function Nre(e,t,n,s){const{state:i,actions:r,getters:a}=t,c=n.state.value[e];let u;function h(){c||(n.state.value[e]=i?i():{});const f=fi(n.state.value[e]);return Vf(f,r,Object.keys(a||{}).reduce((p,_)=>(p[_]=zu(x(()=>{EA(n);const E=n._s.get(e);return a[_].call(E,E)})),p),{}))}return u=T8(e,h,t,n,s,!0),u}function T8(e,t,n={},s,i,r){let a;const c=Vf({actions:{}},n),u={deep:!0};let h,f,p=[],_=[],E;const v=s.state.value[e];!r&&!v&&(s.state.value[e]={}),K({});let b;function y(P){let B;h=f=!1,typeof P=="function"?(P(s.state.value[e]),B={type:YS.patchFunction,storeId:e,events:E}):(mN(s.state.value[e],P),B={type:YS.patchObject,payload:P,storeId:e,events:E});const F=b=Symbol();Vt().then(()=>{b===F&&(h=!0)}),f=!0,BT(p,B,s.state.value[e])}const S=r?function(){const{state:B}=n,F=B?B():{};this.$patch(X=>{Vf(X,F)})}:_8;function L(){a.stop(),p=[],_=[],s._s.delete(e)}const I=(P,B="")=>{if(b2 in P)return P[mw]=B,P;const F=function(){EA(s);const X=Array.from(arguments),G=[],re=[];function _e(ae){G.push(ae)}function J(ae){re.push(ae)}BT(_,{args:X,name:F[mw],store:w,after:_e,onError:J});let Y;try{Y=P.apply(this&&this.$id===e?this:w,X)}catch(ae){throw BT(re,ae),ae}return Y instanceof Promise?Y.then(ae=>(BT(G,ae),ae)).catch(ae=>(BT(re,ae),Promise.reject(ae))):(BT(G,Y),Y)};return F[b2]=!0,F[mw]=B,F},R={_p:s,$id:e,$onAction:v2.bind(null,_),$patch:y,$reset:S,$subscribe(P,B={}){const F=v2(p,P,B.detached,()=>X()),X=a.run(()=>tt(()=>s.state.value[e],G=>{(B.flush==="sync"?f:h)&&P({storeId:e,type:YS.direct,events:E},G)},Vf({},u,B)));return F},$dispose:L},w=Kn(R);s._s.set(e,w);const D=(s._a&&s._a.runWithContext||Are)(()=>s._e.run(()=>(a=YM()).run(()=>t({action:I}))));for(const P in D){const B=D[P];if(po(B)&&!kre(B)||lp(B))r||(v&&wre(B)&&(po(B)?B.value=v[P]:mN(B,v[P])),s.state.value[e][P]=B);else if(typeof B=="function"){const F=I(B,P);D[P]=F,c.actions[P]=B}}return Vf(w,D),Vf(uo(w),D),Object.defineProperty(w,"$state",{get:()=>s.state.value[e],set:P=>{y(B=>{Vf(B,P)})}}),s._p.forEach(P=>{Vf(w,a.run(()=>P({store:w,app:s._a,pinia:s,options:c})))}),v&&r&&n.hydrate&&n.hydrate(w.$state,v),h=!0,f=!0,w}/*! #__NO_SIDE_EFFECTS__ */function Ah(e,t,n){let s,i;const r=typeof t=="function";typeof e=="string"?(s=e,i=r?n:t):(i=e,s=e.id);function a(c,u){const h=Zq();return c=c||(h?It(m8,null):null),c&&EA(c),c=g8,c._s.has(s)||(r?T8(s,t,i,c):Nre(s,i,c)),c._s.get(s)}return a.$id=s,a}const Pre=Ah("Xml",()=>{const e=K(""),t=x(()=>e);function n(){}return{xmlStr:e,doubleCount:t,increment:n}}),Dre=Ah("code",()=>{const e=K(""),t=x(()=>e);function n(){}return{pythonCode:e,doubleCount:t,increment:n}}),xre=Ah("fileName",()=>{const e=K(""),t=x(()=>e);function n(){}return{fileName:e,doubleCount:t,increment:n}}),Bre=Ah("workspace",()=>{const e=K(""),t=x(()=>e);function n(){}return{workspace:e,doubleCount:t,increment:n}}),Fre=Ah("status",()=>{const e=K(!1),t=x(()=>e);function n(){}return{status:e,doubleCount:t,increment:n}}),Pr={useyXmlStore:Pre,useyPythonCodeStore:Dre,useImportFileNameStore:xre,useWorkspaceStore:Bre,useLoadBlocklyStatus:Fre},Gl=(e,t)=>{const n=e.__vccOpts||e;for(const[s,i]of t)n[s]=i;return n},Ure={class:"codemirrorDiv"},Hre={key:0,class:"codeMirrorMask"},Vre={__name:"codemirror",props:{pythonCode:{type:String,require:!0,default:""},codeMirrorShow:{type:Boolean,require:!0,default:!0}},setup(e){let t=hn.theme({"&":{color:"#0052D9",backgroundColor:"#FFFFFF"},".cm-content":{caretColor:"#0052D9"},".cm-activeLineGutter":{backgroundColor:"#FAFAFA"},"&.cm-focused .cm-cursor":{borderLeftColor:"#FAFAFA"},"&.cm-focused .cm-selectionBackground, ::selection":{backgroundColor:"#FAFAFA",color:"#FFFFFF"},".cm-gutters":{backgroundColor:"#FFFFFF",color:"#ddd",border:"none"}},{dark:!1});const n=[Rre(),t],s=Pr.useyPythonCodeStore(),i=r=>{s.pythonCode=r};return(r,a)=>(H(),le("div",Ure,[oe(g(Zse),{ref:"mirrorContent",modelValue:e.pythonCode,placeholder:"",style:{height:"100%"},autofocus:!1,tabSize:2,extensions:n,"indent-with-tab":!0,"onUpdate:modelValue":i},null,8,["modelValue"]),e.codeMirrorShow?(H(),le("div",Hre)):Ge("",!0)]))}},Gre=Gl(Vre,[["__scopeId","data-v-98e5cecc"]]),Wre=Ah("device",()=>{const e=K({id:"",status:!1,type:"",device:{}}),t=s=>{e.value=s},n=x(()=>e.value);return{devices:e,setDevice:t,getDevice:n}}),Xre=Ah("uploader",()=>{const e=K({id:"",status:!1,version:""}),t=s=>{e.value=s},n=x(()=>e.value);return{uploaders:e,setUploader:t,getUploader:n}}),zre=Ah("print",()=>({data:K([])})),sC={useDeveics:Wre,useUploaders:Xre,usePrintData:zre},Yre="/assets/uploader_connect-sVrKA9OK.png",Kre="/assets/uploader_disconnect-DxZCseJL.png",jre="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAABYCAYAAABxlTA0AAADK0lEQVR4nO2dS2sVMRiGX1tBvGtdiC4Et6K1KG7cFMGFS8G1CKIuRbRLBQWxFfFS/B+CC1dVOCLqRhBEFBdabztRRC1VtCqBDAzTM8lkki8nM/M+kNVkki/PySRpTjoHhBBCCCGtZCWAdwC+GdKRlBu+NIEYTAwB2GLJs3qwIZoZSjk4AP8AfLHk+RkpllqkLrjxULAwFCwMBQtDwcJQsDAULAwFC0PBwlCwMBQsDAULQ8HCULAwFCwMBQtDwcJQsDAULAwFC0PBwlCwMBQsDAULQ8HCULAwFCwMBQsTW/Du6C1czBiAdbEqiyl4AsATAFMR6yyyDcBTAI8GGIMIp/RR1CxdqFjJKgCfC/cW07GKZW0HMJ+7935CfrwoynWRHErwmD4hX7z3wQC9BOGkRc45SyUhBO8E8N1wfyN78jCA0xYxWTprKMdX8A59At4WQw/ARgEPYhyoKDdLkyWB+AhWPfePQwy3miRYLYNuBpBcV/CuwoRmS7MARiN4Cc4VR8kXCwHUEbwHwJxDna8BjDRRbsY1R8n51cWaCoKP5/KrnvurS3IzrteUrP6P76sl7wmdVz3iC45yNwxWS1hcJZ/RtX+w5FNr3OWOE5oac9e2RWyeq46S1UT53HD9L4BpS55+ctenoyQ8rhNfyPSmLWOuDdeJL0Rq3Zhr40bkntspuRkxJL+Nuf+bIlOCcl+2fUKryiUBua/0Cz2IJqTkF5TbnxCSZwAsS7FxqeAjeabr8qpyuYbce81oWjpMOsjtdV1WXaoMF5Triakn3009+CWW6+cN137rv8TmAsfUjwk9LucPyqjv0A5FqFtxUG+LlqEOs9yuU7Dt8dwUtBlmtgI4DOAogP0R64WeQE0eSp8knzf/zetN7ljM6jQI3lvqLL3O05XCULAwFCwMBQvjI1jNnp8a0Up/ai9FfVYR6oDf3gqvn20Dm+u2wUew2hJ82EqdAeEYLAwFC0PBYSjd06HgMJS+qJ+Cw/C4rJRhS/HqAxhPsEEp8UwfAl/oF5NNcE8faB7l1+CLUCc77wDYZ9pVtG24Z6yo8IMhXeMHgI9dl0AIIYQQ0kQA/AemkXIYwdr1wAAAAABJRU5ErkJggg==",Qre="/assets/firmware-BqDdm6y3.png",qre="/assets/device-detect-DaNVZ8Tx.svg";var AS={exports:{}};/*!
  1848. * Platform.js v1.3.6
  1849. * Copyright 2014-2020 Benjamin Tan
  1850. * Copyright 2011-2013 John-David Dalton
  1851. * Available under MIT license
  1852. */var Jre=AS.exports,O2;function Zre(){return O2||(O2=1,function(e,t){(function(){var n={function:!0,object:!0},s=n[typeof window]&&window||this,i=t,r=!e.nodeType&&e,a=i&&r&&typeof ep=="object"&&ep;a&&(a.global===a||a.window===a||a.self===a)&&(s=a);var c=Math.pow(2,53)-1,u=/\bOpera/,h=Object.prototype,f=h.hasOwnProperty,p=h.toString;function _(P){return P=String(P),P.charAt(0).toUpperCase()+P.slice(1)}function E(P,B,F){var X={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return B&&F&&/^Win/i.test(P)&&!/^Windows Phone /i.test(P)&&(X=X[/[\d.]+$/.exec(P)])&&(P="Windows "+X),P=String(P),B&&F&&(P=P.replace(RegExp(B,"i"),F)),P=b(P.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),P}function v(P,B){var F=-1,X=P?P.length:0;if(typeof X=="number"&&X>-1&&X<=c)for(;++F<X;)B(P[F],F,P);else y(P,B)}function b(P){return P=w(P),/^(?:webOS|i(?:OS|P))/.test(P)?P:_(P)}function y(P,B){for(var F in P)f.call(P,F)&&B(P[F],F,P)}function S(P){return P==null?_(P):p.call(P).slice(8,-1)}function L(P,B){var F=P!=null?typeof P[B]:"number";return!/^(?:boolean|number|string|undefined)$/.test(F)&&(F=="object"?!!P[B]:!0)}function I(P){return String(P).replace(/([ -])(?!$)/g,"$1?")}function R(P,B){var F=null;return v(P,function(X,G){F=B(F,X,G,P)}),F}function w(P){return String(P).replace(/^ +| +$/g,"")}function k(P){var B=s,F=P&&typeof P=="object"&&S(P)!="String";F&&(B=P,P=null);var X=B.navigator||{},G=X.userAgent||"";P||(P=G);var re=F?!!X.likeChrome:/\bChrome\b/.test(P)&&!/internal|\n/i.test(p.toString()),_e="Object",J=F?_e:"ScriptBridgingProxyObject",Y=F?_e:"Environment",ae=F&&B.java?"JavaPackage":S(B.java),Z=F?_e:"RuntimeObject",Q=/\bJava/.test(ae)&&B.java,he=Q&&S(B.environment)==Y,ge=Q?"a":"α",Ie=Q?"b":"β",be=B.document||{},Ae=B.operamini||B.opera,We=u.test(We=F&&Ae?Ae["[[Class]]"]:S(Ae))?We:Ae=null,$e,ve=P,Pe=[],Be=null,ot=P==G,Xe=ot&&Ae&&typeof Ae.version=="function"&&Ae.version(),ee,pe=me([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Oe=Ue(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),ze=ct([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),Ze=Te({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}}),De=qe(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function me(ut){return R(ut,function(Mt,mt){return Mt||RegExp("\\b"+(mt.pattern||I(mt))+"\\b","i").exec(P)&&(mt.label||mt)})}function Te(ut){return R(ut,function(Mt,mt,qt){return Mt||(mt[ze]||mt[/^[a-z]+(?: +[a-z]+\b)*/i.exec(ze)]||RegExp("\\b"+I(qt)+"(?:\\b|\\w*\\d)","i").exec(P))&&qt})}function Ue(ut){return R(ut,function(Mt,mt){return Mt||RegExp("\\b"+(mt.pattern||I(mt))+"\\b","i").exec(P)&&(mt.label||mt)})}function qe(ut){return R(ut,function(Mt,mt){var qt=mt.pattern||I(mt);return!Mt&&(Mt=RegExp("\\b"+qt+"(?:/[\\d.]+|[ \\w.]*)","i").exec(P))&&(Mt=E(Mt,qt,mt.label||mt)),Mt})}function ct(ut){return R(ut,function(Mt,mt){var qt=mt.pattern||I(mt);return!Mt&&(Mt=RegExp("\\b"+qt+" *\\d+[.\\w_]*","i").exec(P)||RegExp("\\b"+qt+" *\\w+-[\\w]*","i").exec(P)||RegExp("\\b"+qt+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(P))&&((Mt=String(mt.label&&!RegExp(qt,"i").test(mt.label)?mt.label:Mt).split("/"))[1]&&!/[\d.]+/.test(Mt[0])&&(Mt[0]+=" "+Mt[1]),mt=mt.label||mt,Mt=b(Mt[0].replace(RegExp(qt,"i"),mt).replace(RegExp("; *(?:"+mt+"[_-])?","i")," ").replace(RegExp("("+mt+")[-_.]?(\\w)","i"),"$1 $2"))),Mt})}function Ne(ut){return R(ut,function(Mt,mt){return Mt||(RegExp(mt+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(P)||0)[1]||null})}function Se(){return this.description||""}if(pe&&(pe=[pe]),/\bAndroid\b/.test(De)&&!ze&&($e=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(P))&&(ze=w($e[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),Ze&&!ze?ze=ct([Ze]):Ze&&ze&&(ze=ze.replace(RegExp("^("+I(Ze)+")[-_.\\s]","i"),Ze+" ").replace(RegExp("^("+I(Ze)+")[-_.]?(\\w)","i"),Ze+" $2")),($e=/\bGoogle TV\b/.exec(ze))&&(ze=$e[0]),/\bSimulator\b/i.test(P)&&(ze=(ze?ze+" ":"")+"Simulator"),Oe=="Opera Mini"&&/\bOPiOS\b/.test(P)&&Pe.push("running in Turbo/Uncompressed mode"),Oe=="IE"&&/\blike iPhone OS\b/.test(P)?($e=k(P.replace(/like iPhone OS/,"")),Ze=$e.manufacturer,ze=$e.product):/^iP/.test(ze)?(Oe||(Oe="Safari"),De="iOS"+(($e=/ OS ([\d_]+)/i.exec(P))?" "+$e[1].replace(/_/g,"."):"")):Oe=="Konqueror"&&/^Linux\b/i.test(De)?De="Kubuntu":Ze&&Ze!="Google"&&(/Chrome/.test(Oe)&&!/\bMobile Safari\b/i.test(P)||/\bVita\b/.test(ze))||/\bAndroid\b/.test(De)&&/^Chrome/.test(Oe)&&/\bVersion\//i.test(P)?(Oe="Android Browser",De=/\bAndroid\b/.test(De)?De:"Android"):Oe=="Silk"?(/\bMobi/i.test(P)||(De="Android",Pe.unshift("desktop mode")),/Accelerated *= *true/i.test(P)&&Pe.unshift("accelerated")):Oe=="UC Browser"&&/\bUCWEB\b/.test(P)?Pe.push("speed mode"):Oe=="PaleMoon"&&($e=/\bFirefox\/([\d.]+)\b/.exec(P))?Pe.push("identifying as Firefox "+$e[1]):Oe=="Firefox"&&($e=/\b(Mobile|Tablet|TV)\b/i.exec(P))?(De||(De="Firefox OS"),ze||(ze=$e[1])):!Oe||($e=!/\bMinefield\b/i.test(P)&&/\b(?:Firefox|Safari)\b/.exec(Oe))?(Oe&&!ze&&/[\/,]|^[^(]+?\)/.test(P.slice(P.indexOf($e+"/")+8))&&(Oe=null),($e=ze||Ze||De)&&(ze||Ze||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(De))&&(Oe=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(De)?De:$e)+" Browser")):Oe=="Electron"&&($e=(/\bChrome\/([\d.]+)\b/.exec(P)||0)[1])&&Pe.push("Chromium "+$e),Xe||(Xe=Ne(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",I(Oe),"(?:Firefox|Minefield|NetFront)"])),($e=pe=="iCab"&&parseFloat(Xe)>3&&"WebKit"||/\bOpera\b/.test(Oe)&&(/\bOPR\b/.test(P)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(P)&&!/^(?:Trident|EdgeHTML)$/.test(pe)&&"WebKit"||!pe&&/\bMSIE\b/i.test(P)&&(De=="Mac OS"?"Tasman":"Trident")||pe=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Oe)&&"NetFront")&&(pe=[$e]),Oe=="IE"&&($e=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(P)||0)[1])?(Oe+=" Mobile",De="Windows Phone "+(/\+$/.test($e)?$e:$e+".x"),Pe.unshift("desktop mode")):/\bWPDesktop\b/i.test(P)?(Oe="IE Mobile",De="Windows Phone 8.x",Pe.unshift("desktop mode"),Xe||(Xe=(/\brv:([\d.]+)/.exec(P)||0)[1])):Oe!="IE"&&pe=="Trident"&&($e=/\brv:([\d.]+)/.exec(P))&&(Oe&&Pe.push("identifying as "+Oe+(Xe?" "+Xe:"")),Oe="IE",Xe=$e[1]),ot){if(L(B,"global"))if(Q&&($e=Q.lang.System,ve=$e.getProperty("os.arch"),De=De||$e.getProperty("os.name")+" "+$e.getProperty("os.version")),he){try{Xe=B.require("ringo/engine").version.join("."),Oe="RingoJS"}catch{($e=B.system)&&$e.global.system==B.system&&(Oe="Narwhal",De||(De=$e[0].os||null))}Oe||(Oe="Rhino")}else typeof B.process=="object"&&!B.process.browser&&($e=B.process)&&(typeof $e.versions=="object"&&(typeof $e.versions.electron=="string"?(Pe.push("Node "+$e.versions.node),Oe="Electron",Xe=$e.versions.electron):typeof $e.versions.nw=="string"&&(Pe.push("Chromium "+Xe,"Node "+$e.versions.node),Oe="NW.js",Xe=$e.versions.nw)),Oe||(Oe="Node.js",ve=$e.arch,De=$e.platform,Xe=/[\d.]+/.exec($e.version),Xe=Xe?Xe[0]:null));else S($e=B.runtime)==J?(Oe="Adobe AIR",De=$e.flash.system.Capabilities.os):S($e=B.phantom)==Z?(Oe="PhantomJS",Xe=($e=$e.version||null)&&$e.major+"."+$e.minor+"."+$e.patch):typeof be.documentMode=="number"&&($e=/\bTrident\/(\d+)/i.exec(P))?(Xe=[Xe,be.documentMode],($e=+$e[1]+4)!=Xe[1]&&(Pe.push("IE "+Xe[1]+" mode"),pe&&(pe[1]=""),Xe[1]=$e),Xe=Oe=="IE"?String(Xe[1].toFixed(1)):Xe[0]):typeof be.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Oe)&&(Pe.push("masking as "+Oe+" "+Xe),Oe="IE",Xe="11.0",pe=["Trident"],De="Windows");De=De&&b(De)}if(Xe&&($e=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(Xe)||/(?:alpha|beta)(?: ?\d)?/i.exec(P+";"+(ot&&X.appMinorVersion))||/\bMinefield\b/i.test(P)&&"a")&&(Be=/b/i.test($e)?"beta":"alpha",Xe=Xe.replace(RegExp($e+"\\+?$"),"")+(Be=="beta"?Ie:ge)+(/\d+\+?/.exec($e)||"")),Oe=="Fennec"||Oe=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(De))Oe="Firefox Mobile";else if(Oe=="Maxthon"&&Xe)Xe=Xe.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(ze))ze=="Xbox 360"&&(De=null),ze=="Xbox 360"&&/\bIEMobile\b/.test(P)&&Pe.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Oe)||Oe&&!ze&&!/Browser|Mobi/.test(Oe))&&(De=="Windows CE"||/Mobi/i.test(P)))Oe+=" Mobile";else if(Oe=="IE"&&ot)try{B.external===null&&Pe.unshift("platform preview")}catch{Pe.unshift("embedded")}else(/\bBlackBerry\b/.test(ze)||/\bBB10\b/.test(P))&&($e=(RegExp(ze.replace(/ +/g," *")+"/([.\\d]+)","i").exec(P)||0)[1]||Xe)?($e=[$e,/BB10/.test(P)],De=($e[1]?(ze=null,Ze="BlackBerry"):"Device Software")+" "+$e[0],Xe=null):this!=y&&ze!="Wii"&&(ot&&Ae||/Opera/.test(Oe)&&/\b(?:MSIE|Firefox)\b/i.test(P)||Oe=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(De)||Oe=="IE"&&(De&&!/^Win/.test(De)&&Xe>5.5||/\bWindows XP\b/.test(De)&&Xe>8||Xe==8&&!/\bTrident\b/.test(P)))&&!u.test($e=k.call(y,P.replace(u,"")+";"))&&$e.name&&($e="ing as "+$e.name+(($e=$e.version)?" "+$e:""),u.test(Oe)?(/\bIE\b/.test($e)&&De=="Mac OS"&&(De=null),$e="identify"+$e):($e="mask"+$e,We?Oe=b(We.replace(/([a-z])([A-Z])/g,"$1 $2")):Oe="Opera",/\bIE\b/.test($e)&&(De=null),ot||(Xe=null)),pe=["Presto"],Pe.push($e));($e=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(P)||0)[1])&&($e=[parseFloat($e.replace(/\.(\d)$/,".0$1")),$e],Oe=="Safari"&&$e[1].slice(-1)=="+"?(Oe="WebKit Nightly",Be="alpha",Xe=$e[1].slice(0,-1)):(Xe==$e[1]||Xe==($e[2]=(/\bSafari\/([\d.]+\+?)/i.exec(P)||0)[1]))&&(Xe=null),$e[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(P)||0)[1],$e[0]==537.36&&$e[2]==537.36&&parseFloat($e[1])>=28&&pe=="WebKit"&&(pe=["Blink"]),!ot||!re&&!$e[1]?(pe&&(pe[1]="like Safari"),$e=($e=$e[0],$e<400?1:$e<500?2:$e<526?3:$e<533?4:$e<534?"4+":$e<535?5:$e<537?6:$e<538?7:$e<601?8:$e<602?9:$e<604?10:$e<606?11:$e<608?12:"12")):(pe&&(pe[1]="like Chrome"),$e=$e[1]||($e=$e[0],$e<530?1:$e<532?2:$e<532.05?3:$e<533?4:$e<534.03?5:$e<534.07?6:$e<534.1?7:$e<534.13?8:$e<534.16?9:$e<534.24?10:$e<534.3?11:$e<535.01?12:$e<535.02?"13+":$e<535.07?15:$e<535.11?16:$e<535.19?17:$e<536.05?18:$e<536.1?19:$e<537.01?20:$e<537.11?"21+":$e<537.13?23:$e<537.18?24:$e<537.24?25:$e<537.36?26:pe!="Blink"?"27":"28")),pe&&(pe[1]+=" "+($e+=typeof $e=="number"?".x":/[.+]/.test($e)?"":"+")),Oe=="Safari"&&(!Xe||parseInt(Xe)>45)?Xe=$e:Oe=="Chrome"&&/\bHeadlessChrome/i.test(P)&&Pe.unshift("headless")),Oe=="Opera"&&($e=/\bzbov|zvav$/.exec(De))?(Oe+=" ",Pe.unshift("desktop mode"),$e=="zvav"?(Oe+="Mini",Xe=null):Oe+="Mobile",De=De.replace(RegExp(" *"+$e+"$"),"")):Oe=="Safari"&&/\bChrome\b/.exec(pe&&pe[1])?(Pe.unshift("desktop mode"),Oe="Chrome Mobile",Xe=null,/\bOS X\b/.test(De)?(Ze="Apple",De="iOS 4.3+"):De=null):/\bSRWare Iron\b/.test(Oe)&&!Xe&&(Xe=Ne("Chrome")),Xe&&Xe.indexOf($e=/[\d.]+$/.exec(De))==0&&P.indexOf("/"+$e+"-")>-1&&(De=w(De.replace($e,""))),De&&De.indexOf(Oe)!=-1&&!RegExp(Oe+" OS").test(De)&&(De=De.replace(RegExp(" *"+I(Oe)+" *"),"")),pe&&!/\b(?:Avant|Nook)\b/.test(Oe)&&(/Browser|Lunascape|Maxthon/.test(Oe)||Oe!="Safari"&&/^iOS/.test(De)&&/\bSafari\b/.test(pe[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(Oe)&&pe[1])&&($e=pe[pe.length-1])&&Pe.push($e),Pe.length&&(Pe=["("+Pe.join("; ")+")"]),Ze&&ze&&ze.indexOf(Ze)<0&&Pe.push("on "+Ze),ze&&Pe.push((/^on /.test(Pe[Pe.length-1])?"":"on ")+ze),De&&($e=/ ([\d.+]+)$/.exec(De),ee=$e&&De.charAt(De.length-$e[0].length-1)=="/",De={architecture:32,family:$e&&!ee?De.replace($e[0],""):De,version:$e?$e[1]:null,toString:function(){var ut=this.version;return this.family+(ut&&!ee?" "+ut:"")+(this.architecture==64?" 64-bit":"")}}),($e=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(ve))&&!/\bi686\b/i.test(ve)?(De&&(De.architecture=64,De.family=De.family.replace(RegExp(" *"+$e),"")),Oe&&(/\bWOW64\b/i.test(P)||ot&&/\w(?:86|32)$/.test(X.cpuClass||X.platform)&&!/\bWin64; x64\b/i.test(P))&&Pe.unshift("32-bit")):De&&/^OS X/.test(De.family)&&Oe=="Chrome"&&parseFloat(Xe)>=39&&(De.architecture=64),P||(P=null);var Je={};return Je.description=P,Je.layout=pe&&pe[0],Je.manufacturer=Ze,Je.name=Oe,Je.prerelease=Be,Je.product=ze,Je.ua=P,Je.version=Oe&&Xe,Je.os=De||{architecture:null,family:null,version:null,toString:function(){return"null"}},Je.parse=k,Je.toString=Se,Je.version&&Pe.unshift(Xe),Je.name&&Pe.unshift(Oe),De&&Oe&&!(De==String(De).split(" ")[0]&&(De==Oe.split(" ")[0]||ze))&&Pe.push(ze?"("+De+")":"on "+De),Pe.length&&(Je.description=Pe.join(" ")),Je}var D=k();i&&r?y(D,function(P,B){i[B]=P}):s.platform=D}).call(Jre)}(AS,AS.exports)),AS.exports}var ele=Zre();const za=Qc(ele),_N={host:"https://api.cocorobo.cn/",uploader:"1.1.0"};/*!
  1853. * shared v11.0.0-rc.1
  1854. * (c) 2024 kazuya kawaguchi
  1855. * Released under the MIT License.
  1856. */const TM=typeof window<"u",Lp=(e,t=!1)=>t?Symbol.for(e):Symbol(e),tle=(e,t,n)=>nle({l:e,k:t,s:n}),nle=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),ci=e=>typeof e=="number"&&isFinite(e),ole=e=>oD(e)==="[object Date]",PE=e=>oD(e)==="[object RegExp]",vA=e=>Oo(e)&&Object.keys(e).length===0,Ci=Object.assign,sle=Object.create,ss=(e=null)=>sle(e);let S2;const cm=()=>S2||(S2=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:ss());function y2(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const ile=Object.prototype.hasOwnProperty;function xc(e,t){return ile.call(e,t)}const di=Array.isArray,Is=e=>typeof e=="function",vn=e=>typeof e=="string",Do=e=>typeof e=="boolean",Uo=e=>e!==null&&typeof e=="object",rle=e=>Uo(e)&&Is(e.then)&&Is(e.catch),E8=Object.prototype.toString,oD=e=>E8.call(e),Oo=e=>oD(e)==="[object Object]",lle=e=>e==null?"":di(e)||Oo(e)&&e.toString===E8?JSON.stringify(e,null,2):String(e);function sD(e,t=""){return e.reduce((n,s,i)=>i===0?n+s:n+t+s,"")}function ale(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const lR=e=>!Uo(e)||di(e);function iC(e,t){if(lR(e)||lR(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:s,des:i}=n.pop();Object.keys(s).forEach(r=>{r!=="__proto__"&&(Uo(s[r])&&!Uo(i[r])&&(i[r]=Array.isArray(s[r])?[]:ss()),lR(i[r])||lR(s[r])?i[r]=s[r]:n.push({src:s[r],des:i[r]}))})}}/*!
  1857. * message-compiler v11.0.0-rc.1
  1858. * (c) 2024 kazuya kawaguchi
  1859. * Released under the MIT License.
  1860. */function cle(e,t,n){return{line:e,column:t,offset:n}}function TN(e,t,n){return{start:e,end:t}}const qo={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16},ule=17;function bA(e,t,n={}){const{domain:s,messages:i,args:r}=n,a=e,c=new SyntaxError(String(a));return c.code=e,t&&(c.location=t),c.domain=s,c}function dle(e){throw e}const Jd=" ",hle="\r",qr=`
  1861. `,fle="\u2028",ple="\u2029";function gle(e){const t=e;let n=0,s=1,i=1,r=0;const a=D=>t[D]===hle&&t[D+1]===qr,c=D=>t[D]===qr,u=D=>t[D]===ple,h=D=>t[D]===fle,f=D=>a(D)||c(D)||u(D)||h(D),p=()=>n,_=()=>s,E=()=>i,v=()=>r,b=D=>a(D)||u(D)||h(D)?qr:t[D],y=()=>b(n),S=()=>b(n+r);function L(){return r=0,f(n)&&(s++,i=0),a(n)&&n++,n++,i++,t[n]}function I(){return a(n+r)&&r++,r++,t[n+r]}function R(){n=0,s=1,i=1,r=0}function w(D=0){r=D}function k(){const D=n+r;for(;D!==n;)L();r=0}return{index:p,line:_,column:E,peekOffset:v,charAt:b,currentChar:y,currentPeek:S,next:L,peek:I,reset:R,resetPeek:w,skipToPeek:k}}const Bf=void 0,mle=".",$2="'",_le="tokenizer";function Tle(e,t={}){const n=t.location!==!1,s=gle(e),i=()=>s.index(),r=()=>cle(s.line(),s.column(),s.index()),a=r(),c=i(),u={currentType:13,offset:c,startLoc:a,endLoc:a,lastType:13,lastOffset:c,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},h=()=>u,{onError:f}=t;function p(me,Te,Ue,...qe){const ct=h();if(Te.column+=Ue,Te.offset+=Ue,f){const Ne=n?TN(ct.startLoc,Te):null,Se=bA(me,Ne,{domain:_le,args:qe});f(Se)}}function _(me,Te,Ue){me.endLoc=r(),me.currentType=Te;const qe={type:Te};return n&&(qe.loc=TN(me.startLoc,me.endLoc)),Ue!=null&&(qe.value=Ue),qe}const E=me=>_(me,13);function v(me,Te){return me.currentChar()===Te?(me.next(),Te):(p(qo.EXPECTED_TOKEN,r(),0,Te),"")}function b(me){let Te="";for(;me.currentPeek()===Jd||me.currentPeek()===qr;)Te+=me.currentPeek(),me.peek();return Te}function y(me){const Te=b(me);return me.skipToPeek(),Te}function S(me){if(me===Bf)return!1;const Te=me.charCodeAt(0);return Te>=97&&Te<=122||Te>=65&&Te<=90||Te===95}function L(me){if(me===Bf)return!1;const Te=me.charCodeAt(0);return Te>=48&&Te<=57}function I(me,Te){const{currentType:Ue}=Te;if(Ue!==2)return!1;b(me);const qe=S(me.currentPeek());return me.resetPeek(),qe}function R(me,Te){const{currentType:Ue}=Te;if(Ue!==2)return!1;b(me);const qe=me.currentPeek()==="-"?me.peek():me.currentPeek(),ct=L(qe);return me.resetPeek(),ct}function w(me,Te){const{currentType:Ue}=Te;if(Ue!==2)return!1;b(me);const qe=me.currentPeek()===$2;return me.resetPeek(),qe}function k(me,Te){const{currentType:Ue}=Te;if(Ue!==7)return!1;b(me);const qe=me.currentPeek()===".";return me.resetPeek(),qe}function D(me,Te){const{currentType:Ue}=Te;if(Ue!==8)return!1;b(me);const qe=S(me.currentPeek());return me.resetPeek(),qe}function P(me,Te){const{currentType:Ue}=Te;if(!(Ue===7||Ue===11))return!1;b(me);const qe=me.currentPeek()===":";return me.resetPeek(),qe}function B(me,Te){const{currentType:Ue}=Te;if(Ue!==9)return!1;const qe=()=>{const Ne=me.currentPeek();return Ne==="{"?S(me.peek()):Ne==="@"||Ne==="|"||Ne===":"||Ne==="."||Ne===Jd||!Ne?!1:Ne===qr?(me.peek(),qe()):X(me,!1)},ct=qe();return me.resetPeek(),ct}function F(me){b(me);const Te=me.currentPeek()==="|";return me.resetPeek(),Te}function X(me,Te=!0){const Ue=(ct=!1,Ne="")=>{const Se=me.currentPeek();return Se==="{"||Se==="@"||!Se?ct:Se==="|"?!(Ne===Jd||Ne===qr):Se===Jd?(me.peek(),Ue(!0,Jd)):Se===qr?(me.peek(),Ue(!0,qr)):!0},qe=Ue();return Te&&me.resetPeek(),qe}function G(me,Te){const Ue=me.currentChar();return Ue===Bf?Bf:Te(Ue)?(me.next(),Ue):null}function re(me){const Te=me.charCodeAt(0);return Te>=97&&Te<=122||Te>=65&&Te<=90||Te>=48&&Te<=57||Te===95||Te===36}function _e(me){return G(me,re)}function J(me){const Te=me.charCodeAt(0);return Te>=97&&Te<=122||Te>=65&&Te<=90||Te>=48&&Te<=57||Te===95||Te===36||Te===45}function Y(me){return G(me,J)}function ae(me){const Te=me.charCodeAt(0);return Te>=48&&Te<=57}function Z(me){return G(me,ae)}function Q(me){const Te=me.charCodeAt(0);return Te>=48&&Te<=57||Te>=65&&Te<=70||Te>=97&&Te<=102}function he(me){return G(me,Q)}function ge(me){let Te="",Ue="";for(;Te=Z(me);)Ue+=Te;return Ue}function Ie(me){let Te="";for(;;){const Ue=me.currentChar();if(Ue==="{"||Ue==="}"||Ue==="@"||Ue==="|"||!Ue)break;if(Ue===Jd||Ue===qr)if(X(me))Te+=Ue,me.next();else{if(F(me))break;Te+=Ue,me.next()}else Te+=Ue,me.next()}return Te}function be(me){y(me);let Te="",Ue="";for(;Te=Y(me);)Ue+=Te;return me.currentChar()===Bf&&p(qo.UNTERMINATED_CLOSING_BRACE,r(),0),Ue}function Ae(me){y(me);let Te="";return me.currentChar()==="-"?(me.next(),Te+=`-${ge(me)}`):Te+=ge(me),me.currentChar()===Bf&&p(qo.UNTERMINATED_CLOSING_BRACE,r(),0),Te}function We(me){return me!==$2&&me!==qr}function $e(me){y(me),v(me,"'");let Te="",Ue="";for(;Te=G(me,We);)Te==="\\"?Ue+=ve(me):Ue+=Te;const qe=me.currentChar();return qe===qr||qe===Bf?(p(qo.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,r(),0),qe===qr&&(me.next(),v(me,"'")),Ue):(v(me,"'"),Ue)}function ve(me){const Te=me.currentChar();switch(Te){case"\\":case"'":return me.next(),`\\${Te}`;case"u":return Pe(me,Te,4);case"U":return Pe(me,Te,6);default:return p(qo.UNKNOWN_ESCAPE_SEQUENCE,r(),0,Te),""}}function Pe(me,Te,Ue){v(me,Te);let qe="";for(let ct=0;ct<Ue;ct++){const Ne=he(me);if(!Ne){p(qo.INVALID_UNICODE_ESCAPE_SEQUENCE,r(),0,`\\${Te}${qe}${me.currentChar()}`);break}qe+=Ne}return`\\${Te}${qe}`}function Be(me){return me!=="{"&&me!=="}"&&me!==Jd&&me!==qr}function ot(me){y(me);let Te="",Ue="";for(;Te=G(me,Be);)Ue+=Te;return Ue}function Xe(me){let Te="",Ue="";for(;Te=_e(me);)Ue+=Te;return Ue}function ee(me){const Te=Ue=>{const qe=me.currentChar();return qe==="{"||qe==="@"||qe==="|"||qe==="("||qe===")"||!qe||qe===Jd?Ue:(Ue+=qe,me.next(),Te(Ue))};return Te("")}function pe(me){y(me);const Te=v(me,"|");return y(me),Te}function Oe(me,Te){let Ue=null;switch(me.currentChar()){case"{":return Te.braceNest>=1&&p(qo.NOT_ALLOW_NEST_PLACEHOLDER,r(),0),me.next(),Ue=_(Te,2,"{"),y(me),Te.braceNest++,Ue;case"}":return Te.braceNest>0&&Te.currentType===2&&p(qo.EMPTY_PLACEHOLDER,r(),0),me.next(),Ue=_(Te,3,"}"),Te.braceNest--,Te.braceNest>0&&y(me),Te.inLinked&&Te.braceNest===0&&(Te.inLinked=!1),Ue;case"@":return Te.braceNest>0&&p(qo.UNTERMINATED_CLOSING_BRACE,r(),0),Ue=ze(me,Te)||E(Te),Te.braceNest=0,Ue;default:{let ct=!0,Ne=!0,Se=!0;if(F(me))return Te.braceNest>0&&p(qo.UNTERMINATED_CLOSING_BRACE,r(),0),Ue=_(Te,1,pe(me)),Te.braceNest=0,Te.inLinked=!1,Ue;if(Te.braceNest>0&&(Te.currentType===4||Te.currentType===5||Te.currentType===6))return p(qo.UNTERMINATED_CLOSING_BRACE,r(),0),Te.braceNest=0,Ze(me,Te);if(ct=I(me,Te))return Ue=_(Te,4,be(me)),y(me),Ue;if(Ne=R(me,Te))return Ue=_(Te,5,Ae(me)),y(me),Ue;if(Se=w(me,Te))return Ue=_(Te,6,$e(me)),y(me),Ue;if(!ct&&!Ne&&!Se)return Ue=_(Te,12,ot(me)),p(qo.INVALID_TOKEN_IN_PLACEHOLDER,r(),0,Ue.value),y(me),Ue;break}}return Ue}function ze(me,Te){const{currentType:Ue}=Te;let qe=null;const ct=me.currentChar();switch((Ue===7||Ue===8||Ue===11||Ue===9)&&(ct===qr||ct===Jd)&&p(qo.INVALID_LINKED_FORMAT,r(),0),ct){case"@":return me.next(),qe=_(Te,7,"@"),Te.inLinked=!0,qe;case".":return y(me),me.next(),_(Te,8,".");case":":return y(me),me.next(),_(Te,9,":");default:return F(me)?(qe=_(Te,1,pe(me)),Te.braceNest=0,Te.inLinked=!1,qe):k(me,Te)||P(me,Te)?(y(me),ze(me,Te)):D(me,Te)?(y(me),_(Te,11,Xe(me))):B(me,Te)?(y(me),ct==="{"?Oe(me,Te)||qe:_(Te,10,ee(me))):(Ue===7&&p(qo.INVALID_LINKED_FORMAT,r(),0),Te.braceNest=0,Te.inLinked=!1,Ze(me,Te))}}function Ze(me,Te){let Ue={type:13};if(Te.braceNest>0)return Oe(me,Te)||E(Te);if(Te.inLinked)return ze(me,Te)||E(Te);switch(me.currentChar()){case"{":return Oe(me,Te)||E(Te);case"}":return p(qo.UNBALANCED_CLOSING_BRACE,r(),0),me.next(),_(Te,3,"}");case"@":return ze(me,Te)||E(Te);default:{if(F(me))return Ue=_(Te,1,pe(me)),Te.braceNest=0,Te.inLinked=!1,Ue;if(X(me))return _(Te,0,Ie(me));break}}return Ue}function De(){const{currentType:me,offset:Te,startLoc:Ue,endLoc:qe}=u;return u.lastType=me,u.lastOffset=Te,u.lastStartLoc=Ue,u.lastEndLoc=qe,u.offset=i(),u.startLoc=r(),s.currentChar()===Bf?_(u,13):Ze(s,u)}return{nextToken:De,currentOffset:i,currentPosition:r,context:h}}const Ele="parser",vle=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function ble(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const s=parseInt(t||n,16);return s<=55295||s>=57344?String.fromCodePoint(s):"�"}}}function Ole(e={}){const t=e.location!==!1,{onError:n}=e;function s(S,L,I,R,...w){const k=S.currentPosition();if(k.offset+=R,k.column+=R,n){const D=t?TN(I,k):null,P=bA(L,D,{domain:Ele,args:w});n(P)}}function i(S,L,I){const R={type:S};return t&&(R.start=L,R.end=L,R.loc={start:I,end:I}),R}function r(S,L,I,R){t&&(S.end=L,S.loc&&(S.loc.end=I))}function a(S,L){const I=S.context(),R=i(3,I.offset,I.startLoc);return R.value=L,r(R,S.currentOffset(),S.currentPosition()),R}function c(S,L){const I=S.context(),{lastOffset:R,lastStartLoc:w}=I,k=i(5,R,w);return k.index=parseInt(L,10),S.nextToken(),r(k,S.currentOffset(),S.currentPosition()),k}function u(S,L){const I=S.context(),{lastOffset:R,lastStartLoc:w}=I,k=i(4,R,w);return k.key=L,S.nextToken(),r(k,S.currentOffset(),S.currentPosition()),k}function h(S,L){const I=S.context(),{lastOffset:R,lastStartLoc:w}=I,k=i(9,R,w);return k.value=L.replace(vle,ble),S.nextToken(),r(k,S.currentOffset(),S.currentPosition()),k}function f(S){const L=S.nextToken(),I=S.context(),{lastOffset:R,lastStartLoc:w}=I,k=i(8,R,w);return L.type!==11?(s(S,qo.UNEXPECTED_EMPTY_LINKED_MODIFIER,I.lastStartLoc,0),k.value="",r(k,R,w),{nextConsumeToken:L,node:k}):(L.value==null&&s(S,qo.UNEXPECTED_LEXICAL_ANALYSIS,I.lastStartLoc,0,Lu(L)),k.value=L.value||"",r(k,S.currentOffset(),S.currentPosition()),{node:k})}function p(S,L){const I=S.context(),R=i(7,I.offset,I.startLoc);return R.value=L,r(R,S.currentOffset(),S.currentPosition()),R}function _(S){const L=S.context(),I=i(6,L.offset,L.startLoc);let R=S.nextToken();if(R.type===8){const w=f(S);I.modifier=w.node,R=w.nextConsumeToken||S.nextToken()}switch(R.type!==9&&s(S,qo.UNEXPECTED_LEXICAL_ANALYSIS,L.lastStartLoc,0,Lu(R)),R=S.nextToken(),R.type===2&&(R=S.nextToken()),R.type){case 10:R.value==null&&s(S,qo.UNEXPECTED_LEXICAL_ANALYSIS,L.lastStartLoc,0,Lu(R)),I.key=p(S,R.value||"");break;case 4:R.value==null&&s(S,qo.UNEXPECTED_LEXICAL_ANALYSIS,L.lastStartLoc,0,Lu(R)),I.key=u(S,R.value||"");break;case 5:R.value==null&&s(S,qo.UNEXPECTED_LEXICAL_ANALYSIS,L.lastStartLoc,0,Lu(R)),I.key=c(S,R.value||"");break;case 6:R.value==null&&s(S,qo.UNEXPECTED_LEXICAL_ANALYSIS,L.lastStartLoc,0,Lu(R)),I.key=h(S,R.value||"");break;default:{s(S,qo.UNEXPECTED_EMPTY_LINKED_KEY,L.lastStartLoc,0);const w=S.context(),k=i(7,w.offset,w.startLoc);return k.value="",r(k,w.offset,w.startLoc),I.key=k,r(I,w.offset,w.startLoc),{nextConsumeToken:R,node:I}}}return r(I,S.currentOffset(),S.currentPosition()),{node:I}}function E(S){const L=S.context(),I=L.currentType===1?S.currentOffset():L.offset,R=L.currentType===1?L.endLoc:L.startLoc,w=i(2,I,R);w.items=[];let k=null;do{const B=k||S.nextToken();switch(k=null,B.type){case 0:B.value==null&&s(S,qo.UNEXPECTED_LEXICAL_ANALYSIS,L.lastStartLoc,0,Lu(B)),w.items.push(a(S,B.value||""));break;case 5:B.value==null&&s(S,qo.UNEXPECTED_LEXICAL_ANALYSIS,L.lastStartLoc,0,Lu(B)),w.items.push(c(S,B.value||""));break;case 4:B.value==null&&s(S,qo.UNEXPECTED_LEXICAL_ANALYSIS,L.lastStartLoc,0,Lu(B)),w.items.push(u(S,B.value||""));break;case 6:B.value==null&&s(S,qo.UNEXPECTED_LEXICAL_ANALYSIS,L.lastStartLoc,0,Lu(B)),w.items.push(h(S,B.value||""));break;case 7:{const F=_(S);w.items.push(F.node),k=F.nextConsumeToken||null;break}}}while(L.currentType!==13&&L.currentType!==1);const D=L.currentType===1?L.lastOffset:S.currentOffset(),P=L.currentType===1?L.lastEndLoc:S.currentPosition();return r(w,D,P),w}function v(S,L,I,R){const w=S.context();let k=R.items.length===0;const D=i(1,L,I);D.cases=[],D.cases.push(R);do{const P=E(S);k||(k=P.items.length===0),D.cases.push(P)}while(w.currentType!==13);return k&&s(S,qo.MUST_HAVE_MESSAGES_IN_PLURAL,I,0),r(D,S.currentOffset(),S.currentPosition()),D}function b(S){const L=S.context(),{offset:I,startLoc:R}=L,w=E(S);return L.currentType===13?w:v(S,I,R,w)}function y(S){const L=Tle(S,Ci({},e)),I=L.context(),R=i(0,I.offset,I.startLoc);return t&&R.loc&&(R.loc.source=S),R.body=b(L),e.onCacheKey&&(R.cacheKey=e.onCacheKey(S)),I.currentType!==13&&s(L,qo.UNEXPECTED_LEXICAL_ANALYSIS,I.lastStartLoc,0,S[I.offset]||""),r(R,L.currentOffset(),L.currentPosition()),R}return{parse:y}}function Lu(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function Sle(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:r=>(n.helpers.add(r),r)}}function I2(e,t){for(let n=0;n<e.length;n++)iD(e[n],t)}function iD(e,t){switch(e.type){case 1:I2(e.cases,t),t.helper("plural");break;case 2:I2(e.items,t);break;case 6:{iD(e.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function yle(e,t={}){const n=Sle(e);n.helper("normalize"),e.body&&iD(e.body,n);const s=n.context();e.helpers=Array.from(s.helpers)}function $le(e){const t=e.body;return t.type===2?R2(t):t.cases.forEach(n=>R2(n)),e}function R2(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const s=e.items[n];if(!(s.type===3||s.type===9)||s.value==null)break;t.push(s.value)}if(t.length===e.items.length){e.static=sD(t);for(let n=0;n<e.items.length;n++){const s=e.items[n];(s.type===3||s.type===9)&&delete s.value}}}}function jT(e){switch(e.t=e.type,e.type){case 0:{const t=e;jT(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,n=t.cases;for(let s=0;s<n.length;s++)jT(n[s]);t.c=n,delete t.cases;break}case 2:{const t=e,n=t.items;for(let s=0;s<n.length;s++)jT(n[s]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;jT(t.key),t.k=t.key,delete t.key,t.modifier&&(jT(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}}delete e.type}function Ile(e,t){const{sourceMap:n,filename:s,breakLineCode:i,needIndent:r}=t,a=t.location!==!1,c={filename:s,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:i,needIndent:r,indentLevel:0};a&&e.loc&&(c.source=e.loc.source);const u=()=>c;function h(y,S){c.code+=y}function f(y,S=!0){const L=S?i:"";h(r?L+" ".repeat(y):L)}function p(y=!0){const S=++c.indentLevel;y&&f(S)}function _(y=!0){const S=--c.indentLevel;y&&f(S)}function E(){f(c.indentLevel)}return{context:u,push:h,indent:p,deindent:_,newline:E,helper:y=>`_${y}`,needIndent:()=>c.needIndent}}function Rle(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),DE(e,t.key),t.modifier?(e.push(", "),DE(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function Cle(e,t){const{helper:n,needIndent:s}=e;e.push(`${n("normalize")}([`),e.indent(s());const i=t.items.length;for(let r=0;r<i&&(DE(e,t.items[r]),r!==i-1);r++)e.push(", ");e.deindent(s()),e.push("])")}function Mle(e,t){const{helper:n,needIndent:s}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(s());const i=t.cases.length;for(let r=0;r<i&&(DE(e,t.cases[r]),r!==i-1);r++)e.push(", ");e.deindent(s()),e.push("])")}}function Ale(e,t){t.body?DE(e,t.body):e.push("null")}function DE(e,t){const{helper:n}=e;switch(t.type){case 0:Ale(e,t);break;case 1:Mle(e,t);break;case 2:Cle(e,t);break;case 6:Rle(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break}}const Lle=(e,t={})=>{const n=vn(t.mode)?t.mode:"normal",s=vn(t.filename)?t.filename:"message.intl",i=!!t.sourceMap,r=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":`
  1862. `,a=t.needIndent?t.needIndent:n!=="arrow",c=e.helpers||[],u=Ile(e,{mode:n,filename:s,sourceMap:i,breakLineCode:r,needIndent:a});u.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),u.indent(a),c.length>0&&(u.push(`const { ${sD(c.map(p=>`${p}: _${p}`),", ")} } = ctx`),u.newline()),u.push("return "),DE(u,e),u.deindent(a),u.push("}"),delete e.helpers;const{code:h,map:f}=u.context();return{ast:e,code:h,map:f?f.toJSON():void 0}};function wle(e,t={}){const n=Ci({},t),s=!!n.jit,i=!!n.minify,r=n.optimize==null?!0:n.optimize,c=Ole(n).parse(e);return s?(r&&$le(c),i&&jT(c),{ast:c,code:""}):(yle(c,n),Lle(c,n))}/*!
  1863. * core-base v11.0.0-rc.1
  1864. * (c) 2024 kazuya kawaguchi
  1865. * Released under the MIT License.
  1866. */function kle(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(cm().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(cm().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function _w(e){return n=>Nle(n,e)}function Nle(e,t){const n=Dle(t);if(n==null)throw Cy(0);if(rD(n)===1){const r=Ble(n);return e.plural(r.reduce((a,c)=>[...a,C2(e,c)],[]))}else return C2(e,n)}const Ple=["b","body"];function Dle(e){return wp(e,Ple)}const xle=["c","cases"];function Ble(e){return wp(e,xle,[])}function C2(e,t){const n=Ule(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const s=Vle(t).reduce((i,r)=>[...i,EN(e,r)],[]);return e.normalize(s)}}const Fle=["s","static"];function Ule(e){return wp(e,Fle)}const Hle=["i","items"];function Vle(e){return wp(e,Hle,[])}function EN(e,t){const n=rD(t);switch(n){case 3:return aR(t,n);case 9:return aR(t,n);case 4:{const s=t;if(xc(s,"k")&&s.k)return e.interpolate(e.named(s.k));if(xc(s,"key")&&s.key)return e.interpolate(e.named(s.key));throw Cy(n)}case 5:{const s=t;if(xc(s,"i")&&ci(s.i))return e.interpolate(e.list(s.i));if(xc(s,"index")&&ci(s.index))return e.interpolate(e.list(s.index));throw Cy(n)}case 6:{const s=t,i=zle(s),r=Kle(s);return e.linked(EN(e,r),i?EN(e,i):void 0,e.type)}case 7:return aR(t,n);case 8:return aR(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const Gle=["t","type"];function rD(e){return wp(e,Gle)}const Wle=["v","value"];function aR(e,t){const n=wp(e,Wle);if(n)return n;throw Cy(t)}const Xle=["m","modifier"];function zle(e){return wp(e,Xle)}const Yle=["k","key"];function Kle(e){const t=wp(e,Yle);if(t)return t;throw Cy(6)}function wp(e,t,n){for(let s=0;s<t.length;s++){const i=t[s];if(xc(e,i)&&e[i]!=null)return e[i]}return n}function Cy(e){return new Error(`unhandled node type: ${e}`)}const jle=e=>e;let cR=ss();function xE(e){return Uo(e)&&rD(e)===0&&(xc(e,"b")||xc(e,"body"))}function Qle(e,t={}){let n=!1;const s=t.onError||dle;return t.onError=i=>{n=!0,s(i)},{...wle(e,t),detectError:n}}function qle(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&vn(e)){Do(t.warnHtmlMessage)&&t.warnHtmlMessage;const s=(t.onCacheKey||jle)(e),i=cR[s];if(i)return i;const{ast:r,detectError:a}=Qle(e,{...t,location:!1,jit:!0}),c=_w(r);return a?c:cR[s]=c}else{const n=e.cacheKey;if(n){const s=cR[n];return s||(cR[n]=_w(e))}else return _w(e)}}let My=null;function Jle(e){My=e}function Zle(e,t,n){My&&My.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const eae=tae("function:translate");function tae(e){return t=>My&&My.emit(e,t)}const ph={INVALID_ARGUMENT:ule,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},nae=24;function gh(e){return bA(e,null,void 0)}function lD(e,t){return t.locale!=null?M2(t.locale):M2(e.locale)}let Tw;function M2(e){if(vn(e))return e;if(Is(e)){if(e.resolvedOnce&&Tw!=null)return Tw;if(e.constructor.name==="Function"){const t=e();if(rle(t))throw gh(ph.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Tw=t}else throw gh(ph.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw gh(ph.NOT_SUPPORT_LOCALE_TYPE)}function oae(e,t,n){return[...new Set([n,...di(t)?t:Uo(t)?Object.keys(t):vn(t)?[t]:[n]])]}function v8(e,t,n){const s=vn(n)?n:Ay,i=e;i.__localeChainCache||(i.__localeChainCache=new Map);let r=i.__localeChainCache.get(s);if(!r){r=[];let a=[n];for(;di(a);)a=A2(r,a,t);const c=di(t)||!Oo(t)?t:t.default?t.default:null;a=vn(c)?[c]:c,di(a)&&A2(r,a,!1),i.__localeChainCache.set(s,r)}return r}function A2(e,t,n){let s=!0;for(let i=0;i<t.length&&Do(s);i++){const r=t[i];vn(r)&&(s=sae(e,t[i],n))}return s}function sae(e,t,n){let s;const i=t.split("-");do{const r=i.join("-");s=iae(e,r,n),i.splice(-1,1)}while(i.length&&s===!0);return s}function iae(e,t,n){let s=!1;if(!e.includes(t)&&(s=!0,t)){s=t[t.length-1]!=="!";const i=t.replace(/!/g,"");e.push(i),(di(n)||Oo(n))&&n[i]&&(s=n[i])}return s}const kp=[];kp[0]={w:[0],i:[3,0],"[":[4],o:[7]};kp[1]={w:[1],".":[2],"[":[4],o:[7]};kp[2]={w:[2],i:[3,0],0:[3,0]};kp[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};kp[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};kp[5]={"'":[4,0],o:8,l:[5,0]};kp[6]={'"':[4,0],o:8,l:[6,0]};const rae=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function lae(e){return rae.test(e)}function aae(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function cae(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function uae(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:lae(t)?aae(t):"*"+t}function dae(e){const t=[];let n=-1,s=0,i=0,r,a,c,u,h,f,p;const _=[];_[0]=()=>{a===void 0?a=c:a+=c},_[1]=()=>{a!==void 0&&(t.push(a),a=void 0)},_[2]=()=>{_[0](),i++},_[3]=()=>{if(i>0)i--,s=4,_[0]();else{if(i=0,a===void 0||(a=uae(a),a===!1))return!1;_[1]()}};function E(){const v=e[n+1];if(s===5&&v==="'"||s===6&&v==='"')return n++,c="\\"+v,_[0](),!0}for(;s!==null;)if(n++,r=e[n],!(r==="\\"&&E())){if(u=cae(r),p=kp[s],h=p[u]||p.l||8,h===8||(s=h[0],h[1]!==void 0&&(f=_[h[1]],f&&(c=r,f()===!1))))return;if(s===7)return t}}const L2=new Map;function hae(e,t){return Uo(e)?e[t]:null}function fae(e,t){if(!Uo(e))return null;let n=L2.get(t);if(n||(n=dae(t),n&&L2.set(t,n)),!n)return null;const s=n.length;let i=e,r=0;for(;r<s;){const a=i[n[r]];if(a===void 0||Is(i))return null;i=a,r++}return i}const pae="11.0.0-rc.1",OA=-1,Ay="en-US",w2="",k2=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function gae(){return{upper:(e,t)=>t==="text"&&vn(e)?e.toUpperCase():t==="vnode"&&Uo(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&vn(e)?e.toLowerCase():t==="vnode"&&Uo(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&vn(e)?k2(e):t==="vnode"&&Uo(e)&&"__v_isVNode"in e?k2(e.children):e}}let b8;function mae(e){b8=e}let O8;function _ae(e){O8=e}let S8;function Tae(e){S8=e}let y8=null;const Eae=e=>{y8=e},vae=()=>y8;let $8=null;const N2=e=>{$8=e},bae=()=>$8;let P2=0;function Oae(e={}){const t=Is(e.onWarn)?e.onWarn:ale,n=vn(e.version)?e.version:pae,s=vn(e.locale)||Is(e.locale)?e.locale:Ay,i=Is(s)?Ay:s,r=di(e.fallbackLocale)||Oo(e.fallbackLocale)||vn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,a=Oo(e.messages)?e.messages:Ew(i),c=Oo(e.datetimeFormats)?e.datetimeFormats:Ew(i),u=Oo(e.numberFormats)?e.numberFormats:Ew(i),h=Ci(ss(),e.modifiers,gae()),f=e.pluralRules||ss(),p=Is(e.missing)?e.missing:null,_=Do(e.missingWarn)||PE(e.missingWarn)?e.missingWarn:!0,E=Do(e.fallbackWarn)||PE(e.fallbackWarn)?e.fallbackWarn:!0,v=!!e.fallbackFormat,b=!!e.unresolving,y=Is(e.postTranslation)?e.postTranslation:null,S=Oo(e.processor)?e.processor:null,L=Do(e.warnHtmlMessage)?e.warnHtmlMessage:!0,I=!!e.escapeParameter,R=Is(e.messageCompiler)?e.messageCompiler:b8,w=Is(e.messageResolver)?e.messageResolver:O8||hae,k=Is(e.localeFallbacker)?e.localeFallbacker:S8||oae,D=Uo(e.fallbackContext)?e.fallbackContext:void 0,P=e,B=Uo(P.__datetimeFormatters)?P.__datetimeFormatters:new Map,F=Uo(P.__numberFormatters)?P.__numberFormatters:new Map,X=Uo(P.__meta)?P.__meta:{};P2++;const G={version:n,cid:P2,locale:s,fallbackLocale:r,messages:a,modifiers:h,pluralRules:f,missing:p,missingWarn:_,fallbackWarn:E,fallbackFormat:v,unresolving:b,postTranslation:y,processor:S,warnHtmlMessage:L,escapeParameter:I,messageCompiler:R,messageResolver:w,localeFallbacker:k,fallbackContext:D,onWarn:t,__meta:X};return G.datetimeFormats=c,G.numberFormats=u,G.__datetimeFormatters=B,G.__numberFormatters=F,__INTLIFY_PROD_DEVTOOLS__&&Zle(G,n,X),G}const Ew=e=>({[e]:ss()});function aD(e,t,n,s,i){const{missing:r,onWarn:a}=e;if(r!==null){const c=r(e,n,t,i);return vn(c)?c:t}else return t}function mS(e,t,n){const s=e;s.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function Sae(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function yae(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let s=n+1;s<t.length;s++)if(Sae(e,t[s]))return!0;return!1}function D2(e,...t){const{datetimeFormats:n,unresolving:s,fallbackLocale:i,onWarn:r,localeFallbacker:a}=e,{__datetimeFormatters:c}=e,[u,h,f,p]=vN(...t),_=Do(f.missingWarn)?f.missingWarn:e.missingWarn;Do(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn;const E=!!f.part,v=lD(e,f),b=a(e,i,v);if(!vn(u)||u==="")return new Intl.DateTimeFormat(v,p).format(h);let y={},S,L=null;const I="datetime format";for(let k=0;k<b.length&&(S=b[k],y=n[S]||{},L=y[u],!Oo(L));k++)aD(e,u,S,_,I);if(!Oo(L)||!vn(S))return s?OA:u;let R=`${S}__${u}`;vA(p)||(R=`${R}__${JSON.stringify(p)}`);let w=c.get(R);return w||(w=new Intl.DateTimeFormat(S,Ci({},L,p)),c.set(R,w)),E?w.formatToParts(h):w.format(h)}const I8=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function vN(...e){const[t,n,s,i]=e,r=ss();let a=ss(),c;if(vn(t)){const u=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!u)throw gh(ph.INVALID_ISO_DATE_ARGUMENT);const h=u[3]?u[3].trim().startsWith("T")?`${u[1].trim()}${u[3].trim()}`:`${u[1].trim()}T${u[3].trim()}`:u[1].trim();c=new Date(h);try{c.toISOString()}catch{throw gh(ph.INVALID_ISO_DATE_ARGUMENT)}}else if(ole(t)){if(isNaN(t.getTime()))throw gh(ph.INVALID_DATE_ARGUMENT);c=t}else if(ci(t))c=t;else throw gh(ph.INVALID_ARGUMENT);return vn(n)?r.key=n:Oo(n)&&Object.keys(n).forEach(u=>{I8.includes(u)?a[u]=n[u]:r[u]=n[u]}),vn(s)?r.locale=s:Oo(s)&&(a=s),Oo(i)&&(a=i),[r.key||"",c,r,a]}function x2(e,t,n){const s=e;for(const i in n){const r=`${t}__${i}`;s.__datetimeFormatters.has(r)&&s.__datetimeFormatters.delete(r)}}function B2(e,...t){const{numberFormats:n,unresolving:s,fallbackLocale:i,onWarn:r,localeFallbacker:a}=e,{__numberFormatters:c}=e,[u,h,f,p]=bN(...t),_=Do(f.missingWarn)?f.missingWarn:e.missingWarn;Do(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn;const E=!!f.part,v=lD(e,f),b=a(e,i,v);if(!vn(u)||u==="")return new Intl.NumberFormat(v,p).format(h);let y={},S,L=null;const I="number format";for(let k=0;k<b.length&&(S=b[k],y=n[S]||{},L=y[u],!Oo(L));k++)aD(e,u,S,_,I);if(!Oo(L)||!vn(S))return s?OA:u;let R=`${S}__${u}`;vA(p)||(R=`${R}__${JSON.stringify(p)}`);let w=c.get(R);return w||(w=new Intl.NumberFormat(S,Ci({},L,p)),c.set(R,w)),E?w.formatToParts(h):w.format(h)}const R8=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function bN(...e){const[t,n,s,i]=e,r=ss();let a=ss();if(!ci(t))throw gh(ph.INVALID_ARGUMENT);const c=t;return vn(n)?r.key=n:Oo(n)&&Object.keys(n).forEach(u=>{R8.includes(u)?a[u]=n[u]:r[u]=n[u]}),vn(s)?r.locale=s:Oo(s)&&(a=s),Oo(i)&&(a=i),[r.key||"",c,r,a]}function F2(e,t,n){const s=e;for(const i in n){const r=`${t}__${i}`;s.__numberFormatters.has(r)&&s.__numberFormatters.delete(r)}}const $ae=e=>e,Iae=e=>"",Rae="text",Cae=e=>e.length===0?"":sD(e),Mae=lle;function U2(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function Aae(e){const t=ci(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(ci(e.named.count)||ci(e.named.n))?ci(e.named.count)?e.named.count:ci(e.named.n)?e.named.n:t:t}function Lae(e,t){t.count||(t.count=e),t.n||(t.n=e)}function wae(e={}){const t=e.locale,n=Aae(e),s=Uo(e.pluralRules)&&vn(t)&&Is(e.pluralRules[t])?e.pluralRules[t]:U2,i=Uo(e.pluralRules)&&vn(t)&&Is(e.pluralRules[t])?U2:void 0,r=S=>S[s(n,S.length,i)],a=e.list||[],c=S=>a[S],u=e.named||ss();ci(e.pluralIndex)&&Lae(n,u);const h=S=>u[S];function f(S,L){const I=Is(e.messages)?e.messages(S,!!L):Uo(e.messages)?e.messages[S]:!1;return I||(e.parent?e.parent.message(S):Iae)}const p=S=>e.modifiers?e.modifiers[S]:$ae,_=Oo(e.processor)&&Is(e.processor.normalize)?e.processor.normalize:Cae,E=Oo(e.processor)&&Is(e.processor.interpolate)?e.processor.interpolate:Mae,v=Oo(e.processor)&&vn(e.processor.type)?e.processor.type:Rae,y={list:c,named:h,plural:r,linked:(S,...L)=>{const[I,R]=L;let w="text",k="";L.length===1?Uo(I)?(k=I.modifier||k,w=I.type||w):vn(I)&&(k=I||k):L.length===2&&(vn(I)&&(k=I||k),vn(R)&&(w=R||w));const D=f(S,!0)(y),P=w==="vnode"&&di(D)&&k?D[0]:D;return k?p(k)(P,w):P},message:f,type:v,interpolate:E,normalize:_,values:Ci(ss(),a,u)};return y}const H2=()=>"",Qa=e=>Is(e);function V2(e,...t){const{fallbackFormat:n,postTranslation:s,unresolving:i,messageCompiler:r,fallbackLocale:a,messages:c}=e,[u,h]=ON(...t),f=Do(h.missingWarn)?h.missingWarn:e.missingWarn,p=Do(h.fallbackWarn)?h.fallbackWarn:e.fallbackWarn,_=Do(h.escapeParameter)?h.escapeParameter:e.escapeParameter,E=!!h.resolvedMessage,v=vn(h.default)||Do(h.default)?Do(h.default)?r?u:()=>u:h.default:n?r?u:()=>u:null,b=n||v!=null&&(vn(v)||Is(v)),y=lD(e,h);_&&kae(h);let[S,L,I]=E?[u,y,c[y]||ss()]:C8(e,u,y,a,p,f),R=S,w=u;if(!E&&!(vn(R)||xE(R)||Qa(R))&&b&&(R=v,w=R),!E&&(!(vn(R)||xE(R)||Qa(R))||!vn(L)))return i?OA:u;let k=!1;const D=()=>{k=!0},P=Qa(R)?R:M8(e,u,L,R,w,D);if(k)return R;const B=Dae(e,L,I,h),F=wae(B),X=Nae(e,P,F),G=s?s(X,u):X;if(__INTLIFY_PROD_DEVTOOLS__){const re={timestamp:Date.now(),key:vn(u)?u:Qa(R)?R.key:"",locale:L||(Qa(R)?R.locale:""),format:vn(R)?R:Qa(R)?R.source:"",message:G};re.meta=Ci({},e.__meta,vae()||{}),eae(re)}return G}function kae(e){di(e.list)?e.list=e.list.map(t=>vn(t)?y2(t):t):Uo(e.named)&&Object.keys(e.named).forEach(t=>{vn(e.named[t])&&(e.named[t]=y2(e.named[t]))})}function C8(e,t,n,s,i,r){const{messages:a,onWarn:c,messageResolver:u,localeFallbacker:h}=e,f=h(e,s,n);let p=ss(),_,E=null;const v="translate";for(let b=0;b<f.length&&(_=f[b],p=a[_]||ss(),(E=u(p,t))===null&&(E=p[t]),!(vn(E)||xE(E)||Qa(E)));b++)if(!yae(_,f)){const y=aD(e,t,_,r,v);y!==t&&(E=y)}return[E,_,p]}function M8(e,t,n,s,i,r){const{messageCompiler:a,warnHtmlMessage:c}=e;if(Qa(s)){const h=s;return h.locale=h.locale||n,h.key=h.key||t,h}if(a==null){const h=()=>s;return h.locale=n,h.key=t,h}const u=a(s,Pae(e,n,i,s,c,r));return u.locale=n,u.key=t,u.source=s,u}function Nae(e,t,n){return t(n)}function ON(...e){const[t,n,s]=e,i=ss();if(!vn(t)&&!ci(t)&&!Qa(t)&&!xE(t))throw gh(ph.INVALID_ARGUMENT);const r=ci(t)?String(t):(Qa(t),t);return ci(n)?i.plural=n:vn(n)?i.default=n:Oo(n)&&!vA(n)?i.named=n:di(n)&&(i.list=n),ci(s)?i.plural=s:vn(s)?i.default=s:Oo(s)&&Ci(i,s),[r,i]}function Pae(e,t,n,s,i,r){return{locale:t,key:n,warnHtmlMessage:i,onError:a=>{throw r&&r(a),a},onCacheKey:a=>tle(t,n,a)}}function Dae(e,t,n,s){const{modifiers:i,pluralRules:r,messageResolver:a,fallbackLocale:c,fallbackWarn:u,missingWarn:h,fallbackContext:f}=e,_={locale:t,modifiers:i,pluralRules:r,messages:(E,v)=>{let b=a(n,E);if(b==null&&(f||v)){const[,,y]=C8(f||e,E,t,c,u,h);b=a(y,E)}if(vn(b)||xE(b)){let y=!1;const L=M8(e,E,t,b,E,()=>{y=!0});return y?H2:L}else return Qa(b)?b:H2}};return e.processor&&(_.processor=e.processor),s.list&&(_.list=s.list),s.named&&(_.named=s.named),ci(s.plural)&&(_.pluralIndex=s.plural),_}kle();/*!
  1867. * vue-i18n v11.0.0-rc.1
  1868. * (c) 2024 kazuya kawaguchi
  1869. * Released under the MIT License.
  1870. */const xae="11.0.0-rc.1";function Bae(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(cm().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(cm().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(cm().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(cm().__INTLIFY_PROD_DEVTOOLS__=!1)}const Hl={UNEXPECTED_RETURN_TYPE:nae,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function ma(e,...t){return bA(e,null,void 0)}const SN=Lp("__translateVNode"),yN=Lp("__datetimeParts"),$N=Lp("__numberParts"),A8=Lp("__setPluralRules"),L8=Lp("__injectWithOption"),IN=Lp("__dispose");function Ly(e){if(!Uo(e))return e;for(const t in e)if(xc(e,t))if(!t.includes("."))Uo(e[t])&&Ly(e[t]);else{const n=t.split("."),s=n.length-1;let i=e,r=!1;for(let a=0;a<s;a++){if(n[a]in i||(i[n[a]]=ss()),!Uo(i[n[a]])){r=!0;break}i=i[n[a]]}r||(i[n[s]]=e[t],delete e[t]),Uo(i[n[s]])&&Ly(i[n[s]])}return e}function cD(e,t){const{messages:n,__i18n:s,messageResolver:i,flatJson:r}=t,a=Oo(n)?n:di(s)?ss():{[e]:ss()};if(di(s)&&s.forEach(c=>{if("locale"in c&&"resource"in c){const{locale:u,resource:h}=c;u?(a[u]=a[u]||ss(),iC(h,a[u])):iC(h,a)}else vn(c)&&iC(JSON.parse(c),a)}),i==null&&r)for(const c in a)xc(a,c)&&Ly(a[c]);return a}function w8(e){return e.type}function k8(e,t,n){let s=Uo(t.messages)?t.messages:ss();"__i18nGlobal"in n&&(s=cD(e.locale.value,{messages:s,__i18n:n.__i18nGlobal}));const i=Object.keys(s);i.length&&i.forEach(r=>{e.mergeLocaleMessage(r,s[r])});{if(Uo(t.datetimeFormats)){const r=Object.keys(t.datetimeFormats);r.length&&r.forEach(a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])})}if(Uo(t.numberFormats)){const r=Object.keys(t.numberFormats);r.length&&r.forEach(a=>{e.mergeNumberFormat(a,t.numberFormats[a])})}}}function G2(e){return oe(Gm,null,e,0)}const W2="__INTLIFY_META__",X2=()=>[],Fae=()=>!1;let z2=0;function Y2(e){return(t,n,s,i)=>e(n,s,pn()||void 0,i)}const Uae=()=>{const e=pn();let t=null;return e&&(t=w8(e)[W2])?{[W2]:t}:null};function uD(e={}){const{__root:t,__injectWithOption:n}=e,s=t===void 0,i=e.flatJson,r=TM?K:lo;let a=Do(e.inheritLocale)?e.inheritLocale:!0;const c=r(t&&a?t.locale.value:vn(e.locale)?e.locale:Ay),u=r(t&&a?t.fallbackLocale.value:vn(e.fallbackLocale)||di(e.fallbackLocale)||Oo(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:c.value),h=r(cD(c.value,e)),f=r(Oo(e.datetimeFormats)?e.datetimeFormats:{[c.value]:{}}),p=r(Oo(e.numberFormats)?e.numberFormats:{[c.value]:{}});let _=t?t.missingWarn:Do(e.missingWarn)||PE(e.missingWarn)?e.missingWarn:!0,E=t?t.fallbackWarn:Do(e.fallbackWarn)||PE(e.fallbackWarn)?e.fallbackWarn:!0,v=t?t.fallbackRoot:Do(e.fallbackRoot)?e.fallbackRoot:!0,b=!!e.fallbackFormat,y=Is(e.missing)?e.missing:null,S=Is(e.missing)?Y2(e.missing):null,L=Is(e.postTranslation)?e.postTranslation:null,I=t?t.warnHtmlMessage:Do(e.warnHtmlMessage)?e.warnHtmlMessage:!0,R=!!e.escapeParameter;const w=t?t.modifiers:Oo(e.modifiers)?e.modifiers:{};let k=e.pluralRules||t&&t.pluralRules,D;D=(()=>{s&&N2(null);const Se={version:xae,locale:c.value,fallbackLocale:u.value,messages:h.value,modifiers:w,pluralRules:k,missing:S===null?void 0:S,missingWarn:_,fallbackWarn:E,fallbackFormat:b,unresolving:!0,postTranslation:L===null?void 0:L,warnHtmlMessage:I,escapeParameter:R,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};Se.datetimeFormats=f.value,Se.numberFormats=p.value,Se.__datetimeFormatters=Oo(D)?D.__datetimeFormatters:void 0,Se.__numberFormatters=Oo(D)?D.__numberFormatters:void 0;const Je=Oae(Se);return s&&N2(Je),Je})(),mS(D,c.value,u.value);function B(){return[c.value,u.value,h.value,f.value,p.value]}const F=x({get:()=>c.value,set:Se=>{c.value=Se,D.locale=c.value}}),X=x({get:()=>u.value,set:Se=>{u.value=Se,D.fallbackLocale=u.value,mS(D,c.value,Se)}}),G=x(()=>h.value),re=x(()=>f.value),_e=x(()=>p.value);function J(){return Is(L)?L:null}function Y(Se){L=Se,D.postTranslation=Se}function ae(){return y}function Z(Se){Se!==null&&(S=Y2(Se)),y=Se,D.missing=S}const Q=(Se,Je,ut,Mt,mt,qt)=>{B();let ce;try{__INTLIFY_PROD_DEVTOOLS__,s||(D.fallbackContext=t?bae():void 0),ce=Se(D)}finally{__INTLIFY_PROD_DEVTOOLS__,s||(D.fallbackContext=void 0)}if(ut!=="translate exists"&&ci(ce)&&ce===OA||ut==="translate exists"&&!ce){const[q,ne]=Je();return t&&v?Mt(t):mt(q)}else{if(qt(ce))return ce;throw ma(Hl.UNEXPECTED_RETURN_TYPE)}};function he(...Se){return Q(Je=>Reflect.apply(V2,null,[Je,...Se]),()=>ON(...Se),"translate",Je=>Reflect.apply(Je.t,Je,[...Se]),Je=>Je,Je=>vn(Je))}function ge(...Se){const[Je,ut,Mt]=Se;if(Mt&&!Uo(Mt))throw ma(Hl.INVALID_ARGUMENT);return he(Je,ut,Ci({resolvedMessage:!0},Mt||{}))}function Ie(...Se){return Q(Je=>Reflect.apply(D2,null,[Je,...Se]),()=>vN(...Se),"datetime format",Je=>Reflect.apply(Je.d,Je,[...Se]),()=>w2,Je=>vn(Je))}function be(...Se){return Q(Je=>Reflect.apply(B2,null,[Je,...Se]),()=>bN(...Se),"number format",Je=>Reflect.apply(Je.n,Je,[...Se]),()=>w2,Je=>vn(Je))}function Ae(Se){return Se.map(Je=>vn(Je)||ci(Je)||Do(Je)?G2(String(Je)):Je)}const $e={normalize:Ae,interpolate:Se=>Se,type:"vnode"};function ve(...Se){return Q(Je=>{let ut;const Mt=Je;try{Mt.processor=$e,ut=Reflect.apply(V2,null,[Mt,...Se])}finally{Mt.processor=null}return ut},()=>ON(...Se),"translate",Je=>Je[SN](...Se),Je=>[G2(Je)],Je=>di(Je))}function Pe(...Se){return Q(Je=>Reflect.apply(B2,null,[Je,...Se]),()=>bN(...Se),"number format",Je=>Je[$N](...Se),X2,Je=>vn(Je)||di(Je))}function Be(...Se){return Q(Je=>Reflect.apply(D2,null,[Je,...Se]),()=>vN(...Se),"datetime format",Je=>Je[yN](...Se),X2,Je=>vn(Je)||di(Je))}function ot(Se){k=Se,D.pluralRules=k}function Xe(Se,Je){return Q(()=>{if(!Se)return!1;const ut=vn(Je)?Je:c.value,Mt=Oe(ut),mt=D.messageResolver(Mt,Se);return xE(mt)||Qa(mt)||vn(mt)},()=>[Se],"translate exists",ut=>Reflect.apply(ut.te,ut,[Se,Je]),Fae,ut=>Do(ut))}function ee(Se){let Je=null;const ut=v8(D,u.value,c.value);for(let Mt=0;Mt<ut.length;Mt++){const mt=h.value[ut[Mt]]||{},qt=D.messageResolver(mt,Se);if(qt!=null){Je=qt;break}}return Je}function pe(Se){const Je=ee(Se);return Je??(t?t.tm(Se)||{}:{})}function Oe(Se){return h.value[Se]||{}}function ze(Se,Je){if(i){const ut={[Se]:Je};for(const Mt in ut)xc(ut,Mt)&&Ly(ut[Mt]);Je=ut[Se]}h.value[Se]=Je,D.messages=h.value}function Ze(Se,Je){h.value[Se]=h.value[Se]||{};const ut={[Se]:Je};if(i)for(const Mt in ut)xc(ut,Mt)&&Ly(ut[Mt]);Je=ut[Se],iC(Je,h.value[Se]),D.messages=h.value}function De(Se){return f.value[Se]||{}}function me(Se,Je){f.value[Se]=Je,D.datetimeFormats=f.value,x2(D,Se,Je)}function Te(Se,Je){f.value[Se]=Ci(f.value[Se]||{},Je),D.datetimeFormats=f.value,x2(D,Se,Je)}function Ue(Se){return p.value[Se]||{}}function qe(Se,Je){p.value[Se]=Je,D.numberFormats=p.value,F2(D,Se,Je)}function ct(Se,Je){p.value[Se]=Ci(p.value[Se]||{},Je),D.numberFormats=p.value,F2(D,Se,Je)}z2++,t&&TM&&(tt(t.locale,Se=>{a&&(c.value=Se,D.locale=Se,mS(D,c.value,u.value))}),tt(t.fallbackLocale,Se=>{a&&(u.value=Se,D.fallbackLocale=Se,mS(D,c.value,u.value))}));const Ne={id:z2,locale:F,fallbackLocale:X,get inheritLocale(){return a},set inheritLocale(Se){a=Se,Se&&t&&(c.value=t.locale.value,u.value=t.fallbackLocale.value,mS(D,c.value,u.value))},get availableLocales(){return Object.keys(h.value).sort()},messages:G,get modifiers(){return w},get pluralRules(){return k||{}},get isGlobal(){return s},get missingWarn(){return _},set missingWarn(Se){_=Se,D.missingWarn=_},get fallbackWarn(){return E},set fallbackWarn(Se){E=Se,D.fallbackWarn=E},get fallbackRoot(){return v},set fallbackRoot(Se){v=Se},get fallbackFormat(){return b},set fallbackFormat(Se){b=Se,D.fallbackFormat=b},get warnHtmlMessage(){return I},set warnHtmlMessage(Se){I=Se,D.warnHtmlMessage=Se},get escapeParameter(){return R},set escapeParameter(Se){R=Se,D.escapeParameter=Se},t:he,getLocaleMessage:Oe,setLocaleMessage:ze,mergeLocaleMessage:Ze,getPostTranslationHandler:J,setPostTranslationHandler:Y,getMissingHandler:ae,setMissingHandler:Z,[A8]:ot};return Ne.datetimeFormats=re,Ne.numberFormats=_e,Ne.rt=ge,Ne.te=Xe,Ne.tm=pe,Ne.d=Ie,Ne.n=be,Ne.getDateTimeFormat=De,Ne.setDateTimeFormat=me,Ne.mergeDateTimeFormat=Te,Ne.getNumberFormat=Ue,Ne.setNumberFormat=qe,Ne.mergeNumberFormat=ct,Ne[L8]=n,Ne[SN]=ve,Ne[yN]=Be,Ne[$N]=Pe,Ne}function Hae(e){const t=vn(e.locale)?e.locale:Ay,n=vn(e.fallbackLocale)||di(e.fallbackLocale)||Oo(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,s=Is(e.missing)?e.missing:void 0,i=Do(e.silentTranslationWarn)||PE(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,r=Do(e.silentFallbackWarn)||PE(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,a=Do(e.fallbackRoot)?e.fallbackRoot:!0,c=!!e.formatFallbackMessages,u=Oo(e.modifiers)?e.modifiers:{},h=e.pluralizationRules,f=Is(e.postTranslation)?e.postTranslation:void 0,p=vn(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,_=!!e.escapeParameterHtml,E=Do(e.sync)?e.sync:!0;let v=e.messages;if(Oo(e.sharedMessages)){const w=e.sharedMessages;v=Object.keys(w).reduce((D,P)=>{const B=D[P]||(D[P]={});return Ci(B,w[P]),D},v||{})}const{__i18n:b,__root:y,__injectWithOption:S}=e,L=e.datetimeFormats,I=e.numberFormats,R=e.flatJson;return{locale:t,fallbackLocale:n,messages:v,flatJson:R,datetimeFormats:L,numberFormats:I,missing:s,missingWarn:i,fallbackWarn:r,fallbackRoot:a,fallbackFormat:c,modifiers:u,pluralRules:h,postTranslation:f,warnHtmlMessage:p,escapeParameter:_,messageResolver:e.messageResolver,inheritLocale:E,__i18n:b,__root:y,__injectWithOption:S}}function RN(e={}){const t=uD(Hae(e)),{__extender:n}=e,s={id:t.id,get locale(){return t.locale.value},set locale(i){t.locale.value=i},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(i){t.fallbackLocale.value=i},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(i){t.setMissingHandler(i)},get silentTranslationWarn(){return Do(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(i){t.missingWarn=Do(i)?!i:i},get silentFallbackWarn(){return Do(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(i){t.fallbackWarn=Do(i)?!i:i},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(i){t.fallbackFormat=i},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(i){t.setPostTranslationHandler(i)},get sync(){return t.inheritLocale},set sync(i){t.inheritLocale=i},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(i){t.warnHtmlMessage=i!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(i){t.escapeParameter=i},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...i){return Reflect.apply(t.t,t,[...i])},rt(...i){return Reflect.apply(t.rt,t,[...i])},te(i,r){return t.te(i,r)},tm(i){return t.tm(i)},getLocaleMessage(i){return t.getLocaleMessage(i)},setLocaleMessage(i,r){t.setLocaleMessage(i,r)},mergeLocaleMessage(i,r){t.mergeLocaleMessage(i,r)},d(...i){return Reflect.apply(t.d,t,[...i])},getDateTimeFormat(i){return t.getDateTimeFormat(i)},setDateTimeFormat(i,r){t.setDateTimeFormat(i,r)},mergeDateTimeFormat(i,r){t.mergeDateTimeFormat(i,r)},n(...i){return Reflect.apply(t.n,t,[...i])},getNumberFormat(i){return t.getNumberFormat(i)},setNumberFormat(i,r){t.setNumberFormat(i,r)},mergeNumberFormat(i,r){t.mergeNumberFormat(i,r)}};return s.__extender=n,s}function Vae(e,t,n){return{beforeCreate(){const s=pn();if(!s)throw ma(Hl.UNEXPECTED_ERROR);const i=this.$options;if(i.i18n){const r=i.i18n;if(i.__i18n&&(r.__i18n=i.__i18n),r.__root=t,this===this.$root)this.$i18n=K2(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=RN(r);const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=K2(e,i);else{this.$i18n=RN({__i18n:i.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=e;i.__i18nGlobal&&k8(t,i,i),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$te=(r,a)=>this.$i18n.te(r,a),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),n.__setInstance(s,this.$i18n)},mounted(){},unmounted(){const s=pn();if(!s)throw ma(Hl.UNEXPECTED_ERROR);const i=this.$i18n;delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,i.__disposer&&(i.__disposer(),delete i.__disposer,delete i.__extender),n.__deleteInstance(s),delete this.$i18n}}}function K2(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[A8](t.pluralizationRules||e.pluralizationRules);const n=cD(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(s=>e.mergeLocaleMessage(s,n[s])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(s=>e.mergeDateTimeFormat(s,t.datetimeFormats[s])),t.numberFormats&&Object.keys(t.numberFormats).forEach(s=>e.mergeNumberFormat(s,t.numberFormats[s])),e}const dD={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function Gae({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((s,i)=>[...s,...i.type===Lt?i.children:[i]],[]):t.reduce((n,s)=>{const i=e[s];return i&&(n[s]=i()),n},ss())}function N8(){return Lt}const Wae=Re({name:"i18n-t",props:Ci({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>ci(e)||!isNaN(e)}},dD),setup(e,t){const{slots:n,attrs:s}=t,i=e.i18n||hc({useScope:e.scope,__useComponent:!0});return()=>{const r=Object.keys(n).filter(p=>p!=="_"),a=ss();e.locale&&(a.locale=e.locale),e.plural!==void 0&&(a.plural=vn(e.plural)?+e.plural:e.plural);const c=Gae(t,r),u=i[SN](e.keypath,c,a),h=Ci(ss(),s),f=vn(e.tag)||Uo(e.tag)?e.tag:N8();return Gt(f,h,u)}}}),j2=Wae;function Xae(e){return di(e)&&!vn(e[0])}function P8(e,t,n,s){const{slots:i,attrs:r}=t;return()=>{const a={part:!0};let c=ss();e.locale&&(a.locale=e.locale),vn(e.format)?a.key=e.format:Uo(e.format)&&(vn(e.format.key)&&(a.key=e.format.key),c=Object.keys(e.format).reduce((_,E)=>n.includes(E)?Ci(ss(),_,{[E]:e.format[E]}):_,ss()));const u=s(e.value,a,c);let h=[a.key];di(u)?h=u.map((_,E)=>{const v=i[_.type],b=v?v({[_.type]:_.value,index:E,parts:u}):[_.value];return Xae(b)&&(b[0].key=`${_.type}-${E}`),b}):vn(u)&&(h=[u]);const f=Ci(ss(),r),p=vn(e.tag)||Uo(e.tag)?e.tag:N8();return Gt(p,f,h)}}const zae=Re({name:"i18n-n",props:Ci({value:{type:Number,required:!0},format:{type:[String,Object]}},dD),setup(e,t){const n=e.i18n||hc({useScope:e.scope,__useComponent:!0});return P8(e,t,R8,(...s)=>n[$N](...s))}}),Q2=zae;function Yae(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const s=n.__getInstance(t);return s!=null?s.__composer:e.global.__composer}}function Kae(e){const t=a=>{const{instance:c,value:u}=a;if(!c||!c.$)throw ma(Hl.UNEXPECTED_ERROR);const h=Yae(e,c.$),f=q2(u);return[Reflect.apply(h.t,h,[...J2(f)]),h]};return{created:(a,c)=>{const[u,h]=t(c);TM&&e.global===h&&(a.__i18nWatcher=tt(h.locale,()=>{c.instance&&c.instance.$forceUpdate()})),a.__composer=h,a.textContent=u},unmounted:a=>{TM&&a.__i18nWatcher&&(a.__i18nWatcher(),a.__i18nWatcher=void 0,delete a.__i18nWatcher),a.__composer&&(a.__composer=void 0,delete a.__composer)},beforeUpdate:(a,{value:c})=>{if(a.__composer){const u=a.__composer,h=q2(c);a.textContent=Reflect.apply(u.t,u,[...J2(h)])}},getSSRProps:a=>{const[c]=t(a);return{textContent:c}}}}function q2(e){if(vn(e))return{path:e};if(Oo(e)){if(!("path"in e))throw ma(Hl.REQUIRED_VALUE,"path");return e}else throw ma(Hl.INVALID_VALUE)}function J2(e){const{path:t,locale:n,args:s,choice:i,plural:r}=e,a={},c=s||{};return vn(n)&&(a.locale=n),ci(i)&&(a.plural=i),ci(r)&&(a.plural=r),[t,c,a]}function jae(e,t,...n){const s=Oo(n[0])?n[0]:{};(Do(s.globalInstall)?s.globalInstall:!0)&&([j2.name,"I18nT"].forEach(r=>e.component(r,j2)),[Q2.name,"I18nN"].forEach(r=>e.component(r,Q2)),[eH.name,"I18nD"].forEach(r=>e.component(r,eH))),e.directive("t",Kae(t))}const Qae=Lp("global-vue-i18n");function qae(e={}){const t=__VUE_I18N_LEGACY_API__&&Do(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=Do(e.globalInjection)?e.globalInjection:!0,s=new Map,[i,r]=Jae(e,t),a=Lp("");function c(p){return s.get(p)||null}function u(p,_){s.set(p,_)}function h(p){s.delete(p)}const f={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(p,..._){if(p.__VUE_I18N_SYMBOL__=a,p.provide(p.__VUE_I18N_SYMBOL__,f),Oo(_[0])){const b=_[0];f.__composerExtend=b.__composerExtend,f.__vueI18nExtend=b.__vueI18nExtend}let E=null;!t&&n&&(E=rce(p,f.global)),__VUE_I18N_FULL_INSTALL__&&jae(p,f,..._),__VUE_I18N_LEGACY_API__&&t&&p.mixin(Vae(r,r.__composer,f));const v=p.unmount;p.unmount=()=>{E&&E(),f.dispose(),v()}},get global(){return r},dispose(){i.stop()},__instances:s,__getInstance:c,__setInstance:u,__deleteInstance:h};return f}function hc(e={}){const t=pn();if(t==null)throw ma(Hl.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw ma(Hl.NOT_INSTALLED);const n=Zae(t),s=tce(n),i=w8(t),r=ece(e,i);if(r==="global")return k8(s,e,i),s;if(r==="parent"){let u=nce(n,t,e.__useComponent);return u==null&&(u=s),u}const a=n;let c=a.__getInstance(t);if(c==null){const u=Ci({},e);"__i18n"in i&&(u.__i18n=i.__i18n),s&&(u.__root=s),c=uD(u),a.__composerExtend&&(c[IN]=a.__composerExtend(c)),sce(a,t,c),a.__setInstance(t,c)}return c}function Jae(e,t){const n=YM(),s=__VUE_I18N_LEGACY_API__&&t?n.run(()=>RN(e)):n.run(()=>uD(e));if(s==null)throw ma(Hl.UNEXPECTED_ERROR);return[n,s]}function Zae(e){const t=It(e.isCE?Qae:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw ma(e.isCE?Hl.NOT_INSTALLED_WITH_PROVIDE:Hl.UNEXPECTED_ERROR);return t}function ece(e,t){return vA(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function tce(e){return e.mode==="composition"?e.global:e.global.__composer}function nce(e,t,n=!1){let s=null;const i=t.root;let r=oce(t,n);for(;r!=null;){const a=e;if(e.mode==="composition")s=a.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const c=a.__getInstance(r);c!=null&&(s=c.__composer,n&&s&&!s[L8]&&(s=null))}if(s!=null||i===r)break;r=r.parent}return s}function oce(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function sce(e,t,n){rn(()=>{},t),Ch(()=>{const s=n;e.__deleteInstance(t);const i=s[IN];i&&(i(),delete s[IN])},t)}const ice=["locale","fallbackLocale","availableLocales"],Z2=["t","rt","d","n","tm","te"];function rce(e,t){const n=Object.create(null);return ice.forEach(i=>{const r=Object.getOwnPropertyDescriptor(t,i);if(!r)throw ma(Hl.UNEXPECTED_ERROR);const a=po(r.value)?{get(){return r.value.value},set(c){r.value.value=c}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,i,a)}),e.config.globalProperties.$i18n=n,Z2.forEach(i=>{const r=Object.getOwnPropertyDescriptor(t,i);if(!r||!r.value)throw ma(Hl.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${i}`,r)}),()=>{delete e.config.globalProperties.$i18n,Z2.forEach(i=>{delete e.config.globalProperties[`$${i}`]})}}const lce=Re({name:"i18n-d",props:Ci({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},dD),setup(e,t){const n=e.i18n||hc({useScope:e.scope,__useComponent:!0});return P8(e,t,I8,(...s)=>n[yN](...s))}}),eH=lce;Bae();mae(qle);_ae(fae);Tae(v8);if(__INTLIFY_PROD_DEVTOOLS__){const e=cm();e.__INTLIFY__=!0,Jle(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const ace={class:"device-header"},cce={class:"device-header-title"},uce={key:0,class:"device-detect"},dce={key:1,class:"device-detect"},hce=["href"],fce={class:"device-detect-btn"},pce={__name:"deviceHeader",setup(e){const{t}=hc(),n=K(t("message.wired_connection")),s=sC.useUploaders(),i=K(!1),r=K(!0),a=K(`${za.name} ${za.version}`),c=K(za.os.toString()),u=K(""),h=K(!1),f=K(!1),p=K(!1),_=K(""),E=K("");rn(()=>{b(za.os.family,za.os.version),y(za.name,za.version),E.value=za.os.toString().indexOf("64-bit")!=-1?"//cocorobo.cn/downloads/Windows6.1-KB2999226-x64.msu":"//cocorobo.cn/downloads/Windows6.1-KB2999226-x86.msu",S()});const v=()=>{r.value=!1,b(za.os.family,za.os.version),y(za.name,za.version),S()},b=(I,R)=>{let w={int:10,float:9},k={10:10,"10 Technical Preview":6.4,"8.1":6.3,8:6.2,7:6.1,Vista:6,"XP 64-bit":5.2,XP:5.1,"2000 SP1":5.01,2e3:5,NT:4,ME:4.9},D=!1;if(I.toLowerCase().indexOf("windows")>-1)k[R]>=5.1&&(D=!0);else if(I.toLowerCase().indexOf("os x")>-1){const P=R.split(".");(P[0]>w.int||parseInt(P[0])===w.int&&P[1]>=w.float)&&(D=!0)}h.value=D},y=(I,R)=>{let w=!1;const k=(D,P)=>R.split(D)[0]>P;I==="Chrome"||I==="Firefox"?w=k(".",50):I==="Opera"?w=k(".",43):I==="Safari"?w=k(".",10):I==="Maxthon"&&(w=k(".",4)),f.value=w},S=()=>{let I=s.uploaders.version;if(!I)return u.value="",p.value=!1,!1;if(I==_N.uploader)p.value=!0;else{const R=L(I,_N.uploader)>0;p.value=R,_.value=R?"":"版本不是最新,建议更新"}},L=(I,R)=>{const w=I.split(".").map(Number),k=R.split(".").map(Number);for(let D=0;D<Math.max(w.length,k.length);D++){const P=w[D]||0,B=k[D]||0;if(P>B)return 1;if(P<B)return-1}return 0};return Zs(()=>{u.value=s.uploaders.version}),(I,R)=>{const w=Ot("el-option"),k=Ot("el-select"),D=Ot("el-tooltip"),P=Ot("el-col"),B=Ot("el-row"),F=Ot("el-button"),X=Ot("el-dialog");return H(),le(Lt,null,[te("div",ace,[te("span",cce,Ke(I.$t("message.device")),1),oe(k,{modelValue:n.value,"onUpdate:modelValue":R[0]||(R[0]=G=>n.value=G),style:{width:"100px","margin-left":"10px"}},{default:de(()=>[oe(w,{value:I.$t("message.wired_connection")},{default:de(()=>[Xt(Ke(I.$t("message.wired_connection")),1)]),_:1},8,["value"]),oe(w,{value:I.$t("message.wireless_connection")},{default:de(()=>[Xt(Ke(I.$t("message.wireless_connection")),1)]),_:1},8,["value"])]),_:1},8,["modelValue"]),g(s).uploaders.status?(H(),Ye(D,{key:0,content:I.$t("message.uploader_connection")},{default:de(()=>R[3]||(R[3]=[te("img",{src:Yre,alt:""},null,-1)])),_:1},8,["content"])):(H(),Ye(D,{key:1,content:I.$t("message.not_uploader_connection")},{default:de(()=>[te("img",{src:Kre,alt:"",onClick:R[1]||(R[1]=G=>i.value=!0)})]),_:1},8,["content"])),R[4]||(R[4]=te("img",{class:"device-header-img-right",src:jre,alt:""},null,-1)),R[5]||(R[5]=te("img",{class:"device-header-img-right",src:Qre,alt:""},null,-1))]),oe(X,{modelValue:i.value,"onUpdate:modelValue":R[2]||(R[2]=G=>i.value=G)},{default:de(()=>[R[17]||(R[17]=te("div",{slot:"header"},[te("h1",null,"环境检测")],-1)),r.value?(H(),le("div",uce,R[6]||(R[6]=[te("img",{src:qre,alt:""},null,-1)]))):(H(),le("div",dce,[oe(B,{class:"device-detect-table"},{default:de(()=>[oe(P,{span:5},{default:de(()=>R[7]||(R[7]=[Xt("设备")])),_:1}),oe(P,{span:5},{default:de(()=>R[8]||(R[8]=[Xt("结果")])),_:1}),oe(P,{span:5},{default:de(()=>R[9]||(R[9]=[Xt("支持")])),_:1}),oe(P,{span:9},{default:de(()=>R[10]||(R[10]=[Xt("建议")])),_:1})]),_:1}),oe(B,{class:"device-detect-table-title"},{default:de(()=>[oe(P,{span:5},{default:de(()=>R[11]||(R[11]=[Xt("系统")])),_:1}),oe(P,{span:5},{default:de(()=>[Xt(Ke(c.value),1)]),_:1}),oe(P,{span:5},{default:de(()=>[te("i",{class:"material-icons small",style:Bt(h.value?"color:#00cf00;":"color:#ffcf00;")},Ke(h.value?"check":"priority_high"),5)]),_:1}),oe(P,{span:9},{default:de(()=>[Xt(Ke(h.value?"支持":"不支持"),1)]),_:1})]),_:1}),oe(B,{class:"device-detect-table-title"},{default:de(()=>[oe(P,{span:5},{default:de(()=>R[12]||(R[12]=[Xt("浏览器")])),_:1}),oe(P,{span:5},{default:de(()=>[Xt(Ke(a.value),1)]),_:1}),oe(P,{span:5},{default:de(()=>[te("i",{class:"material-icons small",style:Bt(h.value?"color:#00cf00;":"color:#ffcf00;")},Ke(h.value?"check":"priority_high"),5)]),_:1}),oe(P,{span:9},{default:de(()=>[Xt(Ke(h.value?"支持":"不支持"),1)]),_:1})]),_:1}),oe(B,{class:"device-detect-table-title"},{default:de(()=>[oe(P,{span:5},{default:de(()=>R[13]||(R[13]=[Xt("Uploader")])),_:1}),oe(P,{span:5},{default:de(()=>[Xt(Ke(u.value||"没有打开"),1)]),_:1}),oe(P,{span:5},{default:de(()=>[te("i",{class:"material-icons small",style:Bt(p.value?"color:#00cf00;":"color:#ffcf00;")},Ke(p.value?"check":"priority_high"),5)]),_:1}),oe(P,{span:9},{default:de(()=>[Xt(Ke(u.value?"uploader已连接":"Uploader 未连接"),1),R[14]||(R[14]=te("br",null,null,-1)),Xt(" "+Ke(_.value),1)]),_:1})]),_:1}),oe(B,{class:"device-detect-table-title"},{default:de(()=>[oe(P,{span:5},{default:de(()=>R[15]||(R[15]=[Xt("补丁")])),_:1}),oe(P,{span:5},{default:de(()=>[te("a",{href:E.value,target:"_blank",download:"kb2999226 64-bit",style:{color:"#039be5"}},"kb2999226 64-bit",8,hce)]),_:1})]),_:1})])),te("div",fce,[oe(F,{type:"primary",onClick:v},{default:de(()=>R[16]||(R[16]=[Xt("开始检测")])),_:1})])]),_:1},8,["modelValue"])],64)}}},gce=Gl(pce,[["__scopeId","data-v-53ab4d91"]]);function D8(e,t){return function(){return e.apply(t,arguments)}}const{toString:mce}=Object.prototype,{getPrototypeOf:hD}=Object,SA=(e=>t=>{const n=mce.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Jc=e=>(e=e.toLowerCase(),t=>SA(t)===e),yA=e=>t=>typeof t===e,{isArray:av}=Array,wy=yA("undefined");function _ce(e){return e!==null&&!wy(e)&&e.constructor!==null&&!wy(e.constructor)&&fa(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const x8=Jc("ArrayBuffer");function Tce(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&x8(e.buffer),t}const Ece=yA("string"),fa=yA("function"),B8=yA("number"),$A=e=>e!==null&&typeof e=="object",vce=e=>e===!0||e===!1,rC=e=>{if(SA(e)!=="object")return!1;const t=hD(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},bce=Jc("Date"),Oce=Jc("File"),Sce=Jc("Blob"),yce=Jc("FileList"),$ce=e=>$A(e)&&fa(e.pipe),Ice=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||fa(e.append)&&((t=SA(e))==="formdata"||t==="object"&&fa(e.toString)&&e.toString()==="[object FormData]"))},Rce=Jc("URLSearchParams"),[Cce,Mce,Ace,Lce]=["ReadableStream","Request","Response","Headers"].map(Jc),wce=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _$(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,i;if(typeof e!="object"&&(e=[e]),av(e))for(s=0,i=e.length;s<i;s++)t.call(null,e[s],s,e);else{const r=n?Object.getOwnPropertyNames(e):Object.keys(e),a=r.length;let c;for(s=0;s<a;s++)c=r[s],t.call(null,e[c],c,e)}}function F8(e,t){t=t.toLowerCase();const n=Object.keys(e);let s=n.length,i;for(;s-- >0;)if(i=n[s],t===i.toLowerCase())return i;return null}const um=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,U8=e=>!wy(e)&&e!==um;function CN(){const{caseless:e}=U8(this)&&this||{},t={},n=(s,i)=>{const r=e&&F8(t,i)||i;rC(t[r])&&rC(s)?t[r]=CN(t[r],s):rC(s)?t[r]=CN({},s):av(s)?t[r]=s.slice():t[r]=s};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&_$(arguments[s],n);return t}const kce=(e,t,n,{allOwnKeys:s}={})=>(_$(t,(i,r)=>{n&&fa(i)?e[r]=D8(i,n):e[r]=i},{allOwnKeys:s}),e),Nce=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Pce=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Dce=(e,t,n,s)=>{let i,r,a;const c={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),r=i.length;r-- >0;)a=i[r],(!s||s(a,e,t))&&!c[a]&&(t[a]=e[a],c[a]=!0);e=n!==!1&&hD(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},xce=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},Bce=e=>{if(!e)return null;if(av(e))return e;let t=e.length;if(!B8(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Fce=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&hD(Uint8Array)),Uce=(e,t)=>{const s=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=s.next())&&!i.done;){const r=i.value;t.call(e,r[0],r[1])}},Hce=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},Vce=Jc("HTMLFormElement"),Gce=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,i){return s.toUpperCase()+i}),tH=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Wce=Jc("RegExp"),H8=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};_$(n,(i,r)=>{let a;(a=t(i,r,e))!==!1&&(s[r]=a||i)}),Object.defineProperties(e,s)},Xce=e=>{H8(e,(t,n)=>{if(fa(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=e[n];if(fa(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},zce=(e,t)=>{const n={},s=i=>{i.forEach(r=>{n[r]=!0})};return av(e)?s(e):s(String(e).split(t)),n},Yce=()=>{},Kce=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,vw="abcdefghijklmnopqrstuvwxyz",nH="0123456789",V8={DIGIT:nH,ALPHA:vw,ALPHA_DIGIT:vw+vw.toUpperCase()+nH},jce=(e=16,t=V8.ALPHA_DIGIT)=>{let n="";const{length:s}=t;for(;e--;)n+=t[Math.random()*s|0];return n};function Qce(e){return!!(e&&fa(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const qce=e=>{const t=new Array(10),n=(s,i)=>{if($A(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[i]=s;const r=av(s)?[]:{};return _$(s,(a,c)=>{const u=n(a,i+1);!wy(u)&&(r[c]=u)}),t[i]=void 0,r}}return s};return n(e,0)},Jce=Jc("AsyncFunction"),Zce=e=>e&&($A(e)||fa(e))&&fa(e.then)&&fa(e.catch),G8=((e,t)=>e?setImmediate:t?((n,s)=>(um.addEventListener("message",({source:i,data:r})=>{i===um&&r===n&&s.length&&s.shift()()},!1),i=>{s.push(i),um.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",fa(um.postMessage)),eue=typeof queueMicrotask<"u"?queueMicrotask.bind(um):typeof process<"u"&&process.nextTick||G8,yt={isArray:av,isArrayBuffer:x8,isBuffer:_ce,isFormData:Ice,isArrayBufferView:Tce,isString:Ece,isNumber:B8,isBoolean:vce,isObject:$A,isPlainObject:rC,isReadableStream:Cce,isRequest:Mce,isResponse:Ace,isHeaders:Lce,isUndefined:wy,isDate:bce,isFile:Oce,isBlob:Sce,isRegExp:Wce,isFunction:fa,isStream:$ce,isURLSearchParams:Rce,isTypedArray:Fce,isFileList:yce,forEach:_$,merge:CN,extend:kce,trim:wce,stripBOM:Nce,inherits:Pce,toFlatObject:Dce,kindOf:SA,kindOfTest:Jc,endsWith:xce,toArray:Bce,forEachEntry:Uce,matchAll:Hce,isHTMLForm:Vce,hasOwnProperty:tH,hasOwnProp:tH,reduceDescriptors:H8,freezeMethods:Xce,toObjectSet:zce,toCamelCase:Gce,noop:Yce,toFiniteNumber:Kce,findKey:F8,global:um,isContextDefined:U8,ALPHABET:V8,generateString:jce,isSpecCompliantForm:Qce,toJSONObject:qce,isAsyncFn:Jce,isThenable:Zce,setImmediate:G8,asap:eue};function to(e,t,n,s,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),i&&(this.response=i,this.status=i.status?i.status:null)}yt.inherits(to,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:yt.toJSONObject(this.config),code:this.code,status:this.status}}});const W8=to.prototype,X8={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{X8[e]={value:e}});Object.defineProperties(to,X8);Object.defineProperty(W8,"isAxiosError",{value:!0});to.from=(e,t,n,s,i,r)=>{const a=Object.create(W8);return yt.toFlatObject(e,a,function(u){return u!==Error.prototype},c=>c!=="isAxiosError"),to.call(a,e.message,t,n,s,i),a.cause=e,a.name=e.name,r&&Object.assign(a,r),a};const tue=null;function MN(e){return yt.isPlainObject(e)||yt.isArray(e)}function z8(e){return yt.endsWith(e,"[]")?e.slice(0,-2):e}function oH(e,t,n){return e?e.concat(t).map(function(i,r){return i=z8(i),!n&&r?"["+i+"]":i}).join(n?".":""):t}function nue(e){return yt.isArray(e)&&!e.some(MN)}const oue=yt.toFlatObject(yt,{},null,function(t){return/^is[A-Z]/.test(t)});function IA(e,t,n){if(!yt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=yt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,y){return!yt.isUndefined(y[b])});const s=n.metaTokens,i=n.visitor||f,r=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&yt.isSpecCompliantForm(t);if(!yt.isFunction(i))throw new TypeError("visitor must be a function");function h(v){if(v===null)return"";if(yt.isDate(v))return v.toISOString();if(!u&&yt.isBlob(v))throw new to("Blob is not supported. Use a Buffer instead.");return yt.isArrayBuffer(v)||yt.isTypedArray(v)?u&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function f(v,b,y){let S=v;if(v&&!y&&typeof v=="object"){if(yt.endsWith(b,"{}"))b=s?b:b.slice(0,-2),v=JSON.stringify(v);else if(yt.isArray(v)&&nue(v)||(yt.isFileList(v)||yt.endsWith(b,"[]"))&&(S=yt.toArray(v)))return b=z8(b),S.forEach(function(I,R){!(yt.isUndefined(I)||I===null)&&t.append(a===!0?oH([b],R,r):a===null?b:b+"[]",h(I))}),!1}return MN(v)?!0:(t.append(oH(y,b,r),h(v)),!1)}const p=[],_=Object.assign(oue,{defaultVisitor:f,convertValue:h,isVisitable:MN});function E(v,b){if(!yt.isUndefined(v)){if(p.indexOf(v)!==-1)throw Error("Circular reference detected in "+b.join("."));p.push(v),yt.forEach(v,function(S,L){(!(yt.isUndefined(S)||S===null)&&i.call(t,S,yt.isString(L)?L.trim():L,b,_))===!0&&E(S,b?b.concat(L):[L])}),p.pop()}}if(!yt.isObject(e))throw new TypeError("data must be an object");return E(e),t}function sH(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function fD(e,t){this._pairs=[],e&&IA(e,this,t)}const Y8=fD.prototype;Y8.append=function(t,n){this._pairs.push([t,n])};Y8.toString=function(t){const n=t?function(s){return t.call(this,s,sH)}:sH;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function sue(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function K8(e,t,n){if(!t)return e;const s=n&&n.encode||sue;yt.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let r;if(i?r=i(t,n):r=yt.isURLSearchParams(t)?t.toString():new fD(t,n).toString(s),r){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+r}return e}class iH{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){yt.forEach(this.handlers,function(s){s!==null&&t(s)})}}const j8={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},iue=typeof URLSearchParams<"u"?URLSearchParams:fD,rue=typeof FormData<"u"?FormData:null,lue=typeof Blob<"u"?Blob:null,aue={isBrowser:!0,classes:{URLSearchParams:iue,FormData:rue,Blob:lue},protocols:["http","https","file","blob","url","data"]},pD=typeof window<"u"&&typeof document<"u",AN=typeof navigator=="object"&&navigator||void 0,cue=pD&&(!AN||["ReactNative","NativeScript","NS"].indexOf(AN.product)<0),uue=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",due=pD&&window.location.href||"http://localhost",hue=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pD,hasStandardBrowserEnv:cue,hasStandardBrowserWebWorkerEnv:uue,navigator:AN,origin:due},Symbol.toStringTag,{value:"Module"})),Lr={...hue,...aue};function fue(e,t){return IA(e,new Lr.classes.URLSearchParams,Object.assign({visitor:function(n,s,i,r){return Lr.isNode&&yt.isBuffer(n)?(this.append(s,n.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function pue(e){return yt.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function gue(e){const t={},n=Object.keys(e);let s;const i=n.length;let r;for(s=0;s<i;s++)r=n[s],t[r]=e[r];return t}function Q8(e){function t(n,s,i,r){let a=n[r++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),u=r>=n.length;return a=!a&&yt.isArray(i)?i.length:a,u?(yt.hasOwnProp(i,a)?i[a]=[i[a],s]:i[a]=s,!c):((!i[a]||!yt.isObject(i[a]))&&(i[a]=[]),t(n,s,i[a],r)&&yt.isArray(i[a])&&(i[a]=gue(i[a])),!c)}if(yt.isFormData(e)&&yt.isFunction(e.entries)){const n={};return yt.forEachEntry(e,(s,i)=>{t(pue(s),i,n,0)}),n}return null}function mue(e,t,n){if(yt.isString(e))try{return(t||JSON.parse)(e),yt.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(0,JSON.stringify)(e)}const T$={transitional:j8,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",i=s.indexOf("application/json")>-1,r=yt.isObject(t);if(r&&yt.isHTMLForm(t)&&(t=new FormData(t)),yt.isFormData(t))return i?JSON.stringify(Q8(t)):t;if(yt.isArrayBuffer(t)||yt.isBuffer(t)||yt.isStream(t)||yt.isFile(t)||yt.isBlob(t)||yt.isReadableStream(t))return t;if(yt.isArrayBufferView(t))return t.buffer;if(yt.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(r){if(s.indexOf("application/x-www-form-urlencoded")>-1)return fue(t,this.formSerializer).toString();if((c=yt.isFileList(t))||s.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return IA(c?{"files[]":t}:t,u&&new u,this.formSerializer)}}return r||i?(n.setContentType("application/json",!1),mue(t)):t}],transformResponse:[function(t){const n=this.transitional||T$.transitional,s=n&&n.forcedJSONParsing,i=this.responseType==="json";if(yt.isResponse(t)||yt.isReadableStream(t))return t;if(t&&yt.isString(t)&&(s&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(c){if(a)throw c.name==="SyntaxError"?to.from(c,to.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lr.classes.FormData,Blob:Lr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};yt.forEach(["delete","get","head","post","put","patch"],e=>{T$.headers[e]={}});const _ue=yt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Tue=e=>{const t={};let n,s,i;return e&&e.split(`
  1871. `).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),s=a.substring(i+1).trim(),!(!n||t[n]&&_ue[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t},rH=Symbol("internals");function _S(e){return e&&String(e).trim().toLowerCase()}function lC(e){return e===!1||e==null?e:yt.isArray(e)?e.map(lC):String(e)}function Eue(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const vue=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function bw(e,t,n,s,i){if(yt.isFunction(s))return s.call(this,t,n);if(i&&(t=n),!!yt.isString(t)){if(yt.isString(s))return t.indexOf(s)!==-1;if(yt.isRegExp(s))return s.test(t)}}function bue(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function Oue(e,t){const n=yt.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{value:function(i,r,a){return this[s].call(this,t,i,r,a)},configurable:!0})})}class xl{constructor(t){t&&this.set(t)}set(t,n,s){const i=this;function r(c,u,h){const f=_S(u);if(!f)throw new Error("header name must be a non-empty string");const p=yt.findKey(i,f);(!p||i[p]===void 0||h===!0||h===void 0&&i[p]!==!1)&&(i[p||u]=lC(c))}const a=(c,u)=>yt.forEach(c,(h,f)=>r(h,f,u));if(yt.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(yt.isString(t)&&(t=t.trim())&&!vue(t))a(Tue(t),n);else if(yt.isHeaders(t))for(const[c,u]of t.entries())r(u,c,s);else t!=null&&r(n,t,s);return this}get(t,n){if(t=_S(t),t){const s=yt.findKey(this,t);if(s){const i=this[s];if(!n)return i;if(n===!0)return Eue(i);if(yt.isFunction(n))return n.call(this,i,s);if(yt.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=_S(t),t){const s=yt.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||bw(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let i=!1;function r(a){if(a=_S(a),a){const c=yt.findKey(s,a);c&&(!n||bw(s,s[c],c,n))&&(delete s[c],i=!0)}}return yt.isArray(t)?t.forEach(r):r(t),i}clear(t){const n=Object.keys(this);let s=n.length,i=!1;for(;s--;){const r=n[s];(!t||bw(this,this[r],r,t,!0))&&(delete this[r],i=!0)}return i}normalize(t){const n=this,s={};return yt.forEach(this,(i,r)=>{const a=yt.findKey(s,r);if(a){n[a]=lC(i),delete n[r];return}const c=t?bue(r):String(r).trim();c!==r&&delete n[r],n[c]=lC(i),s[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return yt.forEach(this,(s,i)=>{s!=null&&s!==!1&&(n[i]=t&&yt.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
  1872. `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(i=>s.set(i)),s}static accessor(t){const s=(this[rH]=this[rH]={accessors:{}}).accessors,i=this.prototype;function r(a){const c=_S(a);s[c]||(Oue(i,a),s[c]=!0)}return yt.isArray(t)?t.forEach(r):r(t),this}}xl.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);yt.reduceDescriptors(xl.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});yt.freezeMethods(xl);function Ow(e,t){const n=this||T$,s=t||n,i=xl.from(s.headers);let r=s.data;return yt.forEach(e,function(c){r=c.call(n,r,i.normalize(),t?t.status:void 0)}),i.normalize(),r}function q8(e){return!!(e&&e.__CANCEL__)}function cv(e,t,n){to.call(this,e??"canceled",to.ERR_CANCELED,t,n),this.name="CanceledError"}yt.inherits(cv,to,{__CANCEL__:!0});function J8(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new to("Request failed with status code "+n.status,[to.ERR_BAD_REQUEST,to.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Sue(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function yue(e,t){e=e||10;const n=new Array(e),s=new Array(e);let i=0,r=0,a;return t=t!==void 0?t:1e3,function(u){const h=Date.now(),f=s[r];a||(a=h),n[i]=u,s[i]=h;let p=r,_=0;for(;p!==i;)_+=n[p++],p=p%e;if(i=(i+1)%e,i===r&&(r=(r+1)%e),h-a<t)return;const E=f&&h-f;return E?Math.round(_*1e3/E):void 0}}function $ue(e,t){let n=0,s=1e3/t,i,r;const a=(h,f=Date.now())=>{n=f,i=null,r&&(clearTimeout(r),r=null),e.apply(null,h)};return[(...h)=>{const f=Date.now(),p=f-n;p>=s?a(h,f):(i=h,r||(r=setTimeout(()=>{r=null,a(i)},s-p)))},()=>i&&a(i)]}const EM=(e,t,n=3)=>{let s=0;const i=yue(50,250);return $ue(r=>{const a=r.loaded,c=r.lengthComputable?r.total:void 0,u=a-s,h=i(u),f=a<=c;s=a;const p={loaded:a,total:c,progress:c?a/c:void 0,bytes:u,rate:h||void 0,estimated:h&&c&&f?(c-a)/h:void 0,event:r,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(p)},n)},lH=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},aH=e=>(...t)=>yt.asap(()=>e(...t)),Iue=Lr.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Lr.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Lr.origin),Lr.navigator&&/(msie|trident)/i.test(Lr.navigator.userAgent)):()=>!0,Rue=Lr.hasStandardBrowserEnv?{write(e,t,n,s,i,r){const a=[e+"="+encodeURIComponent(t)];yt.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),yt.isString(s)&&a.push("path="+s),yt.isString(i)&&a.push("domain="+i),r===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Cue(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Mue(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Z8(e,t){return e&&!Cue(t)?Mue(e,t):t}const cH=e=>e instanceof xl?{...e}:e;function Nm(e,t){t=t||{};const n={};function s(h,f,p,_){return yt.isPlainObject(h)&&yt.isPlainObject(f)?yt.merge.call({caseless:_},h,f):yt.isPlainObject(f)?yt.merge({},f):yt.isArray(f)?f.slice():f}function i(h,f,p,_){if(yt.isUndefined(f)){if(!yt.isUndefined(h))return s(void 0,h,p,_)}else return s(h,f,p,_)}function r(h,f){if(!yt.isUndefined(f))return s(void 0,f)}function a(h,f){if(yt.isUndefined(f)){if(!yt.isUndefined(h))return s(void 0,h)}else return s(void 0,f)}function c(h,f,p){if(p in t)return s(h,f);if(p in e)return s(void 0,h)}const u={url:r,method:r,data:r,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(h,f,p)=>i(cH(h),cH(f),p,!0)};return yt.forEach(Object.keys(Object.assign({},e,t)),function(f){const p=u[f]||i,_=p(e[f],t[f],f);yt.isUndefined(_)&&p!==c||(n[f]=_)}),n}const e5=e=>{const t=Nm({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:r,headers:a,auth:c}=t;t.headers=a=xl.from(a),t.url=K8(Z8(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let u;if(yt.isFormData(n)){if(Lr.hasStandardBrowserEnv||Lr.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[h,...f]=u?u.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([h||"multipart/form-data",...f].join("; "))}}if(Lr.hasStandardBrowserEnv&&(s&&yt.isFunction(s)&&(s=s(t)),s||s!==!1&&Iue(t.url))){const h=i&&r&&Rue.read(r);h&&a.set(i,h)}return t},Aue=typeof XMLHttpRequest<"u",Lue=Aue&&function(e){return new Promise(function(n,s){const i=e5(e);let r=i.data;const a=xl.from(i.headers).normalize();let{responseType:c,onUploadProgress:u,onDownloadProgress:h}=i,f,p,_,E,v;function b(){E&&E(),v&&v(),i.cancelToken&&i.cancelToken.unsubscribe(f),i.signal&&i.signal.removeEventListener("abort",f)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function S(){if(!y)return;const I=xl.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),w={data:!c||c==="text"||c==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:I,config:e,request:y};J8(function(D){n(D),b()},function(D){s(D),b()},w),y=null}"onloadend"in y?y.onloadend=S:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(S)},y.onabort=function(){y&&(s(new to("Request aborted",to.ECONNABORTED,e,y)),y=null)},y.onerror=function(){s(new to("Network Error",to.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let R=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const w=i.transitional||j8;i.timeoutErrorMessage&&(R=i.timeoutErrorMessage),s(new to(R,w.clarifyTimeoutError?to.ETIMEDOUT:to.ECONNABORTED,e,y)),y=null},r===void 0&&a.setContentType(null),"setRequestHeader"in y&&yt.forEach(a.toJSON(),function(R,w){y.setRequestHeader(w,R)}),yt.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),c&&c!=="json"&&(y.responseType=i.responseType),h&&([_,v]=EM(h,!0),y.addEventListener("progress",_)),u&&y.upload&&([p,E]=EM(u),y.upload.addEventListener("progress",p),y.upload.addEventListener("loadend",E)),(i.cancelToken||i.signal)&&(f=I=>{y&&(s(!I||I.type?new cv(null,e,y):I),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(f),i.signal&&(i.signal.aborted?f():i.signal.addEventListener("abort",f)));const L=Sue(i.url);if(L&&Lr.protocols.indexOf(L)===-1){s(new to("Unsupported protocol "+L+":",to.ERR_BAD_REQUEST,e));return}y.send(r||null)})},wue=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let s=new AbortController,i;const r=function(h){if(!i){i=!0,c();const f=h instanceof Error?h:this.reason;s.abort(f instanceof to?f:new cv(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,r(new to(`timeout ${t} of ms exceeded`,to.ETIMEDOUT))},t);const c=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(r):h.removeEventListener("abort",r)}),e=null)};e.forEach(h=>h.addEventListener("abort",r));const{signal:u}=s;return u.unsubscribe=()=>yt.asap(c),u}},kue=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let s=0,i;for(;s<n;)i=s+t,yield e.slice(s,i),s=i},Nue=async function*(e,t){for await(const n of Pue(e))yield*kue(n,t)},Pue=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:s}=await t.read();if(n)break;yield s}}finally{await t.cancel()}},uH=(e,t,n,s)=>{const i=Nue(e,t);let r=0,a,c=u=>{a||(a=!0,s&&s(u))};return new ReadableStream({async pull(u){try{const{done:h,value:f}=await i.next();if(h){c(),u.close();return}let p=f.byteLength;if(n){let _=r+=p;n(_)}u.enqueue(new Uint8Array(f))}catch(h){throw c(h),h}},cancel(u){return c(u),i.return()}},{highWaterMark:2})},RA=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",t5=RA&&typeof ReadableStream=="function",Due=RA&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),n5=(e,...t)=>{try{return!!e(...t)}catch{return!1}},xue=t5&&n5(()=>{let e=!1;const t=new Request(Lr.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),dH=64*1024,LN=t5&&n5(()=>yt.isReadableStream(new Response("").body)),vM={stream:LN&&(e=>e.body)};RA&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!vM[t]&&(vM[t]=yt.isFunction(e[t])?n=>n[t]():(n,s)=>{throw new to(`Response type '${t}' is not supported`,to.ERR_NOT_SUPPORT,s)})})})(new Response);const Bue=async e=>{if(e==null)return 0;if(yt.isBlob(e))return e.size;if(yt.isSpecCompliantForm(e))return(await new Request(Lr.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(yt.isArrayBufferView(e)||yt.isArrayBuffer(e))return e.byteLength;if(yt.isURLSearchParams(e)&&(e=e+""),yt.isString(e))return(await Due(e)).byteLength},Fue=async(e,t)=>{const n=yt.toFiniteNumber(e.getContentLength());return n??Bue(t)},Uue=RA&&(async e=>{let{url:t,method:n,data:s,signal:i,cancelToken:r,timeout:a,onDownloadProgress:c,onUploadProgress:u,responseType:h,headers:f,withCredentials:p="same-origin",fetchOptions:_}=e5(e);h=h?(h+"").toLowerCase():"text";let E=wue([i,r&&r.toAbortSignal()],a),v;const b=E&&E.unsubscribe&&(()=>{E.unsubscribe()});let y;try{if(u&&xue&&n!=="get"&&n!=="head"&&(y=await Fue(f,s))!==0){let w=new Request(t,{method:"POST",body:s,duplex:"half"}),k;if(yt.isFormData(s)&&(k=w.headers.get("content-type"))&&f.setContentType(k),w.body){const[D,P]=lH(y,EM(aH(u)));s=uH(w.body,dH,D,P)}}yt.isString(p)||(p=p?"include":"omit");const S="credentials"in Request.prototype;v=new Request(t,{..._,signal:E,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:s,duplex:"half",credentials:S?p:void 0});let L=await fetch(v);const I=LN&&(h==="stream"||h==="response");if(LN&&(c||I&&b)){const w={};["status","statusText","headers"].forEach(B=>{w[B]=L[B]});const k=yt.toFiniteNumber(L.headers.get("content-length")),[D,P]=c&&lH(k,EM(aH(c),!0))||[];L=new Response(uH(L.body,dH,D,()=>{P&&P(),b&&b()}),w)}h=h||"text";let R=await vM[yt.findKey(vM,h)||"text"](L,e);return!I&&b&&b(),await new Promise((w,k)=>{J8(w,k,{data:R,headers:xl.from(L.headers),status:L.status,statusText:L.statusText,config:e,request:v})})}catch(S){throw b&&b(),S&&S.name==="TypeError"&&/fetch/i.test(S.message)?Object.assign(new to("Network Error",to.ERR_NETWORK,e,v),{cause:S.cause||S}):to.from(S,S&&S.code,e,v)}}),wN={http:tue,xhr:Lue,fetch:Uue};yt.forEach(wN,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const hH=e=>`- ${e}`,Hue=e=>yt.isFunction(e)||e===null||e===!1,o5={getAdapter:e=>{e=yt.isArray(e)?e:[e];const{length:t}=e;let n,s;const i={};for(let r=0;r<t;r++){n=e[r];let a;if(s=n,!Hue(n)&&(s=wN[(a=String(n)).toLowerCase()],s===void 0))throw new to(`Unknown adapter '${a}'`);if(s)break;i[a||"#"+r]=s}if(!s){const r=Object.entries(i).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?r.length>1?`since :
  1873. `+r.map(hH).join(`
  1874. `):" "+hH(r[0]):"as no adapter specified";throw new to("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s},adapters:wN};function Sw(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new cv(null,e)}function fH(e){return Sw(e),e.headers=xl.from(e.headers),e.data=Ow.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),o5.getAdapter(e.adapter||T$.adapter)(e).then(function(s){return Sw(e),s.data=Ow.call(e,e.transformResponse,s),s.headers=xl.from(s.headers),s},function(s){return q8(s)||(Sw(e),s&&s.response&&(s.response.data=Ow.call(e,e.transformResponse,s.response),s.response.headers=xl.from(s.response.headers))),Promise.reject(s)})}const s5="1.7.9",CA={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{CA[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const pH={};CA.transitional=function(t,n,s){function i(r,a){return"[Axios v"+s5+"] Transitional option '"+r+"'"+a+(s?". "+s:"")}return(r,a,c)=>{if(t===!1)throw new to(i(a," has been removed"+(n?" in "+n:"")),to.ERR_DEPRECATED);return n&&!pH[a]&&(pH[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(r,a,c):!0}};CA.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function Vue(e,t,n){if(typeof e!="object")throw new to("options must be an object",to.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let i=s.length;for(;i-- >0;){const r=s[i],a=t[r];if(a){const c=e[r],u=c===void 0||a(c,r,e);if(u!==!0)throw new to("option "+r+" must be "+u,to.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new to("Unknown option "+r,to.ERR_BAD_OPTION)}}const aC={assertOptions:Vue,validators:CA},wu=aC.validators;class bm{constructor(t){this.defaults=t,this.interceptors={request:new iH,response:new iH}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const r=i.stack?i.stack.replace(/^.+\n/,""):"";try{s.stack?r&&!String(s.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(s.stack+=`
  1875. `+r):s.stack=r}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Nm(this.defaults,n);const{transitional:s,paramsSerializer:i,headers:r}=n;s!==void 0&&aC.assertOptions(s,{silentJSONParsing:wu.transitional(wu.boolean),forcedJSONParsing:wu.transitional(wu.boolean),clarifyTimeoutError:wu.transitional(wu.boolean)},!1),i!=null&&(yt.isFunction(i)?n.paramsSerializer={serialize:i}:aC.assertOptions(i,{encode:wu.function,serialize:wu.function},!0)),aC.assertOptions(n,{baseUrl:wu.spelling("baseURL"),withXsrfToken:wu.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=r&&yt.merge(r.common,r[n.method]);r&&yt.forEach(["delete","get","head","post","put","patch","common"],v=>{delete r[v]}),n.headers=xl.concat(a,r);const c=[];let u=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(u=u&&b.synchronous,c.unshift(b.fulfilled,b.rejected))});const h=[];this.interceptors.response.forEach(function(b){h.push(b.fulfilled,b.rejected)});let f,p=0,_;if(!u){const v=[fH.bind(this),void 0];for(v.unshift.apply(v,c),v.push.apply(v,h),_=v.length,f=Promise.resolve(n);p<_;)f=f.then(v[p++],v[p++]);return f}_=c.length;let E=n;for(p=0;p<_;){const v=c[p++],b=c[p++];try{E=v(E)}catch(y){b.call(this,y);break}}try{f=fH.call(this,E)}catch(v){return Promise.reject(v)}for(p=0,_=h.length;p<_;)f=f.then(h[p++],h[p++]);return f}getUri(t){t=Nm(this.defaults,t);const n=Z8(t.baseURL,t.url);return K8(n,t.params,t.paramsSerializer)}}yt.forEach(["delete","get","head","options"],function(t){bm.prototype[t]=function(n,s){return this.request(Nm(s||{},{method:t,url:n,data:(s||{}).data}))}});yt.forEach(["post","put","patch"],function(t){function n(s){return function(r,a,c){return this.request(Nm(c||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:r,data:a}))}}bm.prototype[t]=n(),bm.prototype[t+"Form"]=n(!0)});class gD{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(r){n=r});const s=this;this.promise.then(i=>{if(!s._listeners)return;let r=s._listeners.length;for(;r-- >0;)s._listeners[r](i);s._listeners=null}),this.promise.then=i=>{let r;const a=new Promise(c=>{s.subscribe(c),r=c}).then(i);return a.cancel=function(){s.unsubscribe(r)},a},t(function(r,a,c){s.reason||(s.reason=new cv(r,a,c),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new gD(function(i){t=i}),cancel:t}}}function Gue(e){return function(n){return e.apply(null,n)}}function Wue(e){return yt.isObject(e)&&e.isAxiosError===!0}const kN={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(kN).forEach(([e,t])=>{kN[t]=e});function i5(e){const t=new bm(e),n=D8(bm.prototype.request,t);return yt.extend(n,bm.prototype,t,{allOwnKeys:!0}),yt.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return i5(Nm(e,i))},n}const mo=i5(T$);mo.Axios=bm;mo.CanceledError=cv;mo.CancelToken=gD;mo.isCancel=q8;mo.VERSION=s5;mo.toFormData=IA;mo.AxiosError=to;mo.Cancel=mo.CanceledError;mo.all=function(t){return Promise.all(t)};mo.spread=Gue;mo.isAxiosError=Wue;mo.mergeConfig=Nm;mo.AxiosHeaders=xl;mo.formToJSON=e=>Q8(yt.isHTMLForm(e)?new FormData(e):e);mo.getAdapter=o5.getAdapter;mo.HttpStatusCode=kN;mo.default=mo;const Xue="2.9.1",gH=Symbol("INSTALLED_KEY"),r5=Symbol(),KS="el",zue="is-",Jg=(e,t,n,s,i)=>{let r=`${e}-${t}`;return n&&(r+=`-${n}`),s&&(r+=`__${s}`),i&&(r+=`--${i}`),r},l5=Symbol("namespaceContextKey"),mD=e=>{const t=e||(pn()?It(l5,K(KS)):K(KS));return x(()=>g(t)||KS)},rt=(e,t)=>{const n=mD(t);return{namespace:n,b:(b="")=>Jg(n.value,e,b,"",""),e:b=>b?Jg(n.value,e,"",b,""):"",m:b=>b?Jg(n.value,e,"","",b):"",be:(b,y)=>b&&y?Jg(n.value,e,b,y,""):"",em:(b,y)=>b&&y?Jg(n.value,e,"",b,y):"",bm:(b,y)=>b&&y?Jg(n.value,e,b,"",y):"",bem:(b,y,S)=>b&&y&&S?Jg(n.value,e,b,y,S):"",is:(b,...y)=>{const S=y.length>=1?y[0]:!0;return b&&S?`${zue}${b}`:""},cssVar:b=>{const y={};for(const S in b)b[S]&&(y[`--${n.value}-${S}`]=b[S]);return y},cssVarName:b=>`--${n.value}-${b}`,cssVarBlock:b=>{const y={};for(const S in b)b[S]&&(y[`--${n.value}-${e}-${S}`]=b[S]);return y},cssVarBlockName:b=>`--${n.value}-${e}-${b}`}};var a5=typeof global=="object"&&global&&global.Object===Object&&global,Yue=typeof self=="object"&&self&&self.Object===Object&&self,Zc=a5||Yue||Function("return this")(),lc=Zc.Symbol,c5=Object.prototype,Kue=c5.hasOwnProperty,jue=c5.toString,TS=lc?lc.toStringTag:void 0;function Que(e){var t=Kue.call(e,TS),n=e[TS];try{e[TS]=void 0;var s=!0}catch{}var i=jue.call(e);return s&&(t?e[TS]=n:delete e[TS]),i}var que=Object.prototype,Jue=que.toString;function Zue(e){return Jue.call(e)}var ede="[object Null]",tde="[object Undefined]",mH=lc?lc.toStringTag:void 0;function Wm(e){return e==null?e===void 0?tde:ede:mH&&mH in Object(e)?Que(e):Zue(e)}function qu(e){return e!=null&&typeof e=="object"}var nde="[object Symbol]";function MA(e){return typeof e=="symbol"||qu(e)&&Wm(e)==nde}function _D(e,t){for(var n=-1,s=e==null?0:e.length,i=Array(s);++n<s;)i[n]=t(e[n],n,e);return i}var al=Array.isArray,ode=1/0,_H=lc?lc.prototype:void 0,TH=_H?_H.toString:void 0;function u5(e){if(typeof e=="string")return e;if(al(e))return _D(e,u5)+"";if(MA(e))return TH?TH.call(e):"";var t=e+"";return t=="0"&&1/e==-ode?"-0":t}var sde=/\s/;function ide(e){for(var t=e.length;t--&&sde.test(e.charAt(t)););return t}var rde=/^\s+/;function lde(e){return e&&e.slice(0,ide(e)+1).replace(rde,"")}function cl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var EH=NaN,ade=/^[-+]0x[0-9a-f]+$/i,cde=/^0b[01]+$/i,ude=/^0o[0-7]+$/i,dde=parseInt;function vH(e){if(typeof e=="number")return e;if(MA(e))return EH;if(cl(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=cl(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=lde(e);var n=cde.test(e);return n||ude.test(e)?dde(e.slice(2),n?2:8):ade.test(e)?EH:+e}function TD(e){return e}var hde="[object AsyncFunction]",fde="[object Function]",pde="[object GeneratorFunction]",gde="[object Proxy]";function ED(e){if(!cl(e))return!1;var t=Wm(e);return t==fde||t==pde||t==hde||t==gde}var yw=Zc["__core-js_shared__"],bH=function(){var e=/[^.]+$/.exec(yw&&yw.keys&&yw.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function mde(e){return!!bH&&bH in e}var _de=Function.prototype,Tde=_de.toString;function Xm(e){if(e!=null){try{return Tde.call(e)}catch{}try{return e+""}catch{}}return""}var Ede=/[\\^$.*+?()[\]{}|]/g,vde=/^\[object .+?Constructor\]$/,bde=Function.prototype,Ode=Object.prototype,Sde=bde.toString,yde=Ode.hasOwnProperty,$de=RegExp("^"+Sde.call(yde).replace(Ede,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ide(e){if(!cl(e)||mde(e))return!1;var t=ED(e)?$de:vde;return t.test(Xm(e))}function Rde(e,t){return e==null?void 0:e[t]}function zm(e,t){var n=Rde(e,t);return Ide(n)?n:void 0}var NN=zm(Zc,"WeakMap"),OH=Object.create,Cde=function(){function e(){}return function(t){if(!cl(t))return{};if(OH)return OH(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Mde(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ade(){}function d5(e,t){var n=-1,s=e.length;for(t||(t=Array(s));++n<s;)t[n]=e[n];return t}var Lde=800,wde=16,kde=Date.now;function Nde(e){var t=0,n=0;return function(){var s=kde(),i=wde-(s-n);if(n=s,i>0){if(++t>=Lde)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Pde(e){return function(){return e}}var bM=function(){try{var e=zm(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Dde=bM?function(e,t){return bM(e,"toString",{configurable:!0,enumerable:!1,value:Pde(t),writable:!0})}:TD,h5=Nde(Dde);function xde(e,t){for(var n=-1,s=e==null?0:e.length;++n<s&&t(e[n],n,e)!==!1;);return e}function f5(e,t,n,s){for(var i=e.length,r=n+(s?1:-1);s?r--:++r<i;)if(t(e[r],r,e))return r;return-1}function Bde(e){return e!==e}function Fde(e,t,n){for(var s=n-1,i=e.length;++s<i;)if(e[s]===t)return s;return-1}function Ude(e,t,n){return t===t?Fde(e,t,n):f5(e,Bde,n)}function Hde(e,t){var n=e==null?0:e.length;return!!n&&Ude(e,t,0)>-1}var Vde=9007199254740991,Gde=/^(?:0|[1-9]\d*)$/;function AA(e,t){var n=typeof e;return t=t??Vde,!!t&&(n=="number"||n!="symbol"&&Gde.test(e))&&e>-1&&e%1==0&&e<t}function vD(e,t,n){t=="__proto__"&&bM?bM(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function E$(e,t){return e===t||e!==e&&t!==t}var Wde=Object.prototype,Xde=Wde.hasOwnProperty;function bD(e,t,n){var s=e[t];(!(Xde.call(e,t)&&E$(s,n))||n===void 0&&!(t in e))&&vD(e,t,n)}function uv(e,t,n,s){var i=!n;n||(n={});for(var r=-1,a=t.length;++r<a;){var c=t[r],u=void 0;u===void 0&&(u=e[c]),i?vD(n,c,u):bD(n,c,u)}return n}var SH=Math.max;function p5(e,t,n){return t=SH(t===void 0?e.length-1:t,0),function(){for(var s=arguments,i=-1,r=SH(s.length-t,0),a=Array(r);++i<r;)a[i]=s[t+i];i=-1;for(var c=Array(t+1);++i<t;)c[i]=s[i];return c[t]=n(a),Mde(e,this,c)}}function g5(e,t){return h5(p5(e,t,TD),e+"")}var zde=9007199254740991;function OD(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=zde}function dv(e){return e!=null&&OD(e.length)&&!ED(e)}function Yde(e,t,n){if(!cl(n))return!1;var s=typeof t;return(s=="number"?dv(n)&&AA(t,n.length):s=="string"&&t in n)?E$(n[t],e):!1}function Kde(e){return g5(function(t,n){var s=-1,i=n.length,r=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(r=e.length>3&&typeof r=="function"?(i--,r):void 0,a&&Yde(n[0],n[1],a)&&(r=i<3?void 0:r,i=1),t=Object(t);++s<i;){var c=n[s];c&&e(t,c,s,r)}return t})}var jde=Object.prototype;function SD(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||jde;return e===n}function Qde(e,t){for(var n=-1,s=Array(e);++n<e;)s[n]=t(n);return s}var qde="[object Arguments]";function yH(e){return qu(e)&&Wm(e)==qde}var m5=Object.prototype,Jde=m5.hasOwnProperty,Zde=m5.propertyIsEnumerable,ky=yH(function(){return arguments}())?yH:function(e){return qu(e)&&Jde.call(e,"callee")&&!Zde.call(e,"callee")};function ehe(){return!1}var _5=typeof da=="object"&&da&&!da.nodeType&&da,$H=_5&&typeof ha=="object"&&ha&&!ha.nodeType&&ha,the=$H&&$H.exports===_5,IH=the?Zc.Buffer:void 0,nhe=IH?IH.isBuffer:void 0,Ny=nhe||ehe,ohe="[object Arguments]",she="[object Array]",ihe="[object Boolean]",rhe="[object Date]",lhe="[object Error]",ahe="[object Function]",che="[object Map]",uhe="[object Number]",dhe="[object Object]",hhe="[object RegExp]",fhe="[object Set]",phe="[object String]",ghe="[object WeakMap]",mhe="[object ArrayBuffer]",_he="[object DataView]",The="[object Float32Array]",Ehe="[object Float64Array]",vhe="[object Int8Array]",bhe="[object Int16Array]",Ohe="[object Int32Array]",She="[object Uint8Array]",yhe="[object Uint8ClampedArray]",$he="[object Uint16Array]",Ihe="[object Uint32Array]",ys={};ys[The]=ys[Ehe]=ys[vhe]=ys[bhe]=ys[Ohe]=ys[She]=ys[yhe]=ys[$he]=ys[Ihe]=!0;ys[ohe]=ys[she]=ys[mhe]=ys[ihe]=ys[_he]=ys[rhe]=ys[lhe]=ys[ahe]=ys[che]=ys[uhe]=ys[dhe]=ys[hhe]=ys[fhe]=ys[phe]=ys[ghe]=!1;function Rhe(e){return qu(e)&&OD(e.length)&&!!ys[Wm(e)]}function yD(e){return function(t){return e(t)}}var T5=typeof da=="object"&&da&&!da.nodeType&&da,jS=T5&&typeof ha=="object"&&ha&&!ha.nodeType&&ha,Che=jS&&jS.exports===T5,$w=Che&&a5.process,BE=function(){try{var e=jS&&jS.require&&jS.require("util").types;return e||$w&&$w.binding&&$w.binding("util")}catch{}}(),RH=BE&&BE.isTypedArray,$D=RH?yD(RH):Rhe,Mhe=Object.prototype,Ahe=Mhe.hasOwnProperty;function E5(e,t){var n=al(e),s=!n&&ky(e),i=!n&&!s&&Ny(e),r=!n&&!s&&!i&&$D(e),a=n||s||i||r,c=a?Qde(e.length,String):[],u=c.length;for(var h in e)(t||Ahe.call(e,h))&&!(a&&(h=="length"||i&&(h=="offset"||h=="parent")||r&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||AA(h,u)))&&c.push(h);return c}function v5(e,t){return function(n){return e(t(n))}}var Lhe=v5(Object.keys,Object),whe=Object.prototype,khe=whe.hasOwnProperty;function Nhe(e){if(!SD(e))return Lhe(e);var t=[];for(var n in Object(e))khe.call(e,n)&&n!="constructor"&&t.push(n);return t}function v$(e){return dv(e)?E5(e):Nhe(e)}function Phe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Dhe=Object.prototype,xhe=Dhe.hasOwnProperty;function Bhe(e){if(!cl(e))return Phe(e);var t=SD(e),n=[];for(var s in e)s=="constructor"&&(t||!xhe.call(e,s))||n.push(s);return n}function b$(e){return dv(e)?E5(e,!0):Bhe(e)}var Fhe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Uhe=/^\w*$/;function ID(e,t){if(al(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||MA(e)?!0:Uhe.test(e)||!Fhe.test(e)||t!=null&&e in Object(t)}var Py=zm(Object,"create");function Hhe(){this.__data__=Py?Py(null):{},this.size=0}function Vhe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Ghe="__lodash_hash_undefined__",Whe=Object.prototype,Xhe=Whe.hasOwnProperty;function zhe(e){var t=this.__data__;if(Py){var n=t[e];return n===Ghe?void 0:n}return Xhe.call(t,e)?t[e]:void 0}var Yhe=Object.prototype,Khe=Yhe.hasOwnProperty;function jhe(e){var t=this.__data__;return Py?t[e]!==void 0:Khe.call(t,e)}var Qhe="__lodash_hash_undefined__";function qhe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Py&&t===void 0?Qhe:t,this}function Pm(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}Pm.prototype.clear=Hhe;Pm.prototype.delete=Vhe;Pm.prototype.get=zhe;Pm.prototype.has=jhe;Pm.prototype.set=qhe;function Jhe(){this.__data__=[],this.size=0}function LA(e,t){for(var n=e.length;n--;)if(E$(e[n][0],t))return n;return-1}var Zhe=Array.prototype,efe=Zhe.splice;function tfe(e){var t=this.__data__,n=LA(t,e);if(n<0)return!1;var s=t.length-1;return n==s?t.pop():efe.call(t,n,1),--this.size,!0}function nfe(e){var t=this.__data__,n=LA(t,e);return n<0?void 0:t[n][1]}function ofe(e){return LA(this.__data__,e)>-1}function sfe(e,t){var n=this.__data__,s=LA(n,e);return s<0?(++this.size,n.push([e,t])):n[s][1]=t,this}function Lh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}Lh.prototype.clear=Jhe;Lh.prototype.delete=tfe;Lh.prototype.get=nfe;Lh.prototype.has=ofe;Lh.prototype.set=sfe;var Dy=zm(Zc,"Map");function ife(){this.size=0,this.__data__={hash:new Pm,map:new(Dy||Lh),string:new Pm}}function rfe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function wA(e,t){var n=e.__data__;return rfe(t)?n[typeof t=="string"?"string":"hash"]:n.map}function lfe(e){var t=wA(this,e).delete(e);return this.size-=t?1:0,t}function afe(e){return wA(this,e).get(e)}function cfe(e){return wA(this,e).has(e)}function ufe(e,t){var n=wA(this,e),s=n.size;return n.set(e,t),this.size+=n.size==s?0:1,this}function wh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}wh.prototype.clear=ife;wh.prototype.delete=lfe;wh.prototype.get=afe;wh.prototype.has=cfe;wh.prototype.set=ufe;var dfe="Expected a function";function kA(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(dfe);var n=function(){var s=arguments,i=t?t.apply(this,s):s[0],r=n.cache;if(r.has(i))return r.get(i);var a=e.apply(this,s);return n.cache=r.set(i,a)||r,a};return n.cache=new(kA.Cache||wh),n}kA.Cache=wh;var hfe=500;function ffe(e){var t=kA(e,function(s){return n.size===hfe&&n.clear(),s}),n=t.cache;return t}var pfe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gfe=/\\(\\)?/g,mfe=ffe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(pfe,function(n,s,i,r){t.push(i?r.replace(gfe,"$1"):s||n)}),t});function _fe(e){return e==null?"":u5(e)}function hv(e,t){return al(e)?e:ID(e,t)?[e]:mfe(_fe(e))}var Tfe=1/0;function fv(e){if(typeof e=="string"||MA(e))return e;var t=e+"";return t=="0"&&1/e==-Tfe?"-0":t}function NA(e,t){t=hv(t,e);for(var n=0,s=t.length;e!=null&&n<s;)e=e[fv(t[n++])];return n&&n==s?e:void 0}function Ns(e,t,n){var s=e==null?void 0:NA(e,t);return s===void 0?n:s}function RD(e,t){for(var n=-1,s=t.length,i=e.length;++n<s;)e[i+n]=t[n];return e}var CH=lc?lc.isConcatSpreadable:void 0;function Efe(e){return al(e)||ky(e)||!!(CH&&e&&e[CH])}function O$(e,t,n,s,i){var r=-1,a=e.length;for(n||(n=Efe),i||(i=[]);++r<a;){var c=e[r];t>0&&n(c)?t>1?O$(c,t-1,n,s,i):RD(i,c):s||(i[i.length]=c)}return i}function b5(e){var t=e==null?0:e.length;return t?O$(e,1):[]}function O5(e){return h5(p5(e,void 0,b5),e+"")}var CD=v5(Object.getPrototypeOf,Object),vfe="[object Object]",bfe=Function.prototype,Ofe=Object.prototype,S5=bfe.toString,Sfe=Ofe.hasOwnProperty,yfe=S5.call(Object);function y5(e){if(!qu(e)||Wm(e)!=vfe)return!1;var t=CD(e);if(t===null)return!0;var n=Sfe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&S5.call(n)==yfe}function $fe(e,t,n){var s=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var r=Array(i);++s<i;)r[s]=e[s+t];return r}function wr(){if(!arguments.length)return[];var e=arguments[0];return al(e)?e:[e]}function Ife(){this.__data__=new Lh,this.size=0}function Rfe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Cfe(e){return this.__data__.get(e)}function Mfe(e){return this.__data__.has(e)}var Afe=200;function Lfe(e,t){var n=this.__data__;if(n instanceof Lh){var s=n.__data__;if(!Dy||s.length<Afe-1)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new wh(s)}return n.set(e,t),this.size=n.size,this}function Hc(e){var t=this.__data__=new Lh(e);this.size=t.size}Hc.prototype.clear=Ife;Hc.prototype.delete=Rfe;Hc.prototype.get=Cfe;Hc.prototype.has=Mfe;Hc.prototype.set=Lfe;function wfe(e,t){return e&&uv(t,v$(t),e)}function kfe(e,t){return e&&uv(t,b$(t),e)}var $5=typeof da=="object"&&da&&!da.nodeType&&da,MH=$5&&typeof ha=="object"&&ha&&!ha.nodeType&&ha,Nfe=MH&&MH.exports===$5,AH=Nfe?Zc.Buffer:void 0,LH=AH?AH.allocUnsafe:void 0;function I5(e,t){if(t)return e.slice();var n=e.length,s=LH?LH(n):new e.constructor(n);return e.copy(s),s}function Pfe(e,t){for(var n=-1,s=e==null?0:e.length,i=0,r=[];++n<s;){var a=e[n];t(a,n,e)&&(r[i++]=a)}return r}function R5(){return[]}var Dfe=Object.prototype,xfe=Dfe.propertyIsEnumerable,wH=Object.getOwnPropertySymbols,MD=wH?function(e){return e==null?[]:(e=Object(e),Pfe(wH(e),function(t){return xfe.call(e,t)}))}:R5;function Bfe(e,t){return uv(e,MD(e),t)}var Ffe=Object.getOwnPropertySymbols,C5=Ffe?function(e){for(var t=[];e;)RD(t,MD(e)),e=CD(e);return t}:R5;function Ufe(e,t){return uv(e,C5(e),t)}function M5(e,t,n){var s=t(e);return al(e)?s:RD(s,n(e))}function PN(e){return M5(e,v$,MD)}function A5(e){return M5(e,b$,C5)}var DN=zm(Zc,"DataView"),xN=zm(Zc,"Promise"),_E=zm(Zc,"Set"),kH="[object Map]",Hfe="[object Object]",NH="[object Promise]",PH="[object Set]",DH="[object WeakMap]",xH="[object DataView]",Vfe=Xm(DN),Gfe=Xm(Dy),Wfe=Xm(xN),Xfe=Xm(_E),zfe=Xm(NN),Pc=Wm;(DN&&Pc(new DN(new ArrayBuffer(1)))!=xH||Dy&&Pc(new Dy)!=kH||xN&&Pc(xN.resolve())!=NH||_E&&Pc(new _E)!=PH||NN&&Pc(new NN)!=DH)&&(Pc=function(e){var t=Wm(e),n=t==Hfe?e.constructor:void 0,s=n?Xm(n):"";if(s)switch(s){case Vfe:return xH;case Gfe:return kH;case Wfe:return NH;case Xfe:return PH;case zfe:return DH}return t});var Yfe=Object.prototype,Kfe=Yfe.hasOwnProperty;function jfe(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&Kfe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var OM=Zc.Uint8Array;function AD(e){var t=new e.constructor(e.byteLength);return new OM(t).set(new OM(e)),t}function Qfe(e,t){var n=t?AD(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var qfe=/\w*$/;function Jfe(e){var t=new e.constructor(e.source,qfe.exec(e));return t.lastIndex=e.lastIndex,t}var BH=lc?lc.prototype:void 0,FH=BH?BH.valueOf:void 0;function Zfe(e){return FH?Object(FH.call(e)):{}}function L5(e,t){var n=t?AD(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var epe="[object Boolean]",tpe="[object Date]",npe="[object Map]",ope="[object Number]",spe="[object RegExp]",ipe="[object Set]",rpe="[object String]",lpe="[object Symbol]",ape="[object ArrayBuffer]",cpe="[object DataView]",upe="[object Float32Array]",dpe="[object Float64Array]",hpe="[object Int8Array]",fpe="[object Int16Array]",ppe="[object Int32Array]",gpe="[object Uint8Array]",mpe="[object Uint8ClampedArray]",_pe="[object Uint16Array]",Tpe="[object Uint32Array]";function Epe(e,t,n){var s=e.constructor;switch(t){case ape:return AD(e);case epe:case tpe:return new s(+e);case cpe:return Qfe(e,n);case upe:case dpe:case hpe:case fpe:case ppe:case gpe:case mpe:case _pe:case Tpe:return L5(e,n);case npe:return new s;case ope:case rpe:return new s(e);case spe:return Jfe(e);case ipe:return new s;case lpe:return Zfe(e)}}function w5(e){return typeof e.constructor=="function"&&!SD(e)?Cde(CD(e)):{}}var vpe="[object Map]";function bpe(e){return qu(e)&&Pc(e)==vpe}var UH=BE&&BE.isMap,Ope=UH?yD(UH):bpe,Spe="[object Set]";function ype(e){return qu(e)&&Pc(e)==Spe}var HH=BE&&BE.isSet,$pe=HH?yD(HH):ype,Ipe=1,Rpe=2,Cpe=4,k5="[object Arguments]",Mpe="[object Array]",Ape="[object Boolean]",Lpe="[object Date]",wpe="[object Error]",N5="[object Function]",kpe="[object GeneratorFunction]",Npe="[object Map]",Ppe="[object Number]",P5="[object Object]",Dpe="[object RegExp]",xpe="[object Set]",Bpe="[object String]",Fpe="[object Symbol]",Upe="[object WeakMap]",Hpe="[object ArrayBuffer]",Vpe="[object DataView]",Gpe="[object Float32Array]",Wpe="[object Float64Array]",Xpe="[object Int8Array]",zpe="[object Int16Array]",Ype="[object Int32Array]",Kpe="[object Uint8Array]",jpe="[object Uint8ClampedArray]",Qpe="[object Uint16Array]",qpe="[object Uint32Array]",_s={};_s[k5]=_s[Mpe]=_s[Hpe]=_s[Vpe]=_s[Ape]=_s[Lpe]=_s[Gpe]=_s[Wpe]=_s[Xpe]=_s[zpe]=_s[Ype]=_s[Npe]=_s[Ppe]=_s[P5]=_s[Dpe]=_s[xpe]=_s[Bpe]=_s[Fpe]=_s[Kpe]=_s[jpe]=_s[Qpe]=_s[qpe]=!0;_s[wpe]=_s[N5]=_s[Upe]=!1;function TE(e,t,n,s,i,r){var a,c=t&Ipe,u=t&Rpe,h=t&Cpe;if(n&&(a=i?n(e,s,i,r):n(e)),a!==void 0)return a;if(!cl(e))return e;var f=al(e);if(f){if(a=jfe(e),!c)return d5(e,a)}else{var p=Pc(e),_=p==N5||p==kpe;if(Ny(e))return I5(e,c);if(p==P5||p==k5||_&&!i){if(a=u||_?{}:w5(e),!c)return u?Ufe(e,kfe(a,e)):Bfe(e,wfe(a,e))}else{if(!_s[p])return i?e:{};a=Epe(e,p,c)}}r||(r=new Hc);var E=r.get(e);if(E)return E;r.set(e,a),$pe(e)?e.forEach(function(y){a.add(TE(y,t,n,y,e,r))}):Ope(e)&&e.forEach(function(y,S){a.set(S,TE(y,t,n,S,e,r))});var v=h?u?A5:PN:u?b$:v$,b=f?void 0:v(e);return xde(b||e,function(y,S){b&&(S=y,y=e[S]),bD(a,S,TE(y,t,n,S,e,r))}),a}var Jpe=4;function VH(e){return TE(e,Jpe)}var Zpe=1,ege=4;function SM(e){return TE(e,Zpe|ege)}var tge="__lodash_hash_undefined__";function nge(e){return this.__data__.set(e,tge),this}function oge(e){return this.__data__.has(e)}function xy(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new wh;++t<n;)this.add(e[t])}xy.prototype.add=xy.prototype.push=nge;xy.prototype.has=oge;function sge(e,t){for(var n=-1,s=e==null?0:e.length;++n<s;)if(t(e[n],n,e))return!0;return!1}function D5(e,t){return e.has(t)}var ige=1,rge=2;function x5(e,t,n,s,i,r){var a=n&ige,c=e.length,u=t.length;if(c!=u&&!(a&&u>c))return!1;var h=r.get(e),f=r.get(t);if(h&&f)return h==t&&f==e;var p=-1,_=!0,E=n&rge?new xy:void 0;for(r.set(e,t),r.set(t,e);++p<c;){var v=e[p],b=t[p];if(s)var y=a?s(b,v,p,t,e,r):s(v,b,p,e,t,r);if(y!==void 0){if(y)continue;_=!1;break}if(E){if(!sge(t,function(S,L){if(!D5(E,L)&&(v===S||i(v,S,n,s,r)))return E.push(L)})){_=!1;break}}else if(!(v===b||i(v,b,n,s,r))){_=!1;break}}return r.delete(e),r.delete(t),_}function lge(e){var t=-1,n=Array(e.size);return e.forEach(function(s,i){n[++t]=[i,s]}),n}function LD(e){var t=-1,n=Array(e.size);return e.forEach(function(s){n[++t]=s}),n}var age=1,cge=2,uge="[object Boolean]",dge="[object Date]",hge="[object Error]",fge="[object Map]",pge="[object Number]",gge="[object RegExp]",mge="[object Set]",_ge="[object String]",Tge="[object Symbol]",Ege="[object ArrayBuffer]",vge="[object DataView]",GH=lc?lc.prototype:void 0,Iw=GH?GH.valueOf:void 0;function bge(e,t,n,s,i,r,a){switch(n){case vge:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ege:return!(e.byteLength!=t.byteLength||!r(new OM(e),new OM(t)));case uge:case dge:case pge:return E$(+e,+t);case hge:return e.name==t.name&&e.message==t.message;case gge:case _ge:return e==t+"";case fge:var c=lge;case mge:var u=s&age;if(c||(c=LD),e.size!=t.size&&!u)return!1;var h=a.get(e);if(h)return h==t;s|=cge,a.set(e,t);var f=x5(c(e),c(t),s,i,r,a);return a.delete(e),f;case Tge:if(Iw)return Iw.call(e)==Iw.call(t)}return!1}var Oge=1,Sge=Object.prototype,yge=Sge.hasOwnProperty;function $ge(e,t,n,s,i,r){var a=n&Oge,c=PN(e),u=c.length,h=PN(t),f=h.length;if(u!=f&&!a)return!1;for(var p=u;p--;){var _=c[p];if(!(a?_ in t:yge.call(t,_)))return!1}var E=r.get(e),v=r.get(t);if(E&&v)return E==t&&v==e;var b=!0;r.set(e,t),r.set(t,e);for(var y=a;++p<u;){_=c[p];var S=e[_],L=t[_];if(s)var I=a?s(L,S,_,t,e,r):s(S,L,_,e,t,r);if(!(I===void 0?S===L||i(S,L,n,s,r):I)){b=!1;break}y||(y=_=="constructor")}if(b&&!y){var R=e.constructor,w=t.constructor;R!=w&&"constructor"in e&&"constructor"in t&&!(typeof R=="function"&&R instanceof R&&typeof w=="function"&&w instanceof w)&&(b=!1)}return r.delete(e),r.delete(t),b}var Ige=1,WH="[object Arguments]",XH="[object Array]",uR="[object Object]",Rge=Object.prototype,zH=Rge.hasOwnProperty;function Cge(e,t,n,s,i,r){var a=al(e),c=al(t),u=a?XH:Pc(e),h=c?XH:Pc(t);u=u==WH?uR:u,h=h==WH?uR:h;var f=u==uR,p=h==uR,_=u==h;if(_&&Ny(e)){if(!Ny(t))return!1;a=!0,f=!1}if(_&&!f)return r||(r=new Hc),a||$D(e)?x5(e,t,n,s,i,r):bge(e,t,u,n,s,i,r);if(!(n&Ige)){var E=f&&zH.call(e,"__wrapped__"),v=p&&zH.call(t,"__wrapped__");if(E||v){var b=E?e.value():e,y=v?t.value():t;return r||(r=new Hc),i(b,y,n,s,r)}}return _?(r||(r=new Hc),$ge(e,t,n,s,i,r)):!1}function PA(e,t,n,s,i){return e===t?!0:e==null||t==null||!qu(e)&&!qu(t)?e!==e&&t!==t:Cge(e,t,n,s,PA,i)}var Mge=1,Age=2;function Lge(e,t,n,s){var i=n.length,r=i;if(e==null)return!r;for(e=Object(e);i--;){var a=n[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<r;){a=n[i];var c=a[0],u=e[c],h=a[1];if(a[2]){if(u===void 0&&!(c in e))return!1}else{var f=new Hc,p;if(!(p===void 0?PA(h,u,Mge|Age,s,f):p))return!1}}return!0}function B5(e){return e===e&&!cl(e)}function wge(e){for(var t=v$(e),n=t.length;n--;){var s=t[n],i=e[s];t[n]=[s,i,B5(i)]}return t}function F5(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function kge(e){var t=wge(e);return t.length==1&&t[0][2]?F5(t[0][0],t[0][1]):function(n){return n===e||Lge(n,e,t)}}function Nge(e,t){return e!=null&&t in Object(e)}function Pge(e,t,n){t=hv(t,e);for(var s=-1,i=t.length,r=!1;++s<i;){var a=fv(t[s]);if(!(r=e!=null&&n(e,a)))break;e=e[a]}return r||++s!=i?r:(i=e==null?0:e.length,!!i&&OD(i)&&AA(a,i)&&(al(e)||ky(e)))}function U5(e,t){return e!=null&&Pge(e,t,Nge)}var Dge=1,xge=2;function Bge(e,t){return ID(e)&&B5(t)?F5(fv(e),t):function(n){var s=Ns(n,e);return s===void 0&&s===t?U5(n,e):PA(t,s,Dge|xge)}}function Fge(e){return function(t){return t==null?void 0:t[e]}}function Uge(e){return function(t){return NA(t,e)}}function Hge(e){return ID(e)?Fge(fv(e)):Uge(e)}function H5(e){return typeof e=="function"?e:e==null?TD:typeof e=="object"?al(e)?Bge(e[0],e[1]):kge(e):Hge(e)}function Vge(e){return function(t,n,s){for(var i=-1,r=Object(t),a=s(t),c=a.length;c--;){var u=a[++i];if(n(r[u],u,r)===!1)break}return t}}var V5=Vge();function Gge(e,t){return e&&V5(e,t,v$)}function Wge(e,t){return function(n,s){if(n==null)return n;if(!dv(n))return e(n,s);for(var i=n.length,r=-1,a=Object(n);++r<i&&s(a[r],r,a)!==!1;);return n}}var Xge=Wge(Gge),Rw=function(){return Zc.Date.now()},zge="Expected a function",Yge=Math.max,Kge=Math.min;function Vl(e,t,n){var s,i,r,a,c,u,h=0,f=!1,p=!1,_=!0;if(typeof e!="function")throw new TypeError(zge);t=vH(t)||0,cl(n)&&(f=!!n.leading,p="maxWait"in n,r=p?Yge(vH(n.maxWait)||0,t):r,_="trailing"in n?!!n.trailing:_);function E(k){var D=s,P=i;return s=i=void 0,h=k,a=e.apply(P,D),a}function v(k){return h=k,c=setTimeout(S,t),f?E(k):a}function b(k){var D=k-u,P=k-h,B=t-D;return p?Kge(B,r-P):B}function y(k){var D=k-u,P=k-h;return u===void 0||D>=t||D<0||p&&P>=r}function S(){var k=Rw();if(y(k))return L(k);c=setTimeout(S,b(k))}function L(k){return c=void 0,_&&s?E(k):(s=i=void 0,a)}function I(){c!==void 0&&clearTimeout(c),h=0,s=u=i=c=void 0}function R(){return c===void 0?a:L(Rw())}function w(){var k=Rw(),D=y(k);if(s=arguments,i=this,u=k,D){if(c===void 0)return v(u);if(p)return clearTimeout(c),c=setTimeout(S,t),E(u)}return c===void 0&&(c=setTimeout(S,t)),a}return w.cancel=I,w.flush=R,w}function BN(e,t,n){(n!==void 0&&!E$(e[t],n)||n===void 0&&!(t in e))&&vD(e,t,n)}function G5(e){return qu(e)&&dv(e)}function FN(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function jge(e){return uv(e,b$(e))}function Qge(e,t,n,s,i,r,a){var c=FN(e,n),u=FN(t,n),h=a.get(u);if(h){BN(e,n,h);return}var f=r?r(c,u,n+"",e,t,a):void 0,p=f===void 0;if(p){var _=al(u),E=!_&&Ny(u),v=!_&&!E&&$D(u);f=u,_||E||v?al(c)?f=c:G5(c)?f=d5(c):E?(p=!1,f=I5(u,!0)):v?(p=!1,f=L5(u,!0)):f=[]:y5(u)||ky(u)?(f=c,ky(c)?f=jge(c):(!cl(c)||ED(c))&&(f=w5(u))):p=!1}p&&(a.set(u,f),i(f,u,s,r,a),a.delete(u)),BN(e,n,f)}function W5(e,t,n,s,i){e!==t&&V5(t,function(r,a){if(i||(i=new Hc),cl(r))Qge(e,t,a,n,W5,s,i);else{var c=s?s(FN(e,a),r,a+"",e,t,i):void 0;c===void 0&&(c=r),BN(e,a,c)}},b$)}function qge(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function X5(e,t,n){var s=e==null?0:e.length;if(!s)return-1;var i=s-1;return f5(e,H5(t),i,!0)}function Jge(e,t){var n=-1,s=dv(e)?Array(e.length):[];return Xge(e,function(i,r,a){s[++n]=t(i,r,a)}),s}function Zge(e,t){var n=al(e)?_D:Jge;return n(e,H5(t))}function eme(e,t){return O$(Zge(e,t),1)}var tme=1/0;function nme(e){var t=e==null?0:e.length;return t?O$(e,tme):[]}function By(e){for(var t=-1,n=e==null?0:e.length,s={};++t<n;){var i=e[t];s[i[0]]=i[1]}return s}function ome(e,t){return t.length<2?e:NA(e,$fe(t,0,-1))}function Hi(e,t){return PA(e,t)}function hi(e){return e==null}function z5(e){return e===void 0}var Y5=Kde(function(e,t,n){W5(e,t,n)});function sme(e,t){return t=hv(t,e),e=ome(e,t),e==null||delete e[fv(qge(t))]}function ime(e){return y5(e)?void 0:e}var rme=1,lme=2,ame=4,cme=O5(function(e,t){var n={};if(e==null)return n;var s=!1;t=_D(t,function(r){return r=hv(r,e),s||(s=r.length>1),r}),uv(e,A5(e),n),s&&(n=TE(n,rme|lme|ame,ime));for(var i=t.length;i--;)sme(n,t[i]);return n});function K5(e,t,n,s){if(!cl(e))return e;t=hv(t,e);for(var i=-1,r=t.length,a=r-1,c=e;c!=null&&++i<r;){var u=fv(t[i]),h=n;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=a){var f=c[u];h=void 0,h===void 0&&(h=cl(f)?f:AA(t[i+1])?[]:{})}bD(c,u,h),c=c[u]}return e}function ume(e,t,n){for(var s=-1,i=t.length,r={};++s<i;){var a=t[s],c=NA(e,a);n(c,a)&&K5(r,hv(a,e),c)}return r}function dme(e,t){return ume(e,t,function(n,s){return U5(e,s)})}var Bc=O5(function(e,t){return e==null?{}:dme(e,t)});function hme(e,t,n){return e==null?e:K5(e,t,n)}var fme="Expected a function";function Om(e,t,n){var s=!0,i=!0;if(typeof e!="function")throw new TypeError(fme);return cl(n)&&(s="leading"in n?!!n.leading:s,i="trailing"in n?!!n.trailing:i),Vl(e,t,{leading:s,maxWait:t,trailing:i})}var pme=1/0,gme=_E&&1/LD(new _E([,-0]))[1]==pme?function(e){return new _E(e)}:Ade,mme=200;function _me(e,t,n){var s=-1,i=Hde,r=e.length,a=!0,c=[],u=c;if(r>=mme){var h=gme(e);if(h)return LD(h);a=!1,i=D5,u=new xy}else u=c;e:for(;++s<r;){var f=e[s],p=f;if(f=f!==0?f:0,a&&p===p){for(var _=u.length;_--;)if(u[_]===p)continue e;c.push(f)}else i(u,p,n)||(u!==c&&u.push(p),c.push(f))}return c}var Cw=g5(function(e){return _me(O$(e,1,G5,!0))});const ho=e=>e===void 0,Io=e=>typeof e=="boolean",Wt=e=>typeof e=="number",la=e=>!e&&e!==0||at(e)&&e.length===0||Tn(e)&&!Object.keys(e).length,pa=e=>typeof Element>"u"?!1:e instanceof Element,Dm=e=>hi(e),Tme=e=>Dt(e)?!Number.isNaN(Number(e)):!1,DA=e=>e===window;var Eme=Object.defineProperty,vme=Object.defineProperties,bme=Object.getOwnPropertyDescriptors,YH=Object.getOwnPropertySymbols,Ome=Object.prototype.hasOwnProperty,Sme=Object.prototype.propertyIsEnumerable,KH=(e,t,n)=>t in e?Eme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yme=(e,t)=>{for(var n in t||(t={}))Ome.call(t,n)&&KH(e,n,t[n]);if(YH)for(var n of YH(t))Sme.call(t,n)&&KH(e,n,t[n]);return e},$me=(e,t)=>vme(e,bme(t));function UN(e,t){var n;const s=lo();return Zs(()=>{s.value=e()},$me(yme({},t),{flush:(n=void 0)!=null?n:"sync"})),ov(s)}var jH;const Dn=typeof window<"u",Ime=e=>typeof e<"u",HN=e=>typeof e=="function",Rme=e=>typeof e=="string",FE=()=>{},VN=Dn&&((jH=window==null?void 0:window.navigator)==null?void 0:jH.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Ep(e){return typeof e=="function"?e():g(e)}function j5(e,t){function n(...s){return new Promise((i,r)=>{Promise.resolve(e(()=>t.apply(this,s),{fn:t,thisArg:this,args:s})).then(i).catch(r)})}return n}function Cme(e,t={}){let n,s,i=FE;const r=c=>{clearTimeout(c),i(),i=FE};return c=>{const u=Ep(e),h=Ep(t.maxWait);return n&&r(n),u<=0||h!==void 0&&h<=0?(s&&(r(s),s=null),Promise.resolve(c())):new Promise((f,p)=>{i=t.rejectOnCancel?p:f,h&&!s&&(s=setTimeout(()=>{n&&r(n),s=null,f(c())},h)),n=setTimeout(()=>{s&&r(s),s=null,f(c())},u)})}}function Mme(e,t=!0,n=!0,s=!1){let i=0,r,a=!0,c=FE,u;const h=()=>{r&&(clearTimeout(r),r=void 0,c(),c=FE)};return p=>{const _=Ep(e),E=Date.now()-i,v=()=>u=p();return h(),_<=0?(i=Date.now(),v()):(E>_&&(n||!a)?(i=Date.now(),v()):t&&(u=new Promise((b,y)=>{c=s?y:b,r=setTimeout(()=>{i=Date.now(),a=!0,b(v()),h()},Math.max(0,_-E))})),!n&&!r&&(r=setTimeout(()=>a=!0,_)),a=!1,u)}}function Ame(e){return e}function Lme(e,t){let n,s,i;const r=K(!0),a=()=>{r.value=!0,i()};tt(e,a,{flush:"sync"});const c=HN(t)?t:t.get,u=HN(t)?void 0:t.set,h=yq((f,p)=>(s=f,i=p,{get(){return r.value&&(n=c(),r.value=!1),s(),n},set(_){u==null||u(_)}}));return Object.isExtensible(h)&&(h.trigger=a),h}function S$(e){return Z1()?(eP(e),!0):!1}function wme(e,t=200,n={}){return j5(Cme(t,n),e)}function kme(e,t=200,n={}){const s=K(e.value),i=wme(()=>{s.value=e.value},t,n);return tt(e,()=>i()),s}function Q5(e,t=200,n=!1,s=!0,i=!1){return j5(Mme(t,n,s,i),e)}function wD(e,t=!0){pn()?rn(e):t?e():Vt(e)}function xm(e,t,n={}){const{immediate:s=!0}=n,i=K(!1);let r=null;function a(){r&&(clearTimeout(r),r=null)}function c(){i.value=!1,a()}function u(...h){a(),i.value=!0,r=setTimeout(()=>{i.value=!1,r=null,e(...h)},Ep(t))}return s&&(i.value=!0,Dn&&u()),S$(c),{isPending:ov(i),start:u,stop:c}}function ol(e){var t;const n=Ep(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Np=Dn?window:void 0,Nme=Dn?window.document:void 0;function fo(...e){let t,n,s,i;if(Rme(e[0])||Array.isArray(e[0])?([n,s,i]=e,t=Np):[t,n,s,i]=e,!t)return FE;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const r=[],a=()=>{r.forEach(f=>f()),r.length=0},c=(f,p,_,E)=>(f.addEventListener(p,_,E),()=>f.removeEventListener(p,_,E)),u=tt(()=>[ol(t),Ep(i)],([f,p])=>{a(),f&&r.push(...n.flatMap(_=>s.map(E=>c(f,_,E,p))))},{immediate:!0,flush:"post"}),h=()=>{u(),a()};return S$(h),h}let QH=!1;function kD(e,t,n={}){const{window:s=Np,ignore:i=[],capture:r=!0,detectIframe:a=!1}=n;if(!s)return;VN&&!QH&&(QH=!0,Array.from(s.document.body.children).forEach(_=>_.addEventListener("click",FE)));let c=!0;const u=_=>i.some(E=>{if(typeof E=="string")return Array.from(s.document.querySelectorAll(E)).some(v=>v===_.target||_.composedPath().includes(v));{const v=ol(E);return v&&(_.target===v||_.composedPath().includes(v))}}),f=[fo(s,"click",_=>{const E=ol(e);if(!(!E||E===_.target||_.composedPath().includes(E))){if(_.detail===0&&(c=!u(_)),!c){c=!0;return}t(_)}},{passive:!0,capture:r}),fo(s,"pointerdown",_=>{const E=ol(e);E&&(c=!_.composedPath().includes(E)&&!u(_))},{passive:!0}),a&&fo(s,"blur",_=>{var E;const v=ol(e);((E=s.document.activeElement)==null?void 0:E.tagName)==="IFRAME"&&!(v!=null&&v.contains(s.document.activeElement))&&t(_)})].filter(Boolean);return()=>f.forEach(_=>_())}function Pme(e={}){var t;const{window:n=Np}=e,s=(t=e.document)!=null?t:n==null?void 0:n.document,i=Lme(()=>null,()=>s==null?void 0:s.activeElement);return n&&(fo(n,"blur",r=>{r.relatedTarget===null&&i.trigger()},!0),fo(n,"focus",i.trigger,!0)),i}function q5(e,t=!1){const n=K(),s=()=>n.value=!!e();return s(),wD(s,t),n}function Dme(e){return JSON.parse(JSON.stringify(e))}const qH=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},JH="__vueuse_ssr_handlers__";qH[JH]=qH[JH]||{};function xme(e,t,{window:n=Np,initialValue:s=""}={}){const i=K(s),r=x(()=>{var a;return ol(t)||((a=n==null?void 0:n.document)==null?void 0:a.documentElement)});return tt([r,()=>Ep(e)],([a,c])=>{var u;if(a&&n){const h=(u=n.getComputedStyle(a).getPropertyValue(c))==null?void 0:u.trim();i.value=h||s}},{immediate:!0}),tt(i,a=>{var c;(c=r.value)!=null&&c.style&&r.value.style.setProperty(Ep(e),a)}),i}function Bme({document:e=Nme}={}){if(!e)return K("visible");const t=K(e.visibilityState);return fo(e,"visibilitychange",()=>{t.value=e.visibilityState}),t}var ZH=Object.getOwnPropertySymbols,Fme=Object.prototype.hasOwnProperty,Ume=Object.prototype.propertyIsEnumerable,Hme=(e,t)=>{var n={};for(var s in e)Fme.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&ZH)for(var s of ZH(e))t.indexOf(s)<0&&Ume.call(e,s)&&(n[s]=e[s]);return n};function Xo(e,t,n={}){const s=n,{window:i=Np}=s,r=Hme(s,["window"]);let a;const c=q5(()=>i&&"ResizeObserver"in i),u=()=>{a&&(a.disconnect(),a=void 0)},h=tt(()=>ol(e),p=>{u(),c.value&&i&&p&&(a=new ResizeObserver(t),a.observe(p,r))},{immediate:!0,flush:"post"}),f=()=>{u(),h()};return S$(f),{isSupported:c,stop:f}}function eV(e,t={}){const{reset:n=!0,windowResize:s=!0,windowScroll:i=!0,immediate:r=!0}=t,a=K(0),c=K(0),u=K(0),h=K(0),f=K(0),p=K(0),_=K(0),E=K(0);function v(){const b=ol(e);if(!b){n&&(a.value=0,c.value=0,u.value=0,h.value=0,f.value=0,p.value=0,_.value=0,E.value=0);return}const y=b.getBoundingClientRect();a.value=y.height,c.value=y.bottom,u.value=y.left,h.value=y.right,f.value=y.top,p.value=y.width,_.value=y.x,E.value=y.y}return Xo(e,v),tt(()=>ol(e),b=>!b&&v()),i&&fo("scroll",v,{capture:!0,passive:!0}),s&&fo("resize",v,{passive:!0}),wD(()=>{r&&v()}),{height:a,bottom:c,left:u,right:h,top:f,width:p,x:_,y:E,update:v}}var tV=Object.getOwnPropertySymbols,Vme=Object.prototype.hasOwnProperty,Gme=Object.prototype.propertyIsEnumerable,Wme=(e,t)=>{var n={};for(var s in e)Vme.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&tV)for(var s of tV(e))t.indexOf(s)<0&&Gme.call(e,s)&&(n[s]=e[s]);return n};function J5(e,t,n={}){const s=n,{window:i=Np}=s,r=Wme(s,["window"]);let a;const c=q5(()=>i&&"MutationObserver"in i),u=()=>{a&&(a.disconnect(),a=void 0)},h=tt(()=>ol(e),p=>{u(),c.value&&i&&p&&(a=new MutationObserver(t),a.observe(p,r))},{immediate:!0}),f=()=>{u(),h()};return S$(f),{isSupported:c,stop:f}}var nV;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(nV||(nV={}));var Xme=Object.defineProperty,oV=Object.getOwnPropertySymbols,zme=Object.prototype.hasOwnProperty,Yme=Object.prototype.propertyIsEnumerable,sV=(e,t,n)=>t in e?Xme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kme=(e,t)=>{for(var n in t)zme.call(t,n)&&sV(e,n,t[n]);if(oV)for(var n of oV(t))Yme.call(t,n)&&sV(e,n,t[n]);return e};const jme={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};Kme({linear:Ame},jme);function Z5(e,t,n,s={}){var i,r,a;const{clone:c=!1,passive:u=!1,eventName:h,deep:f=!1,defaultValue:p}=s,_=pn(),E=n||(_==null?void 0:_.emit)||((i=_==null?void 0:_.$emit)==null?void 0:i.bind(_))||((a=(r=_==null?void 0:_.proxy)==null?void 0:r.$emit)==null?void 0:a.bind(_==null?void 0:_.proxy));let v=h;t||(t="modelValue"),v=h||v||`update:${t.toString()}`;const b=S=>c?HN(c)?c(S):Dme(S):S,y=()=>Ime(e[t])?b(e[t]):p;if(u){const S=y(),L=K(S);return tt(()=>e[t],I=>L.value=b(I)),tt(L,I=>{(I!==e[t]||f)&&E(v,I)},{deep:f}),L}else return x({get(){return y()},set(S){E(v,S)}})}function Qme({window:e=Np}={}){if(!e)return K(!1);const t=K(e.document.hasFocus());return fo(e,"blur",()=>{t.value=!1}),fo(e,"focus",()=>{t.value=!0}),t}function qme(e={}){const{window:t=Np,initialWidth:n=1/0,initialHeight:s=1/0,listenOrientation:i=!0,includeScrollbar:r=!0}=e,a=K(n),c=K(s),u=()=>{t&&(r?(a.value=t.innerWidth,c.value=t.innerHeight):(a.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight))};return u(),wD(u),fo("resize",u,{passive:!0}),i&&fo("orientationchange",u,{passive:!0}),{width:a,height:c}}class Jme extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function ti(e,t){throw new Jme(`[${e}] ${t}`)}const iV={current:0},rV=K(0),e6=2e3,lV=Symbol("elZIndexContextKey"),t6=Symbol("zIndexContextKey"),pv=e=>{const t=pn()?It(lV,iV):iV,n=e||(pn()?It(t6,void 0):void 0),s=x(()=>{const a=g(n);return Wt(a)?a:e6}),i=x(()=>s.value+rV.value),r=()=>(t.current++,rV.value=t.current,i.value);return!Dn&&It(lV),{initialZIndex:s,currentZIndex:i,nextZIndex:r}};var Zme={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const e_e=e=>(t,n)=>t_e(t,n,g(e)),t_e=(e,t,n)=>Ns(n,e,e).replace(/\{(\w+)\}/g,(s,i)=>{var r;return`${(r=t==null?void 0:t[i])!=null?r:`{${i}}`}`}),n_e=e=>{const t=x(()=>g(e).name),n=po(e)?e:K(e);return{lang:t,locale:n,t:e_e(e)}},n6=Symbol("localeContextKey"),xn=e=>{const t=e||It(n6,K());return n_e(x(()=>t.value||Zme))},o6="__epPropKey",xe=e=>e,o_e=e=>Tn(e)&&!!e[o6],eu=(e,t)=>{if(!Tn(e)||o_e(e))return e;const{values:n,required:s,default:i,type:r,validator:a}=e,u={type:r,required:!!s,validator:n||a?h=>{let f=!1,p=[];if(n&&(p=Array.from(n),zn(e,"default")&&p.push(i),f||(f=p.includes(h))),a&&(f||(f=a(h))),!f&&p.length>0){const _=[...new Set(p)].map(E=>JSON.stringify(E)).join(", ");L9(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${_}], got value ${JSON.stringify(h)}.`)}return f}:void 0,[o6]:!0};return zn(e,"default")&&(u.default=i),u},ht=e=>By(Object.entries(e).map(([t,n])=>[t,eu(n,t)])),rd=["","default","small","large"],Ys=eu({type:String,values:rd,required:!1}),s6=Symbol("size"),i6=()=>{const e=It(s6,{});return x(()=>g(e.size)||"")},r6=Symbol("emptyValuesContextKey"),s_e=["",void 0,null],i_e=void 0,gv=ht({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:e=>Ut(e)?!e():!e}}),xA=(e,t)=>{const n=pn()?It(r6,K({})):K({}),s=x(()=>e.emptyValues||n.value.emptyValues||s_e),i=x(()=>Ut(e.valueOnClear)?e.valueOnClear():e.valueOnClear!==void 0?e.valueOnClear:Ut(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:t!==void 0?t:i_e),r=a=>s.value.includes(a);return s.value.includes(i.value),{emptyValues:s,valueOnClear:i,isEmptyValue:r}},UE=e=>Object.keys(e),l6=e=>Object.entries(e),cC=(e,t,n)=>({get value(){return Ns(e,t,n)},set value(s){hme(e,t,s)}}),yM=K();function BA(e,t=void 0){const n=pn()?It(r5,yM):yM;return e?x(()=>{var s,i;return(i=(s=n.value)==null?void 0:s[e])!=null?i:t}):n}function FA(e,t){const n=BA(),s=rt(e,x(()=>{var c;return((c=n.value)==null?void 0:c.namespace)||KS})),i=xn(x(()=>{var c;return(c=n.value)==null?void 0:c.locale})),r=pv(x(()=>{var c;return((c=n.value)==null?void 0:c.zIndex)||e6})),a=x(()=>{var c;return g(t)||((c=n.value)==null?void 0:c.size)||""});return ND(x(()=>g(n)||{})),{ns:s,locale:i,zIndex:r,size:a}}const ND=(e,t,n=!1)=>{var s;const i=!!pn(),r=i?BA():void 0,a=(s=t==null?void 0:t.provide)!=null?s:i?An:void 0;if(!a)return;const c=x(()=>{const u=g(e);return r!=null&&r.value?r_e(r.value,u):u});return a(r5,c),a(n6,x(()=>c.value.locale)),a(l5,x(()=>c.value.namespace)),a(t6,x(()=>c.value.zIndex)),a(s6,{size:x(()=>c.value.size||"")}),a(r6,x(()=>({emptyValues:c.value.emptyValues,valueOnClear:c.value.valueOnClear}))),(n||!yM.value)&&(yM.value=c.value),c},r_e=(e,t)=>{const n=[...new Set([...UE(e),...UE(t)])],s={};for(const i of n)s[i]=t[i]!==void 0?t[i]:e[i];return s},l_e=(e=[])=>({version:Xue,install:(n,s)=>{n[gH]||(n[gH]=!0,e.forEach(i=>n.use(i)),s&&ND(s,n,!0))}}),un="update:modelValue",_o="change",sr="input",a_e=ht({zIndex:{type:xe([Number,String]),default:100},target:{type:String,default:""},offset:{type:Number,default:0},position:{type:String,values:["top","bottom"],default:"top"}}),c_e={scroll:({scrollTop:e,fixed:t})=>Wt(e)&&Io(t),[_o]:e=>Io(e)};var pt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,i]of t)n[s]=i;return n};function u_e(e,t,n,s){const i=n-t;return e/=s/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}const vp=e=>Dn?window.requestAnimationFrame(e):setTimeout(e,16),Bm=e=>Dn?window.cancelAnimationFrame(e):clearTimeout(e),a6=(e="")=>e.split(" ").filter(t=>!!t.trim()),Pl=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},ec=(e,t)=>{!e||!t.trim()||e.classList.add(...a6(t))},Dr=(e,t)=>{!e||!t.trim()||e.classList.remove(...a6(t))},hh=(e,t)=>{var n;if(!Dn||!e||!t)return"";let s=ll(t);s==="float"&&(s="cssFloat");try{const i=e.style[s];if(i)return i;const r=(n=document.defaultView)==null?void 0:n.getComputedStyle(e,"");return r?r[s]:""}catch{return e.style[s]}},c6=(e,t,n)=>{if(!(!e||!t))if(Tn(t))l6(t).forEach(([s,i])=>c6(e,s,i));else{const s=ll(t);e.style[s]=n}};function bs(e,t="px"){if(!e)return"";if(Wt(e)||Tme(e))return`${e}${t}`;if(Dt(e))return e}const d_e=(e,t)=>{if(!Dn)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(t)],s=hh(e,n);return["scroll","auto","overlay"].some(i=>s.includes(i))},PD=(e,t)=>{if(!Dn)return;let n=e;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(d_e(n,t))return n;n=n.parentNode}return n};let dR;const u6=e=>{var t;if(!Dn)return 0;if(dR!==void 0)return dR;const n=document.createElement("div");n.className=`${e}-scrollbar__wrap`,n.style.visibility="hidden",n.style.width="100px",n.style.position="absolute",n.style.top="-9999px",document.body.appendChild(n);const s=n.offsetWidth;n.style.overflow="scroll";const i=document.createElement("div");i.style.width="100%",n.appendChild(i);const r=i.offsetWidth;return(t=n.parentNode)==null||t.removeChild(n),dR=s-r,dR};function DD(e,t){if(!Dn)return;if(!t){e.scrollTop=0;return}const n=[];let s=t.offsetParent;for(;s!==null&&e!==s&&e.contains(s);)n.push(s),s=s.offsetParent;const i=t.offsetTop+n.reduce((u,h)=>u+h.offsetTop,0),r=i+t.offsetHeight,a=e.scrollTop,c=a+e.clientHeight;i<a?e.scrollTop=i:r>c&&(e.scrollTop=r-e.clientHeight)}function h_e(e,t,n,s,i){const r=Date.now();let a;const c=()=>{const h=Date.now()-r,f=u_e(h>s?s:h,t,n,s);DA(e)?e.scrollTo(window.pageXOffset,f):e.scrollTop=f,h<s?a=vp(c):Ut(i)&&i()};return c(),()=>{a&&Bm(a)}}const aV=(e,t)=>DA(t)?e.ownerDocument.documentElement:t,cV=e=>DA(e)?window.scrollY:e.scrollTop,d6="ElAffix",f_e=Re({name:d6}),p_e=Re({...f_e,props:a_e,emits:c_e,setup(e,{expose:t,emit:n}){const s=e,i=rt("affix"),r=lo(),a=lo(),c=lo(),{height:u}=qme(),{height:h,width:f,top:p,bottom:_,update:E}=eV(a,{windowScroll:!1}),v=eV(r),b=K(!1),y=K(0),S=K(0),L=x(()=>({height:b.value?`${h.value}px`:"",width:b.value?`${f.value}px`:""})),I=x(()=>{if(!b.value)return{};const k=s.offset?bs(s.offset):0;return{height:`${h.value}px`,width:`${f.value}px`,top:s.position==="top"?k:"",bottom:s.position==="bottom"?k:"",transform:S.value?`translateY(${S.value}px)`:"",zIndex:s.zIndex}}),R=()=>{if(!c.value)return;y.value=c.value instanceof Window?document.documentElement.scrollTop:c.value.scrollTop||0;const{position:k,target:D,offset:P}=s,B=P+h.value;if(k==="top")if(D){const F=v.bottom.value-B;b.value=P>p.value&&v.bottom.value>0,S.value=F<0?F:0}else b.value=P>p.value;else if(D){const F=u.value-v.top.value-B;b.value=u.value-P<_.value&&u.value>v.top.value,S.value=F<0?-F:0}else b.value=u.value-P<_.value},w=()=>{E(),n("scroll",{scrollTop:y.value,fixed:b.value})};return tt(b,k=>n("change",k)),rn(()=>{var k;s.target?(r.value=(k=document.querySelector(s.target))!=null?k:void 0,r.value||ti(d6,`Target does not exist: ${s.target}`)):r.value=document.documentElement,c.value=PD(a.value,!0),E()}),fo(c,"scroll",w),Zs(R),t({update:R,updateRoot:E}),(k,D)=>(H(),le("div",{ref_key:"root",ref:a,class:z(g(i).b()),style:Bt(g(L))},[te("div",{class:z({[g(i).m("fixed")]:b.value}),style:Bt(g(I))},[He(k.$slots,"default")],6)],6))}});var g_e=pt(p_e,[["__file","affix.vue"]]);const nn=(e,t)=>{if(e.install=n=>{for(const s of[e,...Object.values(t??{})])n.component(s.name,s)},t)for(const[n,s]of Object.entries(t))e[n]=s;return e},h6=(e,t)=>(e.install=n=>{e._context=n._context,n.config.globalProperties[t]=e},e),m_e=(e,t)=>(e.install=n=>{n.directive(t,e)},e),is=e=>(e.install=ro,e),__e=nn(g_e),T_e=ht({size:{type:xe([Number,String])},color:{type:String}}),E_e=Re({name:"ElIcon",inheritAttrs:!1}),v_e=Re({...E_e,props:T_e,setup(e){const t=e,n=rt("icon"),s=x(()=>{const{size:i,color:r}=t;return!i&&!r?{}:{fontSize:ho(i)?void 0:bs(i),"--color":r}});return(i,r)=>(H(),le("i",$n({class:g(n).b(),style:g(s)},i.$attrs),[He(i.$slots,"default")],16))}});var b_e=pt(v_e,[["__file","icon.vue"]]);const Nt=nn(b_e);/*! Element Plus Icons Vue v2.3.1 */var O_e=Re({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),kh=O_e,S_e=Re({name:"ArrowLeft",__name:"arrow-left",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"})]))}}),bp=S_e,y_e=Re({name:"ArrowRight",__name:"arrow-right",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),rl=y_e,$_e=Re({name:"ArrowUp",__name:"arrow-up",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),xD=$_e,I_e=Re({name:"Back",__name:"back",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),te("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),R_e=I_e,C_e=Re({name:"Calendar",__name:"calendar",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}}),M_e=C_e,A_e=Re({name:"CaretRight",__name:"caret-right",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M384 192v640l384-320.064z"})]))}}),f6=A_e,L_e=Re({name:"CaretTop",__name:"caret-top",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M512 320 192 704h639.936z"})]))}}),w_e=L_e,k_e=Re({name:"Check",__name:"check",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),y$=k_e,N_e=Re({name:"CircleCheckFilled",__name:"circle-check-filled",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),P_e=N_e,D_e=Re({name:"CircleCheck",__name:"circle-check",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),te("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),BD=D_e,x_e=Re({name:"CircleCloseFilled",__name:"circle-close-filled",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),FD=x_e,B_e=Re({name:"CircleClose",__name:"circle-close",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),te("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Nh=B_e,F_e=Re({name:"Clock",__name:"clock",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),te("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),te("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),p6=F_e,U_e=Re({name:"Close",__name:"close",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),zc=U_e,H_e=Re({name:"DArrowLeft",__name:"d-arrow-left",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),Op=H_e,V_e=Re({name:"DArrowRight",__name:"d-arrow-right",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),Sp=V_e,G_e=Re({name:"Delete",__name:"delete",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),W_e=G_e,X_e=Re({name:"DocumentAdd",__name:"document-add",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m320 512V448h64v128h128v64H544v128h-64V640H352v-64z"})]))}}),z_e=X_e,Y_e=Re({name:"Document",__name:"document",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),K_e=Y_e,j_e=Re({name:"Edit",__name:"edit",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),te("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),Q_e=j_e,q_e=Re({name:"FullScreen",__name:"full-screen",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),J_e=q_e,Z_e=Re({name:"Hide",__name:"hide",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),te("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),eTe=Z_e,tTe=Re({name:"InfoFilled",__name:"info-filled",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),UD=tTe,nTe=Re({name:"Loading",__name:"loading",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),Ju=nTe,oTe=Re({name:"Minus",__name:"minus",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),sTe=oTe,iTe=Re({name:"MoreFilled",__name:"more-filled",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),uV=iTe,rTe=Re({name:"More",__name:"more",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"})]))}}),lTe=rTe,aTe=Re({name:"PictureFilled",__name:"picture-filled",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"})]))}}),cTe=aTe,uTe=Re({name:"Plus",__name:"plus",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),g6=uTe,dTe=Re({name:"QuestionFilled",__name:"question-filled",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592 0-42.944-14.08-76.736-42.24-101.376-28.16-25.344-65.472-37.312-111.232-37.312zm-12.672 406.208a54.272 54.272 0 0 0-38.72 14.784 49.408 49.408 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.848 54.848 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.968 51.968 0 0 0-15.488-38.016 55.936 55.936 0 0 0-39.424-14.784z"})]))}}),hTe=dTe,fTe=Re({name:"RefreshLeft",__name:"refresh-left",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),pTe=fTe,gTe=Re({name:"RefreshRight",__name:"refresh-right",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"})]))}}),mTe=gTe,_Te=Re({name:"ScaleToOriginal",__name:"scale-to-original",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zm-361.412 0a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118M512 361.412a30.118 30.118 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.118 30.118 0 0 0 512 361.412M512 512a30.118 30.118 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.118 30.118 0 0 0 512 512"})]))}}),TTe=_Te,ETe=Re({name:"Search",__name:"search",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),vTe=ETe,bTe=Re({name:"SortDown",__name:"sort-down",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M576 96v709.568L333.312 562.816A32 32 0 1 0 288 608l297.408 297.344A32 32 0 0 0 640 882.688V96a32 32 0 0 0-64 0"})]))}}),OTe=bTe,STe=Re({name:"SortUp",__name:"sort-up",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M384 141.248V928a32 32 0 1 0 64 0V218.56l242.688 242.688A32 32 0 1 0 736 416L438.592 118.656A32 32 0 0 0 384 141.248"})]))}}),yTe=STe,$Te=Re({name:"StarFilled",__name:"star-filled",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M283.84 867.84 512 747.776l228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72z"})]))}}),hR=$Te,ITe=Re({name:"Star",__name:"star",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"m512 747.84 228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),RTe=ITe,CTe=Re({name:"SuccessFilled",__name:"success-filled",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),m6=CTe,MTe=Re({name:"View",__name:"view",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),ATe=MTe,LTe=Re({name:"WarningFilled",__name:"warning-filled",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),UA=LTe,wTe=Re({name:"ZoomIn",__name:"zoom-in",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),_6=wTe,kTe=Re({name:"ZoomOut",__name:"zoom-out",setup(e){return(t,n)=>(H(),le("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[te("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))}}),NTe=kTe;const To=xe([String,Object,Function]),HD={Close:zc},VD={Close:zc,SuccessFilled:m6,InfoFilled:UD,WarningFilled:UA,CircleCloseFilled:FD},yp={success:m6,warning:UA,error:FD,info:UD},HA={validating:Ju,success:BD,error:Nh},PTe=["light","dark"],DTe=ht({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:UE(yp),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:PTe,default:"light"}}),xTe={close:e=>e instanceof MouseEvent},BTe=Re({name:"ElAlert"}),FTe=Re({...BTe,props:DTe,emits:xTe,setup(e,{emit:t}){const n=e,{Close:s}=VD,i=Ks(),r=rt("alert"),a=K(!0),c=x(()=>yp[n.type]),u=x(()=>!!(n.description||i.default)),h=f=>{a.value=!1,t("close",f)};return(f,p)=>(H(),Ye(Li,{name:g(r).b("fade"),persisted:""},{default:de(()=>[an(te("div",{class:z([g(r).b(),g(r).m(f.type),g(r).is("center",f.center),g(r).is(f.effect)]),role:"alert"},[f.showIcon&&g(c)?(H(),Ye(g(Nt),{key:0,class:z([g(r).e("icon"),{[g(r).is("big")]:g(u)}])},{default:de(()=>[(H(),Ye(yn(g(c))))]),_:1},8,["class"])):Ge("v-if",!0),te("div",{class:z(g(r).e("content"))},[f.title||f.$slots.title?(H(),le("span",{key:0,class:z([g(r).e("title"),{"with-description":g(u)}])},[He(f.$slots,"title",{},()=>[Xt(Ke(f.title),1)])],2)):Ge("v-if",!0),g(u)?(H(),le("p",{key:1,class:z(g(r).e("description"))},[He(f.$slots,"default",{},()=>[Xt(Ke(f.description),1)])],2)):Ge("v-if",!0),f.closable?(H(),le(Lt,{key:2},[f.closeText?(H(),le("div",{key:0,class:z([g(r).e("close-btn"),g(r).is("customed")]),onClick:h},Ke(f.closeText),3)):(H(),Ye(g(Nt),{key:1,class:z(g(r).e("close-btn")),onClick:h},{default:de(()=>[oe(g(s))]),_:1},8,["class"]))],64)):Ge("v-if",!0)],2)],2),[[Yn,a.value]])]),_:3},8,["name"]))}});var UTe=pt(FTe,[["__file","alert.vue"]]);const HTe=nn(UTe),VA=()=>Dn&&/firefox/i.test(window.navigator.userAgent);let wc;const VTe=`
  1876. height:0 !important;
  1877. visibility:hidden !important;
  1878. ${VA()?"":"overflow:hidden !important;"}
  1879. position:absolute !important;
  1880. z-index:-1000 !important;
  1881. top:0 !important;
  1882. right:0 !important;
  1883. `,GTe=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function WTe(e){const t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing"),s=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),i=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:GTe.map(a=>`${a}:${t.getPropertyValue(a)}`).join(";"),paddingSize:s,borderSize:i,boxSizing:n}}function dV(e,t=1,n){var s;wc||(wc=document.createElement("textarea"),document.body.appendChild(wc));const{paddingSize:i,borderSize:r,boxSizing:a,contextStyle:c}=WTe(e);wc.setAttribute("style",`${c};${VTe}`),wc.value=e.value||e.placeholder||"";let u=wc.scrollHeight;const h={};a==="border-box"?u=u+r:a==="content-box"&&(u=u-i),wc.value="";const f=wc.scrollHeight-i;if(Wt(t)){let p=f*t;a==="border-box"&&(p=p+i+r),u=Math.max(p,u),h.minHeight=`${p}px`}if(Wt(n)){let p=f*n;a==="border-box"&&(p=p+i+r),u=Math.min(p,u)}return h.height=`${u}px`,(s=wc.parentNode)==null||s.removeChild(wc),wc=void 0,h}const os=e=>e,XTe=ht({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Xi=e=>Bc(XTe,e),GD=ht({id:{type:String,default:void 0},size:Ys,disabled:Boolean,modelValue:{type:xe([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:xe([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:To},prefixIcon:{type:To},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:xe([Object,Array,String]),default:()=>os({})},autofocus:Boolean,rows:{type:Number,default:2},...Xi(["ariaLabel"])}),zTe={[un]:e=>Dt(e),input:e=>Dt(e),change:e=>Dt(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},YTe=["class","style"],KTe=/^on[A-Z]/,$$=(e={})=>{const{excludeListeners:t=!1,excludeKeys:n}=e,s=x(()=>((n==null?void 0:n.value)||[]).concat(YTe)),i=pn();return x(i?()=>{var r;return By(Object.entries((r=i.proxy)==null?void 0:r.$attrs).filter(([a])=>!s.value.includes(a)&&!(t&&KTe.test(a))))}:()=>({}))},Ym=Symbol("formContextKey"),Zu=Symbol("formItemContextKey"),hV={prefix:Math.floor(Math.random()*1e4),current:0},jTe=Symbol("elIdInjection"),WD=()=>pn()?It(jTe,hV):hV,Gi=e=>{const t=WD(),n=mD();return UN(()=>g(e)||`${n.value}-id-${t.prefix}-${t.current++}`)},lr=()=>{const e=It(Ym,void 0),t=It(Zu,void 0);return{form:e,formItem:t}},fc=(e,{formItemContext:t,disableIdGeneration:n,disableIdManagement:s})=>{n||(n=K(!1)),s||(s=K(!1));const i=K();let r;const a=x(()=>{var c;return!!(!(e.label||e.ariaLabel)&&t&&t.inputIds&&((c=t.inputIds)==null?void 0:c.length)<=1)});return rn(()=>{r=tt([oo(e,"id"),n],([c,u])=>{const h=c??(u?void 0:Gi().value);h!==i.value&&(t!=null&&t.removeInputId&&(i.value&&t.removeInputId(i.value),!(s!=null&&s.value)&&!u&&h&&t.addInputId(h)),i.value=h)},{immediate:!0})}),Ch(()=>{r&&r(),t!=null&&t.removeInputId&&i.value&&t.removeInputId(i.value)}),{isLabeledByFormItem:a,inputId:i}},T6=e=>{const t=pn();return x(()=>{var n,s;return(s=(n=t==null?void 0:t.proxy)==null?void 0:n.$props)==null?void 0:s[e]})},Fs=(e,t={})=>{const n=K(void 0),s=t.prop?n:T6("size"),i=t.global?n:i6(),r=t.form?{size:void 0}:It(Ym,void 0),a=t.formItem?{size:void 0}:It(Zu,void 0);return x(()=>s.value||g(e)||(a==null?void 0:a.size)||(r==null?void 0:r.size)||i.value||"")},ar=e=>{const t=T6("disabled"),n=It(Ym,void 0);return x(()=>t.value||g(e)||(n==null?void 0:n.disabled)||!1)};function Pp(e,{beforeFocus:t,afterFocus:n,beforeBlur:s,afterBlur:i}={}){const r=pn(),{emit:a}=r,c=lo(),u=K(!1),h=_=>{Ut(t)&&t(_)||u.value||(u.value=!0,a("focus",_),n==null||n())},f=_=>{var E;Ut(s)&&s(_)||_.relatedTarget&&((E=c.value)!=null&&E.contains(_.relatedTarget))||(u.value=!1,a("blur",_),i==null||i())},p=()=>{var _,E;(_=c.value)!=null&&_.contains(document.activeElement)&&c.value!==document.activeElement||(E=e.value)==null||E.focus()};return tt(c,_=>{_&&_.setAttribute("tabindex","-1")}),fo(c,"focus",h,!0),fo(c,"blur",f,!0),fo(c,"click",p,!0),{isFocused:u,wrapperRef:c,handleFocus:h,handleBlur:f}}const QTe=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e);function I$({afterComposition:e,emit:t}){const n=K(!1),s=c=>{t==null||t("compositionstart",c),n.value=!0},i=c=>{var u;t==null||t("compositionupdate",c);const h=(u=c.target)==null?void 0:u.value,f=h[h.length-1]||"";n.value=!QTe(f)},r=c=>{t==null||t("compositionend",c),n.value&&(n.value=!1,Vt(()=>e(c)))};return{isComposing:n,handleComposition:c=>{c.type==="compositionend"?r(c):i(c)},handleCompositionStart:s,handleCompositionUpdate:i,handleCompositionEnd:r}}function qTe(e){let t;function n(){if(e.value==null)return;const{selectionStart:i,selectionEnd:r,value:a}=e.value;if(i==null||r==null)return;const c=a.slice(0,Math.max(0,i)),u=a.slice(Math.max(0,r));t={selectionStart:i,selectionEnd:r,value:a,beforeTxt:c,afterTxt:u}}function s(){if(e.value==null||t==null)return;const{value:i}=e.value,{beforeTxt:r,afterTxt:a,selectionStart:c}=t;if(r==null||a==null||c==null)return;let u=i.length;if(i.endsWith(a))u=i.length-a.length;else if(i.startsWith(r))u=r.length;else{const h=r[c-1],f=i.indexOf(h,c-1);f!==-1&&(u=f+1)}e.value.setSelectionRange(u,u)}return[n,s]}const JTe=Re({name:"ElInput",inheritAttrs:!1}),ZTe=Re({...JTe,props:GD,emits:zTe,setup(e,{expose:t,emit:n}){const s=e,i=Cp(),r=$$(),a=Ks(),c=x(()=>[s.type==="textarea"?b.b():v.b(),v.m(_.value),v.is("disabled",E.value),v.is("exceed",Ie.value),{[v.b("group")]:a.prepend||a.append,[v.m("prefix")]:a.prefix||s.prefixIcon,[v.m("suffix")]:a.suffix||s.suffixIcon||s.clearable||s.showPassword,[v.bm("suffix","password-clear")]:Z.value&&Q.value,[v.b("hidden")]:s.type==="hidden"},i.class]),u=x(()=>[v.e("wrapper"),v.is("focus",P.value)]),{form:h,formItem:f}=lr(),{inputId:p}=fc(s,{formItemContext:f}),_=Fs(),E=ar(),v=rt("input"),b=rt("textarea"),y=lo(),S=lo(),L=K(!1),I=K(!1),R=K(),w=lo(s.inputStyle),k=x(()=>y.value||S.value),{wrapperRef:D,isFocused:P,handleFocus:B,handleBlur:F}=Pp(k,{beforeFocus(){return E.value},afterBlur(){var Se;s.validateEvent&&((Se=f==null?void 0:f.validate)==null||Se.call(f,"blur").catch(Je=>void 0))}}),X=x(()=>{var Se;return(Se=h==null?void 0:h.statusIcon)!=null?Se:!1}),G=x(()=>(f==null?void 0:f.validateState)||""),re=x(()=>G.value&&HA[G.value]),_e=x(()=>I.value?ATe:eTe),J=x(()=>[i.style]),Y=x(()=>[s.inputStyle,w.value,{resize:s.resize}]),ae=x(()=>hi(s.modelValue)?"":String(s.modelValue)),Z=x(()=>s.clearable&&!E.value&&!s.readonly&&!!ae.value&&(P.value||L.value)),Q=x(()=>s.showPassword&&!E.value&&!!ae.value&&(!!ae.value||P.value)),he=x(()=>s.showWordLimit&&!!s.maxlength&&(s.type==="text"||s.type==="textarea")&&!E.value&&!s.readonly&&!s.showPassword),ge=x(()=>ae.value.length),Ie=x(()=>!!he.value&&ge.value>Number(s.maxlength)),be=x(()=>!!a.suffix||!!s.suffixIcon||Z.value||s.showPassword||he.value||!!G.value&&X.value),[Ae,We]=qTe(y);Xo(S,Se=>{if(Pe(),!he.value||s.resize!=="both")return;const Je=Se[0],{width:ut}=Je.contentRect;R.value={right:`calc(100% - ${ut+15+6}px)`}});const $e=()=>{const{type:Se,autosize:Je}=s;if(!(!Dn||Se!=="textarea"||!S.value))if(Je){const ut=Tn(Je)?Je.minRows:void 0,Mt=Tn(Je)?Je.maxRows:void 0,mt=dV(S.value,ut,Mt);w.value={overflowY:"hidden",...mt},Vt(()=>{S.value.offsetHeight,w.value=mt})}else w.value={minHeight:dV(S.value).minHeight}},Pe=(Se=>{let Je=!1;return()=>{var ut;if(Je||!s.autosize)return;((ut=S.value)==null?void 0:ut.offsetParent)===null||(Se(),Je=!0)}})($e),Be=()=>{const Se=k.value,Je=s.formatter?s.formatter(ae.value):ae.value;!Se||Se.value===Je||(Se.value=Je)},ot=async Se=>{Ae();let{value:Je}=Se.target;if(s.formatter&&(Je=s.parser?s.parser(Je):Je),!ee.value){if(Je===ae.value){Be();return}n(un,Je),n("input",Je),await Vt(),Be(),We()}},Xe=Se=>{n("change",Se.target.value)},{isComposing:ee,handleCompositionStart:pe,handleCompositionUpdate:Oe,handleCompositionEnd:ze}=I$({emit:n,afterComposition:ot}),Ze=()=>{Ae(),I.value=!I.value,setTimeout(We)},De=()=>{var Se;return(Se=k.value)==null?void 0:Se.focus()},me=()=>{var Se;return(Se=k.value)==null?void 0:Se.blur()},Te=Se=>{L.value=!1,n("mouseleave",Se)},Ue=Se=>{L.value=!0,n("mouseenter",Se)},qe=Se=>{n("keydown",Se)},ct=()=>{var Se;(Se=k.value)==null||Se.select()},Ne=()=>{n(un,""),n("change",""),n("clear"),n("input","")};return tt(()=>s.modelValue,()=>{var Se;Vt(()=>$e()),s.validateEvent&&((Se=f==null?void 0:f.validate)==null||Se.call(f,"change").catch(Je=>void 0))}),tt(ae,()=>Be()),tt(()=>s.type,async()=>{await Vt(),Be(),$e()}),rn(()=>{!s.formatter&&s.parser,Be(),Vt($e)}),t({input:y,textarea:S,ref:k,textareaStyle:Y,autosize:oo(s,"autosize"),isComposing:ee,focus:De,blur:me,select:ct,clear:Ne,resizeTextarea:$e}),(Se,Je)=>(H(),le("div",{class:z([g(c),{[g(v).bm("group","append")]:Se.$slots.append,[g(v).bm("group","prepend")]:Se.$slots.prepend}]),style:Bt(g(J)),onMouseenter:Ue,onMouseleave:Te},[Ge(" input "),Se.type!=="textarea"?(H(),le(Lt,{key:0},[Ge(" prepend slot "),Se.$slots.prepend?(H(),le("div",{key:0,class:z(g(v).be("group","prepend"))},[He(Se.$slots,"prepend")],2)):Ge("v-if",!0),te("div",{ref_key:"wrapperRef",ref:D,class:z(g(u))},[Ge(" prefix slot "),Se.$slots.prefix||Se.prefixIcon?(H(),le("span",{key:0,class:z(g(v).e("prefix"))},[te("span",{class:z(g(v).e("prefix-inner"))},[He(Se.$slots,"prefix"),Se.prefixIcon?(H(),Ye(g(Nt),{key:0,class:z(g(v).e("icon"))},{default:de(()=>[(H(),Ye(yn(Se.prefixIcon)))]),_:1},8,["class"])):Ge("v-if",!0)],2)],2)):Ge("v-if",!0),te("input",$n({id:g(p),ref_key:"input",ref:y,class:g(v).e("inner")},g(r),{minlength:Se.minlength,maxlength:Se.maxlength,type:Se.showPassword?I.value?"text":"password":Se.type,disabled:g(E),readonly:Se.readonly,autocomplete:Se.autocomplete,tabindex:Se.tabindex,"aria-label":Se.ariaLabel,placeholder:Se.placeholder,style:Se.inputStyle,form:Se.form,autofocus:Se.autofocus,role:Se.containerRole,onCompositionstart:g(pe),onCompositionupdate:g(Oe),onCompositionend:g(ze),onInput:ot,onChange:Xe,onKeydown:qe}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","onCompositionstart","onCompositionupdate","onCompositionend"]),Ge(" suffix slot "),g(be)?(H(),le("span",{key:1,class:z(g(v).e("suffix"))},[te("span",{class:z(g(v).e("suffix-inner"))},[!g(Z)||!g(Q)||!g(he)?(H(),le(Lt,{key:0},[He(Se.$slots,"suffix"),Se.suffixIcon?(H(),Ye(g(Nt),{key:0,class:z(g(v).e("icon"))},{default:de(()=>[(H(),Ye(yn(Se.suffixIcon)))]),_:1},8,["class"])):Ge("v-if",!0)],64)):Ge("v-if",!0),g(Z)?(H(),Ye(g(Nt),{key:1,class:z([g(v).e("icon"),g(v).e("clear")]),onMousedown:Yt(g(ro),["prevent"]),onClick:Ne},{default:de(()=>[oe(g(Nh))]),_:1},8,["class","onMousedown"])):Ge("v-if",!0),g(Q)?(H(),Ye(g(Nt),{key:2,class:z([g(v).e("icon"),g(v).e("password")]),onClick:Ze},{default:de(()=>[(H(),Ye(yn(g(_e))))]),_:1},8,["class"])):Ge("v-if",!0),g(he)?(H(),le("span",{key:3,class:z(g(v).e("count"))},[te("span",{class:z(g(v).e("count-inner"))},Ke(g(ge))+" / "+Ke(Se.maxlength),3)],2)):Ge("v-if",!0),g(G)&&g(re)&&g(X)?(H(),Ye(g(Nt),{key:4,class:z([g(v).e("icon"),g(v).e("validateIcon"),g(v).is("loading",g(G)==="validating")])},{default:de(()=>[(H(),Ye(yn(g(re))))]),_:1},8,["class"])):Ge("v-if",!0)],2)],2)):Ge("v-if",!0)],2),Ge(" append slot "),Se.$slots.append?(H(),le("div",{key:1,class:z(g(v).be("group","append"))},[He(Se.$slots,"append")],2)):Ge("v-if",!0)],64)):(H(),le(Lt,{key:1},[Ge(" textarea "),te("textarea",$n({id:g(p),ref_key:"textarea",ref:S,class:[g(b).e("inner"),g(v).is("focus",g(P))]},g(r),{minlength:Se.minlength,maxlength:Se.maxlength,tabindex:Se.tabindex,disabled:g(E),readonly:Se.readonly,autocomplete:Se.autocomplete,style:g(Y),"aria-label":Se.ariaLabel,placeholder:Se.placeholder,form:Se.form,autofocus:Se.autofocus,rows:Se.rows,role:Se.containerRole,onCompositionstart:g(pe),onCompositionupdate:g(Oe),onCompositionend:g(ze),onInput:ot,onFocus:g(B),onBlur:g(F),onChange:Xe,onKeydown:qe}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),g(he)?(H(),le("span",{key:0,style:Bt(R.value),class:z(g(v).e("count"))},Ke(g(ge))+" / "+Ke(Se.maxlength),7)):Ge("v-if",!0)],64))],38))}});var eEe=pt(ZTe,[["__file","input.vue"]]);const Nr=nn(eEe),FT=4,E6={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},tEe=({move:e,size:t,bar:n})=>({[n.size]:t,transform:`translate${n.axis}(${e}%)`}),XD=Symbol("scrollbarContextKey"),nEe=ht({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),oEe="Thumb",sEe=Re({__name:"thumb",props:nEe,setup(e){const t=e,n=It(XD),s=rt("scrollbar");n||ti(oEe,"can not inject scrollbar context");const i=K(),r=K(),a=K({}),c=K(!1);let u=!1,h=!1,f=Dn?document.onselectstart:null;const p=x(()=>E6[t.vertical?"vertical":"horizontal"]),_=x(()=>tEe({size:t.size,move:t.move,bar:p.value})),E=x(()=>i.value[p.value.offset]**2/n.wrapElement[p.value.scrollSize]/t.ratio/r.value[p.value.offset]),v=k=>{var D;if(k.stopPropagation(),k.ctrlKey||[1,2].includes(k.button))return;(D=window.getSelection())==null||D.removeAllRanges(),y(k);const P=k.currentTarget;P&&(a.value[p.value.axis]=P[p.value.offset]-(k[p.value.client]-P.getBoundingClientRect()[p.value.direction]))},b=k=>{if(!r.value||!i.value||!n.wrapElement)return;const D=Math.abs(k.target.getBoundingClientRect()[p.value.direction]-k[p.value.client]),P=r.value[p.value.offset]/2,B=(D-P)*100*E.value/i.value[p.value.offset];n.wrapElement[p.value.scroll]=B*n.wrapElement[p.value.scrollSize]/100},y=k=>{k.stopImmediatePropagation(),u=!0,document.addEventListener("mousemove",S),document.addEventListener("mouseup",L),f=document.onselectstart,document.onselectstart=()=>!1},S=k=>{if(!i.value||!r.value||u===!1)return;const D=a.value[p.value.axis];if(!D)return;const P=(i.value.getBoundingClientRect()[p.value.direction]-k[p.value.client])*-1,B=r.value[p.value.offset]-D,F=(P-B)*100*E.value/i.value[p.value.offset];n.wrapElement[p.value.scroll]=F*n.wrapElement[p.value.scrollSize]/100},L=()=>{u=!1,a.value[p.value.axis]=0,document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",L),w(),h&&(c.value=!1)},I=()=>{h=!1,c.value=!!t.size},R=()=>{h=!0,c.value=u};vo(()=>{w(),document.removeEventListener("mouseup",L)});const w=()=>{document.onselectstart!==f&&(document.onselectstart=f)};return fo(oo(n,"scrollbarElement"),"mousemove",I),fo(oo(n,"scrollbarElement"),"mouseleave",R),(k,D)=>(H(),Ye(Li,{name:g(s).b("fade"),persisted:""},{default:de(()=>[an(te("div",{ref_key:"instance",ref:i,class:z([g(s).e("bar"),g(s).is(g(p).key)]),onMousedown:b},[te("div",{ref_key:"thumb",ref:r,class:z(g(s).e("thumb")),style:Bt(g(_)),onMousedown:v},null,38)],34),[[Yn,k.always||c.value]])]),_:1},8,["name"]))}});var fV=pt(sEe,[["__file","thumb.vue"]]);const iEe=ht({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),rEe=Re({__name:"bar",props:iEe,setup(e,{expose:t}){const n=e,s=It(XD),i=K(0),r=K(0),a=K(""),c=K(""),u=K(1),h=K(1);return t({handleScroll:_=>{if(_){const E=_.offsetHeight-FT,v=_.offsetWidth-FT;r.value=_.scrollTop*100/E*u.value,i.value=_.scrollLeft*100/v*h.value}},update:()=>{const _=s==null?void 0:s.wrapElement;if(!_)return;const E=_.offsetHeight-FT,v=_.offsetWidth-FT,b=E**2/_.scrollHeight,y=v**2/_.scrollWidth,S=Math.max(b,n.minSize),L=Math.max(y,n.minSize);u.value=b/(E-b)/(S/(E-S)),h.value=y/(v-y)/(L/(v-L)),c.value=S+FT<E?`${S}px`:"",a.value=L+FT<v?`${L}px`:""}}),(_,E)=>(H(),le(Lt,null,[oe(fV,{move:i.value,ratio:h.value,size:a.value,always:_.always},null,8,["move","ratio","size","always"]),oe(fV,{move:r.value,ratio:u.value,size:c.value,vertical:"",always:_.always},null,8,["move","ratio","size","always"])],64))}});var lEe=pt(rEe,[["__file","bar.vue"]]);const aEe=ht({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:xe([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...Xi(["ariaLabel","ariaOrientation"])}),cEe={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(Wt)},uEe="ElScrollbar",dEe=Re({name:uEe}),hEe=Re({...dEe,props:aEe,emits:cEe,setup(e,{expose:t,emit:n}){const s=e,i=rt("scrollbar");let r,a,c=0,u=0;const h=K(),f=K(),p=K(),_=K(),E=x(()=>{const w={};return s.height&&(w.height=bs(s.height)),s.maxHeight&&(w.maxHeight=bs(s.maxHeight)),[s.wrapStyle,w]}),v=x(()=>[s.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!s.native}]),b=x(()=>[i.e("view"),s.viewClass]),y=()=>{var w;f.value&&((w=_.value)==null||w.handleScroll(f.value),c=f.value.scrollTop,u=f.value.scrollLeft,n("scroll",{scrollTop:f.value.scrollTop,scrollLeft:f.value.scrollLeft}))};function S(w,k){Tn(w)?f.value.scrollTo(w):Wt(w)&&Wt(k)&&f.value.scrollTo(w,k)}const L=w=>{Wt(w)&&(f.value.scrollTop=w)},I=w=>{Wt(w)&&(f.value.scrollLeft=w)},R=()=>{var w;(w=_.value)==null||w.update()};return tt(()=>s.noresize,w=>{w?(r==null||r(),a==null||a()):({stop:r}=Xo(p,R),a=fo("resize",R))},{immediate:!0}),tt(()=>[s.maxHeight,s.height],()=>{s.native||Vt(()=>{var w;R(),f.value&&((w=_.value)==null||w.handleScroll(f.value))})}),An(XD,Kn({scrollbarElement:h,wrapElement:f})),uP(()=>{f.value&&(f.value.scrollTop=c,f.value.scrollLeft=u)}),rn(()=>{s.native||Vt(()=>{R()})}),nd(()=>R()),t({wrapRef:f,update:R,scrollTo:S,setScrollTop:L,setScrollLeft:I,handleScroll:y}),(w,k)=>(H(),le("div",{ref_key:"scrollbarRef",ref:h,class:z(g(i).b())},[te("div",{ref_key:"wrapRef",ref:f,class:z(g(v)),style:Bt(g(E)),tabindex:w.tabindex,onScroll:y},[(H(),Ye(yn(w.tag),{id:w.id,ref_key:"resizeRef",ref:p,class:z(g(b)),style:Bt(w.viewStyle),role:w.role,"aria-label":w.ariaLabel,"aria-orientation":w.ariaOrientation},{default:de(()=>[He(w.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),w.native?Ge("v-if",!0):(H(),Ye(lEe,{key:0,ref_key:"barRef",ref:_,always:w.always,"min-size":w.minSize},null,8,["always","min-size"]))],2))}});var fEe=pt(hEe,[["__file","scrollbar.vue"]]);const ld=nn(fEe),zD=Symbol("popper"),v6=Symbol("popperContent"),pEe=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],b6=ht({role:{type:String,values:pEe,default:"tooltip"}}),gEe=Re({name:"ElPopper",inheritAttrs:!1}),mEe=Re({...gEe,props:b6,setup(e,{expose:t}){const n=e,s=K(),i=K(),r=K(),a=K(),c=x(()=>n.role),u={triggerRef:s,popperInstanceRef:i,contentRef:r,referenceRef:a,role:c};return t(u),An(zD,u),(h,f)=>He(h.$slots,"default")}});var _Ee=pt(mEe,[["__file","popper.vue"]]);const O6=ht({arrowOffset:{type:Number,default:5}}),TEe=Re({name:"ElPopperArrow",inheritAttrs:!1}),EEe=Re({...TEe,props:O6,setup(e,{expose:t}){const n=e,s=rt("popper"),{arrowOffset:i,arrowRef:r,arrowStyle:a}=It(v6,void 0);return tt(()=>n.arrowOffset,c=>{i.value=c}),vo(()=>{r.value=void 0}),t({arrowRef:r}),(c,u)=>(H(),le("span",{ref_key:"arrowRef",ref:r,class:z(g(s).e("arrow")),style:Bt(g(a)),"data-popper-arrow":""},null,6))}});var vEe=pt(EEe,[["__file","arrow.vue"]]);const S6=ht({virtualRef:{type:xe(Object)},virtualTriggering:Boolean,onMouseenter:{type:xe(Function)},onMouseleave:{type:xe(Function)},onClick:{type:xe(Function)},onKeydown:{type:xe(Function)},onFocus:{type:xe(Function)},onBlur:{type:xe(Function)},onContextmenu:{type:xe(Function)},id:String,open:Boolean}),y6=Symbol("elForwardRef"),bEe=e=>{An(y6,{setForwardRef:n=>{e.value=n}})},OEe=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),SEe='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',yEe=e=>getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,pV=e=>Array.from(e.querySelectorAll(SEe)).filter(t=>GN(t)&&yEe(t)),GN=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},uC=function(e,t,...n){let s;t.includes("mouse")||t.includes("click")?s="MouseEvents":t.includes("key")?s="KeyboardEvent":s="HTMLEvents";const i=document.createEvent(s);return i.initEvent(t,...n),e.dispatchEvent(i),e},$6=e=>!e.getAttribute("aria-owns"),I6=(e,t,n)=>{const{parentNode:s}=e;if(!s)return null;const i=s.querySelectorAll(n),r=Array.prototype.indexOf.call(i,e);return i[r+t]||null},dC=e=>{e&&(e.focus(),!$6(e)&&e.click())},$Ee="ElOnlyChild",R6=Re({name:$Ee,setup(e,{slots:t,attrs:n}){var s;const i=It(y6),r=OEe((s=i==null?void 0:i.setForwardRef)!=null?s:ro);return()=>{var a;const c=(a=t.default)==null?void 0:a.call(t,n);if(!c||c.length>1)return null;const u=C6(c);return u?an(Eh(u,n),[[r]]):null}}});function C6(e){if(!e)return null;const t=e;for(const n of t){if(Tn(n))switch(n.type){case Ii:continue;case Gm:case"svg":return gV(n);case Lt:return C6(n.children);default:return n}return gV(n)}return null}function gV(e){const t=rt("only-child");return oe("span",{class:t.e("content")},[e])}const IEe=Re({name:"ElPopperTrigger",inheritAttrs:!1}),REe=Re({...IEe,props:S6,setup(e,{expose:t}){const n=e,{role:s,triggerRef:i}=It(zD,void 0);bEe(i);const r=x(()=>c.value?n.id:void 0),a=x(()=>{if(s&&s.value==="tooltip")return n.open&&n.id?n.id:void 0}),c=x(()=>{if(s&&s.value!=="tooltip")return s.value}),u=x(()=>c.value?`${n.open}`:void 0);let h;const f=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return rn(()=>{tt(()=>n.virtualRef,p=>{p&&(i.value=ol(p))},{immediate:!0}),tt(i,(p,_)=>{h==null||h(),h=void 0,pa(p)&&(f.forEach(E=>{var v;const b=n[E];b&&(p.addEventListener(E.slice(2).toLowerCase(),b),(v=_==null?void 0:_.removeEventListener)==null||v.call(_,E.slice(2).toLowerCase(),b))}),GN(p)&&(h=tt([r,a,c,u],E=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((v,b)=>{hi(E[b])?p.removeAttribute(v):p.setAttribute(v,E[b])})},{immediate:!0}))),pa(_)&&GN(_)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(E=>_.removeAttribute(E))},{immediate:!0})}),vo(()=>{if(h==null||h(),h=void 0,i.value&&pa(i.value)){const p=i.value;f.forEach(_=>{const E=n[_];E&&p.removeEventListener(_.slice(2).toLowerCase(),E)}),i.value=void 0}}),t({triggerRef:i}),(p,_)=>p.virtualTriggering?Ge("v-if",!0):(H(),Ye(g(R6),$n({key:0},p.$attrs,{"aria-controls":g(r),"aria-describedby":g(a),"aria-expanded":g(u),"aria-haspopup":g(c)}),{default:de(()=>[He(p.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var CEe=pt(REe,[["__file","trigger.vue"]]);const Mw="focus-trap.focus-after-trapped",Aw="focus-trap.focus-after-released",MEe="focus-trap.focusout-prevented",mV={cancelable:!0,bubbles:!1},AEe={cancelable:!0,bubbles:!1},_V="focusAfterTrapped",TV="focusAfterReleased",YD=Symbol("elFocusTrap"),KD=K(),GA=K(0),jD=K(0);let fR=0;const M6=e=>{const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const i=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||i?NodeFilter.FILTER_SKIP:s.tabIndex>=0||s===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t},EV=(e,t)=>{for(const n of e)if(!LEe(n,t))return n},LEe=(e,t)=>{if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},wEe=e=>{const t=M6(e),n=EV(t,e),s=EV(t.reverse(),e);return[n,s]},kEe=e=>e instanceof HTMLInputElement&&"select"in e,Gf=(e,t)=>{if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),jD.value=window.performance.now(),e!==n&&kEe(e)&&t&&e.select()}};function vV(e,t){const n=[...e],s=e.indexOf(t);return s!==-1&&n.splice(s,1),n}const NEe=()=>{let e=[];return{push:s=>{const i=e[0];i&&s!==i&&i.pause(),e=vV(e,s),e.unshift(s)},remove:s=>{var i,r;e=vV(e,s),(r=(i=e[0])==null?void 0:i.resume)==null||r.call(i)}}},PEe=(e,t=!1)=>{const n=document.activeElement;for(const s of e)if(Gf(s,t),document.activeElement!==n)return},bV=NEe(),DEe=()=>GA.value>jD.value,pR=()=>{KD.value="pointer",GA.value=window.performance.now()},OV=()=>{KD.value="keyboard",GA.value=window.performance.now()},xEe=()=>(rn(()=>{fR===0&&(document.addEventListener("mousedown",pR),document.addEventListener("touchstart",pR),document.addEventListener("keydown",OV)),fR++}),vo(()=>{fR--,fR<=0&&(document.removeEventListener("mousedown",pR),document.removeEventListener("touchstart",pR),document.removeEventListener("keydown",OV))}),{focusReason:KD,lastUserFocusTimestamp:GA,lastAutomatedFocusTimestamp:jD}),gR=e=>new CustomEvent(MEe,{...AEe,detail:e}),$t={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"};let QT=[];const SV=e=>{e.code===$t.esc&&QT.forEach(t=>t(e))},BEe=e=>{rn(()=>{QT.length===0&&document.addEventListener("keydown",SV),Dn&&QT.push(e)}),vo(()=>{QT=QT.filter(t=>t!==e),QT.length===0&&Dn&&document.removeEventListener("keydown",SV)})},FEe=Re({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[_V,TV,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=K();let s,i;const{focusReason:r}=xEe();BEe(v=>{e.trapped&&!a.paused&&t("release-requested",v)});const a={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},c=v=>{if(!e.loop&&!e.trapped||a.paused)return;const{code:b,altKey:y,ctrlKey:S,metaKey:L,currentTarget:I,shiftKey:R}=v,{loop:w}=e,k=b===$t.tab&&!y&&!S&&!L,D=document.activeElement;if(k&&D){const P=I,[B,F]=wEe(P);if(B&&F){if(!R&&D===F){const G=gR({focusReason:r.value});t("focusout-prevented",G),G.defaultPrevented||(v.preventDefault(),w&&Gf(B,!0))}else if(R&&[B,P].includes(D)){const G=gR({focusReason:r.value});t("focusout-prevented",G),G.defaultPrevented||(v.preventDefault(),w&&Gf(F,!0))}}else if(D===P){const G=gR({focusReason:r.value});t("focusout-prevented",G),G.defaultPrevented||v.preventDefault()}}};An(YD,{focusTrapRef:n,onKeydown:c}),tt(()=>e.focusTrapEl,v=>{v&&(n.value=v)},{immediate:!0}),tt([n],([v],[b])=>{v&&(v.addEventListener("keydown",c),v.addEventListener("focusin",f),v.addEventListener("focusout",p)),b&&(b.removeEventListener("keydown",c),b.removeEventListener("focusin",f),b.removeEventListener("focusout",p))});const u=v=>{t(_V,v)},h=v=>t(TV,v),f=v=>{const b=g(n);if(!b)return;const y=v.target,S=v.relatedTarget,L=y&&b.contains(y);e.trapped||S&&b.contains(S)||(s=S),L&&t("focusin",v),!a.paused&&e.trapped&&(L?i=y:Gf(i,!0))},p=v=>{const b=g(n);if(!(a.paused||!b))if(e.trapped){const y=v.relatedTarget;!hi(y)&&!b.contains(y)&&setTimeout(()=>{if(!a.paused&&e.trapped){const S=gR({focusReason:r.value});t("focusout-prevented",S),S.defaultPrevented||Gf(i,!0)}},0)}else{const y=v.target;y&&b.contains(y)||t("focusout",v)}};async function _(){await Vt();const v=g(n);if(v){bV.push(a);const b=v.contains(document.activeElement)?s:document.activeElement;if(s=b,!v.contains(b)){const S=new Event(Mw,mV);v.addEventListener(Mw,u),v.dispatchEvent(S),S.defaultPrevented||Vt(()=>{let L=e.focusStartEl;Dt(L)||(Gf(L),document.activeElement!==L&&(L="first")),L==="first"&&PEe(M6(v),!0),(document.activeElement===b||L==="container")&&Gf(v)})}}}function E(){const v=g(n);if(v){v.removeEventListener(Mw,u);const b=new CustomEvent(Aw,{...mV,detail:{focusReason:r.value}});v.addEventListener(Aw,h),v.dispatchEvent(b),!b.defaultPrevented&&(r.value=="keyboard"||!DEe()||v.contains(document.activeElement))&&Gf(s??document.body),v.removeEventListener(Aw,h),bV.remove(a)}}return rn(()=>{e.trapped&&_(),tt(()=>e.trapped,v=>{v?_():E()})}),vo(()=>{e.trapped&&E(),n.value&&(n.value.removeEventListener("keydown",c),n.value.removeEventListener("focusin",f),n.value.removeEventListener("focusout",p),n.value=void 0)}),{onKeydown:c}}});function UEe(e,t,n,s,i,r){return He(e.$slots,"default",{handleKeydown:e.onKeydown})}var mv=pt(FEe,[["render",UEe],["__file","focus-trap.vue"]]),Bl="top",ac="bottom",cc="right",Fl="left",QD="auto",R$=[Bl,ac,cc,Fl],HE="start",Fy="end",HEe="clippingParents",A6="viewport",ES="popper",VEe="reference",yV=R$.reduce(function(e,t){return e.concat([t+"-"+HE,t+"-"+Fy])},[]),Ph=[].concat(R$,[QD]).reduce(function(e,t){return e.concat([t,t+"-"+HE,t+"-"+Fy])},[]),GEe="beforeRead",WEe="read",XEe="afterRead",zEe="beforeMain",YEe="main",KEe="afterMain",jEe="beforeWrite",QEe="write",qEe="afterWrite",JEe=[GEe,WEe,XEe,zEe,YEe,KEe,jEe,QEe,qEe];function ed(e){return e?(e.nodeName||"").toLowerCase():null}function tu(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function VE(e){var t=tu(e).Element;return e instanceof t||e instanceof Element}function sc(e){var t=tu(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function qD(e){if(typeof ShadowRoot>"u")return!1;var t=tu(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function ZEe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var s=t.styles[n]||{},i=t.attributes[n]||{},r=t.elements[n];!sc(r)||!ed(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(a){var c=i[a];c===!1?r.removeAttribute(a):r.setAttribute(a,c===!0?"":c)}))})}function eve(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(s){var i=t.elements[s],r=t.attributes[s]||{},a=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:n[s]),c=a.reduce(function(u,h){return u[h]="",u},{});!sc(i)||!ed(i)||(Object.assign(i.style,c),Object.keys(r).forEach(function(u){i.removeAttribute(u)}))})}}var L6={name:"applyStyles",enabled:!0,phase:"write",fn:ZEe,effect:eve,requires:["computeStyles"]};function Ku(e){return e.split("-")[0]}var Sm=Math.max,$M=Math.min,GE=Math.round;function WE(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),s=1,i=1;if(sc(e)&&t){var r=e.offsetHeight,a=e.offsetWidth;a>0&&(s=GE(n.width)/a||1),r>0&&(i=GE(n.height)/r||1)}return{width:n.width/s,height:n.height/i,top:n.top/i,right:n.right/s,bottom:n.bottom/i,left:n.left/s,x:n.left/s,y:n.top/i}}function JD(e){var t=WE(e),n=e.offsetWidth,s=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:s}}function w6(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&qD(n)){var s=t;do{if(s&&e.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function Sh(e){return tu(e).getComputedStyle(e)}function tve(e){return["table","td","th"].indexOf(ed(e))>=0}function Dp(e){return((VE(e)?e.ownerDocument:e.document)||window.document).documentElement}function WA(e){return ed(e)==="html"?e:e.assignedSlot||e.parentNode||(qD(e)?e.host:null)||Dp(e)}function $V(e){return!sc(e)||Sh(e).position==="fixed"?null:e.offsetParent}function nve(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&sc(e)){var s=Sh(e);if(s.position==="fixed")return null}var i=WA(e);for(qD(i)&&(i=i.host);sc(i)&&["html","body"].indexOf(ed(i))<0;){var r=Sh(i);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||t&&r.willChange==="filter"||t&&r.filter&&r.filter!=="none")return i;i=i.parentNode}return null}function C$(e){for(var t=tu(e),n=$V(e);n&&tve(n)&&Sh(n).position==="static";)n=$V(n);return n&&(ed(n)==="html"||ed(n)==="body"&&Sh(n).position==="static")?t:n||nve(e)||t}function ZD(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function QS(e,t,n){return Sm(e,$M(t,n))}function ove(e,t,n){var s=QS(e,t,n);return s>n?n:s}function k6(){return{top:0,right:0,bottom:0,left:0}}function N6(e){return Object.assign({},k6(),e)}function P6(e,t){return t.reduce(function(n,s){return n[s]=e,n},{})}var sve=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,N6(typeof e!="number"?e:P6(e,R$))};function ive(e){var t,n=e.state,s=e.name,i=e.options,r=n.elements.arrow,a=n.modifiersData.popperOffsets,c=Ku(n.placement),u=ZD(c),h=[Fl,cc].indexOf(c)>=0,f=h?"height":"width";if(!(!r||!a)){var p=sve(i.padding,n),_=JD(r),E=u==="y"?Bl:Fl,v=u==="y"?ac:cc,b=n.rects.reference[f]+n.rects.reference[u]-a[u]-n.rects.popper[f],y=a[u]-n.rects.reference[u],S=C$(r),L=S?u==="y"?S.clientHeight||0:S.clientWidth||0:0,I=b/2-y/2,R=p[E],w=L-_[f]-p[v],k=L/2-_[f]/2+I,D=QS(R,k,w),P=u;n.modifiersData[s]=(t={},t[P]=D,t.centerOffset=D-k,t)}}function rve(e){var t=e.state,n=e.options,s=n.element,i=s===void 0?"[data-popper-arrow]":s;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!w6(t.elements.popper,i)||(t.elements.arrow=i))}var lve={name:"arrow",enabled:!0,phase:"main",fn:ive,effect:rve,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function XE(e){return e.split("-")[1]}var ave={top:"auto",right:"auto",bottom:"auto",left:"auto"};function cve(e){var t=e.x,n=e.y,s=window,i=s.devicePixelRatio||1;return{x:GE(t*i)/i||0,y:GE(n*i)/i||0}}function IV(e){var t,n=e.popper,s=e.popperRect,i=e.placement,r=e.variation,a=e.offsets,c=e.position,u=e.gpuAcceleration,h=e.adaptive,f=e.roundOffsets,p=e.isFixed,_=a.x,E=_===void 0?0:_,v=a.y,b=v===void 0?0:v,y=typeof f=="function"?f({x:E,y:b}):{x:E,y:b};E=y.x,b=y.y;var S=a.hasOwnProperty("x"),L=a.hasOwnProperty("y"),I=Fl,R=Bl,w=window;if(h){var k=C$(n),D="clientHeight",P="clientWidth";if(k===tu(n)&&(k=Dp(n),Sh(k).position!=="static"&&c==="absolute"&&(D="scrollHeight",P="scrollWidth")),k=k,i===Bl||(i===Fl||i===cc)&&r===Fy){R=ac;var B=p&&k===w&&w.visualViewport?w.visualViewport.height:k[D];b-=B-s.height,b*=u?1:-1}if(i===Fl||(i===Bl||i===ac)&&r===Fy){I=cc;var F=p&&k===w&&w.visualViewport?w.visualViewport.width:k[P];E-=F-s.width,E*=u?1:-1}}var X=Object.assign({position:c},h&&ave),G=f===!0?cve({x:E,y:b}):{x:E,y:b};if(E=G.x,b=G.y,u){var re;return Object.assign({},X,(re={},re[R]=L?"0":"",re[I]=S?"0":"",re.transform=(w.devicePixelRatio||1)<=1?"translate("+E+"px, "+b+"px)":"translate3d("+E+"px, "+b+"px, 0)",re))}return Object.assign({},X,(t={},t[R]=L?b+"px":"",t[I]=S?E+"px":"",t.transform="",t))}function uve(e){var t=e.state,n=e.options,s=n.gpuAcceleration,i=s===void 0?!0:s,r=n.adaptive,a=r===void 0?!0:r,c=n.roundOffsets,u=c===void 0?!0:c,h={placement:Ku(t.placement),variation:XE(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,IV(Object.assign({},h,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,IV(Object.assign({},h,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var D6={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:uve,data:{}},mR={passive:!0};function dve(e){var t=e.state,n=e.instance,s=e.options,i=s.scroll,r=i===void 0?!0:i,a=s.resize,c=a===void 0?!0:a,u=tu(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&h.forEach(function(f){f.addEventListener("scroll",n.update,mR)}),c&&u.addEventListener("resize",n.update,mR),function(){r&&h.forEach(function(f){f.removeEventListener("scroll",n.update,mR)}),c&&u.removeEventListener("resize",n.update,mR)}}var x6={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:dve,data:{}},hve={left:"right",right:"left",bottom:"top",top:"bottom"};function hC(e){return e.replace(/left|right|bottom|top/g,function(t){return hve[t]})}var fve={start:"end",end:"start"};function RV(e){return e.replace(/start|end/g,function(t){return fve[t]})}function ex(e){var t=tu(e),n=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:n,scrollTop:s}}function tx(e){return WE(Dp(e)).left+ex(e).scrollLeft}function pve(e){var t=tu(e),n=Dp(e),s=t.visualViewport,i=n.clientWidth,r=n.clientHeight,a=0,c=0;return s&&(i=s.width,r=s.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=s.offsetLeft,c=s.offsetTop)),{width:i,height:r,x:a+tx(e),y:c}}function gve(e){var t,n=Dp(e),s=ex(e),i=(t=e.ownerDocument)==null?void 0:t.body,r=Sm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Sm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),c=-s.scrollLeft+tx(e),u=-s.scrollTop;return Sh(i||n).direction==="rtl"&&(c+=Sm(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:a,x:c,y:u}}function nx(e){var t=Sh(e),n=t.overflow,s=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+s)}function B6(e){return["html","body","#document"].indexOf(ed(e))>=0?e.ownerDocument.body:sc(e)&&nx(e)?e:B6(WA(e))}function qS(e,t){var n;t===void 0&&(t=[]);var s=B6(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),r=tu(s),a=i?[r].concat(r.visualViewport||[],nx(s)?s:[]):s,c=t.concat(a);return i?c:c.concat(qS(WA(a)))}function WN(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function mve(e){var t=WE(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function CV(e,t){return t===A6?WN(pve(e)):VE(t)?mve(t):WN(gve(Dp(e)))}function _ve(e){var t=qS(WA(e)),n=["absolute","fixed"].indexOf(Sh(e).position)>=0,s=n&&sc(e)?C$(e):e;return VE(s)?t.filter(function(i){return VE(i)&&w6(i,s)&&ed(i)!=="body"}):[]}function Tve(e,t,n){var s=t==="clippingParents"?_ve(e):[].concat(t),i=[].concat(s,[n]),r=i[0],a=i.reduce(function(c,u){var h=CV(e,u);return c.top=Sm(h.top,c.top),c.right=$M(h.right,c.right),c.bottom=$M(h.bottom,c.bottom),c.left=Sm(h.left,c.left),c},CV(e,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function F6(e){var t=e.reference,n=e.element,s=e.placement,i=s?Ku(s):null,r=s?XE(s):null,a=t.x+t.width/2-n.width/2,c=t.y+t.height/2-n.height/2,u;switch(i){case Bl:u={x:a,y:t.y-n.height};break;case ac:u={x:a,y:t.y+t.height};break;case cc:u={x:t.x+t.width,y:c};break;case Fl:u={x:t.x-n.width,y:c};break;default:u={x:t.x,y:t.y}}var h=i?ZD(i):null;if(h!=null){var f=h==="y"?"height":"width";switch(r){case HE:u[h]=u[h]-(t[f]/2-n[f]/2);break;case Fy:u[h]=u[h]+(t[f]/2-n[f]/2);break}}return u}function Uy(e,t){t===void 0&&(t={});var n=t,s=n.placement,i=s===void 0?e.placement:s,r=n.boundary,a=r===void 0?HEe:r,c=n.rootBoundary,u=c===void 0?A6:c,h=n.elementContext,f=h===void 0?ES:h,p=n.altBoundary,_=p===void 0?!1:p,E=n.padding,v=E===void 0?0:E,b=N6(typeof v!="number"?v:P6(v,R$)),y=f===ES?VEe:ES,S=e.rects.popper,L=e.elements[_?y:f],I=Tve(VE(L)?L:L.contextElement||Dp(e.elements.popper),a,u),R=WE(e.elements.reference),w=F6({reference:R,element:S,strategy:"absolute",placement:i}),k=WN(Object.assign({},S,w)),D=f===ES?k:R,P={top:I.top-D.top+b.top,bottom:D.bottom-I.bottom+b.bottom,left:I.left-D.left+b.left,right:D.right-I.right+b.right},B=e.modifiersData.offset;if(f===ES&&B){var F=B[i];Object.keys(P).forEach(function(X){var G=[cc,ac].indexOf(X)>=0?1:-1,re=[Bl,ac].indexOf(X)>=0?"y":"x";P[X]+=F[re]*G})}return P}function Eve(e,t){t===void 0&&(t={});var n=t,s=n.placement,i=n.boundary,r=n.rootBoundary,a=n.padding,c=n.flipVariations,u=n.allowedAutoPlacements,h=u===void 0?Ph:u,f=XE(s),p=f?c?yV:yV.filter(function(v){return XE(v)===f}):R$,_=p.filter(function(v){return h.indexOf(v)>=0});_.length===0&&(_=p);var E=_.reduce(function(v,b){return v[b]=Uy(e,{placement:b,boundary:i,rootBoundary:r,padding:a})[Ku(b)],v},{});return Object.keys(E).sort(function(v,b){return E[v]-E[b]})}function vve(e){if(Ku(e)===QD)return[];var t=hC(e);return[RV(e),t,RV(t)]}function bve(e){var t=e.state,n=e.options,s=e.name;if(!t.modifiersData[s]._skip){for(var i=n.mainAxis,r=i===void 0?!0:i,a=n.altAxis,c=a===void 0?!0:a,u=n.fallbackPlacements,h=n.padding,f=n.boundary,p=n.rootBoundary,_=n.altBoundary,E=n.flipVariations,v=E===void 0?!0:E,b=n.allowedAutoPlacements,y=t.options.placement,S=Ku(y),L=S===y,I=u||(L||!v?[hC(y)]:vve(y)),R=[y].concat(I).reduce(function(Ae,We){return Ae.concat(Ku(We)===QD?Eve(t,{placement:We,boundary:f,rootBoundary:p,padding:h,flipVariations:v,allowedAutoPlacements:b}):We)},[]),w=t.rects.reference,k=t.rects.popper,D=new Map,P=!0,B=R[0],F=0;F<R.length;F++){var X=R[F],G=Ku(X),re=XE(X)===HE,_e=[Bl,ac].indexOf(G)>=0,J=_e?"width":"height",Y=Uy(t,{placement:X,boundary:f,rootBoundary:p,altBoundary:_,padding:h}),ae=_e?re?cc:Fl:re?ac:Bl;w[J]>k[J]&&(ae=hC(ae));var Z=hC(ae),Q=[];if(r&&Q.push(Y[G]<=0),c&&Q.push(Y[ae]<=0,Y[Z]<=0),Q.every(function(Ae){return Ae})){B=X,P=!1;break}D.set(X,Q)}if(P)for(var he=v?3:1,ge=function(Ae){var We=R.find(function($e){var ve=D.get($e);if(ve)return ve.slice(0,Ae).every(function(Pe){return Pe})});if(We)return B=We,"break"},Ie=he;Ie>0;Ie--){var be=ge(Ie);if(be==="break")break}t.placement!==B&&(t.modifiersData[s]._skip=!0,t.placement=B,t.reset=!0)}}var Ove={name:"flip",enabled:!0,phase:"main",fn:bve,requiresIfExists:["offset"],data:{_skip:!1}};function MV(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function AV(e){return[Bl,cc,ac,Fl].some(function(t){return e[t]>=0})}function Sve(e){var t=e.state,n=e.name,s=t.rects.reference,i=t.rects.popper,r=t.modifiersData.preventOverflow,a=Uy(t,{elementContext:"reference"}),c=Uy(t,{altBoundary:!0}),u=MV(a,s),h=MV(c,i,r),f=AV(u),p=AV(h);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:h,isReferenceHidden:f,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":p})}var yve={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Sve};function $ve(e,t,n){var s=Ku(e),i=[Fl,Bl].indexOf(s)>=0?-1:1,r=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=r[0],c=r[1];return a=a||0,c=(c||0)*i,[Fl,cc].indexOf(s)>=0?{x:c,y:a}:{x:a,y:c}}function Ive(e){var t=e.state,n=e.options,s=e.name,i=n.offset,r=i===void 0?[0,0]:i,a=Ph.reduce(function(f,p){return f[p]=$ve(p,t.rects,r),f},{}),c=a[t.placement],u=c.x,h=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=h),t.modifiersData[s]=a}var Rve={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ive};function Cve(e){var t=e.state,n=e.name;t.modifiersData[n]=F6({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var U6={name:"popperOffsets",enabled:!0,phase:"read",fn:Cve,data:{}};function Mve(e){return e==="x"?"y":"x"}function Ave(e){var t=e.state,n=e.options,s=e.name,i=n.mainAxis,r=i===void 0?!0:i,a=n.altAxis,c=a===void 0?!1:a,u=n.boundary,h=n.rootBoundary,f=n.altBoundary,p=n.padding,_=n.tether,E=_===void 0?!0:_,v=n.tetherOffset,b=v===void 0?0:v,y=Uy(t,{boundary:u,rootBoundary:h,padding:p,altBoundary:f}),S=Ku(t.placement),L=XE(t.placement),I=!L,R=ZD(S),w=Mve(R),k=t.modifiersData.popperOffsets,D=t.rects.reference,P=t.rects.popper,B=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,F=typeof B=="number"?{mainAxis:B,altAxis:B}:Object.assign({mainAxis:0,altAxis:0},B),X=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,G={x:0,y:0};if(k){if(r){var re,_e=R==="y"?Bl:Fl,J=R==="y"?ac:cc,Y=R==="y"?"height":"width",ae=k[R],Z=ae+y[_e],Q=ae-y[J],he=E?-P[Y]/2:0,ge=L===HE?D[Y]:P[Y],Ie=L===HE?-P[Y]:-D[Y],be=t.elements.arrow,Ae=E&&be?JD(be):{width:0,height:0},We=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:k6(),$e=We[_e],ve=We[J],Pe=QS(0,D[Y],Ae[Y]),Be=I?D[Y]/2-he-Pe-$e-F.mainAxis:ge-Pe-$e-F.mainAxis,ot=I?-D[Y]/2+he+Pe+ve+F.mainAxis:Ie+Pe+ve+F.mainAxis,Xe=t.elements.arrow&&C$(t.elements.arrow),ee=Xe?R==="y"?Xe.clientTop||0:Xe.clientLeft||0:0,pe=(re=X==null?void 0:X[R])!=null?re:0,Oe=ae+Be-pe-ee,ze=ae+ot-pe,Ze=QS(E?$M(Z,Oe):Z,ae,E?Sm(Q,ze):Q);k[R]=Ze,G[R]=Ze-ae}if(c){var De,me=R==="x"?Bl:Fl,Te=R==="x"?ac:cc,Ue=k[w],qe=w==="y"?"height":"width",ct=Ue+y[me],Ne=Ue-y[Te],Se=[Bl,Fl].indexOf(S)!==-1,Je=(De=X==null?void 0:X[w])!=null?De:0,ut=Se?ct:Ue-D[qe]-P[qe]-Je+F.altAxis,Mt=Se?Ue+D[qe]+P[qe]-Je-F.altAxis:Ne,mt=E&&Se?ove(ut,Ue,Mt):QS(E?ut:ct,Ue,E?Mt:Ne);k[w]=mt,G[w]=mt-Ue}t.modifiersData[s]=G}}var Lve={name:"preventOverflow",enabled:!0,phase:"main",fn:Ave,requiresIfExists:["offset"]};function wve(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function kve(e){return e===tu(e)||!sc(e)?ex(e):wve(e)}function Nve(e){var t=e.getBoundingClientRect(),n=GE(t.width)/e.offsetWidth||1,s=GE(t.height)/e.offsetHeight||1;return n!==1||s!==1}function Pve(e,t,n){n===void 0&&(n=!1);var s=sc(t),i=sc(t)&&Nve(t),r=Dp(t),a=WE(e,i),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(s||!s&&!n)&&((ed(t)!=="body"||nx(r))&&(c=kve(t)),sc(t)?(u=WE(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):r&&(u.x=tx(r))),{x:a.left+c.scrollLeft-u.x,y:a.top+c.scrollTop-u.y,width:a.width,height:a.height}}function Dve(e){var t=new Map,n=new Set,s=[];e.forEach(function(r){t.set(r.name,r)});function i(r){n.add(r.name);var a=[].concat(r.requires||[],r.requiresIfExists||[]);a.forEach(function(c){if(!n.has(c)){var u=t.get(c);u&&i(u)}}),s.push(r)}return e.forEach(function(r){n.has(r.name)||i(r)}),s}function xve(e){var t=Dve(e);return JEe.reduce(function(n,s){return n.concat(t.filter(function(i){return i.phase===s}))},[])}function Bve(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Fve(e){var t=e.reduce(function(n,s){var i=n[s.name];return n[s.name]=i?Object.assign({},i,s,{options:Object.assign({},i.options,s.options),data:Object.assign({},i.data,s.data)}):s,n},{});return Object.keys(t).map(function(n){return t[n]})}var LV={placement:"bottom",modifiers:[],strategy:"absolute"};function wV(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(s){return!(s&&typeof s.getBoundingClientRect=="function")})}function ox(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,s=n===void 0?[]:n,i=t.defaultOptions,r=i===void 0?LV:i;return function(a,c,u){u===void 0&&(u=r);var h={placement:"bottom",orderedModifiers:[],options:Object.assign({},LV,r),modifiersData:{},elements:{reference:a,popper:c},attributes:{},styles:{}},f=[],p=!1,_={state:h,setOptions:function(b){var y=typeof b=="function"?b(h.options):b;v(),h.options=Object.assign({},r,h.options,y),h.scrollParents={reference:VE(a)?qS(a):a.contextElement?qS(a.contextElement):[],popper:qS(c)};var S=xve(Fve([].concat(s,h.options.modifiers)));return h.orderedModifiers=S.filter(function(L){return L.enabled}),E(),_.update()},forceUpdate:function(){if(!p){var b=h.elements,y=b.reference,S=b.popper;if(wV(y,S)){h.rects={reference:Pve(y,C$(S),h.options.strategy==="fixed"),popper:JD(S)},h.reset=!1,h.placement=h.options.placement,h.orderedModifiers.forEach(function(P){return h.modifiersData[P.name]=Object.assign({},P.data)});for(var L=0;L<h.orderedModifiers.length;L++){if(h.reset===!0){h.reset=!1,L=-1;continue}var I=h.orderedModifiers[L],R=I.fn,w=I.options,k=w===void 0?{}:w,D=I.name;typeof R=="function"&&(h=R({state:h,options:k,name:D,instance:_})||h)}}}},update:Bve(function(){return new Promise(function(b){_.forceUpdate(),b(h)})}),destroy:function(){v(),p=!0}};if(!wV(a,c))return _;_.setOptions(u).then(function(b){!p&&u.onFirstUpdate&&u.onFirstUpdate(b)});function E(){h.orderedModifiers.forEach(function(b){var y=b.name,S=b.options,L=S===void 0?{}:S,I=b.effect;if(typeof I=="function"){var R=I({state:h,name:y,instance:_,options:L}),w=function(){};f.push(R||w)}})}function v(){f.forEach(function(b){return b()}),f=[]}return _}}ox();var Uve=[x6,U6,D6,L6];ox({defaultModifiers:Uve});var Hve=[x6,U6,D6,L6,Rve,Ove,Lve,lve,yve],Vve=ox({defaultModifiers:Hve});const Gve=["fixed","absolute"],Wve=ht({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:xe(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:Ph,default:"bottom"},popperOptions:{type:xe(Object),default:()=>({})},strategy:{type:String,values:Gve,default:"absolute"}}),H6=ht({...Wve,id:String,style:{type:xe([String,Array,Object])},className:{type:xe([String,Array,Object])},effect:{type:xe(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:xe([String,Array,Object])},popperStyle:{type:xe([String,Array,Object])},referenceEl:{type:xe(Object)},triggerTargetEl:{type:xe(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...Xi(["ariaLabel"])}),Xve={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},zve=(e,t)=>{const n=K(!1),s=K();return{focusStartRef:s,trapped:n,onFocusAfterReleased:h=>{var f;((f=h.detail)==null?void 0:f.focusReason)!=="pointer"&&(s.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:h=>{e.visible&&!n.value&&(h.target&&(s.value=h.target),n.value=!0)},onFocusoutPrevented:h=>{e.trapping||(h.detail.focusReason==="pointer"&&h.preventDefault(),n.value=!1)},onReleaseRequested:()=>{n.value=!1,t("close")}}},Yve=(e,t=[])=>{const{placement:n,strategy:s,popperOptions:i}=e,r={placement:n,strategy:s,...i,modifiers:[...jve(e),...t]};return Qve(r,i==null?void 0:i.modifiers),r},Kve=e=>{if(Dn)return ol(e)};function jve(e){const{offset:t,gpuAcceleration:n,fallbackPlacements:s}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:s}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function Qve(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const qve=(e,t,n={})=>{const s={name:"updateState",enabled:!0,phase:"write",fn:({state:u})=>{const h=Jve(u);Object.assign(a.value,h)},requires:["computeStyles"]},i=x(()=>{const{onFirstUpdate:u,placement:h,strategy:f,modifiers:p}=g(n);return{onFirstUpdate:u,placement:h||"bottom",strategy:f||"absolute",modifiers:[...p||[],s,{name:"applyStyles",enabled:!1}]}}),r=lo(),a=K({styles:{popper:{position:g(i).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),c=()=>{r.value&&(r.value.destroy(),r.value=void 0)};return tt(i,u=>{const h=g(r);h&&h.setOptions(u)},{deep:!0}),tt([e,t],([u,h])=>{c(),!(!u||!h)&&(r.value=Vve(u,h,g(i)))}),vo(()=>{c()}),{state:x(()=>{var u;return{...((u=g(r))==null?void 0:u.state)||{}}}),styles:x(()=>g(a).styles),attributes:x(()=>g(a).attributes),update:()=>{var u;return(u=g(r))==null?void 0:u.update()},forceUpdate:()=>{var u;return(u=g(r))==null?void 0:u.forceUpdate()},instanceRef:x(()=>g(r))}};function Jve(e){const t=Object.keys(e.elements),n=By(t.map(i=>[i,e.styles[i]||{}])),s=By(t.map(i=>[i,e.attributes[i]]));return{styles:n,attributes:s}}const Zve=0,ebe=e=>{const{popperInstanceRef:t,contentRef:n,triggerRef:s,role:i}=It(zD,void 0),r=K(),a=K(),c=x(()=>({name:"eventListeners",enabled:!!e.visible})),u=x(()=>{var S;const L=g(r),I=(S=g(a))!=null?S:Zve;return{name:"arrow",enabled:!z5(L),options:{element:L,padding:I}}}),h=x(()=>({onFirstUpdate:()=>{v()},...Yve(e,[g(u),g(c)])})),f=x(()=>Kve(e.referenceEl)||g(s)),{attributes:p,state:_,styles:E,update:v,forceUpdate:b,instanceRef:y}=qve(f,n,h);return tt(y,S=>t.value=S),rn(()=>{tt(()=>{var S;return(S=g(f))==null?void 0:S.getBoundingClientRect()},()=>{v()})}),{attributes:p,arrowRef:r,contentRef:n,instanceRef:y,state:_,styles:E,role:i,forceUpdate:b,update:v}},tbe=(e,{attributes:t,styles:n,role:s})=>{const{nextZIndex:i}=pv(),r=rt("popper"),a=x(()=>g(t).popper),c=K(Wt(e.zIndex)?e.zIndex:i()),u=x(()=>[r.b(),r.is("pure",e.pure),r.is(e.effect),e.popperClass]),h=x(()=>[{zIndex:g(c)},g(n).popper,e.popperStyle||{}]),f=x(()=>s.value==="dialog"?"false":void 0),p=x(()=>g(n).arrow||{});return{ariaModal:f,arrowStyle:p,contentAttrs:a,contentClass:u,contentStyle:h,contentZIndex:c,updateZIndex:()=>{c.value=Wt(e.zIndex)?e.zIndex:i()}}},nbe=Re({name:"ElPopperContent"}),obe=Re({...nbe,props:H6,emits:Xve,setup(e,{expose:t,emit:n}){const s=e,{focusStartRef:i,trapped:r,onFocusAfterReleased:a,onFocusAfterTrapped:c,onFocusInTrap:u,onFocusoutPrevented:h,onReleaseRequested:f}=zve(s,n),{attributes:p,arrowRef:_,contentRef:E,styles:v,instanceRef:b,role:y,update:S}=ebe(s),{ariaModal:L,arrowStyle:I,contentAttrs:R,contentClass:w,contentStyle:k,updateZIndex:D}=tbe(s,{styles:v,attributes:p,role:y}),P=It(Zu,void 0),B=K();An(v6,{arrowStyle:I,arrowRef:_,arrowOffset:B}),P&&An(Zu,{...P,addInputId:ro,removeInputId:ro});let F;const X=(re=!0)=>{S(),re&&D()},G=()=>{X(!1),s.visible&&s.focusOnShow?r.value=!0:s.visible===!1&&(r.value=!1)};return rn(()=>{tt(()=>s.triggerTargetEl,(re,_e)=>{F==null||F(),F=void 0;const J=g(re||E.value),Y=g(_e||E.value);pa(J)&&(F=tt([y,()=>s.ariaLabel,L,()=>s.id],ae=>{["role","aria-label","aria-modal","id"].forEach((Z,Q)=>{hi(ae[Q])?J.removeAttribute(Z):J.setAttribute(Z,ae[Q])})},{immediate:!0})),Y!==J&&pa(Y)&&["role","aria-label","aria-modal","id"].forEach(ae=>{Y.removeAttribute(ae)})},{immediate:!0}),tt(()=>s.visible,G,{immediate:!0})}),vo(()=>{F==null||F(),F=void 0}),t({popperContentRef:E,popperInstanceRef:b,updatePopper:X,contentStyle:k}),(re,_e)=>(H(),le("div",$n({ref_key:"contentRef",ref:E},g(R),{style:g(k),class:g(w),tabindex:"-1",onMouseenter:J=>re.$emit("mouseenter",J),onMouseleave:J=>re.$emit("mouseleave",J)}),[oe(g(mv),{trapped:g(r),"trap-on-focus-in":!0,"focus-trap-el":g(E),"focus-start-el":g(i),onFocusAfterTrapped:g(c),onFocusAfterReleased:g(a),onFocusin:g(u),onFocusoutPrevented:g(h),onReleaseRequested:g(f)},{default:de(()=>[He(re.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var sbe=pt(obe,[["__file","content.vue"]]);const V6=nn(_Ee),XA=Symbol("elTooltip");function kV(){let e;const t=(s,i)=>{n(),e=window.setTimeout(s,i)},n=()=>window.clearTimeout(e);return S$(()=>n()),{registerTimeout:t,cancelTimeout:n}}const ibe=ht({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),rbe=({showAfter:e,hideAfter:t,autoClose:n,open:s,close:i})=>{const{registerTimeout:r}=kV(),{registerTimeout:a,cancelTimeout:c}=kV();return{onOpen:f=>{r(()=>{s(f);const p=g(n);Wt(p)&&p>0&&a(()=>{i(f)},p)},g(e))},onClose:f=>{c(),r(()=>{i(f)},g(t))}}},Si=ht({...ibe,...H6,appendTo:{type:xe([String,Object])},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:xe(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...Xi(["ariaLabel"])}),Hy=ht({...S6,disabled:Boolean,trigger:{type:xe([String,Array]),default:"hover"},triggerKeys:{type:xe(Array),default:()=>[$t.enter,$t.numpadEnter,$t.space]}}),lbe=eu({type:xe(Boolean),default:null}),abe=eu({type:xe(Function)}),cbe=e=>{const t=`update:${e}`,n=`onUpdate:${e}`,s=[t],i={[e]:lbe,[n]:abe};return{useModelToggle:({indicator:a,toggleReason:c,shouldHideWhenRouteChanges:u,shouldProceed:h,onShow:f,onHide:p})=>{const _=pn(),{emit:E}=_,v=_.props,b=x(()=>Ut(v[n])),y=x(()=>v[e]===null),S=D=>{a.value!==!0&&(a.value=!0,c&&(c.value=D),Ut(f)&&f(D))},L=D=>{a.value!==!1&&(a.value=!1,c&&(c.value=D),Ut(p)&&p(D))},I=D=>{if(v.disabled===!0||Ut(h)&&!h())return;const P=b.value&&Dn;P&&E(t,!0),(y.value||!P)&&S(D)},R=D=>{if(v.disabled===!0||!Dn)return;const P=b.value&&Dn;P&&E(t,!1),(y.value||!P)&&L(D)},w=D=>{Io(D)&&(v.disabled&&D?b.value&&E(t,!1):a.value!==D&&(D?S():L()))},k=()=>{a.value?R():I()};return tt(()=>v[e],w),u&&_.appContext.config.globalProperties.$route!==void 0&&tt(()=>({..._.proxy.$route}),()=>{u.value&&a.value&&R()}),rn(()=>{w(v[e])}),{hide:R,show:I,toggle:k,hasUpdateHandler:b}},useModelToggleProps:i,useModelToggleEmits:s}},{useModelToggleProps:ube,useModelToggleEmits:dbe,useModelToggle:hbe}=cbe("visible"),fbe=ht({...b6,...ube,...Si,...Hy,...O6,showArrow:{type:Boolean,default:!0}}),pbe=[...dbe,"before-show","before-hide","show","hide","open","close"],gbe=(e,t)=>at(e)?e.includes(t):e===t,UT=(e,t,n)=>s=>{gbe(g(e),t)&&n(s)},vs=(e,t,{checkForDefaultPrevented:n=!0}={})=>i=>{const r=e==null?void 0:e(i);if(n===!1||!r)return t==null?void 0:t(i)},NV=e=>t=>t.pointerType==="mouse"?e(t):void 0,mbe=Re({name:"ElTooltipTrigger"}),_be=Re({...mbe,props:Hy,setup(e,{expose:t}){const n=e,s=rt("tooltip"),{controlled:i,id:r,open:a,onOpen:c,onClose:u,onToggle:h}=It(XA,void 0),f=K(null),p=()=>{if(g(i)||n.disabled)return!0},_=oo(n,"trigger"),E=vs(p,UT(_,"hover",c)),v=vs(p,UT(_,"hover",u)),b=vs(p,UT(_,"click",R=>{R.button===0&&h(R)})),y=vs(p,UT(_,"focus",c)),S=vs(p,UT(_,"focus",u)),L=vs(p,UT(_,"contextmenu",R=>{R.preventDefault(),h(R)})),I=vs(p,R=>{const{code:w}=R;n.triggerKeys.includes(w)&&(R.preventDefault(),h(R))});return t({triggerRef:f}),(R,w)=>(H(),Ye(g(CEe),{id:g(r),"virtual-ref":R.virtualRef,open:g(a),"virtual-triggering":R.virtualTriggering,class:z(g(s).e("trigger")),onBlur:g(S),onClick:g(b),onContextmenu:g(L),onFocus:g(y),onMouseenter:g(E),onMouseleave:g(v),onKeydown:g(I)},{default:de(()=>[He(R.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var Tbe=pt(_be,[["__file","trigger.vue"]]);const Ebe=ht({to:{type:xe([String,Object]),required:!0},disabled:Boolean}),vbe=Re({__name:"teleport",props:Ebe,setup(e){return(t,n)=>t.disabled?He(t.$slots,"default",{key:0}):(H(),Ye(Pq,{key:1,to:t.to},[He(t.$slots,"default")],8,["to"]))}});var bbe=pt(vbe,[["__file","teleport.vue"]]);const _v=nn(bbe),G6=()=>{const e=mD(),t=WD(),n=x(()=>`${e.value}-popper-container-${t.prefix}`),s=x(()=>`#${n.value}`);return{id:n,selector:s}},Obe=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},Sbe=()=>{const{id:e,selector:t}=G6();return ZM(()=>{Dn&&(document.body.querySelector(t.value)||Obe(e.value))}),{id:e,selector:t}},ybe=Re({name:"ElTooltipContent",inheritAttrs:!1}),$be=Re({...ybe,props:Si,setup(e,{expose:t}){const n=e,{selector:s}=G6(),i=rt("tooltip"),r=K();let a;const{controlled:c,id:u,open:h,trigger:f,onClose:p,onOpen:_,onShow:E,onHide:v,onBeforeShow:b,onBeforeHide:y}=It(XA,void 0),S=x(()=>n.transition||`${i.namespace.value}-fade-in-linear`),L=x(()=>n.persistent);vo(()=>{a==null||a()});const I=x(()=>g(L)?!0:g(h)),R=x(()=>n.disabled?!1:g(h)),w=x(()=>n.appendTo||s.value),k=x(()=>{var Y;return(Y=n.style)!=null?Y:{}}),D=K(!0),P=()=>{v(),D.value=!0},B=()=>{if(g(c))return!0},F=vs(B,()=>{n.enterable&&g(f)==="hover"&&_()}),X=vs(B,()=>{g(f)==="hover"&&p()}),G=()=>{var Y,ae;(ae=(Y=r.value)==null?void 0:Y.updatePopper)==null||ae.call(Y),b==null||b()},re=()=>{y==null||y()},_e=()=>{E(),a=kD(x(()=>{var Y;return(Y=r.value)==null?void 0:Y.popperContentRef}),()=>{if(g(c))return;g(f)!=="hover"&&p()})},J=()=>{n.virtualTriggering||p()};return tt(()=>g(h),Y=>{Y?D.value=!1:a==null||a()},{flush:"post"}),tt(()=>n.content,()=>{var Y,ae;(ae=(Y=r.value)==null?void 0:Y.updatePopper)==null||ae.call(Y)}),t({contentRef:r}),(Y,ae)=>(H(),Ye(g(_v),{disabled:!Y.teleported,to:g(w)},{default:de(()=>[oe(Li,{name:g(S),onAfterLeave:P,onBeforeEnter:G,onAfterEnter:_e,onBeforeLeave:re},{default:de(()=>[g(I)?an((H(),Ye(g(sbe),$n({key:0,id:g(u),ref_key:"contentRef",ref:r},Y.$attrs,{"aria-label":Y.ariaLabel,"aria-hidden":D.value,"boundaries-padding":Y.boundariesPadding,"fallback-placements":Y.fallbackPlacements,"gpu-acceleration":Y.gpuAcceleration,offset:Y.offset,placement:Y.placement,"popper-options":Y.popperOptions,strategy:Y.strategy,effect:Y.effect,enterable:Y.enterable,pure:Y.pure,"popper-class":Y.popperClass,"popper-style":[Y.popperStyle,g(k)],"reference-el":Y.referenceEl,"trigger-target-el":Y.triggerTargetEl,visible:g(R),"z-index":Y.zIndex,onMouseenter:g(F),onMouseleave:g(X),onBlur:J,onClose:g(p)}),{default:de(()=>[He(Y.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[Yn,g(R)]]):Ge("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var Ibe=pt($be,[["__file","content.vue"]]);const Rbe=Re({name:"ElTooltip"}),Cbe=Re({...Rbe,props:fbe,emits:pbe,setup(e,{expose:t,emit:n}){const s=e;Sbe();const i=Gi(),r=K(),a=K(),c=()=>{var S;const L=g(r);L&&((S=L.popperInstanceRef)==null||S.update())},u=K(!1),h=K(),{show:f,hide:p,hasUpdateHandler:_}=hbe({indicator:u,toggleReason:h}),{onOpen:E,onClose:v}=rbe({showAfter:oo(s,"showAfter"),hideAfter:oo(s,"hideAfter"),autoClose:oo(s,"autoClose"),open:f,close:p}),b=x(()=>Io(s.visible)&&!_.value);An(XA,{controlled:b,id:i,open:ov(u),trigger:oo(s,"trigger"),onOpen:S=>{E(S)},onClose:S=>{v(S)},onToggle:S=>{g(u)?v(S):E(S)},onShow:()=>{n("show",h.value)},onHide:()=>{n("hide",h.value)},onBeforeShow:()=>{n("before-show",h.value)},onBeforeHide:()=>{n("before-hide",h.value)},updatePopper:c}),tt(()=>s.disabled,S=>{S&&u.value&&(u.value=!1)});const y=S=>{var L,I;const R=(I=(L=a.value)==null?void 0:L.contentRef)==null?void 0:I.popperContentRef,w=(S==null?void 0:S.relatedTarget)||document.activeElement;return R&&R.contains(w)};return m3(()=>u.value&&p()),t({popperRef:r,contentRef:a,isFocusInsideContent:y,updatePopper:c,onOpen:E,onClose:v,hide:p}),(S,L)=>(H(),Ye(g(V6),{ref_key:"popperRef",ref:r,role:S.role},{default:de(()=>[oe(Tbe,{disabled:S.disabled,trigger:S.trigger,"trigger-keys":S.triggerKeys,"virtual-ref":S.virtualRef,"virtual-triggering":S.virtualTriggering},{default:de(()=>[S.$slots.default?He(S.$slots,"default",{key:0}):Ge("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),oe(Ibe,{ref_key:"contentRef",ref:a,"aria-label":S.ariaLabel,"boundaries-padding":S.boundariesPadding,content:S.content,disabled:S.disabled,effect:S.effect,enterable:S.enterable,"fallback-placements":S.fallbackPlacements,"hide-after":S.hideAfter,"gpu-acceleration":S.gpuAcceleration,offset:S.offset,persistent:S.persistent,"popper-class":S.popperClass,"popper-style":S.popperStyle,placement:S.placement,"popper-options":S.popperOptions,pure:S.pure,"raw-content":S.rawContent,"reference-el":S.referenceEl,"trigger-target-el":S.triggerTargetEl,"show-after":S.showAfter,strategy:S.strategy,teleported:S.teleported,transition:S.transition,"virtual-triggering":S.virtualTriggering,"z-index":S.zIndex,"append-to":S.appendTo},{default:de(()=>[He(S.$slots,"content",{},()=>[S.rawContent?(H(),le("span",{key:0,innerHTML:S.content},null,8,["innerHTML"])):(H(),le("span",{key:1},Ke(S.content),1))]),S.showArrow?(H(),Ye(g(vEe),{key:0,"arrow-offset":S.arrowOffset},null,8,["arrow-offset"])):Ge("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var Mbe=pt(Cbe,[["__file","tooltip.vue"]]);const rr=nn(Mbe),Abe=ht({valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:xe(String),values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:xe([Function,Array]),default:ro},popperClass:{type:String,default:""},triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:{type:Boolean,default:!1},hideLoading:{type:Boolean,default:!1},teleported:Si.teleported,highlightFirstItem:{type:Boolean,default:!1},fitInputWidth:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},name:String,...Xi(["ariaLabel"])}),Lbe={[un]:e=>Dt(e),[sr]:e=>Dt(e),[_o]:e=>Dt(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,select:e=>Tn(e)},W6="ElAutocomplete",wbe=Re({name:W6,inheritAttrs:!1}),kbe=Re({...wbe,props:Abe,emits:Lbe,setup(e,{expose:t,emit:n}){const s=e,i=$$(),r=Cp(),a=ar(),c=rt("autocomplete"),u=K(),h=K(),f=K(),p=K();let _=!1,E=!1;const v=K([]),b=K(-1),y=K(""),S=K(!1),L=K(!1),I=K(!1),R=Gi(),w=x(()=>r.style),k=x(()=>(v.value.length>0||I.value)&&S.value),D=x(()=>!s.hideLoading&&I.value),P=x(()=>u.value?Array.from(u.value.$el.querySelectorAll("input")):[]),B=()=>{k.value&&(y.value=`${u.value.$el.offsetWidth}px`)},F=()=>{b.value=-1},X=async ve=>{if(L.value)return;const Pe=Be=>{I.value=!1,!L.value&&(at(Be)?(v.value=Be,b.value=s.highlightFirstItem?0:-1):ti(W6,"autocomplete suggestions must be an array"))};if(I.value=!0,at(s.fetchSuggestions))Pe(s.fetchSuggestions);else{const Be=await s.fetchSuggestions(ve,Pe);at(Be)&&Pe(Be)}},G=Vl(X,s.debounce),re=ve=>{const Pe=!!ve;if(n(sr,ve),n(un,ve),L.value=!1,S.value||(S.value=Pe),!s.triggerOnFocus&&!ve){L.value=!0,v.value=[];return}G(ve)},_e=ve=>{var Pe;a.value||(((Pe=ve.target)==null?void 0:Pe.tagName)!=="INPUT"||P.value.includes(document.activeElement))&&(S.value=!0)},J=ve=>{n(_o,ve)},Y=ve=>{E?E=!1:(S.value=!0,n("focus",ve),s.triggerOnFocus&&!_&&G(String(s.modelValue)))},ae=ve=>{setTimeout(()=>{var Pe;if((Pe=f.value)!=null&&Pe.isFocusInsideContent()){E=!0;return}S.value&&ge(),n("blur",ve)})},Z=()=>{S.value=!1,n(un,""),n("clear")},Q=async()=>{k.value&&b.value>=0&&b.value<v.value.length?Ae(v.value[b.value]):s.selectWhenUnmatched&&(n("select",{value:s.modelValue}),v.value=[],b.value=-1)},he=ve=>{k.value&&(ve.preventDefault(),ve.stopPropagation(),ge())},ge=()=>{S.value=!1},Ie=()=>{var ve;(ve=u.value)==null||ve.focus()},be=()=>{var ve;(ve=u.value)==null||ve.blur()},Ae=async ve=>{n(sr,ve[s.valueKey]),n(un,ve[s.valueKey]),n("select",ve),v.value=[],b.value=-1},We=ve=>{if(!k.value||I.value)return;if(ve<0){b.value=-1;return}ve>=v.value.length&&(ve=v.value.length-1);const Pe=h.value.querySelector(`.${c.be("suggestion","wrap")}`),ot=Pe.querySelectorAll(`.${c.be("suggestion","list")} li`)[ve],Xe=Pe.scrollTop,{offsetTop:ee,scrollHeight:pe}=ot;ee+pe>Xe+Pe.clientHeight&&(Pe.scrollTop+=pe),ee<Xe&&(Pe.scrollTop-=pe),b.value=ve,u.value.ref.setAttribute("aria-activedescendant",`${R.value}-item-${b.value}`)},$e=kD(p,()=>{k.value&&ge()});return vo(()=>{$e==null||$e()}),rn(()=>{u.value.ref.setAttribute("role","textbox"),u.value.ref.setAttribute("aria-autocomplete","list"),u.value.ref.setAttribute("aria-controls","id"),u.value.ref.setAttribute("aria-activedescendant",`${R.value}-item-${b.value}`),_=u.value.ref.hasAttribute("readonly")}),t({highlightedIndex:b,activated:S,loading:I,inputRef:u,popperRef:f,suggestions:v,handleSelect:Ae,handleKeyEnter:Q,focus:Ie,blur:be,close:ge,highlight:We,getData:X}),(ve,Pe)=>(H(),Ye(g(rr),{ref_key:"popperRef",ref:f,visible:g(k),placement:ve.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[g(c).e("popper"),ve.popperClass],teleported:ve.teleported,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${g(c).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:B,onHide:F},{content:de(()=>[te("div",{ref_key:"regionRef",ref:h,class:z([g(c).b("suggestion"),g(c).is("loading",g(D))]),style:Bt({[ve.fitInputWidth?"width":"minWidth"]:y.value,outline:"none"}),role:"region"},[oe(g(ld),{id:g(R),tag:"ul","wrap-class":g(c).be("suggestion","wrap"),"view-class":g(c).be("suggestion","list"),role:"listbox"},{default:de(()=>[g(D)?(H(),le("li",{key:0},[He(ve.$slots,"loading",{},()=>[oe(g(Nt),{class:z(g(c).is("loading"))},{default:de(()=>[oe(g(Ju))]),_:1},8,["class"])])])):(H(!0),le(Lt,{key:1},In(v.value,(Be,ot)=>(H(),le("li",{id:`${g(R)}-item-${ot}`,key:ot,class:z({highlighted:b.value===ot}),role:"option","aria-selected":b.value===ot,onClick:Xe=>Ae(Be)},[He(ve.$slots,"default",{item:Be},()=>[Xt(Ke(Be[ve.valueKey]),1)])],10,["id","aria-selected","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class"])],6)]),default:de(()=>[te("div",{ref_key:"listboxRef",ref:p,class:z([g(c).b(),ve.$attrs.class]),style:Bt(g(w)),role:"combobox","aria-haspopup":"listbox","aria-expanded":g(k),"aria-owns":g(R)},[oe(g(Nr),$n({ref_key:"inputRef",ref:u},g(i),{clearable:ve.clearable,disabled:g(a),name:ve.name,"model-value":ve.modelValue,"aria-label":ve.ariaLabel,onInput:re,onChange:J,onFocus:Y,onBlur:ae,onClear:Z,onKeydown:[So(Yt(Be=>We(b.value-1),["prevent"]),["up"]),So(Yt(Be=>We(b.value+1),["prevent"]),["down"]),So(Q,["enter"]),So(ge,["tab"]),So(he,["esc"])],onMousedown:_e}),ic({_:2},[ve.$slots.prepend?{name:"prepend",fn:de(()=>[He(ve.$slots,"prepend")])}:void 0,ve.$slots.append?{name:"append",fn:de(()=>[He(ve.$slots,"append")])}:void 0,ve.$slots.prefix?{name:"prefix",fn:de(()=>[He(ve.$slots,"prefix")])}:void 0,ve.$slots.suffix?{name:"suffix",fn:de(()=>[He(ve.$slots,"suffix")])}:void 0]),1040,["clearable","disabled","name","model-value","aria-label","onKeydown"])],14,["aria-expanded","aria-owns"])]),_:3},8,["visible","placement","popper-class","teleported","transition"]))}});var Nbe=pt(kbe,[["__file","autocomplete.vue"]]);const Pbe=nn(Nbe),Dbe=ht({size:{type:[Number,String],values:rd,default:"",validator:e=>Wt(e)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:To},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:xe(String),default:"cover"}}),xbe={error:e=>e instanceof Event},Bbe=Re({name:"ElAvatar"}),Fbe=Re({...Bbe,props:Dbe,emits:xbe,setup(e,{emit:t}){const n=e,s=rt("avatar"),i=K(!1),r=x(()=>{const{size:h,icon:f,shape:p}=n,_=[s.b()];return Dt(h)&&_.push(s.m(h)),f&&_.push(s.m("icon")),p&&_.push(s.m(p)),_}),a=x(()=>{const{size:h}=n;return Wt(h)?s.cssVarBlock({size:bs(h)||""}):void 0}),c=x(()=>({objectFit:n.fit}));tt(()=>n.src,()=>i.value=!1);function u(h){i.value=!0,t("error",h)}return(h,f)=>(H(),le("span",{class:z(g(r)),style:Bt(g(a))},[(h.src||h.srcSet)&&!i.value?(H(),le("img",{key:0,src:h.src,alt:h.alt,srcset:h.srcSet,style:Bt(g(c)),onError:u},null,44,["src","alt","srcset"])):h.icon?(H(),Ye(g(Nt),{key:1},{default:de(()=>[(H(),Ye(yn(h.icon)))]),_:1})):He(h.$slots,"default",{key:2})],6))}});var Ube=pt(Fbe,[["__file","avatar.vue"]]);const Hbe=nn(Ube),Vbe={visibilityHeight:{type:Number,default:200},target:{type:String,default:""},right:{type:Number,default:40},bottom:{type:Number,default:40}},Gbe={click:e=>e instanceof MouseEvent},Wbe=(e,t,n)=>{const s=lo(),i=lo(),r=K(!1),a=()=>{s.value&&(r.value=s.value.scrollTop>=e.visibilityHeight)},c=h=>{var f;(f=s.value)==null||f.scrollTo({top:0,behavior:"smooth"}),t("click",h)},u=Q5(a,300,!0);return fo(i,"scroll",u),rn(()=>{var h;i.value=document,s.value=document.documentElement,e.target&&(s.value=(h=document.querySelector(e.target))!=null?h:void 0,s.value||ti(n,`target does not exist: ${e.target}`),i.value=s.value),a()}),{visible:r,handleClick:c}},X6="ElBacktop",Xbe=Re({name:X6}),zbe=Re({...Xbe,props:Vbe,emits:Gbe,setup(e,{emit:t}){const n=e,s=rt("backtop"),{handleClick:i,visible:r}=Wbe(n,t,X6),a=x(()=>({right:`${n.right}px`,bottom:`${n.bottom}px`}));return(c,u)=>(H(),Ye(Li,{name:`${g(s).namespace.value}-fade-in`},{default:de(()=>[g(r)?(H(),le("div",{key:0,style:Bt(g(a)),class:z(g(s).b()),onClick:Yt(g(i),["stop"])},[He(c.$slots,"default",{},()=>[oe(g(Nt),{class:z(g(s).e("icon"))},{default:de(()=>[oe(g(w_e))]),_:1},8,["class"])])],14,["onClick"])):Ge("v-if",!0)]),_:3},8,["name"]))}});var Ybe=pt(zbe,[["__file","backtop.vue"]]);const Kbe=nn(Ybe),jbe=ht({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:xe([String,Object,Array])},offset:{type:xe(Array),default:[0,0]},badgeClass:{type:String}}),Qbe=Re({name:"ElBadge"}),qbe=Re({...Qbe,props:jbe,setup(e,{expose:t}){const n=e,s=rt("badge"),i=x(()=>n.isDot?"":Wt(n.value)&&Wt(n.max)?n.max<n.value?`${n.max}+`:`${n.value}`:`${n.value}`),r=x(()=>{var a,c,u,h,f;return[{backgroundColor:n.color,marginRight:bs(-((c=(a=n.offset)==null?void 0:a[0])!=null?c:0)),marginTop:bs((h=(u=n.offset)==null?void 0:u[1])!=null?h:0)},(f=n.badgeStyle)!=null?f:{}]});return t({content:i}),(a,c)=>(H(),le("div",{class:z(g(s).b())},[He(a.$slots,"default"),oe(Li,{name:`${g(s).namespace.value}-zoom-in-center`,persisted:""},{default:de(()=>[an(te("sup",{class:z([g(s).e("content"),g(s).em("content",a.type),g(s).is("fixed",!!a.$slots.default),g(s).is("dot",a.isDot),g(s).is("hide-zero",!a.showZero&&n.value===0),a.badgeClass]),style:Bt(g(r))},[He(a.$slots,"content",{value:g(i)},()=>[Xt(Ke(g(i)),1)])],6),[[Yn,!a.hidden&&(g(i)||a.isDot||a.$slots.content)]])]),_:3},8,["name"])],2))}});var Jbe=pt(qbe,[["__file","badge.vue"]]);const z6=nn(Jbe),Y6=Symbol("breadcrumbKey"),Zbe=ht({separator:{type:String,default:"/"},separatorIcon:{type:To}}),eOe=Re({name:"ElBreadcrumb"}),tOe=Re({...eOe,props:Zbe,setup(e){const t=e,{t:n}=xn(),s=rt("breadcrumb"),i=K();return An(Y6,t),rn(()=>{const r=i.value.querySelectorAll(`.${s.e("item")}`);r.length&&r[r.length-1].setAttribute("aria-current","page")}),(r,a)=>(H(),le("div",{ref_key:"breadcrumb",ref:i,class:z(g(s).b()),"aria-label":g(n)("el.breadcrumb.label"),role:"navigation"},[He(r.$slots,"default")],10,["aria-label"]))}});var nOe=pt(tOe,[["__file","breadcrumb.vue"]]);const oOe=ht({to:{type:xe([String,Object]),default:""},replace:Boolean}),sOe=Re({name:"ElBreadcrumbItem"}),iOe=Re({...sOe,props:oOe,setup(e){const t=e,n=pn(),s=It(Y6,void 0),i=rt("breadcrumb"),r=n.appContext.config.globalProperties.$router,a=K(),c=()=>{!t.to||!r||(t.replace?r.replace(t.to):r.push(t.to))};return(u,h)=>{var f,p;return H(),le("span",{class:z(g(i).e("item"))},[te("span",{ref_key:"link",ref:a,class:z([g(i).e("inner"),g(i).is("link",!!u.to)]),role:"link",onClick:c},[He(u.$slots,"default")],2),(f=g(s))!=null&&f.separatorIcon?(H(),Ye(g(Nt),{key:0,class:z(g(i).e("separator"))},{default:de(()=>[(H(),Ye(yn(g(s).separatorIcon)))]),_:1},8,["class"])):(H(),le("span",{key:1,class:z(g(i).e("separator")),role:"presentation"},Ke((p=g(s))==null?void 0:p.separator),3))],2)}}});var K6=pt(iOe,[["__file","breadcrumb-item.vue"]]);const rOe=nn(nOe,{BreadcrumbItem:K6}),lOe=is(K6),j6=Symbol("buttonGroupContextKey"),cp=({from:e,replacement:t,scope:n,version:s,ref:i,type:r="API"},a)=>{tt(()=>g(a),c=>{},{immediate:!0})},aOe=(e,t)=>{cp({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},x(()=>e.type==="text"));const n=It(j6,void 0),s=BA("button"),{form:i}=lr(),r=Fs(x(()=>n==null?void 0:n.size)),a=ar(),c=K(),u=Ks(),h=x(()=>e.type||(n==null?void 0:n.type)||""),f=x(()=>{var v,b,y;return(y=(b=e.autoInsertSpace)!=null?b:(v=s.value)==null?void 0:v.autoInsertSpace)!=null?y:!1}),p=x(()=>e.tag==="button"?{ariaDisabled:a.value||e.loading,disabled:a.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),_=x(()=>{var v;const b=(v=u.default)==null?void 0:v.call(u);if(f.value&&(b==null?void 0:b.length)===1){const y=b[0];if((y==null?void 0:y.type)===Gm){const S=y.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(S.trim())}}return!1});return{_disabled:a,_size:r,_type:h,_ref:c,_props:p,shouldAddSpace:_,handleClick:v=>{if(a.value||e.loading){v.stopPropagation();return}e.nativeType==="reset"&&(i==null||i.resetFields()),t("click",v)}}},XN=["default","primary","success","warning","info","danger","text",""],cOe=["button","submit","reset"],zN=ht({size:Ys,disabled:Boolean,type:{type:String,values:XN,default:""},icon:{type:To},nativeType:{type:String,values:cOe,default:"button"},loading:Boolean,loadingIcon:{type:To,default:()=>Ju},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:xe([String,Object]),default:"button"}}),uOe={click:e=>e instanceof MouseEvent};function ir(e,t){dOe(e)&&(e="100%");var n=hOe(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function _R(e){return Math.min(1,Math.max(0,e))}function dOe(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function hOe(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Q6(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function TR(e){return e<=1?"".concat(Number(e)*100,"%"):e}function dm(e){return e.length===1?"0"+e:String(e)}function fOe(e,t,n){return{r:ir(e,255)*255,g:ir(t,255)*255,b:ir(n,255)*255}}function PV(e,t,n){e=ir(e,255),t=ir(t,255),n=ir(n,255);var s=Math.max(e,t,n),i=Math.min(e,t,n),r=0,a=0,c=(s+i)/2;if(s===i)a=0,r=0;else{var u=s-i;switch(a=c>.5?u/(2-s-i):u/(s+i),s){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4;break}r/=6}return{h:r,s:a,l:c}}function Lw(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pOe(e,t,n){var s,i,r;if(e=ir(e,360),t=ir(t,100),n=ir(n,100),t===0)i=n,r=n,s=n;else{var a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;s=Lw(c,a,e+1/3),i=Lw(c,a,e),r=Lw(c,a,e-1/3)}return{r:s*255,g:i*255,b:r*255}}function DV(e,t,n){e=ir(e,255),t=ir(t,255),n=ir(n,255);var s=Math.max(e,t,n),i=Math.min(e,t,n),r=0,a=s,c=s-i,u=s===0?0:c/s;if(s===i)r=0;else{switch(s){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4;break}r/=6}return{h:r,s:u,v:a}}function gOe(e,t,n){e=ir(e,360)*6,t=ir(t,100),n=ir(n,100);var s=Math.floor(e),i=e-s,r=n*(1-t),a=n*(1-i*t),c=n*(1-(1-i)*t),u=s%6,h=[n,a,r,r,c,n][u],f=[c,n,n,a,r,r][u],p=[r,r,c,n,n,a][u];return{r:h*255,g:f*255,b:p*255}}function xV(e,t,n,s){var i=[dm(Math.round(e).toString(16)),dm(Math.round(t).toString(16)),dm(Math.round(n).toString(16))];return s&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function mOe(e,t,n,s,i){var r=[dm(Math.round(e).toString(16)),dm(Math.round(t).toString(16)),dm(Math.round(n).toString(16)),dm(_Oe(s))];return i&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))&&r[3].startsWith(r[3].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0)+r[3].charAt(0):r.join("")}function _Oe(e){return Math.round(parseFloat(e)*255).toString(16)}function BV(e){return ia(e)/255}function ia(e){return parseInt(e,16)}function TOe(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var YN={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function EOe(e){var t={r:0,g:0,b:0},n=1,s=null,i=null,r=null,a=!1,c=!1;return typeof e=="string"&&(e=OOe(e)),typeof e=="object"&&(Zd(e.r)&&Zd(e.g)&&Zd(e.b)?(t=fOe(e.r,e.g,e.b),a=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Zd(e.h)&&Zd(e.s)&&Zd(e.v)?(s=TR(e.s),i=TR(e.v),t=gOe(e.h,s,i),a=!0,c="hsv"):Zd(e.h)&&Zd(e.s)&&Zd(e.l)&&(s=TR(e.s),r=TR(e.l),t=pOe(e.h,s,r),a=!0,c="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=Q6(n),{ok:a,format:e.format||c,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var vOe="[-\\+]?\\d+%?",bOe="[-\\+]?\\d*\\.\\d+%?",sp="(?:".concat(bOe,")|(?:").concat(vOe,")"),ww="[\\s|\\(]+(".concat(sp,")[,|\\s]+(").concat(sp,")[,|\\s]+(").concat(sp,")\\s*\\)?"),kw="[\\s|\\(]+(".concat(sp,")[,|\\s]+(").concat(sp,")[,|\\s]+(").concat(sp,")[,|\\s]+(").concat(sp,")\\s*\\)?"),kc={CSS_UNIT:new RegExp(sp),rgb:new RegExp("rgb"+ww),rgba:new RegExp("rgba"+kw),hsl:new RegExp("hsl"+ww),hsla:new RegExp("hsla"+kw),hsv:new RegExp("hsv"+ww),hsva:new RegExp("hsva"+kw),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function OOe(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(YN[e])e=YN[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=kc.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=kc.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=kc.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=kc.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=kc.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=kc.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=kc.hex8.exec(e),n?{r:ia(n[1]),g:ia(n[2]),b:ia(n[3]),a:BV(n[4]),format:t?"name":"hex8"}:(n=kc.hex6.exec(e),n?{r:ia(n[1]),g:ia(n[2]),b:ia(n[3]),format:t?"name":"hex"}:(n=kc.hex4.exec(e),n?{r:ia(n[1]+n[1]),g:ia(n[2]+n[2]),b:ia(n[3]+n[3]),a:BV(n[4]+n[4]),format:t?"name":"hex8"}:(n=kc.hex3.exec(e),n?{r:ia(n[1]+n[1]),g:ia(n[2]+n[2]),b:ia(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Zd(e){return!!kc.CSS_UNIT.exec(String(e))}var q6=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var s;if(t instanceof e)return t;typeof t=="number"&&(t=TOe(t)),this.originalInput=t;var i=EOe(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(s=n.format)!==null&&s!==void 0?s:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,s,i,r=t.r/255,a=t.g/255,c=t.b/255;return r<=.03928?n=r/12.92:n=Math.pow((r+.055)/1.055,2.4),a<=.03928?s=a/12.92:s=Math.pow((a+.055)/1.055,2.4),c<=.03928?i=c/12.92:i=Math.pow((c+.055)/1.055,2.4),.2126*n+.7152*s+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=Q6(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=DV(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=DV(this.r,this.g,this.b),n=Math.round(t.h*360),s=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(s,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(s,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=PV(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=PV(this.r,this.g,this.b),n=Math.round(t.h*360),s=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(s,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(s,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),xV(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),mOe(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),s=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(s,")"):"rgba(".concat(t,", ").concat(n,", ").concat(s,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(ir(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(ir(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+xV(this.r,this.g,this.b,!1),n=0,s=Object.entries(YN);n<s.length;n++){var i=s[n],r=i[0],a=i[1];if(t===a)return r}return!1},e.prototype.toString=function(t){var n=!!t;t=t??this.format;var s=!1,i=this.a<1&&this.a>=0,r=!n&&i&&(t.startsWith("hex")||t==="name");return r?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(s=this.toRgbString()),t==="prgb"&&(s=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(s=this.toHexString()),t==="hex3"&&(s=this.toHexString(!0)),t==="hex4"&&(s=this.toHex8String(!0)),t==="hex8"&&(s=this.toHex8String()),t==="name"&&(s=this.toName()),t==="hsl"&&(s=this.toHslString()),t==="hsv"&&(s=this.toHsvString()),s||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=_R(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=_R(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=_R(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=_R(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),s=(n.h+t)%360;return n.h=s<0?360+s:s,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var s=this.toRgb(),i=new e(t).toRgb(),r=n/100,a={r:(i.r-s.r)*r+s.r,g:(i.g-s.g)*r+s.g,b:(i.b-s.b)*r+s.b,a:(i.a-s.a)*r+s.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var s=this.toHsl(),i=360/n,r=[this];for(s.h=(s.h-(i*t>>1)+720)%360;--t;)s.h=(s.h+i)%360,r.push(new e(s));return r},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),s=n.h,i=n.s,r=n.v,a=[],c=1/t;t--;)a.push(new e({h:s,s:i,v:r})),r=(r+c)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),s=new e(t).toRgb(),i=n.a+s.a*(1-n.a);return new e({r:(n.r*n.a+s.r*s.a*(1-n.a))/i,g:(n.g*n.a+s.g*s.a*(1-n.a))/i,b:(n.b*n.a+s.b*s.a*(1-n.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),s=n.h,i=[this],r=360/t,a=1;a<t;a++)i.push(new e({h:(s+a*r)%360,s:n.s,l:n.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function Ff(e,t=20){return e.mix("#141414",t).toString()}function SOe(e){const t=ar(),n=rt("button");return x(()=>{let s={},i=e.color;if(i){const r=i.match(/var\((.*?)\)/);r&&(i=window.getComputedStyle(window.document.documentElement).getPropertyValue(r[1]));const a=new q6(i),c=e.dark?a.tint(20).toString():Ff(a,20);if(e.plain)s=n.cssVarBlock({"bg-color":e.dark?Ff(a,90):a.tint(90).toString(),"text-color":i,"border-color":e.dark?Ff(a,50):a.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":i,"hover-border-color":i,"active-bg-color":c,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":c}),t.value&&(s[n.cssVarBlockName("disabled-bg-color")]=e.dark?Ff(a,90):a.tint(90).toString(),s[n.cssVarBlockName("disabled-text-color")]=e.dark?Ff(a,50):a.tint(50).toString(),s[n.cssVarBlockName("disabled-border-color")]=e.dark?Ff(a,80):a.tint(80).toString());else{const u=e.dark?Ff(a,30):a.tint(30).toString(),h=a.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(s=n.cssVarBlock({"bg-color":i,"text-color":h,"border-color":i,"hover-bg-color":u,"hover-text-color":h,"hover-border-color":u,"active-bg-color":c,"active-border-color":c}),t.value){const f=e.dark?Ff(a,50):a.tint(50).toString();s[n.cssVarBlockName("disabled-bg-color")]=f,s[n.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,s[n.cssVarBlockName("disabled-border-color")]=f}}}return s})}const yOe=Re({name:"ElButton"}),$Oe=Re({...yOe,props:zN,emits:uOe,setup(e,{expose:t,emit:n}){const s=e,i=SOe(s),r=rt("button"),{_ref:a,_size:c,_type:u,_disabled:h,_props:f,shouldAddSpace:p,handleClick:_}=aOe(s,n),E=x(()=>[r.b(),r.m(u.value),r.m(c.value),r.is("disabled",h.value),r.is("loading",s.loading),r.is("plain",s.plain),r.is("round",s.round),r.is("circle",s.circle),r.is("text",s.text),r.is("link",s.link),r.is("has-bg",s.bg)]);return t({ref:a,size:c,type:u,disabled:h,shouldAddSpace:p}),(v,b)=>(H(),Ye(yn(v.tag),$n({ref_key:"_ref",ref:a},g(f),{class:g(E),style:g(i),onClick:g(_)}),{default:de(()=>[v.loading?(H(),le(Lt,{key:0},[v.$slots.loading?He(v.$slots,"loading",{key:0}):(H(),Ye(g(Nt),{key:1,class:z(g(r).is("loading"))},{default:de(()=>[(H(),Ye(yn(v.loadingIcon)))]),_:1},8,["class"]))],64)):v.icon||v.$slots.icon?(H(),Ye(g(Nt),{key:1},{default:de(()=>[v.icon?(H(),Ye(yn(v.icon),{key:0})):He(v.$slots,"icon",{key:1})]),_:3})):Ge("v-if",!0),v.$slots.default?(H(),le("span",{key:2,class:z({[g(r).em("text","expand")]:g(p)})},[He(v.$slots,"default")],2)):Ge("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var IOe=pt($Oe,[["__file","button.vue"]]);const ROe={size:zN.size,type:zN.type},COe=Re({name:"ElButtonGroup"}),MOe=Re({...COe,props:ROe,setup(e){const t=e;An(j6,Kn({size:oo(t,"size"),type:oo(t,"type")}));const n=rt("button");return(s,i)=>(H(),le("div",{class:z(g(n).b("group"))},[He(s.$slots,"default")],2))}});var J6=pt(MOe,[["__file","button-group.vue"]]);const Mi=nn(IOe,{ButtonGroup:J6}),Z6=is(J6);var fC={exports:{}},AOe=fC.exports,FV;function LOe(){return FV||(FV=1,function(e,t){(function(n,s){e.exports=s()})(AOe,function(){var n=1e3,s=6e4,i=36e5,r="millisecond",a="second",c="minute",u="hour",h="day",f="week",p="month",_="quarter",E="year",v="date",b="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,L={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_e){var J=["th","st","nd","rd"],Y=_e%100;return"["+_e+(J[(Y-20)%10]||J[Y]||J[0])+"]"}},I=function(_e,J,Y){var ae=String(_e);return!ae||ae.length>=J?_e:""+Array(J+1-ae.length).join(Y)+_e},R={s:I,z:function(_e){var J=-_e.utcOffset(),Y=Math.abs(J),ae=Math.floor(Y/60),Z=Y%60;return(J<=0?"+":"-")+I(ae,2,"0")+":"+I(Z,2,"0")},m:function _e(J,Y){if(J.date()<Y.date())return-_e(Y,J);var ae=12*(Y.year()-J.year())+(Y.month()-J.month()),Z=J.clone().add(ae,p),Q=Y-Z<0,he=J.clone().add(ae+(Q?-1:1),p);return+(-(ae+(Y-Z)/(Q?Z-he:he-Z))||0)},a:function(_e){return _e<0?Math.ceil(_e)||0:Math.floor(_e)},p:function(_e){return{M:p,y:E,w:f,d:h,D:v,h:u,m:c,s:a,ms:r,Q:_}[_e]||String(_e||"").toLowerCase().replace(/s$/,"")},u:function(_e){return _e===void 0}},w="en",k={};k[w]=L;var D="$isDayjsObject",P=function(_e){return _e instanceof G||!(!_e||!_e[D])},B=function _e(J,Y,ae){var Z;if(!J)return w;if(typeof J=="string"){var Q=J.toLowerCase();k[Q]&&(Z=Q),Y&&(k[Q]=Y,Z=Q);var he=J.split("-");if(!Z&&he.length>1)return _e(he[0])}else{var ge=J.name;k[ge]=J,Z=ge}return!ae&&Z&&(w=Z),Z||!ae&&w},F=function(_e,J){if(P(_e))return _e.clone();var Y=typeof J=="object"?J:{};return Y.date=_e,Y.args=arguments,new G(Y)},X=R;X.l=B,X.i=P,X.w=function(_e,J){return F(_e,{locale:J.$L,utc:J.$u,x:J.$x,$offset:J.$offset})};var G=function(){function _e(Y){this.$L=B(Y.locale,null,!0),this.parse(Y),this.$x=this.$x||Y.x||{},this[D]=!0}var J=_e.prototype;return J.parse=function(Y){this.$d=function(ae){var Z=ae.date,Q=ae.utc;if(Z===null)return new Date(NaN);if(X.u(Z))return new Date;if(Z instanceof Date)return new Date(Z);if(typeof Z=="string"&&!/Z$/i.test(Z)){var he=Z.match(y);if(he){var ge=he[2]-1||0,Ie=(he[7]||"0").substring(0,3);return Q?new Date(Date.UTC(he[1],ge,he[3]||1,he[4]||0,he[5]||0,he[6]||0,Ie)):new Date(he[1],ge,he[3]||1,he[4]||0,he[5]||0,he[6]||0,Ie)}}return new Date(Z)}(Y),this.init()},J.init=function(){var Y=this.$d;this.$y=Y.getFullYear(),this.$M=Y.getMonth(),this.$D=Y.getDate(),this.$W=Y.getDay(),this.$H=Y.getHours(),this.$m=Y.getMinutes(),this.$s=Y.getSeconds(),this.$ms=Y.getMilliseconds()},J.$utils=function(){return X},J.isValid=function(){return this.$d.toString()!==b},J.isSame=function(Y,ae){var Z=F(Y);return this.startOf(ae)<=Z&&Z<=this.endOf(ae)},J.isAfter=function(Y,ae){return F(Y)<this.startOf(ae)},J.isBefore=function(Y,ae){return this.endOf(ae)<F(Y)},J.$g=function(Y,ae,Z){return X.u(Y)?this[ae]:this.set(Z,Y)},J.unix=function(){return Math.floor(this.valueOf()/1e3)},J.valueOf=function(){return this.$d.getTime()},J.startOf=function(Y,ae){var Z=this,Q=!!X.u(ae)||ae,he=X.p(Y),ge=function(Be,ot){var Xe=X.w(Z.$u?Date.UTC(Z.$y,ot,Be):new Date(Z.$y,ot,Be),Z);return Q?Xe:Xe.endOf(h)},Ie=function(Be,ot){return X.w(Z.toDate()[Be].apply(Z.toDate("s"),(Q?[0,0,0,0]:[23,59,59,999]).slice(ot)),Z)},be=this.$W,Ae=this.$M,We=this.$D,$e="set"+(this.$u?"UTC":"");switch(he){case E:return Q?ge(1,0):ge(31,11);case p:return Q?ge(1,Ae):ge(0,Ae+1);case f:var ve=this.$locale().weekStart||0,Pe=(be<ve?be+7:be)-ve;return ge(Q?We-Pe:We+(6-Pe),Ae);case h:case v:return Ie($e+"Hours",0);case u:return Ie($e+"Minutes",1);case c:return Ie($e+"Seconds",2);case a:return Ie($e+"Milliseconds",3);default:return this.clone()}},J.endOf=function(Y){return this.startOf(Y,!1)},J.$set=function(Y,ae){var Z,Q=X.p(Y),he="set"+(this.$u?"UTC":""),ge=(Z={},Z[h]=he+"Date",Z[v]=he+"Date",Z[p]=he+"Month",Z[E]=he+"FullYear",Z[u]=he+"Hours",Z[c]=he+"Minutes",Z[a]=he+"Seconds",Z[r]=he+"Milliseconds",Z)[Q],Ie=Q===h?this.$D+(ae-this.$W):ae;if(Q===p||Q===E){var be=this.clone().set(v,1);be.$d[ge](Ie),be.init(),this.$d=be.set(v,Math.min(this.$D,be.daysInMonth())).$d}else ge&&this.$d[ge](Ie);return this.init(),this},J.set=function(Y,ae){return this.clone().$set(Y,ae)},J.get=function(Y){return this[X.p(Y)]()},J.add=function(Y,ae){var Z,Q=this;Y=Number(Y);var he=X.p(ae),ge=function(Ae){var We=F(Q);return X.w(We.date(We.date()+Math.round(Ae*Y)),Q)};if(he===p)return this.set(p,this.$M+Y);if(he===E)return this.set(E,this.$y+Y);if(he===h)return ge(1);if(he===f)return ge(7);var Ie=(Z={},Z[c]=s,Z[u]=i,Z[a]=n,Z)[he]||1,be=this.$d.getTime()+Y*Ie;return X.w(be,this)},J.subtract=function(Y,ae){return this.add(-1*Y,ae)},J.format=function(Y){var ae=this,Z=this.$locale();if(!this.isValid())return Z.invalidDate||b;var Q=Y||"YYYY-MM-DDTHH:mm:ssZ",he=X.z(this),ge=this.$H,Ie=this.$m,be=this.$M,Ae=Z.weekdays,We=Z.months,$e=Z.meridiem,ve=function(ot,Xe,ee,pe){return ot&&(ot[Xe]||ot(ae,Q))||ee[Xe].slice(0,pe)},Pe=function(ot){return X.s(ge%12||12,ot,"0")},Be=$e||function(ot,Xe,ee){var pe=ot<12?"AM":"PM";return ee?pe.toLowerCase():pe};return Q.replace(S,function(ot,Xe){return Xe||function(ee){switch(ee){case"YY":return String(ae.$y).slice(-2);case"YYYY":return X.s(ae.$y,4,"0");case"M":return be+1;case"MM":return X.s(be+1,2,"0");case"MMM":return ve(Z.monthsShort,be,We,3);case"MMMM":return ve(We,be);case"D":return ae.$D;case"DD":return X.s(ae.$D,2,"0");case"d":return String(ae.$W);case"dd":return ve(Z.weekdaysMin,ae.$W,Ae,2);case"ddd":return ve(Z.weekdaysShort,ae.$W,Ae,3);case"dddd":return Ae[ae.$W];case"H":return String(ge);case"HH":return X.s(ge,2,"0");case"h":return Pe(1);case"hh":return Pe(2);case"a":return Be(ge,Ie,!0);case"A":return Be(ge,Ie,!1);case"m":return String(Ie);case"mm":return X.s(Ie,2,"0");case"s":return String(ae.$s);case"ss":return X.s(ae.$s,2,"0");case"SSS":return X.s(ae.$ms,3,"0");case"Z":return he}return null}(ot)||he.replace(":","")})},J.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},J.diff=function(Y,ae,Z){var Q,he=this,ge=X.p(ae),Ie=F(Y),be=(Ie.utcOffset()-this.utcOffset())*s,Ae=this-Ie,We=function(){return X.m(he,Ie)};switch(ge){case E:Q=We()/12;break;case p:Q=We();break;case _:Q=We()/3;break;case f:Q=(Ae-be)/6048e5;break;case h:Q=(Ae-be)/864e5;break;case u:Q=Ae/i;break;case c:Q=Ae/s;break;case a:Q=Ae/n;break;default:Q=Ae}return Z?Q:X.a(Q)},J.daysInMonth=function(){return this.endOf(p).$D},J.$locale=function(){return k[this.$L]},J.locale=function(Y,ae){if(!Y)return this.$L;var Z=this.clone(),Q=B(Y,ae,!0);return Q&&(Z.$L=Q),Z},J.clone=function(){return X.w(this.$d,this)},J.toDate=function(){return new Date(this.valueOf())},J.toJSON=function(){return this.isValid()?this.toISOString():null},J.toISOString=function(){return this.$d.toISOString()},J.toString=function(){return this.$d.toUTCString()},_e}(),re=G.prototype;return F.prototype=re,[["$ms",r],["$s",a],["$m",c],["$H",u],["$W",h],["$M",p],["$y",E],["$D",v]].forEach(function(_e){re[_e[1]]=function(J){return this.$g(J,_e[0],_e[1])}}),F.extend=function(_e,J){return _e.$i||(_e(J,G,F),_e.$i=!0),F},F.locale=B,F.isDayjs=P,F.unix=function(_e){return F(1e3*_e)},F.en=k[w],F.Ls=k,F.p={},F})}(fC)),fC.exports}var wOe=LOe();const en=Qc(wOe),Nw=(e,t)=>[e>0?e-1:void 0,e,e<t?e+1:void 0],up=e=>Array.from(Array.from({length:e}).keys()),eY=e=>e.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),tY=e=>e.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),UV=function(e,t){const n=hp(e),s=hp(t);return n&&s?e.getTime()===t.getTime():!n&&!s?e===t:!1},HV=function(e,t){const n=at(e),s=at(t);return n&&s?e.length!==t.length?!1:e.every((i,r)=>UV(i,t[r])):!n&&!s?UV(e,t):!1},VV=function(e,t,n){const s=la(t)||t==="x"?en(e).locale(n):en(e,t).locale(n);return s.isValid()?s:void 0},GV=function(e,t,n){return la(t)?e:t==="x"?+e:en(e).locale(n).format(t)},Pw=(e,t)=>{var n;const s=[],i=t==null?void 0:t();for(let r=0;r<e;r++)s.push((n=i==null?void 0:i.includes(r))!=null?n:!1);return s},ER=e=>at(e)?e.map(t=>t.toDate()):e.toDate(),kOe=(e,t)=>{const n=e.subtract(1,"month").endOf("month").date();return up(t).map((s,i)=>n-(t-i-1))},NOe=e=>{const t=e.daysInMonth();return up(t).map((n,s)=>s+1)},POe=e=>up(e.length/7).map(t=>{const n=t*7;return e.slice(n,n+7)}),DOe=ht({selectedDay:{type:xe(Object)},range:{type:xe(Array)},date:{type:xe(Object),required:!0},hideHeader:{type:Boolean}}),xOe={pick:e=>Tn(e)};var pC={exports:{}},BOe=pC.exports,WV;function FOe(){return WV||(WV=1,function(e,t){(function(n,s){e.exports=s()})(BOe,function(){return function(n,s,i){var r=s.prototype,a=function(p){return p&&(p.indexOf?p:p.s)},c=function(p,_,E,v,b){var y=p.name?p:p.$locale(),S=a(y[_]),L=a(y[E]),I=S||L.map(function(w){return w.slice(0,v)});if(!b)return I;var R=y.weekStart;return I.map(function(w,k){return I[(k+(R||0))%7]})},u=function(){return i.Ls[i.locale()]},h=function(p,_){return p.formats[_]||function(E){return E.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(v,b,y){return b||y.slice(1)})}(p.formats[_.toUpperCase()])},f=function(){var p=this;return{months:function(_){return _?_.format("MMMM"):c(p,"months")},monthsShort:function(_){return _?_.format("MMM"):c(p,"monthsShort","months",3)},firstDayOfWeek:function(){return p.$locale().weekStart||0},weekdays:function(_){return _?_.format("dddd"):c(p,"weekdays")},weekdaysMin:function(_){return _?_.format("dd"):c(p,"weekdaysMin","weekdays",2)},weekdaysShort:function(_){return _?_.format("ddd"):c(p,"weekdaysShort","weekdays",3)},longDateFormat:function(_){return h(p.$locale(),_)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return f.bind(this)()},i.localeData=function(){var p=u();return{firstDayOfWeek:function(){return p.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(_){return h(p,_)},meridiem:p.meridiem,ordinal:p.ordinal}},i.months=function(){return c(u(),"months")},i.monthsShort=function(){return c(u(),"monthsShort","months",3)},i.weekdays=function(p){return c(u(),"weekdays",null,null,p)},i.weekdaysShort=function(p){return c(u(),"weekdaysShort","weekdays",3,p)},i.weekdaysMin=function(p){return c(u(),"weekdaysMin","weekdays",2,p)}}})}(pC)),pC.exports}var UOe=FOe();const nY=Qc(UOe),HOe=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],Dw=["sun","mon","tue","wed","thu","fri","sat"],VOe=(e,t)=>{en.extend(nY);const n=en.localeData().firstDayOfWeek(),{t:s,lang:i}=xn(),r=en().locale(i.value),a=x(()=>!!e.range&&!!e.range.length),c=x(()=>{let _=[];if(a.value){const[E,v]=e.range,b=up(v.date()-E.date()+1).map(L=>({text:E.date()+L,type:"current"}));let y=b.length%7;y=y===0?0:7-y;const S=up(y).map((L,I)=>({text:I+1,type:"next"}));_=b.concat(S)}else{const E=e.date.startOf("month").day(),v=kOe(e.date,(E-n+7)%7).map(L=>({text:L,type:"prev"})),b=NOe(e.date).map(L=>({text:L,type:"current"}));_=[...v,...b];const y=7-(_.length%7||7),S=up(y).map((L,I)=>({text:I+1,type:"next"}));_=_.concat(S)}return POe(_)}),u=x(()=>{const _=n;return _===0?Dw.map(E=>s(`el.datepicker.weeks.${E}`)):Dw.slice(_).concat(Dw.slice(0,_)).map(E=>s(`el.datepicker.weeks.${E}`))}),h=(_,E)=>{switch(E){case"prev":return e.date.startOf("month").subtract(1,"month").date(_);case"next":return e.date.startOf("month").add(1,"month").date(_);case"current":return e.date.date(_)}};return{now:r,isInRange:a,rows:c,weekDays:u,getFormattedDate:h,handlePickDay:({text:_,type:E})=>{const v=h(_,E);t("pick",v)},getSlotData:({text:_,type:E})=>{const v=h(_,E);return{isSelected:v.isSame(e.selectedDay),type:`${E}-month`,day:v.format("YYYY-MM-DD"),date:v.toDate()}}}},GOe=Re({name:"DateTable"}),WOe=Re({...GOe,props:DOe,emits:xOe,setup(e,{expose:t,emit:n}){const s=e,{isInRange:i,now:r,rows:a,weekDays:c,getFormattedDate:u,handlePickDay:h,getSlotData:f}=VOe(s,n),p=rt("calendar-table"),_=rt("calendar-day"),E=({text:v,type:b})=>{const y=[b];if(b==="current"){const S=u(v,b);S.isSame(s.selectedDay,"day")&&y.push(_.is("selected")),S.isSame(r,"day")&&y.push(_.is("today"))}return y};return t({getFormattedDate:u}),(v,b)=>(H(),le("table",{class:z([g(p).b(),g(p).is("range",g(i))]),cellspacing:"0",cellpadding:"0"},[v.hideHeader?Ge("v-if",!0):(H(),le("thead",{key:0},[te("tr",null,[(H(!0),le(Lt,null,In(g(c),y=>(H(),le("th",{key:y,scope:"col"},Ke(y),1))),128))])])),te("tbody",null,[(H(!0),le(Lt,null,In(g(a),(y,S)=>(H(),le("tr",{key:S,class:z({[g(p).e("row")]:!0,[g(p).em("row","hide-border")]:S===0&&v.hideHeader})},[(H(!0),le(Lt,null,In(y,(L,I)=>(H(),le("td",{key:I,class:z(E(L)),onClick:R=>g(h)(L)},[te("div",{class:z(g(_).b())},[He(v.$slots,"date-cell",{data:g(f)(L)},()=>[te("span",null,Ke(L.text),1)])],2)],10,["onClick"]))),128))],2))),128))])],2))}});var XV=pt(WOe,[["__file","date-table.vue"]]);const XOe=(e,t)=>{const n=e.endOf("month"),s=t.startOf("month"),r=n.isSame(s,"week")?s.add(1,"week"):s;return[[e,n],[r.startOf("week"),t]]},zOe=(e,t)=>{const n=e.endOf("month"),s=e.add(1,"month").startOf("month"),i=n.isSame(s,"week")?s.add(1,"week"):s,r=i.endOf("month"),a=t.startOf("month"),c=r.isSame(a,"week")?a.add(1,"week"):a;return[[e,n],[i.startOf("week"),r],[c.startOf("week"),t]]},YOe=(e,t,n)=>{const{lang:s}=xn(),i=K(),r=en().locale(s.value),a=x({get(){return e.modelValue?u.value:i.value},set(y){if(!y)return;i.value=y;const S=y.toDate();t(sr,S),t(un,S)}}),c=x(()=>{if(!e.range||!at(e.range)||e.range.length!==2||e.range.some(I=>!hp(I)))return[];const y=e.range.map(I=>en(I).locale(s.value)),[S,L]=y;return S.isAfter(L)?[]:S.isSame(L,"month")?E(S,L):S.add(1,"month").month()!==L.month()?[]:E(S,L)}),u=x(()=>e.modelValue?en(e.modelValue).locale(s.value):a.value||(c.value.length?c.value[0][0]:r)),h=x(()=>u.value.subtract(1,"month").date(1)),f=x(()=>u.value.add(1,"month").date(1)),p=x(()=>u.value.subtract(1,"year").date(1)),_=x(()=>u.value.add(1,"year").date(1)),E=(y,S)=>{const L=y.startOf("week"),I=S.endOf("week"),R=L.get("month"),w=I.get("month");return R===w?[[L,I]]:(R+1)%12===w?XOe(L,I):R+2===w||(R+1)%11===w?zOe(L,I):[]},v=y=>{a.value=y};return{calculateValidatedDateRange:E,date:u,realSelectedDay:a,pickDay:v,selectDate:y=>{const L={"prev-month":h.value,"next-month":f.value,"prev-year":p.value,"next-year":_.value,today:r}[y];L.isSame(u.value,"day")||v(L)},validatedRange:c}},KOe=e=>at(e)&&e.length===2&&e.every(t=>hp(t)),jOe=ht({modelValue:{type:Date},range:{type:xe(Array),validator:KOe}}),QOe={[un]:e=>hp(e),[sr]:e=>hp(e)},qOe="ElCalendar",JOe=Re({name:qOe}),ZOe=Re({...JOe,props:jOe,emits:QOe,setup(e,{expose:t,emit:n}){const s=e,i=rt("calendar"),{calculateValidatedDateRange:r,date:a,pickDay:c,realSelectedDay:u,selectDate:h,validatedRange:f}=YOe(s,n),{t:p}=xn(),_=x(()=>{const E=`el.datepicker.month${a.value.format("M")}`;return`${a.value.year()} ${p("el.datepicker.year")} ${p(E)}`});return t({selectedDay:u,pickDay:c,selectDate:h,calculateValidatedDateRange:r}),(E,v)=>(H(),le("div",{class:z(g(i).b())},[te("div",{class:z(g(i).e("header"))},[He(E.$slots,"header",{date:g(_)},()=>[te("div",{class:z(g(i).e("title"))},Ke(g(_)),3),g(f).length===0?(H(),le("div",{key:0,class:z(g(i).e("button-group"))},[oe(g(Z6),null,{default:de(()=>[oe(g(Mi),{size:"small",onClick:b=>g(h)("prev-month")},{default:de(()=>[Xt(Ke(g(p)("el.datepicker.prevMonth")),1)]),_:1},8,["onClick"]),oe(g(Mi),{size:"small",onClick:b=>g(h)("today")},{default:de(()=>[Xt(Ke(g(p)("el.datepicker.today")),1)]),_:1},8,["onClick"]),oe(g(Mi),{size:"small",onClick:b=>g(h)("next-month")},{default:de(()=>[Xt(Ke(g(p)("el.datepicker.nextMonth")),1)]),_:1},8,["onClick"])]),_:1})],2)):Ge("v-if",!0)])],2),g(f).length===0?(H(),le("div",{key:0,class:z(g(i).e("body"))},[oe(XV,{date:g(a),"selected-day":g(u),onPick:g(c)},ic({_:2},[E.$slots["date-cell"]?{name:"date-cell",fn:de(b=>[He(E.$slots,"date-cell",qa(Th(b)))])}:void 0]),1032,["date","selected-day","onPick"])],2)):(H(),le("div",{key:1,class:z(g(i).e("body"))},[(H(!0),le(Lt,null,In(g(f),(b,y)=>(H(),Ye(XV,{key:y,date:b[0],"selected-day":g(u),range:b,"hide-header":y!==0,onPick:g(c)},ic({_:2},[E.$slots["date-cell"]?{name:"date-cell",fn:de(S=>[He(E.$slots,"date-cell",qa(Th(S)))])}:void 0]),1032,["date","selected-day","range","hide-header","onPick"]))),128))],2))],2))}});var eSe=pt(ZOe,[["__file","calendar.vue"]]);const tSe=nn(eSe),nSe=ht({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:xe([String,Object,Array]),default:""},bodyClass:String,shadow:{type:String,values:["always","hover","never"],default:"always"}}),oSe=Re({name:"ElCard"}),sSe=Re({...oSe,props:nSe,setup(e){const t=rt("card");return(n,s)=>(H(),le("div",{class:z([g(t).b(),g(t).is(`${n.shadow}-shadow`)])},[n.$slots.header||n.header?(H(),le("div",{key:0,class:z(g(t).e("header"))},[He(n.$slots,"header",{},()=>[Xt(Ke(n.header),1)])],2)):Ge("v-if",!0),te("div",{class:z([g(t).e("body"),n.bodyClass]),style:Bt(n.bodyStyle)},[He(n.$slots,"default")],6),n.$slots.footer||n.footer?(H(),le("div",{key:1,class:z(g(t).e("footer"))},[He(n.$slots,"footer",{},()=>[Xt(Ke(n.footer),1)])],2)):Ge("v-if",!0)],2))}});var iSe=pt(sSe,[["__file","card.vue"]]);const rSe=nn(iSe),lSe=ht({initialIndex:{type:Number,default:0},height:{type:String,default:""},trigger:{type:String,values:["hover","click"],default:"hover"},autoplay:{type:Boolean,default:!0},interval:{type:Number,default:3e3},indicatorPosition:{type:String,values:["","none","outside"],default:""},arrow:{type:String,values:["always","hover","never"],default:"hover"},type:{type:String,values:["","card"],default:""},cardScale:{type:Number,default:.83},loop:{type:Boolean,default:!0},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},pauseOnHover:{type:Boolean,default:!0},motionBlur:Boolean}),aSe={change:(e,t)=>[e,t].every(Wt)},oY=Symbol("carouselContextKey"),KN="ElCarouselItem";var Ka=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(Ka||{});function jN(e){return zo(e)&&e.type===Lt}function cSe(e){return zo(e)&&e.type===Ii}function uSe(e){return zo(e)&&!jN(e)&&!cSe(e)}const dSe=e=>{if(!zo(e))return{};const t=e.props||{},n=(zo(e.type)?e.type.props:void 0)||{},s={};return Object.keys(n).forEach(i=>{zn(n[i],"default")&&(s[i]=n[i].default)}),Object.keys(t).forEach(i=>{s[ll(i)]=t[i]}),s},hSe=e=>{if(!at(e)||e.length>1)throw new Error("expect to receive a single Vue element child");return e[0]},dp=e=>{const t=at(e)?e:[e],n=[];return t.forEach(s=>{var i;at(s)?n.push(...dp(s)):zo(s)&&((i=s.component)!=null&&i.subTree)?n.push(s,...dp(s.component.subTree)):zo(s)&&at(s.children)?n.push(...dp(s.children)):n.push(s)}),n},fSe=(e,t,n)=>dp(e.subTree).filter(r=>{var a;return zo(r)&&((a=r.type)==null?void 0:a.name)===t&&!!r.component}).map(r=>r.component.uid).map(r=>n[r]).filter(r=>!!r),sx=(e,t)=>{const n={},s=lo([]);return{children:s,addChild:a=>{n[a.uid]=a,s.value=fSe(e,t,n)},removeChild:a=>{delete n[a],s.value=s.value.filter(c=>c.uid!==a)}}},zV=300,pSe=(e,t,n)=>{const{children:s,addChild:i,removeChild:r}=sx(pn(),KN),a=Ks(),c=K(-1),u=K(null),h=K(!1),f=K(),p=K(0),_=K(!0),E=K(!0),v=K(!1),b=x(()=>e.arrow!=="never"&&!g(L)),y=x(()=>s.value.some($e=>$e.props.label.toString().length>0)),S=x(()=>e.type==="card"),L=x(()=>e.direction==="vertical"),I=x(()=>e.height!=="auto"?{height:e.height}:{height:`${p.value}px`,overflow:"hidden"}),R=Om($e=>{F($e)},zV,{trailing:!0}),w=Om($e=>{Q($e)},zV),k=$e=>_.value?c.value<=1?$e<=1:$e>1:!0;function D(){u.value&&(clearInterval(u.value),u.value=null)}function P(){e.interval<=0||!e.autoplay||u.value||(u.value=setInterval(()=>B(),e.interval))}const B=()=>{E.value||(v.value=!0),E.value=!1,c.value<s.value.length-1?c.value=c.value+1:e.loop?c.value=0:v.value=!1};function F($e){if(E.value||(v.value=!0),E.value=!1,Dt($e)){const Be=s.value.filter(ot=>ot.props.name===$e);Be.length>0&&($e=s.value.indexOf(Be[0]))}if($e=Number($e),Number.isNaN($e)||$e!==Math.floor($e))return;const ve=s.value.length,Pe=c.value;$e<0?c.value=e.loop?ve-1:0:$e>=ve?c.value=e.loop?0:ve-1:c.value=$e,Pe===c.value&&X(Pe),Ie()}function X($e){s.value.forEach((ve,Pe)=>{ve.translateItem(Pe,c.value,$e)})}function G($e,ve){var Pe,Be,ot,Xe;const ee=g(s),pe=ee.length;if(pe===0||!$e.states.inStage)return!1;const Oe=ve+1,ze=ve-1,Ze=pe-1,De=ee[Ze].states.active,me=ee[0].states.active,Te=(Be=(Pe=ee[Oe])==null?void 0:Pe.states)==null?void 0:Be.active,Ue=(Xe=(ot=ee[ze])==null?void 0:ot.states)==null?void 0:Xe.active;return ve===Ze&&me||Te?"left":ve===0&&De||Ue?"right":!1}function re(){h.value=!0,e.pauseOnHover&&D()}function _e(){h.value=!1,P()}function J(){v.value=!1}function Y($e){g(L)||s.value.forEach((ve,Pe)=>{$e===G(ve,Pe)&&(ve.states.hover=!0)})}function ae(){g(L)||s.value.forEach($e=>{$e.states.hover=!1})}function Z($e){$e!==c.value&&(E.value||(v.value=!0)),c.value=$e}function Q($e){e.trigger==="hover"&&$e!==c.value&&(c.value=$e,E.value||(v.value=!0))}function he(){F(c.value-1)}function ge(){F(c.value+1)}function Ie(){D(),e.pauseOnHover||P()}function be($e){e.height==="auto"&&(p.value=$e)}function Ae(){var $e;const ve=($e=a.default)==null?void 0:$e.call(a);if(!ve)return null;const Be=dp(ve).filter(ot=>zo(ot)&&ot.type.name===KN);return(Be==null?void 0:Be.length)===2&&e.loop&&!S.value?(_.value=!0,Be):(_.value=!1,null)}tt(()=>c.value,($e,ve)=>{X(ve),_.value&&($e=$e%2,ve=ve%2),ve>-1&&t("change",$e,ve)}),tt(()=>e.autoplay,$e=>{$e?P():D()}),tt(()=>e.loop,()=>{F(c.value)}),tt(()=>e.interval,()=>{Ie()});const We=lo();return rn(()=>{tt(()=>s.value,()=>{s.value.length>0&&F(e.initialIndex)},{immediate:!0}),We.value=Xo(f.value,()=>{X()}),P()}),vo(()=>{D(),f.value&&We.value&&We.value.stop()}),An(oY,{root:f,isCardType:S,isVertical:L,items:s,loop:e.loop,cardScale:e.cardScale,addItem:i,removeItem:r,setActiveItem:F,setContainerHeight:be}),{root:f,activeIndex:c,arrowDisplay:b,hasLabel:y,hover:h,isCardType:S,isTransitioning:v,items:s,isVertical:L,containerStyle:I,isItemsTwoLength:_,handleButtonEnter:Y,handleTransitionEnd:J,handleButtonLeave:ae,handleIndicatorClick:Z,handleMouseEnter:re,handleMouseLeave:_e,setActiveItem:F,prev:he,next:ge,PlaceholderItem:Ae,isTwoLengthShow:k,throttledArrowClick:R,throttledIndicatorHover:w}},gSe="ElCarousel",mSe=Re({name:gSe}),_Se=Re({...mSe,props:lSe,emits:aSe,setup(e,{expose:t,emit:n}){const s=e,{root:i,activeIndex:r,arrowDisplay:a,hasLabel:c,hover:u,isCardType:h,items:f,isVertical:p,containerStyle:_,handleButtonEnter:E,handleButtonLeave:v,isTransitioning:b,handleIndicatorClick:y,handleMouseEnter:S,handleMouseLeave:L,handleTransitionEnd:I,setActiveItem:R,prev:w,next:k,PlaceholderItem:D,isTwoLengthShow:P,throttledArrowClick:B,throttledIndicatorHover:F}=pSe(s,n),X=rt("carousel"),{t:G}=xn(),re=x(()=>{const Y=[X.b(),X.m(s.direction)];return g(h)&&Y.push(X.m("card")),Y}),_e=x(()=>{const Y=[X.e("container")];return s.motionBlur&&g(b)&&f.value.length>1&&Y.push(g(p)?`${X.namespace.value}-transitioning-vertical`:`${X.namespace.value}-transitioning`),Y}),J=x(()=>{const Y=[X.e("indicators"),X.em("indicators",s.direction)];return g(c)&&Y.push(X.em("indicators","labels")),s.indicatorPosition==="outside"&&Y.push(X.em("indicators","outside")),g(p)&&Y.push(X.em("indicators","right")),Y});return t({activeIndex:r,setActiveItem:R,prev:w,next:k}),(Y,ae)=>(H(),le("div",{ref_key:"root",ref:i,class:z(g(re)),onMouseenter:Yt(g(S),["stop"]),onMouseleave:Yt(g(L),["stop"])},[g(a)?(H(),Ye(Li,{key:0,name:"carousel-arrow-left",persisted:""},{default:de(()=>[an(te("button",{type:"button",class:z([g(X).e("arrow"),g(X).em("arrow","left")]),"aria-label":g(G)("el.carousel.leftArrow"),onMouseenter:Z=>g(E)("left"),onMouseleave:g(v),onClick:Yt(Z=>g(B)(g(r)-1),["stop"])},[oe(g(Nt),null,{default:de(()=>[oe(g(bp))]),_:1})],42,["aria-label","onMouseenter","onMouseleave","onClick"]),[[Yn,(Y.arrow==="always"||g(u))&&(s.loop||g(r)>0)]])]),_:1})):Ge("v-if",!0),g(a)?(H(),Ye(Li,{key:1,name:"carousel-arrow-right",persisted:""},{default:de(()=>[an(te("button",{type:"button",class:z([g(X).e("arrow"),g(X).em("arrow","right")]),"aria-label":g(G)("el.carousel.rightArrow"),onMouseenter:Z=>g(E)("right"),onMouseleave:g(v),onClick:Yt(Z=>g(B)(g(r)+1),["stop"])},[oe(g(Nt),null,{default:de(()=>[oe(g(rl))]),_:1})],42,["aria-label","onMouseenter","onMouseleave","onClick"]),[[Yn,(Y.arrow==="always"||g(u))&&(s.loop||g(r)<g(f).length-1)]])]),_:1})):Ge("v-if",!0),te("div",{class:z(g(_e)),style:Bt(g(_)),onTransitionend:g(I)},[oe(g(D)),He(Y.$slots,"default")],46,["onTransitionend"]),Y.indicatorPosition!=="none"?(H(),le("ul",{key:2,class:z(g(J))},[(H(!0),le(Lt,null,In(g(f),(Z,Q)=>an((H(),le("li",{key:Q,class:z([g(X).e("indicator"),g(X).em("indicator",Y.direction),g(X).is("active",Q===g(r))]),onMouseenter:he=>g(F)(Q),onClick:Yt(he=>g(y)(Q),["stop"])},[te("button",{class:z(g(X).e("button")),"aria-label":g(G)("el.carousel.indicator",{index:Q+1})},[g(c)?(H(),le("span",{key:0},Ke(Z.props.label),1)):Ge("v-if",!0)],10,["aria-label"])],42,["onMouseenter","onClick"])),[[Yn,g(P)(Q)]])),128))],2)):Ge("v-if",!0),s.motionBlur?(H(),le("svg",{key:3,xmlns:"http://www.w3.org/2000/svg",version:"1.1",style:{display:"none"}},[te("defs",null,[te("filter",{id:"elCarouselHorizontal"},[te("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"12,0"})]),te("filter",{id:"elCarouselVertical"},[te("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"0,10"})])])])):Ge("v-if",!0)],42,["onMouseenter","onMouseleave"]))}});var TSe=pt(_Se,[["__file","carousel.vue"]]);const ESe=ht({name:{type:String,default:""},label:{type:[String,Number],default:""}}),vSe=e=>{const t=It(oY),n=pn(),s=K(),i=K(!1),r=K(0),a=K(1),c=K(!1),u=K(!1),h=K(!1),f=K(!1),{isCardType:p,isVertical:_,cardScale:E}=t;function v(I,R,w){const k=w-1,D=R-1,P=R+1,B=w/2;return R===0&&I===k?-1:R===k&&I===0?w:I<D&&R-I>=B?w+1:I>P&&I-R>=B?-2:I}function b(I,R){var w,k;const D=g(_)?((w=t.root.value)==null?void 0:w.offsetHeight)||0:((k=t.root.value)==null?void 0:k.offsetWidth)||0;return h.value?D*((2-E)*(I-R)+1)/4:I<R?-(1+E)*D/4:(3+E)*D/4}function y(I,R,w){const k=t.root.value;return k?((w?k.offsetHeight:k.offsetWidth)||0)*(I-R):0}const S=(I,R,w)=>{var k;const D=g(p),P=(k=t.items.value.length)!=null?k:Number.NaN,B=I===R;!D&&!ho(w)&&(f.value=B||I===w),!B&&P>2&&t.loop&&(I=v(I,R,P));const F=g(_);c.value=B,D?(h.value=Math.round(Math.abs(I-R))<=1,r.value=b(I,R),a.value=g(c)?1:E):r.value=y(I,R,F),u.value=!0,B&&s.value&&t.setContainerHeight(s.value.offsetHeight)};function L(){if(t&&g(p)){const I=t.items.value.findIndex(({uid:R})=>R===n.uid);t.setActiveItem(I)}}return rn(()=>{t.addItem({props:e,states:Kn({hover:i,translate:r,scale:a,active:c,ready:u,inStage:h,animating:f}),uid:n.uid,translateItem:S})}),Ch(()=>{t.removeItem(n.uid)}),{carouselItemRef:s,active:c,animating:f,hover:i,inStage:h,isVertical:_,translate:r,isCardType:p,scale:a,ready:u,handleItemClick:L}},bSe=Re({name:KN}),OSe=Re({...bSe,props:ESe,setup(e){const t=e,n=rt("carousel"),{carouselItemRef:s,active:i,animating:r,hover:a,inStage:c,isVertical:u,translate:h,isCardType:f,scale:p,ready:_,handleItemClick:E}=vSe(t),v=x(()=>[n.e("item"),n.is("active",i.value),n.is("in-stage",c.value),n.is("hover",a.value),n.is("animating",r.value),{[n.em("item","card")]:f.value,[n.em("item","card-vertical")]:f.value&&u.value}]),b=x(()=>{const S=`${`translate${g(u)?"Y":"X"}`}(${g(h)}px)`,L=`scale(${g(p)})`;return{transform:[S,L].join(" ")}});return(y,S)=>an((H(),le("div",{ref_key:"carouselItemRef",ref:s,class:z(g(v)),style:Bt(g(b)),onClick:g(E)},[g(f)?an((H(),le("div",{key:0,class:z(g(n).e("mask"))},null,2)),[[Yn,!g(i)]]):Ge("v-if",!0),He(y.$slots,"default")],14,["onClick"])),[[Yn,g(_)]])}});var sY=pt(OSe,[["__file","carousel-item.vue"]]);const SSe=nn(TSe,{CarouselItem:sY}),ySe=is(sY),iY={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:Ys,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...Xi(["ariaControls"])},rY={[un]:e=>Dt(e)||Wt(e)||Io(e),change:e=>Dt(e)||Wt(e)||Io(e)},Tv=Symbol("checkboxGroupContextKey"),$Se=({model:e,isChecked:t})=>{const n=It(Tv,void 0),s=x(()=>{var r,a;const c=(r=n==null?void 0:n.max)==null?void 0:r.value,u=(a=n==null?void 0:n.min)==null?void 0:a.value;return!ho(c)&&e.value.length>=c&&!t.value||!ho(u)&&e.value.length<=u&&t.value});return{isDisabled:ar(x(()=>(n==null?void 0:n.disabled.value)||s.value)),isLimitDisabled:s}},ISe=(e,{model:t,isLimitExceeded:n,hasOwnLabel:s,isDisabled:i,isLabeledByFormItem:r})=>{const a=It(Tv,void 0),{formItem:c}=lr(),{emit:u}=pn();function h(v){var b,y,S,L;return[!0,e.trueValue,e.trueLabel].includes(v)?(y=(b=e.trueValue)!=null?b:e.trueLabel)!=null?y:!0:(L=(S=e.falseValue)!=null?S:e.falseLabel)!=null?L:!1}function f(v,b){u("change",h(v),b)}function p(v){if(n.value)return;const b=v.target;u("change",h(b.checked),v)}async function _(v){n.value||!s.value&&!i.value&&r.value&&(v.composedPath().some(S=>S.tagName==="LABEL")||(t.value=h([!1,e.falseValue,e.falseLabel].includes(t.value)),await Vt(),f(t.value,v)))}const E=x(()=>(a==null?void 0:a.validateEvent)||e.validateEvent);return tt(()=>e.modelValue,()=>{E.value&&(c==null||c.validate("change").catch(v=>void 0))}),{handleChange:p,onClickRoot:_}},RSe=e=>{const t=K(!1),{emit:n}=pn(),s=It(Tv,void 0),i=x(()=>ho(s)===!1),r=K(!1),a=x({get(){var c,u;return i.value?(c=s==null?void 0:s.modelValue)==null?void 0:c.value:(u=e.modelValue)!=null?u:t.value},set(c){var u,h;i.value&&at(c)?(r.value=((u=s==null?void 0:s.max)==null?void 0:u.value)!==void 0&&c.length>(s==null?void 0:s.max.value)&&c.length>a.value.length,r.value===!1&&((h=s==null?void 0:s.changeEvent)==null||h.call(s,c))):(n(un,c),t.value=c)}});return{model:a,isGroup:i,isLimitExceeded:r}},CSe=(e,t,{model:n})=>{const s=It(Tv,void 0),i=K(!1),r=x(()=>Dm(e.value)?e.label:e.value),a=x(()=>{const f=n.value;return Io(f)?f:at(f)?Tn(r.value)?f.map(uo).some(p=>Hi(p,r.value)):f.map(uo).includes(r.value):f!=null?f===e.trueValue||f===e.trueLabel:!!f}),c=Fs(x(()=>{var f;return(f=s==null?void 0:s.size)==null?void 0:f.value}),{prop:!0}),u=Fs(x(()=>{var f;return(f=s==null?void 0:s.size)==null?void 0:f.value})),h=x(()=>!!t.default||!Dm(r.value));return{checkboxButtonSize:c,isChecked:a,isFocused:i,checkboxSize:u,hasOwnLabel:h,actualValue:r}},lY=(e,t)=>{const{formItem:n}=lr(),{model:s,isGroup:i,isLimitExceeded:r}=RSe(e),{isFocused:a,isChecked:c,checkboxButtonSize:u,checkboxSize:h,hasOwnLabel:f,actualValue:p}=CSe(e,t,{model:s}),{isDisabled:_}=$Se({model:s,isChecked:c}),{inputId:E,isLabeledByFormItem:v}=fc(e,{formItemContext:n,disableIdGeneration:f,disableIdManagement:i}),{handleChange:b,onClickRoot:y}=ISe(e,{model:s,isLimitExceeded:r,hasOwnLabel:f,isDisabled:_,isLabeledByFormItem:v});return(()=>{function L(){var I,R;at(s.value)&&!s.value.includes(p.value)?s.value.push(p.value):s.value=(R=(I=e.trueValue)!=null?I:e.trueLabel)!=null?R:!0}e.checked&&L()})(),cp({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},x(()=>i.value&&Dm(e.value))),cp({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},x(()=>!!e.trueLabel)),cp({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},x(()=>!!e.falseLabel)),{inputId:E,isLabeledByFormItem:v,isChecked:c,isDisabled:_,isFocused:a,checkboxButtonSize:u,checkboxSize:h,hasOwnLabel:f,model:s,actualValue:p,handleChange:b,onClickRoot:y}},MSe=Re({name:"ElCheckbox"}),ASe=Re({...MSe,props:iY,emits:rY,setup(e){const t=e,n=Ks(),{inputId:s,isLabeledByFormItem:i,isChecked:r,isDisabled:a,isFocused:c,checkboxSize:u,hasOwnLabel:h,model:f,actualValue:p,handleChange:_,onClickRoot:E}=lY(t,n),v=rt("checkbox"),b=x(()=>[v.b(),v.m(u.value),v.is("disabled",a.value),v.is("bordered",t.border),v.is("checked",r.value)]),y=x(()=>[v.e("input"),v.is("disabled",a.value),v.is("checked",r.value),v.is("indeterminate",t.indeterminate),v.is("focus",c.value)]);return(S,L)=>(H(),Ye(yn(!g(h)&&g(i)?"span":"label"),{class:z(g(b)),"aria-controls":S.indeterminate?S.ariaControls:null,onClick:g(E)},{default:de(()=>{var I,R,w,k;return[te("span",{class:z(g(y))},[S.trueValue||S.falseValue||S.trueLabel||S.falseLabel?an((H(),le("input",{key:0,id:g(s),"onUpdate:modelValue":D=>po(f)?f.value=D:null,class:z(g(v).e("original")),type:"checkbox",indeterminate:S.indeterminate,name:S.name,tabindex:S.tabindex,disabled:g(a),"true-value":(R=(I=S.trueValue)!=null?I:S.trueLabel)!=null?R:!0,"false-value":(k=(w=S.falseValue)!=null?w:S.falseLabel)!=null?k:!1,onChange:g(_),onFocus:D=>c.value=!0,onBlur:D=>c.value=!1,onClick:Yt(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[WC,g(f)]]):an((H(),le("input",{key:1,id:g(s),"onUpdate:modelValue":D=>po(f)?f.value=D:null,class:z(g(v).e("original")),type:"checkbox",indeterminate:S.indeterminate,disabled:g(a),value:g(p),name:S.name,tabindex:S.tabindex,onChange:g(_),onFocus:D=>c.value=!0,onBlur:D=>c.value=!1,onClick:Yt(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[WC,g(f)]]),te("span",{class:z(g(v).e("inner"))},null,2)],2),g(h)?(H(),le("span",{key:0,class:z(g(v).e("label"))},[He(S.$slots,"default"),S.$slots.default?Ge("v-if",!0):(H(),le(Lt,{key:0},[Xt(Ke(S.label),1)],64))],2)):Ge("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var LSe=pt(ASe,[["__file","checkbox.vue"]]);const wSe=Re({name:"ElCheckboxButton"}),kSe=Re({...wSe,props:iY,emits:rY,setup(e){const t=e,n=Ks(),{isFocused:s,isChecked:i,isDisabled:r,checkboxButtonSize:a,model:c,actualValue:u,handleChange:h}=lY(t,n),f=It(Tv,void 0),p=rt("checkbox"),_=x(()=>{var v,b,y,S;const L=(b=(v=f==null?void 0:f.fill)==null?void 0:v.value)!=null?b:"";return{backgroundColor:L,borderColor:L,color:(S=(y=f==null?void 0:f.textColor)==null?void 0:y.value)!=null?S:"",boxShadow:L?`-1px 0 0 0 ${L}`:void 0}}),E=x(()=>[p.b("button"),p.bm("button",a.value),p.is("disabled",r.value),p.is("checked",i.value),p.is("focus",s.value)]);return(v,b)=>{var y,S,L,I;return H(),le("label",{class:z(g(E))},[v.trueValue||v.falseValue||v.trueLabel||v.falseLabel?an((H(),le("input",{key:0,"onUpdate:modelValue":R=>po(c)?c.value=R:null,class:z(g(p).be("button","original")),type:"checkbox",name:v.name,tabindex:v.tabindex,disabled:g(r),"true-value":(S=(y=v.trueValue)!=null?y:v.trueLabel)!=null?S:!0,"false-value":(I=(L=v.falseValue)!=null?L:v.falseLabel)!=null?I:!1,onChange:g(h),onFocus:R=>s.value=!0,onBlur:R=>s.value=!1,onClick:Yt(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[WC,g(c)]]):an((H(),le("input",{key:1,"onUpdate:modelValue":R=>po(c)?c.value=R:null,class:z(g(p).be("button","original")),type:"checkbox",name:v.name,tabindex:v.tabindex,disabled:g(r),value:g(u),onChange:g(h),onFocus:R=>s.value=!0,onBlur:R=>s.value=!1,onClick:Yt(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[WC,g(c)]]),v.$slots.default||v.label?(H(),le("span",{key:2,class:z(g(p).be("button","inner")),style:Bt(g(i)?g(_):void 0)},[He(v.$slots,"default",{},()=>[Xt(Ke(v.label),1)])],6)):Ge("v-if",!0)],2)}}});var aY=pt(kSe,[["__file","checkbox-button.vue"]]);const NSe=ht({modelValue:{type:xe(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:Ys,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...Xi(["ariaLabel"])}),PSe={[un]:e=>at(e),change:e=>at(e)},DSe=Re({name:"ElCheckboxGroup"}),xSe=Re({...DSe,props:NSe,emits:PSe,setup(e,{emit:t}){const n=e,s=rt("checkbox"),{formItem:i}=lr(),{inputId:r,isLabeledByFormItem:a}=fc(n,{formItemContext:i}),c=async h=>{t(un,h),await Vt(),t("change",h)},u=x({get(){return n.modelValue},set(h){c(h)}});return An(Tv,{...Bc(fi(n),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:u,changeEvent:c}),tt(()=>n.modelValue,()=>{n.validateEvent&&(i==null||i.validate("change").catch(h=>void 0))}),(h,f)=>{var p;return H(),Ye(yn(h.tag),{id:g(r),class:z(g(s).b("group")),role:"group","aria-label":g(a)?void 0:h.ariaLabel||"checkbox-group","aria-labelledby":g(a)?(p=g(i))==null?void 0:p.labelId:void 0},{default:de(()=>[He(h.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var cY=pt(xSe,[["__file","checkbox-group.vue"]]);const uc=nn(LSe,{CheckboxButton:aY,CheckboxGroup:cY}),BSe=is(aY),uY=is(cY),dY=ht({modelValue:{type:[String,Number,Boolean],default:void 0},size:Ys,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),FSe=ht({...dY,border:Boolean}),hY={[un]:e=>Dt(e)||Wt(e)||Io(e),[_o]:e=>Dt(e)||Wt(e)||Io(e)},fY=Symbol("radioGroupKey"),pY=(e,t)=>{const n=K(),s=It(fY,void 0),i=x(()=>!!s),r=x(()=>Dm(e.value)?e.label:e.value),a=x({get(){return i.value?s.modelValue:e.modelValue},set(p){i.value?s.changeEvent(p):t&&t(un,p),n.value.checked=e.modelValue===r.value}}),c=Fs(x(()=>s==null?void 0:s.size)),u=ar(x(()=>s==null?void 0:s.disabled)),h=K(!1),f=x(()=>u.value||i.value&&a.value!==r.value?-1:0);return cp({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},x(()=>i.value&&Dm(e.value))),{radioRef:n,isGroup:i,radioGroup:s,focus:h,size:c,disabled:u,tabIndex:f,modelValue:a,actualValue:r}},USe=Re({name:"ElRadio"}),HSe=Re({...USe,props:FSe,emits:hY,setup(e,{emit:t}){const n=e,s=rt("radio"),{radioRef:i,radioGroup:r,focus:a,size:c,disabled:u,modelValue:h,actualValue:f}=pY(n,t);function p(){Vt(()=>t("change",h.value))}return(_,E)=>{var v;return H(),le("label",{class:z([g(s).b(),g(s).is("disabled",g(u)),g(s).is("focus",g(a)),g(s).is("bordered",_.border),g(s).is("checked",g(h)===g(f)),g(s).m(g(c))])},[te("span",{class:z([g(s).e("input"),g(s).is("disabled",g(u)),g(s).is("checked",g(h)===g(f))])},[an(te("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":b=>po(h)?h.value=b:null,class:z(g(s).e("original")),value:g(f),name:_.name||((v=g(r))==null?void 0:v.name),disabled:g(u),checked:g(h)===g(f),type:"radio",onFocus:b=>a.value=!0,onBlur:b=>a.value=!1,onChange:p,onClick:Yt(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","checked","onFocus","onBlur","onClick"]),[[J3,g(h)]]),te("span",{class:z(g(s).e("inner"))},null,2)],2),te("span",{class:z(g(s).e("label")),onKeydown:Yt(()=>{},["stop"])},[He(_.$slots,"default",{},()=>[Xt(Ke(_.label),1)])],42,["onKeydown"])],2)}}});var VSe=pt(HSe,[["__file","radio.vue"]]);const GSe=ht({...dY}),WSe=Re({name:"ElRadioButton"}),XSe=Re({...WSe,props:GSe,setup(e){const t=e,n=rt("radio"),{radioRef:s,focus:i,size:r,disabled:a,modelValue:c,radioGroup:u,actualValue:h}=pY(t),f=x(()=>({backgroundColor:(u==null?void 0:u.fill)||"",borderColor:(u==null?void 0:u.fill)||"",boxShadow:u!=null&&u.fill?`-1px 0 0 0 ${u.fill}`:"",color:(u==null?void 0:u.textColor)||""}));return(p,_)=>{var E;return H(),le("label",{class:z([g(n).b("button"),g(n).is("active",g(c)===g(h)),g(n).is("disabled",g(a)),g(n).is("focus",g(i)),g(n).bm("button",g(r))])},[an(te("input",{ref_key:"radioRef",ref:s,"onUpdate:modelValue":v=>po(c)?c.value=v:null,class:z(g(n).be("button","original-radio")),value:g(h),type:"radio",name:p.name||((E=g(u))==null?void 0:E.name),disabled:g(a),onFocus:v=>i.value=!0,onBlur:v=>i.value=!1,onClick:Yt(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","onFocus","onBlur","onClick"]),[[J3,g(c)]]),te("span",{class:z(g(n).be("button","inner")),style:Bt(g(c)===g(h)?g(f):{}),onKeydown:Yt(()=>{},["stop"])},[He(p.$slots,"default",{},()=>[Xt(Ke(p.label),1)])],46,["onKeydown"])],2)}}});var gY=pt(XSe,[["__file","radio-button.vue"]]);const zSe=ht({id:{type:String,default:void 0},size:Ys,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},...Xi(["ariaLabel"])}),YSe=hY,KSe=Re({name:"ElRadioGroup"}),jSe=Re({...KSe,props:zSe,emits:YSe,setup(e,{emit:t}){const n=e,s=rt("radio"),i=Gi(),r=K(),{formItem:a}=lr(),{inputId:c,isLabeledByFormItem:u}=fc(n,{formItemContext:a}),h=p=>{t(un,p),Vt(()=>t("change",p))};rn(()=>{const p=r.value.querySelectorAll("[type=radio]"),_=p[0];!Array.from(p).some(E=>E.checked)&&_&&(_.tabIndex=0)});const f=x(()=>n.name||i.value);return An(fY,Kn({...fi(n),changeEvent:h,name:f})),tt(()=>n.modelValue,()=>{n.validateEvent&&(a==null||a.validate("change").catch(p=>void 0))}),(p,_)=>(H(),le("div",{id:g(c),ref_key:"radioGroupRef",ref:r,class:z(g(s).b("group")),role:"radiogroup","aria-label":g(u)?void 0:p.ariaLabel||"radio-group","aria-labelledby":g(u)?g(a).labelId:void 0},[He(p.$slots,"default")],10,["id","aria-label","aria-labelledby"]))}});var mY=pt(jSe,[["__file","radio-group.vue"]]);const _Y=nn(VSe,{RadioButton:gY,RadioGroup:mY}),QSe=is(mY),qSe=is(gY);var JSe=Re({name:"NodeContent",setup(){return{ns:rt("cascader-node")}},render(){const{ns:e}=this,{node:t,panel:n}=this.$parent,{data:s,label:i}=t,{renderLabelFn:r}=n;return Gt("span",{class:e.e("label")},r?r({node:t,data:s}):i)}});const ix=Symbol(),ZSe=Re({name:"ElCascaderNode",components:{ElCheckbox:uc,ElRadio:_Y,NodeContent:JSe,ElIcon:Nt,Check:y$,Loading:Ju,ArrowRight:rl},props:{node:{type:Object,required:!0},menuId:String},emits:["expand"],setup(e,{emit:t}){const n=It(ix),s=rt("cascader-node"),i=x(()=>n.isHoverMenu),r=x(()=>n.config.multiple),a=x(()=>n.config.checkStrictly),c=x(()=>{var k;return(k=n.checkedNodes[0])==null?void 0:k.uid}),u=x(()=>e.node.isDisabled),h=x(()=>e.node.isLeaf),f=x(()=>a.value&&!h.value||!u.value),p=x(()=>E(n.expandingNode)),_=x(()=>a.value&&n.checkedNodes.some(E)),E=k=>{var D;const{level:P,uid:B}=e.node;return((D=k==null?void 0:k.pathNodes[P-1])==null?void 0:D.uid)===B},v=()=>{p.value||n.expandNode(e.node)},b=k=>{const{node:D}=e;k!==D.checked&&n.handleCheckChange(D,k)},y=()=>{n.lazyLoad(e.node,()=>{h.value||v()})},S=k=>{i.value&&(L(),!h.value&&t("expand",k))},L=()=>{const{node:k}=e;!f.value||k.loading||(k.loaded?v():y())},I=()=>{i.value&&!h.value||(h.value&&!u.value&&!a.value&&!r.value?w(!0):L())},R=k=>{a.value?(b(k),e.node.loaded&&v()):w(k)},w=k=>{e.node.loaded?(b(k),!a.value&&v()):y()};return{panel:n,isHoverMenu:i,multiple:r,checkStrictly:a,checkedNodeId:c,isDisabled:u,isLeaf:h,expandable:f,inExpandingPath:p,inCheckedPath:_,ns:s,handleHoverExpand:S,handleExpand:L,handleClick:I,handleCheck:w,handleSelectCheck:R}}});function eye(e,t,n,s,i,r){const a=Ot("el-checkbox"),c=Ot("el-radio"),u=Ot("check"),h=Ot("el-icon"),f=Ot("node-content"),p=Ot("loading"),_=Ot("arrow-right");return H(),le("li",{id:`${e.menuId}-${e.node.uid}`,role:"menuitem","aria-haspopup":!e.isLeaf,"aria-owns":e.isLeaf?null:e.menuId,"aria-expanded":e.inExpandingPath,tabindex:e.expandable?-1:void 0,class:z([e.ns.b(),e.ns.is("selectable",e.checkStrictly),e.ns.is("active",e.node.checked),e.ns.is("disabled",!e.expandable),e.inExpandingPath&&"in-active-path",e.inCheckedPath&&"in-checked-path"]),onMouseenter:e.handleHoverExpand,onFocus:e.handleHoverExpand,onClick:e.handleClick},[Ge(" prefix "),e.multiple?(H(),Ye(a,{key:0,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:e.isDisabled,onClick:Yt(()=>{},["stop"]),"onUpdate:modelValue":e.handleSelectCheck},null,8,["model-value","indeterminate","disabled","onClick","onUpdate:modelValue"])):e.checkStrictly?(H(),Ye(c,{key:1,"model-value":e.checkedNodeId,label:e.node.uid,disabled:e.isDisabled,"onUpdate:modelValue":e.handleSelectCheck,onClick:Yt(()=>{},["stop"])},{default:de(()=>[Ge(`
  1884. Add an empty element to avoid render label,
  1885. do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485
  1886. `),te("span")]),_:1},8,["model-value","label","disabled","onUpdate:modelValue","onClick"])):e.isLeaf&&e.node.checked?(H(),Ye(h,{key:2,class:z(e.ns.e("prefix"))},{default:de(()=>[oe(u)]),_:1},8,["class"])):Ge("v-if",!0),Ge(" content "),oe(f),Ge(" postfix "),e.isLeaf?Ge("v-if",!0):(H(),le(Lt,{key:3},[e.node.loading?(H(),Ye(h,{key:0,class:z([e.ns.is("loading"),e.ns.e("postfix")])},{default:de(()=>[oe(p)]),_:1},8,["class"])):(H(),Ye(h,{key:1,class:z(["arrow-right",e.ns.e("postfix")])},{default:de(()=>[oe(_)]),_:1},8,["class"]))],64))],42,["id","aria-haspopup","aria-owns","aria-expanded","tabindex","onMouseenter","onFocus","onClick"])}var tye=pt(ZSe,[["render",eye],["__file","node.vue"]]);const nye=Re({name:"ElCascaderMenu",components:{Loading:Ju,ElIcon:Nt,ElScrollbar:ld,ElCascaderNode:tye},props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0}},setup(e){const t=pn(),n=rt("cascader-menu"),{t:s}=xn(),i=Gi();let r=null,a=null;const c=It(ix),u=K(null),h=x(()=>!e.nodes.length),f=x(()=>!c.initialLoaded),p=x(()=>`${i.value}-${e.index}`),_=y=>{r=y.target},E=y=>{if(!(!c.isHoverMenu||!r||!u.value))if(r.contains(y.target)){v();const S=t.vnode.el,{left:L}=S.getBoundingClientRect(),{offsetWidth:I,offsetHeight:R}=S,w=y.clientX-L,k=r.offsetTop,D=k+r.offsetHeight;u.value.innerHTML=`
  1887. <path style="pointer-events: auto;" fill="transparent" d="M${w} ${k} L${I} 0 V${k} Z" />
  1888. <path style="pointer-events: auto;" fill="transparent" d="M${w} ${D} L${I} ${R} V${D} Z" />
  1889. `}else a||(a=window.setTimeout(b,c.config.hoverThreshold))},v=()=>{a&&(clearTimeout(a),a=null)},b=()=>{u.value&&(u.value.innerHTML="",v())};return{ns:n,panel:c,hoverZone:u,isEmpty:h,isLoading:f,menuId:p,t:s,handleExpand:_,handleMouseMove:E,clearHoverZone:b}}});function oye(e,t,n,s,i,r){const a=Ot("el-cascader-node"),c=Ot("loading"),u=Ot("el-icon"),h=Ot("el-scrollbar");return H(),Ye(h,{key:e.menuId,tag:"ul",role:"menu",class:z(e.ns.b()),"wrap-class":e.ns.e("wrap"),"view-class":[e.ns.e("list"),e.ns.is("empty",e.isEmpty)],onMousemove:e.handleMouseMove,onMouseleave:e.clearHoverZone},{default:de(()=>{var f;return[(H(!0),le(Lt,null,In(e.nodes,p=>(H(),Ye(a,{key:p.uid,node:p,"menu-id":e.menuId,onExpand:e.handleExpand},null,8,["node","menu-id","onExpand"]))),128)),e.isLoading?(H(),le("div",{key:0,class:z(e.ns.e("empty-text"))},[oe(u,{size:"14",class:z(e.ns.is("loading"))},{default:de(()=>[oe(c)]),_:1},8,["class"]),Xt(" "+Ke(e.t("el.cascader.loading")),1)],2)):e.isEmpty?(H(),le("div",{key:1,class:z(e.ns.e("empty-text"))},[He(e.$slots,"empty",{},()=>[Xt(Ke(e.t("el.cascader.noData")),1)])],2)):(f=e.panel)!=null&&f.isHoverMenu?(H(),le("svg",{key:2,ref:"hoverZone",class:z(e.ns.e("hover-zone"))},null,2)):Ge("v-if",!0)]}),_:3},8,["class","wrap-class","view-class","onMousemove","onMouseleave"])}var sye=pt(nye,[["render",oye],["__file","menu.vue"]]);const rx=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),Uu=e=>o$(e);let iye=0;const rye=e=>{const t=[e];let{parent:n}=e;for(;n;)t.unshift(n),n=n.parent;return t};let QN=class qN{constructor(t,n,s,i=!1){this.data=t,this.config=n,this.parent=s,this.root=i,this.uid=iye++,this.checked=!1,this.indeterminate=!1,this.loading=!1;const{value:r,label:a,children:c}=n,u=t[c],h=rye(this);this.level=i?0:s?s.level+1:1,this.value=t[r],this.label=t[a],this.pathNodes=h,this.pathValues=h.map(f=>f.value),this.pathLabels=h.map(f=>f.label),this.childrenData=u,this.children=(u||[]).map(f=>new qN(f,n,this)),this.loaded=!n.lazy||this.isLeaf||!la(u)}get isDisabled(){const{data:t,parent:n,config:s}=this,{disabled:i,checkStrictly:r}=s;return(Ut(i)?i(t,this):!!t[i])||!r&&(n==null?void 0:n.isDisabled)}get isLeaf(){const{data:t,config:n,childrenData:s,loaded:i}=this,{lazy:r,leaf:a}=n,c=Ut(a)?a(t,this):t[a];return ho(c)?r&&!i?!1:!(at(s)&&s.length):!!c}get valueByOption(){return this.config.emitPath?this.pathValues:this.value}appendChild(t){const{childrenData:n,children:s}=this,i=new qN(t,this.config,this);return at(n)?n.push(t):this.childrenData=[t],s.push(i),i}calcText(t,n){const s=t?this.pathLabels.join(n):this.label;return this.text=s,s}broadcast(t,...n){const s=`onParent${Uu(t)}`;this.children.forEach(i=>{i&&(i.broadcast(t,...n),i[s]&&i[s](...n))})}emit(t,...n){const{parent:s}=this,i=`onChild${Uu(t)}`;s&&(s[i]&&s[i](...n),s.emit(t,...n))}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,n=t.filter(i=>!i.isDisabled),s=n.length?n.every(i=>i.checked):!1;this.setCheckState(s)}setCheckState(t){const n=this.children.length,s=this.children.reduce((i,r)=>{const a=r.checked?1:r.indeterminate?.5:0;return i+a},0);this.checked=this.loaded&&this.children.filter(i=>!i.isDisabled).every(i=>i.loaded&&i.checked)&&t,this.indeterminate=this.loaded&&s!==n&&s>0}doCheck(t){if(this.checked===t)return;const{checkStrictly:n,multiple:s}=this.config;n||!s?this.checked=t:(this.broadcast("check",t),this.setCheckState(t),this.emit("check"))}};const JN=(e,t)=>e.reduce((n,s)=>(s.isLeaf?n.push(s):(!t&&n.push(s),n=n.concat(JN(s.children,t))),n),[]);class YV{constructor(t,n){this.config=n;const s=(t||[]).map(i=>new QN(i,this.config));this.nodes=s,this.allNodes=JN(s,!1),this.leafNodes=JN(s,!0)}getNodes(){return this.nodes}getFlattedNodes(t){return t?this.leafNodes:this.allNodes}appendNode(t,n){const s=n?n.appendChild(t):new QN(t,this.config);n||this.nodes.push(s),this.allNodes.push(s),s.isLeaf&&this.leafNodes.push(s)}appendNodes(t,n){t.forEach(s=>this.appendNode(s,n))}getNodeByValue(t,n=!1){return!t&&t!==0?null:this.getFlattedNodes(n).find(i=>Hi(i.value,t)||Hi(i.pathValues,t))||null}getSameNode(t){return t&&this.getFlattedNodes(!1).find(({value:s,level:i})=>Hi(t.value,s)&&t.level===i)||null}}const TY=ht({modelValue:{type:xe([Number,String,Array])},options:{type:xe(Array),default:()=>[]},props:{type:xe(Object),default:()=>({})}}),lye={expandTrigger:"click",multiple:!1,checkStrictly:!1,emitPath:!0,lazy:!1,lazyLoad:ro,value:"value",label:"label",children:"children",leaf:"leaf",disabled:"disabled",hoverThreshold:500},aye=e=>x(()=>({...lye,...e.props})),KV=e=>{if(!e)return 0;const t=e.id.split("-");return Number(t[t.length-2])},cye=e=>{if(!e)return;const t=e.querySelector("input");t?t.click():$6(e)&&e.click()},uye=(e,t)=>{const n=t.slice(0),s=n.map(r=>r.uid),i=e.reduce((r,a)=>{const c=s.indexOf(a.uid);return c>-1&&(r.push(a),n.splice(c,1),s.splice(c,1)),r},[]);return i.push(...n),i},jV=e=>[...new Set(e)],nl=e=>!e&&e!==0?[]:at(e)?e:[e],dye=Re({name:"ElCascaderPanel",components:{ElCascaderMenu:sye},props:{...TY,border:{type:Boolean,default:!0},renderLabel:Function},emits:[un,_o,"close","expand-change"],setup(e,{emit:t,slots:n}){let s=!1;const i=rt("cascader"),r=aye(e);let a=null;const c=K(!0),u=K([]),h=K(null),f=K([]),p=K(null),_=K([]),E=x(()=>r.value.expandTrigger==="hover"),v=x(()=>e.renderLabel||n.default),b=()=>{const{options:G}=e,re=r.value;s=!1,a=new YV(G,re),f.value=[a.getNodes()],re.lazy&&la(e.options)?(c.value=!1,y(void 0,_e=>{_e&&(a=new YV(_e,re),f.value=[a.getNodes()]),c.value=!0,P(!1,!0)})):P(!1,!0)},y=(G,re)=>{const _e=r.value;G=G||new QN({},_e,void 0,!0),G.loading=!0;const J=Y=>{const ae=G,Z=ae.root?null:ae;Y&&(a==null||a.appendNodes(Y,Z)),ae.loading=!1,ae.loaded=!0,ae.childrenData=ae.childrenData||[],re&&re(Y)};_e.lazyLoad(G,J)},S=(G,re)=>{var _e;const{level:J}=G,Y=f.value.slice(0,J);let ae;G.isLeaf?ae=G.pathNodes[J-2]:(ae=G,Y.push(G.children)),((_e=p.value)==null?void 0:_e.uid)!==(ae==null?void 0:ae.uid)&&(p.value=G,f.value=Y,!re&&t("expand-change",(G==null?void 0:G.pathValues)||[]))},L=(G,re,_e=!0)=>{const{checkStrictly:J,multiple:Y}=r.value,ae=_.value[0];s=!0,!Y&&(ae==null||ae.doCheck(!1)),G.doCheck(re),D(),_e&&!Y&&!J&&t("close"),!_e&&!Y&&!J&&I(G)},I=G=>{G&&(G=G.parent,I(G),G&&S(G))},R=G=>a==null?void 0:a.getFlattedNodes(G),w=G=>{var re;return(re=R(G))==null?void 0:re.filter(_e=>_e.checked!==!1)},k=()=>{_.value.forEach(G=>G.doCheck(!1)),D(),f.value=f.value.slice(0,1),p.value=null,t("expand-change",[])},D=()=>{var G;const{checkStrictly:re,multiple:_e}=r.value,J=_.value,Y=w(!re),ae=uye(J,Y),Z=ae.map(Q=>Q.valueByOption);_.value=ae,h.value=_e?Z:(G=Z[0])!=null?G:null},P=(G=!1,re=!1)=>{const{modelValue:_e}=e,{lazy:J,multiple:Y,checkStrictly:ae}=r.value,Z=!ae;if(!(!c.value||s||!re&&Hi(_e,h.value)))if(J&&!G){const he=jV(nme(nl(_e))).map(ge=>a==null?void 0:a.getNodeByValue(ge)).filter(ge=>!!ge&&!ge.loaded&&!ge.loading);he.length?he.forEach(ge=>{y(ge,()=>P(!1,re))}):P(!0,re)}else{const Q=Y?nl(_e):[_e],he=jV(Q.map(ge=>a==null?void 0:a.getNodeByValue(ge,Z)));B(he,re),h.value=SM(_e)}},B=(G,re=!0)=>{const{checkStrictly:_e}=r.value,J=_.value,Y=G.filter(Q=>!!Q&&(_e||Q.isLeaf)),ae=a==null?void 0:a.getSameNode(p.value),Z=re&&ae||Y[0];Z?Z.pathNodes.forEach(Q=>S(Q,!0)):p.value=null,J.forEach(Q=>Q.doCheck(!1)),Kn(Y).forEach(Q=>Q.doCheck(!0)),_.value=Y,Vt(F)},F=()=>{Dn&&u.value.forEach(G=>{const re=G==null?void 0:G.$el;if(re){const _e=re.querySelector(`.${i.namespace.value}-scrollbar__wrap`),J=re.querySelector(`.${i.b("node")}.${i.is("active")}`)||re.querySelector(`.${i.b("node")}.in-active-path`);DD(_e,J)}})},X=G=>{const re=G.target,{code:_e}=G;switch(_e){case $t.up:case $t.down:{G.preventDefault();const J=_e===$t.up?-1:1;dC(I6(re,J,`.${i.b("node")}[tabindex="-1"]`));break}case $t.left:{G.preventDefault();const J=u.value[KV(re)-1],Y=J==null?void 0:J.$el.querySelector(`.${i.b("node")}[aria-expanded="true"]`);dC(Y);break}case $t.right:{G.preventDefault();const J=u.value[KV(re)+1],Y=J==null?void 0:J.$el.querySelector(`.${i.b("node")}[tabindex="-1"]`);dC(Y);break}case $t.enter:case $t.numpadEnter:cye(re);break}};return An(ix,Kn({config:r,expandingNode:p,checkedNodes:_,isHoverMenu:E,initialLoaded:c,renderLabelFn:v,lazyLoad:y,expandNode:S,handleCheckChange:L})),tt([r,()=>e.options],b,{deep:!0,immediate:!0}),tt(()=>e.modelValue,()=>{s=!1,P()},{deep:!0}),tt(()=>h.value,G=>{Hi(G,e.modelValue)||(t(un,G),t(_o,G))}),T3(()=>u.value=[]),rn(()=>!la(e.modelValue)&&P()),{ns:i,menuList:u,menus:f,checkedNodes:_,handleKeyDown:X,handleCheckChange:L,getFlattedNodes:R,getCheckedNodes:w,clearCheckedNodes:k,calculateCheckedValue:D,scrollToExpandingNode:F}}});function hye(e,t,n,s,i,r){const a=Ot("el-cascader-menu");return H(),le("div",{class:z([e.ns.b("panel"),e.ns.is("bordered",e.border)]),onKeydown:e.handleKeyDown},[(H(!0),le(Lt,null,In(e.menus,(c,u)=>(H(),Ye(a,{key:u,ref_for:!0,ref:h=>e.menuList[u]=h,index:u,nodes:[...c]},{empty:de(()=>[He(e.$slots,"empty")]),_:2},1032,["index","nodes"]))),128))],42,["onKeydown"])}var fye=pt(dye,[["render",hye],["__file","index.vue"]]);const EY=nn(fye),yh=ht({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:rd},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),pye={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},gye=Re({name:"ElTag"}),mye=Re({...gye,props:yh,emits:pye,setup(e,{emit:t}){const n=e,s=Fs(),i=rt("tag"),r=x(()=>{const{type:h,hit:f,effect:p,closable:_,round:E}=n;return[i.b(),i.is("closable",_),i.m(h||"primary"),i.m(s.value),i.m(p),i.is("hit",f),i.is("round",E)]}),a=h=>{t("close",h)},c=h=>{t("click",h)},u=h=>{var f,p,_;(_=(p=(f=h==null?void 0:h.component)==null?void 0:f.subTree)==null?void 0:p.component)!=null&&_.bum&&(h.component.subTree.component.bum=null)};return(h,f)=>h.disableTransitions?(H(),le("span",{key:0,class:z(g(r)),style:Bt({backgroundColor:h.color}),onClick:c},[te("span",{class:z(g(i).e("content"))},[He(h.$slots,"default")],2),h.closable?(H(),Ye(g(Nt),{key:0,class:z(g(i).e("close")),onClick:Yt(a,["stop"])},{default:de(()=>[oe(g(zc))]),_:1},8,["class","onClick"])):Ge("v-if",!0)],6)):(H(),Ye(Li,{key:1,name:`${g(i).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:u},{default:de(()=>[te("span",{class:z(g(r)),style:Bt({backgroundColor:h.color}),onClick:c},[te("span",{class:z(g(i).e("content"))},[He(h.$slots,"default")],2),h.closable?(H(),Ye(g(Nt),{key:0,class:z(g(i).e("close")),onClick:Yt(a,["stop"])},{default:de(()=>[oe(g(zc))]),_:1},8,["class","onClick"])):Ge("v-if",!0)],6)]),_:3},8,["name"]))}});var _ye=pt(mye,[["__file","tag.vue"]]);const zE=nn(_ye),Tye=ht({...TY,size:Ys,placeholder:String,disabled:Boolean,clearable:Boolean,filterable:Boolean,filterMethod:{type:xe(Function),default:(e,t)=>e.text.includes(t)},separator:{type:String,default:" / "},showAllLevels:{type:Boolean,default:!0},collapseTags:Boolean,maxCollapseTags:{type:Number,default:1},collapseTagsTooltip:{type:Boolean,default:!1},debounce:{type:Number,default:300},beforeFilter:{type:xe(Function),default:()=>!0},placement:{type:xe(String),values:Ph,default:"bottom-start"},fallbackPlacements:{type:xe(Array),default:["bottom-start","bottom","top-start","top","right","left"]},popperClass:{type:String,default:""},teleported:Si.teleported,tagType:{...yh.type,default:"info"},tagEffect:{...yh.effect,default:"light"},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},...gv}),Eye={[un]:e=>!0,[_o]:e=>!0,focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,visibleChange:e=>Io(e),expandChange:e=>!!e,removeTag:e=>!!e},Wf=new Map;if(Dn){let e;document.addEventListener("mousedown",t=>e=t),document.addEventListener("mouseup",t=>{if(e){for(const n of Wf.values())for(const{documentHandler:s}of n)s(t,e);e=void 0}})}function QV(e,t){let n=[];return at(t.arg)?n=t.arg:pa(t.arg)&&n.push(t.arg),function(s,i){const r=t.instance.popperRef,a=s.target,c=i==null?void 0:i.target,u=!t||!t.instance,h=!a||!c,f=e.contains(a)||e.contains(c),p=e===a,_=n.length&&n.some(v=>v==null?void 0:v.contains(a))||n.length&&n.includes(c),E=r&&(r.contains(a)||r.contains(c));u||h||f||p||_||E||t.value(s,i)}}const $h={beforeMount(e,t){Wf.has(e)||Wf.set(e,[]),Wf.get(e).push({documentHandler:QV(e,t),bindingFn:t.value})},updated(e,t){Wf.has(e)||Wf.set(e,[]);const n=Wf.get(e),s=n.findIndex(r=>r.bindingFn===t.oldValue),i={documentHandler:QV(e,t),bindingFn:t.value};s>=0?n.splice(s,1,i):n.push(i)},unmounted(e){Wf.delete(e)}},vye="ElCascader",bye=Re({name:vye}),Oye=Re({...bye,props:Tye,emits:Eye,setup(e,{expose:t,emit:n}){const s=e,i={modifiers:[{name:"arrowPosition",enabled:!0,phase:"main",fn:({state:ue})=>{const{modifiersData:Fe,placement:ye}=ue;["right","left","bottom","top"].includes(ye)||(Fe.arrow.x=35)},requires:["arrow"]}]},r=Cp();let a=0,c=0;const u=rt("cascader"),h=rt("input"),{t:f}=xn(),{form:p,formItem:_}=lr(),{valueOnClear:E}=xA(s),{isComposing:v,handleComposition:b}=I$({afterComposition(ue){var Fe;const ye=(Fe=ue.target)==null?void 0:Fe.value;ne(ye)}}),y=K(null),S=K(null),L=K(null),I=K(null),R=K(null),w=K(!1),k=K(!1),D=K(!1),P=K(!1),B=K(""),F=K(""),X=K([]),G=K([]),re=K([]),_e=x(()=>r.style),J=x(()=>s.disabled||(p==null?void 0:p.disabled)),Y=x(()=>s.placeholder||f("el.cascader.placeholder")),ae=x(()=>F.value||X.value.length>0||v.value?"":Y.value),Z=Fs(),Q=x(()=>Z.value==="small"?"small":"default"),he=x(()=>!!s.props.multiple),ge=x(()=>!s.filterable||he.value),Ie=x(()=>he.value?F.value:B.value),be=x(()=>{var ue;return((ue=I.value)==null?void 0:ue.checkedNodes)||[]}),Ae=x(()=>!s.clearable||J.value||D.value||!k.value?!1:!!be.value.length),We=x(()=>{const{showAllLevels:ue,separator:Fe}=s,ye=be.value;return ye.length?he.value?"":ye[0].calcText(ue,Fe):""}),$e=x(()=>(_==null?void 0:_.validateState)||""),ve=x({get(){return SM(s.modelValue)},set(ue){const Fe=ue??E.value;n(un,Fe),n(_o,Fe),s.validateEvent&&(_==null||_.validate("change").catch(ye=>void 0))}}),Pe=x(()=>[u.b(),u.m(Z.value),u.is("disabled",J.value),r.class]),Be=x(()=>[h.e("icon"),"icon-arrow-down",u.is("reverse",w.value)]),ot=x(()=>u.is("focus",w.value||P.value)),Xe=x(()=>{var ue,Fe;return(Fe=(ue=y.value)==null?void 0:ue.popperRef)==null?void 0:Fe.contentRef}),ee=ue=>{var Fe,ye,ft;J.value||(ue=ue??!w.value,ue!==w.value&&(w.value=ue,(ye=(Fe=S.value)==null?void 0:Fe.input)==null||ye.setAttribute("aria-expanded",`${ue}`),ue?(pe(),Vt((ft=I.value)==null?void 0:ft.scrollToExpandingNode)):s.filterable&&Je(),n("visibleChange",ue)))},pe=()=>{Vt(()=>{var ue;(ue=y.value)==null||ue.updatePopper()})},Oe=()=>{D.value=!1},ze=ue=>{const{showAllLevels:Fe,separator:ye}=s;return{node:ue,key:ue.uid,text:ue.calcText(Fe,ye),hitState:!1,closable:!J.value&&!ue.isDisabled,isCollapseTag:!1}},Ze=ue=>{var Fe;const ye=ue.node;ye.doCheck(!1),(Fe=I.value)==null||Fe.calculateCheckedValue(),n("removeTag",ye.valueByOption)},De=()=>{if(!he.value)return;const ue=be.value,Fe=[],ye=[];if(ue.forEach(ft=>ye.push(ze(ft))),G.value=ye,ue.length){ue.slice(0,s.maxCollapseTags).forEach(En=>Fe.push(ze(En)));const ft=ue.slice(s.maxCollapseTags),Kt=ft.length;Kt&&(s.collapseTags?Fe.push({key:-1,text:`+ ${Kt}`,closable:!1,isCollapseTag:!0}):ft.forEach(En=>Fe.push(ze(En))))}X.value=Fe},me=()=>{var ue,Fe;const{filterMethod:ye,showAllLevels:ft,separator:Kt}=s,En=(Fe=(ue=I.value)==null?void 0:ue.getFlattedNodes(!s.props.checkStrictly))==null?void 0:Fe.filter(Rn=>Rn.isDisabled?!1:(Rn.calcText(ft,Kt),ye(Rn,Ie.value)));he.value&&(X.value.forEach(Rn=>{Rn.hitState=!1}),G.value.forEach(Rn=>{Rn.hitState=!1})),D.value=!0,re.value=En,pe()},Te=()=>{var ue;let Fe;D.value&&R.value?Fe=R.value.$el.querySelector(`.${u.e("suggestion-item")}`):Fe=(ue=I.value)==null?void 0:ue.$el.querySelector(`.${u.b("node")}[tabindex="-1"]`),Fe&&(Fe.focus(),!D.value&&Fe.click())},Ue=()=>{var ue,Fe;const ye=(ue=S.value)==null?void 0:ue.input,ft=L.value,Kt=(Fe=R.value)==null?void 0:Fe.$el;if(!(!Dn||!ye)){if(Kt){const En=Kt.querySelector(`.${u.e("suggestion-list")}`);En.style.minWidth=`${ye.offsetWidth}px`}if(ft){const{offsetHeight:En}=ft,Rn=X.value.length>0?`${Math.max(En,a)-2}px`:`${a}px`;ye.style.height=Rn,pe()}}},qe=ue=>{var Fe;return(Fe=I.value)==null?void 0:Fe.getCheckedNodes(ue)},ct=ue=>{pe(),n("expandChange",ue)},Ne=ue=>{if(!v.value)switch(ue.code){case $t.enter:case $t.numpadEnter:ee();break;case $t.down:ee(!0),Vt(Te),ue.preventDefault();break;case $t.esc:w.value===!0&&(ue.preventDefault(),ue.stopPropagation(),ee(!1));break;case $t.tab:ee(!1);break}},Se=()=>{var ue;(ue=I.value)==null||ue.clearCheckedNodes(),!w.value&&s.filterable&&Je(),ee(!1),n("clear")},Je=()=>{const{value:ue}=We;B.value=ue,F.value=ue},ut=ue=>{var Fe,ye;const{checked:ft}=ue;he.value?(Fe=I.value)==null||Fe.handleCheckChange(ue,!ft,!1):(!ft&&((ye=I.value)==null||ye.handleCheckChange(ue,!0,!1)),ee(!1))},Mt=ue=>{const Fe=ue.target,{code:ye}=ue;switch(ye){case $t.up:case $t.down:{const ft=ye===$t.up?-1:1;dC(I6(Fe,ft,`.${u.e("suggestion-item")}[tabindex="-1"]`));break}case $t.enter:case $t.numpadEnter:Fe.click();break}},mt=()=>{const ue=X.value,Fe=ue[ue.length-1];c=F.value?0:c+1,!(!Fe||!c||s.collapseTags&&ue.length>1)&&(Fe.hitState?Ze(Fe):Fe.hitState=!0)},qt=ue=>{const Fe=ue.target,ye=u.e("search-input");Fe.className===ye&&(P.value=!0),n("focus",ue)},ce=ue=>{P.value=!1,n("blur",ue)},q=Vl(()=>{const{value:ue}=Ie;if(!ue)return;const Fe=s.beforeFilter(ue);oy(Fe)?Fe.then(me).catch(()=>{}):Fe!==!1?me():Oe()},s.debounce),ne=(ue,Fe)=>{!w.value&&ee(!0),!(Fe!=null&&Fe.isComposing)&&(ue?q():Oe())},Le=ue=>Number.parseFloat(xme(h.cssVarName("input-height"),ue).value)-2;return tt(D,pe),tt([be,J,()=>s.collapseTags],De),tt(X,()=>{Vt(()=>Ue())}),tt(Z,async()=>{await Vt();const ue=S.value.input;a=Le(ue)||a,Ue()}),tt(We,Je,{immediate:!0}),rn(()=>{const ue=S.value.input,Fe=Le(ue);a=ue.offsetHeight||Fe,Xo(ue,Ue)}),t({getCheckedNodes:qe,cascaderPanelRef:I,togglePopperVisible:ee,contentRef:Xe,presentText:We}),(ue,Fe)=>(H(),Ye(g(rr),{ref_key:"tooltipRef",ref:y,visible:w.value,teleported:ue.teleported,"popper-class":[g(u).e("dropdown"),ue.popperClass],"popper-options":i,"fallback-placements":ue.fallbackPlacements,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,placement:ue.placement,transition:`${g(u).namespace.value}-zoom-in-top`,effect:"light",pure:"",persistent:ue.persistent,onHide:Oe},{default:de(()=>[an((H(),le("div",{class:z(g(Pe)),style:Bt(g(_e)),onClick:()=>ee(g(ge)?void 0:!0),onKeydown:Ne,onMouseenter:ye=>k.value=!0,onMouseleave:ye=>k.value=!1},[oe(g(Nr),{ref_key:"input",ref:S,modelValue:B.value,"onUpdate:modelValue":ye=>B.value=ye,placeholder:g(ae),readonly:g(ge),disabled:g(J),"validate-event":!1,size:g(Z),class:z(g(ot)),tabindex:g(he)&&ue.filterable&&!g(J)?-1:void 0,onCompositionstart:g(b),onCompositionupdate:g(b),onCompositionend:g(b),onFocus:qt,onBlur:ce,onInput:ne},{suffix:de(()=>[g(Ae)?(H(),Ye(g(Nt),{key:"clear",class:z([g(h).e("icon"),"icon-circle-close"]),onClick:Yt(Se,["stop"])},{default:de(()=>[oe(g(Nh))]),_:1},8,["class","onClick"])):(H(),Ye(g(Nt),{key:"arrow-down",class:z(g(Be)),onClick:Yt(ye=>ee(),["stop"])},{default:de(()=>[oe(g(kh))]),_:1},8,["class","onClick"]))]),_:1},8,["modelValue","onUpdate:modelValue","placeholder","readonly","disabled","size","class","tabindex","onCompositionstart","onCompositionupdate","onCompositionend"]),g(he)?(H(),le("div",{key:0,ref_key:"tagWrapper",ref:L,class:z([g(u).e("tags"),g(u).is("validate",!!g($e))])},[(H(!0),le(Lt,null,In(X.value,ye=>(H(),Ye(g(zE),{key:ye.key,type:ue.tagType,size:g(Q),effect:ue.tagEffect,hit:ye.hitState,closable:ye.closable,"disable-transitions":"",onClose:ft=>Ze(ye)},{default:de(()=>[ye.isCollapseTag===!1?(H(),le("span",{key:0},Ke(ye.text),1)):(H(),Ye(g(rr),{key:1,disabled:w.value||!ue.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],placement:"bottom",effect:"light"},{default:de(()=>[te("span",null,Ke(ye.text),1)]),content:de(()=>[te("div",{class:z(g(u).e("collapse-tags"))},[(H(!0),le(Lt,null,In(G.value.slice(ue.maxCollapseTags),(ft,Kt)=>(H(),le("div",{key:Kt,class:z(g(u).e("collapse-tag"))},[(H(),Ye(g(zE),{key:ft.key,class:"in-tooltip",type:ue.tagType,size:g(Q),effect:ue.tagEffect,hit:ft.hitState,closable:ft.closable,"disable-transitions":"",onClose:En=>Ze(ft)},{default:de(()=>[te("span",null,Ke(ft.text),1)]),_:2},1032,["type","size","effect","hit","closable","onClose"]))],2))),128))],2)]),_:2},1032,["disabled"]))]),_:2},1032,["type","size","effect","hit","closable","onClose"]))),128)),ue.filterable&&!g(J)?an((H(),le("input",{key:0,"onUpdate:modelValue":ye=>F.value=ye,type:"text",class:z(g(u).e("search-input")),placeholder:g(We)?"":g(Y),onInput:ye=>ne(F.value,ye),onClick:Yt(ye=>ee(!0),["stop"]),onKeydown:So(mt,["delete"]),onCompositionstart:g(b),onCompositionupdate:g(b),onCompositionend:g(b),onFocus:qt,onBlur:ce},null,42,["onUpdate:modelValue","placeholder","onInput","onClick","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend"])),[[oA,F.value]]):Ge("v-if",!0)],2)):Ge("v-if",!0)],46,["onClick","onMouseenter","onMouseleave"])),[[g($h),()=>ee(!1),g(Xe)]])]),content:de(()=>[an(oe(g(EY),{ref_key:"cascaderPanelRef",ref:I,modelValue:g(ve),"onUpdate:modelValue":ye=>po(ve)?ve.value=ye:null,options:ue.options,props:s.props,border:!1,"render-label":ue.$slots.default,onExpandChange:ct,onClose:ye=>ue.$nextTick(()=>ee(!1))},{empty:de(()=>[He(ue.$slots,"empty")]),_:3},8,["modelValue","onUpdate:modelValue","options","props","render-label","onClose"]),[[Yn,!D.value]]),ue.filterable?an((H(),Ye(g(ld),{key:0,ref_key:"suggestionPanel",ref:R,tag:"ul",class:z(g(u).e("suggestion-panel")),"view-class":g(u).e("suggestion-list"),onKeydown:Mt},{default:de(()=>[re.value.length?(H(!0),le(Lt,{key:0},In(re.value,ye=>(H(),le("li",{key:ye.uid,class:z([g(u).e("suggestion-item"),g(u).is("checked",ye.checked)]),tabindex:-1,onClick:ft=>ut(ye)},[te("span",null,Ke(ye.text),1),ye.checked?(H(),Ye(g(Nt),{key:0},{default:de(()=>[oe(g(y$))]),_:1})):Ge("v-if",!0)],10,["onClick"]))),128)):He(ue.$slots,"empty",{key:1},()=>[te("li",{class:z(g(u).e("empty-text"))},Ke(g(f)("el.cascader.noMatch")),3)])]),_:3},8,["class","view-class"])),[[Yn,D.value]]):Ge("v-if",!0)]),_:3},8,["visible","teleported","popper-class","fallback-placements","placement","transition","persistent"]))}});var Sye=pt(Oye,[["__file","cascader.vue"]]);const yye=nn(Sye),$ye=ht({checked:Boolean,disabled:Boolean,type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"}}),Iye={"update:checked":e=>Io(e),[_o]:e=>Io(e)},Rye=Re({name:"ElCheckTag"}),Cye=Re({...Rye,props:$ye,emits:Iye,setup(e,{emit:t}){const n=e,s=rt("check-tag"),i=x(()=>n.disabled),r=x(()=>[s.b(),s.is("checked",n.checked),s.is("disabled",i.value),s.m(n.type||"primary")]),a=()=>{if(i.value)return;const c=!n.checked;t(_o,c),t("update:checked",c)};return(c,u)=>(H(),le("span",{class:z(g(r)),onClick:a},[He(c.$slots,"default")],2))}});var Mye=pt(Cye,[["__file","check-tag.vue"]]);const Aye=nn(Mye),Lye=ht({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:xe([Number,Object]),default:()=>os({})},sm:{type:xe([Number,Object]),default:()=>os({})},md:{type:xe([Number,Object]),default:()=>os({})},lg:{type:xe([Number,Object]),default:()=>os({})},xl:{type:xe([Number,Object]),default:()=>os({})}}),vY=Symbol("rowContextKey"),wye=Re({name:"ElCol"}),kye=Re({...wye,props:Lye,setup(e){const t=e,{gutter:n}=It(vY,{gutter:x(()=>0)}),s=rt("col"),i=x(()=>{const a={};return n.value&&(a.paddingLeft=a.paddingRight=`${n.value/2}px`),a}),r=x(()=>{const a=[];return["span","offset","pull","push"].forEach(h=>{const f=t[h];Wt(f)&&(h==="span"?a.push(s.b(`${t[h]}`)):f>0&&a.push(s.b(`${h}-${t[h]}`)))}),["xs","sm","md","lg","xl"].forEach(h=>{Wt(t[h])?a.push(s.b(`${h}-${t[h]}`)):Tn(t[h])&&Object.entries(t[h]).forEach(([f,p])=>{a.push(f!=="span"?s.b(`${h}-${f}-${p}`):s.b(`${h}-${p}`))})}),n.value&&a.push(s.is("guttered")),[s.b(),a]});return(a,c)=>(H(),Ye(yn(a.tag),{class:z(g(r)),style:Bt(g(i))},{default:de(()=>[He(a.$slots,"default")]),_:3},8,["class","style"]))}});var Nye=pt(kye,[["__file","col.vue"]]);const Pye=nn(Nye),qV=e=>Wt(e)||Dt(e)||at(e),Dye=ht({accordion:Boolean,modelValue:{type:xe([Array,String,Number]),default:()=>os([])}}),xye={[un]:qV,[_o]:qV},bY=Symbol("collapseContextKey"),Bye=(e,t)=>{const n=K(wr(e.modelValue)),s=r=>{n.value=r;const a=e.accordion?n.value[0]:n.value;t(un,a),t(_o,a)},i=r=>{if(e.accordion)s([n.value[0]===r?"":r]);else{const a=[...n.value],c=a.indexOf(r);c>-1?a.splice(c,1):a.push(r),s(a)}};return tt(()=>e.modelValue,()=>n.value=wr(e.modelValue),{deep:!0}),An(bY,{activeNames:n,handleItemClick:i}),{activeNames:n,setActiveNames:s}},Fye=()=>{const e=rt("collapse");return{rootKls:x(()=>e.b())}},Uye=Re({name:"ElCollapse"}),Hye=Re({...Uye,props:Dye,emits:xye,setup(e,{expose:t,emit:n}){const s=e,{activeNames:i,setActiveNames:r}=Bye(s,n),{rootKls:a}=Fye();return t({activeNames:i,setActiveNames:r}),(c,u)=>(H(),le("div",{class:z(g(a))},[He(c.$slots,"default")],2))}});var Vye=pt(Hye,[["__file","collapse.vue"]]);const Gye=Re({name:"ElCollapseTransition"}),Wye=Re({...Gye,setup(e){const t=rt("collapse-transition"),n=i=>{i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom},s={beforeEnter(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.style.height&&(i.dataset.elExistsHeight=i.style.height),i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0},enter(i){requestAnimationFrame(()=>{i.dataset.oldOverflow=i.style.overflow,i.dataset.elExistsHeight?i.style.maxHeight=i.dataset.elExistsHeight:i.scrollHeight!==0?i.style.maxHeight=`${i.scrollHeight}px`:i.style.maxHeight=0,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom,i.style.overflow="hidden"})},afterEnter(i){i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow},enterCancelled(i){n(i)},beforeLeave(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.dataset.oldOverflow=i.style.overflow,i.style.maxHeight=`${i.scrollHeight}px`,i.style.overflow="hidden"},leave(i){i.scrollHeight!==0&&(i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0)},afterLeave(i){n(i)},leaveCancelled(i){n(i)}};return(i,r)=>(H(),Ye(Li,$n({name:g(t).b()},Wq(s)),{default:de(()=>[He(i.$slots,"default")]),_:3},16,["name"]))}});var Xye=pt(Wye,[["__file","collapse-transition.vue"]]);const zA=nn(Xye),zye=ht({title:{type:String,default:""},name:{type:xe([String,Number]),default:void 0},icon:{type:To,default:rl},disabled:Boolean}),Yye=e=>{const t=It(bY),{namespace:n}=rt("collapse"),s=K(!1),i=K(!1),r=WD(),a=x(()=>r.current++),c=x(()=>{var _;return(_=e.name)!=null?_:`${n.value}-id-${r.prefix}-${g(a)}`}),u=x(()=>t==null?void 0:t.activeNames.value.includes(g(c)));return{focusing:s,id:a,isActive:u,handleFocus:()=>{setTimeout(()=>{i.value?i.value=!1:s.value=!0},50)},handleHeaderClick:()=>{e.disabled||(t==null||t.handleItemClick(g(c)),s.value=!1,i.value=!0)},handleEnterClick:()=>{t==null||t.handleItemClick(g(c))}}},Kye=(e,{focusing:t,isActive:n,id:s})=>{const i=rt("collapse"),r=x(()=>[i.b("item"),i.is("active",g(n)),i.is("disabled",e.disabled)]),a=x(()=>[i.be("item","header"),i.is("active",g(n)),{focusing:g(t)&&!e.disabled}]),c=x(()=>[i.be("item","arrow"),i.is("active",g(n))]),u=x(()=>i.be("item","wrap")),h=x(()=>i.be("item","content")),f=x(()=>i.b(`content-${g(s)}`)),p=x(()=>i.b(`head-${g(s)}`));return{arrowKls:c,headKls:a,rootKls:r,itemWrapperKls:u,itemContentKls:h,scopedContentId:f,scopedHeadId:p}},jye=Re({name:"ElCollapseItem"}),Qye=Re({...jye,props:zye,setup(e,{expose:t}){const n=e,{focusing:s,id:i,isActive:r,handleFocus:a,handleHeaderClick:c,handleEnterClick:u}=Yye(n),{arrowKls:h,headKls:f,rootKls:p,itemWrapperKls:_,itemContentKls:E,scopedContentId:v,scopedHeadId:b}=Kye(n,{focusing:s,isActive:r,id:i});return t({isActive:r}),(y,S)=>(H(),le("div",{class:z(g(p))},[te("button",{id:g(b),class:z(g(f)),"aria-expanded":g(r),"aria-controls":g(v),"aria-describedby":g(v),tabindex:y.disabled?-1:0,type:"button",onClick:g(c),onKeydown:So(Yt(g(u),["stop","prevent"]),["space","enter"]),onFocus:g(a),onBlur:L=>s.value=!1},[He(y.$slots,"title",{},()=>[Xt(Ke(y.title),1)]),He(y.$slots,"icon",{isActive:g(r)},()=>[oe(g(Nt),{class:z(g(h))},{default:de(()=>[(H(),Ye(yn(y.icon)))]),_:1},8,["class"])])],42,["id","aria-expanded","aria-controls","aria-describedby","tabindex","onClick","onKeydown","onFocus","onBlur"]),oe(g(zA),null,{default:de(()=>[an(te("div",{id:g(v),role:"region",class:z(g(_)),"aria-hidden":!g(r),"aria-labelledby":g(b)},[te("div",{class:z(g(E))},[He(y.$slots,"default")],2)],10,["id","aria-hidden","aria-labelledby"]),[[Yn,g(r)]])]),_:3})],2))}});var OY=pt(Qye,[["__file","collapse-item.vue"]]);const qye=nn(Vye,{CollapseItem:OY}),Jye=is(OY),Zye=ht({color:{type:xe(Object),required:!0},vertical:{type:Boolean,default:!1}});let xw=!1;function Vy(e,t){if(!Dn)return;const n=function(r){var a;(a=t.drag)==null||a.call(t,r)},s=function(r){var a;document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",s),document.removeEventListener("touchmove",n),document.removeEventListener("touchend",s),document.onselectstart=null,document.ondragstart=null,xw=!1,(a=t.end)==null||a.call(t,r)},i=function(r){var a;xw||(r.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",s),document.addEventListener("touchmove",n),document.addEventListener("touchend",s),xw=!0,(a=t.start)==null||a.call(t,r))};e.addEventListener("mousedown",i),e.addEventListener("touchstart",i,{passive:!1})}const e$e=(e,t)=>{if(!Dn||!e||!t)return!1;const n=e.getBoundingClientRect();let s;return t instanceof Element?s=t.getBoundingClientRect():s={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0},n.top<s.bottom&&n.bottom>s.top&&n.right>s.left&&n.left<s.right},JV=e=>{let t=0,n=e;for(;n;)t+=n.offsetTop,n=n.offsetParent;return t},ZN=(e,t)=>Math.abs(JV(e)-JV(t)),lx=e=>{let t,n;return e.type==="touchend"?(n=e.changedTouches[0].clientY,t=e.changedTouches[0].clientX):e.type.startsWith("touch")?(n=e.touches[0].clientY,t=e.touches[0].clientX):(n=e.clientY,t=e.clientX),{clientX:t,clientY:n}},t$e=e=>{const t=pn(),{t:n}=xn(),s=lo(),i=lo(),r=x(()=>e.color.get("alpha")),a=x(()=>n("el.colorpicker.alphaLabel"));function c(p){var _;p.target!==s.value&&u(p),(_=s.value)==null||_.focus()}function u(p){if(!i.value||!s.value)return;const E=t.vnode.el.getBoundingClientRect(),{clientX:v,clientY:b}=lx(p);if(e.vertical){let y=b-E.top;y=Math.max(s.value.offsetHeight/2,y),y=Math.min(y,E.height-s.value.offsetHeight/2),e.color.set("alpha",Math.round((y-s.value.offsetHeight/2)/(E.height-s.value.offsetHeight)*100))}else{let y=v-E.left;y=Math.max(s.value.offsetWidth/2,y),y=Math.min(y,E.width-s.value.offsetWidth/2),e.color.set("alpha",Math.round((y-s.value.offsetWidth/2)/(E.width-s.value.offsetWidth)*100))}}function h(p){const{code:_,shiftKey:E}=p,v=E?10:1;switch(_){case $t.left:case $t.down:p.preventDefault(),p.stopPropagation(),f(-v);break;case $t.right:case $t.up:p.preventDefault(),p.stopPropagation(),f(v);break}}function f(p){let _=r.value+p;_=_<0?0:_>100?100:_,e.color.set("alpha",_)}return{thumb:s,bar:i,alpha:r,alphaLabel:a,handleDrag:u,handleClick:c,handleKeydown:h}},n$e=(e,{bar:t,thumb:n,handleDrag:s})=>{const i=pn(),r=rt("color-alpha-slider"),a=K(0),c=K(0),u=K();function h(){if(!n.value||e.vertical)return 0;const L=i.vnode.el,I=e.color.get("alpha");return L?Math.round(I*(L.offsetWidth-n.value.offsetWidth/2)/100):0}function f(){if(!n.value)return 0;const L=i.vnode.el;if(!e.vertical)return 0;const I=e.color.get("alpha");return L?Math.round(I*(L.offsetHeight-n.value.offsetHeight/2)/100):0}function p(){if(e.color&&e.color.value){const{r:L,g:I,b:R}=e.color.toRgb();return`linear-gradient(to right, rgba(${L}, ${I}, ${R}, 0) 0%, rgba(${L}, ${I}, ${R}, 1) 100%)`}return""}function _(){a.value=h(),c.value=f(),u.value=p()}rn(()=>{if(!t.value||!n.value)return;const L={drag:I=>{s(I)},end:I=>{s(I)}};Vy(t.value,L),Vy(n.value,L),_()}),tt(()=>e.color.get("alpha"),()=>_()),tt(()=>e.color.value,()=>_());const E=x(()=>[r.b(),r.is("vertical",e.vertical)]),v=x(()=>r.e("bar")),b=x(()=>r.e("thumb")),y=x(()=>({background:u.value})),S=x(()=>({left:bs(a.value),top:bs(c.value)}));return{rootKls:E,barKls:v,barStyle:y,thumbKls:b,thumbStyle:S,update:_}},o$e="ElColorAlphaSlider",s$e=Re({name:o$e}),i$e=Re({...s$e,props:Zye,setup(e,{expose:t}){const n=e,{alpha:s,alphaLabel:i,bar:r,thumb:a,handleDrag:c,handleClick:u,handleKeydown:h}=t$e(n),{rootKls:f,barKls:p,barStyle:_,thumbKls:E,thumbStyle:v,update:b}=n$e(n,{bar:r,thumb:a,handleDrag:c});return t({update:b,bar:r,thumb:a}),(y,S)=>(H(),le("div",{class:z(g(f))},[te("div",{ref_key:"bar",ref:r,class:z(g(p)),style:Bt(g(_)),onClick:g(u)},null,14,["onClick"]),te("div",{ref_key:"thumb",ref:a,class:z(g(E)),style:Bt(g(v)),"aria-label":g(i),"aria-valuenow":g(s),"aria-orientation":y.vertical?"vertical":"horizontal","aria-valuemin":"0","aria-valuemax":"100",role:"slider",tabindex:"0",onKeydown:g(h)},null,46,["aria-label","aria-valuenow","aria-orientation","onKeydown"])],2))}});var r$e=pt(i$e,[["__file","alpha-slider.vue"]]);const l$e=Re({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(e){const t=rt("color-hue-slider"),n=pn(),s=K(),i=K(),r=K(0),a=K(0),c=x(()=>e.color.get("hue"));tt(()=>c.value,()=>{_()});function u(E){E.target!==s.value&&h(E)}function h(E){if(!i.value||!s.value)return;const b=n.vnode.el.getBoundingClientRect(),{clientX:y,clientY:S}=lx(E);let L;if(e.vertical){let I=S-b.top;I=Math.min(I,b.height-s.value.offsetHeight/2),I=Math.max(s.value.offsetHeight/2,I),L=Math.round((I-s.value.offsetHeight/2)/(b.height-s.value.offsetHeight)*360)}else{let I=y-b.left;I=Math.min(I,b.width-s.value.offsetWidth/2),I=Math.max(s.value.offsetWidth/2,I),L=Math.round((I-s.value.offsetWidth/2)/(b.width-s.value.offsetWidth)*360)}e.color.set("hue",L)}function f(){if(!s.value)return 0;const E=n.vnode.el;if(e.vertical)return 0;const v=e.color.get("hue");return E?Math.round(v*(E.offsetWidth-s.value.offsetWidth/2)/360):0}function p(){if(!s.value)return 0;const E=n.vnode.el;if(!e.vertical)return 0;const v=e.color.get("hue");return E?Math.round(v*(E.offsetHeight-s.value.offsetHeight/2)/360):0}function _(){r.value=f(),a.value=p()}return rn(()=>{if(!i.value||!s.value)return;const E={drag:v=>{h(v)},end:v=>{h(v)}};Vy(i.value,E),Vy(s.value,E),_()}),{bar:i,thumb:s,thumbLeft:r,thumbTop:a,hueValue:c,handleClick:u,update:_,ns:t}}});function a$e(e,t,n,s,i,r){return H(),le("div",{class:z([e.ns.b(),e.ns.is("vertical",e.vertical)])},[te("div",{ref:"bar",class:z(e.ns.e("bar")),onClick:e.handleClick},null,10,["onClick"]),te("div",{ref:"thumb",class:z(e.ns.e("thumb")),style:Bt({left:e.thumbLeft+"px",top:e.thumbTop+"px"})},null,6)],2)}var c$e=pt(l$e,[["render",a$e],["__file","hue-slider.vue"]]);const u$e=ht({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:Ys,popperClass:{type:String,default:""},tabindex:{type:[String,Number],default:0},teleported:Si.teleported,predefine:{type:xe(Array)},validateEvent:{type:Boolean,default:!0},...Xi(["ariaLabel"])}),d$e={[un]:e=>Dt(e)||hi(e),[_o]:e=>Dt(e)||hi(e),activeChange:e=>Dt(e)||hi(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},SY=Symbol("colorPickerContextKey"),ZV=function(e,t,n){return[e,t*n/((e=(2-t)*n)<1?e:2-e)||0,e/2]},h$e=function(e){return Dt(e)&&e.includes(".")&&Number.parseFloat(e)===1},f$e=function(e){return Dt(e)&&e.includes("%")},EE=function(e,t){h$e(e)&&(e="100%");const n=f$e(e);return e=Math.min(t,Math.max(0,Number.parseFloat(`${e}`))),n&&(e=Number.parseInt(`${e*t}`,10)/100),Math.abs(e-t)<1e-6?1:e%t/Number.parseFloat(t)},eG={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},gC=e=>{e=Math.min(Math.round(e),255);const t=Math.floor(e/16),n=e%16;return`${eG[t]||t}${eG[n]||n}`},tG=function({r:e,g:t,b:n}){return Number.isNaN(+e)||Number.isNaN(+t)||Number.isNaN(+n)?"":`#${gC(e)}${gC(t)}${gC(n)}`},Bw={A:10,B:11,C:12,D:13,E:14,F:15},Zg=function(e){return e.length===2?(Bw[e[0].toUpperCase()]||+e[0])*16+(Bw[e[1].toUpperCase()]||+e[1]):Bw[e[1].toUpperCase()]||+e[1]},p$e=function(e,t,n){t=t/100,n=n/100;let s=t;const i=Math.max(n,.01);n*=2,t*=n<=1?n:2-n,s*=i<=1?i:2-i;const r=(n+t)/2,a=n===0?2*s/(i+s):2*t/(n+t);return{h:e,s:a*100,v:r*100}},nG=(e,t,n)=>{e=EE(e,255),t=EE(t,255),n=EE(n,255);const s=Math.max(e,t,n),i=Math.min(e,t,n);let r;const a=s,c=s-i,u=s===0?0:c/s;if(s===i)r=0;else{switch(s){case e:{r=(t-n)/c+(t<n?6:0);break}case t:{r=(n-e)/c+2;break}case n:{r=(e-t)/c+4;break}}r/=6}return{h:r*360,s:u*100,v:a*100}},vS=function(e,t,n){e=EE(e,360)*6,t=EE(t,100),n=EE(n,100);const s=Math.floor(e),i=e-s,r=n*(1-t),a=n*(1-i*t),c=n*(1-(1-i)*t),u=s%6,h=[n,a,r,r,c,n][u],f=[c,n,n,a,r,r][u],p=[r,r,c,n,n,a][u];return{r:Math.round(h*255),g:Math.round(f*255),b:Math.round(p*255)}};class JS{constructor(t={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const n in t)zn(t,n)&&(this[n]=t[n]);t.value?this.fromString(t.value):this.doOnChange()}set(t,n){if(arguments.length===1&&typeof t=="object"){for(const s in t)zn(t,s)&&this.set(s,t[s]);return}this[`_${t}`]=n,this.doOnChange()}get(t){return t==="alpha"?Math.floor(this[`_${t}`]):this[`_${t}`]}toRgb(){return vS(this._hue,this._saturation,this._value)}fromString(t){if(!t){this._hue=0,this._saturation=100,this._value=100,this.doOnChange();return}const n=(s,i,r)=>{this._hue=Math.max(0,Math.min(360,s)),this._saturation=Math.max(0,Math.min(100,i)),this._value=Math.max(0,Math.min(100,r)),this.doOnChange()};if(t.includes("hsl")){const s=t.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,r)=>r>2?Number.parseFloat(i):Number.parseInt(i,10));if(s.length===4?this._alpha=Number.parseFloat(s[3])*100:s.length===3&&(this._alpha=100),s.length>=3){const{h:i,s:r,v:a}=p$e(s[0],s[1],s[2]);n(i,r,a)}}else if(t.includes("hsv")){const s=t.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,r)=>r>2?Number.parseFloat(i):Number.parseInt(i,10));s.length===4?this._alpha=Number.parseFloat(s[3])*100:s.length===3&&(this._alpha=100),s.length>=3&&n(s[0],s[1],s[2])}else if(t.includes("rgb")){const s=t.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,r)=>r>2?Number.parseFloat(i):Number.parseInt(i,10));if(s.length===4?this._alpha=Number.parseFloat(s[3])*100:s.length===3&&(this._alpha=100),s.length>=3){const{h:i,s:r,v:a}=nG(s[0],s[1],s[2]);n(i,r,a)}}else if(t.includes("#")){const s=t.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(s))return;let i,r,a;s.length===3?(i=Zg(s[0]+s[0]),r=Zg(s[1]+s[1]),a=Zg(s[2]+s[2])):(s.length===6||s.length===8)&&(i=Zg(s.slice(0,2)),r=Zg(s.slice(2,4)),a=Zg(s.slice(4,6))),s.length===8?this._alpha=Zg(s.slice(6))/255*100:(s.length===3||s.length===6)&&(this._alpha=100);const{h:c,s:u,v:h}=nG(i,r,a);n(c,u,h)}}compare(t){return Math.abs(t._hue-this._hue)<2&&Math.abs(t._saturation-this._saturation)<1&&Math.abs(t._value-this._value)<1&&Math.abs(t._alpha-this._alpha)<1}doOnChange(){const{_hue:t,_saturation:n,_value:s,_alpha:i,format:r}=this;if(this.enableAlpha)switch(r){case"hsl":{const a=ZV(t,n/100,s/100);this.value=`hsla(${t}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${t}, ${Math.round(n)}%, ${Math.round(s)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${tG(vS(t,n,s))}${gC(i*255/100)}`;break}default:{const{r:a,g:c,b:u}=vS(t,n,s);this.value=`rgba(${a}, ${c}, ${u}, ${this.get("alpha")/100})`}}else switch(r){case"hsl":{const a=ZV(t,n/100,s/100);this.value=`hsl(${t}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${t}, ${Math.round(n)}%, ${Math.round(s)}%)`;break}case"rgb":{const{r:a,g:c,b:u}=vS(t,n,s);this.value=`rgb(${a}, ${c}, ${u})`;break}default:this.value=tG(vS(t,n,s))}}}const g$e=Re({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0},enableAlpha:{type:Boolean,required:!0}},setup(e){const t=rt("color-predefine"),{currentColor:n}=It(SY),s=K(r(e.colors,e.color));tt(()=>n.value,a=>{const c=new JS;c.fromString(a),s.value.forEach(u=>{u.selected=c.compare(u)})}),Zs(()=>{s.value=r(e.colors,e.color)});function i(a){e.color.fromString(e.colors[a])}function r(a,c){return a.map(u=>{const h=new JS;return h.enableAlpha=e.enableAlpha,h.format="rgba",h.fromString(u),h.selected=h.value===c.value,h})}return{rgbaColors:s,handleSelect:i,ns:t}}});function m$e(e,t,n,s,i,r){return H(),le("div",{class:z(e.ns.b())},[te("div",{class:z(e.ns.e("colors"))},[(H(!0),le(Lt,null,In(e.rgbaColors,(a,c)=>(H(),le("div",{key:e.colors[c],class:z([e.ns.e("color-selector"),e.ns.is("alpha",a._alpha<100),{selected:a.selected}]),onClick:u=>e.handleSelect(c)},[te("div",{style:Bt({backgroundColor:a.value})},null,4)],10,["onClick"]))),128))],2)],2)}var _$e=pt(g$e,[["render",m$e],["__file","predefine.vue"]]);const T$e=Re({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(e){const t=rt("color-svpanel"),n=pn(),s=K(0),i=K(0),r=K("hsl(0, 100%, 50%)"),a=x(()=>{const h=e.color.get("hue"),f=e.color.get("value");return{hue:h,value:f}});function c(){const h=e.color.get("saturation"),f=e.color.get("value"),p=n.vnode.el,{clientWidth:_,clientHeight:E}=p;i.value=h*_/100,s.value=(100-f)*E/100,r.value=`hsl(${e.color.get("hue")}, 100%, 50%)`}function u(h){const p=n.vnode.el.getBoundingClientRect(),{clientX:_,clientY:E}=lx(h);let v=_-p.left,b=E-p.top;v=Math.max(0,v),v=Math.min(v,p.width),b=Math.max(0,b),b=Math.min(b,p.height),i.value=v,s.value=b,e.color.set({saturation:v/p.width*100,value:100-b/p.height*100})}return tt(()=>a.value,()=>{c()}),rn(()=>{Vy(n.vnode.el,{drag:h=>{u(h)},end:h=>{u(h)}}),c()}),{cursorTop:s,cursorLeft:i,background:r,colorValue:a,handleDrag:u,update:c,ns:t}}});function E$e(e,t,n,s,i,r){return H(),le("div",{class:z(e.ns.b()),style:Bt({backgroundColor:e.background})},[te("div",{class:z(e.ns.e("white"))},null,2),te("div",{class:z(e.ns.e("black"))},null,2),te("div",{class:z(e.ns.e("cursor")),style:Bt({top:e.cursorTop+"px",left:e.cursorLeft+"px"})},[te("div")],6)],6)}var v$e=pt(T$e,[["render",E$e],["__file","sv-panel.vue"]]);const b$e=Re({name:"ElColorPicker"}),O$e=Re({...b$e,props:u$e,emits:d$e,setup(e,{expose:t,emit:n}){const s=e,{t:i}=xn(),r=rt("color"),{formItem:a}=lr(),c=Fs(),u=ar(),{inputId:h,isLabeledByFormItem:f}=fc(s,{formItemContext:a}),p=K(),_=K(),E=K(),v=K(),b=K(),y=K(),{isFocused:S,handleFocus:L,handleBlur:I}=Pp(b,{beforeFocus(){return u.value},beforeBlur(Be){var ot;return(ot=v.value)==null?void 0:ot.isFocusInsideContent(Be)},afterBlur(){J(!1),Q()}});let R=!0;const w=Kn(new JS({enableAlpha:s.showAlpha,format:s.colorFormat||"",value:s.modelValue})),k=K(!1),D=K(!1),P=K(""),B=x(()=>!s.modelValue&&!D.value?"transparent":_e(w,s.showAlpha)),F=x(()=>!s.modelValue&&!D.value?"":w.value),X=x(()=>f.value?void 0:s.ariaLabel||i("el.colorpicker.defaultLabel")),G=x(()=>f.value?a==null?void 0:a.labelId:void 0),re=x(()=>[r.b("picker"),r.is("disabled",u.value),r.bm("picker",c.value),r.is("focused",S.value)]);function _e(Be,ot){if(!(Be instanceof JS))throw new TypeError("color should be instance of _color Class");const{r:Xe,g:ee,b:pe}=Be.toRgb();return ot?`rgba(${Xe}, ${ee}, ${pe}, ${Be.get("alpha")/100})`:`rgb(${Xe}, ${ee}, ${pe})`}function J(Be){k.value=Be}const Y=Vl(J,100,{leading:!0});function ae(){u.value||J(!0)}function Z(){Y(!1),Q()}function Q(){Vt(()=>{s.modelValue?w.fromString(s.modelValue):(w.value="",Vt(()=>{D.value=!1}))})}function he(){u.value||Y(!k.value)}function ge(){w.fromString(P.value)}function Ie(){const Be=w.value;n(un,Be),n("change",Be),s.validateEvent&&(a==null||a.validate("change").catch(ot=>void 0)),Y(!1),Vt(()=>{const ot=new JS({enableAlpha:s.showAlpha,format:s.colorFormat||"",value:s.modelValue});w.compare(ot)||Q()})}function be(){Y(!1),n(un,null),n("change",null),s.modelValue!==null&&s.validateEvent&&(a==null||a.validate("change").catch(Be=>void 0)),Q()}function Ae(){k.value&&(Z(),S.value&&ve())}function We(Be){Be.preventDefault(),Be.stopPropagation(),J(!1),Q()}function $e(Be){switch(Be.code){case $t.enter:case $t.numpadEnter:case $t.space:Be.preventDefault(),Be.stopPropagation(),ae(),y.value.focus();break;case $t.esc:We(Be);break}}function ve(){b.value.focus()}function Pe(){b.value.blur()}return rn(()=>{s.modelValue&&(P.value=F.value)}),tt(()=>s.modelValue,Be=>{Be?Be&&Be!==w.value&&(R=!1,w.fromString(Be)):D.value=!1}),tt(()=>[s.colorFormat,s.showAlpha],()=>{w.enableAlpha=s.showAlpha,w.format=s.colorFormat||w.format,w.doOnChange(),n(un,w.value)}),tt(()=>F.value,Be=>{P.value=Be,R&&n("activeChange",Be),R=!0}),tt(()=>w.value,()=>{!s.modelValue&&!D.value&&(D.value=!0)}),tt(()=>k.value,()=>{Vt(()=>{var Be,ot,Xe;(Be=p.value)==null||Be.update(),(ot=_.value)==null||ot.update(),(Xe=E.value)==null||Xe.update()})}),An(SY,{currentColor:F}),t({color:w,show:ae,hide:Z,focus:ve,blur:Pe}),(Be,ot)=>(H(),Ye(g(rr),{ref_key:"popper",ref:v,visible:k.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[g(r).be("picker","panel"),g(r).b("dropdown"),Be.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",teleported:Be.teleported,transition:`${g(r).namespace.value}-zoom-in-top`,persistent:"",onHide:Xe=>J(!1)},{content:de(()=>[an((H(),le("div",{onKeydown:So(We,["esc"])},[te("div",{class:z(g(r).be("dropdown","main-wrapper"))},[oe(c$e,{ref_key:"hue",ref:p,class:"hue-slider",color:g(w),vertical:""},null,8,["color"]),oe(v$e,{ref_key:"sv",ref:_,color:g(w)},null,8,["color"])],2),Be.showAlpha?(H(),Ye(r$e,{key:0,ref_key:"alpha",ref:E,color:g(w)},null,8,["color"])):Ge("v-if",!0),Be.predefine?(H(),Ye(_$e,{key:1,ref:"predefine","enable-alpha":Be.showAlpha,color:g(w),colors:Be.predefine},null,8,["enable-alpha","color","colors"])):Ge("v-if",!0),te("div",{class:z(g(r).be("dropdown","btns"))},[te("span",{class:z(g(r).be("dropdown","value"))},[oe(g(Nr),{ref_key:"inputRef",ref:y,modelValue:P.value,"onUpdate:modelValue":Xe=>P.value=Xe,"validate-event":!1,size:"small",onKeyup:So(ge,["enter"]),onBlur:ge},null,8,["modelValue","onUpdate:modelValue","onKeyup"])],2),oe(g(Mi),{class:z(g(r).be("dropdown","link-btn")),text:"",size:"small",onClick:be},{default:de(()=>[Xt(Ke(g(i)("el.colorpicker.clear")),1)]),_:1},8,["class"]),oe(g(Mi),{plain:"",size:"small",class:z(g(r).be("dropdown","btn")),onClick:Ie},{default:de(()=>[Xt(Ke(g(i)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,["onKeydown"])),[[g($h),Ae]])]),default:de(()=>[te("div",$n({id:g(h),ref_key:"triggerRef",ref:b},Be.$attrs,{class:g(re),role:"button","aria-label":g(X),"aria-labelledby":g(G),"aria-description":g(i)("el.colorpicker.description",{color:Be.modelValue||""}),"aria-disabled":g(u),tabindex:g(u)?-1:Be.tabindex,onKeydown:$e,onFocus:g(L),onBlur:g(I)}),[g(u)?(H(),le("div",{key:0,class:z(g(r).be("picker","mask"))},null,2)):Ge("v-if",!0),te("div",{class:z(g(r).be("picker","trigger")),onClick:he},[te("span",{class:z([g(r).be("picker","color"),g(r).is("alpha",Be.showAlpha)])},[te("span",{class:z(g(r).be("picker","color-inner")),style:Bt({backgroundColor:g(B)})},[an(oe(g(Nt),{class:z([g(r).be("picker","icon"),g(r).is("icon-arrow-down")])},{default:de(()=>[oe(g(kh))]),_:1},8,["class"]),[[Yn,Be.modelValue||D.value]]),an(oe(g(Nt),{class:z([g(r).be("picker","empty"),g(r).is("icon-close")])},{default:de(()=>[oe(g(zc))]),_:1},8,["class"]),[[Yn,!Be.modelValue&&!D.value]])],6)],2)],2)],16,["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex","onFocus","onBlur"])]),_:1},8,["visible","popper-class","teleported","transition","onHide"]))}});var S$e=pt(O$e,[["__file","color-picker.vue"]]);const y$e=nn(S$e),$$e=ht({a11y:{type:Boolean,default:!0},locale:{type:xe(Object)},size:Ys,button:{type:xe(Object)},experimentalFeatures:{type:xe(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:xe(Object)},zIndex:Number,namespace:{type:String,default:"el"},...gv}),Nc={},I$e=Re({name:"ElConfigProvider",props:$$e,setup(e,{slots:t}){tt(()=>e.message,s=>{Object.assign(Nc,s??{})},{immediate:!0,deep:!0});const n=ND(e);return()=>He(t,"default",{config:n==null?void 0:n.value})}}),R$e=nn(I$e),C$e=Re({name:"ElContainer"}),M$e=Re({...C$e,props:{direction:{type:String}},setup(e){const t=e,n=Ks(),s=rt("container"),i=x(()=>t.direction==="vertical"?!0:t.direction==="horizontal"?!1:n&&n.default?n.default().some(a=>{const c=a.type.name;return c==="ElHeader"||c==="ElFooter"}):!1);return(r,a)=>(H(),le("section",{class:z([g(s).b(),g(s).is("vertical",g(i))])},[He(r.$slots,"default")],2))}});var A$e=pt(M$e,[["__file","container.vue"]]);const L$e=Re({name:"ElAside"}),w$e=Re({...L$e,props:{width:{type:String,default:null}},setup(e){const t=e,n=rt("aside"),s=x(()=>t.width?n.cssVarBlock({width:t.width}):{});return(i,r)=>(H(),le("aside",{class:z(g(n).b()),style:Bt(g(s))},[He(i.$slots,"default")],6))}});var yY=pt(w$e,[["__file","aside.vue"]]);const k$e=Re({name:"ElFooter"}),N$e=Re({...k$e,props:{height:{type:String,default:null}},setup(e){const t=e,n=rt("footer"),s=x(()=>t.height?n.cssVarBlock({height:t.height}):{});return(i,r)=>(H(),le("footer",{class:z(g(n).b()),style:Bt(g(s))},[He(i.$slots,"default")],6))}});var $Y=pt(N$e,[["__file","footer.vue"]]);const P$e=Re({name:"ElHeader"}),D$e=Re({...P$e,props:{height:{type:String,default:null}},setup(e){const t=e,n=rt("header"),s=x(()=>t.height?n.cssVarBlock({height:t.height}):{});return(i,r)=>(H(),le("header",{class:z(g(n).b()),style:Bt(g(s))},[He(i.$slots,"default")],6))}});var IY=pt(D$e,[["__file","header.vue"]]);const x$e=Re({name:"ElMain"}),B$e=Re({...x$e,setup(e){const t=rt("main");return(n,s)=>(H(),le("main",{class:z(g(t).b())},[He(n.$slots,"default")],2))}});var RY=pt(B$e,[["__file","main.vue"]]);const F$e=nn(A$e,{Aside:yY,Footer:$Y,Header:IY,Main:RY}),U$e=is(yY),H$e=is($Y),V$e=is(IY),G$e=is(RY);var mC={exports:{}},W$e=mC.exports,oG;function X$e(){return oG||(oG=1,function(e,t){(function(n,s){e.exports=s()})(W$e,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},s=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,r=/\d\d/,a=/\d\d?/,c=/\d*[^-_:/,()\s\d]+/,u={},h=function(y){return(y=+y)+(y>68?1900:2e3)},f=function(y){return function(S){this[y]=+S}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(S){if(!S||S==="Z")return 0;var L=S.match(/([+-]|\d\d)/g),I=60*L[1]+(+L[2]||0);return I===0?0:L[0]==="+"?-I:I}(y)}],_=function(y){var S=u[y];return S&&(S.indexOf?S:S.s.concat(S.f))},E=function(y,S){var L,I=u.meridiem;if(I){for(var R=1;R<=24;R+=1)if(y.indexOf(I(R,0,S))>-1){L=R>12;break}}else L=y===(S?"pm":"PM");return L},v={A:[c,function(y){this.afternoon=E(y,!1)}],a:[c,function(y){this.afternoon=E(y,!0)}],Q:[i,function(y){this.month=3*(y-1)+1}],S:[i,function(y){this.milliseconds=100*+y}],SS:[r,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[a,f("seconds")],ss:[a,f("seconds")],m:[a,f("minutes")],mm:[a,f("minutes")],H:[a,f("hours")],h:[a,f("hours")],HH:[a,f("hours")],hh:[a,f("hours")],D:[a,f("day")],DD:[r,f("day")],Do:[c,function(y){var S=u.ordinal,L=y.match(/\d+/);if(this.day=L[0],S)for(var I=1;I<=31;I+=1)S(I).replace(/\[|\]/g,"")===y&&(this.day=I)}],w:[a,f("week")],ww:[r,f("week")],M:[a,f("month")],MM:[r,f("month")],MMM:[c,function(y){var S=_("months"),L=(_("monthsShort")||S.map(function(I){return I.slice(0,3)})).indexOf(y)+1;if(L<1)throw new Error;this.month=L%12||L}],MMMM:[c,function(y){var S=_("months").indexOf(y)+1;if(S<1)throw new Error;this.month=S%12||S}],Y:[/[+-]?\d+/,f("year")],YY:[r,function(y){this.year=h(y)}],YYYY:[/\d{4}/,f("year")],Z:p,ZZ:p};function b(y){var S,L;S=y,L=u&&u.formats;for(var I=(y=S.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(F,X,G){var re=G&&G.toUpperCase();return X||L[G]||n[G]||L[re].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(_e,J,Y){return J||Y.slice(1)})})).match(s),R=I.length,w=0;w<R;w+=1){var k=I[w],D=v[k],P=D&&D[0],B=D&&D[1];I[w]=B?{regex:P,parser:B}:k.replace(/^\[|\]$/g,"")}return function(F){for(var X={},G=0,re=0;G<R;G+=1){var _e=I[G];if(typeof _e=="string")re+=_e.length;else{var J=_e.regex,Y=_e.parser,ae=F.slice(re),Z=J.exec(ae)[0];Y.call(X,Z),F=F.replace(Z,"")}}return function(Q){var he=Q.afternoon;if(he!==void 0){var ge=Q.hours;he?ge<12&&(Q.hours+=12):ge===12&&(Q.hours=0),delete Q.afternoon}}(X),X}}return function(y,S,L){L.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(h=y.parseTwoDigitYear);var I=S.prototype,R=I.parse;I.parse=function(w){var k=w.date,D=w.utc,P=w.args;this.$u=D;var B=P[1];if(typeof B=="string"){var F=P[2]===!0,X=P[3]===!0,G=F||X,re=P[2];X&&(re=P[2]),u=this.$locale(),!F&&re&&(u=L.Ls[re]),this.$d=function(ae,Z,Q,he){try{if(["x","X"].indexOf(Z)>-1)return new Date((Z==="X"?1e3:1)*ae);var ge=b(Z)(ae),Ie=ge.year,be=ge.month,Ae=ge.day,We=ge.hours,$e=ge.minutes,ve=ge.seconds,Pe=ge.milliseconds,Be=ge.zone,ot=ge.week,Xe=new Date,ee=Ae||(Ie||be?1:Xe.getDate()),pe=Ie||Xe.getFullYear(),Oe=0;Ie&&!be||(Oe=be>0?be-1:Xe.getMonth());var ze,Ze=We||0,De=$e||0,me=ve||0,Te=Pe||0;return Be?new Date(Date.UTC(pe,Oe,ee,Ze,De,me,Te+60*Be.offset*1e3)):Q?new Date(Date.UTC(pe,Oe,ee,Ze,De,me,Te)):(ze=new Date(pe,Oe,ee,Ze,De,me,Te),ot&&(ze=he(ze).week(ot).toDate()),ze)}catch{return new Date("")}}(k,B,D,L),this.init(),re&&re!==!0&&(this.$L=this.locale(re).$L),G&&k!=this.format(B)&&(this.$d=new Date("")),u={}}else if(B instanceof Array)for(var _e=B.length,J=1;J<=_e;J+=1){P[1]=B[J-1];var Y=L.apply(this,P);if(Y.isValid()){this.$d=Y.$d,this.$L=Y.$L,this.init();break}J===_e&&(this.$d=new Date(""))}else R.call(this,w)}}})}(mC)),mC.exports}var z$e=X$e();const ax=Qc(z$e);var _C={exports:{}},Y$e=_C.exports,sG;function K$e(){return sG||(sG=1,function(e,t){(function(n,s){e.exports=s()})(Y$e,function(){return function(n,s){var i=s.prototype,r=i.format;i.format=function(a){var c=this,u=this.$locale();if(!this.isValid())return r.bind(this)(a);var h=this.$utils(),f=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(p){switch(p){case"Q":return Math.ceil((c.$M+1)/3);case"Do":return u.ordinal(c.$D);case"gggg":return c.weekYear();case"GGGG":return c.isoWeekYear();case"wo":return u.ordinal(c.week(),"W");case"w":case"ww":return h.s(c.week(),p==="w"?1:2,"0");case"W":case"WW":return h.s(c.isoWeek(),p==="W"?1:2,"0");case"k":case"kk":return h.s(String(c.$H===0?24:c.$H),p==="k"?1:2,"0");case"X":return Math.floor(c.$d.getTime()/1e3);case"x":return c.$d.getTime();case"z":return"["+c.offsetName()+"]";case"zzz":return"["+c.offsetName("long")+"]";default:return p}});return r.bind(this)(f)}}})}(_C)),_C.exports}var j$e=K$e();const Q$e=Qc(j$e);var TC={exports:{}},q$e=TC.exports,iG;function J$e(){return iG||(iG=1,function(e,t){(function(n,s){e.exports=s()})(q$e,function(){var n="week",s="year";return function(i,r,a){var c=r.prototype;c.week=function(u){if(u===void 0&&(u=null),u!==null)return this.add(7*(u-this.week()),"day");var h=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var f=a(this).startOf(s).add(1,s).date(h),p=a(this).endOf(n);if(f.isBefore(p))return 1}var _=a(this).startOf(s).date(h).startOf(n).subtract(1,"millisecond"),E=this.diff(_,n,!0);return E<0?a(this).startOf("week").week():Math.ceil(E)},c.weeks=function(u){return u===void 0&&(u=null),this.week(u)}}})}(TC)),TC.exports}var Z$e=J$e();const eIe=Qc(Z$e);var EC={exports:{}},tIe=EC.exports,rG;function nIe(){return rG||(rG=1,function(e,t){(function(n,s){e.exports=s()})(tIe,function(){return function(n,s){s.prototype.weekYear=function(){var i=this.month(),r=this.week(),a=this.year();return r===1&&i===11?a+1:i===0&&r>=52?a-1:a}}})}(EC)),EC.exports}var oIe=nIe();const sIe=Qc(oIe);var vC={exports:{}},iIe=vC.exports,lG;function rIe(){return lG||(lG=1,function(e,t){(function(n,s){e.exports=s()})(iIe,function(){return function(n,s,i){s.prototype.dayOfYear=function(r){var a=Math.round((i(this).startOf("day")-i(this).startOf("year"))/864e5)+1;return r==null?a:this.add(r-a,"day")}}})}(vC)),vC.exports}var lIe=rIe();const aIe=Qc(lIe);var bC={exports:{}},cIe=bC.exports,aG;function uIe(){return aG||(aG=1,function(e,t){(function(n,s){e.exports=s()})(cIe,function(){return function(n,s){s.prototype.isSameOrAfter=function(i,r){return this.isSame(i,r)||this.isAfter(i,r)}}})}(bC)),bC.exports}var dIe=uIe();const hIe=Qc(dIe);var OC={exports:{}},fIe=OC.exports,cG;function pIe(){return cG||(cG=1,function(e,t){(function(n,s){e.exports=s()})(fIe,function(){return function(n,s){s.prototype.isSameOrBefore=function(i,r){return this.isSame(i,r)||this.isBefore(i,r)}}})}(OC)),OC.exports}var gIe=pIe();const mIe=Qc(gIe),uG=["hours","minutes","seconds"],e1="HH:mm:ss",qT="YYYY-MM-DD",_Ie={date:qT,dates:qT,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${qT} ${e1}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:qT,datetimerange:`${qT} ${e1}`},CY=ht({disabledHours:{type:xe(Function)},disabledMinutes:{type:xe(Function)},disabledSeconds:{type:xe(Function)}}),MY=ht({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),cx=ht({id:{type:xe([Array,String])},name:{type:xe([Array,String])},popperClass:{type:String,default:""},format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:xe([String,Object]),default:Nh},editable:{type:Boolean,default:!0},prefixIcon:{type:xe([String,Object]),default:""},size:Ys,readonly:Boolean,disabled:Boolean,placeholder:{type:String,default:""},popperOptions:{type:xe(Object),default:()=>({})},modelValue:{type:xe([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:xe([Date,Array])},defaultTime:{type:xe([Date,Array])},isRange:Boolean,...CY,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:xe([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:xe(String),values:Ph,default:"bottom"},fallbackPlacements:{type:xe(Array),default:["bottom","top","right","left"]},...gv,...Xi(["ariaLabel"]),showNow:{type:Boolean,default:!0}}),TIe=ht({id:{type:xe(Array)},name:{type:xe(Array)},modelValue:{type:xe([Array,String])},startPlaceholder:String,endPlaceholder:String}),EIe=Re({name:"PickerRangeTrigger",inheritAttrs:!1}),vIe=Re({...EIe,props:TIe,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(e,{expose:t,emit:n}){const s=$$(),i=rt("date"),r=rt("range"),a=K(),c=K(),{wrapperRef:u,isFocused:h}=Pp(a),f=R=>{n("click",R)},p=R=>{n("mouseenter",R)},_=R=>{n("mouseleave",R)},E=R=>{n("mouseenter",R)},v=R=>{n("startInput",R)},b=R=>{n("endInput",R)},y=R=>{n("startChange",R)},S=R=>{n("endChange",R)};return t({focus:()=>{var R;(R=a.value)==null||R.focus()},blur:()=>{var R,w;(R=a.value)==null||R.blur(),(w=c.value)==null||w.blur()}}),(R,w)=>(H(),le("div",{ref_key:"wrapperRef",ref:u,class:z([g(i).is("active",g(h)),R.$attrs.class]),style:Bt(R.$attrs.style),onClick:f,onMouseenter:p,onMouseleave:_,onTouchstartPassive:E},[He(R.$slots,"prefix"),te("input",$n(g(s),{id:R.id&&R.id[0],ref_key:"inputRef",ref:a,name:R.name&&R.name[0],placeholder:R.startPlaceholder,value:R.modelValue&&R.modelValue[0],class:g(r).b("input"),onInput:v,onChange:y}),null,16,["id","name","placeholder","value"]),He(R.$slots,"range-separator"),te("input",$n(g(s),{id:R.id&&R.id[1],ref_key:"endInputRef",ref:c,name:R.name&&R.name[1],placeholder:R.endPlaceholder,value:R.modelValue&&R.modelValue[1],class:g(r).b("input"),onInput:b,onChange:S}),null,16,["id","name","placeholder","value"]),He(R.$slots,"suffix")],38))}});var bIe=pt(vIe,[["__file","picker-range-trigger.vue"]]);const OIe=Re({name:"Picker"}),SIe=Re({...OIe,props:cx,emits:["update:modelValue","change","focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(e,{expose:t,emit:n}){const s=e,i=Cp(),{lang:r}=xn(),a=rt("date"),c=rt("input"),u=rt("range"),{form:h,formItem:f}=lr(),p=It("ElPopperOptions",{}),{valueOnClear:_}=xA(s,null),E=K(),v=K(),b=K(!1),y=K(!1),S=K(null);let L=!1;const{isFocused:I,handleFocus:R,handleBlur:w}=Pp(v,{beforeFocus(){return s.readonly||Q.value},afterFocus(){b.value=!0},beforeBlur(ye){var ft;return!L&&((ft=E.value)==null?void 0:ft.isFocusInsideContent(ye))},afterBlur(){Ue(),b.value=!1,L=!1,s.validateEvent&&(f==null||f.validate("blur").catch(ye=>void 0))}}),k=x(()=>[a.b("editor"),a.bm("editor",s.type),c.e("wrapper"),a.is("disabled",Q.value),a.is("active",b.value),u.b("editor"),Ze?u.bm("editor",Ze.value):"",i.class]),D=x(()=>[c.e("icon"),u.e("close-icon"),Pe.value?"":u.e("close-icon--hidden")]);tt(b,ye=>{ye?Vt(()=>{ye&&(S.value=s.modelValue)}):(Te.value=null,Vt(()=>{P(s.modelValue)}))});const P=(ye,ft)=>{(ft||!HV(ye,S.value))&&(n("change",ye),s.validateEvent&&(f==null||f.validate("change").catch(Kt=>void 0)))},B=ye=>{if(!HV(s.modelValue,ye)){let ft;at(ye)?ft=ye.map(Kt=>GV(Kt,s.valueFormat,r.value)):ye&&(ft=GV(ye,s.valueFormat,r.value)),n("update:modelValue",ye&&ft,r.value)}},F=ye=>{n("keydown",ye)},X=x(()=>v.value?Array.from(v.value.$el.querySelectorAll("input")):[]),G=(ye,ft,Kt)=>{const En=X.value;En.length&&(!Kt||Kt==="min"?(En[0].setSelectionRange(ye,ft),En[0].focus()):Kt==="max"&&(En[1].setSelectionRange(ye,ft),En[1].focus()))},re=(ye="",ft=!1)=>{b.value=ft;let Kt;at(ye)?Kt=ye.map(En=>En.toDate()):Kt=ye&&ye.toDate(),Te.value=null,B(Kt)},_e=()=>{y.value=!0},J=()=>{n("visible-change",!0)},Y=()=>{y.value=!1,b.value=!1,n("visible-change",!1)},ae=()=>{b.value=!0},Z=()=>{b.value=!1},Q=x(()=>s.disabled||(h==null?void 0:h.disabled)),he=x(()=>{let ye;if(ot.value?ce.value.getDefaultValue&&(ye=ce.value.getDefaultValue()):at(s.modelValue)?ye=s.modelValue.map(ft=>VV(ft,s.valueFormat,r.value)):ye=VV(s.modelValue,s.valueFormat,r.value),ce.value.getRangeAvailableTime){const ft=ce.value.getRangeAvailableTime(ye);Hi(ft,ye)||(ye=ft,ot.value||B(ER(ye)))}return at(ye)&&ye.some(ft=>!ft)&&(ye=[]),ye}),ge=x(()=>{if(!ce.value.panelReady)return"";const ye=ct(he.value);return at(Te.value)?[Te.value[0]||ye&&ye[0]||"",Te.value[1]||ye&&ye[1]||""]:Te.value!==null?Te.value:!be.value&&ot.value||!b.value&&ot.value?"":ye?Ae.value||We.value||$e.value?ye.join(", "):ye:""}),Ie=x(()=>s.type.includes("time")),be=x(()=>s.type.startsWith("time")),Ae=x(()=>s.type==="dates"),We=x(()=>s.type==="months"),$e=x(()=>s.type==="years"),ve=x(()=>s.prefixIcon||(Ie.value?p6:M_e)),Pe=K(!1),Be=ye=>{s.readonly||Q.value||(Pe.value&&(ye.stopPropagation(),ce.value.handleClear?ce.value.handleClear():B(_.value),P(_.value,!0),Pe.value=!1,Y()),n("clear"))},ot=x(()=>{const{modelValue:ye}=s;return!ye||at(ye)&&!ye.filter(Boolean).length}),Xe=async ye=>{var ft;s.readonly||Q.value||(((ft=ye.target)==null?void 0:ft.tagName)!=="INPUT"||I.value)&&(b.value=!0)},ee=()=>{s.readonly||Q.value||!ot.value&&s.clearable&&(Pe.value=!0)},pe=()=>{Pe.value=!1},Oe=ye=>{var ft;s.readonly||Q.value||(((ft=ye.touches[0].target)==null?void 0:ft.tagName)!=="INPUT"||I.value)&&(b.value=!0)},ze=x(()=>s.type.includes("range")),Ze=Fs(),De=x(()=>{var ye,ft;return(ft=(ye=g(E))==null?void 0:ye.popperRef)==null?void 0:ft.contentRef}),me=kD(v,ye=>{const ft=g(De),Kt=ol(v);ft&&(ye.target===ft||ye.composedPath().includes(ft))||ye.target===Kt||Kt&&ye.composedPath().includes(Kt)||(b.value=!1)});vo(()=>{me==null||me()});const Te=K(null),Ue=()=>{if(Te.value){const ye=qe(ge.value);ye&&Ne(ye)&&(B(ER(ye)),Te.value=null)}Te.value===""&&(B(_.value),P(_.value),Te.value=null)},qe=ye=>ye?ce.value.parseUserInput(ye):null,ct=ye=>ye?ce.value.formatToString(ye):null,Ne=ye=>ce.value.isValidValue(ye),Se=async ye=>{if(s.readonly||Q.value)return;const{code:ft}=ye;if(F(ye),ft===$t.esc){b.value===!0&&(b.value=!1,ye.preventDefault(),ye.stopPropagation());return}if(ft===$t.down&&(ce.value.handleFocusPicker&&(ye.preventDefault(),ye.stopPropagation()),b.value===!1&&(b.value=!0,await Vt()),ce.value.handleFocusPicker)){ce.value.handleFocusPicker();return}if(ft===$t.tab){L=!0;return}if(ft===$t.enter||ft===$t.numpadEnter){(Te.value===null||Te.value===""||Ne(qe(ge.value)))&&(Ue(),b.value=!1),ye.stopPropagation();return}if(Te.value){ye.stopPropagation();return}ce.value.handleKeydownInput&&ce.value.handleKeydownInput(ye)},Je=ye=>{Te.value=ye,b.value||(b.value=!0)},ut=ye=>{const ft=ye.target;Te.value?Te.value=[ft.value,Te.value[1]]:Te.value=[ft.value,null]},Mt=ye=>{const ft=ye.target;Te.value?Te.value=[Te.value[0],ft.value]:Te.value=[null,ft.value]},mt=()=>{var ye;const ft=Te.value,Kt=qe(ft&&ft[0]),En=g(he);if(Kt&&Kt.isValid()){Te.value=[ct(Kt),((ye=ge.value)==null?void 0:ye[1])||null];const Rn=[Kt,En&&(En[1]||null)];Ne(Rn)&&(B(ER(Rn)),Te.value=null)}},qt=()=>{var ye;const ft=g(Te),Kt=qe(ft&&ft[1]),En=g(he);if(Kt&&Kt.isValid()){Te.value=[((ye=g(ge))==null?void 0:ye[0])||null,ct(Kt)];const Rn=[En&&En[0],Kt];Ne(Rn)&&(B(ER(Rn)),Te.value=null)}},ce=K({}),q=ye=>{ce.value[ye[0]]=ye[1],ce.value.panelReady=!0},ne=ye=>{n("calendar-change",ye)},Le=(ye,ft,Kt)=>{n("panel-change",ye,ft,Kt)},ue=()=>{var ye;(ye=v.value)==null||ye.focus()},Fe=()=>{var ye;(ye=v.value)==null||ye.blur()};return An("EP_PICKER_BASE",{props:s}),t({focus:ue,blur:Fe,handleOpen:ae,handleClose:Z,onPick:re}),(ye,ft)=>(H(),Ye(g(rr),$n({ref_key:"refPopper",ref:E,visible:b.value,effect:"light",pure:"",trigger:"click"},ye.$attrs,{role:"dialog",teleported:"",transition:`${g(a).namespace.value}-zoom-in-top`,"popper-class":[`${g(a).namespace.value}-picker__popper`,ye.popperClass],"popper-options":g(p),"fallback-placements":ye.fallbackPlacements,"gpu-acceleration":!1,placement:ye.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:_e,onShow:J,onHide:Y}),{default:de(()=>[g(ze)?(H(),Ye(bIe,{key:1,id:ye.id,ref_key:"inputRef",ref:v,"model-value":g(ge),name:ye.name,disabled:g(Q),readonly:!ye.editable||ye.readonly,"start-placeholder":ye.startPlaceholder,"end-placeholder":ye.endPlaceholder,class:z(g(k)),style:Bt(ye.$attrs.style),"aria-label":ye.ariaLabel,tabindex:ye.tabindex,autocomplete:"off",role:"combobox",onClick:Xe,onFocus:g(R),onBlur:g(w),onStartInput:ut,onStartChange:mt,onEndInput:Mt,onEndChange:qt,onMousedown:Xe,onMouseenter:ee,onMouseleave:pe,onTouchstartPassive:Oe,onKeydown:Se},{prefix:de(()=>[g(ve)?(H(),Ye(g(Nt),{key:0,class:z([g(c).e("icon"),g(u).e("icon")])},{default:de(()=>[(H(),Ye(yn(g(ve))))]),_:1},8,["class"])):Ge("v-if",!0)]),"range-separator":de(()=>[He(ye.$slots,"range-separator",{},()=>[te("span",{class:z(g(u).b("separator"))},Ke(ye.rangeSeparator),3)])]),suffix:de(()=>[ye.clearIcon?(H(),Ye(g(Nt),{key:0,class:z(g(D)),onMousedown:Yt(g(ro),["prevent"]),onClick:Be},{default:de(()=>[(H(),Ye(yn(ye.clearIcon)))]),_:1},8,["class","onMousedown"])):Ge("v-if",!0)]),_:3},8,["id","model-value","name","disabled","readonly","start-placeholder","end-placeholder","class","style","aria-label","tabindex","onFocus","onBlur"])):(H(),Ye(g(Nr),{key:0,id:ye.id,ref_key:"inputRef",ref:v,"container-role":"combobox","model-value":g(ge),name:ye.name,size:g(Ze),disabled:g(Q),placeholder:ye.placeholder,class:z([g(a).b("editor"),g(a).bm("editor",ye.type),ye.$attrs.class]),style:Bt(ye.$attrs.style),readonly:!ye.editable||ye.readonly||g(Ae)||g(We)||g($e)||ye.type==="week","aria-label":ye.ariaLabel,tabindex:ye.tabindex,"validate-event":!1,onInput:Je,onFocus:g(R),onBlur:g(w),onKeydown:Se,onChange:Ue,onMousedown:Xe,onMouseenter:ee,onMouseleave:pe,onTouchstartPassive:Oe,onClick:Yt(()=>{},["stop"])},{prefix:de(()=>[g(ve)?(H(),Ye(g(Nt),{key:0,class:z(g(c).e("icon")),onMousedown:Yt(Xe,["prevent"]),onTouchstartPassive:Oe},{default:de(()=>[(H(),Ye(yn(g(ve))))]),_:1},8,["class","onMousedown"])):Ge("v-if",!0)]),suffix:de(()=>[Pe.value&&ye.clearIcon?(H(),Ye(g(Nt),{key:0,class:z(`${g(c).e("icon")} clear-icon`),onMousedown:Yt(g(ro),["prevent"]),onClick:Be},{default:de(()=>[(H(),Ye(yn(ye.clearIcon)))]),_:1},8,["class","onMousedown"])):Ge("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onFocus","onBlur","onClick"]))]),content:de(()=>[He(ye.$slots,"default",{visible:b.value,actualVisible:y.value,parsedValue:g(he),format:ye.format,dateFormat:ye.dateFormat,timeFormat:ye.timeFormat,unlinkPanels:ye.unlinkPanels,type:ye.type,defaultValue:ye.defaultValue,showNow:ye.showNow,onPick:re,onSelectRange:G,onSetPickerOption:q,onCalendarChange:ne,onPanelChange:Le,onMousedown:Yt(()=>{},["stop"])})]),_:3},16,["visible","transition","popper-class","popper-options","fallback-placements","placement"]))}});var AY=pt(SIe,[["__file","picker.vue"]]);const yIe=ht({...MY,datetimeRole:String,parsedValue:{type:xe(Object)}}),LY=({getAvailableHours:e,getAvailableMinutes:t,getAvailableSeconds:n})=>{const s=(a,c,u,h)=>{const f={hour:e,minute:t,second:n};let p=a;return["hour","minute","second"].forEach(_=>{if(f[_]){let E;const v=f[_];switch(_){case"minute":{E=v(p.hour(),c,h);break}case"second":{E=v(p.hour(),p.minute(),c,h);break}default:{E=v(c,h);break}}if(E!=null&&E.length&&!E.includes(p[_]())){const b=u?0:E.length-1;p=p[_](E[b])}}}),p},i={};return{timePickerOptions:i,getAvailableTime:s,onSetOption:([a,c])=>{i[a]=c}}},Fw=e=>{const t=(s,i)=>s||i,n=s=>s!==!0;return e.map(t).filter(n)},wY=(e,t,n)=>({getHoursList:(a,c)=>Pw(24,e&&(()=>e==null?void 0:e(a,c))),getMinutesList:(a,c,u)=>Pw(60,t&&(()=>t==null?void 0:t(a,c,u))),getSecondsList:(a,c,u,h)=>Pw(60,n&&(()=>n==null?void 0:n(a,c,u,h)))}),kY=(e,t,n)=>{const{getHoursList:s,getMinutesList:i,getSecondsList:r}=wY(e,t,n);return{getAvailableHours:(h,f)=>Fw(s(h,f)),getAvailableMinutes:(h,f,p)=>Fw(i(h,f,p)),getAvailableSeconds:(h,f,p,_)=>Fw(r(h,f,p,_))}},NY=e=>{const t=K(e.parsedValue);return tt(()=>e.visible,n=>{n||(t.value=e.parsedValue)}),t},$Ie=ht({role:{type:String,required:!0},spinnerDate:{type:xe(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:xe(String),default:""},...CY}),IIe=100,RIe=600,IM={beforeMount(e,t){const n=t.value,{interval:s=IIe,delay:i=RIe}=Ut(n)?{}:n;let r,a;const c=()=>Ut(n)?n():n.handler(),u=()=>{a&&(clearTimeout(a),a=void 0),r&&(clearInterval(r),r=void 0)};e.addEventListener("mousedown",h=>{h.button===0&&(u(),c(),document.addEventListener("mouseup",()=>u(),{once:!0}),a=setTimeout(()=>{r=setInterval(()=>{c()},s)},i))})}},CIe=Re({__name:"basic-time-spinner",props:$Ie,emits:["change","select-range","set-option"],setup(e,{emit:t}){const n=e,s=It("EP_PICKER_BASE"),{isRange:i}=s.props,r=rt("time"),{getHoursList:a,getMinutesList:c,getSecondsList:u}=wY(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let h=!1;const f=K(),p=K(),_=K(),E=K(),v={hours:p,minutes:_,seconds:E},b=x(()=>n.showSeconds?uG:uG.slice(0,2)),y=x(()=>{const{spinnerDate:ge}=n,Ie=ge.hour(),be=ge.minute(),Ae=ge.second();return{hours:Ie,minutes:be,seconds:Ae}}),S=x(()=>{const{hours:ge,minutes:Ie}=g(y),{role:be,spinnerDate:Ae}=n,We=i?void 0:Ae;return{hours:a(be,We),minutes:c(ge,be,We),seconds:u(ge,Ie,be,We)}}),L=x(()=>{const{hours:ge,minutes:Ie,seconds:be}=g(y);return{hours:Nw(ge,23),minutes:Nw(Ie,59),seconds:Nw(be,59)}}),I=Vl(ge=>{h=!1,k(ge)},200),R=ge=>{if(!!!n.amPmMode)return"";const be=n.amPmMode==="A";let Ae=ge<12?" am":" pm";return be&&(Ae=Ae.toUpperCase()),Ae},w=ge=>{let Ie;switch(ge){case"hours":Ie=[0,2];break;case"minutes":Ie=[3,5];break;case"seconds":Ie=[6,8];break}const[be,Ae]=Ie;t("select-range",be,Ae),f.value=ge},k=ge=>{B(ge,g(y)[ge])},D=()=>{k("hours"),k("minutes"),k("seconds")},P=ge=>ge.querySelector(`.${r.namespace.value}-scrollbar__wrap`),B=(ge,Ie)=>{if(n.arrowControl)return;const be=g(v[ge]);be&&be.$el&&(P(be.$el).scrollTop=Math.max(0,Ie*F(ge)))},F=ge=>{const Ie=g(v[ge]),be=Ie==null?void 0:Ie.$el.querySelector("li");return be&&Number.parseFloat(hh(be,"height"))||0},X=()=>{re(1)},G=()=>{re(-1)},re=ge=>{f.value||w("hours");const Ie=f.value,be=g(y)[Ie],Ae=f.value==="hours"?24:60,We=_e(Ie,be,ge,Ae);J(Ie,We),B(Ie,We),Vt(()=>w(Ie))},_e=(ge,Ie,be,Ae)=>{let We=(Ie+be+Ae)%Ae;const $e=g(S)[ge];for(;$e[We]&&We!==Ie;)We=(We+be+Ae)%Ae;return We},J=(ge,Ie)=>{if(g(S)[ge][Ie])return;const{hours:We,minutes:$e,seconds:ve}=g(y);let Pe;switch(ge){case"hours":Pe=n.spinnerDate.hour(Ie).minute($e).second(ve);break;case"minutes":Pe=n.spinnerDate.hour(We).minute(Ie).second(ve);break;case"seconds":Pe=n.spinnerDate.hour(We).minute($e).second(Ie);break}t("change",Pe)},Y=(ge,{value:Ie,disabled:be})=>{be||(J(ge,Ie),w(ge),B(ge,Ie))},ae=ge=>{const Ie=g(v[ge]);if(!Ie)return;h=!0,I(ge);const be=Math.min(Math.round((P(Ie.$el).scrollTop-(Z(ge)*.5-10)/F(ge)+3)/F(ge)),ge==="hours"?23:59);J(ge,be)},Z=ge=>g(v[ge]).$el.offsetHeight,Q=()=>{const ge=Ie=>{const be=g(v[Ie]);be&&be.$el&&(P(be.$el).onscroll=()=>{ae(Ie)})};ge("hours"),ge("minutes"),ge("seconds")};rn(()=>{Vt(()=>{!n.arrowControl&&Q(),D(),n.role==="start"&&w("hours")})});const he=(ge,Ie)=>{v[Ie].value=ge??void 0};return t("set-option",[`${n.role}_scrollDown`,re]),t("set-option",[`${n.role}_emitSelectRange`,w]),tt(()=>n.spinnerDate,()=>{h||D()}),(ge,Ie)=>(H(),le("div",{class:z([g(r).b("spinner"),{"has-seconds":ge.showSeconds}])},[ge.arrowControl?Ge("v-if",!0):(H(!0),le(Lt,{key:0},In(g(b),be=>(H(),Ye(g(ld),{key:be,ref_for:!0,ref:Ae=>he(Ae,be),class:z(g(r).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":g(r).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:Ae=>w(be),onMousemove:Ae=>k(be)},{default:de(()=>[(H(!0),le(Lt,null,In(g(S)[be],(Ae,We)=>(H(),le("li",{key:We,class:z([g(r).be("spinner","item"),g(r).is("active",We===g(y)[be]),g(r).is("disabled",Ae)]),onClick:$e=>Y(be,{value:We,disabled:Ae})},[be==="hours"?(H(),le(Lt,{key:0},[Xt(Ke(("0"+(ge.amPmMode?We%12||12:We)).slice(-2))+Ke(R(We)),1)],64)):(H(),le(Lt,{key:1},[Xt(Ke(("0"+We).slice(-2)),1)],64))],10,["onClick"]))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),ge.arrowControl?(H(!0),le(Lt,{key:1},In(g(b),be=>(H(),le("div",{key:be,class:z([g(r).be("spinner","wrapper"),g(r).is("arrow")]),onMouseenter:Ae=>w(be)},[an((H(),Ye(g(Nt),{class:z(["arrow-up",g(r).be("spinner","arrow")])},{default:de(()=>[oe(g(xD))]),_:1},8,["class"])),[[g(IM),G]]),an((H(),Ye(g(Nt),{class:z(["arrow-down",g(r).be("spinner","arrow")])},{default:de(()=>[oe(g(kh))]),_:1},8,["class"])),[[g(IM),X]]),te("ul",{class:z(g(r).be("spinner","list"))},[(H(!0),le(Lt,null,In(g(L)[be],(Ae,We)=>(H(),le("li",{key:We,class:z([g(r).be("spinner","item"),g(r).is("active",Ae===g(y)[be]),g(r).is("disabled",g(S)[be][Ae])])},[g(Wt)(Ae)?(H(),le(Lt,{key:0},[be==="hours"?(H(),le(Lt,{key:0},[Xt(Ke(("0"+(ge.amPmMode?Ae%12||12:Ae)).slice(-2))+Ke(R(Ae)),1)],64)):(H(),le(Lt,{key:1},[Xt(Ke(("0"+Ae).slice(-2)),1)],64))],64)):Ge("v-if",!0)],2))),128))],2)],42,["onMouseenter"]))),128)):Ge("v-if",!0)],2))}});var t1=pt(CIe,[["__file","basic-time-spinner.vue"]]);const MIe=Re({__name:"panel-time-pick",props:yIe,emits:["pick","select-range","set-picker-option"],setup(e,{emit:t}){const n=e,s=It("EP_PICKER_BASE"),{arrowControl:i,disabledHours:r,disabledMinutes:a,disabledSeconds:c,defaultValue:u}=s.props,{getAvailableHours:h,getAvailableMinutes:f,getAvailableSeconds:p}=kY(r,a,c),_=rt("time"),{t:E,lang:v}=xn(),b=K([0,2]),y=NY(n),S=x(()=>ho(n.actualVisible)?`${_.namespace.value}-zoom-in-top`:""),L=x(()=>n.format.includes("ss")),I=x(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),R=Z=>{const Q=en(Z).locale(v.value),he=_e(Q);return Q.isSame(he)},w=()=>{t("pick",y.value,!1)},k=(Z=!1,Q=!1)=>{Q||t("pick",n.parsedValue,Z)},D=Z=>{if(!n.visible)return;const Q=_e(Z).millisecond(0);t("pick",Q,!0)},P=(Z,Q)=>{t("select-range",Z,Q),b.value=[Z,Q]},B=Z=>{const Q=[0,3].concat(L.value?[6]:[]),he=["hours","minutes"].concat(L.value?["seconds"]:[]),Ie=(Q.indexOf(b.value[0])+Z+Q.length)%Q.length;X.start_emitSelectRange(he[Ie])},F=Z=>{const Q=Z.code,{left:he,right:ge,up:Ie,down:be}=$t;if([he,ge].includes(Q)){B(Q===he?-1:1),Z.preventDefault();return}if([Ie,be].includes(Q)){const Ae=Q===Ie?-1:1;X.start_scrollDown(Ae),Z.preventDefault();return}},{timePickerOptions:X,onSetOption:G,getAvailableTime:re}=LY({getAvailableHours:h,getAvailableMinutes:f,getAvailableSeconds:p}),_e=Z=>re(Z,n.datetimeRole||"",!0),J=Z=>Z?en(Z,n.format).locale(v.value):null,Y=Z=>Z?Z.format(n.format):null,ae=()=>en(u).locale(v.value);return t("set-picker-option",["isValidValue",R]),t("set-picker-option",["formatToString",Y]),t("set-picker-option",["parseUserInput",J]),t("set-picker-option",["handleKeydownInput",F]),t("set-picker-option",["getRangeAvailableTime",_e]),t("set-picker-option",["getDefaultValue",ae]),(Z,Q)=>(H(),Ye(Li,{name:g(S)},{default:de(()=>[Z.actualVisible||Z.visible?(H(),le("div",{key:0,class:z(g(_).b("panel"))},[te("div",{class:z([g(_).be("panel","content"),{"has-seconds":g(L)}])},[oe(t1,{ref:"spinner",role:Z.datetimeRole||"start","arrow-control":g(i),"show-seconds":g(L),"am-pm-mode":g(I),"spinner-date":Z.parsedValue,"disabled-hours":g(r),"disabled-minutes":g(a),"disabled-seconds":g(c),onChange:D,onSetOption:g(G),onSelectRange:P},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),te("div",{class:z(g(_).be("panel","footer"))},[te("button",{type:"button",class:z([g(_).be("panel","btn"),"cancel"]),onClick:w},Ke(g(E)("el.datepicker.cancel")),3),te("button",{type:"button",class:z([g(_).be("panel","btn"),"confirm"]),onClick:he=>k()},Ke(g(E)("el.datepicker.confirm")),11,["onClick"])],2)],2)):Ge("v-if",!0)]),_:1},8,["name"]))}});var RM=pt(MIe,[["__file","panel-time-pick.vue"]]);const AIe=ht({...MY,parsedValue:{type:xe(Array)}}),LIe=Re({__name:"panel-time-range",props:AIe,emits:["pick","select-range","set-picker-option"],setup(e,{emit:t}){const n=e,s=(Xe,ee)=>{const pe=[];for(let Oe=Xe;Oe<=ee;Oe++)pe.push(Oe);return pe},{t:i,lang:r}=xn(),a=rt("time"),c=rt("picker"),u=It("EP_PICKER_BASE"),{arrowControl:h,disabledHours:f,disabledMinutes:p,disabledSeconds:_,defaultValue:E}=u.props,v=x(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",h),R.value?"has-seconds":""]),b=x(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",h),R.value?"has-seconds":""]),y=x(()=>n.parsedValue[0]),S=x(()=>n.parsedValue[1]),L=NY(n),I=()=>{t("pick",L.value,!1)},R=x(()=>n.format.includes("ss")),w=x(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),k=(Xe=!1)=>{t("pick",[y.value,S.value],Xe)},D=Xe=>{F(Xe.millisecond(0),S.value)},P=Xe=>{F(y.value,Xe.millisecond(0))},B=Xe=>{const ee=Xe.map(Oe=>en(Oe).locale(r.value)),pe=ge(ee);return ee[0].isSame(pe[0])&&ee[1].isSame(pe[1])},F=(Xe,ee)=>{n.visible&&t("pick",[Xe,ee],!0)},X=x(()=>y.value>S.value),G=K([0,2]),re=(Xe,ee)=>{t("select-range",Xe,ee,"min"),G.value=[Xe,ee]},_e=x(()=>R.value?11:8),J=(Xe,ee)=>{t("select-range",Xe,ee,"max");const pe=g(_e);G.value=[Xe+pe,ee+pe]},Y=Xe=>{const ee=R.value?[0,3,6,11,14,17]:[0,3,8,11],pe=["hours","minutes"].concat(R.value?["seconds"]:[]),ze=(ee.indexOf(G.value[0])+Xe+ee.length)%ee.length,Ze=ee.length/2;ze<Ze?We.start_emitSelectRange(pe[ze]):We.end_emitSelectRange(pe[ze-Ze])},ae=Xe=>{const ee=Xe.code,{left:pe,right:Oe,up:ze,down:Ze}=$t;if([pe,Oe].includes(ee)){Y(ee===pe?-1:1),Xe.preventDefault();return}if([ze,Ze].includes(ee)){const De=ee===ze?-1:1,me=G.value[0]<_e.value?"start":"end";We[`${me}_scrollDown`](De),Xe.preventDefault();return}},Z=(Xe,ee)=>{const pe=f?f(Xe):[],Oe=Xe==="start",Ze=(ee||(Oe?S.value:y.value)).hour(),De=Oe?s(Ze+1,23):s(0,Ze-1);return Cw(pe,De)},Q=(Xe,ee,pe)=>{const Oe=p?p(Xe,ee):[],ze=ee==="start",Ze=pe||(ze?S.value:y.value),De=Ze.hour();if(Xe!==De)return Oe;const me=Ze.minute(),Te=ze?s(me+1,59):s(0,me-1);return Cw(Oe,Te)},he=(Xe,ee,pe,Oe)=>{const ze=_?_(Xe,ee,pe):[],Ze=pe==="start",De=Oe||(Ze?S.value:y.value),me=De.hour(),Te=De.minute();if(Xe!==me||ee!==Te)return ze;const Ue=De.second(),qe=Ze?s(Ue+1,59):s(0,Ue-1);return Cw(ze,qe)},ge=([Xe,ee])=>[$e(Xe,"start",!0,ee),$e(ee,"end",!1,Xe)],{getAvailableHours:Ie,getAvailableMinutes:be,getAvailableSeconds:Ae}=kY(Z,Q,he),{timePickerOptions:We,getAvailableTime:$e,onSetOption:ve}=LY({getAvailableHours:Ie,getAvailableMinutes:be,getAvailableSeconds:Ae}),Pe=Xe=>Xe?at(Xe)?Xe.map(ee=>en(ee,n.format).locale(r.value)):en(Xe,n.format).locale(r.value):null,Be=Xe=>Xe?at(Xe)?Xe.map(ee=>ee.format(n.format)):Xe.format(n.format):null,ot=()=>{if(at(E))return E.map(ee=>en(ee).locale(r.value));const Xe=en(E).locale(r.value);return[Xe,Xe.add(60,"m")]};return t("set-picker-option",["formatToString",Be]),t("set-picker-option",["parseUserInput",Pe]),t("set-picker-option",["isValidValue",B]),t("set-picker-option",["handleKeydownInput",ae]),t("set-picker-option",["getDefaultValue",ot]),t("set-picker-option",["getRangeAvailableTime",ge]),(Xe,ee)=>Xe.actualVisible?(H(),le("div",{key:0,class:z([g(a).b("range-picker"),g(c).b("panel")])},[te("div",{class:z(g(a).be("range-picker","content"))},[te("div",{class:z(g(a).be("range-picker","cell"))},[te("div",{class:z(g(a).be("range-picker","header"))},Ke(g(i)("el.datepicker.startTime")),3),te("div",{class:z(g(v))},[oe(t1,{ref:"minSpinner",role:"start","show-seconds":g(R),"am-pm-mode":g(w),"arrow-control":g(h),"spinner-date":g(y),"disabled-hours":Z,"disabled-minutes":Q,"disabled-seconds":he,onChange:D,onSetOption:g(ve),onSelectRange:re},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2),te("div",{class:z(g(a).be("range-picker","cell"))},[te("div",{class:z(g(a).be("range-picker","header"))},Ke(g(i)("el.datepicker.endTime")),3),te("div",{class:z(g(b))},[oe(t1,{ref:"maxSpinner",role:"end","show-seconds":g(R),"am-pm-mode":g(w),"arrow-control":g(h),"spinner-date":g(S),"disabled-hours":Z,"disabled-minutes":Q,"disabled-seconds":he,onChange:P,onSetOption:g(ve),onSelectRange:J},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2)],2),te("div",{class:z(g(a).be("panel","footer"))},[te("button",{type:"button",class:z([g(a).be("panel","btn"),"cancel"]),onClick:pe=>I()},Ke(g(i)("el.datepicker.cancel")),11,["onClick"]),te("button",{type:"button",class:z([g(a).be("panel","btn"),"confirm"]),disabled:g(X),onClick:pe=>k()},Ke(g(i)("el.datepicker.confirm")),11,["disabled","onClick"])],2)],2)):Ge("v-if",!0)}});var wIe=pt(LIe,[["__file","panel-time-range.vue"]]);en.extend(ax);var kIe=Re({name:"ElTimePicker",install:null,props:{...cx,isRange:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,t){const n=K(),[s,i]=e.isRange?["timerange",wIe]:["time",RM],r=a=>t.emit("update:modelValue",a);return An("ElPopperOptions",e.popperOptions),t.expose({focus:()=>{var a;(a=n.value)==null||a.focus()},blur:()=>{var a;(a=n.value)==null||a.blur()},handleOpen:()=>{var a;(a=n.value)==null||a.handleOpen()},handleClose:()=>{var a;(a=n.value)==null||a.handleClose()}}),()=>{var a;const c=(a=e.format)!=null?a:e1;return oe(AY,$n(e,{ref:n,type:s,format:c,"onUpdate:modelValue":r}),{default:u=>oe(i,u,null)})}}});const NIe=nn(kIe),YA=Symbol(),PIe=ht({...cx,type:{type:xe(String),default:"date"}}),DIe=["date","dates","year","years","month","months","week","range"],ux=ht({disabledDate:{type:xe(Function)},date:{type:xe(Object),required:!0},minDate:{type:xe(Object)},maxDate:{type:xe(Object)},parsedValue:{type:xe([Object,Array])},rangeState:{type:xe(Object),default:()=>({endDate:null,selecting:!1})}}),PY=ht({type:{type:xe(String),required:!0,values:HOe},dateFormat:String,timeFormat:String,showNow:{type:Boolean,default:!0}}),dx=ht({unlinkPanels:Boolean,parsedValue:{type:xe(Array)}}),hx=e=>({type:String,values:DIe,default:e}),xIe=ht({...PY,parsedValue:{type:xe([Object,Array])},visible:{type:Boolean},format:{type:String,default:""}}),YE=e=>{if(!at(e))return!1;const[t,n]=e;return en.isDayjs(t)&&en.isDayjs(n)&&t.isSameOrBefore(n)},fx=(e,{lang:t,unit:n,unlinkPanels:s})=>{let i;if(at(e)){let[r,a]=e.map(c=>en(c).locale(t));return s||(a=r.add(1,n)),[r,a]}else e?i=en(e):i=en();return i=i.locale(t),[i,i.add(1,n)]},BIe=(e,t,{columnIndexOffset:n,startDate:s,nextEndDate:i,now:r,unit:a,relativeDateGetter:c,setCellMetadata:u,setRowMetadata:h})=>{for(let f=0;f<e.row;f++){const p=t[f];for(let _=0;_<e.column;_++){let E=p[_+n];E||(E={row:f,column:_,type:"normal",inRange:!1,start:!1,end:!1});const v=f*e.column+_,b=c(v);E.dayjs=b,E.date=b.toDate(),E.timestamp=b.valueOf(),E.type="normal",E.inRange=!!(s&&b.isSameOrAfter(s,a)&&i&&b.isSameOrBefore(i,a))||!!(s&&b.isSameOrBefore(s,a)&&i&&b.isSameOrAfter(i,a)),s!=null&&s.isSameOrAfter(i)?(E.start=!!i&&b.isSame(i,a),E.end=s&&b.isSame(s,a)):(E.start=!!s&&b.isSame(s,a),E.end=!!i&&b.isSame(i,a)),b.isSame(r,a)&&(E.type="today"),u==null||u(E,{rowIndex:f,columnIndex:_}),p[_+n]=E}h==null||h(p)}},CM=(e,t,n)=>{const s=en().locale(n).startOf("month").month(t).year(e),i=s.daysInMonth();return up(i).map(r=>s.add(r,"day").toDate())},Gy=(e,t,n,s)=>{const i=en().year(e).month(t).startOf("month"),r=CM(e,t,n).find(a=>!(s!=null&&s(a)));return r?en(r).locale(n):i.locale(n)},n1=(e,t,n)=>{const s=e.year();if(!(n!=null&&n(e.toDate())))return e.locale(t);const i=e.month();if(!CM(s,i,t).every(n))return Gy(s,i,t,n);for(let r=0;r<12;r++)if(!CM(s,r,t).every(n))return Gy(s,r,t,n);return e},FIe=ht({...ux,cellClassName:{type:xe(Function)},showWeekNumber:Boolean,selectionMode:hx("date")}),UIe=["changerange","pick","select"],o1=(e="")=>["normal","today"].includes(e),HIe=(e,t)=>{const{lang:n}=xn(),s=K(),i=K(),r=K(),a=K(),c=K([[],[],[],[],[],[]]);let u=!1;const h=e.date.$locale().weekStart||7,f=e.date.locale("en").localeData().weekdaysShort().map(Q=>Q.toLowerCase()),p=x(()=>h>3?7-h:-h),_=x(()=>{const Q=e.date.startOf("month");return Q.subtract(Q.day()||7,"day")}),E=x(()=>f.concat(f).slice(h,h+7)),v=x(()=>b5(g(R)).some(Q=>Q.isCurrent)),b=x(()=>{const Q=e.date.startOf("month"),he=Q.day()||7,ge=Q.daysInMonth(),Ie=Q.subtract(1,"month").daysInMonth();return{startOfMonthDay:he,dateCountOfMonth:ge,dateCountOfLastMonth:Ie}}),y=x(()=>e.selectionMode==="dates"?nl(e.parsedValue):[]),S=(Q,{count:he,rowIndex:ge,columnIndex:Ie})=>{const{startOfMonthDay:be,dateCountOfMonth:Ae,dateCountOfLastMonth:We}=g(b),$e=g(p);if(ge>=0&&ge<=1){const ve=be+$e<0?7+be+$e:be+$e;if(Ie+ge*7>=ve)return Q.text=he,!0;Q.text=We-(ve-Ie%7)+1+ge*7,Q.type="prev-month"}else return he<=Ae?Q.text=he:(Q.text=he-Ae,Q.type="next-month"),!0;return!1},L=(Q,{columnIndex:he,rowIndex:ge},Ie)=>{const{disabledDate:be,cellClassName:Ae}=e,We=g(y),$e=S(Q,{count:Ie,rowIndex:ge,columnIndex:he}),ve=Q.dayjs.toDate();return Q.selected=We.find(Pe=>Pe.isSame(Q.dayjs,"day")),Q.isSelected=!!Q.selected,Q.isCurrent=k(Q),Q.disabled=be==null?void 0:be(ve),Q.customClass=Ae==null?void 0:Ae(ve),$e},I=Q=>{if(e.selectionMode==="week"){const[he,ge]=e.showWeekNumber?[1,7]:[0,6],Ie=Z(Q[he+1]);Q[he].inRange=Ie,Q[he].start=Ie,Q[ge].inRange=Ie,Q[ge].end=Ie}},R=x(()=>{const{minDate:Q,maxDate:he,rangeState:ge,showWeekNumber:Ie}=e,be=g(p),Ae=g(c),We="day";let $e=1;if(Ie)for(let ve=0;ve<6;ve++)Ae[ve][0]||(Ae[ve][0]={type:"week",text:g(_).add(ve*7+1,We).week()});return BIe({row:6,column:7},Ae,{startDate:Q,columnIndexOffset:Ie?1:0,nextEndDate:ge.endDate||he||ge.selecting&&Q||null,now:en().locale(g(n)).startOf(We),unit:We,relativeDateGetter:ve=>g(_).add(ve-be,We),setCellMetadata:(...ve)=>{L(...ve,$e)&&($e+=1)},setRowMetadata:I}),Ae});tt(()=>e.date,async()=>{var Q;(Q=g(s))!=null&&Q.contains(document.activeElement)&&(await Vt(),await w())});const w=async()=>{var Q;return(Q=g(i))==null?void 0:Q.focus()},k=Q=>e.selectionMode==="date"&&o1(Q.type)&&D(Q,e.parsedValue),D=(Q,he)=>he?en(he).locale(g(n)).isSame(e.date.date(Number(Q.text)),"day"):!1,P=(Q,he)=>{const ge=Q*7+(he-(e.showWeekNumber?1:0))-g(p);return g(_).add(ge,"day")},B=Q=>{var he;if(!e.rangeState.selecting)return;let ge=Q.target;if(ge.tagName==="SPAN"&&(ge=(he=ge.parentNode)==null?void 0:he.parentNode),ge.tagName==="DIV"&&(ge=ge.parentNode),ge.tagName!=="TD")return;const Ie=ge.parentNode.rowIndex-1,be=ge.cellIndex;g(R)[Ie][be].disabled||(Ie!==g(r)||be!==g(a))&&(r.value=Ie,a.value=be,t("changerange",{selecting:!0,endDate:P(Ie,be)}))},F=Q=>!g(v)&&(Q==null?void 0:Q.text)===1&&Q.type==="normal"||Q.isCurrent,X=Q=>{u||g(v)||e.selectionMode!=="date"||ae(Q,!0)},G=Q=>{Q.target.closest("td")&&(u=!0)},re=Q=>{Q.target.closest("td")&&(u=!1)},_e=Q=>{!e.rangeState.selecting||!e.minDate?(t("pick",{minDate:Q,maxDate:null}),t("select",!0)):(Q>=e.minDate?t("pick",{minDate:e.minDate,maxDate:Q}):t("pick",{minDate:Q,maxDate:e.minDate}),t("select",!1))},J=Q=>{const he=Q.week(),ge=`${Q.year()}w${he}`;t("pick",{year:Q.year(),week:he,value:ge,date:Q.startOf("week")})},Y=(Q,he)=>{const ge=he?nl(e.parsedValue).filter(Ie=>(Ie==null?void 0:Ie.valueOf())!==Q.valueOf()):nl(e.parsedValue).concat([Q]);t("pick",ge)},ae=(Q,he=!1)=>{const ge=Q.target.closest("td");if(!ge)return;const Ie=ge.parentNode.rowIndex-1,be=ge.cellIndex,Ae=g(R)[Ie][be];if(Ae.disabled||Ae.type==="week")return;const We=P(Ie,be);switch(e.selectionMode){case"range":{_e(We);break}case"date":{t("pick",We,he);break}case"week":{J(We);break}case"dates":{Y(We,!!Ae.selected);break}}},Z=Q=>{if(e.selectionMode!=="week")return!1;let he=e.date.startOf("day");if(Q.type==="prev-month"&&(he=he.subtract(1,"month")),Q.type==="next-month"&&(he=he.add(1,"month")),he=he.date(Number.parseInt(Q.text,10)),e.parsedValue&&!at(e.parsedValue)){const ge=(e.parsedValue.day()-h+7)%7-1;return e.parsedValue.subtract(ge,"day").isSame(he,"day")}return!1};return{WEEKS:E,rows:R,tbodyRef:s,currentCellRef:i,focus:w,isCurrent:k,isWeekActive:Z,isSelectedCell:F,handlePickDate:ae,handleMouseUp:re,handleMouseDown:G,handleMouseMove:B,handleFocus:X}},VIe=(e,{isCurrent:t,isWeekActive:n})=>{const s=rt("date-table"),{t:i}=xn(),r=x(()=>[s.b(),{"is-week-mode":e.selectionMode==="week"}]),a=x(()=>i("el.datepicker.dateTablePrompt")),c=x(()=>i("el.datepicker.week"));return{tableKls:r,tableLabel:a,weekLabel:c,getCellClasses:f=>{const p=[];return o1(f.type)&&!f.disabled?(p.push("available"),f.type==="today"&&p.push("today")):p.push(f.type),t(f)&&p.push("current"),f.inRange&&(o1(f.type)||e.selectionMode==="week")&&(p.push("in-range"),f.start&&p.push("start-date"),f.end&&p.push("end-date")),f.disabled&&p.push("disabled"),f.selected&&p.push("selected"),f.customClass&&p.push(f.customClass),p.join(" ")},getRowKls:f=>[s.e("row"),{current:n(f)}],t:i}},GIe=ht({cell:{type:xe(Object)}});var px=Re({name:"ElDatePickerCell",props:GIe,setup(e){const t=rt("date-table-cell"),{slots:n}=It(YA);return()=>{const{cell:s}=e;return He(n,"default",{...s},()=>{var i;return[oe("div",{class:t.b()},[oe("span",{class:t.e("text")},[(i=s==null?void 0:s.renderText)!=null?i:s==null?void 0:s.text])])]})}}});const WIe=Re({__name:"basic-date-table",props:FIe,emits:UIe,setup(e,{expose:t,emit:n}){const s=e,{WEEKS:i,rows:r,tbodyRef:a,currentCellRef:c,focus:u,isCurrent:h,isWeekActive:f,isSelectedCell:p,handlePickDate:_,handleMouseUp:E,handleMouseDown:v,handleMouseMove:b,handleFocus:y}=HIe(s,n),{tableLabel:S,tableKls:L,weekLabel:I,getCellClasses:R,getRowKls:w,t:k}=VIe(s,{isCurrent:h,isWeekActive:f});return t({focus:u}),(D,P)=>(H(),le("table",{"aria-label":g(S),class:z(g(L)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:g(_),onMousemove:g(b),onMousedown:Yt(g(v),["prevent"]),onMouseup:g(E)},[te("tbody",{ref_key:"tbodyRef",ref:a},[te("tr",null,[D.showWeekNumber?(H(),le("th",{key:0,scope:"col"},Ke(g(I)),1)):Ge("v-if",!0),(H(!0),le(Lt,null,In(g(i),(B,F)=>(H(),le("th",{key:F,"aria-label":g(k)("el.datepicker.weeksFull."+B),scope:"col"},Ke(g(k)("el.datepicker.weeks."+B)),9,["aria-label"]))),128))]),(H(!0),le(Lt,null,In(g(r),(B,F)=>(H(),le("tr",{key:F,class:z(g(w)(B[1]))},[(H(!0),le(Lt,null,In(B,(X,G)=>(H(),le("td",{key:`${F}.${G}`,ref_for:!0,ref:re=>g(p)(X)&&(c.value=re),class:z(g(R)(X)),"aria-current":X.isCurrent?"date":void 0,"aria-selected":X.isCurrent,tabindex:g(p)(X)?0:-1,onFocus:g(y)},[oe(g(px),{cell:X},null,8,["cell"])],42,["aria-current","aria-selected","tabindex","onFocus"]))),128))],2))),128))],512)],42,["aria-label","onClick","onMousemove","onMousedown","onMouseup"]))}});var s1=pt(WIe,[["__file","basic-date-table.vue"]]);const XIe=ht({...ux,selectionMode:hx("month")}),zIe=Re({__name:"basic-month-table",props:XIe,emits:["changerange","pick","select"],setup(e,{expose:t,emit:n}){const s=e,i=rt("month-table"),{t:r,lang:a}=xn(),c=K(),u=K(),h=K(s.date.locale("en").localeData().monthsShort().map(I=>I.toLowerCase())),f=K([[],[],[]]),p=K(),_=K(),E=x(()=>{var I,R;const w=f.value,k=en().locale(a.value).startOf("month");for(let D=0;D<3;D++){const P=w[D];for(let B=0;B<4;B++){const F=P[B]||(P[B]={row:D,column:B,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1});F.type="normal";const X=D*4+B,G=s.date.startOf("year").month(X),re=s.rangeState.endDate||s.maxDate||s.rangeState.selecting&&s.minDate||null;F.inRange=!!(s.minDate&&G.isSameOrAfter(s.minDate,"month")&&re&&G.isSameOrBefore(re,"month"))||!!(s.minDate&&G.isSameOrBefore(s.minDate,"month")&&re&&G.isSameOrAfter(re,"month")),(I=s.minDate)!=null&&I.isSameOrAfter(re)?(F.start=!!(re&&G.isSame(re,"month")),F.end=s.minDate&&G.isSame(s.minDate,"month")):(F.start=!!(s.minDate&&G.isSame(s.minDate,"month")),F.end=!!(re&&G.isSame(re,"month"))),k.isSame(G)&&(F.type="today"),F.text=X,F.disabled=((R=s.disabledDate)==null?void 0:R.call(s,G.toDate()))||!1}}return w}),v=()=>{var I;(I=u.value)==null||I.focus()},b=I=>{const R={},w=s.date.year(),k=new Date,D=I.text;return R.disabled=s.disabledDate?CM(w,D,a.value).every(s.disabledDate):!1,R.current=nl(s.parsedValue).findIndex(P=>en.isDayjs(P)&&P.year()===w&&P.month()===D)>=0,R.today=k.getFullYear()===w&&k.getMonth()===D,I.inRange&&(R["in-range"]=!0,I.start&&(R["start-date"]=!0),I.end&&(R["end-date"]=!0)),R},y=I=>{const R=s.date.year(),w=I.text;return nl(s.date).findIndex(k=>k.year()===R&&k.month()===w)>=0},S=I=>{var R;if(!s.rangeState.selecting)return;let w=I.target;if(w.tagName==="SPAN"&&(w=(R=w.parentNode)==null?void 0:R.parentNode),w.tagName==="DIV"&&(w=w.parentNode),w.tagName!=="TD")return;const k=w.parentNode.rowIndex,D=w.cellIndex;E.value[k][D].disabled||(k!==p.value||D!==_.value)&&(p.value=k,_.value=D,n("changerange",{selecting:!0,endDate:s.date.startOf("year").month(k*4+D)}))},L=I=>{var R;const w=(R=I.target)==null?void 0:R.closest("td");if((w==null?void 0:w.tagName)!=="TD"||Pl(w,"disabled"))return;const k=w.cellIndex,P=w.parentNode.rowIndex*4+k,B=s.date.startOf("year").month(P);if(s.selectionMode==="months"){if(I.type==="keydown"){n("pick",nl(s.parsedValue),!1);return}const F=Gy(s.date.year(),P,a.value,s.disabledDate),X=Pl(w,"current")?nl(s.parsedValue).filter(G=>(G==null?void 0:G.month())!==F.month()):nl(s.parsedValue).concat([en(F)]);n("pick",X)}else s.selectionMode==="range"?s.rangeState.selecting?(s.minDate&&B>=s.minDate?n("pick",{minDate:s.minDate,maxDate:B}):n("pick",{minDate:B,maxDate:s.minDate}),n("select",!1)):(n("pick",{minDate:B,maxDate:null}),n("select",!0)):n("pick",P)};return tt(()=>s.date,async()=>{var I,R;(I=c.value)!=null&&I.contains(document.activeElement)&&(await Vt(),(R=u.value)==null||R.focus())}),t({focus:v}),(I,R)=>(H(),le("table",{role:"grid","aria-label":g(r)("el.datepicker.monthTablePrompt"),class:z(g(i).b()),onClick:L,onMousemove:S},[te("tbody",{ref_key:"tbodyRef",ref:c},[(H(!0),le(Lt,null,In(g(E),(w,k)=>(H(),le("tr",{key:k},[(H(!0),le(Lt,null,In(w,(D,P)=>(H(),le("td",{key:P,ref_for:!0,ref:B=>y(D)&&(u.value=B),class:z(b(D)),"aria-selected":`${y(D)}`,"aria-label":g(r)(`el.datepicker.month${+D.text+1}`),tabindex:y(D)?0:-1,onKeydown:[So(Yt(L,["prevent","stop"]),["space"]),So(Yt(L,["prevent","stop"]),["enter"])]},[oe(g(px),{cell:{...D,renderText:g(r)("el.datepicker.months."+h.value[D.text])}},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var i1=pt(zIe,[["__file","basic-month-table.vue"]]);const YIe=ht({...ux,selectionMode:hx("year")}),KIe=Re({__name:"basic-year-table",props:YIe,emits:["changerange","pick","select"],setup(e,{expose:t,emit:n}){const s=e,i=(R,w)=>{const k=en(String(R)).locale(w).startOf("year"),P=k.endOf("year").dayOfYear();return up(P).map(B=>k.add(B,"day").toDate())},r=rt("year-table"),{t:a,lang:c}=xn(),u=K(),h=K(),f=x(()=>Math.floor(s.date.year()/10)*10),p=K([[],[],[]]),_=K(),E=K(),v=x(()=>{var R;const w=p.value,k=en().locale(c.value).startOf("year");for(let D=0;D<3;D++){const P=w[D];for(let B=0;B<4&&!(D*4+B>=10);B++){let F=P[B];F||(F={row:D,column:B,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1}),F.type="normal";const X=D*4+B+f.value,G=en().year(X),re=s.rangeState.endDate||s.maxDate||s.rangeState.selecting&&s.minDate||null;F.inRange=!!(s.minDate&&G.isSameOrAfter(s.minDate,"year")&&re&&G.isSameOrBefore(re,"year"))||!!(s.minDate&&G.isSameOrBefore(s.minDate,"year")&&re&&G.isSameOrAfter(re,"year")),(R=s.minDate)!=null&&R.isSameOrAfter(re)?(F.start=!!(re&&G.isSame(re,"year")),F.end=!!(s.minDate&&G.isSame(s.minDate,"year"))):(F.start=!!(s.minDate&&G.isSame(s.minDate,"year")),F.end=!!(re&&G.isSame(re,"year"))),k.isSame(G)&&(F.type="today"),F.text=X;const J=G.toDate();F.disabled=s.disabledDate&&s.disabledDate(J)||!1,P[B]=F}}return w}),b=()=>{var R;(R=h.value)==null||R.focus()},y=R=>{const w={},k=en().locale(c.value),D=R.text;return w.disabled=s.disabledDate?i(D,c.value).every(s.disabledDate):!1,w.today=k.year()===D,w.current=nl(s.parsedValue).findIndex(P=>P.year()===D)>=0,R.inRange&&(w["in-range"]=!0,R.start&&(w["start-date"]=!0),R.end&&(w["end-date"]=!0)),w},S=R=>{const w=R.text;return nl(s.date).findIndex(k=>k.year()===w)>=0},L=R=>{var w;const k=(w=R.target)==null?void 0:w.closest("td");if(!k||!k.textContent||Pl(k,"disabled"))return;const D=k.cellIndex,B=k.parentNode.rowIndex*4+D+f.value,F=en().year(B);if(s.selectionMode==="range")s.rangeState.selecting?(s.minDate&&F>=s.minDate?n("pick",{minDate:s.minDate,maxDate:F}):n("pick",{minDate:F,maxDate:s.minDate}),n("select",!1)):(n("pick",{minDate:F,maxDate:null}),n("select",!0));else if(s.selectionMode==="years"){if(R.type==="keydown"){n("pick",nl(s.parsedValue),!1);return}const X=n1(F.startOf("year"),c.value,s.disabledDate),G=Pl(k,"current")?nl(s.parsedValue).filter(re=>(re==null?void 0:re.year())!==B):nl(s.parsedValue).concat([X]);n("pick",G)}else n("pick",B)},I=R=>{var w;if(!s.rangeState.selecting)return;const k=(w=R.target)==null?void 0:w.closest("td");if(!k)return;const D=k.parentNode.rowIndex,P=k.cellIndex;v.value[D][P].disabled||(D!==_.value||P!==E.value)&&(_.value=D,E.value=P,n("changerange",{selecting:!0,endDate:en().year(f.value).add(D*4+P,"year")}))};return tt(()=>s.date,async()=>{var R,w;(R=u.value)!=null&&R.contains(document.activeElement)&&(await Vt(),(w=h.value)==null||w.focus())}),t({focus:b}),(R,w)=>(H(),le("table",{role:"grid","aria-label":g(a)("el.datepicker.yearTablePrompt"),class:z(g(r).b()),onClick:L,onMousemove:I},[te("tbody",{ref_key:"tbodyRef",ref:u},[(H(!0),le(Lt,null,In(g(v),(k,D)=>(H(),le("tr",{key:D},[(H(!0),le(Lt,null,In(k,(P,B)=>(H(),le("td",{key:`${D}_${B}`,ref_for:!0,ref:F=>S(P)&&(h.value=F),class:z(["available",y(P)]),"aria-selected":S(P),"aria-label":String(P.text),tabindex:S(P)?0:-1,onKeydown:[So(Yt(L,["prevent","stop"]),["space"]),So(Yt(L,["prevent","stop"]),["enter"])]},[oe(g(px),{cell:P},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var r1=pt(KIe,[["__file","basic-year-table.vue"]]);const jIe=Re({__name:"panel-date-pick",props:xIe,emits:["pick","set-picker-option","panel-change"],setup(e,{emit:t}){const n=e,s=(ne,Le,ue)=>!0,i=rt("picker-panel"),r=rt("date-picker"),a=Cp(),c=Ks(),{t:u,lang:h}=xn(),f=It("EP_PICKER_BASE"),p=It(XA),{shortcuts:_,disabledDate:E,cellClassName:v,defaultTime:b}=f.props,y=oo(f.props,"defaultValue"),S=K(),L=K(en().locale(h.value)),I=K(!1);let R=!1;const w=x(()=>en(b).locale(h.value)),k=x(()=>L.value.month()),D=x(()=>L.value.year()),P=K([]),B=K(null),F=K(null),X=ne=>P.value.length>0?s(ne,P.value,n.format||"HH:mm:ss"):!0,G=ne=>b&&!ze.value&&!I.value&&!R?w.value.year(ne.year()).month(ne.month()).date(ne.date()):ve.value?ne.millisecond(0):ne.startOf("day"),re=(ne,...Le)=>{if(!ne)t("pick",ne,...Le);else if(at(ne)){const ue=ne.map(G);t("pick",ue,...Le)}else t("pick",G(ne),...Le);B.value=null,F.value=null,I.value=!1,R=!1},_e=async(ne,Le)=>{if(he.value==="date"){ne=ne;let ue=n.parsedValue?n.parsedValue.year(ne.year()).month(ne.month()).date(ne.date()):ne;X(ue)||(ue=P.value[0][0].year(ne.year()).month(ne.month()).date(ne.date())),L.value=ue,re(ue,ve.value||Le),n.type==="datetime"&&(await Vt(),mt())}else he.value==="week"?re(ne.date):he.value==="dates"&&re(ne,!0)},J=ne=>{const Le=ne?"add":"subtract";L.value=L.value[Le](1,"month"),q("month")},Y=ne=>{const Le=L.value,ue=ne?"add":"subtract";L.value=ae.value==="year"?Le[ue](10,"year"):Le[ue](1,"year"),q("year")},ae=K("date"),Z=x(()=>{const ne=u("el.datepicker.year");if(ae.value==="year"){const Le=Math.floor(D.value/10)*10;return ne?`${Le} ${ne} - ${Le+9} ${ne}`:`${Le} - ${Le+9}`}return`${D.value} ${ne}`}),Q=ne=>{const Le=Ut(ne.value)?ne.value():ne.value;if(Le){R=!0,re(en(Le).locale(h.value));return}ne.onClick&&ne.onClick({attrs:a,slots:c,emit:t})},he=x(()=>{const{type:ne}=n;return["week","month","months","year","years","dates"].includes(ne)?ne:"date"}),ge=x(()=>he.value==="dates"||he.value==="months"||he.value==="years"),Ie=x(()=>he.value==="date"?ae.value:he.value),be=x(()=>!!_.length),Ae=async(ne,Le)=>{he.value==="month"?(L.value=Gy(L.value.year(),ne,h.value,E),re(L.value,!1)):he.value==="months"?re(ne,Le??!0):(L.value=Gy(L.value.year(),ne,h.value,E),ae.value="date",["month","year","date","week"].includes(he.value)&&(re(L.value,!0),await Vt(),mt())),q("month")},We=async(ne,Le)=>{if(he.value==="year"){const ue=L.value.startOf("year").year(ne);L.value=n1(ue,h.value,E),re(L.value,!1)}else if(he.value==="years")re(ne,Le??!0);else{const ue=L.value.year(ne);L.value=n1(ue,h.value,E),ae.value="month",["month","year","date","week"].includes(he.value)&&(re(L.value,!0),await Vt(),mt())}q("year")},$e=async ne=>{ae.value=ne,await Vt(),mt()},ve=x(()=>n.type==="datetime"||n.type==="datetimerange"),Pe=x(()=>{const ne=ve.value||he.value==="dates",Le=he.value==="years",ue=he.value==="months",Fe=ae.value==="date",ye=ae.value==="year",ft=ae.value==="month";return ne&&Fe||Le&&ye||ue&&ft}),Be=x(()=>E?n.parsedValue?at(n.parsedValue)?E(n.parsedValue[0].toDate()):E(n.parsedValue.toDate()):!0:!1),ot=()=>{if(ge.value)re(n.parsedValue);else{let ne=n.parsedValue;if(!ne){const Le=en(b).locale(h.value),ue=Mt();ne=Le.year(ue.year()).month(ue.month()).date(ue.date())}L.value=ne,re(ne)}},Xe=x(()=>E?E(en().locale(h.value).toDate()):!1),ee=()=>{const Le=en().locale(h.value).toDate();I.value=!0,(!E||!E(Le))&&X(Le)&&(L.value=en().locale(h.value),re(L.value))},pe=x(()=>n.timeFormat||tY(n.format)),Oe=x(()=>n.dateFormat||eY(n.format)),ze=x(()=>{if(F.value)return F.value;if(!(!n.parsedValue&&!y.value))return(n.parsedValue||L.value).format(pe.value)}),Ze=x(()=>{if(B.value)return B.value;if(!(!n.parsedValue&&!y.value))return(n.parsedValue||L.value).format(Oe.value)}),De=K(!1),me=()=>{De.value=!0},Te=()=>{De.value=!1},Ue=ne=>({hour:ne.hour(),minute:ne.minute(),second:ne.second(),year:ne.year(),month:ne.month(),date:ne.date()}),qe=(ne,Le,ue)=>{const{hour:Fe,minute:ye,second:ft}=Ue(ne),Kt=n.parsedValue?n.parsedValue.hour(Fe).minute(ye).second(ft):ne;L.value=Kt,re(L.value,!0),ue||(De.value=Le)},ct=ne=>{const Le=en(ne,pe.value).locale(h.value);if(Le.isValid()&&X(Le)){const{year:ue,month:Fe,date:ye}=Ue(L.value);L.value=Le.year(ue).month(Fe).date(ye),F.value=null,De.value=!1,re(L.value,!0)}},Ne=ne=>{const Le=en(ne,Oe.value).locale(h.value);if(Le.isValid()){if(E&&E(Le.toDate()))return;const{hour:ue,minute:Fe,second:ye}=Ue(L.value);L.value=Le.hour(ue).minute(Fe).second(ye),B.value=null,re(L.value,!0)}},Se=ne=>en.isDayjs(ne)&&ne.isValid()&&(E?!E(ne.toDate()):!0),Je=ne=>at(ne)?ne.map(Le=>Le.format(n.format)):ne.format(n.format),ut=ne=>en(ne,n.format).locale(h.value),Mt=()=>{const ne=en(y.value).locale(h.value);if(!y.value){const Le=w.value;return en().hour(Le.hour()).minute(Le.minute()).second(Le.second()).locale(h.value)}return ne},mt=async()=>{var ne;["week","month","year","date"].includes(he.value)&&((ne=S.value)==null||ne.focus(),he.value==="week"&&ce($t.down))},qt=ne=>{const{code:Le}=ne;[$t.up,$t.down,$t.left,$t.right,$t.home,$t.end,$t.pageUp,$t.pageDown].includes(Le)&&(ce(Le),ne.stopPropagation(),ne.preventDefault()),[$t.enter,$t.space,$t.numpadEnter].includes(Le)&&B.value===null&&F.value===null&&(ne.preventDefault(),re(L.value,!1))},ce=ne=>{var Le;const{up:ue,down:Fe,left:ye,right:ft,home:Kt,end:En,pageUp:Rn,pageDown:Lo}=$t,Ln={year:{[ue]:-4,[Fe]:4,[ye]:-1,[ft]:1,offset:(On,xo)=>On.setFullYear(On.getFullYear()+xo)},month:{[ue]:-4,[Fe]:4,[ye]:-1,[ft]:1,offset:(On,xo)=>On.setMonth(On.getMonth()+xo)},week:{[ue]:-1,[Fe]:1,[ye]:-1,[ft]:1,offset:(On,xo)=>On.setDate(On.getDate()+xo*7)},date:{[ue]:-7,[Fe]:7,[ye]:-1,[ft]:1,[Kt]:On=>-On.getDay(),[En]:On=>-On.getDay()+6,[Rn]:On=>-new Date(On.getFullYear(),On.getMonth(),0).getDate(),[Lo]:On=>new Date(On.getFullYear(),On.getMonth()+1,0).getDate(),offset:(On,xo)=>On.setDate(On.getDate()+xo)}},Zn=L.value.toDate();for(;Math.abs(L.value.diff(Zn,"year",!0))<1;){const On=Ln[Ie.value];if(!On)return;if(On.offset(Zn,Ut(On[ne])?On[ne](Zn):(Le=On[ne])!=null?Le:0),E&&E(Zn))break;const xo=en(Zn).locale(h.value);L.value=xo,t("pick",xo,!0);break}},q=ne=>{t("panel-change",L.value.toDate(),ne,ae.value)};return tt(()=>he.value,ne=>{if(["month","year"].includes(ne)){ae.value=ne;return}else if(ne==="years"){ae.value="year";return}else if(ne==="months"){ae.value="month";return}ae.value="date"},{immediate:!0}),tt(()=>ae.value,()=>{p==null||p.updatePopper()}),tt(()=>y.value,ne=>{ne&&(L.value=Mt())},{immediate:!0}),tt(()=>n.parsedValue,ne=>{if(ne){if(ge.value||at(ne))return;L.value=ne}else L.value=Mt()},{immediate:!0}),t("set-picker-option",["isValidValue",Se]),t("set-picker-option",["formatToString",Je]),t("set-picker-option",["parseUserInput",ut]),t("set-picker-option",["handleFocusPicker",mt]),(ne,Le)=>(H(),le("div",{class:z([g(i).b(),g(r).b(),{"has-sidebar":ne.$slots.sidebar||g(be),"has-time":g(ve)}])},[te("div",{class:z(g(i).e("body-wrapper"))},[He(ne.$slots,"sidebar",{class:z(g(i).e("sidebar"))}),g(be)?(H(),le("div",{key:0,class:z(g(i).e("sidebar"))},[(H(!0),le(Lt,null,In(g(_),(ue,Fe)=>(H(),le("button",{key:Fe,type:"button",class:z(g(i).e("shortcut")),onClick:ye=>Q(ue)},Ke(ue.text),11,["onClick"]))),128))],2)):Ge("v-if",!0),te("div",{class:z(g(i).e("body"))},[g(ve)?(H(),le("div",{key:0,class:z(g(r).e("time-header"))},[te("span",{class:z(g(r).e("editor-wrap"))},[oe(g(Nr),{placeholder:g(u)("el.datepicker.selectDate"),"model-value":g(Ze),size:"small","validate-event":!1,onInput:ue=>B.value=ue,onChange:Ne},null,8,["placeholder","model-value","onInput"])],2),an((H(),le("span",{class:z(g(r).e("editor-wrap"))},[oe(g(Nr),{placeholder:g(u)("el.datepicker.selectTime"),"model-value":g(ze),size:"small","validate-event":!1,onFocus:me,onInput:ue=>F.value=ue,onChange:ct},null,8,["placeholder","model-value","onInput"]),oe(g(RM),{visible:De.value,format:g(pe),"parsed-value":L.value,onPick:qe},null,8,["visible","format","parsed-value"])],2)),[[g($h),Te]])],2)):Ge("v-if",!0),an(te("div",{class:z([g(r).e("header"),(ae.value==="year"||ae.value==="month")&&g(r).e("header--bordered")])},[te("span",{class:z(g(r).e("prev-btn"))},[te("button",{type:"button","aria-label":g(u)("el.datepicker.prevYear"),class:z(["d-arrow-left",g(i).e("icon-btn")]),onClick:ue=>Y(!1)},[He(ne.$slots,"prev-year",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(Op))]),_:1})])],10,["aria-label","onClick"]),an(te("button",{type:"button","aria-label":g(u)("el.datepicker.prevMonth"),class:z([g(i).e("icon-btn"),"arrow-left"]),onClick:ue=>J(!1)},[He(ne.$slots,"prev-month",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(bp))]),_:1})])],10,["aria-label","onClick"]),[[Yn,ae.value==="date"]])],2),te("span",{role:"button",class:z(g(r).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:So(ue=>$e("year"),["enter"]),onClick:ue=>$e("year")},Ke(g(Z)),43,["onKeydown","onClick"]),an(te("span",{role:"button","aria-live":"polite",tabindex:"0",class:z([g(r).e("header-label"),{active:ae.value==="month"}]),onKeydown:So(ue=>$e("month"),["enter"]),onClick:ue=>$e("month")},Ke(g(u)(`el.datepicker.month${g(k)+1}`)),43,["onKeydown","onClick"]),[[Yn,ae.value==="date"]]),te("span",{class:z(g(r).e("next-btn"))},[an(te("button",{type:"button","aria-label":g(u)("el.datepicker.nextMonth"),class:z([g(i).e("icon-btn"),"arrow-right"]),onClick:ue=>J(!0)},[He(ne.$slots,"next-month",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(rl))]),_:1})])],10,["aria-label","onClick"]),[[Yn,ae.value==="date"]]),te("button",{type:"button","aria-label":g(u)("el.datepicker.nextYear"),class:z([g(i).e("icon-btn"),"d-arrow-right"]),onClick:ue=>Y(!0)},[He(ne.$slots,"next-year",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(Sp))]),_:1})])],10,["aria-label","onClick"])],2)],2),[[Yn,ae.value!=="time"]]),te("div",{class:z(g(i).e("content")),onKeydown:qt},[ae.value==="date"?(H(),Ye(s1,{key:0,ref_key:"currentViewRef",ref:S,"selection-mode":g(he),date:L.value,"parsed-value":ne.parsedValue,"disabled-date":g(E),"cell-class-name":g(v),onPick:_e},null,8,["selection-mode","date","parsed-value","disabled-date","cell-class-name"])):Ge("v-if",!0),ae.value==="year"?(H(),Ye(r1,{key:1,ref_key:"currentViewRef",ref:S,"selection-mode":g(he),date:L.value,"disabled-date":g(E),"parsed-value":ne.parsedValue,onPick:We},null,8,["selection-mode","date","disabled-date","parsed-value"])):Ge("v-if",!0),ae.value==="month"?(H(),Ye(i1,{key:2,ref_key:"currentViewRef",ref:S,"selection-mode":g(he),date:L.value,"parsed-value":ne.parsedValue,"disabled-date":g(E),onPick:Ae},null,8,["selection-mode","date","parsed-value","disabled-date"])):Ge("v-if",!0)],34)],2)],2),an(te("div",{class:z(g(i).e("footer"))},[an(oe(g(Mi),{text:"",size:"small",class:z(g(i).e("link-btn")),disabled:g(Xe),onClick:ee},{default:de(()=>[Xt(Ke(g(u)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[Yn,!g(ge)&&ne.showNow]]),oe(g(Mi),{plain:"",size:"small",class:z(g(i).e("link-btn")),disabled:g(Be),onClick:ot},{default:de(()=>[Xt(Ke(g(u)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2),[[Yn,g(Pe)]])],2))}});var QIe=pt(jIe,[["__file","panel-date-pick.vue"]]);const qIe=ht({...PY,...dx,visible:Boolean}),DY=e=>{const{emit:t}=pn(),n=Cp(),s=Ks();return r=>{const a=Ut(r.value)?r.value():r.value;if(a){t("pick",[en(a[0]).locale(e.value),en(a[1]).locale(e.value)]);return}r.onClick&&r.onClick({attrs:n,slots:s,emit:t})}},xY=(e,{defaultValue:t,leftDate:n,rightDate:s,unit:i,onParsedValueChanged:r})=>{const{emit:a}=pn(),{pickerNs:c}=It(YA),u=rt("date-range-picker"),{t:h,lang:f}=xn(),p=DY(f),_=K(),E=K(),v=K({endDate:null,selecting:!1}),b=R=>{v.value=R},y=(R=!1)=>{const w=g(_),k=g(E);YE([w,k])&&a("pick",[w,k],R)},S=R=>{v.value.selecting=R,R||(v.value.endDate=null)},L=R=>{if(at(R)&&R.length===2){const[w,k]=R;_.value=w,n.value=w,E.value=k,r(g(_),g(E))}else I()},I=()=>{const[R,w]=fx(g(t),{lang:g(f),unit:i,unlinkPanels:e.unlinkPanels});_.value=void 0,E.value=void 0,n.value=R,s.value=w};return tt(t,R=>{R&&I()},{immediate:!0}),tt(()=>e.parsedValue,L,{immediate:!0}),{minDate:_,maxDate:E,rangeState:v,lang:f,ppNs:c,drpNs:u,handleChangeRange:b,handleRangeConfirm:y,handleShortcutClick:p,onSelect:S,onReset:L,t:h}},vR="month",JIe=Re({__name:"panel-date-range",props:qIe,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(e,{emit:t}){const n=e,s=It("EP_PICKER_BASE"),{disabledDate:i,cellClassName:r,defaultTime:a,clearable:c}=s.props,u=oo(s.props,"format"),h=oo(s.props,"shortcuts"),f=oo(s.props,"defaultValue"),{lang:p}=xn(),_=K(en().locale(p.value)),E=K(en().locale(p.value).add(1,vR)),{minDate:v,maxDate:b,rangeState:y,ppNs:S,drpNs:L,handleChangeRange:I,handleRangeConfirm:R,handleShortcutClick:w,onSelect:k,onReset:D,t:P}=xY(n,{defaultValue:f,leftDate:_,rightDate:E,unit:vR,onParsedValueChanged:Le});tt(()=>n.visible,ue=>{!ue&&y.value.selecting&&(D(n.parsedValue),k(!1))});const B=K({min:null,max:null}),F=K({min:null,max:null}),X=x(()=>`${_.value.year()} ${P("el.datepicker.year")} ${P(`el.datepicker.month${_.value.month()+1}`)}`),G=x(()=>`${E.value.year()} ${P("el.datepicker.year")} ${P(`el.datepicker.month${E.value.month()+1}`)}`),re=x(()=>_.value.year()),_e=x(()=>_.value.month()),J=x(()=>E.value.year()),Y=x(()=>E.value.month()),ae=x(()=>!!h.value.length),Z=x(()=>B.value.min!==null?B.value.min:v.value?v.value.format(be.value):""),Q=x(()=>B.value.max!==null?B.value.max:b.value||v.value?(b.value||v.value).format(be.value):""),he=x(()=>F.value.min!==null?F.value.min:v.value?v.value.format(Ie.value):""),ge=x(()=>F.value.max!==null?F.value.max:b.value||v.value?(b.value||v.value).format(Ie.value):""),Ie=x(()=>n.timeFormat||tY(u.value)),be=x(()=>n.dateFormat||eY(u.value)),Ae=ue=>YE(ue)&&(i?!i(ue[0].toDate())&&!i(ue[1].toDate()):!0),We=()=>{_.value=_.value.subtract(1,"year"),n.unlinkPanels||(E.value=_.value.add(1,"month")),pe("year")},$e=()=>{_.value=_.value.subtract(1,"month"),n.unlinkPanels||(E.value=_.value.add(1,"month")),pe("month")},ve=()=>{n.unlinkPanels?E.value=E.value.add(1,"year"):(_.value=_.value.add(1,"year"),E.value=_.value.add(1,"month")),pe("year")},Pe=()=>{n.unlinkPanels?E.value=E.value.add(1,"month"):(_.value=_.value.add(1,"month"),E.value=_.value.add(1,"month")),pe("month")},Be=()=>{_.value=_.value.add(1,"year"),pe("year")},ot=()=>{_.value=_.value.add(1,"month"),pe("month")},Xe=()=>{E.value=E.value.subtract(1,"year"),pe("year")},ee=()=>{E.value=E.value.subtract(1,"month"),pe("month")},pe=ue=>{t("panel-change",[_.value.toDate(),E.value.toDate()],ue)},Oe=x(()=>{const ue=(_e.value+1)%12,Fe=_e.value+1>=12?1:0;return n.unlinkPanels&&new Date(re.value+Fe,ue)<new Date(J.value,Y.value)}),ze=x(()=>n.unlinkPanels&&J.value*12+Y.value-(re.value*12+_e.value+1)>=12),Ze=x(()=>!(v.value&&b.value&&!y.value.selecting&&YE([v.value,b.value]))),De=x(()=>n.type==="datetime"||n.type==="datetimerange"),me=(ue,Fe)=>{if(ue)return a?en(a[Fe]||a).locale(p.value).year(ue.year()).month(ue.month()).date(ue.date()):ue},Te=(ue,Fe=!0)=>{const ye=ue.minDate,ft=ue.maxDate,Kt=me(ye,0),En=me(ft,1);b.value===En&&v.value===Kt||(t("calendar-change",[ye.toDate(),ft&&ft.toDate()]),b.value=En,v.value=Kt,!(!Fe||De.value)&&R())},Ue=K(!1),qe=K(!1),ct=()=>{Ue.value=!1},Ne=()=>{qe.value=!1},Se=(ue,Fe)=>{B.value[Fe]=ue;const ye=en(ue,be.value).locale(p.value);if(ye.isValid()){if(i&&i(ye.toDate()))return;Fe==="min"?(_.value=ye,v.value=(v.value||_.value).year(ye.year()).month(ye.month()).date(ye.date()),!n.unlinkPanels&&(!b.value||b.value.isBefore(v.value))&&(E.value=ye.add(1,"month"),b.value=v.value.add(1,"month"))):(E.value=ye,b.value=(b.value||E.value).year(ye.year()).month(ye.month()).date(ye.date()),!n.unlinkPanels&&(!v.value||v.value.isAfter(b.value))&&(_.value=ye.subtract(1,"month"),v.value=b.value.subtract(1,"month")))}},Je=(ue,Fe)=>{B.value[Fe]=null},ut=(ue,Fe)=>{F.value[Fe]=ue;const ye=en(ue,Ie.value).locale(p.value);ye.isValid()&&(Fe==="min"?(Ue.value=!0,v.value=(v.value||_.value).hour(ye.hour()).minute(ye.minute()).second(ye.second())):(qe.value=!0,b.value=(b.value||E.value).hour(ye.hour()).minute(ye.minute()).second(ye.second()),E.value=b.value))},Mt=(ue,Fe)=>{F.value[Fe]=null,Fe==="min"?(_.value=v.value,Ue.value=!1,(!b.value||b.value.isBefore(v.value))&&(b.value=v.value)):(E.value=b.value,qe.value=!1,b.value&&b.value.isBefore(v.value)&&(v.value=b.value))},mt=(ue,Fe,ye)=>{F.value.min||(ue&&(_.value=ue,v.value=(v.value||_.value).hour(ue.hour()).minute(ue.minute()).second(ue.second())),ye||(Ue.value=Fe),(!b.value||b.value.isBefore(v.value))&&(b.value=v.value,E.value=ue))},qt=(ue,Fe,ye)=>{F.value.max||(ue&&(E.value=ue,b.value=(b.value||E.value).hour(ue.hour()).minute(ue.minute()).second(ue.second())),ye||(qe.value=Fe),b.value&&b.value.isBefore(v.value)&&(v.value=b.value))},ce=()=>{_.value=fx(g(f),{lang:g(p),unit:"month",unlinkPanels:n.unlinkPanels})[0],E.value=_.value.add(1,"month"),b.value=void 0,v.value=void 0,t("pick",null)},q=ue=>at(ue)?ue.map(Fe=>Fe.format(u.value)):ue.format(u.value),ne=ue=>at(ue)?ue.map(Fe=>en(Fe,u.value).locale(p.value)):en(ue,u.value).locale(p.value);function Le(ue,Fe){if(n.unlinkPanels&&Fe){const ye=(ue==null?void 0:ue.year())||0,ft=(ue==null?void 0:ue.month())||0,Kt=Fe.year(),En=Fe.month();E.value=ye===Kt&&ft===En?Fe.add(1,vR):Fe}else E.value=_.value.add(1,vR),Fe&&(E.value=E.value.hour(Fe.hour()).minute(Fe.minute()).second(Fe.second()))}return t("set-picker-option",["isValidValue",Ae]),t("set-picker-option",["parseUserInput",ne]),t("set-picker-option",["formatToString",q]),t("set-picker-option",["handleClear",ce]),(ue,Fe)=>(H(),le("div",{class:z([g(S).b(),g(L).b(),{"has-sidebar":ue.$slots.sidebar||g(ae),"has-time":g(De)}])},[te("div",{class:z(g(S).e("body-wrapper"))},[He(ue.$slots,"sidebar",{class:z(g(S).e("sidebar"))}),g(ae)?(H(),le("div",{key:0,class:z(g(S).e("sidebar"))},[(H(!0),le(Lt,null,In(g(h),(ye,ft)=>(H(),le("button",{key:ft,type:"button",class:z(g(S).e("shortcut")),onClick:Kt=>g(w)(ye)},Ke(ye.text),11,["onClick"]))),128))],2)):Ge("v-if",!0),te("div",{class:z(g(S).e("body"))},[g(De)?(H(),le("div",{key:0,class:z(g(L).e("time-header"))},[te("span",{class:z(g(L).e("editors-wrap"))},[te("span",{class:z(g(L).e("time-picker-wrap"))},[oe(g(Nr),{size:"small",disabled:g(y).selecting,placeholder:g(P)("el.datepicker.startDate"),class:z(g(L).e("editor")),"model-value":g(Z),"validate-event":!1,onInput:ye=>Se(ye,"min"),onChange:ye=>Je(ye,"min")},null,8,["disabled","placeholder","class","model-value","onInput","onChange"])],2),an((H(),le("span",{class:z(g(L).e("time-picker-wrap"))},[oe(g(Nr),{size:"small",class:z(g(L).e("editor")),disabled:g(y).selecting,placeholder:g(P)("el.datepicker.startTime"),"model-value":g(he),"validate-event":!1,onFocus:ye=>Ue.value=!0,onInput:ye=>ut(ye,"min"),onChange:ye=>Mt(ye,"min")},null,8,["class","disabled","placeholder","model-value","onFocus","onInput","onChange"]),oe(g(RM),{visible:Ue.value,format:g(Ie),"datetime-role":"start","parsed-value":_.value,onPick:mt},null,8,["visible","format","parsed-value"])],2)),[[g($h),ct]])],2),te("span",null,[oe(g(Nt),null,{default:de(()=>[oe(g(rl))]),_:1})]),te("span",{class:z([g(L).e("editors-wrap"),"is-right"])},[te("span",{class:z(g(L).e("time-picker-wrap"))},[oe(g(Nr),{size:"small",class:z(g(L).e("editor")),disabled:g(y).selecting,placeholder:g(P)("el.datepicker.endDate"),"model-value":g(Q),readonly:!g(v),"validate-event":!1,onInput:ye=>Se(ye,"max"),onChange:ye=>Je(ye,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onInput","onChange"])],2),an((H(),le("span",{class:z(g(L).e("time-picker-wrap"))},[oe(g(Nr),{size:"small",class:z(g(L).e("editor")),disabled:g(y).selecting,placeholder:g(P)("el.datepicker.endTime"),"model-value":g(ge),readonly:!g(v),"validate-event":!1,onFocus:ye=>g(v)&&(qe.value=!0),onInput:ye=>ut(ye,"max"),onChange:ye=>Mt(ye,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onFocus","onInput","onChange"]),oe(g(RM),{"datetime-role":"end",visible:qe.value,format:g(Ie),"parsed-value":E.value,onPick:qt},null,8,["visible","format","parsed-value"])],2)),[[g($h),Ne]])],2)],2)):Ge("v-if",!0),te("div",{class:z([[g(S).e("content"),g(L).e("content")],"is-left"])},[te("div",{class:z(g(L).e("header"))},[te("button",{type:"button",class:z([g(S).e("icon-btn"),"d-arrow-left"]),"aria-label":g(P)("el.datepicker.prevYear"),onClick:We},[He(ue.$slots,"prev-year",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(Op))]),_:1})])],10,["aria-label"]),te("button",{type:"button",class:z([g(S).e("icon-btn"),"arrow-left"]),"aria-label":g(P)("el.datepicker.prevMonth"),onClick:$e},[He(ue.$slots,"prev-month",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(bp))]),_:1})])],10,["aria-label"]),ue.unlinkPanels?(H(),le("button",{key:0,type:"button",disabled:!g(ze),class:z([[g(S).e("icon-btn"),{"is-disabled":!g(ze)}],"d-arrow-right"]),"aria-label":g(P)("el.datepicker.nextYear"),onClick:Be},[He(ue.$slots,"next-year",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(Sp))]),_:1})])],10,["disabled","aria-label"])):Ge("v-if",!0),ue.unlinkPanels?(H(),le("button",{key:1,type:"button",disabled:!g(Oe),class:z([[g(S).e("icon-btn"),{"is-disabled":!g(Oe)}],"arrow-right"]),"aria-label":g(P)("el.datepicker.nextMonth"),onClick:ot},[He(ue.$slots,"next-month",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(rl))]),_:1})])],10,["disabled","aria-label"])):Ge("v-if",!0),te("div",null,Ke(g(X)),1)],2),oe(s1,{"selection-mode":"range",date:_.value,"min-date":g(v),"max-date":g(b),"range-state":g(y),"disabled-date":g(i),"cell-class-name":g(r),onChangerange:g(I),onPick:Te,onSelect:g(k)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2),te("div",{class:z([[g(S).e("content"),g(L).e("content")],"is-right"])},[te("div",{class:z(g(L).e("header"))},[ue.unlinkPanels?(H(),le("button",{key:0,type:"button",disabled:!g(ze),class:z([[g(S).e("icon-btn"),{"is-disabled":!g(ze)}],"d-arrow-left"]),"aria-label":g(P)("el.datepicker.prevYear"),onClick:Xe},[He(ue.$slots,"prev-year",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(Op))]),_:1})])],10,["disabled","aria-label"])):Ge("v-if",!0),ue.unlinkPanels?(H(),le("button",{key:1,type:"button",disabled:!g(Oe),class:z([[g(S).e("icon-btn"),{"is-disabled":!g(Oe)}],"arrow-left"]),"aria-label":g(P)("el.datepicker.prevMonth"),onClick:ee},[He(ue.$slots,"prev-month",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(bp))]),_:1})])],10,["disabled","aria-label"])):Ge("v-if",!0),te("button",{type:"button","aria-label":g(P)("el.datepicker.nextYear"),class:z([g(S).e("icon-btn"),"d-arrow-right"]),onClick:ve},[He(ue.$slots,"next-year",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(Sp))]),_:1})])],10,["aria-label"]),te("button",{type:"button",class:z([g(S).e("icon-btn"),"arrow-right"]),"aria-label":g(P)("el.datepicker.nextMonth"),onClick:Pe},[He(ue.$slots,"next-month",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(rl))]),_:1})])],10,["aria-label"]),te("div",null,Ke(g(G)),1)],2),oe(s1,{"selection-mode":"range",date:E.value,"min-date":g(v),"max-date":g(b),"range-state":g(y),"disabled-date":g(i),"cell-class-name":g(r),onChangerange:g(I),onPick:Te,onSelect:g(k)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2)],2)],2),g(De)?(H(),le("div",{key:0,class:z(g(S).e("footer"))},[g(c)?(H(),Ye(g(Mi),{key:0,text:"",size:"small",class:z(g(S).e("link-btn")),onClick:ce},{default:de(()=>[Xt(Ke(g(P)("el.datepicker.clear")),1)]),_:1},8,["class"])):Ge("v-if",!0),oe(g(Mi),{plain:"",size:"small",class:z(g(S).e("link-btn")),disabled:g(Ze),onClick:ye=>g(R)(!1)},{default:de(()=>[Xt(Ke(g(P)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled","onClick"])],2)):Ge("v-if",!0)],2))}});var ZIe=pt(JIe,[["__file","panel-date-range.vue"]]);const e0e=ht({...dx}),t0e=["pick","set-picker-option","calendar-change"],n0e=({unlinkPanels:e,leftDate:t,rightDate:n})=>{const{t:s}=xn(),i=()=>{t.value=t.value.subtract(1,"year"),e.value||(n.value=n.value.subtract(1,"year"))},r=()=>{e.value||(t.value=t.value.add(1,"year")),n.value=n.value.add(1,"year")},a=()=>{t.value=t.value.add(1,"year")},c=()=>{n.value=n.value.subtract(1,"year")},u=x(()=>`${t.value.year()} ${s("el.datepicker.year")}`),h=x(()=>`${n.value.year()} ${s("el.datepicker.year")}`),f=x(()=>t.value.year()),p=x(()=>n.value.year()===t.value.year()?t.value.year()+1:n.value.year());return{leftPrevYear:i,rightNextYear:r,leftNextYear:a,rightPrevYear:c,leftLabel:u,rightLabel:h,leftYear:f,rightYear:p}},bR="year",o0e=Re({name:"DatePickerMonthRange"}),s0e=Re({...o0e,props:e0e,emits:t0e,setup(e,{emit:t}){const n=e,{lang:s}=xn(),i=It("EP_PICKER_BASE"),{shortcuts:r,disabledDate:a}=i.props,c=oo(i.props,"format"),u=oo(i.props,"defaultValue"),h=K(en().locale(s.value)),f=K(en().locale(s.value).add(1,bR)),{minDate:p,maxDate:_,rangeState:E,ppNs:v,drpNs:b,handleChangeRange:y,handleRangeConfirm:S,handleShortcutClick:L,onSelect:I}=xY(n,{defaultValue:u,leftDate:h,rightDate:f,unit:bR,onParsedValueChanged:Z}),R=x(()=>!!r.length),{leftPrevYear:w,rightNextYear:k,leftNextYear:D,rightPrevYear:P,leftLabel:B,rightLabel:F,leftYear:X,rightYear:G}=n0e({unlinkPanels:oo(n,"unlinkPanels"),leftDate:h,rightDate:f}),re=x(()=>n.unlinkPanels&&G.value>X.value+1),_e=(Q,he=!0)=>{const ge=Q.minDate,Ie=Q.maxDate;_.value===Ie&&p.value===ge||(t("calendar-change",[ge.toDate(),Ie&&Ie.toDate()]),_.value=Ie,p.value=ge,he&&S())},J=()=>{h.value=fx(g(u),{lang:g(s),unit:"year",unlinkPanels:n.unlinkPanels})[0],f.value=h.value.add(1,"year"),t("pick",null)},Y=Q=>at(Q)?Q.map(he=>he.format(c.value)):Q.format(c.value),ae=Q=>at(Q)?Q.map(he=>en(he,c.value).locale(s.value)):en(Q,c.value).locale(s.value);function Z(Q,he){if(n.unlinkPanels&&he){const ge=(Q==null?void 0:Q.year())||0,Ie=he.year();f.value=ge===Ie?he.add(1,bR):he}else f.value=h.value.add(1,bR)}return t("set-picker-option",["isValidValue",YE]),t("set-picker-option",["formatToString",Y]),t("set-picker-option",["parseUserInput",ae]),t("set-picker-option",["handleClear",J]),(Q,he)=>(H(),le("div",{class:z([g(v).b(),g(b).b(),{"has-sidebar":!!Q.$slots.sidebar||g(R)}])},[te("div",{class:z(g(v).e("body-wrapper"))},[He(Q.$slots,"sidebar",{class:z(g(v).e("sidebar"))}),g(R)?(H(),le("div",{key:0,class:z(g(v).e("sidebar"))},[(H(!0),le(Lt,null,In(g(r),(ge,Ie)=>(H(),le("button",{key:Ie,type:"button",class:z(g(v).e("shortcut")),onClick:be=>g(L)(ge)},Ke(ge.text),11,["onClick"]))),128))],2)):Ge("v-if",!0),te("div",{class:z(g(v).e("body"))},[te("div",{class:z([[g(v).e("content"),g(b).e("content")],"is-left"])},[te("div",{class:z(g(b).e("header"))},[te("button",{type:"button",class:z([g(v).e("icon-btn"),"d-arrow-left"]),onClick:g(w)},[He(Q.$slots,"prev-year",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(Op))]),_:1})])],10,["onClick"]),Q.unlinkPanels?(H(),le("button",{key:0,type:"button",disabled:!g(re),class:z([[g(v).e("icon-btn"),{[g(v).is("disabled")]:!g(re)}],"d-arrow-right"]),onClick:g(D)},[He(Q.$slots,"next-year",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(Sp))]),_:1})])],10,["disabled","onClick"])):Ge("v-if",!0),te("div",null,Ke(g(B)),1)],2),oe(i1,{"selection-mode":"range",date:h.value,"min-date":g(p),"max-date":g(_),"range-state":g(E),"disabled-date":g(a),onChangerange:g(y),onPick:_e,onSelect:g(I)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),te("div",{class:z([[g(v).e("content"),g(b).e("content")],"is-right"])},[te("div",{class:z(g(b).e("header"))},[Q.unlinkPanels?(H(),le("button",{key:0,type:"button",disabled:!g(re),class:z([[g(v).e("icon-btn"),{"is-disabled":!g(re)}],"d-arrow-left"]),onClick:g(P)},[He(Q.$slots,"prev-year",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(Op))]),_:1})])],10,["disabled","onClick"])):Ge("v-if",!0),te("button",{type:"button",class:z([g(v).e("icon-btn"),"d-arrow-right"]),onClick:g(k)},[He(Q.$slots,"next-year",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(Sp))]),_:1})])],10,["onClick"]),te("div",null,Ke(g(F)),1)],2),oe(i1,{"selection-mode":"range",date:f.value,"min-date":g(p),"max-date":g(_),"range-state":g(E),"disabled-date":g(a),onChangerange:g(y),onPick:_e,onSelect:g(I)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var i0e=pt(s0e,[["__file","panel-month-range.vue"]]);const r0e=ht({...dx}),l0e=["pick","set-picker-option","calendar-change"],a0e=({unlinkPanels:e,leftDate:t,rightDate:n})=>{const s=()=>{t.value=t.value.subtract(10,"year"),e.value||(n.value=n.value.subtract(10,"year"))},i=()=>{e.value||(t.value=t.value.add(10,"year")),n.value=n.value.add(10,"year")},r=()=>{t.value=t.value.add(10,"year")},a=()=>{n.value=n.value.subtract(10,"year")},c=x(()=>{const p=Math.floor(t.value.year()/10)*10;return`${p}-${p+9}`}),u=x(()=>{const p=Math.floor(n.value.year()/10)*10;return`${p}-${p+9}`}),h=x(()=>Math.floor(t.value.year()/10)*10+9),f=x(()=>Math.floor(n.value.year()/10)*10);return{leftPrevYear:s,rightNextYear:i,leftNextYear:r,rightPrevYear:a,leftLabel:c,rightLabel:u,leftYear:h,rightYear:f}},dG="year",c0e=Re({name:"DatePickerYearRange"}),u0e=Re({...c0e,props:r0e,emits:l0e,setup(e,{emit:t}){const n=e,{lang:s}=xn(),i=K(en().locale(s.value)),r=K(i.value.add(10,"year")),{pickerNs:a}=It(YA),c=rt("date-range-picker"),u=x(()=>!!_e.length),h=x(()=>[a.b(),c.b(),{"has-sidebar":!!Ks().sidebar||u.value}]),f=x(()=>({content:[a.e("content"),c.e("content"),"is-left"],arrowLeftBtn:[a.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[a.e("icon-btn"),{[a.is("disabled")]:!w.value},"d-arrow-right"]})),p=x(()=>({content:[a.e("content"),c.e("content"),"is-right"],arrowLeftBtn:[a.e("icon-btn"),{"is-disabled":!w.value},"d-arrow-left"],arrowRightBtn:[a.e("icon-btn"),"d-arrow-right"]})),_=DY(s),{leftPrevYear:E,rightNextYear:v,leftNextYear:b,rightPrevYear:y,leftLabel:S,rightLabel:L,leftYear:I,rightYear:R}=a0e({unlinkPanels:oo(n,"unlinkPanels"),leftDate:i,rightDate:r}),w=x(()=>n.unlinkPanels&&R.value>I.value+1),k=K(),D=K(),P=K({endDate:null,selecting:!1}),B=be=>{P.value=be},F=(be,Ae=!0)=>{const We=be.minDate,$e=be.maxDate;D.value===$e&&k.value===We||(t("calendar-change",[We.toDate(),$e&&$e.toDate()]),D.value=$e,k.value=We,Ae&&X())},X=(be=!1)=>{YE([k.value,D.value])&&t("pick",[k.value,D.value],be)},G=be=>{P.value.selecting=be,be||(P.value.endDate=null)},re=It("EP_PICKER_BASE"),{shortcuts:_e,disabledDate:J}=re.props,Y=oo(re.props,"format"),ae=oo(re.props,"defaultValue"),Z=()=>{let be;if(at(ae.value)){const Ae=en(ae.value[0]);let We=en(ae.value[1]);return n.unlinkPanels||(We=Ae.add(10,dG)),[Ae,We]}else ae.value?be=en(ae.value):be=en();return be=be.locale(s.value),[be,be.add(10,dG)]};tt(()=>ae.value,be=>{if(be){const Ae=Z();i.value=Ae[0],r.value=Ae[1]}},{immediate:!0}),tt(()=>n.parsedValue,be=>{if(be&&be.length===2)if(k.value=be[0],D.value=be[1],i.value=k.value,n.unlinkPanels&&D.value){const Ae=k.value.year(),We=D.value.year();r.value=Ae===We?D.value.add(10,"year"):D.value}else r.value=i.value.add(10,"year");else{const Ae=Z();k.value=void 0,D.value=void 0,i.value=Ae[0],r.value=Ae[1]}},{immediate:!0});const Q=be=>at(be)?be.map(Ae=>en(Ae,Y.value).locale(s.value)):en(be,Y.value).locale(s.value),he=be=>at(be)?be.map(Ae=>Ae.format(Y.value)):be.format(Y.value),ge=be=>YE(be)&&(J?!J(be[0].toDate())&&!J(be[1].toDate()):!0),Ie=()=>{const be=Z();i.value=be[0],r.value=be[1],D.value=void 0,k.value=void 0,t("pick",null)};return t("set-picker-option",["isValidValue",ge]),t("set-picker-option",["parseUserInput",Q]),t("set-picker-option",["formatToString",he]),t("set-picker-option",["handleClear",Ie]),(be,Ae)=>(H(),le("div",{class:z(g(h))},[te("div",{class:z(g(a).e("body-wrapper"))},[He(be.$slots,"sidebar",{class:z(g(a).e("sidebar"))}),g(u)?(H(),le("div",{key:0,class:z(g(a).e("sidebar"))},[(H(!0),le(Lt,null,In(g(_e),(We,$e)=>(H(),le("button",{key:$e,type:"button",class:z(g(a).e("shortcut")),onClick:ve=>g(_)(We)},Ke(We.text),11,["onClick"]))),128))],2)):Ge("v-if",!0),te("div",{class:z(g(a).e("body"))},[te("div",{class:z(g(f).content)},[te("div",{class:z(g(c).e("header"))},[te("button",{type:"button",class:z(g(f).arrowLeftBtn),onClick:g(E)},[He(be.$slots,"prev-year",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(Op))]),_:1})])],10,["onClick"]),be.unlinkPanels?(H(),le("button",{key:0,type:"button",disabled:!g(w),class:z(g(f).arrowRightBtn),onClick:g(b)},[He(be.$slots,"next-year",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(Sp))]),_:1})])],10,["disabled","onClick"])):Ge("v-if",!0),te("div",null,Ke(g(S)),1)],2),oe(r1,{"selection-mode":"range",date:i.value,"min-date":k.value,"max-date":D.value,"range-state":P.value,"disabled-date":g(J),onChangerange:B,onPick:F,onSelect:G},null,8,["date","min-date","max-date","range-state","disabled-date"])],2),te("div",{class:z(g(p).content)},[te("div",{class:z(g(c).e("header"))},[be.unlinkPanels?(H(),le("button",{key:0,type:"button",disabled:!g(w),class:z(g(p).arrowLeftBtn),onClick:g(y)},[He(be.$slots,"prev-year",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(Op))]),_:1})])],10,["disabled","onClick"])):Ge("v-if",!0),te("button",{type:"button",class:z(g(p).arrowRightBtn),onClick:g(v)},[He(be.$slots,"next-year",{},()=>[oe(g(Nt),null,{default:de(()=>[oe(g(Sp))]),_:1})])],10,["onClick"]),te("div",null,Ke(g(L)),1)],2),oe(r1,{"selection-mode":"range",date:r.value,"min-date":k.value,"max-date":D.value,"range-state":P.value,"disabled-date":g(J),onChangerange:B,onPick:F,onSelect:G},null,8,["date","min-date","max-date","range-state","disabled-date"])],2)],2)],2)],2))}});var d0e=pt(u0e,[["__file","panel-year-range.vue"]]);const h0e=function(e){switch(e){case"daterange":case"datetimerange":return ZIe;case"monthrange":return i0e;case"yearrange":return d0e;default:return QIe}};en.extend(nY);en.extend(Q$e);en.extend(ax);en.extend(eIe);en.extend(sIe);en.extend(aIe);en.extend(hIe);en.extend(mIe);var f0e=Re({name:"ElDatePicker",install:null,props:PIe,emits:["update:modelValue"],setup(e,{expose:t,emit:n,slots:s}){const i=rt("picker-panel");An("ElPopperOptions",Kn(oo(e,"popperOptions"))),An(YA,{slots:s,pickerNs:i});const r=K();t({focus:()=>{var u;(u=r.value)==null||u.focus()},blur:()=>{var u;(u=r.value)==null||u.blur()},handleOpen:()=>{var u;(u=r.value)==null||u.handleOpen()},handleClose:()=>{var u;(u=r.value)==null||u.handleClose()}});const c=u=>{n("update:modelValue",u)};return()=>{var u;const h=(u=e.format)!=null?u:_Ie[e.type]||qT,f=h0e(e.type);return oe(AY,$n(e,{format:h,type:e.type,ref:r,"onUpdate:modelValue":c}),{default:p=>oe(f,p,{"prev-month":s["prev-month"],"next-month":s["next-month"],"prev-year":s["prev-year"],"next-year":s["next-year"]}),"range-separator":s["range-separator"]})}}});const p0e=nn(f0e),gx=Symbol("elDescriptions");var bS=Re({name:"ElDescriptionsCell",props:{cell:{type:Object},tag:{type:String,default:"td"},type:{type:String}},setup(){return{descriptions:It(gx,{})}},render(){var e;const t=dSe(this.cell),n=(((e=this.cell)==null?void 0:e.dirs)||[]).map(S=>{const{dir:L,arg:I,modifiers:R,value:w}=S;return[L,w,I,R]}),{border:s,direction:i}=this.descriptions,r=i==="vertical",a=()=>{var S,L,I;return((I=(L=(S=this.cell)==null?void 0:S.children)==null?void 0:L.label)==null?void 0:I.call(L))||t.label},c=()=>{var S,L,I;return(I=(L=(S=this.cell)==null?void 0:S.children)==null?void 0:L.default)==null?void 0:I.call(L)},u=t.span,h=t.rowspan,f=t.align?`is-${t.align}`:"",p=t.labelAlign?`is-${t.labelAlign}`:f,_=t.className,E=t.labelClassName,v=this.type==="label"&&(t.labelWidth||this.descriptions.labelWidth)||t.width,b={width:bs(v),minWidth:bs(t.minWidth)},y=rt("descriptions");switch(this.type){case"label":return an(Gt(this.tag,{style:b,class:[y.e("cell"),y.e("label"),y.is("bordered-label",s),y.is("vertical-label",r),p,E],colSpan:r?u:1,rowspan:r?1:h},a()),n);case"content":return an(Gt(this.tag,{style:b,class:[y.e("cell"),y.e("content"),y.is("bordered-content",s),y.is("vertical-content",r),f,_],colSpan:r?u:u*2-1,rowspan:r?h*2-1:h},c()),n);default:{const S=a();return an(Gt("td",{style:b,class:[y.e("cell"),f],colSpan:u,rowspan:h},[hi(S)?void 0:Gt("span",{class:[y.e("label"),E]},S),Gt("span",{class:[y.e("content"),_]},c())]),n)}}}});const g0e=ht({row:{type:xe(Array),default:()=>[]}}),m0e=Re({name:"ElDescriptionsRow"}),_0e=Re({...m0e,props:g0e,setup(e){const t=It(gx,{});return(n,s)=>g(t).direction==="vertical"?(H(),le(Lt,{key:0},[te("tr",null,[(H(!0),le(Lt,null,In(n.row,(i,r)=>(H(),Ye(g(bS),{key:`tr1-${r}`,cell:i,tag:"th",type:"label"},null,8,["cell"]))),128))]),te("tr",null,[(H(!0),le(Lt,null,In(n.row,(i,r)=>(H(),Ye(g(bS),{key:`tr2-${r}`,cell:i,tag:"td",type:"content"},null,8,["cell"]))),128))])],64)):(H(),le("tr",{key:1},[(H(!0),le(Lt,null,In(n.row,(i,r)=>(H(),le(Lt,{key:`tr3-${r}`},[g(t).border?(H(),le(Lt,{key:0},[oe(g(bS),{cell:i,tag:"td",type:"label"},null,8,["cell"]),oe(g(bS),{cell:i,tag:"td",type:"content"},null,8,["cell"])],64)):(H(),Ye(g(bS),{key:1,cell:i,tag:"td",type:"both"},null,8,["cell"]))],64))),128))]))}});var T0e=pt(_0e,[["__file","descriptions-row.vue"]]);const E0e=ht({border:Boolean,column:{type:Number,default:3},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},size:Ys,title:{type:String,default:""},extra:{type:String,default:""},labelWidth:{type:[String,Number],default:""}}),v0e=Re({name:"ElDescriptions"}),b0e=Re({...v0e,props:E0e,setup(e){const t=e,n=rt("descriptions"),s=Fs(),i=Ks();An(gx,t);const r=x(()=>[n.b(),n.m(s.value)]),a=(u,h,f,p=!1)=>(u.props||(u.props={}),h>f&&(u.props.span=f),p&&(u.props.span=h),u),c=()=>{if(!i.default)return[];const u=dp(i.default()).filter(v=>{var b;return((b=v==null?void 0:v.type)==null?void 0:b.name)==="ElDescriptionsItem"}),h=[];let f=[],p=t.column,_=0;const E=[];return u.forEach((v,b)=>{var y,S,L;const I=((y=v.props)==null?void 0:y.span)||1,R=((S=v.props)==null?void 0:S.rowspan)||1,w=h.length;if(E[w]||(E[w]=0),R>1)for(let k=1;k<R;k++)E[L=w+k]||(E[L]=0),E[w+k]++,_++;if(E[w]>0&&(p-=E[w],E[w]=0),b<u.length-1&&(_+=I>p?p:I),b===u.length-1){const k=t.column-_%t.column;f.push(a(v,k,p,!0)),h.push(f);return}I<p?(p-=I,f.push(v)):(f.push(a(v,I,p)),h.push(f),p=t.column,f=[])}),h};return(u,h)=>(H(),le("div",{class:z(g(r))},[u.title||u.extra||u.$slots.title||u.$slots.extra?(H(),le("div",{key:0,class:z(g(n).e("header"))},[te("div",{class:z(g(n).e("title"))},[He(u.$slots,"title",{},()=>[Xt(Ke(u.title),1)])],2),te("div",{class:z(g(n).e("extra"))},[He(u.$slots,"extra",{},()=>[Xt(Ke(u.extra),1)])],2)],2)):Ge("v-if",!0),te("div",{class:z(g(n).e("body"))},[te("table",{class:z([g(n).e("table"),g(n).is("bordered",u.border)])},[te("tbody",null,[(H(!0),le(Lt,null,In(c(),(f,p)=>(H(),Ye(T0e,{key:p,row:f},null,8,["row"]))),128))])],2)],2)],2))}});var O0e=pt(b0e,[["__file","description.vue"]]);const S0e=ht({label:{type:String,default:""},span:{type:Number,default:1},rowspan:{type:Number,default:1},width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},labelWidth:{type:[String,Number],default:""},align:{type:String,default:"left"},labelAlign:{type:String,default:""},className:{type:String,default:""},labelClassName:{type:String,default:""}}),BY=Re({name:"ElDescriptionsItem",props:S0e}),y0e=nn(O0e,{DescriptionsItem:BY}),$0e=is(BY),mx=e=>{if(!e)return{onClick:ro,onMousedown:ro,onMouseup:ro};let t=!1,n=!1;return{onClick:a=>{t&&n&&e(a),t=n=!1},onMousedown:a=>{t=a.target===a.currentTarget},onMouseup:a=>{n=a.target===a.currentTarget}}},I0e=ht({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:xe([String,Array,Object])},zIndex:{type:xe([String,Number])}}),R0e={click:e=>e instanceof MouseEvent},C0e="overlay";var M0e=Re({name:"ElOverlay",props:I0e,emits:R0e,setup(e,{slots:t,emit:n}){const s=rt(C0e),i=u=>{n("click",u)},{onClick:r,onMousedown:a,onMouseup:c}=mx(e.customMaskEvent?void 0:i);return()=>e.mask?oe("div",{class:[s.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:r,onMousedown:a,onMouseup:c},[He(t,"default")],Ka.STYLE|Ka.CLASS|Ka.PROPS,["onClick","onMouseup","onMousedown"]):Gt("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[He(t,"default")])}});const _x=M0e,FY=Symbol("dialogInjectionKey"),UY=ht({center:Boolean,alignCenter:Boolean,closeIcon:{type:To},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),A0e={close:()=>!0},HY=(e,t,n,s)=>{let i={offsetX:0,offsetY:0};const r=h=>{const f=h.clientX,p=h.clientY,{offsetX:_,offsetY:E}=i,v=e.value.getBoundingClientRect(),b=v.left,y=v.top,S=v.width,L=v.height,I=document.documentElement.clientWidth,R=document.documentElement.clientHeight,w=-b+_,k=-y+E,D=I-b-S+_,P=R-y-L+E,B=X=>{let G=_+X.clientX-f,re=E+X.clientY-p;s!=null&&s.value||(G=Math.min(Math.max(G,w),D),re=Math.min(Math.max(re,k),P)),i={offsetX:G,offsetY:re},e.value&&(e.value.style.transform=`translate(${bs(G)}, ${bs(re)})`)},F=()=>{document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",F)};document.addEventListener("mousemove",B),document.addEventListener("mouseup",F)},a=()=>{t.value&&e.value&&t.value.addEventListener("mousedown",r)},c=()=>{t.value&&e.value&&t.value.removeEventListener("mousedown",r)},u=()=>{i={offsetX:0,offsetY:0},e.value&&(e.value.style.transform="none")};return rn(()=>{Zs(()=>{n.value?a():c()})}),vo(()=>{c()}),{resetPosition:u}},KA=(...e)=>t=>{e.forEach(n=>{Ut(n)?n(t):n.value=t})},L0e=Re({name:"ElDialogContent"}),w0e=Re({...L0e,props:UY,emits:A0e,setup(e,{expose:t}){const n=e,{t:s}=xn(),{Close:i}=HD,{dialogRef:r,headerRef:a,bodyId:c,ns:u,style:h}=It(FY),{focusTrapRef:f}=It(YD),p=x(()=>[u.b(),u.is("fullscreen",n.fullscreen),u.is("draggable",n.draggable),u.is("align-center",n.alignCenter),{[u.m("center")]:n.center}]),_=KA(f,r),E=x(()=>n.draggable),v=x(()=>n.overflow),{resetPosition:b}=HY(r,a,E,v);return t({resetPosition:b}),(y,S)=>(H(),le("div",{ref:g(_),class:z(g(p)),style:Bt(g(h)),tabindex:"-1"},[te("header",{ref_key:"headerRef",ref:a,class:z([g(u).e("header"),{"show-close":y.showClose}])},[He(y.$slots,"header",{},()=>[te("span",{role:"heading","aria-level":y.ariaLevel,class:z(g(u).e("title"))},Ke(y.title),11,["aria-level"])]),y.showClose?(H(),le("button",{key:0,"aria-label":g(s)("el.dialog.close"),class:z(g(u).e("headerbtn")),type:"button",onClick:L=>y.$emit("close")},[oe(g(Nt),{class:z(g(u).e("close"))},{default:de(()=>[(H(),Ye(yn(y.closeIcon||g(i))))]),_:1},8,["class"])],10,["aria-label","onClick"])):Ge("v-if",!0)],2),te("div",{id:g(c),class:z(g(u).e("body"))},[He(y.$slots,"default")],10,["id"]),y.$slots.footer?(H(),le("footer",{key:0,class:z(g(u).e("footer"))},[He(y.$slots,"footer")],2)):Ge("v-if",!0)],6))}});var k0e=pt(w0e,[["__file","dialog-content.vue"]]);const VY=ht({...UY,appendToBody:Boolean,appendTo:{type:xe([String,Object]),default:"body"},beforeClose:{type:xe(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),GY={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[un]:e=>Io(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},Tx=(e,t={})=>{po(e)||ti("[useLockscreen]","You need to pass a ref param to this function");const n=t.ns||rt("popup"),s=x(()=>n.bm("parent","hidden"));if(!Dn||Pl(document.body,s.value))return;let i=0,r=!1,a="0";const c=()=>{setTimeout(()=>{typeof document>"u"||(Dr(document==null?void 0:document.body,s.value),r&&document&&(document.body.style.width=a))},200)};tt(e,u=>{if(!u){c();return}r=!Pl(document.body,s.value),r&&(a=document.body.style.width),i=u6(n.namespace.value);const h=document.documentElement.clientHeight<document.body.scrollHeight,f=hh(document.body,"overflowY");i>0&&(h||f==="scroll")&&r&&(document.body.style.width=`calc(100% - ${i}px)`),ec(document.body,s.value)}),eP(()=>c())},WY=(e,t)=>{var n;const i=pn().emit,{nextZIndex:r}=pv();let a="";const c=Gi(),u=Gi(),h=K(!1),f=K(!1),p=K(!1),_=K((n=e.zIndex)!=null?n:r());let E,v;const b=BA("namespace",KS),y=x(()=>{const J={},Y=`--${b.value}-dialog`;return e.fullscreen||(e.top&&(J[`${Y}-margin-top`]=e.top),e.width&&(J[`${Y}-width`]=bs(e.width))),J}),S=x(()=>e.alignCenter?{display:"flex"}:{});function L(){i("opened")}function I(){i("closed"),i(un,!1),e.destroyOnClose&&(p.value=!1)}function R(){i("close")}function w(){v==null||v(),E==null||E(),e.openDelay&&e.openDelay>0?{stop:E}=xm(()=>B(),e.openDelay):B()}function k(){E==null||E(),v==null||v(),e.closeDelay&&e.closeDelay>0?{stop:v}=xm(()=>F(),e.closeDelay):F()}function D(){function J(Y){Y||(f.value=!0,h.value=!1)}e.beforeClose?e.beforeClose(J):k()}function P(){e.closeOnClickModal&&D()}function B(){Dn&&(h.value=!0)}function F(){h.value=!1}function X(){i("openAutoFocus")}function G(){i("closeAutoFocus")}function re(J){var Y;((Y=J.detail)==null?void 0:Y.focusReason)==="pointer"&&J.preventDefault()}e.lockScroll&&Tx(h);function _e(){e.closeOnPressEscape&&D()}return tt(()=>e.modelValue,J=>{J?(f.value=!1,w(),p.value=!0,_.value=z5(e.zIndex)?r():_.value++,Vt(()=>{i("open"),t.value&&(t.value.scrollTop=0)})):h.value&&k()}),tt(()=>e.fullscreen,J=>{t.value&&(J?(a=t.value.style.transform,t.value.style.transform=""):t.value.style.transform=a)}),rn(()=>{e.modelValue&&(h.value=!0,p.value=!0,w())}),{afterEnter:L,afterLeave:I,beforeLeave:R,handleClose:D,onModalClick:P,close:k,doClose:F,onOpenAutoFocus:X,onCloseAutoFocus:G,onCloseRequested:_e,onFocusoutPrevented:re,titleId:c,bodyId:u,closed:f,style:y,overlayDialogStyle:S,rendered:p,visible:h,zIndex:_}},N0e=Re({name:"ElDialog",inheritAttrs:!1}),P0e=Re({...N0e,props:VY,emits:GY,setup(e,{expose:t}){const n=e,s=Ks();cp({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},x(()=>!!s.title));const i=rt("dialog"),r=K(),a=K(),c=K(),{visible:u,titleId:h,bodyId:f,style:p,overlayDialogStyle:_,rendered:E,zIndex:v,afterEnter:b,afterLeave:y,beforeLeave:S,handleClose:L,onModalClick:I,onOpenAutoFocus:R,onCloseAutoFocus:w,onCloseRequested:k,onFocusoutPrevented:D}=WY(n,r);An(FY,{dialogRef:r,headerRef:a,bodyId:f,ns:i,rendered:E,style:p});const P=mx(I),B=x(()=>n.draggable&&!n.fullscreen);return t({visible:u,dialogContentRef:c,resetPosition:()=>{var X;(X=c.value)==null||X.resetPosition()}}),(X,G)=>(H(),Ye(g(_v),{to:X.appendTo,disabled:X.appendTo!=="body"?!1:!X.appendToBody},{default:de(()=>[oe(Li,{name:"dialog-fade",onAfterEnter:g(b),onAfterLeave:g(y),onBeforeLeave:g(S),persisted:""},{default:de(()=>[an(oe(g(_x),{"custom-mask-event":"",mask:X.modal,"overlay-class":X.modalClass,"z-index":g(v)},{default:de(()=>[te("div",{role:"dialog","aria-modal":"true","aria-label":X.title||void 0,"aria-labelledby":X.title?void 0:g(h),"aria-describedby":g(f),class:z(`${g(i).namespace.value}-overlay-dialog`),style:Bt(g(_)),onClick:g(P).onClick,onMousedown:g(P).onMousedown,onMouseup:g(P).onMouseup},[oe(g(mv),{loop:"",trapped:g(u),"focus-start-el":"container",onFocusAfterTrapped:g(R),onFocusAfterReleased:g(w),onFocusoutPrevented:g(D),onReleaseRequested:g(k)},{default:de(()=>[g(E)?(H(),Ye(k0e,$n({key:0,ref_key:"dialogContentRef",ref:c},X.$attrs,{center:X.center,"align-center":X.alignCenter,"close-icon":X.closeIcon,draggable:g(B),overflow:X.overflow,fullscreen:X.fullscreen,"show-close":X.showClose,title:X.title,"aria-level":X.headerAriaLevel,onClose:g(L)}),ic({header:de(()=>[X.$slots.title?He(X.$slots,"title",{key:1}):He(X.$slots,"header",{key:0,close:g(L),titleId:g(h),titleClass:g(i).e("title")})]),default:de(()=>[He(X.$slots,"default")]),_:2},[X.$slots.footer?{name:"footer",fn:de(()=>[He(X.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):Ge("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[Yn,g(u)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var D0e=pt(P0e,[["__file","dialog.vue"]]);const x0e=nn(D0e),B0e=ht({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:xe(String),default:"solid"}}),F0e=Re({name:"ElDivider"}),U0e=Re({...F0e,props:B0e,setup(e){const t=e,n=rt("divider"),s=x(()=>n.cssVar({"border-style":t.borderStyle}));return(i,r)=>(H(),le("div",{class:z([g(n).b(),g(n).m(i.direction)]),style:Bt(g(s)),role:"separator"},[i.$slots.default&&i.direction!=="vertical"?(H(),le("div",{key:0,class:z([g(n).e("text"),g(n).is(i.contentPosition)])},[He(i.$slots,"default")],2)):Ge("v-if",!0)],6))}});var H0e=pt(U0e,[["__file","divider.vue"]]);const XY=nn(H0e),V0e=ht({...VY,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),G0e=GY,W0e=Re({name:"ElDrawer",inheritAttrs:!1}),X0e=Re({...W0e,props:V0e,emits:G0e,setup(e,{expose:t}){const n=e,s=Ks();cp({scope:"el-drawer",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/drawer.html#slots"},x(()=>!!s.title));const i=K(),r=K(),a=rt("drawer"),{t:c}=xn(),{afterEnter:u,afterLeave:h,beforeLeave:f,visible:p,rendered:_,titleId:E,bodyId:v,zIndex:b,onModalClick:y,onOpenAutoFocus:S,onCloseAutoFocus:L,onFocusoutPrevented:I,onCloseRequested:R,handleClose:w}=WY(n,i),k=x(()=>n.direction==="rtl"||n.direction==="ltr"),D=x(()=>bs(n.size));return t({handleClose:w,afterEnter:u,afterLeave:h}),(P,B)=>(H(),Ye(g(_v),{to:P.appendTo,disabled:P.appendTo!=="body"?!1:!P.appendToBody},{default:de(()=>[oe(Li,{name:g(a).b("fade"),onAfterEnter:g(u),onAfterLeave:g(h),onBeforeLeave:g(f),persisted:""},{default:de(()=>[an(oe(g(_x),{mask:P.modal,"overlay-class":P.modalClass,"z-index":g(b),onClick:g(y)},{default:de(()=>[oe(g(mv),{loop:"",trapped:g(p),"focus-trap-el":i.value,"focus-start-el":r.value,onFocusAfterTrapped:g(S),onFocusAfterReleased:g(L),onFocusoutPrevented:g(I),onReleaseRequested:g(R)},{default:de(()=>[te("div",$n({ref_key:"drawerRef",ref:i,"aria-modal":"true","aria-label":P.title||void 0,"aria-labelledby":P.title?void 0:g(E),"aria-describedby":g(v)},P.$attrs,{class:[g(a).b(),P.direction,g(p)&&"open"],style:g(k)?"width: "+g(D):"height: "+g(D),role:"dialog",onClick:Yt(()=>{},["stop"])}),[te("span",{ref_key:"focusStartRef",ref:r,class:z(g(a).e("sr-focus")),tabindex:"-1"},null,2),P.withHeader?(H(),le("header",{key:0,class:z(g(a).e("header"))},[P.$slots.title?He(P.$slots,"title",{key:1},()=>[Ge(" DEPRECATED SLOT ")]):He(P.$slots,"header",{key:0,close:g(w),titleId:g(E),titleClass:g(a).e("title")},()=>[P.$slots.title?Ge("v-if",!0):(H(),le("span",{key:0,id:g(E),role:"heading","aria-level":P.headerAriaLevel,class:z(g(a).e("title"))},Ke(P.title),11,["id","aria-level"]))]),P.showClose?(H(),le("button",{key:2,"aria-label":g(c)("el.drawer.close"),class:z(g(a).e("close-btn")),type:"button",onClick:g(w)},[oe(g(Nt),{class:z(g(a).e("close"))},{default:de(()=>[oe(g(zc))]),_:1},8,["class"])],10,["aria-label","onClick"])):Ge("v-if",!0)],2)):Ge("v-if",!0),g(_)?(H(),le("div",{key:1,id:g(v),class:z(g(a).e("body"))},[He(P.$slots,"default")],10,["id"])):Ge("v-if",!0),P.$slots.footer?(H(),le("div",{key:2,class:z(g(a).e("footer"))},[He(P.$slots,"footer")],2)):Ge("v-if",!0)],16,["aria-label","aria-labelledby","aria-describedby","onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[Yn,g(p)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var z0e=pt(X0e,[["__file","drawer.vue"]]);const Y0e=nn(z0e),K0e=Re({inheritAttrs:!1});function j0e(e,t,n,s,i,r){return He(e.$slots,"default")}var Q0e=pt(K0e,[["render",j0e],["__file","collection.vue"]]);const q0e=Re({name:"ElCollectionItem",inheritAttrs:!1});function J0e(e,t,n,s,i,r){return He(e.$slots,"default")}var Z0e=pt(q0e,[["render",J0e],["__file","collection-item.vue"]]);const zY="data-el-collection-item",YY=e=>{const t=`El${e}Collection`,n=`${t}Item`,s=Symbol(t),i=Symbol(n),r={...Q0e,name:t,setup(){const c=K(null),u=new Map;An(s,{itemMap:u,getItems:()=>{const f=g(c);if(!f)return[];const p=Array.from(f.querySelectorAll(`[${zY}]`));return[...u.values()].sort((E,v)=>p.indexOf(E.ref)-p.indexOf(v.ref))},collectionRef:c})}},a={...Z0e,name:n,setup(c,{attrs:u}){const h=K(null),f=It(s,void 0);An(i,{collectionItemRef:h}),rn(()=>{const p=g(h);p&&f.itemMap.set(p,{ref:p,...u})}),vo(()=>{const p=g(h);f.itemMap.delete(p)})}};return{COLLECTION_INJECTION_KEY:s,COLLECTION_ITEM_INJECTION_KEY:i,ElCollection:r,ElCollectionItem:a}},eRe=ht({style:{type:xe([String,Array,Object])},currentTabId:{type:xe(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:xe(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:tRe,ElCollectionItem:nRe,COLLECTION_INJECTION_KEY:Ex,COLLECTION_ITEM_INJECTION_KEY:oRe}=YY("RovingFocusGroup"),vx=Symbol("elRovingFocusGroup"),KY=Symbol("elRovingFocusGroupItem"),sRe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},iRe=(e,t)=>e,rRe=(e,t,n)=>{const s=iRe(e.code);return sRe[s]},lRe=(e,t)=>e.map((n,s)=>e[(s+t)%e.length]),bx=e=>{const{activeElement:t}=document;for(const n of e)if(n===t||(n.focus(),t!==document.activeElement))return},hG="currentTabIdChange",fG="rovingFocusGroup.entryFocus",aRe={bubbles:!1,cancelable:!0},cRe=Re({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:eRe,emits:[hG,"entryFocus"],setup(e,{emit:t}){var n;const s=K((n=e.currentTabId||e.defaultCurrentTabId)!=null?n:null),i=K(!1),r=K(!1),a=K(null),{getItems:c}=It(Ex,void 0),u=x(()=>[{outline:"none"},e.style]),h=b=>{t(hG,b)},f=()=>{i.value=!0},p=vs(b=>{var y;(y=e.onMousedown)==null||y.call(e,b)},()=>{r.value=!0}),_=vs(b=>{var y;(y=e.onFocus)==null||y.call(e,b)},b=>{const y=!g(r),{target:S,currentTarget:L}=b;if(S===L&&y&&!g(i)){const I=new Event(fG,aRe);if(L==null||L.dispatchEvent(I),!I.defaultPrevented){const R=c().filter(B=>B.focusable),w=R.find(B=>B.active),k=R.find(B=>B.id===g(s)),P=[w,k,...R].filter(Boolean).map(B=>B.ref);bx(P)}}r.value=!1}),E=vs(b=>{var y;(y=e.onBlur)==null||y.call(e,b)},()=>{i.value=!1}),v=(...b)=>{t("entryFocus",...b)};An(vx,{currentTabbedId:ov(s),loop:oo(e,"loop"),tabIndex:x(()=>g(i)?-1:0),rovingFocusGroupRef:a,rovingFocusGroupRootStyle:u,orientation:oo(e,"orientation"),dir:oo(e,"dir"),onItemFocus:h,onItemShiftTab:f,onBlur:E,onFocus:_,onMousedown:p}),tt(()=>e.currentTabId,b=>{s.value=b??null}),fo(a,fG,v)}});function uRe(e,t,n,s,i,r){return He(e.$slots,"default")}var dRe=pt(cRe,[["render",uRe],["__file","roving-focus-group-impl.vue"]]);const hRe=Re({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:tRe,ElRovingFocusGroupImpl:dRe}});function fRe(e,t,n,s,i,r){const a=Ot("el-roving-focus-group-impl"),c=Ot("el-focus-group-collection");return H(),Ye(c,null,{default:de(()=>[oe(a,qa(Th(e.$attrs)),{default:de(()=>[He(e.$slots,"default")]),_:3},16)]),_:3})}var pRe=pt(hRe,[["render",fRe],["__file","roving-focus-group.vue"]]);const SC=ht({trigger:Hy.trigger,triggerKeys:{type:xe(Array),default:()=>[$t.enter,$t.numpadEnter,$t.space,$t.down]},effect:{...Si.effect,default:"light"},type:{type:xe(String)},placement:{type:xe(String),default:"bottom"},popperOptions:{type:xe(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:xe([Number,String]),default:0},maxHeight:{type:xe([Number,String]),default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,default:"menu"},buttonProps:{type:xe(Object)},teleported:Si.teleported}),jY=ht({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:To}}),gRe=ht({onKeydown:{type:xe(Function)}}),mRe=[$t.down,$t.pageDown,$t.home],QY=[$t.up,$t.pageUp,$t.end],_Re=[...mRe,...QY],{ElCollection:TRe,ElCollectionItem:ERe,COLLECTION_INJECTION_KEY:vRe,COLLECTION_ITEM_INJECTION_KEY:bRe}=YY("Dropdown"),jA=Symbol("elDropdown"),{ButtonGroup:ORe}=Mi,SRe=Re({name:"ElDropdown",components:{ElButton:Mi,ElButtonGroup:ORe,ElScrollbar:ld,ElDropdownCollection:TRe,ElTooltip:rr,ElRovingFocusGroup:pRe,ElOnlyChild:R6,ElIcon:Nt,ArrowDown:kh},props:SC,emits:["visible-change","click","command"],setup(e,{emit:t}){const n=pn(),s=rt("dropdown"),{t:i}=xn(),r=K(),a=K(),c=K(null),u=K(null),h=K(null),f=K(null),p=K(!1),_=x(()=>({maxHeight:bs(e.maxHeight)})),E=x(()=>[s.m(R.value)]),v=x(()=>wr(e.trigger)),b=Gi().value,y=x(()=>e.id||b);tt([r,v],([Y,ae],[Z])=>{var Q,he,ge;(Q=Z==null?void 0:Z.$el)!=null&&Q.removeEventListener&&Z.$el.removeEventListener("pointerenter",k),(he=Y==null?void 0:Y.$el)!=null&&he.removeEventListener&&Y.$el.removeEventListener("pointerenter",k),(ge=Y==null?void 0:Y.$el)!=null&&ge.addEventListener&&ae.includes("hover")&&Y.$el.addEventListener("pointerenter",k)},{immediate:!0}),vo(()=>{var Y,ae;(ae=(Y=r.value)==null?void 0:Y.$el)!=null&&ae.removeEventListener&&r.value.$el.removeEventListener("pointerenter",k)});function S(){L()}function L(){var Y;(Y=c.value)==null||Y.onClose()}function I(){var Y;(Y=c.value)==null||Y.onOpen()}const R=Fs();function w(...Y){t("command",...Y)}function k(){var Y,ae;(ae=(Y=r.value)==null?void 0:Y.$el)==null||ae.focus()}function D(){}function P(){const Y=g(u);v.value.includes("hover")&&(Y==null||Y.focus()),f.value=null}function B(Y){f.value=Y}function F(Y){p.value||(Y.preventDefault(),Y.stopImmediatePropagation())}function X(){t("visible-change",!0)}function G(Y){(Y==null?void 0:Y.type)==="keydown"&&u.value.focus()}function re(){t("visible-change",!1)}return An(jA,{contentRef:u,role:x(()=>e.role),triggerId:y,isUsingKeyboard:p,onItemEnter:D,onItemLeave:P}),An("elDropdown",{instance:n,dropdownSize:R,handleClick:S,commandHandler:w,trigger:oo(e,"trigger"),hideOnClick:oo(e,"hideOnClick")}),{t:i,ns:s,scrollbar:h,wrapStyle:_,dropdownTriggerKls:E,dropdownSize:R,triggerId:y,currentTabId:f,handleCurrentTabIdChange:B,handlerMainButtonClick:Y=>{t("click",Y)},handleEntryFocus:F,handleClose:L,handleOpen:I,handleBeforeShowTooltip:X,handleShowTooltip:G,handleBeforeHideTooltip:re,onFocusAfterTrapped:Y=>{var ae,Z;Y.preventDefault(),(Z=(ae=u.value)==null?void 0:ae.focus)==null||Z.call(ae,{preventScroll:!0})},popperRef:c,contentRef:u,triggeringElementRef:r,referenceElementRef:a}}});function yRe(e,t,n,s,i,r){var a;const c=Ot("el-dropdown-collection"),u=Ot("el-roving-focus-group"),h=Ot("el-scrollbar"),f=Ot("el-only-child"),p=Ot("el-tooltip"),_=Ot("el-button"),E=Ot("arrow-down"),v=Ot("el-icon"),b=Ot("el-button-group");return H(),le("div",{class:z([e.ns.b(),e.ns.is("disabled",e.disabled)])},[oe(p,{ref:"popperRef",role:e.role,effect:e.effect,"fallback-placements":["bottom","top"],"popper-options":e.popperOptions,"gpu-acceleration":!1,"hide-after":e.trigger==="hover"?e.hideTimeout:0,"manual-mode":!0,placement:e.placement,"popper-class":[e.ns.e("popper"),e.popperClass],"reference-element":(a=e.referenceElementRef)==null?void 0:a.$el,trigger:e.trigger,"trigger-keys":e.triggerKeys,"trigger-target-el":e.contentRef,"show-after":e.trigger==="hover"?e.showTimeout:0,"stop-popper-mouse-event":!1,"virtual-ref":e.triggeringElementRef,"virtual-triggering":e.splitButton,disabled:e.disabled,transition:`${e.ns.namespace.value}-zoom-in-top`,teleported:e.teleported,pure:"",persistent:"",onBeforeShow:e.handleBeforeShowTooltip,onShow:e.handleShowTooltip,onBeforeHide:e.handleBeforeHideTooltip},ic({content:de(()=>[oe(h,{ref:"scrollbar","wrap-style":e.wrapStyle,tag:"div","view-class":e.ns.e("list")},{default:de(()=>[oe(u,{loop:e.loop,"current-tab-id":e.currentTabId,orientation:"horizontal",onCurrentTabIdChange:e.handleCurrentTabIdChange,onEntryFocus:e.handleEntryFocus},{default:de(()=>[oe(c,null,{default:de(()=>[He(e.$slots,"dropdown")]),_:3})]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange","onEntryFocus"])]),_:3},8,["wrap-style","view-class"])]),_:2},[e.splitButton?void 0:{name:"default",fn:de(()=>[oe(f,{id:e.triggerId,ref:"triggeringElementRef",role:"button",tabindex:e.tabindex},{default:de(()=>[He(e.$slots,"default")]),_:3},8,["id","tabindex"])])}]),1032,["role","effect","popper-options","hide-after","placement","popper-class","reference-element","trigger","trigger-keys","trigger-target-el","show-after","virtual-ref","virtual-triggering","disabled","transition","teleported","onBeforeShow","onShow","onBeforeHide"]),e.splitButton?(H(),Ye(b,{key:0},{default:de(()=>[oe(_,$n({ref:"referenceElementRef"},e.buttonProps,{size:e.dropdownSize,type:e.type,disabled:e.disabled,tabindex:e.tabindex,onClick:e.handlerMainButtonClick}),{default:de(()=>[He(e.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),oe(_,$n({id:e.triggerId,ref:"triggeringElementRef"},e.buttonProps,{role:"button",size:e.dropdownSize,type:e.type,class:e.ns.e("caret-button"),disabled:e.disabled,tabindex:e.tabindex,"aria-label":e.t("el.dropdown.toggleDropdown")}),{default:de(()=>[oe(v,{class:z(e.ns.e("icon"))},{default:de(()=>[oe(E)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):Ge("v-if",!0)],2)}var $Re=pt(SRe,[["render",yRe],["__file","dropdown.vue"]]);const IRe=Re({components:{ElRovingFocusCollectionItem:nRe},props:{focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!1}},emits:["mousedown","focus","keydown"],setup(e,{emit:t}){const{currentTabbedId:n,loop:s,onItemFocus:i,onItemShiftTab:r}=It(vx,void 0),{getItems:a}=It(Ex,void 0),c=Gi(),u=K(null),h=vs(E=>{t("mousedown",E)},E=>{e.focusable?i(g(c)):E.preventDefault()}),f=vs(E=>{t("focus",E)},()=>{i(g(c))}),p=vs(E=>{t("keydown",E)},E=>{const{code:v,shiftKey:b,target:y,currentTarget:S}=E;if(v===$t.tab&&b){r();return}if(y!==S)return;const L=rRe(E);if(L){E.preventDefault();let R=a().filter(w=>w.focusable).map(w=>w.ref);switch(L){case"last":{R.reverse();break}case"prev":case"next":{L==="prev"&&R.reverse();const w=R.indexOf(S);R=s.value?lRe(R,w+1):R.slice(w+1);break}}Vt(()=>{bx(R)})}}),_=x(()=>n.value===g(c));return An(KY,{rovingFocusGroupItemRef:u,tabIndex:x(()=>g(_)?0:-1),handleMousedown:h,handleFocus:f,handleKeydown:p}),{id:c,handleKeydown:p,handleFocus:f,handleMousedown:h}}});function RRe(e,t,n,s,i,r){const a=Ot("el-roving-focus-collection-item");return H(),Ye(a,{id:e.id,focusable:e.focusable,active:e.active},{default:de(()=>[He(e.$slots,"default")]),_:3},8,["id","focusable","active"])}var CRe=pt(IRe,[["render",RRe],["__file","roving-focus-item.vue"]]);const MRe=Re({name:"DropdownItemImpl",components:{ElIcon:Nt},props:jY,emits:["pointermove","pointerleave","click","clickimpl"],setup(e,{emit:t}){const n=rt("dropdown"),{role:s}=It(jA,void 0),{collectionItemRef:i}=It(bRe,void 0),{collectionItemRef:r}=It(oRe,void 0),{rovingFocusGroupItemRef:a,tabIndex:c,handleFocus:u,handleKeydown:h,handleMousedown:f}=It(KY,void 0),p=KA(i,r,a),_=x(()=>s.value==="menu"?"menuitem":s.value==="navigation"?"link":"button"),E=vs(v=>{if([$t.enter,$t.numpadEnter,$t.space].includes(v.code))return v.preventDefault(),v.stopImmediatePropagation(),t("clickimpl",v),!0},h);return{ns:n,itemRef:p,dataset:{[zY]:""},role:_,tabIndex:c,handleFocus:u,handleKeydown:E,handleMousedown:f}}});function ARe(e,t,n,s,i,r){const a=Ot("el-icon");return H(),le(Lt,null,[e.divided?(H(),le("li",{key:0,role:"separator",class:z(e.ns.bem("menu","item","divided"))},null,2)):Ge("v-if",!0),te("li",$n({ref:e.itemRef},{...e.dataset,...e.$attrs},{"aria-disabled":e.disabled,class:[e.ns.be("menu","item"),e.ns.is("disabled",e.disabled)],tabindex:e.tabIndex,role:e.role,onClick:c=>e.$emit("clickimpl",c),onFocus:e.handleFocus,onKeydown:Yt(e.handleKeydown,["self"]),onMousedown:e.handleMousedown,onPointermove:c=>e.$emit("pointermove",c),onPointerleave:c=>e.$emit("pointerleave",c)}),[e.icon?(H(),Ye(a,{key:0},{default:de(()=>[(H(),Ye(yn(e.icon)))]),_:1})):Ge("v-if",!0),He(e.$slots,"default")],16,["aria-disabled","tabindex","role","onClick","onFocus","onKeydown","onMousedown","onPointermove","onPointerleave"])],64)}var LRe=pt(MRe,[["render",ARe],["__file","dropdown-item-impl.vue"]]);const qY=()=>{const e=It("elDropdown",{}),t=x(()=>e==null?void 0:e.dropdownSize);return{elDropdown:e,_elDropdownSize:t}},wRe=Re({name:"ElDropdownItem",components:{ElDropdownCollectionItem:ERe,ElRovingFocusItem:CRe,ElDropdownItemImpl:LRe},inheritAttrs:!1,props:jY,emits:["pointermove","pointerleave","click"],setup(e,{emit:t,attrs:n}){const{elDropdown:s}=qY(),i=pn(),r=K(null),a=x(()=>{var E,v;return(v=(E=g(r))==null?void 0:E.textContent)!=null?v:""}),{onItemEnter:c,onItemLeave:u}=It(jA,void 0),h=vs(E=>(t("pointermove",E),E.defaultPrevented),NV(E=>{if(e.disabled){u(E);return}const v=E.currentTarget;v===document.activeElement||v.contains(document.activeElement)||(c(E),E.defaultPrevented||v==null||v.focus())})),f=vs(E=>(t("pointerleave",E),E.defaultPrevented),NV(u)),p=vs(E=>{if(!e.disabled)return t("click",E),E.type!=="keydown"&&E.defaultPrevented},E=>{var v,b,y;if(e.disabled){E.stopImmediatePropagation();return}(v=s==null?void 0:s.hideOnClick)!=null&&v.value&&((b=s.handleClick)==null||b.call(s)),(y=s.commandHandler)==null||y.call(s,e.command,i,E)}),_=x(()=>({...e,...n}));return{handleClick:p,handlePointerMove:h,handlePointerLeave:f,textContent:a,propsAndAttrs:_}}});function kRe(e,t,n,s,i,r){var a;const c=Ot("el-dropdown-item-impl"),u=Ot("el-roving-focus-item"),h=Ot("el-dropdown-collection-item");return H(),Ye(h,{disabled:e.disabled,"text-value":(a=e.textValue)!=null?a:e.textContent},{default:de(()=>[oe(u,{focusable:!e.disabled},{default:de(()=>[oe(c,$n(e.propsAndAttrs,{onPointerleave:e.handlePointerLeave,onPointermove:e.handlePointerMove,onClickimpl:e.handleClick}),{default:de(()=>[He(e.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])]),_:3},8,["disabled","text-value"])}var JY=pt(wRe,[["render",kRe],["__file","dropdown-item.vue"]]);const NRe=Re({name:"ElDropdownMenu",props:gRe,setup(e){const t=rt("dropdown"),{_elDropdownSize:n}=qY(),s=n.value,{focusTrapRef:i,onKeydown:r}=It(YD,void 0),{contentRef:a,role:c,triggerId:u}=It(jA,void 0),{collectionRef:h,getItems:f}=It(vRe,void 0),{rovingFocusGroupRef:p,rovingFocusGroupRootStyle:_,tabIndex:E,onBlur:v,onFocus:b,onMousedown:y}=It(vx,void 0),{collectionRef:S}=It(Ex,void 0),L=x(()=>[t.b("menu"),t.bm("menu",s==null?void 0:s.value)]),I=KA(a,h,i,p,S),R=vs(k=>{var D;(D=e.onKeydown)==null||D.call(e,k)},k=>{const{currentTarget:D,code:P,target:B}=k;if(D.contains(B),$t.tab===P&&k.stopImmediatePropagation(),k.preventDefault(),B!==g(a)||!_Re.includes(P))return;const X=f().filter(G=>!G.disabled).map(G=>G.ref);QY.includes(P)&&X.reverse(),bx(X)});return{size:s,rovingFocusGroupRootStyle:_,tabIndex:E,dropdownKls:L,role:c,triggerId:u,dropdownListWrapperRef:I,handleKeydown:k=>{R(k),r(k)},onBlur:v,onFocus:b,onMousedown:y}}});function PRe(e,t,n,s,i,r){return H(),le("ul",{ref:e.dropdownListWrapperRef,class:z(e.dropdownKls),style:Bt(e.rovingFocusGroupRootStyle),tabindex:-1,role:e.role,"aria-labelledby":e.triggerId,onBlur:e.onBlur,onFocus:e.onFocus,onKeydown:Yt(e.handleKeydown,["self"]),onMousedown:Yt(e.onMousedown,["self"])},[He(e.$slots,"default")],46,["role","aria-labelledby","onBlur","onFocus","onKeydown","onMousedown"])}var ZY=pt(NRe,[["render",PRe],["__file","dropdown-menu.vue"]]);const DRe=nn($Re,{DropdownItem:JY,DropdownMenu:ZY}),xRe=is(JY),BRe=is(ZY),FRe=Re({name:"ImgEmpty"}),URe=Re({...FRe,setup(e){const t=rt("empty"),n=Gi();return(s,i)=>(H(),le("svg",{viewBox:"0 0 79 86",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[te("defs",null,[te("linearGradient",{id:`linearGradient-1-${g(n)}`,x1:"38.8503086%",y1:"0%",x2:"61.1496914%",y2:"100%"},[te("stop",{"stop-color":`var(${g(t).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,["stop-color"]),te("stop",{"stop-color":`var(${g(t).cssVarBlockName("fill-color-4")})`,offset:"100%"},null,8,["stop-color"])],8,["id"]),te("linearGradient",{id:`linearGradient-2-${g(n)}`,x1:"0%",y1:"9.5%",x2:"100%",y2:"90.5%"},[te("stop",{"stop-color":`var(${g(t).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,["stop-color"]),te("stop",{"stop-color":`var(${g(t).cssVarBlockName("fill-color-6")})`,offset:"100%"},null,8,["stop-color"])],8,["id"]),te("rect",{id:`path-3-${g(n)}`,x:"0",y:"0",width:"17",height:"36"},null,8,["id"])]),te("g",{id:"Illustrations",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[te("g",{id:"B-type",transform:"translate(-1268.000000, -535.000000)"},[te("g",{id:"Group-2",transform:"translate(1268.000000, 535.000000)"},[te("path",{id:"Oval-Copy-2",d:"M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",fill:`var(${g(t).cssVarBlockName("fill-color-3")})`},null,8,["fill"]),te("polygon",{id:"Rectangle-Copy-14",fill:`var(${g(t).cssVarBlockName("fill-color-7")})`,transform:"translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",points:"13 58 53 58 42 45 2 45"},null,8,["fill"]),te("g",{id:"Group-Copy",transform:"translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)"},[te("polygon",{id:"Rectangle-Copy-10",fill:`var(${g(t).cssVarBlockName("fill-color-7")})`,transform:"translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",points:"2.84078316e-14 3 18 3 23 7 5 7"},null,8,["fill"]),te("polygon",{id:"Rectangle-Copy-11",fill:`var(${g(t).cssVarBlockName("fill-color-5")})`,points:"-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"},null,8,["fill"]),te("rect",{id:"Rectangle-Copy-12",fill:`url(#linearGradient-1-${g(n)})`,transform:"translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",x:"38",y:"7",width:"17",height:"36"},null,8,["fill"]),te("polygon",{id:"Rectangle-Copy-13",fill:`var(${g(t).cssVarBlockName("fill-color-2")})`,transform:"translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",points:"24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"},null,8,["fill"])]),te("rect",{id:"Rectangle-Copy-15",fill:`url(#linearGradient-2-${g(n)})`,x:"13",y:"45",width:"40",height:"36"},null,8,["fill"]),te("g",{id:"Rectangle-Copy-17",transform:"translate(53.000000, 45.000000)"},[te("use",{id:"Mask",fill:`var(${g(t).cssVarBlockName("fill-color-8")})`,transform:"translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ","xlink:href":`#path-3-${g(n)}`},null,8,["fill","xlink:href"]),te("polygon",{id:"Rectangle-Copy",fill:`var(${g(t).cssVarBlockName("fill-color-9")})`,mask:`url(#mask-4-${g(n)})`,transform:"translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",points:"7 0 24 0 20 18 7 16.5"},null,8,["fill","mask"])]),te("polygon",{id:"Rectangle-Copy-18",fill:`var(${g(t).cssVarBlockName("fill-color-2")})`,transform:"translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",points:"62 45 79 45 70 58 53 58"},null,8,["fill"])])])])]))}});var HRe=pt(URe,[["__file","img-empty.vue"]]);const VRe=ht({image:{type:String,default:""},imageSize:Number,description:{type:String,default:""}}),GRe=Re({name:"ElEmpty"}),WRe=Re({...GRe,props:VRe,setup(e){const t=e,{t:n}=xn(),s=rt("empty"),i=x(()=>t.description||n("el.table.emptyText")),r=x(()=>({width:bs(t.imageSize)}));return(a,c)=>(H(),le("div",{class:z(g(s).b())},[te("div",{class:z(g(s).e("image")),style:Bt(g(r))},[a.image?(H(),le("img",{key:0,src:a.image,ondragstart:"return false"},null,8,["src"])):He(a.$slots,"image",{key:1},()=>[oe(HRe)])],6),te("div",{class:z(g(s).e("description"))},[a.$slots.description?He(a.$slots,"description",{key:0}):(H(),le("p",{key:1},Ke(g(i)),1))],2),a.$slots.default?(H(),le("div",{key:0,class:z(g(s).e("bottom"))},[He(a.$slots,"default")],2)):Ge("v-if",!0)],2))}});var XRe=pt(WRe,[["__file","empty.vue"]]);const eK=nn(XRe),zRe=ht({size:{type:String,values:rd},disabled:Boolean}),YRe=ht({...zRe,model:Object,rules:{type:xe(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean]}}),KRe={validate:(e,t,n)=>(at(e)||Dt(e))&&Io(t)&&Dt(n)};function jRe(){const e=K([]),t=x(()=>{if(!e.value.length)return"0";const r=Math.max(...e.value);return r?`${r}px`:""});function n(r){const a=e.value.indexOf(r);return a===-1&&t.value,a}function s(r,a){if(r&&a){const c=n(a);e.value.splice(c,1,r)}else r&&e.value.push(r)}function i(r){const a=n(r);a>-1&&e.value.splice(a,1)}return{autoLabelWidth:t,registerLabelWidth:s,deregisterLabelWidth:i}}const OR=(e,t)=>{const n=wr(t);return n.length>0?e.filter(s=>s.prop&&n.includes(s.prop)):e},QRe="ElForm",qRe=Re({name:QRe}),JRe=Re({...qRe,props:YRe,emits:KRe,setup(e,{expose:t,emit:n}){const s=e,i=[],r=Fs(),a=rt("form"),c=x(()=>{const{labelPosition:I,inline:R}=s;return[a.b(),a.m(r.value||"default"),{[a.m(`label-${I}`)]:I,[a.m("inline")]:R}]}),u=I=>i.find(R=>R.prop===I),h=I=>{i.push(I)},f=I=>{I.prop&&i.splice(i.indexOf(I),1)},p=(I=[])=>{s.model&&OR(i,I).forEach(R=>R.resetField())},_=(I=[])=>{OR(i,I).forEach(R=>R.clearValidate())},E=x(()=>!!s.model),v=I=>{if(i.length===0)return[];const R=OR(i,I);return R.length?R:[]},b=async I=>S(void 0,I),y=async(I=[])=>{if(!E.value)return!1;const R=v(I);if(R.length===0)return!0;let w={};for(const k of R)try{await k.validate("")}catch(D){w={...w,...D}}return Object.keys(w).length===0?!0:Promise.reject(w)},S=async(I=[],R)=>{const w=!Ut(R);try{const k=await y(I);return k===!0&&await(R==null?void 0:R(k)),k}catch(k){if(k instanceof Error)throw k;const D=k;return s.scrollToError&&L(Object.keys(D)[0]),await(R==null?void 0:R(!1,D)),w&&Promise.reject(D)}},L=I=>{var R;const w=OR(i,I)[0];w&&((R=w.$el)==null||R.scrollIntoView(s.scrollIntoViewOptions))};return tt(()=>s.rules,()=>{s.validateOnRuleChange&&b().catch(I=>void 0)},{deep:!0}),An(Ym,Kn({...fi(s),emit:n,resetFields:p,clearValidate:_,validateField:S,getField:u,addField:h,removeField:f,...jRe()})),t({validate:b,validateField:S,resetFields:p,clearValidate:_,scrollToField:L,fields:i}),(I,R)=>(H(),le("form",{class:z(g(c))},[He(I.$slots,"default")],2))}});var ZRe=pt(JRe,[["__file","form.vue"]]);function hm(){return hm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},hm.apply(this,arguments)}function eCe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Wy(e,t)}function l1(e){return l1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},l1(e)}function Wy(e,t){return Wy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,i){return s.__proto__=i,s},Wy(e,t)}function tCe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yC(e,t,n){return tCe()?yC=Reflect.construct.bind():yC=function(i,r,a){var c=[null];c.push.apply(c,r);var u=Function.bind.apply(i,c),h=new u;return a&&Wy(h,a.prototype),h},yC.apply(null,arguments)}function nCe(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function a1(e){var t=typeof Map=="function"?new Map:void 0;return a1=function(s){if(s===null||!nCe(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(s))return t.get(s);t.set(s,i)}function i(){return yC(s,arguments,l1(this).constructor)}return i.prototype=Object.create(s.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Wy(i,s)},a1(e)}var oCe=/%[sdj%]/g,sCe=function(){};function c1(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var s=n.field;t[s]=t[s]||[],t[s].push(n)}),t}function ua(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];var i=0,r=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var a=e.replace(oCe,function(c){if(c==="%%")return"%";if(i>=r)return c;switch(c){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return c}});return a}return e}function iCe(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function wi(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||iCe(t)&&typeof e=="string"&&!e)}function rCe(e,t,n){var s=[],i=0,r=e.length;function a(c){s.push.apply(s,c||[]),i++,i===r&&n(s)}e.forEach(function(c){t(c,a)})}function pG(e,t,n){var s=0,i=e.length;function r(a){if(a&&a.length){n(a);return}var c=s;s=s+1,c<i?t(e[c],r):n([])}r([])}function lCe(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n]||[])}),t}var gG=function(e){eCe(t,e);function t(n,s){var i;return i=e.call(this,"Async Validation Error")||this,i.errors=n,i.fields=s,i}return t}(a1(Error));function aCe(e,t,n,s,i){if(t.first){var r=new Promise(function(_,E){var v=function(S){return s(S),S.length?E(new gG(S,c1(S))):_(i)},b=lCe(e);pG(b,n,v)});return r.catch(function(_){return _}),r}var a=t.firstFields===!0?Object.keys(e):t.firstFields||[],c=Object.keys(e),u=c.length,h=0,f=[],p=new Promise(function(_,E){var v=function(y){if(f.push.apply(f,y),h++,h===u)return s(f),f.length?E(new gG(f,c1(f))):_(i)};c.length||(s(f),_(i)),c.forEach(function(b){var y=e[b];a.indexOf(b)!==-1?pG(y,n,v):rCe(y,n,v)})});return p.catch(function(_){return _}),p}function cCe(e){return!!(e&&e.message!==void 0)}function uCe(e,t){for(var n=e,s=0;s<t.length;s++){if(n==null)return n;n=n[t[s]]}return n}function mG(e,t){return function(n){var s;return e.fullFields?s=uCe(t,e.fullFields):s=t[n.field||e.fullField],cCe(n)?(n.field=n.field||e.fullField,n.fieldValue=s,n):{message:typeof n=="function"?n():n,fieldValue:s,field:n.field||e.fullField}}}function _G(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var s=t[n];typeof s=="object"&&typeof e[n]=="object"?e[n]=hm({},e[n],s):e[n]=s}}return e}var tK=function(t,n,s,i,r,a){t.required&&(!s.hasOwnProperty(t.field)||wi(n,a||t.type))&&i.push(ua(r.messages.required,t.fullField))},dCe=function(t,n,s,i,r){(/^\s+$/.test(n)||n==="")&&i.push(ua(r.messages.whitespace,t.fullField))},SR,hCe=function(){if(SR)return SR;var e="[a-fA-F\\d:]",t=function(R){return R&&R.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",s="[a-fA-F\\d]{1,4}",i=(`
  1890. (?:
  1891. (?:`+s+":){7}(?:"+s+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
  1892. (?:`+s+":){6}(?:"+n+"|:"+s+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
  1893. (?:`+s+":){5}(?::"+n+"|(?::"+s+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
  1894. (?:`+s+":){4}(?:(?::"+s+"){0,1}:"+n+"|(?::"+s+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
  1895. (?:`+s+":){3}(?:(?::"+s+"){0,2}:"+n+"|(?::"+s+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
  1896. (?:`+s+":){2}(?:(?::"+s+"){0,3}:"+n+"|(?::"+s+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
  1897. (?:`+s+":){1}(?:(?::"+s+"){0,4}:"+n+"|(?::"+s+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
  1898. (?::(?:(?::`+s+"){0,5}:"+n+"|(?::"+s+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
  1899. )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
  1900. `).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),r=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),a=new RegExp("^"+n+"$"),c=new RegExp("^"+i+"$"),u=function(R){return R&&R.exact?r:new RegExp("(?:"+t(R)+n+t(R)+")|(?:"+t(R)+i+t(R)+")","g")};u.v4=function(I){return I&&I.exact?a:new RegExp(""+t(I)+n+t(I),"g")},u.v6=function(I){return I&&I.exact?c:new RegExp(""+t(I)+i+t(I),"g")};var h="(?:(?:[a-z]+:)?//)",f="(?:\\S+(?::\\S*)?@)?",p=u.v4().source,_=u.v6().source,E="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",v="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",b="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",y="(?::\\d{2,5})?",S='(?:[/?#][^\\s"]*)?',L="(?:"+h+"|www\\.)"+f+"(?:localhost|"+p+"|"+_+"|"+E+v+b+")"+y+S;return SR=new RegExp("(?:^"+L+"$)","i"),SR},TG={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},LS={integer:function(t){return LS.number(t)&&parseInt(t,10)===t},float:function(t){return LS.number(t)&&!LS.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!LS.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(TG.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(hCe())},hex:function(t){return typeof t=="string"&&!!t.match(TG.hex)}},fCe=function(t,n,s,i,r){if(t.required&&n===void 0){tK(t,n,s,i,r);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],c=t.type;a.indexOf(c)>-1?LS[c](n)||i.push(ua(r.messages.types[c],t.fullField,t.type)):c&&typeof n!==t.type&&i.push(ua(r.messages.types[c],t.fullField,t.type))},pCe=function(t,n,s,i,r){var a=typeof t.len=="number",c=typeof t.min=="number",u=typeof t.max=="number",h=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=n,p=null,_=typeof n=="number",E=typeof n=="string",v=Array.isArray(n);if(_?p="number":E?p="string":v&&(p="array"),!p)return!1;v&&(f=n.length),E&&(f=n.replace(h,"_").length),a?f!==t.len&&i.push(ua(r.messages[p].len,t.fullField,t.len)):c&&!u&&f<t.min?i.push(ua(r.messages[p].min,t.fullField,t.min)):u&&!c&&f>t.max?i.push(ua(r.messages[p].max,t.fullField,t.max)):c&&u&&(f<t.min||f>t.max)&&i.push(ua(r.messages[p].range,t.fullField,t.min,t.max))},HT="enum",gCe=function(t,n,s,i,r){t[HT]=Array.isArray(t[HT])?t[HT]:[],t[HT].indexOf(n)===-1&&i.push(ua(r.messages[HT],t.fullField,t[HT].join(", ")))},mCe=function(t,n,s,i,r){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||i.push(ua(r.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var a=new RegExp(t.pattern);a.test(n)||i.push(ua(r.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},Ro={required:tK,whitespace:dCe,type:fCe,range:pCe,enum:gCe,pattern:mCe},_Ce=function(t,n,s,i,r){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(wi(n,"string")&&!t.required)return s();Ro.required(t,n,i,a,r,"string"),wi(n,"string")||(Ro.type(t,n,i,a,r),Ro.range(t,n,i,a,r),Ro.pattern(t,n,i,a,r),t.whitespace===!0&&Ro.whitespace(t,n,i,a,r))}s(a)},TCe=function(t,n,s,i,r){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(wi(n)&&!t.required)return s();Ro.required(t,n,i,a,r),n!==void 0&&Ro.type(t,n,i,a,r)}s(a)},ECe=function(t,n,s,i,r){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(n===""&&(n=void 0),wi(n)&&!t.required)return s();Ro.required(t,n,i,a,r),n!==void 0&&(Ro.type(t,n,i,a,r),Ro.range(t,n,i,a,r))}s(a)},vCe=function(t,n,s,i,r){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(wi(n)&&!t.required)return s();Ro.required(t,n,i,a,r),n!==void 0&&Ro.type(t,n,i,a,r)}s(a)},bCe=function(t,n,s,i,r){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(wi(n)&&!t.required)return s();Ro.required(t,n,i,a,r),wi(n)||Ro.type(t,n,i,a,r)}s(a)},OCe=function(t,n,s,i,r){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(wi(n)&&!t.required)return s();Ro.required(t,n,i,a,r),n!==void 0&&(Ro.type(t,n,i,a,r),Ro.range(t,n,i,a,r))}s(a)},SCe=function(t,n,s,i,r){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(wi(n)&&!t.required)return s();Ro.required(t,n,i,a,r),n!==void 0&&(Ro.type(t,n,i,a,r),Ro.range(t,n,i,a,r))}s(a)},yCe=function(t,n,s,i,r){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(n==null&&!t.required)return s();Ro.required(t,n,i,a,r,"array"),n!=null&&(Ro.type(t,n,i,a,r),Ro.range(t,n,i,a,r))}s(a)},$Ce=function(t,n,s,i,r){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(wi(n)&&!t.required)return s();Ro.required(t,n,i,a,r),n!==void 0&&Ro.type(t,n,i,a,r)}s(a)},ICe="enum",RCe=function(t,n,s,i,r){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(wi(n)&&!t.required)return s();Ro.required(t,n,i,a,r),n!==void 0&&Ro[ICe](t,n,i,a,r)}s(a)},CCe=function(t,n,s,i,r){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(wi(n,"string")&&!t.required)return s();Ro.required(t,n,i,a,r),wi(n,"string")||Ro.pattern(t,n,i,a,r)}s(a)},MCe=function(t,n,s,i,r){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(wi(n,"date")&&!t.required)return s();if(Ro.required(t,n,i,a,r),!wi(n,"date")){var u;n instanceof Date?u=n:u=new Date(n),Ro.type(t,u,i,a,r),u&&Ro.range(t,u.getTime(),i,a,r)}}s(a)},ACe=function(t,n,s,i,r){var a=[],c=Array.isArray(n)?"array":typeof n;Ro.required(t,n,i,a,r,c),s(a)},Uw=function(t,n,s,i,r){var a=t.type,c=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(wi(n,a)&&!t.required)return s();Ro.required(t,n,i,c,r,a),wi(n,a)||Ro.type(t,n,i,c,r)}s(c)},LCe=function(t,n,s,i,r){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(wi(n)&&!t.required)return s();Ro.required(t,n,i,a,r)}s(a)},ZS={string:_Ce,method:TCe,number:ECe,boolean:vCe,regexp:bCe,integer:OCe,float:SCe,array:yCe,object:$Ce,enum:RCe,pattern:CCe,date:MCe,url:Uw,hex:Uw,email:Uw,required:ACe,any:LCe};function u1(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var d1=u1(),M$=function(){function e(n){this.rules=null,this._messages=d1,this.define(n)}var t=e.prototype;return t.define=function(s){var i=this;if(!s)throw new Error("Cannot configure a schema with no rules");if(typeof s!="object"||Array.isArray(s))throw new Error("Rules must be an object");this.rules={},Object.keys(s).forEach(function(r){var a=s[r];i.rules[r]=Array.isArray(a)?a:[a]})},t.messages=function(s){return s&&(this._messages=_G(u1(),s)),this._messages},t.validate=function(s,i,r){var a=this;i===void 0&&(i={}),r===void 0&&(r=function(){});var c=s,u=i,h=r;if(typeof u=="function"&&(h=u,u={}),!this.rules||Object.keys(this.rules).length===0)return h&&h(null,c),Promise.resolve(c);function f(b){var y=[],S={};function L(R){if(Array.isArray(R)){var w;y=(w=y).concat.apply(w,R)}else y.push(R)}for(var I=0;I<b.length;I++)L(b[I]);y.length?(S=c1(y),h(y,S)):h(null,c)}if(u.messages){var p=this.messages();p===d1&&(p=u1()),_G(p,u.messages),u.messages=p}else u.messages=this.messages();var _={},E=u.keys||Object.keys(this.rules);E.forEach(function(b){var y=a.rules[b],S=c[b];y.forEach(function(L){var I=L;typeof I.transform=="function"&&(c===s&&(c=hm({},c)),S=c[b]=I.transform(S)),typeof I=="function"?I={validator:I}:I=hm({},I),I.validator=a.getValidationMethod(I),I.validator&&(I.field=b,I.fullField=I.fullField||b,I.type=a.getType(I),_[b]=_[b]||[],_[b].push({rule:I,value:S,source:c,field:b}))})});var v={};return aCe(_,u,function(b,y){var S=b.rule,L=(S.type==="object"||S.type==="array")&&(typeof S.fields=="object"||typeof S.defaultField=="object");L=L&&(S.required||!S.required&&b.value),S.field=b.field;function I(k,D){return hm({},D,{fullField:S.fullField+"."+k,fullFields:S.fullFields?[].concat(S.fullFields,[k]):[k]})}function R(k){k===void 0&&(k=[]);var D=Array.isArray(k)?k:[k];!u.suppressWarning&&D.length&&e.warning("async-validator:",D),D.length&&S.message!==void 0&&(D=[].concat(S.message));var P=D.map(mG(S,c));if(u.first&&P.length)return v[S.field]=1,y(P);if(!L)y(P);else{if(S.required&&!b.value)return S.message!==void 0?P=[].concat(S.message).map(mG(S,c)):u.error&&(P=[u.error(S,ua(u.messages.required,S.field))]),y(P);var B={};S.defaultField&&Object.keys(b.value).map(function(G){B[G]=S.defaultField}),B=hm({},B,b.rule.fields);var F={};Object.keys(B).forEach(function(G){var re=B[G],_e=Array.isArray(re)?re:[re];F[G]=_e.map(I.bind(null,G))});var X=new e(F);X.messages(u.messages),b.rule.options&&(b.rule.options.messages=u.messages,b.rule.options.error=u.error),X.validate(b.value,b.rule.options||u,function(G){var re=[];P&&P.length&&re.push.apply(re,P),G&&G.length&&re.push.apply(re,G),y(re.length?re:null)})}}var w;if(S.asyncValidator)w=S.asyncValidator(S,b.value,R,b.source,u);else if(S.validator){try{w=S.validator(S,b.value,R,b.source,u)}catch(k){console.error==null||console.error(k),u.suppressValidatorError||setTimeout(function(){throw k},0),R(k.message)}w===!0?R():w===!1?R(typeof S.message=="function"?S.message(S.fullField||S.field):S.message||(S.fullField||S.field)+" fails"):w instanceof Array?R(w):w instanceof Error&&R(w.message)}w&&w.then&&w.then(function(){return R()},function(k){return R(k)})},function(b){f(b)},c)},t.getType=function(s){if(s.type===void 0&&s.pattern instanceof RegExp&&(s.type="pattern"),typeof s.validator!="function"&&s.type&&!ZS.hasOwnProperty(s.type))throw new Error(ua("Unknown rule type %s",s.type));return s.type||"string"},t.getValidationMethod=function(s){if(typeof s.validator=="function")return s.validator;var i=Object.keys(s),r=i.indexOf("message");return r!==-1&&i.splice(r,1),i.length===1&&i[0]==="required"?ZS.required:ZS[this.getType(s)]||void 0},e}();M$.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");ZS[t]=n};M$.warning=sCe;M$.messages=d1;M$.validators=ZS;const wCe=["","error","validating","success"],kCe=ht({label:String,labelWidth:{type:[String,Number],default:""},labelPosition:{type:String,values:["left","right","top",""],default:""},prop:{type:xe([String,Array])},required:{type:Boolean,default:void 0},rules:{type:xe([Object,Array])},error:String,validateStatus:{type:String,values:wCe},for:String,inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:{type:String,values:rd}}),EG="ElLabelWrap";var NCe=Re({name:EG,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(e,{slots:t}){const n=It(Ym,void 0),s=It(Zu);s||ti(EG,"usage: <el-form-item><label-wrap /></el-form-item>");const i=rt("form"),r=K(),a=K(0),c=()=>{var f;if((f=r.value)!=null&&f.firstElementChild){const p=window.getComputedStyle(r.value.firstElementChild).width;return Math.ceil(Number.parseFloat(p))}else return 0},u=(f="update")=>{Vt(()=>{t.default&&e.isAutoWidth&&(f==="update"?a.value=c():f==="remove"&&(n==null||n.deregisterLabelWidth(a.value)))})},h=()=>u("update");return rn(()=>{h()}),vo(()=>{u("remove")}),nd(()=>h()),tt(a,(f,p)=>{e.updateAll&&(n==null||n.registerLabelWidth(f,p))}),Xo(x(()=>{var f,p;return(p=(f=r.value)==null?void 0:f.firstElementChild)!=null?p:null}),h),()=>{var f,p;if(!t)return null;const{isAutoWidth:_}=e;if(_){const E=n==null?void 0:n.autoLabelWidth,v=s==null?void 0:s.hasLabel,b={};if(v&&E&&E!=="auto"){const y=Math.max(0,Number.parseInt(E,10)-a.value),L=(s.labelPosition||n.labelPosition)==="left"?"marginRight":"marginLeft";y&&(b[L]=`${y}px`)}return oe("div",{ref:r,class:[i.be("item","label-wrap")],style:b},[(f=t.default)==null?void 0:f.call(t)])}else return oe(Lt,{ref:r},[(p=t.default)==null?void 0:p.call(t)])}}});const PCe=Re({name:"ElFormItem"}),DCe=Re({...PCe,props:kCe,setup(e,{expose:t}){const n=e,s=Ks(),i=It(Ym,void 0),r=It(Zu,void 0),a=Fs(void 0,{formItem:!1}),c=rt("form-item"),u=Gi().value,h=K([]),f=K(""),p=kme(f,100),_=K(""),E=K();let v,b=!1;const y=x(()=>n.labelPosition||(i==null?void 0:i.labelPosition)),S=x(()=>{if(y.value==="top")return{};const Pe=bs(n.labelWidth||(i==null?void 0:i.labelWidth)||"");return Pe?{width:Pe}:{}}),L=x(()=>{if(y.value==="top"||i!=null&&i.inline)return{};if(!n.label&&!n.labelWidth&&F)return{};const Pe=bs(n.labelWidth||(i==null?void 0:i.labelWidth)||"");return!n.label&&!s.label?{marginLeft:Pe}:{}}),I=x(()=>[c.b(),c.m(a.value),c.is("error",f.value==="error"),c.is("validating",f.value==="validating"),c.is("success",f.value==="success"),c.is("required",J.value||n.required),c.is("no-asterisk",i==null?void 0:i.hideRequiredAsterisk),(i==null?void 0:i.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[c.m("feedback")]:i==null?void 0:i.statusIcon,[c.m(`label-${y.value}`)]:y.value}]),R=x(()=>Io(n.inlineMessage)?n.inlineMessage:(i==null?void 0:i.inlineMessage)||!1),w=x(()=>[c.e("error"),{[c.em("error","inline")]:R.value}]),k=x(()=>n.prop?Dt(n.prop)?n.prop:n.prop.join("."):""),D=x(()=>!!(n.label||s.label)),P=x(()=>n.for||(h.value.length===1?h.value[0]:void 0)),B=x(()=>!P.value&&D.value),F=!!r,X=x(()=>{const Pe=i==null?void 0:i.model;if(!(!Pe||!n.prop))return cC(Pe,n.prop).value}),G=x(()=>{const{required:Pe}=n,Be=[];n.rules&&Be.push(...wr(n.rules));const ot=i==null?void 0:i.rules;if(ot&&n.prop){const Xe=cC(ot,n.prop).value;Xe&&Be.push(...wr(Xe))}if(Pe!==void 0){const Xe=Be.map((ee,pe)=>[ee,pe]).filter(([ee])=>Object.keys(ee).includes("required"));if(Xe.length>0)for(const[ee,pe]of Xe)ee.required!==Pe&&(Be[pe]={...ee,required:Pe});else Be.push({required:Pe})}return Be}),re=x(()=>G.value.length>0),_e=Pe=>G.value.filter(ot=>!ot.trigger||!Pe?!0:at(ot.trigger)?ot.trigger.includes(Pe):ot.trigger===Pe).map(({trigger:ot,...Xe})=>Xe),J=x(()=>G.value.some(Pe=>Pe.required)),Y=x(()=>{var Pe;return p.value==="error"&&n.showMessage&&((Pe=i==null?void 0:i.showMessage)!=null?Pe:!0)}),ae=x(()=>`${n.label||""}${(i==null?void 0:i.labelSuffix)||""}`),Z=Pe=>{f.value=Pe},Q=Pe=>{var Be,ot;const{errors:Xe,fields:ee}=Pe;(!Xe||!ee)&&console.error(Pe),Z("error"),_.value=Xe?(ot=(Be=Xe==null?void 0:Xe[0])==null?void 0:Be.message)!=null?ot:`${n.prop} is required`:"",i==null||i.emit("validate",n.prop,!1,_.value)},he=()=>{Z("success"),i==null||i.emit("validate",n.prop,!0,"")},ge=async Pe=>{const Be=k.value;return new M$({[Be]:Pe}).validate({[Be]:X.value},{firstFields:!0}).then(()=>(he(),!0)).catch(Xe=>(Q(Xe),Promise.reject(Xe)))},Ie=async(Pe,Be)=>{if(b||!n.prop)return!1;const ot=Ut(Be);if(!re.value)return Be==null||Be(!1),!1;const Xe=_e(Pe);return Xe.length===0?(Be==null||Be(!0),!0):(Z("validating"),ge(Xe).then(()=>(Be==null||Be(!0),!0)).catch(ee=>{const{fields:pe}=ee;return Be==null||Be(!1,pe),ot?!1:Promise.reject(pe)}))},be=()=>{Z(""),_.value="",b=!1},Ae=async()=>{const Pe=i==null?void 0:i.model;if(!Pe||!n.prop)return;const Be=cC(Pe,n.prop);b=!0,Be.value=VH(v),await Vt(),be(),b=!1},We=Pe=>{h.value.includes(Pe)||h.value.push(Pe)},$e=Pe=>{h.value=h.value.filter(Be=>Be!==Pe)};tt(()=>n.error,Pe=>{_.value=Pe||"",Z(Pe?"error":"")},{immediate:!0}),tt(()=>n.validateStatus,Pe=>Z(Pe||""));const ve=Kn({...fi(n),$el:E,size:a,validateState:f,labelId:u,inputIds:h,isGroup:B,hasLabel:D,fieldValue:X,addInputId:We,removeInputId:$e,resetField:Ae,clearValidate:be,validate:Ie});return An(Zu,ve),rn(()=>{n.prop&&(i==null||i.addField(ve),v=VH(X.value))}),vo(()=>{i==null||i.removeField(ve)}),t({size:a,validateMessage:_,validateState:f,validate:Ie,clearValidate:be,resetField:Ae}),(Pe,Be)=>{var ot;return H(),le("div",{ref_key:"formItemRef",ref:E,class:z(g(I)),role:g(B)?"group":void 0,"aria-labelledby":g(B)?g(u):void 0},[oe(g(NCe),{"is-auto-width":g(S).width==="auto","update-all":((ot=g(i))==null?void 0:ot.labelWidth)==="auto"},{default:de(()=>[g(D)?(H(),Ye(yn(g(P)?"label":"div"),{key:0,id:g(u),for:g(P),class:z(g(c).e("label")),style:Bt(g(S))},{default:de(()=>[He(Pe.$slots,"label",{label:g(ae)},()=>[Xt(Ke(g(ae)),1)])]),_:3},8,["id","for","class","style"])):Ge("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),te("div",{class:z(g(c).e("content")),style:Bt(g(L))},[He(Pe.$slots,"default"),oe(q3,{name:`${g(c).namespace.value}-zoom-in-top`},{default:de(()=>[g(Y)?He(Pe.$slots,"error",{key:0,error:_.value},()=>[te("div",{class:z(g(w))},Ke(_.value),3)]):Ge("v-if",!0)]),_:3},8,["name"])],6)],10,["role","aria-labelledby"])}}});var nK=pt(DCe,[["__file","form-item.vue"]]);const xCe=nn(ZRe,{FormItem:nK}),BCe=is(nK),FCe=ht({urlList:{type:xe(Array),default:()=>os([])},zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},hideOnClickModal:Boolean,teleported:Boolean,closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:xe(String)}}),UCe={close:()=>!0,switch:e=>Wt(e),rotate:e=>Wt(e)},HCe=Re({name:"ElImageViewer"}),VCe=Re({...HCe,props:FCe,emits:UCe,setup(e,{expose:t,emit:n}){var s;const i=e,r={CONTAIN:{name:"contain",icon:zu(J_e)},ORIGINAL:{name:"original",icon:zu(TTe)}},{t:a}=xn(),c=rt("image-viewer"),{nextZIndex:u}=pv(),h=K(),f=K([]),p=YM(),_=K(!0),E=K(i.initialIndex),v=lo(r.CONTAIN),b=K({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),y=K((s=i.zIndex)!=null?s:u()),S=x(()=>{const{urlList:Ie}=i;return Ie.length<=1}),L=x(()=>E.value===0),I=x(()=>E.value===i.urlList.length-1),R=x(()=>i.urlList[E.value]),w=x(()=>[c.e("btn"),c.e("prev"),c.is("disabled",!i.infinite&&L.value)]),k=x(()=>[c.e("btn"),c.e("next"),c.is("disabled",!i.infinite&&I.value)]),D=x(()=>{const{scale:Ie,deg:be,offsetX:Ae,offsetY:We,enableTransition:$e}=b.value;let ve=Ae/Ie,Pe=We/Ie;const Be=be*Math.PI/180,ot=Math.cos(Be),Xe=Math.sin(Be);ve=ve*ot+Pe*Xe,Pe=Pe*ot-Ae/Ie*Xe;const ee={transform:`scale(${Ie}) rotate(${be}deg) translate(${ve}px, ${Pe}px)`,transition:$e?"transform .3s":""};return v.value.name===r.CONTAIN.name&&(ee.maxWidth=ee.maxHeight="100%"),ee});function P(){F(),n("close")}function B(){const Ie=Om(Ae=>{switch(Ae.code){case $t.esc:i.closeOnPressEscape&&P();break;case $t.space:J();break;case $t.left:ae();break;case $t.up:Q("zoomIn");break;case $t.right:Z();break;case $t.down:Q("zoomOut");break}}),be=Om(Ae=>{const We=Ae.deltaY||Ae.deltaX;Q(We<0?"zoomIn":"zoomOut",{zoomRate:i.zoomRate,enableTransition:!1})});p.run(()=>{fo(document,"keydown",Ie),fo(document,"wheel",be)})}function F(){p.stop()}function X(){_.value=!1}function G(Ie){_.value=!1,Ie.target.alt=a("el.image.error")}function re(Ie){if(_.value||Ie.button!==0||!h.value)return;b.value.enableTransition=!1;const{offsetX:be,offsetY:Ae}=b.value,We=Ie.pageX,$e=Ie.pageY,ve=Om(Be=>{b.value={...b.value,offsetX:be+Be.pageX-We,offsetY:Ae+Be.pageY-$e}}),Pe=fo(document,"mousemove",ve);fo(document,"mouseup",()=>{Pe()}),Ie.preventDefault()}function _e(){b.value={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function J(){if(_.value)return;const Ie=UE(r),be=Object.values(r),Ae=v.value.name,$e=(be.findIndex(ve=>ve.name===Ae)+1)%Ie.length;v.value=r[Ie[$e]],_e()}function Y(Ie){const be=i.urlList.length;E.value=(Ie+be)%be}function ae(){L.value&&!i.infinite||Y(E.value-1)}function Z(){I.value&&!i.infinite||Y(E.value+1)}function Q(Ie,be={}){if(_.value)return;const{minScale:Ae,maxScale:We}=i,{zoomRate:$e,rotateDeg:ve,enableTransition:Pe}={zoomRate:i.zoomRate,rotateDeg:90,enableTransition:!0,...be};switch(Ie){case"zoomOut":b.value.scale>Ae&&(b.value.scale=Number.parseFloat((b.value.scale/$e).toFixed(3)));break;case"zoomIn":b.value.scale<We&&(b.value.scale=Number.parseFloat((b.value.scale*$e).toFixed(3)));break;case"clockwise":b.value.deg+=ve,n("rotate",b.value.deg);break;case"anticlockwise":b.value.deg-=ve,n("rotate",b.value.deg);break}b.value.enableTransition=Pe}function he(Ie){var be;((be=Ie.detail)==null?void 0:be.focusReason)==="pointer"&&Ie.preventDefault()}function ge(){i.closeOnPressEscape&&P()}return tt(R,()=>{Vt(()=>{const Ie=f.value[0];Ie!=null&&Ie.complete||(_.value=!0)})}),tt(E,Ie=>{_e(),n("switch",Ie)}),rn(()=>{B()}),t({setActiveItem:Y}),(Ie,be)=>(H(),Ye(g(_v),{to:"body",disabled:!Ie.teleported},{default:de(()=>[oe(Li,{name:"viewer-fade",appear:""},{default:de(()=>[te("div",{ref_key:"wrapper",ref:h,tabindex:-1,class:z(g(c).e("wrapper")),style:Bt({zIndex:y.value})},[oe(g(mv),{loop:"",trapped:"","focus-trap-el":h.value,"focus-start-el":"container",onFocusoutPrevented:he,onReleaseRequested:ge},{default:de(()=>[te("div",{class:z(g(c).e("mask")),onClick:Yt(Ae=>Ie.hideOnClickModal&&P(),["self"])},null,10,["onClick"]),Ge(" CLOSE "),te("span",{class:z([g(c).e("btn"),g(c).e("close")]),onClick:P},[oe(g(Nt),null,{default:de(()=>[oe(g(zc))]),_:1})],2),Ge(" ARROW "),g(S)?Ge("v-if",!0):(H(),le(Lt,{key:0},[te("span",{class:z(g(w)),onClick:ae},[oe(g(Nt),null,{default:de(()=>[oe(g(bp))]),_:1})],2),te("span",{class:z(g(k)),onClick:Z},[oe(g(Nt),null,{default:de(()=>[oe(g(rl))]),_:1})],2)],64)),Ge(" ACTIONS "),te("div",{class:z([g(c).e("btn"),g(c).e("actions")])},[te("div",{class:z(g(c).e("actions__inner"))},[oe(g(Nt),{onClick:Ae=>Q("zoomOut")},{default:de(()=>[oe(g(NTe))]),_:1},8,["onClick"]),oe(g(Nt),{onClick:Ae=>Q("zoomIn")},{default:de(()=>[oe(g(_6))]),_:1},8,["onClick"]),te("i",{class:z(g(c).e("actions__divider"))},null,2),oe(g(Nt),{onClick:J},{default:de(()=>[(H(),Ye(yn(g(v).icon)))]),_:1}),te("i",{class:z(g(c).e("actions__divider"))},null,2),oe(g(Nt),{onClick:Ae=>Q("anticlockwise")},{default:de(()=>[oe(g(pTe))]),_:1},8,["onClick"]),oe(g(Nt),{onClick:Ae=>Q("clockwise")},{default:de(()=>[oe(g(mTe))]),_:1},8,["onClick"])],2)],2),Ge(" CANVAS "),te("div",{class:z(g(c).e("canvas"))},[(H(!0),le(Lt,null,In(Ie.urlList,(Ae,We)=>an((H(),le("img",{ref_for:!0,ref:$e=>f.value[We]=$e,key:Ae,src:Ae,style:Bt(g(D)),class:z(g(c).e("img")),crossorigin:Ie.crossorigin,onLoad:X,onError:G,onMousedown:re},null,46,["src","crossorigin"])),[[Yn,We===E.value]])),128))],2),He(Ie.$slots,"default")]),_:3},8,["focus-trap-el"])],6)]),_:3})]),_:3},8,["disabled"]))}});var GCe=pt(VCe,[["__file","image-viewer.vue"]]);const oK=nn(GCe),WCe=ht({hideOnClickModal:Boolean,src:{type:String,default:""},fit:{type:String,values:["","contain","cover","fill","none","scale-down"],default:""},loading:{type:String,values:["eager","lazy"]},lazy:Boolean,scrollContainer:{type:xe([String,Object])},previewSrcList:{type:xe(Array),default:()=>os([])},previewTeleported:Boolean,zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:xe(String)}}),XCe={load:e=>e instanceof Event,error:e=>e instanceof Event,switch:e=>Wt(e),close:()=>!0,show:()=>!0},zCe=Re({name:"ElImage",inheritAttrs:!1}),YCe=Re({...zCe,props:WCe,emits:XCe,setup(e,{emit:t}){const n=e;let s="";const{t:i}=xn(),r=rt("image"),a=Cp(),c=x(()=>By(Object.entries(a).filter(([Z])=>/^(data-|on[A-Z])/i.test(Z)||["id","style"].includes(Z)))),u=$$({excludeListeners:!0,excludeKeys:x(()=>Object.keys(c.value))}),h=K(),f=K(!1),p=K(!0),_=K(!1),E=K(),v=K(),b=Dn&&"loading"in HTMLImageElement.prototype;let y,S;const L=x(()=>[r.e("inner"),R.value&&r.e("preview"),p.value&&r.is("loading")]),I=x(()=>{const{fit:Z}=n;return Dn&&Z?{objectFit:Z}:{}}),R=x(()=>{const{previewSrcList:Z}=n;return at(Z)&&Z.length>0}),w=x(()=>{const{previewSrcList:Z,initialIndex:Q}=n;let he=Q;return Q>Z.length-1&&(he=0),he}),k=x(()=>n.loading==="eager"?!1:!b&&n.loading==="lazy"||n.lazy),D=()=>{Dn&&(p.value=!0,f.value=!1,h.value=n.src)};function P(Z){p.value=!1,f.value=!1,t("load",Z)}function B(Z){p.value=!1,f.value=!0,t("error",Z)}function F(){e$e(E.value,v.value)&&(D(),re())}const X=Q5(F,200,!0);async function G(){var Z;if(!Dn)return;await Vt();const{scrollContainer:Q}=n;pa(Q)?v.value=Q:Dt(Q)&&Q!==""?v.value=(Z=document.querySelector(Q))!=null?Z:void 0:E.value&&(v.value=PD(E.value)),v.value&&(y=fo(v,"scroll",X),setTimeout(()=>F(),100))}function re(){!Dn||!v.value||!X||(y==null||y(),v.value=void 0)}function _e(Z){if(Z.ctrlKey){if(Z.deltaY<0)return Z.preventDefault(),!1;if(Z.deltaY>0)return Z.preventDefault(),!1}}function J(){R.value&&(S=fo("wheel",_e,{passive:!1}),s=document.body.style.overflow,document.body.style.overflow="hidden",_.value=!0,t("show"))}function Y(){S==null||S(),document.body.style.overflow=s,_.value=!1,t("close")}function ae(Z){t("switch",Z)}return tt(()=>n.src,()=>{k.value?(p.value=!0,f.value=!1,re(),G()):D()}),rn(()=>{k.value?G():D()}),(Z,Q)=>(H(),le("div",$n({ref_key:"container",ref:E},g(c),{class:[g(r).b(),Z.$attrs.class]}),[f.value?He(Z.$slots,"error",{key:0},()=>[te("div",{class:z(g(r).e("error"))},Ke(g(i)("el.image.error")),3)]):(H(),le(Lt,{key:1},[h.value!==void 0?(H(),le("img",$n({key:0},g(u),{src:h.value,loading:Z.loading,style:g(I),class:g(L),crossorigin:Z.crossorigin,onClick:J,onLoad:P,onError:B}),null,16,["src","loading","crossorigin"])):Ge("v-if",!0),p.value?(H(),le("div",{key:1,class:z(g(r).e("wrapper"))},[He(Z.$slots,"placeholder",{},()=>[te("div",{class:z(g(r).e("placeholder"))},null,2)])],2)):Ge("v-if",!0)],64)),g(R)?(H(),le(Lt,{key:2},[_.value?(H(),Ye(g(oK),{key:0,"z-index":Z.zIndex,"initial-index":g(w),infinite:Z.infinite,"zoom-rate":Z.zoomRate,"min-scale":Z.minScale,"max-scale":Z.maxScale,"url-list":Z.previewSrcList,crossorigin:Z.crossorigin,"hide-on-click-modal":Z.hideOnClickModal,teleported:Z.previewTeleported,"close-on-press-escape":Z.closeOnPressEscape,onClose:Y,onSwitch:ae},{default:de(()=>[Z.$slots.viewer?(H(),le("div",{key:0},[He(Z.$slots,"viewer")])):Ge("v-if",!0)]),_:3},8,["z-index","initial-index","infinite","zoom-rate","min-scale","max-scale","url-list","crossorigin","hide-on-click-modal","teleported","close-on-press-escape"])):Ge("v-if",!0)],64)):Ge("v-if",!0)],16))}});var KCe=pt(YCe,[["__file","image.vue"]]);const jCe=nn(KCe),QCe=ht({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:Number,readonly:Boolean,disabled:Boolean,size:Ys,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:e=>e===null||Wt(e)||["min","max"].includes(e),default:null},name:String,placeholder:String,precision:{type:Number,validator:e=>e>=0&&e===Number.parseInt(`${e}`,10)},validateEvent:{type:Boolean,default:!0},...Xi(["ariaLabel"])}),qCe={[_o]:(e,t)=>t!==e,blur:e=>e instanceof FocusEvent,focus:e=>e instanceof FocusEvent,[sr]:e=>Wt(e)||hi(e),[un]:e=>Wt(e)||hi(e)},JCe=Re({name:"ElInputNumber"}),ZCe=Re({...JCe,props:QCe,emits:qCe,setup(e,{expose:t,emit:n}){const s=e,{t:i}=xn(),r=rt("input-number"),a=K(),c=Kn({currentValue:s.modelValue,userInput:null}),{formItem:u}=lr(),h=x(()=>Wt(s.modelValue)&&s.modelValue<=s.min),f=x(()=>Wt(s.modelValue)&&s.modelValue>=s.max),p=x(()=>{const J=S(s.step);return ho(s.precision)?Math.max(S(s.modelValue),J):(J>s.precision,s.precision)}),_=x(()=>s.controls&&s.controlsPosition==="right"),E=Fs(),v=ar(),b=x(()=>{if(c.userInput!==null)return c.userInput;let J=c.currentValue;if(hi(J))return"";if(Wt(J)){if(Number.isNaN(J))return"";ho(s.precision)||(J=J.toFixed(s.precision))}return J}),y=(J,Y)=>{if(ho(Y)&&(Y=p.value),Y===0)return Math.round(J);let ae=String(J);const Z=ae.indexOf(".");if(Z===-1||!ae.replace(".","").split("")[Z+Y])return J;const ge=ae.length;return ae.charAt(ge-1)==="5"&&(ae=`${ae.slice(0,Math.max(0,ge-1))}6`),Number.parseFloat(Number(ae).toFixed(Y))},S=J=>{if(hi(J))return 0;const Y=J.toString(),ae=Y.indexOf(".");let Z=0;return ae!==-1&&(Z=Y.length-ae-1),Z},L=(J,Y=1)=>Wt(J)?y(J+s.step*Y):c.currentValue,I=()=>{if(s.readonly||v.value||f.value)return;const J=Number(b.value)||0,Y=L(J);k(Y),n(sr,c.currentValue),re()},R=()=>{if(s.readonly||v.value||h.value)return;const J=Number(b.value)||0,Y=L(J,-1);k(Y),n(sr,c.currentValue),re()},w=(J,Y)=>{const{max:ae,min:Z,step:Q,precision:he,stepStrictly:ge,valueOnClear:Ie}=s;ae<Z&&ti("InputNumber","min should not be greater than max.");let be=Number(J);if(hi(J)||Number.isNaN(be))return null;if(J===""){if(Ie===null)return null;be=Dt(Ie)?{min:Z,max:ae}[Ie]:Ie}return ge&&(be=y(Math.round(be/Q)*Q,he),be!==J&&Y&&n(un,be)),ho(he)||(be=y(be,he)),(be>ae||be<Z)&&(be=be>ae?ae:Z,Y&&n(un,be)),be},k=(J,Y=!0)=>{var ae;const Z=c.currentValue,Q=w(J);if(!Y){n(un,Q);return}Z===Q&&J||(c.userInput=null,n(un,Q),Z!==Q&&n(_o,Q,Z),s.validateEvent&&((ae=u==null?void 0:u.validate)==null||ae.call(u,"change").catch(he=>void 0)),c.currentValue=Q)},D=J=>{c.userInput=J;const Y=J===""?null:Number(J);n(sr,Y),k(Y,!1)},P=J=>{const Y=J!==""?Number(J):"";(Wt(Y)&&!Number.isNaN(Y)||J==="")&&k(Y),re(),c.userInput=null},B=()=>{var J,Y;(Y=(J=a.value)==null?void 0:J.focus)==null||Y.call(J)},F=()=>{var J,Y;(Y=(J=a.value)==null?void 0:J.blur)==null||Y.call(J)},X=J=>{n("focus",J)},G=J=>{var Y,ae;c.userInput=null,VA()&&c.currentValue===null&&((Y=a.value)!=null&&Y.input)&&(a.value.input.value=""),n("blur",J),s.validateEvent&&((ae=u==null?void 0:u.validate)==null||ae.call(u,"blur").catch(Z=>void 0))},re=()=>{c.currentValue!==s.modelValue&&(c.currentValue=s.modelValue)},_e=J=>{document.activeElement===J.target&&J.preventDefault()};return tt(()=>s.modelValue,(J,Y)=>{const ae=w(J,!0);c.userInput===null&&ae!==Y&&(c.currentValue=ae)},{immediate:!0}),rn(()=>{var J;const{min:Y,max:ae,modelValue:Z}=s,Q=(J=a.value)==null?void 0:J.input;if(Q.setAttribute("role","spinbutton"),Number.isFinite(ae)?Q.setAttribute("aria-valuemax",String(ae)):Q.removeAttribute("aria-valuemax"),Number.isFinite(Y)?Q.setAttribute("aria-valuemin",String(Y)):Q.removeAttribute("aria-valuemin"),Q.setAttribute("aria-valuenow",c.currentValue||c.currentValue===0?String(c.currentValue):""),Q.setAttribute("aria-disabled",String(v.value)),!Wt(Z)&&Z!=null){let he=Number(Z);Number.isNaN(he)&&(he=null),n(un,he)}Q.addEventListener("wheel",_e,{passive:!1})}),nd(()=>{var J,Y;const ae=(J=a.value)==null?void 0:J.input;ae==null||ae.setAttribute("aria-valuenow",`${(Y=c.currentValue)!=null?Y:""}`)}),t({focus:B,blur:F}),(J,Y)=>(H(),le("div",{class:z([g(r).b(),g(r).m(g(E)),g(r).is("disabled",g(v)),g(r).is("without-controls",!J.controls),g(r).is("controls-right",g(_))]),onDragstart:Yt(()=>{},["prevent"])},[J.controls?an((H(),le("span",{key:0,role:"button","aria-label":g(i)("el.inputNumber.decrease"),class:z([g(r).e("decrease"),g(r).is("disabled",g(h))]),onKeydown:So(R,["enter"])},[He(J.$slots,"decrease-icon",{},()=>[oe(g(Nt),null,{default:de(()=>[g(_)?(H(),Ye(g(kh),{key:0})):(H(),Ye(g(sTe),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[g(IM),R]]):Ge("v-if",!0),J.controls?an((H(),le("span",{key:1,role:"button","aria-label":g(i)("el.inputNumber.increase"),class:z([g(r).e("increase"),g(r).is("disabled",g(f))]),onKeydown:So(I,["enter"])},[He(J.$slots,"increase-icon",{},()=>[oe(g(Nt),null,{default:de(()=>[g(_)?(H(),Ye(g(xD),{key:0})):(H(),Ye(g(g6),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[g(IM),I]]):Ge("v-if",!0),oe(g(Nr),{id:J.id,ref_key:"input",ref:a,type:"number",step:J.step,"model-value":g(b),placeholder:J.placeholder,readonly:J.readonly,disabled:g(v),size:g(E),max:J.max,min:J.min,name:J.name,"aria-label":J.ariaLabel,"validate-event":!1,onKeydown:[So(Yt(I,["prevent"]),["up"]),So(Yt(R,["prevent"]),["down"])],onBlur:G,onFocus:X,onInput:D,onChange:P},ic({_:2},[J.$slots.prefix?{name:"prefix",fn:de(()=>[He(J.$slots,"prefix")])}:void 0,J.$slots.suffix?{name:"suffix",fn:de(()=>[He(J.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","onKeydown"])],42,["onDragstart"]))}});var eMe=pt(ZCe,[["__file","input-number.vue"]]);const sK=nn(eMe),tMe=ht({modelValue:{type:xe(Array)},max:Number,tagType:{...yh.type,default:"info"},tagEffect:yh.effect,trigger:{type:xe(String),default:$t.enter},draggable:{type:Boolean,default:!1},size:Ys,clearable:Boolean,disabled:{type:Boolean,default:void 0},validateEvent:{type:Boolean,default:!0},readonly:Boolean,autofocus:Boolean,id:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},placeholder:String,autocomplete:{type:String,default:"off"},ariaLabel:String}),nMe={[un]:e=>at(e)||ho(e),[_o]:e=>at(e)||ho(e),[sr]:e=>Dt(e),"add-tag":e=>Dt(e),"remove-tag":e=>Dt(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0};function oMe({props:e,emit:t,formItem:n}){const s=ar(),i=Fs(),r=lo(),a=K(),c=x(()=>["small"].includes(i.value)?"small":"default"),u=x(()=>{var B;return(B=e.modelValue)!=null&&B.length?void 0:e.placeholder}),h=x(()=>!(e.readonly||s.value)),f=x(()=>{var B,F;return ho(e.max)?!1:((F=(B=e.modelValue)==null?void 0:B.length)!=null?F:0)>=e.max}),p=B=>{if(f.value){a.value=void 0;return}w.value||t(sr,B.target.value)},_=B=>{var F;if(!w.value)switch(B.code){case e.trigger:B.preventDefault(),B.stopPropagation(),E();break;case $t.numpadEnter:e.trigger===$t.enter&&(B.preventDefault(),B.stopPropagation(),E());break;case $t.backspace:!a.value&&((F=e.modelValue)!=null&&F.length)&&(B.preventDefault(),B.stopPropagation(),v(e.modelValue.length-1));break}},E=()=>{var B,F;const X=(B=a.value)==null?void 0:B.trim();if(!X||f.value)return;const G=[...(F=e.modelValue)!=null?F:[],X];t(un,G),t(_o,G),t("add-tag",X),a.value=void 0},v=B=>{var F;const X=((F=e.modelValue)!=null?F:[]).slice(),[G]=X.splice(B,1);t(un,X),t(_o,X),t("remove-tag",G)},b=()=>{a.value=void 0,t(un,void 0),t(_o,void 0),t("clear")},y=(B,F,X)=>{var G;const re=((G=e.modelValue)!=null?G:[]).slice(),[_e]=re.splice(B,1),J=F>B&&X==="before"?-1:F<B&&X==="after"?1:0;re.splice(F+J,0,_e),t(un,re),t(_o,re)},S=()=>{var B;(B=r.value)==null||B.focus()},L=()=>{var B;(B=r.value)==null||B.blur()},{wrapperRef:I,isFocused:R}=Pp(r,{beforeFocus(){return s.value},afterBlur(){var B;E(),e.validateEvent&&((B=n==null?void 0:n.validate)==null||B.call(n,"blur").catch(F=>void 0))}}),{isComposing:w,handleCompositionStart:k,handleCompositionUpdate:D,handleCompositionEnd:P}=I$({afterComposition:p});return tt(()=>e.modelValue,()=>{var B;e.validateEvent&&((B=n==null?void 0:n.validate)==null||B.call(n,_o).catch(F=>void 0))}),{inputRef:r,wrapperRef:I,isFocused:R,isComposing:w,inputValue:a,size:i,tagSize:c,placeholder:u,closable:h,disabled:s,inputLimit:f,handleDragged:y,handleInput:p,handleKeydown:_,handleAddTag:E,handleRemoveTag:v,handleClear:b,handleCompositionStart:k,handleCompositionUpdate:D,handleCompositionEnd:P,focus:S,blur:L}}function sMe(){const e=K(!1);return{hovering:e,handleMouseEnter:()=>{e.value=!0},handleMouseLeave:()=>{e.value=!1}}}function iMe(){const e=lo(),t=K(0),n=11,s=x(()=>({minWidth:`${Math.max(t.value,n)}px`}));return Xo(e,()=>{var r,a;t.value=(a=(r=e.value)==null?void 0:r.getBoundingClientRect().width)!=null?a:0}),{calculatorRef:e,calculatorWidth:t,inputStyle:s}}function rMe({wrapperRef:e,handleDragged:t,afterDragged:n}){const s=rt("input-tag"),i=lo(),r=K(!1);let a,c,u,h;function f(v){return`.${s.e("inner")} .${s.namespace.value}-tag:nth-child(${v+1})`}function p(v,b){a=b,c=e.value.querySelector(f(b)),c&&(c.style.opacity="0.5"),v.dataTransfer.effectAllowed="move"}function _(v,b){if(u=b,v.preventDefault(),v.dataTransfer.dropEffect="move",ho(a)||a===b){r.value=!1;return}const y=e.value.querySelector(f(b)).getBoundingClientRect(),S=a+1!==b,L=a-1!==b,I=v.clientX-y.left,R=S?L?.5:1:-1,w=L?S?.5:0:1;I<=y.width*R?h="before":I>y.width*w?h="after":h=void 0;const k=e.value.querySelector(`.${s.e("inner")}`),D=k.getBoundingClientRect(),P=Number.parseFloat(hh(k,"gap"))/2,B=y.top-D.top;let F=-9999;if(h==="before")F=Math.max(y.left-D.left-P,Math.floor(-P/2));else if(h==="after"){const X=y.right-D.left;F=X+(D.width===X?Math.floor(P/2):P)}c6(i.value,{top:`${B}px`,left:`${F}px`}),r.value=!!h}function E(v){v.preventDefault(),c&&(c.style.opacity=""),h&&!ho(a)&&!ho(u)&&a!==u&&t(a,u,h),r.value=!1,a=void 0,c=null,u=void 0,h=void 0,n==null||n()}return{dropIndicatorRef:i,showDropIndicator:r,handleDragStart:p,handleDragOver:_,handleDragEnd:E}}function lMe({props:e,isFocused:t,hovering:n,disabled:s,inputValue:i,size:r,validateState:a,validateIcon:c,needStatusIcon:u}){const h=Cp(),f=Ks(),p=rt("input-tag"),_=rt("input"),E=x(()=>[p.b(),p.is("focused",t.value),p.is("hovering",n.value),p.is("disabled",s.value),p.m(r.value),p.e("wrapper"),h.class]),v=x(()=>[h.style]),b=x(()=>{var L,I;return[p.e("inner"),p.is("draggable",e.draggable),p.is("left-space",!((L=e.modelValue)!=null&&L.length)&&!f.prefix),p.is("right-space",!((I=e.modelValue)!=null&&I.length)&&!S.value)]}),y=x(()=>{var L;return e.clearable&&!s.value&&!e.readonly&&(((L=e.modelValue)==null?void 0:L.length)||i.value)&&(t.value||n.value)}),S=x(()=>f.suffix||y.value||a.value&&c.value&&u.value);return{ns:p,nsInput:_,containerKls:E,containerStyle:v,innerKls:b,showClear:y,showSuffix:S}}const aMe=Re({name:"ElInputTag",inheritAttrs:!1}),cMe=Re({...aMe,props:tMe,emits:nMe,setup(e,{expose:t,emit:n}){const s=e,i=$$(),r=Ks(),{form:a,formItem:c}=lr(),{inputId:u}=fc(s,{formItemContext:c}),h=x(()=>{var ee;return(ee=a==null?void 0:a.statusIcon)!=null?ee:!1}),f=x(()=>(c==null?void 0:c.validateState)||""),p=x(()=>f.value&&HA[f.value]),{inputRef:_,wrapperRef:E,isFocused:v,inputValue:b,size:y,tagSize:S,placeholder:L,closable:I,disabled:R,handleDragged:w,handleInput:k,handleKeydown:D,handleRemoveTag:P,handleClear:B,handleCompositionStart:F,handleCompositionUpdate:X,handleCompositionEnd:G,focus:re,blur:_e}=oMe({props:s,emit:n,formItem:c}),{hovering:J,handleMouseEnter:Y,handleMouseLeave:ae}=sMe(),{calculatorRef:Z,inputStyle:Q}=iMe(),{dropIndicatorRef:he,showDropIndicator:ge,handleDragStart:Ie,handleDragOver:be,handleDragEnd:Ae}=rMe({wrapperRef:E,handleDragged:w,afterDragged:re}),{ns:We,nsInput:$e,containerKls:ve,containerStyle:Pe,innerKls:Be,showClear:ot,showSuffix:Xe}=lMe({props:s,hovering:J,isFocused:v,inputValue:b,disabled:R,size:y,validateState:f,validateIcon:p,needStatusIcon:h});return t({focus:re,blur:_e}),(ee,pe)=>(H(),le("div",{ref_key:"wrapperRef",ref:E,class:z(g(ve)),style:Bt(g(Pe)),onMouseenter:g(Y),onMouseleave:g(ae)},[g(r).prefix?(H(),le("div",{key:0,class:z(g(We).e("prefix"))},[He(ee.$slots,"prefix")],2)):Ge("v-if",!0),te("div",{class:z(g(Be))},[(H(!0),le(Lt,null,In(ee.modelValue,(Oe,ze)=>(H(),Ye(g(zE),{key:ze,size:g(S),closable:g(I),type:ee.tagType,effect:ee.tagEffect,draggable:g(I)&&ee.draggable,"disable-transitions":"",onClose:Ze=>g(P)(ze),onDragstart:Ze=>g(Ie)(Ze,ze),onDragover:Ze=>g(be)(Ze,ze),onDragend:g(Ae),onDrop:Yt(()=>{},["stop"])},{default:de(()=>[He(ee.$slots,"tag",{value:Oe,index:ze},()=>[Xt(Ke(Oe),1)])]),_:2},1032,["size","closable","type","effect","draggable","onClose","onDragstart","onDragover","onDragend","onDrop"]))),128)),te("div",{class:z(g(We).e("input-wrapper"))},[an(te("input",$n({id:g(u),ref_key:"inputRef",ref:_,"onUpdate:modelValue":Oe=>po(b)?b.value=Oe:null},g(i),{type:"text",minlength:ee.minlength,maxlength:ee.maxlength,disabled:g(R),readonly:ee.readonly,autocomplete:ee.autocomplete,tabindex:ee.tabindex,placeholder:g(L),autofocus:ee.autofocus,ariaLabel:ee.ariaLabel,class:g(We).e("input"),style:g(Q),onCompositionstart:g(F),onCompositionupdate:g(X),onCompositionend:g(G),onInput:g(k),onKeydown:g(D)}),null,16,["id","onUpdate:modelValue","minlength","maxlength","disabled","readonly","autocomplete","tabindex","placeholder","autofocus","ariaLabel","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onKeydown"]),[[oA,g(b)]]),te("span",{ref_key:"calculatorRef",ref:Z,"aria-hidden":"true",class:z(g(We).e("input-calculator")),textContent:Ke(g(b))},null,10,["textContent"])],2),an(te("div",{ref_key:"dropIndicatorRef",ref:he,class:z(g(We).e("drop-indicator"))},null,2),[[Yn,g(ge)]])],2),g(Xe)?(H(),le("div",{key:1,class:z(g(We).e("suffix"))},[He(ee.$slots,"suffix"),g(ot)?(H(),Ye(g(Nt),{key:0,class:z([g(We).e("icon"),g(We).e("clear")]),onMousedown:Yt(g(ro),["prevent"]),onClick:g(B)},{default:de(()=>[oe(g(Nh))]),_:1},8,["class","onMousedown","onClick"])):Ge("v-if",!0),g(f)&&g(p)&&g(h)?(H(),Ye(g(Nt),{key:1,class:z([g($e).e("icon"),g($e).e("validateIcon"),g($e).is("loading",g(f)==="validating")])},{default:de(()=>[(H(),Ye(yn(g(p))))]),_:1},8,["class"])):Ge("v-if",!0)],2)):Ge("v-if",!0)],46,["onMouseenter","onMouseleave"]))}});var uMe=pt(cMe,[["__file","input-tag.vue"]]);const dMe=nn(uMe),hMe=ht({type:{type:String,values:["primary","success","warning","info","danger","default"],default:"default"},underline:{type:Boolean,default:!0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:To}}),fMe={click:e=>e instanceof MouseEvent},pMe=Re({name:"ElLink"}),gMe=Re({...pMe,props:hMe,emits:fMe,setup(e,{emit:t}){const n=e,s=rt("link"),i=x(()=>[s.b(),s.m(n.type),s.is("disabled",n.disabled),s.is("underline",n.underline&&!n.disabled)]);function r(a){n.disabled||t("click",a)}return(a,c)=>(H(),le("a",{class:z(g(i)),href:a.disabled||!a.href?void 0:a.href,target:a.disabled||!a.href?void 0:a.target,onClick:r},[a.icon?(H(),Ye(g(Nt),{key:0},{default:de(()=>[(H(),Ye(yn(a.icon)))]),_:1})):Ge("v-if",!0),a.$slots.default?(H(),le("span",{key:1,class:z(g(s).e("inner"))},[He(a.$slots,"default")],2)):Ge("v-if",!0),a.$slots.icon?He(a.$slots,"icon",{key:2}):Ge("v-if",!0)],10,["href","target"]))}});var mMe=pt(gMe,[["__file","link.vue"]]);const _Me=nn(mMe);let TMe=class{constructor(t,n){this.parent=t,this.domNode=n,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(t){t===this.subMenuItems.length?t=0:t<0&&(t=this.subMenuItems.length-1),this.subMenuItems[t].focus(),this.subIndex=t}addListeners(){const t=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,n=>{n.addEventListener("keydown",s=>{let i=!1;switch(s.code){case $t.down:{this.gotoSubIndex(this.subIndex+1),i=!0;break}case $t.up:{this.gotoSubIndex(this.subIndex-1),i=!0;break}case $t.tab:{uC(t,"mouseleave");break}case $t.enter:case $t.numpadEnter:case $t.space:{i=!0,s.currentTarget.click();break}}return i&&(s.preventDefault(),s.stopPropagation()),!1})})}},EMe=class{constructor(t,n){this.domNode=t,this.submenu=null,this.submenu=null,this.init(n)}init(t){this.domNode.setAttribute("tabindex","0");const n=this.domNode.querySelector(`.${t}-menu`);n&&(this.submenu=new TMe(this,n)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",t=>{let n=!1;switch(t.code){case $t.down:{uC(t.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),n=!0;break}case $t.up:{uC(t.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),n=!0;break}case $t.tab:{uC(t.currentTarget,"mouseleave");break}case $t.enter:case $t.numpadEnter:case $t.space:{n=!0,t.currentTarget.click();break}}n&&t.preventDefault()})}},vMe=class{constructor(t,n){this.domNode=t,this.init(n)}init(t){const n=this.domNode.childNodes;Array.from(n).forEach(s=>{s.nodeType===1&&new EMe(s,t)})}};const bMe=Re({name:"ElMenuCollapseTransition",setup(){const e=rt("menu");return{listeners:{onBeforeEnter:n=>n.style.opacity="0.2",onEnter(n,s){ec(n,`${e.namespace.value}-opacity-transition`),n.style.opacity="1",s()},onAfterEnter(n){Dr(n,`${e.namespace.value}-opacity-transition`),n.style.opacity=""},onBeforeLeave(n){n.dataset||(n.dataset={}),Pl(n,e.m("collapse"))?(Dr(n,e.m("collapse")),n.dataset.oldOverflow=n.style.overflow,n.dataset.scrollWidth=n.clientWidth.toString(),ec(n,e.m("collapse"))):(ec(n,e.m("collapse")),n.dataset.oldOverflow=n.style.overflow,n.dataset.scrollWidth=n.clientWidth.toString(),Dr(n,e.m("collapse"))),n.style.width=`${n.scrollWidth}px`,n.style.overflow="hidden"},onLeave(n){ec(n,"horizontal-collapse-transition"),n.style.width=`${n.dataset.scrollWidth}px`}}}}});function OMe(e,t,n,s,i,r){return H(),Ye(Li,$n({mode:"out-in"},e.listeners),{default:de(()=>[He(e.$slots,"default")]),_:3},16)}var SMe=pt(bMe,[["render",OMe],["__file","menu-collapse-transition.vue"]]);function iK(e,t){const n=x(()=>{let i=e.parent;const r=[t.value];for(;i.type.name!=="ElMenu";)i.props.index&&r.unshift(i.props.index),i=i.parent;return r});return{parentMenu:x(()=>{let i=e.parent;for(;i&&!["ElMenu","ElSubMenu"].includes(i.type.name);)i=i.parent;return i}),indexPath:n}}function yMe(e){return x(()=>{const n=e.backgroundColor;return n?new q6(n).shade(20).toString():""})}const rK=(e,t)=>{const n=rt("menu");return x(()=>n.cssVarBlock({"text-color":e.textColor||"","hover-text-color":e.textColor||"","bg-color":e.backgroundColor||"","hover-bg-color":yMe(e).value||"","active-color":e.activeTextColor||"",level:`${t}`}))},$Me=ht({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:To},expandOpenIcon:{type:To},collapseCloseIcon:{type:To},collapseOpenIcon:{type:To}}),Hw="ElSubMenu";var Ox=Re({name:Hw,props:$Me,setup(e,{slots:t,expose:n}){const s=pn(),{indexPath:i,parentMenu:r}=iK(s,x(()=>e.index)),a=rt("menu"),c=rt("sub-menu"),u=It("rootMenu");u||ti(Hw,"can not inject root menu");const h=It(`subMenu:${r.value.uid}`);h||ti(Hw,"can not inject sub menu");const f=K({}),p=K({});let _;const E=K(!1),v=K(),b=K(null),y=x(()=>P.value==="horizontal"&&L.value?"bottom-start":"right-start"),S=x(()=>P.value==="horizontal"&&L.value||P.value==="vertical"&&!u.props.collapse?e.expandCloseIcon&&e.expandOpenIcon?k.value?e.expandOpenIcon:e.expandCloseIcon:kh:e.collapseCloseIcon&&e.collapseOpenIcon?k.value?e.collapseOpenIcon:e.collapseCloseIcon:rl),L=x(()=>h.level===0),I=x(()=>{const he=e.teleported;return he===void 0?L.value:he}),R=x(()=>u.props.collapse?`${a.namespace.value}-zoom-in-left`:`${a.namespace.value}-zoom-in-top`),w=x(()=>P.value==="horizontal"&&L.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"]),k=x(()=>u.openedMenus.includes(e.index)),D=x(()=>{let he=!1;return Object.values(f.value).forEach(ge=>{ge.active&&(he=!0)}),Object.values(p.value).forEach(ge=>{ge.active&&(he=!0)}),he}),P=x(()=>u.props.mode),B=Kn({index:e.index,indexPath:i,active:D}),F=rK(u.props,h.level+1),X=x(()=>{var he;return(he=e.popperOffset)!=null?he:u.props.popperOffset}),G=x(()=>{var he;return(he=e.popperClass)!=null?he:u.props.popperClass}),re=x(()=>{var he;return(he=e.showTimeout)!=null?he:u.props.showTimeout}),_e=x(()=>{var he;return(he=e.hideTimeout)!=null?he:u.props.hideTimeout}),J=()=>{var he,ge,Ie;return(Ie=(ge=(he=b.value)==null?void 0:he.popperRef)==null?void 0:ge.popperInstanceRef)==null?void 0:Ie.destroy()},Y=he=>{he||J()},ae=()=>{u.props.menuTrigger==="hover"&&u.props.mode==="horizontal"||u.props.collapse&&u.props.mode==="vertical"||e.disabled||u.handleSubMenuClick({index:e.index,indexPath:i.value,active:D.value})},Z=(he,ge=re.value)=>{var Ie;if(he.type!=="focus"){if(u.props.menuTrigger==="click"&&u.props.mode==="horizontal"||!u.props.collapse&&u.props.mode==="vertical"||e.disabled){h.mouseInChild.value=!0;return}h.mouseInChild.value=!0,_==null||_(),{stop:_}=xm(()=>{u.openMenu(e.index,i.value)},ge),I.value&&((Ie=r.value.vnode.el)==null||Ie.dispatchEvent(new MouseEvent("mouseenter")))}},Q=(he=!1)=>{var ge;if(u.props.menuTrigger==="click"&&u.props.mode==="horizontal"||!u.props.collapse&&u.props.mode==="vertical"){h.mouseInChild.value=!1;return}_==null||_(),h.mouseInChild.value=!1,{stop:_}=xm(()=>!E.value&&u.closeMenu(e.index,i.value),_e.value),I.value&&he&&((ge=h.handleMouseleave)==null||ge.call(h,!0))};tt(()=>u.props.collapse,he=>Y(!!he));{const he=Ie=>{p.value[Ie.index]=Ie},ge=Ie=>{delete p.value[Ie.index]};An(`subMenu:${s.uid}`,{addSubMenu:he,removeSubMenu:ge,handleMouseleave:Q,mouseInChild:E,level:h.level+1})}return n({opened:k}),rn(()=>{u.addSubMenu(B),h.addSubMenu(B)}),vo(()=>{h.removeSubMenu(B),u.removeSubMenu(B)}),()=>{var he;const ge=[(he=t.title)==null?void 0:he.call(t),Gt(Nt,{class:c.e("icon-arrow"),style:{transform:k.value?e.expandCloseIcon&&e.expandOpenIcon||e.collapseCloseIcon&&e.collapseOpenIcon&&u.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>Dt(S.value)?Gt(s.appContext.components[S.value]):Gt(S.value)})],Ie=u.isMenuPopup?Gt(rr,{ref:b,visible:k.value,effect:"light",pure:!0,offset:X.value,showArrow:!1,persistent:!0,popperClass:G.value,placement:y.value,teleported:I.value,fallbackPlacements:w.value,transition:R.value,gpuAcceleration:!1},{content:()=>{var be;return Gt("div",{class:[a.m(P.value),a.m("popup-container"),G.value],onMouseenter:Ae=>Z(Ae,100),onMouseleave:()=>Q(!0),onFocus:Ae=>Z(Ae,100)},[Gt("ul",{class:[a.b(),a.m("popup"),a.m(`popup-${y.value}`)],style:F.value},[(be=t.default)==null?void 0:be.call(t)])])},default:()=>Gt("div",{class:c.e("title"),onClick:ae},ge)}):Gt(Lt,{},[Gt("div",{class:c.e("title"),ref:v,onClick:ae},ge),Gt(zA,{},{default:()=>{var be;return an(Gt("ul",{role:"menu",class:[a.b(),a.m("inline")],style:F.value},[(be=t.default)==null?void 0:be.call(t)]),[[Yn,k.value]])}})]);return Gt("li",{class:[c.b(),c.is("active",D.value),c.is("opened",k.value),c.is("disabled",e.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:k.value,onMouseenter:Z,onMouseleave:()=>Q(),onFocus:Z},[Ie])}}});const IMe=ht({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:xe(Array),default:()=>os([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:To,default:()=>lTe},popperEffect:{type:xe(String),default:"dark"},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300}}),Vw=e=>at(e)&&e.every(t=>Dt(t)),RMe={close:(e,t)=>Dt(e)&&Vw(t),open:(e,t)=>Dt(e)&&Vw(t),select:(e,t,n,s)=>Dt(e)&&Vw(t)&&Tn(n)&&(s===void 0||s instanceof Promise)};var CMe=Re({name:"ElMenu",props:IMe,emits:RMe,setup(e,{emit:t,slots:n,expose:s}){const i=pn(),r=i.appContext.config.globalProperties.$router,a=K(),c=rt("menu"),u=rt("sub-menu"),h=K(-1),f=K(e.defaultOpeneds&&!e.collapse?e.defaultOpeneds.slice(0):[]),p=K(e.defaultActive),_=K({}),E=K({}),v=x(()=>e.mode==="horizontal"||e.mode==="vertical"&&e.collapse),b=()=>{const J=p.value&&_.value[p.value];if(!J||e.mode==="horizontal"||e.collapse)return;J.indexPath.forEach(ae=>{const Z=E.value[ae];Z&&y(ae,Z.indexPath)})},y=(J,Y)=>{f.value.includes(J)||(e.uniqueOpened&&(f.value=f.value.filter(ae=>Y.includes(ae))),f.value.push(J),t("open",J,Y))},S=J=>{const Y=f.value.indexOf(J);Y!==-1&&f.value.splice(Y,1)},L=(J,Y)=>{S(J),t("close",J,Y)},I=({index:J,indexPath:Y})=>{f.value.includes(J)?L(J,Y):y(J,Y)},R=J=>{(e.mode==="horizontal"||e.collapse)&&(f.value=[]);const{index:Y,indexPath:ae}=J;if(!(hi(Y)||hi(ae)))if(e.router&&r){const Z=J.route||Y,Q=r.push(Z).then(he=>(he||(p.value=Y),he));t("select",Y,ae,{index:Y,indexPath:ae,route:Z},Q)}else p.value=Y,t("select",Y,ae,{index:Y,indexPath:ae})},w=J=>{const Y=_.value,ae=Y[J]||p.value&&Y[p.value]||Y[e.defaultActive];ae?p.value=ae.index:p.value=J},k=J=>{const Y=getComputedStyle(J),ae=Number.parseInt(Y.marginLeft,10),Z=Number.parseInt(Y.marginRight,10);return J.offsetWidth+ae+Z||0},D=()=>{var J,Y;if(!a.value)return-1;const ae=Array.from((Y=(J=a.value)==null?void 0:J.childNodes)!=null?Y:[]).filter(We=>We.nodeName!=="#comment"&&(We.nodeName!=="#text"||We.nodeValue)),Z=64,Q=getComputedStyle(a.value),he=Number.parseInt(Q.paddingLeft,10),ge=Number.parseInt(Q.paddingRight,10),Ie=a.value.clientWidth-he-ge;let be=0,Ae=0;return ae.forEach((We,$e)=>{be+=k(We),be<=Ie-Z&&(Ae=$e+1)}),Ae===ae.length?-1:Ae},P=J=>E.value[J].indexPath,B=(J,Y=33.34)=>{let ae;return()=>{ae&&clearTimeout(ae),ae=setTimeout(()=>{J()},Y)}};let F=!0;const X=()=>{if(h.value===D())return;const J=()=>{h.value=-1,Vt(()=>{h.value=D()})};F?J():B(J)(),F=!1};tt(()=>e.defaultActive,J=>{_.value[J]||(p.value=""),w(J)}),tt(()=>e.collapse,J=>{J&&(f.value=[])}),tt(_.value,b);let G;Zs(()=>{e.mode==="horizontal"&&e.ellipsis?G=Xo(a,X).stop:G==null||G()});const re=K(!1);{const J=Q=>{E.value[Q.index]=Q},Y=Q=>{delete E.value[Q.index]};An("rootMenu",Kn({props:e,openedMenus:f,items:_,subMenus:E,activeIndex:p,isMenuPopup:v,addMenuItem:Q=>{_.value[Q.index]=Q},removeMenuItem:Q=>{delete _.value[Q.index]},addSubMenu:J,removeSubMenu:Y,openMenu:y,closeMenu:L,handleMenuItemClick:R,handleSubMenuClick:I})),An(`subMenu:${i.uid}`,{addSubMenu:J,removeSubMenu:Y,mouseInChild:re,level:0})}rn(()=>{e.mode==="horizontal"&&new vMe(i.vnode.el,c.namespace.value)}),s({open:Y=>{const{indexPath:ae}=E.value[Y];ae.forEach(Z=>y(Z,ae))},close:S,handleResize:X});const _e=rK(e,0);return()=>{var J,Y;let ae=(Y=(J=n.default)==null?void 0:J.call(n))!=null?Y:[];const Z=[];if(e.mode==="horizontal"&&a.value){const ge=dp(ae),Ie=h.value===-1?ge:ge.slice(0,h.value),be=h.value===-1?[]:ge.slice(h.value);be!=null&&be.length&&e.ellipsis&&(ae=Ie,Z.push(Gt(Ox,{index:"sub-menu-more",class:u.e("hide-arrow"),popperOffset:e.popperOffset},{title:()=>Gt(Nt,{class:u.e("icon-more")},{default:()=>Gt(e.ellipsisIcon)}),default:()=>be})))}const Q=e.closeOnClickOutside?[[$h,()=>{f.value.length&&(re.value||(f.value.forEach(ge=>t("close",ge,P(ge))),f.value=[]))}]]:[],he=an(Gt("ul",{key:String(e.collapse),role:"menubar",ref:a,style:_e.value,class:{[c.b()]:!0,[c.m(e.mode)]:!0,[c.m("collapse")]:e.collapse}},[...ae,...Z]),Q);return e.collapseTransition&&e.mode==="vertical"?Gt(SMe,()=>he):he}}});const MMe=ht({index:{type:xe([String,null]),default:null},route:{type:xe([String,Object])},disabled:Boolean}),AMe={click:e=>Dt(e.index)&&at(e.indexPath)},Gw="ElMenuItem",LMe=Re({name:Gw,components:{ElTooltip:rr},props:MMe,emits:AMe,setup(e,{emit:t}){const n=pn(),s=It("rootMenu"),i=rt("menu"),r=rt("menu-item");s||ti(Gw,"can not inject root menu");const{parentMenu:a,indexPath:c}=iK(n,oo(e,"index")),u=It(`subMenu:${a.value.uid}`);u||ti(Gw,"can not inject sub menu");const h=x(()=>e.index===s.activeIndex),f=Kn({index:e.index,indexPath:c,active:h}),p=()=>{e.disabled||(s.handleMenuItemClick({index:e.index,indexPath:c.value,route:e.route}),t("click",f))};return rn(()=>{u.addSubMenu(f),s.addMenuItem(f)}),vo(()=>{u.removeSubMenu(f),s.removeMenuItem(f)}),{parentMenu:a,rootMenu:s,active:h,nsMenu:i,nsMenuItem:r,handleClick:p}}});function wMe(e,t,n,s,i,r){const a=Ot("el-tooltip");return H(),le("li",{class:z([e.nsMenuItem.b(),e.nsMenuItem.is("active",e.active),e.nsMenuItem.is("disabled",e.disabled)]),role:"menuitem",tabindex:"-1",onClick:e.handleClick},[e.parentMenu.type.name==="ElMenu"&&e.rootMenu.props.collapse&&e.$slots.title?(H(),Ye(a,{key:0,effect:e.rootMenu.props.popperEffect,placement:"right","fallback-placements":["left"],persistent:""},{content:de(()=>[He(e.$slots,"title")]),default:de(()=>[te("div",{class:z(e.nsMenu.be("tooltip","trigger"))},[He(e.$slots,"default")],2)]),_:3},8,["effect"])):(H(),le(Lt,{key:1},[He(e.$slots,"default"),He(e.$slots,"title")],64))],10,["onClick"])}var lK=pt(LMe,[["render",wMe],["__file","menu-item.vue"]]);const kMe={title:String},NMe="ElMenuItemGroup",PMe=Re({name:NMe,props:kMe,setup(){return{ns:rt("menu-item-group")}}});function DMe(e,t,n,s,i,r){return H(),le("li",{class:z(e.ns.b())},[te("div",{class:z(e.ns.e("title"))},[e.$slots.title?He(e.$slots,"title",{key:1}):(H(),le(Lt,{key:0},[Xt(Ke(e.title),1)],64))],2),te("ul",null,[He(e.$slots,"default")])],2)}var aK=pt(PMe,[["render",DMe],["__file","menu-item-group.vue"]]);const xMe=nn(CMe,{MenuItem:lK,MenuItemGroup:aK,SubMenu:Ox}),BMe=is(lK),FMe=is(aK),UMe=is(Ox),HMe=ht({icon:{type:To,default:()=>R_e},title:String,content:{type:String,default:""}}),VMe={back:()=>!0},GMe=Re({name:"ElPageHeader"}),WMe=Re({...GMe,props:HMe,emits:VMe,setup(e,{emit:t}){const n=Ks(),{t:s}=xn(),i=rt("page-header"),r=x(()=>[i.b(),{[i.m("has-breadcrumb")]:!!n.breadcrumb,[i.m("has-extra")]:!!n.extra,[i.is("contentful")]:!!n.default}]);function a(){t("back")}return(c,u)=>(H(),le("div",{class:z(g(r))},[c.$slots.breadcrumb?(H(),le("div",{key:0,class:z(g(i).e("breadcrumb"))},[He(c.$slots,"breadcrumb")],2)):Ge("v-if",!0),te("div",{class:z(g(i).e("header"))},[te("div",{class:z(g(i).e("left"))},[te("div",{class:z(g(i).e("back")),role:"button",tabindex:"0",onClick:a},[c.icon||c.$slots.icon?(H(),le("div",{key:0,"aria-label":c.title||g(s)("el.pageHeader.title"),class:z(g(i).e("icon"))},[He(c.$slots,"icon",{},()=>[c.icon?(H(),Ye(g(Nt),{key:0},{default:de(()=>[(H(),Ye(yn(c.icon)))]),_:1})):Ge("v-if",!0)])],10,["aria-label"])):Ge("v-if",!0),te("div",{class:z(g(i).e("title"))},[He(c.$slots,"title",{},()=>[Xt(Ke(c.title||g(s)("el.pageHeader.title")),1)])],2)],2),oe(g(XY),{direction:"vertical"}),te("div",{class:z(g(i).e("content"))},[He(c.$slots,"content",{},()=>[Xt(Ke(c.content),1)])],2)],2),c.$slots.extra?(H(),le("div",{key:0,class:z(g(i).e("extra"))},[He(c.$slots,"extra")],2)):Ge("v-if",!0)],2),c.$slots.default?(H(),le("div",{key:1,class:z(g(i).e("main"))},[He(c.$slots,"default")],2)):Ge("v-if",!0)],2))}});var XMe=pt(WMe,[["__file","page-header.vue"]]);const zMe=nn(XMe),cK=Symbol("elPaginationKey"),YMe=ht({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:To}}),KMe={click:e=>e instanceof MouseEvent},jMe=Re({name:"ElPaginationPrev"}),QMe=Re({...jMe,props:YMe,emits:KMe,setup(e){const t=e,{t:n}=xn(),s=x(()=>t.disabled||t.currentPage<=1);return(i,r)=>(H(),le("button",{type:"button",class:"btn-prev",disabled:g(s),"aria-label":i.prevText||g(n)("el.pagination.prev"),"aria-disabled":g(s),onClick:a=>i.$emit("click",a)},[i.prevText?(H(),le("span",{key:0},Ke(i.prevText),1)):(H(),Ye(g(Nt),{key:1},{default:de(()=>[(H(),Ye(yn(i.prevIcon)))]),_:1}))],8,["disabled","aria-label","aria-disabled","onClick"]))}});var qMe=pt(QMe,[["__file","prev.vue"]]);const JMe=ht({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:To}}),ZMe=Re({name:"ElPaginationNext"}),eAe=Re({...ZMe,props:JMe,emits:["click"],setup(e){const t=e,{t:n}=xn(),s=x(()=>t.disabled||t.currentPage===t.pageCount||t.pageCount===0);return(i,r)=>(H(),le("button",{type:"button",class:"btn-next",disabled:g(s),"aria-label":i.nextText||g(n)("el.pagination.next"),"aria-disabled":g(s),onClick:a=>i.$emit("click",a)},[i.nextText?(H(),le("span",{key:0},Ke(i.nextText),1)):(H(),Ye(g(Nt),{key:1},{default:de(()=>[(H(),Ye(yn(i.nextIcon)))]),_:1}))],8,["disabled","aria-label","aria-disabled","onClick"]))}});var tAe=pt(eAe,[["__file","next.vue"]]);const uK=Symbol("ElSelectGroup"),Ev=Symbol("ElSelect");function nAe(e,t){const n=It(Ev),s=It(uK,{disabled:!1}),i=x(()=>f(wr(n.props.modelValue),e.value)),r=x(()=>{var E;if(n.props.multiple){const v=wr((E=n.props.modelValue)!=null?E:[]);return!i.value&&v.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),a=x(()=>e.label||(Tn(e.value)?"":e.value)),c=x(()=>e.value||e.label||""),u=x(()=>e.disabled||t.groupDisabled||r.value),h=pn(),f=(E=[],v)=>{if(Tn(e.value)){const b=n.props.valueKey;return E&&E.some(y=>uo(Ns(y,b))===Ns(v,b))}else return E&&E.includes(v)},p=()=>{!e.disabled&&!s.disabled&&(n.states.hoveringIndex=n.optionsArray.indexOf(h.proxy))},_=E=>{const v=new RegExp(rx(E),"i");t.visible=v.test(a.value)||e.created};return tt(()=>a.value,()=>{!e.created&&!n.props.remote&&n.setSelected()}),tt(()=>e.value,(E,v)=>{const{remote:b,valueKey:y}=n.props;if(E!==v&&(n.onOptionDestroy(v,h.proxy),n.onOptionCreate(h.proxy)),!e.created&&!b){if(y&&Tn(E)&&Tn(v)&&E[y]===v[y])return;n.setSelected()}}),tt(()=>s.disabled,()=>{t.groupDisabled=s.disabled},{immediate:!0}),{select:n,currentLabel:a,currentValue:c,itemSelected:i,isDisabled:u,hoverItem:p,updateOption:_}}const oAe=Re({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=rt("select"),n=Gi(),s=x(()=>[t.be("dropdown","item"),t.is("disabled",g(c)),t.is("selected",g(a)),t.is("hovering",g(_))]),i=Kn({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:r,itemSelected:a,isDisabled:c,select:u,hoverItem:h,updateOption:f}=nAe(e,i),{visible:p,hover:_}=fi(i),E=pn().proxy;u.onOptionCreate(E),vo(()=>{const b=E.value,{selected:y}=u.states,S=y.some(L=>L.value===E.value);Vt(()=>{u.states.cachedOptions.get(b)===E&&!S&&u.states.cachedOptions.delete(b)}),u.onOptionDestroy(b,E)});function v(){c.value||u.handleOptionSelect(E)}return{ns:t,id:n,containerKls:s,currentLabel:r,itemSelected:a,isDisabled:c,select:u,hoverItem:h,updateOption:f,visible:p,hover:_,selectOptionClick:v,states:i}}});function sAe(e,t,n,s,i,r){return an((H(),le("li",{id:e.id,class:z(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMousemove:e.hoverItem,onClick:Yt(e.selectOptionClick,["stop"])},[He(e.$slots,"default",{},()=>[te("span",null,Ke(e.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMousemove","onClick"])),[[Yn,e.visible]])}var Sx=pt(oAe,[["render",sAe],["__file","option.vue"]]);const iAe=Re({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=It(Ev),t=rt("select"),n=x(()=>e.props.popperClass),s=x(()=>e.props.multiple),i=x(()=>e.props.fitInputWidth),r=K("");function a(){var c;r.value=`${(c=e.selectRef)==null?void 0:c.offsetWidth}px`}return rn(()=>{a(),Xo(e.selectRef,a)}),{ns:t,minWidth:r,popperClass:n,isMultiple:s,isFitInputWidth:i}}});function rAe(e,t,n,s,i,r){return H(),le("div",{class:z([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:Bt({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(H(),le("div",{key:0,class:z(e.ns.be("dropdown","header"))},[He(e.$slots,"header")],2)):Ge("v-if",!0),He(e.$slots,"default"),e.$slots.footer?(H(),le("div",{key:1,class:z(e.ns.be("dropdown","footer"))},[He(e.$slots,"footer")],2)):Ge("v-if",!0)],6)}var lAe=pt(iAe,[["render",rAe],["__file","select-dropdown.vue"]]);const aAe=11,cAe=(e,t)=>{const{t:n}=xn(),s=Gi(),i=rt("select"),r=rt("input"),a=Kn({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),c=K(null),u=K(null),h=K(null),f=K(null),p=K(null),_=K(null),E=K(null),v=K(null),b=K(null),y=K(null),S=K(null),L=K(null),{isComposing:I,handleCompositionStart:R,handleCompositionUpdate:w,handleCompositionEnd:k}=I$({afterComposition:bt=>qt(bt)}),{wrapperRef:D,isFocused:P,handleBlur:B}=Pp(p,{beforeFocus(){return ae.value},afterFocus(){e.automaticDropdown&&!F.value&&(F.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(bt){var jt,Hn;return((jt=h.value)==null?void 0:jt.isFocusInsideContent(bt))||((Hn=f.value)==null?void 0:Hn.isFocusInsideContent(bt))},afterBlur(){F.value=!1,a.menuVisibleOnFocus=!1}}),F=K(!1),X=K(),{form:G,formItem:re}=lr(),{inputId:_e}=fc(e,{formItemContext:re}),{valueOnClear:J,isEmptyValue:Y}=xA(e),ae=x(()=>e.disabled||(G==null?void 0:G.disabled)),Z=x(()=>at(e.modelValue)?e.modelValue.length>0:!Y(e.modelValue)),Q=x(()=>{var bt;return(bt=G==null?void 0:G.statusIcon)!=null?bt:!1}),he=x(()=>e.clearable&&!ae.value&&a.inputHovering&&Z.value),ge=x(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),Ie=x(()=>i.is("reverse",ge.value&&F.value)),be=x(()=>(re==null?void 0:re.validateState)||""),Ae=x(()=>HA[be.value]),We=x(()=>e.remote?300:0),$e=x(()=>e.loading?e.loadingText||n("el.select.loading"):e.remote&&!a.inputValue&&a.options.size===0?!1:e.filterable&&a.inputValue&&a.options.size>0&&ve.value===0?e.noMatchText||n("el.select.noMatch"):a.options.size===0?e.noDataText||n("el.select.noData"):null),ve=x(()=>Pe.value.filter(bt=>bt.visible).length),Pe=x(()=>{const bt=Array.from(a.options.values()),jt=[];return a.optionValues.forEach(Hn=>{const rs=bt.findIndex(Ps=>Ps.value===Hn);rs>-1&&jt.push(bt[rs])}),jt.length>=bt.length?jt:bt}),Be=x(()=>Array.from(a.cachedOptions.values())),ot=x(()=>{const bt=Pe.value.filter(jt=>!jt.created).some(jt=>jt.currentLabel===a.inputValue);return e.filterable&&e.allowCreate&&a.inputValue!==""&&!bt}),Xe=()=>{e.filterable&&Ut(e.filterMethod)||e.filterable&&e.remote&&Ut(e.remoteMethod)||Pe.value.forEach(bt=>{var jt;(jt=bt.updateOption)==null||jt.call(bt,a.inputValue)})},ee=Fs(),pe=x(()=>["small"].includes(ee.value)?"small":"default"),Oe=x({get(){return F.value&&$e.value!==!1},set(bt){F.value=bt}}),ze=x(()=>{if(e.multiple&&!ho(e.modelValue))return wr(e.modelValue).length===0&&!a.inputValue;const bt=at(e.modelValue)?e.modelValue[0]:e.modelValue;return e.filterable||ho(bt)?!a.inputValue:!0}),Ze=x(()=>{var bt;const jt=(bt=e.placeholder)!=null?bt:n("el.select.placeholder");return e.multiple||!Z.value?jt:a.selectedLabel}),De=x(()=>VN?null:"mouseenter");tt(()=>e.modelValue,(bt,jt)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(a.inputValue="",me("")),Ue(),!Hi(bt,jt)&&e.validateEvent&&(re==null||re.validate("change").catch(Hn=>void 0))},{flush:"post",deep:!0}),tt(()=>F.value,bt=>{bt?me(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0),t("visible-change",bt)}),tt(()=>a.options.entries(),()=>{Dn&&(Ue(),e.defaultFirstOption&&(e.filterable||e.remote)&&ve.value&&Te())},{flush:"post"}),tt(()=>a.hoveringIndex,bt=>{Wt(bt)&&bt>-1?X.value=Pe.value[bt]||{}:X.value={},Pe.value.forEach(jt=>{jt.hover=X.value===jt})}),Zs(()=>{a.isBeforeHide||Xe()});const me=bt=>{a.previousQuery===bt||I.value||(a.previousQuery=bt,e.filterable&&Ut(e.filterMethod)?e.filterMethod(bt):e.filterable&&e.remote&&Ut(e.remoteMethod)&&e.remoteMethod(bt),e.defaultFirstOption&&(e.filterable||e.remote)&&ve.value?Vt(Te):Vt(ct))},Te=()=>{const bt=Pe.value.filter(Ps=>Ps.visible&&!Ps.disabled&&!Ps.states.groupDisabled),jt=bt.find(Ps=>Ps.created),Hn=bt[0],rs=Pe.value.map(Ps=>Ps.value);a.hoveringIndex=ft(rs,jt||Hn)},Ue=()=>{if(e.multiple)a.selectedLabel="";else{const jt=at(e.modelValue)?e.modelValue[0]:e.modelValue,Hn=qe(jt);a.selectedLabel=Hn.currentLabel,a.selected=[Hn];return}const bt=[];ho(e.modelValue)||wr(e.modelValue).forEach(jt=>{bt.push(qe(jt))}),a.selected=bt},qe=bt=>{let jt;const Hn=sy(bt);for(let ul=a.cachedOptions.size-1;ul>=0;ul--){const ur=Be.value[ul];if(Hn?Ns(ur.value,e.valueKey)===Ns(bt,e.valueKey):ur.value===bt){jt={value:bt,currentLabel:ur.currentLabel,get isDisabled(){return ur.isDisabled}};break}}if(jt)return jt;const rs=Hn?bt.label:bt??"";return{value:bt,currentLabel:rs}},ct=()=>{a.hoveringIndex=Pe.value.findIndex(bt=>a.selected.some(jt=>ke(jt)===ke(bt)))},Ne=()=>{a.selectionWidth=u.value.getBoundingClientRect().width},Se=()=>{a.calculatorWidth=_.value.getBoundingClientRect().width},Je=()=>{a.collapseItemWidth=S.value.getBoundingClientRect().width},ut=()=>{var bt,jt;(jt=(bt=h.value)==null?void 0:bt.updatePopper)==null||jt.call(bt)},Mt=()=>{var bt,jt;(jt=(bt=f.value)==null?void 0:bt.updatePopper)==null||jt.call(bt)},mt=()=>{a.inputValue.length>0&&!F.value&&(F.value=!0),me(a.inputValue)},qt=bt=>{if(a.inputValue=bt.target.value,e.remote)ce();else return mt()},ce=Vl(()=>{mt()},We.value),q=bt=>{Hi(e.modelValue,bt)||t(_o,bt)},ne=bt=>X5(bt,jt=>{const Hn=a.cachedOptions.get(jt);return Hn&&!Hn.disabled&&!Hn.states.groupDisabled}),Le=bt=>{if(e.multiple&&bt.code!==$t.delete&&bt.target.value.length<=0){const jt=wr(e.modelValue).slice(),Hn=ne(jt);if(Hn<0)return;const rs=jt[Hn];jt.splice(Hn,1),t(un,jt),q(jt),t("remove-tag",rs)}},ue=(bt,jt)=>{const Hn=a.selected.indexOf(jt);if(Hn>-1&&!ae.value){const rs=wr(e.modelValue).slice();rs.splice(Hn,1),t(un,rs),q(rs),t("remove-tag",jt.value)}bt.stopPropagation(),Zn()},Fe=bt=>{bt.stopPropagation();const jt=e.multiple?[]:J.value;if(e.multiple)for(const Hn of a.selected)Hn.isDisabled&&jt.push(Hn.value);t(un,jt),q(jt),a.hoveringIndex=-1,F.value=!1,t("clear"),Zn()},ye=bt=>{var jt;if(e.multiple){const Hn=wr((jt=e.modelValue)!=null?jt:[]).slice(),rs=ft(Hn,bt);rs>-1?Hn.splice(rs,1):(e.multipleLimit<=0||Hn.length<e.multipleLimit)&&Hn.push(bt.value),t(un,Hn),q(Hn),bt.created&&me(""),e.filterable&&!e.reserveKeyword&&(a.inputValue="")}else t(un,bt.value),q(bt.value),F.value=!1;Zn(),!F.value&&Vt(()=>{Kt(bt)})},ft=(bt=[],jt)=>ho(jt)?-1:Tn(jt.value)?bt.findIndex(Hn=>Hi(Ns(Hn,e.valueKey),ke(jt))):bt.indexOf(jt.value),Kt=bt=>{var jt,Hn,rs,Ps,ul;const ur=at(bt)?bt[0]:bt;let Br=null;if(ur!=null&&ur.value){const dl=Pe.value.filter(_a=>_a.value===ur.value);dl.length>0&&(Br=dl[0].$el)}if(h.value&&Br){const dl=(Ps=(rs=(Hn=(jt=h.value)==null?void 0:jt.popperRef)==null?void 0:Hn.contentRef)==null?void 0:rs.querySelector)==null?void 0:Ps.call(rs,`.${i.be("dropdown","wrap")}`);dl&&DD(dl,Br)}(ul=L.value)==null||ul.handleScroll()},En=bt=>{a.options.set(bt.value,bt),a.cachedOptions.set(bt.value,bt)},Rn=(bt,jt)=>{a.options.get(bt)===jt&&a.options.delete(bt)},Lo=x(()=>{var bt,jt;return(jt=(bt=h.value)==null?void 0:bt.popperRef)==null?void 0:jt.contentRef}),Ln=()=>{a.isBeforeHide=!1,Vt(()=>Kt(a.selected))},Zn=()=>{var bt;(bt=p.value)==null||bt.focus()},On=()=>{var bt;if(F.value){F.value=!1,Vt(()=>{var jt;return(jt=p.value)==null?void 0:jt.blur()});return}(bt=p.value)==null||bt.blur()},xo=bt=>{Fe(bt)},ie=bt=>{if(F.value=!1,P.value){const jt=new FocusEvent("focus",bt);Vt(()=>B(jt))}},Ce=()=>{a.inputValue.length>0?a.inputValue="":F.value=!1},U=()=>{ae.value||(VN&&(a.inputHovering=!0),a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:F.value=!F.value)},se=()=>{if(!F.value)U();else{const bt=Pe.value[a.hoveringIndex];bt&&!bt.isDisabled&&ye(bt)}},ke=bt=>Tn(bt.value)?Ns(bt.value,e.valueKey):bt.value,je=x(()=>Pe.value.filter(bt=>bt.visible).every(bt=>bt.isDisabled)),Rt=x(()=>e.multiple?e.collapseTags?a.selected.slice(0,e.maxCollapseTags):a.selected:[]),Qt=x(()=>e.multiple?e.collapseTags?a.selected.slice(e.maxCollapseTags):[]:[]),Cn=bt=>{if(!F.value){F.value=!0;return}if(!(a.options.size===0||ve.value===0||I.value)&&!je.value){bt==="next"?(a.hoveringIndex++,a.hoveringIndex===a.options.size&&(a.hoveringIndex=0)):bt==="prev"&&(a.hoveringIndex--,a.hoveringIndex<0&&(a.hoveringIndex=a.options.size-1));const jt=Pe.value[a.hoveringIndex];(jt.isDisabled||!jt.visible)&&Cn(bt),Vt(()=>Kt(X.value))}},fs=()=>{if(!u.value)return 0;const bt=window.getComputedStyle(u.value);return Number.parseFloat(bt.gap||"6px")},ps=x(()=>{const bt=fs();return{maxWidth:`${S.value&&e.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-bt:a.selectionWidth}px`}}),js=x(()=>({maxWidth:`${a.selectionWidth}px`})),cr=x(()=>({width:`${Math.max(a.calculatorWidth,aAe)}px`}));return Xo(u,Ne),Xo(_,Se),Xo(b,ut),Xo(D,ut),Xo(y,Mt),Xo(S,Je),rn(()=>{Ue()}),{inputId:_e,contentId:s,nsSelect:i,nsInput:r,states:a,isFocused:P,expanded:F,optionsArray:Pe,hoverOption:X,selectSize:ee,filteredOptionsCount:ve,resetCalculatorWidth:Se,updateTooltip:ut,updateTagTooltip:Mt,debouncedOnInputChange:ce,onInput:qt,deletePrevTag:Le,deleteTag:ue,deleteSelected:Fe,handleOptionSelect:ye,scrollToOption:Kt,hasModelValue:Z,shouldShowPlaceholder:ze,currentPlaceholder:Ze,mouseEnterEventName:De,needStatusIcon:Q,showClose:he,iconComponent:ge,iconReverse:Ie,validateState:be,validateIcon:Ae,showNewOption:ot,updateOptions:Xe,collapseTagSize:pe,setSelected:Ue,selectDisabled:ae,emptyText:$e,handleCompositionStart:R,handleCompositionUpdate:w,handleCompositionEnd:k,onOptionCreate:En,onOptionDestroy:Rn,handleMenuEnter:Ln,focus:Zn,blur:On,handleClearClick:xo,handleClickOutside:ie,handleEsc:Ce,toggleMenu:U,selectOption:se,getValueKey:ke,navigateOptions:Cn,dropdownMenuVisible:Oe,showTagList:Rt,collapseTagList:Qt,tagStyle:ps,collapseTagStyle:js,inputStyle:cr,popperRef:Lo,inputRef:p,tooltipRef:h,tagTooltipRef:f,calculatorRef:_,prefixRef:E,suffixRef:v,selectRef:c,wrapperRef:D,selectionRef:u,scrollbarRef:L,menuRef:b,tagMenuRef:y,collapseItemRef:S}};var uAe=Re({name:"ElOptions",setup(e,{slots:t}){const n=It(Ev);let s=[];return()=>{var i,r;const a=(i=t.default)==null?void 0:i.call(t),c=[];function u(h){at(h)&&h.forEach(f=>{var p,_,E,v;const b=(p=(f==null?void 0:f.type)||{})==null?void 0:p.name;b==="ElOptionGroup"?u(!Dt(f.children)&&!at(f.children)&&Ut((_=f.children)==null?void 0:_.default)?(E=f.children)==null?void 0:E.default():f.children):b==="ElOption"?c.push((v=f.props)==null?void 0:v.value):at(f.children)&&u(f.children)})}return a.length&&u((r=a[0])==null?void 0:r.children),Hi(c,s)||(s=c,n&&(n.states.optionValues=c)),a}}});const dAe=ht({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:Ys,effect:{type:xe(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:xe(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:Si.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:To,default:Nh},fitInputWidth:Boolean,suffixIcon:{type:To,default:kh},tagType:{...yh.type,default:"info"},tagEffect:{...yh.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:xe(String),values:Ph,default:"bottom-start"},fallbackPlacements:{type:xe(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:String,...gv,...Xi(["ariaLabel"])}),vG="ElSelect",hAe=Re({name:vG,componentName:vG,components:{ElSelectMenu:lAe,ElOption:Sx,ElOptions:uAe,ElTag:zE,ElScrollbar:ld,ElTooltip:rr,ElIcon:Nt},directives:{ClickOutside:$h},props:dAe,emits:[un,_o,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const n=x(()=>{const{modelValue:a,multiple:c}=e,u=c?[]:void 0;return at(a)?c?a:u:c?u:a}),s=Kn({...fi(e),modelValue:n}),i=cAe(s,t);An(Ev,Kn({props:s,states:i.states,optionsArray:i.optionsArray,handleOptionSelect:i.handleOptionSelect,onOptionCreate:i.onOptionCreate,onOptionDestroy:i.onOptionDestroy,selectRef:i.selectRef,setSelected:i.setSelected}));const r=x(()=>e.multiple?i.states.selected.map(a=>a.currentLabel):i.states.selectedLabel);return{...i,modelValue:n,selectedLabel:r}}});function fAe(e,t,n,s,i,r){const a=Ot("el-tag"),c=Ot("el-tooltip"),u=Ot("el-icon"),h=Ot("el-option"),f=Ot("el-options"),p=Ot("el-scrollbar"),_=Ot("el-select-menu"),E=eA("click-outside");return an((H(),le("div",{ref:"selectRef",class:z([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),[DS(e.mouseEnterEventName)]:v=>e.states.inputHovering=!0,onMouseleave:v=>e.states.inputHovering=!1},[oe(c,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,"append-to":e.appendTo,"show-arrow":e.showArrow,offset:e.offset,onBeforeShow:e.handleMenuEnter,onHide:v=>e.states.isBeforeHide=!1},{default:de(()=>{var v;return[te("div",{ref:"wrapperRef",class:z([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:Yt(e.toggleMenu,["prevent"])},[e.$slots.prefix?(H(),le("div",{key:0,ref:"prefixRef",class:z(e.nsSelect.e("prefix"))},[He(e.$slots,"prefix")],2)):Ge("v-if",!0),te("div",{ref:"selectionRef",class:z([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?He(e.$slots,"tag",{key:0},()=>[(H(!0),le(Lt,null,In(e.showTagList,b=>(H(),le("div",{key:e.getValueKey(b),class:z(e.nsSelect.e("selected-item"))},[oe(a,{closable:!e.selectDisabled&&!b.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:Bt(e.tagStyle),onClose:y=>e.deleteTag(y,b)},{default:de(()=>[te("span",{class:z(e.nsSelect.e("tags-text"))},[He(e.$slots,"label",{label:b.currentLabel,value:b.value},()=>[Xt(Ke(b.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(H(),Ye(c,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:de(()=>[te("div",{ref:"collapseItemRef",class:z(e.nsSelect.e("selected-item"))},[oe(a,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:Bt(e.collapseTagStyle)},{default:de(()=>[te("span",{class:z(e.nsSelect.e("tags-text"))}," + "+Ke(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:de(()=>[te("div",{ref:"tagMenuRef",class:z(e.nsSelect.e("selection"))},[(H(!0),le(Lt,null,In(e.collapseTagList,b=>(H(),le("div",{key:e.getValueKey(b),class:z(e.nsSelect.e("selected-item"))},[oe(a,{class:"in-tooltip",closable:!e.selectDisabled&&!b.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:y=>e.deleteTag(y,b)},{default:de(()=>[te("span",{class:z(e.nsSelect.e("tags-text"))},[He(e.$slots,"label",{label:b.currentLabel,value:b.value},()=>[Xt(Ke(b.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):Ge("v-if",!0)]):Ge("v-if",!0),te("div",{class:z([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[an(te("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":b=>e.states.inputValue=b,type:"text",name:e.name,class:z([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:Bt(e.inputStyle),tabindex:e.tabindex,role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((v=e.hoverOption)==null?void 0:v.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[So(Yt(b=>e.navigateOptions("next"),["stop","prevent"]),["down"]),So(Yt(b=>e.navigateOptions("prev"),["stop","prevent"]),["up"]),So(Yt(e.handleEsc,["stop","prevent"]),["esc"]),So(Yt(e.selectOption,["stop","prevent"]),["enter"]),So(Yt(e.deletePrevTag,["stop"]),["delete"])],onCompositionstart:e.handleCompositionStart,onCompositionupdate:e.handleCompositionUpdate,onCompositionend:e.handleCompositionEnd,onInput:e.onInput,onClick:Yt(e.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[oA,e.states.inputValue]]),e.filterable?(H(),le("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:z(e.nsSelect.e("input-calculator")),textContent:Ke(e.states.inputValue)},null,10,["textContent"])):Ge("v-if",!0)],2),e.shouldShowPlaceholder?(H(),le("div",{key:1,class:z([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?He(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},()=>[te("span",null,Ke(e.currentPlaceholder),1)]):(H(),le("span",{key:1},Ke(e.currentPlaceholder),1))],2)):Ge("v-if",!0)],2),te("div",{ref:"suffixRef",class:z(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(H(),Ye(u,{key:0,class:z([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:de(()=>[(H(),Ye(yn(e.iconComponent)))]),_:1},8,["class"])):Ge("v-if",!0),e.showClose&&e.clearIcon?(H(),Ye(u,{key:1,class:z([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.nsSelect.e("clear")]),onClick:e.handleClearClick},{default:de(()=>[(H(),Ye(yn(e.clearIcon)))]),_:1},8,["class","onClick"])):Ge("v-if",!0),e.validateState&&e.validateIcon&&e.needStatusIcon?(H(),Ye(u,{key:2,class:z([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:de(()=>[(H(),Ye(yn(e.validateIcon)))]),_:1},8,["class"])):Ge("v-if",!0)],2)],10,["onClick"])]}),content:de(()=>[oe(_,{ref:"menuRef"},{default:de(()=>[e.$slots.header?(H(),le("div",{key:0,class:z(e.nsSelect.be("dropdown","header")),onClick:Yt(()=>{},["stop"])},[He(e.$slots,"header")],10,["onClick"])):Ge("v-if",!0),an(oe(p,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:z([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:de(()=>[e.showNewOption?(H(),Ye(h,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):Ge("v-if",!0),oe(f,null,{default:de(()=>[He(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[Yn,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(H(),le("div",{key:1,class:z(e.nsSelect.be("dropdown","loading"))},[He(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(H(),le("div",{key:2,class:z(e.nsSelect.be("dropdown","empty"))},[He(e.$slots,"empty",{},()=>[te("span",null,Ke(e.emptyText),1)])],2)):Ge("v-if",!0),e.$slots.footer?(H(),le("div",{key:3,class:z(e.nsSelect.be("dropdown","footer")),onClick:Yt(()=>{},["stop"])},[He(e.$slots,"footer")],10,["onClick"])):Ge("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],16,["onMouseleave"])),[[E,e.handleClickOutside,e.popperRef]])}var pAe=pt(hAe,[["render",fAe],["__file","select.vue"]]);const gAe=Re({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=rt("select"),n=K(null),s=pn(),i=K([]);An(uK,Kn({...fi(e)}));const r=x(()=>i.value.some(h=>h.visible===!0)),a=h=>{var f,p;return((f=h.type)==null?void 0:f.name)==="ElOption"&&!!((p=h.component)!=null&&p.proxy)},c=h=>{const f=wr(h),p=[];return f.forEach(_=>{var E,v;a(_)?p.push(_.component.proxy):(E=_.children)!=null&&E.length?p.push(...c(_.children)):(v=_.component)!=null&&v.subTree&&p.push(...c(_.component.subTree))}),p},u=()=>{i.value=c(s.subTree)};return rn(()=>{u()}),J5(n,u,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:r,ns:t}}});function mAe(e,t,n,s,i,r){return an((H(),le("ul",{ref:"groupRef",class:z(e.ns.be("group","wrap"))},[te("li",{class:z(e.ns.be("group","title"))},Ke(e.label),3),te("li",null,[te("ul",{class:z(e.ns.b("group"))},[He(e.$slots,"default")],2)])],2)),[[Yn,e.visible]])}var dK=pt(gAe,[["render",mAe],["__file","option-group.vue"]]);const Fm=nn(pAe,{Option:Sx,OptionGroup:dK}),MM=is(Sx),_Ae=is(dK),yx=()=>It(cK,{}),TAe=ht({pageSize:{type:Number,required:!0},pageSizes:{type:xe(Array),default:()=>os([10,20,30,40,50,100])},popperClass:{type:String},disabled:Boolean,teleported:Boolean,size:{type:String,values:rd},appendSizeTo:String}),EAe=Re({name:"ElPaginationSizes"}),vAe=Re({...EAe,props:TAe,emits:["page-size-change"],setup(e,{emit:t}){const n=e,{t:s}=xn(),i=rt("pagination"),r=yx(),a=K(n.pageSize);tt(()=>n.pageSizes,(h,f)=>{if(!Hi(h,f)&&at(h)){const p=h.includes(n.pageSize)?n.pageSize:n.pageSizes[0];t("page-size-change",p)}}),tt(()=>n.pageSize,h=>{a.value=h});const c=x(()=>n.pageSizes);function u(h){var f;h!==a.value&&(a.value=h,(f=r.handleSizeChange)==null||f.call(r,Number(h)))}return(h,f)=>(H(),le("span",{class:z(g(i).e("sizes"))},[oe(g(Fm),{"model-value":a.value,disabled:h.disabled,"popper-class":h.popperClass,size:h.size,teleported:h.teleported,"validate-event":!1,"append-to":h.appendSizeTo,onChange:u},{default:de(()=>[(H(!0),le(Lt,null,In(g(c),p=>(H(),Ye(g(MM),{key:p,value:p,label:p+g(s)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","size","teleported","append-to"])],2))}});var bAe=pt(vAe,[["__file","sizes.vue"]]);const OAe=ht({size:{type:String,values:rd}}),SAe=Re({name:"ElPaginationJumper"}),yAe=Re({...SAe,props:OAe,setup(e){const{t}=xn(),n=rt("pagination"),{pageCount:s,disabled:i,currentPage:r,changeEvent:a}=yx(),c=K(),u=x(()=>{var p;return(p=c.value)!=null?p:r==null?void 0:r.value});function h(p){c.value=p?+p:""}function f(p){p=Math.trunc(+p),a==null||a(p),c.value=void 0}return(p,_)=>(H(),le("span",{class:z(g(n).e("jump")),disabled:g(i)},[te("span",{class:z([g(n).e("goto")])},Ke(g(t)("el.pagination.goto")),3),oe(g(Nr),{size:p.size,class:z([g(n).e("editor"),g(n).is("in-pagination")]),min:1,max:g(s),disabled:g(i),"model-value":g(u),"validate-event":!1,"aria-label":g(t)("el.pagination.page"),type:"number","onUpdate:modelValue":h,onChange:f},null,8,["size","class","max","disabled","model-value","aria-label"]),te("span",{class:z([g(n).e("classifier")])},Ke(g(t)("el.pagination.pageClassifier")),3)],10,["disabled"]))}});var $Ae=pt(yAe,[["__file","jumper.vue"]]);const IAe=ht({total:{type:Number,default:1e3}}),RAe=Re({name:"ElPaginationTotal"}),CAe=Re({...RAe,props:IAe,setup(e){const{t}=xn(),n=rt("pagination"),{disabled:s}=yx();return(i,r)=>(H(),le("span",{class:z(g(n).e("total")),disabled:g(s)},Ke(g(t)("el.pagination.total",{total:i.total})),11,["disabled"]))}});var MAe=pt(CAe,[["__file","total.vue"]]);const AAe=ht({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),LAe=Re({name:"ElPaginationPager"}),wAe=Re({...LAe,props:AAe,emits:["change"],setup(e,{emit:t}){const n=e,s=rt("pager"),i=rt("icon"),{t:r}=xn(),a=K(!1),c=K(!1),u=K(!1),h=K(!1),f=K(!1),p=K(!1),_=x(()=>{const R=n.pagerCount,w=(R-1)/2,k=Number(n.currentPage),D=Number(n.pageCount);let P=!1,B=!1;D>R&&(k>R-w&&(P=!0),k<D-w&&(B=!0));const F=[];if(P&&!B){const X=D-(R-2);for(let G=X;G<D;G++)F.push(G)}else if(!P&&B)for(let X=2;X<R;X++)F.push(X);else if(P&&B){const X=Math.floor(R/2)-1;for(let G=k-X;G<=k+X;G++)F.push(G)}else for(let X=2;X<D;X++)F.push(X);return F}),E=x(()=>["more","btn-quickprev",i.b(),s.is("disabled",n.disabled)]),v=x(()=>["more","btn-quicknext",i.b(),s.is("disabled",n.disabled)]),b=x(()=>n.disabled?-1:0);Zs(()=>{const R=(n.pagerCount-1)/2;a.value=!1,c.value=!1,n.pageCount>n.pagerCount&&(n.currentPage>n.pagerCount-R&&(a.value=!0),n.currentPage<n.pageCount-R&&(c.value=!0))});function y(R=!1){n.disabled||(R?u.value=!0:h.value=!0)}function S(R=!1){R?f.value=!0:p.value=!0}function L(R){const w=R.target;if(w.tagName.toLowerCase()==="li"&&Array.from(w.classList).includes("number")){const k=Number(w.textContent);k!==n.currentPage&&t("change",k)}else w.tagName.toLowerCase()==="li"&&Array.from(w.classList).includes("more")&&I(R)}function I(R){const w=R.target;if(w.tagName.toLowerCase()==="ul"||n.disabled)return;let k=Number(w.textContent);const D=n.pageCount,P=n.currentPage,B=n.pagerCount-2;w.className.includes("more")&&(w.className.includes("quickprev")?k=P-B:w.className.includes("quicknext")&&(k=P+B)),Number.isNaN(+k)||(k<1&&(k=1),k>D&&(k=D)),k!==P&&t("change",k)}return(R,w)=>(H(),le("ul",{class:z(g(s).b()),onClick:I,onKeyup:So(L,["enter"])},[R.pageCount>0?(H(),le("li",{key:0,class:z([[g(s).is("active",R.currentPage===1),g(s).is("disabled",R.disabled)],"number"]),"aria-current":R.currentPage===1,"aria-label":g(r)("el.pagination.currentPage",{pager:1}),tabindex:g(b)}," 1 ",10,["aria-current","aria-label","tabindex"])):Ge("v-if",!0),a.value?(H(),le("li",{key:1,class:z(g(E)),tabindex:g(b),"aria-label":g(r)("el.pagination.prevPages",{pager:R.pagerCount-2}),onMouseenter:k=>y(!0),onMouseleave:k=>u.value=!1,onFocus:k=>S(!0),onBlur:k=>f.value=!1},[(u.value||f.value)&&!R.disabled?(H(),Ye(g(Op),{key:0})):(H(),Ye(g(uV),{key:1}))],42,["tabindex","aria-label","onMouseenter","onMouseleave","onFocus","onBlur"])):Ge("v-if",!0),(H(!0),le(Lt,null,In(g(_),k=>(H(),le("li",{key:k,class:z([[g(s).is("active",R.currentPage===k),g(s).is("disabled",R.disabled)],"number"]),"aria-current":R.currentPage===k,"aria-label":g(r)("el.pagination.currentPage",{pager:k}),tabindex:g(b)},Ke(k),11,["aria-current","aria-label","tabindex"]))),128)),c.value?(H(),le("li",{key:2,class:z(g(v)),tabindex:g(b),"aria-label":g(r)("el.pagination.nextPages",{pager:R.pagerCount-2}),onMouseenter:k=>y(),onMouseleave:k=>h.value=!1,onFocus:k=>S(),onBlur:k=>p.value=!1},[(h.value||p.value)&&!R.disabled?(H(),Ye(g(Sp),{key:0})):(H(),Ye(g(uV),{key:1}))],42,["tabindex","aria-label","onMouseenter","onMouseleave","onFocus","onBlur"])):Ge("v-if",!0),R.pageCount>1?(H(),le("li",{key:3,class:z([[g(s).is("active",R.currentPage===R.pageCount),g(s).is("disabled",R.disabled)],"number"]),"aria-current":R.currentPage===R.pageCount,"aria-label":g(r)("el.pagination.currentPage",{pager:R.pageCount}),tabindex:g(b)},Ke(R.pageCount),11,["aria-current","aria-label","tabindex"])):Ge("v-if",!0)],42,["onKeyup"]))}});var kAe=pt(wAe,[["__file","pager.vue"]]);const jr=e=>typeof e!="number",NAe=ht({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:e=>Wt(e)&&Math.trunc(e)===e&&e>4&&e<22&&e%2===1,default:7},currentPage:Number,defaultCurrentPage:Number,layout:{type:String,default:["prev","pager","next","jumper","->","total"].join(", ")},pageSizes:{type:xe(Array),default:()=>os([10,20,30,40,50,100])},popperClass:{type:String,default:""},prevText:{type:String,default:""},prevIcon:{type:To,default:()=>bp},nextText:{type:String,default:""},nextIcon:{type:To,default:()=>rl},teleported:{type:Boolean,default:!0},small:Boolean,size:Ys,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean,appendSizeTo:String}),PAe={"update:current-page":e=>Wt(e),"update:page-size":e=>Wt(e),"size-change":e=>Wt(e),change:(e,t)=>Wt(e)&&Wt(t),"current-change":e=>Wt(e),"prev-click":e=>Wt(e),"next-click":e=>Wt(e)},bG="ElPagination";var DAe=Re({name:bG,props:NAe,emits:PAe,setup(e,{emit:t,slots:n}){const{t:s}=xn(),i=rt("pagination"),r=pn().vnode.props||{},a=i6(),c=x(()=>{var w;return e.small?"small":(w=e.size)!=null?w:a.value});cp({from:"small",replacement:"size",version:"3.0.0",scope:"el-pagination",ref:"https://element-plus.org/zh-CN/component/pagination.html"},x(()=>!!e.small));const u="onUpdate:currentPage"in r||"onUpdate:current-page"in r||"onCurrentChange"in r,h="onUpdate:pageSize"in r||"onUpdate:page-size"in r||"onSizeChange"in r,f=x(()=>{if(jr(e.total)&&jr(e.pageCount)||!jr(e.currentPage)&&!u)return!1;if(e.layout.includes("sizes")){if(jr(e.pageCount)){if(!jr(e.total)&&!jr(e.pageSize)&&!h)return!1}else if(!h)return!1}return!0}),p=K(jr(e.defaultPageSize)?10:e.defaultPageSize),_=K(jr(e.defaultCurrentPage)?1:e.defaultCurrentPage),E=x({get(){return jr(e.pageSize)?p.value:e.pageSize},set(w){jr(e.pageSize)&&(p.value=w),h&&(t("update:page-size",w),t("size-change",w))}}),v=x(()=>{let w=0;return jr(e.pageCount)?jr(e.total)||(w=Math.max(1,Math.ceil(e.total/E.value))):w=e.pageCount,w}),b=x({get(){return jr(e.currentPage)?_.value:e.currentPage},set(w){let k=w;w<1?k=1:w>v.value&&(k=v.value),jr(e.currentPage)&&(_.value=k),u&&(t("update:current-page",k),t("current-change",k))}});tt(v,w=>{b.value>w&&(b.value=w)}),tt([b,E],w=>{t("change",...w)},{flush:"post"});function y(w){b.value=w}function S(w){E.value=w;const k=v.value;b.value>k&&(b.value=k)}function L(){e.disabled||(b.value-=1,t("prev-click",b.value))}function I(){e.disabled||(b.value+=1,t("next-click",b.value))}function R(w,k){w&&(w.props||(w.props={}),w.props.class=[w.props.class,k].join(" "))}return An(cK,{pageCount:v,disabled:x(()=>e.disabled),currentPage:b,changeEvent:y,handleSizeChange:S}),()=>{var w,k;if(!f.value)return s("el.pagination.deprecationWarning"),null;if(!e.layout||e.hideOnSinglePage&&v.value<=1)return null;const D=[],P=[],B=Gt("div",{class:i.e("rightwrapper")},P),F={prev:Gt(qMe,{disabled:e.disabled,currentPage:b.value,prevText:e.prevText,prevIcon:e.prevIcon,onClick:L}),jumper:Gt($Ae,{size:c.value}),pager:Gt(kAe,{currentPage:b.value,pageCount:v.value,pagerCount:e.pagerCount,onChange:y,disabled:e.disabled}),next:Gt(tAe,{disabled:e.disabled,currentPage:b.value,pageCount:v.value,nextText:e.nextText,nextIcon:e.nextIcon,onClick:I}),sizes:Gt(bAe,{pageSize:E.value,pageSizes:e.pageSizes,popperClass:e.popperClass,disabled:e.disabled,teleported:e.teleported,size:c.value,appendSizeTo:e.appendSizeTo}),slot:(k=(w=n==null?void 0:n.default)==null?void 0:w.call(n))!=null?k:null,total:Gt(MAe,{total:jr(e.total)?0:e.total})},X=e.layout.split(",").map(re=>re.trim());let G=!1;return X.forEach(re=>{if(re==="->"){G=!0;return}G?P.push(F[re]):D.push(F[re])}),R(D[0],i.is("first")),R(D[D.length-1],i.is("last")),G&&P.length>0&&(R(P[0],i.is("first")),R(P[P.length-1],i.is("last")),D.push(B)),Gt("div",{class:[i.b(),i.is("background",e.background),i.m(c.value)]},D)}}});const xAe=nn(DAe),BAe=ht({title:String,confirmButtonText:String,cancelButtonText:String,confirmButtonType:{type:String,values:XN,default:"primary"},cancelButtonType:{type:String,values:XN,default:"text"},icon:{type:To,default:()=>hTe},iconColor:{type:String,default:"#f90"},hideIcon:{type:Boolean,default:!1},hideAfter:{type:Number,default:200},teleported:Si.teleported,persistent:Si.persistent,width:{type:[String,Number],default:150}}),FAe={confirm:e=>e instanceof MouseEvent,cancel:e=>e instanceof MouseEvent},UAe=Re({name:"ElPopconfirm"}),HAe=Re({...UAe,props:BAe,emits:FAe,setup(e,{emit:t}){const n=e,{t:s}=xn(),i=rt("popconfirm"),r=K(),a=()=>{var _,E;(E=(_=r.value)==null?void 0:_.onClose)==null||E.call(_)},c=x(()=>({width:bs(n.width)})),u=_=>{t("confirm",_),a()},h=_=>{t("cancel",_),a()},f=x(()=>n.confirmButtonText||s("el.popconfirm.confirmButtonText")),p=x(()=>n.cancelButtonText||s("el.popconfirm.cancelButtonText"));return(_,E)=>(H(),Ye(g(rr),$n({ref_key:"tooltipRef",ref:r,trigger:"click",effect:"light"},_.$attrs,{"popper-class":`${g(i).namespace.value}-popover`,"popper-style":g(c),teleported:_.teleported,"fallback-placements":["bottom","top","right","left"],"hide-after":_.hideAfter,persistent:_.persistent}),{content:de(()=>[te("div",{class:z(g(i).b())},[te("div",{class:z(g(i).e("main"))},[!_.hideIcon&&_.icon?(H(),Ye(g(Nt),{key:0,class:z(g(i).e("icon")),style:Bt({color:_.iconColor})},{default:de(()=>[(H(),Ye(yn(_.icon)))]),_:1},8,["class","style"])):Ge("v-if",!0),Xt(" "+Ke(_.title),1)],2),te("div",{class:z(g(i).e("action"))},[He(_.$slots,"actions",{confirm:u,cancel:h},()=>[oe(g(Mi),{size:"small",type:_.cancelButtonType==="text"?"":_.cancelButtonType,text:_.cancelButtonType==="text",onClick:h},{default:de(()=>[Xt(Ke(g(p)),1)]),_:1},8,["type","text"]),oe(g(Mi),{size:"small",type:_.confirmButtonType==="text"?"":_.confirmButtonType,text:_.confirmButtonType==="text",onClick:u},{default:de(()=>[Xt(Ke(g(f)),1)]),_:1},8,["type","text"])])],2)],2)]),default:de(()=>[_.$slots.reference?He(_.$slots,"reference",{key:0}):Ge("v-if",!0)]),_:3},16,["popper-class","popper-style","teleported","hide-after","persistent"]))}});var VAe=pt(HAe,[["__file","popconfirm.vue"]]);const GAe=nn(VAe),WAe=ht({trigger:Hy.trigger,placement:SC.placement,disabled:Hy.disabled,visible:Si.visible,transition:Si.transition,popperOptions:SC.popperOptions,tabindex:SC.tabindex,content:Si.content,popperStyle:Si.popperStyle,popperClass:Si.popperClass,enterable:{...Si.enterable,default:!0},effect:{...Si.effect,default:"light"},teleported:Si.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),XAe={"update:visible":e=>Io(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},zAe="onUpdate:visible",YAe=Re({name:"ElPopover"}),KAe=Re({...YAe,props:WAe,emits:XAe,setup(e,{expose:t,emit:n}){const s=e,i=x(()=>s[zAe]),r=rt("popover"),a=K(),c=x(()=>{var y;return(y=g(a))==null?void 0:y.popperRef}),u=x(()=>[{width:bs(s.width)},s.popperStyle]),h=x(()=>[r.b(),s.popperClass,{[r.m("plain")]:!!s.content}]),f=x(()=>s.transition===`${r.namespace.value}-fade-in-linear`),p=()=>{var y;(y=a.value)==null||y.hide()},_=()=>{n("before-enter")},E=()=>{n("before-leave")},v=()=>{n("after-enter")},b=()=>{n("update:visible",!1),n("after-leave")};return t({popperRef:c,hide:p}),(y,S)=>(H(),Ye(g(rr),$n({ref_key:"tooltipRef",ref:a},y.$attrs,{trigger:y.trigger,placement:y.placement,disabled:y.disabled,visible:y.visible,transition:y.transition,"popper-options":y.popperOptions,tabindex:y.tabindex,content:y.content,offset:y.offset,"show-after":y.showAfter,"hide-after":y.hideAfter,"auto-close":y.autoClose,"show-arrow":y.showArrow,"aria-label":y.title,effect:y.effect,enterable:y.enterable,"popper-class":g(h),"popper-style":g(u),teleported:y.teleported,persistent:y.persistent,"gpu-acceleration":g(f),"onUpdate:visible":g(i),onBeforeShow:_,onBeforeHide:E,onShow:v,onHide:b}),{content:de(()=>[y.title?(H(),le("div",{key:0,class:z(g(r).e("title")),role:"title"},Ke(y.title),3)):Ge("v-if",!0),He(y.$slots,"default",{},()=>[Xt(Ke(y.content),1)])]),default:de(()=>[y.$slots.reference?He(y.$slots,"reference",{key:0}):Ge("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var jAe=pt(KAe,[["__file","popover.vue"]]);const OG=(e,t)=>{const n=t.arg||t.value,s=n==null?void 0:n.popperRef;s&&(s.triggerRef=e)};var QAe={mounted(e,t){OG(e,t)},updated(e,t){OG(e,t)}};const qAe="popover",hK=m_e(QAe,qAe),JAe=nn(jAe,{directive:hK}),ZAe=ht({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:e=>e>=0&&e<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:Boolean,duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:xe(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:xe([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:xe(Function),default:e=>`${e}%`}}),eLe=Re({name:"ElProgress"}),tLe=Re({...eLe,props:ZAe,setup(e){const t=e,n={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},s=rt("progress"),i=x(()=>{const I={width:`${t.percentage}%`,animationDuration:`${t.duration}s`},R=L(t.percentage);return R.includes("gradient")?I.background=R:I.backgroundColor=R,I}),r=x(()=>(t.strokeWidth/t.width*100).toFixed(1)),a=x(()=>["circle","dashboard"].includes(t.type)?Number.parseInt(`${50-Number.parseFloat(r.value)/2}`,10):0),c=x(()=>{const I=a.value,R=t.type==="dashboard";return`
  1901. M 50 50
  1902. m 0 ${R?"":"-"}${I}
  1903. a ${I} ${I} 0 1 1 0 ${R?"-":""}${I*2}
  1904. a ${I} ${I} 0 1 1 0 ${R?"":"-"}${I*2}
  1905. `}),u=x(()=>2*Math.PI*a.value),h=x(()=>t.type==="dashboard"?.75:1),f=x(()=>`${-1*u.value*(1-h.value)/2}px`),p=x(()=>({strokeDasharray:`${u.value*h.value}px, ${u.value}px`,strokeDashoffset:f.value})),_=x(()=>({strokeDasharray:`${u.value*h.value*(t.percentage/100)}px, ${u.value}px`,strokeDashoffset:f.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),E=x(()=>{let I;return t.color?I=L(t.percentage):I=n[t.status]||n.default,I}),v=x(()=>t.status==="warning"?UA:t.type==="line"?t.status==="success"?BD:Nh:t.status==="success"?y$:zc),b=x(()=>t.type==="line"?12+t.strokeWidth*.4:t.width*.111111+2),y=x(()=>t.format(t.percentage));function S(I){const R=100/I.length;return I.map((k,D)=>Dt(k)?{color:k,percentage:(D+1)*R}:k).sort((k,D)=>k.percentage-D.percentage)}const L=I=>{var R;const{color:w}=t;if(Ut(w))return w(I);if(Dt(w))return w;{const k=S(w);for(const D of k)if(D.percentage>I)return D.color;return(R=k[k.length-1])==null?void 0:R.color}};return(I,R)=>(H(),le("div",{class:z([g(s).b(),g(s).m(I.type),g(s).is(I.status),{[g(s).m("without-text")]:!I.showText,[g(s).m("text-inside")]:I.textInside}]),role:"progressbar","aria-valuenow":I.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[I.type==="line"?(H(),le("div",{key:0,class:z(g(s).b("bar"))},[te("div",{class:z(g(s).be("bar","outer")),style:Bt({height:`${I.strokeWidth}px`})},[te("div",{class:z([g(s).be("bar","inner"),{[g(s).bem("bar","inner","indeterminate")]:I.indeterminate},{[g(s).bem("bar","inner","striped")]:I.striped},{[g(s).bem("bar","inner","striped-flow")]:I.stripedFlow}]),style:Bt(g(i))},[(I.showText||I.$slots.default)&&I.textInside?(H(),le("div",{key:0,class:z(g(s).be("bar","innerText"))},[He(I.$slots,"default",{percentage:I.percentage},()=>[te("span",null,Ke(g(y)),1)])],2)):Ge("v-if",!0)],6)],6)],2)):(H(),le("div",{key:1,class:z(g(s).b("circle")),style:Bt({height:`${I.width}px`,width:`${I.width}px`})},[(H(),le("svg",{viewBox:"0 0 100 100"},[te("path",{class:z(g(s).be("circle","track")),d:g(c),stroke:`var(${g(s).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":I.strokeLinecap,"stroke-width":g(r),fill:"none",style:Bt(g(p))},null,14,["d","stroke","stroke-linecap","stroke-width"]),te("path",{class:z(g(s).be("circle","path")),d:g(c),stroke:g(E),fill:"none",opacity:I.percentage?1:0,"stroke-linecap":I.strokeLinecap,"stroke-width":g(r),style:Bt(g(_))},null,14,["d","stroke","opacity","stroke-linecap","stroke-width"])]))],6)),(I.showText||I.$slots.default)&&!I.textInside?(H(),le("div",{key:2,class:z(g(s).e("text")),style:Bt({fontSize:`${g(b)}px`})},[He(I.$slots,"default",{percentage:I.percentage},()=>[I.status?(H(),Ye(g(Nt),{key:1},{default:de(()=>[(H(),Ye(yn(g(v))))]),_:1})):(H(),le("span",{key:0},Ke(g(y)),1))])],6)):Ge("v-if",!0)],10,["aria-valuenow"]))}});var nLe=pt(tLe,[["__file","progress.vue"]]);const fK=nn(nLe),oLe=ht({modelValue:{type:Number,default:0},id:{type:String,default:void 0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:xe([Array,Object]),default:()=>os(["","",""])},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:xe([Array,Object]),default:()=>[hR,hR,hR]},voidIcon:{type:To,default:()=>RTe},disabledVoidIcon:{type:To,default:()=>hR},disabled:Boolean,allowHalf:Boolean,showText:Boolean,showScore:Boolean,textColor:{type:String,default:""},texts:{type:xe(Array),default:()=>os(["Extremely bad","Disappointed","Fair","Satisfied","Surprise"])},scoreTemplate:{type:String,default:"{value}"},size:Ys,clearable:Boolean,...Xi(["ariaLabel"])}),sLe={[_o]:e=>Wt(e),[un]:e=>Wt(e)},iLe=Re({name:"ElRate"}),rLe=Re({...iLe,props:oLe,emits:sLe,setup(e,{expose:t,emit:n}){const s=e;function i(Y,ae){const Z=ge=>Tn(ge),Q=Object.keys(ae).map(ge=>+ge).filter(ge=>{const Ie=ae[ge];return(Z(Ie)?Ie.excluded:!1)?Y<ge:Y<=ge}).sort((ge,Ie)=>ge-Ie),he=ae[Q[0]];return Z(he)&&he.value||he}const r=It(Ym,void 0),a=It(Zu,void 0),c=Fs(),u=rt("rate"),{inputId:h,isLabeledByFormItem:f}=fc(s,{formItemContext:a}),p=K(s.modelValue),_=K(-1),E=K(!0),v=x(()=>[u.b(),u.m(c.value)]),b=x(()=>s.disabled||(r==null?void 0:r.disabled)),y=x(()=>u.cssVarBlock({"void-color":s.voidColor,"disabled-void-color":s.disabledVoidColor,"fill-color":R.value})),S=x(()=>{let Y="";return s.showScore?Y=s.scoreTemplate.replace(/\{\s*value\s*\}/,b.value?`${s.modelValue}`:`${p.value}`):s.showText&&(Y=s.texts[Math.ceil(p.value)-1]),Y}),L=x(()=>s.modelValue*100-Math.floor(s.modelValue)*100),I=x(()=>at(s.colors)?{[s.lowThreshold]:s.colors[0],[s.highThreshold]:{value:s.colors[1],excluded:!0},[s.max]:s.colors[2]}:s.colors),R=x(()=>{const Y=i(p.value,I.value);return Tn(Y)?"":Y}),w=x(()=>{let Y="";return b.value?Y=`${L.value}%`:s.allowHalf&&(Y="50%"),{color:R.value,width:Y}}),k=x(()=>{let Y=at(s.icons)?[...s.icons]:{...s.icons};return Y=zu(Y),at(Y)?{[s.lowThreshold]:Y[0],[s.highThreshold]:{value:Y[1],excluded:!0},[s.max]:Y[2]}:Y}),D=x(()=>i(s.modelValue,k.value)),P=x(()=>b.value?Dt(s.disabledVoidIcon)?s.disabledVoidIcon:zu(s.disabledVoidIcon):Dt(s.voidIcon)?s.voidIcon:zu(s.voidIcon)),B=x(()=>i(p.value,k.value));function F(Y){const ae=b.value&&L.value>0&&Y-1<s.modelValue&&Y>s.modelValue,Z=s.allowHalf&&E.value&&Y-.5<=p.value&&Y>p.value;return ae||Z}function X(Y){s.clearable&&Y===s.modelValue&&(Y=0),n(un,Y),s.modelValue!==Y&&n("change",Y)}function G(Y){b.value||(s.allowHalf&&E.value?X(p.value):X(Y))}function re(Y){if(b.value)return;let ae=p.value;const Z=Y.code;return Z===$t.up||Z===$t.right?(s.allowHalf?ae+=.5:ae+=1,Y.stopPropagation(),Y.preventDefault()):(Z===$t.left||Z===$t.down)&&(s.allowHalf?ae-=.5:ae-=1,Y.stopPropagation(),Y.preventDefault()),ae=ae<0?0:ae,ae=ae>s.max?s.max:ae,n(un,ae),n("change",ae),ae}function _e(Y,ae){if(!b.value){if(s.allowHalf&&ae){let Z=ae.target;Pl(Z,u.e("item"))&&(Z=Z.querySelector(`.${u.e("icon")}`)),(Z.clientWidth===0||Pl(Z,u.e("decimal")))&&(Z=Z.parentNode),E.value=ae.offsetX*2<=Z.clientWidth,p.value=E.value?Y-.5:Y}else p.value=Y;_.value=Y}}function J(){b.value||(s.allowHalf&&(E.value=s.modelValue!==Math.floor(s.modelValue)),p.value=s.modelValue,_.value=-1)}return tt(()=>s.modelValue,Y=>{p.value=Y,E.value=s.modelValue!==Math.floor(s.modelValue)}),s.modelValue||n(un,0),t({setCurrentValue:_e,resetCurrentValue:J}),(Y,ae)=>{var Z;return H(),le("div",{id:g(h),class:z([g(v),g(u).is("disabled",g(b))]),role:"slider","aria-label":g(f)?void 0:Y.ariaLabel||"rating","aria-labelledby":g(f)?(Z=g(a))==null?void 0:Z.labelId:void 0,"aria-valuenow":p.value,"aria-valuetext":g(S)||void 0,"aria-valuemin":"0","aria-valuemax":Y.max,tabindex:"0",style:Bt(g(y)),onKeydown:re},[(H(!0),le(Lt,null,In(Y.max,(Q,he)=>(H(),le("span",{key:he,class:z(g(u).e("item")),onMousemove:ge=>_e(Q,ge),onMouseleave:J,onClick:ge=>G(Q)},[oe(g(Nt),{class:z([g(u).e("icon"),{hover:_.value===Q},g(u).is("active",Q<=p.value)])},{default:de(()=>[F(Q)?Ge("v-if",!0):(H(),le(Lt,{key:0},[an((H(),Ye(yn(g(B)),null,null,512)),[[Yn,Q<=p.value]]),an((H(),Ye(yn(g(P)),null,null,512)),[[Yn,!(Q<=p.value)]])],64)),F(Q)?(H(),le(Lt,{key:1},[(H(),Ye(yn(g(P)),{class:z([g(u).em("decimal","box")])},null,8,["class"])),oe(g(Nt),{style:Bt(g(w)),class:z([g(u).e("icon"),g(u).e("decimal")])},{default:de(()=>[(H(),Ye(yn(g(D))))]),_:1},8,["style","class"])],64)):Ge("v-if",!0)]),_:2},1032,["class"])],42,["onMousemove","onClick"]))),128)),Y.showText||Y.showScore?(H(),le("span",{key:0,class:z(g(u).e("text")),style:Bt({color:Y.textColor})},Ke(g(S)),7)):Ge("v-if",!0)],46,["id","aria-label","aria-labelledby","aria-valuenow","aria-valuetext","aria-valuemax"])}}});var lLe=pt(rLe,[["__file","rate.vue"]]);const aLe=nn(lLe),sE={success:"icon-success",warning:"icon-warning",error:"icon-error",info:"icon-info"},SG={[sE.success]:P_e,[sE.warning]:UA,[sE.error]:FD,[sE.info]:UD},cLe=ht({title:{type:String,default:""},subTitle:{type:String,default:""},icon:{type:String,values:["success","warning","info","error"],default:"info"}}),uLe=Re({name:"ElResult"}),dLe=Re({...uLe,props:cLe,setup(e){const t=e,n=rt("result"),s=x(()=>{const i=t.icon,r=i&&sE[i]?sE[i]:"icon-info",a=SG[r]||SG["icon-info"];return{class:r,component:a}});return(i,r)=>(H(),le("div",{class:z(g(n).b())},[te("div",{class:z(g(n).e("icon"))},[He(i.$slots,"icon",{},()=>[g(s).component?(H(),Ye(yn(g(s).component),{key:0,class:z(g(s).class)},null,8,["class"])):Ge("v-if",!0)])],2),i.title||i.$slots.title?(H(),le("div",{key:0,class:z(g(n).e("title"))},[He(i.$slots,"title",{},()=>[te("p",null,Ke(i.title),1)])],2)):Ge("v-if",!0),i.subTitle||i.$slots["sub-title"]?(H(),le("div",{key:1,class:z(g(n).e("subtitle"))},[He(i.$slots,"sub-title",{},()=>[te("p",null,Ke(i.subTitle),1)])],2)):Ge("v-if",!0),i.$slots.extra?(H(),le("div",{key:2,class:z(g(n).e("extra"))},[He(i.$slots,"extra")],2)):Ge("v-if",!0)],2))}});var hLe=pt(dLe,[["__file","result.vue"]]);const fLe=nn(hLe),pLe=["start","center","end","space-around","space-between","space-evenly"],gLe=["top","middle","bottom"],mLe=ht({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:pLe,default:"start"},align:{type:String,values:gLe}}),_Le=Re({name:"ElRow"}),TLe=Re({..._Le,props:mLe,setup(e){const t=e,n=rt("row"),s=x(()=>t.gutter);An(vY,{gutter:s});const i=x(()=>{const a={};return t.gutter&&(a.marginRight=a.marginLeft=`-${t.gutter/2}px`),a}),r=x(()=>[n.b(),n.is(`justify-${t.justify}`,t.justify!=="start"),n.is(`align-${t.align}`,!!t.align)]);return(a,c)=>(H(),Ye(yn(a.tag),{class:z(g(r)),style:Bt(g(i))},{default:de(()=>[He(a.$slots,"default")]),_:3},8,["class","style"]))}});var ELe=pt(TLe,[["__file","row.vue"]]);const vLe=nn(ELe),bLe=Re({props:{item:{type:Object,required:!0},style:{type:Object},height:Number},setup(){return{ns:rt("select")}}});function OLe(e,t,n,s,i,r){return H(),le("div",{class:z(e.ns.be("group","title")),style:Bt({...e.style,lineHeight:`${e.height}px`})},Ke(e.item.label),7)}var SLe=pt(bLe,[["render",OLe],["__file","group-item.vue"]]);function yLe(e,{emit:t}){return{hoverItem:()=>{e.disabled||t("hover",e.index)},selectOptionClick:()=>{e.disabled||t("select",e.item,e.index)}}}const pK={label:"label",value:"value",disabled:"disabled",options:"options"};function QA(e){const t=x(()=>({...pK,...e.props}));return{aliasProps:t,getLabel:a=>Ns(a,t.value.label),getValue:a=>Ns(a,t.value.value),getDisabled:a=>Ns(a,t.value.disabled),getOptions:a=>Ns(a,t.value.options)}}const $Le=ht({allowCreate:Boolean,autocomplete:{type:xe(String),default:"none"},automaticDropdown:Boolean,clearable:Boolean,clearIcon:{type:To,default:Nh},effect:{type:xe(String),default:"light"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},defaultFirstOption:Boolean,disabled:Boolean,estimatedOptionHeight:{type:Number,default:void 0},filterable:Boolean,filterMethod:Function,height:{type:Number,default:274},itemHeight:{type:Number,default:34},id:String,loading:Boolean,loadingText:String,modelValue:{type:xe([Array,String,Number,Boolean,Object])},multiple:Boolean,multipleLimit:{type:Number,default:0},name:String,noDataText:String,noMatchText:String,remoteMethod:Function,reserveKeyword:{type:Boolean,default:!0},options:{type:xe(Array),required:!0},placeholder:{type:String},teleported:Si.teleported,persistent:{type:Boolean,default:!0},popperClass:{type:String,default:""},popperOptions:{type:xe(Object),default:()=>({})},remote:Boolean,size:Ys,props:{type:xe(Object),default:()=>pK},valueKey:{type:String,default:"value"},scrollbarAlwaysOn:Boolean,validateEvent:{type:Boolean,default:!0},offset:{type:Number,default:12},showArrow:{type:Boolean,default:!0},placement:{type:xe(String),values:Ph,default:"bottom-start"},fallbackPlacements:{type:xe(Array),default:["bottom-start","top-start","right","left"]},tagType:{...yh.type,default:"info"},tagEffect:{...yh.effect,default:"light"},tabindex:{type:[String,Number],default:0},appendTo:String,...gv,...Xi(["ariaLabel"])}),ILe=ht({data:Array,disabled:Boolean,hovering:Boolean,item:{type:xe(Object),required:!0},index:Number,style:Object,selected:Boolean,created:Boolean}),RLe={[un]:e=>!0,[_o]:e=>!0,"remove-tag":e=>!0,"visible-change":e=>!0,focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0},CLe={hover:e=>Wt(e),select:(e,t)=>!0},$x=Symbol("ElSelectV2Injection"),MLe=Re({props:ILe,emits:CLe,setup(e,{emit:t}){const n=It($x),s=rt("select"),{hoverItem:i,selectOptionClick:r}=yLe(e,{emit:t}),{getLabel:a}=QA(n.props);return{ns:s,hoverItem:i,selectOptionClick:r,getLabel:a}}});function ALe(e,t,n,s,i,r){return H(),le("li",{"aria-selected":e.selected,style:Bt(e.style),class:z([e.ns.be("dropdown","item"),e.ns.is("selected",e.selected),e.ns.is("disabled",e.disabled),e.ns.is("created",e.created),e.ns.is("hovering",e.hovering)]),onMousemove:e.hoverItem,onClick:Yt(e.selectOptionClick,["stop"])},[He(e.$slots,"default",{item:e.item,index:e.index,disabled:e.disabled},()=>[te("span",null,Ke(e.getLabel(e.item)),1)])],46,["aria-selected","onMousemove","onClick"])}var LLe=pt(MLe,[["render",ALe],["__file","option-item.vue"]]),yG=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function wLe(e,t){return!!(e===t||yG(e)&&yG(t))}function kLe(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!wLe(e[n],t[n]))return!1;return!0}function NLe(e,t){t===void 0&&(t=kLe);var n=null;function s(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var a=e.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return s.clear=function(){n=null},s}const gK=()=>{const t=pn().proxy.$props;return x(()=>{const n=(s,i,r)=>({});return t.perfMode?kA(n):NLe(n)})},h1=50,AM="itemRendered",LM="scroll",iE="forward",wM="backward",tc="auto",qA="smart",Xy="start",Xu="center",zy="end",KE="horizontal",Ix="vertical",PLe="ltr",vE="rtl",Yy="negative",Rx="positive-ascending",Cx="positive-descending",DLe={[KE]:"left",[Ix]:"top"},xLe=20,BLe={[KE]:"deltaX",[Ix]:"deltaY"},FLe=({atEndEdge:e,atStartEdge:t,layout:n},s)=>{let i,r=0;const a=u=>u<0&&t.value||u>0&&e.value;return{hasReachedEdge:a,onWheel:u=>{Bm(i);const h=u[BLe[n.value]];a(r)&&a(r+h)||(r+=h,VA()||u.preventDefault(),i=vp(()=>{s(r),r=0}))}}},f1=eu({type:xe([Number,Function]),required:!0}),p1=eu({type:Number}),g1=eu({type:Number,default:2}),ULe=eu({type:String,values:["ltr","rtl"],default:"ltr"}),m1=eu({type:Number,default:0}),kM=eu({type:Number,required:!0}),mK=eu({type:String,values:["horizontal","vertical"],default:Ix}),_K=ht({className:{type:String,default:""},containerElement:{type:xe([String,Object]),default:"div"},data:{type:xe(Array),default:()=>os([])},direction:ULe,height:{type:[String,Number],required:!0},innerElement:{type:[String,Object],default:"div"},style:{type:xe([Object,String,Array])},useIsScrolling:{type:Boolean,default:!1},width:{type:[Number,String],required:!1},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:{type:Boolean,default:!1}}),TK=ht({cache:g1,estimatedItemSize:p1,layout:mK,initScrollOffset:m1,total:kM,itemSize:f1,..._K}),_1={type:Number,default:6},EK={type:Number,default:0},vK={type:Number,default:2},ym=ht({columnCache:g1,columnWidth:f1,estimatedColumnWidth:p1,estimatedRowHeight:p1,initScrollLeft:m1,initScrollTop:m1,itemKey:{type:xe(Function),default:({columnIndex:e,rowIndex:t})=>`${t}:${e}`},rowCache:g1,rowHeight:f1,totalColumn:kM,totalRow:kM,hScrollbarSize:_1,vScrollbarSize:_1,scrollbarStartGap:EK,scrollbarEndGap:vK,role:String,..._K}),bK=ht({alwaysOn:Boolean,class:String,layout:mK,total:kM,ratio:{type:Number,required:!0},clientSize:{type:Number,required:!0},scrollFrom:{type:Number,required:!0},scrollbarSize:_1,startGap:EK,endGap:vK,visible:Boolean}),fm=(e,t)=>e<t?iE:wM,Ky=e=>e===PLe||e===vE||e===KE,$G=e=>e===vE;let VT=null;function NM(e=!1){if(VT===null||e){const t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";const s=document.createElement("div"),i=s.style;return i.width="100px",i.height="100px",t.appendChild(s),document.body.appendChild(t),t.scrollLeft>0?VT=Cx:(t.scrollLeft=1,t.scrollLeft===0?VT=Yy:VT=Rx),document.body.removeChild(t),VT}return VT}function HLe({move:e,size:t,bar:n},s){const i={},r=`translate${n.axis}(${e}px)`;return i[n.size]=t,i.transform=r,i.msTransform=r,i.webkitTransform=r,s==="horizontal"?i.height="100%":i.width="100%",i}const T1=Re({name:"ElVirtualScrollBar",props:bK,emits:["scroll","start-move","stop-move"],setup(e,{emit:t}){const n=x(()=>e.startGap+e.endGap),s=rt("virtual-scrollbar"),i=rt("scrollbar"),r=K(),a=K();let c=null,u=null;const h=Kn({isDragging:!1,traveled:0}),f=x(()=>E6[e.layout]),p=x(()=>e.clientSize-g(n)),_=x(()=>({position:"absolute",width:`${KE===e.layout?p.value:e.scrollbarSize}px`,height:`${KE===e.layout?e.scrollbarSize:p.value}px`,[DLe[e.layout]]:"2px",right:"2px",bottom:"2px",borderRadius:"4px"})),E=x(()=>{const k=e.ratio,D=e.clientSize;if(k>=100)return Number.POSITIVE_INFINITY;if(k>=50)return k*D/100;const P=D/3;return Math.floor(Math.min(Math.max(k*D,xLe),P))}),v=x(()=>{if(!Number.isFinite(E.value))return{display:"none"};const k=`${E.value}px`;return HLe({bar:f.value,size:k,move:h.traveled},e.layout)}),b=x(()=>Math.floor(e.clientSize-E.value-g(n))),y=()=>{window.addEventListener("mousemove",R),window.addEventListener("mouseup",I);const k=g(a);k&&(u=document.onselectstart,document.onselectstart=()=>!1,k.addEventListener("touchmove",R,{passive:!0}),k.addEventListener("touchend",I))},S=()=>{window.removeEventListener("mousemove",R),window.removeEventListener("mouseup",I),document.onselectstart=u,u=null;const k=g(a);k&&(k.removeEventListener("touchmove",R),k.removeEventListener("touchend",I))},L=k=>{k.stopImmediatePropagation(),!(k.ctrlKey||[1,2].includes(k.button))&&(h.isDragging=!0,h[f.value.axis]=k.currentTarget[f.value.offset]-(k[f.value.client]-k.currentTarget.getBoundingClientRect()[f.value.direction]),t("start-move"),y())},I=()=>{h.isDragging=!1,h[f.value.axis]=0,t("stop-move"),S()},R=k=>{const{isDragging:D}=h;if(!D||!a.value||!r.value)return;const P=h[f.value.axis];if(!P)return;Bm(c);const B=(r.value.getBoundingClientRect()[f.value.direction]-k[f.value.client])*-1,F=a.value[f.value.offset]-P,X=B-F;c=vp(()=>{h.traveled=Math.max(e.startGap,Math.min(X,b.value)),t("scroll",X,b.value)})},w=k=>{const D=Math.abs(k.target.getBoundingClientRect()[f.value.direction]-k[f.value.client]),P=a.value[f.value.offset]/2,B=D-P;h.traveled=Math.max(0,Math.min(B,b.value)),t("scroll",B,b.value)};return tt(()=>e.scrollFrom,k=>{h.isDragging||(h.traveled=Math.ceil(k*b.value))}),vo(()=>{S()}),()=>Gt("div",{role:"presentation",ref:r,class:[s.b(),e.class,(e.alwaysOn||h.isDragging)&&"always-on"],style:_.value,onMousedown:Yt(w,["stop","prevent"]),onTouchstartPrevent:L},Gt("div",{ref:a,class:i.e("thumb"),style:v.value,onMousedown:L},[]))}}),OK=({name:e,getOffset:t,getItemSize:n,getItemOffset:s,getEstimatedTotalSize:i,getStartIndexForOffset:r,getStopIndexForStartIndex:a,initCache:c,clearCache:u,validateProps:h})=>Re({name:e??"ElVirtualList",props:TK,emits:[AM,LM],setup(f,{emit:p,expose:_}){h(f);const E=pn(),v=rt("vl"),b=K(c(f,E)),y=gK(),S=K(),L=K(),I=K(),R=K({isScrolling:!1,scrollDir:"forward",scrollOffset:Wt(f.initScrollOffset)?f.initScrollOffset:0,updateRequested:!1,isScrollbarDragging:!1,scrollbarAlwaysOn:f.scrollbarAlwaysOn}),w=x(()=>{const{total:be,cache:Ae}=f,{isScrolling:We,scrollDir:$e,scrollOffset:ve}=g(R);if(be===0)return[0,0,0,0];const Pe=r(f,ve,g(b)),Be=a(f,Pe,ve,g(b)),ot=!We||$e===wM?Math.max(1,Ae):1,Xe=!We||$e===iE?Math.max(1,Ae):1;return[Math.max(0,Pe-ot),Math.max(0,Math.min(be-1,Be+Xe)),Pe,Be]}),k=x(()=>i(f,g(b))),D=x(()=>Ky(f.layout)),P=x(()=>[{position:"relative",[`overflow-${D.value?"x":"y"}`]:"scroll",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:f.direction,height:Wt(f.height)?`${f.height}px`:f.height,width:Wt(f.width)?`${f.width}px`:f.width},f.style]),B=x(()=>{const be=g(k),Ae=g(D);return{height:Ae?"100%":`${be}px`,pointerEvents:g(R).isScrolling?"none":void 0,width:Ae?`${be}px`:"100%"}}),F=x(()=>D.value?f.width:f.height),{onWheel:X}=FLe({atStartEdge:x(()=>R.value.scrollOffset<=0),atEndEdge:x(()=>R.value.scrollOffset>=k.value),layout:x(()=>f.layout)},be=>{var Ae,We;(We=(Ae=I.value).onMouseUp)==null||We.call(Ae),ae(Math.min(R.value.scrollOffset+be,k.value-F.value))});fo(S,"wheel",X,{passive:!1});const G=()=>{const{total:be}=f;if(be>0){const[ve,Pe,Be,ot]=g(w);p(AM,ve,Pe,Be,ot)}const{scrollDir:Ae,scrollOffset:We,updateRequested:$e}=g(R);p(LM,Ae,We,$e)},re=be=>{const{clientHeight:Ae,scrollHeight:We,scrollTop:$e}=be.currentTarget,ve=g(R);if(ve.scrollOffset===$e)return;const Pe=Math.max(0,Math.min($e,We-Ae));R.value={...ve,isScrolling:!0,scrollDir:fm(ve.scrollOffset,Pe),scrollOffset:Pe,updateRequested:!1},Vt(he)},_e=be=>{const{clientWidth:Ae,scrollLeft:We,scrollWidth:$e}=be.currentTarget,ve=g(R);if(ve.scrollOffset===We)return;const{direction:Pe}=f;let Be=We;if(Pe===vE)switch(NM()){case Yy:{Be=-We;break}case Cx:{Be=$e-Ae-We;break}}Be=Math.max(0,Math.min(Be,$e-Ae)),R.value={...ve,isScrolling:!0,scrollDir:fm(ve.scrollOffset,Be),scrollOffset:Be,updateRequested:!1},Vt(he)},J=be=>{g(D)?_e(be):re(be),G()},Y=(be,Ae)=>{const We=(k.value-F.value)/Ae*be;ae(Math.min(k.value-F.value,We))},ae=be=>{be=Math.max(be,0),be!==g(R).scrollOffset&&(R.value={...g(R),scrollOffset:be,scrollDir:fm(g(R).scrollOffset,be),updateRequested:!0},Vt(he))},Z=(be,Ae=tc)=>{const{scrollOffset:We}=g(R);be=Math.max(0,Math.min(be,f.total-1)),ae(t(f,be,Ae,We,g(b)))},Q=be=>{const{direction:Ae,itemSize:We,layout:$e}=f,ve=y.value(u&&We,u&&$e,u&&Ae);let Pe;if(zn(ve,String(be)))Pe=ve[be];else{const Be=s(f,be,g(b)),ot=n(f,be,g(b)),Xe=g(D),ee=Ae===vE,pe=Xe?Be:0;ve[be]=Pe={position:"absolute",left:ee?void 0:`${pe}px`,right:ee?`${pe}px`:void 0,top:Xe?0:`${Be}px`,height:Xe?"100%":`${ot}px`,width:Xe?`${ot}px`:"100%"}}return Pe},he=()=>{R.value.isScrolling=!1,Vt(()=>{y.value(-1,null,null)})},ge=()=>{const be=S.value;be&&(be.scrollTop=0)};rn(()=>{if(!Dn)return;const{initScrollOffset:be}=f,Ae=g(S);Wt(be)&&Ae&&(g(D)?Ae.scrollLeft=be:Ae.scrollTop=be),G()}),nd(()=>{const{direction:be,layout:Ae}=f,{scrollOffset:We,updateRequested:$e}=g(R),ve=g(S);if($e&&ve)if(Ae===KE)if(be===vE)switch(NM()){case Yy:{ve.scrollLeft=-We;break}case Rx:{ve.scrollLeft=We;break}default:{const{clientWidth:Pe,scrollWidth:Be}=ve;ve.scrollLeft=Be-Pe-We;break}}else ve.scrollLeft=We;else ve.scrollTop=We}),uP(()=>{g(S).scrollTop=g(R).scrollOffset});const Ie={ns:v,clientSize:F,estimatedTotalSize:k,windowStyle:P,windowRef:S,innerRef:L,innerStyle:B,itemsToRender:w,scrollbarRef:I,states:R,getItemStyle:Q,onScroll:J,onScrollbarScroll:Y,onWheel:X,scrollTo:ae,scrollToItem:Z,resetScrollTop:ge};return _({windowRef:S,innerRef:L,getItemStyleCache:y,scrollTo:ae,scrollToItem:Z,resetScrollTop:ge,states:R}),Ie},render(f){var p;const{$slots:_,className:E,clientSize:v,containerElement:b,data:y,getItemStyle:S,innerElement:L,itemsToRender:I,innerStyle:R,layout:w,total:k,onScroll:D,onScrollbarScroll:P,states:B,useIsScrolling:F,windowStyle:X,ns:G}=f,[re,_e]=I,J=yn(b),Y=yn(L),ae=[];if(k>0)for(let ge=re;ge<=_e;ge++)ae.push(Gt(Lt,{key:ge},(p=_.default)==null?void 0:p.call(_,{data:y,index:ge,isScrolling:F?B.isScrolling:void 0,style:S(ge)})));const Z=[Gt(Y,{style:R,ref:"innerRef"},Dt(Y)?ae:{default:()=>ae})],Q=Gt(T1,{ref:"scrollbarRef",clientSize:v,layout:w,onScroll:P,ratio:v*100/this.estimatedTotalSize,scrollFrom:B.scrollOffset/(this.estimatedTotalSize-v),total:k}),he=Gt(J,{class:[G.e("window"),E],style:X,onScroll:D,ref:"windowRef",key:0},Dt(J)?[Z]:{default:()=>[Z]});return Gt("div",{key:0,class:[G.e("wrapper"),B.scrollbarAlwaysOn?"always-on":""]},[he,Q])}}),SK=OK({name:"ElFixedSizeList",getItemOffset:({itemSize:e},t)=>t*e,getItemSize:({itemSize:e})=>e,getEstimatedTotalSize:({total:e,itemSize:t})=>t*e,getOffset:({height:e,total:t,itemSize:n,layout:s,width:i},r,a,c)=>{const u=Ky(s)?i:e,h=Math.max(0,t*n-u),f=Math.min(h,r*n),p=Math.max(0,(r+1)*n-u);switch(a===qA&&(c>=p-u&&c<=f+u?a=tc:a=Xu),a){case Xy:return f;case zy:return p;case Xu:{const _=Math.round(p+(f-p)/2);return _<Math.ceil(u/2)?0:_>h+Math.floor(u/2)?h:_}case tc:default:return c>=p&&c<=f?c:c<p?p:f}},getStartIndexForOffset:({total:e,itemSize:t},n)=>Math.max(0,Math.min(e-1,Math.floor(n/t))),getStopIndexForStartIndex:({height:e,total:t,itemSize:n,layout:s,width:i},r,a)=>{const c=r*n,u=Ky(s)?i:e,h=Math.ceil((u+a-c)/n);return Math.max(0,Math.min(t-1,r+h-1))},initCache(){},clearCache:!0,validateProps(){}}),rE=(e,t,n)=>{const{itemSize:s}=e,{items:i,lastVisitedIndex:r}=n;if(t>r){let a=0;if(r>=0){const c=i[r];a=c.offset+c.size}for(let c=r+1;c<=t;c++){const u=s(c);i[c]={offset:a,size:u},a+=u}n.lastVisitedIndex=t}return i[t]},VLe=(e,t,n)=>{const{items:s,lastVisitedIndex:i}=t;return(i>0?s[i].offset:0)>=n?yK(e,t,0,i,n):GLe(e,t,Math.max(0,i),n)},yK=(e,t,n,s,i)=>{for(;n<=s;){const r=n+Math.floor((s-n)/2),a=rE(e,r,t).offset;if(a===i)return r;a<i?n=r+1:a>i&&(s=r-1)}return Math.max(0,n-1)},GLe=(e,t,n,s)=>{const{total:i}=e;let r=1;for(;n<i&&rE(e,n,t).offset<s;)n+=r,r*=2;return yK(e,t,Math.floor(n/2),Math.min(n,i-1),s)},IG=({total:e},{items:t,estimatedItemSize:n,lastVisitedIndex:s})=>{let i=0;if(s>=e&&(s=e-1),s>=0){const c=t[s];i=c.offset+c.size}const a=(e-s-1)*n;return i+a},WLe=OK({name:"ElDynamicSizeList",getItemOffset:(e,t,n)=>rE(e,t,n).offset,getItemSize:(e,t,{items:n})=>n[t].size,getEstimatedTotalSize:IG,getOffset:(e,t,n,s,i)=>{const{height:r,layout:a,width:c}=e,u=Ky(a)?c:r,h=rE(e,t,i),f=IG(e,i),p=Math.max(0,Math.min(f-u,h.offset)),_=Math.max(0,h.offset-u+h.size);switch(n===qA&&(s>=_-u&&s<=p+u?n=tc:n=Xu),n){case Xy:return p;case zy:return _;case Xu:return Math.round(_+(p-_)/2);case tc:default:return s>=_&&s<=p?s:s<_?_:p}},getStartIndexForOffset:(e,t,n)=>VLe(e,n,t),getStopIndexForStartIndex:(e,t,n,s)=>{const{height:i,total:r,layout:a,width:c}=e,u=Ky(a)?c:i,h=rE(e,t,s),f=n+u;let p=h.offset+h.size,_=t;for(;_<r-1&&p<f;)_++,p+=rE(e,_,s).size;return _},initCache({estimatedItemSize:e=h1},t){const n={items:{},estimatedItemSize:e,lastVisitedIndex:-1};return n.clearCacheAfterIndex=(s,i=!0)=>{var r,a;n.lastVisitedIndex=Math.min(n.lastVisitedIndex,s-1),(r=t.exposed)==null||r.getItemStyleCache(-1),i&&((a=t.proxy)==null||a.$forceUpdate())},n},clearCache:!1,validateProps:({itemSize:e})=>{}}),XLe={loading:Boolean,data:{type:Array,required:!0},hoveringIndex:Number,width:Number};var zLe=Re({name:"ElSelectDropdown",props:XLe,setup(e,{slots:t,expose:n}){const s=It($x),i=rt("select"),{getLabel:r,getValue:a,getDisabled:c}=QA(s.props),u=K([]),h=K(),f=x(()=>e.data.length);tt(()=>f.value,()=>{var X,G;(G=(X=s.tooltipRef.value).updatePopper)==null||G.call(X)});const p=x(()=>ho(s.props.estimatedOptionHeight)),_=x(()=>p.value?{itemSize:s.props.itemHeight}:{estimatedSize:s.props.estimatedOptionHeight,itemSize:X=>u.value[X]}),E=(X=[],G)=>{const{props:{valueKey:re}}=s;return Tn(G)?X&&X.some(_e=>uo(Ns(_e,re))===Ns(G,re)):X.includes(G)},v=(X,G)=>{if(Tn(G)){const{valueKey:re}=s.props;return Ns(X,re)===Ns(G,re)}else return X===G},b=(X,G)=>s.props.multiple?E(X,a(G)):v(X,a(G)),y=(X,G)=>{const{disabled:re,multiple:_e,multipleLimit:J}=s.props;return re||!G&&(_e?J>0&&X.length>=J:!1)},S=X=>e.hoveringIndex===X;n({listRef:h,isSized:p,isItemDisabled:y,isItemHovering:S,isItemSelected:b,scrollToItem:X=>{const G=h.value;G&&G.scrollToItem(X)},resetScrollTop:()=>{const X=h.value;X&&X.resetScrollTop()}});const w=X=>{const{index:G,data:re,style:_e}=X,J=g(p),{itemSize:Y,estimatedSize:ae}=g(_),{modelValue:Z}=s.props,{onSelect:Q,onHover:he}=s,ge=re[G];if(ge.type==="Group")return oe(SLe,{item:ge,style:_e,height:J?Y:ae},null);const Ie=b(Z,ge),be=y(Z,Ie),Ae=S(G);return oe(LLe,$n(X,{selected:Ie,disabled:c(ge)||be,created:!!ge.created,hovering:Ae,item:ge,onSelect:Q,onHover:he}),{default:We=>{var $e;return(($e=t.default)==null?void 0:$e.call(t,We))||oe("span",null,[r(ge)])}})},{onKeyboardNavigate:k,onKeyboardSelect:D}=s,P=()=>{k("forward")},B=()=>{k("backward")},F=X=>{const{code:G}=X,{tab:re,esc:_e,down:J,up:Y,enter:ae,numpadEnter:Z}=$t;switch(G!==re&&(X.preventDefault(),X.stopPropagation()),G){case re:case _e:break;case J:P();break;case Y:B();break;case ae:case Z:D();break}};return()=>{var X,G,re,_e;const{data:J,width:Y}=e,{height:ae,multiple:Z,scrollbarAlwaysOn:Q}=s.props,he=g(p)?SK:WLe;return oe("div",{class:[i.b("dropdown"),i.is("multiple",Z)],style:{width:`${Y}px`}},[(X=t.header)==null?void 0:X.call(t),((G=t.loading)==null?void 0:G.call(t))||((re=t.empty)==null?void 0:re.call(t))||oe(he,$n({ref:h},g(_),{className:i.be("dropdown","list"),scrollbarAlwaysOn:Q,data:J,height:ae,width:Y,total:J.length,onKeydown:F}),{default:ge=>oe(w,ge,null)}),(_e=t.footer)==null?void 0:_e.call(t)])}}});function YLe(e,t){const{aliasProps:n,getLabel:s,getValue:i}=QA(e),r=K(0),a=K(),c=x(()=>e.allowCreate&&e.filterable);function u(E){const v=b=>s(b)===E;return e.options&&e.options.some(v)||t.createdOptions.some(v)}function h(E){c.value&&(e.multiple&&E.created?r.value++:a.value=E)}function f(E){if(c.value)if(E&&E.length>0){if(u(E))return;const v={[n.value.value]:E,[n.value.label]:E,created:!0,[n.value.disabled]:!1};t.createdOptions.length>=r.value?t.createdOptions[r.value]=v:t.createdOptions.push(v)}else if(e.multiple)t.createdOptions.length=r.value;else{const v=a.value;t.createdOptions.length=0,v&&v.created&&t.createdOptions.push(v)}}function p(E){if(!c.value||!E||!E.created||E.created&&e.reserveKeyword&&t.inputValue===s(E))return;const v=t.createdOptions.findIndex(b=>i(b)===i(E));~v&&(t.createdOptions.splice(v,1),r.value--)}function _(){c.value&&(t.createdOptions.length=0,r.value=0)}return{createNewOption:f,removeNewOption:p,selectNewOption:h,clearAllNewOption:_}}const KLe=11,jLe=(e,t)=>{const{t:n}=xn(),s=rt("select"),i=rt("input"),{form:r,formItem:a}=lr(),{inputId:c}=fc(e,{formItemContext:a}),{aliasProps:u,getLabel:h,getValue:f,getDisabled:p,getOptions:_}=QA(e),{valueOnClear:E,isEmptyValue:v}=xA(e),b=Kn({inputValue:"",cachedOptions:[],createdOptions:[],hoveringIndex:-1,inputHovering:!1,selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,previousQuery:null,previousValue:void 0,selectedLabel:"",menuVisibleOnFocus:!1,isBeforeHide:!1}),y=K(-1),S=K(),L=K(),I=K(),R=K(),w=K(),k=K(),D=K(),P=K(),B=K(),F=K(),X=K(),{isComposing:G,handleCompositionStart:re,handleCompositionEnd:_e,handleCompositionUpdate:J}=I$({afterComposition:_t=>Ps(_t)}),{wrapperRef:Y,isFocused:ae,handleBlur:Z}=Pp(w,{beforeFocus(){return Ie.value},afterFocus(){e.automaticDropdown&&!ge.value&&(ge.value=!0,b.menuVisibleOnFocus=!0)},beforeBlur(_t){var Jt,bn;return((Jt=I.value)==null?void 0:Jt.isFocusInsideContent(_t))||((bn=R.value)==null?void 0:bn.isFocusInsideContent(_t))},afterBlur(){ge.value=!1,b.menuVisibleOnFocus=!1}}),Q=K([]),he=K([]),ge=K(!1),Ie=x(()=>e.disabled||(r==null?void 0:r.disabled)),be=x(()=>{var _t;return(_t=r==null?void 0:r.statusIcon)!=null?_t:!1}),Ae=x(()=>{const _t=he.value.length*e.itemHeight;return _t>e.height?e.height:_t}),We=x(()=>e.multiple?at(e.modelValue)&&e.modelValue.length>0:!v(e.modelValue)),$e=x(()=>e.clearable&&!Ie.value&&b.inputHovering&&We.value),ve=x(()=>e.remote&&e.filterable?"":kh),Pe=x(()=>ve.value&&s.is("reverse",ge.value)),Be=x(()=>(a==null?void 0:a.validateState)||""),ot=x(()=>{if(Be.value)return HA[Be.value]}),Xe=x(()=>e.remote?300:0),ee=x(()=>e.loading?e.loadingText||n("el.select.loading"):e.remote&&!b.inputValue&&Q.value.length===0?!1:e.filterable&&b.inputValue&&Q.value.length>0&&he.value.length===0?e.noMatchText||n("el.select.noMatch"):Q.value.length===0?e.noDataText||n("el.select.noData"):null),pe=_t=>{const Jt=bn=>{if(e.filterable&&Ut(e.filterMethod)||e.filterable&&e.remote&&Ut(e.remoteMethod))return!0;const Bn=new RegExp(rx(_t),"i");return _t?Bn.test(h(bn)||""):!0};return e.loading?[]:[...b.createdOptions,...e.options].reduce((bn,Bn)=>{const oi=_(Bn);if(at(oi)){const dr=oi.filter(Jt);dr.length>0&&bn.push({label:h(Bn),type:"Group"},...dr)}else(e.remote||Jt(Bn))&&bn.push(Bn);return bn},[])},Oe=()=>{Q.value=pe(""),he.value=pe(b.inputValue)},ze=x(()=>{const _t=new Map;return Q.value.forEach((Jt,bn)=>{_t.set(On(f(Jt)),{option:Jt,index:bn})}),_t}),Ze=x(()=>{const _t=new Map;return he.value.forEach((Jt,bn)=>{_t.set(On(f(Jt)),{option:Jt,index:bn})}),_t}),De=x(()=>he.value.every(_t=>p(_t))),me=Fs(),Te=x(()=>me.value==="small"?"small":"default"),Ue=()=>{var _t;y.value=((_t=S.value)==null?void 0:_t.offsetWidth)||200},qe=()=>{if(!L.value)return 0;const _t=window.getComputedStyle(L.value);return Number.parseFloat(_t.gap||"6px")},ct=x(()=>{const _t=qe();return{maxWidth:`${X.value&&e.maxCollapseTags===1?b.selectionWidth-b.collapseItemWidth-_t:b.selectionWidth}px`}}),Ne=x(()=>({maxWidth:`${b.selectionWidth}px`})),Se=x(()=>({width:`${Math.max(b.calculatorWidth,KLe)}px`})),Je=x(()=>at(e.modelValue)?e.modelValue.length===0&&!b.inputValue:e.filterable?!b.inputValue:!0),ut=x(()=>{var _t;const Jt=(_t=e.placeholder)!=null?_t:n("el.select.placeholder");return e.multiple||!We.value?Jt:b.selectedLabel}),Mt=x(()=>{var _t,Jt;return(Jt=(_t=I.value)==null?void 0:_t.popperRef)==null?void 0:Jt.contentRef}),mt=x(()=>{if(e.multiple){const _t=e.modelValue.length;if(e.modelValue.length>0&&Ze.value.has(e.modelValue[_t-1])){const{index:Jt}=Ze.value.get(e.modelValue[_t-1]);return Jt}}else if(!v(e.modelValue)&&Ze.value.has(e.modelValue)){const{index:_t}=Ze.value.get(e.modelValue);return _t}return-1}),qt=x({get(){return ge.value&&ee.value!==!1},set(_t){ge.value=_t}}),ce=x(()=>e.multiple?e.collapseTags?b.cachedOptions.slice(0,e.maxCollapseTags):b.cachedOptions:[]),q=x(()=>e.multiple?e.collapseTags?b.cachedOptions.slice(e.maxCollapseTags):[]:[]),{createNewOption:ne,removeNewOption:Le,selectNewOption:ue,clearAllNewOption:Fe}=YLe(e,b),ye=()=>{Ie.value||(b.menuVisibleOnFocus?b.menuVisibleOnFocus=!1:ge.value=!ge.value)},ft=()=>{b.inputValue.length>0&&!ge.value&&(ge.value=!0),ne(b.inputValue),En(b.inputValue)},Kt=Vl(ft,Xe.value),En=_t=>{b.previousQuery===_t||G.value||(b.previousQuery=_t,e.filterable&&Ut(e.filterMethod)?e.filterMethod(_t):e.filterable&&e.remote&&Ut(e.remoteMethod)&&e.remoteMethod(_t),e.defaultFirstOption&&(e.filterable||e.remote)&&he.value.length?Vt(Rn):Vt(rs))},Rn=()=>{const _t=he.value.filter(Bn=>!Bn.disabled&&Bn.type!=="Group"),Jt=_t.find(Bn=>Bn.created),bn=_t[0];b.hoveringIndex=Zn(he.value,Jt||bn)},Lo=_t=>{Hi(e.modelValue,_t)||t(_o,_t)},Ln=_t=>{t(un,_t),Lo(_t),b.previousValue=e.multiple?String(_t):_t},Zn=(_t=[],Jt)=>{if(!Tn(Jt))return _t.indexOf(Jt);const bn=e.valueKey;let Bn=-1;return _t.some((oi,dr)=>Ns(oi,bn)===Ns(Jt,bn)?(Bn=dr,!0):!1),Bn},On=_t=>Tn(_t)?Ns(_t,e.valueKey):_t,xo=()=>{Ue()},ie=()=>{b.selectionWidth=L.value.getBoundingClientRect().width},Ce=()=>{b.calculatorWidth=k.value.getBoundingClientRect().width},U=()=>{b.collapseItemWidth=X.value.getBoundingClientRect().width},se=()=>{var _t,Jt;(Jt=(_t=I.value)==null?void 0:_t.updatePopper)==null||Jt.call(_t)},ke=()=>{var _t,Jt;(Jt=(_t=R.value)==null?void 0:_t.updatePopper)==null||Jt.call(_t)},je=_t=>{if(e.multiple){let Jt=e.modelValue.slice();const bn=Zn(Jt,f(_t));bn>-1?(Jt=[...Jt.slice(0,bn),...Jt.slice(bn+1)],b.cachedOptions.splice(bn,1),Le(_t)):(e.multipleLimit<=0||Jt.length<e.multipleLimit)&&(Jt=[...Jt,f(_t)],b.cachedOptions.push(_t),ue(_t)),Ln(Jt),_t.created&&En(""),e.filterable&&!e.reserveKeyword&&(b.inputValue="")}else b.selectedLabel=h(_t),Ln(f(_t)),ge.value=!1,ue(_t),_t.created||Fe();Qt()},Rt=(_t,Jt)=>{let bn=e.modelValue.slice();const Bn=Zn(bn,f(Jt));Bn>-1&&!Ie.value&&(bn=[...e.modelValue.slice(0,Bn),...e.modelValue.slice(Bn+1)],b.cachedOptions.splice(Bn,1),Ln(bn),t("remove-tag",f(Jt)),Le(Jt)),_t.stopPropagation(),Qt()},Qt=()=>{var _t;(_t=w.value)==null||_t.focus()},Cn=()=>{var _t;if(ge.value){ge.value=!1,Vt(()=>{var Jt;return(Jt=w.value)==null?void 0:Jt.blur()});return}(_t=w.value)==null||_t.blur()},fs=()=>{b.inputValue.length>0?b.inputValue="":ge.value=!1},ps=_t=>X5(_t,Jt=>!b.cachedOptions.some(bn=>f(bn)===Jt&&p(bn))),js=_t=>{if(e.multiple&&_t.code!==$t.delete&&b.inputValue.length===0){_t.preventDefault();const Jt=e.modelValue.slice(),bn=ps(Jt);if(bn<0)return;const Bn=Jt[bn];Jt.splice(bn,1);const oi=b.cachedOptions[bn];b.cachedOptions.splice(bn,1),Le(oi),Ln(Jt),t("remove-tag",Bn)}},cr=()=>{let _t;at(e.modelValue)?_t=[]:_t=E.value,e.multiple?b.cachedOptions=[]:b.selectedLabel="",ge.value=!1,Ln(_t),t("clear"),Fe(),Qt()},bt=(_t,Jt=void 0)=>{const bn=he.value;if(!["forward","backward"].includes(_t)||Ie.value||bn.length<=0||De.value||G.value)return;if(!ge.value)return ye();Jt===void 0&&(Jt=b.hoveringIndex);let Bn=-1;_t==="forward"?(Bn=Jt+1,Bn>=bn.length&&(Bn=0)):_t==="backward"&&(Bn=Jt-1,(Bn<0||Bn>=bn.length)&&(Bn=bn.length-1));const oi=bn[Bn];if(p(oi)||oi.type==="Group")return bt(_t,Bn);b.hoveringIndex=Bn,Br(Bn)},jt=()=>{if(ge.value)~b.hoveringIndex&&he.value[b.hoveringIndex]&&je(he.value[b.hoveringIndex]);else return ye()},Hn=_t=>{b.hoveringIndex=_t??-1},rs=()=>{e.multiple?b.hoveringIndex=he.value.findIndex(_t=>e.modelValue.some(Jt=>On(Jt)===On(_t))):b.hoveringIndex=he.value.findIndex(_t=>On(_t)===On(e.modelValue))},Ps=_t=>{if(b.inputValue=_t.target.value,e.remote)Kt();else return ft()},ul=_t=>{if(ge.value=!1,ae.value){const Jt=new FocusEvent("focus",_t);Z(Jt)}},ur=()=>(b.isBeforeHide=!1,Vt(()=>{~mt.value&&Br(b.hoveringIndex)})),Br=_t=>{B.value.scrollToItem(_t)},dl=(_t,Jt)=>{const bn=On(_t);if(ze.value.has(bn)){const{option:Bn}=ze.value.get(bn);return Bn}if(Jt&&Jt.length){const Bn=Jt.find(oi=>On(f(oi))===bn);if(Bn)return Bn}return{[u.value.value]:_t,[u.value.label]:_t}},_a=(_t=!1)=>{if(e.multiple)if(e.modelValue.length>0){const Jt=b.cachedOptions.slice();b.cachedOptions.length=0,b.previousValue=e.modelValue.toString();for(const bn of e.modelValue){const Bn=dl(bn,Jt);b.cachedOptions.push(Bn)}}else b.cachedOptions=[],b.previousValue=void 0;else if(We.value){b.previousValue=e.modelValue;const Jt=he.value,bn=Jt.findIndex(Bn=>On(f(Bn))===On(e.modelValue));~bn?b.selectedLabel=h(Jt[bn]):(!b.selectedLabel||_t)&&(b.selectedLabel=On(e.modelValue))}else b.selectedLabel="",b.previousValue=void 0;Fe(),Ue()};return tt(ge,_t=>{_t?En(""):(b.inputValue="",b.previousQuery=null,b.isBeforeHide=!0,ne("")),t("visible-change",_t)}),tt(()=>e.modelValue,(_t,Jt)=>{var bn;(!_t||at(_t)&&_t.length===0||e.multiple&&!Hi(_t.toString(),b.previousValue)||!e.multiple&&On(_t)!==On(b.previousValue))&&_a(!0),!Hi(_t,Jt)&&e.validateEvent&&((bn=a==null?void 0:a.validate)==null||bn.call(a,"change").catch(oi=>void 0))},{deep:!0}),tt(()=>e.options,()=>{const _t=w.value;(!_t||_t&&document.activeElement!==_t)&&_a()},{deep:!0,flush:"post"}),tt(()=>he.value,()=>B.value&&Vt(B.value.resetScrollTop)),Zs(()=>{b.isBeforeHide||Oe()}),Zs(()=>{const{valueKey:_t,options:Jt}=e,bn=new Map;for(const Bn of Jt){const oi=f(Bn);let dr=oi;if(Tn(dr)&&(dr=Ns(oi,_t)),bn.get(dr))break;bn.set(dr,!0)}}),rn(()=>{_a()}),Xo(S,xo),Xo(L,ie),Xo(k,Ce),Xo(B,se),Xo(Y,se),Xo(F,ke),Xo(X,U),{inputId:c,collapseTagSize:Te,currentPlaceholder:ut,expanded:ge,emptyText:ee,popupHeight:Ae,debounce:Xe,allOptions:Q,filteredOptions:he,iconComponent:ve,iconReverse:Pe,tagStyle:ct,collapseTagStyle:Ne,inputStyle:Se,popperSize:y,dropdownMenuVisible:qt,hasModelValue:We,shouldShowPlaceholder:Je,selectDisabled:Ie,selectSize:me,needStatusIcon:be,showClearBtn:$e,states:b,isFocused:ae,nsSelect:s,nsInput:i,calculatorRef:k,inputRef:w,menuRef:B,tagMenuRef:F,tooltipRef:I,tagTooltipRef:R,selectRef:S,wrapperRef:Y,selectionRef:L,prefixRef:D,suffixRef:P,collapseItemRef:X,popperRef:Mt,validateState:Be,validateIcon:ot,showTagList:ce,collapseTagList:q,debouncedOnInputChange:Kt,deleteTag:Rt,getLabel:h,getValue:f,getDisabled:p,getValueKey:On,handleClear:cr,handleClickOutside:ul,handleDel:js,handleEsc:fs,focus:Qt,blur:Cn,handleMenuEnter:ur,handleResize:xo,resetSelectionWidth:ie,resetCalculatorWidth:Ce,updateTooltip:se,updateTagTooltip:ke,updateOptions:Oe,toggleMenu:ye,scrollTo:Br,onInput:Ps,onKeyboardNavigate:bt,onKeyboardSelect:jt,onSelect:je,onHover:Hn,handleCompositionStart:re,handleCompositionEnd:_e,handleCompositionUpdate:J}},QLe=Re({name:"ElSelectV2",components:{ElSelectMenu:zLe,ElTag:zE,ElTooltip:rr,ElIcon:Nt},directives:{ClickOutside:$h},props:$Le,emits:RLe,setup(e,{emit:t}){const n=x(()=>{const{modelValue:r,multiple:a}=e,c=a?[]:void 0;return at(r)?a?r:c:a?c:r}),s=jLe(Kn({...fi(e),modelValue:n}),t);An($x,{props:Kn({...fi(e),height:s.popupHeight,modelValue:n}),expanded:s.expanded,tooltipRef:s.tooltipRef,onSelect:s.onSelect,onHover:s.onHover,onKeyboardNavigate:s.onKeyboardNavigate,onKeyboardSelect:s.onKeyboardSelect});const i=x(()=>e.multiple?s.states.cachedOptions.map(r=>r.label):s.states.selectedLabel);return{...s,modelValue:n,selectedLabel:i}}});function qLe(e,t,n,s,i,r){const a=Ot("el-tag"),c=Ot("el-tooltip"),u=Ot("el-icon"),h=Ot("el-select-menu"),f=eA("click-outside");return an((H(),le("div",{ref:"selectRef",class:z([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),onMouseenter:p=>e.states.inputHovering=!0,onMouseleave:p=>e.states.inputHovering=!1},[oe(c,{ref:"tooltipRef",visible:e.dropdownMenuVisible,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,placement:e.placement,pure:"",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,trigger:"click",persistent:e.persistent,"append-to":e.appendTo,"show-arrow":e.showArrow,offset:e.offset,onBeforeShow:e.handleMenuEnter,onHide:p=>e.states.isBeforeHide=!1},{default:de(()=>[te("div",{ref:"wrapperRef",class:z([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:Yt(e.toggleMenu,["prevent"])},[e.$slots.prefix?(H(),le("div",{key:0,ref:"prefixRef",class:z(e.nsSelect.e("prefix"))},[He(e.$slots,"prefix")],2)):Ge("v-if",!0),te("div",{ref:"selectionRef",class:z([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.modelValue.length)])},[e.multiple?He(e.$slots,"tag",{key:0},()=>[(H(!0),le(Lt,null,In(e.showTagList,p=>(H(),le("div",{key:e.getValueKey(e.getValue(p)),class:z(e.nsSelect.e("selected-item"))},[oe(a,{closable:!e.selectDisabled&&!e.getDisabled(p),size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:Bt(e.tagStyle),onClose:_=>e.deleteTag(_,p)},{default:de(()=>[te("span",{class:z(e.nsSelect.e("tags-text"))},[He(e.$slots,"label",{label:e.getLabel(p),value:e.getValue(p)},()=>[Xt(Ke(e.getLabel(p)),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),e.collapseTags&&e.modelValue.length>e.maxCollapseTags?(H(),Ye(c,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:de(()=>[te("div",{ref:"collapseItemRef",class:z(e.nsSelect.e("selected-item"))},[oe(a,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,style:Bt(e.collapseTagStyle),"disable-transitions":""},{default:de(()=>[te("span",{class:z(e.nsSelect.e("tags-text"))}," + "+Ke(e.modelValue.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:de(()=>[te("div",{ref:"tagMenuRef",class:z(e.nsSelect.e("selection"))},[(H(!0),le(Lt,null,In(e.collapseTagList,p=>(H(),le("div",{key:e.getValueKey(e.getValue(p)),class:z(e.nsSelect.e("selected-item"))},[oe(a,{class:"in-tooltip",closable:!e.selectDisabled&&!e.getDisabled(p),size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:_=>e.deleteTag(_,p)},{default:de(()=>[te("span",{class:z(e.nsSelect.e("tags-text"))},[He(e.$slots,"label",{label:e.getLabel(p),value:e.getValue(p)},()=>[Xt(Ke(e.getLabel(p)),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):Ge("v-if",!0)]):Ge("v-if",!0),te("div",{class:z([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[an(te("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":p=>e.states.inputValue=p,style:Bt(e.inputStyle),autocomplete:e.autocomplete,tabindex:e.tabindex,"aria-autocomplete":"list","aria-haspopup":"listbox",autocapitalize:"off","aria-expanded":e.expanded,"aria-label":e.ariaLabel,class:z([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,role:"combobox",readonly:!e.filterable,spellcheck:"false",type:"text",name:e.name,onInput:e.onInput,onCompositionstart:e.handleCompositionStart,onCompositionupdate:e.handleCompositionUpdate,onCompositionend:e.handleCompositionEnd,onKeydown:[So(Yt(p=>e.onKeyboardNavigate("backward"),["stop","prevent"]),["up"]),So(Yt(p=>e.onKeyboardNavigate("forward"),["stop","prevent"]),["down"]),So(Yt(e.onKeyboardSelect,["stop","prevent"]),["enter"]),So(Yt(e.handleEsc,["stop","prevent"]),["esc"]),So(Yt(e.handleDel,["stop"]),["delete"])],onClick:Yt(e.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","autocomplete","tabindex","aria-expanded","aria-label","disabled","readonly","name","onInput","onCompositionstart","onCompositionupdate","onCompositionend","onKeydown","onClick"]),[[oA,e.states.inputValue]]),e.filterable?(H(),le("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:z(e.nsSelect.e("input-calculator")),textContent:Ke(e.states.inputValue)},null,10,["textContent"])):Ge("v-if",!0)],2),e.shouldShowPlaceholder?(H(),le("div",{key:1,class:z([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?He(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},()=>[te("span",null,Ke(e.currentPlaceholder),1)]):(H(),le("span",{key:1},Ke(e.currentPlaceholder),1))],2)):Ge("v-if",!0)],2),te("div",{ref:"suffixRef",class:z(e.nsSelect.e("suffix"))},[e.iconComponent?an((H(),Ye(u,{key:0,class:z([e.nsSelect.e("caret"),e.nsInput.e("icon"),e.iconReverse])},{default:de(()=>[(H(),Ye(yn(e.iconComponent)))]),_:1},8,["class"])),[[Yn,!e.showClearBtn]]):Ge("v-if",!0),e.showClearBtn&&e.clearIcon?(H(),Ye(u,{key:1,class:z([e.nsSelect.e("caret"),e.nsInput.e("icon"),e.nsSelect.e("clear")]),onClick:Yt(e.handleClear,["prevent","stop"])},{default:de(()=>[(H(),Ye(yn(e.clearIcon)))]),_:1},8,["class","onClick"])):Ge("v-if",!0),e.validateState&&e.validateIcon&&e.needStatusIcon?(H(),Ye(u,{key:2,class:z([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:de(()=>[(H(),Ye(yn(e.validateIcon)))]),_:1},8,["class"])):Ge("v-if",!0)],2)],10,["onClick"])]),content:de(()=>[oe(h,{ref:"menuRef",data:e.filteredOptions,width:e.popperSize,"hovering-index":e.states.hoveringIndex,"scrollbar-always-on":e.scrollbarAlwaysOn},ic({default:de(p=>[He(e.$slots,"default",qa(Th(p)))]),_:2},[e.$slots.header?{name:"header",fn:de(()=>[te("div",{class:z(e.nsSelect.be("dropdown","header"))},[He(e.$slots,"header")],2)])}:void 0,e.$slots.loading&&e.loading?{name:"loading",fn:de(()=>[te("div",{class:z(e.nsSelect.be("dropdown","loading"))},[He(e.$slots,"loading")],2)])}:e.loading||e.filteredOptions.length===0?{name:"empty",fn:de(()=>[te("div",{class:z(e.nsSelect.be("dropdown","empty"))},[He(e.$slots,"empty",{},()=>[te("span",null,Ke(e.emptyText),1)])],2)])}:void 0,e.$slots.footer?{name:"footer",fn:de(()=>[te("div",{class:z(e.nsSelect.be("dropdown","footer"))},[He(e.$slots,"footer")],2)])}:void 0]),1032,["data","width","hovering-index","scrollbar-always-on"])]),_:3},8,["visible","teleported","popper-class","popper-options","fallback-placements","effect","placement","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],42,["onMouseenter","onMouseleave"])),[[f,e.handleClickOutside,e.popperRef]])}var JLe=pt(QLe,[["render",qLe],["__file","select.vue"]]);const ZLe=nn(JLe),ewe=ht({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:xe([Number,Object])}}),twe=ht({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),nwe=Re({name:"ElSkeletonItem"}),owe=Re({...nwe,props:twe,setup(e){const t=rt("skeleton");return(n,s)=>(H(),le("div",{class:z([g(t).e("item"),g(t).e(n.variant)])},[n.variant==="image"?(H(),Ye(g(cTe),{key:0})):Ge("v-if",!0)],2))}});var PM=pt(owe,[["__file","skeleton-item.vue"]]);const swe=(e,t=0)=>{if(t===0)return e;const n=Tn(t)&&!!t.initVal,s=K(n);let i=null;const r=c=>{if(ho(c)){s.value=e.value;return}i&&clearTimeout(i),i=setTimeout(()=>{s.value=e.value},c)},a=c=>{c==="leading"?Wt(t)?r(t):r(t.leading):Tn(t)?r(t.trailing):s.value=!1};return rn(()=>a("leading")),tt(()=>e.value,c=>{a(c?"leading":"trailing")}),s},iwe=Re({name:"ElSkeleton"}),rwe=Re({...iwe,props:ewe,setup(e,{expose:t}){const n=e,s=rt("skeleton"),i=swe(oo(n,"loading"),n.throttle);return t({uiLoading:i}),(r,a)=>g(i)?(H(),le("div",$n({key:0,class:[g(s).b(),g(s).is("animated",r.animated)]},r.$attrs),[(H(!0),le(Lt,null,In(r.count,c=>(H(),le(Lt,{key:c},[g(i)?He(r.$slots,"template",{key:c},()=>[oe(PM,{class:z(g(s).is("first")),variant:"p"},null,8,["class"]),(H(!0),le(Lt,null,In(r.rows,u=>(H(),Ye(PM,{key:u,class:z([g(s).e("paragraph"),g(s).is("last",u===r.rows&&r.rows>1)]),variant:"p"},null,8,["class"]))),128))]):Ge("v-if",!0)],64))),128))],16)):He(r.$slots,"default",qa($n({key:1},r.$attrs)))}});var lwe=pt(rwe,[["__file","skeleton.vue"]]);const awe=nn(lwe,{SkeletonItem:PM}),cwe=is(PM),$K=Symbol("sliderContextKey"),uwe=ht({modelValue:{type:xe([Number,Array]),default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:Ys,inputSize:Ys,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:xe(Function),default:void 0},disabled:Boolean,range:Boolean,vertical:Boolean,height:String,debounce:{type:Number,default:300},rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:xe(Function),default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:Ph,default:"top"},marks:{type:xe(Object)},validateEvent:{type:Boolean,default:!0},...Xi(["ariaLabel"])}),Ww=e=>Wt(e)||at(e)&&e.every(Wt),dwe={[un]:Ww,[sr]:Ww,[_o]:Ww},hwe=ht({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:Ph,default:"top"}}),fwe={[un]:e=>Wt(e)},pwe=(e,t,n)=>{const s=K(),i=K(!1),r=x(()=>t.value instanceof Function),a=x(()=>r.value&&t.value(e.modelValue)||e.modelValue),c=Vl(()=>{n.value&&(i.value=!0)},50),u=Vl(()=>{n.value&&(i.value=!1)},50);return{tooltip:s,tooltipVisible:i,formatValue:a,displayTooltip:c,hideTooltip:u}},gwe=(e,t,n)=>{const{disabled:s,min:i,max:r,step:a,showTooltip:c,precision:u,sliderSize:h,formatTooltip:f,emitChange:p,resetSize:_,updateDragging:E}=It($K),{tooltip:v,tooltipVisible:b,formatValue:y,displayTooltip:S,hideTooltip:L}=pwe(e,f,c),I=K(),R=x(()=>`${(e.modelValue-i.value)/(r.value-i.value)*100}%`),w=x(()=>e.vertical?{bottom:R.value}:{left:R.value}),k=()=>{t.hovering=!0,S()},D=()=>{t.hovering=!1,t.dragging||L()},P=Ie=>{s.value||(Ie.preventDefault(),Z(Ie),window.addEventListener("mousemove",Q),window.addEventListener("touchmove",Q),window.addEventListener("mouseup",he),window.addEventListener("touchend",he),window.addEventListener("contextmenu",he),I.value.focus())},B=Ie=>{s.value||(t.newPosition=Number.parseFloat(R.value)+Ie/(r.value-i.value)*100,ge(t.newPosition),p())},F=()=>{B(-a.value)},X=()=>{B(a.value)},G=()=>{B(-a.value*4)},re=()=>{B(a.value*4)},_e=()=>{s.value||(ge(0),p())},J=()=>{s.value||(ge(100),p())},Y=Ie=>{let be=!0;switch(Ie.code){case $t.left:case $t.down:F();break;case $t.right:case $t.up:X();break;case $t.home:_e();break;case $t.end:J();break;case $t.pageDown:G();break;case $t.pageUp:re();break;default:be=!1;break}be&&Ie.preventDefault()},ae=Ie=>{let be,Ae;return Ie.type.startsWith("touch")?(Ae=Ie.touches[0].clientY,be=Ie.touches[0].clientX):(Ae=Ie.clientY,be=Ie.clientX),{clientX:be,clientY:Ae}},Z=Ie=>{t.dragging=!0,t.isClick=!0;const{clientX:be,clientY:Ae}=ae(Ie);e.vertical?t.startY=Ae:t.startX=be,t.startPosition=Number.parseFloat(R.value),t.newPosition=t.startPosition},Q=Ie=>{if(t.dragging){t.isClick=!1,S(),_();let be;const{clientX:Ae,clientY:We}=ae(Ie);e.vertical?(t.currentY=We,be=(t.startY-t.currentY)/h.value*100):(t.currentX=Ae,be=(t.currentX-t.startX)/h.value*100),t.newPosition=t.startPosition+be,ge(t.newPosition)}},he=()=>{t.dragging&&(setTimeout(()=>{t.dragging=!1,t.hovering||L(),t.isClick||ge(t.newPosition),p()},0),window.removeEventListener("mousemove",Q),window.removeEventListener("touchmove",Q),window.removeEventListener("mouseup",he),window.removeEventListener("touchend",he),window.removeEventListener("contextmenu",he))},ge=async Ie=>{if(Ie===null||Number.isNaN(+Ie))return;Ie<0?Ie=0:Ie>100&&(Ie=100);const be=100/((r.value-i.value)/a.value);let We=Math.round(Ie/be)*be*(r.value-i.value)*.01+i.value;We=Number.parseFloat(We.toFixed(u.value)),We!==e.modelValue&&n(un,We),!t.dragging&&e.modelValue!==t.oldValue&&(t.oldValue=e.modelValue),await Vt(),t.dragging&&S(),v.value.updatePopper()};return tt(()=>t.dragging,Ie=>{E(Ie)}),fo(I,"touchstart",P,{passive:!1}),{disabled:s,button:I,tooltip:v,tooltipVisible:b,showTooltip:c,wrapperStyle:w,formatValue:y,handleMouseEnter:k,handleMouseLeave:D,onButtonDown:P,onKeyDown:Y,setPosition:ge}},mwe=Re({name:"ElSliderButton"}),_we=Re({...mwe,props:hwe,emits:fwe,setup(e,{expose:t,emit:n}){const s=e,i=rt("slider"),r=Kn({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:s.modelValue}),{disabled:a,button:c,tooltip:u,showTooltip:h,tooltipVisible:f,wrapperStyle:p,formatValue:_,handleMouseEnter:E,handleMouseLeave:v,onButtonDown:b,onKeyDown:y,setPosition:S}=gwe(s,r,n),{hovering:L,dragging:I}=fi(r);return t({onButtonDown:b,onKeyDown:y,setPosition:S,hovering:L,dragging:I}),(R,w)=>(H(),le("div",{ref_key:"button",ref:c,class:z([g(i).e("button-wrapper"),{hover:g(L),dragging:g(I)}]),style:Bt(g(p)),tabindex:g(a)?-1:0,onMouseenter:g(E),onMouseleave:g(v),onMousedown:g(b),onFocus:g(E),onBlur:g(v),onKeydown:g(y)},[oe(g(rr),{ref_key:"tooltip",ref:u,visible:g(f),placement:R.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":R.tooltipClass,disabled:!g(h),persistent:g(h)},{content:de(()=>[te("span",null,Ke(g(_)),1)]),default:de(()=>[te("div",{class:z([g(i).e("button"),{hover:g(L),dragging:g(I)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled","persistent"])],46,["tabindex","onMouseenter","onMouseleave","onMousedown","onFocus","onBlur","onKeydown"]))}});var RG=pt(_we,[["__file","button.vue"]]);const Twe=ht({mark:{type:xe([String,Object]),default:void 0}});var Ewe=Re({name:"ElSliderMarker",props:Twe,setup(e){const t=rt("slider"),n=x(()=>Dt(e.mark)?e.mark:e.mark.label),s=x(()=>Dt(e.mark)?void 0:e.mark.style);return()=>Gt("div",{class:t.e("marks-text"),style:s.value},n.value)}});const vwe=(e,t,n)=>{const{form:s,formItem:i}=lr(),r=lo(),a=K(),c=K(),u={firstButton:a,secondButton:c},h=x(()=>e.disabled||(s==null?void 0:s.disabled)||!1),f=x(()=>Math.min(t.firstValue,t.secondValue)),p=x(()=>Math.max(t.firstValue,t.secondValue)),_=x(()=>e.range?`${100*(p.value-f.value)/(e.max-e.min)}%`:`${100*(t.firstValue-e.min)/(e.max-e.min)}%`),E=x(()=>e.range?`${100*(f.value-e.min)/(e.max-e.min)}%`:"0%"),v=x(()=>e.vertical?{height:e.height}:{}),b=x(()=>e.vertical?{height:_.value,bottom:E.value}:{width:_.value,left:E.value}),y=()=>{r.value&&(t.sliderSize=r.value[`client${e.vertical?"Height":"Width"}`])},S=G=>{const re=e.min+G*(e.max-e.min)/100;if(!e.range)return a;let _e;return Math.abs(f.value-re)<Math.abs(p.value-re)?_e=t.firstValue<t.secondValue?"firstButton":"secondButton":_e=t.firstValue>t.secondValue?"firstButton":"secondButton",u[_e]},L=G=>{const re=S(G);return re.value.setPosition(G),re},I=G=>{t.firstValue=G??e.min,w(e.range?[f.value,p.value]:G??e.min)},R=G=>{t.secondValue=G,e.range&&w([f.value,p.value])},w=G=>{n(un,G),n(sr,G)},k=async()=>{await Vt(),n(_o,e.range?[f.value,p.value]:e.modelValue)},D=G=>{var re,_e,J,Y,ae,Z;if(h.value||t.dragging)return;y();let Q=0;if(e.vertical){const he=(J=(_e=(re=G.touches)==null?void 0:re.item(0))==null?void 0:_e.clientY)!=null?J:G.clientY;Q=(r.value.getBoundingClientRect().bottom-he)/t.sliderSize*100}else{const he=(Z=(ae=(Y=G.touches)==null?void 0:Y.item(0))==null?void 0:ae.clientX)!=null?Z:G.clientX,ge=r.value.getBoundingClientRect().left;Q=(he-ge)/t.sliderSize*100}if(!(Q<0||Q>100))return L(Q)};return{elFormItem:i,slider:r,firstButton:a,secondButton:c,sliderDisabled:h,minValue:f,maxValue:p,runwayStyle:v,barStyle:b,resetSize:y,setPosition:L,emitChange:k,onSliderWrapperPrevent:G=>{var re,_e;((re=u.firstButton.value)!=null&&re.dragging||(_e=u.secondButton.value)!=null&&_e.dragging)&&G.preventDefault()},onSliderClick:G=>{D(G)&&k()},onSliderDown:async G=>{const re=D(G);re&&(await Vt(),re.value.onButtonDown(G))},onSliderMarkerDown:G=>{h.value||t.dragging||L(G)},setFirstValue:I,setSecondValue:R}},bwe=(e,t,n,s)=>({stops:x(()=>{if(!e.showStops||e.min>e.max)return[];if(e.step===0)return[];const a=(e.max-e.min)/e.step,c=100*e.step/(e.max-e.min),u=Array.from({length:a-1}).map((h,f)=>(f+1)*c);return e.range?u.filter(h=>h<100*(n.value-e.min)/(e.max-e.min)||h>100*(s.value-e.min)/(e.max-e.min)):u.filter(h=>h>100*(t.firstValue-e.min)/(e.max-e.min))}),getStopStyle:a=>e.vertical?{bottom:`${a}%`}:{left:`${a}%`}}),Owe=e=>x(()=>e.marks?Object.keys(e.marks).map(Number.parseFloat).sort((n,s)=>n-s).filter(n=>n<=e.max&&n>=e.min).map(n=>({point:n,position:(n-e.min)*100/(e.max-e.min),mark:e.marks[n]})):[]),Swe=(e,t,n,s,i,r)=>{const a=h=>{i(un,h),i(sr,h)},c=()=>e.range?![n.value,s.value].every((h,f)=>h===t.oldValue[f]):e.modelValue!==t.oldValue,u=()=>{var h,f;e.min>e.max&&ti("Slider","min should not be greater than max.");const p=e.modelValue;e.range&&at(p)?p[1]<e.min?a([e.min,e.min]):p[0]>e.max?a([e.max,e.max]):p[0]<e.min?a([e.min,p[1]]):p[1]>e.max?a([p[0],e.max]):(t.firstValue=p[0],t.secondValue=p[1],c()&&(e.validateEvent&&((h=r==null?void 0:r.validate)==null||h.call(r,"change").catch(_=>void 0)),t.oldValue=p.slice())):!e.range&&Wt(p)&&!Number.isNaN(p)&&(p<e.min?a(e.min):p>e.max?a(e.max):(t.firstValue=p,c()&&(e.validateEvent&&((f=r==null?void 0:r.validate)==null||f.call(r,"change").catch(_=>void 0)),t.oldValue=p)))};u(),tt(()=>t.dragging,h=>{h||u()}),tt(()=>e.modelValue,(h,f)=>{t.dragging||at(h)&&at(f)&&h.every((p,_)=>p===f[_])&&t.firstValue===h[0]&&t.secondValue===h[1]||u()},{deep:!0}),tt(()=>[e.min,e.max],()=>{u()})},ywe=(e,t,n)=>{const s=K();return rn(async()=>{e.range?(at(e.modelValue)?(t.firstValue=Math.max(e.min,e.modelValue[0]),t.secondValue=Math.min(e.max,e.modelValue[1])):(t.firstValue=e.min,t.secondValue=e.max),t.oldValue=[t.firstValue,t.secondValue]):(!Wt(e.modelValue)||Number.isNaN(e.modelValue)?t.firstValue=e.min:t.firstValue=Math.min(e.max,Math.max(e.min,e.modelValue)),t.oldValue=t.firstValue),fo(window,"resize",n),await Vt(),n()}),{sliderWrapper:s}},$we=Re({name:"ElSlider"}),Iwe=Re({...$we,props:uwe,emits:dwe,setup(e,{expose:t,emit:n}){const s=e,i=rt("slider"),{t:r}=xn(),a=Kn({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:c,slider:u,firstButton:h,secondButton:f,sliderDisabled:p,minValue:_,maxValue:E,runwayStyle:v,barStyle:b,resetSize:y,emitChange:S,onSliderWrapperPrevent:L,onSliderClick:I,onSliderDown:R,onSliderMarkerDown:w,setFirstValue:k,setSecondValue:D}=vwe(s,a,n),{stops:P,getStopStyle:B}=bwe(s,a,_,E),{inputId:F,isLabeledByFormItem:X}=fc(s,{formItemContext:c}),G=Fs(),re=x(()=>s.inputSize||G.value),_e=x(()=>s.ariaLabel||r("el.slider.defaultLabel",{min:s.min,max:s.max})),J=x(()=>s.range?s.rangeStartLabel||r("el.slider.defaultRangeStartLabel"):_e.value),Y=x(()=>s.formatValueText?s.formatValueText(be.value):`${be.value}`),ae=x(()=>s.rangeEndLabel||r("el.slider.defaultRangeEndLabel")),Z=x(()=>s.formatValueText?s.formatValueText(Ae.value):`${Ae.value}`),Q=x(()=>[i.b(),i.m(G.value),i.is("vertical",s.vertical),{[i.m("with-input")]:s.showInput}]),he=Owe(s);Swe(s,a,_,E,n,c);const ge=x(()=>{const ve=[s.min,s.max,s.step].map(Pe=>{const Be=`${Pe}`.split(".")[1];return Be?Be.length:0});return Math.max.apply(null,ve)}),{sliderWrapper:Ie}=ywe(s,a,y),{firstValue:be,secondValue:Ae,sliderSize:We}=fi(a),$e=ve=>{a.dragging=ve};return fo(Ie,"touchstart",L,{passive:!1}),fo(Ie,"touchmove",L,{passive:!1}),An($K,{...fi(s),sliderSize:We,disabled:p,precision:ge,emitChange:S,resetSize:y,updateDragging:$e}),t({onSliderClick:I}),(ve,Pe)=>{var Be,ot;return H(),le("div",{id:ve.range?g(F):void 0,ref_key:"sliderWrapper",ref:Ie,class:z(g(Q)),role:ve.range?"group":void 0,"aria-label":ve.range&&!g(X)?g(_e):void 0,"aria-labelledby":ve.range&&g(X)?(Be=g(c))==null?void 0:Be.labelId:void 0},[te("div",{ref_key:"slider",ref:u,class:z([g(i).e("runway"),{"show-input":ve.showInput&&!ve.range},g(i).is("disabled",g(p))]),style:Bt(g(v)),onMousedown:g(R),onTouchstartPassive:g(R)},[te("div",{class:z(g(i).e("bar")),style:Bt(g(b))},null,6),oe(RG,{id:ve.range?void 0:g(F),ref_key:"firstButton",ref:h,"model-value":g(be),vertical:ve.vertical,"tooltip-class":ve.tooltipClass,placement:ve.placement,role:"slider","aria-label":ve.range||!g(X)?g(J):void 0,"aria-labelledby":!ve.range&&g(X)?(ot=g(c))==null?void 0:ot.labelId:void 0,"aria-valuemin":ve.min,"aria-valuemax":ve.range?g(Ae):ve.max,"aria-valuenow":g(be),"aria-valuetext":g(Y),"aria-orientation":ve.vertical?"vertical":"horizontal","aria-disabled":g(p),"onUpdate:modelValue":g(k)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),ve.range?(H(),Ye(RG,{key:0,ref_key:"secondButton",ref:f,"model-value":g(Ae),vertical:ve.vertical,"tooltip-class":ve.tooltipClass,placement:ve.placement,role:"slider","aria-label":g(ae),"aria-valuemin":g(be),"aria-valuemax":ve.max,"aria-valuenow":g(Ae),"aria-valuetext":g(Z),"aria-orientation":ve.vertical?"vertical":"horizontal","aria-disabled":g(p),"onUpdate:modelValue":g(D)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):Ge("v-if",!0),ve.showStops?(H(),le("div",{key:1},[(H(!0),le(Lt,null,In(g(P),(Xe,ee)=>(H(),le("div",{key:ee,class:z(g(i).e("stop")),style:Bt(g(B)(Xe))},null,6))),128))])):Ge("v-if",!0),g(he).length>0?(H(),le(Lt,{key:2},[te("div",null,[(H(!0),le(Lt,null,In(g(he),(Xe,ee)=>(H(),le("div",{key:ee,style:Bt(g(B)(Xe.position)),class:z([g(i).e("stop"),g(i).e("marks-stop")])},null,6))),128))]),te("div",{class:z(g(i).e("marks"))},[(H(!0),le(Lt,null,In(g(he),(Xe,ee)=>(H(),Ye(g(Ewe),{key:ee,mark:Xe.mark,style:Bt(g(B)(Xe.position)),onMousedown:Yt(pe=>g(w)(Xe.position),["stop"])},null,8,["mark","style","onMousedown"]))),128))],2)],64)):Ge("v-if",!0)],46,["onMousedown","onTouchstartPassive"]),ve.showInput&&!ve.range?(H(),Ye(g(sK),{key:0,ref:"input","model-value":g(be),class:z(g(i).e("input")),step:ve.step,disabled:g(p),controls:ve.showInputControls,min:ve.min,max:ve.max,precision:g(ge),debounce:ve.debounce,size:g(re),"onUpdate:modelValue":g(k),onChange:g(S)},null,8,["model-value","class","step","disabled","controls","min","max","precision","debounce","size","onUpdate:modelValue","onChange"])):Ge("v-if",!0)],10,["id","role","aria-label","aria-labelledby"])}}});var Rwe=pt(Iwe,[["__file","slider.vue"]]);const Cwe=nn(Rwe),Mwe=ht({prefixCls:{type:String}}),CG=Re({name:"ElSpaceItem",props:Mwe,setup(e,{slots:t}){const n=rt("space"),s=x(()=>`${e.prefixCls||n.b()}__item`);return()=>Gt("div",{class:s.value},He(t,"default"))}}),MG={small:8,default:12,large:16};function Awe(e){const t=rt("space"),n=x(()=>[t.b(),t.m(e.direction),e.class]),s=K(0),i=K(0),r=x(()=>{const c=e.wrap||e.fill?{flexWrap:"wrap"}:{},u={alignItems:e.alignment},h={rowGap:`${i.value}px`,columnGap:`${s.value}px`};return[c,u,h,e.style]}),a=x(()=>e.fill?{flexGrow:1,minWidth:`${e.fillRatio}%`}:{});return Zs(()=>{const{size:c="small",wrap:u,direction:h,fill:f}=e;if(at(c)){const[p=0,_=0]=c;s.value=p,i.value=_}else{let p;Wt(c)?p=c:p=MG[c||"small"]||MG.small,(u||f)&&h==="horizontal"?s.value=i.value=p:h==="horizontal"?(s.value=p,i.value=0):(i.value=p,s.value=0)}}),{classes:n,containerStyle:r,itemStyle:a}}const Lwe=ht({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},class:{type:xe([String,Object,Array]),default:""},style:{type:xe([String,Array,Object]),default:""},alignment:{type:xe(String),default:"center"},prefixCls:{type:String},spacer:{type:xe([Object,String,Number,Array]),default:null,validator:e=>zo(e)||Wt(e)||Dt(e)},wrap:Boolean,fill:Boolean,fillRatio:{type:Number,default:100},size:{type:[String,Array,Number],values:rd,validator:e=>Wt(e)||at(e)&&e.length===2&&e.every(Wt)}}),wwe=Re({name:"ElSpace",props:Lwe,setup(e,{slots:t}){const{classes:n,containerStyle:s,itemStyle:i}=Awe(e);function r(a,c="",u=[]){const{prefixCls:h}=e;return a.forEach((f,p)=>{jN(f)?at(f.children)&&f.children.forEach((_,E)=>{jN(_)&&at(_.children)?r(_.children,`${c+E}-`,u):u.push(oe(CG,{style:i.value,prefixCls:h,key:`nested-${c+E}`},{default:()=>[_]},Ka.PROPS|Ka.STYLE,["style","prefixCls"]))}):uSe(f)&&u.push(oe(CG,{style:i.value,prefixCls:h,key:`LoopKey${c+p}`},{default:()=>[f]},Ka.PROPS|Ka.STYLE,["style","prefixCls"]))}),u}return()=>{var a;const{spacer:c,direction:u}=e,h=He(t,"default",{key:0},()=>[]);if(((a=h.children)!=null?a:[]).length===0)return null;if(at(h.children)){let f=r(h.children);if(c){const p=f.length-1;f=f.reduce((_,E,v)=>{const b=[..._,E];return v!==p&&b.push(oe("span",{style:[i.value,u==="vertical"?"width: 100%":null],key:v},[zo(c)?c:Xt(c,Ka.TEXT)],Ka.STYLE)),b},[])}return oe("div",{class:n.value,style:s.value},f,Ka.STYLE|Ka.CLASS)}return h.children}}}),kwe=nn(wwe),Nwe=ht({decimalSeparator:{type:String,default:"."},groupSeparator:{type:String,default:","},precision:{type:Number,default:0},formatter:Function,value:{type:xe([Number,Object]),default:0},prefix:String,suffix:String,title:String,valueStyle:{type:xe([String,Object,Array])}}),Pwe=Re({name:"ElStatistic"}),Dwe=Re({...Pwe,props:Nwe,setup(e,{expose:t}){const n=e,s=rt("statistic"),i=x(()=>{const{value:r,formatter:a,precision:c,decimalSeparator:u,groupSeparator:h}=n;if(Ut(a))return a(r);if(!Wt(r)||Number.isNaN(r))return r;let[f,p=""]=String(r).split(".");return p=p.padEnd(c,"0").slice(0,c>0?c:0),f=f.replace(/\B(?=(\d{3})+(?!\d))/g,h),[f,p].join(p?u:"")});return t({displayValue:i}),(r,a)=>(H(),le("div",{class:z(g(s).b())},[r.$slots.title||r.title?(H(),le("div",{key:0,class:z(g(s).e("head"))},[He(r.$slots,"title",{},()=>[Xt(Ke(r.title),1)])],2)):Ge("v-if",!0),te("div",{class:z(g(s).e("content"))},[r.$slots.prefix||r.prefix?(H(),le("div",{key:0,class:z(g(s).e("prefix"))},[He(r.$slots,"prefix",{},()=>[te("span",null,Ke(r.prefix),1)])],2)):Ge("v-if",!0),te("span",{class:z(g(s).e("number")),style:Bt(r.valueStyle)},Ke(g(i)),7),r.$slots.suffix||r.suffix?(H(),le("div",{key:1,class:z(g(s).e("suffix"))},[He(r.$slots,"suffix",{},()=>[te("span",null,Ke(r.suffix),1)])],2)):Ge("v-if",!0)],2)],2))}});var xwe=pt(Dwe,[["__file","statistic.vue"]]);const IK=nn(xwe),Bwe=ht({format:{type:String,default:"HH:mm:ss"},prefix:String,suffix:String,title:String,value:{type:xe([Number,Object]),default:0},valueStyle:{type:xe([String,Object,Array])}}),Fwe={finish:()=>!0,[_o]:e=>Wt(e)},Uwe=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]],AG=e=>Wt(e)?new Date(e).getTime():e.valueOf(),LG=(e,t)=>{let n=e;const s=/\[([^\]]*)]/g;return Uwe.reduce((r,[a,c])=>{const u=new RegExp(`${a}+(?![^\\[\\]]*\\])`,"g");if(u.test(r)){const h=Math.floor(n/c);return n-=h*c,r.replace(u,f=>String(h).padStart(f.length,"0"))}return r},t).replace(s,"$1")},Hwe=Re({name:"ElCountdown"}),Vwe=Re({...Hwe,props:Bwe,emits:Fwe,setup(e,{expose:t,emit:n}){const s=e;let i;const r=K(0),a=x(()=>LG(r.value,s.format)),c=f=>LG(f,s.format),u=()=>{i&&(Bm(i),i=void 0)},h=()=>{const f=AG(s.value),p=()=>{let _=f-Date.now();n("change",_),_<=0?(_=0,u(),n("finish")):i=vp(p),r.value=_};i=vp(p)};return rn(()=>{r.value=AG(s.value)-Date.now(),tt(()=>[s.value,s.format],()=>{u(),h()},{immediate:!0})}),vo(()=>{u()}),t({displayValue:a}),(f,p)=>(H(),Ye(g(IK),{value:r.value,title:f.title,prefix:f.prefix,suffix:f.suffix,"value-style":f.valueStyle,formatter:c},ic({_:2},[In(f.$slots,(_,E)=>({name:E,fn:de(()=>[He(f.$slots,E)])}))]),1032,["value","title","prefix","suffix","value-style"]))}});var Gwe=pt(Vwe,[["__file","countdown.vue"]]);const Wwe=nn(Gwe),Xwe=ht({space:{type:[Number,String],default:""},active:{type:Number,default:0},direction:{type:String,default:"horizontal",values:["horizontal","vertical"]},alignCenter:{type:Boolean},simple:{type:Boolean},finishStatus:{type:String,values:["wait","process","finish","error","success"],default:"finish"},processStatus:{type:String,values:["wait","process","finish","error","success"],default:"process"}}),zwe={[_o]:(e,t)=>[e,t].every(Wt)},Ywe=Re({name:"ElSteps"}),Kwe=Re({...Ywe,props:Xwe,emits:zwe,setup(e,{emit:t}){const n=e,s=rt("steps"),{children:i,addChild:r,removeChild:a}=sx(pn(),"ElStep");return tt(i,()=>{i.value.forEach((c,u)=>{c.setIndex(u)})}),An("ElSteps",{props:n,steps:i,addStep:r,removeStep:a}),tt(()=>n.active,(c,u)=>{t(_o,c,u)}),(c,u)=>(H(),le("div",{class:z([g(s).b(),g(s).m(c.simple?"simple":c.direction)])},[He(c.$slots,"default")],2))}});var jwe=pt(Kwe,[["__file","steps.vue"]]);const Qwe=ht({title:{type:String,default:""},icon:{type:To},description:{type:String,default:""},status:{type:String,values:["","wait","process","finish","error","success"],default:""}}),qwe=Re({name:"ElStep"}),Jwe=Re({...qwe,props:Qwe,setup(e){const t=e,n=rt("step"),s=K(-1),i=K({}),r=K(""),a=It("ElSteps"),c=pn();rn(()=>{tt([()=>a.props.active,()=>a.props.processStatus,()=>a.props.finishStatus],([k])=>{R(k)},{immediate:!0})}),vo(()=>{a.removeStep(w.uid)});const u=x(()=>t.status||r.value),h=x(()=>{const k=a.steps.value[s.value-1];return k?k.currentStatus:"wait"}),f=x(()=>a.props.alignCenter),p=x(()=>a.props.direction==="vertical"),_=x(()=>a.props.simple),E=x(()=>a.steps.value.length),v=x(()=>{var k;return((k=a.steps.value[E.value-1])==null?void 0:k.uid)===(c==null?void 0:c.uid)}),b=x(()=>_.value?"":a.props.space),y=x(()=>[n.b(),n.is(_.value?"simple":a.props.direction),n.is("flex",v.value&&!b.value&&!f.value),n.is("center",f.value&&!p.value&&!_.value)]),S=x(()=>{const k={flexBasis:Wt(b.value)?`${b.value}px`:b.value?b.value:`${100/(E.value-(f.value?0:1))}%`};return p.value||v.value&&(k.maxWidth=`${100/E.value}%`),k}),L=k=>{s.value=k},I=k=>{const D=k==="wait",P={transitionDelay:`${D?"-":""}${150*s.value}ms`},B=k===a.props.processStatus||D?0:100;P.borderWidth=B&&!_.value?"1px":0,P[a.props.direction==="vertical"?"height":"width"]=`${B}%`,i.value=P},R=k=>{k>s.value?r.value=a.props.finishStatus:k===s.value&&h.value!=="error"?r.value=a.props.processStatus:r.value="wait";const D=a.steps.value[s.value-1];D&&D.calcProgress(r.value)},w=Kn({uid:c.uid,currentStatus:u,setIndex:L,calcProgress:I});return a.addStep(w),(k,D)=>(H(),le("div",{style:Bt(g(S)),class:z(g(y))},[Ge(" icon & line "),te("div",{class:z([g(n).e("head"),g(n).is(g(u))])},[g(_)?Ge("v-if",!0):(H(),le("div",{key:0,class:z(g(n).e("line"))},[te("i",{class:z(g(n).e("line-inner")),style:Bt(i.value)},null,6)],2)),te("div",{class:z([g(n).e("icon"),g(n).is(k.icon||k.$slots.icon?"icon":"text")])},[He(k.$slots,"icon",{},()=>[k.icon?(H(),Ye(g(Nt),{key:0,class:z(g(n).e("icon-inner"))},{default:de(()=>[(H(),Ye(yn(k.icon)))]),_:1},8,["class"])):g(u)==="success"?(H(),Ye(g(Nt),{key:1,class:z([g(n).e("icon-inner"),g(n).is("status")])},{default:de(()=>[oe(g(y$))]),_:1},8,["class"])):g(u)==="error"?(H(),Ye(g(Nt),{key:2,class:z([g(n).e("icon-inner"),g(n).is("status")])},{default:de(()=>[oe(g(zc))]),_:1},8,["class"])):g(_)?Ge("v-if",!0):(H(),le("div",{key:3,class:z(g(n).e("icon-inner"))},Ke(s.value+1),3))])],2)],2),Ge(" title & description "),te("div",{class:z(g(n).e("main"))},[te("div",{class:z([g(n).e("title"),g(n).is(g(u))])},[He(k.$slots,"title",{},()=>[Xt(Ke(k.title),1)])],2),g(_)?(H(),le("div",{key:0,class:z(g(n).e("arrow"))},null,2)):(H(),le("div",{key:1,class:z([g(n).e("description"),g(n).is(g(u))])},[He(k.$slots,"description",{},()=>[Xt(Ke(k.description),1)])],2))],2)],6))}});var RK=pt(Jwe,[["__file","item.vue"]]);const Zwe=nn(jwe,{Step:RK}),eke=is(RK),CK=e=>["",...rd].includes(e),tke=ht({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:CK},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:To},activeActionIcon:{type:To},activeIcon:{type:To},inactiveIcon:{type:To},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:xe(Function)},id:String,tabindex:{type:[String,Number]},...Xi(["ariaLabel"])}),nke={[un]:e=>Io(e)||Dt(e)||Wt(e),[_o]:e=>Io(e)||Dt(e)||Wt(e),[sr]:e=>Io(e)||Dt(e)||Wt(e)},MK="ElSwitch",oke=Re({name:MK}),ske=Re({...oke,props:tke,emits:nke,setup(e,{expose:t,emit:n}){const s=e,{formItem:i}=lr(),r=Fs(),a=rt("switch"),{inputId:c}=fc(s,{formItemContext:i}),u=ar(x(()=>s.loading)),h=K(s.modelValue!==!1),f=K(),p=K(),_=x(()=>[a.b(),a.m(r.value),a.is("disabled",u.value),a.is("checked",S.value)]),E=x(()=>[a.e("label"),a.em("label","left"),a.is("active",!S.value)]),v=x(()=>[a.e("label"),a.em("label","right"),a.is("active",S.value)]),b=x(()=>({width:bs(s.width)}));tt(()=>s.modelValue,()=>{h.value=!0});const y=x(()=>h.value?s.modelValue:!1),S=x(()=>y.value===s.activeValue);[s.activeValue,s.inactiveValue].includes(y.value)||(n(un,s.inactiveValue),n(_o,s.inactiveValue),n(sr,s.inactiveValue)),tt(S,w=>{var k;f.value.checked=w,s.validateEvent&&((k=i==null?void 0:i.validate)==null||k.call(i,"change").catch(D=>void 0))});const L=()=>{const w=S.value?s.inactiveValue:s.activeValue;n(un,w),n(_o,w),n(sr,w),Vt(()=>{f.value.checked=S.value})},I=()=>{if(u.value)return;const{beforeChange:w}=s;if(!w){L();return}const k=w();[oy(k),Io(k)].includes(!0)||ti(MK,"beforeChange must return type `Promise<boolean>` or `boolean`"),oy(k)?k.then(P=>{P&&L()}).catch(P=>{}):k&&L()},R=()=>{var w,k;(k=(w=f.value)==null?void 0:w.focus)==null||k.call(w)};return rn(()=>{f.value.checked=S.value}),t({focus:R,checked:S}),(w,k)=>(H(),le("div",{class:z(g(_)),onClick:Yt(I,["prevent"])},[te("input",{id:g(c),ref_key:"input",ref:f,class:z(g(a).e("input")),type:"checkbox",role:"switch","aria-checked":g(S),"aria-disabled":g(u),"aria-label":w.ariaLabel,name:w.name,"true-value":w.activeValue,"false-value":w.inactiveValue,disabled:g(u),tabindex:w.tabindex,onChange:L,onKeydown:So(I,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),!w.inlinePrompt&&(w.inactiveIcon||w.inactiveText)?(H(),le("span",{key:0,class:z(g(E))},[w.inactiveIcon?(H(),Ye(g(Nt),{key:0},{default:de(()=>[(H(),Ye(yn(w.inactiveIcon)))]),_:1})):Ge("v-if",!0),!w.inactiveIcon&&w.inactiveText?(H(),le("span",{key:1,"aria-hidden":g(S)},Ke(w.inactiveText),9,["aria-hidden"])):Ge("v-if",!0)],2)):Ge("v-if",!0),te("span",{ref_key:"core",ref:p,class:z(g(a).e("core")),style:Bt(g(b))},[w.inlinePrompt?(H(),le("div",{key:0,class:z(g(a).e("inner"))},[w.activeIcon||w.inactiveIcon?(H(),Ye(g(Nt),{key:0,class:z(g(a).is("icon"))},{default:de(()=>[(H(),Ye(yn(g(S)?w.activeIcon:w.inactiveIcon)))]),_:1},8,["class"])):w.activeText||w.inactiveText?(H(),le("span",{key:1,class:z(g(a).is("text")),"aria-hidden":!g(S)},Ke(g(S)?w.activeText:w.inactiveText),11,["aria-hidden"])):Ge("v-if",!0)],2)):Ge("v-if",!0),te("div",{class:z(g(a).e("action"))},[w.loading?(H(),Ye(g(Nt),{key:0,class:z(g(a).is("loading"))},{default:de(()=>[oe(g(Ju))]),_:1},8,["class"])):g(S)?He(w.$slots,"active-action",{key:1},()=>[w.activeActionIcon?(H(),Ye(g(Nt),{key:0},{default:de(()=>[(H(),Ye(yn(w.activeActionIcon)))]),_:1})):Ge("v-if",!0)]):g(S)?Ge("v-if",!0):He(w.$slots,"inactive-action",{key:2},()=>[w.inactiveActionIcon?(H(),Ye(g(Nt),{key:0},{default:de(()=>[(H(),Ye(yn(w.inactiveActionIcon)))]),_:1})):Ge("v-if",!0)])],2)],6),!w.inlinePrompt&&(w.activeIcon||w.activeText)?(H(),le("span",{key:1,class:z(g(v))},[w.activeIcon?(H(),Ye(g(Nt),{key:0},{default:de(()=>[(H(),Ye(yn(w.activeIcon)))]),_:1})):Ge("v-if",!0),!w.activeIcon&&w.activeText?(H(),le("span",{key:1,"aria-hidden":!g(S)},Ke(w.activeText),9,["aria-hidden"])):Ge("v-if",!0)],2)):Ge("v-if",!0)],10,["onClick"]))}});var ike=pt(ske,[["__file","switch.vue"]]);const rke=nn(ike),Xw=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},lke=function(e,t,n,s,i){if(!t&&!s&&(!i||at(i)&&!i.length))return e;Dt(n)?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const r=s?null:function(c,u){return i?(at(i)||(i=[i]),i.map(h=>Dt(h)?Ns(c,h):h(c,u,e))):(t!=="$key"&&Tn(c)&&"$value"in c&&(c=c.$value),[Tn(c)?Ns(c,t):c])},a=function(c,u){if(s)return s(c.value,u.value);for(let h=0,f=c.key.length;h<f;h++){if(c.key[h]<u.key[h])return-1;if(c.key[h]>u.key[h])return 1}return 0};return e.map((c,u)=>({value:c,index:u,key:r?r(c,u):null})).sort((c,u)=>{let h=a(c,u);return h||(h=c.index-u.index),h*+n}).map(c=>c.value)},AK=function(e,t){let n=null;return e.columns.forEach(s=>{s.id===t&&(n=s)}),n},ake=function(e,t){let n=null;for(let s=0;s<e.columns.length;s++){const i=e.columns[s];if(i.columnKey===t){n=i;break}}return n||ti("ElTable",`No column matching with column-key: ${t}`),n},wG=function(e,t,n){const s=(t.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return s?AK(e,s[0]):null},kr=(e,t)=>{if(!e)throw new Error("Row is required when get row identity");if(Dt(t)){if(!t.includes("."))return`${e[t]}`;const n=t.split(".");let s=e;for(const i of n)s=s[i];return`${s}`}else if(Ut(t))return t.call(null,e)},pm=function(e,t){const n={};return(e||[]).forEach((s,i)=>{n[kr(s,t)]={row:s,index:i}}),n};function cke(e,t){const n={};let s;for(s in e)n[s]=e[s];for(s in t)if(zn(t,s)){const i=t[s];typeof i<"u"&&(n[s]=i)}return n}function Mx(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function LK(e){return e===""||e!==void 0&&(e=Mx(e),Number.isNaN(e)&&(e=80)),e}function uke(e){return Wt(e)?e:Dt(e)?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function dke(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...s)=>t(n(...s)))}function DM(e,t,n,s,i,r){let a=r??0,c=!1;const u=e.indexOf(t),h=u!==-1,f=i==null?void 0:i.call(null,t,r),p=E=>{E==="add"?e.push(t):e.splice(u,1),c=!0},_=E=>{let v=0;const b=(s==null?void 0:s.children)&&E[s.children];return b&&at(b)&&(v+=b.length,b.forEach(y=>{v+=_(y)})),v};return(!i||f)&&(Io(n)?n&&!h?p("add"):!n&&h&&p("remove"):p(h?"remove":"add")),!(s!=null&&s.checkStrictly)&&(s!=null&&s.children)&&at(t[s.children])&&t[s.children].forEach(E=>{DM(e,E,n??!h,s,i,a+1),a+=_(E)+1}),c}function hke(e,t,n="children",s="hasChildren"){const i=a=>!(at(a)&&a.length);function r(a,c,u){t(a,c,u),c.forEach(h=>{if(h[s]){t(h,null,u+1);return}const f=h[n];i(f)||r(h,f,u+1)})}e.forEach(a=>{if(a[s]){t(a,null,0);return}const c=a[n];i(c)||r(a,c,0)})}const kG=(e,t)=>({content:t,...e,popperOptions:{strategy:"fixed",...e.popperOptions}});let Ya=null;function fke(e,t,n,s){if((Ya==null?void 0:Ya.trigger)===n){Y5(Ya.vm.component.props,kG(e,t));return}Ya==null||Ya();const i=s==null?void 0:s.refs.tableWrapper,r=i==null?void 0:i.dataset.prefix,a=oe(rr,{virtualTriggering:!0,virtualRef:n,appendTo:i,placement:"top",transition:"none",offset:0,hideAfter:0,...kG(e,t)});a.appContext={...s.appContext,...s};const c=document.createElement("div");fp(a,c),a.component.exposed.onOpen();const u=i==null?void 0:i.querySelector(`.${r}-scrollbar__wrap`);Ya=()=>{fp(null,c),u==null||u.removeEventListener("scroll",Ya),Ya=null},Ya.trigger=n,Ya.vm=a,u==null||u.addEventListener("scroll",Ya)}function wK(e){return e.children?eme(e.children,wK):[e]}function NG(e,t){return e+t.colSpan}const kK=(e,t,n,s)=>{let i=0,r=e;const a=n.states.columns.value;if(s){const u=wK(s[e]);i=a.slice(0,a.indexOf(u[0])).reduce(NG,0),r=i+u.reduce(NG,0)-1}else i=e;let c;switch(t){case"left":r<n.states.fixedLeafColumnsLength.value&&(c="left");break;case"right":i>=a.length-n.states.rightFixedLeafColumnsLength.value&&(c="right");break;default:r<n.states.fixedLeafColumnsLength.value?c="left":i>=a.length-n.states.rightFixedLeafColumnsLength.value&&(c="right")}return c?{direction:c,start:i,after:r}:{}},Ax=(e,t,n,s,i,r=0)=>{const a=[],{direction:c,start:u,after:h}=kK(t,n,s,i);if(c){const f=c==="left";a.push(`${e}-fixed-column--${c}`),f&&h+r===s.states.fixedLeafColumnsLength.value-1?a.push("is-last-column"):!f&&u-r===s.states.columns.value.length-s.states.rightFixedLeafColumnsLength.value&&a.push("is-first-column")}return a};function PG(e,t){return e+(t.realWidth===null||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const Lx=(e,t,n,s)=>{const{direction:i,start:r=0,after:a=0}=kK(e,t,n,s);if(!i)return;const c={},u=i==="left",h=n.states.columns.value;return u?c.left=h.slice(0,r).reduce(PG,0):c.right=h.slice(a+1).reverse().reduce(PG,0),c},jE=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function pke(e){const t=pn(),n=K(!1),s=K([]);return{updateExpandRows:()=>{const u=e.data.value||[],h=e.rowKey.value;if(n.value)s.value=u.slice();else if(h){const f=pm(s.value,h);s.value=u.reduce((p,_)=>{const E=kr(_,h);return f[E]&&p.push(_),p},[])}else s.value=[]},toggleRowExpansion:(u,h)=>{DM(s.value,u,h)&&t.emit("expand-change",u,s.value.slice())},setExpandRowKeys:u=>{t.store.assertRowKey();const h=e.data.value||[],f=e.rowKey.value,p=pm(h,f);s.value=u.reduce((_,E)=>{const v=p[E];return v&&_.push(v.row),_},[])},isRowExpanded:u=>{const h=e.rowKey.value;return h?!!pm(s.value,h)[kr(u,h)]:s.value.includes(u)},states:{expandRows:s,defaultExpandAll:n}}}function gke(e){const t=pn(),n=K(null),s=K(null),i=h=>{t.store.assertRowKey(),n.value=h,a(h)},r=()=>{n.value=null},a=h=>{const{data:f,rowKey:p}=e;let _=null;p.value&&(_=(g(f)||[]).find(E=>kr(E,p.value)===h)),s.value=_,t.emit("current-change",s.value,null)};return{setCurrentRowKey:i,restoreCurrentRowKey:r,setCurrentRowByKey:a,updateCurrentRow:h=>{const f=s.value;if(h&&h!==f){s.value=h,t.emit("current-change",s.value,f);return}!h&&f&&(s.value=null,t.emit("current-change",null,f))},updateCurrentRowData:()=>{const h=e.rowKey.value,f=e.data.value||[],p=s.value;if(!f.includes(p)&&p){if(h){const _=kr(p,h);a(_)}else s.value=null;s.value===null&&t.emit("current-change",null,p)}else n.value&&(a(n.value),r())},states:{_currentRowKey:n,currentRow:s}}}function mke(e){const t=K([]),n=K({}),s=K(16),i=K(!1),r=K({}),a=K("hasChildren"),c=K("children"),u=K(!1),h=pn(),f=x(()=>{if(!e.rowKey.value)return{};const I=e.data.value||[];return _(I)}),p=x(()=>{const I=e.rowKey.value,R=Object.keys(r.value),w={};return R.length&&R.forEach(k=>{if(r.value[k].length){const D={children:[]};r.value[k].forEach(P=>{const B=kr(P,I);D.children.push(B),P[a.value]&&!w[B]&&(w[B]={children:[]})}),w[k]=D}}),w}),_=I=>{const R=e.rowKey.value,w={};return hke(I,(k,D,P)=>{const B=kr(k,R);at(D)?w[B]={children:D.map(F=>kr(F,R)),level:P}:i.value&&(w[B]={children:[],lazy:!0,level:P})},c.value,a.value),w},E=(I=!1,R=(w=>(w=h.store)==null?void 0:w.states.defaultExpandAll.value)())=>{var w;const k=f.value,D=p.value,P=Object.keys(k),B={};if(P.length){const F=g(n),X=[],G=(_e,J)=>{if(I)return t.value?R||t.value.includes(J):!!(R||_e!=null&&_e.expanded);{const Y=R||t.value&&t.value.includes(J);return!!(_e!=null&&_e.expanded||Y)}};P.forEach(_e=>{const J=F[_e],Y={...k[_e]};if(Y.expanded=G(J,_e),Y.lazy){const{loaded:ae=!1,loading:Z=!1}=J||{};Y.loaded=!!ae,Y.loading=!!Z,X.push(_e)}B[_e]=Y});const re=Object.keys(D);i.value&&re.length&&X.length&&re.forEach(_e=>{const J=F[_e],Y=D[_e].children;if(X.includes(_e)){if(B[_e].children.length!==0)throw new Error("[ElTable]children must be an empty array.");B[_e].children=Y}else{const{loaded:ae=!1,loading:Z=!1}=J||{};B[_e]={lazy:!0,loaded:!!ae,loading:!!Z,expanded:G(J,_e),children:Y,level:""}}})}n.value=B,(w=h.store)==null||w.updateTableScrollY()};tt(()=>t.value,()=>{E(!0)}),tt(()=>f.value,()=>{E()}),tt(()=>p.value,()=>{E()});const v=I=>{t.value=I,E()},b=(I,R)=>{h.store.assertRowKey();const w=e.rowKey.value,k=kr(I,w),D=k&&n.value[k];if(k&&D&&"expanded"in D){const P=D.expanded;R=ho(R)?!D.expanded:R,n.value[k].expanded=R,P!==R&&h.emit("expand-change",I,R),h.store.updateTableScrollY()}},y=I=>{h.store.assertRowKey();const R=e.rowKey.value,w=kr(I,R),k=n.value[w];i.value&&k&&"loaded"in k&&!k.loaded?S(I,w,k):b(I,void 0)},S=(I,R,w)=>{const{load:k}=h.props;k&&!n.value[R].loaded&&(n.value[R].loading=!0,k(I,w,D=>{if(!at(D))throw new TypeError("[ElTable] data must be an array");n.value[R].loading=!1,n.value[R].loaded=!0,n.value[R].expanded=!0,D.length&&(r.value[R]=D),h.emit("expand-change",I,!0)}))};return{loadData:S,loadOrToggle:y,toggleTreeExpansion:b,updateTreeExpandKeys:v,updateTreeData:E,updateKeyChildren:(I,R)=>{const{lazy:w,rowKey:k}=h.props;if(w){if(!k)throw new Error("[Table] rowKey is required in updateKeyChild");r.value[I]&&(r.value[I]=R)}},normalize:_,states:{expandRowKeys:t,treeData:n,indent:s,lazy:i,lazyTreeNodeMap:r,lazyColumnIdentifier:a,childrenColumnName:c,checkStrictly:u}}}const _ke=(e,t)=>{const n=t.sortingColumn;return!n||Dt(n.sortable)?e:lke(e,t.sortProp,t.sortOrder,n.sortMethod,n.sortBy)},$C=e=>{const t=[];return e.forEach(n=>{n.children&&n.children.length>0?t.push.apply(t,$C(n.children)):t.push(n)}),t};function Tke(){var e;const t=pn(),{size:n}=fi((e=t.proxy)==null?void 0:e.$props),s=K(null),i=K([]),r=K([]),a=K(!1),c=K([]),u=K([]),h=K([]),f=K([]),p=K([]),_=K([]),E=K([]),v=K([]),b=[],y=K(0),S=K(0),L=K(0),I=K(!1),R=K([]),w=K(!1),k=K(!1),D=K(null),P=K({}),B=K(null),F=K(null),X=K(null),G=K(null),re=K(null);tt(i,()=>{var ne;t.state&&(Z(!1),t.props.tableLayout==="auto"&&((ne=t.refs.tableHeaderRef)==null||ne.updateFixedColumnStyle()))},{deep:!0});const _e=()=>{if(!s.value)throw new Error("[ElTable] prop row-key is required")},J=ne=>{var Le;(Le=ne.children)==null||Le.forEach(ue=>{ue.fixed=ne.fixed,J(ue)})};let Y;const ae=()=>{c.value.forEach(ye=>{J(ye)}),f.value=c.value.filter(ye=>ye.fixed===!0||ye.fixed==="left"),p.value=c.value.filter(ye=>ye.fixed==="right"),ho(Y)&&c.value[0]&&c.value[0].type==="selection"&&(Y=!!c.value[0].fixed),f.value.length>0&&c.value[0]&&c.value[0].type==="selection"&&(c.value[0].fixed?f.value.some(ft=>ft.type!=="selection")?Y=void 0:(c.value[0].fixed=Y,Y||f.value.shift()):(c.value[0].fixed=!0,f.value.unshift(c.value[0])));const ne=c.value.filter(ye=>!ye.fixed);u.value=[].concat(f.value).concat(ne).concat(p.value);const Le=$C(ne),ue=$C(f.value),Fe=$C(p.value);y.value=Le.length,S.value=ue.length,L.value=Fe.length,h.value=[].concat(ue).concat(Le).concat(Fe),a.value=f.value.length>0||p.value.length>0},Z=(ne,Le=!1)=>{ne&&ae(),Le?t.state.doLayout():t.state.debouncedUpdateLayout()},Q=ne=>R.value.some(Le=>Hi(Le,ne)),he=()=>{I.value=!1;const ne=R.value;R.value=[],ne.length&&t.emit("selection-change",[])},ge=()=>{let ne;if(s.value){ne=[];const Le=pm(R.value,s.value),ue=pm(i.value,s.value);for(const Fe in Le)zn(Le,Fe)&&!ue[Fe]&&ne.push(Le[Fe].row)}else ne=R.value.filter(Le=>!i.value.includes(Le));if(ne.length){const Le=R.value.filter(ue=>!ne.includes(ue));R.value=Le,t.emit("selection-change",Le.slice())}},Ie=()=>(R.value||[]).slice(),be=(ne,Le,ue=!0,Fe=!1)=>{var ye,ft,Kt,En;const Rn={children:(ft=(ye=t==null?void 0:t.store)==null?void 0:ye.states)==null?void 0:ft.childrenColumnName.value,checkStrictly:(En=(Kt=t==null?void 0:t.store)==null?void 0:Kt.states)==null?void 0:En.checkStrictly.value};if(DM(R.value,ne,Le,Rn,Fe?void 0:D.value)){const Ln=(R.value||[]).slice();ue&&t.emit("select",Ln,ne),t.emit("selection-change",Ln)}},Ae=()=>{var ne,Le;const ue=k.value?!I.value:!(I.value||R.value.length);I.value=ue;let Fe=!1,ye=0;const ft=(Le=(ne=t==null?void 0:t.store)==null?void 0:ne.states)==null?void 0:Le.rowKey.value,{childrenColumnName:Kt}=t.store.states,En={children:Kt.value,checkStrictly:!1};i.value.forEach((Rn,Lo)=>{const Ln=Lo+ye;DM(R.value,Rn,ue,En,D.value,Ln)&&(Fe=!0),ye+=ve(kr(Rn,ft))}),Fe&&t.emit("selection-change",R.value?R.value.slice():[]),t.emit("select-all",(R.value||[]).slice())},We=()=>{const ne=pm(R.value,s.value);i.value.forEach(Le=>{const ue=kr(Le,s.value),Fe=ne[ue];Fe&&(R.value[Fe.index]=Le)})},$e=()=>{var ne;if(((ne=i.value)==null?void 0:ne.length)===0){I.value=!1;return}const{childrenColumnName:Le}=t.store.states,ue=s.value?pm(R.value,s.value):void 0;let Fe=0,ye=0;const ft=Rn=>ue?!!ue[kr(Rn,s.value)]:R.value.includes(Rn),Kt=Rn=>{var Lo;for(const Ln of Rn){const Zn=D.value&&D.value.call(null,Ln,Fe);if(ft(Ln))ye++;else if(!D.value||Zn)return!1;if(Fe++,(Lo=Ln[Le.value])!=null&&Lo.length&&!Kt(Ln[Le.value]))return!1}return!0},En=Kt(i.value||[]);I.value=ye===0?!1:En},ve=ne=>{var Le;if(!t||!t.store)return 0;const{treeData:ue}=t.store.states;let Fe=0;const ye=(Le=ue.value[ne])==null?void 0:Le.children;return ye&&(Fe+=ye.length,ye.forEach(ft=>{Fe+=ve(ft)})),Fe},Pe=(ne,Le)=>{at(ne)||(ne=[ne]);const ue={};return ne.forEach(Fe=>{P.value[Fe.id]=Le,ue[Fe.columnKey||Fe.id]=Le}),ue},Be=(ne,Le,ue)=>{F.value&&F.value!==ne&&(F.value.order=null),F.value=ne,X.value=Le,G.value=ue},ot=()=>{let ne=g(r);Object.keys(P.value).forEach(Le=>{const ue=P.value[Le];if(!ue||ue.length===0)return;const Fe=AK({columns:h.value},Le);Fe&&Fe.filterMethod&&(ne=ne.filter(ye=>ue.some(ft=>Fe.filterMethod.call(null,ft,ye,Fe))))}),B.value=ne},Xe=()=>{i.value=_ke(B.value,{sortingColumn:F.value,sortProp:X.value,sortOrder:G.value})},ee=(ne=void 0)=>{ne&&ne.filter||ot(),Xe()},pe=ne=>{const{tableHeaderRef:Le}=t.refs;if(!Le)return;const ue=Object.assign({},Le.filterPanels),Fe=Object.keys(ue);if(Fe.length)if(Dt(ne)&&(ne=[ne]),at(ne)){const ye=ne.map(ft=>ake({columns:h.value},ft));Fe.forEach(ft=>{const Kt=ye.find(En=>En.id===ft);Kt&&(Kt.filteredValue=[])}),t.store.commit("filterChange",{column:ye,values:[],silent:!0,multi:!0})}else Fe.forEach(ye=>{const ft=h.value.find(Kt=>Kt.id===ye);ft&&(ft.filteredValue=[])}),P.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},Oe=()=>{F.value&&(Be(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:ze,toggleRowExpansion:Ze,updateExpandRows:De,states:me,isRowExpanded:Te}=pke({data:i,rowKey:s}),{updateTreeExpandKeys:Ue,toggleTreeExpansion:qe,updateTreeData:ct,updateKeyChildren:Ne,loadOrToggle:Se,states:Je}=mke({data:i,rowKey:s}),{updateCurrentRowData:ut,updateCurrentRow:Mt,setCurrentRowKey:mt,states:qt}=gke({data:i,rowKey:s});return{assertRowKey:_e,updateColumns:ae,scheduleLayout:Z,isSelected:Q,clearSelection:he,cleanSelection:ge,getSelectionRows:Ie,toggleRowSelection:be,_toggleAllSelection:Ae,toggleAllSelection:null,updateSelectionByRowKey:We,updateAllSelected:$e,updateFilters:Pe,updateCurrentRow:Mt,updateSort:Be,execFilter:ot,execSort:Xe,execQuery:ee,clearFilter:pe,clearSort:Oe,toggleRowExpansion:Ze,setExpandRowKeysAdapter:ne=>{ze(ne),Ue(ne)},setCurrentRowKey:mt,toggleRowExpansionAdapter:(ne,Le)=>{h.value.some(({type:Fe})=>Fe==="expand")?Ze(ne,Le):qe(ne,Le)},isRowExpanded:Te,updateExpandRows:De,updateCurrentRowData:ut,loadOrToggle:Se,updateTreeData:ct,updateKeyChildren:Ne,states:{tableSize:n,rowKey:s,data:i,_data:r,isComplex:a,_columns:c,originColumns:u,columns:h,fixedColumns:f,rightFixedColumns:p,leafColumns:_,fixedLeafColumns:E,rightFixedLeafColumns:v,updateOrderFns:b,leafColumnsLength:y,fixedLeafColumnsLength:S,rightFixedLeafColumnsLength:L,isAllSelected:I,selection:R,reserveSelection:w,selectOnIndeterminate:k,selectable:D,filters:P,filteredData:B,sortingColumn:F,sortProp:X,sortOrder:G,hoverRow:re,...me,...Je,...qt}}}function E1(e,t){return e.map(n=>{var s;return n.id===t.id?t:((s=n.children)!=null&&s.length&&(n.children=E1(n.children,t)),n)})}function v1(e){e.forEach(t=>{var n,s;t.no=(n=t.getColumnIndex)==null?void 0:n.call(t),(s=t.children)!=null&&s.length&&v1(t.children)}),e.sort((t,n)=>t.no-n.no)}function Eke(){const e=pn(),t=Tke();return{ns:rt("table"),...t,mutations:{setData(a,c){const u=g(a._data)!==c;a.data.value=c,a._data.value=c,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),g(a.reserveSelection)?(e.store.assertRowKey(),e.store.updateSelectionByRowKey()):u?e.store.clearSelection():e.store.cleanSelection(),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(a,c,u,h){const f=g(a._columns);let p=[];u?(u&&!u.children&&(u.children=[]),u.children.push(c),p=E1(f,u)):(f.push(c),p=f),v1(p),a._columns.value=p,a.updateOrderFns.push(h),c.type==="selection"&&(a.selectable.value=c.selectable,a.reserveSelection.value=c.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(a,c){var u;((u=c.getColumnIndex)==null?void 0:u.call(c))!==c.no&&(v1(a._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(a,c,u,h){const f=g(a._columns)||[];if(u)u.children.splice(u.children.findIndex(_=>_.id===c.id),1),Vt(()=>{var _;((_=u.children)==null?void 0:_.length)===0&&delete u.children}),a._columns.value=E1(f,u);else{const _=f.indexOf(c);_>-1&&(f.splice(_,1),a._columns.value=f)}const p=a.updateOrderFns.indexOf(h);p>-1&&a.updateOrderFns.splice(p,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(a,c){const{prop:u,order:h,init:f}=c;if(u){const p=g(a.columns).find(_=>_.property===u);p&&(p.order=h,e.store.updateSort(p,u,h),e.store.commit("changeSortCondition",{init:f}))}},changeSortCondition(a,c){const{sortingColumn:u,sortProp:h,sortOrder:f}=a,p=g(u),_=g(h),E=g(f);E===null&&(a.sortingColumn.value=null,a.sortProp.value=null);const v={filter:!0};e.store.execQuery(v),(!c||!(c.silent||c.init))&&e.emit("sort-change",{column:p,prop:_,order:E}),e.store.updateTableScrollY()},filterChange(a,c){const{column:u,values:h,silent:f}=c,p=e.store.updateFilters(u,h);e.store.execQuery(),f||e.emit("filter-change",p),e.store.updateTableScrollY()},toggleAllSelection(){e.store.toggleAllSelection()},rowSelectedChanged(a,c){e.store.toggleRowSelection(c),e.store.updateAllSelected()},setHoverRow(a,c){a.hoverRow.value=c},setCurrentRow(a,c){e.store.updateCurrentRow(c)}},commit:function(a,...c){const u=e.store.mutations;if(u[a])u[a].apply(e,[e.store.states].concat(c));else throw new Error(`Action not found: ${a}`)},updateTableScrollY:function(){Vt(()=>e.layout.updateScrollY.apply(e.layout))}}}const ey={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"},"treeProps.checkStrictly":{key:"checkStrictly",default:!1}};function vke(e,t){if(!e)throw new Error("Table is required.");const n=Eke();return n.toggleAllSelection=Vl(n._toggleAllSelection,10),Object.keys(ey).forEach(s=>{NK(PK(t,s),s,n)}),bke(n,t),n}function bke(e,t){Object.keys(ey).forEach(n=>{tt(()=>PK(t,n),s=>{NK(s,n,e)})})}function NK(e,t,n){let s=e,i=ey[t];typeof ey[t]=="object"&&(i=i.key,s=s||ey[t].default),n.states[i].value=s}function PK(e,t){if(t.includes(".")){const n=t.split(".");let s=e;return n.forEach(i=>{s=s[i]}),s}else return e[t]}class Oke{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=K(null),this.scrollX=K(!1),this.scrollY=K(!1),this.bodyWidth=K(null),this.fixedWidth=K(null),this.rightFixedWidth=K(null),this.gutterWidth=0;for(const n in t)zn(t,n)&&(po(this[n])?this[n].value=t[n]:this[n]=t[n]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){if(this.height.value===null)return!1;const n=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(n!=null&&n.wrapRef)){let s=!0;const i=this.scrollY.value;return s=n.wrapRef.scrollHeight>n.wrapRef.clientHeight,this.scrollY.value=s,i!==s}return!1}setHeight(t,n="height"){if(!Dn)return;const s=this.table.vnode.el;if(t=uke(t),this.height.value=Number(t),!s&&(t||t===0))return Vt(()=>this.setHeight(t,n));Wt(t)?(s.style[n]=`${t}px`,this.updateElsHeight()):Dt(t)&&(s.style[n]=t,this.updateElsHeight())}setMaxHeight(t){this.setHeight(t,"max-height")}getFlattenColumns(){const t=[];return this.table.store.states.columns.value.forEach(s=>{s.isColumnGroup?t.push.apply(t,s.columns):t.push(s)}),t}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(t){if(!t)return!0;let n=t;for(;n.tagName!=="DIV";){if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}updateColumnsWidth(){if(!Dn)return;const t=this.fit,n=this.table.vnode.el.clientWidth;let s=0;const i=this.getFlattenColumns(),r=i.filter(u=>!Wt(u.width));if(i.forEach(u=>{Wt(u.width)&&u.realWidth&&(u.realWidth=null)}),r.length>0&&t){if(i.forEach(u=>{s+=Number(u.width||u.minWidth||80)}),s<=n){this.scrollX.value=!1;const u=n-s;if(r.length===1)r[0].realWidth=Number(r[0].minWidth||80)+u;else{const h=r.reduce((_,E)=>_+Number(E.minWidth||80),0),f=u/h;let p=0;r.forEach((_,E)=>{if(E===0)return;const v=Math.floor(Number(_.minWidth||80)*f);p+=v,_.realWidth=Number(_.minWidth||80)+v}),r[0].realWidth=Number(r[0].minWidth||80)+u-p}}else this.scrollX.value=!0,r.forEach(u=>{u.realWidth=Number(u.minWidth)});this.bodyWidth.value=Math.max(s,n),this.table.state.resizeState.value.width=this.bodyWidth.value}else i.forEach(u=>{!u.width&&!u.minWidth?u.realWidth=80:u.realWidth=Number(u.width||u.minWidth),s+=u.realWidth}),this.scrollX.value=s>n,this.bodyWidth.value=s;const a=this.store.states.fixedColumns.value;if(a.length>0){let u=0;a.forEach(h=>{u+=Number(h.realWidth||h.width)}),this.fixedWidth.value=u}const c=this.store.states.rightFixedColumns.value;if(c.length>0){let u=0;c.forEach(h=>{u+=Number(h.realWidth||h.width)}),this.rightFixedWidth.value=u}this.notifyObservers("columns")}addObserver(t){this.observers.push(t)}removeObserver(t){const n=this.observers.indexOf(t);n!==-1&&this.observers.splice(n,1)}notifyObservers(t){this.observers.forEach(s=>{var i,r;switch(t){case"columns":(i=s.state)==null||i.onColumnsChange(this);break;case"scrollable":(r=s.state)==null||r.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${t}.`)}})}}const{CheckboxGroup:Ske}=uc,yke=Re({name:"ElTableFilterPanel",components:{ElCheckbox:uc,ElCheckboxGroup:Ske,ElScrollbar:ld,ElTooltip:rr,ElIcon:Nt,ArrowDown:kh,ArrowUp:xD},directives:{ClickOutside:$h},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:{type:String}},setup(e){const t=pn(),{t:n}=xn(),s=rt("table-filter"),i=t==null?void 0:t.parent;i.filterPanels.value[e.column.id]||(i.filterPanels.value[e.column.id]=t);const r=K(!1),a=K(null),c=x(()=>e.column&&e.column.filters),u=x(()=>e.column.filterClassName?`${s.b()} ${e.column.filterClassName}`:s.b()),h=x({get:()=>{var w;return(((w=e.column)==null?void 0:w.filteredValue)||[])[0]},set:w=>{f.value&&(typeof w<"u"&&w!==null?f.value.splice(0,1,w):f.value.splice(0,1))}}),f=x({get(){return e.column?e.column.filteredValue||[]:[]},set(w){e.column&&e.upDataColumn("filteredValue",w)}}),p=x(()=>e.column?e.column.filterMultiple:!0),_=w=>w.value===h.value,E=()=>{r.value=!1},v=w=>{w.stopPropagation(),r.value=!r.value},b=()=>{r.value=!1},y=()=>{I(f.value),E()},S=()=>{f.value=[],I(f.value),E()},L=w=>{h.value=w,I(typeof w<"u"&&w!==null?f.value:[]),E()},I=w=>{e.store.commit("filterChange",{column:e.column,values:w}),e.store.updateAllSelected()};tt(r,w=>{e.column&&e.upDataColumn("filterOpened",w)},{immediate:!0});const R=x(()=>{var w,k;return(k=(w=a.value)==null?void 0:w.popperRef)==null?void 0:k.contentRef});return{tooltipVisible:r,multiple:p,filterClassName:u,filteredValue:f,filterValue:h,filters:c,handleConfirm:y,handleReset:S,handleSelect:L,isActive:_,t:n,ns:s,showFilterPanel:v,hideFilterPanel:b,popperPaneRef:R,tooltip:a}}});function $ke(e,t,n,s,i,r){const a=Ot("el-checkbox"),c=Ot("el-checkbox-group"),u=Ot("el-scrollbar"),h=Ot("arrow-up"),f=Ot("arrow-down"),p=Ot("el-icon"),_=Ot("el-tooltip"),E=eA("click-outside");return H(),Ye(_,{ref:"tooltip",visible:e.tooltipVisible,offset:0,placement:e.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":e.filterClassName,persistent:"","append-to":e.appendTo},{content:de(()=>[e.multiple?(H(),le("div",{key:0},[te("div",{class:z(e.ns.e("content"))},[oe(u,{"wrap-class":e.ns.e("wrap")},{default:de(()=>[oe(c,{modelValue:e.filteredValue,"onUpdate:modelValue":v=>e.filteredValue=v,class:z(e.ns.e("checkbox-group"))},{default:de(()=>[(H(!0),le(Lt,null,In(e.filters,v=>(H(),Ye(a,{key:v.value,value:v.value},{default:de(()=>[Xt(Ke(v.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue","class"])]),_:1},8,["wrap-class"])],2),te("div",{class:z(e.ns.e("bottom"))},[te("button",{class:z({[e.ns.is("disabled")]:e.filteredValue.length===0}),disabled:e.filteredValue.length===0,type:"button",onClick:e.handleConfirm},Ke(e.t("el.table.confirmFilter")),11,["disabled","onClick"]),te("button",{type:"button",onClick:e.handleReset},Ke(e.t("el.table.resetFilter")),9,["onClick"])],2)])):(H(),le("ul",{key:1,class:z(e.ns.e("list"))},[te("li",{class:z([e.ns.e("list-item"),{[e.ns.is("active")]:e.filterValue===void 0||e.filterValue===null}]),onClick:v=>e.handleSelect(null)},Ke(e.t("el.table.clearFilter")),11,["onClick"]),(H(!0),le(Lt,null,In(e.filters,v=>(H(),le("li",{key:v.value,class:z([e.ns.e("list-item"),e.ns.is("active",e.isActive(v))]),label:v.value,onClick:b=>e.handleSelect(v.value)},Ke(v.text),11,["label","onClick"]))),128))],2))]),default:de(()=>[an((H(),le("span",{class:z([`${e.ns.namespace.value}-table__column-filter-trigger`,`${e.ns.namespace.value}-none-outline`]),onClick:e.showFilterPanel},[oe(p,null,{default:de(()=>[He(e.$slots,"filter-icon",{},()=>[e.column.filterOpened?(H(),Ye(h,{key:0})):(H(),Ye(f,{key:1}))])]),_:3})],10,["onClick"])),[[E,e.hideFilterPanel,e.popperPaneRef]])]),_:3},8,["visible","placement","popper-class","append-to"])}var Ike=pt(yke,[["render",$ke],["__file","filter-panel.vue"]]);function DK(e){const t=pn();ZM(()=>{n.value.addObserver(t)}),rn(()=>{s(n.value),i(n.value)}),nd(()=>{s(n.value),i(n.value)}),Ch(()=>{n.value.removeObserver(t)});const n=x(()=>{const r=e.layout;if(!r)throw new Error("Can not find table layout.");return r}),s=r=>{var a;const c=((a=e.vnode.el)==null?void 0:a.querySelectorAll("colgroup > col"))||[];if(!c.length)return;const u=r.getFlattenColumns(),h={};u.forEach(f=>{h[f.id]=f});for(let f=0,p=c.length;f<p;f++){const _=c[f],E=_.getAttribute("name"),v=h[E];v&&_.setAttribute("width",v.realWidth||v.width)}},i=r=>{var a,c;const u=((a=e.vnode.el)==null?void 0:a.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let f=0,p=u.length;f<p;f++)u[f].setAttribute("width",r.scrollY.value?r.gutterWidth:"0");const h=((c=e.vnode.el)==null?void 0:c.querySelectorAll("th.gutter"))||[];for(let f=0,p=h.length;f<p;f++){const _=h[f];_.style.width=r.scrollY.value?`${r.gutterWidth}px`:"0",_.style.display=r.scrollY.value?"":"none"}};return{tableLayout:n.value,onColumnsChange:s,onScrollableChange:i}}const ad=Symbol("ElTable");function Rke(e,t){const n=pn(),s=It(ad),i=b=>{b.stopPropagation()},r=(b,y)=>{!y.filters&&y.sortable?v(b,y,!1):y.filterable&&!y.sortable&&i(b),s==null||s.emit("header-click",y,b)},a=(b,y)=>{s==null||s.emit("header-contextmenu",y,b)},c=K(null),u=K(!1),h=K({}),f=(b,y)=>{if(Dn&&!(y.children&&y.children.length>0)&&c.value&&e.border){u.value=!0;const S=s;t("set-drag-visible",!0);const I=(S==null?void 0:S.vnode.el).getBoundingClientRect().left,R=n.vnode.el.querySelector(`th.${y.id}`),w=R.getBoundingClientRect(),k=w.left-I+30;ec(R,"noclick"),h.value={startMouseLeft:b.clientX,startLeft:w.right-I,startColumnLeft:w.left-I,tableLeft:I};const D=S==null?void 0:S.refs.resizeProxy;D.style.left=`${h.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const P=F=>{const X=F.clientX-h.value.startMouseLeft,G=h.value.startLeft+X;D.style.left=`${Math.max(k,G)}px`},B=()=>{if(u.value){const{startColumnLeft:F,startLeft:X}=h.value,re=Number.parseInt(D.style.left,10)-F;y.width=y.realWidth=re,S==null||S.emit("header-dragend",y.width,X-F,y,b),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",u.value=!1,c.value=null,h.value={},t("set-drag-visible",!1)}document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",B),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{Dr(R,"noclick")},0)};document.addEventListener("mousemove",P),document.addEventListener("mouseup",B)}},p=(b,y)=>{var S;if(y.children&&y.children.length>0)return;const L=b.target;if(!pa(L))return;const I=L==null?void 0:L.closest("th");if(!(!y||!y.resizable||!I)&&!u.value&&e.border){const R=I.getBoundingClientRect(),w=document.body.style,k=((S=I.parentNode)==null?void 0:S.lastElementChild)===I;R.width>12&&R.right-b.pageX<8&&!k?(w.cursor="col-resize",Pl(I,"is-sortable")&&(I.style.cursor="col-resize"),c.value=y):u.value||(w.cursor="",Pl(I,"is-sortable")&&(I.style.cursor="pointer"),c.value=null)}},_=()=>{Dn&&(document.body.style.cursor="")},E=({order:b,sortOrders:y})=>{if(b==="")return y[0];const S=y.indexOf(b||null);return y[S>y.length-2?0:S+1]},v=(b,y,S)=>{var L;b.stopPropagation();const I=y.order===S?null:S||E(y),R=(L=b.target)==null?void 0:L.closest("th");if(R&&Pl(R,"noclick")){Dr(R,"noclick");return}if(!y.sortable)return;const w=b.currentTarget;if(["ascending","descending"].some(F=>Pl(w,F)&&!y.sortOrders.includes(F)))return;const k=e.store.states;let D=k.sortProp.value,P;const B=k.sortingColumn.value;(B!==y||B===y&&B.order===null)&&(B&&(B.order=null),k.sortingColumn.value=y,D=y.property),I?P=y.order=I:P=y.order=null,k.sortProp.value=D,k.sortOrder.value=P,s==null||s.store.commit("changeSortCondition")};return{handleHeaderClick:r,handleHeaderContextMenu:a,handleMouseDown:f,handleMouseMove:p,handleMouseOut:_,handleSortClick:v,handleFilterClick:i}}function Cke(e){const t=It(ad),n=rt("table");return{getHeaderRowStyle:c=>{const u=t==null?void 0:t.props.headerRowStyle;return Ut(u)?u.call(null,{rowIndex:c}):u},getHeaderRowClass:c=>{const u=[],h=t==null?void 0:t.props.headerRowClassName;return Dt(h)?u.push(h):Ut(h)&&u.push(h.call(null,{rowIndex:c})),u.join(" ")},getHeaderCellStyle:(c,u,h,f)=>{var p;let _=(p=t==null?void 0:t.props.headerCellStyle)!=null?p:{};Ut(_)&&(_=_.call(null,{rowIndex:c,columnIndex:u,row:h,column:f}));const E=Lx(u,f.fixed,e.store,h);return jE(E,"left"),jE(E,"right"),Object.assign({},_,E)},getHeaderCellClass:(c,u,h,f)=>{const p=Ax(n.b(),u,f.fixed,e.store,h),_=[f.id,f.order,f.headerAlign,f.className,f.labelClassName,...p];f.children||_.push("is-leaf"),f.sortable&&_.push("is-sortable");const E=t==null?void 0:t.props.headerCellClassName;return Dt(E)?_.push(E):Ut(E)&&_.push(E.call(null,{rowIndex:c,columnIndex:u,row:h,column:f})),_.push(n.e("cell")),_.filter(v=>!!v).join(" ")}}}const xK=e=>{const t=[];return e.forEach(n=>{n.children?(t.push(n),t.push.apply(t,xK(n.children))):t.push(n)}),t},BK=e=>{let t=1;const n=(r,a)=>{if(a&&(r.level=a.level+1,t<r.level&&(t=r.level)),r.children){let c=0;r.children.forEach(u=>{n(u,r),c+=u.colSpan}),r.colSpan=c}else r.colSpan=1};e.forEach(r=>{r.level=1,n(r,void 0)});const s=[];for(let r=0;r<t;r++)s.push([]);return xK(e).forEach(r=>{r.children?(r.rowSpan=1,r.children.forEach(a=>a.isSubColumn=!0)):r.rowSpan=t-r.level+1,s[r.level-1].push(r)}),s};function Mke(e){const t=It(ad),n=x(()=>BK(e.store.states.originColumns.value));return{isGroup:x(()=>{const r=n.value.length>1;return r&&t&&(t.state.isGroup.value=!0),r}),toggleAllSelection:r=>{r.stopPropagation(),t==null||t.store.commit("toggleAllSelection")},columnRows:n}}var Ake=Re({name:"ElTableHeader",components:{ElCheckbox:uc},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})},appendFilterPanelTo:{type:String}},setup(e,{emit:t}){const n=pn(),s=It(ad),i=rt("table"),r=K({}),{onColumnsChange:a,onScrollableChange:c}=DK(s),u=(s==null?void 0:s.props.tableLayout)==="auto",h=Kn(new Map),f=K(),p=()=>{setTimeout(()=>{h.size>0&&(h.forEach((F,X)=>{const G=f.value.querySelector(`.${X.replace(/\s/g,".")}`);if(G){const re=G.getBoundingClientRect().width;F.width=re}}),h.clear())})};tt(h,p),rn(async()=>{await Vt(),await Vt();const{prop:F,order:X}=e.defaultSort;s==null||s.store.commit("sort",{prop:F,order:X,init:!0}),p()});const{handleHeaderClick:_,handleHeaderContextMenu:E,handleMouseDown:v,handleMouseMove:b,handleMouseOut:y,handleSortClick:S,handleFilterClick:L}=Rke(e,t),{getHeaderRowStyle:I,getHeaderRowClass:R,getHeaderCellStyle:w,getHeaderCellClass:k}=Cke(e),{isGroup:D,toggleAllSelection:P,columnRows:B}=Mke(e);return n.state={onColumnsChange:a,onScrollableChange:c},n.filterPanels=r,{ns:i,filterPanels:r,onColumnsChange:a,onScrollableChange:c,columnRows:B,getHeaderRowClass:R,getHeaderRowStyle:I,getHeaderCellClass:k,getHeaderCellStyle:w,handleHeaderClick:_,handleHeaderContextMenu:E,handleMouseDown:v,handleMouseMove:b,handleMouseOut:y,handleSortClick:S,handleFilterClick:L,isGroup:D,toggleAllSelection:P,saveIndexSelection:h,isTableLayoutAuto:u,theadRef:f,updateFixedColumnStyle:p}},render(){const{ns:e,isGroup:t,columnRows:n,getHeaderCellStyle:s,getHeaderCellClass:i,getHeaderRowClass:r,getHeaderRowStyle:a,handleHeaderClick:c,handleHeaderContextMenu:u,handleMouseDown:h,handleMouseMove:f,handleSortClick:p,handleMouseOut:_,store:E,$parent:v,saveIndexSelection:b,isTableLayoutAuto:y}=this;let S=1;return Gt("thead",{ref:"theadRef",class:{[e.is("group")]:t}},n.map((L,I)=>Gt("tr",{class:r(I),key:I,style:a(I)},L.map((R,w)=>{R.rowSpan>S&&(S=R.rowSpan);const k=i(I,w,L,R);return y&&R.fixed&&b.set(k,R),Gt("th",{class:k,colspan:R.colSpan,key:`${R.id}-thead`,rowspan:R.rowSpan,style:s(I,w,L,R),onClick:D=>{D.currentTarget.classList.contains("noclick")||c(D,R)},onContextmenu:D=>u(D,R),onMousedown:D=>h(D,R),onMousemove:D=>f(D,R),onMouseout:_},[Gt("div",{class:["cell",R.filteredValue&&R.filteredValue.length>0?"highlight":""]},[R.renderHeader?R.renderHeader({column:R,$index:w,store:E,_self:v}):R.label,R.sortable&&Gt("span",{onClick:D=>p(D,R),class:"caret-wrapper"},[Gt("i",{onClick:D=>p(D,R,"ascending"),class:"sort-caret ascending"}),Gt("i",{onClick:D=>p(D,R,"descending"),class:"sort-caret descending"})]),R.filterable&&Gt(Ike,{store:E,placement:R.filterPlacement||"bottom-start",appendTo:v.appendFilterPanelTo,column:R,upDataColumn:(D,P)=>{R[D]=P}},{"filter-icon":()=>R.renderFilterIcon?R.renderFilterIcon({filterOpened:R.filterOpened}):null})])])}))))}});function zw(e,t,n=.03){return e-t>n}function Lke(e){const t=It(ad),n=K(""),s=K(Gt("div")),i=(v,b,y)=>{var S;const L=t,I=Xw(v);let R;const w=(S=L==null?void 0:L.vnode.el)==null?void 0:S.dataset.prefix;I&&(R=wG({columns:e.store.states.columns.value},I,w),R&&(L==null||L.emit(`cell-${y}`,b,R,I,v))),L==null||L.emit(`row-${y}`,b,R,v)},r=(v,b)=>{i(v,b,"dblclick")},a=(v,b)=>{e.store.commit("setCurrentRow",b),i(v,b,"click")},c=(v,b)=>{i(v,b,"contextmenu")},u=Vl(v=>{e.store.commit("setHoverRow",v)},30),h=Vl(()=>{e.store.commit("setHoverRow",null)},30),f=v=>{const b=window.getComputedStyle(v,null),y=Number.parseInt(b.paddingLeft,10)||0,S=Number.parseInt(b.paddingRight,10)||0,L=Number.parseInt(b.paddingTop,10)||0,I=Number.parseInt(b.paddingBottom,10)||0;return{left:y,right:S,top:L,bottom:I}},p=(v,b,y)=>{let S=b.target.parentNode;for(;v>1&&(S=S==null?void 0:S.nextSibling,!(!S||S.nodeName!=="TR"));)y(S,"hover-row hover-fixed-row"),v--};return{handleDoubleClick:r,handleClick:a,handleContextMenu:c,handleMouseEnter:u,handleMouseLeave:h,handleCellMouseEnter:(v,b,y)=>{var S;const L=t,I=Xw(v),R=(S=L==null?void 0:L.vnode.el)==null?void 0:S.dataset.prefix;if(I){const ae=wG({columns:e.store.states.columns.value},I,R);I.rowSpan>1&&p(I.rowSpan,v,ec);const Z=L.hoverState={cell:I,column:ae,row:b};L==null||L.emit("cell-mouse-enter",Z.row,Z.column,Z.cell,v)}if(!y)return;const w=v.target.querySelector(".cell");if(!(Pl(w,`${R}-tooltip`)&&w.childNodes.length))return;const k=document.createRange();k.setStart(w,0),k.setEnd(w,w.childNodes.length);const{width:D,height:P}=k.getBoundingClientRect(),{width:B,height:F}=w.getBoundingClientRect(),{top:X,left:G,right:re,bottom:_e}=f(w),J=G+re,Y=X+_e;(zw(D+J,B)||zw(P+Y,F)||zw(w.scrollWidth,B))&&fke(y,I.innerText||I.textContent,I,L)},handleCellMouseLeave:v=>{const b=Xw(v);if(!b)return;b.rowSpan>1&&p(b.rowSpan,v,Dr);const y=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",y==null?void 0:y.row,y==null?void 0:y.column,y==null?void 0:y.cell,v)},tooltipContent:n,tooltipTrigger:s}}function wke(e){const t=It(ad),n=rt("table");return{getRowStyle:(h,f)=>{const p=t==null?void 0:t.props.rowStyle;return Ut(p)?p.call(null,{row:h,rowIndex:f}):p||null},getRowClass:(h,f)=>{const p=[n.e("row")];t!=null&&t.props.highlightCurrentRow&&h===e.store.states.currentRow.value&&p.push("current-row"),e.stripe&&f%2===1&&p.push(n.em("row","striped"));const _=t==null?void 0:t.props.rowClassName;return Dt(_)?p.push(_):Ut(_)&&p.push(_.call(null,{row:h,rowIndex:f})),p},getCellStyle:(h,f,p,_)=>{const E=t==null?void 0:t.props.cellStyle;let v=E??{};Ut(E)&&(v=E.call(null,{rowIndex:h,columnIndex:f,row:p,column:_}));const b=Lx(f,e==null?void 0:e.fixed,e.store);return jE(b,"left"),jE(b,"right"),Object.assign({},v,b)},getCellClass:(h,f,p,_,E)=>{const v=Ax(n.b(),f,e==null?void 0:e.fixed,e.store,void 0,E),b=[_.id,_.align,_.className,...v],y=t==null?void 0:t.props.cellClassName;return Dt(y)?b.push(y):Ut(y)&&b.push(y.call(null,{rowIndex:h,columnIndex:f,row:p,column:_})),b.push(n.e("cell")),b.filter(S=>!!S).join(" ")},getSpan:(h,f,p,_)=>{let E=1,v=1;const b=t==null?void 0:t.props.spanMethod;if(Ut(b)){const y=b({row:h,column:f,rowIndex:p,columnIndex:_});at(y)?(E=y[0],v=y[1]):typeof y=="object"&&(E=y.rowspan,v=y.colspan)}return{rowspan:E,colspan:v}},getColspanRealWidth:(h,f,p)=>{if(f<1)return h[p].realWidth;const _=h.map(({realWidth:E,width:v})=>E||v).slice(p,p+f);return Number(_.reduce((E,v)=>Number(E)+Number(v),-1))}}}const kke=Re({name:"TableTdWrapper"}),Nke=Re({...kke,props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup(e){return(t,n)=>(H(),le("td",{colspan:e.colspan,rowspan:e.rowspan},[He(t.$slots,"default")],8,["colspan","rowspan"]))}});var Pke=pt(Nke,[["__file","td-wrapper.vue"]]);function Dke(e){const t=It(ad),n=rt("table"),{handleDoubleClick:s,handleClick:i,handleContextMenu:r,handleMouseEnter:a,handleMouseLeave:c,handleCellMouseEnter:u,handleCellMouseLeave:h,tooltipContent:f,tooltipTrigger:p}=Lke(e),{getRowStyle:_,getRowClass:E,getCellStyle:v,getCellClass:b,getSpan:y,getColspanRealWidth:S}=wke(e),L=x(()=>e.store.states.columns.value.findIndex(({type:D})=>D==="default")),I=(D,P)=>{const B=t.props.rowKey;return B?kr(D,B):P},R=(D,P,B,F=!1)=>{const{tooltipEffect:X,tooltipOptions:G,store:re}=e,{indent:_e,columns:J}=re.states,Y=E(D,P);let ae=!0;return B&&(Y.push(n.em("row",`level-${B.level}`)),ae=B.display),Gt("tr",{style:[ae?null:{display:"none"},_(D,P)],class:Y,key:I(D,P),onDblclick:Q=>s(Q,D),onClick:Q=>i(Q,D),onContextmenu:Q=>r(Q,D),onMouseenter:()=>a(P),onMouseleave:c},J.value.map((Q,he)=>{const{rowspan:ge,colspan:Ie}=y(D,Q,P,he);if(!ge||!Ie)return null;const be=Object.assign({},Q);be.realWidth=S(J.value,Ie,he);const Ae={store:e.store,_self:e.context||t,column:be,row:D,$index:P,cellIndex:he,expanded:F};he===L.value&&B&&(Ae.treeNode={indent:B.level*_e.value,level:B.level},Io(B.expanded)&&(Ae.treeNode.expanded=B.expanded,"loading"in B&&(Ae.treeNode.loading=B.loading),"noLazyChildren"in B&&(Ae.treeNode.noLazyChildren=B.noLazyChildren)));const We=`${I(D,P)},${he}`,$e=be.columnKey||be.rawColumnKey||"",ve=Q.showOverflowTooltip&&Y5({effect:X},G,Q.showOverflowTooltip);return Gt(Pke,{style:v(P,he,D,Q),class:b(P,he,D,Q,Ie-1),key:`${$e}${We}`,rowspan:ge,colspan:Ie,onMouseenter:Pe=>u(Pe,D,ve),onMouseleave:h},{default:()=>w(he,Q,Ae)})}))},w=(D,P,B)=>P.renderCell(B);return{wrappedRowRender:(D,P)=>{const B=e.store,{isRowExpanded:F,assertRowKey:X}=B,{treeData:G,lazyTreeNodeMap:re,childrenColumnName:_e,rowKey:J}=B.states,Y=B.states.columns.value;if(Y.some(({type:Z})=>Z==="expand")){const Z=F(D),Q=R(D,P,void 0,Z),he=t.renderExpanded;return Z?he?[[Q,Gt("tr",{key:`expanded-row__${Q.key}`},[Gt("td",{colspan:Y.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[he({row:D,$index:P,store:B,expanded:Z})])])]]:(console.error("[Element Error]renderExpanded is required."),Q):[[Q]]}else if(Object.keys(G.value).length){X();const Z=kr(D,J.value);let Q=G.value[Z],he=null;Q&&(he={expanded:Q.expanded,level:Q.level,display:!0},Io(Q.lazy)&&(Io(Q.loaded)&&Q.loaded&&(he.noLazyChildren=!(Q.children&&Q.children.length)),he.loading=Q.loading));const ge=[R(D,P,he)];if(Q){let Ie=0;const be=(We,$e)=>{We&&We.length&&$e&&We.forEach(ve=>{const Pe={display:$e.display&&$e.expanded,level:$e.level+1,expanded:!1,noLazyChildren:!1,loading:!1},Be=kr(ve,J.value);if(Be==null)throw new Error("For nested data item, row-key is required.");if(Q={...G.value[Be]},Q&&(Pe.expanded=Q.expanded,Q.level=Q.level||Pe.level,Q.display=!!(Q.expanded&&Pe.display),Io(Q.lazy)&&(Io(Q.loaded)&&Q.loaded&&(Pe.noLazyChildren=!(Q.children&&Q.children.length)),Pe.loading=Q.loading)),Ie++,ge.push(R(ve,P+Ie,Pe)),Q){const ot=re.value[Be]||ve[_e.value];be(ot,Q)}})};Q.display=!0;const Ae=re.value[Z]||D[_e.value];be(Ae,Q)}return ge}else return R(D,P,void 0)},tooltipContent:f,tooltipTrigger:p}}const xke={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var Bke=Re({name:"ElTableBody",props:xke,setup(e){const t=pn(),n=It(ad),s=rt("table"),{wrappedRowRender:i,tooltipContent:r,tooltipTrigger:a}=Dke(e),{onColumnsChange:c,onScrollableChange:u}=DK(n),h=[];return tt(e.store.states.hoverRow,(f,p)=>{var _;const E=t==null?void 0:t.vnode.el,v=Array.from((E==null?void 0:E.children)||[]).filter(S=>S==null?void 0:S.classList.contains(`${s.e("row")}`));let b=f;const y=(_=v[b])==null?void 0:_.childNodes;if(y!=null&&y.length){let S=0;Array.from(y).reduce((I,R,w)=>{var k,D;return((k=y[w])==null?void 0:k.colSpan)>1&&(S=(D=y[w])==null?void 0:D.colSpan),R.nodeName!=="TD"&&S===0&&I.push(w),S>0&&S--,I},[]).forEach(I=>{var R;for(b=f;b>0;){const w=(R=v[b-1])==null?void 0:R.childNodes;if(w[I]&&w[I].nodeName==="TD"&&w[I].rowSpan>1){ec(w[I],"hover-cell"),h.push(w[I]);break}b--}})}else h.forEach(S=>Dr(S,"hover-cell")),h.length=0;!e.store.states.isComplex.value||!Dn||vp(()=>{const S=v[p],L=v[f];S&&!S.classList.contains("hover-fixed-row")&&Dr(S,"hover-row"),L&&ec(L,"hover-row")})}),Ch(()=>{var f;(f=Ya)==null||f()}),{ns:s,onColumnsChange:c,onScrollableChange:u,wrappedRowRender:i,tooltipContent:r,tooltipTrigger:a}},render(){const{wrappedRowRender:e,store:t}=this,n=t.states.data.value||[];return Gt("tbody",{tabIndex:-1},[n.reduce((s,i)=>s.concat(e(i,s.length)),[])])}});function Fke(){const e=It(ad),t=e==null?void 0:e.store,n=x(()=>t.states.fixedLeafColumnsLength.value),s=x(()=>t.states.rightFixedColumns.value.length),i=x(()=>t.states.columns.value.length),r=x(()=>t.states.fixedColumns.value.length),a=x(()=>t.states.rightFixedColumns.value.length);return{leftFixedLeafCount:n,rightFixedLeafCount:s,columnsCount:i,leftFixedCount:r,rightFixedCount:a,columns:t.states.columns}}function Uke(e){const{columns:t}=Fke(),n=rt("table");return{getCellClasses:(r,a)=>{const c=r[a],u=[n.e("cell"),c.id,c.align,c.labelClassName,...Ax(n.b(),a,c.fixed,e.store)];return c.className&&u.push(c.className),c.children||u.push(n.is("leaf")),u},getCellStyles:(r,a)=>{const c=Lx(a,r.fixed,e.store);return jE(c,"left"),jE(c,"right"),c},columns:t}}var Hke=Re({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const{getCellClasses:t,getCellStyles:n,columns:s}=Uke(e);return{ns:rt("table"),getCellClasses:t,getCellStyles:n,columns:s}},render(){const{columns:e,getCellStyles:t,getCellClasses:n,summaryMethod:s,sumText:i}=this,r=this.store.states.data.value;let a=[];return s?a=s({columns:e,data:r}):e.forEach((c,u)=>{if(u===0){a[u]=i;return}const h=r.map(E=>Number(E[c.property])),f=[];let p=!0;h.forEach(E=>{if(!Number.isNaN(+E)){p=!1;const v=`${E}`.split(".")[1];f.push(v?v.length:0)}});const _=Math.max.apply(null,f);p?a[u]="":a[u]=h.reduce((E,v)=>{const b=Number(v);return Number.isNaN(+b)?E:Number.parseFloat((E+v).toFixed(Math.min(_,20)))},0)}),Gt(Gt("tfoot",[Gt("tr",{},[...e.map((c,u)=>Gt("td",{key:u,colspan:c.colSpan,rowspan:c.rowSpan,class:n(e,u),style:t(c,u)},[Gt("div",{class:["cell",c.labelClassName]},[a[u]])]))])]))}});function Vke(e){return{setCurrentRow:p=>{e.commit("setCurrentRow",p)},getSelectionRows:()=>e.getSelectionRows(),toggleRowSelection:(p,_,E=!0)=>{e.toggleRowSelection(p,_,!1,E),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:p=>{e.clearFilter(p)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(p,_)=>{e.toggleRowExpansionAdapter(p,_)},clearSort:()=>{e.clearSort()},sort:(p,_)=>{e.commit("sort",{prop:p,order:_})},updateKeyChildren:(p,_)=>{e.updateKeyChildren(p,_)}}}function Gke(e,t,n,s){const i=K(!1),r=K(null),a=K(!1),c=Z=>{a.value=Z},u=K({width:null,height:null,headerHeight:null}),h=K(!1),f={display:"inline-block",verticalAlign:"middle"},p=K(),_=K(0),E=K(0),v=K(0),b=K(0),y=K(0);Zs(()=>{t.setHeight(e.height)}),Zs(()=>{t.setMaxHeight(e.maxHeight)}),tt(()=>[e.currentRowKey,n.states.rowKey],([Z,Q])=>{!g(Q)||!g(Z)||n.setCurrentRowKey(`${Z}`)},{immediate:!0}),tt(()=>e.data,Z=>{s.store.commit("setData",Z)},{immediate:!0,deep:!0}),Zs(()=>{e.expandRowKeys&&n.setExpandRowKeysAdapter(e.expandRowKeys)});const S=()=>{s.store.commit("setHoverRow",null),s.hoverState&&(s.hoverState=null)},L=(Z,Q)=>{const{pixelX:he,pixelY:ge}=Q;Math.abs(he)>=Math.abs(ge)&&(s.refs.bodyWrapper.scrollLeft+=Q.pixelX/5)},I=x(()=>e.height||e.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),R=x(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),w=()=>{I.value&&t.updateElsHeight(),t.updateColumnsWidth(),requestAnimationFrame(B)};rn(async()=>{await Vt(),n.updateColumns(),F(),requestAnimationFrame(w);const Z=s.vnode.el,Q=s.refs.headerWrapper;e.flexible&&Z&&Z.parentElement&&(Z.parentElement.style.minWidth="0"),u.value={width:p.value=Z.offsetWidth,height:Z.offsetHeight,headerHeight:e.showHeader&&Q?Q.offsetHeight:null},n.states.columns.value.forEach(he=>{he.filteredValue&&he.filteredValue.length&&s.store.commit("filterChange",{column:he,values:he.filteredValue,silent:!0})}),s.$ready=!0});const k=(Z,Q)=>{if(!Z)return;const he=Array.from(Z.classList).filter(ge=>!ge.startsWith("is-scrolling-"));he.push(t.scrollX.value?Q:"is-scrolling-none"),Z.className=he.join(" ")},D=Z=>{const{tableWrapper:Q}=s.refs;k(Q,Z)},P=Z=>{const{tableWrapper:Q}=s.refs;return!!(Q&&Q.classList.contains(Z))},B=function(){if(!s.refs.scrollBarRef)return;if(!t.scrollX.value){const We="is-scrolling-none";P(We)||D(We);return}const Z=s.refs.scrollBarRef.wrapRef;if(!Z)return;const{scrollLeft:Q,offsetWidth:he,scrollWidth:ge}=Z,{headerWrapper:Ie,footerWrapper:be}=s.refs;Ie&&(Ie.scrollLeft=Q),be&&(be.scrollLeft=Q);const Ae=ge-he-1;Q>=Ae?D("is-scrolling-right"):D(Q===0?"is-scrolling-left":"is-scrolling-middle")},F=()=>{s.refs.scrollBarRef&&(s.refs.scrollBarRef.wrapRef&&fo(s.refs.scrollBarRef.wrapRef,"scroll",B,{passive:!0}),e.fit?Xo(s.vnode.el,X):fo(window,"resize",X),Xo(s.refs.bodyWrapper,()=>{var Z,Q;X(),(Q=(Z=s.refs)==null?void 0:Z.scrollBarRef)==null||Q.update()}))},X=()=>{var Z,Q,he,ge;const Ie=s.vnode.el;if(!s.$ready||!Ie)return;let be=!1;const{width:Ae,height:We,headerHeight:$e}=u.value,ve=p.value=Ie.offsetWidth;Ae!==ve&&(be=!0);const Pe=Ie.offsetHeight;(e.height||I.value)&&We!==Pe&&(be=!0);const Be=e.tableLayout==="fixed"?s.refs.headerWrapper:(Z=s.refs.tableHeaderRef)==null?void 0:Z.$el;e.showHeader&&(Be==null?void 0:Be.offsetHeight)!==$e&&(be=!0),_.value=((Q=s.refs.tableWrapper)==null?void 0:Q.scrollHeight)||0,v.value=(Be==null?void 0:Be.scrollHeight)||0,b.value=((he=s.refs.footerWrapper)==null?void 0:he.offsetHeight)||0,y.value=((ge=s.refs.appendWrapper)==null?void 0:ge.offsetHeight)||0,E.value=_.value-v.value-b.value-y.value,be&&(u.value={width:ve,height:Pe,headerHeight:e.showHeader&&(Be==null?void 0:Be.offsetHeight)||0},w())},G=Fs(),re=x(()=>{const{bodyWidth:Z,scrollY:Q,gutterWidth:he}=t;return Z.value?`${Z.value-(Q.value?he:0)}px`:""}),_e=x(()=>e.maxHeight?"fixed":e.tableLayout),J=x(()=>{if(e.data&&e.data.length)return null;let Z="100%";e.height&&E.value&&(Z=`${E.value}px`);const Q=p.value;return{width:Q?`${Q}px`:"",height:Z}}),Y=x(()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${v.value+b.value}px)`}:{maxHeight:`${e.maxHeight-v.value-b.value}px`}:{});return{isHidden:i,renderExpanded:r,setDragVisible:c,isGroup:h,handleMouseLeave:S,handleHeaderFooterMousewheel:L,tableSize:G,emptyBlockStyle:J,handleFixedMousewheel:(Z,Q)=>{const he=s.refs.bodyWrapper;if(Math.abs(Q.spinY)>0){const ge=he.scrollTop;Q.pixelY<0&&ge!==0&&Z.preventDefault(),Q.pixelY>0&&he.scrollHeight-he.clientHeight>ge&&Z.preventDefault(),he.scrollTop+=Math.ceil(Q.pixelY/5)}else he.scrollLeft+=Math.ceil(Q.pixelX/5)},resizeProxyVisible:a,bodyWidth:re,resizeState:u,doLayout:w,tableBodyStyles:R,tableLayout:_e,scrollbarViewStyle:f,scrollbarStyle:Y}}function Wke(e){const t=K(),n=()=>{const i=e.vnode.el.querySelector(".hidden-columns"),r={childList:!0,subtree:!0},a=e.store.states.updateOrderFns;t.value=new MutationObserver(()=>{a.forEach(c=>c())}),t.value.observe(i,r)};rn(()=>{n()}),Ch(()=>{var s;(s=t.value)==null||s.disconnect()})}var Xke={data:{type:Array,default:()=>[]},size:Ys,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children",checkStrictly:!1})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:[Boolean,Object],appendFilterPanelTo:String,scrollbarTabindex:{type:[Number,String],default:void 0}};function FK(e){const t=e.tableLayout==="auto";let n=e.columns||[];t&&n.every(i=>i.width===void 0)&&(n=[]);const s=i=>{const r={key:`${e.tableLayout}_${i.id}`,style:{},name:void 0};return t?r.style={width:`${i.width}px`}:r.name=i.id,r};return Gt("colgroup",{},n.map(i=>Gt("col",s(i))))}FK.props=["columns","tableLayout"];const zke=()=>{const e=K(),t=(r,a)=>{const c=e.value;c&&c.scrollTo(r,a)},n=(r,a)=>{const c=e.value;c&&Wt(a)&&["Top","Left"].includes(r)&&c[`setScroll${r}`](a)};return{scrollBarRef:e,scrollTo:t,setScrollTop:r=>n("Top",r),setScrollLeft:r=>n("Left",r)}};var DG=!1,im,b1,O1,IC,RC,UK,CC,S1,y1,$1,HK,I1,R1,VK,GK;function Cl(){if(!DG){DG=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),n=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(I1=/\b(iPhone|iP[ao]d)/.exec(e),R1=/\b(iP[ao]d)/.exec(e),$1=/Android/i.exec(e),VK=/FBAN\/\w+;/i.exec(e),GK=/Mobile/i.exec(e),HK=!!/Win64/.exec(e),t){im=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,im&&document&&document.documentMode&&(im=document.documentMode);var s=/(?:Trident\/(\d+.\d+))/.exec(e);UK=s?parseFloat(s[1])+4:im,b1=t[2]?parseFloat(t[2]):NaN,O1=t[3]?parseFloat(t[3]):NaN,IC=t[4]?parseFloat(t[4]):NaN,IC?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),RC=t&&t[1]?parseFloat(t[1]):NaN):RC=NaN}else im=b1=O1=RC=IC=NaN;if(n){if(n[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);CC=i?parseFloat(i[1].replace("_",".")):!0}else CC=!1;S1=!!n[2],y1=!!n[3]}else CC=S1=y1=!1}}var C1={ie:function(){return Cl()||im},ieCompatibilityMode:function(){return Cl()||UK>im},ie64:function(){return C1.ie()&&HK},firefox:function(){return Cl()||b1},opera:function(){return Cl()||O1},webkit:function(){return Cl()||IC},safari:function(){return C1.webkit()},chrome:function(){return Cl()||RC},windows:function(){return Cl()||S1},osx:function(){return Cl()||CC},linux:function(){return Cl()||y1},iphone:function(){return Cl()||I1},mobile:function(){return Cl()||I1||R1||$1||GK},nativeApp:function(){return Cl()||VK},android:function(){return Cl()||$1},ipad:function(){return Cl()||R1}},Yke=C1,yR=!!(typeof window<"u"&&window.document&&window.document.createElement),Kke={canUseDOM:yR,canUseWorkers:typeof Worker<"u",canUseEventListeners:yR&&!!(window.addEventListener||window.attachEvent),canUseViewport:yR&&!!window.screen,isInWorker:!yR},WK=Kke,XK;WK.canUseDOM&&(XK=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function jke(e,t){if(!WK.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,s=n in document;if(!s){var i=document.createElement("div");i.setAttribute(n,"return;"),s=typeof i[n]=="function"}return!s&&XK&&e==="wheel"&&(s=document.implementation.hasFeature("Events.wheel","3.0")),s}var Qke=jke,xG=10,BG=40,FG=800;function zK(e){var t=0,n=0,s=0,i=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),s=t*xG,i=n*xG,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(s=e.deltaX),(s||i)&&e.deltaMode&&(e.deltaMode==1?(s*=BG,i*=BG):(s*=FG,i*=FG)),s&&!t&&(t=s<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:t,spinY:n,pixelX:s,pixelY:i}}zK.getEventType=function(){return Yke.firefox()?"DOMMouseScroll":Qke("wheel")?"wheel":"mousewheel"};var qke=zK;/**
  1906. * Checks if an event is supported in the current execution environment.
  1907. *
  1908. * NOTE: This will not work correctly for non-generic events such as `change`,
  1909. * `reset`, `load`, `error`, and `select`.
  1910. *
  1911. * Borrows from Modernizr.
  1912. *
  1913. * @param {string} eventNameSuffix Event name, e.g. "click".
  1914. * @param {?boolean} capture Check if the capture phase is supported.
  1915. * @return {boolean} True if the event is supported.
  1916. * @internal
  1917. * @license Modernizr 3.0.0pre (Custom Build) | MIT
  1918. */const Jke=function(e,t){if(e&&e.addEventListener){const n=function(s){const i=qke(s);t&&Reflect.apply(t,this,[s,i])};e.addEventListener("wheel",n,{passive:!0})}},Zke={beforeMount(e,t){Jke(e,t.value)}};let eNe=1;const tNe=Re({name:"ElTable",directives:{Mousewheel:Zke},components:{TableHeader:Ake,TableBody:Bke,TableFooter:Hke,ElScrollbar:ld,hColgroup:FK},props:Xke,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change","scroll"],setup(e){const{t}=xn(),n=rt("table"),s=pn();An(ad,s);const i=vke(s,e);s.store=i;const r=new Oke({store:s.store,table:s,fit:e.fit,showHeader:e.showHeader});s.layout=r;const a=x(()=>(i.states.data.value||[]).length===0),{setCurrentRow:c,getSelectionRows:u,toggleRowSelection:h,clearSelection:f,clearFilter:p,toggleAllSelection:_,toggleRowExpansion:E,clearSort:v,sort:b,updateKeyChildren:y}=Vke(i),{isHidden:S,renderExpanded:L,setDragVisible:I,isGroup:R,handleMouseLeave:w,handleHeaderFooterMousewheel:k,tableSize:D,emptyBlockStyle:P,handleFixedMousewheel:B,resizeProxyVisible:F,bodyWidth:X,resizeState:G,doLayout:re,tableBodyStyles:_e,tableLayout:J,scrollbarViewStyle:Y,scrollbarStyle:ae}=Gke(e,r,i,s),{scrollBarRef:Z,scrollTo:Q,setScrollLeft:he,setScrollTop:ge}=zke(),Ie=Vl(re,50),be=`${n.namespace.value}-table_${eNe++}`;s.tableId=be,s.state={isGroup:R,resizeState:G,doLayout:re,debouncedUpdateLayout:Ie};const Ae=x(()=>{var ve;return(ve=e.sumText)!=null?ve:t("el.table.sumText")}),We=x(()=>{var ve;return(ve=e.emptyText)!=null?ve:t("el.table.emptyText")}),$e=x(()=>BK(i.states.originColumns.value)[0]);return Wke(s),vo(()=>{Ie.cancel()}),{ns:n,layout:r,store:i,columns:$e,handleHeaderFooterMousewheel:k,handleMouseLeave:w,tableId:be,tableSize:D,isHidden:S,isEmpty:a,renderExpanded:L,resizeProxyVisible:F,resizeState:G,isGroup:R,bodyWidth:X,tableBodyStyles:_e,emptyBlockStyle:P,debouncedUpdateLayout:Ie,handleFixedMousewheel:B,setCurrentRow:c,getSelectionRows:u,toggleRowSelection:h,clearSelection:f,clearFilter:p,toggleAllSelection:_,toggleRowExpansion:E,clearSort:v,doLayout:re,sort:b,updateKeyChildren:y,t,setDragVisible:I,context:s,computedSumText:Ae,computedEmptyText:We,tableLayout:J,scrollbarViewStyle:Y,scrollbarStyle:ae,scrollBarRef:Z,scrollTo:Q,setScrollLeft:he,setScrollTop:ge}}});function nNe(e,t,n,s,i,r){const a=Ot("hColgroup"),c=Ot("table-header"),u=Ot("table-body"),h=Ot("table-footer"),f=Ot("el-scrollbar"),p=eA("mousewheel");return H(),le("div",{ref:"tableWrapper",class:z([{[e.ns.m("fit")]:e.fit,[e.ns.m("striped")]:e.stripe,[e.ns.m("border")]:e.border||e.isGroup,[e.ns.m("hidden")]:e.isHidden,[e.ns.m("group")]:e.isGroup,[e.ns.m("fluid-height")]:e.maxHeight,[e.ns.m("scrollable-x")]:e.layout.scrollX.value,[e.ns.m("scrollable-y")]:e.layout.scrollY.value,[e.ns.m("enable-row-hover")]:!e.store.states.isComplex.value,[e.ns.m("enable-row-transition")]:(e.store.states.data.value||[]).length!==0&&(e.store.states.data.value||[]).length<100,"has-footer":e.showSummary},e.ns.m(e.tableSize),e.className,e.ns.b(),e.ns.m(`layout-${e.tableLayout}`)]),style:Bt(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:e.handleMouseLeave},[te("div",{class:z(e.ns.e("inner-wrapper"))},[te("div",{ref:"hiddenColumns",class:"hidden-columns"},[He(e.$slots,"default")],512),e.showHeader&&e.tableLayout==="fixed"?an((H(),le("div",{key:0,ref:"headerWrapper",class:z(e.ns.e("header-wrapper"))},[te("table",{ref:"tableHeader",class:z(e.ns.e("header")),style:Bt(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[oe(a,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),oe(c,{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,"append-filter-panel-to":e.appendFilterPanelTo,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","append-filter-panel-to","onSetDragVisible"])],6)],2)),[[p,e.handleHeaderFooterMousewheel]]):Ge("v-if",!0),te("div",{ref:"bodyWrapper",class:z(e.ns.e("body-wrapper"))},[oe(f,{ref:"scrollBarRef","view-style":e.scrollbarViewStyle,"wrap-style":e.scrollbarStyle,always:e.scrollbarAlwaysOn,tabindex:e.scrollbarTabindex,onScroll:_=>e.$emit("scroll",_)},{default:de(()=>[te("table",{ref:"tableBody",class:z(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:Bt({width:e.bodyWidth,tableLayout:e.tableLayout})},[oe(a,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&e.tableLayout==="auto"?(H(),Ye(c,{key:0,ref:"tableHeaderRef",class:z(e.ns.e("body-header")),border:e.border,"default-sort":e.defaultSort,store:e.store,"append-filter-panel-to":e.appendFilterPanelTo,onSetDragVisible:e.setDragVisible},null,8,["class","border","default-sort","store","append-filter-panel-to","onSetDragVisible"])):Ge("v-if",!0),oe(u,{context:e.context,highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":e.tooltipEffect,"tooltip-options":e.tooltipOptions,"row-style":e.rowStyle,store:e.store,stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),e.showSummary&&e.tableLayout==="auto"?(H(),Ye(h,{key:1,class:z(e.ns.e("body-footer")),border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):Ge("v-if",!0)],6),e.isEmpty?(H(),le("div",{key:0,ref:"emptyBlock",style:Bt(e.emptyBlockStyle),class:z(e.ns.e("empty-block"))},[te("span",{class:z(e.ns.e("empty-text"))},[He(e.$slots,"empty",{},()=>[Xt(Ke(e.computedEmptyText),1)])],2)],6)):Ge("v-if",!0),e.$slots.append?(H(),le("div",{key:1,ref:"appendWrapper",class:z(e.ns.e("append-wrapper"))},[He(e.$slots,"append")],2)):Ge("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex","onScroll"])],2),e.showSummary&&e.tableLayout==="fixed"?an((H(),le("div",{key:1,ref:"footerWrapper",class:z(e.ns.e("footer-wrapper"))},[te("table",{class:z(e.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:Bt(e.tableBodyStyles)},[oe(a,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),oe(h,{border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[Yn,!e.isEmpty],[p,e.handleHeaderFooterMousewheel]]):Ge("v-if",!0),e.border||e.isGroup?(H(),le("div",{key:2,class:z(e.ns.e("border-left-patch"))},null,2)):Ge("v-if",!0)],2),an(te("div",{ref:"resizeProxy",class:z(e.ns.e("column-resize-proxy"))},null,2),[[Yn,e.resizeProxyVisible]])],46,["data-prefix","onMouseleave"])}var oNe=pt(tNe,[["render",nNe],["__file","table.vue"]]);const sNe={selection:"table-column--selection",expand:"table__expand-column"},iNe={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},rNe=e=>sNe[e]||"",lNe={selection:{renderHeader({store:e,column:t}){function n(){return e.states.data.value&&e.states.data.value.length===0}return Gt(uc,{disabled:n(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection,modelValue:e.states.isAllSelected.value,ariaLabel:t.label})},renderCell({row:e,column:t,store:n,$index:s}){return Gt(uc,{disabled:t.selectable?!t.selectable.call(null,e,s):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",e)},onClick:i=>i.stopPropagation(),modelValue:n.isSelected(e),ariaLabel:t.label})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let n=t+1;const s=e.index;return Wt(s)?n=t+s:Ut(s)&&(n=s(t)),Gt("div",{},[n])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({row:e,store:t,expanded:n}){const{ns:s}=t,i=[s.e("expand-icon")];return n&&i.push(s.em("expand-icon","expanded")),Gt("div",{class:i,onClick:function(a){a.stopPropagation(),t.toggleRowExpansion(e)}},{default:()=>[Gt(Nt,null,{default:()=>[Gt(rl)]})]})},sortable:!1,resizable:!1}};function aNe({row:e,column:t,$index:n}){var s;const i=t.property,r=i&&cC(e,i).value;return t&&t.formatter?t.formatter(e,t,r,n):((s=r==null?void 0:r.toString)==null?void 0:s.call(r))||""}function cNe({row:e,treeNode:t,store:n},s=!1){const{ns:i}=n;if(!t)return s?[Gt("span",{class:i.e("placeholder")})]:null;const r=[],a=function(c){c.stopPropagation(),!t.loading&&n.loadOrToggle(e)};if(t.indent&&r.push(Gt("span",{class:i.e("indent"),style:{"padding-left":`${t.indent}px`}})),Io(t.expanded)&&!t.noLazyChildren){const c=[i.e("expand-icon"),t.expanded?i.em("expand-icon","expanded"):""];let u=rl;t.loading&&(u=Ju),r.push(Gt("div",{class:c,onClick:a},{default:()=>[Gt(Nt,{class:{[i.is("loading")]:t.loading}},{default:()=>[Gt(u)]})]}))}else r.push(Gt("span",{class:i.e("placeholder")}));return r}function UG(e,t){return e.reduce((n,s)=>(n[s]=s,n),t)}function uNe(e,t){const n=pn();return{registerComplexWatchers:()=>{const r=["fixed"],a={realWidth:"width",realMinWidth:"minWidth"},c=UG(r,a);Object.keys(c).forEach(u=>{const h=a[u];zn(t,h)&&tt(()=>t[h],f=>{let p=f;h==="width"&&u==="realWidth"&&(p=Mx(f)),h==="minWidth"&&u==="realMinWidth"&&(p=LK(f)),n.columnConfig.value[h]=p,n.columnConfig.value[u]=p;const _=h==="fixed";e.value.store.scheduleLayout(_)})})},registerNormalWatchers:()=>{const r=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip"],a={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},c=UG(r,a);Object.keys(c).forEach(u=>{const h=a[u];zn(t,h)&&tt(()=>t[h],f=>{n.columnConfig.value[u]=f})})}}}function dNe(e,t,n){const s=pn(),i=K(""),r=K(!1),a=K(),c=K(),u=rt("table");Zs(()=>{a.value=e.align?`is-${e.align}`:null,a.value}),Zs(()=>{c.value=e.headerAlign?`is-${e.headerAlign}`:a.value,c.value});const h=x(()=>{let R=s.vnode.vParent||s.parent;for(;R&&!R.tableId&&!R.columnId;)R=R.vnode.vParent||R.parent;return R}),f=x(()=>{const{store:R}=s.parent;if(!R)return!1;const{treeData:w}=R.states,k=w.value;return k&&Object.keys(k).length>0}),p=K(Mx(e.width)),_=K(LK(e.minWidth)),E=R=>(p.value&&(R.width=p.value),_.value&&(R.minWidth=_.value),!p.value&&_.value&&(R.width=void 0),R.minWidth||(R.minWidth=80),R.realWidth=Number(R.width===void 0?R.minWidth:R.width),R),v=R=>{const w=R.type,k=lNe[w]||{};Object.keys(k).forEach(P=>{const B=k[P];P!=="className"&&B!==void 0&&(R[P]=B)});const D=rNe(w);if(D){const P=`${g(u.namespace)}-${D}`;R.className=R.className?`${R.className} ${P}`:P}return R},b=R=>{at(R)?R.forEach(k=>w(k)):w(R);function w(k){var D;((D=k==null?void 0:k.type)==null?void 0:D.name)==="ElTableColumn"&&(k.vParent=s)}};return{columnId:i,realAlign:a,isSubColumn:r,realHeaderAlign:c,columnOrTableParent:h,setColumnWidth:E,setColumnForcedProps:v,setColumnRenders:R=>{e.renderHeader||R.type!=="selection"&&(R.renderHeader=k=>(s.columnConfig.value.label,He(t,"header",k,()=>[R.label]))),t["filter-icon"]&&(R.renderFilterIcon=k=>He(t,"filter-icon",k));let w=R.renderCell;return R.type==="expand"?(R.renderCell=k=>Gt("div",{class:"cell"},[w(k)]),n.value.renderExpanded=k=>t.default?t.default(k):t.default):(w=w||aNe,R.renderCell=k=>{let D=null;if(t.default){const re=t.default(k);D=re.some(_e=>_e.type!==Ii)?re:w(k)}else D=w(k);const{columns:P}=n.value.store.states,B=P.value.findIndex(re=>re.type==="default"),F=f.value&&k.cellIndex===B,X=cNe(k,F),G={class:"cell",style:{}};return R.showOverflowTooltip&&(G.class=`${G.class} ${g(u.namespace)}-tooltip`,G.style={width:`${(k.column.realWidth||Number(k.column.width))-1}px`}),b(D),Gt("div",G,[X,D])}),R},getPropsData:(...R)=>R.reduce((w,k)=>(at(k)&&k.forEach(D=>{w[D]=e[D]}),w),{}),getColumnElIndex:(R,w)=>Array.prototype.indexOf.call(R,w),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",s.columnConfig.value)}}}var hNe={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every(t=>["ascending","descending",null].includes(t))}};let fNe=1;var YK=Re({name:"ElTableColumn",components:{ElCheckbox:uc},props:hNe,setup(e,{slots:t}){const n=pn(),s=K({}),i=x(()=>{let I=n.parent;for(;I&&!I.tableId;)I=I.parent;return I}),{registerNormalWatchers:r,registerComplexWatchers:a}=uNe(i,e),{columnId:c,isSubColumn:u,realHeaderAlign:h,columnOrTableParent:f,setColumnWidth:p,setColumnForcedProps:_,setColumnRenders:E,getPropsData:v,getColumnElIndex:b,realAlign:y,updateColumnOrder:S}=dNe(e,t,i),L=f.value;c.value=`${L.tableId||L.columnId}_column_${fNe++}`,ZM(()=>{u.value=i.value!==L;const I=e.type||"default",R=e.sortable===""?!0:e.sortable,w=ho(e.showOverflowTooltip)?L.props.showOverflowTooltip:e.showOverflowTooltip,k={...iNe[I],id:c.value,type:I,property:e.prop||e.property,align:y,headerAlign:h,showOverflowTooltip:w,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:R,index:e.index,rawColumnKey:n.vnode.key};let X=v(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);X=cke(k,X),X=dke(E,p,_)(X),s.value=X,r(),a()}),rn(()=>{var I;const R=f.value,w=u.value?R.vnode.el.children:(I=R.refs.hiddenColumns)==null?void 0:I.children,k=()=>b(w||[],n.vnode.el);s.value.getColumnIndex=k,k()>-1&&i.value.store.commit("insertColumn",s.value,u.value?R.columnConfig.value:null,S)}),vo(()=>{const I=s.value.getColumnIndex;(I?I():-1)>-1&&i.value.store.commit("removeColumn",s.value,u.value?L.columnConfig.value:null,S)}),n.columnId=c.value,n.columnConfig=s},render(){var e,t,n;try{const s=(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1}),i=[];if(at(s))for(const a of s)((n=a.type)==null?void 0:n.name)==="ElTableColumn"||a.shapeFlag&2?i.push(a):a.type===Lt&&at(a.children)&&a.children.forEach(c=>{(c==null?void 0:c.patchFlag)!==1024&&!Dt(c==null?void 0:c.children)&&i.push(c)});return Gt("div",i)}catch{return Gt("div",[])}}});const pNe=nn(oNe,{TableColumn:YK}),gNe=is(YK);var jy=(e=>(e.ASC="asc",e.DESC="desc",e))(jy||{}),Qy=(e=>(e.CENTER="center",e.RIGHT="right",e))(Qy||{}),KK=(e=>(e.LEFT="left",e.RIGHT="right",e))(KK||{});const M1={asc:"desc",desc:"asc"},qy=Symbol("placeholder"),mNe=(e,t,n)=>{var s;const i={flexGrow:0,flexShrink:0,...n?{}:{flexGrow:e.flexGrow||0,flexShrink:e.flexShrink||1}};n||(i.flexShrink=1);const r={...(s=e.style)!=null?s:{},...i,flexBasis:"auto",width:e.width};return t||(e.maxWidth&&(r.maxWidth=e.maxWidth),e.minWidth&&(r.minWidth=e.minWidth)),r};function _Ne(e,t,n){const s=x(()=>g(t).map((y,S)=>{var L,I;return{...y,key:(I=(L=y.key)!=null?L:y.dataKey)!=null?I:S}})),i=x(()=>g(s).filter(y=>!y.hidden)),r=x(()=>g(i).filter(y=>y.fixed==="left"||y.fixed===!0)),a=x(()=>g(i).filter(y=>y.fixed==="right")),c=x(()=>g(i).filter(y=>!y.fixed)),u=x(()=>{const y=[];return g(r).forEach(S=>{y.push({...S,placeholderSign:qy})}),g(c).forEach(S=>{y.push(S)}),g(a).forEach(S=>{y.push({...S,placeholderSign:qy})}),y}),h=x(()=>g(r).length||g(a).length),f=x(()=>g(s).reduce((y,S)=>(y[S.key]=mNe(S,g(n),e.fixed),y),{})),p=x(()=>g(i).reduce((y,S)=>y+S.width,0)),_=y=>g(s).find(S=>S.key===y),E=y=>g(f)[y],v=(y,S)=>{y.width=S};function b(y){var S;const{key:L}=y.currentTarget.dataset;if(!L)return;const{sortState:I,sortBy:R}=e;let w=jy.ASC;Tn(I)?w=M1[I[L]]:w=M1[R.order],(S=e.onColumnSort)==null||S.call(e,{column:_(L),key:L,order:w})}return{columns:s,columnsStyles:f,columnsTotalWidth:p,fixedColumnsOnLeft:r,fixedColumnsOnRight:a,hasFixedColumns:h,mainColumns:u,normalColumns:c,visibleColumns:i,getColumn:_,getColumnStyle:E,updateColumnWidth:v,onColumnSorted:b}}const TNe=(e,{mainTableRef:t,leftTableRef:n,rightTableRef:s,onMaybeEndReached:i})=>{const r=K({scrollLeft:0,scrollTop:0});function a(E){var v,b,y;const{scrollTop:S}=E;(v=t.value)==null||v.scrollTo(E),(b=n.value)==null||b.scrollToTop(S),(y=s.value)==null||y.scrollToTop(S)}function c(E){r.value=E,a(E)}function u(E){r.value.scrollTop=E,a(g(r))}function h(E){var v,b;r.value.scrollLeft=E,(b=(v=t.value)==null?void 0:v.scrollTo)==null||b.call(v,g(r))}function f(E){var v;c(E),(v=e.onScroll)==null||v.call(e,E)}function p({scrollTop:E}){const{scrollTop:v}=g(r);E!==v&&u(E)}function _(E,v="auto"){var b;(b=t.value)==null||b.scrollToRow(E,v)}return tt(()=>g(r).scrollTop,(E,v)=>{E>v&&i()}),{scrollPos:r,scrollTo:c,scrollToLeft:h,scrollToTop:u,scrollToRow:_,onScroll:f,onVerticalScroll:p}},ENe=(e,{mainTableRef:t,leftTableRef:n,rightTableRef:s,tableInstance:i,ns:r,isScrolling:a})=>{const c=pn(),{emit:u}=c,h=lo(!1),f=K(e.defaultExpandedRowKeys||[]),p=K(-1),_=lo(null),E=K({}),v=K({}),b=lo({}),y=lo({}),S=lo({}),L=x(()=>Wt(e.estimatedRowHeight));function I(F){var X;(X=e.onRowsRendered)==null||X.call(e,F),F.rowCacheEnd>g(p)&&(p.value=F.rowCacheEnd)}function R({hovered:F,rowKey:X}){if(a.value)return;i.vnode.el.querySelectorAll(`[rowkey="${String(X)}"]`).forEach(_e=>{F?_e.classList.add(r.is("hovered")):_e.classList.remove(r.is("hovered"))})}function w({expanded:F,rowData:X,rowIndex:G,rowKey:re}){var _e,J;const Y=[...g(f)],ae=Y.indexOf(re);F?ae===-1&&Y.push(re):ae>-1&&Y.splice(ae,1),f.value=Y,u("update:expandedRowKeys",Y),(_e=e.onRowExpand)==null||_e.call(e,{expanded:F,rowData:X,rowIndex:G,rowKey:re}),(J=e.onExpandedRowsChange)==null||J.call(e,Y)}const k=Vl(()=>{var F,X,G,re;h.value=!0,E.value={...g(E),...g(v)},D(g(_),!1),v.value={},_.value=null,(F=t.value)==null||F.forceUpdate(),(X=n.value)==null||X.forceUpdate(),(G=s.value)==null||G.forceUpdate(),(re=c.proxy)==null||re.$forceUpdate(),h.value=!1},0);function D(F,X=!1){g(L)&&[t,n,s].forEach(G=>{const re=g(G);re&&re.resetAfterRowIndex(F,X)})}function P(F,X,G){const re=g(_);(re===null||re>G)&&(_.value=G),v.value[F]=X}function B({rowKey:F,height:X,rowIndex:G},re){re?re===KK.RIGHT?S.value[F]=X:b.value[F]=X:y.value[F]=X;const _e=Math.max(...[b,S,y].map(J=>J.value[F]||0));g(E)[F]!==_e&&(P(F,_e,G),k())}return{expandedRowKeys:f,lastRenderedRowIndex:p,isDynamic:L,isResetting:h,rowHeights:E,resetAfterIndex:D,onRowExpanded:w,onRowHovered:R,onRowsRendered:I,onRowHeightChange:B}},vNe=(e,{expandedRowKeys:t,lastRenderedRowIndex:n,resetAfterIndex:s})=>{const i=K({}),r=x(()=>{const c={},{data:u,rowKey:h}=e,f=g(t);if(!f||!f.length)return u;const p=[],_=new Set;f.forEach(v=>_.add(v));let E=u.slice();for(E.forEach(v=>c[v[h]]=0);E.length>0;){const v=E.shift();p.push(v),_.has(v[h])&&at(v.children)&&v.children.length>0&&(E=[...v.children,...E],v.children.forEach(b=>c[b[h]]=c[v[h]]+1))}return i.value=c,p}),a=x(()=>{const{data:c,expandColumnKey:u}=e;return u?g(r):c});return tt(a,(c,u)=>{c!==u&&(n.value=-1,s(0,!0))}),{data:a,depthMap:i}},bNe=(e,t)=>e+t,MC=e=>at(e)?e.reduce(bNe,0):e,Um=(e,t,n={})=>Ut(e)?e(t):e??n,ip=e=>(["width","maxWidth","minWidth","height"].forEach(t=>{e[t]=bs(e[t])}),e),jK=e=>zo(e)?t=>Gt(e,t):e,ONe=(e,{columnsTotalWidth:t,rowsHeight:n,fixedColumnsOnLeft:s,fixedColumnsOnRight:i})=>{const r=x(()=>{const{fixed:L,width:I,vScrollbarSize:R}=e,w=I-R;return L?Math.max(Math.round(g(t)),w):w}),a=x(()=>g(r)+e.vScrollbarSize),c=x(()=>{const{height:L=0,maxHeight:I=0,footerHeight:R,hScrollbarSize:w}=e;if(I>0){const k=g(E),D=g(n),B=g(_)+k+D+w;return Math.min(B,I-R)}return L-R}),u=x(()=>{const{maxHeight:L}=e,I=g(c);if(Wt(L)&&L>0)return I;const R=g(n)+g(_)+g(E);return Math.min(I,R)}),h=L=>L.width,f=x(()=>MC(g(s).map(h))),p=x(()=>MC(g(i).map(h))),_=x(()=>MC(e.headerHeight)),E=x(()=>{var L;return(((L=e.fixedData)==null?void 0:L.length)||0)*e.rowHeight}),v=x(()=>g(c)-g(_)-g(E)),b=x(()=>{const{style:L={},height:I,width:R}=e;return ip({...L,height:I,width:R})}),y=x(()=>ip({height:e.footerHeight})),S=x(()=>({top:bs(g(_)),bottom:bs(e.footerHeight),width:bs(e.width)}));return{bodyWidth:r,fixedTableHeight:u,mainTableHeight:c,leftTableWidth:f,rightTableWidth:p,headerWidth:a,windowHeight:v,footerHeight:y,emptyStyle:S,rootStyle:b,headerHeight:_}};function SNe(e){const t=K(),n=K(),s=K(),{columns:i,columnsStyles:r,columnsTotalWidth:a,fixedColumnsOnLeft:c,fixedColumnsOnRight:u,hasFixedColumns:h,mainColumns:f,onColumnSorted:p}=_Ne(e,oo(e,"columns"),oo(e,"fixed")),{scrollTo:_,scrollToLeft:E,scrollToTop:v,scrollToRow:b,onScroll:y,onVerticalScroll:S,scrollPos:L}=TNe(e,{mainTableRef:t,leftTableRef:n,rightTableRef:s,onMaybeEndReached:pe}),I=rt("table-v2"),R=pn(),w=lo(!1),{expandedRowKeys:k,lastRenderedRowIndex:D,isDynamic:P,isResetting:B,rowHeights:F,resetAfterIndex:X,onRowExpanded:G,onRowHeightChange:re,onRowHovered:_e,onRowsRendered:J}=ENe(e,{mainTableRef:t,leftTableRef:n,rightTableRef:s,tableInstance:R,ns:I,isScrolling:w}),{data:Y,depthMap:ae}=vNe(e,{expandedRowKeys:k,lastRenderedRowIndex:D,resetAfterIndex:X}),Z=x(()=>{const{estimatedRowHeight:Oe,rowHeight:ze}=e,Ze=g(Y);return Wt(Oe)?Object.values(g(F)).reduce((De,me)=>De+me,0):Ze.length*ze}),{bodyWidth:Q,fixedTableHeight:he,mainTableHeight:ge,leftTableWidth:Ie,rightTableWidth:be,headerWidth:Ae,windowHeight:We,footerHeight:$e,emptyStyle:ve,rootStyle:Pe,headerHeight:Be}=ONe(e,{columnsTotalWidth:a,fixedColumnsOnLeft:c,fixedColumnsOnRight:u,rowsHeight:Z}),ot=K(),Xe=x(()=>{const Oe=g(Y).length===0;return at(e.fixedData)?e.fixedData.length===0&&Oe:Oe});function ee(Oe){const{estimatedRowHeight:ze,rowHeight:Ze,rowKey:De}=e;return ze?g(F)[g(Y)[Oe][De]]||ze:Ze}function pe(){const{onEndReached:Oe}=e;if(!Oe)return;const{scrollTop:ze}=g(L),Ze=g(Z),De=g(We),me=Ze-(ze+De)+e.hScrollbarSize;g(D)>=0&&Ze===ze+g(ge)-g(Be)&&Oe(me)}return tt(()=>e.expandedRowKeys,Oe=>k.value=Oe,{deep:!0}),{columns:i,containerRef:ot,mainTableRef:t,leftTableRef:n,rightTableRef:s,isDynamic:P,isResetting:B,isScrolling:w,hasFixedColumns:h,columnsStyles:r,columnsTotalWidth:a,data:Y,expandedRowKeys:k,depthMap:ae,fixedColumnsOnLeft:c,fixedColumnsOnRight:u,mainColumns:f,bodyWidth:Q,emptyStyle:ve,rootStyle:Pe,headerWidth:Ae,footerHeight:$e,mainTableHeight:ge,fixedTableHeight:he,leftTableWidth:Ie,rightTableWidth:be,showEmpty:Xe,getRowHeight:ee,onColumnSorted:p,onRowHovered:_e,onRowExpanded:G,onRowsRendered:J,onRowHeightChange:re,scrollTo:_,scrollToLeft:E,scrollToTop:v,scrollToRow:b,onScroll:y,onVerticalScroll:S}}const wx=Symbol("tableV2"),QK=String,A$={type:xe(Array),required:!0},kx={type:xe(Array)},qK={...kx,required:!0},yNe=String,HG={type:xe(Array),default:()=>os([])},rm={type:Number,required:!0},JK={type:xe([String,Number,Symbol]),default:"id"},VG={type:xe(Object)},gm=ht({class:String,columns:A$,columnsStyles:{type:xe(Object),required:!0},depth:Number,expandColumnKey:yNe,estimatedRowHeight:{...ym.estimatedRowHeight,default:void 0},isScrolling:Boolean,onRowExpand:{type:xe(Function)},onRowHover:{type:xe(Function)},onRowHeightChange:{type:xe(Function)},rowData:{type:xe(Object),required:!0},rowEventHandlers:{type:xe(Object)},rowIndex:{type:Number,required:!0},rowKey:JK,style:{type:xe(Object)}}),Yw={type:Number,required:!0},Nx=ht({class:String,columns:A$,fixedHeaderData:{type:xe(Array)},headerData:{type:xe(Array),required:!0},headerHeight:{type:xe([Number,Array]),default:50},rowWidth:Yw,rowHeight:{type:Number,default:50},height:Yw,width:Yw}),AC=ht({columns:A$,data:qK,fixedData:kx,estimatedRowHeight:gm.estimatedRowHeight,width:rm,height:rm,headerWidth:rm,headerHeight:Nx.headerHeight,bodyWidth:rm,rowHeight:rm,cache:TK.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:ym.scrollbarAlwaysOn,scrollbarStartGap:ym.scrollbarStartGap,scrollbarEndGap:ym.scrollbarEndGap,class:QK,style:VG,containerStyle:VG,getRowHeight:{type:xe(Function),required:!0},rowKey:gm.rowKey,onRowsRendered:{type:xe(Function)},onScroll:{type:xe(Function)}}),$Ne=ht({cache:AC.cache,estimatedRowHeight:gm.estimatedRowHeight,rowKey:JK,headerClass:{type:xe([String,Function])},headerProps:{type:xe([Object,Function])},headerCellProps:{type:xe([Object,Function])},headerHeight:Nx.headerHeight,footerHeight:{type:Number,default:0},rowClass:{type:xe([String,Function])},rowProps:{type:xe([Object,Function])},rowHeight:{type:Number,default:50},cellProps:{type:xe([Object,Function])},columns:A$,data:qK,dataGetter:{type:xe(Function)},fixedData:kx,expandColumnKey:gm.expandColumnKey,expandedRowKeys:HG,defaultExpandedRowKeys:HG,class:QK,fixed:Boolean,style:{type:xe(Object)},width:rm,height:rm,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:ym.hScrollbarSize,vScrollbarSize:ym.vScrollbarSize,scrollbarAlwaysOn:bK.alwaysOn,sortBy:{type:xe(Object),default:()=>({})},sortState:{type:xe(Object),default:void 0},onColumnSort:{type:xe(Function)},onExpandedRowsChange:{type:xe(Function)},onEndReached:{type:xe(Function)},onRowExpand:gm.onRowExpand,onScroll:AC.onScroll,onRowsRendered:AC.onRowsRendered,rowEventHandlers:gm.rowEventHandlers}),INe="ElTableV2Header",RNe=Re({name:INe,props:Nx,setup(e,{slots:t,expose:n}){const s=rt("table-v2"),i=It("tableV2GridScrollLeft"),r=K(),a=x(()=>ip({width:e.width,height:e.height})),c=x(()=>ip({width:e.rowWidth,height:e.height})),u=x(()=>wr(g(e.headerHeight))),h=_=>{const E=g(r);Vt(()=>{E!=null&&E.scroll&&E.scroll({left:_})})},f=()=>{const _=s.e("fixed-header-row"),{columns:E,fixedHeaderData:v,rowHeight:b}=e;return v==null?void 0:v.map((y,S)=>{var L;const I=ip({height:b,width:"100%"});return(L=t.fixed)==null?void 0:L.call(t,{class:_,columns:E,rowData:y,rowIndex:-(S+1),style:I})})},p=()=>{const _=s.e("dynamic-header-row"),{columns:E}=e;return g(u).map((v,b)=>{var y;const S=ip({width:"100%",height:v});return(y=t.dynamic)==null?void 0:y.call(t,{class:_,columns:E,headerIndex:b,style:S})})};return nd(()=>{i!=null&&i.value&&h(i.value)}),n({scrollToLeft:h}),()=>{if(!(e.height<=0))return oe("div",{ref:r,class:e.class,style:g(a),role:"rowgroup"},[oe("div",{style:g(c),class:s.e("header")},[p(),f()])])}}});var CNe=RNe;const MNe=({atXEndEdge:e,atXStartEdge:t,atYEndEdge:n,atYStartEdge:s},i)=>{let r=null,a=0,c=0;const u=(f,p)=>{const _=f<=0&&t.value||f>=0&&e.value,E=p<=0&&s.value||p>=0&&n.value;return _&&E};return{hasReachedEdge:u,onWheel:f=>{Bm(r);let p=f.deltaX,_=f.deltaY;Math.abs(p)>Math.abs(_)?_=0:p=0,f.shiftKey&&_!==0&&(p=_,_=0),!(u(a,c)&&u(a+p,c+_))&&(a+=p,c+=_,f.preventDefault(),r=vp(()=>{i(a,c),a=0,c=0}))}}},ZK=({name:e,clearCache:t,getColumnPosition:n,getColumnStartIndexForOffset:s,getColumnStopIndexForStartIndex:i,getEstimatedTotalHeight:r,getEstimatedTotalWidth:a,getColumnOffset:c,getRowOffset:u,getRowPosition:h,getRowStartIndexForOffset:f,getRowStopIndexForStartIndex:p,initCache:_,injectToInstance:E,validateProps:v})=>Re({name:e??"ElVirtualList",props:ym,emits:[AM,LM],setup(b,{emit:y,expose:S,slots:L}){const I=rt("vl");v(b);const R=pn(),w=K(_(b,R));E==null||E(R,w);const k=K(),D=K(),P=K(),B=K(null),F=K({isScrolling:!1,scrollLeft:Wt(b.initScrollLeft)?b.initScrollLeft:0,scrollTop:Wt(b.initScrollTop)?b.initScrollTop:0,updateRequested:!1,xAxisScrollDir:iE,yAxisScrollDir:iE}),X=gK(),G=x(()=>Number.parseInt(`${b.height}`,10)),re=x(()=>Number.parseInt(`${b.width}`,10)),_e=x(()=>{const{totalColumn:De,totalRow:me,columnCache:Te}=b,{isScrolling:Ue,xAxisScrollDir:qe,scrollLeft:ct}=g(F);if(De===0||me===0)return[0,0,0,0];const Ne=s(b,ct,g(w)),Se=i(b,Ne,ct,g(w)),Je=!Ue||qe===wM?Math.max(1,Te):1,ut=!Ue||qe===iE?Math.max(1,Te):1;return[Math.max(0,Ne-Je),Math.max(0,Math.min(De-1,Se+ut)),Ne,Se]}),J=x(()=>{const{totalColumn:De,totalRow:me,rowCache:Te}=b,{isScrolling:Ue,yAxisScrollDir:qe,scrollTop:ct}=g(F);if(De===0||me===0)return[0,0,0,0];const Ne=f(b,ct,g(w)),Se=p(b,Ne,ct,g(w)),Je=!Ue||qe===wM?Math.max(1,Te):1,ut=!Ue||qe===iE?Math.max(1,Te):1;return[Math.max(0,Ne-Je),Math.max(0,Math.min(me-1,Se+ut)),Ne,Se]}),Y=x(()=>r(b,g(w))),ae=x(()=>a(b,g(w))),Z=x(()=>{var De;return[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:b.direction,height:Wt(b.height)?`${b.height}px`:b.height,width:Wt(b.width)?`${b.width}px`:b.width},(De=b.style)!=null?De:{}]}),Q=x(()=>{const De=`${g(ae)}px`;return{height:`${g(Y)}px`,pointerEvents:g(F).isScrolling?"none":void 0,width:De}}),he=()=>{const{totalColumn:De,totalRow:me}=b;if(De>0&&me>0){const[Se,Je,ut,Mt]=g(_e),[mt,qt,ce,q]=g(J);y(AM,{columnCacheStart:Se,columnCacheEnd:Je,rowCacheStart:mt,rowCacheEnd:qt,columnVisibleStart:ut,columnVisibleEnd:Mt,rowVisibleStart:ce,rowVisibleEnd:q})}const{scrollLeft:Te,scrollTop:Ue,updateRequested:qe,xAxisScrollDir:ct,yAxisScrollDir:Ne}=g(F);y(LM,{xAxisScrollDir:ct,scrollLeft:Te,yAxisScrollDir:Ne,scrollTop:Ue,updateRequested:qe})},ge=De=>{const{clientHeight:me,clientWidth:Te,scrollHeight:Ue,scrollLeft:qe,scrollTop:ct,scrollWidth:Ne}=De.currentTarget,Se=g(F);if(Se.scrollTop===ct&&Se.scrollLeft===qe)return;let Je=qe;if($G(b.direction))switch(NM()){case Yy:Je=-qe;break;case Cx:Je=Ne-Te-qe;break}F.value={...Se,isScrolling:!0,scrollLeft:Je,scrollTop:Math.max(0,Math.min(ct,Ue-me)),updateRequested:!0,xAxisScrollDir:fm(Se.scrollLeft,Je),yAxisScrollDir:fm(Se.scrollTop,ct)},Vt(()=>Pe()),Be(),he()},Ie=(De,me)=>{const Te=g(G),Ue=(Y.value-Te)/me*De;We({scrollTop:Math.min(Y.value-Te,Ue)})},be=(De,me)=>{const Te=g(re),Ue=(ae.value-Te)/me*De;We({scrollLeft:Math.min(ae.value-Te,Ue)})},{onWheel:Ae}=MNe({atXStartEdge:x(()=>F.value.scrollLeft<=0),atXEndEdge:x(()=>F.value.scrollLeft>=ae.value-g(re)),atYStartEdge:x(()=>F.value.scrollTop<=0),atYEndEdge:x(()=>F.value.scrollTop>=Y.value-g(G))},(De,me)=>{var Te,Ue,qe,ct;(Ue=(Te=D.value)==null?void 0:Te.onMouseUp)==null||Ue.call(Te),(ct=(qe=P.value)==null?void 0:qe.onMouseUp)==null||ct.call(qe);const Ne=g(re),Se=g(G);We({scrollLeft:Math.min(F.value.scrollLeft+De,ae.value-Ne),scrollTop:Math.min(F.value.scrollTop+me,Y.value-Se)})});fo(k,"wheel",Ae,{passive:!1});const We=({scrollLeft:De=F.value.scrollLeft,scrollTop:me=F.value.scrollTop})=>{De=Math.max(De,0),me=Math.max(me,0);const Te=g(F);me===Te.scrollTop&&De===Te.scrollLeft||(F.value={...Te,xAxisScrollDir:fm(Te.scrollLeft,De),yAxisScrollDir:fm(Te.scrollTop,me),scrollLeft:De,scrollTop:me,updateRequested:!0},Vt(()=>Pe()),Be(),he())},$e=(De=0,me=0,Te=tc)=>{const Ue=g(F);me=Math.max(0,Math.min(me,b.totalColumn-1)),De=Math.max(0,Math.min(De,b.totalRow-1));const qe=u6(I.namespace.value),ct=g(w),Ne=r(b,ct),Se=a(b,ct);We({scrollLeft:c(b,me,Te,Ue.scrollLeft,ct,Se>b.width?qe:0),scrollTop:u(b,De,Te,Ue.scrollTop,ct,Ne>b.height?qe:0)})},ve=(De,me)=>{const{columnWidth:Te,direction:Ue,rowHeight:qe}=b,ct=X.value(t&&Te,t&&qe,t&&Ue),Ne=`${De},${me}`;if(zn(ct,Ne))return ct[Ne];{const[,Se]=n(b,me,g(w)),Je=g(w),ut=$G(Ue),[Mt,mt]=h(b,De,Je),[qt]=n(b,me,Je);return ct[Ne]={position:"absolute",left:ut?void 0:`${Se}px`,right:ut?`${Se}px`:void 0,top:`${mt}px`,height:`${Mt}px`,width:`${qt}px`},ct[Ne]}},Pe=()=>{F.value.isScrolling=!1,Vt(()=>{X.value(-1,null,null)})};rn(()=>{if(!Dn)return;const{initScrollLeft:De,initScrollTop:me}=b,Te=g(k);Te&&(Wt(De)&&(Te.scrollLeft=De),Wt(me)&&(Te.scrollTop=me)),he()});const Be=()=>{const{direction:De}=b,{scrollLeft:me,scrollTop:Te,updateRequested:Ue}=g(F),qe=g(k);if(Ue&&qe){if(De===vE)switch(NM()){case Yy:{qe.scrollLeft=-me;break}case Rx:{qe.scrollLeft=me;break}default:{const{clientWidth:ct,scrollWidth:Ne}=qe;qe.scrollLeft=Ne-ct-me;break}}else qe.scrollLeft=Math.max(0,me);qe.scrollTop=Math.max(0,Te)}},{resetAfterColumnIndex:ot,resetAfterRowIndex:Xe,resetAfter:ee}=R.proxy;S({windowRef:k,innerRef:B,getItemStyleCache:X,scrollTo:We,scrollToItem:$e,states:F,resetAfterColumnIndex:ot,resetAfterRowIndex:Xe,resetAfter:ee});const pe=()=>{const{scrollbarAlwaysOn:De,scrollbarStartGap:me,scrollbarEndGap:Te,totalColumn:Ue,totalRow:qe}=b,ct=g(re),Ne=g(G),Se=g(ae),Je=g(Y),{scrollLeft:ut,scrollTop:Mt}=g(F),mt=Gt(T1,{ref:D,alwaysOn:De,startGap:me,endGap:Te,class:I.e("horizontal"),clientSize:ct,layout:"horizontal",onScroll:be,ratio:ct*100/Se,scrollFrom:ut/(Se-ct),total:qe,visible:!0}),qt=Gt(T1,{ref:P,alwaysOn:De,startGap:me,endGap:Te,class:I.e("vertical"),clientSize:Ne,layout:"vertical",onScroll:Ie,ratio:Ne*100/Je,scrollFrom:Mt/(Je-Ne),total:Ue,visible:!0});return{horizontalScrollbar:mt,verticalScrollbar:qt}},Oe=()=>{var De;const[me,Te]=g(_e),[Ue,qe]=g(J),{data:ct,totalColumn:Ne,totalRow:Se,useIsScrolling:Je,itemKey:ut}=b,Mt=[];if(Se>0&&Ne>0)for(let mt=Ue;mt<=qe;mt++)for(let qt=me;qt<=Te;qt++){const ce=ut({columnIndex:qt,data:ct,rowIndex:mt});Mt.push(Gt(Lt,{key:ce},(De=L.default)==null?void 0:De.call(L,{columnIndex:qt,data:ct,isScrolling:Je?g(F).isScrolling:void 0,style:ve(mt,qt),rowIndex:mt})))}return Mt},ze=()=>{const De=yn(b.innerElement),me=Oe();return[Gt(De,{style:g(Q),ref:B},Dt(De)?me:{default:()=>me})]};return()=>{const De=yn(b.containerElement),{horizontalScrollbar:me,verticalScrollbar:Te}=pe(),Ue=ze();return Gt("div",{key:0,class:I.e("wrapper"),role:b.role},[Gt(De,{class:b.className,style:g(Z),onScroll:ge,ref:k},Dt(De)?Ue:{default:()=>Ue}),me,Te])}}}),{max:xM,min:ej,floor:tj}=Math,ANe={column:"columnWidth",row:"rowHeight"},A1={column:"lastVisitedColumnIndex",row:"lastVisitedRowIndex"},ah=(e,t,n,s)=>{const[i,r,a]=[n[s],e[ANe[s]],n[A1[s]]];if(t>a){let c=0;if(a>=0){const u=i[a];c=u.offset+u.size}for(let u=a+1;u<=t;u++){const h=r(u);i[u]={offset:c,size:h},c+=h}n[A1[s]]=t}return i[t]},nj=(e,t,n,s,i,r)=>{for(;n<=s;){const a=n+tj((s-n)/2),c=ah(e,a,t,r).offset;if(c===i)return a;c<i?n=a+1:s=a-1}return xM(0,n-1)},LNe=(e,t,n,s,i)=>{const r=i==="column"?e.totalColumn:e.totalRow;let a=1;for(;n<r&&ah(e,n,t,i).offset<s;)n+=a,a*=2;return nj(e,t,tj(n/2),ej(n,r-1),s,i)},GG=(e,t,n,s)=>{const[i,r]=[t[s],t[A1[s]]];return(r>0?i[r].offset:0)>=n?nj(e,t,0,r,n,s):LNe(e,t,xM(0,r),n,s)},oj=({totalRow:e},{estimatedRowHeight:t,lastVisitedRowIndex:n,row:s})=>{let i=0;if(n>=e&&(n=e-1),n>=0){const c=s[n];i=c.offset+c.size}const a=(e-n-1)*t;return i+a},sj=({totalColumn:e},{column:t,estimatedColumnWidth:n,lastVisitedColumnIndex:s})=>{let i=0;if(s>e&&(s=e-1),s>=0){const c=t[s];i=c.offset+c.size}const a=(e-s-1)*n;return i+a},wNe={column:sj,row:oj},WG=(e,t,n,s,i,r,a)=>{const[c,u]=[r==="row"?e.height:e.width,wNe[r]],h=ah(e,t,i,r),f=u(e,i),p=xM(0,ej(f-c,h.offset)),_=xM(0,h.offset-c+a+h.size);switch(n===qA&&(s>=_-c&&s<=p+c?n=tc:n=Xu),n){case Xy:return p;case zy:return _;case Xu:return Math.round(_+(p-_)/2);case tc:default:return s>=_&&s<=p?s:_>p||s<_?_:p}},kNe=ZK({name:"ElDynamicSizeGrid",getColumnPosition:(e,t,n)=>{const s=ah(e,t,n,"column");return[s.size,s.offset]},getRowPosition:(e,t,n)=>{const s=ah(e,t,n,"row");return[s.size,s.offset]},getColumnOffset:(e,t,n,s,i,r)=>WG(e,t,n,s,i,"column",r),getRowOffset:(e,t,n,s,i,r)=>WG(e,t,n,s,i,"row",r),getColumnStartIndexForOffset:(e,t,n)=>GG(e,n,t,"column"),getColumnStopIndexForStartIndex:(e,t,n,s)=>{const i=ah(e,t,s,"column"),r=n+e.width;let a=i.offset+i.size,c=t;for(;c<e.totalColumn-1&&a<r;)c++,a+=ah(e,t,s,"column").size;return c},getEstimatedTotalHeight:oj,getEstimatedTotalWidth:sj,getRowStartIndexForOffset:(e,t,n)=>GG(e,n,t,"row"),getRowStopIndexForStartIndex:(e,t,n,s)=>{const{totalRow:i,height:r}=e,a=ah(e,t,s,"row"),c=n+r;let u=a.size+a.offset,h=t;for(;h<i-1&&u<c;)h++,u+=ah(e,h,s,"row").size;return h},injectToInstance:(e,t)=>{const n=({columnIndex:r,rowIndex:a},c)=>{var u,h;c=ho(c)?!0:c,Wt(r)&&(t.value.lastVisitedColumnIndex=Math.min(t.value.lastVisitedColumnIndex,r-1)),Wt(a)&&(t.value.lastVisitedRowIndex=Math.min(t.value.lastVisitedRowIndex,a-1)),(u=e.exposed)==null||u.getItemStyleCache.value(-1,null,null),c&&((h=e.proxy)==null||h.$forceUpdate())},s=(r,a)=>{n({columnIndex:r},a)},i=(r,a)=>{n({rowIndex:r},a)};Object.assign(e.proxy,{resetAfterColumnIndex:s,resetAfterRowIndex:i,resetAfter:n})},initCache:({estimatedColumnWidth:e=h1,estimatedRowHeight:t=h1})=>({column:{},estimatedColumnWidth:e,estimatedRowHeight:t,lastVisitedColumnIndex:-1,lastVisitedRowIndex:-1,row:{}}),clearCache:!1,validateProps:({columnWidth:e,rowHeight:t})=>{}}),NNe=ZK({name:"ElFixedSizeGrid",getColumnPosition:({columnWidth:e},t)=>[e,t*e],getRowPosition:({rowHeight:e},t)=>[e,t*e],getEstimatedTotalHeight:({totalRow:e,rowHeight:t})=>t*e,getEstimatedTotalWidth:({totalColumn:e,columnWidth:t})=>t*e,getColumnOffset:({totalColumn:e,columnWidth:t,width:n},s,i,r,a,c)=>{n=Number(n);const u=Math.max(0,e*t-n),h=Math.min(u,s*t),f=Math.max(0,s*t-n+c+t);switch(i==="smart"&&(r>=f-n&&r<=h+n?i=tc:i=Xu),i){case Xy:return h;case zy:return f;case Xu:{const p=Math.round(f+(h-f)/2);return p<Math.ceil(n/2)?0:p>u+Math.floor(n/2)?u:p}case tc:default:return r>=f&&r<=h?r:f>h||r<f?f:h}},getRowOffset:({rowHeight:e,height:t,totalRow:n},s,i,r,a,c)=>{t=Number(t);const u=Math.max(0,n*e-t),h=Math.min(u,s*e),f=Math.max(0,s*e-t+c+e);switch(i===qA&&(r>=f-t&&r<=h+t?i=tc:i=Xu),i){case Xy:return h;case zy:return f;case Xu:{const p=Math.round(f+(h-f)/2);return p<Math.ceil(t/2)?0:p>u+Math.floor(t/2)?u:p}case tc:default:return r>=f&&r<=h?r:f>h||r<f?f:h}},getColumnStartIndexForOffset:({columnWidth:e,totalColumn:t},n)=>Math.max(0,Math.min(t-1,Math.floor(n/e))),getColumnStopIndexForStartIndex:({columnWidth:e,totalColumn:t,width:n},s,i)=>{const r=s*e,a=Math.ceil((n+i-r)/e);return Math.max(0,Math.min(t-1,s+a-1))},getRowStartIndexForOffset:({rowHeight:e,totalRow:t},n)=>Math.max(0,Math.min(t-1,Math.floor(n/e))),getRowStopIndexForStartIndex:({rowHeight:e,totalRow:t,height:n},s,i)=>{const r=s*e,a=Math.ceil((n+i-r)/e);return Math.max(0,Math.min(t-1,s+a-1))},initCache:()=>{},clearCache:!0,validateProps:({columnWidth:e,rowHeight:t})=>{}}),PNe="ElTableV2Grid",DNe=e=>{const t=K(),n=K(),s=K(0),i=x(()=>{const{data:y,rowHeight:S,estimatedRowHeight:L}=e;if(!L)return y.length*S}),r=x(()=>{const{fixedData:y,rowHeight:S}=e;return((y==null?void 0:y.length)||0)*S}),a=x(()=>MC(e.headerHeight)),c=x(()=>{const{height:y}=e;return Math.max(0,y-g(a)-g(r))}),u=x(()=>g(a)+g(r)>0),h=({data:y,rowIndex:S})=>y[S][e.rowKey];function f({rowCacheStart:y,rowCacheEnd:S,rowVisibleStart:L,rowVisibleEnd:I}){var R;(R=e.onRowsRendered)==null||R.call(e,{rowCacheStart:y,rowCacheEnd:S,rowVisibleStart:L,rowVisibleEnd:I})}function p(y,S){var L;(L=n.value)==null||L.resetAfterRowIndex(y,S)}function _(y,S){const L=g(t),I=g(n);Tn(y)?(L==null||L.scrollToLeft(y.scrollLeft),s.value=y.scrollLeft,I==null||I.scrollTo(y)):(L==null||L.scrollToLeft(y),s.value=y,I==null||I.scrollTo({scrollLeft:y,scrollTop:S}))}function E(y){var S;(S=g(n))==null||S.scrollTo({scrollTop:y})}function v(y,S){var L;(L=g(n))==null||L.scrollToItem(y,1,S)}function b(){var y,S;(y=g(n))==null||y.$forceUpdate(),(S=g(t))==null||S.$forceUpdate()}return{bodyRef:n,forceUpdate:b,fixedRowHeight:r,gridHeight:c,hasHeader:u,headerHeight:a,headerRef:t,totalHeight:i,itemKey:h,onItemRendered:f,resetAfterRowIndex:p,scrollTo:_,scrollToTop:E,scrollToRow:v,scrollLeft:s}},xNe=Re({name:PNe,props:AC,setup(e,{slots:t,expose:n}){const{ns:s}=It(wx),{bodyRef:i,fixedRowHeight:r,gridHeight:a,hasHeader:c,headerRef:u,headerHeight:h,totalHeight:f,forceUpdate:p,itemKey:_,onItemRendered:E,resetAfterRowIndex:v,scrollTo:b,scrollToTop:y,scrollToRow:S,scrollLeft:L}=DNe(e);An("tableV2GridScrollLeft",L),n({forceUpdate:p,totalHeight:f,scrollTo:b,scrollToTop:y,scrollToRow:S,resetAfterRowIndex:v});const I=()=>e.bodyWidth;return()=>{const{cache:R,columns:w,data:k,fixedData:D,useIsScrolling:P,scrollbarAlwaysOn:B,scrollbarEndGap:F,scrollbarStartGap:X,style:G,rowHeight:re,bodyWidth:_e,estimatedRowHeight:J,headerWidth:Y,height:ae,width:Z,getRowHeight:Q,onScroll:he}=e,ge=Wt(J),Ie=ge?kNe:NNe,be=g(h);return oe("div",{role:"table",class:[s.e("table"),e.class],style:G},[oe(Ie,{ref:i,data:k,useIsScrolling:P,itemKey:_,columnCache:0,columnWidth:ge?I:_e,totalColumn:1,totalRow:k.length,rowCache:R,rowHeight:ge?Q:re,width:Z,height:g(a),class:s.e("body"),role:"rowgroup",scrollbarStartGap:X,scrollbarEndGap:F,scrollbarAlwaysOn:B,onScroll:he,onItemRendered:E,perfMode:!1},{default:Ae=>{var We;const $e=k[Ae.rowIndex];return(We=t.row)==null?void 0:We.call(t,{...Ae,columns:w,rowData:$e})}}),g(c)&&oe(CNe,{ref:u,class:s.e("header-wrapper"),columns:w,headerData:k,headerHeight:e.headerHeight,fixedHeaderData:D,rowWidth:Y,rowHeight:re,width:Z,height:Math.min(be+g(r),ae)},{dynamic:t.header,fixed:t.row})])}}});var Px=xNe;function BNe(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!zo(e)}const FNe=(e,{slots:t})=>{const{mainTableRef:n,...s}=e;return oe(Px,$n({ref:n},s),BNe(t)?t:{default:()=>[t]})};var UNe=FNe;function HNe(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!zo(e)}const VNe=(e,{slots:t})=>{if(!e.columns.length)return;const{leftTableRef:n,...s}=e;return oe(Px,$n({ref:n},s),HNe(t)?t:{default:()=>[t]})};var GNe=VNe;function WNe(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!zo(e)}const XNe=(e,{slots:t})=>{if(!e.columns.length)return;const{rightTableRef:n,...s}=e;return oe(Px,$n({ref:n},s),WNe(t)?t:{default:()=>[t]})};var zNe=XNe;const YNe=e=>{const{isScrolling:t}=It(wx),n=K(!1),s=K(),i=x(()=>Wt(e.estimatedRowHeight)&&e.rowIndex>=0),r=(u=!1)=>{const h=g(s);if(!h)return;const{columns:f,onRowHeightChange:p,rowKey:_,rowIndex:E,style:v}=e,{height:b}=h.getBoundingClientRect();n.value=!0,Vt(()=>{if(u||b!==Number.parseInt(v.height)){const y=f[0],S=(y==null?void 0:y.placeholderSign)===qy;p==null||p({rowKey:_,height:b,rowIndex:E},y&&!S&&y.fixed)}})},a=x(()=>{const{rowData:u,rowIndex:h,rowKey:f,onRowHover:p}=e,_=e.rowEventHandlers||{},E={};return Object.entries(_).forEach(([v,b])=>{Ut(b)&&(E[v]=y=>{b({event:y,rowData:u,rowIndex:h,rowKey:f})})}),p&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach(({name:v,hovered:b})=>{const y=E[v];E[v]=S=>{p({event:S,hovered:b,rowData:u,rowIndex:h,rowKey:f}),y==null||y(S)}}),E}),c=u=>{const{onRowExpand:h,rowData:f,rowIndex:p,rowKey:_}=e;h==null||h({expanded:u,rowData:f,rowIndex:p,rowKey:_})};return rn(()=>{g(i)&&r(!0)}),{isScrolling:t,measurable:i,measured:n,rowRef:s,eventHandlers:a,onExpand:c}},KNe="ElTableV2TableRow",jNe=Re({name:KNe,props:gm,setup(e,{expose:t,slots:n,attrs:s}){const{eventHandlers:i,isScrolling:r,measurable:a,measured:c,rowRef:u,onExpand:h}=YNe(e);return t({onExpand:h}),()=>{const{columns:f,columnsStyles:p,expandColumnKey:_,depth:E,rowData:v,rowIndex:b,style:y}=e;let S=f.map((L,I)=>{const R=at(v.children)&&v.children.length>0&&L.key===_;return n.cell({column:L,columns:f,columnIndex:I,depth:E,style:p[L.key],rowData:v,rowIndex:b,isScrolling:g(r),expandIconProps:R?{rowData:v,rowIndex:b,onExpand:h}:void 0})});if(n.row&&(S=n.row({cells:S.map(L=>at(L)&&L.length===1?L[0]:L),style:y,columns:f,depth:E,rowData:v,rowIndex:b,isScrolling:g(r)})),g(a)){const{height:L,...I}=y||{},R=g(c);return oe("div",$n({ref:u,class:e.class,style:R?y:I,role:"row"},s,g(i)),[S])}return oe("div",$n(s,{ref:u,class:e.class,style:y,role:"row"},g(i)),[S])}}});var QNe=jNe;function qNe(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!zo(e)}const JNe=(e,{slots:t})=>{const{columns:n,columnsStyles:s,depthMap:i,expandColumnKey:r,expandedRowKeys:a,estimatedRowHeight:c,hasFixedColumns:u,rowData:h,rowIndex:f,style:p,isScrolling:_,rowProps:E,rowClass:v,rowKey:b,rowEventHandlers:y,ns:S,onRowHovered:L,onRowExpanded:I}=e,R=Um(v,{columns:n,rowData:h,rowIndex:f},""),w=Um(E,{columns:n,rowData:h,rowIndex:f}),k=h[b],D=i[k]||0,P=!!r,B=f<0,F=[S.e("row"),R,{[S.e(`row-depth-${D}`)]:P&&f>=0,[S.is("expanded")]:P&&a.includes(k),[S.is("fixed")]:!D&&B,[S.is("customized")]:!!t.row}],X=u?L:void 0,G={...w,columns:n,columnsStyles:s,class:F,depth:D,expandColumnKey:r,estimatedRowHeight:B?void 0:c,isScrolling:_,rowIndex:f,rowData:h,rowKey:k,rowEventHandlers:y,style:p};return oe(QNe,$n(G,{onRowExpand:I,onMouseenter:J=>{X==null||X({hovered:!0,rowKey:k,event:J,rowData:h,rowIndex:f})},onMouseleave:J=>{X==null||X({hovered:!1,rowKey:k,event:J,rowData:h,rowIndex:f})},rowkey:k}),qNe(t)?t:{default:()=>[t]})};var ZNe=JNe;const Dx=(e,{slots:t})=>{var n;const{cellData:s,style:i}=e,r=((n=s==null?void 0:s.toString)==null?void 0:n.call(s))||"",a=He(t,"default",e,()=>[r]);return oe("div",{class:e.class,title:r,style:i},[a])};Dx.displayName="ElTableV2Cell";Dx.inheritAttrs=!1;var e1e=Dx;const t1e=e=>{const{expanded:t,expandable:n,onExpand:s,style:i,size:r}=e,a={onClick:n?()=>s(!t):void 0,class:e.class};return oe(Nt,$n(a,{size:r,style:i}),{default:()=>[oe(rl,null,null)]})};var n1e=t1e;const ij=({columns:e,column:t,columnIndex:n,depth:s,expandIconProps:i,isScrolling:r,rowData:a,rowIndex:c,style:u,expandedRowKeys:h,ns:f,cellProps:p,expandColumnKey:_,indentSize:E,iconSize:v,rowKey:b},{slots:y})=>{const S=ip(u);if(t.placeholderSign===qy)return oe("div",{class:f.em("row-cell","placeholder"),style:S},null);const{cellRenderer:L,dataKey:I,dataGetter:R}=t,w=Ut(R)?R({columns:e,column:t,columnIndex:n,rowData:a,rowIndex:c}):Ns(a,I??""),k=Um(p,{cellData:w,columns:e,column:t,columnIndex:n,rowIndex:c,rowData:a}),D={class:f.e("cell-text"),columns:e,column:t,columnIndex:n,cellData:w,isScrolling:r,rowData:a,rowIndex:c},P=jK(L),B=P?P(D):He(y,"default",D,()=>[oe(e1e,D,null)]),F=[f.e("row-cell"),t.class,t.align===Qy.CENTER&&f.is("align-center"),t.align===Qy.RIGHT&&f.is("align-right")],X=c>=0&&_&&t.key===_,G=c>=0&&h.includes(a[b]);let re;const _e=`margin-inline-start: ${s*E}px;`;return X&&(Tn(i)?re=oe(n1e,$n(i,{class:[f.e("expand-icon"),f.is("expanded",G)],size:v,expanded:G,style:_e,expandable:!0}),null):re=oe("div",{style:[_e,`width: ${v}px; height: ${v}px;`].join(" ")},null)),oe("div",$n({class:F,style:S},k,{role:"cell"}),[re,B])};ij.inheritAttrs=!1;var XG=ij;const o1e=ht({class:String,columns:A$,columnsStyles:{type:xe(Object),required:!0},headerIndex:Number,style:{type:xe(Object)}}),s1e=Re({name:"ElTableV2HeaderRow",props:o1e,setup(e,{slots:t}){return()=>{const{columns:n,columnsStyles:s,headerIndex:i,style:r}=e;let a=n.map((c,u)=>t.cell({columns:n,column:c,columnIndex:u,headerIndex:i,style:s[c.key]}));return t.header&&(a=t.header({cells:a.map(c=>at(c)&&c.length===1?c[0]:c),columns:n,headerIndex:i})),oe("div",{class:e.class,style:r,role:"row"},[a])}}});var i1e=s1e;function r1e(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!zo(e)}const l1e=({columns:e,columnsStyles:t,headerIndex:n,style:s,headerClass:i,headerProps:r,ns:a},{slots:c})=>{const u={columns:e,headerIndex:n},h=[a.e("header-row"),Um(i,u,""),{[a.is("customized")]:!!c.header}],f={...Um(r,u),columnsStyles:t,class:h,columns:e,headerIndex:n,style:s};return oe(i1e,f,r1e(c)?c:{default:()=>[c]})};var a1e=l1e;const xx=(e,{slots:t})=>He(t,"default",e,()=>{var n,s;return[oe("div",{class:e.class,title:(n=e.column)==null?void 0:n.title},[(s=e.column)==null?void 0:s.title])]});xx.displayName="ElTableV2HeaderCell";xx.inheritAttrs=!1;var c1e=xx;const u1e=e=>{const{sortOrder:t}=e;return oe(Nt,{size:14,class:e.class},{default:()=>[t===jy.ASC?oe(yTe,null,null):oe(OTe,null,null)]})};var d1e=u1e;const h1e=(e,{slots:t})=>{const{column:n,ns:s,style:i,onColumnSorted:r}=e,a=ip(i);if(n.placeholderSign===qy)return oe("div",{class:s.em("header-row-cell","placeholder"),style:a},null);const{headerCellRenderer:c,headerClass:u,sortable:h}=n,f={...e,class:s.e("header-cell-text")},p=jK(c),_=p?p(f):He(t,"default",f,()=>[oe(c1e,f,null)]),{sortBy:E,sortState:v,headerCellProps:b}=e;let y,S;if(v){const R=v[n.key];y=!!M1[R],S=y?R:jy.ASC}else y=n.key===E.key,S=y?E.order:jy.ASC;const L=[s.e("header-cell"),Um(u,e,""),n.align===Qy.CENTER&&s.is("align-center"),n.align===Qy.RIGHT&&s.is("align-right"),h&&s.is("sortable")],I={...Um(b,e),onClick:n.sortable?r:void 0,class:L,style:a,"data-key":n.key};return oe("div",$n(I,{role:"columnheader"}),[_,h&&oe(d1e,{class:[s.e("sort-icon"),y&&s.is("sorting")],sortOrder:S},null)])};var zG=h1e;const rj=(e,{slots:t})=>{var n;return oe("div",{class:e.class,style:e.style},[(n=t.default)==null?void 0:n.call(t)])};rj.displayName="ElTableV2Footer";var f1e=rj;const lj=(e,{slots:t})=>{const n=He(t,"default",{},()=>[oe(eK,null,null)]);return oe("div",{class:e.class,style:e.style},[n])};lj.displayName="ElTableV2Empty";var p1e=lj;const aj=(e,{slots:t})=>{var n;return oe("div",{class:e.class,style:e.style},[(n=t.default)==null?void 0:n.call(t)])};aj.displayName="ElTableV2Overlay";var g1e=aj;function OS(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!zo(e)}const m1e="ElTableV2",_1e=Re({name:m1e,props:$Ne,setup(e,{slots:t,expose:n}){const s=rt("table-v2"),{columnsStyles:i,fixedColumnsOnLeft:r,fixedColumnsOnRight:a,mainColumns:c,mainTableHeight:u,fixedTableHeight:h,leftTableWidth:f,rightTableWidth:p,data:_,depthMap:E,expandedRowKeys:v,hasFixedColumns:b,mainTableRef:y,leftTableRef:S,rightTableRef:L,isDynamic:I,isResetting:R,isScrolling:w,bodyWidth:k,emptyStyle:D,rootStyle:P,headerWidth:B,footerHeight:F,showEmpty:X,scrollTo:G,scrollToLeft:re,scrollToTop:_e,scrollToRow:J,getRowHeight:Y,onColumnSorted:ae,onRowHeightChange:Z,onRowHovered:Q,onRowExpanded:he,onRowsRendered:ge,onScroll:Ie,onVerticalScroll:be}=SNe(e);return n({scrollTo:G,scrollToLeft:re,scrollToTop:_e,scrollToRow:J}),An(wx,{ns:s,isResetting:R,isScrolling:w}),()=>{const{cache:Ae,cellProps:We,estimatedRowHeight:$e,expandColumnKey:ve,fixedData:Pe,headerHeight:Be,headerClass:ot,headerProps:Xe,headerCellProps:ee,sortBy:pe,sortState:Oe,rowHeight:ze,rowClass:Ze,rowEventHandlers:De,rowKey:me,rowProps:Te,scrollbarAlwaysOn:Ue,indentSize:qe,iconSize:ct,useIsScrolling:Ne,vScrollbarSize:Se,width:Je}=e,ut=g(_),Mt={cache:Ae,class:s.e("main"),columns:g(c),data:ut,fixedData:Pe,estimatedRowHeight:$e,bodyWidth:g(k)+Se,headerHeight:Be,headerWidth:g(B),height:g(u),mainTableRef:y,rowKey:me,rowHeight:ze,scrollbarAlwaysOn:Ue,scrollbarStartGap:2,scrollbarEndGap:Se,useIsScrolling:Ne,width:Je,getRowHeight:Y,onRowsRendered:ge,onScroll:Ie},mt=g(f),qt=g(h),ce={cache:Ae,class:s.e("left"),columns:g(r),data:ut,estimatedRowHeight:$e,leftTableRef:S,rowHeight:ze,bodyWidth:mt,headerWidth:mt,headerHeight:Be,height:qt,rowKey:me,scrollbarAlwaysOn:Ue,scrollbarStartGap:2,scrollbarEndGap:Se,useIsScrolling:Ne,width:mt,getRowHeight:Y,onScroll:be},ne=g(p)+Se,Le={cache:Ae,class:s.e("right"),columns:g(a),data:ut,estimatedRowHeight:$e,rightTableRef:L,rowHeight:ze,bodyWidth:ne,headerWidth:ne,headerHeight:Be,height:qt,rowKey:me,scrollbarAlwaysOn:Ue,scrollbarStartGap:2,scrollbarEndGap:Se,width:ne,style:`--${g(s.namespace)}-table-scrollbar-size: ${Se}px`,useIsScrolling:Ne,getRowHeight:Y,onScroll:be},ue=g(i),Fe={ns:s,depthMap:g(E),columnsStyles:ue,expandColumnKey:ve,expandedRowKeys:g(v),estimatedRowHeight:$e,hasFixedColumns:g(b),rowProps:Te,rowClass:Ze,rowKey:me,rowEventHandlers:De,onRowHovered:Q,onRowExpanded:he,onRowHeightChange:Z},ye={cellProps:We,expandColumnKey:ve,indentSize:qe,iconSize:ct,rowKey:me,expandedRowKeys:g(v),ns:s},ft={ns:s,headerClass:ot,headerProps:Xe,columnsStyles:ue},Kt={ns:s,sortBy:pe,sortState:Oe,headerCellProps:ee,onColumnSorted:ae},En={row:Ln=>oe(ZNe,$n(Ln,Fe),{row:t.row,cell:Zn=>{let On;return t.cell?oe(XG,$n(Zn,ye,{style:ue[Zn.column.key]}),OS(On=t.cell(Zn))?On:{default:()=>[On]}):oe(XG,$n(Zn,ye,{style:ue[Zn.column.key]}),null)}}),header:Ln=>oe(a1e,$n(Ln,ft),{header:t.header,cell:Zn=>{let On;return t["header-cell"]?oe(zG,$n(Zn,Kt,{style:ue[Zn.column.key]}),OS(On=t["header-cell"](Zn))?On:{default:()=>[On]}):oe(zG,$n(Zn,Kt,{style:ue[Zn.column.key]}),null)}})},Rn=[e.class,s.b(),s.e("root"),{[s.is("dynamic")]:g(I)}],Lo={class:s.e("footer"),style:g(F)};return oe("div",{class:Rn,style:g(P)},[oe(UNe,Mt,OS(En)?En:{default:()=>[En]}),oe(GNe,ce,OS(En)?En:{default:()=>[En]}),oe(zNe,Le,OS(En)?En:{default:()=>[En]}),t.footer&&oe(f1e,Lo,{default:t.footer}),g(X)&&oe(p1e,{class:s.e("empty"),style:g(D)},{default:t.empty}),t.overlay&&oe(g1e,{class:s.e("overlay")},{default:t.overlay})])}}});var T1e=_1e;const E1e=ht({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:xe(Function)}}),v1e=e=>{const t=K(),n=K(0),s=K(0);let i;return rn(()=>{i=Xo(t,([r])=>{const{width:a,height:c}=r.contentRect,{paddingLeft:u,paddingRight:h,paddingTop:f,paddingBottom:p}=getComputedStyle(r.target),_=Number.parseInt(u)||0,E=Number.parseInt(h)||0,v=Number.parseInt(f)||0,b=Number.parseInt(p)||0;n.value=a-_-E,s.value=c-v-b}).stop}),vo(()=>{i==null||i()}),tt([n,s],([r,a])=>{var c;(c=e.onResize)==null||c.call(e,{width:r,height:a})}),{sizer:t,width:n,height:s}},b1e=Re({name:"ElAutoResizer",props:E1e,setup(e,{slots:t}){const n=rt("auto-resizer"),{height:s,width:i,sizer:r}=v1e(e),a={width:"100%",height:"100%"};return()=>{var c;return oe("div",{ref:r,class:n.b(),style:a},[(c=t.default)==null?void 0:c.call(t,{height:s.value,width:i.value})])}}});var O1e=b1e;const S1e=nn(T1e),y1e=nn(O1e),JA=Symbol("tabsRootContextKey"),$1e=ht({tabs:{type:xe(Array),default:()=>os([])}}),cj="ElTabBar",I1e=Re({name:cj}),R1e=Re({...I1e,props:$1e,setup(e,{expose:t}){const n=e,s=pn(),i=It(JA);i||ti(cj,"<el-tabs><el-tab-bar /></el-tabs>");const r=rt("tabs"),a=K(),c=K(),u=()=>{let E=0,v=0;const b=["top","bottom"].includes(i.props.tabPosition)?"width":"height",y=b==="width"?"x":"y",S=y==="x"?"left":"top";return n.tabs.every(L=>{var I,R;const w=(R=(I=s.parent)==null?void 0:I.refs)==null?void 0:R[`tab-${L.uid}`];if(!w)return!1;if(!L.active)return!0;E=w[`offset${Uu(S)}`],v=w[`client${Uu(b)}`];const k=window.getComputedStyle(w);return b==="width"&&(v-=Number.parseFloat(k.paddingLeft)+Number.parseFloat(k.paddingRight),E+=Number.parseFloat(k.paddingLeft)),!1}),{[b]:`${v}px`,transform:`translate${Uu(y)}(${E}px)`}},h=()=>c.value=u(),f=[],p=()=>{var E;f.forEach(b=>b.stop()),f.length=0;const v=(E=s.parent)==null?void 0:E.refs;if(v){for(const b in v)if(b.startsWith("tab-")){const y=v[b];y&&f.push(Xo(y,h))}}};tt(()=>n.tabs,async()=>{await Vt(),h(),p()},{immediate:!0});const _=Xo(a,()=>h());return vo(()=>{f.forEach(E=>E.stop()),f.length=0,_.stop()}),t({ref:a,update:h}),(E,v)=>(H(),le("div",{ref_key:"barRef",ref:a,class:z([g(r).e("active-bar"),g(r).is(g(i).props.tabPosition)]),style:Bt(c.value)},null,6))}});var C1e=pt(R1e,[["__file","tab-bar.vue"]]);const M1e=ht({panes:{type:xe(Array),default:()=>os([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),A1e={tabClick:(e,t,n)=>n instanceof Event,tabRemove:(e,t)=>t instanceof Event},YG="ElTabNav",L1e=Re({name:YG,props:M1e,emits:A1e,setup(e,{expose:t,emit:n}){const s=It(JA);s||ti(YG,"<el-tabs><tab-nav /></el-tabs>");const i=rt("tabs"),r=Bme(),a=Qme(),c=K(),u=K(),h=K(),f=K(),p=K(!1),_=K(0),E=K(!1),v=K(!0),b=x(()=>["top","bottom"].includes(s.props.tabPosition)?"width":"height"),y=x(()=>({transform:`translate${b.value==="width"?"X":"Y"}(-${_.value}px)`})),S=()=>{if(!c.value)return;const P=c.value[`offset${Uu(b.value)}`],B=_.value;if(!B)return;const F=B>P?B-P:0;_.value=F},L=()=>{if(!c.value||!u.value)return;const P=u.value[`offset${Uu(b.value)}`],B=c.value[`offset${Uu(b.value)}`],F=_.value;if(P-F<=B)return;const X=P-F>B*2?F+B:P-B;_.value=X},I=async()=>{const P=u.value;if(!p.value||!h.value||!c.value||!P)return;await Vt();const B=h.value.querySelector(".is-active");if(!B)return;const F=c.value,X=["top","bottom"].includes(s.props.tabPosition),G=B.getBoundingClientRect(),re=F.getBoundingClientRect(),_e=X?P.offsetWidth-re.width:P.offsetHeight-re.height,J=_.value;let Y=J;X?(G.left<re.left&&(Y=J-(re.left-G.left)),G.right>re.right&&(Y=J+G.right-re.right)):(G.top<re.top&&(Y=J-(re.top-G.top)),G.bottom>re.bottom&&(Y=J+(G.bottom-re.bottom))),Y=Math.max(Y,0),_.value=Math.min(Y,_e)},R=()=>{var P;if(!u.value||!c.value)return;e.stretch&&((P=f.value)==null||P.update());const B=u.value[`offset${Uu(b.value)}`],F=c.value[`offset${Uu(b.value)}`],X=_.value;F<B?(p.value=p.value||{},p.value.prev=X,p.value.next=X+F<B,B-X<F&&(_.value=B-F)):(p.value=!1,X>0&&(_.value=0))},w=P=>{let B=0;switch(P.code){case $t.left:case $t.up:B=-1;break;case $t.right:case $t.down:B=1;break;default:return}const F=Array.from(P.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let G=F.indexOf(P.target)+B;G<0?G=F.length-1:G>=F.length&&(G=0),F[G].focus({preventScroll:!0}),F[G].click(),k()},k=()=>{v.value&&(E.value=!0)},D=()=>E.value=!1;return tt(r,P=>{P==="hidden"?v.value=!1:P==="visible"&&setTimeout(()=>v.value=!0,50)}),tt(a,P=>{P?setTimeout(()=>v.value=!0,50):v.value=!1}),Xo(h,R),rn(()=>setTimeout(()=>I(),0)),nd(()=>R()),t({scrollToActiveTab:I,removeFocus:D}),()=>{const P=p.value?[oe("span",{class:[i.e("nav-prev"),i.is("disabled",!p.value.prev)],onClick:S},[oe(Nt,null,{default:()=>[oe(bp,null,null)]})]),oe("span",{class:[i.e("nav-next"),i.is("disabled",!p.value.next)],onClick:L},[oe(Nt,null,{default:()=>[oe(rl,null,null)]})])]:null,B=e.panes.map((F,X)=>{var G,re,_e,J;const Y=F.uid,ae=F.props.disabled,Z=(re=(G=F.props.name)!=null?G:F.index)!=null?re:`${X}`,Q=!ae&&(F.isClosable||e.editable);F.index=`${X}`;const he=Q?oe(Nt,{class:"is-icon-close",onClick:be=>n("tabRemove",F,be)},{default:()=>[oe(zc,null,null)]}):null,ge=((J=(_e=F.slots).label)==null?void 0:J.call(_e))||F.props.label,Ie=!ae&&F.active?0:-1;return oe("div",{ref:`tab-${Y}`,class:[i.e("item"),i.is(s.props.tabPosition),i.is("active",F.active),i.is("disabled",ae),i.is("closable",Q),i.is("focus",E.value)],id:`tab-${Z}`,key:`tab-${Y}`,"aria-controls":`pane-${Z}`,role:"tab","aria-selected":F.active,tabindex:Ie,onFocus:()=>k(),onBlur:()=>D(),onClick:be=>{D(),n("tabClick",F,Z,be)},onKeydown:be=>{Q&&(be.code===$t.delete||be.code===$t.backspace)&&n("tabRemove",F,be)}},[ge,he])});return oe("div",{ref:h,class:[i.e("nav-wrap"),i.is("scrollable",!!p.value),i.is(s.props.tabPosition)]},[P,oe("div",{class:i.e("nav-scroll"),ref:c},[oe("div",{class:[i.e("nav"),i.is(s.props.tabPosition),i.is("stretch",e.stretch&&["top","bottom"].includes(s.props.tabPosition))],ref:u,style:y.value,role:"tablist",onKeydown:w},[e.type?null:oe(C1e,{ref:f,tabs:[...e.panes]},null),B])])])}}}),w1e=ht({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:xe(Function),default:()=>!0},stretch:Boolean}),Kw=e=>Dt(e)||Wt(e),k1e={[un]:e=>Kw(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>Kw(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>Kw(e),tabAdd:()=>!0},N1e=Re({name:"ElTabs",props:w1e,emits:k1e,setup(e,{emit:t,slots:n,expose:s}){var i;const r=rt("tabs"),a=x(()=>["left","right"].includes(e.tabPosition)),{children:c,addChild:u,removeChild:h}=sx(pn(),"ElTabPane"),f=K(),p=K((i=e.modelValue)!=null?i:"0"),_=async(S,L=!1)=>{var I,R,w;if(!(p.value===S||ho(S)))try{await((I=e.beforeLeave)==null?void 0:I.call(e,S,p.value))!==!1&&(p.value=S,L&&(t(un,S),t("tabChange",S)),(w=(R=f.value)==null?void 0:R.removeFocus)==null||w.call(R))}catch{}},E=(S,L,I)=>{S.props.disabled||(_(L,!0),t("tabClick",S,I))},v=(S,L)=>{S.props.disabled||ho(S.props.name)||(L.stopPropagation(),t("edit",S.props.name,"remove"),t("tabRemove",S.props.name))},b=()=>{t("edit",void 0,"add"),t("tabAdd")};tt(()=>e.modelValue,S=>_(S)),tt(p,async()=>{var S;await Vt(),(S=f.value)==null||S.scrollToActiveTab()}),An(JA,{props:e,currentName:p,registerPane:S=>{c.value.push(S)},sortPane:u,unregisterPane:h}),s({currentName:p});const y=({render:S})=>S();return()=>{const S=n["add-icon"],L=e.editable||e.addable?oe("div",{class:[r.e("new-tab"),a.value&&r.e("new-tab-vertical")],tabindex:"0",onClick:b,onKeydown:w=>{[$t.enter,$t.numpadEnter].includes(w.code)&&b()}},[S?He(n,"add-icon"):oe(Nt,{class:r.is("icon-plus")},{default:()=>[oe(g6,null,null)]})]):null,I=oe("div",{class:[r.e("header"),a.value&&r.e("header-vertical"),r.is(e.tabPosition)]},[oe(y,{render:()=>{const w=c.value.some(k=>k.slots.label);return oe(L1e,{ref:f,currentName:p.value,editable:e.editable,type:e.type,panes:c.value,stretch:e.stretch,onTabClick:E,onTabRemove:v},{$stable:!w})}},null),L]),R=oe("div",{class:r.e("content")},[He(n,"default")]);return oe("div",{class:[r.b(),r.m(e.tabPosition),{[r.m("card")]:e.type==="card",[r.m("border-card")]:e.type==="border-card"}]},[R,I])}}});var P1e=N1e;const D1e=ht({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),uj="ElTabPane",x1e=Re({name:uj}),B1e=Re({...x1e,props:D1e,setup(e){const t=e,n=pn(),s=Ks(),i=It(JA);i||ti(uj,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const r=rt("tab-pane"),a=K(),c=x(()=>t.closable||i.props.closable),u=UN(()=>{var E;return i.currentName.value===((E=t.name)!=null?E:a.value)}),h=K(u.value),f=x(()=>{var E;return(E=t.name)!=null?E:a.value}),p=UN(()=>!t.lazy||h.value||u.value);tt(u,E=>{E&&(h.value=!0)});const _=Kn({uid:n.uid,slots:s,props:t,paneName:f,active:u,index:a,isClosable:c});return i.registerPane(_),rn(()=>{i.sortPane(_)}),Ch(()=>{i.unregisterPane(_.uid)}),(E,v)=>g(p)?an((H(),le("div",{key:0,id:`pane-${g(f)}`,class:z(g(r).b()),role:"tabpanel","aria-hidden":!g(u),"aria-labelledby":`tab-${g(f)}`},[He(E.$slots,"default")],10,["id","aria-hidden","aria-labelledby"])),[[Yn,g(u)]]):Ge("v-if",!0)}});var dj=pt(B1e,[["__file","tab-pane.vue"]]);const F1e=nn(P1e,{TabPane:dj}),U1e=is(dj),H1e=ht({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:rd,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}}),V1e=Re({name:"ElText"}),G1e=Re({...V1e,props:H1e,setup(e){const t=e,n=Fs(),s=rt("text"),i=x(()=>[s.b(),s.m(t.type),s.m(n.value),s.is("truncated",t.truncated),s.is("line-clamp",!ho(t.lineClamp))]);return(r,a)=>(H(),Ye(yn(r.tag),{class:z(g(i)),style:Bt({"-webkit-line-clamp":r.lineClamp})},{default:de(()=>[He(r.$slots,"default")]),_:3},8,["class","style"]))}});var W1e=pt(G1e,[["__file","text.vue"]]);const X1e=nn(W1e),z1e=ht({format:{type:String,default:"HH:mm"},modelValue:String,disabled:Boolean,editable:{type:Boolean,default:!0},effect:{type:xe(String),default:"light"},clearable:{type:Boolean,default:!0},size:Ys,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:"00:30"},minTime:String,maxTime:String,name:String,prefixIcon:{type:xe([String,Object]),default:()=>p6},clearIcon:{type:xe([String,Object]),default:()=>Nh},...gv}),fh=e=>{const t=(e||"").split(":");if(t.length>=2){let n=Number.parseInt(t[0],10);const s=Number.parseInt(t[1],10),i=e.toUpperCase();return i.includes("AM")&&n===12?n=0:i.includes("PM")&&n!==12&&(n+=12),{hours:n,minutes:s}}return null},jw=(e,t)=>{const n=fh(e);if(!n)return-1;const s=fh(t);if(!s)return-1;const i=n.minutes+n.hours*60,r=s.minutes+s.hours*60;return i===r?0:i>r?1:-1},KG=e=>`${e}`.padStart(2,"0"),JT=e=>`${KG(e.hours)}:${KG(e.minutes)}`,Y1e=(e,t)=>{const n=fh(e);if(!n)return"";const s=fh(t);if(!s)return"";const i={hours:n.hours,minutes:n.minutes};return i.minutes+=s.minutes,i.hours+=s.hours,i.hours+=Math.floor(i.minutes/60),i.minutes=i.minutes%60,JT(i)},K1e=Re({name:"ElTimeSelect"}),j1e=Re({...K1e,props:z1e,emits:["change","blur","focus","clear","update:modelValue"],setup(e,{expose:t}){const n=e;en.extend(ax);const{Option:s}=Fm,i=rt("input"),r=K(),a=ar(),{lang:c}=xn(),u=x(()=>n.modelValue),h=x(()=>{const S=fh(n.start);return S?JT(S):null}),f=x(()=>{const S=fh(n.end);return S?JT(S):null}),p=x(()=>{const S=fh(n.step);return S?JT(S):null}),_=x(()=>{const S=fh(n.minTime||"");return S?JT(S):null}),E=x(()=>{const S=fh(n.maxTime||"");return S?JT(S):null}),v=x(()=>{const S=[];if(n.start&&n.end&&n.step){let L=h.value,I;for(;L&&f.value&&jw(L,f.value)<=0;)I=en(L,"HH:mm").locale(c.value).format(n.format),S.push({value:I,disabled:jw(L,_.value||"-1:-1")<=0||jw(L,E.value||"100:100")>=0}),L=Y1e(L,p.value)}return S});return t({blur:()=>{var S,L;(L=(S=r.value)==null?void 0:S.blur)==null||L.call(S)},focus:()=>{var S,L;(L=(S=r.value)==null?void 0:S.focus)==null||L.call(S)}}),(S,L)=>(H(),Ye(g(Fm),{ref_key:"select",ref:r,"model-value":g(u),disabled:g(a),clearable:S.clearable,"clear-icon":S.clearIcon,size:S.size,effect:S.effect,placeholder:S.placeholder,"default-first-option":"",filterable:S.editable,"empty-values":S.emptyValues,"value-on-clear":S.valueOnClear,"onUpdate:modelValue":I=>S.$emit("update:modelValue",I),onChange:I=>S.$emit("change",I),onBlur:I=>S.$emit("blur",I),onFocus:I=>S.$emit("focus",I),onClear:()=>S.$emit("clear")},{prefix:de(()=>[S.prefixIcon?(H(),Ye(g(Nt),{key:0,class:z(g(i).e("prefix-icon"))},{default:de(()=>[(H(),Ye(yn(S.prefixIcon)))]),_:1},8,["class"])):Ge("v-if",!0)]),default:de(()=>[(H(!0),le(Lt,null,In(g(v),I=>(H(),Ye(g(s),{key:I.value,label:I.value,value:I.value,disabled:I.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear","onUpdate:modelValue","onChange","onBlur","onFocus","onClear"]))}});var Q1e=pt(j1e,[["__file","time-select.vue"]]);const q1e=nn(Q1e),J1e=Re({name:"ElTimeline",setup(e,{slots:t}){const n=rt("timeline");return An("timeline",t),()=>Gt("ul",{class:[n.b()]},[He(t,"default")])}}),Z1e=ht({timestamp:{type:String,default:""},hideTimestamp:Boolean,center:Boolean,placement:{type:String,values:["top","bottom"],default:"bottom"},type:{type:String,values:["primary","success","warning","danger","info"],default:""},color:{type:String,default:""},size:{type:String,values:["normal","large"],default:"normal"},icon:{type:To},hollow:Boolean}),ePe=Re({name:"ElTimelineItem"}),tPe=Re({...ePe,props:Z1e,setup(e){const t=e,n=rt("timeline-item"),s=x(()=>[n.e("node"),n.em("node",t.size||""),n.em("node",t.type||""),n.is("hollow",t.hollow)]);return(i,r)=>(H(),le("li",{class:z([g(n).b(),{[g(n).e("center")]:i.center}])},[te("div",{class:z(g(n).e("tail"))},null,2),i.$slots.dot?Ge("v-if",!0):(H(),le("div",{key:0,class:z(g(s)),style:Bt({backgroundColor:i.color})},[i.icon?(H(),Ye(g(Nt),{key:0,class:z(g(n).e("icon"))},{default:de(()=>[(H(),Ye(yn(i.icon)))]),_:1},8,["class"])):Ge("v-if",!0)],6)),i.$slots.dot?(H(),le("div",{key:1,class:z(g(n).e("dot"))},[He(i.$slots,"dot")],2)):Ge("v-if",!0),te("div",{class:z(g(n).e("wrapper"))},[!i.hideTimestamp&&i.placement==="top"?(H(),le("div",{key:0,class:z([g(n).e("timestamp"),g(n).is("top")])},Ke(i.timestamp),3)):Ge("v-if",!0),te("div",{class:z(g(n).e("content"))},[He(i.$slots,"default")],2),!i.hideTimestamp&&i.placement==="bottom"?(H(),le("div",{key:1,class:z([g(n).e("timestamp"),g(n).is("bottom")])},Ke(i.timestamp),3)):Ge("v-if",!0)],2)],2))}});var hj=pt(tPe,[["__file","timeline-item.vue"]]);const nPe=nn(J1e,{TimelineItem:hj}),oPe=is(hj),fj=ht({nowrap:Boolean});var pj=(e=>(e.top="top",e.bottom="bottom",e.left="left",e.right="right",e))(pj||{});const sPe=Object.values(pj),Bx=ht({width:{type:Number,default:10},height:{type:Number,default:10},style:{type:xe(Object),default:null}}),iPe=ht({side:{type:xe(String),values:sPe,required:!0}}),rPe=["absolute","fixed"],lPe=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],Fx=ht({arrowPadding:{type:xe(Number),default:5},effect:{type:xe(String),default:"light"},contentClass:String,placement:{type:xe(String),values:lPe,default:"bottom"},reference:{type:xe(Object),default:null},offset:{type:Number,default:8},strategy:{type:xe(String),values:rPe,default:"absolute"},showArrow:Boolean,...Xi(["ariaLabel"])}),Ux=ht({delayDuration:{type:Number,default:300},defaultOpen:Boolean,open:{type:Boolean,default:void 0},onOpenChange:{type:xe(Function)},"onUpdate:open":{type:xe(Function)}}),GT={type:xe(Function)},Hx=ht({onBlur:GT,onClick:GT,onFocus:GT,onMouseDown:GT,onMouseEnter:GT,onMouseLeave:GT}),aPe=ht({...Ux,...Bx,...Hx,...Fx,alwaysOn:Boolean,fullTransition:Boolean,transitionProps:{type:xe(Object),default:null},teleported:Boolean,to:{type:xe(String),default:"body"}}),ZA=Symbol("tooltipV2"),gj=Symbol("tooltipV2Content"),Qw="tooltip_v2.open",cPe=Re({name:"ElTooltipV2Root"}),uPe=Re({...cPe,props:Ux,setup(e,{expose:t}){const n=e,s=K(n.defaultOpen),i=K(null),r=x({get:()=>Dm(n.open)?s.value:n.open,set:y=>{var S;s.value=y,(S=n["onUpdate:open"])==null||S.call(n,y)}}),a=x(()=>Wt(n.delayDuration)&&n.delayDuration>0),{start:c,stop:u}=xm(()=>{r.value=!0},x(()=>n.delayDuration),{immediate:!1}),h=rt("tooltip-v2"),f=Gi(),p=()=>{u(),r.value=!0},_=()=>{g(a)?c():p()},E=p,v=()=>{u(),r.value=!1};return tt(r,y=>{var S;y&&(document.dispatchEvent(new CustomEvent(Qw)),E()),(S=n.onOpenChange)==null||S.call(n,y)}),rn(()=>{document.addEventListener(Qw,v)}),vo(()=>{u(),document.removeEventListener(Qw,v)}),An(ZA,{contentId:f,triggerRef:i,ns:h,onClose:v,onDelayOpen:_,onOpen:E}),t({onOpen:E,onClose:v}),(y,S)=>He(y.$slots,"default",{open:g(r)})}});var dPe=pt(uPe,[["__file","root.vue"]]);const hPe=Re({name:"ElTooltipV2Arrow"}),fPe=Re({...hPe,props:{...Bx,...iPe},setup(e){const t=e,{ns:n}=It(ZA),{arrowRef:s}=It(gj),i=x(()=>{const{style:r,width:a,height:c}=t,u=n.namespace.value;return{[`--${u}-tooltip-v2-arrow-width`]:`${a}px`,[`--${u}-tooltip-v2-arrow-height`]:`${c}px`,[`--${u}-tooltip-v2-arrow-border-width`]:`${a/2}px`,[`--${u}-tooltip-v2-arrow-cover-width`]:a/2-1,...r||{}}});return(r,a)=>(H(),le("span",{ref_key:"arrowRef",ref:s,style:Bt(g(i)),class:z(g(n).e("arrow"))},null,6))}});var jG=pt(fPe,[["__file","arrow.vue"]]);const QE=Math.min,$m=Math.max,BM=Math.round,$R=Math.floor,ju=e=>({x:e,y:e}),pPe={left:"right",right:"left",bottom:"top",top:"bottom"},gPe={start:"end",end:"start"};function L1(e,t,n){return $m(e,QE(t,n))}function L$(e,t){return typeof e=="function"?e(t):e}function Hm(e){return e.split("-")[0]}function w$(e){return e.split("-")[1]}function mj(e){return e==="x"?"y":"x"}function Vx(e){return e==="y"?"height":"width"}function qE(e){return["top","bottom"].includes(Hm(e))?"y":"x"}function Gx(e){return mj(qE(e))}function mPe(e,t,n){n===void 0&&(n=!1);const s=w$(e),i=Gx(e),r=Vx(i);let a=i==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(a=FM(a)),[a,FM(a)]}function _Pe(e){const t=FM(e);return[w1(e),t,w1(t)]}function w1(e){return e.replace(/start|end/g,t=>gPe[t])}function TPe(e,t,n){const s=["left","right"],i=["right","left"],r=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:s:t?s:i;case"left":case"right":return t?r:a;default:return[]}}function EPe(e,t,n,s){const i=w$(e);let r=TPe(Hm(e),n==="start",s);return i&&(r=r.map(a=>a+"-"+i),t&&(r=r.concat(r.map(w1)))),r}function FM(e){return e.replace(/left|right|bottom|top/g,t=>pPe[t])}function vPe(e){return{top:0,right:0,bottom:0,left:0,...e}}function _j(e){return typeof e!="number"?vPe(e):{top:e,right:e,bottom:e,left:e}}function UM(e){const{x:t,y:n,width:s,height:i}=e;return{width:s,height:i,top:n,left:t,right:t+s,bottom:n+i,x:t,y:n}}function QG(e,t,n){let{reference:s,floating:i}=e;const r=qE(t),a=Gx(t),c=Vx(a),u=Hm(t),h=r==="y",f=s.x+s.width/2-i.width/2,p=s.y+s.height/2-i.height/2,_=s[c]/2-i[c]/2;let E;switch(u){case"top":E={x:f,y:s.y-i.height};break;case"bottom":E={x:f,y:s.y+s.height};break;case"right":E={x:s.x+s.width,y:p};break;case"left":E={x:s.x-i.width,y:p};break;default:E={x:s.x,y:s.y}}switch(w$(t)){case"start":E[a]-=_*(n&&h?-1:1);break;case"end":E[a]+=_*(n&&h?-1:1);break}return E}const bPe=async(e,t,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:r=[],platform:a}=n,c=r.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let h=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:p}=QG(h,s,u),_=s,E={},v=0;for(let b=0;b<c.length;b++){const{name:y,fn:S}=c[b],{x:L,y:I,data:R,reset:w}=await S({x:f,y:p,initialPlacement:s,placement:_,strategy:i,middlewareData:E,rects:h,platform:a,elements:{reference:e,floating:t}});f=L??f,p=I??p,E={...E,[y]:{...E[y],...R}},w&&v<=50&&(v++,typeof w=="object"&&(w.placement&&(_=w.placement),w.rects&&(h=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):w.rects),{x:f,y:p}=QG(h,_,u)),b=-1)}return{x:f,y:p,placement:_,strategy:i,middlewareData:E}};async function Wx(e,t){var n;t===void 0&&(t={});const{x:s,y:i,platform:r,rects:a,elements:c,strategy:u}=e,{boundary:h="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:_=!1,padding:E=0}=L$(t,e),v=_j(E),y=c[_?p==="floating"?"reference":"floating":p],S=UM(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(y)))==null||n?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:h,rootBoundary:f,strategy:u})),L=p==="floating"?{x:s,y:i,width:a.floating.width,height:a.floating.height}:a.reference,I=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),R=await(r.isElement==null?void 0:r.isElement(I))?await(r.getScale==null?void 0:r.getScale(I))||{x:1,y:1}:{x:1,y:1},w=UM(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:L,offsetParent:I,strategy:u}):L);return{top:(S.top-w.top+v.top)/R.y,bottom:(w.bottom-S.bottom+v.bottom)/R.y,left:(S.left-w.left+v.left)/R.x,right:(w.right-S.right+v.right)/R.x}}const OPe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:i,rects:r,platform:a,elements:c,middlewareData:u}=t,{element:h,padding:f=0}=L$(e,t)||{};if(h==null)return{};const p=_j(f),_={x:n,y:s},E=Gx(i),v=Vx(E),b=await a.getDimensions(h),y=E==="y",S=y?"top":"left",L=y?"bottom":"right",I=y?"clientHeight":"clientWidth",R=r.reference[v]+r.reference[E]-_[E]-r.floating[v],w=_[E]-r.reference[E],k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(h));let D=k?k[I]:0;(!D||!await(a.isElement==null?void 0:a.isElement(k)))&&(D=c.floating[I]||r.floating[v]);const P=R/2-w/2,B=D/2-b[v]/2-1,F=QE(p[S],B),X=QE(p[L],B),G=F,re=D-b[v]-X,_e=D/2-b[v]/2+P,J=L1(G,_e,re),Y=!u.arrow&&w$(i)!=null&&_e!==J&&r.reference[v]/2-(_e<G?F:X)-b[v]/2<0,ae=Y?_e<G?_e-G:_e-re:0;return{[E]:_[E]+ae,data:{[E]:J,centerOffset:_e-J-ae,...Y&&{alignmentOffset:ae}},reset:Y}}}),SPe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:i,middlewareData:r,rects:a,initialPlacement:c,platform:u,elements:h}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:_,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:b=!0,...y}=L$(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const S=Hm(i),L=qE(c),I=Hm(c)===c,R=await(u.isRTL==null?void 0:u.isRTL(h.floating)),w=_||(I||!b?[FM(c)]:_Pe(c)),k=v!=="none";!_&&k&&w.push(...EPe(c,b,v,R));const D=[c,...w],P=await Wx(t,y),B=[];let F=((s=r.flip)==null?void 0:s.overflows)||[];if(f&&B.push(P[S]),p){const _e=mPe(i,a,R);B.push(P[_e[0]],P[_e[1]])}if(F=[...F,{placement:i,overflows:B}],!B.every(_e=>_e<=0)){var X,G;const _e=(((X=r.flip)==null?void 0:X.index)||0)+1,J=D[_e];if(J)return{data:{index:_e,overflows:F},reset:{placement:J}};let Y=(G=F.filter(ae=>ae.overflows[0]<=0).sort((ae,Z)=>ae.overflows[1]-Z.overflows[1])[0])==null?void 0:G.placement;if(!Y)switch(E){case"bestFit":{var re;const ae=(re=F.filter(Z=>{if(k){const Q=qE(Z.placement);return Q===L||Q==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(Q=>Q>0).reduce((Q,he)=>Q+he,0)]).sort((Z,Q)=>Z[1]-Q[1])[0])==null?void 0:re[0];ae&&(Y=ae);break}case"initialPlacement":Y=c;break}if(i!==Y)return{reset:{placement:Y}}}return{}}}};async function yPe(e,t){const{placement:n,platform:s,elements:i}=e,r=await(s.isRTL==null?void 0:s.isRTL(i.floating)),a=Hm(n),c=w$(n),u=qE(n)==="y",h=["left","top"].includes(a)?-1:1,f=r&&u?-1:1,p=L$(t,e);let{mainAxis:_,crossAxis:E,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof v=="number"&&(E=c==="end"?v*-1:v),u?{x:E*f,y:_*h}:{x:_*h,y:E*f}}const $Pe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:i,y:r,placement:a,middlewareData:c}=t,u=await yPe(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(s=c.arrow)!=null&&s.alignmentOffset?{}:{x:i+u.x,y:r+u.y,data:{...u,placement:a}}}}},IPe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:i}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:c={fn:y=>{let{x:S,y:L}=y;return{x:S,y:L}}},...u}=L$(e,t),h={x:n,y:s},f=await Wx(t,u),p=qE(Hm(i)),_=mj(p);let E=h[_],v=h[p];if(r){const y=_==="y"?"top":"left",S=_==="y"?"bottom":"right",L=E+f[y],I=E-f[S];E=L1(L,E,I)}if(a){const y=p==="y"?"top":"left",S=p==="y"?"bottom":"right",L=v+f[y],I=v-f[S];v=L1(L,v,I)}const b=c.fn({...t,[_]:E,[p]:v});return{...b,data:{x:b.x-n,y:b.y-s,enabled:{[_]:r,[p]:a}}}}}};function eL(){return typeof window<"u"}function vv(e){return Tj(e)?(e.nodeName||"").toLowerCase():"#document"}function ga(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cd(e){var t;return(t=(Tj(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Tj(e){return eL()?e instanceof Node||e instanceof ga(e).Node:!1}function Yc(e){return eL()?e instanceof Element||e instanceof ga(e).Element:!1}function td(e){return eL()?e instanceof HTMLElement||e instanceof ga(e).HTMLElement:!1}function qG(e){return!eL()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ga(e).ShadowRoot}function k$(e){const{overflow:t,overflowX:n,overflowY:s,display:i}=Kc(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!["inline","contents"].includes(i)}function RPe(e){return["table","td","th"].includes(vv(e))}function tL(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Xx(e){const t=zx(),n=Yc(e)?Kc(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(s=>(n.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(n.contain||"").includes(s))}function CPe(e){let t=$p(e);for(;td(t)&&!JE(t);){if(Xx(t))return t;if(tL(t))return null;t=$p(t)}return null}function zx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function JE(e){return["html","body","#document"].includes(vv(e))}function Kc(e){return ga(e).getComputedStyle(e)}function nL(e){return Yc(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $p(e){if(vv(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qG(e)&&e.host||cd(e);return qG(t)?t.host:t}function Ej(e){const t=$p(e);return JE(t)?e.ownerDocument?e.ownerDocument.body:e.body:td(t)&&k$(t)?t:Ej(t)}function Jy(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Ej(e),r=i===((s=e.ownerDocument)==null?void 0:s.body),a=ga(i);if(r){const c=k1(a);return t.concat(a,a.visualViewport||[],k$(i)?i:[],c&&n?Jy(c):[])}return t.concat(i,Jy(i,[],n))}function k1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vj(e){const t=Kc(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const i=td(e),r=i?e.offsetWidth:n,a=i?e.offsetHeight:s,c=BM(n)!==r||BM(s)!==a;return c&&(n=r,s=a),{width:n,height:s,$:c}}function Yx(e){return Yc(e)?e:e.contextElement}function bE(e){const t=Yx(e);if(!td(t))return ju(1);const n=t.getBoundingClientRect(),{width:s,height:i,$:r}=vj(t);let a=(r?BM(n.width):n.width)/s,c=(r?BM(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const MPe=ju(0);function bj(e){const t=ga(e);return!zx()||!t.visualViewport?MPe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function APe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ga(e)?!1:t}function Vm(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=Yx(e);let a=ju(1);t&&(s?Yc(s)&&(a=bE(s)):a=bE(e));const c=APe(r,n,s)?bj(r):ju(0);let u=(i.left+c.x)/a.x,h=(i.top+c.y)/a.y,f=i.width/a.x,p=i.height/a.y;if(r){const _=ga(r),E=s&&Yc(s)?ga(s):s;let v=_,b=k1(v);for(;b&&s&&E!==v;){const y=bE(b),S=b.getBoundingClientRect(),L=Kc(b),I=S.left+(b.clientLeft+parseFloat(L.paddingLeft))*y.x,R=S.top+(b.clientTop+parseFloat(L.paddingTop))*y.y;u*=y.x,h*=y.y,f*=y.x,p*=y.y,u+=I,h+=R,v=ga(b),b=k1(v)}}return UM({width:f,height:p,x:u,y:h})}function Kx(e,t){const n=nL(e).scrollLeft;return t?t.left+n:Vm(cd(e)).left+n}function Oj(e,t,n){n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=s.left+t.scrollLeft-(n?0:Kx(e,s)),r=s.top+t.scrollTop;return{x:i,y:r}}function LPe(e){let{elements:t,rect:n,offsetParent:s,strategy:i}=e;const r=i==="fixed",a=cd(s),c=t?tL(t.floating):!1;if(s===a||c&&r)return n;let u={scrollLeft:0,scrollTop:0},h=ju(1);const f=ju(0),p=td(s);if((p||!p&&!r)&&((vv(s)!=="body"||k$(a))&&(u=nL(s)),td(s))){const E=Vm(s);h=bE(s),f.x=E.x+s.clientLeft,f.y=E.y+s.clientTop}const _=a&&!p&&!r?Oj(a,u,!0):ju(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-u.scrollLeft*h.x+f.x+_.x,y:n.y*h.y-u.scrollTop*h.y+f.y+_.y}}function wPe(e){return Array.from(e.getClientRects())}function kPe(e){const t=cd(e),n=nL(e),s=e.ownerDocument.body,i=$m(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),r=$m(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let a=-n.scrollLeft+Kx(e);const c=-n.scrollTop;return Kc(s).direction==="rtl"&&(a+=$m(t.clientWidth,s.clientWidth)-i),{width:i,height:r,x:a,y:c}}function NPe(e,t){const n=ga(e),s=cd(e),i=n.visualViewport;let r=s.clientWidth,a=s.clientHeight,c=0,u=0;if(i){r=i.width,a=i.height;const h=zx();(!h||h&&t==="fixed")&&(c=i.offsetLeft,u=i.offsetTop)}return{width:r,height:a,x:c,y:u}}function PPe(e,t){const n=Vm(e,!0,t==="fixed"),s=n.top+e.clientTop,i=n.left+e.clientLeft,r=td(e)?bE(e):ju(1),a=e.clientWidth*r.x,c=e.clientHeight*r.y,u=i*r.x,h=s*r.y;return{width:a,height:c,x:u,y:h}}function JG(e,t,n){let s;if(t==="viewport")s=NPe(e,n);else if(t==="document")s=kPe(cd(e));else if(Yc(t))s=PPe(t,n);else{const i=bj(e);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return UM(s)}function Sj(e,t){const n=$p(e);return n===t||!Yc(n)||JE(n)?!1:Kc(n).position==="fixed"||Sj(n,t)}function DPe(e,t){const n=t.get(e);if(n)return n;let s=Jy(e,[],!1).filter(c=>Yc(c)&&vv(c)!=="body"),i=null;const r=Kc(e).position==="fixed";let a=r?$p(e):e;for(;Yc(a)&&!JE(a);){const c=Kc(a),u=Xx(a);!u&&c.position==="fixed"&&(i=null),(r?!u&&!i:!u&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||k$(a)&&!u&&Sj(e,a))?s=s.filter(f=>f!==a):i=c,a=$p(a)}return t.set(e,s),s}function xPe(e){let{element:t,boundary:n,rootBoundary:s,strategy:i}=e;const a=[...n==="clippingAncestors"?tL(t)?[]:DPe(t,this._c):[].concat(n),s],c=a[0],u=a.reduce((h,f)=>{const p=JG(t,f,i);return h.top=$m(p.top,h.top),h.right=QE(p.right,h.right),h.bottom=QE(p.bottom,h.bottom),h.left=$m(p.left,h.left),h},JG(t,c,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function BPe(e){const{width:t,height:n}=vj(e);return{width:t,height:n}}function FPe(e,t,n){const s=td(t),i=cd(t),r=n==="fixed",a=Vm(e,!0,r,t);let c={scrollLeft:0,scrollTop:0};const u=ju(0);if(s||!s&&!r)if((vv(t)!=="body"||k$(i))&&(c=nL(t)),s){const _=Vm(t,!0,r,t);u.x=_.x+t.clientLeft,u.y=_.y+t.clientTop}else i&&(u.x=Kx(i));const h=i&&!s&&!r?Oj(i,c):ju(0),f=a.left+c.scrollLeft-u.x-h.x,p=a.top+c.scrollTop-u.y-h.y;return{x:f,y:p,width:a.width,height:a.height}}function qw(e){return Kc(e).position==="static"}function ZG(e,t){if(!td(e)||Kc(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return cd(e)===n&&(n=n.ownerDocument.body),n}function yj(e,t){const n=ga(e);if(tL(e))return n;if(!td(e)){let i=$p(e);for(;i&&!JE(i);){if(Yc(i)&&!qw(i))return i;i=$p(i)}return n}let s=ZG(e,t);for(;s&&RPe(s)&&qw(s);)s=ZG(s,t);return s&&JE(s)&&qw(s)&&!Xx(s)?n:s||CPe(e)||n}const UPe=async function(e){const t=this.getOffsetParent||yj,n=this.getDimensions,s=await n(e.floating);return{reference:FPe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function HPe(e){return Kc(e).direction==="rtl"}const VPe={convertOffsetParentRelativeRectToViewportRelativeRect:LPe,getDocumentElement:cd,getClippingRect:xPe,getOffsetParent:yj,getElementRects:UPe,getClientRects:wPe,getDimensions:BPe,getScale:bE,isElement:Yc,isRTL:HPe};function GPe(e,t){let n=null,s;const i=cd(e);function r(){var c;clearTimeout(s),(c=n)==null||c.disconnect(),n=null}function a(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),r();const{left:h,top:f,width:p,height:_}=e.getBoundingClientRect();if(c||t(),!p||!_)return;const E=$R(f),v=$R(i.clientWidth-(h+p)),b=$R(i.clientHeight-(f+_)),y=$R(h),L={rootMargin:-E+"px "+-v+"px "+-b+"px "+-y+"px",threshold:$m(0,QE(1,u))||1};let I=!0;function R(w){const k=w[0].intersectionRatio;if(k!==u){if(!I)return a();k?a(!1,k):s=setTimeout(()=>{a(!1,1e-7)},1e3)}I=!1}try{n=new IntersectionObserver(R,{...L,root:i.ownerDocument})}catch{n=new IntersectionObserver(R,L)}n.observe(e)}return a(!0),r}function WPe(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=s,h=Yx(e),f=i||r?[...h?Jy(h):[],...Jy(t)]:[];f.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),r&&S.addEventListener("resize",n)});const p=h&&c?GPe(h,n):null;let _=-1,E=null;a&&(E=new ResizeObserver(S=>{let[L]=S;L&&L.target===h&&E&&(E.unobserve(t),cancelAnimationFrame(_),_=requestAnimationFrame(()=>{var I;(I=E)==null||I.observe(t)})),n()}),h&&!u&&E.observe(h),E.observe(t));let v,b=u?Vm(e):null;u&&y();function y(){const S=Vm(e);b&&(S.x!==b.x||S.y!==b.y||S.width!==b.width||S.height!==b.height)&&n(),b=S,v=requestAnimationFrame(y)}return n(),()=>{var S;f.forEach(L=>{i&&L.removeEventListener("scroll",n),r&&L.removeEventListener("resize",n)}),p==null||p(),(S=E)==null||S.disconnect(),E=null,u&&cancelAnimationFrame(v)}}const XPe=Wx,$j=$Pe,zPe=IPe,YPe=SPe,Ij=OPe,Rj=(e,t,n)=>{const s=new Map,i={platform:VPe,...n},r={...i.platform,_c:s};return bPe(e,t,{...i,platform:r})},KPe=ht({style:{type:xe([String,Object,Array]),default:()=>({})}}),jPe=Re({name:"ElVisuallyHidden"}),QPe=Re({...jPe,props:KPe,setup(e){const t=e,n=x(()=>[t.style,{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}]);return(s,i)=>(H(),le("span",$n(s.$attrs,{style:g(n)}),[He(s.$slots,"default")],16))}});var qPe=pt(QPe,[["__file","visual-hidden.vue"]]);ht({});const JPe=e=>{if(!Dn)return;if(!e)return e;const t=ol(e);return t||(po(e)?t:e)},ZPe=({middleware:e,placement:t,strategy:n})=>{const s=K(),i=K(),r=K(),a=K(),c=K({}),u={x:r,y:a,placement:t,strategy:n,middlewareData:c},h=async()=>{if(!Dn)return;const f=JPe(s),p=ol(i);if(!f||!p)return;const _=await Rj(f,p,{placement:g(t),strategy:g(n),middleware:g(e)});UE(u).forEach(E=>{u[E].value=_[E]})};return rn(()=>{Zs(()=>{h()})}),{...u,update:h,referenceRef:s,contentRef:i}},eDe=({arrowRef:e,padding:t})=>({name:"arrow",options:{element:e,padding:t},fn(n){const s=g(e);return s?Ij({element:s,padding:t}).fn(n):{}}}),tDe=Re({name:"ElTooltipV2Content"}),nDe=Re({...tDe,props:{...Fx,...fj},setup(e){const t=e,{triggerRef:n,contentId:s}=It(ZA),i=K(t.placement),r=K(t.strategy),a=K(null),{referenceRef:c,contentRef:u,middlewareData:h,x:f,y:p,update:_}=ZPe({placement:i,strategy:r,middleware:x(()=>{const I=[$j(t.offset)];return t.showArrow&&I.push(eDe({arrowRef:a})),I})}),E=pv().nextZIndex(),v=rt("tooltip-v2"),b=x(()=>i.value.split("-")[0]),y=x(()=>({position:g(r),top:`${g(p)||0}px`,left:`${g(f)||0}px`,zIndex:E})),S=x(()=>{if(!t.showArrow)return{};const{arrow:I}=g(h);return{[`--${v.namespace.value}-tooltip-v2-arrow-x`]:`${I==null?void 0:I.x}px`||"",[`--${v.namespace.value}-tooltip-v2-arrow-y`]:`${I==null?void 0:I.y}px`||""}}),L=x(()=>[v.e("content"),v.is("dark",t.effect==="dark"),v.is(g(r)),t.contentClass]);return tt(a,()=>_()),tt(()=>t.placement,I=>i.value=I),rn(()=>{tt(()=>t.reference||n.value,I=>{c.value=I||void 0},{immediate:!0})}),An(gj,{arrowRef:a}),(I,R)=>(H(),le("div",{ref_key:"contentRef",ref:u,style:Bt(g(y)),"data-tooltip-v2-root":""},[I.nowrap?Ge("v-if",!0):(H(),le("div",{key:0,"data-side":g(b),class:z(g(L))},[He(I.$slots,"default",{contentStyle:g(y),contentClass:g(L)}),oe(g(qPe),{id:g(s),role:"tooltip"},{default:de(()=>[I.ariaLabel?(H(),le(Lt,{key:0},[Xt(Ke(I.ariaLabel),1)],64)):He(I.$slots,"default",{key:1})]),_:3},8,["id"]),He(I.$slots,"arrow",{style:Bt(g(S)),side:g(b)})],10,["data-side"]))],4))}});var eW=pt(nDe,[["__file","content.vue"]]);const oDe=ht({setRef:{type:xe(Function),required:!0},onlyChild:Boolean});var sDe=Re({props:oDe,setup(e,{slots:t}){const n=K(),s=KA(n,i=>{i?e.setRef(i.nextElementSibling):e.setRef(null)});return()=>{var i;const[r]=((i=t.default)==null?void 0:i.call(t))||[],a=e.onlyChild?hSe(r.children):r.children;return oe(Lt,{ref:s},[a])}}});const iDe=Re({name:"ElTooltipV2Trigger"}),rDe=Re({...iDe,props:{...fj,...Hx},setup(e){const t=e,{onClose:n,onOpen:s,onDelayOpen:i,triggerRef:r,contentId:a}=It(ZA);let c=!1;const u=L=>{r.value=L},h=()=>{c=!1},f=vs(t.onMouseEnter,i),p=vs(t.onMouseLeave,n),_=vs(t.onMouseDown,()=>{n(),c=!0,document.addEventListener("mouseup",h,{once:!0})}),E=vs(t.onFocus,()=>{c||s()}),v=vs(t.onBlur,n),b=vs(t.onClick,L=>{L.detail===0&&n()}),y={blur:v,click:b,focus:E,mousedown:_,mouseenter:f,mouseleave:p},S=(L,I,R)=>{L&&Object.entries(I).forEach(([w,k])=>{L[R](w,k)})};return tt(r,(L,I)=>{S(L,y,"addEventListener"),S(I,y,"removeEventListener"),L&&L.setAttribute("aria-describedby",a.value)}),vo(()=>{S(r.value,y,"removeEventListener"),document.removeEventListener("mouseup",h)}),(L,I)=>L.nowrap?(H(),Ye(g(sDe),{key:0,"set-ref":u,"only-child":""},{default:de(()=>[He(L.$slots,"default")]),_:3})):(H(),le("button",$n({key:1,ref_key:"triggerRef",ref:r},L.$attrs),[He(L.$slots,"default")],16))}});var lDe=pt(rDe,[["__file","trigger.vue"]]);const aDe=Re({name:"ElTooltipV2"}),cDe=Re({...aDe,props:aPe,setup(e){const n=fi(e),s=Kn(Bc(n,Object.keys(Bx))),i=Kn(Bc(n,Object.keys(Fx))),r=Kn(Bc(n,Object.keys(Ux))),a=Kn(Bc(n,Object.keys(Hx)));return(c,u)=>(H(),Ye(dPe,qa(Th(r)),{default:de(({open:h})=>[oe(lDe,$n(a,{nowrap:""}),{default:de(()=>[He(c.$slots,"trigger")]),_:3},16),oe(g(_v),{to:c.to,disabled:!c.teleported},{default:de(()=>[c.fullTransition?(H(),Ye(Li,qa($n({key:0},c.transitionProps)),{default:de(()=>[c.alwaysOn||h?(H(),Ye(eW,qa($n({key:0},i)),{arrow:de(({style:f,side:p})=>[c.showArrow?(H(),Ye(jG,$n({key:0},s,{style:f,side:p}),null,16,["style","side"])):Ge("v-if",!0)]),default:de(()=>[He(c.$slots,"default")]),_:3},16)):Ge("v-if",!0)]),_:2},1040)):(H(),le(Lt,{key:1},[c.alwaysOn||h?(H(),Ye(eW,qa($n({key:0},i)),{arrow:de(({style:f,side:p})=>[c.showArrow?(H(),Ye(jG,$n({key:0},s,{style:f,side:p}),null,16,["style","side"])):Ge("v-if",!0)]),default:de(()=>[He(c.$slots,"default")]),_:3},16)):Ge("v-if",!0)],64))]),_:2},1032,["to","disabled"])]),_:3},16))}});var uDe=pt(cDe,[["__file","tooltip.vue"]]);const dDe=nn(uDe),Cj="left-check-change",Mj="right-check-change",ZT=ht({data:{type:xe(Array),default:()=>[]},titles:{type:xe(Array),default:()=>[]},buttonTexts:{type:xe(Array),default:()=>[]},filterPlaceholder:String,filterMethod:{type:xe(Function)},leftDefaultChecked:{type:xe(Array),default:()=>[]},rightDefaultChecked:{type:xe(Array),default:()=>[]},renderContent:{type:xe(Function)},modelValue:{type:xe(Array),default:()=>[]},format:{type:xe(Object),default:()=>({})},filterable:Boolean,props:{type:xe(Object),default:()=>os({label:"label",key:"key",disabled:"disabled"})},targetOrder:{type:String,values:["original","push","unshift"],default:"original"},validateEvent:{type:Boolean,default:!0}}),N1=(e,t)=>[e,t].every(at)||at(e)&&hi(t),hDe={[_o]:(e,t,n)=>[e,n].every(at)&&["left","right"].includes(t),[un]:e=>at(e),[Cj]:N1,[Mj]:N1},P1="checked-change",fDe=ht({data:ZT.data,optionRender:{type:xe(Function)},placeholder:String,title:String,filterable:Boolean,format:ZT.format,filterMethod:ZT.filterMethod,defaultChecked:ZT.leftDefaultChecked,props:ZT.props}),pDe={[P1]:N1},N$=e=>{const t={label:"label",key:"key",disabled:"disabled"};return x(()=>({...t,...e.props}))},gDe=(e,t,n)=>{const s=N$(e),i=x(()=>e.data.filter(f=>Ut(e.filterMethod)?e.filterMethod(t.query,f):String(f[s.value.label]||f[s.value.key]).toLowerCase().includes(t.query.toLowerCase()))),r=x(()=>i.value.filter(f=>!f[s.value.disabled])),a=x(()=>{const f=t.checked.length,p=e.data.length,{noChecked:_,hasChecked:E}=e.format;return _&&E?f>0?E.replace(/\${checked}/g,f.toString()).replace(/\${total}/g,p.toString()):_.replace(/\${total}/g,p.toString()):`${f}/${p}`}),c=x(()=>{const f=t.checked.length;return f>0&&f<r.value.length}),u=()=>{const f=r.value.map(p=>p[s.value.key]);t.allChecked=f.length>0&&f.every(p=>t.checked.includes(p))},h=f=>{t.checked=f?r.value.map(p=>p[s.value.key]):[]};return tt(()=>t.checked,(f,p)=>{if(u(),t.checkChangeByUser){const _=f.concat(p).filter(E=>!f.includes(E)||!p.includes(E));n(P1,f,_)}else n(P1,f),t.checkChangeByUser=!0}),tt(r,()=>{u()}),tt(()=>e.data,()=>{const f=[],p=i.value.map(_=>_[s.value.key]);t.checked.forEach(_=>{p.includes(_)&&f.push(_)}),t.checkChangeByUser=!1,t.checked=f}),tt(()=>e.defaultChecked,(f,p)=>{if(p&&f.length===p.length&&f.every(v=>p.includes(v)))return;const _=[],E=r.value.map(v=>v[s.value.key]);f.forEach(v=>{E.includes(v)&&_.push(v)}),t.checkChangeByUser=!1,t.checked=_},{immediate:!0}),{filteredData:i,checkableData:r,checkedSummary:a,isIndeterminate:c,updateAllChecked:u,handleAllCheckedChange:h}},mDe=Re({name:"ElTransferPanel"}),_De=Re({...mDe,props:fDe,emits:pDe,setup(e,{expose:t,emit:n}){const s=e,i=Ks(),r=({option:I})=>I,{t:a}=xn(),c=rt("transfer"),u=Kn({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),h=N$(s),{filteredData:f,checkedSummary:p,isIndeterminate:_,handleAllCheckedChange:E}=gDe(s,u,n),v=x(()=>!la(u.query)&&la(f.value)),b=x(()=>!la(i.default()[0].children)),{checked:y,allChecked:S,query:L}=fi(u);return t({query:L}),(I,R)=>(H(),le("div",{class:z(g(c).b("panel"))},[te("p",{class:z(g(c).be("panel","header"))},[oe(g(uc),{modelValue:g(S),"onUpdate:modelValue":w=>po(S)?S.value=w:null,indeterminate:g(_),"validate-event":!1,onChange:g(E)},{default:de(()=>[Xt(Ke(I.title)+" ",1),te("span",null,Ke(g(p)),1)]),_:1},8,["modelValue","onUpdate:modelValue","indeterminate","onChange"])],2),te("div",{class:z([g(c).be("panel","body"),g(c).is("with-footer",g(b))])},[I.filterable?(H(),Ye(g(Nr),{key:0,modelValue:g(L),"onUpdate:modelValue":w=>po(L)?L.value=w:null,class:z(g(c).be("panel","filter")),size:"default",placeholder:I.placeholder,"prefix-icon":g(vTe),clearable:"","validate-event":!1},null,8,["modelValue","onUpdate:modelValue","class","placeholder","prefix-icon"])):Ge("v-if",!0),an(oe(g(uY),{modelValue:g(y),"onUpdate:modelValue":w=>po(y)?y.value=w:null,"validate-event":!1,class:z([g(c).is("filterable",I.filterable),g(c).be("panel","list")])},{default:de(()=>[(H(!0),le(Lt,null,In(g(f),w=>(H(),Ye(g(uc),{key:w[g(h).key],class:z(g(c).be("panel","item")),value:w[g(h).key],disabled:w[g(h).disabled],"validate-event":!1},{default:de(()=>{var k;return[oe(r,{option:(k=I.optionRender)==null?void 0:k.call(I,w)},null,8,["option"])]}),_:2},1032,["class","value","disabled"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue","class"]),[[Yn,!g(v)&&!g(la)(I.data)]]),an(te("div",{class:z(g(c).be("panel","empty"))},[He(I.$slots,"empty",{},()=>[Xt(Ke(g(v)?g(a)("el.transfer.noMatch"):g(a)("el.transfer.noData")),1)])],2),[[Yn,g(v)||g(la)(I.data)]])],2),g(b)?(H(),le("p",{key:0,class:z(g(c).be("panel","footer"))},[He(I.$slots,"default")],2)):Ge("v-if",!0)],2))}});var tW=pt(_De,[["__file","transfer-panel.vue"]]);const TDe=e=>{const t=N$(e),n=x(()=>e.data.reduce((r,a)=>(r[a[t.value.key]]=a)&&r,{})),s=x(()=>e.data.filter(r=>!e.modelValue.includes(r[t.value.key]))),i=x(()=>e.targetOrder==="original"?e.data.filter(r=>e.modelValue.includes(r[t.value.key])):e.modelValue.reduce((r,a)=>{const c=n.value[a];return c&&r.push(c),r},[]));return{sourceData:s,targetData:i}},EDe=(e,t,n)=>{const s=N$(e),i=(c,u,h)=>{n(un,c),n(_o,c,u,h)};return{addToLeft:()=>{const c=e.modelValue.slice();t.rightChecked.forEach(u=>{const h=c.indexOf(u);h>-1&&c.splice(h,1)}),i(c,"left",t.rightChecked)},addToRight:()=>{let c=e.modelValue.slice();const u=e.data.filter(h=>{const f=h[s.value.key];return t.leftChecked.includes(f)&&!e.modelValue.includes(f)}).map(h=>h[s.value.key]);c=e.targetOrder==="unshift"?u.concat(c):c.concat(u),e.targetOrder==="original"&&(c=e.data.filter(h=>c.includes(h[s.value.key])).map(h=>h[s.value.key])),i(c,"right",t.leftChecked)}}},vDe=(e,t)=>({onSourceCheckedChange:(i,r)=>{e.leftChecked=i,r&&t(Cj,i,r)},onTargetCheckedChange:(i,r)=>{e.rightChecked=i,r&&t(Mj,i,r)}}),bDe=Re({name:"ElTransfer"}),ODe=Re({...bDe,props:ZT,emits:hDe,setup(e,{expose:t,emit:n}){const s=e,i=Ks(),{t:r}=xn(),a=rt("transfer"),{formItem:c}=lr(),u=Kn({leftChecked:[],rightChecked:[]}),h=N$(s),{sourceData:f,targetData:p}=TDe(s),{onSourceCheckedChange:_,onTargetCheckedChange:E}=vDe(u,n),{addToLeft:v,addToRight:b}=EDe(s,u,n),y=K(),S=K(),L=P=>{switch(P){case"left":y.value.query="";break;case"right":S.value.query="";break}},I=x(()=>s.buttonTexts.length===2),R=x(()=>s.titles[0]||r("el.transfer.titles.0")),w=x(()=>s.titles[1]||r("el.transfer.titles.1")),k=x(()=>s.filterPlaceholder||r("el.transfer.filterPlaceholder"));tt(()=>s.modelValue,()=>{var P;s.validateEvent&&((P=c==null?void 0:c.validate)==null||P.call(c,"change").catch(B=>void 0))});const D=x(()=>P=>{var B;if(s.renderContent)return s.renderContent(Gt,P);const F=(((B=i.default)==null?void 0:B.call(i,{option:P}))||[]).filter(X=>X.type!==Ii);return F.length?F:Gt("span",P[h.value.label]||P[h.value.key])});return t({clearQuery:L,leftPanel:y,rightPanel:S}),(P,B)=>(H(),le("div",{class:z(g(a).b())},[oe(tW,{ref_key:"leftPanel",ref:y,data:g(f),"option-render":g(D),placeholder:g(k),title:g(R),filterable:P.filterable,format:P.format,"filter-method":P.filterMethod,"default-checked":P.leftDefaultChecked,props:s.props,onCheckedChange:g(_)},{empty:de(()=>[He(P.$slots,"left-empty")]),default:de(()=>[He(P.$slots,"left-footer")]),_:3},8,["data","option-render","placeholder","title","filterable","format","filter-method","default-checked","props","onCheckedChange"]),te("div",{class:z(g(a).e("buttons"))},[oe(g(Mi),{type:"primary",class:z([g(a).e("button"),g(a).is("with-texts",g(I))]),disabled:g(la)(u.rightChecked),onClick:g(v)},{default:de(()=>[oe(g(Nt),null,{default:de(()=>[oe(g(bp))]),_:1}),g(ho)(P.buttonTexts[0])?Ge("v-if",!0):(H(),le("span",{key:0},Ke(P.buttonTexts[0]),1))]),_:1},8,["class","disabled","onClick"]),oe(g(Mi),{type:"primary",class:z([g(a).e("button"),g(a).is("with-texts",g(I))]),disabled:g(la)(u.leftChecked),onClick:g(b)},{default:de(()=>[g(ho)(P.buttonTexts[1])?Ge("v-if",!0):(H(),le("span",{key:0},Ke(P.buttonTexts[1]),1)),oe(g(Nt),null,{default:de(()=>[oe(g(rl))]),_:1})]),_:1},8,["class","disabled","onClick"])],2),oe(tW,{ref_key:"rightPanel",ref:S,data:g(p),"option-render":g(D),placeholder:g(k),filterable:P.filterable,format:P.format,"filter-method":P.filterMethod,title:g(w),"default-checked":P.rightDefaultChecked,props:s.props,onCheckedChange:g(E)},{empty:de(()=>[He(P.$slots,"right-empty")]),default:de(()=>[He(P.$slots,"right-footer")]),_:3},8,["data","option-render","placeholder","filterable","format","filter-method","title","default-checked","props","onCheckedChange"])],2))}});var SDe=pt(ODe,[["__file","transfer.vue"]]);const yDe=nn(SDe),OE="$treeNodeId",nW=function(e,t){!t||t[OE]||Object.defineProperty(t,OE,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},jx=function(e,t){return e?t[e]:t[OE]},D1=(e,t,n)=>{const s=e.value.currentNode;n();const i=e.value.currentNode;s!==i&&t("current-change",i?i.data:null,i)},x1=e=>{let t=!0,n=!0,s=!0;for(let i=0,r=e.length;i<r;i++){const a=e[i];(a.checked!==!0||a.indeterminate)&&(t=!1,a.disabled||(s=!1)),(a.checked!==!1||a.indeterminate)&&(n=!1)}return{all:t,none:n,allWithoutDisable:s,half:!t&&!n}},wS=function(e){if(e.childNodes.length===0||e.loading)return;const{all:t,none:n,half:s}=x1(e.childNodes);t?(e.checked=!0,e.indeterminate=!1):s?(e.checked=!1,e.indeterminate=!0):n&&(e.checked=!1,e.indeterminate=!1);const i=e.parent;!i||i.level===0||e.store.checkStrictly||wS(i)},IR=function(e,t){const n=e.store.props,s=e.data||{},i=n[t];if(Ut(i))return i(s,e);if(Dt(i))return s[i];if(ho(i)){const r=s[t];return r===void 0?"":r}};let $De=0,B1=class LC{constructor(t){this.id=$De++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const n in t)zn(t,n)&&(this[n]=t[n]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const t=this.store;if(!t)throw new Error("[Node]store is required!");t.registerNode(this);const n=t.props;if(n&&typeof n.isLeaf<"u"){const r=IR(this,"isLeaf");Io(r)&&(this.isLeafByUser=r)}if(t.lazy!==!0&&this.data?(this.setData(this.data),t.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&t.lazy&&t.defaultExpandAll&&!this.isLeafByUser&&this.expand(),at(this.data)||nW(this,this.data),!this.data)return;const s=t.defaultExpandedKeys,i=t.key;i&&s&&s.includes(this.key)&&this.expand(null,t.autoExpandParent),i&&t.currentNodeKey!==void 0&&this.key===t.currentNodeKey&&(t.currentNode=this,t.currentNode.isCurrent=!0),t.lazy&&t._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(t){at(t)||nW(this,t),this.data=t,this.childNodes=[];let n;this.level===0&&at(this.data)?n=this.data:n=IR(this,"children")||[];for(let s=0,i=n.length;s<i;s++)this.insertChild({data:n[s]})}get label(){return IR(this,"label")}get key(){const t=this.store.key;return this.data?this.data[t]:null}get disabled(){return IR(this,"disabled")}get nextSibling(){const t=this.parent;if(t){const n=t.childNodes.indexOf(this);if(n>-1)return t.childNodes[n+1]}return null}get previousSibling(){const t=this.parent;if(t){const n=t.childNodes.indexOf(this);if(n>-1)return n>0?t.childNodes[n-1]:null}return null}contains(t,n=!0){return(this.childNodes||[]).some(s=>s===t||n&&s.contains(t))}remove(){const t=this.parent;t&&t.removeChild(this)}insertChild(t,n,s){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof LC)){if(!s){const i=this.getChildren(!0);i.includes(t.data)||(ho(n)||n<0?i.push(t.data):i.splice(n,0,t.data))}Object.assign(t,{parent:this,store:this.store}),t=Kn(new LC(t)),t instanceof LC&&t.initialize()}t.level=this.level+1,ho(n)||n<0?this.childNodes.push(t):this.childNodes.splice(n,0,t),this.updateLeafState()}insertBefore(t,n){let s;n&&(s=this.childNodes.indexOf(n)),this.insertChild(t,s)}insertAfter(t,n){let s;n&&(s=this.childNodes.indexOf(n),s!==-1&&(s+=1)),this.insertChild(t,s)}removeChild(t){const n=this.getChildren()||[],s=n.indexOf(t.data);s>-1&&n.splice(s,1);const i=this.childNodes.indexOf(t);i>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(i,1)),this.updateLeafState()}removeChildByData(t){let n=null;for(let s=0;s<this.childNodes.length;s++)if(this.childNodes[s].data===t){n=this.childNodes[s];break}n&&this.removeChild(n)}expand(t,n){const s=()=>{if(n){let i=this.parent;for(;i.level>0;)i.expanded=!0,i=i.parent}this.expanded=!0,t&&t(),this.childNodes.forEach(i=>{i.canFocus=!0})};this.shouldLoadData()?this.loadData(i=>{at(i)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||wS(this),s())}):s()}doCreateChildren(t,n={}){t.forEach(s=>{this.insertChild(Object.assign({data:s},n),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(t=>{t.canFocus=!1})}shouldLoadData(){return this.store.lazy===!0&&this.store.load&&!this.loaded}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser;return}const t=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!t||t.length===0;return}this.isLeaf=!1}setChecked(t,n,s,i){if(this.indeterminate=t==="half",this.checked=t===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:a,allWithoutDisable:c}=x1(this.childNodes);!this.isLeaf&&!a&&c&&(this.checked=!1,t=!1);const u=()=>{if(n){const h=this.childNodes;for(let _=0,E=h.length;_<E;_++){const v=h[_];i=i||t!==!1;const b=v.disabled?v.checked:i;v.setChecked(b,n,!0,i)}const{half:f,all:p}=x1(h);p||(this.checked=p,this.indeterminate=f)}};if(this.shouldLoadData()){this.loadData(()=>{u(),wS(this)},{checked:t!==!1});return}else u()}const r=this.parent;!r||r.level===0||s||wS(r)}getChildren(t=!1){if(this.level===0)return this.data;const n=this.data;if(!n)return null;const s=this.store.props;let i="children";return s&&(i=s.children||"children"),n[i]===void 0&&(n[i]=null),t&&!n[i]&&(n[i]=[]),n[i]}updateChildren(){const t=this.getChildren()||[],n=this.childNodes.map(r=>r.data),s={},i=[];t.forEach((r,a)=>{const c=r[OE];!!c&&n.findIndex(h=>h[OE]===c)>=0?s[c]={index:a,data:r}:i.push({index:a,data:r})}),this.store.lazy||n.forEach(r=>{s[r[OE]]||this.removeChildByData(r)}),i.forEach(({index:r,data:a})=>{this.insertChild({data:a},r)}),this.updateLeafState()}loadData(t,n={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(n).length)){this.loading=!0;const s=r=>{this.childNodes=[],this.doCreateChildren(r,n),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,r)},i=()=>{this.loading=!1};this.store.load(this,s,i)}else t&&t.call(this)}eachNode(t){const n=[this];for(;n.length;){const s=n.shift();n.unshift(...s.childNodes),t(s)}}reInitChecked(){this.store.checkStrictly||wS(this)}};class IDe{constructor(t){this.currentNode=null,this.currentNodeKey=null;for(const n in t)zn(t,n)&&(this[n]=t[n]);this.nodesMap={}}initialize(){if(this.root=new B1({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const t=this.load;t(this.root,n=>{this.root.doCreateChildren(n),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(t){const n=this.filterNodeMethod,s=this.lazy,i=function(r){const a=r.root?r.root.childNodes:r.childNodes;if(a.forEach(c=>{c.visible=n.call(c,t,c.data,c),i(c)}),!r.visible&&a.length){let c=!0;c=!a.some(u=>u.visible),r.root?r.root.visible=c===!1:r.visible=c===!1}t&&r.visible&&!r.isLeaf&&(!s||r.loaded)&&r.expand()};i(this)}setData(t){t!==this.root.data?(this.nodesMap={},this.root.setData(t),this._initDefaultCheckedNodes(),this.setCurrentNodeKey(this.currentNodeKey)):this.root.updateChildren()}getNode(t){if(t instanceof B1)return t;const n=Tn(t)?jx(this.key,t):t;return this.nodesMap[n]||null}insertBefore(t,n){const s=this.getNode(n);s.parent.insertBefore({data:t},s)}insertAfter(t,n){const s=this.getNode(n);s.parent.insertAfter({data:t},s)}remove(t){const n=this.getNode(t);n&&n.parent&&(n===this.currentNode&&(this.currentNode=null),n.parent.removeChild(n))}append(t,n){const s=Dm(n)?this.root:this.getNode(n);s&&s.insertChild({data:t})}_initDefaultCheckedNodes(){const t=this.defaultCheckedKeys||[],n=this.nodesMap;t.forEach(s=>{const i=n[s];i&&i.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(t){(this.defaultCheckedKeys||[]).includes(t.key)&&t.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(t){t!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=t,this._initDefaultCheckedNodes())}registerNode(t){const n=this.key;!t||!t.data||(n?t.key!==void 0&&(this.nodesMap[t.key]=t):this.nodesMap[t.id]=t)}deregisterNode(t){!this.key||!t||!t.data||(t.childNodes.forEach(s=>{this.deregisterNode(s)}),delete this.nodesMap[t.key])}getCheckedNodes(t=!1,n=!1){const s=[],i=function(r){(r.root?r.root.childNodes:r.childNodes).forEach(c=>{(c.checked||n&&c.indeterminate)&&(!t||t&&c.isLeaf)&&s.push(c.data),i(c)})};return i(this),s}getCheckedKeys(t=!1){return this.getCheckedNodes(t).map(n=>(n||{})[this.key])}getHalfCheckedNodes(){const t=[],n=function(s){(s.root?s.root.childNodes:s.childNodes).forEach(r=>{r.indeterminate&&t.push(r.data),n(r)})};return n(this),t}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(t=>(t||{})[this.key])}_getAllNodes(){const t=[],n=this.nodesMap;for(const s in n)zn(n,s)&&t.push(n[s]);return t}updateChildren(t,n){const s=this.nodesMap[t];if(!s)return;const i=s.childNodes;for(let r=i.length-1;r>=0;r--){const a=i[r];this.remove(a.data)}for(let r=0,a=n.length;r<a;r++){const c=n[r];this.append(c,s.data)}}_setCheckedKeys(t,n=!1,s){const i=this._getAllNodes().sort((u,h)=>u.level-h.level),r=Object.create(null),a=Object.keys(s);i.forEach(u=>u.setChecked(!1,!1));const c=u=>{u.childNodes.forEach(h=>{var f;r[h.data[t]]=!0,(f=h.childNodes)!=null&&f.length&&c(h)})};for(let u=0,h=i.length;u<h;u++){const f=i[u],p=f.data[t].toString();if(!a.includes(p)){f.checked&&!r[p]&&f.setChecked(!1,!1);continue}if(f.childNodes.length&&c(f),f.isLeaf||this.checkStrictly){f.setChecked(!0,!1);continue}if(f.setChecked(!0,!0),n){f.setChecked(!1,!1);const E=function(v){v.childNodes.forEach(y=>{y.isLeaf||y.setChecked(!1,!1),E(y)})};E(f)}}}setCheckedNodes(t,n=!1){const s=this.key,i={};t.forEach(r=>{i[(r||{})[s]]=!0}),this._setCheckedKeys(s,n,i)}setCheckedKeys(t,n=!1){this.defaultCheckedKeys=t;const s=this.key,i={};t.forEach(r=>{i[r]=!0}),this._setCheckedKeys(s,n,i)}setDefaultExpandedKeys(t){t=t||[],this.defaultExpandedKeys=t,t.forEach(n=>{const s=this.getNode(n);s&&s.expand(null,this.autoExpandParent)})}setChecked(t,n,s){const i=this.getNode(t);i&&i.setChecked(!!n,s)}getCurrentNode(){return this.currentNode}setCurrentNode(t){const n=this.currentNode;n&&(n.isCurrent=!1),this.currentNode=t,this.currentNode.isCurrent=!0}setUserCurrentNode(t,n=!0){const s=t[this.key],i=this.nodesMap[s];this.setCurrentNode(i),n&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(t,n=!0){if(this.currentNodeKey=t,t==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const s=this.getNode(t);s&&(this.setCurrentNode(s),n&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const RDe=Re({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=rt("tree"),n=It("NodeInstance"),s=It("RootTree");return()=>{const i=e.node,{data:r,store:a}=i;return e.renderContent?e.renderContent(Gt,{_self:n,node:i,data:r,store:a}):He(s.ctx.slots,"default",{node:i,data:r},()=>[Gt("span",{class:t.be("node","label")},[i.label])])}}});var CDe=pt(RDe,[["__file","tree-node-content.vue"]]);function Aj(e){const t=It("TreeNodeMap",null),n={treeNodeExpand:s=>{e.node!==s&&e.node.collapse()},children:[]};return t&&t.children.push(n),An("TreeNodeMap",n),{broadcastExpanded:s=>{if(e.accordion)for(const i of n.children)i.treeNodeExpand(s)}}}const Lj=Symbol("dragEvents");function MDe({props:e,ctx:t,el$:n,dropIndicator$:s,store:i}){const r=rt("tree"),a=K({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return An(Lj,{treeNodeDragStart:({event:f,treeNode:p})=>{if(Ut(e.allowDrag)&&!e.allowDrag(p.node))return f.preventDefault(),!1;f.dataTransfer.effectAllowed="move";try{f.dataTransfer.setData("text/plain","")}catch{}a.value.draggingNode=p,t.emit("node-drag-start",p.node,f)},treeNodeDragOver:({event:f,treeNode:p})=>{const _=p,E=a.value.dropNode;E&&E.node.id!==_.node.id&&Dr(E.$el,r.is("drop-inner"));const v=a.value.draggingNode;if(!v||!_)return;let b=!0,y=!0,S=!0,L=!0;Ut(e.allowDrop)&&(b=e.allowDrop(v.node,_.node,"prev"),L=y=e.allowDrop(v.node,_.node,"inner"),S=e.allowDrop(v.node,_.node,"next")),f.dataTransfer.dropEffect=y||b||S?"move":"none",(b||y||S)&&(E==null?void 0:E.node.id)!==_.node.id&&(E&&t.emit("node-drag-leave",v.node,E.node,f),t.emit("node-drag-enter",v.node,_.node,f)),b||y||S?a.value.dropNode=_:a.value.dropNode=null,_.node.nextSibling===v.node&&(S=!1),_.node.previousSibling===v.node&&(b=!1),_.node.contains(v.node,!1)&&(y=!1),(v.node===_.node||v.node.contains(_.node))&&(b=!1,y=!1,S=!1);const I=_.$el.querySelector(`.${r.be("node","content")}`).getBoundingClientRect(),R=n.value.getBoundingClientRect();let w;const k=b?y?.25:S?.45:1:-1,D=S?y?.75:b?.55:0:1;let P=-9999;const B=f.clientY-I.top;B<I.height*k?w="before":B>I.height*D?w="after":y?w="inner":w="none";const F=_.$el.querySelector(`.${r.be("node","expand-icon")}`).getBoundingClientRect(),X=s.value;w==="before"?P=F.top-R.top:w==="after"&&(P=F.bottom-R.top),X.style.top=`${P}px`,X.style.left=`${F.right-R.left}px`,w==="inner"?ec(_.$el,r.is("drop-inner")):Dr(_.$el,r.is("drop-inner")),a.value.showDropIndicator=w==="before"||w==="after",a.value.allowDrop=a.value.showDropIndicator||L,a.value.dropType=w,t.emit("node-drag-over",v.node,_.node,f)},treeNodeDragEnd:f=>{const{draggingNode:p,dropType:_,dropNode:E}=a.value;if(f.preventDefault(),f.dataTransfer&&(f.dataTransfer.dropEffect="move"),p&&E){const v={data:p.node.data};_!=="none"&&p.node.remove(),_==="before"?E.node.parent.insertBefore(v,E.node):_==="after"?E.node.parent.insertAfter(v,E.node):_==="inner"&&E.node.insertChild(v),_!=="none"&&(i.value.registerNode(v),i.value.key&&p.node.eachNode(b=>{var y;(y=i.value.nodesMap[b.data[i.value.key]])==null||y.setChecked(b.checked,!i.value.checkStrictly)})),Dr(E.$el,r.is("drop-inner")),t.emit("node-drag-end",p.node,E.node,_,f),_!=="none"&&t.emit("node-drop",p.node,E.node,_,f)}p&&!E&&t.emit("node-drag-end",p.node,null,_,f),a.value.showDropIndicator=!1,a.value.draggingNode=null,a.value.dropNode=null,a.value.allowDrop=!0}}),{dragState:a}}const ADe=Re({name:"ElTreeNode",components:{ElCollapseTransition:zA,ElCheckbox:uc,NodeContent:CDe,ElIcon:Nt,Loading:Ju},props:{node:{type:B1,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(e,t){const n=rt("tree"),{broadcastExpanded:s}=Aj(e),i=It("RootTree"),r=K(!1),a=K(!1),c=K(null),u=K(null),h=K(null),f=It(Lj),p=pn();An("NodeInstance",p),e.node.expanded&&(r.value=!0,a.value=!0);const _=i.props.props.children||"children";tt(()=>{const B=e.node.data[_];return B&&[...B]},()=>{e.node.updateChildren()}),tt(()=>e.node.indeterminate,B=>{b(e.node.checked,B)}),tt(()=>e.node.checked,B=>{b(B,e.node.indeterminate)}),tt(()=>e.node.childNodes.length,()=>e.node.reInitChecked()),tt(()=>e.node.expanded,B=>{Vt(()=>r.value=B),B&&(a.value=!0)});const E=B=>jx(i.props.nodeKey,B.data),v=B=>{const F=e.props.class;if(!F)return{};let X;if(Ut(F)){const{data:G}=B;X=F(G,B)}else X=F;return Dt(X)?{[X]:!0}:X},b=(B,F)=>{(c.value!==B||u.value!==F)&&i.ctx.emit("check-change",e.node.data,B,F),c.value=B,u.value=F},y=B=>{D1(i.store,i.ctx.emit,()=>{var F;if((F=i==null?void 0:i.props)==null?void 0:F.nodeKey){const G=E(e.node);i.store.value.setCurrentNodeKey(G)}else i.store.value.setCurrentNode(e.node)}),i.currentNode.value=e.node,i.props.expandOnClickNode&&L(),i.props.checkOnClickNode&&!e.node.disabled&&I(null,{target:{checked:!e.node.checked}}),i.ctx.emit("node-click",e.node.data,e.node,p,B)},S=B=>{i.instance.vnode.props.onNodeContextmenu&&(B.stopPropagation(),B.preventDefault()),i.ctx.emit("node-contextmenu",B,e.node.data,e.node,p)},L=()=>{e.node.isLeaf||(r.value?(i.ctx.emit("node-collapse",e.node.data,e.node,p),e.node.collapse()):e.node.expand(()=>{t.emit("node-expand",e.node.data,e.node,p)}))},I=(B,F)=>{e.node.setChecked(F.target.checked,!i.props.checkStrictly),Vt(()=>{const X=i.store.value;i.ctx.emit("check",e.node.data,{checkedNodes:X.getCheckedNodes(),checkedKeys:X.getCheckedKeys(),halfCheckedNodes:X.getHalfCheckedNodes(),halfCheckedKeys:X.getHalfCheckedKeys()})})};return{ns:n,node$:h,tree:i,expanded:r,childNodeRendered:a,oldChecked:c,oldIndeterminate:u,getNodeKey:E,getNodeClass:v,handleSelectChange:b,handleClick:y,handleContextMenu:S,handleExpandIconClick:L,handleCheckChange:I,handleChildNodeExpand:(B,F,X)=>{s(F),i.ctx.emit("node-expand",B,F,X)},handleDragStart:B=>{i.props.draggable&&f.treeNodeDragStart({event:B,treeNode:e})},handleDragOver:B=>{B.preventDefault(),i.props.draggable&&f.treeNodeDragOver({event:B,treeNode:{$el:h.value,node:e.node}})},handleDrop:B=>{B.preventDefault()},handleDragEnd:B=>{i.props.draggable&&f.treeNodeDragEnd(B)},CaretRight:f6}}});function LDe(e,t,n,s,i,r){const a=Ot("el-icon"),c=Ot("el-checkbox"),u=Ot("loading"),h=Ot("node-content"),f=Ot("el-tree-node"),p=Ot("el-collapse-transition");return an((H(),le("div",{ref:"node$",class:z([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:Yt(e.handleClick,["stop"]),onContextmenu:e.handleContextMenu,onDragstart:Yt(e.handleDragStart,["stop"]),onDragover:Yt(e.handleDragOver,["stop"]),onDragend:Yt(e.handleDragEnd,["stop"]),onDrop:Yt(e.handleDrop,["stop"])},[te("div",{class:z(e.ns.be("node","content")),style:Bt({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(H(),Ye(a,{key:0,class:z([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:Yt(e.handleExpandIconClick,["stop"])},{default:de(()=>[(H(),Ye(yn(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):Ge("v-if",!0),e.showCheckbox?(H(),Ye(c,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:Yt(()=>{},["stop"]),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onClick","onChange"])):Ge("v-if",!0),e.node.loading?(H(),Ye(a,{key:2,class:z([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:de(()=>[oe(u)]),_:1},8,["class"])):Ge("v-if",!0),oe(h,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),oe(p,null,{default:de(()=>[!e.renderAfterExpand||e.childNodeRendered?an((H(),le("div",{key:0,class:z(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded},[(H(!0),le(Lt,null,In(e.node.childNodes,_=>(H(),Ye(f,{key:e.getNodeKey(_),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:_,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,["aria-expanded"])),[[Yn,e.expanded]]):Ge("v-if",!0)]),_:1})],42,["aria-expanded","aria-disabled","aria-checked","draggable","data-key","onClick","onContextmenu","onDragstart","onDragover","onDragend","onDrop"])),[[Yn,e.node.visible]])}var wDe=pt(ADe,[["render",LDe],["__file","tree-node.vue"]]);function kDe({el$:e},t){const n=rt("tree"),s=lo([]),i=lo([]);rn(()=>{a()}),nd(()=>{s.value=Array.from(e.value.querySelectorAll("[role=treeitem]")),i.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"))}),tt(i,c=>{c.forEach(u=>{u.setAttribute("tabindex","-1")})}),fo(e,"keydown",c=>{const u=c.target;if(!u.className.includes(n.b("node")))return;const h=c.code;s.value=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`));const f=s.value.indexOf(u);let p;if([$t.up,$t.down].includes(h)){if(c.preventDefault(),h===$t.up){p=f===-1?0:f!==0?f-1:s.value.length-1;const E=p;for(;!t.value.getNode(s.value[p].dataset.key).canFocus;){if(p--,p===E){p=-1;break}p<0&&(p=s.value.length-1)}}else{p=f===-1?0:f<s.value.length-1?f+1:0;const E=p;for(;!t.value.getNode(s.value[p].dataset.key).canFocus;){if(p++,p===E){p=-1;break}p>=s.value.length&&(p=0)}}p!==-1&&s.value[p].focus()}[$t.left,$t.right].includes(h)&&(c.preventDefault(),u.click());const _=u.querySelector('[type="checkbox"]');[$t.enter,$t.numpadEnter,$t.space].includes(h)&&_&&(c.preventDefault(),_.click())});const a=()=>{var c;s.value=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)),i.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"));const u=e.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);if(u.length){u[0].setAttribute("tabindex","0");return}(c=s.value[0])==null||c.setAttribute("tabindex","0")}}const NDe=Re({name:"ElTree",components:{ElTreeNode:wDe},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:To}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(e,t){const{t:n}=xn(),s=rt("tree"),i=It(Ev,null),r=K(new IDe({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));r.value.initialize();const a=K(r.value.root),c=K(null),u=K(null),h=K(null),{broadcastExpanded:f}=Aj(e),{dragState:p}=MDe({props:e,ctx:t,el$:u,dropIndicator$:h,store:r});kDe({el$:u},r);const _=x(()=>{const{childNodes:Z}=a.value,Q=i?i.hasFilteredOptions!==0:!1;return(!Z||Z.length===0||Z.every(({visible:he})=>!he))&&!Q});tt(()=>e.currentNodeKey,Z=>{r.value.setCurrentNodeKey(Z)}),tt(()=>e.defaultCheckedKeys,Z=>{r.value.setDefaultCheckedKey(Z)}),tt(()=>e.defaultExpandedKeys,Z=>{r.value.setDefaultExpandedKeys(Z)}),tt(()=>e.data,Z=>{r.value.setData(Z)},{deep:!0}),tt(()=>e.checkStrictly,Z=>{r.value.checkStrictly=Z});const E=Z=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");r.value.filter(Z)},v=Z=>jx(e.nodeKey,Z.data),b=Z=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const Q=r.value.getNode(Z);if(!Q)return[];const he=[Q.data];let ge=Q.parent;for(;ge&&ge!==a.value;)he.push(ge.data),ge=ge.parent;return he.reverse()},y=(Z,Q)=>r.value.getCheckedNodes(Z,Q),S=Z=>r.value.getCheckedKeys(Z),L=()=>{const Z=r.value.getCurrentNode();return Z?Z.data:null},I=()=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const Z=L();return Z?Z[e.nodeKey]:null},R=(Z,Q)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");r.value.setCheckedNodes(Z,Q)},w=(Z,Q)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");r.value.setCheckedKeys(Z,Q)},k=(Z,Q,he)=>{r.value.setChecked(Z,Q,he)},D=()=>r.value.getHalfCheckedNodes(),P=()=>r.value.getHalfCheckedKeys(),B=(Z,Q=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");D1(r,t.emit,()=>{f(Z),r.value.setUserCurrentNode(Z,Q)})},F=(Z,Q=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");D1(r,t.emit,()=>{f(),r.value.setCurrentNodeKey(Z,Q)})},X=Z=>r.value.getNode(Z),G=Z=>{r.value.remove(Z)},re=(Z,Q)=>{r.value.append(Z,Q)},_e=(Z,Q)=>{r.value.insertBefore(Z,Q)},J=(Z,Q)=>{r.value.insertAfter(Z,Q)},Y=(Z,Q,he)=>{f(Q),t.emit("node-expand",Z,Q,he)},ae=(Z,Q)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");r.value.updateChildren(Z,Q)};return An("RootTree",{ctx:t,props:e,store:r,root:a,currentNode:c,instance:pn()}),An(Zu,void 0),{ns:s,store:r,root:a,currentNode:c,dragState:p,el$:u,dropIndicator$:h,isEmpty:_,filter:E,getNodeKey:v,getNodePath:b,getCheckedNodes:y,getCheckedKeys:S,getCurrentNode:L,getCurrentKey:I,setCheckedNodes:R,setCheckedKeys:w,setChecked:k,getHalfCheckedNodes:D,getHalfCheckedKeys:P,setCurrentNode:B,setCurrentKey:F,t:n,getNode:X,remove:G,append:re,insertBefore:_e,insertAfter:J,handleNodeExpand:Y,updateKeyChildren:ae}}});function PDe(e,t,n,s,i,r){const a=Ot("el-tree-node");return H(),le("div",{ref:"el$",class:z([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner",e.dragState.dropType==="inner"),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(H(!0),le(Lt,null,In(e.root.childNodes,c=>(H(),Ye(a,{key:e.getNodeKey(c),node:c,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),e.isEmpty?(H(),le("div",{key:0,class:z(e.ns.e("empty-block"))},[He(e.$slots,"empty",{},()=>{var c;return[te("span",{class:z(e.ns.e("empty-text"))},Ke((c=e.emptyText)!=null?c:e.t("el.tree.emptyText")),3)]})],2)):Ge("v-if",!0),an(te("div",{ref:"dropIndicator$",class:z(e.ns.e("drop-indicator"))},null,2),[[Yn,e.dragState.showDropIndicator]])],2)}var DDe=pt(NDe,[["render",PDe],["__file","tree.vue"]]);const HM=nn(DDe),xDe=(e,{attrs:t,emit:n},{select:s,tree:i,key:r})=>{const a=rt("tree-select");return tt(()=>e.data,()=>{e.filterable&&Vt(()=>{var u,h;(h=i.value)==null||h.filter((u=s.value)==null?void 0:u.states.inputValue)})},{flush:"post"}),{...Bc(fi(e),Object.keys(Fm.props)),...t,"onUpdate:modelValue":u=>n(un,u),valueKey:r,popperClass:x(()=>{const u=[a.e("popper")];return e.popperClass&&u.push(e.popperClass),u.join(" ")}),filterMethod:(u="")=>{var h;e.filterMethod?e.filterMethod(u):e.remoteMethod?e.remoteMethod(u):(h=i.value)==null||h.filter(u)}}},BDe=Re({extends:MM,setup(e,t){const n=MM.setup(e,t);delete n.selectOptionClick;const s=pn().proxy;return Vt(()=>{n.select.states.cachedOptions.get(s.value)||n.select.onOptionCreate(s)}),tt(()=>t.attrs.visible,i=>{n.states.visible=i},{immediate:!0}),n},methods:{selectOptionClick(){this.$el.parentElement.click()}}});function F1(e){return e||e===0}function Qx(e){return at(e)&&e.length}function WT(e){return at(e)?e:F1(e)?[e]:[]}function wC(e,t,n,s,i){for(let r=0;r<e.length;r++){const a=e[r];if(t(a,r,e,i))return s?s(a,r,e,i):a;{const c=n(a);if(Qx(c)){const u=wC(c,t,n,s,a);if(u)return u}}}}function kC(e,t,n,s){for(let i=0;i<e.length;i++){const r=e[i];t(r,i,e,s);const a=n(r);Qx(a)&&kC(a,t,n,r)}}const FDe=(e,{attrs:t,slots:n,emit:s},{select:i,tree:r,key:a})=>{tt(()=>e.modelValue,()=>{e.showCheckbox&&Vt(()=>{const _=r.value;_&&!Hi(_.getCheckedKeys(),WT(e.modelValue))&&_.setCheckedKeys(WT(e.modelValue))})},{immediate:!0,deep:!0});const c=x(()=>({value:a.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...e.props})),u=(_,E)=>{var v;const b=c.value[_];return Ut(b)?b(E,(v=r.value)==null?void 0:v.getNode(u("value",E))):E[b]},h=WT(e.modelValue).map(_=>wC(e.data||[],E=>u("value",E)===_,E=>u("children",E),(E,v,b,y)=>y&&u("value",y))).filter(_=>F1(_)),f=x(()=>{if(!e.renderAfterExpand&&!e.lazy)return[];const _=[];return kC(e.data.concat(e.cacheData),E=>{const v=u("value",E);_.push({value:v,currentLabel:u("label",E),isDisabled:u("disabled",E)})},E=>u("children",E)),_}),p=()=>{var _;return(_=r.value)==null?void 0:_.getCheckedKeys().filter(E=>{var v;const b=(v=r.value)==null?void 0:v.getNode(E);return!hi(b)&&la(b.childNodes)})};return{...Bc(fi(e),Object.keys(HM.props)),...t,nodeKey:a,expandOnClickNode:x(()=>!e.checkStrictly&&e.expandOnClickNode),defaultExpandedKeys:x(()=>e.defaultExpandedKeys?e.defaultExpandedKeys.concat(h):h),renderContent:(_,{node:E,data:v,store:b})=>_(BDe,{value:u("value",v),label:u("label",v),disabled:u("disabled",v),visible:E.visible},e.renderContent?()=>e.renderContent(_,{node:E,data:v,store:b}):n.default?()=>n.default({node:E,data:v,store:b}):void 0),filterNodeMethod:(_,E,v)=>e.filterNodeMethod?e.filterNodeMethod(_,E,v):_?new RegExp(rx(_),"i").test(u("label",E)||""):!0,onNodeClick:(_,E,v)=>{var b,y,S,L;if((b=t.onNodeClick)==null||b.call(t,_,E,v),!(e.showCheckbox&&e.checkOnClickNode)){if(!e.showCheckbox&&(e.checkStrictly||E.isLeaf)){if(!u("disabled",_)){const I=(y=i.value)==null?void 0:y.states.options.get(u("value",_));(S=i.value)==null||S.handleOptionSelect(I)}}else e.expandOnClickNode&&v.proxy.handleExpandIconClick();(L=i.value)==null||L.focus()}},onCheck:(_,E)=>{var v;if(!e.showCheckbox)return;const b=u("value",_),y={};kC([r.value.store.root],R=>y[R.key]=R,R=>R.childNodes);const S=E.checkedKeys,L=e.multiple?WT(e.modelValue).filter(R=>!(R in y)&&!S.includes(R)):[],I=L.concat(S);if(e.checkStrictly)s(un,e.multiple?I:I.includes(b)?b:void 0);else if(e.multiple){const R=p();s(un,L.concat(R))}else{const R=wC([_],D=>!Qx(u("children",D))&&!u("disabled",D),D=>u("children",D)),w=R?u("value",R):void 0,k=F1(e.modelValue)&&!!wC([_],D=>u("value",D)===e.modelValue,D=>u("children",D));s(un,w===e.modelValue||k?void 0:w)}Vt(()=>{var R;const w=WT(e.modelValue);r.value.setCheckedKeys(w),(R=t.onCheck)==null||R.call(t,_,{checkedKeys:r.value.getCheckedKeys(),checkedNodes:r.value.getCheckedNodes(),halfCheckedKeys:r.value.getHalfCheckedKeys(),halfCheckedNodes:r.value.getHalfCheckedNodes()})}),(v=i.value)==null||v.focus()},onNodeExpand:(_,E,v)=>{var b;(b=t.onNodeExpand)==null||b.call(t,_,E,v),Vt(()=>{if(!e.checkStrictly&&e.lazy&&e.multiple&&E.checked){const y={},S=r.value.getCheckedKeys();kC([r.value.store.root],R=>y[R.key]=R,R=>R.childNodes);const L=WT(e.modelValue).filter(R=>!(R in y)&&!S.includes(R)),I=p();s(un,L.concat(I))}})},cacheOptions:f}};var UDe=Re({props:{data:{type:Array,default:()=>[]}},setup(e){const t=It(Ev);return tt(()=>e.data,()=>{var n;e.data.forEach(i=>{t.states.cachedOptions.has(i.value)||t.states.cachedOptions.set(i.value,i)});const s=((n=t.selectRef)==null?void 0:n.querySelectorAll("input"))||[];Dn&&!Array.from(s).includes(document.activeElement)&&t.setSelected()},{flush:"post",immediate:!0}),()=>{}}});const HDe=Re({name:"ElTreeSelect",inheritAttrs:!1,props:{...Fm.props,...HM.props,cacheData:{type:Array,default:()=>[]}},setup(e,t){const{slots:n,expose:s}=t,i=K(),r=K(),a=x(()=>e.nodeKey||e.valueKey||"value"),c=xDe(e,t,{select:i,tree:r,key:a}),{cacheOptions:u,...h}=FDe(e,t,{select:i,tree:r,key:a}),f=Kn({});return s(f),rn(()=>{Object.assign(f,{...Bc(r.value,["filter","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter"]),...Bc(i.value,["focus","blur","selectedLabel"])})}),()=>Gt(Fm,Kn({...c,ref:p=>i.value=p}),{...n,default:()=>[Gt(UDe,{data:u.value}),Gt(HM,Kn({...h,ref:p=>r.value=p}))]})}});var VDe=pt(HDe,[["__file","tree-select.vue"]]);const GDe=nn(VDe),qx=Symbol(),WDe={key:-1,level:-1,data:{}};var kS=(e=>(e.KEY="id",e.LABEL="label",e.CHILDREN="children",e.DISABLED="disabled",e.CLASS="",e))(kS||{}),U1=(e=>(e.ADD="add",e.DELETE="delete",e))(U1||{});const wj={type:Number,default:26},XDe=ht({data:{type:xe(Array),default:()=>os([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:xe(Object),default:()=>os({children:"children",label:"label",disabled:"disabled",value:"id",class:""})},highlightCurrent:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},defaultCheckedKeys:{type:xe(Array),default:()=>os([])},checkStrictly:{type:Boolean,default:!1},defaultExpandedKeys:{type:xe(Array),default:()=>os([])},indent:{type:Number,default:16},itemSize:wj,icon:{type:To},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:{type:Boolean,default:!1},currentNodeKey:{type:xe([String,Number])},accordion:{type:Boolean,default:!1},filterMethod:{type:xe(Function)},perfMode:{type:Boolean,default:!0}}),zDe=ht({node:{type:xe(Object),default:()=>os(WDe)},expanded:{type:Boolean,default:!1},checked:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},current:{type:Boolean,default:!1},hiddenExpandIcon:{type:Boolean,default:!1},itemSize:wj}),YDe=ht({node:{type:xe(Object),required:!0}}),kj="node-click",Nj="node-drop",Pj="node-expand",Dj="node-collapse",xj="current-change",Bj="check",Fj="check-change",Uj="node-contextmenu",KDe={[kj]:(e,t,n)=>e&&t&&n,[Nj]:(e,t,n)=>e&&t&&n,[Pj]:(e,t)=>e&&t,[Dj]:(e,t)=>e&&t,[xj]:(e,t)=>e&&t,[Bj]:(e,t)=>e&&t,[Fj]:(e,t)=>e&&Io(t),[Uj]:(e,t,n)=>e&&t&&n},jDe={click:(e,t)=>!!(e&&t),drop:(e,t)=>!!(e&&t),toggle:e=>!!e,check:(e,t)=>e&&Io(t)};function QDe(e,t){const n=K(new Set),s=K(new Set),{emit:i}=pn();tt([()=>t.value,()=>e.defaultCheckedKeys],()=>Vt(()=>{L(e.defaultCheckedKeys)}),{immediate:!0});const r=()=>{if(!t.value||!e.showCheckbox||e.checkStrictly)return;const{levelTreeNodeMap:I,maxLevel:R}=t.value,w=n.value,k=new Set;for(let D=R-1;D>=1;--D){const P=I.get(D);P&&P.forEach(B=>{const F=B.children;if(F){let X=!0,G=!1;for(const re of F){const _e=re.key;if(w.has(_e))G=!0;else if(k.has(_e)){X=!1,G=!0;break}else X=!1}X?w.add(B.key):G?(k.add(B.key),w.delete(B.key)):(w.delete(B.key),k.delete(B.key))}})}s.value=k},a=I=>n.value.has(I.key),c=I=>s.value.has(I.key),u=(I,R,w=!0,k=!0)=>{const D=n.value,P=(B,F)=>{D[F?U1.ADD:U1.DELETE](B.key);const X=B.children;!e.checkStrictly&&X&&X.forEach(G=>{G.disabled||P(G,F)})};P(I,R),k&&r(),w&&h(I,R)},h=(I,R)=>{const{checkedNodes:w,checkedKeys:k}=v(),{halfCheckedNodes:D,halfCheckedKeys:P}=b();i(Bj,I.data,{checkedKeys:k,checkedNodes:w,halfCheckedKeys:P,halfCheckedNodes:D}),i(Fj,I.data,R)};function f(I=!1){return v(I).checkedKeys}function p(I=!1){return v(I).checkedNodes}function _(){return b().halfCheckedKeys}function E(){return b().halfCheckedNodes}function v(I=!1){const R=[],w=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:k}=t.value;n.value.forEach(D=>{const P=k.get(D);P&&(!I||I&&P.isLeaf)&&(w.push(D),R.push(P.data))})}return{checkedKeys:w,checkedNodes:R}}function b(){const I=[],R=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:w}=t.value;s.value.forEach(k=>{const D=w.get(k);D&&(R.push(k),I.push(D.data))})}return{halfCheckedNodes:I,halfCheckedKeys:R}}function y(I){n.value.clear(),s.value.clear(),Vt(()=>{L(I)})}function S(I,R){if(t!=null&&t.value&&e.showCheckbox){const w=t.value.treeNodeMap.get(I);w&&u(w,R,!1)}}function L(I){if(t!=null&&t.value){const{treeNodeMap:R}=t.value;if(e.showCheckbox&&R&&(I==null?void 0:I.length)>0){for(const w of I){const k=R.get(w);k&&!a(k)&&u(k,!0,!1,!1)}r()}}}return{updateCheckedKeys:r,toggleCheckbox:u,isChecked:a,isIndeterminate:c,getCheckedKeys:f,getCheckedNodes:p,getHalfCheckedKeys:_,getHalfCheckedNodes:E,setChecked:S,setCheckedKeys:y}}function qDe(e,t){const n=K(new Set([])),s=K(new Set([])),i=x(()=>Ut(e.filterMethod));function r(c){var u;if(!i.value)return;const h=new Set,f=s.value,p=n.value,_=[],E=((u=t.value)==null?void 0:u.treeNodes)||[],v=e.filterMethod;p.clear();function b(y){y.forEach(S=>{_.push(S),v!=null&&v(c,S.data,S)?_.forEach(I=>{h.add(I.key)}):S.isLeaf&&p.add(S.key);const L=S.children;if(L&&b(L),!S.isLeaf){if(!h.has(S.key))p.add(S.key);else if(L){let I=!0;for(const R of L)if(!p.has(R.key)){I=!1;break}I?f.add(S.key):f.delete(S.key)}}_.pop()})}return b(E),h}function a(c){return s.value.has(c.key)}return{hiddenExpandIconKeySet:s,hiddenNodeKeySet:n,doFilter:r,isForceHiddenExpandIcon:a}}function JDe(e,t){const n=K(new Set(e.defaultExpandedKeys)),s=K(),i=lo(),r=K();tt(()=>e.currentNodeKey,ee=>{s.value=ee},{immediate:!0}),tt(()=>e.data,ee=>{Pe(ee)},{immediate:!0});const{isIndeterminate:a,isChecked:c,toggleCheckbox:u,getCheckedKeys:h,getCheckedNodes:f,getHalfCheckedKeys:p,getHalfCheckedNodes:_,setChecked:E,setCheckedKeys:v}=QDe(e,i),{doFilter:b,hiddenNodeKeySet:y,isForceHiddenExpandIcon:S}=qDe(e,i),L=x(()=>{var ee;return((ee=e.props)==null?void 0:ee.value)||kS.KEY}),I=x(()=>{var ee;return((ee=e.props)==null?void 0:ee.children)||kS.CHILDREN}),R=x(()=>{var ee;return((ee=e.props)==null?void 0:ee.disabled)||kS.DISABLED}),w=x(()=>{var ee;return((ee=e.props)==null?void 0:ee.label)||kS.LABEL}),k=x(()=>{var ee;const pe=n.value,Oe=y.value,ze=[],Ze=((ee=i.value)==null?void 0:ee.treeNodes)||[],De=[];for(let me=Ze.length-1;me>=0;--me)De.push(Ze[me]);for(;De.length;){const me=De.pop();if(!Oe.has(me.key)&&(ze.push(me),me.children&&pe.has(me.key)))for(let Te=me.children.length-1;Te>=0;--Te)De.push(me.children[Te])}return ze}),D=x(()=>k.value.length>0);function P(ee){const pe=new Map,Oe=new Map;let ze=1;function Ze(me,Te=1,Ue=void 0){var qe;const ct=[];for(const Ne of me){const Se=X(Ne),Je={level:Te,key:Se,data:Ne};Je.label=re(Ne),Je.parent=Ue;const ut=F(Ne);Je.disabled=G(Ne),Je.isLeaf=!ut||ut.length===0,ut&&ut.length&&(Je.children=Ze(ut,Te+1,Je)),ct.push(Je),pe.set(Se,Je),Oe.has(Te)||Oe.set(Te,[]),(qe=Oe.get(Te))==null||qe.push(Je)}return Te>ze&&(ze=Te),ct}const De=Ze(ee);return{treeNodeMap:pe,levelTreeNodeMap:Oe,maxLevel:ze,treeNodes:De}}function B(ee){const pe=b(ee);pe&&(n.value=pe)}function F(ee){return ee[I.value]}function X(ee){return ee?ee[L.value]:""}function G(ee){return ee[R.value]}function re(ee){return ee[w.value]}function _e(ee){n.value.has(ee.key)?ge(ee):he(ee)}function J(ee){const pe=new Set,Oe=i.value.treeNodeMap;ee.forEach(ze=>{let Ze=Oe.get(ze);for(;Ze&&!pe.has(Ze.key);)pe.add(Ze.key),Ze=Ze.parent}),n.value=pe}function Y(ee,pe){t(kj,ee.data,ee,pe),Z(ee),e.expandOnClickNode&&_e(ee),e.showCheckbox&&e.checkOnClickNode&&!ee.disabled&&u(ee,!c(ee),!0)}function ae(ee,pe){t(Nj,ee.data,ee,pe)}function Z(ee){Ae(ee)||(s.value=ee.key,t(xj,ee.data,ee))}function Q(ee,pe){u(ee,pe)}function he(ee){const pe=n.value;if(i.value&&e.accordion){const{treeNodeMap:Oe}=i.value;pe.forEach(ze=>{const Ze=Oe.get(ze);ee&&ee.level===(Ze==null?void 0:Ze.level)&&pe.delete(ze)})}pe.add(ee.key),t(Pj,ee.data,ee)}function ge(ee){n.value.delete(ee.key),t(Dj,ee.data,ee)}function Ie(ee){return n.value.has(ee.key)}function be(ee){return!!ee.disabled}function Ae(ee){const pe=s.value;return pe!==void 0&&pe===ee.key}function We(){var ee,pe;if(s.value)return(pe=(ee=i.value)==null?void 0:ee.treeNodeMap.get(s.value))==null?void 0:pe.data}function $e(){return s.value}function ve(ee){s.value=ee}function Pe(ee){Vt(()=>i.value=P(ee))}function Be(ee){var pe;const Oe=Tn(ee)?X(ee):ee;return(pe=i.value)==null?void 0:pe.treeNodeMap.get(Oe)}function ot(ee,pe="auto"){const Oe=Be(ee);Oe&&r.value&&r.value.scrollToItem(k.value.indexOf(Oe),pe)}function Xe(ee){var pe;(pe=r.value)==null||pe.scrollTo(ee)}return{tree:i,flattenTree:k,isNotEmpty:D,listRef:r,getKey:X,getChildren:F,toggleExpand:_e,toggleCheckbox:u,isExpanded:Ie,isChecked:c,isIndeterminate:a,isDisabled:be,isCurrent:Ae,isForceHiddenExpandIcon:S,handleNodeClick:Y,handleNodeDrop:ae,handleNodeCheck:Q,getCurrentNode:We,getCurrentKey:$e,setCurrentKey:ve,getCheckedKeys:h,getCheckedNodes:f,getHalfCheckedKeys:p,getHalfCheckedNodes:_,setChecked:E,setCheckedKeys:v,filter:B,setData:Pe,getNode:Be,expandNode:he,collapseNode:ge,setExpandedKeys:J,scrollToNode:ot,scrollTo:Xe}}var ZDe=Re({name:"ElTreeNodeContent",props:YDe,setup(e){const t=It(qx),n=rt("tree");return()=>{const s=e.node,{data:i}=s;return t!=null&&t.ctx.slots.default?t.ctx.slots.default({node:s,data:i}):Gt("span",{class:n.be("node","label")},[s==null?void 0:s.label])}}});const exe=Re({name:"ElTreeNode"}),txe=Re({...exe,props:zDe,emits:jDe,setup(e,{emit:t}){const n=e,s=It(qx),i=rt("tree"),r=x(()=>{var E;return(E=s==null?void 0:s.props.indent)!=null?E:16}),a=x(()=>{var E;return(E=s==null?void 0:s.props.icon)!=null?E:f6}),c=E=>{const v=s==null?void 0:s.props.props.class;if(!v)return{};let b;if(Ut(v)){const{data:y}=E;b=v(y,E)}else b=v;return Dt(b)?{[b]:!0}:b},u=E=>{t("click",n.node,E)},h=E=>{t("drop",n.node,E)},f=()=>{t("toggle",n.node)},p=E=>{t("check",n.node,E)},_=E=>{var v,b,y,S;(y=(b=(v=s==null?void 0:s.instance)==null?void 0:v.vnode)==null?void 0:b.props)!=null&&y.onNodeContextmenu&&(E.stopPropagation(),E.preventDefault()),s==null||s.ctx.emit(Uj,E,(S=n.node)==null?void 0:S.data,n.node)};return(E,v)=>{var b,y,S;return H(),le("div",{ref:"node$",class:z([g(i).b("node"),g(i).is("expanded",E.expanded),g(i).is("current",E.current),g(i).is("focusable",!E.disabled),g(i).is("checked",!E.disabled&&E.checked),c(E.node)]),role:"treeitem",tabindex:"-1","aria-expanded":E.expanded,"aria-disabled":E.disabled,"aria-checked":E.checked,"data-key":(b=E.node)==null?void 0:b.key,onClick:Yt(u,["stop"]),onContextmenu:_,onDragover:Yt(()=>{},["prevent"]),onDragenter:Yt(()=>{},["prevent"]),onDrop:Yt(h,["stop"])},[te("div",{class:z(g(i).be("node","content")),style:Bt({paddingLeft:`${(E.node.level-1)*g(r)}px`,height:E.itemSize+"px"})},[g(a)?(H(),Ye(g(Nt),{key:0,class:z([g(i).is("leaf",!!((y=E.node)!=null&&y.isLeaf)),g(i).is("hidden",E.hiddenExpandIcon),{expanded:!((S=E.node)!=null&&S.isLeaf)&&E.expanded},g(i).be("node","expand-icon")]),onClick:Yt(f,["stop"])},{default:de(()=>[(H(),Ye(yn(g(a))))]),_:1},8,["class","onClick"])):Ge("v-if",!0),E.showCheckbox?(H(),Ye(g(uc),{key:1,"model-value":E.checked,indeterminate:E.indeterminate,disabled:E.disabled,onChange:p,onClick:Yt(()=>{},["stop"])},null,8,["model-value","indeterminate","disabled","onClick"])):Ge("v-if",!0),oe(g(ZDe),{node:E.node},null,8,["node"])],6)],42,["aria-expanded","aria-disabled","aria-checked","data-key","onClick","onDragover","onDragenter","onDrop"])}}});var nxe=pt(txe,[["__file","tree-node.vue"]]);const oxe=Re({name:"ElTreeV2"}),sxe=Re({...oxe,props:XDe,emits:KDe,setup(e,{expose:t,emit:n}){const s=e,i=Ks(),r=x(()=>s.itemSize);An(qx,{ctx:{emit:n,slots:i},props:s,instance:pn()}),An(Zu,void 0);const{t:a}=xn(),c=rt("tree"),{flattenTree:u,isNotEmpty:h,listRef:f,toggleExpand:p,isExpanded:_,isIndeterminate:E,isChecked:v,isDisabled:b,isCurrent:y,isForceHiddenExpandIcon:S,handleNodeClick:L,handleNodeDrop:I,handleNodeCheck:R,toggleCheckbox:w,getCurrentNode:k,getCurrentKey:D,setCurrentKey:P,getCheckedKeys:B,getCheckedNodes:F,getHalfCheckedKeys:X,getHalfCheckedNodes:G,setChecked:re,setCheckedKeys:_e,filter:J,setData:Y,getNode:ae,expandNode:Z,collapseNode:Q,setExpandedKeys:he,scrollToNode:ge,scrollTo:Ie}=JDe(s,n);return t({toggleCheckbox:w,getCurrentNode:k,getCurrentKey:D,setCurrentKey:P,getCheckedKeys:B,getCheckedNodes:F,getHalfCheckedKeys:X,getHalfCheckedNodes:G,setChecked:re,setCheckedKeys:_e,filter:J,setData:Y,getNode:ae,expandNode:Z,collapseNode:Q,setExpandedKeys:he,scrollToNode:ge,scrollTo:Ie}),(be,Ae)=>(H(),le("div",{class:z([g(c).b(),{[g(c).m("highlight-current")]:be.highlightCurrent}]),role:"tree"},[g(h)?(H(),Ye(g(SK),{key:0,ref_key:"listRef",ref:f,"class-name":g(c).b("virtual-list"),data:g(u),total:g(u).length,height:be.height,"item-size":g(r),"perf-mode":be.perfMode},{default:de(({data:We,index:$e,style:ve})=>[(H(),Ye(nxe,{key:We[$e].key,style:Bt(ve),node:We[$e],expanded:g(_)(We[$e]),"show-checkbox":be.showCheckbox,checked:g(v)(We[$e]),indeterminate:g(E)(We[$e]),"item-size":g(r),disabled:g(b)(We[$e]),current:g(y)(We[$e]),"hidden-expand-icon":g(S)(We[$e]),onClick:g(L),onToggle:g(p),onCheck:g(R),onDrop:g(I)},null,8,["style","node","expanded","show-checkbox","checked","indeterminate","item-size","disabled","current","hidden-expand-icon","onClick","onToggle","onCheck","onDrop"]))]),_:1},8,["class-name","data","total","height","item-size","perf-mode"])):(H(),le("div",{key:1,class:z(g(c).e("empty-block"))},[He(be.$slots,"empty",{},()=>{var We;return[te("span",{class:z(g(c).e("empty-text"))},Ke((We=be.emptyText)!=null?We:g(a)("el.tree.emptyText")),3)]})],2))],2))}});var ixe=pt(sxe,[["__file","tree.vue"]]);const rxe=nn(ixe),Hj=Symbol("uploadContextKey"),lxe="ElUpload";class axe extends Error{constructor(t,n,s,i){super(t),this.name="UploadAjaxError",this.status=n,this.method=s,this.url=i}}function oW(e,t,n){let s;return n.response?s=`${n.response.error||n.response}`:n.responseText?s=`${n.responseText}`:s=`fail to ${t.method} ${e} ${n.status}`,new axe(s,n.status,t.method,e)}function cxe(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const uxe=e=>{typeof XMLHttpRequest>"u"&&ti(lxe,"XMLHttpRequest is undefined");const t=new XMLHttpRequest,n=e.action;t.upload&&t.upload.addEventListener("progress",r=>{const a=r;a.percent=r.total>0?r.loaded/r.total*100:0,e.onProgress(a)});const s=new FormData;if(e.data)for(const[r,a]of Object.entries(e.data))at(a)&&a.length?s.append(r,...a):s.append(r,a);s.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(oW(n,e,t))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(oW(n,e,t));e.onSuccess(cxe(t))}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const i=e.headers||{};if(i instanceof Headers)i.forEach((r,a)=>t.setRequestHeader(a,r));else for(const[r,a]of Object.entries(i))hi(a)||t.setRequestHeader(r,String(a));return t.send(s),t},Vj=["text","picture","picture-card"];let dxe=1;const H1=()=>Date.now()+dxe++,Gj=ht({action:{type:String,default:"#"},headers:{type:xe(Object)},method:{type:String,default:"post"},data:{type:xe([Object,Function,Promise]),default:()=>os({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:xe(Array),default:()=>os([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:Vj,default:"text"},httpRequest:{type:xe(Function),default:uxe},disabled:Boolean,limit:Number}),hxe=ht({...Gj,beforeUpload:{type:xe(Function),default:ro},beforeRemove:{type:xe(Function)},onRemove:{type:xe(Function),default:ro},onChange:{type:xe(Function),default:ro},onPreview:{type:xe(Function),default:ro},onSuccess:{type:xe(Function),default:ro},onProgress:{type:xe(Function),default:ro},onError:{type:xe(Function),default:ro},onExceed:{type:xe(Function),default:ro},crossorigin:{type:xe(String)}}),fxe=ht({files:{type:xe(Array),default:()=>os([])},disabled:{type:Boolean,default:!1},handlePreview:{type:xe(Function),default:ro},listType:{type:String,values:Vj,default:"text"},crossorigin:{type:xe(String)}}),pxe={remove:e=>!!e},gxe=Re({name:"ElUploadList"}),mxe=Re({...gxe,props:fxe,emits:pxe,setup(e,{emit:t}){const n=e,{t:s}=xn(),i=rt("upload"),r=rt("icon"),a=rt("list"),c=ar(),u=K(!1),h=x(()=>[i.b("list"),i.bm("list",n.listType),i.is("disabled",n.disabled)]),f=p=>{t("remove",p)};return(p,_)=>(H(),Ye(q3,{tag:"ul",class:z(g(h)),name:g(a).b()},{default:de(()=>[(H(!0),le(Lt,null,In(p.files,(E,v)=>(H(),le("li",{key:E.uid||E.name,class:z([g(i).be("list","item"),g(i).is(E.status),{focusing:u.value}]),tabindex:"0",onKeydown:So(b=>!g(c)&&f(E),["delete"]),onFocus:b=>u.value=!0,onBlur:b=>u.value=!1,onClick:b=>u.value=!1},[He(p.$slots,"default",{file:E,index:v},()=>[p.listType==="picture"||E.status!=="uploading"&&p.listType==="picture-card"?(H(),le("img",{key:0,class:z(g(i).be("list","item-thumbnail")),src:E.url,crossorigin:p.crossorigin,alt:""},null,10,["src","crossorigin"])):Ge("v-if",!0),E.status==="uploading"||p.listType!=="picture-card"?(H(),le("div",{key:1,class:z(g(i).be("list","item-info"))},[te("a",{class:z(g(i).be("list","item-name")),onClick:Yt(b=>p.handlePreview(E),["prevent"])},[oe(g(Nt),{class:z(g(r).m("document"))},{default:de(()=>[oe(g(K_e))]),_:1},8,["class"]),te("span",{class:z(g(i).be("list","item-file-name")),title:E.name},Ke(E.name),11,["title"])],10,["onClick"]),E.status==="uploading"?(H(),Ye(g(fK),{key:0,type:p.listType==="picture-card"?"circle":"line","stroke-width":p.listType==="picture-card"?6:2,percentage:Number(E.percentage),style:Bt(p.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):Ge("v-if",!0)],2)):Ge("v-if",!0),te("label",{class:z(g(i).be("list","item-status-label"))},[p.listType==="text"?(H(),Ye(g(Nt),{key:0,class:z([g(r).m("upload-success"),g(r).m("circle-check")])},{default:de(()=>[oe(g(BD))]),_:1},8,["class"])):["picture-card","picture"].includes(p.listType)?(H(),Ye(g(Nt),{key:1,class:z([g(r).m("upload-success"),g(r).m("check")])},{default:de(()=>[oe(g(y$))]),_:1},8,["class"])):Ge("v-if",!0)],2),g(c)?Ge("v-if",!0):(H(),Ye(g(Nt),{key:2,class:z(g(r).m("close")),onClick:b=>f(E)},{default:de(()=>[oe(g(zc))]),_:2},1032,["class","onClick"])),Ge(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),Ge(" This is a bug which needs to be fixed "),Ge(" TODO: Fix the incorrect navigation interaction "),g(c)?Ge("v-if",!0):(H(),le("i",{key:3,class:z(g(r).m("close-tip"))},Ke(g(s)("el.upload.deleteTip")),3)),p.listType==="picture-card"?(H(),le("span",{key:4,class:z(g(i).be("list","item-actions"))},[te("span",{class:z(g(i).be("list","item-preview")),onClick:b=>p.handlePreview(E)},[oe(g(Nt),{class:z(g(r).m("zoom-in"))},{default:de(()=>[oe(g(_6))]),_:1},8,["class"])],10,["onClick"]),g(c)?Ge("v-if",!0):(H(),le("span",{key:0,class:z(g(i).be("list","item-delete")),onClick:b=>f(E)},[oe(g(Nt),{class:z(g(r).m("delete"))},{default:de(()=>[oe(g(W_e))]),_:1},8,["class"])],10,["onClick"]))],2)):Ge("v-if",!0)])],42,["onKeydown","onFocus","onBlur","onClick"]))),128)),He(p.$slots,"append")]),_:3},8,["class","name"]))}});var sW=pt(mxe,[["__file","upload-list.vue"]]);const _xe=ht({disabled:{type:Boolean,default:!1}}),Txe={file:e=>at(e)},Wj="ElUploadDrag",Exe=Re({name:Wj}),vxe=Re({...Exe,props:_xe,emits:Txe,setup(e,{emit:t}){It(Hj)||ti(Wj,"usage: <el-upload><el-upload-dragger /></el-upload>");const s=rt("upload"),i=K(!1),r=ar(),a=u=>{if(r.value)return;i.value=!1,u.stopPropagation();const h=Array.from(u.dataTransfer.files);t("file",h)},c=()=>{r.value||(i.value=!0)};return(u,h)=>(H(),le("div",{class:z([g(s).b("dragger"),g(s).is("dragover",i.value)]),onDrop:Yt(a,["prevent"]),onDragover:Yt(c,["prevent"]),onDragleave:Yt(f=>i.value=!1,["prevent"])},[He(u.$slots,"default")],42,["onDrop","onDragover","onDragleave"]))}});var bxe=pt(vxe,[["__file","upload-dragger.vue"]]);const Oxe=ht({...Gj,beforeUpload:{type:xe(Function),default:ro},onRemove:{type:xe(Function),default:ro},onStart:{type:xe(Function),default:ro},onSuccess:{type:xe(Function),default:ro},onProgress:{type:xe(Function),default:ro},onError:{type:xe(Function),default:ro},onExceed:{type:xe(Function),default:ro}}),Sxe=Re({name:"ElUploadContent",inheritAttrs:!1}),yxe=Re({...Sxe,props:Oxe,setup(e,{expose:t}){const n=e,s=rt("upload"),i=ar(),r=lo({}),a=lo(),c=b=>{if(b.length===0)return;const{autoUpload:y,limit:S,fileList:L,multiple:I,onStart:R,onExceed:w}=n;if(S&&L.length+b.length>S){w(b,L);return}I||(b=b.slice(0,1));for(const k of b){const D=k;D.uid=H1(),R(D),y&&u(D)}},u=async b=>{if(a.value.value="",!n.beforeUpload)return f(b);let y,S={};try{const I=n.data,R=n.beforeUpload(b);S=sy(n.data)?SM(n.data):n.data,y=await R,sy(n.data)&&Hi(I,S)&&(S=SM(n.data))}catch{y=!1}if(y===!1){n.onRemove(b);return}let L=b;y instanceof Blob&&(y instanceof File?L=y:L=new File([y],b.name,{type:b.type})),f(Object.assign(L,{uid:b.uid}),S)},h=async(b,y)=>Ut(b)?b(y):b,f=async(b,y)=>{const{headers:S,data:L,method:I,withCredentials:R,name:w,action:k,onProgress:D,onSuccess:P,onError:B,httpRequest:F}=n;try{y=await h(y??L,b)}catch{n.onRemove(b);return}const{uid:X}=b,G={headers:S||{},withCredentials:R,file:b,data:y,method:I,filename:w,action:k,onProgress:_e=>{D(_e,b)},onSuccess:_e=>{P(_e,b),delete r.value[X]},onError:_e=>{B(_e,b),delete r.value[X]}},re=F(G);r.value[X]=re,re instanceof Promise&&re.then(G.onSuccess,G.onError)},p=b=>{const y=b.target.files;y&&c(Array.from(y))},_=()=>{i.value||(a.value.value="",a.value.click())},E=()=>{_()};return t({abort:b=>{l6(r.value).filter(b?([S])=>String(b.uid)===S:()=>!0).forEach(([S,L])=>{L instanceof XMLHttpRequest&&L.abort(),delete r.value[S]})},upload:u}),(b,y)=>(H(),le("div",{class:z([g(s).b(),g(s).m(b.listType),g(s).is("drag",b.drag),g(s).is("disabled",g(i))]),tabindex:g(i)?"-1":"0",onClick:_,onKeydown:So(Yt(E,["self"]),["enter","space"])},[b.drag?(H(),Ye(bxe,{key:0,disabled:g(i),onFile:c},{default:de(()=>[He(b.$slots,"default")]),_:3},8,["disabled"])):He(b.$slots,"default",{key:1}),te("input",{ref_key:"inputRef",ref:a,class:z(g(s).e("input")),name:b.name,disabled:g(i),multiple:b.multiple,accept:b.accept,type:"file",onChange:p,onClick:Yt(()=>{},["stop"])},null,42,["name","disabled","multiple","accept","onClick"])],42,["tabindex","onKeydown"]))}});var iW=pt(yxe,[["__file","upload-content.vue"]]);const rW="ElUpload",lW=e=>{var t;(t=e.url)!=null&&t.startsWith("blob:")&&URL.revokeObjectURL(e.url)},$xe=(e,t)=>{const n=Z5(e,"fileList",void 0,{passive:!0}),s=E=>n.value.find(v=>v.uid===E.uid);function i(E){var v;(v=t.value)==null||v.abort(E)}function r(E=["ready","uploading","success","fail"]){n.value=n.value.filter(v=>!E.includes(v.status))}function a(E){n.value=n.value.filter(v=>v!==E)}const c=(E,v)=>{const b=s(v);b&&(console.error(E),b.status="fail",a(b),e.onError(E,b,n.value),e.onChange(b,n.value))},u=(E,v)=>{const b=s(v);b&&(e.onProgress(E,b,n.value),b.status="uploading",b.percentage=Math.round(E.percent))},h=(E,v)=>{const b=s(v);b&&(b.status="success",b.response=E,e.onSuccess(E,b,n.value),e.onChange(b,n.value))},f=E=>{hi(E.uid)&&(E.uid=H1());const v={name:E.name,percentage:0,status:"ready",size:E.size,raw:E,uid:E.uid};if(e.listType==="picture-card"||e.listType==="picture")try{v.url=URL.createObjectURL(E)}catch(b){b.message,e.onError(b,v,n.value)}n.value=[...n.value,v],e.onChange(v,n.value)},p=async E=>{const v=E instanceof File?s(E):E;v||ti(rW,"file to be removed not found");const b=y=>{i(y),a(y),e.onRemove(y,n.value),lW(y)};e.beforeRemove?await e.beforeRemove(v,n.value)!==!1&&b(v):b(v)};function _(){n.value.filter(({status:E})=>E==="ready").forEach(({raw:E})=>{var v;return E&&((v=t.value)==null?void 0:v.upload(E))})}return tt(()=>e.listType,E=>{E!=="picture-card"&&E!=="picture"||(n.value=n.value.map(v=>{const{raw:b,url:y}=v;if(!y&&b)try{v.url=URL.createObjectURL(b)}catch(S){e.onError(S,v,n.value)}return v}))}),tt(n,E=>{for(const v of E)v.uid||(v.uid=H1()),v.status||(v.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:i,clearFiles:r,handleError:c,handleProgress:u,handleStart:f,handleSuccess:h,handleRemove:p,submit:_,revokeFileObjectURL:lW}},Ixe=Re({name:"ElUpload"}),Rxe=Re({...Ixe,props:hxe,setup(e,{expose:t}){const n=e,s=ar(),i=lo(),{abort:r,submit:a,clearFiles:c,uploadFiles:u,handleStart:h,handleError:f,handleRemove:p,handleSuccess:_,handleProgress:E,revokeFileObjectURL:v}=$xe(n,i),b=x(()=>n.listType==="picture-card"),y=x(()=>({...n,fileList:u.value,onStart:h,onProgress:E,onSuccess:_,onError:f,onRemove:p}));return vo(()=>{u.value.forEach(v)}),An(Hj,{accept:oo(n,"accept")}),t({abort:r,submit:a,clearFiles:c,handleStart:h,handleRemove:p}),(S,L)=>(H(),le("div",null,[g(b)&&S.showFileList?(H(),Ye(sW,{key:0,disabled:g(s),"list-type":S.listType,files:g(u),crossorigin:S.crossorigin,"handle-preview":S.onPreview,onRemove:g(p)},ic({append:de(()=>[oe(iW,$n({ref_key:"uploadRef",ref:i},g(y)),{default:de(()=>[S.$slots.trigger?He(S.$slots,"trigger",{key:0}):Ge("v-if",!0),!S.$slots.trigger&&S.$slots.default?He(S.$slots,"default",{key:1}):Ge("v-if",!0)]),_:3},16)]),_:2},[S.$slots.file?{name:"default",fn:de(({file:I,index:R})=>[He(S.$slots,"file",{file:I,index:R})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):Ge("v-if",!0),!g(b)||g(b)&&!S.showFileList?(H(),Ye(iW,$n({key:1,ref_key:"uploadRef",ref:i},g(y)),{default:de(()=>[S.$slots.trigger?He(S.$slots,"trigger",{key:0}):Ge("v-if",!0),!S.$slots.trigger&&S.$slots.default?He(S.$slots,"default",{key:1}):Ge("v-if",!0)]),_:3},16)):Ge("v-if",!0),S.$slots.trigger?He(S.$slots,"default",{key:2}):Ge("v-if",!0),He(S.$slots,"tip"),!g(b)&&S.showFileList?(H(),Ye(sW,{key:3,disabled:g(s),"list-type":S.listType,files:g(u),crossorigin:S.crossorigin,"handle-preview":S.onPreview,onRemove:g(p)},ic({_:2},[S.$slots.file?{name:"default",fn:de(({file:I,index:R})=>[He(S.$slots,"file",{file:I,index:R})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):Ge("v-if",!0)]))}});var Cxe=pt(Rxe,[["__file","upload.vue"]]);const Mxe=nn(Cxe),Axe=ht({zIndex:{type:Number,default:9},rotate:{type:Number,default:-22},width:Number,height:Number,image:String,content:{type:xe([String,Array]),default:"Element Plus"},font:{type:xe(Object)},gap:{type:xe(Array),default:()=>[100,100]},offset:{type:xe(Array)}});function Lxe(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function wxe(e){return Object.keys(e).map(t=>`${Lxe(t)}: ${e[t]};`).join(" ")}function kxe(){return window.devicePixelRatio||1}const Nxe=(e,t)=>{let n=!1;return e.removedNodes.length&&t&&(n=Array.from(e.removedNodes).includes(t)),e.type==="attributes"&&e.target===t&&(n=!0),n},Xj=3;function Jw(e,t,n=1){const s=document.createElement("canvas"),i=s.getContext("2d"),r=e*n,a=t*n;return s.setAttribute("width",`${r}px`),s.setAttribute("height",`${a}px`),i.save(),[i,s,r,a]}function Pxe(){function e(t,n,s,i,r,a,c,u){const[h,f,p,_]=Jw(i,r,s);if(t instanceof HTMLImageElement)h.drawImage(t,0,0,p,_);else{const{color:ge,fontSize:Ie,fontStyle:be,fontWeight:Ae,fontFamily:We,textAlign:$e,textBaseline:ve}=a,Pe=Number(Ie)*s;h.font=`${be} normal ${Ae} ${Pe}px/${r}px ${We}`,h.fillStyle=ge,h.textAlign=$e,h.textBaseline=ve;const Be=at(t)?t:[t];Be==null||Be.forEach((ot,Xe)=>{h.fillText(ot??"",p/2,Xe*(Pe+Xj*s))})}const E=Math.PI/180*Number(n),v=Math.max(i,r),[b,y,S]=Jw(v,v,s);b.translate(S/2,S/2),b.rotate(E),p>0&&_>0&&b.drawImage(f,-p/2,-_/2);function L(ge,Ie){const be=ge*Math.cos(E)-Ie*Math.sin(E),Ae=ge*Math.sin(E)+Ie*Math.cos(E);return[be,Ae]}let I=0,R=0,w=0,k=0;const D=p/2,P=_/2;[[0-D,0-P],[0+D,0-P],[0+D,0+P],[0-D,0+P]].forEach(([ge,Ie])=>{const[be,Ae]=L(ge,Ie);I=Math.min(I,be),R=Math.max(R,be),w=Math.min(w,Ae),k=Math.max(k,Ae)});const F=I+S/2,X=w+S/2,G=R-I,re=k-w,_e=c*s,J=u*s,Y=(G+_e)*2,ae=re+J,[Z,Q]=Jw(Y,ae);function he(ge=0,Ie=0){Z.drawImage(y,F,X,G,re,ge,Ie,G,re)}return he(),he(G+_e,-re/2-J/2),he(G+_e,+re/2+J/2),[Q.toDataURL(),Y/s,ae/s]}return e}const Dxe=Re({name:"ElWatermark"}),xxe=Re({...Dxe,props:Axe,setup(e){const t=e,n={position:"relative"},s=x(()=>{var F,X;return(X=(F=t.font)==null?void 0:F.color)!=null?X:"rgba(0,0,0,.15)"}),i=x(()=>{var F,X;return(X=(F=t.font)==null?void 0:F.fontSize)!=null?X:16}),r=x(()=>{var F,X;return(X=(F=t.font)==null?void 0:F.fontWeight)!=null?X:"normal"}),a=x(()=>{var F,X;return(X=(F=t.font)==null?void 0:F.fontStyle)!=null?X:"normal"}),c=x(()=>{var F,X;return(X=(F=t.font)==null?void 0:F.fontFamily)!=null?X:"sans-serif"}),u=x(()=>{var F,X;return(X=(F=t.font)==null?void 0:F.textAlign)!=null?X:"center"}),h=x(()=>{var F,X;return(X=(F=t.font)==null?void 0:F.textBaseline)!=null?X:"hanging"}),f=x(()=>t.gap[0]),p=x(()=>t.gap[1]),_=x(()=>f.value/2),E=x(()=>p.value/2),v=x(()=>{var F,X;return(X=(F=t.offset)==null?void 0:F[0])!=null?X:_.value}),b=x(()=>{var F,X;return(X=(F=t.offset)==null?void 0:F[1])!=null?X:E.value}),y=()=>{const F={zIndex:t.zIndex,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let X=v.value-_.value,G=b.value-E.value;return X>0&&(F.left=`${X}px`,F.width=`calc(100% - ${X}px)`,X=0),G>0&&(F.top=`${G}px`,F.height=`calc(100% - ${G}px)`,G=0),F.backgroundPosition=`${X}px ${G}px`,F},S=lo(null),L=lo(),I=K(!1),R=()=>{L.value&&(L.value.remove(),L.value=void 0)},w=(F,X)=>{var G;S.value&&L.value&&(I.value=!0,L.value.setAttribute("style",wxe({...y(),backgroundImage:`url('${F}')`,backgroundSize:`${Math.floor(X)}px`})),(G=S.value)==null||G.append(L.value),setTimeout(()=>{I.value=!1}))},k=F=>{let X=120,G=64;const re=t.image,_e=t.content,J=t.width,Y=t.height;if(!re&&F.measureText){F.font=`${Number(i.value)}px ${c.value}`;const ae=at(_e)?_e:[_e],Z=ae.map(Q=>{const he=F.measureText(Q);return[he.width,he.fontBoundingBoxAscent!==void 0?he.fontBoundingBoxAscent+he.fontBoundingBoxDescent:he.actualBoundingBoxAscent+he.actualBoundingBoxDescent]});X=Math.ceil(Math.max(...Z.map(Q=>Q[0]))),G=Math.ceil(Math.max(...Z.map(Q=>Q[1])))*ae.length+(ae.length-1)*Xj}return[J??X,Y??G]},D=Pxe(),P=()=>{const X=document.createElement("canvas").getContext("2d"),G=t.image,re=t.content,_e=t.rotate;if(X){L.value||(L.value=document.createElement("div"));const J=kxe(),[Y,ae]=k(X),Z=Q=>{const[he,ge]=D(Q||"",_e,J,Y,ae,{color:s.value,fontSize:i.value,fontStyle:a.value,fontWeight:r.value,fontFamily:c.value,textAlign:u.value,textBaseline:h.value},f.value,p.value);w(he,ge)};if(G){const Q=new Image;Q.onload=()=>{Z(Q)},Q.onerror=()=>{Z(re)},Q.crossOrigin="anonymous",Q.referrerPolicy="no-referrer",Q.src=G}else Z(re)}};return rn(()=>{P()}),tt(()=>t,()=>{P()},{deep:!0,flush:"post"}),vo(()=>{R()}),J5(S,F=>{I.value||F.forEach(X=>{Nxe(X,L.value)&&(R(),P())})},{attributes:!0,subtree:!0,childList:!0}),(F,X)=>(H(),le("div",{ref_key:"containerRef",ref:S,style:Bt([n])},[He(F.$slots,"default")],4))}});var Bxe=pt(xxe,[["__file","watermark.vue"]]);const Fxe=nn(Bxe),Uxe=ht({zIndex:{type:Number,default:1001},visible:Boolean,fill:{type:String,default:"rgba(0,0,0,0.5)"},pos:{type:xe(Object)},targetAreaClickable:{type:Boolean,default:!0}}),Hxe=(e,t,n,s,i)=>{const r=K(null),a=()=>{let p;return Dt(e.value)?p=document.querySelector(e.value):Ut(e.value)?p=e.value():p=e.value,p},c=()=>{const p=a();if(!p||!t.value){r.value=null;return}Vxe(p)||p.scrollIntoView(i.value);const{left:_,top:E,width:v,height:b}=p.getBoundingClientRect();r.value={left:_,top:E,width:v,height:b,radius:0}};rn(()=>{tt([t,e],()=>{c()},{immediate:!0}),window.addEventListener("resize",c)}),vo(()=>{window.removeEventListener("resize",c)});const u=p=>{var _;return(_=at(n.value.offset)?n.value.offset[p]:n.value.offset)!=null?_:6},h=x(()=>{var p;if(!r.value)return r.value;const _=u(0),E=u(1),v=((p=n.value)==null?void 0:p.radius)||2;return{left:r.value.left-_,top:r.value.top-E,width:r.value.width+_*2,height:r.value.height+E*2,radius:v}}),f=x(()=>{const p=a();return!s.value||!p||!window.DOMRect?p||void 0:{getBoundingClientRect(){var _,E,v,b;return window.DOMRect.fromRect({width:((_=h.value)==null?void 0:_.width)||0,height:((E=h.value)==null?void 0:E.height)||0,x:((v=h.value)==null?void 0:v.left)||0,y:((b=h.value)==null?void 0:b.top)||0})}}});return{mergedPosInfo:h,triggerTarget:f}},oL=Symbol("ElTour");function Vxe(e){const t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:s,right:i,bottom:r,left:a}=e.getBoundingClientRect();return s>=0&&a>=0&&i<=t&&r<=n}const Gxe=(e,t,n,s,i,r,a,c)=>{const u=K(),h=K(),f=K({}),p={x:u,y:h,placement:s,strategy:i,middlewareData:f},_=x(()=>{const S=[$j(g(r)),YPe(),zPe(),Wxe()];return g(c)&&g(n)&&S.push(Ij({element:g(n)})),S}),E=async()=>{if(!Dn)return;const S=g(e),L=g(t);if(!S||!L)return;const I=await Rj(S,L,{placement:g(s),strategy:g(i),middleware:g(_)});UE(p).forEach(R=>{p[R].value=I[R]})},v=x(()=>{if(!g(e))return{position:"fixed",top:"50%",left:"50%",transform:"translate3d(-50%, -50%, 0)",maxWidth:"100vw",zIndex:g(a)};const{overflow:S}=g(f);return{position:g(i),zIndex:g(a),top:g(h)!=null?`${g(h)}px`:"",left:g(u)!=null?`${g(u)}px`:"",maxWidth:S!=null&&S.maxWidth?`${S==null?void 0:S.maxWidth}px`:""}}),b=x(()=>{if(!g(c))return{};const{arrow:S}=g(f);return{left:(S==null?void 0:S.x)!=null?`${S==null?void 0:S.x}px`:"",top:(S==null?void 0:S.y)!=null?`${S==null?void 0:S.y}px`:""}});let y;return rn(()=>{const S=g(e),L=g(t);S&&L&&(y=WPe(S,L,E)),Zs(()=>{E()})}),vo(()=>{y&&y()}),{update:E,contentStyle:v,arrowStyle:b}},Wxe=()=>({name:"overflow",async fn(e){const t=await XPe(e);let n=0;return t.left>0&&(n=t.left),t.right>0&&(n=t.right),{data:{maxWidth:e.rects.floating.width-n}}}}),Xxe=Re({name:"ElTourMask",inheritAttrs:!1}),zxe=Re({...Xxe,props:Uxe,setup(e){const t=e,{ns:n}=It(oL),s=x(()=>{var c,u;return(u=(c=t.pos)==null?void 0:c.radius)!=null?u:2}),i=x(()=>{const c=s.value,u=`a${c},${c} 0 0 1`;return{topRight:`${u} ${c},${c}`,bottomRight:`${u} ${-c},${c}`,bottomLeft:`${u} ${-c},${-c}`,topLeft:`${u} ${c},${-c}`}}),r=x(()=>{const c=window.innerWidth,u=window.innerHeight,h=i.value,f=`M${c},0 L0,0 L0,${u} L${c},${u} L${c},0 Z`,p=s.value;return t.pos?`${f} M${t.pos.left+p},${t.pos.top} h${t.pos.width-p*2} ${h.topRight} v${t.pos.height-p*2} ${h.bottomRight} h${-t.pos.width+p*2} ${h.bottomLeft} v${-t.pos.height+p*2} ${h.topLeft} z`:f}),a=x(()=>({fill:t.fill,pointerEvents:"auto",cursor:"auto"}));return Tx(oo(t,"visible"),{ns:n}),(c,u)=>c.visible?(H(),le("div",$n({key:0,class:g(n).e("mask"),style:{position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:c.zIndex,pointerEvents:c.pos&&c.targetAreaClickable?"none":"auto"}},c.$attrs),[(H(),le("svg",{style:{width:"100%",height:"100%"}},[te("path",{class:z(g(n).e("hollow")),style:Bt(g(a)),d:g(r)},null,14,["d"])]))],16)):Ge("v-if",!0)}});var Yxe=pt(zxe,[["__file","mask.vue"]]);const Kxe=["absolute","fixed"],jxe=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],Jx=ht({placement:{type:xe(String),values:jxe,default:"bottom"},reference:{type:xe(Object),default:null},strategy:{type:xe(String),values:Kxe,default:"absolute"},offset:{type:Number,default:10},showArrow:Boolean,zIndex:{type:Number,default:2001}}),Qxe={close:()=>!0},qxe=Re({name:"ElTourContent"}),Jxe=Re({...qxe,props:Jx,emits:Qxe,setup(e,{emit:t}){const n=e,s=K(n.placement),i=K(n.strategy),r=K(null),a=K(null);tt(()=>n.placement,()=>{s.value=n.placement});const{contentStyle:c,arrowStyle:u}=Gxe(oo(n,"reference"),r,a,s,i,oo(n,"offset"),oo(n,"zIndex"),oo(n,"showArrow")),h=x(()=>s.value.split("-")[0]),{ns:f}=It(oL),p=()=>{t("close")},_=E=>{E.detail.focusReason==="pointer"&&E.preventDefault()};return(E,v)=>(H(),le("div",{ref_key:"contentRef",ref:r,style:Bt(g(c)),class:z(g(f).e("content")),"data-side":g(h),tabindex:"-1"},[oe(g(mv),{loop:"",trapped:"","focus-start-el":"container","focus-trap-el":r.value||void 0,onReleaseRequested:p,onFocusoutPrevented:_},{default:de(()=>[He(E.$slots,"default")]),_:3},8,["focus-trap-el"]),E.showArrow?(H(),le("span",{key:0,ref_key:"arrowRef",ref:a,style:Bt(g(u)),class:z(g(f).e("arrow"))},null,6)):Ge("v-if",!0)],14,["data-side"]))}});var Zxe=pt(Jxe,[["__file","content.vue"]]),eBe=Re({name:"ElTourSteps",props:{current:{type:Number,default:0}},emits:["update-total"],setup(e,{slots:t,emit:n}){let s=0;return()=>{var i,r;const a=(i=t.default)==null?void 0:i.call(t),c=[];let u=0;function h(f){at(f)&&f.forEach(p=>{var _;((_=(p==null?void 0:p.type)||{})==null?void 0:_.name)==="ElTourStep"&&(c.push(p),u+=1)})}return a.length&&h(dp((r=a[0])==null?void 0:r.children)),s!==u&&(s=u,n("update-total",u)),c.length?c[e.current]:null}}});const tBe=ht({modelValue:Boolean,current:{type:Number,default:0},showArrow:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeIcon:{type:To},placement:Jx.placement,contentStyle:{type:xe([Object])},mask:{type:xe([Boolean,Object]),default:!0},gap:{type:xe(Object),default:()=>({offset:6,radius:2})},zIndex:{type:Number},scrollIntoViewOptions:{type:xe([Boolean,Object]),default:()=>({block:"center"})},type:{type:xe(String)},appendTo:{type:xe([String,Object]),default:"body"},closeOnPressEscape:{type:Boolean,default:!0},targetAreaClickable:{type:Boolean,default:!0}}),nBe={[un]:e=>Io(e),"update:current":e=>Wt(e),close:e=>Wt(e),finish:()=>!0,change:e=>Wt(e)},oBe=Re({name:"ElTour"}),sBe=Re({...oBe,props:tBe,emits:nBe,setup(e,{emit:t}){const n=e,s=rt("tour"),i=K(0),r=K(),a=Z5(n,"current",t,{passive:!0}),c=x(()=>{var B;return(B=r.value)==null?void 0:B.target}),u=x(()=>[s.b(),y.value==="primary"?s.m("primary"):""]),h=x(()=>{var B;return((B=r.value)==null?void 0:B.placement)||n.placement}),f=x(()=>{var B,F;return(F=(B=r.value)==null?void 0:B.contentStyle)!=null?F:n.contentStyle}),p=x(()=>{var B,F;return(F=(B=r.value)==null?void 0:B.mask)!=null?F:n.mask}),_=x(()=>!!p.value&&n.modelValue),E=x(()=>Io(p.value)?void 0:p.value),v=x(()=>{var B,F;return!!c.value&&((F=(B=r.value)==null?void 0:B.showArrow)!=null?F:n.showArrow)}),b=x(()=>{var B,F;return(F=(B=r.value)==null?void 0:B.scrollIntoViewOptions)!=null?F:n.scrollIntoViewOptions}),y=x(()=>{var B,F;return(F=(B=r.value)==null?void 0:B.type)!=null?F:n.type}),{nextZIndex:S}=pv(),L=S(),I=x(()=>{var B;return(B=n.zIndex)!=null?B:L}),{mergedPosInfo:R,triggerTarget:w}=Hxe(c,oo(n,"modelValue"),oo(n,"gap"),p,b);tt(()=>n.modelValue,B=>{B||(a.value=0)});const k=()=>{n.closeOnPressEscape&&(t("update:modelValue",!1),t("close",a.value))},D=B=>{i.value=B},P=Ks();return An(oL,{currentStep:r,current:a,total:i,showClose:oo(n,"showClose"),closeIcon:oo(n,"closeIcon"),mergedType:y,ns:s,slots:P,updateModelValue(B){t("update:modelValue",B)},onClose(){t("close",a.value)},onFinish(){t("finish")},onChange(){t("change",a.value)}}),(B,F)=>(H(),le(Lt,null,[oe(g(_v),{to:B.appendTo},{default:de(()=>{var X,G;return[te("div",$n({class:g(u)},B.$attrs),[oe(Yxe,{visible:g(_),fill:(X=g(E))==null?void 0:X.color,style:Bt((G=g(E))==null?void 0:G.style),pos:g(R),"z-index":g(I),"target-area-clickable":B.targetAreaClickable},null,8,["visible","fill","style","pos","z-index","target-area-clickable"]),B.modelValue?(H(),Ye(Zxe,{key:g(a),reference:g(w),placement:g(h),"show-arrow":g(v),"z-index":g(I),style:Bt(g(f)),onClose:k},{default:de(()=>[oe(g(eBe),{current:g(a),onUpdateTotal:D},{default:de(()=>[He(B.$slots,"default")]),_:3},8,["current"])]),_:3},8,["reference","placement","show-arrow","z-index","style"])):Ge("v-if",!0)],16)]}),_:3},8,["to"]),Ge(" just for IDE "),Ge("v-if",!0)],64))}});var iBe=pt(sBe,[["__file","tour.vue"]]);const rBe=ht({target:{type:xe([String,Object,Function])},title:String,description:String,showClose:{type:Boolean,default:void 0},closeIcon:{type:To},showArrow:{type:Boolean,default:void 0},placement:Jx.placement,mask:{type:xe([Boolean,Object]),default:void 0},contentStyle:{type:xe([Object])},prevButtonProps:{type:xe(Object)},nextButtonProps:{type:xe(Object)},scrollIntoViewOptions:{type:xe([Boolean,Object]),default:void 0},type:{type:xe(String)}}),lBe={close:()=>!0},aBe=Re({name:"ElTourStep"}),cBe=Re({...aBe,props:rBe,emits:lBe,setup(e,{emit:t}){const n=e,{Close:s}=HD,{t:i}=xn(),{currentStep:r,current:a,total:c,showClose:u,closeIcon:h,mergedType:f,ns:p,slots:_,updateModelValue:E,onClose:v,onFinish:b,onChange:y}=It(oL);tt(n,P=>{r.value=P},{immediate:!0});const S=x(()=>{var P;return(P=n.showClose)!=null?P:u.value}),L=x(()=>{var P,B;return(B=(P=n.closeIcon)!=null?P:h.value)!=null?B:s}),I=P=>{if(P)return cme(P,["children","onClick"])},R=()=>{var P,B;a.value-=1,(P=n.prevButtonProps)!=null&&P.onClick&&((B=n.prevButtonProps)==null||B.onClick()),y()},w=()=>{var P;a.value>=c.value-1?k():a.value+=1,(P=n.nextButtonProps)!=null&&P.onClick&&n.nextButtonProps.onClick(),y()},k=()=>{D(),b()},D=()=>{E(!1),v(),t("close")};return(P,B)=>(H(),le(Lt,null,[g(S)?(H(),le("button",{key:0,"aria-label":"Close",class:z(g(p).e("closebtn")),type:"button",onClick:D},[oe(g(Nt),{class:z(g(p).e("close"))},{default:de(()=>[(H(),Ye(yn(g(L))))]),_:1},8,["class"])],2)):Ge("v-if",!0),te("header",{class:z([g(p).e("header"),{"show-close":g(u)}])},[He(P.$slots,"header",{},()=>[te("span",{role:"heading",class:z(g(p).e("title"))},Ke(P.title),3)])],2),te("div",{class:z(g(p).e("body"))},[He(P.$slots,"default",{},()=>[te("span",null,Ke(P.description),1)])],2),te("footer",{class:z(g(p).e("footer"))},[te("div",{class:z(g(p).b("indicators"))},[g(_).indicators?(H(),Ye(yn(g(_).indicators),{key:0,current:g(a),total:g(c)},null,8,["current","total"])):(H(!0),le(Lt,{key:1},In(g(c),(F,X)=>(H(),le("span",{key:F,class:z([g(p).b("indicator"),X===g(a)?"is-active":""])},null,2))),128))],2),te("div",{class:z(g(p).b("buttons"))},[g(a)>0?(H(),Ye(g(Mi),$n({key:0,size:"small",type:g(f)},I(P.prevButtonProps),{onClick:R}),{default:de(()=>{var F,X;return[Xt(Ke((X=(F=P.prevButtonProps)==null?void 0:F.children)!=null?X:g(i)("el.tour.previous")),1)]}),_:1},16,["type"])):Ge("v-if",!0),g(a)<=g(c)-1?(H(),Ye(g(Mi),$n({key:1,size:"small",type:g(f)==="primary"?"default":"primary"},I(P.nextButtonProps),{onClick:w}),{default:de(()=>{var F,X;return[Xt(Ke((X=(F=P.nextButtonProps)==null?void 0:F.children)!=null?X:g(a)===g(c)-1?g(i)("el.tour.finish"):g(i)("el.tour.next")),1)]}),_:1},16,["type"])):Ge("v-if",!0)],2)],2)],64))}});var zj=pt(cBe,[["__file","step.vue"]]);const uBe=nn(iBe,{TourStep:zj}),dBe=is(zj),hBe=ht({container:{type:xe([String,Object])},offset:{type:Number,default:0},bound:{type:Number,default:15},duration:{type:Number,default:300},marker:{type:Boolean,default:!0},type:{type:xe(String),default:"default"},direction:{type:xe(String),default:"vertical"}}),fBe={change:e=>Dt(e),click:(e,t)=>e instanceof MouseEvent&&(Dt(t)||ho(t))},Yj=Symbol("anchor"),RR=e=>{if(!Dn||e==="")return null;if(Dt(e))try{return document.querySelector(e)}catch{return null}return e};function pBe(e){let t=0;const n=(...s)=>{t&&Bm(t),t=vp(()=>{e(...s),t=0})};return n.cancel=()=>{Bm(t),t=0},n}const gBe=Re({name:"ElAnchor"}),mBe=Re({...gBe,props:hBe,emits:fBe,setup(e,{expose:t,emit:n}){const s=e,i=K(""),r=K(null),a=K(null),c=K(),u={};let h=!1,f=0;const p=rt("anchor"),_=x(()=>[p.b(),s.type==="underline"?p.m("underline"):"",p.m(s.direction)]),E=P=>{u[P.href]=P.el},v=P=>{delete u[P]},b=P=>{i.value!==P&&(i.value=P,n("change",P))};let y=null;const S=P=>{if(!c.value)return;const B=RR(P);if(!B)return;y&&y(),h=!0;const F=aV(B,c.value),X=ZN(B,F),G=F.scrollHeight-F.clientHeight,re=Math.min(X-s.offset,G);y=h_e(c.value,f,re,s.duration,()=>{setTimeout(()=>{h=!1},20)})},L=P=>{P&&(b(P),S(P))},I=(P,B)=>{n("click",P,B),L(B)},R=pBe(()=>{c.value&&(f=cV(c.value));const P=w();h||ho(P)||b(P)}),w=()=>{if(!c.value)return;const P=cV(c.value),B=[];for(const F of Object.keys(u)){const X=RR(F);if(!X)continue;const G=aV(X,c.value),re=ZN(X,G);B.push({top:re-s.offset-s.bound,href:F})}B.sort((F,X)=>F.top-X.top);for(let F=0;F<B.length;F++){const X=B[F],G=B[F+1];if(F===0&&P===0)return"";if(X.top<=P&&(!G||G.top>P))return X.href}},k=()=>{const P=RR(s.container);!P||DA(P)?c.value=window:c.value=P};fo(c,"scroll",R);const D=x(()=>{if(!r.value||!a.value||!i.value)return{};const P=u[i.value];if(!P)return{};const B=r.value.getBoundingClientRect(),F=a.value.getBoundingClientRect(),X=P.getBoundingClientRect();return s.direction==="horizontal"?{left:`${X.left-B.left}px`,width:`${X.width}px`,opacity:1}:{top:`${X.top-B.top+(X.height-F.height)/2}px`,opacity:1}});return rn(()=>{k();const P=decodeURIComponent(window.location.hash);RR(P)?L(P):R()}),tt(()=>s.container,()=>{k()}),An(Yj,{ns:p,direction:s.direction,currentAnchor:i,addLink:E,removeLink:v,handleClick:I}),t({scrollTo:L}),(P,B)=>(H(),le("div",{ref_key:"anchorRef",ref:r,class:z(g(_))},[P.marker?(H(),le("div",{key:0,ref_key:"markerRef",ref:a,class:z(g(p).e("marker")),style:Bt(g(D))},null,6)):Ge("v-if",!0),te("div",{class:z(g(p).e("list"))},[He(P.$slots,"default")],2)],2))}});var _Be=pt(mBe,[["__file","anchor.vue"]]);const TBe=ht({title:String,href:String}),EBe=Re({name:"ElAnchorLink"}),vBe=Re({...EBe,props:TBe,setup(e){const t=e,n=K(null),{ns:s,direction:i,currentAnchor:r,addLink:a,removeLink:c,handleClick:u}=It(Yj),h=x(()=>[s.e("link"),s.is("active",r.value===t.href)]),f=p=>{u(p,t.href)};return tt(()=>t.href,(p,_)=>{Vt(()=>{_&&c(_),p&&a({href:p,el:n.value})})}),rn(()=>{const{href:p}=t;p&&a({href:p,el:n.value})}),vo(()=>{const{href:p}=t;p&&c(p)}),(p,_)=>(H(),le("div",{class:z(g(s).e("item"))},[te("a",{ref_key:"linkRef",ref:n,class:z(g(h)),href:p.href,onClick:f},[He(p.$slots,"default",{},()=>[Xt(Ke(p.title),1)])],10,["href"]),p.$slots["sub-link"]&&g(i)==="vertical"?(H(),le("div",{key:0,class:z(g(s).e("list"))},[He(p.$slots,"sub-link")],2)):Ge("v-if",!0)],2))}});var Kj=pt(vBe,[["__file","anchor-link.vue"]]);const bBe=nn(_Be,{AnchorLink:Kj}),OBe=is(Kj),SBe=ht({direction:{type:xe(String),default:"horizontal"},options:{type:xe(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},block:Boolean,size:Ys,disabled:Boolean,validateEvent:{type:Boolean,default:!0},id:String,name:String,...Xi(["ariaLabel"])}),yBe={[un]:e=>Dt(e)||Wt(e)||Io(e),[_o]:e=>Dt(e)||Wt(e)||Io(e)},$Be=Re({name:"ElSegmented"}),IBe=Re({...$Be,props:SBe,emits:yBe,setup(e,{emit:t}){const n=e,s=rt("segmented"),i=Gi(),r=Fs(),a=ar(),{formItem:c}=lr(),{inputId:u,isLabeledByFormItem:h}=fc(n,{formItemContext:c}),f=K(null),p=Pme(),_=Kn({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),E=B=>{const F=v(B);t(un,F),t(_o,F)},v=B=>Tn(B)?B.value:B,b=B=>Tn(B)?B.label:B,y=B=>!!(a.value||Tn(B)&&B.disabled),S=B=>n.modelValue===v(B),L=B=>n.options.find(F=>v(F)===B),I=B=>[s.e("item"),s.is("selected",S(B)),s.is("disabled",y(B))],R=()=>{if(!f.value)return;const B=f.value.querySelector(".is-selected"),F=f.value.querySelector(".is-selected input");if(!B||!F){_.width=0,_.height=0,_.translateX=0,_.translateY=0,_.focusVisible=!1;return}const X=B.getBoundingClientRect();_.isInit=!0,n.direction==="vertical"?(_.height=X.height,_.translateY=B.offsetTop):(_.width=X.width,_.translateX=B.offsetLeft);try{_.focusVisible=F.matches(":focus-visible")}catch{}},w=x(()=>[s.b(),s.m(r.value),s.is("block",n.block)]),k=x(()=>({width:n.direction==="vertical"?"100%":`${_.width}px`,height:n.direction==="vertical"?`${_.height}px`:"100%",transform:n.direction==="vertical"?`translateY(${_.translateY}px)`:`translateX(${_.translateX}px)`,display:_.isInit?"block":"none"})),D=x(()=>[s.e("item-selected"),s.is("disabled",y(L(n.modelValue))),s.is("focus-visible",_.focusVisible)]),P=x(()=>n.name||i.value);return Xo(f,R),tt(p,R),tt(()=>n.modelValue,()=>{var B;R(),n.validateEvent&&((B=c==null?void 0:c.validate)==null||B.call(c,"change").catch(F=>void 0))},{flush:"post"}),(B,F)=>B.options.length?(H(),le("div",{key:0,id:g(u),ref_key:"segmentedRef",ref:f,class:z(g(w)),role:"radiogroup","aria-label":g(h)?void 0:B.ariaLabel||"segmented","aria-labelledby":g(h)?g(c).labelId:void 0},[te("div",{class:z([g(s).e("group"),g(s).m(n.direction)])},[te("div",{style:Bt(g(k)),class:z(g(D))},null,6),(H(!0),le(Lt,null,In(B.options,(X,G)=>(H(),le("label",{key:G,class:z(I(X))},[te("input",{class:z(g(s).e("item-input")),type:"radio",name:g(P),disabled:y(X),checked:S(X),onChange:re=>E(X)},null,42,["name","disabled","checked","onChange"]),te("div",{class:z(g(s).e("item-label"))},[He(B.$slots,"default",{item:X},()=>[Xt(Ke(b(X)),1)])],2)],2))),128))],2)],10,["id","aria-label","aria-labelledby"])):Ge("v-if",!0)}});var RBe=pt(IBe,[["__file","segmented.vue"]]);const CBe=nn(RBe),MBe=(e,t)=>{const n=e.toLowerCase();return(t.label||t.value).toLowerCase().includes(n)},ABe=(e,t,n)=>{const{selectionEnd:s}=e;if(s===null)return;const i=e.value,r=wr(t);let a=-1,c;for(let u=s-1;u>=0;--u){const h=i[u];if(h===n||h===`
  1919. `||h==="\r"){a=u;continue}if(r.includes(h)){const f=a===-1?s:a;c={pattern:i.slice(u+1,f),start:u+1,end:f,prefix:h,prefixIndex:u,splitIndex:a,selectionEnd:s};break}}return c},LBe=(e,t={debug:!1,useSelectionEnd:!1})=>{const n=e.selectionStart!==null?e.selectionStart:0,s=e.selectionEnd!==null?e.selectionEnd:0,i=t.useSelectionEnd?s:n,r=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];if(t.debug){const _=document.querySelector("#input-textarea-caret-position-mirror-div");_!=null&&_.parentNode&&_.parentNode.removeChild(_)}const a=document.createElement("div");a.id="input-textarea-caret-position-mirror-div",document.body.appendChild(a);const c=a.style,u=window.getComputedStyle(e),h=e.nodeName==="INPUT";c.whiteSpace=h?"nowrap":"pre-wrap",h||(c.wordWrap="break-word"),c.position="absolute",t.debug||(c.visibility="hidden"),r.forEach(_=>{if(h&&_==="lineHeight")if(u.boxSizing==="border-box"){const E=Number.parseInt(u.height),v=Number.parseInt(u.paddingTop)+Number.parseInt(u.paddingBottom)+Number.parseInt(u.borderTopWidth)+Number.parseInt(u.borderBottomWidth),b=v+Number.parseInt(u.lineHeight);E>b?c.lineHeight=`${E-v}px`:E===b?c.lineHeight=u.lineHeight:c.lineHeight="0"}else c.lineHeight=u.height;else c[_]=u[_]}),VA()?e.scrollHeight>Number.parseInt(u.height)&&(c.overflowY="scroll"):c.overflow="hidden",a.textContent=e.value.slice(0,Math.max(0,i)),h&&a.textContent&&(a.textContent=a.textContent.replace(/\s/g," "));const f=document.createElement("span");f.textContent=e.value.slice(Math.max(0,i))||".",f.style.position="relative",f.style.left=`${-e.scrollLeft}px`,f.style.top=`${-e.scrollTop}px`,a.appendChild(f);const p={top:f.offsetTop+Number.parseInt(u.borderTopWidth),left:f.offsetLeft+Number.parseInt(u.borderLeftWidth),height:Number.parseInt(u.fontSize)*1.5};return t.debug?f.style.backgroundColor="#aaa":document.body.removeChild(a),p.left>=e.clientWidth&&(p.left=e.clientWidth),p},wBe=ht({...GD,options:{type:xe(Array),default:()=>[]},prefix:{type:xe([String,Array]),default:"@",validator:e=>Dt(e)?e.length===1:e.every(t=>Dt(t)&&t.length===1)},split:{type:String,default:" ",validator:e=>e.length===1},filterOption:{type:xe([Boolean,Function]),default:()=>MBe,validator:e=>e===!1?!0:Ut(e)},placement:{type:xe(String),default:"bottom"},showArrow:Boolean,offset:{type:Number,default:0},whole:Boolean,checkIsWhole:{type:xe(Function)},modelValue:String,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:xe(Object),default:()=>({})}}),kBe={[un]:e=>Dt(e),search:(e,t)=>Dt(e)&&Dt(t),select:(e,t)=>Dt(e.value)&&Dt(t),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},NBe=ht({options:{type:xe(Array),default:()=>[]},loading:Boolean,disabled:Boolean,contentId:String,ariaLabel:String}),PBe={select:e=>Dt(e.value)},DBe=Re({name:"ElMentionDropdown"}),xBe=Re({...DBe,props:NBe,emits:PBe,setup(e,{expose:t,emit:n}){const s=e,i=rt("mention"),{t:r}=xn(),a=K(-1),c=K(),u=K(),h=K(),f=(I,R)=>[i.be("dropdown","item"),i.is("hovering",a.value===R),i.is("disabled",I.disabled||s.disabled)],p=I=>{I.disabled||s.disabled||n("select",I)},_=I=>{a.value=I},E=x(()=>s.disabled||s.options.every(I=>I.disabled)),v=x(()=>s.options[a.value]),b=()=>{v.value&&n("select",v.value)},y=I=>{const{options:R}=s;if(R.length===0||E.value)return;I==="next"?(a.value++,a.value===R.length&&(a.value=0)):I==="prev"&&(a.value--,a.value<0&&(a.value=R.length-1));const w=R[a.value];if(w.disabled){y(I);return}Vt(()=>S(w))},S=I=>{var R,w,k,D;const{options:P}=s,B=P.findIndex(X=>X.value===I.value),F=(R=u.value)==null?void 0:R[B];if(F){const X=(k=(w=h.value)==null?void 0:w.querySelector)==null?void 0:k.call(w,`.${i.be("dropdown","wrap")}`);X&&DD(X,F)}(D=c.value)==null||D.handleScroll()};return tt(()=>s.options,()=>{E.value||s.options.length===0?a.value=-1:a.value=0},{immediate:!0}),t({hoveringIndex:a,navigateOptions:y,selectHoverOption:b,hoverOption:v}),(I,R)=>(H(),le("div",{ref_key:"dropdownRef",ref:h,class:z(g(i).b("dropdown"))},[I.$slots.header?(H(),le("div",{key:0,class:z(g(i).be("dropdown","header"))},[He(I.$slots,"header")],2)):Ge("v-if",!0),an(oe(g(ld),{id:I.contentId,ref_key:"scrollbarRef",ref:c,tag:"ul","wrap-class":g(i).be("dropdown","wrap"),"view-class":g(i).be("dropdown","list"),role:"listbox","aria-label":I.ariaLabel,"aria-orientation":"vertical"},{default:de(()=>[(H(!0),le(Lt,null,In(I.options,(w,k)=>(H(),le("li",{id:`${I.contentId}-${k}`,ref_for:!0,ref_key:"optionRefs",ref:u,key:k,class:z(f(w,k)),role:"option","aria-disabled":w.disabled||I.disabled||void 0,"aria-selected":a.value===k,onMousemove:D=>_(k),onClick:Yt(D=>p(w),["stop"])},[He(I.$slots,"label",{item:w,index:k},()=>{var D;return[te("span",null,Ke((D=w.label)!=null?D:w.value),1)]})],42,["id","aria-disabled","aria-selected","onMousemove","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class","aria-label"]),[[Yn,I.options.length>0&&!I.loading]]),I.loading?(H(),le("div",{key:1,class:z(g(i).be("dropdown","loading"))},[He(I.$slots,"loading",{},()=>[Xt(Ke(g(r)("el.mention.loading")),1)])],2)):Ge("v-if",!0),I.$slots.footer?(H(),le("div",{key:2,class:z(g(i).be("dropdown","footer"))},[He(I.$slots,"footer")],2)):Ge("v-if",!0)],2))}});var BBe=pt(xBe,[["__file","mention-dropdown.vue"]]);const FBe=Re({name:"ElMention",inheritAttrs:!1}),UBe=Re({...FBe,props:wBe,emits:kBe,setup(e,{expose:t,emit:n}){const s=e,i=x(()=>Bc(s,Object.keys(GD))),r=rt("mention"),a=ar(),c=Gi(),u=K(),h=K(),f=K(),p=K(!1),_=K(),E=K(),v=x(()=>s.showArrow?s.placement:`${s.placement}-start`),b=x(()=>s.showArrow?["bottom","top"]:["bottom-start","top-start"]),y=x(()=>{const{filterOption:G,options:re}=s;return!E.value||!G?re:re.filter(_e=>G(E.value.pattern,_e))}),S=x(()=>p.value&&(!!y.value.length||s.loading)),L=x(()=>{var G;return`${c.value}-${(G=f.value)==null?void 0:G.hoveringIndex}`}),I=G=>{n("update:modelValue",G),B()},R=G=>{var re,_e,J,Y;if(!(!("code"in G)||(re=u.value)!=null&&re.isComposing))switch(G.code){case $t.left:case $t.right:B();break;case $t.up:case $t.down:if(!p.value)return;G.preventDefault(),(_e=f.value)==null||_e.navigateOptions(G.code===$t.up?"prev":"next");break;case $t.enter:case $t.numpadEnter:if(!p.value)return;G.preventDefault(),(J=f.value)!=null&&J.hoverOption?(Y=f.value)==null||Y.selectHoverOption():p.value=!1;break;case $t.esc:if(!p.value)return;G.preventDefault(),p.value=!1;break;case $t.backspace:if(s.whole&&E.value){const{splitIndex:ae,selectionEnd:Z,pattern:Q,prefixIndex:he,prefix:ge}=E.value,Ie=P();if(!Ie)return;const be=Ie.value,Ae=s.options.find($e=>$e.value===Q);if((Ut(s.checkIsWhole)?s.checkIsWhole(Q,ge):Ae)&&ae!==-1&&ae+1===Z){G.preventDefault();const $e=be.slice(0,he)+be.slice(ae+1);n(un,$e);const ve=he;Vt(()=>{Ie.selectionStart=ve,Ie.selectionEnd=ve,X()})}}}},{wrapperRef:w}=Pp(u,{beforeFocus(){return a.value},afterFocus(){B()},beforeBlur(G){var re;return(re=h.value)==null?void 0:re.isFocusInsideContent(G)},afterBlur(){p.value=!1}}),k=()=>{B()},D=G=>{if(!E.value)return;const re=P();if(!re)return;const _e=re.value,{split:J}=s,Y=_e.slice(E.value.end),ae=Y.startsWith(J),Z=`${G.value}${ae?"":J}`,Q=_e.slice(0,E.value.start)+Z+Y;n(un,Q),n("select",G,E.value.prefix);const he=E.value.start+Z.length+(ae?1:0);Vt(()=>{re.selectionStart=he,re.selectionEnd=he,re.focus(),X()})},P=()=>{var G,re;return s.type==="textarea"?(G=u.value)==null?void 0:G.textarea:(re=u.value)==null?void 0:re.input},B=()=>{setTimeout(()=>{F(),X(),Vt(()=>{var G;return(G=h.value)==null?void 0:G.updatePopper()})},0)},F=()=>{const G=P();if(!G)return;const re=LBe(G),_e=G.getBoundingClientRect(),J=u.value.$el.getBoundingClientRect();_.value={position:"absolute",width:0,height:`${re.height}px`,left:`${re.left+_e.left-J.left}px`,top:`${re.top+_e.top-J.top}px`}},X=()=>{const G=P();if(document.activeElement!==G){p.value=!1;return}const{prefix:re,split:_e}=s;if(E.value=ABe(G,re,_e),E.value&&E.value.splitIndex===-1){p.value=!0,n("search",E.value.pattern,E.value.prefix);return}p.value=!1};return t({input:u,tooltip:h,dropdownVisible:S}),(G,re)=>(H(),le("div",{ref_key:"wrapperRef",ref:w,class:z(g(r).b())},[oe(g(Nr),$n($n(g(i),G.$attrs),{ref_key:"elInputRef",ref:u,"model-value":G.modelValue,disabled:g(a),role:g(S)?"combobox":void 0,"aria-activedescendant":g(S)?g(L)||"":void 0,"aria-controls":g(S)?g(c):void 0,"aria-expanded":g(S)||void 0,"aria-label":G.ariaLabel,"aria-autocomplete":g(S)?"none":void 0,"aria-haspopup":g(S)?"listbox":void 0,onInput:I,onKeydown:R,onMousedown:k}),ic({_:2},[In(G.$slots,(_e,J)=>({name:J,fn:de(Y=>[He(G.$slots,J,qa(Th(Y)))])}))]),1040,["model-value","disabled","role","aria-activedescendant","aria-controls","aria-expanded","aria-label","aria-autocomplete","aria-haspopup"]),oe(g(rr),{ref_key:"tooltipRef",ref:h,visible:g(S),"popper-class":[g(r).e("popper"),G.popperClass],"popper-options":G.popperOptions,placement:g(v),"fallback-placements":g(b),effect:"light",pure:"",offset:G.offset,"show-arrow":G.showArrow},{default:de(()=>[te("div",{style:Bt(_.value)},null,4)]),content:de(()=>{var _e;return[oe(BBe,{ref_key:"dropdownRef",ref:f,options:g(y),disabled:g(a),loading:G.loading,"content-id":g(c),"aria-label":G.ariaLabel,onSelect:D,onClick:Yt((_e=u.value)==null?void 0:_e.focus,["stop"])},ic({_:2},[In(G.$slots,(J,Y)=>({name:Y,fn:de(ae=>[He(G.$slots,Y,qa(Th(ae)))])}))]),1032,["options","disabled","loading","content-id","aria-label","onClick"])]}),_:3},8,["visible","popper-class","popper-options","placement","fallback-placements","offset","show-arrow"])],2))}});var HBe=pt(UBe,[["__file","mention.vue"]]);const VBe=nn(HBe);var GBe=[__e,HTe,Pbe,y1e,Hbe,Kbe,z6,rOe,lOe,Mi,Z6,tSe,rSe,SSe,ySe,yye,EY,Aye,uc,BSe,uY,Pye,qye,Jye,zA,y$e,R$e,F$e,U$e,H$e,V$e,G$e,p0e,y0e,$0e,x0e,XY,Y0e,DRe,xRe,BRe,eK,xCe,BCe,Nt,jCe,oK,Nr,sK,dMe,_Me,xMe,BMe,FMe,UMe,zMe,xAe,GAe,JAe,V6,fK,_Y,qSe,QSe,aLe,fLe,vLe,ld,Fm,MM,_Ae,ZLe,awe,cwe,Cwe,kwe,IK,Wwe,Zwe,eke,rke,pNe,gNe,S1e,F1e,U1e,zE,X1e,NIe,q1e,nPe,oPe,rr,dDe,yDe,HM,GDe,rxe,Mxe,Fxe,uBe,dBe,bBe,OBe,CBe,VBe];const ja="ElInfiniteScroll",WBe=50,XBe=200,zBe=0,YBe={delay:{type:Number,default:XBe},distance:{type:Number,default:zBe},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},Zx=(e,t)=>Object.entries(YBe).reduce((n,[s,i])=>{var r,a;const{type:c,default:u}=i,h=e.getAttribute(`infinite-scroll-${s}`);let f=(a=(r=t[h])!=null?r:h)!=null?a:u;return f=f==="false"?!1:f,f=c(f),n[s]=Number.isNaN(f)?u:f,n},{}),jj=e=>{const{observer:t}=e[ja];t&&(t.disconnect(),delete e[ja].observer)},KBe=(e,t)=>{const{container:n,containerEl:s,instance:i,observer:r,lastScrollTop:a}=e[ja],{disabled:c,distance:u}=Zx(e,i),{clientHeight:h,scrollHeight:f,scrollTop:p}=s,_=p-a;if(e[ja].lastScrollTop=p,r||c||_<0)return;let E=!1;if(n===e)E=f-(h+p)<=u;else{const{clientTop:v,scrollHeight:b}=e,y=ZN(e,s);E=p+h>=y+v+b-u}E&&t.call(i)};function Zw(e,t){const{containerEl:n,instance:s}=e[ja],{disabled:i}=Zx(e,s);i||n.clientHeight===0||(n.scrollHeight<=n.clientHeight?t.call(s):jj(e))}const jBe={async mounted(e,t){const{instance:n,value:s}=t;Ut(s)||ti(ja,"'v-infinite-scroll' binding value must be a function"),await Vt();const{delay:i,immediate:r}=Zx(e,n),a=PD(e,!0),c=a===window?document.documentElement:a,u=Om(KBe.bind(null,e,s),i);if(a){if(e[ja]={instance:n,container:a,containerEl:c,delay:i,cb:s,onScroll:u,lastScrollTop:c.scrollTop},r){const h=new MutationObserver(Om(Zw.bind(null,e,s),WBe));e[ja].observer=h,h.observe(e,{childList:!0,subtree:!0}),Zw(e,s)}a.addEventListener("scroll",u)}},unmounted(e){if(!e[ja])return;const{container:t,onScroll:n}=e[ja];t==null||t.removeEventListener("scroll",n),jj(e)},async updated(e){if(!e[ja])await Vt();else{const{containerEl:t,cb:n,observer:s}=e[ja];t.clientHeight&&s&&Zw(e,n)}}},V1=jBe;V1.install=e=>{e.directive("InfiniteScroll",V1)};const QBe=V1;function qBe(e){let t;const n=K(!1),s=Kn({...e,originalPosition:"",originalOverflow:"",visible:!1});function i(_){s.text=_}function r(){const _=s.parent,E=p.ns;if(!_.vLoadingAddClassList){let v=_.getAttribute("loading-number");v=Number.parseInt(v)-1,v?_.setAttribute("loading-number",v.toString()):(Dr(_,E.bm("parent","relative")),_.removeAttribute("loading-number")),Dr(_,E.bm("parent","hidden"))}a(),f.unmount()}function a(){var _,E;(E=(_=p.$el)==null?void 0:_.parentNode)==null||E.removeChild(p.$el)}function c(){var _;e.beforeClose&&!e.beforeClose()||(n.value=!0,clearTimeout(t),t=setTimeout(u,400),s.visible=!1,(_=e.closed)==null||_.call(e))}function u(){if(!n.value)return;const _=s.parent;n.value=!1,_.vLoadingAddClassList=void 0,r()}const f=nX(Re({name:"ElLoading",setup(_,{expose:E}){const{ns:v,zIndex:b}=FA("loading");return E({ns:v,zIndex:b}),()=>{const y=s.spinner||s.svg,S=Gt("svg",{class:"circular",viewBox:s.svgViewBox?s.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},[Gt("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),L=s.text?Gt("p",{class:v.b("text")},[s.text]):void 0;return Gt(Li,{name:v.b("fade"),onAfterLeave:u},{default:de(()=>[an(oe("div",{style:{backgroundColor:s.background||""},class:[v.b("mask"),s.customClass,s.fullscreen?"is-fullscreen":""]},[Gt("div",{class:v.b("spinner")},[S,L])]),[[Yn,s.visible]])])})}}})),p=f.mount(document.createElement("div"));return{...fi(s),setText:i,removeElLoadingChild:a,close:c,handleAfterLeave:u,vm:p,get $el(){return p.$el}}}let CR;const G1=function(e={}){if(!Dn)return;const t=JBe(e);if(t.fullscreen&&CR)return CR;const n=qBe({...t,closed:()=>{var i;(i=t.closed)==null||i.call(t),t.fullscreen&&(CR=void 0)}});ZBe(t,t.parent,n),aW(t,t.parent,n),t.parent.vLoadingAddClassList=()=>aW(t,t.parent,n);let s=t.parent.getAttribute("loading-number");return s?s=`${Number.parseInt(s)+1}`:s="1",t.parent.setAttribute("loading-number",s),t.parent.appendChild(n.$el),Vt(()=>n.visible.value=t.visible),t.fullscreen&&(CR=n),n},JBe=e=>{var t,n,s,i;let r;return Dt(e.target)?r=(t=document.querySelector(e.target))!=null?t:document.body:r=e.target||document.body,{parent:r===document.body||e.body?document.body:r,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:r===document.body&&((n=e.fullscreen)!=null?n:!0),lock:(s=e.lock)!=null?s:!1,customClass:e.customClass||"",visible:(i=e.visible)!=null?i:!0,beforeClose:e.beforeClose,closed:e.closed,target:r}},ZBe=async(e,t,n)=>{const{nextZIndex:s}=n.vm.zIndex||n.vm._.exposed.zIndex,i={};if(e.fullscreen)n.originalPosition.value=hh(document.body,"position"),n.originalOverflow.value=hh(document.body,"overflow"),i.zIndex=s();else if(e.parent===document.body){n.originalPosition.value=hh(document.body,"position"),await Vt();for(const r of["top","left"]){const a=r==="top"?"scrollTop":"scrollLeft";i[r]=`${e.target.getBoundingClientRect()[r]+document.body[a]+document.documentElement[a]-Number.parseInt(hh(document.body,`margin-${r}`),10)}px`}for(const r of["height","width"])i[r]=`${e.target.getBoundingClientRect()[r]}px`}else n.originalPosition.value=hh(t,"position");for(const[r,a]of Object.entries(i))n.$el.style[r]=a},aW=(e,t,n)=>{const s=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?Dr(t,s.bm("parent","relative")):ec(t,s.bm("parent","relative")),e.fullscreen&&e.lock?ec(t,s.bm("parent","hidden")):Dr(t,s.bm("parent","hidden"))},NC=Symbol("ElLoading"),cW=(e,t)=>{var n,s,i,r;const a=t.instance,c=_=>Tn(t.value)?t.value[_]:void 0,u=_=>{const E=Dt(_)&&(a==null?void 0:a[_])||_;return E&&K(E)},h=_=>u(c(_)||e.getAttribute(`element-loading-${Ih(_)}`)),f=(n=c("fullscreen"))!=null?n:t.modifiers.fullscreen,p={text:h("text"),svg:h("svg"),svgViewBox:h("svgViewBox"),spinner:h("spinner"),background:h("background"),customClass:h("customClass"),fullscreen:f,target:(s=c("target"))!=null?s:f?void 0:e,body:(i=c("body"))!=null?i:t.modifiers.body,lock:(r=c("lock"))!=null?r:t.modifiers.lock};e[NC]={options:p,instance:G1(p)}},eFe=(e,t)=>{for(const n of Object.keys(t))po(t[n])&&(t[n].value=e[n])},uW={mounted(e,t){t.value&&cW(e,t)},updated(e,t){const n=e[NC];t.oldValue!==t.value&&(t.value&&!t.oldValue?cW(e,t):t.value&&t.oldValue?Tn(t.value)&&eFe(t.value,n.options):n==null||n.instance.close())},unmounted(e){var t;(t=e[NC])==null||t.instance.close(),e[NC]=null}},tFe={install(e){e.directive("loading",uW),e.config.globalProperties.$loading=G1},directive:uW,service:G1},Qj=["success","info","warning","error"],Ir=os({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:Dn?document.body:void 0}),nFe=ht({customClass:{type:String,default:Ir.customClass},center:{type:Boolean,default:Ir.center},dangerouslyUseHTMLString:{type:Boolean,default:Ir.dangerouslyUseHTMLString},duration:{type:Number,default:Ir.duration},icon:{type:To,default:Ir.icon},id:{type:String,default:Ir.id},message:{type:xe([String,Object,Function]),default:Ir.message},onClose:{type:xe(Function),default:Ir.onClose},showClose:{type:Boolean,default:Ir.showClose},type:{type:String,values:Qj,default:Ir.type},plain:{type:Boolean,default:Ir.plain},offset:{type:Number,default:Ir.offset},zIndex:{type:Number,default:Ir.zIndex},grouping:{type:Boolean,default:Ir.grouping},repeatNum:{type:Number,default:Ir.repeatNum}}),oFe={destroy:()=>!0},Fc=iP([]),sFe=e=>{const t=Fc.findIndex(i=>i.id===e),n=Fc[t];let s;return t>0&&(s=Fc[t-1]),{current:n,prev:s}},iFe=e=>{const{prev:t}=sFe(e);return t?t.vm.exposed.bottom.value:0},rFe=(e,t)=>Fc.findIndex(s=>s.id===e)>0?16:t,lFe=Re({name:"ElMessage"}),aFe=Re({...lFe,props:nFe,emits:oFe,setup(e,{expose:t}){const n=e,{Close:s}=VD,{ns:i,zIndex:r}=FA("message"),{currentZIndex:a,nextZIndex:c}=r,u=K(),h=K(!1),f=K(0);let p;const _=x(()=>n.type?n.type==="error"?"danger":n.type:"info"),E=x(()=>{const D=n.type;return{[i.bm("icon",D)]:D&&yp[D]}}),v=x(()=>n.icon||yp[n.type]||""),b=x(()=>iFe(n.id)),y=x(()=>rFe(n.id,n.offset)+b.value),S=x(()=>f.value+y.value),L=x(()=>({top:`${y.value}px`,zIndex:a.value}));function I(){n.duration!==0&&({stop:p}=xm(()=>{w()},n.duration))}function R(){p==null||p()}function w(){h.value=!1}function k({code:D}){D===$t.esc&&w()}return rn(()=>{I(),c(),h.value=!0}),tt(()=>n.repeatNum,()=>{R(),I()}),fo(document,"keydown",k),Xo(u,()=>{f.value=u.value.getBoundingClientRect().height}),t({visible:h,bottom:S,close:w}),(D,P)=>(H(),Ye(Li,{name:g(i).b("fade"),onBeforeLeave:D.onClose,onAfterLeave:B=>D.$emit("destroy"),persisted:""},{default:de(()=>[an(te("div",{id:D.id,ref_key:"messageRef",ref:u,class:z([g(i).b(),{[g(i).m(D.type)]:D.type},g(i).is("center",D.center),g(i).is("closable",D.showClose),g(i).is("plain",D.plain),D.customClass]),style:Bt(g(L)),role:"alert",onMouseenter:R,onMouseleave:I},[D.repeatNum>1?(H(),Ye(g(z6),{key:0,value:D.repeatNum,type:g(_),class:z(g(i).e("badge"))},null,8,["value","type","class"])):Ge("v-if",!0),g(v)?(H(),Ye(g(Nt),{key:1,class:z([g(i).e("icon"),g(E)])},{default:de(()=>[(H(),Ye(yn(g(v))))]),_:1},8,["class"])):Ge("v-if",!0),He(D.$slots,"default",{},()=>[D.dangerouslyUseHTMLString?(H(),le(Lt,{key:1},[Ge(" Caution here, message could've been compromised, never use user's input as message "),te("p",{class:z(g(i).e("content")),innerHTML:D.message},null,10,["innerHTML"])],2112)):(H(),le("p",{key:0,class:z(g(i).e("content"))},Ke(D.message),3))]),D.showClose?(H(),Ye(g(Nt),{key:2,class:z(g(i).e("closeBtn")),onClick:Yt(w,["stop"])},{default:de(()=>[oe(g(s))]),_:1},8,["class","onClick"])):Ge("v-if",!0)],46,["id"]),[[Yn,h.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var cFe=pt(aFe,[["__file","message.vue"]]);let uFe=1;const qj=e=>{const t=!e||Dt(e)||zo(e)||Ut(e)?{message:e}:e,n={...Ir,...t};if(!n.appendTo)n.appendTo=document.body;else if(Dt(n.appendTo)){let s=document.querySelector(n.appendTo);pa(s)||(s=document.body),n.appendTo=s}return Io(Nc.grouping)&&!n.grouping&&(n.grouping=Nc.grouping),Wt(Nc.duration)&&n.duration===3e3&&(n.duration=Nc.duration),Wt(Nc.offset)&&n.offset===16&&(n.offset=Nc.offset),Io(Nc.showClose)&&!n.showClose&&(n.showClose=Nc.showClose),n},dFe=e=>{const t=Fc.indexOf(e);if(t===-1)return;Fc.splice(t,1);const{handler:n}=e;n.close()},hFe=({appendTo:e,...t},n)=>{const s=`message_${uFe++}`,i=t.onClose,r=document.createElement("div"),a={...t,id:s,onClose:()=>{i==null||i(),dFe(f)},onDestroy:()=>{fp(null,r)}},c=oe(cFe,a,Ut(a.message)||zo(a.message)?{default:Ut(a.message)?a.message:()=>a.message}:null);c.appContext=n||ZE._context,fp(c,r),e.appendChild(r.firstElementChild);const u=c.component,f={id:s,vnode:c,vm:u,handler:{close:()=>{u.exposed.visible.value=!1}},props:c.component.props};return f},ZE=(e={},t)=>{if(!Dn)return{close:()=>{}};const n=qj(e);if(n.grouping&&Fc.length){const i=Fc.find(({vnode:r})=>{var a;return((a=r.props)==null?void 0:a.message)===n.message});if(i)return i.props.repeatNum+=1,i.props.type=n.type,i.handler}if(Wt(Nc.max)&&Fc.length>=Nc.max)return{close:()=>{}};const s=hFe(n,t);return Fc.push(s),s.handler};Qj.forEach(e=>{ZE[e]=(t={},n)=>{const s=qj(t);return ZE({...s,type:e},n)}});function fFe(e){for(const t of Fc)(!e||e===t.props.type)&&t.handler.close()}ZE.closeAll=fFe;ZE._context=null;const Bo=h6(ZE,"$message"),W1="_trap-focus-children",mm=[],dW=e=>{if(mm.length===0)return;const t=mm[mm.length-1][W1];if(t.length>0&&e.code===$t.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const n=e.shiftKey,s=e.target===t[0],i=e.target===t[t.length-1];s&&n&&(e.preventDefault(),t[t.length-1].focus()),i&&!n&&(e.preventDefault(),t[0].focus())}},pFe={beforeMount(e){e[W1]=pV(e),mm.push(e),mm.length<=1&&document.addEventListener("keydown",dW)},updated(e){Vt(()=>{e[W1]=pV(e)})},unmounted(){mm.shift(),mm.length===0&&document.removeEventListener("keydown",dW)}},gFe=Re({name:"ElMessageBox",directives:{TrapFocus:pFe},components:{ElButton:Mi,ElFocusTrap:mv,ElInput:Nr,ElOverlay:_x,ElIcon:Nt,...VD},inheritAttrs:!1,props:{buttonSize:{type:String,validator:CK},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:n,zIndex:s,ns:i,size:r}=FA("message-box",x(()=>e.buttonSize)),{t:a}=n,{nextZIndex:c}=s,u=K(!1),h=Kn({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:zu(Ju),cancelButtonLoadingIcon:zu(Ju),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:c()}),f=x(()=>{const Y=h.type;return{[i.bm("icon",Y)]:Y&&yp[Y]}}),p=Gi(),_=Gi(),E=x(()=>h.icon||yp[h.type]||""),v=x(()=>!!h.message),b=K(),y=K(),S=K(),L=K(),I=K(),R=x(()=>h.confirmButtonClass);tt(()=>h.inputValue,async Y=>{await Vt(),e.boxType==="prompt"&&Y!==null&&G()},{immediate:!0}),tt(()=>u.value,Y=>{var ae,Z;Y&&(e.boxType!=="prompt"&&(h.autofocus?S.value=(Z=(ae=I.value)==null?void 0:ae.$el)!=null?Z:b.value:S.value=b.value),h.zIndex=c()),e.boxType==="prompt"&&(Y?Vt().then(()=>{var Q;L.value&&L.value.$el&&(h.autofocus?S.value=(Q=re())!=null?Q:b.value:S.value=b.value)}):(h.editorErrorMessage="",h.validateError=!1))});const w=x(()=>e.draggable),k=x(()=>e.overflow);HY(b,y,w,k),rn(async()=>{await Vt(),e.closeOnHashChange&&window.addEventListener("hashchange",D)}),vo(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",D)});function D(){u.value&&(u.value=!1,Vt(()=>{h.action&&t("action",h.action)}))}const P=()=>{e.closeOnClickModal&&X(h.distinguishCancelAndClose?"close":"cancel")},B=mx(P),F=Y=>{if(h.inputType!=="textarea")return Y.preventDefault(),X("confirm")},X=Y=>{var ae;e.boxType==="prompt"&&Y==="confirm"&&!G()||(h.action=Y,h.beforeClose?(ae=h.beforeClose)==null||ae.call(h,Y,h,D):D())},G=()=>{if(e.boxType==="prompt"){const Y=h.inputPattern;if(Y&&!Y.test(h.inputValue||""))return h.editorErrorMessage=h.inputErrorMessage||a("el.messagebox.error"),h.validateError=!0,!1;const ae=h.inputValidator;if(Ut(ae)){const Z=ae(h.inputValue);if(Z===!1)return h.editorErrorMessage=h.inputErrorMessage||a("el.messagebox.error"),h.validateError=!0,!1;if(Dt(Z))return h.editorErrorMessage=Z,h.validateError=!0,!1}}return h.editorErrorMessage="",h.validateError=!1,!0},re=()=>{const Y=L.value.$refs;return Y.input||Y.textarea},_e=()=>{X("close")},J=()=>{e.closeOnPressEscape&&_e()};return e.lockScroll&&Tx(u),{...fi(h),ns:i,overlayEvent:B,visible:u,hasMessage:v,typeClass:f,contentId:p,inputId:_,btnSize:r,iconComponent:E,confirmButtonClasses:R,rootRef:b,focusStartRef:S,headerRef:y,inputRef:L,confirmRef:I,doClose:D,handleClose:_e,onCloseRequested:J,handleWrapperClick:P,handleInputEnter:F,handleAction:X,t:a}}});function mFe(e,t,n,s,i,r){const a=Ot("el-icon"),c=Ot("close"),u=Ot("el-input"),h=Ot("el-button"),f=Ot("el-focus-trap"),p=Ot("el-overlay");return H(),Ye(Li,{name:"fade-in-linear",onAfterLeave:_=>e.$emit("vanish"),persisted:""},{default:de(()=>[an(oe(p,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:de(()=>[te("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:z(`${e.ns.namespace.value}-overlay-message-box`),onClick:e.overlayEvent.onClick,onMousedown:e.overlayEvent.onMousedown,onMouseup:e.overlayEvent.onMouseup},[oe(f,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:de(()=>[te("div",{ref:"rootRef",class:z([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:Bt(e.customStyle),tabindex:"-1",onClick:Yt(()=>{},["stop"])},[e.title!==null&&e.title!==void 0?(H(),le("div",{key:0,ref:"headerRef",class:z([e.ns.e("header"),{"show-close":e.showClose}])},[te("div",{class:z(e.ns.e("title"))},[e.iconComponent&&e.center?(H(),Ye(a,{key:0,class:z([e.ns.e("status"),e.typeClass])},{default:de(()=>[(H(),Ye(yn(e.iconComponent)))]),_:1},8,["class"])):Ge("v-if",!0),te("span",null,Ke(e.title),1)],2),e.showClose?(H(),le("button",{key:0,type:"button",class:z(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:_=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),onKeydown:So(Yt(_=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[oe(a,{class:z(e.ns.e("close"))},{default:de(()=>[oe(c)]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):Ge("v-if",!0)],2)):Ge("v-if",!0),te("div",{id:e.contentId,class:z(e.ns.e("content"))},[te("div",{class:z(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(H(),Ye(a,{key:0,class:z([e.ns.e("status"),e.typeClass])},{default:de(()=>[(H(),Ye(yn(e.iconComponent)))]),_:1},8,["class"])):Ge("v-if",!0),e.hasMessage?(H(),le("div",{key:1,class:z(e.ns.e("message"))},[He(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(H(),Ye(yn(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(H(),Ye(yn(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:de(()=>[Xt(Ke(e.dangerouslyUseHTMLString?"":e.message),1)]),_:1},8,["for"]))])],2)):Ge("v-if",!0)],2),an(te("div",{class:z(e.ns.e("input"))},[oe(u,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":_=>e.inputValue=_,type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:z({invalid:e.validateError}),onKeydown:So(e.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),te("div",{class:z(e.ns.e("errormsg")),style:Bt({visibility:e.editorErrorMessage?"visible":"hidden"})},Ke(e.editorErrorMessage),7)],2),[[Yn,e.showInput]])],10,["id"]),te("div",{class:z(e.ns.e("btns"))},[e.showCancelButton?(H(),Ye(h,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:z([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:_=>e.handleAction("cancel"),onKeydown:So(Yt(_=>e.handleAction("cancel"),["prevent"]),["enter"])},{default:de(()=>[Xt(Ke(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):Ge("v-if",!0),an(oe(h,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:z([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:_=>e.handleAction("confirm"),onKeydown:So(Yt(_=>e.handleAction("confirm"),["prevent"]),["enter"])},{default:de(()=>[Xt(Ke(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[Yn,e.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[Yn,e.visible]])]),_:3},8,["onAfterLeave"])}var _Fe=pt(gFe,[["render",mFe],["__file","index.vue"]]);const Zy=new Map,TFe=e=>{let t=document.body;return e.appendTo&&(Dt(e.appendTo)&&(t=document.querySelector(e.appendTo)),pa(e.appendTo)&&(t=e.appendTo),pa(t)||(t=document.body)),t},EFe=(e,t,n=null)=>{const s=oe(_Fe,e,Ut(e.message)||zo(e.message)?{default:Ut(e.message)?e.message:()=>e.message}:null);return s.appContext=n,fp(s,t),TFe(e).appendChild(t.firstElementChild),s.component},vFe=()=>document.createElement("div"),bFe=(e,t)=>{const n=vFe();e.onVanish=()=>{fp(null,n),Zy.delete(i)},e.onAction=r=>{const a=Zy.get(i);let c;e.showInput?c={value:i.inputValue,action:r}:c=r,e.callback?e.callback(c,s.proxy):r==="cancel"||r==="close"?e.distinguishCancelAndClose&&r!=="cancel"?a.reject("close"):a.reject("cancel"):a.resolve(c)};const s=EFe(e,n,t),i=s.proxy;for(const r in e)zn(e,r)&&!zn(i.$props,r)&&(i[r]=e[r]);return i.visible=!0,i};function bv(e,t=null){if(!Dn)return Promise.reject();let n;return Dt(e)||zo(e)?e={message:e}:n=e.callback,new Promise((s,i)=>{const r=bFe(e,t??bv._context);Zy.set(r,{options:e,callback:n,resolve:s,reject:i})})}const OFe=["alert","confirm","prompt"],SFe={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};OFe.forEach(e=>{bv[e]=yFe(e)});function yFe(e){return(t,n,s,i)=>{let r="";return Tn(n)?(s=n,r=""):ho(n)?r="":r=n,bv(Object.assign({title:r,message:t,type:"",...SFe[e]},s,{boxType:e}),i)}}bv.close=()=>{Zy.forEach((e,t)=>{t.doClose()}),Zy.clear()};bv._context=null;const Xf=bv;Xf.install=e=>{Xf._context=e._context,e.config.globalProperties.$msgbox=Xf,e.config.globalProperties.$messageBox=Xf,e.config.globalProperties.$alert=Xf.alert,e.config.globalProperties.$confirm=Xf.confirm,e.config.globalProperties.$prompt=Xf.prompt};const $Fe=Xf,Jj=["success","info","warning","error"],IFe=ht({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:To},id:{type:String,default:""},message:{type:xe([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:xe(Function),default:()=>{}},onClose:{type:xe(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...Jj,""],default:""},zIndex:Number}),RFe={destroy:()=>!0},CFe=Re({name:"ElNotification"}),MFe=Re({...CFe,props:IFe,emits:RFe,setup(e,{expose:t}){const n=e,{ns:s,zIndex:i}=FA("notification"),{nextZIndex:r,currentZIndex:a}=i,{Close:c}=HD,u=K(!1);let h;const f=x(()=>{const I=n.type;return I&&yp[n.type]?s.m(I):""}),p=x(()=>n.type&&yp[n.type]||n.icon),_=x(()=>n.position.endsWith("right")?"right":"left"),E=x(()=>n.position.startsWith("top")?"top":"bottom"),v=x(()=>{var I;return{[E.value]:`${n.offset}px`,zIndex:(I=n.zIndex)!=null?I:a.value}});function b(){n.duration>0&&({stop:h}=xm(()=>{u.value&&S()},n.duration))}function y(){h==null||h()}function S(){u.value=!1}function L({code:I}){I===$t.delete||I===$t.backspace?y():I===$t.esc?u.value&&S():b()}return rn(()=>{b(),r(),u.value=!0}),fo(document,"keydown",L),t({visible:u,close:S}),(I,R)=>(H(),Ye(Li,{name:g(s).b("fade"),onBeforeLeave:I.onClose,onAfterLeave:w=>I.$emit("destroy"),persisted:""},{default:de(()=>[an(te("div",{id:I.id,class:z([g(s).b(),I.customClass,g(_)]),style:Bt(g(v)),role:"alert",onMouseenter:y,onMouseleave:b,onClick:I.onClick},[g(p)?(H(),Ye(g(Nt),{key:0,class:z([g(s).e("icon"),g(f)])},{default:de(()=>[(H(),Ye(yn(g(p))))]),_:1},8,["class"])):Ge("v-if",!0),te("div",{class:z(g(s).e("group"))},[te("h2",{class:z(g(s).e("title")),textContent:Ke(I.title)},null,10,["textContent"]),an(te("div",{class:z(g(s).e("content")),style:Bt(I.title?void 0:{margin:0})},[He(I.$slots,"default",{},()=>[I.dangerouslyUseHTMLString?(H(),le(Lt,{key:1},[Ge(" Caution here, message could've been compromised, never use user's input as message "),te("p",{innerHTML:I.message},null,8,["innerHTML"])],2112)):(H(),le("p",{key:0},Ke(I.message),1))])],6),[[Yn,I.message]]),I.showClose?(H(),Ye(g(Nt),{key:0,class:z(g(s).e("closeBtn")),onClick:Yt(S,["stop"])},{default:de(()=>[oe(g(c))]),_:1},8,["class","onClick"])):Ge("v-if",!0)],2)],46,["id","onClick"]),[[Yn,u.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var AFe=pt(MFe,[["__file","notification.vue"]]);const VM={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},X1=16;let LFe=1;const ev=function(e={},t){if(!Dn)return{close:()=>{}};(Dt(e)||zo(e))&&(e={message:e});const n=e.position||"top-right";let s=e.offset||0;VM[n].forEach(({vm:f})=>{var p;s+=(((p=f.el)==null?void 0:p.offsetHeight)||0)+X1}),s+=X1;const i=`notification_${LFe++}`,r=e.onClose,a={...e,offset:s,id:i,onClose:()=>{wFe(i,n,r)}};let c=document.body;pa(e.appendTo)?c=e.appendTo:Dt(e.appendTo)&&(c=document.querySelector(e.appendTo)),pa(c)||(c=document.body);const u=document.createElement("div"),h=oe(AFe,a,Ut(a.message)?a.message:zo(a.message)?()=>a.message:null);return h.appContext=ho(t)?ev._context:t,h.props.onDestroy=()=>{fp(null,u)},fp(h,u),VM[n].push({vm:h}),c.appendChild(u.firstElementChild),{close:()=>{h.component.exposed.visible.value=!1}}};Jj.forEach(e=>{ev[e]=(t={},n)=>((Dt(t)||zo(t))&&(t={message:t}),ev({...t,type:e},n))});function wFe(e,t,n){const s=VM[t],i=s.findIndex(({vm:h})=>{var f;return((f=h.component)==null?void 0:f.props.id)===e});if(i===-1)return;const{vm:r}=s[i];if(!r)return;n==null||n(r);const a=r.el.offsetHeight,c=t.split("-")[0];s.splice(i,1);const u=s.length;if(!(u<1))for(let h=i;h<u;h++){const{el:f,component:p}=s[h].vm,_=Number.parseInt(f.style[c],10)-a-X1;p.props.offset=_}}function kFe(){for(const e of Object.values(VM))e.forEach(({vm:t})=>{t.component.exposed.visible.value=!1})}ev.closeAll=kFe;ev._context=null;const NFe=h6(ev,"$notify");var PFe=[QBe,tFe,Bo,$Fe,NFe,hK],DFe=l_e([...GBe,...PFe]);const xFe={class:"device"},BFe={span:24,class:"device_connect"},FFe={span:24,class:"device_connect"},UFe={class:"device_connect"},HFe={class:"device_connect device_connect_btn"},VFe={__name:"device",setup(e){const{t}=hc(),n=K(t("message.software_not_connection")),s=K(0),i=K([{id:1,path:t("message.no_port_detected")}]);sC.useUploaders(),sC.usePrintData();const r=K(t("message.no_port_detected")),a=K(null),c=K("");sC.useDeveics(),mo.CancelToken.source();const h=Pr.useyPythonCodeStore();rn(()=>{c.value=localStorage.getItem("deviceType")});const f=async()=>{if(a.value&&a.value.id){if(h.pythonCode==""){Bo({message:t("message.running_code_error"),type:"error"});return}}else return;s.value=0;let E={comname:r.value,sid:a.value.id,code:h.pythonCode,type:!0};n.value=t("message.running_code"),await mo({url:`${a.value.io.uri}/pythonupload`,method:"post",data:E,onDownloadProgress:function(v){console.log(v),s.value=v.loaded/v.total*100,n.value=t("message.running_code_success")}})},p=async()=>{if(a.value&&a.value.id){if(h.pythonCode==""){Bo({message:t("message.uploading_error"),type:"error"});return}}else return;n.value=t("message.uploading");let E=c.value=="AI"?"sd/user_latest_code.py":"user_latest_code.py",v=`import os
  1920. os.remove("${E}")`;(await mo({url:`${a.value.io.uri}/pythonupload`,method:"post",data:{comname:r.value,sid:a.value.id,code:v,type:!0}})).data=="success"?await mo({url:`${a.value.io.uri}/pythonuploadfile`,method:"post",data:{comname:r.value,sid:a.value.id,code:h.pythonCode,name:E},onDownloadProgress:function(y){console.log(y),s.value=y.loaded/y.total*100,n.value="上传成功"}}):n.value=t("message.uploading_error")},_=()=>{if(console.log("重置设备"),!(a.value&&a.value.id))return;let E={comname:r.value,sid:a.value.id};mo.post(`${a.value.io.uri}/pythonreset`,E).then(v=>{console.log(v),v.data=="success"?Bo({message:t("message.reset_device_success"),type:"success"}):Bo({message:t("message.reset_device_error"),type:"warning"})})};return(E,v)=>{const b=Ot("el-progress"),y=Ot("el-option"),S=Ot("el-select"),L=Ot("el-button");return H(),le("div",xFe,[oe(gce),te("div",BFe,[te("span",null,Ke(n.value),1)]),te("div",FFe,[oe(b,{percentage:s.value},null,8,["percentage"])]),te("div",UFe,[oe(S,{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=I=>r.value=I),style:{width:"200px"}},{default:de(()=>[(H(!0),le(Lt,null,In(i.value,I=>(H(),Ye(y,{disabled:!I.path,key:I.path,value:I.path},{default:de(()=>[Xt(Ke(I.path),1)]),_:2},1032,["disabled","value"]))),128))]),_:1},8,["modelValue"])]),te("div",HFe,[te("div",null,[oe(L,{disabled:r.value==g(t)("message.no_port_detected"),type:r.value==g(t)("message.no_port_detected")?"":"primary",onClick:f},{default:de(()=>[Xt(Ke(E.$t("message.running")),1)]),_:1},8,["disabled","type"]),oe(L,{disabled:r.value==g(t)("message.no_port_detected"),type:r.value==g(t)("message.no_port_detected")?"":"primary",onClick:p},{default:de(()=>[Xt(Ke(E.$t("message.upload")),1)]),_:1},8,["disabled","type"]),c.value=="AI"?(H(),Ye(L,{key:0,disabled:r.value==g(t)("message.no_port_detected"),type:r.value==g(t)("message.no_port_detected")?"":"primary"},{default:de(()=>[Xt(Ke(E.$t("message.initialization")),1)]),_:1},8,["disabled","type"])):Ge("",!0)]),te("div",null,[oe(L,{disabled:r.value==g(t)("message.no_port_detected"),type:"primary",onClick:_},{default:de(()=>[Xt(Ke(E.$t("message.reset_device")),1)]),_:1},8,["disabled"])])])])}}},GFe=Gl(VFe,[["__scopeId","data-v-3a194e22"]]),WFe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAADydJREFUeF7tXXuMHlUVP2d2VaJW64PwSIglNJIYLbtz74rQGLfykOIjApaoqOFhWsvDqIlo4A/xD4hiokYetY0gUVFDhRofVHnoGlMQ997ZBY0RUyKGRGlQrFQN6u4cv2l26ZZ9zL0z883Mne/3JU3a9Nx7z/md+7vnnDtz7zB1/KeUermIvJmZN4rIGDMfSUTZn5d03PSqzfsXET0lIk8x86SI7GbmX1pr/1H1QG3qj9ukTNW6aK0vF5Eriei4qvtGfwcReIKZrzfG3NhVPDpJEK31uIhcRURndNVxLbPrXma+zhgz0TK9SqvTOYIopbYS0c2lkUEHRRC41Fq7rUjDtrbpFEGUUlcQ0VfaCvaA6PVRa+0NXbG1MwRRSm0ioju64pjA7TjfWrszcBsOqt8JgsRxrJjZdMEhXbFBRHSSJDZ0ezpBEK31dhHZHLozuqQ/M+8wxmwJ3abgCYLo0d4p2IUo0gWCXMXM17Z3mgyuZiJydZIk14WMQPAE0VrfJyKnheyErurOzPcbY04P2b7gCaKUkpAd0HXdrbVBz7GglY/jeB0zP9z1SRayfSJyUpIkj4RqQ9AE0Vp/UES+ESr4g6A3M3/IGPPNUG0NmiBxHF/DzJ+pGPxpIpoWkYejKMr+3vlfmqYjzHwSEY3M/anMZhH5bJIk11TWYc0dgSCHAM/SgE9aa++p2QetGk4pdWbvKMAXiGhdFYqBIFWgWLCPqiJI74zITcaYywuq0clmWusbe2c/LitrHAhSFsES7asgCDN/2BhzSwk1OttUa32JiHytjIEgSBn0SratgCAT1toNJdXodHOl1M+JaLyokSBIUeQqaFeWIFEUrZ+cnHygAlU628XY2NipaZruKWogCFIUuQralSTILmvtuRWo0fkulFJ3EdE5RQwFQYqgVlGbMgQJ3XEVQejUzSDjPLDbvL2bOd5ujLnbaYYMuJDW+uzejTA/LgJD6AvRwBKEiFZ3/cqaIhN6qTbZ1UlEtL9IfyBIEdQqalMm9If+El1FEDp3U/SlUBDEGeLqBUGQ6jFdrkcQpD6sKxsJBKkMytyOQJBciNonAILU5xMQpD6sKxsJBKkMytyOQJBciNonAILU5xMQpD6sKxsJBKkMytyOQJBciNonAILU5xMQpD6sKxsJBKkMytyOQJBciNonAILU5xMQpD6sKxsJBKkMytyOQJBciNonAILU5xMQpD6sKxsJBKkMytyOQJBciNonAILU5xMQZA7rOI7fRkSnRFF0poicUp8LMBIQaAYBZn4wTdPsuqcHkyT56UItnjsPsnbt2hetXr16p4i8sxk1MSoQaB4BZv7h/v37N+3du/c/mTYHCaKUOoaI/ty8etAACLQGgWOttX+ZJ0ipq11aYxIUAQLVIXDwSiguU+hWpwt6AgLtQyA7DcllrnRpn0nQCAhUisCujCB7ieiESrtFZ0CgGwg8lhHkGSJa1Q17YAUQqBSBAxlBUKBXiik66xACE1mRfgMz4+r/DnkVplSDgIjcmBHkLGbeXU2X6AUIdAcBEdk4/xxkGxF9pDumwRIgUBqBr1prtz73qgmeh5QGFB10BIGFt0Eedjfv6Ojo66IoupaIziaiF3bEXpgBBFwQ+C8R3Z2m6dVTU1O/m2+w5OXVIyMjq4eGhsZFJPvqKX5AoNMIMPP07OzsxPT09KILuoO+3b3TXoNxrUAABGmFG6BEWxEAQdrqGejVCgRAkFa4AUq0FQEQpK2egV6tQAAEaYUboERbEQBB2uoZ6NUKBECQVrgBSrQVARCkrZ6BXq1AoFaCxHGsoijaLCJvJKI1RJQS0V4R2c3M27NbJFqBCpRoFIHslh0R2cLMG4loLRFFRPQ4M/86TdMdSZLYuhSsjSAOL0Nm1w59zFq7sy7jMU77EFBKbep9w/7LRHTsctrV+WnpWgjiQI6FWJwPkrRv4tah0Rw57nAZqy6S9J0gWutREUlcjJ6T+a219g0e8hDtCAJKqd8Q0etdzWHm2Bgz5SpfRK6vBNFaj6dpmuWS7/VRjpkvMcbc6tMGsmEjoLW+WERu8bFCRL4bRdF2Y8yETzsf2b4TRESySyG8f9bavurmrRAa9BWBorfHM/MGEKSvrkHnbUAABPH0AiKIJ2CBi4Mgng4EQTwBC1wcBPF0IAjiCVjg4iCIpwNBEE/AAhcHQTwdCIJ4Aha4OAji6UAQxBOwwMVBEE8HgiCegAUuDoJ4OrBpgmR3gw0PD5+VpumJURQpIsreNM5ehXjUGHOvpzmtENdan0FEJxJR9irPMWmaJlEU/X5mZuYnS90JVafSIIgn2k0SRCn1biL6IhEdv4za37HWvt/TpEbFlVLf7pH7fcso8Uci+oS19vtNKQmCeCLfFEHiOL6Amb/lom5TOrrotlDGdfKJyAeSJLndt/8q5F11fP5YeNWkCvQd+xgdHX1NFEWPO4oTM+8wxmxxlW9CTmu9XUQ2u46dpumaqampP7nKVyUHgngi2cTqrLW+U0TO9VG1rnMJPjrNy3qewznYjJnvMsacV2S8Mm1AEE/0miCIUupJIjrKU9Vd1lovUnn2X1i84BeM91lrjy48aMGGIIgncHUTZGRkZM3Q0FBWrPr+HrPWZuemW/cr+gXj2dnZ46enp51TzSoMB0E8UaybINnhrq6dXWnrpFtqKrRV174eSgpp0oWkq+ta09ZJB4LMIRDSpAtJVxDkEALY5nWdDSXlQJD6Jh0iCCJISbpW0xwpVnkcUYMESGZXt4MgrkgtLweCgCCLZke/83qkWAFOOtQgqEGWIi4iSIBkdk0ckGK5IoUUKxcpRBBEEESQFWgCgoAgIAgIkhtJMwEU6QsWCyfECgqFtCqHpKurO1CDuCKFGiQXKRAEKRZSLKRYuQsFUqzDIcI2L7Z58aBwhWUDBAFBQBAQJD+zQA2CGgQ1CGqQ/JUC27yHYYQUCykWUiykWPkLJ1IspFhIsZBi5a8USLGQYi01SxBBEEEQQRBBEEGcEFiwWHjKe4mHtCqHpKurE/AulitSy8thFwu7WNjFwi5W/kqCCIIaBDUIapD8lQK7WNjFwi7WyjzBgSkU6YtmCFIspFhIsZBiIcVyQgARBBFkpZ0b5g3GmAnPuVRKvK1b0tjmxTYvtnmxzZu/uKEGQQ2CGgQ1SP5KgW1ebPNimxfbvE4rRbZYuAoWkQspbQlJV1dftLXwXUr/tuoKgqBIR5GOIj1/zUUEQZGOIh1Fev5KgSIdRTqKdBTpTisFivRDMCHFQoqFFAspltPCibd5FywWTogVFAppVQ5JV1d3tHXrFNu8AW6dgiBIsZBiIcVyCj5IsZBiLZooiCCIIIggiCCIIE4IIIIggqwwUZBigSAgCAjiFEvwsmKAO25OniUibPO6IrW8HAgCgiyaHUixkGIhxUKK5RReEEEQQRBBVlosnGhUUCikZwsh6erqDtQgrkihBslFCgTBg0I8KMSDwtyFIhNAkY4iHUU6inS3xcJJqqBQSGlLSLq6ugM1iCtSqEFykQJBUIOgBkENkrtQoAY5HCI8B8FzEDwHwXOQ/IUTKRZSLKRYSLHyVwps8x6GEVIspFhIsZBi5S+cSLGQYiHFQoqVv1IgxUKKtdQsQQRBBEEEQQRBBHFCYMFi4SnvJR7SqhySrq5OwKsmrkgtL4ddLOxiYRcLu1j5KwkiCGoQ1CCoQfJXCuxiYRcLu1gr8wQHplCkL5ohSLGQYiHFQoqFFMsJAUQQRJCVdm6YNxhjJjznUinxtm5JY5t3zq1KqVcT0VMFvGyttbpAu743UUqZ7AbSAgMdaa39a4F2hZuAIJ7QWWv7St6l1FFKPUpEr/VRVURuTZLkEp82dcnGcXwLM1/sOd4frLUnerYpLQ6CeELYEEFuJqKtPqqKyEVJktzm06Yu2TiOL2Tmr3uOt81ae6lnm9LiIIgnhE0QJFNRKfU0Eb3CUd3brLUXOco2IqaUyghyoePgf7fWvtJRtlIxEMQTzqYIEsfxm5j5wTx1mfkuY8x5eXJt+H+t9Z0icm6eLiJySpIkv8qT68f/gyCeqDZFkLko8gJm/pKIXLaE2ntF5ONJkvzI06RGxeM4fkdmExGtfb4izHxTZpO19n9NKQmCeCLfJEHmVR0bGxuZnZ0dZ+a3MPPjIvKL3r8npqen93ua0wrxkZGR1UNDQwftEZE1mT29f09MTk5ON60gCOLpgTYQxFNliJdAAATxBA8E8QQscHEQxNOBIIgnYIGLgyCeDgRBPAELXBwE8XQgCOIJWODiIIinA0EQT8ACFwdBPB0IgngCFrg4COLpQBDEE7DAxUEQTweCIJ6ABS4Ogng68IgjjnjZnj17Dng2g3iACKxfv37Vs88++0wR1ft9fr6vZy7KnPMWkdOSJPlZEdDQJiwE4jh+KzPfX0TrgSUIEX3aWvv5IqChTVgIKKU+RUSfK6L1IBPke9baTUVAQ5uwEFBK7SSi9xTRepAJQm0+rVfEmWizGIGCpx6f62igCUJET1trX4WJ1V0ElFJ/I6LCpxgHnSCUFW/GmNO7O0UG1zKt9X3ZZkwZBAaeIHPg3b5q1aoLJyYmZsqAibbtQGB8fHz4wIED2UUXF5TVCAQ5hODTIrI1SZI7yoKK9s0hEMfx+cy8rUxatVB7EGSxLx8jokeY2RLRnuZcjZE9EFgvItkFduuI6ASPdrmiQRMkjuN1zPxwrpUQAAIFERCRk5IkeaRg89xmfX2SfvLJJx81MzPzZK4WEAACBREYHh4++qGHHtpXsHlus74SJBu96EtouZpDAAgQUb9fau07QbTW20VkM7wJBKpGgJl3GGO2VN3vYZsA/ew861trvVFE7u73OOh/8BBg5rONMbv7aXnfI8hcmlX0Gv5+2o6+w0agls9O1EKQOI43M/P2sP0B7duEgIhsSZJkR791qoUgiCL9duPA9V9L9MhQrY0gZQ5PDZz7YfCKCPT74WCtRfrCwUASzPyyCNRJjlojyDwwY2Njx6Vpuqvgt/PK4ov24SJgoyg6Z3Jy8ok6TagtxVpolFLqxSJyQ4Hv59WJDcZqCQLZdyCZ+Qpr7b/rVqkRgswbqbV+l4hcSUTr6zYc4wWBwB5mvt4Y84OmtG2UIPNGK6XO7L2Ze4aInNp7FfooIsr+vLQpUDBuIwj8s/cB1X29Iw37mPmB3qJ5r7X2nkY0WTDo/wGwoQBIAfhtyAAAAABJRU5ErkJggg==",XFe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAADtFJREFUeF7tnX2MXFUZh98zW6C0oW3k05AQREljS/iD1oBBTRs0BALxC0UUSYPJIpLde2Y3NBhJHCOmmNC978wmSxiDGol8qGiIH5sQYpuIBgz1g1DFSAxRMIAt7kK71G3nHvfCEJam7Jz33rP3nnvu7yb9g+x73vue5zcPszNzd64iHGIC27ZtW7lmzZotSqkrlVKbiegUpdTJxpi14mZYkIfAHBHtN8bsU0o9kyTJT48cObJ7amrqhTxNF69VrhrVoY/W+v0LgYwQ0VVEdGod9lzRPf5cKdWJ4/iRvPNDEEuCWuvb+nKssVyCsvIJfH/hWT1ut9tPZh0FgliQ01rvIqItFqUo8Y/A80R0LTPvzjIaBBlATWv9HBGdmQUu1nhFYGsWSSDIEhlqrf9LROu8ihnDZCYwNDS0cefOnX+RNIAg70BLa/0zIvqEBCZq/SZgjDm0YsWKTRJJIMgxMtVa30VEw37HjekyEtjDzOlb81YHBDkK0+jo6KZGo/GEFT0UVZXADczctRkeghxFCc8eNg+bytdYP4tAkEVZR1G0Xin1dOXjxwZsCFzHzPcMKoQgiwhprbcT0bcHQcPPq0/AGPNgu91Or4hY8oAgbxfkUSK6eBA0/DwIAofn5uZWd7vdw0vtBoL06QwPDx+3atWq+SCixyZsCVzOzNMQxAJXFEWnK6WcXQVqcUqUlE9glJknIYhFEP0rdUWfslq0RYnfBCaZeRSCWISktU5fe6SvQVwdzxJR+g+HIwLGmDOI6Gyl1EpHLaeZ+XIIYkFTa51erZtetZv3SK8a/UaWC+PynrgO65vN5vuMMR0iuszBfncz81YIYkHSlSBJkmzudDp7LE6JkhwEtNY/IKIv5miRLoUgtgBdCGKMub/dbl9je07UZSfg6FdiCGIbgQtBiOjzzHyf7TlRl53A9u3bT5qfn38le4fXV0IQW4COBMn0Rzm2M6Lu7QS01iYnEwhiCxCC2JLypw6CFJgFBCkQtqNTQRBHIG3aQBAbSn7VQJAC8xgfH9/Q6/X25jlllr95znO+uq+FIAU+Alqt1sqZmZnX8pxy3bp1J7ZarUN5emCtPQEIYs/KSaXW+iki2pix2V5mPi/jWizLQACCZICWZ4nWeoqIbszY405m/krGtViWgQAEyQAtz5KRkZEThoaGXiIi6deLvtLr9U6bnJz8X57zY62MAASR8XJSHUXR1Uqp+yXNjDGfa7fbD0jWoDY/AQiSn2GmDlEUXaiUeoiITh/Q4EVjzMfb7fbjmU6ERbkIQJBc+PItbrVaK2ZnZ283xlxBROuP6va3hfuC/GLt2rW3tFqtI/nOhNVZCUCQrOQcr2s2mycmSXJu2rbRaPw9juNcbwc7Hq+27SBIbaPHxm0IQBAbSqipLQEIUtvosXEbAhDEhhJqaksAgtQ2emzchgAEsaGEmtoSgCC1jR4btyFQaUGGh4fXrl69+mQiOsUYs8pmw6hxQ6DRaMwS0b4DBw7s73a7c266+telUoJordObXW4xxnxMKfUZIjrVP6S1nCj9I7Cf9L/BI9OtkH2lVglB0k+ZjTEjRJR+xylul+zro+mNudJrxtLvo/2h32PaTee9IFEUXaeUGiei8+22hCpPCEwrpXbEcfwbT+bJNIbXgizcLuDOhdsFfDnTzrDIBwKHjTE3tdvt7/gwTJYZvBWk2Ww+Yoy5JMumsMY7AukXbbe8m8piIC8F0VprIoot5kdJdQhcwsy/rs64b0zqnSBjY2PXJkky8M6gVQNd93mVUoeMMR9k5j9ViYVXgmitzyaixyz+yq5KjDHrWwQG3kzGN1i+CbKTiMZ8g4R5nBK4tkpvAXsjiNb6gv6zx3FO40Az3wg8zswX+TbUO83jkyDpuxxfrwo4zJmLwMBbI+fq7nCxT4Kkrz0udLg3tPKXwMA7v/oyuheCNJvNM40xz/kCBXMsO4FnFl6HvP4FFb4fXggyNjb26SRJ0ovdcNSEwNzc3OoqXAXshSBa668R0W01eWxgm298tdFZExMT//Idhi+CuLjdru+sMd8iAo1G44KJiYk/+g7FF0F2pX/n4QjWNBE9TESV+sTW0d6Xs02azycdXlVdiZuRhibIl5j5u8v5KKl774XL5Fy9HQ9B+g8mNehBpbV28QxyMzPfMehc+Hl+Alrr3xPRB3J2giBFCoJ79+V8uAqWR1E0oZRqCpYcqxSCFCkIMw98psoZKJb3CdTpbr3BvAaBIMX5C0FErHcz89alVgz8P7uL1yAQRBRarmIIIsIHQUS4AiiGIKIQIYgIVwDFEEQUIgQR4QqgGIKIQoQgIlwBFEMQUYgQRIQrgGIIIgoRgohwBVAMQUQhQhARrgCKIYgoRAgiwhVAMQQRhQhBRLgCKIYgohAhiAhXAMUQRBQiBBHhCqAYgohChCAiXAEUQxBRiBBEhCuAYggiChGCiHAFUAxBRCFCEBGuAIohiChECCLCFUAxBBGFCEFEuAIohiCiECGICFcAxRBEFCIEEeEKoBiCiEKEICJcARRDEFGIEESEK4BiCCIKEYKIcAVQDEFEIUIQEa4AiiGIKEQIIsIVQDEEEYUIQUS4AiiGIKIQIYgIVwDFEEQUIgQR4QqgGIKIQoQgIlwBFEMQUYgQRIQrgGIIIgoRgohwBVAMQUQhQhARrgCKIYgoRAgiwhVAMQQRhQhBRLgCKIYgohAhiAhXAMUQRBQiBBHhCqAYgohChCAiXAEUQxBRiBBEhCuAYggiChGCiHAFUAxBRCFCEBGuAIohiChECCLCFUAxBBGFCEFEuAIohiCiECGICFcAxRBEFCIEEeEKoBiCiEKEICJcARRDEFGIEESEK4BiCCIKEYKIcAVQDEFEIUIQEa4AiiGIKEQIIsIVQDEEEYUIQUS4AiiGIKIQIYgIVwDFEEQUIgQR4QqgGIKIQoQgIlwBFEMQUYgQRIQrgGIIIgoRgohwBVAMQUQhQhARrgCKIYgoRAgiwhVAMQQRhQhBRLgCKIYgohAhiAhXAMUQRBQiBBHhCqAYgohChCAiXAEUQxBRiBBEhCuAYggiChGCiHAFUAxBRCFCEBGuAIohiChECCLCFUAxBBGFCEFEuAIohiCiECGICFcAxRBEFCIEEeEKoBiCiEKEICJcARRDEFGIEESEK4BiCCIKEYKIcAVQDEFEIUIQEa4AiiGIKEQIIsIVQDEEEYUIQUS4AiiGIKIQIYgIVwDFdREkiqL1Sqmnc0YGQXICrNzyugjSbDZvMcbsyBkQBMkJsHLL6yCI1vp6IrrbQTgQxAHESrUoW5BWq7Xy1VdfPafX6522DOC2ENFFRHSpo94QxBHIyrQpQ5CRkZEThoaGYiL6CBFtrAwsonuY+bql5lWDNqO13kVEqbmZD2YeeJ7MzbHwbQSKFiSKoquVUl0iWlPBKG5l5m9BkAoml3XkIgWJouhCpdRjWWcte12j0bhqYmLiQQhSdhIFnr8oQVqt1oqZmZnniOj0Arfn9FTz8/PvnpqaegGCOMXqd7OiBGk2m3cYY8b9prHkdANfoKerB742wGuQaj0EihJEa51+SLe+WnTemjZJkq92Op3bB80PQQYRqtjPixCk2WyeaIyZqxiaxeMeTt8uZuY/DNoDBBlEqGI/L0KQKIrOV0r9uWJoFo87wcxWvx5CkAqnfKzRixBkfHx8Q6/X21tRdC/2nz2etZkfgthQqlBNEYKkn5bPzMy8ViEsi0cdZeZJ29khiC2pitQVIUiKQmv9VMU+NSel1L1xHH9BEiUEkdCqQG2BgkwR0Y0VQPLmiL9k5iuk80IQKTHP64sSpH/91UtVuMTEGHNTu91OhRYfEESMzO8FRQmSUuhfh3W/x0SeVErtiOM484wQxON0s4xWpCB9SdLrsR7y7JKT54moo5SajOM415sJECTLo9DjNUULkqJIr8uanZ293RiT/o5f1qfrLxPRdPpPKTUdx3H637kPCJIboV8NyhBkMYH0U/YkSc5VSr1ruckopdJP8/cdPHhwf7fbnV2O80GQ5aBaYs+yBSlx68tyagiyLFjLawpB3LKHIG55lt4NgriNAIK45Vl6NwjiNgII4pZn6d0giNsIIIhbnqV3gyBuI4AgbnmW3g2CuI0AgrjlWXo3COI2Agjilmfp3SCI2wggiFuepXeDIG4jgCBueZbeDYK4jQCCuOVZejcI4jYCCOKWZ+ndIIjbCCCIW56ld4MgbiOAIG55lt4NgriNAIK45Vl6NwjiNgII4pZn6d0giNsIIIhbnqV3gyBuI4AgbnmW3g2CuI0AgrjlWXo3COI2gkIEmZ+fP2lqauqA29HR7VgEtNafIqIlbytmQW4rM++2qAu+pBBBkiS5uNPp/C54mh5sUGv9PSLalnMUCNIHWIggRPQoM384Z2hYPoDA6Ojopkaj8YQDUBCkYEHIGBMnSbJjcnLyPw4CRIujCPTl+CYRXeYADgQRCPIrR9DTr58/RET/NMb820GIaPEWgXOI6CyHQD7EzL912K+yrWx+xeoQ0Uhld4jBsxDYwMx/zbIwtDU2gqRypJLgqAkBY8wZ7XY7vVVZ7Q8bQdLfadNfs3DUhMDc3Nzx3W43vRNs7Y+BgqTf3D0zM3OQiI6vPa16AHiYmS+tx1YH73KgIGkLrfXdCy+urx/cDhUBELiBmbsB7MPJFmwFuYaI7nVyRjTxmoBS6r1xHP/D6yELHM5KkP6zSPoB1KYCZ8OpiifQZeYbij+tv2eUCDJMRHf5uxVMlpdAkiSbO53Onrx9QlpvLQieRUKK/Zh7wbPHMbBIBdlCRA8T0XHBP1zqtcE9zLy5Xlu2261IkP6zSCrJLrv2qKoAgTlmXl2BOUsZUSxIOuX4+PiGXq+3t5SJcVKXBPYy83kuG4bWK5MgiyT5ERFtDA1KTfbzY2b+bE32mnmbmQVZJMnNDv5AJ/MGsFBM4BUimmTmW8Ura7gglyBv8mo2mx81xowS0ZU1ZFiVLb9MRA/05cCVupapORFkkShnGmPSixsvM8a8Ryl1ykIgJxPRKst5UOaAgFJq1hizn4j2EdGTRDStlJqO4/g1B+1r1eL/3tpyUNxge7wAAAAASUVORK5CYII=",zFe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAABxBJREFUeF7t3OGRG0UUhVE5HwUBQeB0KNKBICAI5YNrKf8wrt0d3e6W1PPe4a96pra/q1M2UPaXi38UUODDAl+0UUCBjwsA4tuhwCcFAPH1UAAQ3wEFxgr4FWSsm6eaFACkydCuOVYAkLFunmpSAJAmQ7vmWAFAxrp5qkkBQJoM7ZpjBQAZ6+apJgUAaTK0a44VAGSsm6eaFACkydCuOVYAkLFunmpSAJAmQ7vmWAFAxrp5qkkBQJoM7ZpjBQAZ6+apJgUAaTK0a44VAGSsm6eaFACkydCuOVYAkLFunmpSAJAmQ7vmWAFAgm7X6/Xf4Pi2R2+3m93vXEeoO0O9HQMkiFXkKCDBkIAEsYocBSQYEpAgVpGjgARDAhLEKnIUkGBIQIJYRY4CEgwJSBCryFFAgiEBCWIVOQpIMCQgQawiRwEJhgQkiFXkKCDBkIAEsYocBSQYEpAgVpGjgARDAhLEKnIUkGBIQIJYRY4CEgwJSBCryFFAgiEBCWIVOQpIMCQgQawiRwEJhgQkiFXkKCDBkIAEsYocBSQYEpAgVpGjgARDAhLEKnIUkGBIQIJYRY4CEgwJSBCryFFAgiEBCWIVOQpIMCQgQawiRwEJhgQkiFXkKCDBkIAEsYocBSQYEpAgVpGjgARDAhLEKnIUkGBIQIJYRY4CEgwJSBCryFFAgiEBCWIVOQpIMCQgQawiRwEJhgQkiFXkKCDBkIAEsYocBSQYEpAgVpGjgARDAhLEKnIUkGBIQIJYRY4CEgwJSBCryFFAgiEBCWIVOQpIMCQgQawiRwEJhgQkiFXkKCDBkIAEsYocBSQYEpAgVpGjgARDAhLEKnIUkGBIQIJYRY4CEgwJSBCryFFAgiEBCWIVOQpIMCQgQawiRwEJhgQkiFXk6GmAXK/XPy+Xy29Fune/xl+32+3rGSKcBshbTEjO8JU6/BlPg+PtJqcCAsnhl2/3A6fCcUogkOxu4MOf73Q4TgsEktMhOSWOUwOB5DRITovj9EAg2R7JqXGUAALJtkhOj6MMEEi2Q1ICRykgkGyDpAyOckAgeTmSUjhKAoHkZUjK4SgLBJKnIymJozQQSJ6GpCyO8kAgeTiS0jhaAIHkYUjK42gDBJLlSFrgaAUEkmVI2uBoBwSSaSStcLQEAskwknY42gKBJEbSEkdrIJDcjaQtjvZAIDlE0hoHIN+/H/62lHehtMcByA/fC0j+hwSO7zlO99f+HP6mYOIAJP/Fg+OH7xAgP4FqjgSOn74PgLzzK05TJHC8810A5IPfkjVDAscH3wNAPvl3liZI4PjkOwDIwb/UF0cCx8H+gNzxX72KIoHjju0BuSNSwf/jDseduwNyZ6hCSOAINgckiFUACRzh3oCEwU6MBI6BrQEZiHZCJHAM7gzIYLgTIYFjYmNAJuKdAAkck/sCMhlwYyRwLNgWkAURN0QCx6JdAVkUciMkcCzcFJCFMTdAAsfiPQFZHPSFSOB4wJaAPCDqC5DA8aAdAXlQ2CcigeOBGwLywLhPQALHg/cD5MGBH4gEjidsB8gTIj8ACRxP2g2QJ4VeiASOJ24GyBNjL0ACx5P3AuTJwSeQwPGCrQB5QfQBJHC8aCdAXhQ+QALHCzcC5IXx70ACx4v3AeTFA3yCBI4NtgFkgxHeQQLHJrsAsskQPyC53G63rxv9WK1/FEBaz+/yRwUAOSrk89YFAGk9v8sfFQDkqJDPWxcApPX8Ln9UAJCjQj5vXQCQ1vO7/FEBQI4K+bx1AUBaz+/yRwUAOSrk89YFAGk9v8sfFQDkqJDPWxcApPX8Ln9UAJCjQj5vXQCQ1vO7/FEBQI4K+bx1AUBaz+/yRwVOAeR6vf5yuVz+PrqMz09V4Nfb7fbP7j8xILsvVPfnA2TVtn4FWVVyq/cAsmoOQFaV3Oo9gKyaA5BVJbd6DyCr5gBkVcmt3gPIqjkAWVVyq/cAsmoOQFaV3Oo9gKyaA5BVJbd6DyCr5gBkVcmt3gPIqjkAWVVyq/cAsmoOQFaV3Oo9gKyaA5BVJbd6DyCr5gBkVcmt3gPIqjkAWVVyq/cAsmoOQFaV3Oo9gKya4zuQ31e9z3u2KPCHPw+yxQ5+CAXGC5ziD0yNX8+TCswVAGSun6eLFwCk+MCuN1cAkLl+ni5eAJDiA7veXAFA5vp5ungBQIoP7HpzBQCZ6+fp4gUAKT6w680VAGSun6eLFwCk+MCuN1cAkLl+ni5eAJDiA7veXAFA5vp5ungBQIoP7HpzBQCZ6+fp4gUAKT6w680VAGSun6eLFwCk+MCuN1cAkLl+ni5eAJDiA7veXAFA5vp5ungBQIoP7HpzBQCZ6+fp4gUAKT6w680VAGSun6eLFwCk+MCuN1cAkLl+ni5eAJDiA7veXAFA5vp5ungBQIoP7HpzBQCZ6+fp4gW+AesDPuc4Ecc8AAAAAElFTkSuQmCC",YFe="/assets/uploader_code-C8PB7N6J.png",KFe={class:"python-header"},jFe=["alt"],QFe=["alt"],qFe=["alt"],JFe=["alt"],ZFe={__name:"header",emits:["getSwitchs","getCodemirror","getPythonCode"],setup(e,{emit:t}){const{t:n}=hc(),s=K(!1),i=K(!0),r=t,a=Pr.useyPythonCodeStore(),c=()=>{console.log("复制代码",a.pythonCode),navigator.clipboard.writeText(a.pythonCode).then(()=>{Bo.success(n("message.copy_code_success"))}).catch(E=>{Bo.error(n("message.copy_code_error"))})},u=()=>{console.log("下载代码",a.pythonCode);const E=new Blob([a.pythonCode],{type:"text/plain"}),v=URL.createObjectURL(E),b=document.createElement("a");b.href=v,b.download="code.py",b.click(),URL.revokeObjectURL(v)},h=()=>{console.log("上传代码");const E=document.createElement("input");E.type="file",E.accept=".py",E.onchange=async v=>{const b=v.target.files[0];if(b){const y=await b.text();r("getPythonCode",y),Bo.success(n("message.upload_code_success"))}else Bo.error(n("message.upload_code_error"))},E.click()},f=()=>{document.getElementById("serialoutput").innerText=""},p=E=>{r("getSwitchs",E),i.value=E},_=E=>{r("getCodemirror",E)};return(E,v)=>{const b=Ot("el-tooltip"),y=Ot("el-col"),S=Ot("el-switch"),L=Ot("el-row");return H(),le("div",KFe,[oe(L,null,{default:de(()=>[oe(y,{span:12,class:"python-header-left"},{default:de(()=>[oe(b,{content:E.$t("message.python_code")},{default:de(()=>[te("span",{class:z(i.value?"active":""),onClick:v[0]||(v[0]=I=>p(!0))},Ke(E.$t("message.python_code")),3)]),_:1},8,["content"]),oe(b,{content:E.$t("message.serial_port")},{default:de(()=>[te("span",{class:z(i.value?"":"active"),style:{"margin-left":"10px"},onClick:v[1]||(v[1]=I=>p(!1))},Ke(E.$t("message.serial_port")),3)]),_:1},8,["content"]),i.value?Ge("",!0):(H(),Ye(b,{key:0,content:E.$t("message.clear_print_data")},{default:de(()=>[te("img",{onClick:f,style:{width:"20px",position:"absolute",top:"20px"},src:WFe,alt:E.$t("message.clear_print_data")},null,8,jFe)]),_:1},8,["content"]))]),_:1}),oe(y,{span:12,class:"python-header-right"},{default:de(()=>[oe(b,{content:E.$t("message.edit_mode")},{default:de(()=>[oe(S,{modelValue:s.value,"onUpdate:modelValue":v[2]||(v[2]=I=>s.value=I),onChange:_},null,8,["modelValue"])]),_:1},8,["content"]),oe(b,{content:E.$t("message.copy_code")},{default:de(()=>[te("img",{src:XFe,alt:E.$t("message.copy_code"),onClick:c},null,8,QFe)]),_:1},8,["content"]),oe(b,{content:E.$t("message.download_code")},{default:de(()=>[te("img",{src:zFe,alt:E.$t("message.download_code"),onClick:u},null,8,qFe)]),_:1},8,["content"]),oe(b,{content:E.$t("message.upload_code")},{default:de(()=>[te("img",{src:YFe,alt:E.$t("message.upload_code"),onClick:h},null,8,JFe)]),_:1},8,["content"])]),_:1})]),_:1})])}}},eUe=Gl(ZFe,[["__scopeId","data-v-c8905e2d"]]),tUe={},nUe={class:"serialoutput",id:"serialoutput"};function oUe(e,t){return H(),le("div",nUe)}const sUe=Gl(tUe,[["render",oUe]]),iUe={style:{height:"100%"}},rUe={style:{height:"100%"}},lUe={style:{height:"calc(100vh - 350px)","overflow-y":"auto"}},aUe={style:{height:"230px"}},cUe={__name:"BlocklyComponent",setup(e){const t=lo(null),n=K(""),s=K(!0),i=Pr.useyXmlStore(),r=Pr.useyPythonCodeStore(),a=Pr.useLoadBlocklyStatus(),c=K(!0),u=K(null);rn(()=>{let S=A7;localStorage.getItem("lang")=="en"?S=w7:localStorage.getItem("lang")=="zhHant"&&(S=L7),u.value=S;let L=C.utils.xml.textToDom(k7.xml);for(var I=L.getElementsByTagName("category"),R=0,w;w=I[R];R++){var k=w.getAttribute("id"),D=u.value[k]||k;D&&w.setAttribute("name",D)}_(L),localStorage.getItem("workspaceXml")&&y()});const h=S=>{c.value=S,n.value=r.pythonCode},f=S=>{s.value=!S},p=S=>{n.value=S},_=S=>{C.Blocks=B7.Blocks,C.Python=V7.Python,C.setLocale(u.value),t.value=C.inject("blocklyDiv",{toolbox:S,theme:F7,collapse:!0,comments:!0,css:!0,disable:!0,grid:!1,maxBlocks:1/0,rtl:!1,scrollbars:!0,sounds:!0,trashcan:!0,zoom:{controls:!0,wheel:!1,startScale:1,maxScale:2,minScale:.2,scaleSpeed:1.2}}),t.value.addChangeListener(E),window.blockly=t.value,window.Blockly=C},E=S=>{(S.type==C.Events.BLOCK_DRAG||S.type=="viewport_change")&&b(),v()},v=()=>{let S=C.Python.workspaceToCode(t.value);var L=C.Xml.domToText(C.Xml.workspaceToDom(t.value));n.value=S,r.$patch({pythonCode:S}),i.$patch({xmlStr:L})},b=()=>{var S=C.Xml.domToText(C.Xml.workspaceToDom(t.value));localStorage.setItem("workspaceXml",S)},y=()=>{let S=localStorage.getItem("workspaceXml");S&&C.Xml.domToWorkspace(C.utils.xml.textToDom(S),t.value)};return Zs(()=>{a.status&&(t.value.clear(),C.Xml.domToWorkspace(C.utils.xml.textToDom(i.xmlStr),t.value))}),(S,L)=>{const I=Ot("el-col"),R=Ot("el-row");return H(),le("div",iUe,[oe(R,{style:{height:"100%"}},{default:de(()=>[oe(I,{span:16},{default:de(()=>L[0]||(L[0]=[te("div",{id:"blocklyDiv",style:{height:"100%",width:"100%"}},null,-1)])),_:1}),oe(I,{span:8},{default:de(()=>[te("div",rUe,[te("div",lUe,[oe(eUe,{onGetSwitchs:h,onGetCodemirror:f,onGetPythonCode:p}),c.value?(H(),Ye(Gre,{key:0,pythonCode:n.value,codeMirrorShow:s.value},null,8,["pythonCode","codeMirrorShow"])):(H(),Ye(sUe,{key:1}))]),te("div",aUe,[oe(GFe)])])]),_:1})]),_:1})])}}},uUe=Gl(cUe,[["__scopeId","data-v-66dfe363"]]),dUe="/assets/logo1-DEiYbowd.png",Zj=(e,t)=>{let n=new Blob([e],{type:"text/plain;charset=utf-8"});const s=window.URL.createObjectURL(n),i=document.createElement("a");i.href=s,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(s)},SE=Ah("user",()=>{const e=K({});return{userInfo:e,setUserInfo:n=>{e.value=n}}}),hUe={class:"headerLeft"},fUe=["src"],pUe={__name:"headerLeft",props:{exportImportFileName:{type:String,require:!0,default:""}},emits:["setFileName"],setup(e,{emit:t}){const{t:n}=hc(),s=e,i=t,r=K(s.exportImportFileName),a=Pr.useyXmlStore(),c=SE(),u=Pr.useLoadBlocklyStatus(),h=()=>{console.log(r.value,a.xmlStr),a.xmlStr&&a.xmlStr!='<xml xmlns="https://developers.google.com/blockly/xml"></xml>'?Zj(a.xmlStr,r.value+".xml"):Bo({message:n("message.export_content_empty"),type:"warning"})},f=()=>{if(JSON.stringify(c.userInfo)!="{}"){let v={filename:r.value,xml:a.xmlStr};mo.defaults.withCredentials=!0,mo.post("https://api.cocorobo.cn/blockx/",v).then(b=>{if(console.log(b),b.data&&b.data.filename){let y=location.href+"&Qd="+b.data.filename;navigator.clipboard.writeText(y).then(()=>{Bo({message:n("message.link_copy"),type:"success"})}).catch(S=>{Bo({message:n("message.link_copy_error"),type:"warning"}),console.error("复制到剪贴板失败: ",S)})}})}else Bo({message:n("message.please_login"),type:"warning"})},p=()=>{a.$patch({xmlStr:'<xml xmlns="https://developers.google.com/blockly/xml"></xml>'}),u.$patch({status:!0}),localStorage.setItem("workspaceXml",'<xml xmlns="https://developers.google.com/blockly/xml"></xml>'),setTimeout(()=>{u.$patch({status:!1})},100)},_=async()=>{console.log("保存当前积木图片");let v=window.blockly.svgBlockCanvas_.cloneNode(!0);v.removeAttribute("width"),v.removeAttribute("height"),v.removeAttribute("transform");let b=document.createElementNS("http://www.w3.org/2000/svg","style");b.textContent=[".blocklySvg {","background-color: #fff;","outline: none;","overflow: hidden;","display: block;","}",".blocklyWidgetDiv {","display: none;","position: absolute;","z-index: 100;","}",".injectionDiv {","height: 100%;","position: relative;","}",".blocklyNonSelectable {","user-select: none;","-moz-user-select: none;","-webkit-user-select: none;","-ms-user-select: none;","}",".blocklyTooltipDiv {","background-color: #ffffc7;","border: 1px solid #ddc;","box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);","color: #000;","display: none;","font-family: sans-serif;","font-size: 9pt;","opacity: 0.9;","padding: 2px;","position: absolute;","z-index: 100000;","}",".blocklyResizeSE {","cursor: se-resize;","fill: #aaa;","}",".blocklyResizeSW {","cursor: sw-resize;","fill: #aaa;","}",".blocklyResizeLine {","stroke: #888;","stroke-width: 1;","}",".blocklyHighlightedConnectionPath {","fill: none;","stroke: #fc3;","stroke-width: 4px;","}",".blocklyPathLight {","fill: none;","stroke-linecap: round;","stroke-width: 1;","}",".blocklySelected>.blocklyPath {","stroke: #fc3;","stroke-width: 3px;","}",".blocklySelected>.blocklyPathLight {","display: none;","}",".blocklyDragging>.blocklyPath,",".blocklyDragging>.blocklyPathLight {","fill-opacity: .8;","stroke-opacity: .8;","}",".blocklyDragging>.blocklyPathDark {","display: none;","}",".blocklyDisabled>.blocklyPath {","fill-opacity: .5;","stroke-opacity: .5;","}",".blocklyDisabled>.blocklyPathLight,",".blocklyDisabled>.blocklyPathDark {","display: none;","}",".blocklyText {","cursor: default;","fill: #fff;","font-family: sans-serif;","font-size: 11pt;","}",".blocklyTextCode {"," font-family: monospace;","}",".blocklyNonEditableText>text {","pointer-events: none;","}",".blocklyNonEditableText>rect,",".blocklyEditableText>rect {","fill: #fff;","fill-opacity: .6;","}",".blocklyNonEditableText>text,",".blocklyEditableText>text {","fill: #000;","}",".blocklyEditableText:hover>rect {","stroke: #fff;","stroke-width: 2;","}",".blocklyBubbleText {","fill: #000;","}",".blocklyFlyoutButton {","fill: #888;","cursor: default;","}",".blocklyFlyoutButtonShadow {","fill: #666;","}",".blocklyFlyoutButton:hover {","fill: #aaa;","}",".blocklyFlyoutLabel {","cursor: default;","}",".blocklyFlyoutLabelBackground {","opacity: 0;","}",".blocklyFlyoutLabelText {","fill: #000;","}",".blocklyFlyoutLabelText:hover {","fill: #aaa;","}",".blocklySvg text {","user-select: none;","-moz-user-select: none;","-webkit-user-select: none;","cursor: inherit;","}",".blocklyHidden {","display: none;","}",".blocklyFieldDropdown:not(.blocklyHidden) {","display: block;","}",".blocklyIconGroup {","cursor: default;","}",".blocklyIconGroup:not(:hover),",".blocklyIconGroupReadonly {","opacity: .6;","}",".blocklyIconShape {","fill: #00f;","stroke: #fff;","stroke-width: 1px;","}",".blocklyIconSymbol {","fill: #fff;","}",".blocklyMinimalBody {","margin: 0;","padding: 0;","}",".blocklyCommentTextarea {","background-color: #ffc;","border: 0;","margin: 0;","padding: 2px;","resize: none;","}",".blocklyHtmlInput {","border: none;","border-radius: 4px;","font-family: sans-serif;","height: 100%;","margin: 0;","outline: none;","padding: 0 1px;","width: 100%","}",".blocklyMainBackground {","stroke-width: 1;","stroke: #c6c6c6;","}",".blocklyMutatorBackground {","fill: #fff;","stroke: #ddd;","stroke-width: 1;","}",".blocklyFlyoutBackground {","fill: #ddd;","fill-opacity: .8;","}",".blocklyScrollbarBackground {","opacity: 0;","}",".blocklyScrollbarHandle {","fill: #ccc;","}",".blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,",".blocklyScrollbarHandle:hover {","fill: #bbb;","}",".blocklyZoom>image {","opacity: .4;","}",".blocklyZoom>image:hover {","opacity: .6;","}",".blocklyZoom>image:active {","opacity: .8;","}",".blocklyFlyout .blocklyScrollbarHandle {","fill: #bbb;","}",".blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,",".blocklyFlyout .blocklyScrollbarHandle:hover {","fill: #aaa;","}",".blocklyInvalidInput {","background: #faa;","}",".blocklyAngleCircle {","stroke: #444;","stroke-width: 1;","fill: #ddd;","fill-opacity: .8;","}",".blocklyAngleMarks {","stroke: #444;","stroke-width: 1;","}",".blocklyAngleGauge {","fill: #f88;","fill-opacity: .8;","}",".blocklyAngleLine {","stroke: #f00;","stroke-width: 2;","stroke-linecap: round;","}",".blocklyContextMenu {","border-radius: 4px;","}",".blocklyDropdownMenu {","padding: 0 !important;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {","background: url(<<<PATH>>>/sprites.png) no-repeat -48px -16px !important;","}",".blocklyToolboxDiv {","background-color: #ddd;","overflow-x: visible;","overflow-y: auto;","position: absolute;","}",".blocklyTreeRoot {","padding: 4px 0;","}",".blocklyTreeRoot:focus {","outline: none;","}",".blocklyTreeRow {","height: 22px;","line-height: 22px;","margin-bottom: 3px;","padding-right: 8px;","white-space: nowrap;","}",".blocklyHorizontalTree {","float: left;","margin: 1px 5px 8px 0;","}",".blocklyHorizontalTreeRtl {","float: right;","margin: 1px 0 8px 5px;","}",'.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {',"margin-left: 8px;","}",".blocklyTreeRow:not(.blocklyTreeSelected):hover {","background-color: #e4e4e4;","}",".blocklyTreeSeparator {","border-bottom: solid #e5e5e5 1px;","height: 0;","margin: 5px 0;","}",".blocklyTreeSeparatorHorizontal {","border-right: solid #e5e5e5 1px;","width: 0;","padding: 5px 0;","margin: 0 5px;","}",".blocklyTreeIcon {","background-image: url(<<<PATH>>>/sprites.png);","height: 16px;","vertical-align: middle;","width: 16px;","}",".blocklyTreeIconClosedLtr {","background-position: -32px -1px;","}",".blocklyTreeIconClosedRtl {","background-position: 0px -1px;","}",".blocklyTreeIconOpen {","background-position: -16px -1px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedLtr {","background-position: -32px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedRtl {","background-position: 0px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconOpen {","background-position: -16px -17px;","}",".blocklyTreeIconNone,",".blocklyTreeSelected>.blocklyTreeIconNone {","background-position: -48px -1px;","}",".blocklyTreeLabel {","cursor: default;","font-family: sans-serif;","font-size: 16px;","padding: 0 3px;","vertical-align: middle;","}",".blocklyTreeSelected .blocklyTreeLabel {","color: #fff;","}",".blocklyWidgetDiv .goog-palette {","outline: none;","cursor: default;","}",".blocklyWidgetDiv .goog-palette-table {","border: 1px solid #666;","border-collapse: collapse;","}",".blocklyWidgetDiv .goog-palette-cell {","height: 13px;","width: 15px;","margin: 0;","border: 0;","text-align: center;","vertical-align: middle;","border-right: 1px solid #666;","font-size: 1px;","}",".blocklyWidgetDiv .goog-palette-colorswatch {","position: relative;","height: 13px;","width: 15px;","border: 1px solid #666;","}",".blocklyWidgetDiv .goog-palette-cell-hover .goog-palette-colorswatch {","border: 1px solid #FFF;","}",".blocklyWidgetDiv .goog-palette-cell-selected .goog-palette-colorswatch {","border: 1px solid #000;","color: #fff;","}",".blocklyWidgetDiv .goog-menu {","background: #fff;","border-color: #ccc #666 #666 #ccc;","border-style: solid;","border-width: 1px;","cursor: default;","font: normal 13px Arial, sans-serif;","margin: 0;","outline: none;","padding: 4px 0;","position: absolute;","overflow-y: auto;","overflow-x: hidden;","max-height: 50%;","z-index: 100;","}",".blocklyWidgetDiv .goog-menuitem {","color: #000;","font: normal 13px Arial, sans-serif;","list-style: none;","margin: 0;","padding: 4px 7em 4px 28px;","white-space: nowrap;","}",".blocklyWidgetDiv .goog-menuitem.goog-menuitem-rtl {","padding-left: 7em;","padding-right: 28px;","}",".blocklyWidgetDiv .goog-menu-nocheckbox .goog-menuitem,",".blocklyWidgetDiv .goog-menu-noicon .goog-menuitem {","padding-left: 12px;","}",".blocklyWidgetDiv .goog-menu-noaccel .goog-menuitem {","padding-right: 20px;","}",".blocklyWidgetDiv .goog-menuitem-content {","color: #000;","font: normal 13px Arial, sans-serif;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-accel,",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-content {","color: #ccc !important;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-icon {","opacity: 0.3;","-moz-opacity: 0.3;","filter: alpha(opacity=30);","}",".blocklyWidgetDiv .goog-menuitem-highlight,",".blocklyWidgetDiv .goog-menuitem-hover {","background-color: #d6e9f8;","border-color: #d6e9f8;","border-style: dotted;","border-width: 1px 0;","padding-bottom: 3px;","padding-top: 3px;","}",".blocklyWidgetDiv .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-icon {","background-repeat: no-repeat;","height: 16px;","left: 6px;","position: absolute;","right: auto;","vertical-align: middle;","width: 16px;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon {","left: auto;","right: 6px;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {","background: url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat -512px 0;","}",".blocklyWidgetDiv .goog-menuitem-accel {","color: #999;","direction: ltr;","left: auto;","padding: 0 6px;","position: absolute;","right: 0;","text-align: right;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-accel {","left: 0;","right: auto;","text-align: left;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-hint {","text-decoration: underline;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-separator {","color: #999;","font-size: 12px;","padding-left: 4px;","}",".blocklyWidgetDiv .goog-menuseparator {","border-top: 1px solid #ccc;","margin: 4px 0;","padding: 0;","}",""].join(""),v.insertBefore(b,v.firstChild);let y=window.blockly.svgBlockCanvas_.getBBox(),S=document.createElement("canvas");S.width=Math.ceil(Math.abs(y.x)+y.width+120),S.height=Math.ceil(Math.abs(y.y)+y.height+50),S.appendChild(v),S.appendChild(v);let L=S.getContext("2d"),I=new XMLSerializer().serializeToString(v),R=/xlink:href="blockly\/([^\s]*)"/g,w=I.match(R);console.log(w),w!=null&&await function(){return new Promise(P=>{let B=w.length,F=0;for(let G=0;G<B;G++){let re,_e=document.createElement("canvas"),J=_e.getContext("2d"),Y=new Image;Y.setAttribute("src",w[G].replace('xlink:href="',_href).replace('"',"")),Y.onload=function(){_e.width=Y.width,_e.height=Y.height,J.drawImage(Y,0,0),re=_e.toDataURL("image/png",1),I=I.replace(w[G],'xlink:href="'+re+'"'),F++}}let X=setInterval(()=>{if(F==B)return clearInterval(X),P(!0)})})}(),I='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="background-color:#FFF" width="'+S.width+'" height="'+S.height+'" viewBox="'+(y.x-50)+" "+(y.y-50)+" "+S.width+" "+S.height+'"><rect width="100%" height="100%" fill="white"></rect>'+I+"</svg>";var k=new Image;k.setAttribute("src","data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(I)))),k.onload=function(){L.drawImage(k,5,5);var D=S.toDataURL("image/png",1),P=document.createElement("a");P.download=r.value+".png",P.href=D,document.body.appendChild(P),P.click()}},E=()=>{i("setFileName",r.value)};return Zs(()=>{s.exportImportFileName&&(r.value=s.exportImportFileName)}),(v,b)=>{const y=Ot("el-input"),S=Ot("el-button"),L=Ot("el-tooltip");return H(),le("div",hUe,[te("img",{src:g(dUe)},null,8,fUe),oe(y,{modelValue:r.value,"onUpdate:modelValue":b[0]||(b[0]=I=>r.value=I),placeholder:"",onInput:b[1]||(b[1]=I=>E()),style:{"--el-input-width":"150px"}},null,8,["modelValue"]),oe(L,{content:v.$t("message.save")},{default:de(()=>[oe(S,{round:"",onClick:b[2]||(b[2]=I=>h())},{default:de(()=>[Xt(Ke(v.$t("message.save")),1)]),_:1})]),_:1},8,["content"]),oe(L,{content:v.$t("message.share")},{default:de(()=>[te("i",{class:"material-icons",onClick:b[3]||(b[3]=I=>f())},"share")]),_:1},8,["content"]),oe(L,{content:v.$t("message.delete_all_blockly")},{default:de(()=>[te("i",{class:"material-icons",onClick:b[4]||(b[4]=I=>p())},"delete")]),_:1},8,["content"]),oe(L,{content:v.$t("message.screenshot")},{default:de(()=>[te("i",{class:"material-icons",onClick:b[5]||(b[5]=I=>_())},"photo_camera")]),_:1},8,["content"])])}}},gUe=Gl(pUe,[["__scopeId","data-v-79eb8b59"]]),hW="/assets/user-D9i2ZrgT.png",mUe={style:{position:"relative"}},_Ue={key:0,class:"user_login_style"},TUe=["src"],EUe={class:"user_name"},vUe={key:1,class:"user_login_style"},bUe=["src"],OUe={class:"login_button"},SUe={class:"my-header"},yUe=["onClick"],$Ue={key:0,class:"loginIframe"},IUe={key:1,class:"cloud"},RUe={class:"user_span_color"},CUe={class:"user_span_color"},MUe={class:"user_span_color"},AUe={class:"clearfix",style:{"margin-top":"20px"}},LUe={__name:"user",setup(e){const{t}=hc(),n=SE(),s=K(!1),i=K(!1),r=K(""),a=K(""),c=K(""),u=K([]),h=K(""),f=K(""),p=K(""),_=K(""),E=K(!1);rn(()=>{E.value=window.location.host.indexOf("cocorobo.hk")>-1,window.addEventListener("message",function(L){L.data.id=="loginVerify"&&L.data.status==="logged"&&(s.value=!0,r.value=L.data.data.alias,a.value=L.data.data.username,c.value=L.data.data.defaultSchool,h.value=L.data.data.apiKey,n.setUserInfo(L.data.data),v(),Bo({message:t("message.login_success"),type:"success"}))})});const v=()=>{const L=E.value?`https://api.cocorobo.hk/iot/data/apikey/${h.value}/event/`:`https://api.cocorobo.cn/iot/data/apikey/${h.value}/event/`;mo.get(L).then(I=>{if(I.data.length>0){let R=[];I.data.map(w=>{let k={id:w.eventAPIKey,value:w.name,url:w.url};return R.push(k),w}),f.value=R[0].value,p.value=R[0].id,_.value=R[0].url,u.value=R}})},b=L=>{let I=u.value.filter(R=>R.value==L)[0];p.value=I.id,_.value=I.url},y=()=>{const L=E.value?"//cocorobo.hk/cloud":"//cocorobo.cn/cloud";window.open(L)},S=()=>{const L=E.value?"//api.cocorobo.hk/api/logout":"//api.cocorobo.cn/api/logout";mo.defaults.withCredentials=!0,mo.get(L).then(I=>{I.data=="logout"&&(s.value=!1,Bo({message:t("message.logout_success"),type:"success"}),n.setUserInfo({}))})};return(L,I)=>{const R=Ot("el-tooltip"),w=Ot("el-option"),k=Ot("el-select"),D=Ot("el-input"),P=Ot("el-button"),B=Ot("el-dialog");return H(),le("div",mUe,[te("div",{class:"user",onClick:I[0]||(I[0]=F=>i.value=!0)},[I[8]||(I[8]=te("iframe",{src:"//cocorobo.cn/login",frameborder:"0",scrolling:"no",style:{display:"none"}},null,-1)),s.value?(H(),le("div",_Ue,[te("img",{src:g(hW),alt:""},null,8,TUe),te("span",EUe,Ke(r.value),1)])):(H(),le("div",vUe,[te("img",{src:g(hW),alt:""},null,8,bUe),te("span",OUe,Ke(L.$t("message.login")),1)]))]),oe(B,{class:"loginModel",modelValue:i.value,"onUpdate:modelValue":I[7]||(I[7]=F=>i.value=F),title:"",width:"350px","show-close":!1},{header:de(({close:F})=>[te("div",SUe,[te("i",{class:"material-icons right",style:{color:"#000","margin-top":"10px"},onClick:F},"close",8,yUe)])]),default:de(()=>[s.value?(H(),le("div",IUe,[te("h4",null,Ke(r.value),1),te("p",null,[te("span",RUe,Ke(L.$t("message.your_email")),1),Xt(Ke(a.value),1)]),te("p",null,[te("span",CUe,Ke(L.$t("message.your_schoole")),1),Xt(Ke(c.value),1)]),te("div",null,[te("p",null,[te("span",MUe,Ke(L.$t("message.cloud_project")),1),oe(R,{class:"box-item",effect:"dark",content:L.$t("message.click_to_refresh"),placement:"bottom"},{default:de(()=>[te("i",{class:"material-icons cloud-icon right",onClick:I[1]||(I[1]=F=>v())},"autorenew")]),_:1},8,["content"])]),oe(k,{modelValue:f.value,"onUpdate:modelValue":I[2]||(I[2]=F=>f.value=F),onChange:b},{default:de(()=>[(H(!0),le(Lt,null,In(u.value,F=>(H(),Ye(w,{key:F.id,value:F.value},{default:de(()=>[Xt(Ke(F.value),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"]),te("p",null,[I[10]||(I[10]=te("span",{class:"user_span_color"},"API key:",-1)),oe(R,{class:"box-item",effect:"dark",content:L.$t("message.copy_apiKey"),placement:"bottom"},{default:de(()=>[te("i",{class:"material-icons cloud-icon right",onClick:I[3]||(I[3]=F=>v())},"content_copy")]),_:1},8,["content"])]),oe(D,{modelValue:p.value,"onUpdate:modelValue":I[4]||(I[4]=F=>p.value=F)},null,8,["modelValue"])]),te("div",AUe,[oe(P,{class:"background_blue left",style:{color:"#fff"},onClick:I[5]||(I[5]=F=>y())},{default:de(()=>[Xt(Ke(L.$t("message.go_cloud_serve")),1)]),_:1}),oe(P,{class:"background_blue right",style:{color:"#fff"},onClick:I[6]||(I[6]=F=>S())},{default:de(()=>[Xt(Ke(L.$t("message.logout")),1)]),_:1})])])):(H(),le("div",$Ue,I[9]||(I[9]=[te("iframe",{src:"//cocorobo.cn/login",frameborder:"0",scrolling:"no"},null,-1)])))]),_:1},8,["modelValue"])])}}},eQ="/assets/cocoblockly-navbar_labs-icon-DoQiUAGP.png",wUe={class:"example"},kUe=["src"],NUe={class:"header_right_title_span"},PUe={class:"example_dialog_body"},DUe={class:"example_item"},xUe=["onClick"],BUe={class:"example_item"},FUe=["onClick"],UUe={class:"example_item"},HUe=["onClick"],VUe={__name:"example",emits:["setFileName"],setup(e,{emit:t}){const{t:n}=hc(),s=Pr.useImportFileNameStore(),i=t,r=Pr.useLoadBlocklyStatus(),a=Pr.useyXmlStore(),c=K(!1),u=[{id:1,name:n("message.example_1"),childrenList:[{id:1,name:n("message.example_1_1"),childrenList:[{name:n("message.example_1_1_1"),url:"基础/未命名.xml"},{name:n("message.example_1_1_2"),url:"基础/未命名.xml"}]},{id:2,name:n("message.example_1_2"),url:"https://www.baidu.com",childrenList:[{name:n("message.example_1_2_1"),url:"基础/未命名.xml"},{name:n("message.example_1_2_2"),url:"基础/未命名.xml"}]}]},{id:2,name:n("message.example_2"),childrenList:[{name:n("message.example_2_1"),childrenList:[{name:n("message.example_2_1_1"),url:"基础/未命名.xml"},{name:n("message.example_2_1_2"),url:"基础/未命名1.xml"}]}]}],h=K(0),f=K(0),p=b=>{h.value=b,f.value=0},_=b=>{f.value=b},E=b=>{mo.get(`/example/${b.url}`).then(y=>{let S=y.data;console.log(y.data,v(S)),v(S)?(s.$patch({fileName:b.name}),i("setFileName",b.name),a.$patch({xmlStr:S}),localStorage.setItem("workspaceXml",S),r.$patch({status:!0}),Bo({message:n("message.open_example_success"),type:"success"}),setTimeout(()=>{r.$patch({status:!1})},100),c.value=!1):Bo({message:n("message.open_example_error"),type:"error"})})},v=b=>new DOMParser().parseFromString(b,"application/xml").getElementsByTagName("parsererror").length===0;return(b,y)=>{const S=Ot("el-tooltip"),L=Ot("el-dialog");return H(),le("div",wUe,[oe(S,{content:b.$t("message.example")},{default:de(()=>[te("div",{class:"el-dropdown-link",title:"样例",onClick:y[0]||(y[0]=I=>c.value=!0)},[te("img",{src:g(eQ),alt:"",class:"header_right_icon left"},null,8,kUe),te("span",NUe,Ke(b.$t("message.example")),1)])]),_:1},8,["content"]),oe(L,{modelValue:c.value,"onUpdate:modelValue":y[1]||(y[1]=I=>c.value=I),title:b.$t("message.example"),class:"example_dialog"},{default:de(()=>[te("div",PUe,[te("div",DUe,[(H(),le(Lt,null,In(u,(I,R)=>te("div",{class:z(h.value==R?"example_item_div_active example_item_div":"example_item_div"),key:R,onClick:w=>p(R)},Ke(I.name),11,xUe)),64))]),te("div",BUe,[(H(!0),le(Lt,null,In(u[h.value].childrenList,(I,R)=>(H(),le("div",{class:z(f.value==R?"example_item_div_active example_item_div":"example_item_div"),key:R,onClick:w=>_(R)},Ke(I.name),11,FUe))),128))]),te("div",UUe,[(H(!0),le(Lt,null,In(u[h.value].childrenList[f.value].childrenList,(I,R)=>(H(),le("div",{class:"example_item_div",key:R,onClick:w=>E(I)},Ke(I.name),9,HUe))),128))])])]),_:1},8,["modelValue","title"])])}}},GUe=Gl(VUe,[["__scopeId","data-v-f6e51d9b"]]),WUe="/assets/preloader-DMWULHSL.gif",XUe=["src"],zUe={style:{padding:"20px"}},YUe={class:"labs_card_p"},KUe={__name:"targetCard",props:{imgSrc:{type:String,default:""},linkSrc:{type:String,default:""},title:{type:String,default:""},comingSoon:{type:Boolean,default:!1}},emits:"getNextValue",setup(e,{emit:t}){const n=e,s=t,i=a=>{s("getNextValue",a)},r=()=>{n.linkSrc!=""?window.open(n.linkSrc):i(n.title)};return(a,c)=>{const u=Ot("el-button"),h=Ot("el-card");return H(),Ye(h,{style:{"border-radius":"10px"}},{default:de(()=>[te("img",{class:"labs_card_img",src:e.imgSrc,alt:""},null,8,XUe),te("div",zUe,[te("p",YUe,Ke(e.title),1),e.comingSoon?Ge("",!0):(H(),Ye(u,{key:0,type:"primary",onClick:r},{default:de(()=>[Xt(Ke(a.$t("message.enter")),1)]),_:1}))])]),_:1})}}},Ml=Gl(KUe,[["__scopeId","data-v-35060cee"]]),tQ="/assets/AppCenter_ai_teachableMachine-CQTIYmVw.jpg",nQ="/assets/AppCenter_ai_emotion-DLWQ8NN5.jpg",oQ="/assets/AppCenter_ai_gesture_recognition-BypWNjDz.jpg",sQ="/assets/object_recognition_header-CE25_6ku.jpg",iQ="/assets/posenet_recogition-B6dlSqE9.png",rQ="/assets/tm_with_pose-g4ZLQwij.jpg",lQ="/assets/AppCenter_ai_speech-DKJR0Hqu.jpg",P$="/assets/AppCenter_comingSoon-C83NGzxm.jpg",jUe={__name:"ai",emits:"getNextValueAI",setup(e,{emit:t}){const n=K("first"),s=t,i=r=>{s("getNextValueAI",r)};return(r,a)=>{const c=Ot("el-col"),u=Ot("el-row"),h=Ot("el-tab-pane"),f=Ot("el-tabs");return H(),le("div",null,[oe(f,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=p=>n.value=p),class:"demo-tabs"},{default:de(()=>[oe(h,{label:r.$t("message.visual_identification"),name:"first"},{default:de(()=>[oe(u,{class:"el_row_card"},{default:de(()=>[oe(c,{span:12,class:"card_style"},{default:de(()=>[oe(Ml,{imgSrc:g(tQ),linkSrc:"",title:r.$t("message.Deep_learning_Machines"),onGetNextValue:i,comingSoon:!1},null,8,["imgSrc","title"])]),_:1}),oe(c,{span:12,class:"card_style"},{default:de(()=>[oe(Ml,{imgSrc:g(nQ),linkSrc:"",title:r.$t("message.emotion_recognition"),onGetNextValue:i,comingSoon:!1},null,8,["imgSrc","title"])]),_:1}),oe(c,{span:12,class:"card_style"},{default:de(()=>[oe(Ml,{imgSrc:g(oQ),linkSrc:"",title:r.$t("message.gesture_recognition"),onGetNextValue:i,comingSoon:!1},null,8,["imgSrc","title"])]),_:1}),oe(c,{span:12,class:"card_style"},{default:de(()=>[oe(Ml,{imgSrc:g(sQ),linkSrc:"",title:r.$t("message.object_recognition"),onGetNextValue:i,comingSoon:!1},null,8,["imgSrc","title"])]),_:1}),oe(c,{span:12,class:"card_style"},{default:de(()=>[oe(Ml,{imgSrc:g(iQ),linkSrc:"",title:r.$t("message.pose_recognition"),onGetNextValue:i,comingSoon:!1},null,8,["imgSrc","title"])]),_:1}),oe(c,{span:12,class:"card_style"},{default:de(()=>[oe(Ml,{imgSrc:g(rQ),linkSrc:"",title:r.$t("message.face_recognition"),onGetNextValue:i,comingSoon:!1},null,8,["imgSrc","title"])]),_:1})]),_:1})]),_:1},8,["label"]),oe(h,{label:r.$t("message.speech_recognition"),name:"second"},{default:de(()=>[oe(u,{class:"el_row_card"},{default:de(()=>[oe(c,{span:12,class:"card_style"},{default:de(()=>[oe(Ml,{imgSrc:g(lQ),linkSrc:"",title:r.$t("message.speech_recognition"),onGetNextValue:i,comingSoon:!1},null,8,["imgSrc","title"])]),_:1})]),_:1})]),_:1},8,["label"]),oe(h,{label:r.$t("message.text_processing"),name:"third"},{default:de(()=>[oe(u,{class:"el_row_card"},{default:de(()=>[oe(c,{span:12,class:"card_style"},{default:de(()=>[oe(Ml,{imgSrc:g(P$),linkSrc:"",title:r.$t("message.stay_tuned"),onGetNextValue:i,comingSoon:!0},null,8,["imgSrc","title"])]),_:1})]),_:1})]),_:1},8,["label"])]),_:1},8,["modelValue"])])}}},QUe="/assets/AppCenter_iot_thingspeak-C7U4ZlwS.jpg",qUe="/assets/AppCenter_iot_ifttt-BalWZIhU.jpg",JUe={__name:"iot",setup(e){return(t,n)=>{const s=Ot("el-col"),i=Ot("el-row");return H(),le("div",null,[oe(i,{class:"el_row_card"},{default:de(()=>[oe(s,{span:12,class:"card_style"},{default:de(()=>[oe(Ml,{imgSrc:g(QUe),linkSrc:"//thingspeak.com/",title:"ThingSpeak",onGetNextValue:t.getNextValue,comingSoon:!1},null,8,["imgSrc","onGetNextValue"])]),_:1}),oe(s,{span:12,class:"card_style"},{default:de(()=>[oe(Ml,{imgSrc:g(qUe),linkSrc:"//ifttt.com/maker_webhooks",title:"IFTTT",onGetNextValue:t.getNextValue,comingSoon:!1},null,8,["imgSrc","onGetNextValue"])]),_:1})]),_:1})])}}},ZUe={__name:"robotContro",setup(e){return(t,n)=>{const s=Ot("el-col"),i=Ot("el-row");return H(),le("div",null,[oe(i,{class:"el_row_card"},{default:de(()=>[oe(s,{span:12,class:"card_style"},{default:de(()=>[oe(Ml,{imgSrc:g(P$),linkSrc:"//thingspeak.com/",title:t.$t("message.stay_tuned"),onGetNextValue:t.getNextValue,comingSoon:!0},null,8,["imgSrc","title","onGetNextValue"])]),_:1})]),_:1})])}}},e2e={__name:"science",setup(e){return(t,n)=>{const s=Ot("el-col"),i=Ot("el-row");return H(),le("div",null,[oe(i,{class:"el_row_card"},{default:de(()=>[oe(s,{span:12,class:"card_style"},{default:de(()=>[oe(Ml,{imgSrc:g(P$),linkSrc:"//thingspeak.com/",title:t.$t("message.stay_tuned"),onGetNextValue:t.getNextValue,comingSoon:!0},null,8,["imgSrc","title","onGetNextValue"])]),_:1})]),_:1})])}}},t2e={__name:"interactiveGames",setup(e){return(t,n)=>{const s=Ot("el-col"),i=Ot("el-row");return H(),le("div",null,[oe(i,{class:"el_row_card"},{default:de(()=>[oe(s,{span:12,class:"card_style"},{default:de(()=>[oe(Ml,{imgSrc:g(P$),linkSrc:"//thingspeak.com/",title:t.$t("message.stay_tuned"),onGetNextValue:t.getNextValue,comingSoon:!0},null,8,["imgSrc","title","onGetNextValue"])]),_:1})]),_:1})])}}},n2e={__name:"ARVR",setup(e){return(t,n)=>{const s=Ot("el-col"),i=Ot("el-row");return H(),le("div",null,[oe(i,{class:"el_row_card"},{default:de(()=>[oe(s,{span:12,class:"card_style"},{default:de(()=>[oe(Ml,{imgSrc:g(P$),linkSrc:"//thingspeak.com/",title:t.$t("message.stay_tuned"),onGetNextValue:t.getNextValue,comingSoon:!0},null,8,["imgSrc","title","onGetNextValue"])]),_:1})]),_:1})])}}},o2e={class:"labs"},s2e=["title"],i2e=["src"],r2e={class:"header_right_title_span"},l2e={class:"my-header"},a2e={class:"labs_title"},c2e={class:"all_class"},u2e={class:"labs_class_left"},d2e={class:"labs_class_right"},h2e={key:0},f2e={key:1},p2e={key:2},g2e={key:3},m2e={key:4},_2e={key:5},T2e=["src"],E2e={class:"labs_card_container"},v2e={key:0},b2e=["onClick"],O2e={key:1,class:"my-header"},S2e={class:"labs_title"},y2e=["src"],$2e={key:0,class:"model-loading",style:{width:"100%",height:"100%","background-color":"rgba(255, 255, 255, 0.9)"}},I2e={__name:"labs",setup(e){const{t}=hc(),n=location.href.indexOf("hk")>0,s=K(!1),i=K(1),r=K(t("message.AI")),a=K(0),c=[{title:t("message.Deep_learning_Machines"),content:t("message.Deep_learning_Machines_content"),img:tQ,system:"Windows (>Windows7), macOS (>10.11)",resolution:"1440*768",memoryCapacity:"8GB-16GB",HardDisk:"256GB-512GB",GraphicsCard:"650M",camera:!0,microphone:!1,iframeSrc:n?"https://ai-demos.cocorobo.hk/teachable-machine-2/public/":"https://ai-demos.cocorobo.cn/teachable-machine-2/public/"},{title:t("message.emotion_recognition"),content:t("message.emotion_recognition_content"),img:nQ,system:"Windows (>Windows7), macOS (>10.11)",resolution:"1440*768",memoryCapacity:"8GB-16GB",HardDisk:"256GB-512GB",GraphicsCard:"650M",camera:!0,microphone:!1,iframeSrc:n?"https://beta.ai-demos.cocorobo.hk/labs/emotion-cloud/index.html":"https://beta.ai-demos.cocorobo.cn/labs/emotion-cloud/index.html"},{title:t("message.gesture_recognition"),content:t("message.gesture_recognition_content"),img:oQ,system:"Windows (>Windows7), macOS (>10.11)",resolution:"1440*768",memoryCapacity:"8GB-16GB",HardDisk:"256GB-512GB",GraphicsCard:"650M",camera:!0,microphone:!1,iframeSrc:n?"https://beta.ai-demos.cocorobo.hk/labs/gesture-cloud/index.html":"https://beta.ai-demos.cocorobo.cn/labs/gesture-cloud/index.html"},{title:t("message.object_recognition"),content:t("message.object_recognition_content"),img:sQ,system:"Windows (>Windows7), macOS (>10.11)",resolution:"1440*768",memoryCapacity:"8GB-16GB",HardDisk:"256GB-512GB",GraphicsCard:"650M",camera:!0,microphone:!1,iframeSrc:n?"https://ai-demos.cocorobo.hk/object-detection-2/":"https://ai-demos.cocorobo.cn/object-detection-2/"},{title:t("message.pose_recognition"),content:t("message.pose_recognition_content"),img:iQ,system:"Windows (>Windows7), macOS (>10.11)",resolution:"1440*768",memoryCapacity:"8GB-16GB",HardDisk:"256GB-512GB",GraphicsCard:"650M",camera:!0,microphone:!1,iframeSrc:n?"https://ai-demos.cocorobo.hk/posenet-2/demos/dist/":"https://ai-demos.cocorobo.cn/posenet-2/demos/dist/"},{title:t("message.face_recognition"),content:t("message.face_recognition_content"),img:rQ,system:"Windows (>Windows7), macOS (>10.11)",resolution:"1440*768",memoryCapacity:"8GB-16GB",HardDisk:"256GB-512GB",GraphicsCard:"650M",camera:!0,microphone:!1,iframeSrc:n?"https://ai-demos.cocorobo.hk/teachable-machine-pose-recognition-2/public/":"https://ai-demos.cocorobo.cn/teachable-machine-pose-recognition-2/public/"},{title:t("message.speech_recognition"),content:t("message.speech_recognition_content"),img:lQ,system:"Windows (>Windows7), macOS (>10.11)",resolution:"1440*768",memoryCapacity:"8GB-16GB",HardDisk:"256GB-512GB",GraphicsCard:"650M",camera:!1,microphone:!0,iframeSrc:n?"https://beta.ai-demos.cocorobo.hk/labs/speech-cloud/index.html":"https://beta.ai-demos.cocorobo.cn/labs/speech-cloud/index.html"}],u=K({}),h=K(!1),f=K(null),p=K(!0),_=(L,I)=>{i.value=L,r.value=I},E=L=>{a.value=1,u.value=c.find(I=>I.title==L)},v=()=>{h.value=!0,p.value=!0,setTimeout(()=>{b()},100)},b=()=>{const L={data:SE().userInfo,id:"loginVerify",url:localStorage.getItem("lang")=="zhHans"?"zh-hans":localStorage.getItem("lang")=="zhHant"?"zh-hant":"en"};f.value&&(p.value=!1,f.value.contentWindow.postMessage(JSON.parse(JSON.stringify(L)),"*"))},y=()=>{console.log(a.value,u.value.iframeSrc),u.value.iframeSrc==""&&h.value?(h.value=!1,a.value=1,u.value={}):a.value==1?(a.value=0,u.value={}):(s.value=!1,u.value={})},S=()=>{console.log(SE().userInfo),JSON.stringify(SE().userInfo)!="{}"?(s.value=!0,a.value=0,u.value={}):Bo({message:t("message.please_login"),type:"warning"})};return(L,I)=>{const R=Ot("el-tooltip"),w=Ot("el-col"),k=Ot("el-row"),D=Ot("el-button"),P=Ot("el-dialog");return H(),le("div",o2e,[oe(R,{content:L.$t("message.labs")},{default:de(()=>[te("div",{class:"el-dropdown-link",title:L.$t("message.labs"),onClick:S},[te("img",{src:g(eQ),alt:"",class:"header_right_icon left"},null,8,i2e),te("span",r2e,Ke(L.$t("message.labs")),1)],8,s2e)]),_:1},8,["content"]),oe(P,{modelValue:s.value,"onUpdate:modelValue":I[7]||(I[7]=B=>s.value=B),title:"","show-close":!1},{header:de(({close:B})=>[te("div",l2e,[te("span",a2e,Ke(L.$t("message.labs")),1),te("i",{class:"material-icons right",style:{"margin-top":"5px",cursor:"pointer","margin-right":"-15px"},onClick:y},"close")])]),default:de(()=>[a.value==0?(H(),Ye(k,{key:0,class:"labs_body"},{default:de(()=>[oe(w,{class:"labs_class_content",span:6},{default:de(()=>[te("p",c2e,Ke(L.$t("message.all_categorization")),1),te("ul",u2e,[te("li",{class:z(i.value==1?"active":""),onClick:I[0]||(I[0]=B=>_(1,L.$t("message.AI")))},Ke(L.$t("message.AI")),3),te("li",{class:z(i.value==2?"active":""),onClick:I[1]||(I[1]=B=>_(2,L.$t("message.IoT")))},Ke(L.$t("message.IoT")),3),te("li",{class:z(i.value==3?"active":""),onClick:I[2]||(I[2]=B=>_(3,L.$t("message.robot_control")))},Ke(L.$t("message.robot_control")),3),te("li",{class:z(i.value==4?"active":""),onClick:I[3]||(I[3]=B=>_(4,"科学实验"))},"科学实验",2),te("li",{class:z(i.value==5?"active":""),onClick:I[4]||(I[4]=B=>_(5,L.$t("message.scientific_experiment")))},Ke(L.$t("message.scientific_experiment")),3),te("li",{class:z(i.value==6?"active":""),onClick:I[5]||(I[5]=B=>_(6,"AR/VR"))},"AR/VR",2)])]),_:1}),oe(w,{span:18,style:{padding:"0 0.75rem"}},{default:de(()=>[te("h5",null,Ke(r.value),1),te("ul",d2e,[i.value==1?(H(),le("li",h2e,[oe(jUe,{onGetNextValueAI:E})])):i.value==2?(H(),le("li",f2e,[oe(JUe)])):i.value==3?(H(),le("li",p2e,[oe(ZUe)])):i.value==4?(H(),le("li",g2e,[oe(e2e)])):i.value==5?(H(),le("li",m2e,[oe(t2e)])):(H(),le("li",_2e,[oe(n2e)]))])]),_:1})]),_:1})):a.value==1?(H(),Ye(k,{key:1,gutter:20,class:"activeContent"},{default:de(()=>[oe(w,{span:12,style:{"background-color":"#fff","box-shadow":"1px 2px 3px #eeeeee"}},{default:de(()=>[te("img",{style:{width:"100%"},src:u.value.img,alt:""},null,8,T2e),te("h3",null,Ke(u.value.title),1),te("p",null,Ke(u.value.content),1)]),_:1}),oe(w,{span:12},{default:de(()=>[te("div",E2e,[te("h4",null,Ke(L.$t("message.system_configure")),1),te("p",null,Ke(L.$t("message.system"))+Ke(u.value.system),1),te("p",null,Ke(L.$t("message.memory"))+Ke(u.value.memory),1),te("p",null,Ke(L.$t("message.HardDisk"))+Ke(u.value.HardDisk),1),te("p",null,Ke(L.$t("message.GraphicsCard"))+Ke(u.value.GraphicsCard),1),te("p",null,Ke(L.$t("message.camera"))+Ke(u.value.camera?L.$t("message.need"):L.$t("message.not_need")),1),te("p",null,Ke(L.$t("message.microphone"))+Ke(u.value.microphone?L.$t("message.need"):L.$t("message.not_need")),1)]),oe(D,{onClick:I[6]||(I[6]=B=>v())},{default:de(()=>[Xt(Ke(L.$t("message.enter")),1)]),_:1})]),_:1})]),_:1})):Ge("",!0)]),_:1},8,["modelValue"]),oe(P,{modelValue:h.value,"onUpdate:modelValue":I[8]||(I[8]=B=>h.value=B),width:u.value.iframeSrc?"95%":"","show-close":!1},{header:de(({close:B})=>[u.value.iframeSrc?(H(),le("span",v2e,[te("i",{class:"material-icons right",style:{"margin-top":"-15px",cursor:"pointer","margin-right":"0px"},onClick:B},"close",8,b2e)])):(H(),le("div",O2e,[te("span",S2e,Ke(u.value.title),1),te("i",{class:"material-icons right",style:{"margin-top":"5px",cursor:"pointer","margin-right":"-15px"},onClick:y},"close")]))]),default:de(()=>[te("iframe",{id:"postMessage",src:u.value.iframeSrc,ref_key:"labsData",ref:f,frameborder:"0",style:{width:"100%",height:"700px"}},null,8,y2e),p.value?(H(),le("div",$2e,I[9]||(I[9]=[te("img",{src:WUe,alt:""},null,-1)]))):Ge("",!0)]),_:1},8,["modelValue","width"])])}}},R2e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjI5ODc2NTBBMDUyMDExRUFBMDAzRjA0RjhCREU5OTgyIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjI5ODc2NTBCMDUyMDExRUFBMDAzRjA0RjhCREU5OTgyIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6Mjk4NzY1MDgwNTIwMTFFQUEwMDNGMDRGOEJERTk5ODIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6Mjk4NzY1MDkwNTIwMTFFQUEwMDNGMDRGOEJERTk5ODIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6e2tSKAAADhElEQVR42uyaXUgUURTHd3VNDc2iVDILNPqgQAuEoDAsiQqK7OuhEosSoQyjXiKiiN6CeioqkaRAESTIh7Soh4IKRCrIiKKgyNK+FCwry3Sn/4W7cDrMx87snZlN9sAPZu459+79z71zv2aDmqYFxoMlBcaJJYQkhMSxkHLwFrwCfaDaDyEhBWVkgFnkPu9/bZFPFve+tEg+SLWRPwwWsLRCUGDzIY2A98DxpBZkE+ITUOTDAx0E88BnVV1rgk+DzmSQovIdyfJxBA2qfEfawFwwrKhy4h2aAkpJWif4QiouesFQrL8Z9GDRWAPq5fV3kKPwQXk6sx8g19fcEOGFkFVseK6Ph5l9EcgFP0EyuA9GLfIcI9f3wAPXHpl4R6Jki/avHbeIX8PiV9j4LdvYzXCbVOwXKDCJ7Saxd90U4UTIQjBGKthuEHeCtcayeBMiuMgquY35i5m/MYoyN4N9YC/YDoJeCMkGX0lF/4Ai6UsDL4lvCEyyKI8LF1Zqt15Ohl8xK1ewka9VrnobwRziqwXfLMrT24hVuTlqcY6ypzjC7puiKCMEPuq0iGjxTLe7FqVZ07fHIDWK/Os0Y6v0UkgWGNWpREmU+VtNhNzwUkgLCOtUQsw3uRZ5c+RAEbEOcIvcj1rMU8qEXNfM7Q2YaZK/jsXPAHks7YibQpIMRDSAQZbWY/JUO0ncB5L+jqQ/dUtISHYBblXSX67j65VzBV8h0C55ivjOsPxLVAtJkS8gtz0sbr1OzHM5WUZiTjP/YuIrYb7zKoWIofSmTgV3G8RvYHFXZZeMPJAe4uu26Hb9IF2FkFS26jVqCU4FiS0j6atZOYd18u5nMVtjFZJmIKI6ypasBV2kNQJyxqergQyDAWWAxLVZ/ZbZ4YNYO10CZTqHCQ02VkFTwYC8zpYH3unkhLFZbrkj6z5Rod9gI5gm08T9bNDrZK11UKclamKcQGs053bIadeaCC4oFBGQO0Wn9shp14rYZfAanIzxeGA+eEa60Bj4YXKSI/yZzF8Mup2eouxSdM6xg1VqE3hoIiQsK97B9i51qvcjdkhmO8cXNvJ2kXx9bASMaYfoxJaznWOTjbwt5Ho6WOvnx9BKdn/FRt5W2c0ittOvrpXPRp87DspoZ2UU8piQB62xFPTLr1LiE8JZB2Wck1/ShuUkuVKOpJ5+Vkj8YSAhJCEkIUSd/RVgAD59DGaapxy6AAAAAElFTkSuQmCC",C2e=["title"],M2e=["src"],A2e={class:"header_right_title_span"},L2e={__name:"languareSwitch",setup(e){const t=n=>{localStorage.setItem("lang",n),window.location.reload()};return(n,s)=>{const i=Ot("el-tooltip"),r=Ot("el-dropdown-item"),a=Ot("el-dropdown-menu"),c=Ot("el-dropdown");return H(),Ye(c,{trigger:"click"},{dropdown:de(()=>[oe(a,null,{default:de(()=>[oe(r,{class:"header_menu_li",style:{color:"#26a69a"},onClick:s[0]||(s[0]=u=>t("en"))},{default:de(()=>s[3]||(s[3]=[Xt("Englsh")])),_:1}),oe(r,{class:"header_menu_li",style:{color:"#26a69a"},onClick:s[1]||(s[1]=u=>t("zhHant"))},{default:de(()=>s[4]||(s[4]=[Xt("中文繁體")])),_:1}),oe(r,{class:"header_menu_li",style:{color:"#26a69a"},onClick:s[2]||(s[2]=u=>t("zhHans"))},{default:de(()=>s[5]||(s[5]=[Xt("中文简体")])),_:1})]),_:1})]),default:de(()=>[te("div",{class:"el-dropdown-link",title:n.$t("message.languare")},[oe(i,{content:n.$t("message.languare")},{default:de(()=>[te("div",null,[te("img",{src:g(R2e),alt:"",class:"header_right_icon left"},null,8,M2e),te("span",A2e,Ke(n.$t("message.languare")),1)])]),_:1},8,["content"])],8,C2e)]),_:1})}}},w2e="/assets/%E5%88%86%E4%BA%AB-BDgeFZGL.png",k2e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAADkJJREFUeF7tnQvQbtUYx///cdegFGEmFSfRSBdmQhkliqKpVEjKINepJINRVNKQpuIcXYzLTJFLRzJSCJVxQjN0M0oXyWVSOOUyYaJ57KfZp/M5zvnevda71n7ftdZ/zXxz5sy3nmet57+e37f3++61n0WoSQEpsE4FKG2kgBRYtwICRNkhBRZRQIAoPaSAAFEOSIE4BXQFidNNVo0oIEAaWWiFGaeAAInTTVaNKCBAGllohRmngACJ001WjSggQBpZaIUZp4AAidNNVo0oIEAaWWiFGaeAAInTTVaNKCBAGllohRmngACJ001WjSggQBpZaIUZp4AAidNNVo0oIEAaWWiFGaeAAInTTVaNKCBAGllohRmngACJ001WjSgwCiBmthTAjgA2AfC4RrStKczjAZxM8p6aghoSS3ZAzOxmAEuGTEZ95l6BkwGcS/LauZ9poglmBcTMVvRXjkTTlZs5UGAlgGNInjUHc8k+hWyAmNmJAN6fPQINMCsFziF5yKwGH2vcnIBcA2CbsQLRODNRYDnJA2Yy8kiD5gTkTwA2GikODTM7BaqGJCcgNrs108gjK1AtJAJk5EyqeLgqIREgFWfsDEKrDhIBMoMsqnzIqiARIJVn64zCqwYSATKjDGpg2CogESANZOoMQyweEgEyw+xpZOiiIZk7QEhmm9PChDSz4wAcG5KkY80tZE4xfa0LPsZuCptiIcmWjLGLMFYSCpAp0j3OtEhIBEjAYo8Fb8CUorrG/vGKGux/jYqDRIAErLoACRBr3V2LgkSABKx5w4D4G4VBn9cmyFoMJAJEgAxRwAH5BYDzhnQe2KcISATIwNX0bi1fQbovF48zs/1bg0SACJAhChzvgHjH1iARIEPSo+/T+hVklVQtQSJABMgQBR64grQGiQAZkh66gvwfIK3cbgkQATJEgbUC0gIkAmRIeugKsk5AaodEgAiQIQosCkjNkAiQIemhK8hEQGqFRIAIkCEKDAKkRkgEyJD00BVkMCC1QSJABMgQBYIAqQkSATIkPXQFCQakFkgEiAAZokAUIDVAIkCGpMfqPpeHdZ/b3jsHziwakNIhESCBmdJo96kAyQTJ2SRfn3s9BEhuhevwPzUgmSB5M8lP55RYgORUtx7fSQDJAMkdAHbtDvG5PpfUAiSXsnX5TQZIBkjOJ7lfLrkFSC5l6/KbFJAMkOxH8vwckguQHKrW5zM5IIkh+QjJLAfGtgzIHgAuqi+Xs0S0J8mLc3hO9PruJSR3zzG/lgHZDMCvc4haoc/Nu69Ub8sVVwJIVpLMcmBss4D0l/hvAHhFroWvxO+FJPfKHUsCSLYkeVPqebYOyGMBrEwtamX+NiR51xgxTQnJLiST73RoGpD+KrIxgGVd5UAviqa2WoHl3R+Pw0jeOaYoUxTWFiA5F8rMXglgewDbAFgv51hz7PseANcCuCrX16aTYhcgExSqpTjbpETQ79eugAARIGJjEQUEiAARIALk/iLHUefg6RarbX5i8waAPqS3nTptRC9AdIvVRqZHRilABEhk6rRhJkAESBuZHhmlABEgkanThpkAESBtZHpklAJEgESmThtmAkSAtJHpkVEKEAESmTptmAkQAdJGpkdGKUAESGTqtGEmQARIG5keGaUAESCRqdOGmQARIPcrYGYPB/AUAJsv+PH/e7u1r7jiVVf851aS/2oBEQHSMCBm9lzflt1XUnleYML/GMCFAC4j+ZNA22K6C5DGADGz3QC8ugfDa3GlaF6j6jIAXyZ5SQqH8+JDgDQCiJltCeAoAIdmTj4v/38KyRszjzOKewFSOSD9Z4t39XB43a0xmtetOgXAqaV/VhEgFQNiZnsCOAHAdmNQsZYxrgbwAZLF1hwWIJUCYmYf8uScERhrDnsCyQ/OyVyCpiFAKgTEzPyD8kuCMiF/5++S9C8IimoCpDJAzOyv3b3/o+c0C/9G8jFzOre1TkuAVASImX0fwIvmPAEvJbnrnM/xgekJkEoAMbPDACwtJPEOJ+kFuue+CZAKADEzP1PEzxYpqe1F0p/Ez3UTIIUDYmZb90e3bZI40/4NYNXDPn/I+JDE/n8HwI9S+3liv0ndCZDyAfkCgNcmyIprAPiBLz8AcB1J36C48F7cNy4+q9tS8sKu384Atk0w5rkkD0rgJ5sLAVIwIGa2T5e0X5syOxyKZSSD/JjZvn6gTQ/LNFPYl+QF0zjIaStAygbkhwB2miJBDiX5mSnsfZv8mwD4/qvYtoLkC2KNc9sJkEIBMbN3AjhtigTZh+TXp7BfePu1d3cS1jRXgSNJfjzFXFL7ECAFAmJmG/RHk8V+MN+A5F9SJpOZrQ/g7kif/oF9G5Kx9pHDTjYTIGUC4ucXfnXy8q61x2YkfxNpu6iZmW0KIPb88v1mdQ7hYkEJkDIBOQPA2yKS/KUkvxNhN9jEzHYH8O3BBqs7nkny7RF2WU0ESJmA/BKAP5sIaR8j+d4Qg9i+ZnYSgPcE2t9I8umBNtm7C5DCADGzZwC4PjAz/IHfTiT/HGgX1d3MNgKwIgLirUjeEDVoJiMBUh4ghwP4RGA+HEXy1ECbqbqbmb/F6G8VhrQjSM7VfjIBUh4g/nXoESFZB2DH7l2MHwXaTNW9eyfl+d07KVcEOvkUybcG2mTtLkDKA+SL3R6p1wRkxV3dztkNA/on69rtMF7Z7TAOeQ9+7l6qEiDlAfI9ACHvU8ws6czM30XfI4C4W0huEdA/e1cBUh4gvvv1mQGZ4bWqQq44Aa4X72pm/rnnyACH95F8cED/7F0FSHmA3Ang8QGZ8UmSvqlw9GZmbwFwVuDAm5L8baBNtu4CpDxALDAbjid5XKBNku5m5tviveJiSNuFpO8wnosmQMoD5A4AGwdkzxkk3xHQP1lXM/Mn46cHOnwySd+bNRdNgJQHyLX9i0tDE2g5yQOGdk7Zz8wcjpDtI/eSfFjKOUzrS4CUB4jvpQqpL3U5Sa/gPnozM7+98tusoe0GklsN7TxGPwFSHiDnAHhdQHL4u+XrkfR/R2tm5u+w3xP4LvtFJF8+2iQHDCRAygPkZADvHrC2C7vsSvLSQJupupuZ1+fyOl0hbWn3TkjoLoEQ/8F9BUh5gHiBBi/UENJG/ybLzPybs2NDJgngoO5B4bmBNlm7C5DyAHkigNsDs8KPI9ihqyByS6BdVHczWwLgysBtJj7Wk0j+IWrQTEYCpDBAfLpm5kee7RCYE165xHcCZ29m5jtyQx9OXknSj4SbqyZAygTkwwCOjsikA0guj7AbbGJm+wM4b7DB6o4nkjwmwi6riQApExDfABh7KM12JL1IXPJmZl5Mzg/NiWleZfHiGMOcNgKkTED8CAHftBhb1cS/9v1HysQys0f2X+vGuPUn51uT9KMb5qoJkAIB8SknqIv1HJI/S5GNZvZsAD+dwpfqYg0UjwP7BXeL/UvAbqdf8GAjGZjZtJUVvTLK2V0xh3/GTLkrzvAIAId0e8POjLHvbVRZMUC8bMlYKSApavPeBMCfzn9l6NfA/de4rwJwMICnBazv2rqqNm+AgAIkQKz+VitVdXd39y0AnwfgZYW8Aoq/MuvNX9n1SiVelse3ubwscJrr6q7q7oFCCpBAwczMjyTwQztDtsAHjpKlu7/4tRvJ67J4T+Q09s6jO0Yiy3stAiRiYc3M/6r7bVJJ7WCSfrWa6yZAJizPPH9IXzh1M/sogFEqJybI6JNIvi+Bn+wuBEglgPSfR/wJtj/Jnuc2sxe4YkQRIBUB0kMSWjcrJm9ibb5E8sBY41nYCZDKAOkheUP3lP2zs0ioRcZ8I8nPzdmcJk5HgFQISA/Jnt1Bm36C1KzrTP0HwN4kY/eOTUzinB0ESKWA9JD4lng/S2T7nEm0iO+rvGgDSX83pMgmQCoGpIfkQX1lEa8uMtb5G/6g0cH0kkP3FUlGP2kBUjkgq8Izs0cB8PpYDkrsLuBJue67ch2M00n+fVLnEn4vQBoBZAEoTwDg+6i8esiLEyWpF9T+Zr+fywvbVdMESGOALAzXzDbrTsv1DY/+E3pWue8k9qOfLyAZe3Dn3IMkQBoGZA1YHtoXxfbC2At/vNsf1/whee/cZ3eCCQoQAZIgjep1IUAESL3ZnSAyASJAEqRRvS4EiACpN7sTRCZABEiCNKrXhQARIPVmd4LIBIgASZBG9boQIAKk3uxOEJkAESAJ0qheFwJEgNSb3QkiEyACJEEa1etCgAiQerM7QWQCRIAkSKN6XQgQAVJvdieITIAIkARpVK8LASJA6s3uBJEJEAGSII3qdSFABEi92Z0gMgEiQBKkUb0uBIgAqTe7E0QmQARIgjSq14UAqXdtFdlsFWjjhKnZaqzRC1ZAgBS8eJp6fgUESH6NNULBCgiQghdPU8+vgADJr7FGKFgBAVLw4mnq+RUQIPk11ggFK1AcIHcDWL9gwTX1shRYQvJXqafM1A5X+TOzq7tDLbfN5V9+pcACBW4juXkORXICshTAYTkmLZ9SYA0FlpE8PIcq2QDxyZrZzQCW5Ji4fEqBXoFbSG6RS42sgPSQrACwY64A5LdpBa4guVNOBbID0kNyIoADAfgZfWpSYFoFfg/gHJJHT+tokv0ogCz44O7HIT910qT0eymwiAK3k7xpLIVGBWSsoDSOFEilgABJpaT8VKmAAKlyWRVUKgUESCol5adKBQRIlcuqoFIpIEBSKSk/VSogQKpcVgWVSgEBkkpJ+alSAQFS5bIqqFQKCJBUSspPlQoIkCqXVUGlUkCApFJSfqpUQIBUuawKKpUCAiSVkvJTpQICpMplVVCpFBAgqZSUnyoVECBVLquCSqWAAEmlpPxUqYAAqXJZFVQqBQRIKiXlp0oFBEiVy6qgUinwX1of1zLGbRi5AAAAAElFTkSuQmCC",N2e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAADVJJREFUeF7tnVvMH0UZxp/nhpggNCEahBiECBKpgahYRITABUgFYgTkQkMVTaiI1BrxghKCXsCNGmnrCRJPxcREKFxQrJYoFTwVrQqmJEAjaJRDvDBSSYg3rztxCz18X7+d+c87/9nZZ5MvIXTmfWd+M8/Os/+d3SV0iIAILEqAYiMCIrA4AQlEs0MEDkFAAtH0EAEJRHNABNIIaAVJ46ZaEyEggUxkoNXNNAISSBo31ZoIAQlkIgOtbqYRkEDSuKnWRAhIIBMZaHUzjYAEksZNtSZCQAKZyECrm2kEJJA0bqo1EQISyEQGWt1MIyCBpHFTrYkQkEAmMtDqZhoBCSSNm2pNhIAEMpGBVjfTCEggadxUayIEJJCJDLS6mUZAAknjploTISCBTGSg1c00AhJIGjfVmggBCWQiA61uphGQQNK4HVTLzJYBOBvASgBnADgGwLGZwi8V5lkAzwF4GMAWkj9bqoL+fRgBCWQYp0OWMrPVANYBOC5DuBwhdgBYT/KHOYJNOYYEMsPom1lYJb4J4AMzhPGsei/JSz0TtB5bAkkcYTM7C8DPARyWGKJUtX+QfGOpZK3lkUASRtTMTgGwK6HqvKrsIvm2eSUfc14JJHL0zOzo7mI8XAQvj6w67+J3kbxi3o0YW34JJHLEzOx6AF+KrFZL8Q/rwj1uKCSQOF4ws0cBnBpZrZbiO0i+u5bGjKEdEkjEKJnZxQDui6hSY9FLSG6psWE1tkkCiRiV7mfd2wFcHVGlxqJ3kAz3bXQMICCBDIC0t4iZPQLgXRFVaiz6O5IramxYjW2SQCJGxcyeBnB8RJUaiz5D8oQaG1Zjm0YtkP5+xFv7fU+vKwA4/IJ1eIE8nileAvDlPoEBOHAOHPj/FiozpH1hf1j429lZurBPbJTH6ARiZicCuBbA+SO8FzHKSZKh0dsB/KLfH/avDPGKhRiVQMzsun5T4BuKEVKinASe6EUS9q+N4hiNQMzsx/1W8lGAVSMPSWAryfePgdEoBGJmwQfraIwAyernX/UNNLPbAHymsbmh7vyfQHhmZW3NMKoWSH/NsaFmgGrbzATWkNw4cxSnANUKpP+1KjxCqgtyp8GvJOzz4VFlkrsrac9+zahZIGHlCL9a6WifwEaSa2rsZs0CeQpAuOeho30Cu0meVGM3qxSImYXt5GFbuY7pEDite37+sdq6W6tAPtg9c3FPbbDUHlcCl5K81zVDQvBaBfLJ/m0hCV1SlZESuIbkt2pre60C+QKAm2eAdWf38rat/Ua5J2eIo6pLEOg3jJ4J4OMA3jMDsC929w3DuFd1tCiQK0jeVRXliTSm2/Awy4lNAhk6T2YAfTrJnUPzqFx+Amb2IQA/SogsgQyFligQPUo6FLBzOTP7DoCrItNIIEOBJQrkKpLfG5pD5fwImNnHAHw3MoMEMhRYokCWdy9Ge3xoDpXzI5D45kkJZOiQJArkSJJ7huZQOT8CZnYEgBcjM0ggQ4ElCuQ8kuHRTh1zJmBm5wJ4MLIZEshQYIkCuZ7kV4bmUDk/Amb2uX1eDDE0kQQylFSiQF7o7sRqa/xQyE7lzOzkcIM24e0vEsjQMUkUSAivN5gPhexUzsz+AiDlvVsSyNAxmUEgIUXYYnKTbhgOpZ2nXP/e4u8DOCoxogQyFFymTwyED9yEn3310+9Q8GnlwqMJ4e/NadVfqfV5kntfaDdjqHzVa92LdSWATfm6qUgjILCKZNhkWtVRq0AuAPDTqkipMd4E3kdym3eS2Pi1CiR8GPPfAF4T2yGVHyWBlwEsI/nf2lpfpUACJDMLF3yragOm9rgQ2ETyoy6RZwxas0Au7H+RmrGLqj4CAiu7T8P9pMZ2VisQrSI1TheXNlW7eoTe1i6QtwN4qNu28FqXoVHQeRP4D4BzSP5x3g1ZLH/VAulXkfBNwPBtQB3tEVhN8o6au1W9QHqRhBcCfLtmkGpbNIFPkAxPHlZ9jEIgvUjO6F8FFGyXjvES+AOAT5HcMYYujEYgvUjCtcg6ADeMAa7auB+Bv4fPHXR7tTbUeL9jtNcgCzXczMK+n/CNwnDHPfz30f2f5mQ9BMIHPMPHO/8E4IHunVnbSI7q+4QB5ahWkEONfcJXqKrcPVrP/H61JSm7q8fw9aghrCWQIZQmXkYCaWACaAXxG0QJxI9tscgSiB9qCcSPbbHIEogfagnEj22xyBKIH2oJxI9tscgSiB9qCcSPbbHIEogfagnEj22xyBKIH2oJxI9tscgSiB9qCcSPbbHIEogfagnEj22xyBKIH2oJxI9tscg1CcTMju8+Q3YKgBUAHgkvryP5TE4YB+T4dfiuPMkXcubYG0sC8aBaOGYNAjGz8NrN8JWrSxbofpb3Bi+Rw+UzdBJI4cnskW7eAjGzsOX++aX6Nssu1xI5Fmq/BLLUqI7g3ysQSPiya/jC61LHepJrlyq0yER1zyGB7E9A291TZuoBdczsMgB3R4S6nOTmiPLhRXruORZrj1aQmJGqtOw8VxAzu6V/FHgonVtJ3ji0cChXIocEcjABrSAxs3SRsma2BcBFEaHuJ3lxRPkgEPccEogEsi+BbI/cmln4YGX4cOXQYzvJ84YW7lcQ9xwSiAQigcSosi+ra5AEaLVVmfM1iPvZvcQqpRVEK4hWkIQzm1aQBGi1VdEKctCIRF/naAXRCqIVJOHMphUkAVptVbSCaAXxmJO6D5KBaokL6BI5ZLFksWSxEk4IslgJ0GqrIosli+UxJ2WxMlAtYX9K5JDFksWSxUo4IchiJUCrrYosliyWx5yUxcpAtYT9KZFDFksWSxYr4YQgi5UArbYqsliyWB5zUhYrA9US9qdEDlksWSxZrIQTgixWArTaqshiyWJ5zElZrAxUS9ifEjlksWSxZLESTgiyWAnQaqsiiyWL5TEnZbEyUC1hf0rkkMWSxZLFSjghyGIlQKutiiyWLJbHnJTFykC1hP0pkUMWSxZLFivhhCCLlQCttiqyWLJYHnNSFisD1RL2p0QOWSxZLFmshBOCLFYCtNqqyGLJYnnMSVmsDFRL2J8SOWSxZLFksRJOCLJYCdBqqyKLJYvlMSdlsTJQLWF/SuSQxZLFksVKOCHIYiVAq62KLJYslseclMXKQLWE/SmRQxZLFksWK+GEIIuVAK22KrJYslgec1IWKwPVEvanRA5ZLFksWayEE4IsVgK02qrIYsliecxJWawMVEvYnxI5ZLFksWSxEk4IslgJ0GqrIosli+UxJ2WxMlAtYX9K5JDFksWSxUo4IchiJUCrrYosliyWx5yUxcpAtYT9KZFDFksWy8tifRXA2git3UbysxHlYWbuOSQQCcRLIFcC2BQx4VeRvDOifBCIew4JRALxEshRAP4M4NgBk34XgNNJvjyg7CtFzMw9hwQigbgIJAQ1s48A+MGASb+c5OMDyh1UpESOhdqlX7FSRquyOvP8FWsvCjO7EMDWRdC8BGBFqjgG5ngCwEqST+ccHgkkJ805xapBIP1K8g4AqwG8s//bCSD8rZ9VHPuI5MAcvwHwWwA3kQxCzHpIIFlxzidYLQKZT+99s0ogvnyLRJdA/DBLIH5si0WWQPxQSyB+bItFlkD8UEsgfmyLRZZA/FBLIH5si0WWQPxQSyB+bItFlkD8UEsgfmyLRZZA/FCb2e0Aro7JQLKJneJNdKK/QWcxAxhurJE8M7LO5Ip3u4iXAXgMwHExnZdAYmgVKJuwgoRWXUbyngLNG20KM7sGwDdiOyCBxBJzLp8okL8COIfk35ybN8rwZnZut/N4C4DDYzsggcQScy6fKJDQqvu7zbg3kwz7pXT0BMzsfADh2uOEFCgSSAo1xzpm9iKAI2ZIEYQSVpR/zhCjhaqvB/AmABfN0Jk9JI+coX41VVu6SA9bvd9SDdlpN+RJkie3gKAlgTwIIHhmHfMnsJ3kefNvxuwtaEkg1wL42uxIFCEDgU+T/HqGOHMP0ZJATgXw6NyJqgGBwGkkw72T0R/NCCSMhJndHe5tjH5Uxt2BzSQvH3cXXm19awI5G8BDrQzOSPsR7is9PNK2H9TspgTSryIbAFzXygCNrB8bSa4ZWZsP2dzmBNKL5KnuFTwntjRQI+jLbpInjaCdUU1sUiC9SH4J4KwoGiqcSuBXJN+bWrnmes0KpBfJLQDW1TwADbTtVpI3NtCPBbvQtEB6kawEcAOAcAGvIx+Bzf27vpq5IF8ITfMC2dtpM7sAQNiAF2zXMf17dA/LN1+ajrSnexnec91DU892/B4AsI3k75vucd+5yQhkCoOpPuYnIIHkZ6qIDRGQQBoaTHUlPwEJJD9TRWyIgATS0GCqK/kJSCD5mSpiQwQkkIYGU13JT0ACyc9UERsiIIE0NJjqSn4CEkh+porYEAEJpKHBVFfyE5BA8jNVxIYISCANDaa6kp+ABJKfqSI2REACaWgw1ZX8BCSQ/EwVsSECEkhDg6mu5CcggeRnqogNEZBAGhpMdSU/AQkkP1NFbIiABNLQYKor+QlIIPmZKmJDBCSQhgZTXclPQALJz1QRGyIggTQ0mOpKfgL/A6gaLDJn8AuMAAAAAElFTkSuQmCC",P2e="/assets/local_storage-BF1lex7Y.png",D2e=["title"],x2e=["src"],B2e={class:"header_right_title_span"},F2e={style:{padding:"14px"}},U2e={class:"cloud_card_top"},H2e=["onClick"],V2e=["onClick"],G2e=["onClick"],W2e={class:"cloud_card_bottom",style:{padding:"14px"}},X2e={class:"dialog-footer"},z2e={class:"dialog-footer"},Y2e={__name:"fIleOperation",props:{exportImportFileName:{type:String}},emits:["setFileName"],setup(e,{emit:t}){const{t:n}=hc(),s=e,i=t,r=SE(),a=Pr.useyXmlStore(),c=Pr.useImportFileNameStore(),u=Pr.useLoadBlocklyStatus(),h=K(!1),f=K([]),p=K(!1),_=K({}),E=K(""),v=K(n("mesage.add")),b=()=>{JSON.stringify(r.userInfo)!="{}"?(mo.defaults.withCredentials=!0,mo.changeOrigin=!0,mo.get(`${_N.host}blockx/files`).then(B=>{f.value=B.data}),h.value=!0):Bo({message:n("message.please_login"),type:"warning"})},y=()=>{const B=document.createElement("input");B.type="file",B.accept=".xml",B.onchange=F=>{const X=F.target.files[0],G=new FileReader;G.onload=re=>{let _e=re.target.result;a.$patch({xmlStr:_e}),u.$patch({status:!0}),c.$patch({fileName:X.name}),i("setFileName",X.name),localStorage.setItem("workspaceXml",_e),setTimeout(()=>{u.$patch({status:!1})},100)},G.readAsText(X)},B.click()},S=()=>{let B=s.exportImportFileName+".xml";a.xmlStr&&a.xmlStr!='<xml xmlns="https://developers.google.com/blockly/xml"></xml>'?Zj(a.xmlStr,B):Bo({message:n("message.export_content_empty"),type:"warning"})},L=(B,F)=>{B.stopPropagation();const X=location.href+"&Qd="+F;navigator.clipboard.writeText(X).then(()=>{Bo({message:n("message.link_copy"),type:"success"})}).catch(G=>{console.error("复制到剪贴板失败: ",G),Bo({message:n("message.link_copy_error"),type:"warning"})})},I=(B,F)=>{B.stopPropagation(),mo.delete(`https://api.cocorobo.cn/blockx/${F}`).then(X=>{console.log(X),X.status==200?(Bo({message:n("message.delete_success"),type:"success"}),b()):Bo({message:n("message.delete_error"),type:"error"})})},R=(B,F)=>{B.stopPropagation();let X=new FormData;X.append("filename",F),X.append("xml",a.xmlStr),mo.put(`https://api.cocorobo.cn/blockx/${F}`,X).then(G=>{console.log(G),G.data=="OK"?Bo({message:n("message.save_success"),type:"success"}):Bo({message:n("message.save_error"),type:"error"})})},w=(B,F)=>{B.stopPropagation(),mo.get(`https://api.cocorobo.cn/blockx/${F.filenameid}`).then(X=>{if(console.log(X.data.xml),X.status==200){let G=X.data.xml;G.indexOf("$")==4&&(G=G.slice(5)),c.$patch({fileName:F.filename}),i("setFileName",F.filename),a.$patch({xmlStr:G}),u.$patch({status:!0}),localStorage.setItem("workspaceXml",G),setTimeout(()=>{u.$patch({status:!1}),h.value=!1},100)}else Bo({message:n("message.open_error"),type:"error"})})},k=(B,F)=>{p.value=!0,B.stopPropagation(),console.log(F),_.value=F,E.value=F.filename,v.value=n("message.update")},D=()=>{if(v.value==n("message.add")){let B={filename:E.value,type:"",xml:a.xmlStr};mo.post("https://api.cocorobo.cn/blockx/",B).then(F=>{console.log(F),F.statusText=="OK"?(b(),Bo({message:n("message.add_success"),type:"success"}),p.value=!1):Bo({message:n("message.add_error"),type:"error"})})}else{let B={currentFilename:_.value.filename,newFilename:E.value};mo.put("https://api.cocorobo.cn/blockx/modify",B).then(F=>{console.log(F),F.data=="Filename update."?(b(),Bo({message:n("message.update_success"),type:"success"}),p.value=!1):Bo({message:n("message.update_error"),type:"error"})})}},P=()=>{p.value=!0,E.value="",v.value=n("message.add")};return(B,F)=>{const X=Ot("el-tooltip"),G=Ot("el-dropdown-item"),re=Ot("el-dropdown-menu"),_e=Ot("el-dropdown"),J=Ot("el-icon"),Y=Ot("el-card"),ae=Ot("el-col"),Z=Ot("el-row"),Q=Ot("el-button"),he=Ot("el-dialog"),ge=Ot("el-input");return H(),le(Lt,null,[oe(_e,{trigger:"click"},{dropdown:de(()=>[oe(re,null,{default:de(()=>[oe(G,{class:"header_menu_li",onClick:F[0]||(F[0]=Ie=>b()),style:{color:"#26a69a"}},{default:de(()=>[Xt(Ke(B.$t("message.cloud_save")),1)]),_:1}),oe(G,{class:"header_menu_li",onClick:F[1]||(F[1]=Ie=>y()),style:{color:"#26a69a"}},{default:de(()=>[Xt(Ke(B.$t("message.import")),1)]),_:1}),oe(G,{class:"header_menu_li",onClick:F[2]||(F[2]=Ie=>S()),style:{color:"#26a69a"}},{default:de(()=>[Xt(Ke(B.$t("message.Export")),1)]),_:1})]),_:1})]),default:de(()=>[te("div",{class:"el-dropdown-link",title:B.$t("message.file")},[oe(X,{content:B.$t("message.file")},{default:de(()=>[te("div",null,[te("img",{src:g(P2e),alt:"",class:"header_right_icon left"},null,8,x2e),te("span",B2e,Ke(B.$t("message.file")),1)])]),_:1},8,["content"])],8,D2e)]),_:1}),oe(he,{modelValue:h.value,"onUpdate:modelValue":F[5]||(F[5]=Ie=>h.value=Ie),title:B.$t("message.cloud_save"),width:"800"},{footer:de(()=>[te("div",X2e,[oe(Q,{onClick:F[4]||(F[4]=Ie=>h.value=!1)},{default:de(()=>[Xt(Ke(B.$t("message.close")),1)]),_:1})])]),default:de(()=>[oe(Z,{gutter:24,style:{"text-align":"center"}},{default:de(()=>[oe(ae,{span:7,style:{"margin-top":"15px"}},{default:de(()=>[oe(Y,{"body-style":{padding:"0px"}},{default:de(()=>[te("div",F2e,[oe(J,{size:80,onClick:F[3]||(F[3]=Ie=>P())},{default:de(()=>[oe(g(z_e))]),_:1})])]),_:1})]),_:1}),(H(!0),le(Lt,null,In(f.value,(Ie,be)=>(H(),Ye(ae,{span:7,style:{"margin-top":"15px"}},{default:de(()=>[oe(Y,{"body-style":{padding:"0px"},onClick:Ae=>w(Ae,Ie)},{default:de(()=>[te("div",U2e,[te("img",{onClick:Ae=>L(Ae,Ie.filenameid),src:w2e,alt:""},null,8,H2e),te("div",null,[te("img",{onClick:Ae=>R(Ae,Ie.filenameid),src:k2e,alt:""},null,8,V2e),te("img",{onClick:Ae=>I(Ae,Ie.filename),src:N2e,alt:""},null,8,G2e)])]),te("div",W2e,[te("span",null,Ke(Ie.filename),1),oe(J,{size:20},{default:de(()=>[oe(g(Q_e),{onClick:Ae=>k(Ae,Ie)},null,8,["onClick"])]),_:2},1024),F[9]||(F[9]=te("br",null,null,-1)),te("span",null,Ke(B.$t("message.last_version"))+Ke(new Date(Ie.date).toLocaleDateString()),1)])]),_:2},1032,["onClick"])]),_:2},1024))),256))]),_:1})]),_:1},8,["modelValue","title"]),oe(he,{modelValue:p.value,"onUpdate:modelValue":F[8]||(F[8]=Ie=>p.value=Ie),title:v.value,width:"400"},{footer:de(()=>[te("div",z2e,[oe(Q,{onClick:D,type:"primary"},{default:de(()=>[Xt(Ke(B.$t("message.ok")),1)]),_:1}),oe(Q,{onClick:F[7]||(F[7]=Ie=>p.value=!1)},{default:de(()=>[Xt(Ke(B.$t("message.close")),1)]),_:1})])]),default:de(()=>[oe(ge,{modelValue:E.value,"onUpdate:modelValue":F[6]||(F[6]=Ie=>E.value=Ie),style:{"margin-top":"20px"}},null,8,["modelValue"])]),_:1},8,["modelValue","title"])],64)}}},K2e=Gl(Y2e,[["__scopeId","data-v-271552dc"]]),j2e="/assets/learn_nav_icon-C560Mivu.png",Q2e=["title"],q2e=["src"],J2e={class:"header_right_title_span"},Z2e={href:"//edu.cocorobo.cn/",target:"_blank",rel:"noopener noreferrer"},eHe={href:"//xunlian.cocorobo.cn",target:"_blank",rel:"noopener noreferrer"},tHe={href:"//biaoji.cocorobo.cn/",target:"_blank",rel:"noopener noreferrer"},nHe={href:"//aihub.cocorobo.cn",target:"_blank",rel:"noopener noreferrer"},oHe={href:"//aihub.cocorobo.cn/vision",target:"_blank",rel:"noopener noreferrer"},sHe={href:"//aihub.cocorobo.cn/speech",target:"_blank",rel:"noopener noreferrer"},iHe={href:"//aihub.cocorobo.cn/text",target:"_blank",rel:"noopener noreferrer"},rHe={href:"//aihub.cocorobo.cn/art",target:"_blank",rel:"noopener noreferrer"},lHe={__name:"linkStudy",setup(e){return(t,n)=>{const s=Ot("el-tooltip"),i=Ot("el-dropdown-item"),r=Ot("el-dropdown-menu"),a=Ot("el-dropdown");return H(),Ye(a,{trigger:"click"},{dropdown:de(()=>[oe(r,{class:"link_stydy"},{default:de(()=>[oe(i,{class:"header_menu_li",style:{color:"#26a69a"}},{default:de(()=>[te("a",Z2e,Ke(t.$t("message.go_edu_teaching_platform")),1)]),_:1}),oe(i,{class:"header_menu_li",style:{color:"#26a69a"}},{default:de(()=>[te("a",eHe,Ke(t.$t("message.go_train_platform")),1)]),_:1}),oe(i,{class:"header_menu_li",style:{color:"#26a69a"}},{default:de(()=>[te("a",tHe,Ke(t.$t("message.go_biaoji_platform")),1)]),_:1}),oe(i,{class:"header_menu_li",style:{color:"#26a69a"}},{default:de(()=>[te("a",nHe,Ke(t.$t("message.go_aihub")),1)]),_:1}),oe(i,{class:"header_menu_li",style:{color:"#26a69a"}},{default:de(()=>[te("a",oHe,Ke(t.$t("message.go_aihub_vision")),1)]),_:1}),oe(i,{class:"header_menu_li",style:{color:"#26a69a"}},{default:de(()=>[te("a",sHe,Ke(t.$t("message.go_aihub_speech")),1)]),_:1}),oe(i,{class:"header_menu_li",style:{color:"#26a69a"}},{default:de(()=>[te("a",iHe,Ke(t.$t("message.go_aihub_text")),1)]),_:1}),oe(i,{class:"header_menu_li",style:{color:"#26a69a"}},{default:de(()=>[te("a",rHe,Ke(t.$t("message.go_aihub_art")),1)]),_:1})]),_:1})]),default:de(()=>[te("div",{class:"el-dropdown-link",title:t.$t("message.study")},[oe(s,{content:t.$t("message.study")},{default:de(()=>[te("div",null,[te("img",{src:g(j2e),alt:"",class:"header_right_icon left"},null,8,q2e),te("span",J2e,Ke(t.$t("message.study")),1)])]),_:1},8,["content"])],8,Q2e)]),_:1})}}},aHe={class:"headerRight"},cHe={class:"example headerRightDiv"},uHe={class:"headerRightDiv"},dHe={class:"study headerRightDiv"},hHe={class:"file headerRightDiv"},fHe={class:"lang headerRightDiv"},pHe={class:"user headerRightDiv"},gHe={__name:"headerRight",setup(e){return(t,n)=>(H(),le("div",aHe,[te("div",cHe,[oe(GUe)]),te("div",uHe,[oe(I2e)]),te("div",dHe,[oe(lHe)]),te("div",hHe,[oe(K2e,qa(Th(t.$attrs)),null,16)]),te("div",fHe,[oe(L2e)]),te("div",pHe,[oe(LUe)])]))}},mHe=Gl(gHe,[["__scopeId","data-v-6849b7fd"]]),_He={id:"header"},THe={class:"header-left"},EHe={class:"header-right"},vHe={__name:"header",setup(e){const{t}=hc(),n=K(t("message.untitled")),s=i=>{n.value=i};return(i,r)=>(H(),le("div",_He,[te("div",THe,[oe(gUe,{onSetFileName:s,exportImportFileName:n.value},null,8,["exportImportFileName"])]),te("div",EHe,[oe(mHe,{onSetFileName:s,exportImportFileName:n.value},null,8,["exportImportFileName"])])]))}},bHe=Gl(vHe,[["__scopeId","data-v-d663c38c"]]),OHe="/assets/nav_help-Buyc1obJ.png",SHe={class:"footer"},yHe={class:"translatable_copyright_left",style:{color:"#fff"}},$He={id:"copyright_middle",style:{color:"#fff"}},IHe={class:"translatable_copyright_right",style:{color:"#fff"}},RHe={style:{}},CHe={class:"translatable_update_logs",style:{color:"#fff"}},MHe={id:"help",target:"_blank",href:"//pi-help.cocorobo.cn",style:{position:"relative"}},AHe={class:"translatable_help_board",style:{color:"#fff"}},LHe=["src"],wHe={__name:"footer",setup(e){const t=K(!1),n=new Date().getFullYear();return(s,i)=>{const r=Ot("el-tooltip"),a=Ot("el-dialog");return H(),le(Lt,null,[te("div",SHe,[te("div",null,[te("span",yHe,Ke(s.$t("message.cocorobo"))+" © ",1),te("span",$He,Ke(g(n)),1),te("span",IHe,Ke(s.$t("message.cocorobo_copy")),1)]),te("div",RHe,[oe(r,{content:s.$t("message.update_log")},{default:de(()=>[te("span",{onClick:i[0]||(i[0]=c=>t.value=!0),style:{cursor:"pointer"}},[te("span",CHe,Ke(s.$t("message.update_log")),1),i[2]||(i[2]=te("i",{class:"material-icons sketch_name_icon",style:{"margin-left":"5px",cursor:"pointer",position:"relative",top:"7px"}},"message",-1))])]),_:1},8,["content"]),i[3]||(i[3]=te("span",{class:"vertical-separator",style:{padding:"4px 6px 4px 6px"}},null,-1)),te("span",null,[oe(r,{content:s.$t("message.help_file")},{default:de(()=>[te("a",MHe,[te("span",AHe,Ke(s.$t("message.help_file")),1),te("img",{class:"nav-icon",src:g(OHe),style:{height:"20px","margin-left":"5px",position:"relative",top:"-8px"}},null,8,LHe)])]),_:1},8,["content"])]),i[4]||(i[4]=te("span",{class:"vertical-separator",style:{padding:"4px 6px 4px 6px"}},null,-1)),i[5]||(i[5]=te("span",null,"CocoBlockly Pi",-1))])]),oe(a,{modelValue:t.value,"onUpdate:modelValue":i[1]||(i[1]=c=>t.value=c),title:"更新日志"},{default:de(()=>i[6]||(i[6]=[te("div",null,"111111111",-1),te("div",null,"111111111",-1),te("div",null,"111111111",-1),te("div",null,"111111111",-1)])),_:1},8,["modelValue"])],64)}}},kHe=Gl(wHe,[["__scopeId","data-v-9fd1ec18"]]);var NS={exports:{}};/**
  1921. * @license
  1922. * Lodash <https://lodash.com/>
  1923. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  1924. * Released under MIT license <https://lodash.com/license>
  1925. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  1926. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1927. */var NHe=NS.exports,fW;function PHe(){return fW||(fW=1,function(e,t){(function(){var n,s="4.17.21",i=200,r="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",c="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",h=500,f="__lodash_placeholder__",p=1,_=2,E=4,v=1,b=2,y=1,S=2,L=4,I=8,R=16,w=32,k=64,D=128,P=256,B=512,F=30,X="...",G=800,re=16,_e=1,J=2,Y=3,ae=1/0,Z=9007199254740991,Q=17976931348623157e292,he=NaN,ge=4294967295,Ie=ge-1,be=ge>>>1,Ae=[["ary",D],["bind",y],["bindKey",S],["curry",I],["curryRight",R],["flip",B],["partial",w],["partialRight",k],["rearg",P]],We="[object Arguments]",$e="[object Array]",ve="[object AsyncFunction]",Pe="[object Boolean]",Be="[object Date]",ot="[object DOMException]",Xe="[object Error]",ee="[object Function]",pe="[object GeneratorFunction]",Oe="[object Map]",ze="[object Number]",Ze="[object Null]",De="[object Object]",me="[object Promise]",Te="[object Proxy]",Ue="[object RegExp]",qe="[object Set]",ct="[object String]",Ne="[object Symbol]",Se="[object Undefined]",Je="[object WeakMap]",ut="[object WeakSet]",Mt="[object ArrayBuffer]",mt="[object DataView]",qt="[object Float32Array]",ce="[object Float64Array]",q="[object Int8Array]",ne="[object Int16Array]",Le="[object Int32Array]",ue="[object Uint8Array]",Fe="[object Uint8ClampedArray]",ye="[object Uint16Array]",ft="[object Uint32Array]",Kt=/\b__p \+= '';/g,En=/\b(__p \+=) '' \+/g,Rn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Lo=/&(?:amp|lt|gt|quot|#39);/g,Ln=/[&<>"']/g,Zn=RegExp(Lo.source),On=RegExp(Ln.source),xo=/<%-([\s\S]+?)%>/g,ie=/<%([\s\S]+?)%>/g,Ce=/<%=([\s\S]+?)%>/g,U=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,se=/^\w*$/,ke=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,je=/[\\^$.*+?()[\]{}|]/g,Rt=RegExp(je.source),Qt=/^\s+/,Cn=/\s/,fs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ps=/\{\n\/\* \[wrapped with (.+)\] \*/,js=/,? & /,cr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,bt=/[()=,{}\[\]\/\s]/,jt=/\\(\\)?/g,Hn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rs=/\w*$/,Ps=/^[-+]0x[0-9a-f]+$/i,ul=/^0b[01]+$/i,ur=/^\[object .+?Constructor\]$/,Br=/^0o[0-7]+$/i,dl=/^(?:0|[1-9]\d*)$/,_a=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_t=/($^)/,Jt=/['\n\r\u2028\u2029\\]/g,bn="\\ud800-\\udfff",Bn="\\u0300-\\u036f",oi="\\ufe20-\\ufe2f",dr="\\u20d0-\\u20ff",Ov=Bn+oi+dr,Km="\\u2700-\\u27bf",ud="a-z\\xdf-\\xf6\\xf8-\\xff",x$="\\xac\\xb1\\xd7\\xf7",jm="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Sv="\\u2000-\\u206f",yv=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",$v="A-Z\\xc0-\\xd6\\xd8-\\xde",xp="\\ufe0e\\ufe0f",dd=x$+jm+Sv+yv,Dh="['’]",B$="["+bn+"]",Qm="["+dd+"]",xh="["+Ov+"]",Iv="\\d+",F$="["+Km+"]",nu="["+ud+"]",Rv="[^"+bn+dd+Iv+Km+ud+$v+"]",Bh="\\ud83c[\\udffb-\\udfff]",qm="(?:"+xh+"|"+Bh+")",Cv="[^"+bn+"]",Bp="(?:\\ud83c[\\udde6-\\uddff]){2}",pc="[\\ud800-\\udbff][\\udc00-\\udfff]",ki="["+$v+"]",Mv="\\u200d",Jm="(?:"+nu+"|"+Rv+")",Zm="(?:"+ki+"|"+Rv+")",e_="(?:"+Dh+"(?:d|ll|m|re|s|t|ve))?",Av="(?:"+Dh+"(?:D|LL|M|RE|S|T|VE))?",t_=qm+"?",Lv="["+xp+"]?",wv="(?:"+Mv+"(?:"+[Cv,Bp,pc].join("|")+")"+Lv+t_+")*",Fp="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",U$="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",kv=Lv+t_+wv,ou="(?:"+[F$,Bp,pc].join("|")+")"+kv,Nv="(?:"+[Cv+xh+"?",xh,Bp,pc,B$].join("|")+")",Ta=RegExp(Dh,"g"),H$=RegExp(xh,"g"),n_=RegExp(Bh+"(?="+Bh+")|"+Nv+kv,"g"),V$=RegExp([ki+"?"+nu+"+"+e_+"(?="+[Qm,ki,"$"].join("|")+")",Zm+"+"+Av+"(?="+[Qm,ki+Jm,"$"].join("|")+")",ki+"?"+Jm+"+"+e_,ki+"+"+Av,U$,Fp,Iv,ou].join("|"),"g"),su=RegExp("["+Mv+bn+Ov+xp+"]"),Pv=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,G$=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],W$=-1,Jo={};Jo[qt]=Jo[ce]=Jo[q]=Jo[ne]=Jo[Le]=Jo[ue]=Jo[Fe]=Jo[ye]=Jo[ft]=!0,Jo[We]=Jo[$e]=Jo[Mt]=Jo[Pe]=Jo[mt]=Jo[Be]=Jo[Xe]=Jo[ee]=Jo[Oe]=Jo[ze]=Jo[De]=Jo[Ue]=Jo[qe]=Jo[ct]=Jo[Je]=!1;var Yo={};Yo[We]=Yo[$e]=Yo[Mt]=Yo[mt]=Yo[Pe]=Yo[Be]=Yo[qt]=Yo[ce]=Yo[q]=Yo[ne]=Yo[Le]=Yo[Oe]=Yo[ze]=Yo[De]=Yo[Ue]=Yo[qe]=Yo[ct]=Yo[Ne]=Yo[ue]=Yo[Fe]=Yo[ye]=Yo[ft]=!0,Yo[Xe]=Yo[ee]=Yo[Je]=!1;var X$={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Dv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},z$={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Y$={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},o_=parseFloat,K$=parseInt,xv=typeof ep=="object"&&ep&&ep.Object===Object&&ep,Bv=typeof self=="object"&&self&&self.Object===Object&&self,Us=xv||Bv||Function("return this")(),Fh=t&&!t.nodeType&&t,iu=Fh&&!0&&e&&!e.nodeType&&e,Wl=iu&&iu.exports===Fh,s_=Wl&&xv.process,Fr=function(){try{var lt=iu&&iu.require&&iu.require("util").types;return lt||s_&&s_.binding&&s_.binding("util")}catch{}}(),Fv=Fr&&Fr.isArrayBuffer,Uv=Fr&&Fr.isDate,Hv=Fr&&Fr.isMap,Vv=Fr&&Fr.isRegExp,Gv=Fr&&Fr.isSet,i_=Fr&&Fr.isTypedArray;function Hs(lt,Ct,vt){switch(vt.length){case 0:return lt.call(Ct);case 1:return lt.call(Ct,vt[0]);case 2:return lt.call(Ct,vt[0],vt[1]);case 3:return lt.call(Ct,vt[0],vt[1],vt[2])}return lt.apply(Ct,vt)}function Uh(lt,Ct,vt,gn){for(var Vn=-1,Co=lt==null?0:lt.length;++Vn<Co;){var Ds=lt[Vn];Ct(gn,Ds,vt(Ds),lt)}return gn}function hr(lt,Ct){for(var vt=-1,gn=lt==null?0:lt.length;++vt<gn&&Ct(lt[vt],vt,lt)!==!1;);return lt}function j$(lt,Ct){for(var vt=lt==null?0:lt.length;vt--&&Ct(lt[vt],vt,lt)!==!1;);return lt}function Wv(lt,Ct){for(var vt=-1,gn=lt==null?0:lt.length;++vt<gn;)if(!Ct(lt[vt],vt,lt))return!1;return!0}function gc(lt,Ct){for(var vt=-1,gn=lt==null?0:lt.length,Vn=0,Co=[];++vt<gn;){var Ds=lt[vt];Ct(Ds,vt,lt)&&(Co[Vn++]=Ds)}return Co}function Up(lt,Ct){var vt=lt==null?0:lt.length;return!!vt&&Xl(lt,Ct,0)>-1}function r_(lt,Ct,vt){for(var gn=-1,Vn=lt==null?0:lt.length;++gn<Vn;)if(vt(Ct,lt[gn]))return!0;return!1}function ls(lt,Ct){for(var vt=-1,gn=lt==null?0:lt.length,Vn=Array(gn);++vt<gn;)Vn[vt]=Ct(lt[vt],vt,lt);return Vn}function mc(lt,Ct){for(var vt=-1,gn=Ct.length,Vn=lt.length;++vt<gn;)lt[Vn+vt]=Ct[vt];return lt}function l_(lt,Ct,vt,gn){var Vn=-1,Co=lt==null?0:lt.length;for(gn&&Co&&(vt=lt[++Vn]);++Vn<Co;)vt=Ct(vt,lt[Vn],Vn,lt);return vt}function Xv(lt,Ct,vt,gn){var Vn=lt==null?0:lt.length;for(gn&&Vn&&(vt=lt[--Vn]);Vn--;)vt=Ct(vt,lt[Vn],Vn,lt);return vt}function a_(lt,Ct){for(var vt=-1,gn=lt==null?0:lt.length;++vt<gn;)if(Ct(lt[vt],vt,lt))return!0;return!1}var Q$=Ur("length");function q$(lt){return lt.split("")}function J$(lt){return lt.match(cr)||[]}function zv(lt,Ct,vt){var gn;return vt(lt,function(Vn,Co,Ds){if(Ct(Vn,Co,Ds))return gn=Co,!1}),gn}function Hp(lt,Ct,vt,gn){for(var Vn=lt.length,Co=vt+(gn?1:-1);gn?Co--:++Co<Vn;)if(Ct(lt[Co],Co,lt))return Co;return-1}function Xl(lt,Ct,vt){return Ct===Ct?sI(lt,Ct,vt):Hp(lt,Kv,vt)}function Yv(lt,Ct,vt,gn){for(var Vn=vt-1,Co=lt.length;++Vn<Co;)if(gn(lt[Vn],Ct))return Vn;return-1}function Kv(lt){return lt!==lt}function jv(lt,Ct){var vt=lt==null?0:lt.length;return vt?Vp(lt,Ct)/vt:he}function Ur(lt){return function(Ct){return Ct==null?n:Ct[lt]}}function Ho(lt){return function(Ct){return lt==null?n:lt[Ct]}}function ru(lt,Ct,vt,gn,Vn){return Vn(lt,function(Co,Ds,Vo){vt=gn?(gn=!1,Co):Ct(vt,Co,Ds,Vo)}),vt}function Z$(lt,Ct){var vt=lt.length;for(lt.sort(Ct);vt--;)lt[vt]=lt[vt].value;return lt}function Vp(lt,Ct){for(var vt,gn=-1,Vn=lt.length;++gn<Vn;){var Co=Ct(lt[gn]);Co!==n&&(vt=vt===n?Co:vt+Co)}return vt}function Hh(lt,Ct){for(var vt=-1,gn=Array(lt);++vt<lt;)gn[vt]=Ct(vt);return gn}function hl(lt,Ct){return ls(Ct,function(vt){return[vt,lt[vt]]})}function c_(lt){return lt&&lt.slice(0,d_(lt)+1).replace(Qt,"")}function Ni(lt){return function(Ct){return lt(Ct)}}function Gp(lt,Ct){return ls(Ct,function(vt){return lt[vt]})}function hd(lt,Ct){return lt.has(Ct)}function Qv(lt,Ct){for(var vt=-1,gn=lt.length;++vt<gn&&Xl(Ct,lt[vt],0)>-1;);return vt}function qv(lt,Ct){for(var vt=lt.length;vt--&&Xl(Ct,lt[vt],0)>-1;);return vt}function eI(lt,Ct){for(var vt=lt.length,gn=0;vt--;)lt[vt]===Ct&&++gn;return gn}var Jv=Ho(X$),tI=Ho(Dv);function Zv(lt){return"\\"+Y$[lt]}function Wp(lt,Ct){return lt==null?n:lt[Ct]}function fd(lt){return su.test(lt)}function nI(lt){return Pv.test(lt)}function oI(lt){for(var Ct,vt=[];!(Ct=lt.next()).done;)vt.push(Ct.value);return vt}function u_(lt){var Ct=-1,vt=Array(lt.size);return lt.forEach(function(gn,Vn){vt[++Ct]=[Vn,gn]}),vt}function Vh(lt,Ct){return function(vt){return lt(Ct(vt))}}function Ea(lt,Ct){for(var vt=-1,gn=lt.length,Vn=0,Co=[];++vt<gn;){var Ds=lt[vt];(Ds===Ct||Ds===f)&&(lt[vt]=f,Co[Vn++]=vt)}return Co}function Gh(lt){var Ct=-1,vt=Array(lt.size);return lt.forEach(function(gn){vt[++Ct]=gn}),vt}function eb(lt){var Ct=-1,vt=Array(lt.size);return lt.forEach(function(gn){vt[++Ct]=[gn,gn]}),vt}function sI(lt,Ct,vt){for(var gn=vt-1,Vn=lt.length;++gn<Vn;)if(lt[gn]===Ct)return gn;return-1}function Wh(lt,Ct,vt){for(var gn=vt+1;gn--;)if(lt[gn]===Ct)return gn;return gn}function lu(lt){return fd(lt)?nb(lt):Q$(lt)}function Pi(lt){return fd(lt)?Xh(lt):q$(lt)}function d_(lt){for(var Ct=lt.length;Ct--&&Cn.test(lt.charAt(Ct)););return Ct}var tb=Ho(z$);function nb(lt){for(var Ct=n_.lastIndex=0;n_.test(lt);)++Ct;return Ct}function Xh(lt){return lt.match(n_)||[]}function h_(lt){return lt.match(V$)||[]}var f_=function lt(Ct){Ct=Ct==null?Us:pd.defaults(Us.Object(),Ct,pd.pick(Us,G$));var vt=Ct.Array,gn=Ct.Date,Vn=Ct.Error,Co=Ct.Function,Ds=Ct.Math,Vo=Ct.Object,gd=Ct.RegExp,ob=Ct.String,pi=Ct.TypeError,md=vt.prototype,zl=Co.prototype,au=Vo.prototype,zh=Ct["__core-js_shared__"],Yh=zl.toString,ko=au.hasOwnProperty,p_=0,g_=function(){var T=/[^.]+$/.exec(zh&&zh.keys&&zh.keys.IE_PROTO||"");return T?"Symbol(src)_1."+T:""}(),Kh=au.toString,jh=Yh.call(Vo),iI=Us._,Xp=gd("^"+Yh.call(ko).replace(je,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qh=Wl?Ct.Buffer:n,va=Ct.Symbol,zp=Ct.Uint8Array,Yp=Qh?Qh.allocUnsafe:n,qh=Vh(Vo.getPrototypeOf,Vo),sb=Vo.create,ib=au.propertyIsEnumerable,Kp=md.splice,rb=va?va.isConcatSpreadable:n,Jh=va?va.iterator:n,fl=va?va.toStringTag:n,Zh=function(){try{var T=Yi(Vo,"defineProperty");return T({},"",{}),T}catch{}}(),lb=Ct.clearTimeout!==Us.clearTimeout&&Ct.clearTimeout,ef=gn&&gn.now!==Us.Date.now&&gn.now,m_=Ct.setTimeout!==Us.setTimeout&&Ct.setTimeout,jp=Ds.ceil,Qp=Ds.floor,qp=Vo.getOwnPropertySymbols,ab=Qh?Qh.isBuffer:n,ba=Ct.isFinite,cb=md.join,ub=Vh(Vo.keys,Vo),Vs=Ds.max,gi=Ds.min,rI=gn.now,lI=Ct.parseInt,Oa=Ds.random,cu=md.reverse,tf=Yi(Ct,"DataView"),_d=Yi(Ct,"Map"),nf=Yi(Ct,"Promise"),uu=Yi(Ct,"Set"),pl=Yi(Ct,"WeakMap"),_c=Yi(Vo,"create"),Td=pl&&new pl,Tc={},Ed=Ki(tf),db=Ki(_d),__=Ki(nf),hb=Ki(uu),Os=Ki(pl),Jp=va?va.prototype:n,Sa=Jp?Jp.valueOf:n,Ec=Jp?Jp.toString:n;function we(T){if(As(T)&&!jn(T)&&!(T instanceof ao)){if(T instanceof Hr)return T;if(ko.call(T,"__wrapped__"))return Ic(T)}return new Hr(T)}var si=function(){function T(){}return function(O){if(!Ss(O))return{};if(sb)return sb(O);T.prototype=O;var N=new T;return T.prototype=n,N}}();function Zp(){}function Hr(T,O){this.__wrapped__=T,this.__actions__=[],this.__chain__=!!O,this.__index__=0,this.__values__=n}we.templateSettings={escape:xo,evaluate:ie,interpolate:Ce,variable:"",imports:{_:we}},we.prototype=Zp.prototype,we.prototype.constructor=we,Hr.prototype=si(Zp.prototype),Hr.prototype.constructor=Hr;function ao(T){this.__wrapped__=T,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ge,this.__views__=[]}function aI(){var T=new ao(this.__wrapped__);return T.__actions__=xs(this.__actions__),T.__dir__=this.__dir__,T.__filtered__=this.__filtered__,T.__iteratees__=xs(this.__iteratees__),T.__takeCount__=this.__takeCount__,T.__views__=xs(this.__views__),T}function fb(){if(this.__filtered__){var T=new ao(this);T.__dir__=-1,T.__filtered__=!0}else T=this.clone(),T.__dir__*=-1;return T}function cI(){var T=this.__wrapped__.value(),O=this.__dir__,N=jn(T),j=O<0,fe=N?T.length:0,Me=zt(0,fe,this.__views__),Qe=Me.start,et=Me.end,it=et-Qe,wt=j?et:Qe-1,kt=this.__iteratees__,Ht=kt.length,Zt=0,fn=gi(it,this.__takeCount__);if(!N||!j&&fe==it&&fn==it)return Nb(T,this.__actions__);var Pn=[];e:for(;it--&&Zt<fn;){wt+=O;for(var Xn=-1,kn=T[wt];++Xn<Ht;){var io=kt[Xn],co=io.iteratee,$r=io.type,Bi=co(kn);if($r==J)kn=Bi;else if(!Bi){if($r==_e)continue e;break e}}Pn[Zt++]=kn}return Pn}ao.prototype=si(Zp.prototype),ao.prototype.constructor=ao;function vc(T){var O=-1,N=T==null?0:T.length;for(this.clear();++O<N;){var j=T[O];this.set(j[0],j[1])}}function T_(){this.__data__=_c?_c(null):{},this.size=0}function uI(T){var O=this.has(T)&&delete this.__data__[T];return this.size-=O?1:0,O}function dI(T){var O=this.__data__;if(_c){var N=O[T];return N===u?n:N}return ko.call(O,T)?O[T]:n}function hI(T){var O=this.__data__;return _c?O[T]!==n:ko.call(O,T)}function pb(T,O){var N=this.__data__;return this.size+=this.has(T)?0:1,N[T]=_c&&O===n?u:O,this}vc.prototype.clear=T_,vc.prototype.delete=uI,vc.prototype.get=dI,vc.prototype.has=hI,vc.prototype.set=pb;function gl(T){var O=-1,N=T==null?0:T.length;for(this.clear();++O<N;){var j=T[O];this.set(j[0],j[1])}}function gb(){this.__data__=[],this.size=0}function E_(T){var O=this.__data__,N=vd(O,T);if(N<0)return!1;var j=O.length-1;return N==j?O.pop():Kp.call(O,N,1),--this.size,!0}function fI(T){var O=this.__data__,N=vd(O,T);return N<0?n:O[N][1]}function pI(T){return vd(this.__data__,T)>-1}function gI(T,O){var N=this.__data__,j=vd(N,T);return j<0?(++this.size,N.push([T,O])):N[j][1]=O,this}gl.prototype.clear=gb,gl.prototype.delete=E_,gl.prototype.get=fI,gl.prototype.has=pI,gl.prototype.set=gI;function ya(T){var O=-1,N=T==null?0:T.length;for(this.clear();++O<N;){var j=T[O];this.set(j[0],j[1])}}function Sn(){this.size=0,this.__data__={hash:new vc,map:new(_d||gl),string:new vc}}function fr(T){var O=vl(this,T).delete(T);return this.size-=O?1:0,O}function Qs(T){return vl(this,T).get(T)}function Zo(T){return vl(this,T).has(T)}function $a(T,O){var N=vl(this,T),j=N.size;return N.set(T,O),this.size+=N.size==j?0:1,this}ya.prototype.clear=Sn,ya.prototype.delete=fr,ya.prototype.get=Qs,ya.prototype.has=Zo,ya.prototype.set=$a;function ml(T){var O=-1,N=T==null?0:T.length;for(this.__data__=new ya;++O<N;)this.add(T[O])}function ln(T){return this.__data__.set(T,u),this}function Cs(T){return this.__data__.has(T)}ml.prototype.add=ml.prototype.push=ln,ml.prototype.has=Cs;function Vr(T){var O=this.__data__=new gl(T);this.size=O.size}function mI(){this.__data__=new gl,this.size=0}function v_(T){var O=this.__data__,N=O.delete(T);return this.size=O.size,N}function mb(T){return this.__data__.get(T)}function _I(T){return this.__data__.has(T)}function _b(T,O){var N=this.__data__;if(N instanceof gl){var j=N.__data__;if(!_d||j.length<i-1)return j.push([T,O]),this.size=++N.size,this;N=this.__data__=new ya(j)}return N.set(T,O),this.size=N.size,this}Vr.prototype.clear=mI,Vr.prototype.delete=v_,Vr.prototype.get=mb,Vr.prototype.has=_I,Vr.prototype.set=_b;function eg(T,O){var N=jn(T),j=!N&&Vd(T),fe=!N&&!j&&xa(T),Me=!N&&!j&&!fe&&Su(T),Qe=N||j||fe||Me,et=Qe?Hh(T.length,ob):[],it=et.length;for(var wt in T)(O||ko.call(T,wt))&&!(Qe&&(wt=="length"||fe&&(wt=="offset"||wt=="parent")||Me&&(wt=="buffer"||wt=="byteLength"||wt=="byteOffset")||Jl(wt,it)))&&et.push(wt);return et}function b_(T){var O=T.length;return O?T[D_(0,O-1)]:n}function Tb(T,O){return Gn(xs(T),du(O,0,T.length))}function TI(T){return Gn(xs(T))}function tg(T,O,N){(N!==n&&!Qi(T[O],N)||N===n&&!(O in T))&&Ia(T,O,N)}function of(T,O,N){var j=T[O];(!(ko.call(T,O)&&Qi(j,N))||N===n&&!(O in T))&&Ia(T,O,N)}function vd(T,O){for(var N=T.length;N--;)if(Qi(T[N][0],O))return N;return-1}function EI(T,O,N,j){return Ra(T,function(fe,Me,Qe){O(j,fe,N(fe),Qe)}),j}function Eb(T,O){return T&&Ei(O,ms(O),T)}function ng(T,O){return T&&Ei(O,Ls(O),T)}function Ia(T,O,N){O=="__proto__"&&Zh?Zh(T,O,{configurable:!0,enumerable:!0,value:N,writable:!0}):T[O]=N}function O_(T,O){for(var N=-1,j=O.length,fe=vt(j),Me=T==null;++N<j;)fe[N]=Me?n:Gd(T,O[N]);return fe}function du(T,O,N){return T===T&&(N!==n&&(T=T<=N?T:N),O!==n&&(T=T>=O?T:O)),T}function mi(T,O,N,j,fe,Me){var Qe,et=O&p,it=O&_,wt=O&E;if(N&&(Qe=fe?N(T,j,fe,Me):N(T)),Qe!==n)return Qe;if(!Ss(T))return T;var kt=jn(T);if(kt){if(Qe=bg(T),!et)return xs(T,Qe)}else{var Ht=ri(T),Zt=Ht==ee||Ht==pe;if(xa(T))return yd(T,et);if(Ht==De||Ht==We||Zt&&!fe){if(Qe=it||Zt?{}:Ql(T),!et)return it?uf(T,ng(Qe,T)):Md(T,Eb(Qe,T))}else{if(!Yo[Ht])return fe?T:{};Qe=Xr(T,Ht,et)}}Me||(Me=new Vr);var fn=Me.get(T);if(fn)return fn;Me.set(T,Qe),TT(T)?T.forEach(function(kn){Qe.add(mi(kn,O,N,kn,T,Me))}):br(T)&&T.forEach(function(kn,io){Qe.set(io,mi(kn,O,N,io,T,Me))});var Pn=wt?it?Tg:z_:it?Ls:ms,Xn=kt?n:Pn(T);return hr(Xn||T,function(kn,io){Xn&&(io=kn,kn=T[io]),of(Qe,io,mi(kn,O,N,io,T,Me))}),Qe}function vI(T){var O=ms(T);return function(N){return S_(N,T,O)}}function S_(T,O,N){var j=N.length;if(T==null)return!j;for(T=Vo(T);j--;){var fe=N[j],Me=O[fe],Qe=T[fe];if(Qe===n&&!(fe in T)||!Me(Qe))return!1}return!0}function y_(T,O,N){if(typeof T!="function")throw new pi(a);return yg(function(){T.apply(n,N)},O)}function bd(T,O,N,j){var fe=-1,Me=Up,Qe=!0,et=T.length,it=[],wt=O.length;if(!et)return it;N&&(O=ls(O,Ni(N))),j?(Me=r_,Qe=!1):O.length>=i&&(Me=hd,Qe=!1,O=new ml(O));e:for(;++fe<et;){var kt=T[fe],Ht=N==null?kt:N(kt);if(kt=j||kt!==0?kt:0,Qe&&Ht===Ht){for(var Zt=wt;Zt--;)if(O[Zt]===Ht)continue e;it.push(kt)}else Me(O,Ht,j)||it.push(kt)}return it}var Ra=pg(_l),og=pg(ig,!0);function vb(T,O){var N=!0;return Ra(T,function(j,fe,Me){return N=!!O(j,fe,Me),N}),N}function hu(T,O,N){for(var j=-1,fe=T.length;++j<fe;){var Me=T[j],Qe=O(Me);if(Qe!=null&&(et===n?Qe===Qe&&!Or(Qe):N(Qe,et)))var et=Qe,it=Me}return it}function bb(T,O,N,j){var fe=T.length;for(N=Fn(N),N<0&&(N=-N>fe?0:fe+N),j=j===n||j>fe?fe:Fn(j),j<0&&(j+=fe),j=N>j?0:Dg(j);N<j;)T[N++]=O;return T}function $_(T,O){var N=[];return Ra(T,function(j,fe,Me){O(j,fe,Me)&&N.push(j)}),N}function qs(T,O,N,j,fe){var Me=-1,Qe=T.length;for(N||(N=ql),fe||(fe=[]);++Me<Qe;){var et=T[Me];O>0&&N(et)?O>1?qs(et,O-1,N,j,fe):mc(fe,et):j||(fe[fe.length]=et)}return fe}var sg=_u(),I_=_u(!0);function _l(T,O){return T&&sg(T,O,ms)}function ig(T,O){return T&&I_(T,O,ms)}function sf(T,O){return gc(O,function(N){return Ba(T[N])})}function bc(T,O){O=Yl(O,T);for(var N=0,j=O.length;T!=null&&N<j;)T=T[vi(O[N++])];return N&&N==j?T:n}function R_(T,O,N){var j=O(T);return jn(T)?j:mc(j,N(T))}function _i(T){return T==null?T===n?Se:Ze:fl&&fl in Vo(T)?Gs(T):Q_(T)}function rg(T,O){return T>O}function bI(T,O){return T!=null&&ko.call(T,O)}function OI(T,O){return T!=null&&O in Vo(T)}function rf(T,O,N){return T>=gi(O,N)&&T<Vs(O,N)}function lg(T,O,N){for(var j=N?r_:Up,fe=T[0].length,Me=T.length,Qe=Me,et=vt(Me),it=1/0,wt=[];Qe--;){var kt=T[Qe];Qe&&O&&(kt=ls(kt,Ni(O))),it=gi(kt.length,it),et[Qe]=!N&&(O||fe>=120&&kt.length>=120)?new ml(Qe&&kt):n}kt=T[0];var Ht=-1,Zt=et[0];e:for(;++Ht<fe&&wt.length<it;){var fn=kt[Ht],Pn=O?O(fn):fn;if(fn=N||fn!==0?fn:0,!(Zt?hd(Zt,Pn):j(wt,Pn,N))){for(Qe=Me;--Qe;){var Xn=et[Qe];if(!(Xn?hd(Xn,Pn):j(T[Qe],Pn,N)))continue e}Zt&&Zt.push(Pn),wt.push(fn)}}return wt}function SI(T,O,N,j){return _l(T,function(fe,Me,Qe){O(j,N(fe),Me,Qe)}),j}function fu(T,O,N){O=Yl(O,T),T=Og(T,O);var j=T==null?T:T[vi(Ol(O))];return j==null?n:Hs(j,T,N)}function C_(T){return As(T)&&_i(T)==We}function Ob(T){return As(T)&&_i(T)==Mt}function Sb(T){return As(T)&&_i(T)==Be}function Od(T,O,N,j,fe){return T===O?!0:T==null||O==null||!As(T)&&!As(O)?T!==T&&O!==O:yb(T,O,N,j,Od,fe)}function yb(T,O,N,j,fe,Me){var Qe=jn(T),et=jn(O),it=Qe?$e:ri(T),wt=et?$e:ri(O);it=it==We?De:it,wt=wt==We?De:wt;var kt=it==De,Ht=wt==De,Zt=it==wt;if(Zt&&xa(T)){if(!xa(O))return!1;Qe=!0,kt=!1}if(Zt&&!kt)return Me||(Me=new Vr),Qe||Su(T)?Vb(T,O,N,j,fe,Me):Gb(T,O,it,N,j,fe,Me);if(!(N&v)){var fn=kt&&ko.call(T,"__wrapped__"),Pn=Ht&&ko.call(O,"__wrapped__");if(fn||Pn){var Xn=fn?T.value():T,kn=Pn?O.value():O;return Me||(Me=new Vr),fe(Xn,kn,N,j,Me)}}return Zt?(Me||(Me=new Vr),X_(T,O,N,j,fe,Me)):!1}function $b(T){return As(T)&&ri(T)==Oe}function ag(T,O,N,j){var fe=N.length,Me=fe,Qe=!j;if(T==null)return!Me;for(T=Vo(T);fe--;){var et=N[fe];if(Qe&&et[2]?et[1]!==T[et[0]]:!(et[0]in T))return!1}for(;++fe<Me;){et=N[fe];var it=et[0],wt=T[it],kt=et[1];if(Qe&&et[2]){if(wt===n&&!(it in T))return!1}else{var Ht=new Vr;if(j)var Zt=j(wt,kt,it,T,O,Ht);if(!(Zt===n?Od(kt,wt,v|b,j,Ht):Zt))return!1}}return!0}function M_(T){if(!Ss(T)||Ko(T))return!1;var O=Ba(T)?Xp:ur;return O.test(Ki(T))}function A_(T){return As(T)&&_i(T)==Ue}function cg(T){return As(T)&&ri(T)==qe}function Ib(T){return As(T)&&Yr(T.length)&&!!Jo[_i(T)]}function Rb(T){return typeof T=="function"?T:T==null?Ji:typeof T=="object"?jn(T)?k_(T[0],T[1]):w_(T):MT(T)}function ug(T){if(!bl(T))return ub(T);var O=[];for(var N in Vo(T))ko.call(T,N)&&N!="constructor"&&O.push(N);return O}function Cb(T){if(!Ss(T))return Ms(T);var O=bl(T),N=[];for(var j in T)j=="constructor"&&(O||!ko.call(T,j))||N.push(j);return N}function dg(T,O){return T<O}function L_(T,O){var N=-1,j=as(T)?vt(T.length):[];return Ra(T,function(fe,Me,Qe){j[++N]=O(fe,Me,Qe)}),j}function w_(T){var O=K_(T);return O.length==1&&O[0][2]?zb(O[0][0],O[0][1]):function(N){return N===T||ag(N,T,O)}}function k_(T,O){return Bs(T)&&Xb(O)?zb(vi(T),O):function(N){var j=Gd(N,T);return j===n&&j===O?Wd(N,T):Od(O,j,v|b)}}function lf(T,O,N,j,fe){T!==O&&sg(O,function(Me,Qe){if(fe||(fe=new Vr),Ss(Me))yI(T,O,Qe,N,lf,j,fe);else{var et=j?j(wd(T,Qe),Me,Qe+"",T,O,fe):n;et===n&&(et=Me),tg(T,Qe,et)}},Ls)}function yI(T,O,N,j,fe,Me,Qe){var et=wd(T,N),it=wd(O,N),wt=Qe.get(it);if(wt){tg(T,N,wt);return}var kt=Me?Me(et,it,N+"",T,O,Qe):n,Ht=kt===n;if(Ht){var Zt=jn(it),fn=!Zt&&xa(it),Pn=!Zt&&!fn&&Su(it);kt=it,Zt||fn||Pn?jn(et)?kt=et:Qo(et)?kt=xs(et):fn?(Ht=!1,kt=yd(it,!0)):Pn?(Ht=!1,kt=Id(it,!0)):kt=[]:Wn(it)||Vd(it)?(kt=et,Vd(et)?kt=l0(et):(!Ss(et)||Ba(et))&&(kt=Ql(it))):Ht=!1}Ht&&(Qe.set(it,kt),fe(kt,it,j,Me,Qe),Qe.delete(it)),tg(T,N,kt)}function N_(T,O){var N=T.length;if(N)return O+=O<0?N:0,Jl(O,N)?T[O]:n}function Mb(T,O,N){O.length?O=ls(O,function(Me){return jn(Me)?function(Qe){return bc(Qe,Me.length===1?Me[0]:Me)}:Me}):O=[Ji];var j=-1;O=ls(O,Ni(Nn()));var fe=L_(T,function(Me,Qe,et){var it=ls(O,function(wt){return wt(Me)});return{criteria:it,index:++j,value:Me}});return Z$(fe,function(Me,Qe){return cf(Me,Qe,N)})}function $I(T,O){return Ab(T,O,function(N,j){return Wd(T,j)})}function Ab(T,O,N){for(var j=-1,fe=O.length,Me={};++j<fe;){var Qe=O[j],et=bc(T,Qe);N(et,Qe)&&Tl(Me,Yl(Qe,T),et)}return Me}function II(T){return function(O){return bc(O,T)}}function P_(T,O,N,j){var fe=j?Yv:Xl,Me=-1,Qe=O.length,et=T;for(T===O&&(O=xs(O)),N&&(et=ls(T,Ni(N)));++Me<Qe;)for(var it=0,wt=O[Me],kt=N?N(wt):wt;(it=fe(et,kt,it,j))>-1;)et!==T&&Kp.call(et,it,1),Kp.call(T,it,1);return T}function Lb(T,O){for(var N=T?O.length:0,j=N-1;N--;){var fe=O[N];if(N==j||fe!==Me){var Me=fe;Jl(fe)?Kp.call(T,fe,1):F_(T,fe)}}return T}function D_(T,O){return T+Qp(Oa()*(O-T+1))}function RI(T,O,N,j){for(var fe=-1,Me=Vs(jp((O-T)/(N||1)),0),Qe=vt(Me);Me--;)Qe[j?Me:++fe]=T,T+=N;return Qe}function x_(T,O){var N="";if(!T||O<1||O>Z)return N;do O%2&&(N+=T),O=Qp(O/2),O&&(T+=T);while(O);return N}function eo(T,O){return Tu(q_(T,O,Ji),T+"")}function CI(T){return b_(zd(T))}function Mn(T,O){var N=zd(T);return Gn(N,du(O,0,N.length))}function Tl(T,O,N,j){if(!Ss(T))return T;O=Yl(O,T);for(var fe=-1,Me=O.length,Qe=Me-1,et=T;et!=null&&++fe<Me;){var it=vi(O[fe]),wt=N;if(it==="__proto__"||it==="constructor"||it==="prototype")return T;if(fe!=Qe){var kt=et[it];wt=j?j(kt,it,et):n,wt===n&&(wt=Ss(kt)?kt:Jl(O[fe+1])?[]:{})}of(et,it,wt),et=et[it]}return T}var MI=Td?function(T,O){return Td.set(T,O),T}:Ji,B_=Zh?function(T,O){return Zh(T,"toString",{configurable:!0,enumerable:!1,value:WO(O),writable:!0})}:Ji;function Ca(T){return Gn(zd(T))}function At(T,O,N){var j=-1,fe=T.length;O<0&&(O=-O>fe?0:fe+O),N=N>fe?fe:N,N<0&&(N+=fe),fe=O>N?0:N-O>>>0,O>>>=0;for(var Me=vt(fe);++j<fe;)Me[j]=T[j+O];return Me}function Oc(T,O){var N;return Ra(T,function(j,fe,Me){return N=O(j,fe,Me),!N}),!!N}function Ti(T,O,N){var j=0,fe=T==null?j:T.length;if(typeof O=="number"&&O===O&&fe<=be){for(;j<fe;){var Me=j+fe>>>1,Qe=T[Me];Qe!==null&&!Or(Qe)&&(N?Qe<=O:Qe<O)?j=Me+1:fe=Me}return fe}return Sd(T,O,Ji,N)}function Sd(T,O,N,j){var fe=0,Me=T==null?0:T.length;if(Me===0)return 0;O=N(O);for(var Qe=O!==O,et=O===null,it=Or(O),wt=O===n;fe<Me;){var kt=Qp((fe+Me)/2),Ht=N(T[kt]),Zt=Ht!==n,fn=Ht===null,Pn=Ht===Ht,Xn=Or(Ht);if(Qe)var kn=j||Pn;else wt?kn=Pn&&(j||Zt):et?kn=Pn&&Zt&&(j||!fn):it?kn=Pn&&Zt&&!fn&&(j||!Xn):fn||Xn?kn=!1:kn=j?Ht<=O:Ht<O;kn?fe=kt+1:Me=kt}return gi(Me,Ie)}function wb(T,O){for(var N=-1,j=T.length,fe=0,Me=[];++N<j;){var Qe=T[N],et=O?O(Qe):Qe;if(!N||!Qi(et,it)){var it=et;Me[fe++]=Qe===0?0:Qe}}return Me}function kb(T){return typeof T=="number"?T:Or(T)?he:+T}function pr(T){if(typeof T=="string")return T;if(jn(T))return ls(T,pr)+"";if(Or(T))return Ec?Ec.call(T):"";var O=T+"";return O=="0"&&1/T==-ae?"-0":O}function Gr(T,O,N){var j=-1,fe=Up,Me=T.length,Qe=!0,et=[],it=et;if(N)Qe=!1,fe=r_;else if(Me>=i){var wt=O?null:G_(T);if(wt)return Gh(wt);Qe=!1,fe=hd,it=new ml}else it=O?[]:et;e:for(;++j<Me;){var kt=T[j],Ht=O?O(kt):kt;if(kt=N||kt!==0?kt:0,Qe&&Ht===Ht){for(var Zt=it.length;Zt--;)if(it[Zt]===Ht)continue e;O&&it.push(Ht),et.push(kt)}else fe(it,Ht,N)||(it!==et&&it.push(Ht),et.push(kt))}return et}function F_(T,O){return O=Yl(O,T),T=Og(T,O),T==null||delete T[vi(Ol(O))]}function ii(T,O,N,j){return Tl(T,O,N(bc(T,O)),j)}function hg(T,O,N,j){for(var fe=T.length,Me=j?fe:-1;(j?Me--:++Me<fe)&&O(T[Me],Me,T););return N?At(T,j?0:Me,j?Me+1:fe):At(T,j?Me+1:0,j?fe:Me)}function Nb(T,O){var N=T;return N instanceof ao&&(N=N.value()),l_(O,function(j,fe){return fe.func.apply(fe.thisArg,mc([j],fe.args))},N)}function Pb(T,O,N){var j=T.length;if(j<2)return j?Gr(T[0]):[];for(var fe=-1,Me=vt(j);++fe<j;)for(var Qe=T[fe],et=-1;++et<j;)et!=fe&&(Me[fe]=bd(Me[fe]||Qe,T[et],O,N));return Gr(qs(Me,1),O,N)}function U_(T,O,N){for(var j=-1,fe=T.length,Me=O.length,Qe={};++j<fe;){var et=j<Me?O[j]:n;N(Qe,T[j],et)}return Qe}function fg(T){return Qo(T)?T:[]}function pu(T){return typeof T=="function"?T:Ji}function Yl(T,O){return jn(T)?T:Bs(T,O)?[T]:jb(no(T))}var gu=eo;function zi(T,O,N){var j=T.length;return N=N===n?j:N,!O&&N>=j?T:At(T,O,N)}var mu=lb||function(T){return Us.clearTimeout(T)};function yd(T,O){if(O)return T.slice();var N=T.length,j=Yp?Yp(N):new T.constructor(N);return T.copy(j),j}function af(T){var O=new T.constructor(T.byteLength);return new zp(O).set(new zp(T)),O}function $d(T,O){var N=O?af(T.buffer):T.buffer;return new T.constructor(N,T.byteOffset,T.byteLength)}function Sc(T){var O=new T.constructor(T.source,rs.exec(T));return O.lastIndex=T.lastIndex,O}function yc(T){return Sa?Vo(Sa.call(T)):{}}function Id(T,O){var N=O?af(T.buffer):T.buffer;return new T.constructor(N,T.byteOffset,T.length)}function Kl(T,O){if(T!==O){var N=T!==n,j=T===null,fe=T===T,Me=Or(T),Qe=O!==n,et=O===null,it=O===O,wt=Or(O);if(!et&&!wt&&!Me&&T>O||Me&&Qe&&it&&!et&&!wt||j&&Qe&&it||!N&&it||!fe)return 1;if(!j&&!Me&&!wt&&T<O||wt&&N&&fe&&!j&&!Me||et&&N&&fe||!Qe&&fe||!it)return-1}return 0}function cf(T,O,N){for(var j=-1,fe=T.criteria,Me=O.criteria,Qe=fe.length,et=N.length;++j<Qe;){var it=Kl(fe[j],Me[j]);if(it){if(j>=et)return it;var wt=N[j];return it*(wt=="desc"?-1:1)}}return T.index-O.index}function Rd(T,O,N,j){for(var fe=-1,Me=T.length,Qe=N.length,et=-1,it=O.length,wt=Vs(Me-Qe,0),kt=vt(it+wt),Ht=!j;++et<it;)kt[et]=O[et];for(;++fe<Qe;)(Ht||fe<Me)&&(kt[N[fe]]=T[fe]);for(;wt--;)kt[et++]=T[fe++];return kt}function Cd(T,O,N,j){for(var fe=-1,Me=T.length,Qe=-1,et=N.length,it=-1,wt=O.length,kt=Vs(Me-et,0),Ht=vt(kt+wt),Zt=!j;++fe<kt;)Ht[fe]=T[fe];for(var fn=fe;++it<wt;)Ht[fn+it]=O[it];for(;++Qe<et;)(Zt||fe<Me)&&(Ht[fn+N[Qe]]=T[fe++]);return Ht}function xs(T,O){var N=-1,j=T.length;for(O||(O=vt(j));++N<j;)O[N]=T[N];return O}function Ei(T,O,N,j){var fe=!N;N||(N={});for(var Me=-1,Qe=O.length;++Me<Qe;){var et=O[Me],it=j?j(N[et],T[et],et,N,T):n;it===n&&(it=T[et]),fe?Ia(N,et,it):of(N,et,it)}return N}function Md(T,O){return Ei(T,vg(T),O)}function uf(T,O){return Ei(T,j_(T),O)}function Wr(T,O){return function(N,j){var fe=jn(N)?Uh:EI,Me=O?O():{};return fe(N,T,Nn(j,2),Me)}}function El(T){return eo(function(O,N){var j=-1,fe=N.length,Me=fe>1?N[fe-1]:n,Qe=fe>2?N[2]:n;for(Me=T.length>3&&typeof Me=="function"?(fe--,Me):n,Qe&&li(N[0],N[1],Qe)&&(Me=fe<3?n:Me,fe=1),O=Vo(O);++j<fe;){var et=N[j];et&&T(O,et,j,Me)}return O})}function pg(T,O){return function(N,j){if(N==null)return N;if(!as(N))return T(N,j);for(var fe=N.length,Me=O?fe:-1,Qe=Vo(N);(O?Me--:++Me<fe)&&j(Qe[Me],Me,Qe)!==!1;);return N}}function _u(T){return function(O,N,j){for(var fe=-1,Me=Vo(O),Qe=j(O),et=Qe.length;et--;){var it=Qe[T?et:++fe];if(N(Me[it],it,Me)===!1)break}return O}}function H_(T,O,N){var j=O&y,fe=gr(T);function Me(){var Qe=this&&this!==Us&&this instanceof Me?fe:T;return Qe.apply(j?N:this,arguments)}return Me}function Di(T){return function(O){O=no(O);var N=fd(O)?Pi(O):n,j=N?N[0]:O.charAt(0),fe=N?zi(N,1).join(""):O.slice(1);return j[T]()+fe}}function jl(T){return function(O){return l_(b0(NO(O).replace(Ta,"")),T,"")}}function gr(T){return function(){var O=arguments;switch(O.length){case 0:return new T;case 1:return new T(O[0]);case 2:return new T(O[0],O[1]);case 3:return new T(O[0],O[1],O[2]);case 4:return new T(O[0],O[1],O[2],O[3]);case 5:return new T(O[0],O[1],O[2],O[3],O[4]);case 6:return new T(O[0],O[1],O[2],O[3],O[4],O[5]);case 7:return new T(O[0],O[1],O[2],O[3],O[4],O[5],O[6])}var N=si(T.prototype),j=T.apply(N,O);return Ss(j)?j:N}}function Db(T,O,N){var j=gr(T);function fe(){for(var Me=arguments.length,Qe=vt(Me),et=Me,it=Ad(fe);et--;)Qe[et]=arguments[et];var wt=Me<3&&Qe[0]!==it&&Qe[Me-1]!==it?[]:Ea(Qe,it);if(Me-=wt.length,Me<N)return Fb(T,O,gg,fe.placeholder,n,Qe,wt,n,n,N-Me);var kt=this&&this!==Us&&this instanceof fe?j:T;return Hs(kt,this,Qe)}return fe}function V_(T){return function(O,N,j){var fe=Vo(O);if(!as(O)){var Me=Nn(N,3);O=ms(O),N=function(et){return Me(fe[et],et,fe)}}var Qe=T(O,N,j);return Qe>-1?fe[Me?O[Qe]:Qe]:n}}function AI(T){return mr(function(O){var N=O.length,j=N,fe=Hr.prototype.thru;for(T&&O.reverse();j--;){var Me=O[j];if(typeof Me!="function")throw new pi(a);if(fe&&!Qe&&Y_(Me)=="wrapper")var Qe=new Hr([],!0)}for(j=Qe?j:N;++j<N;){Me=O[j];var et=Y_(Me),it=et=="wrapper"?Eg(Me):n;it&&Po(it[0])&&it[1]==(D|I|w|P)&&!it[4].length&&it[9]==1?Qe=Qe[Y_(it[0])].apply(Qe,it[3]):Qe=Me.length==1&&Po(Me)?Qe[et]():Qe.thru(Me)}return function(){var wt=arguments,kt=wt[0];if(Qe&&wt.length==1&&jn(kt))return Qe.plant(kt).value();for(var Ht=0,Zt=N?O[Ht].apply(this,wt):kt;++Ht<N;)Zt=O[Ht].call(this,Zt);return Zt}})}function gg(T,O,N,j,fe,Me,Qe,et,it,wt){var kt=O&D,Ht=O&y,Zt=O&S,fn=O&(I|R),Pn=O&B,Xn=Zt?n:gr(T);function kn(){for(var io=arguments.length,co=vt(io),$r=io;$r--;)co[$r]=arguments[$r];if(fn)var Bi=Ad(kn),zs=eI(co,Bi);if(j&&(co=Rd(co,j,fe,fn)),Me&&(co=Cd(co,Me,Qe,fn)),io-=zs,fn&&io<wt){var ws=Ea(co,Bi);return Fb(T,O,gg,kn.placeholder,N,co,ws,et,it,wt-io)}var Il=Ht?N:this,Wa=Zt?Il[T]:T;return io=co.length,et?co=Sg(co,et):Pn&&io>1&&co.reverse(),kt&&it<io&&(co.length=it),this&&this!==Us&&this instanceof kn&&(Wa=Xn||gr(Wa)),Wa.apply(Il,co)}return kn}function mg(T,O){return function(N,j){return SI(N,T,O(j),{})}}function Ma(T,O){return function(N,j){var fe;if(N===n&&j===n)return O;if(N!==n&&(fe=N),j!==n){if(fe===n)return j;typeof N=="string"||typeof j=="string"?(N=pr(N),j=pr(j)):(N=kb(N),j=kb(j)),fe=T(N,j)}return fe}}function df(T){return mr(function(O){return O=ls(O,Ni(Nn())),eo(function(N){var j=this;return T(O,function(fe){return Hs(fe,j,N)})})})}function Aa(T,O){O=O===n?" ":pr(O);var N=O.length;if(N<2)return N?x_(O,T):O;var j=x_(O,jp(T/lu(O)));return fd(O)?zi(Pi(j),0,T).join(""):j.slice(0,T)}function xb(T,O,N,j){var fe=O&y,Me=gr(T);function Qe(){for(var et=-1,it=arguments.length,wt=-1,kt=j.length,Ht=vt(kt+it),Zt=this&&this!==Us&&this instanceof Qe?Me:T;++wt<kt;)Ht[wt]=j[wt];for(;it--;)Ht[wt++]=arguments[++et];return Hs(Zt,fe?N:this,Ht)}return Qe}function Bb(T){return function(O,N,j){return j&&typeof j!="number"&&li(O,N,j)&&(N=j=n),O=Fa(O),N===n?(N=O,O=0):N=Fa(N),j=j===n?O<N?1:-1:Fa(j),RI(O,N,j,T)}}function _g(T){return function(O,N){return typeof O=="string"&&typeof N=="string"||(O=es(O),N=es(N)),T(O,N)}}function Fb(T,O,N,j,fe,Me,Qe,et,it,wt){var kt=O&I,Ht=kt?Qe:n,Zt=kt?n:Qe,fn=kt?Me:n,Pn=kt?n:Me;O|=kt?w:k,O&=~(kt?k:w),O&L||(O&=~(y|S));var Xn=[T,O,fe,fn,Ht,Pn,Zt,et,it,wt],kn=N.apply(n,Xn);return Po(T)&&Yb(kn,Xn),kn.placeholder=j,J_(kn,T,O)}function hf(T){var O=Ds[T];return function(N,j){if(N=es(N),j=j==null?0:gi(Fn(j),292),j&&ba(N)){var fe=(no(N)+"e").split("e"),Me=O(fe[0]+"e"+(+fe[1]+j));return fe=(no(Me)+"e").split("e"),+(fe[0]+"e"+(+fe[1]-j))}return O(N)}}var G_=uu&&1/Gh(new uu([,-0]))[1]==ae?function(T){return new uu(T)}:CT;function W_(T){return function(O){var N=ri(O);return N==Oe?u_(O):N==qe?eb(O):hl(O,T(O))}}function La(T,O,N,j,fe,Me,Qe,et){var it=O&S;if(!it&&typeof T!="function")throw new pi(a);var wt=j?j.length:0;if(wt||(O&=~(w|k),j=fe=n),Qe=Qe===n?Qe:Vs(Fn(Qe),0),et=et===n?et:Fn(et),wt-=fe?fe.length:0,O&k){var kt=j,Ht=fe;j=fe=n}var Zt=it?n:Eg(T),fn=[T,O,N,j,fe,kt,Ht,Me,Qe,et];if(Zt&&Ld(fn,Zt),T=fn[0],O=fn[1],N=fn[2],j=fn[3],fe=fn[4],et=fn[9]=fn[9]===n?it?0:T.length:Vs(fn[9]-wt,0),!et&&O&(I|R)&&(O&=~(I|R)),!O||O==y)var Pn=H_(T,O,N);else O==I||O==R?Pn=Db(T,O,et):(O==w||O==(y|w))&&!fe.length?Pn=xb(T,O,N,j):Pn=gg.apply(n,fn);var Xn=Zt?MI:Yb;return J_(Xn(Pn,fn),T,O)}function Ub(T,O,N,j){return T===n||Qi(T,au[N])&&!ko.call(j,N)?O:T}function Hb(T,O,N,j,fe,Me){return Ss(T)&&Ss(O)&&(Me.set(O,T),lf(T,O,n,Hb,Me),Me.delete(O)),T}function iL(T){return Wn(T)?n:T}function Vb(T,O,N,j,fe,Me){var Qe=N&v,et=T.length,it=O.length;if(et!=it&&!(Qe&&it>et))return!1;var wt=Me.get(T),kt=Me.get(O);if(wt&&kt)return wt==O&&kt==T;var Ht=-1,Zt=!0,fn=N&b?new ml:n;for(Me.set(T,O),Me.set(O,T);++Ht<et;){var Pn=T[Ht],Xn=O[Ht];if(j)var kn=Qe?j(Xn,Pn,Ht,O,T,Me):j(Pn,Xn,Ht,T,O,Me);if(kn!==n){if(kn)continue;Zt=!1;break}if(fn){if(!a_(O,function(io,co){if(!hd(fn,co)&&(Pn===io||fe(Pn,io,N,j,Me)))return fn.push(co)})){Zt=!1;break}}else if(!(Pn===Xn||fe(Pn,Xn,N,j,Me))){Zt=!1;break}}return Me.delete(T),Me.delete(O),Zt}function Gb(T,O,N,j,fe,Me,Qe){switch(N){case mt:if(T.byteLength!=O.byteLength||T.byteOffset!=O.byteOffset)return!1;T=T.buffer,O=O.buffer;case Mt:return!(T.byteLength!=O.byteLength||!Me(new zp(T),new zp(O)));case Pe:case Be:case ze:return Qi(+T,+O);case Xe:return T.name==O.name&&T.message==O.message;case Ue:case ct:return T==O+"";case Oe:var et=u_;case qe:var it=j&v;if(et||(et=Gh),T.size!=O.size&&!it)return!1;var wt=Qe.get(T);if(wt)return wt==O;j|=b,Qe.set(T,O);var kt=Vb(et(T),et(O),j,fe,Me,Qe);return Qe.delete(T),kt;case Ne:if(Sa)return Sa.call(T)==Sa.call(O)}return!1}function X_(T,O,N,j,fe,Me){var Qe=N&v,et=z_(T),it=et.length,wt=z_(O),kt=wt.length;if(it!=kt&&!Qe)return!1;for(var Ht=it;Ht--;){var Zt=et[Ht];if(!(Qe?Zt in O:ko.call(O,Zt)))return!1}var fn=Me.get(T),Pn=Me.get(O);if(fn&&Pn)return fn==O&&Pn==T;var Xn=!0;Me.set(T,O),Me.set(O,T);for(var kn=Qe;++Ht<it;){Zt=et[Ht];var io=T[Zt],co=O[Zt];if(j)var $r=Qe?j(co,io,Zt,O,T,Me):j(io,co,Zt,T,O,Me);if(!($r===n?io===co||fe(io,co,N,j,Me):$r)){Xn=!1;break}kn||(kn=Zt=="constructor")}if(Xn&&!kn){var Bi=T.constructor,zs=O.constructor;Bi!=zs&&"constructor"in T&&"constructor"in O&&!(typeof Bi=="function"&&Bi instanceof Bi&&typeof zs=="function"&&zs instanceof zs)&&(Xn=!1)}return Me.delete(T),Me.delete(O),Xn}function mr(T){return Tu(q_(T,n,gf),T+"")}function z_(T){return R_(T,ms,vg)}function Tg(T){return R_(T,Ls,j_)}var Eg=Td?function(T){return Td.get(T)}:CT;function Y_(T){for(var O=T.name+"",N=Tc[O],j=ko.call(Tc,O)?N.length:0;j--;){var fe=N[j],Me=fe.func;if(Me==null||Me==T)return fe.name}return O}function Ad(T){var O=ko.call(we,"placeholder")?we:T;return O.placeholder}function Nn(){var T=we.iteratee||yo;return T=T===yo?Rb:T,arguments.length?T(arguments[0],arguments[1]):T}function vl(T,O){var N=T.__data__;return st(O)?N[typeof O=="string"?"string":"hash"]:N.map}function K_(T){for(var O=ms(T),N=O.length;N--;){var j=O[N],fe=T[j];O[N]=[j,fe,Xb(fe)]}return O}function Yi(T,O){var N=Wp(T,O);return M_(N)?N:n}function Gs(T){var O=ko.call(T,fl),N=T[fl];try{T[fl]=n;var j=!0}catch{}var fe=Kh.call(T);return j&&(O?T[fl]=N:delete T[fl]),fe}var vg=qp?function(T){return T==null?[]:(T=Vo(T),gc(qp(T),function(O){return ib.call(T,O)}))}:LT,j_=qp?function(T){for(var O=[];T;)mc(O,vg(T)),T=qh(T);return O}:LT,ri=_i;(tf&&ri(new tf(new ArrayBuffer(1)))!=mt||_d&&ri(new _d)!=Oe||nf&&ri(nf.resolve())!=me||uu&&ri(new uu)!=qe||pl&&ri(new pl)!=Je)&&(ri=function(T){var O=_i(T),N=O==De?T.constructor:n,j=N?Ki(N):"";if(j)switch(j){case Ed:return mt;case db:return Oe;case __:return me;case hb:return qe;case Os:return Je}return O});function zt(T,O,N){for(var j=-1,fe=N.length;++j<fe;){var Me=N[j],Qe=Me.size;switch(Me.type){case"drop":T+=Qe;break;case"dropRight":O-=Qe;break;case"take":O=gi(O,T+Qe);break;case"takeRight":T=Vs(T,O-Qe);break}}return{start:T,end:O}}function LI(T){var O=T.match(ps);return O?O[1].split(js):[]}function Wb(T,O,N){O=Yl(O,T);for(var j=-1,fe=O.length,Me=!1;++j<fe;){var Qe=vi(O[j]);if(!(Me=T!=null&&N(T,Qe)))break;T=T[Qe]}return Me||++j!=fe?Me:(fe=T==null?0:T.length,!!fe&&Yr(fe)&&Jl(Qe,fe)&&(jn(T)||Vd(T)))}function bg(T){var O=T.length,N=new T.constructor(O);return O&&typeof T[0]=="string"&&ko.call(T,"index")&&(N.index=T.index,N.input=T.input),N}function Ql(T){return typeof T.constructor=="function"&&!bl(T)?si(qh(T)):{}}function Xr(T,O,N){var j=T.constructor;switch(O){case Mt:return af(T);case Pe:case Be:return new j(+T);case mt:return $d(T,N);case qt:case ce:case q:case ne:case Le:case ue:case Fe:case ye:case ft:return Id(T,N);case Oe:return new j;case ze:case ct:return new j(T);case Ue:return Sc(T);case qe:return new j;case Ne:return yc(T)}}function $c(T,O){var N=O.length;if(!N)return T;var j=N-1;return O[j]=(N>1?"& ":"")+O[j],O=O.join(N>2?", ":" "),T.replace(fs,`{
  1928. /* [wrapped with `+O+`] */
  1929. `)}function ql(T){return jn(T)||Vd(T)||!!(rb&&T&&T[rb])}function Jl(T,O){var N=typeof T;return O=O??Z,!!O&&(N=="number"||N!="symbol"&&dl.test(T))&&T>-1&&T%1==0&&T<O}function li(T,O,N){if(!Ss(N))return!1;var j=typeof O;return(j=="number"?as(N)&&Jl(O,N.length):j=="string"&&O in N)?Qi(N[O],T):!1}function Bs(T,O){if(jn(T))return!1;var N=typeof T;return N=="number"||N=="symbol"||N=="boolean"||T==null||Or(T)?!0:se.test(T)||!U.test(T)||O!=null&&T in Vo(O)}function st(T){var O=typeof T;return O=="string"||O=="number"||O=="symbol"||O=="boolean"?T!=="__proto__":T===null}function Po(T){var O=Y_(T),N=we[O];if(typeof N!="function"||!(O in ao.prototype))return!1;if(T===N)return!0;var j=Eg(N);return!!j&&T===j[0]}function Ko(T){return!!g_&&g_ in T}var wI=zh?Ba:Kd;function bl(T){var O=T&&T.constructor,N=typeof O=="function"&&O.prototype||au;return T===N}function Xb(T){return T===T&&!Ss(T)}function zb(T,O){return function(N){return N==null?!1:N[T]===O&&(O!==n||T in Vo(N))}}function rL(T){var O=kg(T,function(j){return N.size===h&&N.clear(),j}),N=O.cache;return O}function Ld(T,O){var N=T[1],j=O[1],fe=N|j,Me=fe<(y|S|D),Qe=j==D&&N==I||j==D&&N==P&&T[7].length<=O[8]||j==(D|P)&&O[7].length<=O[8]&&N==I;if(!(Me||Qe))return T;j&y&&(T[2]=O[2],fe|=N&y?0:L);var et=O[3];if(et){var it=T[3];T[3]=it?Rd(it,et,O[4]):et,T[4]=it?Ea(T[3],f):O[4]}return et=O[5],et&&(it=T[5],T[5]=it?Cd(it,et,O[6]):et,T[6]=it?Ea(T[5],f):O[6]),et=O[7],et&&(T[7]=et),j&D&&(T[8]=T[8]==null?O[8]:gi(T[8],O[8])),T[9]==null&&(T[9]=O[9]),T[0]=O[0],T[1]=fe,T}function Ms(T){var O=[];if(T!=null)for(var N in Vo(T))O.push(N);return O}function Q_(T){return Kh.call(T)}function q_(T,O,N){return O=Vs(O===n?T.length-1:O,0),function(){for(var j=arguments,fe=-1,Me=Vs(j.length-O,0),Qe=vt(Me);++fe<Me;)Qe[fe]=j[O+fe];fe=-1;for(var et=vt(O+1);++fe<O;)et[fe]=j[fe];return et[O]=N(Qe),Hs(T,this,et)}}function Og(T,O){return O.length<2?T:bc(T,At(O,0,-1))}function Sg(T,O){for(var N=T.length,j=gi(O.length,N),fe=xs(T);j--;){var Me=O[j];T[j]=Jl(Me,N)?fe[Me]:n}return T}function wd(T,O){if(!(O==="constructor"&&typeof T[O]=="function")&&O!="__proto__")return T[O]}var Yb=Kb(MI),yg=m_||function(T,O){return Us.setTimeout(T,O)},Tu=Kb(B_);function J_(T,O,N){var j=O+"";return Tu(T,$c(j,ff(LI(j),N)))}function Kb(T){var O=0,N=0;return function(){var j=rI(),fe=re-(j-N);if(N=j,fe>0){if(++O>=G)return arguments[0]}else O=0;return T.apply(n,arguments)}}function Gn(T,O){var N=-1,j=T.length,fe=j-1;for(O=O===n?j:O;++N<O;){var Me=D_(N,fe),Qe=T[Me];T[Me]=T[N],T[N]=Qe}return T.length=O,T}var jb=rL(function(T){var O=[];return T.charCodeAt(0)===46&&O.push(""),T.replace(ke,function(N,j,fe,Me){O.push(fe?Me.replace(jt,"$1"):j||N)}),O});function vi(T){if(typeof T=="string"||Or(T))return T;var O=T+"";return O=="0"&&1/T==-ae?"-0":O}function Ki(T){if(T!=null){try{return Yh.call(T)}catch{}try{return T+""}catch{}}return""}function ff(T,O){return hr(Ae,function(N){var j="_."+N[0];O&N[1]&&!Up(T,j)&&T.push(j)}),T.sort()}function Ic(T){if(T instanceof ao)return T.clone();var O=new Hr(T.__wrapped__,T.__chain__);return O.__actions__=xs(T.__actions__),O.__index__=T.__index__,O.__values__=T.__values__,O}function kd(T,O,N){(N?li(T,O,N):O===n)?O=1:O=Vs(Fn(O),0);var j=T==null?0:T.length;if(!j||O<1)return[];for(var fe=0,Me=0,Qe=vt(jp(j/O));fe<j;)Qe[Me++]=At(T,fe,fe+=O);return Qe}function ji(T){for(var O=-1,N=T==null?0:T.length,j=0,fe=[];++O<N;){var Me=T[O];Me&&(fe[j++]=Me)}return fe}function kI(){var T=arguments.length;if(!T)return[];for(var O=vt(T-1),N=arguments[0],j=T;j--;)O[j-1]=arguments[j];return mc(jn(N)?xs(N):[N],qs(O,1))}var _r=eo(function(T,O){return Qo(T)?bd(T,qs(O,1,Qo,!0)):[]}),NI=eo(function(T,O){var N=Ol(O);return Qo(N)&&(N=n),Qo(T)?bd(T,qs(O,1,Qo,!0),Nn(N,2)):[]}),PI=eo(function(T,O){var N=Ol(O);return Qo(N)&&(N=n),Qo(T)?bd(T,qs(O,1,Qo,!0),n,N):[]});function DI(T,O,N){var j=T==null?0:T.length;return j?(O=N||O===n?1:Fn(O),At(T,O<0?0:O,j)):[]}function xI(T,O,N){var j=T==null?0:T.length;return j?(O=N||O===n?1:Fn(O),O=j-O,At(T,0,O<0?0:O)):[]}function Nd(T,O){return T&&T.length?hg(T,Nn(O,3),!0,!0):[]}function Qb(T,O){return T&&T.length?hg(T,Nn(O,3),!0):[]}function BI(T,O,N,j){var fe=T==null?0:T.length;return fe?(N&&typeof N!="number"&&li(T,O,N)&&(N=0,j=fe),bb(T,O,N,j)):[]}function pf(T,O,N){var j=T==null?0:T.length;if(!j)return-1;var fe=N==null?0:Fn(N);return fe<0&&(fe=Vs(j+fe,0)),Hp(T,Nn(O,3),fe)}function Z_(T,O,N){var j=T==null?0:T.length;if(!j)return-1;var fe=j-1;return N!==n&&(fe=Fn(N),fe=N<0?Vs(j+fe,0):gi(fe,j-1)),Hp(T,Nn(O,3),fe,!0)}function gf(T){var O=T==null?0:T.length;return O?qs(T,1):[]}function qb(T){var O=T==null?0:T.length;return O?qs(T,ae):[]}function Jb(T,O){var N=T==null?0:T.length;return N?(O=O===n?1:Fn(O),qs(T,O)):[]}function FI(T){for(var O=-1,N=T==null?0:T.length,j={};++O<N;){var fe=T[O];j[fe[0]]=fe[1]}return j}function bi(T){return T&&T.length?T[0]:n}function wa(T,O,N){var j=T==null?0:T.length;if(!j)return-1;var fe=N==null?0:Fn(N);return fe<0&&(fe=Vs(j+fe,0)),Xl(T,O,fe)}function Zb(T){var O=T==null?0:T.length;return O?At(T,0,-1):[]}var eO=eo(function(T){var O=ls(T,fg);return O.length&&O[0]===T[0]?lg(O):[]}),eT=eo(function(T){var O=Ol(T),N=ls(T,fg);return O===Ol(N)?O=n:N.pop(),N.length&&N[0]===T[0]?lg(N,Nn(O,2)):[]}),Ws=eo(function(T){var O=Ol(T),N=ls(T,fg);return O=typeof O=="function"?O:n,O&&N.pop(),N.length&&N[0]===T[0]?lg(N,n,O):[]});function tT(T,O){return T==null?"":cb.call(T,O)}function Ol(T){var O=T==null?0:T.length;return O?T[O-1]:n}function Oi(T,O,N){var j=T==null?0:T.length;if(!j)return-1;var fe=j;return N!==n&&(fe=Fn(N),fe=fe<0?Vs(j+fe,0):gi(fe,j-1)),O===O?Wh(T,O,fe):Hp(T,Kv,fe,!0)}function nT(T,O){return T&&T.length?N_(T,Fn(O)):n}var tO=eo(Pd);function Pd(T,O){return T&&T.length&&O&&O.length?P_(T,O):T}function nO(T,O,N){return T&&T.length&&O&&O.length?P_(T,O,Nn(N,2)):T}function UI(T,O,N){return T&&T.length&&O&&O.length?P_(T,O,n,N):T}var oT=mr(function(T,O){var N=T==null?0:T.length,j=O_(T,O);return Lb(T,ls(O,function(fe){return Jl(fe,N)?+fe:fe}).sort(Kl)),j});function Tr(T,O){var N=[];if(!(T&&T.length))return N;var j=-1,fe=[],Me=T.length;for(O=Nn(O,3);++j<Me;){var Qe=T[j];O(Qe,j,T)&&(N.push(Qe),fe.push(j))}return Lb(T,fe),N}function Eu(T){return T==null?T:cu.call(T)}function HI(T,O,N){var j=T==null?0:T.length;return j?(N&&typeof N!="number"&&li(T,O,N)?(O=0,N=j):(O=O==null?0:Fn(O),N=N===n?j:Fn(N)),At(T,O,N)):[]}function $g(T,O){return Ti(T,O)}function VI(T,O,N){return Sd(T,O,Nn(N,2))}function GI(T,O){var N=T==null?0:T.length;if(N){var j=Ti(T,O);if(j<N&&Qi(T[j],O))return j}return-1}function WI(T,O){return Ti(T,O,!0)}function Dd(T,O,N){return Sd(T,O,Nn(N,2),!0)}function XI(T,O){var N=T==null?0:T.length;if(N){var j=Ti(T,O,!0)-1;if(Qi(T[j],O))return j}return-1}function zI(T){return T&&T.length?wb(T):[]}function YI(T,O){return T&&T.length?wb(T,Nn(O,2)):[]}function lL(T){var O=T==null?0:T.length;return O?At(T,1,O):[]}function oO(T,O,N){return T&&T.length?(O=N||O===n?1:Fn(O),At(T,0,O<0?0:O)):[]}function KI(T,O,N){var j=T==null?0:T.length;return j?(O=N||O===n?1:Fn(O),O=j-O,At(T,O<0?0:O,j)):[]}function Ig(T,O){return T&&T.length?hg(T,Nn(O,3),!1,!0):[]}function xd(T,O){return T&&T.length?hg(T,Nn(O,3)):[]}var sO=eo(function(T){return Gr(qs(T,1,Qo,!0))}),aL=eo(function(T){var O=Ol(T);return Qo(O)&&(O=n),Gr(qs(T,1,Qo,!0),Nn(O,2))}),iO=eo(function(T){var O=Ol(T);return O=typeof O=="function"?O:n,Gr(qs(T,1,Qo,!0),n,O)});function rO(T){return T&&T.length?Gr(T):[]}function lO(T,O){return T&&T.length?Gr(T,Nn(O,2)):[]}function sn(T,O){return O=typeof O=="function"?O:n,T&&T.length?Gr(T,n,O):[]}function vu(T){if(!(T&&T.length))return[];var O=0;return T=gc(T,function(N){if(Qo(N))return O=Vs(N.length,O),!0}),Hh(O,function(N){return ls(T,Ur(N))})}function mf(T,O){if(!(T&&T.length))return[];var N=vu(T);return O==null?N:ls(N,function(j){return Hs(O,n,j)})}var aO=eo(function(T,O){return Qo(T)?bd(T,O):[]}),cO=eo(function(T){return Pb(gc(T,Qo))}),uO=eo(function(T){var O=Ol(T);return Qo(O)&&(O=n),Pb(gc(T,Qo),Nn(O,2))}),Bd=eo(function(T){var O=Ol(T);return O=typeof O=="function"?O:n,Pb(gc(T,Qo),n,O)}),cL=eo(vu);function uL(T,O){return U_(T||[],O||[],of)}function Er(T,O){return U_(T||[],O||[],Tl)}var jo=eo(function(T){var O=T.length,N=O>1?T[O-1]:n;return N=typeof N=="function"?(T.pop(),N):n,mf(T,N)});function _f(T){var O=we(T);return O.__chain__=!0,O}function dO(T,O){return O(T),T}function Tf(T,O){return O(T)}var Ef=mr(function(T){var O=T.length,N=O?T[0]:0,j=this.__wrapped__,fe=function(Me){return O_(Me,T)};return O>1||this.__actions__.length||!(j instanceof ao)||!Jl(N)?this.thru(fe):(j=j.slice(N,+N+(O?1:0)),j.__actions__.push({func:Tf,args:[fe],thisArg:n}),new Hr(j,this.__chain__).thru(function(Me){return O&&!Me.length&&Me.push(n),Me}))});function sT(){return _f(this)}function hO(){return new Hr(this.value(),this.__chain__)}function vf(){this.__values__===n&&(this.__values__=RO(this.value()));var T=this.__index__>=this.__values__.length,O=T?n:this.__values__[this.__index__++];return{done:T,value:O}}function bf(){return this}function ka(T){for(var O,N=this;N instanceof Zp;){var j=Ic(N);j.__index__=0,j.__values__=n,O?fe.__wrapped__=j:O=j;var fe=j;N=N.__wrapped__}return fe.__wrapped__=T,O}function Na(){var T=this.__wrapped__;if(T instanceof ao){var O=T;return this.__actions__.length&&(O=new ao(this)),O=O.reverse(),O.__actions__.push({func:Tf,args:[Eu],thisArg:n}),new Hr(O,this.__chain__)}return this.thru(Eu)}function iT(){return Nb(this.__wrapped__,this.__actions__)}var jI=Wr(function(T,O,N){ko.call(T,N)?++T[N]:Ia(T,N,1)});function rT(T,O,N){var j=jn(T)?Wv:vb;return N&&li(T,O,N)&&(O=n),j(T,Nn(O,3))}function Pa(T,O){var N=jn(T)?gc:$_;return N(T,Nn(O,3))}var Mo=V_(pf),lT=V_(Z_);function Rg(T,O){return qs(go(T,O),1)}function fO(T,O){return qs(go(T,O),ae)}function QI(T,O,N){return N=N===n?1:Fn(N),qs(go(T,O),N)}function aT(T,O){var N=jn(T)?hr:Ra;return N(T,Nn(O,3))}function Cg(T,O){var N=jn(T)?j$:og;return N(T,Nn(O,3))}var pO=Wr(function(T,O,N){ko.call(T,N)?T[N].push(O):Ia(T,N,[O])});function Fd(T,O,N,j){T=as(T)?T:zd(T),N=N&&!j?Fn(N):0;var fe=T.length;return N<0&&(N=Vs(fe+N,0)),Mf(T)?N<=fe&&T.indexOf(O,N)>-1:!!fe&&Xl(T,O,N)>-1}var Of=eo(function(T,O,N){var j=-1,fe=typeof O=="function",Me=as(T)?vt(T.length):[];return Ra(T,function(Qe){Me[++j]=fe?Hs(O,Qe,N):fu(Qe,O,N)}),Me}),Sf=Wr(function(T,O,N){Ia(T,N,O)});function go(T,O){var N=jn(T)?ls:L_;return N(T,Nn(O,3))}function yf(T,O,N,j){return T==null?[]:(jn(O)||(O=O==null?[]:[O]),N=j?n:N,jn(N)||(N=N==null?[]:[N]),Mb(T,O,N))}var Ud=Wr(function(T,O,N){T[N?0:1].push(O)},function(){return[[],[]]});function gO(T,O,N){var j=jn(T)?l_:ru,fe=arguments.length<3;return j(T,Nn(O,4),N,fe,Ra)}function bu(T,O,N){var j=jn(T)?Xv:ru,fe=arguments.length<3;return j(T,Nn(O,4),N,fe,og)}function qI(T,O){var N=jn(T)?gc:$_;return N(T,Da(Nn(O,3)))}function mO(T){var O=jn(T)?b_:CI;return O(T)}function xi(T,O,N){(N?li(T,O,N):O===n)?O=1:O=Fn(O);var j=jn(T)?Tb:Mn;return j(T,O)}function cT(T){var O=jn(T)?TI:Ca;return O(T)}function Mg(T){if(T==null)return 0;if(as(T))return Mf(T)?lu(T):T.length;var O=ri(T);return O==Oe||O==qe?T.size:ug(T).length}function Ag(T,O,N){var j=jn(T)?a_:Oc;return N&&li(T,O,N)&&(O=n),j(T,Nn(O,3))}var _O=eo(function(T,O){if(T==null)return[];var N=O.length;return N>1&&li(T,O[0],O[1])?O=[]:N>2&&li(O[0],O[1],O[2])&&(O=[O[0]]),Mb(T,qs(O,1),[])}),$f=ef||function(){return Us.Date.now()};function JI(T,O){if(typeof O!="function")throw new pi(a);return T=Fn(T),function(){if(--T<1)return O.apply(this,arguments)}}function TO(T,O,N){return O=N?n:O,O=T&&O==null?T.length:O,La(T,D,n,n,n,n,O)}function EO(T,O){var N;if(typeof O!="function")throw new pi(a);return T=Fn(T),function(){return--T>0&&(N=O.apply(this,arguments)),T<=1&&(O=n),N}}var Rc=eo(function(T,O,N){var j=y;if(N.length){var fe=Ea(N,Ad(Rc));j|=w}return La(T,j,O,N,fe)}),uT=eo(function(T,O,N){var j=y|S;if(N.length){var fe=Ea(N,Ad(uT));j|=w}return La(O,j,T,N,fe)});function dT(T,O,N){O=N?n:O;var j=La(T,I,n,n,n,n,n,O);return j.placeholder=dT.placeholder,j}function Ou(T,O,N){O=N?n:O;var j=La(T,R,n,n,n,n,n,O);return j.placeholder=Ou.placeholder,j}function Lg(T,O,N){var j,fe,Me,Qe,et,it,wt=0,kt=!1,Ht=!1,Zt=!0;if(typeof T!="function")throw new pi(a);O=es(O)||0,Ss(N)&&(kt=!!N.leading,Ht="maxWait"in N,Me=Ht?Vs(es(N.maxWait)||0,O):Me,Zt="trailing"in N?!!N.trailing:Zt);function fn(ws){var Il=j,Wa=fe;return j=fe=n,wt=ws,Qe=T.apply(Wa,Il),Qe}function Pn(ws){return wt=ws,et=yg(io,O),kt?fn(ws):Qe}function Xn(ws){var Il=ws-it,Wa=ws-wt,sS=O-Il;return Ht?gi(sS,Me-Wa):sS}function kn(ws){var Il=ws-it,Wa=ws-wt;return it===n||Il>=O||Il<0||Ht&&Wa>=Me}function io(){var ws=$f();if(kn(ws))return co(ws);et=yg(io,Xn(ws))}function co(ws){return et=n,Zt&&j?fn(ws):(j=fe=n,Qe)}function $r(){et!==n&&mu(et),wt=0,j=it=fe=et=n}function Bi(){return et===n?Qe:co($f())}function zs(){var ws=$f(),Il=kn(ws);if(j=arguments,fe=this,it=ws,Il){if(et===n)return Pn(it);if(Ht)return mu(et),et=yg(io,O),fn(it)}return et===n&&(et=yg(io,O)),Qe}return zs.cancel=$r,zs.flush=Bi,zs}var wg=eo(function(T,O){return y_(T,1,O)}),If=eo(function(T,O,N){return y_(T,es(O)||0,N)});function ZI(T){return La(T,B)}function kg(T,O){if(typeof T!="function"||O!=null&&typeof O!="function")throw new pi(a);var N=function(){var j=arguments,fe=O?O.apply(this,j):j[0],Me=N.cache;if(Me.has(fe))return Me.get(fe);var Qe=T.apply(this,j);return N.cache=Me.set(fe,Qe)||Me,Qe};return N.cache=new(kg.Cache||ya),N}kg.Cache=ya;function Da(T){if(typeof T!="function")throw new pi(a);return function(){var O=arguments;switch(O.length){case 0:return!T.call(this);case 1:return!T.call(this,O[0]);case 2:return!T.call(this,O[0],O[1]);case 3:return!T.call(this,O[0],O[1],O[2])}return!T.apply(this,O)}}function vO(T){return EO(2,T)}var bO=gu(function(T,O){O=O.length==1&&jn(O[0])?ls(O[0],Ni(Nn())):ls(qs(O,1),Ni(Nn()));var N=O.length;return eo(function(j){for(var fe=-1,Me=gi(j.length,N);++fe<Me;)j[fe]=O[fe].call(this,j[fe]);return Hs(T,this,j)})}),vr=eo(function(T,O){var N=Ea(O,Ad(vr));return La(T,w,n,O,N)}),Rf=eo(function(T,O){var N=Ea(O,Ad(Rf));return La(T,k,n,O,N)}),OO=mr(function(T,O){return La(T,P,n,n,n,O)});function SO(T,O){if(typeof T!="function")throw new pi(a);return O=O===n?O:Fn(O),eo(T,O)}function e0(T,O){if(typeof T!="function")throw new pi(a);return O=O==null?0:Vs(Fn(O),0),eo(function(N){var j=N[O],fe=zi(N,0,O);return j&&mc(fe,j),Hs(T,this,fe)})}function t0(T,O,N){var j=!0,fe=!0;if(typeof T!="function")throw new pi(a);return Ss(N)&&(j="leading"in N?!!N.leading:j,fe="trailing"in N?!!N.trailing:fe),Lg(T,O,{leading:j,maxWait:O,trailing:fe})}function hT(T){return TO(T,1)}function Xs(T,O){return vr(pu(O),T)}function zr(){if(!arguments.length)return[];var T=arguments[0];return jn(T)?T:[T]}function n0(T){return mi(T,E)}function dL(T,O){return O=typeof O=="function"?O:n,mi(T,E,O)}function hL(T){return mi(T,p|E)}function Cc(T,O){return O=typeof O=="function"?O:n,mi(T,p|E,O)}function yO(T,O){return O==null||S_(T,O,ms(O))}function Qi(T,O){return T===O||T!==T&&O!==O}var o0=_g(rg),Hd=_g(function(T,O){return T>=O}),Vd=C_(function(){return arguments}())?C_:function(T){return As(T)&&ko.call(T,"callee")&&!ib.call(T,"callee")},jn=vt.isArray,fT=Fv?Ni(Fv):Ob;function as(T){return T!=null&&Yr(T.length)&&!Ba(T)}function Qo(T){return As(T)&&as(T)}function $O(T){return T===!0||T===!1||As(T)&&_i(T)==Pe}var xa=ab||Kd,s0=Uv?Ni(Uv):Sb;function Sl(T){return As(T)&&T.nodeType===1&&!Wn(T)}function Ng(T){if(T==null)return!0;if(as(T)&&(jn(T)||typeof T=="string"||typeof T.splice=="function"||xa(T)||Su(T)||Vd(T)))return!T.length;var O=ri(T);if(O==Oe||O==qe)return!T.size;if(bl(T))return!ug(T).length;for(var N in T)if(ko.call(T,N))return!1;return!0}function so(T,O){return Od(T,O)}function Go(T,O,N){N=typeof N=="function"?N:n;var j=N?N(T,O):n;return j===n?Od(T,O,n,N):!!j}function pT(T){if(!As(T))return!1;var O=_i(T);return O==Xe||O==ot||typeof T.message=="string"&&typeof T.name=="string"&&!Wn(T)}function gT(T){return typeof T=="number"&&ba(T)}function Ba(T){if(!Ss(T))return!1;var O=_i(T);return O==ee||O==pe||O==ve||O==Te}function Pg(T){return typeof T=="number"&&T==Fn(T)}function Yr(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=Z}function Ss(T){var O=typeof T;return T!=null&&(O=="object"||O=="function")}function As(T){return T!=null&&typeof T=="object"}var br=Hv?Ni(Hv):$b;function Ao(T,O){return T===O||ag(T,O,K_(O))}function Mc(T,O,N){return N=typeof N=="function"?N:n,ag(T,O,K_(O),N)}function mT(T){return yl(T)&&T!=+T}function _T(T){if(wI(T))throw new Vn(r);return M_(T)}function Cf(T){return T===null}function fL(T){return T==null}function yl(T){return typeof T=="number"||As(T)&&_i(T)==ze}function Wn(T){if(!As(T)||_i(T)!=De)return!1;var O=qh(T);if(O===null)return!0;var N=ko.call(O,"constructor")&&O.constructor;return typeof N=="function"&&N instanceof N&&Yh.call(N)==jh}var Zl=Vv?Ni(Vv):A_;function gs(T){return Pg(T)&&T>=-Z&&T<=Z}var TT=Gv?Ni(Gv):cg;function Mf(T){return typeof T=="string"||!jn(T)&&As(T)&&_i(T)==ct}function Or(T){return typeof T=="symbol"||As(T)&&_i(T)==Ne}var Su=i_?Ni(i_):Ib;function i0(T){return T===n}function r0(T){return As(T)&&ri(T)==Je}function qi(T){return As(T)&&_i(T)==ut}var IO=_g(dg),ea=_g(function(T,O){return T<=O});function RO(T){if(!T)return[];if(as(T))return Mf(T)?Pi(T):xs(T);if(Jh&&T[Jh])return oI(T[Jh]());var O=ri(T),N=O==Oe?u_:O==qe?Gh:zd;return N(T)}function Fa(T){if(!T)return T===0?T:0;if(T=es(T),T===ae||T===-ae){var O=T<0?-1:1;return O*Q}return T===T?T:0}function Fn(T){var O=Fa(T),N=O%1;return O===O?N?O-N:O:0}function Dg(T){return T?du(Fn(T),0,ge):0}function es(T){if(typeof T=="number")return T;if(Or(T))return he;if(Ss(T)){var O=typeof T.valueOf=="function"?T.valueOf():T;T=Ss(O)?O+"":O}if(typeof T!="string")return T===0?T:+T;T=c_(T);var N=ul.test(T);return N||Br.test(T)?K$(T.slice(2),N?2:8):Ps.test(T)?he:+T}function l0(T){return Ei(T,Ls(T))}function nt(T){return T?du(Fn(T),-Z,Z):T===0?T:0}function no(T){return T==null?"":pr(T)}var xg=El(function(T,O){if(bl(O)||as(O)){Ei(O,ms(O),T);return}for(var N in O)ko.call(O,N)&&of(T,N,O[N])}),ET=El(function(T,O){Ei(O,Ls(O),T)}),$l=El(function(T,O,N,j){Ei(O,Ls(O),T,j)}),yu=El(function(T,O,N,j){Ei(O,ms(O),T,j)}),vT=mr(O_);function Af(T,O){var N=si(T);return O==null?N:Eb(N,O)}var CO=eo(function(T,O){T=Vo(T);var N=-1,j=O.length,fe=j>2?O[2]:n;for(fe&&li(O[0],O[1],fe)&&(j=1);++N<j;)for(var Me=O[N],Qe=Ls(Me),et=-1,it=Qe.length;++et<it;){var wt=Qe[et],kt=T[wt];(kt===n||Qi(kt,au[wt])&&!ko.call(T,wt))&&(T[wt]=Me[wt])}return T}),a0=eo(function(T){return T.push(n,Hb),Hs(Sr,n,T)});function Kr(T,O){return zv(T,Nn(O,3),_l)}function MO(T,O){return zv(T,Nn(O,3),ig)}function Bg(T,O){return T==null?T:sg(T,Nn(O,3),Ls)}function AO(T,O){return T==null?T:I_(T,Nn(O,3),Ls)}function c0(T,O){return T&&_l(T,Nn(O,3))}function u0(T,O){return T&&ig(T,Nn(O,3))}function d0(T){return T==null?[]:sf(T,ms(T))}function h0(T){return T==null?[]:sf(T,Ls(T))}function Gd(T,O,N){var j=T==null?n:bc(T,O);return j===n?N:j}function LO(T,O){return T!=null&&Wb(T,O,bI)}function Wd(T,O){return T!=null&&Wb(T,O,OI)}var wO=mg(function(T,O,N){O!=null&&typeof O.toString!="function"&&(O=Kh.call(O)),T[O]=N},WO(Ji)),Fg=mg(function(T,O,N){O!=null&&typeof O.toString!="function"&&(O=Kh.call(O)),ko.call(T,O)?T[O].push(N):T[O]=[N]},Nn),Ug=eo(fu);function ms(T){return as(T)?eg(T):ug(T)}function Ls(T){return as(T)?eg(T,!0):Cb(T)}function f0(T,O){var N={};return O=Nn(O,3),_l(T,function(j,fe,Me){Ia(N,O(j,fe,Me),j)}),N}function Ua(T,O){var N={};return O=Nn(O,3),_l(T,function(j,fe,Me){Ia(N,fe,O(j,fe,Me))}),N}var Ac=El(function(T,O,N){lf(T,O,N)}),Sr=El(function(T,O,N,j){lf(T,O,N,j)}),p0=mr(function(T,O){var N={};if(T==null)return N;var j=!1;O=ls(O,function(Me){return Me=Yl(Me,T),j||(j=Me.length>1),Me}),Ei(T,Tg(T),N),j&&(N=mi(N,p|_|E,iL));for(var fe=O.length;fe--;)F_(N,O[fe]);return N});function Lf(T,O){return bT(T,Da(Nn(O)))}var Pt=mr(function(T,O){return T==null?{}:$I(T,O)});function bT(T,O){if(T==null)return{};var N=ls(Tg(T),function(j){return[j]});return O=Nn(O),Ab(T,N,function(j,fe){return O(j,fe[0])})}function pL(T,O,N){O=Yl(O,T);var j=-1,fe=O.length;for(fe||(fe=1,T=n);++j<fe;){var Me=T==null?n:T[vi(O[j])];Me===n&&(j=fe,Me=N),T=Ba(Me)?Me.call(T):Me}return T}function gL(T,O,N){return T==null?T:Tl(T,O,N)}function mL(T,O,N,j){return j=typeof j=="function"?j:n,T==null?T:Tl(T,O,N,j)}var OT=W_(ms),Hg=W_(Ls);function bo(T,O,N){var j=jn(T),fe=j||xa(T)||Su(T);if(O=Nn(O,4),N==null){var Me=T&&T.constructor;fe?N=j?new Me:[]:Ss(T)?N=Ba(Me)?si(qh(T)):{}:N={}}return(fe?hr:_l)(T,function(Qe,et,it){return O(N,Qe,et,it)}),N}function Xd(T,O){return T==null?!0:F_(T,O)}function ST(T,O,N){return T==null?T:ii(T,O,pu(N))}function _L(T,O,N,j){return j=typeof j=="function"?j:n,T==null?T:ii(T,O,pu(N),j)}function zd(T){return T==null?[]:Gp(T,ms(T))}function ta(T){return T==null?[]:Gp(T,Ls(T))}function Vg(T,O,N){return N===n&&(N=O,O=n),N!==n&&(N=es(N),N=N===N?N:0),O!==n&&(O=es(O),O=O===O?O:0),du(es(T),O,N)}function wo(T,O,N){return O=Fa(O),N===n?(N=O,O=0):N=Fa(N),T=es(T),rf(T,O,N)}function g0(T,O,N){if(N&&typeof N!="boolean"&&li(T,O,N)&&(O=N=n),N===n&&(typeof O=="boolean"?(N=O,O=n):typeof T=="boolean"&&(N=T,T=n)),T===n&&O===n?(T=0,O=1):(T=Fa(T),O===n?(O=T,T=0):O=Fa(O)),T>O){var j=T;T=O,O=j}if(N||T%1||O%1){var fe=Oa();return gi(T+fe*(O-T+o_("1e-"+((fe+"").length-1))),O)}return D_(T,O)}var kO=jl(function(T,O,N){return O=O.toLowerCase(),T+(N?Yd(O):O)});function Yd(T){return IT(no(T).toLowerCase())}function NO(T){return T=no(T),T&&T.replace(_a,Jv).replace(H$,"")}function PO(T,O,N){T=no(T),O=pr(O);var j=T.length;N=N===n?j:du(Fn(N),0,j);var fe=N;return N-=O.length,N>=0&&T.slice(N,fe)==O}function DO(T){return T=no(T),T&&On.test(T)?T.replace(Ln,tI):T}function xO(T){return T=no(T),T&&Rt.test(T)?T.replace(je,"\\$&"):T}var Gg=jl(function(T,O,N){return T+(N?"-":"")+O.toLowerCase()}),TL=jl(function(T,O,N){return T+(N?" ":"")+O.toLowerCase()}),m0=Di("toLowerCase");function EL(T,O,N){T=no(T),O=Fn(O);var j=O?lu(T):0;if(!O||j>=O)return T;var fe=(O-j)/2;return Aa(Qp(fe),N)+T+Aa(jp(fe),N)}function vL(T,O,N){T=no(T),O=Fn(O);var j=O?lu(T):0;return O&&j<O?T+Aa(O-j,N):T}function na(T,O,N){T=no(T),O=Fn(O);var j=O?lu(T):0;return O&&j<O?Aa(O-j,N)+T:T}function BO(T,O,N){return N||O==null?O=0:O&&(O=+O),lI(no(T).replace(Qt,""),O||0)}function FO(T,O,N){return(N?li(T,O,N):O===n)?O=1:O=Fn(O),x_(no(T),O)}function wf(){var T=arguments,O=no(T[0]);return T.length<3?O:O.replace(T[1],T[2])}var _0=jl(function(T,O,N){return T+(N?"_":"")+O.toLowerCase()});function UO(T,O,N){return N&&typeof N!="number"&&li(T,O,N)&&(O=N=n),N=N===n?ge:N>>>0,N?(T=no(T),T&&(typeof O=="string"||O!=null&&!Zl(O))&&(O=pr(O),!O&&fd(T))?zi(Pi(T),0,N):T.split(O,N)):[]}var Wg=jl(function(T,O,N){return T+(N?" ":"")+IT(O)});function T0(T,O,N){return T=no(T),N=N==null?0:du(Fn(N),0,T.length),O=pr(O),T.slice(N,N+O.length)==O}function HO(T,O,N){var j=we.templateSettings;N&&li(T,O,N)&&(O=n),T=no(T),O=$l({},O,j,Ub);var fe=$l({},O.imports,j.imports,Ub),Me=ms(fe),Qe=Gp(fe,Me),et,it,wt=0,kt=O.interpolate||_t,Ht="__p += '",Zt=gd((O.escape||_t).source+"|"+kt.source+"|"+(kt===Ce?Hn:_t).source+"|"+(O.evaluate||_t).source+"|$","g"),fn="//# sourceURL="+(ko.call(O,"sourceURL")?(O.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++W$+"]")+`
  1930. `;T.replace(Zt,function(kn,io,co,$r,Bi,zs){return co||(co=$r),Ht+=T.slice(wt,zs).replace(Jt,Zv),io&&(et=!0,Ht+=`' +
  1931. __e(`+io+`) +
  1932. '`),Bi&&(it=!0,Ht+=`';
  1933. `+Bi+`;
  1934. __p += '`),co&&(Ht+=`' +
  1935. ((__t = (`+co+`)) == null ? '' : __t) +
  1936. '`),wt=zs+kn.length,kn}),Ht+=`';
  1937. `;var Pn=ko.call(O,"variable")&&O.variable;if(!Pn)Ht=`with (obj) {
  1938. `+Ht+`
  1939. }
  1940. `;else if(bt.test(Pn))throw new Vn(c);Ht=(it?Ht.replace(Kt,""):Ht).replace(En,"$1").replace(Rn,"$1;"),Ht="function("+(Pn||"obj")+`) {
  1941. `+(Pn?"":`obj || (obj = {});
  1942. `)+"var __t, __p = ''"+(et?", __e = _.escape":"")+(it?`, __j = Array.prototype.join;
  1943. function print() { __p += __j.call(arguments, '') }
  1944. `:`;
  1945. `)+Ht+`return __p
  1946. }`;var Xn=Xg(function(){return Co(Me,fn+"return "+Ht).apply(n,Qe)});if(Xn.source=Ht,pT(Xn))throw Xn;return Xn}function yr(T){return no(T).toLowerCase()}function Ha(T){return no(T).toUpperCase()}function E0(T,O,N){if(T=no(T),T&&(N||O===n))return c_(T);if(!T||!(O=pr(O)))return T;var j=Pi(T),fe=Pi(O),Me=Qv(j,fe),Qe=qv(j,fe)+1;return zi(j,Me,Qe).join("")}function yT(T,O,N){if(T=no(T),T&&(N||O===n))return T.slice(0,d_(T)+1);if(!T||!(O=pr(O)))return T;var j=Pi(T),fe=qv(j,Pi(O))+1;return zi(j,0,fe).join("")}function v0(T,O,N){if(T=no(T),T&&(N||O===n))return T.replace(Qt,"");if(!T||!(O=pr(O)))return T;var j=Pi(T),fe=Qv(j,Pi(O));return zi(j,fe).join("")}function kf(T,O){var N=F,j=X;if(Ss(O)){var fe="separator"in O?O.separator:fe;N="length"in O?Fn(O.length):N,j="omission"in O?pr(O.omission):j}T=no(T);var Me=T.length;if(fd(T)){var Qe=Pi(T);Me=Qe.length}if(N>=Me)return T;var et=N-lu(j);if(et<1)return j;var it=Qe?zi(Qe,0,et).join(""):T.slice(0,et);if(fe===n)return it+j;if(Qe&&(et+=it.length-et),Zl(fe)){if(T.slice(et).search(fe)){var wt,kt=it;for(fe.global||(fe=gd(fe.source,no(rs.exec(fe))+"g")),fe.lastIndex=0;wt=fe.exec(kt);)var Ht=wt.index;it=it.slice(0,Ht===n?et:Ht)}}else if(T.indexOf(pr(fe),et)!=et){var Zt=it.lastIndexOf(fe);Zt>-1&&(it=it.slice(0,Zt))}return it+j}function $T(T){return T=no(T),T&&Zn.test(T)?T.replace(Lo,tb):T}var Nf=jl(function(T,O,N){return T+(N?" ":"")+O.toUpperCase()}),IT=Di("toUpperCase");function b0(T,O,N){return T=no(T),O=N?n:O,O===n?nI(T)?h_(T):J$(T):T.match(O)||[]}var Xg=eo(function(T,O){try{return Hs(T,n,O)}catch(N){return pT(N)?N:new Vn(N)}}),VO=mr(function(T,O){return hr(O,function(N){N=vi(N),Ia(T,N,Rc(T[N],T))}),T});function GO(T){var O=T==null?0:T.length,N=Nn();return T=O?ls(T,function(j){if(typeof j[1]!="function")throw new pi(a);return[N(j[0]),j[1]]}):[],eo(function(j){for(var fe=-1;++fe<O;){var Me=T[fe];if(Hs(Me[0],this,j))return Hs(Me[1],this,j)}})}function bL(T){return vI(mi(T,p))}function WO(T){return function(){return T}}function OL(T,O){return T==null||T!==T?O:T}var O0=AI(),SL=AI(!0);function Ji(T){return T}function yo(T){return Rb(typeof T=="function"?T:mi(T,p))}function Va(T){return w_(mi(T,p))}function zg(T,O){return k_(T,mi(O,p))}var RT=eo(function(T,O){return function(N){return fu(N,T,O)}}),Ga=eo(function(T,O){return function(N){return fu(T,N,O)}});function XO(T,O,N){var j=ms(O),fe=sf(O,j);N==null&&!(Ss(O)&&(fe.length||!j.length))&&(N=O,O=T,T=this,fe=sf(O,ms(O)));var Me=!(Ss(N)&&"chain"in N)||!!N.chain,Qe=Ba(T);return hr(fe,function(et){var it=O[et];T[et]=it,Qe&&(T.prototype[et]=function(){var wt=this.__chain__;if(Me||wt){var kt=T(this.__wrapped__),Ht=kt.__actions__=xs(this.__actions__);return Ht.push({func:it,args:arguments,thisArg:T}),kt.__chain__=wt,kt}return it.apply(T,mc([this.value()],arguments))})}),T}function Pf(){return Us._===this&&(Us._=iI),this}function CT(){}function S0(T){return T=Fn(T),eo(function(O){return N_(O,T)})}var zO=df(ls),yL=df(Wv),YO=df(a_);function MT(T){return Bs(T)?Ur(vi(T)):II(T)}function y0(T){return function(O){return T==null?n:bc(T,O)}}var KO=Bb(),AT=Bb(!0);function LT(){return[]}function Kd(){return!1}function jO(){return{}}function QO(){return""}function qO(){return!0}function JO(T,O){if(T=Fn(T),T<1||T>Z)return[];var N=ge,j=gi(T,ge);O=Nn(O),T-=ge;for(var fe=Hh(j,O);++N<T;)O(N);return fe}function $u(T){return jn(T)?ls(T,vi):Or(T)?[T]:xs(jb(no(T)))}function ZO(T){var O=++p_;return no(T)+O}var eS=Ma(function(T,O){return T+O},0),tS=hf("ceil"),nS=Ma(function(T,O){return T/O},1),oS=hf("floor");function cn(T){return T&&T.length?hu(T,Ji,rg):n}function $0(T,O){return T&&T.length?hu(T,Nn(O,2),rg):n}function I0(T){return jv(T,Ji)}function jd(T,O){return jv(T,Nn(O,2))}function Yg(T){return T&&T.length?hu(T,Ji,dg):n}function Df(T,O){return T&&T.length?hu(T,Nn(O,2),dg):n}var R0=Ma(function(T,O){return T*O},1),wT=hf("round"),C0=Ma(function(T,O){return T-O},0);function M0(T){return T&&T.length?Vp(T,Ji):0}function A0(T,O){return T&&T.length?Vp(T,Nn(O,2)):0}return we.after=JI,we.ary=TO,we.assign=xg,we.assignIn=ET,we.assignInWith=$l,we.assignWith=yu,we.at=vT,we.before=EO,we.bind=Rc,we.bindAll=VO,we.bindKey=uT,we.castArray=zr,we.chain=_f,we.chunk=kd,we.compact=ji,we.concat=kI,we.cond=GO,we.conforms=bL,we.constant=WO,we.countBy=jI,we.create=Af,we.curry=dT,we.curryRight=Ou,we.debounce=Lg,we.defaults=CO,we.defaultsDeep=a0,we.defer=wg,we.delay=If,we.difference=_r,we.differenceBy=NI,we.differenceWith=PI,we.drop=DI,we.dropRight=xI,we.dropRightWhile=Nd,we.dropWhile=Qb,we.fill=BI,we.filter=Pa,we.flatMap=Rg,we.flatMapDeep=fO,we.flatMapDepth=QI,we.flatten=gf,we.flattenDeep=qb,we.flattenDepth=Jb,we.flip=ZI,we.flow=O0,we.flowRight=SL,we.fromPairs=FI,we.functions=d0,we.functionsIn=h0,we.groupBy=pO,we.initial=Zb,we.intersection=eO,we.intersectionBy=eT,we.intersectionWith=Ws,we.invert=wO,we.invertBy=Fg,we.invokeMap=Of,we.iteratee=yo,we.keyBy=Sf,we.keys=ms,we.keysIn=Ls,we.map=go,we.mapKeys=f0,we.mapValues=Ua,we.matches=Va,we.matchesProperty=zg,we.memoize=kg,we.merge=Ac,we.mergeWith=Sr,we.method=RT,we.methodOf=Ga,we.mixin=XO,we.negate=Da,we.nthArg=S0,we.omit=p0,we.omitBy=Lf,we.once=vO,we.orderBy=yf,we.over=zO,we.overArgs=bO,we.overEvery=yL,we.overSome=YO,we.partial=vr,we.partialRight=Rf,we.partition=Ud,we.pick=Pt,we.pickBy=bT,we.property=MT,we.propertyOf=y0,we.pull=tO,we.pullAll=Pd,we.pullAllBy=nO,we.pullAllWith=UI,we.pullAt=oT,we.range=KO,we.rangeRight=AT,we.rearg=OO,we.reject=qI,we.remove=Tr,we.rest=SO,we.reverse=Eu,we.sampleSize=xi,we.set=gL,we.setWith=mL,we.shuffle=cT,we.slice=HI,we.sortBy=_O,we.sortedUniq=zI,we.sortedUniqBy=YI,we.split=UO,we.spread=e0,we.tail=lL,we.take=oO,we.takeRight=KI,we.takeRightWhile=Ig,we.takeWhile=xd,we.tap=dO,we.throttle=t0,we.thru=Tf,we.toArray=RO,we.toPairs=OT,we.toPairsIn=Hg,we.toPath=$u,we.toPlainObject=l0,we.transform=bo,we.unary=hT,we.union=sO,we.unionBy=aL,we.unionWith=iO,we.uniq=rO,we.uniqBy=lO,we.uniqWith=sn,we.unset=Xd,we.unzip=vu,we.unzipWith=mf,we.update=ST,we.updateWith=_L,we.values=zd,we.valuesIn=ta,we.without=aO,we.words=b0,we.wrap=Xs,we.xor=cO,we.xorBy=uO,we.xorWith=Bd,we.zip=cL,we.zipObject=uL,we.zipObjectDeep=Er,we.zipWith=jo,we.entries=OT,we.entriesIn=Hg,we.extend=ET,we.extendWith=$l,XO(we,we),we.add=eS,we.attempt=Xg,we.camelCase=kO,we.capitalize=Yd,we.ceil=tS,we.clamp=Vg,we.clone=n0,we.cloneDeep=hL,we.cloneDeepWith=Cc,we.cloneWith=dL,we.conformsTo=yO,we.deburr=NO,we.defaultTo=OL,we.divide=nS,we.endsWith=PO,we.eq=Qi,we.escape=DO,we.escapeRegExp=xO,we.every=rT,we.find=Mo,we.findIndex=pf,we.findKey=Kr,we.findLast=lT,we.findLastIndex=Z_,we.findLastKey=MO,we.floor=oS,we.forEach=aT,we.forEachRight=Cg,we.forIn=Bg,we.forInRight=AO,we.forOwn=c0,we.forOwnRight=u0,we.get=Gd,we.gt=o0,we.gte=Hd,we.has=LO,we.hasIn=Wd,we.head=bi,we.identity=Ji,we.includes=Fd,we.indexOf=wa,we.inRange=wo,we.invoke=Ug,we.isArguments=Vd,we.isArray=jn,we.isArrayBuffer=fT,we.isArrayLike=as,we.isArrayLikeObject=Qo,we.isBoolean=$O,we.isBuffer=xa,we.isDate=s0,we.isElement=Sl,we.isEmpty=Ng,we.isEqual=so,we.isEqualWith=Go,we.isError=pT,we.isFinite=gT,we.isFunction=Ba,we.isInteger=Pg,we.isLength=Yr,we.isMap=br,we.isMatch=Ao,we.isMatchWith=Mc,we.isNaN=mT,we.isNative=_T,we.isNil=fL,we.isNull=Cf,we.isNumber=yl,we.isObject=Ss,we.isObjectLike=As,we.isPlainObject=Wn,we.isRegExp=Zl,we.isSafeInteger=gs,we.isSet=TT,we.isString=Mf,we.isSymbol=Or,we.isTypedArray=Su,we.isUndefined=i0,we.isWeakMap=r0,we.isWeakSet=qi,we.join=tT,we.kebabCase=Gg,we.last=Ol,we.lastIndexOf=Oi,we.lowerCase=TL,we.lowerFirst=m0,we.lt=IO,we.lte=ea,we.max=cn,we.maxBy=$0,we.mean=I0,we.meanBy=jd,we.min=Yg,we.minBy=Df,we.stubArray=LT,we.stubFalse=Kd,we.stubObject=jO,we.stubString=QO,we.stubTrue=qO,we.multiply=R0,we.nth=nT,we.noConflict=Pf,we.noop=CT,we.now=$f,we.pad=EL,we.padEnd=vL,we.padStart=na,we.parseInt=BO,we.random=g0,we.reduce=gO,we.reduceRight=bu,we.repeat=FO,we.replace=wf,we.result=pL,we.round=wT,we.runInContext=lt,we.sample=mO,we.size=Mg,we.snakeCase=_0,we.some=Ag,we.sortedIndex=$g,we.sortedIndexBy=VI,we.sortedIndexOf=GI,we.sortedLastIndex=WI,we.sortedLastIndexBy=Dd,we.sortedLastIndexOf=XI,we.startCase=Wg,we.startsWith=T0,we.subtract=C0,we.sum=M0,we.sumBy=A0,we.template=HO,we.times=JO,we.toFinite=Fa,we.toInteger=Fn,we.toLength=Dg,we.toLower=yr,we.toNumber=es,we.toSafeInteger=nt,we.toString=no,we.toUpper=Ha,we.trim=E0,we.trimEnd=yT,we.trimStart=v0,we.truncate=kf,we.unescape=$T,we.uniqueId=ZO,we.upperCase=Nf,we.upperFirst=IT,we.each=aT,we.eachRight=Cg,we.first=bi,XO(we,function(){var T={};return _l(we,function(O,N){ko.call(we.prototype,N)||(T[N]=O)}),T}(),{chain:!1}),we.VERSION=s,hr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(T){we[T].placeholder=we}),hr(["drop","take"],function(T,O){ao.prototype[T]=function(N){N=N===n?1:Vs(Fn(N),0);var j=this.__filtered__&&!O?new ao(this):this.clone();return j.__filtered__?j.__takeCount__=gi(N,j.__takeCount__):j.__views__.push({size:gi(N,ge),type:T+(j.__dir__<0?"Right":"")}),j},ao.prototype[T+"Right"]=function(N){return this.reverse()[T](N).reverse()}}),hr(["filter","map","takeWhile"],function(T,O){var N=O+1,j=N==_e||N==Y;ao.prototype[T]=function(fe){var Me=this.clone();return Me.__iteratees__.push({iteratee:Nn(fe,3),type:N}),Me.__filtered__=Me.__filtered__||j,Me}}),hr(["head","last"],function(T,O){var N="take"+(O?"Right":"");ao.prototype[T]=function(){return this[N](1).value()[0]}}),hr(["initial","tail"],function(T,O){var N="drop"+(O?"":"Right");ao.prototype[T]=function(){return this.__filtered__?new ao(this):this[N](1)}}),ao.prototype.compact=function(){return this.filter(Ji)},ao.prototype.find=function(T){return this.filter(T).head()},ao.prototype.findLast=function(T){return this.reverse().find(T)},ao.prototype.invokeMap=eo(function(T,O){return typeof T=="function"?new ao(this):this.map(function(N){return fu(N,T,O)})}),ao.prototype.reject=function(T){return this.filter(Da(Nn(T)))},ao.prototype.slice=function(T,O){T=Fn(T);var N=this;return N.__filtered__&&(T>0||O<0)?new ao(N):(T<0?N=N.takeRight(-T):T&&(N=N.drop(T)),O!==n&&(O=Fn(O),N=O<0?N.dropRight(-O):N.take(O-T)),N)},ao.prototype.takeRightWhile=function(T){return this.reverse().takeWhile(T).reverse()},ao.prototype.toArray=function(){return this.take(ge)},_l(ao.prototype,function(T,O){var N=/^(?:filter|find|map|reject)|While$/.test(O),j=/^(?:head|last)$/.test(O),fe=we[j?"take"+(O=="last"?"Right":""):O],Me=j||/^find/.test(O);fe&&(we.prototype[O]=function(){var Qe=this.__wrapped__,et=j?[1]:arguments,it=Qe instanceof ao,wt=et[0],kt=it||jn(Qe),Ht=function(io){var co=fe.apply(we,mc([io],et));return j&&Zt?co[0]:co};kt&&N&&typeof wt=="function"&&wt.length!=1&&(it=kt=!1);var Zt=this.__chain__,fn=!!this.__actions__.length,Pn=Me&&!Zt,Xn=it&&!fn;if(!Me&&kt){Qe=Xn?Qe:new ao(this);var kn=T.apply(Qe,et);return kn.__actions__.push({func:Tf,args:[Ht],thisArg:n}),new Hr(kn,Zt)}return Pn&&Xn?T.apply(this,et):(kn=this.thru(Ht),Pn?j?kn.value()[0]:kn.value():kn)})}),hr(["pop","push","shift","sort","splice","unshift"],function(T){var O=md[T],N=/^(?:push|sort|unshift)$/.test(T)?"tap":"thru",j=/^(?:pop|shift)$/.test(T);we.prototype[T]=function(){var fe=arguments;if(j&&!this.__chain__){var Me=this.value();return O.apply(jn(Me)?Me:[],fe)}return this[N](function(Qe){return O.apply(jn(Qe)?Qe:[],fe)})}}),_l(ao.prototype,function(T,O){var N=we[O];if(N){var j=N.name+"";ko.call(Tc,j)||(Tc[j]=[]),Tc[j].push({name:O,func:N})}}),Tc[gg(n,S).name]=[{name:"wrapper",func:n}],ao.prototype.clone=aI,ao.prototype.reverse=fb,ao.prototype.value=cI,we.prototype.at=Ef,we.prototype.chain=sT,we.prototype.commit=hO,we.prototype.next=vf,we.prototype.plant=ka,we.prototype.reverse=Na,we.prototype.toJSON=we.prototype.valueOf=we.prototype.value=iT,we.prototype.first=we.prototype.head,Jh&&(we.prototype[Jh]=bf),we},pd=f_();iu?((iu.exports=pd)._=pd,Fh._=pd):Us._=pd}).call(NHe)}(NS,NS.exports)),NS.exports}PHe();const DHe={class:"main"},xHe={id:"blockly"},BHe={__name:"App",setup(e){return Pr.useyXmlStore(),Pr.useLoadBlocklyStatus(),K(""),Zs(()=>{}),(t,n)=>(H(),le("div",DHe,[oe(bHe),te("div",xHe,[oe(uUe)]),oe(kHe)]))}},aQ=Gl(BHe,[["__scopeId","data-v-660adf66"]]);/*!
  1947. * vue-router v4.5.0
  1948. * (c) 2024 Eduardo San Martin Morote
  1949. * @license MIT
  1950. */const eE=typeof document<"u";function cQ(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function FHe(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&cQ(e.default)}const Wo=Object.assign;function ek(e,t){const n={};for(const s in t){const i=t[s];n[s]=jc(i)?i.map(e):e(i)}return n}const ty=()=>{},jc=Array.isArray,uQ=/#/g,UHe=/&/g,HHe=/\//g,VHe=/=/g,GHe=/\?/g,dQ=/\+/g,WHe=/%5B/g,XHe=/%5D/g,hQ=/%5E/g,zHe=/%60/g,fQ=/%7B/g,YHe=/%7C/g,pQ=/%7D/g,KHe=/%20/g;function eB(e){return encodeURI(""+e).replace(YHe,"|").replace(WHe,"[").replace(XHe,"]")}function jHe(e){return eB(e).replace(fQ,"{").replace(pQ,"}").replace(hQ,"^")}function z1(e){return eB(e).replace(dQ,"%2B").replace(KHe,"+").replace(uQ,"%23").replace(UHe,"%26").replace(zHe,"`").replace(fQ,"{").replace(pQ,"}").replace(hQ,"^")}function QHe(e){return z1(e).replace(VHe,"%3D")}function qHe(e){return eB(e).replace(uQ,"%23").replace(GHe,"%3F")}function JHe(e){return e==null?"":qHe(e).replace(HHe,"%2F")}function e$(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const ZHe=/\/$/,eVe=e=>e.replace(ZHe,"");function tk(e,t,n="/"){let s,i={},r="",a="";const c=t.indexOf("#");let u=t.indexOf("?");return c<u&&c>=0&&(u=-1),u>-1&&(s=t.slice(0,u),r=t.slice(u+1,c>-1?c:t.length),i=e(r)),c>-1&&(s=s||t.slice(0,c),a=t.slice(c,t.length)),s=sVe(s??t,n),{fullPath:s+(r&&"?")+r+a,path:s,query:i,hash:e$(a)}}function tVe(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function pW(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function nVe(e,t,n){const s=t.matched.length-1,i=n.matched.length-1;return s>-1&&s===i&&tv(t.matched[s],n.matched[i])&&gQ(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function tv(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function gQ(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!oVe(e[n],t[n]))return!1;return!0}function oVe(e,t){return jc(e)?gW(e,t):jc(t)?gW(t,e):e===t}function gW(e,t){return jc(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function sVe(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),i=s[s.length-1];(i===".."||i===".")&&s.push("");let r=n.length-1,a,c;for(a=0;a<s.length;a++)if(c=s[a],c!==".")if(c==="..")r>1&&r--;else break;return n.slice(0,r).join("/")+"/"+s.slice(a).join("/")}const Uf={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var t$;(function(e){e.pop="pop",e.push="push"})(t$||(t$={}));var ny;(function(e){e.back="back",e.forward="forward",e.unknown=""})(ny||(ny={}));function iVe(e){if(!e)if(eE){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),eVe(e)}const rVe=/^[^#]+#/;function lVe(e,t){return e.replace(rVe,"#")+t}function aVe(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const sL=()=>({left:window.scrollX,top:window.scrollY});function cVe(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=aVe(i,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function mW(e,t){return(history.state?history.state.position-t:-1)+e}const Y1=new Map;function uVe(e,t){Y1.set(e,t)}function dVe(e){const t=Y1.get(e);return Y1.delete(e),t}let hVe=()=>location.protocol+"//"+location.host;function mQ(e,t){const{pathname:n,search:s,hash:i}=t,r=e.indexOf("#");if(r>-1){let c=i.includes(e.slice(r))?e.slice(r).length:1,u=i.slice(c);return u[0]!=="/"&&(u="/"+u),pW(u,"")}return pW(n,e)+s+i}function fVe(e,t,n,s){let i=[],r=[],a=null;const c=({state:_})=>{const E=mQ(e,location),v=n.value,b=t.value;let y=0;if(_){if(n.value=E,t.value=_,a&&a===v){a=null;return}y=b?_.position-b.position:0}else s(E);i.forEach(S=>{S(n.value,v,{delta:y,type:t$.pop,direction:y?y>0?ny.forward:ny.back:ny.unknown})})};function u(){a=n.value}function h(_){i.push(_);const E=()=>{const v=i.indexOf(_);v>-1&&i.splice(v,1)};return r.push(E),E}function f(){const{history:_}=window;_.state&&_.replaceState(Wo({},_.state,{scroll:sL()}),"")}function p(){for(const _ of r)_();r=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",f)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",f,{passive:!0}),{pauseListeners:u,listen:h,destroy:p}}function _W(e,t,n,s=!1,i=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:i?sL():null}}function pVe(e){const{history:t,location:n}=window,s={value:mQ(e,n)},i={value:t.state};i.value||r(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(u,h,f){const p=e.indexOf("#"),_=p>-1?(n.host&&document.querySelector("base")?e:e.slice(p))+u:hVe()+e+u;try{t[f?"replaceState":"pushState"](h,"",_),i.value=h}catch(E){console.error(E),n[f?"replace":"assign"](_)}}function a(u,h){const f=Wo({},t.state,_W(i.value.back,u,i.value.forward,!0),h,{position:i.value.position});r(u,f,!0),s.value=u}function c(u,h){const f=Wo({},i.value,t.state,{forward:u,scroll:sL()});r(f.current,f,!0);const p=Wo({},_W(s.value,u,null),{position:f.position+1},h);r(u,p,!1),s.value=u}return{location:s,state:i,push:c,replace:a}}function gVe(e){e=iVe(e);const t=pVe(e),n=fVe(e,t.state,t.location,t.replace);function s(r,a=!0){a||n.pauseListeners(),history.go(r)}const i=Wo({location:"",base:e,go:s,createHref:lVe.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function mVe(e){return typeof e=="string"||e&&typeof e=="object"}function _Q(e){return typeof e=="string"||typeof e=="symbol"}const TQ=Symbol("");var TW;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(TW||(TW={}));function nv(e,t){return Wo(new Error,{type:e,[TQ]:!0},t)}function eh(e,t){return e instanceof Error&&TQ in e&&(t==null||!!(e.type&t))}const EW="[^/]+?",_Ve={sensitive:!1,strict:!1,start:!0,end:!0},TVe=/[.+*?^${}()[\]/\\]/g;function EVe(e,t){const n=Wo({},_Ve,t),s=[];let i=n.start?"^":"";const r=[];for(const h of e){const f=h.length?[]:[90];n.strict&&!h.length&&(i+="/");for(let p=0;p<h.length;p++){const _=h[p];let E=40+(n.sensitive?.25:0);if(_.type===0)p||(i+="/"),i+=_.value.replace(TVe,"\\$&"),E+=40;else if(_.type===1){const{value:v,repeatable:b,optional:y,regexp:S}=_;r.push({name:v,repeatable:b,optional:y});const L=S||EW;if(L!==EW){E+=10;try{new RegExp(`(${L})`)}catch(R){throw new Error(`Invalid custom RegExp for param "${v}" (${L}): `+R.message)}}let I=b?`((?:${L})(?:/(?:${L}))*)`:`(${L})`;p||(I=y&&h.length<2?`(?:/${I})`:"/"+I),y&&(I+="?"),i+=I,E+=20,y&&(E+=-8),b&&(E+=-20),L===".*"&&(E+=-50)}f.push(E)}s.push(f)}if(n.strict&&n.end){const h=s.length-1;s[h][s[h].length-1]+=.7000000000000001}n.strict||(i+="/?"),n.end?i+="$":n.strict&&!i.endsWith("/")&&(i+="(?:/|$)");const a=new RegExp(i,n.sensitive?"":"i");function c(h){const f=h.match(a),p={};if(!f)return null;for(let _=1;_<f.length;_++){const E=f[_]||"",v=r[_-1];p[v.name]=E&&v.repeatable?E.split("/"):E}return p}function u(h){let f="",p=!1;for(const _ of e){(!p||!f.endsWith("/"))&&(f+="/"),p=!1;for(const E of _)if(E.type===0)f+=E.value;else if(E.type===1){const{value:v,repeatable:b,optional:y}=E,S=v in h?h[v]:"";if(jc(S)&&!b)throw new Error(`Provided param "${v}" is an array but it is not repeatable (* or + modifiers)`);const L=jc(S)?S.join("/"):S;if(!L)if(y)_.length<2&&(f.endsWith("/")?f=f.slice(0,-1):p=!0);else throw new Error(`Missing required param "${v}"`);f+=L}}return f||"/"}return{re:a,score:s,keys:r,parse:c,stringify:u}}function vVe(e,t){let n=0;for(;n<e.length&&n<t.length;){const s=t[n]-e[n];if(s)return s;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function EQ(e,t){let n=0;const s=e.score,i=t.score;for(;n<s.length&&n<i.length;){const r=vVe(s[n],i[n]);if(r)return r;n++}if(Math.abs(i.length-s.length)===1){if(vW(s))return 1;if(vW(i))return-1}return i.length-s.length}function vW(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const bVe={type:0,value:""},OVe=/[a-zA-Z0-9_]/;function SVe(e){if(!e)return[[]];if(e==="/")return[[bVe]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(E){throw new Error(`ERR (${n})/"${h}": ${E}`)}let n=0,s=n;const i=[];let r;function a(){r&&i.push(r),r=[]}let c=0,u,h="",f="";function p(){h&&(n===0?r.push({type:0,value:h}):n===1||n===2||n===3?(r.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${h}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:h,regexp:f,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),h="")}function _(){h+=u}for(;c<e.length;){if(u=e[c++],u==="\\"&&n!==2){s=n,n=4;continue}switch(n){case 0:u==="/"?(h&&p(),a()):u===":"?(p(),n=1):_();break;case 4:_(),n=s;break;case 1:u==="("?n=2:OVe.test(u)?_():(p(),n=0,u!=="*"&&u!=="?"&&u!=="+"&&c--);break;case 2:u===")"?f[f.length-1]=="\\"?f=f.slice(0,-1)+u:n=3:f+=u;break;case 3:p(),n=0,u!=="*"&&u!=="?"&&u!=="+"&&c--,f="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${h}"`),p(),a(),i}function yVe(e,t,n){const s=EVe(SVe(e.path),n),i=Wo(s,{record:e,parent:t,children:[],alias:[]});return t&&!i.record.aliasOf==!t.record.aliasOf&&t.children.push(i),i}function $Ve(e,t){const n=[],s=new Map;t=yW({strict:!1,end:!0,sensitive:!1},t);function i(p){return s.get(p)}function r(p,_,E){const v=!E,b=OW(p);b.aliasOf=E&&E.record;const y=yW(t,p),S=[b];if("alias"in p){const R=typeof p.alias=="string"?[p.alias]:p.alias;for(const w of R)S.push(OW(Wo({},b,{components:E?E.record.components:b.components,path:w,aliasOf:E?E.record:b})))}let L,I;for(const R of S){const{path:w}=R;if(_&&w[0]!=="/"){const k=_.record.path,D=k[k.length-1]==="/"?"":"/";R.path=_.record.path+(w&&D+w)}if(L=yVe(R,_,y),E?E.alias.push(L):(I=I||L,I!==L&&I.alias.push(L),v&&p.name&&!SW(L)&&a(p.name)),vQ(L)&&u(L),b.children){const k=b.children;for(let D=0;D<k.length;D++)r(k[D],L,E&&E.children[D])}E=E||L}return I?()=>{a(I)}:ty}function a(p){if(_Q(p)){const _=s.get(p);_&&(s.delete(p),n.splice(n.indexOf(_),1),_.children.forEach(a),_.alias.forEach(a))}else{const _=n.indexOf(p);_>-1&&(n.splice(_,1),p.record.name&&s.delete(p.record.name),p.children.forEach(a),p.alias.forEach(a))}}function c(){return n}function u(p){const _=CVe(p,n);n.splice(_,0,p),p.record.name&&!SW(p)&&s.set(p.record.name,p)}function h(p,_){let E,v={},b,y;if("name"in p&&p.name){if(E=s.get(p.name),!E)throw nv(1,{location:p});y=E.record.name,v=Wo(bW(_.params,E.keys.filter(I=>!I.optional).concat(E.parent?E.parent.keys.filter(I=>I.optional):[]).map(I=>I.name)),p.params&&bW(p.params,E.keys.map(I=>I.name))),b=E.stringify(v)}else if(p.path!=null)b=p.path,E=n.find(I=>I.re.test(b)),E&&(v=E.parse(b),y=E.record.name);else{if(E=_.name?s.get(_.name):n.find(I=>I.re.test(_.path)),!E)throw nv(1,{location:p,currentLocation:_});y=E.record.name,v=Wo({},_.params,p.params),b=E.stringify(v)}const S=[];let L=E;for(;L;)S.unshift(L.record),L=L.parent;return{name:y,path:b,params:v,matched:S,meta:RVe(S)}}e.forEach(p=>r(p));function f(){n.length=0,s.clear()}return{addRoute:r,resolve:h,removeRoute:a,clearRoutes:f,getRoutes:c,getRecordMatcher:i}}function bW(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function OW(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:IVe(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function IVe(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function SW(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function RVe(e){return e.reduce((t,n)=>Wo(t,n.meta),{})}function yW(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}function CVe(e,t){let n=0,s=t.length;for(;n!==s;){const r=n+s>>1;EQ(e,t[r])<0?s=r:n=r+1}const i=MVe(e);return i&&(s=t.lastIndexOf(i,s-1)),s}function MVe(e){let t=e;for(;t=t.parent;)if(vQ(t)&&EQ(e,t)===0)return t}function vQ({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function AVe(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;i<s.length;++i){const r=s[i].replace(dQ," "),a=r.indexOf("="),c=e$(a<0?r:r.slice(0,a)),u=a<0?null:e$(r.slice(a+1));if(c in t){let h=t[c];jc(h)||(h=t[c]=[h]),h.push(u)}else t[c]=u}return t}function $W(e){let t="";for(let n in e){const s=e[n];if(n=QHe(n),s==null){s!==void 0&&(t+=(t.length?"&":"")+n);continue}(jc(s)?s.map(r=>r&&z1(r)):[s&&z1(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function LVe(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=jc(s)?s.map(i=>i==null?null:""+i):s==null?s:""+s)}return t}const wVe=Symbol(""),IW=Symbol(""),tB=Symbol(""),bQ=Symbol(""),K1=Symbol("");function SS(){let e=[];function t(s){return e.push(s),()=>{const i=e.indexOf(s);i>-1&&e.splice(i,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function qf(e,t,n,s,i,r=a=>a()){const a=s&&(s.enterCallbacks[i]=s.enterCallbacks[i]||[]);return()=>new Promise((c,u)=>{const h=_=>{_===!1?u(nv(4,{from:n,to:t})):_ instanceof Error?u(_):mVe(_)?u(nv(2,{from:t,to:_})):(a&&s.enterCallbacks[i]===a&&typeof _=="function"&&a.push(_),c())},f=r(()=>e.call(s&&s.instances[i],t,n,h));let p=Promise.resolve(f);e.length<3&&(p=p.then(h)),p.catch(_=>u(_))})}function nk(e,t,n,s,i=r=>r()){const r=[];for(const a of e)for(const c in a.components){let u=a.components[c];if(!(t!=="beforeRouteEnter"&&!a.instances[c]))if(cQ(u)){const f=(u.__vccOpts||u)[t];f&&r.push(qf(f,n,s,a,c,i))}else{let h=u();r.push(()=>h.then(f=>{if(!f)throw new Error(`Couldn't resolve component "${c}" at "${a.path}"`);const p=FHe(f)?f.default:f;a.mods[c]=f,a.components[c]=p;const E=(p.__vccOpts||p)[t];return E&&qf(E,n,s,a,c,i)()}))}}return r}function RW(e){const t=It(tB),n=It(bQ),s=x(()=>{const u=g(e.to);return t.resolve(u)}),i=x(()=>{const{matched:u}=s.value,{length:h}=u,f=u[h-1],p=n.matched;if(!f||!p.length)return-1;const _=p.findIndex(tv.bind(null,f));if(_>-1)return _;const E=CW(u[h-2]);return h>1&&CW(f)===E&&p[p.length-1].path!==E?p.findIndex(tv.bind(null,u[h-2])):_}),r=x(()=>i.value>-1&&xVe(n.params,s.value.params)),a=x(()=>i.value>-1&&i.value===n.matched.length-1&&gQ(n.params,s.value.params));function c(u={}){if(DVe(u)){const h=t[g(e.replace)?"replace":"push"](g(e.to)).catch(ty);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>h),h}return Promise.resolve()}return{route:s,href:x(()=>s.value.href),isActive:r,isExactActive:a,navigate:c}}function kVe(e){return e.length===1?e[0]:e}const NVe=Re({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:RW,setup(e,{slots:t}){const n=Kn(RW(e)),{options:s}=It(tB),i=x(()=>({[MW(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[MW(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=t.default&&kVe(t.default(n));return e.custom?r:Gt("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}}),PVe=NVe;function DVe(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function xVe(e,t){for(const n in t){const s=t[n],i=e[n];if(typeof s=="string"){if(s!==i)return!1}else if(!jc(i)||i.length!==s.length||s.some((r,a)=>r!==i[a]))return!1}return!0}function CW(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const MW=(e,t,n)=>e??t??n,BVe=Re({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=It(K1),i=x(()=>e.route||s.value),r=It(IW,0),a=x(()=>{let h=g(r);const{matched:f}=i.value;let p;for(;(p=f[h])&&!p.components;)h++;return h}),c=x(()=>i.value.matched[a.value]);An(IW,x(()=>a.value+1)),An(wVe,c),An(K1,i);const u=K();return tt(()=>[u.value,c.value,e.name],([h,f,p],[_,E,v])=>{f&&(f.instances[p]=h,E&&E!==f&&h&&h===_&&(f.leaveGuards.size||(f.leaveGuards=E.leaveGuards),f.updateGuards.size||(f.updateGuards=E.updateGuards))),h&&f&&(!E||!tv(f,E)||!_)&&(f.enterCallbacks[p]||[]).forEach(b=>b(h))},{flush:"post"}),()=>{const h=i.value,f=e.name,p=c.value,_=p&&p.components[f];if(!_)return AW(n.default,{Component:_,route:h});const E=p.props[f],v=E?E===!0?h.params:typeof E=="function"?E(h):E:null,y=Gt(_,Wo({},v,t,{onVnodeUnmounted:S=>{S.component.isUnmounted&&(p.instances[f]=null)},ref:u}));return AW(n.default,{Component:y,route:h})||y}}});function AW(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const FVe=BVe;function UVe(e){const t=$Ve(e.routes,e),n=e.parseQuery||AVe,s=e.stringifyQuery||$W,i=e.history,r=SS(),a=SS(),c=SS(),u=lo(Uf);let h=Uf;eE&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=ek.bind(null,ve=>""+ve),p=ek.bind(null,JHe),_=ek.bind(null,e$);function E(ve,Pe){let Be,ot;return _Q(ve)?(Be=t.getRecordMatcher(ve),ot=Pe):ot=ve,t.addRoute(ot,Be)}function v(ve){const Pe=t.getRecordMatcher(ve);Pe&&t.removeRoute(Pe)}function b(){return t.getRoutes().map(ve=>ve.record)}function y(ve){return!!t.getRecordMatcher(ve)}function S(ve,Pe){if(Pe=Wo({},Pe||u.value),typeof ve=="string"){const Oe=tk(n,ve,Pe.path),ze=t.resolve({path:Oe.path},Pe),Ze=i.createHref(Oe.fullPath);return Wo(Oe,ze,{params:_(ze.params),hash:e$(Oe.hash),redirectedFrom:void 0,href:Ze})}let Be;if(ve.path!=null)Be=Wo({},ve,{path:tk(n,ve.path,Pe.path).path});else{const Oe=Wo({},ve.params);for(const ze in Oe)Oe[ze]==null&&delete Oe[ze];Be=Wo({},ve,{params:p(Oe)}),Pe.params=p(Pe.params)}const ot=t.resolve(Be,Pe),Xe=ve.hash||"";ot.params=f(_(ot.params));const ee=tVe(s,Wo({},ve,{hash:jHe(Xe),path:ot.path})),pe=i.createHref(ee);return Wo({fullPath:ee,hash:Xe,query:s===$W?LVe(ve.query):ve.query||{}},ot,{redirectedFrom:void 0,href:pe})}function L(ve){return typeof ve=="string"?tk(n,ve,u.value.path):Wo({},ve)}function I(ve,Pe){if(h!==ve)return nv(8,{from:Pe,to:ve})}function R(ve){return D(ve)}function w(ve){return R(Wo(L(ve),{replace:!0}))}function k(ve){const Pe=ve.matched[ve.matched.length-1];if(Pe&&Pe.redirect){const{redirect:Be}=Pe;let ot=typeof Be=="function"?Be(ve):Be;return typeof ot=="string"&&(ot=ot.includes("?")||ot.includes("#")?ot=L(ot):{path:ot},ot.params={}),Wo({query:ve.query,hash:ve.hash,params:ot.path!=null?{}:ve.params},ot)}}function D(ve,Pe){const Be=h=S(ve),ot=u.value,Xe=ve.state,ee=ve.force,pe=ve.replace===!0,Oe=k(Be);if(Oe)return D(Wo(L(Oe),{state:typeof Oe=="object"?Wo({},Xe,Oe.state):Xe,force:ee,replace:pe}),Pe||Be);const ze=Be;ze.redirectedFrom=Pe;let Ze;return!ee&&nVe(s,ot,Be)&&(Ze=nv(16,{to:ze,from:ot}),ge(ot,ot,!0,!1)),(Ze?Promise.resolve(Ze):F(ze,ot)).catch(De=>eh(De)?eh(De,2)?De:he(De):Z(De,ze,ot)).then(De=>{if(De){if(eh(De,2))return D(Wo({replace:pe},L(De.to),{state:typeof De.to=="object"?Wo({},Xe,De.to.state):Xe,force:ee}),Pe||ze)}else De=G(ze,ot,!0,pe,Xe);return X(ze,ot,De),De})}function P(ve,Pe){const Be=I(ve,Pe);return Be?Promise.reject(Be):Promise.resolve()}function B(ve){const Pe=Ae.values().next().value;return Pe&&typeof Pe.runWithContext=="function"?Pe.runWithContext(ve):ve()}function F(ve,Pe){let Be;const[ot,Xe,ee]=HVe(ve,Pe);Be=nk(ot.reverse(),"beforeRouteLeave",ve,Pe);for(const Oe of ot)Oe.leaveGuards.forEach(ze=>{Be.push(qf(ze,ve,Pe))});const pe=P.bind(null,ve,Pe);return Be.push(pe),$e(Be).then(()=>{Be=[];for(const Oe of r.list())Be.push(qf(Oe,ve,Pe));return Be.push(pe),$e(Be)}).then(()=>{Be=nk(Xe,"beforeRouteUpdate",ve,Pe);for(const Oe of Xe)Oe.updateGuards.forEach(ze=>{Be.push(qf(ze,ve,Pe))});return Be.push(pe),$e(Be)}).then(()=>{Be=[];for(const Oe of ee)if(Oe.beforeEnter)if(jc(Oe.beforeEnter))for(const ze of Oe.beforeEnter)Be.push(qf(ze,ve,Pe));else Be.push(qf(Oe.beforeEnter,ve,Pe));return Be.push(pe),$e(Be)}).then(()=>(ve.matched.forEach(Oe=>Oe.enterCallbacks={}),Be=nk(ee,"beforeRouteEnter",ve,Pe,B),Be.push(pe),$e(Be))).then(()=>{Be=[];for(const Oe of a.list())Be.push(qf(Oe,ve,Pe));return Be.push(pe),$e(Be)}).catch(Oe=>eh(Oe,8)?Oe:Promise.reject(Oe))}function X(ve,Pe,Be){c.list().forEach(ot=>B(()=>ot(ve,Pe,Be)))}function G(ve,Pe,Be,ot,Xe){const ee=I(ve,Pe);if(ee)return ee;const pe=Pe===Uf,Oe=eE?history.state:{};Be&&(ot||pe?i.replace(ve.fullPath,Wo({scroll:pe&&Oe&&Oe.scroll},Xe)):i.push(ve.fullPath,Xe)),u.value=ve,ge(ve,Pe,Be,pe),he()}let re;function _e(){re||(re=i.listen((ve,Pe,Be)=>{if(!We.listening)return;const ot=S(ve),Xe=k(ot);if(Xe){D(Wo(Xe,{replace:!0,force:!0}),ot).catch(ty);return}h=ot;const ee=u.value;eE&&uVe(mW(ee.fullPath,Be.delta),sL()),F(ot,ee).catch(pe=>eh(pe,12)?pe:eh(pe,2)?(D(Wo(L(pe.to),{force:!0}),ot).then(Oe=>{eh(Oe,20)&&!Be.delta&&Be.type===t$.pop&&i.go(-1,!1)}).catch(ty),Promise.reject()):(Be.delta&&i.go(-Be.delta,!1),Z(pe,ot,ee))).then(pe=>{pe=pe||G(ot,ee,!1),pe&&(Be.delta&&!eh(pe,8)?i.go(-Be.delta,!1):Be.type===t$.pop&&eh(pe,20)&&i.go(-1,!1)),X(ot,ee,pe)}).catch(ty)}))}let J=SS(),Y=SS(),ae;function Z(ve,Pe,Be){he(ve);const ot=Y.list();return ot.length?ot.forEach(Xe=>Xe(ve,Pe,Be)):console.error(ve),Promise.reject(ve)}function Q(){return ae&&u.value!==Uf?Promise.resolve():new Promise((ve,Pe)=>{J.add([ve,Pe])})}function he(ve){return ae||(ae=!ve,_e(),J.list().forEach(([Pe,Be])=>ve?Be(ve):Pe()),J.reset()),ve}function ge(ve,Pe,Be,ot){const{scrollBehavior:Xe}=e;if(!eE||!Xe)return Promise.resolve();const ee=!Be&&dVe(mW(ve.fullPath,0))||(ot||!Be)&&history.state&&history.state.scroll||null;return Vt().then(()=>Xe(ve,Pe,ee)).then(pe=>pe&&cVe(pe)).catch(pe=>Z(pe,ve,Pe))}const Ie=ve=>i.go(ve);let be;const Ae=new Set,We={currentRoute:u,listening:!0,addRoute:E,removeRoute:v,clearRoutes:t.clearRoutes,hasRoute:y,getRoutes:b,resolve:S,options:e,push:R,replace:w,go:Ie,back:()=>Ie(-1),forward:()=>Ie(1),beforeEach:r.add,beforeResolve:a.add,afterEach:c.add,onError:Y.add,isReady:Q,install(ve){const Pe=this;ve.component("RouterLink",PVe),ve.component("RouterView",FVe),ve.config.globalProperties.$router=Pe,Object.defineProperty(ve.config.globalProperties,"$route",{enumerable:!0,get:()=>g(u)}),eE&&!be&&u.value===Uf&&(be=!0,R(i.location).catch(Xe=>{}));const Be={};for(const Xe in Uf)Object.defineProperty(Be,Xe,{get:()=>u.value[Xe],enumerable:!0});ve.provide(tB,Pe),ve.provide(bQ,iP(Be)),ve.provide(K1,u);const ot=ve.unmount;Ae.add(ve),ve.unmount=function(){Ae.delete(ve),Ae.size<1&&(h=Uf,re&&re(),re=null,u.value=Uf,be=!1,ae=!1),ot()}}};function $e(ve){return ve.reduce((Pe,Be)=>Pe.then(()=>B(Be)),Promise.resolve())}return We}function HVe(e,t){const n=[],s=[],i=[],r=Math.max(t.matched.length,e.matched.length);for(let a=0;a<r;a++){const c=t.matched[a];c&&(e.matched.find(h=>tv(h,c))?s.push(c):n.push(c));const u=e.matched[a];u&&(t.matched.find(h=>tv(h,u))||i.push(u))}return[n,s,i]}const VVe=UVe({history:gVe("/"),routes:[{path:"/",name:"home",component:aQ}]}),GVe=Mre(),WVe={message:{close:"关闭",save:"保存",example:"样例",open_example_error:"样例加载失败",open_example_success:"样例加载成功",example_1:"示例1",example_1_1:"示例1_1",example_1_1_1:"示例1_1_1",example_1_1_2:"示例1_1_2",example_1_2:"示例1_2",example_1_2_1:"示例1_2_1",example_1_2_2:"示例1_2_2",example_2:"示例2",example_2_1:"示例2_1",example_2_1_1:"示例2_1_1",example_2_1_2:"示例2_1_2",labs:"实验室",student:"学习",cloud_save:"云端存储",Export:"导出",import:"导入",copy:"复制",share:"分享",delete_all_blockly:"删除所有积木",screenshot:"一键截图",untitled:"未命名",export_content_empty:"导出内容为空",link_copy:"链接已复制到剪贴板",link_copy_error:"链接已复制到剪贴板",please_login:"请先登录",login:"登录",logout:"退出",go_cloud_serve:"前往云端服务",your_email:"您的邮箱:",your_school:"您的学校:",cloud_project:"云端项目:",click_to_refresh:"点击刷新云端事件",copy_apiKey:"复制API Key",login_success:"登录成功",logout_success:"登出成功",all_categorization:"所有分类:",AI:"人工智能",IoT:"物联网",robot_control:"机器人控制",scientific_experiment:"科学实验",Interactive_games:"互动游戏",system_configure:"最低配置要求",system:"系统:",memory:"内存:",HardDisk:"硬盘:",GraphicsCard:"显卡:",camera:"摄像头:",microphone:"麦克风:",need:"需要",not_need:"不需要",enter:"进入",Deep_learning_Machines:"深度学习机器",Deep_learning_Machines_content:"机器人发展的趋势是人工智能化,深度学习是智能机器人的前沿技术,也是机器学习领域的新课题。深度学习技术被广泛运用于农业、工业、军事、航空等领域,与机器让人的有机结合能设计出具有高工作效率、高实时性、高精确度的智能机器人。",emotion_recognition:"情绪识别",emotion_recognition_content:"情绪识别发展的趋势是人工智能化,情绪识别是智能识别的前沿技术,也是识别领域的新课题。情绪识别技术被广泛运用于农业、工业、军事、航空等领域。",gesture_recognition:"手势识别",gesture_recognition_content:"手势识别发展的趋势是人工智能化,手势识别是智能识别的前沿技术,也是识别领域的新课题。手势识别技术被广泛运用于农业、工业、军事、航空等领域。",object_recognition:"物体识别",object_recognition_content:"物体识别发展的趋势是人工智能化,物体识别是智能识别的前沿技术,也是识别领域的新课题。物体识别技术被广泛运用于农业、工业、军事、航空等领域。",pose_recognition:"姿势识别",pose_recognition_content:"姿态识别发展是人工智能发展的大趋势,姿态识别运用了许多智能识别的前沿技术,是识别领域的新课题。姿态识别技术被广泛运用于多中领域",face_recognition:"慧眼识人",face_recognition_content:"机器人发展的趋势是人工智能化,深度学习是智能机器人的前沿技术,也是机器学习领域的新课题。深度学习技术被广泛运用于农业、工业、军事、航空等领域,与机器让人的有机结合能设计出具有高工作效率、高实时性、高精确度的智能机器人。",speech_recognition:"语音识别",speech_recognition_content:"语音识别发展的趋势是人工智能化,语音识别是智能识别的前沿技术,也是识别领域的新课题。语音识别技术被广泛运用于农业、工业、军事、航空等领域。",study:"学习",go_edu_teaching_platform:"前往教学平台",go_train_platform:"学习人工智能:训练平台",go_biaoji_platform:"学习人工智能:标记平台",go_aihub:"学习人工智能:原理",go_aihub_vision:"学习人工智能:视觉处理",go_aihub_text:"学习人工智能:文本分析",go_aihub_speech:"学习人工智能:语音识别",go_aihub_art:"学习人工智能:艺术",file:"文件",last_version:"上次修改:",delete_success:"删除成功",delete_error:"删除失败",save_success:"保存成功",save_error:"保存失败",open_error:"打开失败",languare:"语言",visual_identification:"视觉识别",text_processing:"文本处理",stay_tuned:"敬请期待",cocorobo:"可可乐博(深圳)科技有限公司",cocorobo_copy:"版权所有",update_log:"更新日志",help_file:"帮助文档",device:"设备",wired_connection:"有线连接",wireless_connection:"无线连接",not_uploader_connection:"无法连接插件,点击图标了解如何解决",uploader_connection:"上传软件已连接",software_not_connection:"软件未连接",no_port_detected:"没有检测到端口",uploading:"正在上传",uploading_error:"上传失败",reset_device_success:"重置设备成功",reset_device_error:"重置设备失败",module_not_connection:"模块未连接",module_connection:"模块已连接",code_upload_to_module:"直接将代码上传到电子模块中",running_code:"运行中",running_code_error:"代码为空,运行失败",running_code_success:"运行成功",running:"运行",upload:"上传",initialization:"初始化主屏界面",reset_device:"重置设备",clear_print_data:"清除打印数据",edit_mode:"是否启用编辑模式",copy_code:"复制代码",copy_code_success:"复制成功",copy_code_error:"复制失败",download_code:"下载代码",download_code_success:"下载成功",download_code_error:"下载失败",upload_code:"上传代码",upload_code_success:"上传成功",upload_code_error:"上传失败",serial_port:"串口交互窗",python_code:"python 源代码",update_success:"更新成功",update_error:"更新失败",add_success:"添加成功",add_error:"添加失败",add:"添加",update:"更新",ok:"确定"}},XVe={message:{close:"關閉",save:"存儲",example:"範例",open_example_error:"範例加載失敗",open_example_success:"範例加載成功",example_1:"範例1",example_1_1:"範例1_1",example_1_1_1:"範例1_1_1",example_1_1_2:"範例1_1_2",example_1_2:"範例1_2",example_1_2_1:"範例1_2_1",example_1_2_2:"範例1_2_2",example_2:"範例2",example_2_1:"範例2_1",example_2_1_1:"範例2_1_1",example_2_1_2:"範例2_1_2",labs:"實驗室",student:"學習",cloud_save:"雲端存儲",Export:"匯出",import:"匯入",copy:"複製",share:"分享",delete_all_blockly:"刪除所有積木",screenshot:"一鍵截圖",untitled:"未命名",export_content_empty:"匯出內容爲空",link_copy:"鏈接已複製到剪貼板",link_copy_error:"鏈接已複製到剪貼板",please_login:"請先登錄",login:"登錄",logout:"登出",go_cloud_serve:"前往雲端服務",your_email:"您的郵箱:",your_school:"您的學校:",cloud_project:"雲端項目:",click_to_refresh:"點擊刷新雲端事件",copy_apiKey:"複製API Key",login_success:"登錄成功",logout_success:"登出成功",all_categorization:"所有分類:",AI:"人工智能",IoT:"物聯網",robot_control:"機器人控制",scientific_experiment:"科學實驗",Interactive_games:"互動遊戲",system_configure:"最低配置要求",system:"系統:",memory:"內存:",HardDisk:"硬盤:",GraphicsCard:"顯卡:",camera:"攝像頭:",microphone:"麥克風:",need:"需要",not_need:"不需要",enter:"進入",Deep_learning_Machines:"深度學習機器",Deep_learning_Machines_content:"機器人發展的趨勢是人工智能化,深度學習是智能機器人的前沿技術,也是機器學習領域的新課題。深度學習技術被廣泛運用於農業、工業、軍事、航空等領域,與機器讓人的有機結合能設計出具有高工作效率、高實時性、高精確度的智能機器人。",emotion_recognition:"情緒識別",emotion_recognition_content:"情緒識別發展的趨勢是人工智能化,情緒識別是智能識別的前沿技術,也是識別領域的新課題。情緒識別技術被廣泛運用於農業、工業、軍事、航空等領域。",gesture_recognition:"手勢識別",gesture_recognition_content:"手勢識別發展的趨勢是人工智能化,手勢識別是智能識別的前沿技術,也是識別領域的新課題。手勢識別技術被廣泛運用於農業、工業、軍事、航空等領域。",object_recognition:"物體識別",object_recognition_content:"物體識別發展的趨勢是人工智能化,物體識別是智能識別的前沿技術,也是識別領域的新課題。物體識別技術被廣泛運用於農業、工業、軍事、航空等領域。",pose_recognition:"姿勢識別",pose_recognition_content:"姿態識別發展是人工智能發展的大趨勢,姿態識別運用了許多智能識別的前沿技術,是識別領域的新課題。姿態識別技術被廣泛運用於多中領域",face_recognition:"慧眼識人",face_recognition_content:"機器人發展的趨勢是人工智能化,深度學習是智能機器人的前沿技術,也是機器學習領域的新課題。深度學習技術被廣泛運用於農業、工業、軍事、航空等領域,與機器讓人的有機結合能設計出具有高工作效率、高實時性、高精確度的智能機器人。",speech_recognition:"語音識別",speech_recognition_content:"語音識別發展的趨勢是人工智能化,語音識別是智能識別的前沿技術,也是識別領域的新課題。語音識別技術被廣泛運用於農業、工業、軍事、航空等領域。",study:"學習",go_edu_teaching_platform:"前往教學平臺",go_train_platform:"學習人工智能:訓練平臺",go_biaoji_platform:"學習人工智能:標記平臺",go_aihub:"學習人工智能:原理",go_aihub_vision:"學習人工智能:視覺處理",go_aihub_text:"學習人工智能:文本分析",go_aihub_speech:"學習人工智能:語音識別",go_aihub_art:"學習人工智能:藝術",file:"文件",last_version:"上次修改:",delete_success:"刪除成功",delete_error:"刪除失敗",save_success:"保存成功",save_error:"保存失敗",open_error:"打開失敗",languare:"語言",visual_identification:"視覺識別",text_processing:"文本處理",stay_tuned:"敬請期待",cocorobo:"可可樂博(深圳)科技有限公司",cocorobo_copy:"版權所有",update_log:"更新日誌",help_file:"幫助文檔",device:"設備",wired_connection:"有線連接",wireless_connection:"無線連接",not_uploader_connection:"無法連接插件,點擊圖標瞭解如何解決",uploader_connection:"上傳軟件已連接",software_not_connection:"軟件未連接",no_port_detected:"沒有檢測到端口",uploading:"正在上傳",uploading_error:"上傳失敗",reset_device_success:"重置設備成功",reset_device_error:"重置設備失敗",module_not_connection:"模組未連接",module_connection:"模組已連接",code_upload_to_module:"直接將代碼上傳到電子模組中",running_code:"運行中",running_code_error:"代碼爲空,運行失敗",running_code_success:"運行成功",running:"運行",upload:"上載",initialization:"初始化主屏頁面",reset_device:"重置設備",clear_print_data:"清除打印數據",edit_mode:"是否啓用編輯模式",copy_code:"複製代碼",copy_code_success:"複製成功",copy_code_error:"複製失敗",download_code:"下載代碼",download_code_success:"下載成功",download_code_error:"下載失敗",upload_code:"上載代碼",upload_code_success:"上載成功",upload_code_error:"上載失敗",serial_port:"串口交互窗",python_code:"python 源代碼",catLogic:"邏輯",update_success:"更新成功",update_error:"更新失敗",add_success:"添加成功",add_error:"添加失敗",add:"添加",update:"更新",ok:"確定"}},zVe={message:{close:"Close",save:"Save",example:"Example",open_example_error:"Sample Load Failure",open_example_success:"Sample Load Success",example_1:"Example1",example_1_1:"Example1_1",example_1_1_1:"Example1_1_1",example_1_1_2:"Example1_1_2",example_1_2:"Example1_2",example_1_2_1:"Example1_2_1",example_1_2_2:"Example1_2_2",example_2:"Example2",example_2_1:"Example2_1",example_2_1_1:"Example2_1_1",example_2_1_2:"Example2_1_2",labs:"Labs",student:"Study",cloud_save:"Cloud storage",Export:"Export",import:"Import",copy:"Copy",share:"Share",delete_all_blockly:"Delete all blocks",screenshot:"One-click screenshot",untitled:"Untitled",export_content_empty:"Exported content is empty",link_copy:"Link copied to clipboard",link_copy_error:"Copy Failure",please_login:"Please log in first",login:"Login",logout:"Sign out",go_cloud_serve:"Go to CocoCloud",your_email:"Your Email:",your_school:"Your School:",cloud_project:"Cloud Event",click_to_refresh:"Click to refresh the Event list",copy_apiKey:"Copy API Key",login_success:"Login Success",logout_success:"Sign out Success",all_categorization:"All classifications:",AI:"AI",IoT:"IoT",robot_control:"Robot control",scientific_experiment:"Scientific experiment",Interactive_games:"Interactive games",system_configure:"Minimum Hardware Requirementss",system:"Suggested Resolution Supported:",memory:"Memory Capacity:",HardDisk:"The Hard Disk:",GraphicsCard:"The Graphics Card:",camera:"Camera:",microphone:"Microphone:",need:"OK",not_need:"No",enter:"Enter",Deep_learning_Machines:"Teachable Machine",Deep_learning_Machines_content:"The trend of robot development is artificial intelligence. Deep learning is the frontier technology of intelligent robot and a new topic in the field of machine learning.Deep learning technology is widely used in agriculture, industry, military, aviation and other fields, and the organic combination with machines can design intelligent robots with high working efficiency, high real-time and high accuracy.",emotion_recognition:"Emotion Recognition",emotion_recognition_content:"The development trend of emotion recognition is artificial intelligence. Emotion recognition is the frontier technology of intelligent recognition and a new subject in the field of recognition.Emotion recognition technology is widely used in agriculture, industry, military, aviation and other fields.",gesture_recognition:"Gesture Recognition",gesture_recognition_content:"The development trend of gesture recognition is artificial intelligence. Gesture recognition is the frontier technology of intelligent recognition and a new subject in the field of recognition.Gesture recognition technology is widely used in agriculture, industry, military, aviation and other fields.",object_recognition:"Object Recognition",object_recognition_content:"The development trend of object recognition is artificial intelligence. Object recognition is the frontier technology of intelligent recognition and a new subject in the field of recognition.Object recognition technology is widely used in agriculture, industry, military, aviation and other fields.",pose_recognition:"Posenet Recognition",pose_recognition_content:"The development of attitude recognition is the general trend of the development of artificial intelligence. Attitude recognition technology is widely used in many fields",face_recognition:"Teachable Machine (with Pose Recognition)",face_recognition_content:"The trend of robot development is artificial intelligence. Deep learning is the frontier technology of intelligent robot and a new topic in the field of machine learning.Deep learning technology is widely used in agriculture, industry, military, aviation and other fields, and the organic combination with machines can design intelligent robots with high working efficiency, high real-time and high accuracy.",speech_recognition:"Speech Recognition",speech_recognition_content:"The development trend of speech recognition is artificial intelligence. Speech recognition is the frontier technology of intelligent recognition and a new subject in the field of recognition.Speech recognition technology is widely used in agriculture, industry, military, aviation and other fields.",study:"Study",go_edu_teaching_platform:"Coco Edu",go_train_platform:"AI Training",go_biaoji_platform:"AI Labeling",go_aihub:"Learn AI: Theory",go_aihub_vision:"Learn AI: Vision",go_aihub_text:"Learn AI: Text",go_aihub_speech:"Learn AI: Speech",go_aihub_art:"Learn AI: Art",file:"File",last_version:"Last modified:",delete_success:"Delete Success",delete_error:"Delete Failure",save_success:"Save Success",save_error:"Save Failure",open_error:"Open Failure",languare:"Language",visual_identification:"Vision",text_processing:"Text",stay_tuned:"Coming soon",cocorobo:"CocoRobo LTD",cocorobo_copy:"Copyright",update_log:"Update Log",help_file:"Help",device:"Device",wired_connection:"Wired connection",wireless_connection:"Wireless connection",not_uploader_connection:"Can't connect to the plugin, click on the icon to find out how to fix it",uploader_connection:"Upload software is connected",software_not_connection:"Software not connected",no_port_detected:"No port detected",uploading:"Uploading",uploading_error:"Upload failed",reset_device_success:"Reset device success",reset_device_error:"Reset device failed",module_not_connection:"Module not connected",module_connection:"Module connected",code_upload_to_module:"Upload the code directly into the e-module",running_code:"Running ...",running_code_error:"Code is empty, running failed",running_code_success:"Running Success",running:"Running",upload:"Upload",initialization:"Reset Main UI",reset_device:"Reset Device",clear_print_data:"Clearing Data",edit_mode:"Enable/Disable Editing",copy_code:"Copy Code",copy_code_success:"Copy Success",copy_code_error:"Copy Failure",download_code:"Download Code",download_code_success:"Download Success",download_code_error:"Download Failure",upload_code:"Upload Code",upload_code_success:"Upload Success",upload_code_error:"Upload Failure",serial_port:"Serial Interactive Window",python_code:"Python Code",catLogic:"Logic",update_success:"Update Success",update_error:"Update Failure",add_success:"Add Success",add_error:"Add Failure",add:"Add",update:"Update",ok:"OK"}},YVe=qae({locale:localStorage.getItem("lang")||"zhHans",messages:{en:zVe,zhHans:WVe,zhHant:XVe}}),D$=nX(aQ);D$.use(DFe);D$.use(VVe);D$.use(GVe);D$.use(YVe);D$.mount("#app")});export default KVe();