diff --git a/dist/assets/index-3b9f88fc.css b/dist/assets/index-3b9f88fc.css deleted file mode 100644 index 834d118..0000000 --- a/dist/assets/index-3b9f88fc.css +++ /dev/null @@ -1 +0,0 @@ -#arrow-end[data-v-3ee11ae5]{fill:red!important}.screen[data-v-3ee11ae5]{width:100%;height:100%;outline:none;border:1px solid #ccc}.node .content{position:relative;white-space:nowrap;width:fit-content}.node .background{background-color:#64c864e6;border-radius:7px}.node.fill .outer,.node.fill .content,.node.fill .content>*{width:100%;height:100%;box-sizing:border-box}.default-label{font-weight:700;width:auto;height:auto;min-width:30px;min-height:30px;line-height:30px;padding:10px;text-align:center}.edge[data-v-20186235]{stroke-width:4;stroke:green;marker-end:url(#arrow-end);fill:none}.group .content{width:100%;height:100%;position:absolute;border-radius:7px;background-color:#64646440;display:inline-block}.port{position:relative}.label .node .content{background-color:#bbe4bb}.label .edge{stroke:#286f28;stroke-width:3;stroke-dasharray:4}#edit-demo .CodeMirror{width:100%;height:500px;margin:0;overflow:hidden;position:relative;background-color:#f1f1f1;border:1px solid #f1f1f1}#edit-demo .node .content>div{padding:25px}#edit-demo .node .content h4,h5,p{margin:0}#edit-demo .node:hover .background{background-color:#5ac85a}#edit-demo .node.selected .content{background-color:#64c864;box-shadow:0 0 0 2px #333}#edit-demo .node .content,#edit-demo .edge{cursor:pointer}#edit-demo .edge:hover{stroke:#5ac85a}#edit-demo .edge.selected{stroke:#333}.port-inner[data-v-c482aa90]{width:15px;height:15px;border-radius:10px;background-color:#abc;display:inline-block;cursor:crosshair}.port-inner[data-v-c482aa90]:hover,.port-inner.connected[data-v-c482aa90]{background-color:#02db43}.node-header[data-v-c482aa90]{text-align:left;padding-left:10px;background-color:#28965f;border-radius:5px 5px 0 0;color:#fff}#ports-demo .node .content{background-color:#eee;box-shadow:2px 2px 2px 2px #64646480}#ports-demo .edge{stroke:#757575;stroke-linejoin:round;marker-start:none;marker-end:none;stroke-dasharray:5px 10px;stroke-dashoffset:1000;stroke-linecap:round;animation:dash 20s linear infinite}#benchmark-demo .node .content{background-color:#47696e;color:#fff}#benchmark-demo .node:hover .content{background-color:red}#benchmark-demo .edge{stroke:#ccc;stroke-width:4;marker-end:none}#benchmark-demo .edge:hover{stroke:red}.demo[data-v-95e9218b] .v-codemirror .cm-gutters{display:none}@keyframes dash{to{stroke-dashoffset:0}}.checkboxes input[data-v-24e8b0e4]{display:inline}.checkboxes label[data-v-24e8b0e4]{display:inline;margin-right:10px}.group-label{font-weight:700;color:#fff;padding:10px;margin:0;background-color:#183e5280;border-top-left-radius:10px;border-top-right-radius:10px}h2[data-v-41bd1598]{margin-top:50px;width:calc(100% - 225px)}h2 a[data-v-41bd1598]{color:#4a4a4a;font-size:.75em;float:right}.screen{background-color:#fff}h2{font-size:1.5em}body{background-color:#f9f9f9;max-width:56em}.demo{display:flex}.viewport{height:500px;flex-grow:1}.sidebar{padding-left:20px;width:200px;max-width:200px;flex-shrink:0}@media only screen and (max-width: 1000px){.demo{flex-wrap:wrap}.viewport{width:100%}.sidebar{padding-left:0;display:flex;flex-wrap:wrap;min-width:100%;gap:10px;margin-top:20px}h2{width:100%!important}} diff --git a/dist/assets/index-60040354.css b/dist/assets/index-60040354.css new file mode 100644 index 0000000..9c0f6fa --- /dev/null +++ b/dist/assets/index-60040354.css @@ -0,0 +1 @@ +#arrow-end[data-v-ad4782f5]{fill:red!important}.screen[data-v-ad4782f5]{width:100%;height:100%;outline:none;border:1px solid #ccc}.node .content{position:var(--37791327);white-space:nowrap;width:fit-content}.node .background{background-color:#64c864e6;border-radius:7px}.node.fill .outer,.node.fill .content,.node.fill .content>*{width:100%;height:100%;box-sizing:border-box}.default-label{font-weight:700;width:auto;height:auto;min-width:30px;min-height:30px;line-height:30px;padding:10px;text-align:center}.edge[data-v-40cdf8f7]{stroke-width:4;stroke:green;marker-end:url(#arrow-end);fill:none}.group .content{width:100%;height:100%;position:var(--ece442fe);border-radius:7px;background-color:#64646440;display:inline-block}.port{position:var(--bf069048)}.label .node .content{background-color:#bbe4bb}.label .edge{stroke:#286f28;stroke-width:3;stroke-dasharray:4}#edit-demo .CodeMirror{width:100%;height:500px;margin:0;overflow:hidden;position:relative;background-color:#f1f1f1;border:1px solid #f1f1f1}#edit-demo .node .content>div{padding:25px}#edit-demo .node .content h4,h5,p{margin:0}#edit-demo .node:hover .background{background-color:#5ac85a}#edit-demo .node.selected .content{background-color:#64c864;box-shadow:0 0 0 2px #333}#edit-demo .node .content,#edit-demo .edge{cursor:pointer}#edit-demo .edge:hover{stroke:#5ac85a}#edit-demo .edge.selected{stroke:#333}.port-inner[data-v-c482aa90]{width:15px;height:15px;border-radius:10px;background-color:#abc;display:inline-block;cursor:crosshair}.port-inner[data-v-c482aa90]:hover,.port-inner.connected[data-v-c482aa90]{background-color:#02db43}.node-header[data-v-c482aa90]{text-align:left;padding-left:10px;background-color:#28965f;border-radius:5px 5px 0 0;color:#fff}#ports-demo .node .content{background-color:#eee;box-shadow:2px 2px 2px 2px #64646480}#ports-demo .edge{stroke:#757575;stroke-linejoin:round;marker-start:none;marker-end:none;stroke-dasharray:5px 10px;stroke-dashoffset:1000;stroke-linecap:round;animation:dash 20s linear infinite}#benchmark-demo .node .content{background-color:#47696e;color:#fff}#benchmark-demo .node:hover .content{background-color:red}#benchmark-demo .edge{stroke:#ccc;stroke-width:4;marker-end:none}#benchmark-demo .edge:hover{stroke:red}.demo[data-v-95e9218b] .v-codemirror .cm-gutters{display:none}@keyframes dash{to{stroke-dashoffset:0}}.checkboxes input[data-v-24e8b0e4]{display:inline}.checkboxes label[data-v-24e8b0e4]{display:inline;margin-right:10px}.group-label{font-weight:700;color:#fff;padding:10px;margin:0;background-color:#183e5280;border-top-left-radius:10px;border-top-right-radius:10px}h2[data-v-ebb94d72]{margin-top:50px;width:calc(100% - 225px)}h2 a[data-v-ebb94d72]{color:#4a4a4a;font-size:.75em;float:right}.screen{background-color:#fff}h2{font-size:1.5em}body{background-color:#f9f9f9;max-width:56em}.demo{display:flex}.viewport{height:500px;flex-grow:1}.sidebar{padding-left:20px;width:200px;max-width:200px;flex-shrink:0}@media only screen and (max-width: 1000px){.demo{flex-wrap:wrap}.viewport{width:100%}.sidebar{padding-left:0;display:flex;flex-wrap:wrap;min-width:100%;gap:10px;margin-top:20px}h2{width:100%!important}} diff --git a/dist/assets/index-6c4768b9.js b/dist/assets/index-ed0cd7cf.js similarity index 68% rename from dist/assets/index-6c4768b9.js rename to dist/assets/index-ed0cd7cf.js index e3dcaac..0a0a0f4 100644 --- a/dist/assets/index-6c4768b9.js +++ b/dist/assets/index-ed0cd7cf.js @@ -1,10 +1,10 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function r(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(o){if(o.ep)return;o.ep=!0;const a=r(o);fetch(o.href,a)}})();function makeMap(n,e){const r=Object.create(null),s=n.split(",");for(let o=0;o!!r[o.toLowerCase()]:o=>!!r[o]}function normalizeStyle(n){if(isArray(n)){const e={};for(let r=0;r{if(r){const s=r.split(propertyDelimiterRE);s.length>1&&(e[s[0].trim()]=s[1].trim())}}),e}function normalizeClass(n){let e="";if(isString(n))e=n;else if(isArray(n))for(let r=0;rlooseEqual(r,e))}const toDisplayString=n=>isString(n)?n:n==null?"":isArray(n)||isObject$2(n)&&(n.toString===objectToString||!isFunction(n.toString))?JSON.stringify(n,replacer,2):String(n),replacer=(n,e)=>e&&e.__v_isRef?replacer(n,e.value):isMap(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((r,[s,o])=>(r[`${s} =>`]=o,r),{})}:isSet(e)?{[`Set(${e.size})`]:[...e.values()]}:isObject$2(e)&&!isArray(e)&&!isPlainObject(e)?String(e):e,EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,onRE=/^on[^a-z]/,isOn=n=>onRE.test(n),isModelListener=n=>n.startsWith("onUpdate:"),extend$3=Object.assign,remove$1=(n,e)=>{const r=n.indexOf(e);r>-1&&n.splice(r,1)},hasOwnProperty$1=Object.prototype.hasOwnProperty,hasOwn$2=(n,e)=>hasOwnProperty$1.call(n,e),isArray=Array.isArray,isMap=n=>toTypeString(n)==="[object Map]",isSet=n=>toTypeString(n)==="[object Set]",isDate=n=>toTypeString(n)==="[object Date]",isFunction=n=>typeof n=="function",isString=n=>typeof n=="string",isSymbol=n=>typeof n=="symbol",isObject$2=n=>n!==null&&typeof n=="object",isPromise=n=>isObject$2(n)&&isFunction(n.then)&&isFunction(n.catch),objectToString=Object.prototype.toString,toTypeString=n=>objectToString.call(n),toRawType=n=>toTypeString(n).slice(8,-1),isPlainObject=n=>toTypeString(n)==="[object Object]",isIntegerKey=n=>isString(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=n=>{const e=Object.create(null);return r=>e[r]||(e[r]=n(r))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction(n=>n.replace(camelizeRE,(e,r)=>r?r.toUpperCase():"")),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(n=>n.replace(hyphenateRE,"-$1").toLowerCase()),capitalize=cacheStringFunction(n=>n.charAt(0).toUpperCase()+n.slice(1)),toHandlerKey=cacheStringFunction(n=>n?`on${capitalize(n)}`:""),hasChanged=(n,e)=>!Object.is(n,e),invokeArrayFns=(n,e)=>{for(let r=0;r{Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value:r})},looseToNumber=n=>{const e=parseFloat(n);return isNaN(e)?n:e};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let activeEffectScope;class EffectScope{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=activeEffectScope,!e&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const r=activeEffectScope;try{return activeEffectScope=this,e()}finally{activeEffectScope=r}}}on(){activeEffectScope=this}off(){activeEffectScope=this.parent}stop(e){if(this._active){let r,s;for(r=0,s=this.effects.length;r{const e=new Set(n);return e.w=0,e.n=0,e},wasTracked=n=>(n.w&trackOpBit)>0,newTracked=n=>(n.n&trackOpBit)>0,initDepMarkers=({deps:n})=>{if(n.length)for(let e=0;e{const{deps:e}=n;if(e.length){let r=0;for(let s=0;s{(d==="length"||d>=u)&&c.push(f)})}else switch(r!==void 0&&c.push(l.get(r)),e){case"add":isArray(n)?isIntegerKey(r)&&c.push(l.get("length")):(c.push(l.get(ITERATE_KEY)),isMap(n)&&c.push(l.get(MAP_KEY_ITERATE_KEY)));break;case"delete":isArray(n)||(c.push(l.get(ITERATE_KEY)),isMap(n)&&c.push(l.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap(n)&&c.push(l.get(ITERATE_KEY));break}if(c.length===1)c[0]&&triggerEffects(c[0]);else{const u=[];for(const f of c)f&&u.push(...f);triggerEffects(createDep(u))}}function triggerEffects(n,e){const r=isArray(n)?n:[...n];for(const s of r)s.computed&&triggerEffect(s);for(const s of r)s.computed||triggerEffect(s)}function triggerEffect(n,e){(n!==activeEffect||n.allowRecurse)&&(n.scheduler?n.scheduler():n.run())}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(isSymbol)),get$1=createGetter(),shallowGet=createGetter(!1,!0),readonlyGet=createGetter(!0),arrayInstrumentations=createArrayInstrumentations();function createArrayInstrumentations(){const n={};return["includes","indexOf","lastIndexOf"].forEach(e=>{n[e]=function(...r){const s=toRaw(this);for(let a=0,l=this.length;a{n[e]=function(...r){pauseTracking();const s=toRaw(this)[e].apply(this,r);return resetTracking(),s}}),n}function hasOwnProperty(n){const e=toRaw(this);return track(e,"has",n),e.hasOwnProperty(n)}function createGetter(n=!1,e=!1){return function(s,o,a){if(o==="__v_isReactive")return!n;if(o==="__v_isReadonly")return n;if(o==="__v_isShallow")return e;if(o==="__v_raw"&&a===(n?e?shallowReadonlyMap:readonlyMap:e?shallowReactiveMap:reactiveMap).get(s))return s;const l=isArray(s);if(!n){if(l&&hasOwn$2(arrayInstrumentations,o))return Reflect.get(arrayInstrumentations,o,a);if(o==="hasOwnProperty")return hasOwnProperty}const c=Reflect.get(s,o,a);return(isSymbol(o)?builtInSymbols.has(o):isNonTrackableKeys(o))||(n||track(s,"get",o),e)?c:isRef(c)?l&&isIntegerKey(o)?c:c.value:isObject$2(c)?n?readonly(c):reactive(c):c}}const set$1=createSetter(),shallowSet=createSetter(!0);function createSetter(n=!1){return function(r,s,o,a){let l=r[s];if(isReadonly(l)&&isRef(l)&&!isRef(o))return!1;if(!n&&(!isShallow(o)&&!isReadonly(o)&&(l=toRaw(l),o=toRaw(o)),!isArray(r)&&isRef(l)&&!isRef(o)))return l.value=o,!0;const c=isArray(r)&&isIntegerKey(s)?Number(s)n,getProto=n=>Reflect.getPrototypeOf(n);function get(n,e,r=!1,s=!1){n=n.__v_raw;const o=toRaw(n),a=toRaw(e);r||(e!==a&&track(o,"get",e),track(o,"get",a));const{has:l}=getProto(o),c=s?toShallow:r?toReadonly:toReactive;if(l.call(o,e))return c(n.get(e));if(l.call(o,a))return c(n.get(a));n!==o&&n.get(e)}function has(n,e=!1){const r=this.__v_raw,s=toRaw(r),o=toRaw(n);return e||(n!==o&&track(s,"has",n),track(s,"has",o)),n===o?r.has(n):r.has(n)||r.has(o)}function size(n,e=!1){return n=n.__v_raw,!e&&track(toRaw(n),"iterate",ITERATE_KEY),Reflect.get(n,"size",n)}function add$1(n){n=toRaw(n);const e=toRaw(this);return getProto(e).has.call(e,n)||(e.add(n),trigger(e,"add",n,n)),this}function set(n,e){e=toRaw(e);const r=toRaw(this),{has:s,get:o}=getProto(r);let a=s.call(r,n);a||(n=toRaw(n),a=s.call(r,n));const l=o.call(r,n);return r.set(n,e),a?hasChanged(e,l)&&trigger(r,"set",n,e):trigger(r,"add",n,e),this}function deleteEntry(n){const e=toRaw(this),{has:r,get:s}=getProto(e);let o=r.call(e,n);o||(n=toRaw(n),o=r.call(e,n)),s&&s.call(e,n);const a=e.delete(n);return o&&trigger(e,"delete",n,void 0),a}function clear(){const n=toRaw(this),e=n.size!==0,r=n.clear();return e&&trigger(n,"clear",void 0,void 0),r}function createForEach(n,e){return function(s,o){const a=this,l=a.__v_raw,c=toRaw(l),u=e?toShallow:n?toReadonly:toReactive;return!n&&track(c,"iterate",ITERATE_KEY),l.forEach((f,d)=>s.call(o,u(f),u(d),a))}}function createIterableMethod(n,e,r){return function(...s){const o=this.__v_raw,a=toRaw(o),l=isMap(a),c=n==="entries"||n===Symbol.iterator&&l,u=n==="keys"&&l,f=o[n](...s),d=r?toShallow:e?toReadonly:toReactive;return!e&&track(a,"iterate",u?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:g,done:m}=f.next();return m?{value:g,done:m}:{value:c?[d(g[0]),d(g[1])]:d(g),done:m}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(n){return function(...e){return n==="delete"?!1:this}}function createInstrumentations(){const n={get(a){return get(this,a)},get size(){return size(this)},has,add:add$1,set,delete:deleteEntry,clear,forEach:createForEach(!1,!1)},e={get(a){return get(this,a,!1,!0)},get size(){return size(this)},has,add:add$1,set,delete:deleteEntry,clear,forEach:createForEach(!1,!0)},r={get(a){return get(this,a,!0)},get size(){return size(this,!0)},has(a){return has.call(this,a,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!1)},s={get(a){return get(this,a,!0,!0)},get size(){return size(this,!0)},has(a){return has.call(this,a,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{n[a]=createIterableMethod(a,!1,!1),r[a]=createIterableMethod(a,!0,!1),e[a]=createIterableMethod(a,!1,!0),s[a]=createIterableMethod(a,!0,!0)}),[n,r,e,s]}const[mutableInstrumentations,readonlyInstrumentations,shallowInstrumentations,shallowReadonlyInstrumentations]=createInstrumentations();function createInstrumentationGetter(n,e){const r=e?n?shallowReadonlyInstrumentations:shallowInstrumentations:n?readonlyInstrumentations:mutableInstrumentations;return(s,o,a)=>o==="__v_isReactive"?!n:o==="__v_isReadonly"?n:o==="__v_raw"?s:Reflect.get(hasOwn$2(r,o)&&o in s?r:s,o,a)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(n){return n.__v_skip||!Object.isExtensible(n)?0:targetTypeMap(toRawType(n))}function reactive(n){return isReadonly(n)?n:createReactiveObject(n,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(n){return createReactiveObject(n,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(n){return createReactiveObject(n,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function createReactiveObject(n,e,r,s,o){if(!isObject$2(n)||n.__v_raw&&!(e&&n.__v_isReactive))return n;const a=o.get(n);if(a)return a;const l=getTargetType(n);if(l===0)return n;const c=new Proxy(n,l===2?s:r);return o.set(n,c),c}function isReactive(n){return isReadonly(n)?isReactive(n.__v_raw):!!(n&&n.__v_isReactive)}function isReadonly(n){return!!(n&&n.__v_isReadonly)}function isShallow(n){return!!(n&&n.__v_isShallow)}function isProxy(n){return isReactive(n)||isReadonly(n)}function toRaw(n){const e=n&&n.__v_raw;return e?toRaw(e):n}function markRaw(n){return def(n,"__v_skip",!0),n}const toReactive=n=>isObject$2(n)?reactive(n):n,toReadonly=n=>isObject$2(n)?readonly(n):n;function trackRefValue(n){shouldTrack&&activeEffect&&(n=toRaw(n),trackEffects(n.dep||(n.dep=createDep())))}function triggerRefValue(n,e){n=toRaw(n);const r=n.dep;r&&triggerEffects(r)}function isRef(n){return!!(n&&n.__v_isRef===!0)}function shallowRef(n){return createRef(n,!0)}function createRef(n,e){return isRef(n)?n:new RefImpl(n,e)}class RefImpl{constructor(e,r){this.__v_isShallow=r,this.dep=void 0,this.__v_isRef=!0,this._rawValue=r?e:toRaw(e),this._value=r?e:toReactive(e)}get value(){return trackRefValue(this),this._value}set value(e){const r=this.__v_isShallow||isShallow(e)||isReadonly(e);e=r?e:toRaw(e),hasChanged(e,this._rawValue)&&(this._rawValue=e,this._value=r?e:toReactive(e),triggerRefValue(this))}}function unref(n){return isRef(n)?n.value:n}const shallowUnwrapHandlers={get:(n,e,r)=>unref(Reflect.get(n,e,r)),set:(n,e,r,s)=>{const o=n[e];return isRef(o)&&!isRef(r)?(o.value=r,!0):Reflect.set(n,e,r,s)}};function proxyRefs(n){return isReactive(n)?n:new Proxy(n,shallowUnwrapHandlers)}var _a$1;class ComputedRefImpl{constructor(e,r,s,o){this._setter=r,this.dep=void 0,this.__v_isRef=!0,this[_a$1]=!1,this._dirty=!0,this.effect=new ReactiveEffect(e,()=>{this._dirty||(this._dirty=!0,triggerRefValue(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=s}get value(){const e=toRaw(this);return trackRefValue(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}_a$1="__v_isReadonly";function computed$1(n,e,r=!1){let s,o;const a=isFunction(n);return a?(s=n,o=NOOP):(s=n.get,o=n.set),new ComputedRefImpl(s,o,a||!o,r)}function warn(n,...e){}function callWithErrorHandling(n,e,r,s){let o;try{o=s?n(...s):n()}catch(a){handleError(a,e,r)}return o}function callWithAsyncErrorHandling(n,e,r,s){if(isFunction(n)){const a=callWithErrorHandling(n,e,r,s);return a&&isPromise(a)&&a.catch(l=>{handleError(l,e,r)}),a}const o=[];for(let a=0;a>>1;getId(queue[s])flushIndex&&queue.splice(e,1)}function queuePostFlushCb(n){isArray(n)?pendingPostFlushCbs.push(...n):(!activePostFlushCbs||!activePostFlushCbs.includes(n,n.allowRecurse?postFlushIndex+1:postFlushIndex))&&pendingPostFlushCbs.push(n),queueFlush()}function flushPreFlushCbs(n,e=isFlushing?flushIndex+1:0){for(;egetId(r)-getId(s)),postFlushIndex=0;postFlushIndexn.id==null?1/0:n.id,comparator=(n,e)=>{const r=getId(n)-getId(e);if(r===0){if(n.pre&&!e.pre)return-1;if(e.pre&&!n.pre)return 1}return r};function flushJobs(n){isFlushPending=!1,isFlushing=!0,queue.sort(comparator);const e=NOOP;try{for(flushIndex=0;flushIndexisString(_)?_.trim():_)),g&&(o=r.map(looseToNumber))}let c,u=s[c=toHandlerKey(e)]||s[c=toHandlerKey(camelize(e))];!u&&a&&(u=s[c=toHandlerKey(hyphenate(e))]),u&&callWithAsyncErrorHandling(u,n,6,o);const f=s[c+"Once"];if(f){if(!n.emitted)n.emitted={};else if(n.emitted[c])return;n.emitted[c]=!0,callWithAsyncErrorHandling(f,n,6,o)}}function normalizeEmitsOptions(n,e,r=!1){const s=e.emitsCache,o=s.get(n);if(o!==void 0)return o;const a=n.emits;let l={},c=!1;if(!isFunction(n)){const u=f=>{const d=normalizeEmitsOptions(f,e,!0);d&&(c=!0,extend$3(l,d))};!r&&e.mixins.length&&e.mixins.forEach(u),n.extends&&u(n.extends),n.mixins&&n.mixins.forEach(u)}return!a&&!c?(isObject$2(n)&&s.set(n,null),null):(isArray(a)?a.forEach(u=>l[u]=null):extend$3(l,a),isObject$2(n)&&s.set(n,l),l)}function isEmitListener(n,e){return!n||!isOn(e)?!1:(e=e.slice(2).replace(/Once$/,""),hasOwn$2(n,e[0].toLowerCase()+e.slice(1))||hasOwn$2(n,hyphenate(e))||hasOwn$2(n,e))}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(n){const e=currentRenderingInstance;return currentRenderingInstance=n,currentScopeId=n&&n.type.__scopeId||null,e}function pushScopeId(n){currentScopeId=n}function popScopeId(){currentScopeId=null}function withCtx(n,e=currentRenderingInstance,r){if(!e||n._n)return n;const s=(...o)=>{s._d&&setBlockTracking(-1);const a=setCurrentRenderingInstance(e);let l;try{l=n(...o)}finally{setCurrentRenderingInstance(a),s._d&&setBlockTracking(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function markAttrsAccessed(){}function renderComponentRoot(n){const{type:e,vnode:r,proxy:s,withProxy:o,props:a,propsOptions:[l],slots:c,attrs:u,emit:f,render:d,renderCache:g,data:m,setupState:_,ctx:E,inheritAttrs:A}=n;let b,v;const M=setCurrentRenderingInstance(n);try{if(r.shapeFlag&4){const R=o||s;b=normalizeVNode(d.call(R,R,g,a,_,m,E)),v=u}else{const R=e;b=normalizeVNode(R.length>1?R(a,{attrs:u,slots:c,emit:f}):R(a,null)),v=e.props?u:getFunctionalFallthrough(u)}}catch(R){blockStack.length=0,handleError(R,n,1),b=createVNode(Comment)}let V=b;if(v&&A!==!1){const R=Object.keys(v),{shapeFlag:L}=V;R.length&&L&7&&(l&&R.some(isModelListener)&&(v=filterModelListeners(v,l)),V=cloneVNode(V,v))}return r.dirs&&(V=cloneVNode(V),V.dirs=V.dirs?V.dirs.concat(r.dirs):r.dirs),r.transition&&(V.transition=r.transition),b=V,setCurrentRenderingInstance(M),b}const getFunctionalFallthrough=n=>{let e;for(const r in n)(r==="class"||r==="style"||isOn(r))&&((e||(e={}))[r]=n[r]);return e},filterModelListeners=(n,e)=>{const r={};for(const s in n)(!isModelListener(s)||!(s.slice(9)in e))&&(r[s]=n[s]);return r};function shouldUpdateComponent(n,e,r){const{props:s,children:o,component:a}=n,{props:l,children:c,patchFlag:u}=e,f=a.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&u>=0){if(u&1024)return!0;if(u&16)return s?hasPropsChanged(s,l,f):!!l;if(u&8){const d=e.dynamicProps;for(let g=0;gn.__isSuspense;function queueEffectWithSuspense(n,e){e&&e.pendingBranch?isArray(n)?e.effects.push(...n):e.effects.push(n):queuePostFlushCb(n)}function provide(n,e){if(currentInstance){let r=currentInstance.provides;const s=currentInstance.parent&¤tInstance.parent.provides;s===r&&(r=currentInstance.provides=Object.create(s)),r[n]=e}}function inject(n,e,r=!1){const s=currentInstance||currentRenderingInstance;if(s){const o=s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides;if(o&&n in o)return o[n];if(arguments.length>1)return r&&isFunction(e)?e.call(s.proxy):e}}const INITIAL_WATCHER_VALUE={};function watch(n,e,r){return doWatch(n,e,r)}function doWatch(n,e,{immediate:r,deep:s,flush:o,onTrack:a,onTrigger:l}=EMPTY_OBJ){const c=getCurrentScope()===(currentInstance==null?void 0:currentInstance.scope)?currentInstance:null;let u,f=!1,d=!1;if(isRef(n)?(u=()=>n.value,f=isShallow(n)):isReactive(n)?(u=()=>n,s=!0):isArray(n)?(d=!0,f=n.some(V=>isReactive(V)||isShallow(V)),u=()=>n.map(V=>{if(isRef(V))return V.value;if(isReactive(V))return traverse(V);if(isFunction(V))return callWithErrorHandling(V,c,2)})):isFunction(n)?e?u=()=>callWithErrorHandling(n,c,2):u=()=>{if(!(c&&c.isUnmounted))return g&&g(),callWithAsyncErrorHandling(n,c,3,[m])}:u=NOOP,e&&s){const V=u;u=()=>traverse(V())}let g,m=V=>{g=v.onStop=()=>{callWithErrorHandling(V,c,4)}},_;if(isInSSRComponentSetup)if(m=NOOP,e?r&&callWithAsyncErrorHandling(e,c,3,[u(),d?[]:void 0,m]):u(),o==="sync"){const V=useSSRContext();_=V.__watcherHandles||(V.__watcherHandles=[])}else return NOOP;let E=d?new Array(n.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const A=()=>{if(v.active)if(e){const V=v.run();(s||f||(d?V.some((R,L)=>hasChanged(R,E[L])):hasChanged(V,E)))&&(g&&g(),callWithAsyncErrorHandling(e,c,3,[V,E===INITIAL_WATCHER_VALUE?void 0:d&&E[0]===INITIAL_WATCHER_VALUE?[]:E,m]),E=V)}else v.run()};A.allowRecurse=!!e;let b;o==="sync"?b=A:o==="post"?b=()=>queuePostRenderEffect(A,c&&c.suspense):(A.pre=!0,c&&(A.id=c.uid),b=()=>queueJob(A));const v=new ReactiveEffect(u,b);e?r?A():E=v.run():o==="post"?queuePostRenderEffect(v.run.bind(v),c&&c.suspense):v.run();const M=()=>{v.stop(),c&&c.scope&&remove$1(c.scope.effects,v)};return _&&_.push(M),M}function instanceWatch(n,e,r){const s=this.proxy,o=isString(n)?n.includes(".")?createPathGetter(s,n):()=>s[n]:n.bind(s,s);let a;isFunction(e)?a=e:(a=e.handler,r=e);const l=currentInstance;setCurrentInstance(this);const c=doWatch(o,a.bind(s),r);return l?setCurrentInstance(l):unsetCurrentInstance(),c}function createPathGetter(n,e){const r=e.split(".");return()=>{let s=n;for(let o=0;o{traverse(r,e)});else if(isPlainObject(n))for(const r in n)traverse(n[r],e);return n}function defineComponent(n){return isFunction(n)?{setup:n,name:n.name}:n}const isAsyncWrapper=n=>!!n.type.__asyncLoader,isKeepAlive=n=>n.type.__isKeepAlive;function onActivated(n,e){registerKeepAliveHook(n,"a",e)}function onDeactivated(n,e){registerKeepAliveHook(n,"da",e)}function registerKeepAliveHook(n,e,r=currentInstance){const s=n.__wdc||(n.__wdc=()=>{let o=r;for(;o;){if(o.isDeactivated)return;o=o.parent}return n()});if(injectHook(e,s,r),r){let o=r.parent;for(;o&&o.parent;)isKeepAlive(o.parent.vnode)&&injectToKeepAliveRoot(s,e,r,o),o=o.parent}}function injectToKeepAliveRoot(n,e,r,s){const o=injectHook(e,n,s,!0);onUnmounted(()=>{remove$1(s[e],o)},r)}function injectHook(n,e,r=currentInstance,s=!1){if(r){const o=r[n]||(r[n]=[]),a=e.__weh||(e.__weh=(...l)=>{if(r.isUnmounted)return;pauseTracking(),setCurrentInstance(r);const c=callWithAsyncErrorHandling(e,r,n,l);return unsetCurrentInstance(),resetTracking(),c});return s?o.unshift(a):o.push(a),a}}const createHook=n=>(e,r=currentInstance)=>(!isInSSRComponentSetup||n==="sp")&&injectHook(n,(...s)=>e(...s),r),onBeforeMount=createHook("bm"),onMounted=createHook("m"),onBeforeUpdate=createHook("bu"),onUpdated=createHook("u"),onBeforeUnmount=createHook("bum"),onUnmounted=createHook("um"),onServerPrefetch=createHook("sp"),onRenderTriggered=createHook("rtg"),onRenderTracked=createHook("rtc");function onErrorCaptured(n,e=currentInstance){injectHook("ec",n,e)}function withDirectives(n,e){const r=currentRenderingInstance;if(r===null)return n;const s=getExposeProxy(r)||r.proxy,o=n.dirs||(n.dirs=[]);for(let a=0;ae(l,c,void 0,a&&a[c]));else{const l=Object.keys(n);o=new Array(l.length);for(let c=0,u=l.length;cisVNode(e)?!(e.type===Comment||e.type===Fragment&&!ensureValidVNode(e.children)):!0)?n:null}const getPublicInstance=n=>n?isStatefulComponent(n)?getExposeProxy(n)||n.proxy:getPublicInstance(n.parent):null,publicPropertiesMap=extend$3(Object.create(null),{$:n=>n,$el:n=>n.vnode.el,$data:n=>n.data,$props:n=>n.props,$attrs:n=>n.attrs,$slots:n=>n.slots,$refs:n=>n.refs,$parent:n=>getPublicInstance(n.parent),$root:n=>getPublicInstance(n.root),$emit:n=>n.emit,$options:n=>resolveMergedOptions(n),$forceUpdate:n=>n.f||(n.f=()=>queueJob(n.update)),$nextTick:n=>n.n||(n.n=nextTick.bind(n.proxy)),$watch:n=>instanceWatch.bind(n)}),hasSetupBinding=(n,e)=>n!==EMPTY_OBJ&&!n.__isScriptSetup&&hasOwn$2(n,e),PublicInstanceProxyHandlers={get({_:n},e){const{ctx:r,setupState:s,data:o,props:a,accessCache:l,type:c,appContext:u}=n;let f;if(e[0]!=="$"){const _=l[e];if(_!==void 0)switch(_){case 1:return s[e];case 2:return o[e];case 4:return r[e];case 3:return a[e]}else{if(hasSetupBinding(s,e))return l[e]=1,s[e];if(o!==EMPTY_OBJ&&hasOwn$2(o,e))return l[e]=2,o[e];if((f=n.propsOptions[0])&&hasOwn$2(f,e))return l[e]=3,a[e];if(r!==EMPTY_OBJ&&hasOwn$2(r,e))return l[e]=4,r[e];shouldCacheAccess&&(l[e]=0)}}const d=publicPropertiesMap[e];let g,m;if(d)return e==="$attrs"&&track(n,"get",e),d(n);if((g=c.__cssModules)&&(g=g[e]))return g;if(r!==EMPTY_OBJ&&hasOwn$2(r,e))return l[e]=4,r[e];if(m=u.config.globalProperties,hasOwn$2(m,e))return m[e]},set({_:n},e,r){const{data:s,setupState:o,ctx:a}=n;return hasSetupBinding(o,e)?(o[e]=r,!0):s!==EMPTY_OBJ&&hasOwn$2(s,e)?(s[e]=r,!0):hasOwn$2(n.props,e)||e[0]==="$"&&e.slice(1)in n?!1:(a[e]=r,!0)},has({_:{data:n,setupState:e,accessCache:r,ctx:s,appContext:o,propsOptions:a}},l){let c;return!!r[l]||n!==EMPTY_OBJ&&hasOwn$2(n,l)||hasSetupBinding(e,l)||(c=a[0])&&hasOwn$2(c,l)||hasOwn$2(s,l)||hasOwn$2(publicPropertiesMap,l)||hasOwn$2(o.config.globalProperties,l)},defineProperty(n,e,r){return r.get!=null?n._.accessCache[e]=0:hasOwn$2(r,"value")&&this.set(n,e,r.value,null),Reflect.defineProperty(n,e,r)}};let shouldCacheAccess=!0;function applyOptions(n){const e=resolveMergedOptions(n),r=n.proxy,s=n.ctx;shouldCacheAccess=!1,e.beforeCreate&&callHook(e.beforeCreate,n,"bc");const{data:o,computed:a,methods:l,watch:c,provide:u,inject:f,created:d,beforeMount:g,mounted:m,beforeUpdate:_,updated:E,activated:A,deactivated:b,beforeDestroy:v,beforeUnmount:M,destroyed:V,unmounted:R,render:L,renderTracked:N,renderTriggered:I,errorCaptured:$,serverPrefetch:H,expose:k,inheritAttrs:q,components:G,directives:J,filters:ne}=e;if(f&&resolveInjections(f,s,null,n.appContext.config.unwrapInjectedRef),l)for(const me in l){const fe=l[me];isFunction(fe)&&(s[me]=fe.bind(r))}if(o){const me=o.call(r,r);isObject$2(me)&&(n.data=reactive(me))}if(shouldCacheAccess=!0,a)for(const me in a){const fe=a[me],ee=isFunction(fe)?fe.bind(r,r):isFunction(fe.get)?fe.get.bind(r,r):NOOP,K=!isFunction(fe)&&isFunction(fe.set)?fe.set.bind(r):NOOP,he=computed({get:ee,set:K});Object.defineProperty(s,me,{enumerable:!0,configurable:!0,get:()=>he.value,set:ge=>he.value=ge})}if(c)for(const me in c)createWatcher(c[me],s,r,me);if(u){const me=isFunction(u)?u.call(r):u;Reflect.ownKeys(me).forEach(fe=>{provide(fe,me[fe])})}d&&callHook(d,n,"c");function le(me,fe){isArray(fe)?fe.forEach(ee=>me(ee.bind(r))):fe&&me(fe.bind(r))}if(le(onBeforeMount,g),le(onMounted,m),le(onBeforeUpdate,_),le(onUpdated,E),le(onActivated,A),le(onDeactivated,b),le(onErrorCaptured,$),le(onRenderTracked,N),le(onRenderTriggered,I),le(onBeforeUnmount,M),le(onUnmounted,R),le(onServerPrefetch,H),isArray(k))if(k.length){const me=n.exposed||(n.exposed={});k.forEach(fe=>{Object.defineProperty(me,fe,{get:()=>r[fe],set:ee=>r[fe]=ee})})}else n.exposed||(n.exposed={});L&&n.render===NOOP&&(n.render=L),q!=null&&(n.inheritAttrs=q),G&&(n.components=G),J&&(n.directives=J)}function resolveInjections(n,e,r=NOOP,s=!1){isArray(n)&&(n=normalizeInject(n));for(const o in n){const a=n[o];let l;isObject$2(a)?"default"in a?l=inject(a.from||o,a.default,!0):l=inject(a.from||o):l=inject(a),isRef(l)&&s?Object.defineProperty(e,o,{enumerable:!0,configurable:!0,get:()=>l.value,set:c=>l.value=c}):e[o]=l}}function callHook(n,e,r){callWithAsyncErrorHandling(isArray(n)?n.map(s=>s.bind(e.proxy)):n.bind(e.proxy),e,r)}function createWatcher(n,e,r,s){const o=s.includes(".")?createPathGetter(r,s):()=>r[s];if(isString(n)){const a=e[n];isFunction(a)&&watch(o,a)}else if(isFunction(n))watch(o,n.bind(r));else if(isObject$2(n))if(isArray(n))n.forEach(a=>createWatcher(a,e,r,s));else{const a=isFunction(n.handler)?n.handler.bind(r):e[n.handler];isFunction(a)&&watch(o,a,n)}}function resolveMergedOptions(n){const e=n.type,{mixins:r,extends:s}=e,{mixins:o,optionsCache:a,config:{optionMergeStrategies:l}}=n.appContext,c=a.get(e);let u;return c?u=c:!o.length&&!r&&!s?u=e:(u={},o.length&&o.forEach(f=>mergeOptions(u,f,l,!0)),mergeOptions(u,e,l)),isObject$2(e)&&a.set(e,u),u}function mergeOptions(n,e,r,s=!1){const{mixins:o,extends:a}=e;a&&mergeOptions(n,a,r,!0),o&&o.forEach(l=>mergeOptions(n,l,r,!0));for(const l in e)if(!(s&&l==="expose")){const c=internalOptionMergeStrats[l]||r&&r[l];n[l]=c?c(n[l],e[l]):e[l]}return n}const internalOptionMergeStrats={data:mergeDataFn,props:mergeObjectOptions,emits:mergeObjectOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(n,e){return e?n?function(){return extend$3(isFunction(n)?n.call(this,this):n,isFunction(e)?e.call(this,this):e)}:e:n}function mergeInject(n,e){return mergeObjectOptions(normalizeInject(n),normalizeInject(e))}function normalizeInject(n){if(isArray(n)){const e={};for(let r=0;r0)&&!(l&16)){if(l&8){const d=n.vnode.dynamicProps;for(let g=0;g{u=!0;const[m,_]=normalizePropsOptions(g,e,!0);extend$3(l,m),_&&c.push(..._)};!r&&e.mixins.length&&e.mixins.forEach(d),n.extends&&d(n.extends),n.mixins&&n.mixins.forEach(d)}if(!a&&!u)return isObject$2(n)&&s.set(n,EMPTY_ARR),EMPTY_ARR;if(isArray(a))for(let d=0;d-1,_[1]=A<0||E-1||hasOwn$2(_,"default"))&&c.push(g)}}}const f=[l,c];return isObject$2(n)&&s.set(n,f),f}function validatePropName(n){return n[0]!=="$"}function getType(n){const e=n&&n.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:n===null?"null":""}function isSameType(n,e){return getType(n)===getType(e)}function getTypeIndex(n,e){return isArray(e)?e.findIndex(r=>isSameType(r,n)):isFunction(e)&&isSameType(e,n)?0:-1}const isInternalKey=n=>n[0]==="_"||n==="$stable",normalizeSlotValue=n=>isArray(n)?n.map(normalizeVNode):[normalizeVNode(n)],normalizeSlot=(n,e,r)=>{if(e._n)return e;const s=withCtx((...o)=>normalizeSlotValue(e(...o)),r);return s._c=!1,s},normalizeObjectSlots=(n,e,r)=>{const s=n._ctx;for(const o in n){if(isInternalKey(o))continue;const a=n[o];if(isFunction(a))e[o]=normalizeSlot(o,a,s);else if(a!=null){const l=normalizeSlotValue(a);e[o]=()=>l}}},normalizeVNodeSlots=(n,e)=>{const r=normalizeSlotValue(e);n.slots.default=()=>r},initSlots=(n,e)=>{if(n.vnode.shapeFlag&32){const r=e._;r?(n.slots=toRaw(e),def(e,"_",r)):normalizeObjectSlots(e,n.slots={})}else n.slots={},e&&normalizeVNodeSlots(n,e);def(n.slots,InternalObjectKey,1)},updateSlots=(n,e,r)=>{const{vnode:s,slots:o}=n;let a=!0,l=EMPTY_OBJ;if(s.shapeFlag&32){const c=e._;c?r&&c===1?a=!1:(extend$3(o,e),!r&&c===1&&delete o._):(a=!e.$stable,normalizeObjectSlots(e,o)),l=e}else e&&(normalizeVNodeSlots(n,e),l={default:1});if(a)for(const c in o)!isInternalKey(c)&&!(c in l)&&delete o[c]};function createAppContext(){return{app:null,config:{isNativeTag:NO,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 uid$1=0;function createAppAPI(n,e){return function(s,o=null){isFunction(s)||(s=Object.assign({},s)),o!=null&&!isObject$2(o)&&(o=null);const a=createAppContext(),l=new Set;let c=!1;const u=a.app={_uid:uid$1++,_component:s,_props:o,_container:null,_context:a,_instance:null,version:version$2,get config(){return a.config},set config(f){},use(f,...d){return l.has(f)||(f&&isFunction(f.install)?(l.add(f),f.install(u,...d)):isFunction(f)&&(l.add(f),f(u,...d))),u},mixin(f){return a.mixins.includes(f)||a.mixins.push(f),u},component(f,d){return d?(a.components[f]=d,u):a.components[f]},directive(f,d){return d?(a.directives[f]=d,u):a.directives[f]},mount(f,d,g){if(!c){const m=createVNode(s,o);return m.appContext=a,d&&e?e(m,f):n(m,f,g),c=!0,u._container=f,f.__vue_app__=u,getExposeProxy(m.component)||m.component.proxy}},unmount(){c&&(n(null,u._container),delete u._container.__vue_app__)},provide(f,d){return a.provides[f]=d,u}};return u}}function setRef(n,e,r,s,o=!1){if(isArray(n)){n.forEach((m,_)=>setRef(m,e&&(isArray(e)?e[_]:e),r,s,o));return}if(isAsyncWrapper(s)&&!o)return;const a=s.shapeFlag&4?getExposeProxy(s.component)||s.component.proxy:s.el,l=o?null:a,{i:c,r:u}=n,f=e&&e.r,d=c.refs===EMPTY_OBJ?c.refs={}:c.refs,g=c.setupState;if(f!=null&&f!==u&&(isString(f)?(d[f]=null,hasOwn$2(g,f)&&(g[f]=null)):isRef(f)&&(f.value=null)),isFunction(u))callWithErrorHandling(u,c,12,[l,d]);else{const m=isString(u),_=isRef(u);if(m||_){const E=()=>{if(n.f){const A=m?hasOwn$2(g,u)?g[u]:d[u]:u.value;o?isArray(A)&&remove$1(A,a):isArray(A)?A.includes(a)||A.push(a):m?(d[u]=[a],hasOwn$2(g,u)&&(g[u]=d[u])):(u.value=[a],n.k&&(d[n.k]=u.value))}else m?(d[u]=l,hasOwn$2(g,u)&&(g[u]=l)):_&&(u.value=l,n.k&&(d[n.k]=l))};l?(E.id=-1,queuePostRenderEffect(E,r)):E()}}}const queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(n){return baseCreateRenderer(n)}function baseCreateRenderer(n,e){const r=getGlobalThis();r.__VUE__=!0;const{insert:s,remove:o,patchProp:a,createElement:l,createText:c,createComment:u,setText:f,setElementText:d,parentNode:g,nextSibling:m,setScopeId:_=NOOP,insertStaticContent:E}=n,A=(W,Q,X,Y=null,Z=null,se=null,ae=!1,re=null,oe=!!Q.dynamicChildren)=>{if(W===Q)return;W&&!isSameVNodeType(W,Q)&&(Y=Ae(W),ge(W,Z,se,!0),W=null),Q.patchFlag===-2&&(oe=!1,Q.dynamicChildren=null);const{type:te,ref:de,shapeFlag:ue}=Q;switch(te){case Text$1:b(W,Q,X,Y);break;case Comment:v(W,Q,X,Y);break;case Static:W==null&&M(Q,X,Y,ae);break;case Fragment:G(W,Q,X,Y,Z,se,ae,re,oe);break;default:ue&1?L(W,Q,X,Y,Z,se,ae,re,oe):ue&6?J(W,Q,X,Y,Z,se,ae,re,oe):(ue&64||ue&128)&&te.process(W,Q,X,Y,Z,se,ae,re,oe,Me)}de!=null&&Z&&setRef(de,W&&W.ref,se,Q||W,!Q)},b=(W,Q,X,Y)=>{if(W==null)s(Q.el=c(Q.children),X,Y);else{const Z=Q.el=W.el;Q.children!==W.children&&f(Z,Q.children)}},v=(W,Q,X,Y)=>{W==null?s(Q.el=u(Q.children||""),X,Y):Q.el=W.el},M=(W,Q,X,Y)=>{[W.el,W.anchor]=E(W.children,Q,X,Y,W.el,W.anchor)},V=({el:W,anchor:Q},X,Y)=>{let Z;for(;W&&W!==Q;)Z=m(W),s(W,X,Y),W=Z;s(Q,X,Y)},R=({el:W,anchor:Q})=>{let X;for(;W&&W!==Q;)X=m(W),o(W),W=X;o(Q)},L=(W,Q,X,Y,Z,se,ae,re,oe)=>{ae=ae||Q.type==="svg",W==null?N(Q,X,Y,Z,se,ae,re,oe):H(W,Q,Z,se,ae,re,oe)},N=(W,Q,X,Y,Z,se,ae,re)=>{let oe,te;const{type:de,props:ue,shapeFlag:pe,transition:_e,dirs:ye}=W;if(oe=W.el=l(W.type,se,ue&&ue.is,ue),pe&8?d(oe,W.children):pe&16&&$(W.children,oe,null,Y,Z,se&&de!=="foreignObject",ae,re),ye&&invokeDirectiveHook(W,null,Y,"created"),I(oe,W,W.scopeId,ae,Y),ue){for(const ve in ue)ve!=="value"&&!isReservedProp(ve)&&a(oe,ve,null,ue[ve],se,W.children,Y,Z,Ce);"value"in ue&&a(oe,"value",null,ue.value),(te=ue.onVnodeBeforeMount)&&invokeVNodeHook(te,Y,W)}ye&&invokeDirectiveHook(W,null,Y,"beforeMount");const xe=(!Z||Z&&!Z.pendingBranch)&&_e&&!_e.persisted;xe&&_e.beforeEnter(oe),s(oe,Q,X),((te=ue&&ue.onVnodeMounted)||xe||ye)&&queuePostRenderEffect(()=>{te&&invokeVNodeHook(te,Y,W),xe&&_e.enter(oe),ye&&invokeDirectiveHook(W,null,Y,"mounted")},Z)},I=(W,Q,X,Y,Z)=>{if(X&&_(W,X),Y)for(let se=0;se{for(let te=oe;te{const re=Q.el=W.el;let{patchFlag:oe,dynamicChildren:te,dirs:de}=Q;oe|=W.patchFlag&16;const ue=W.props||EMPTY_OBJ,pe=Q.props||EMPTY_OBJ;let _e;X&&toggleRecurse(X,!1),(_e=pe.onVnodeBeforeUpdate)&&invokeVNodeHook(_e,X,Q,W),de&&invokeDirectiveHook(Q,W,X,"beforeUpdate"),X&&toggleRecurse(X,!0);const ye=Z&&Q.type!=="foreignObject";if(te?k(W.dynamicChildren,te,re,X,Y,ye,se):ae||fe(W,Q,re,null,X,Y,ye,se,!1),oe>0){if(oe&16)q(re,Q,ue,pe,X,Y,Z);else if(oe&2&&ue.class!==pe.class&&a(re,"class",null,pe.class,Z),oe&4&&a(re,"style",ue.style,pe.style,Z),oe&8){const xe=Q.dynamicProps;for(let ve=0;ve{_e&&invokeVNodeHook(_e,X,Q,W),de&&invokeDirectiveHook(Q,W,X,"updated")},Y)},k=(W,Q,X,Y,Z,se,ae)=>{for(let re=0;re{if(X!==Y){if(X!==EMPTY_OBJ)for(const re in X)!isReservedProp(re)&&!(re in Y)&&a(W,re,X[re],null,ae,Q.children,Z,se,Ce);for(const re in Y){if(isReservedProp(re))continue;const oe=Y[re],te=X[re];oe!==te&&re!=="value"&&a(W,re,te,oe,ae,Q.children,Z,se,Ce)}"value"in Y&&a(W,"value",X.value,Y.value)}},G=(W,Q,X,Y,Z,se,ae,re,oe)=>{const te=Q.el=W?W.el:c(""),de=Q.anchor=W?W.anchor:c("");let{patchFlag:ue,dynamicChildren:pe,slotScopeIds:_e}=Q;_e&&(re=re?re.concat(_e):_e),W==null?(s(te,X,Y),s(de,X,Y),$(Q.children,X,de,Z,se,ae,re,oe)):ue>0&&ue&64&&pe&&W.dynamicChildren?(k(W.dynamicChildren,pe,X,Z,se,ae,re),(Q.key!=null||Z&&Q===Z.subTree)&&traverseStaticChildren(W,Q,!0)):fe(W,Q,X,de,Z,se,ae,re,oe)},J=(W,Q,X,Y,Z,se,ae,re,oe)=>{Q.slotScopeIds=re,W==null?Q.shapeFlag&512?Z.ctx.activate(Q,X,Y,ae,oe):ne(Q,X,Y,Z,se,ae,oe):ce(W,Q,oe)},ne=(W,Q,X,Y,Z,se,ae)=>{const re=W.component=createComponentInstance(W,Y,Z);if(isKeepAlive(W)&&(re.ctx.renderer=Me),setupComponent(re),re.asyncDep){if(Z&&Z.registerDep(re,le),!W.el){const oe=re.subTree=createVNode(Comment);v(null,oe,Q,X)}return}le(re,W,Q,X,Z,se,ae)},ce=(W,Q,X)=>{const Y=Q.component=W.component;if(shouldUpdateComponent(W,Q,X))if(Y.asyncDep&&!Y.asyncResolved){me(Y,Q,X);return}else Y.next=Q,invalidateJob(Y.update),Y.update();else Q.el=W.el,Y.vnode=Q},le=(W,Q,X,Y,Z,se,ae)=>{const re=()=>{if(W.isMounted){let{next:de,bu:ue,u:pe,parent:_e,vnode:ye}=W,xe=de,ve;toggleRecurse(W,!1),de?(de.el=ye.el,me(W,de,ae)):de=ye,ue&&invokeArrayFns(ue),(ve=de.props&&de.props.onVnodeBeforeUpdate)&&invokeVNodeHook(ve,_e,de,ye),toggleRecurse(W,!0);const we=renderComponentRoot(W),Oe=W.subTree;W.subTree=we,A(Oe,we,g(Oe.el),Ae(Oe),W,Z,se),de.el=we.el,xe===null&&updateHOCHostEl(W,we.el),pe&&queuePostRenderEffect(pe,Z),(ve=de.props&&de.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(ve,_e,de,ye),Z)}else{let de;const{el:ue,props:pe}=Q,{bm:_e,m:ye,parent:xe}=W,ve=isAsyncWrapper(Q);if(toggleRecurse(W,!1),_e&&invokeArrayFns(_e),!ve&&(de=pe&&pe.onVnodeBeforeMount)&&invokeVNodeHook(de,xe,Q),toggleRecurse(W,!0),ue&&Ne){const we=()=>{W.subTree=renderComponentRoot(W),Ne(ue,W.subTree,W,Z,null)};ve?Q.type.__asyncLoader().then(()=>!W.isUnmounted&&we()):we()}else{const we=W.subTree=renderComponentRoot(W);A(null,we,X,Y,W,Z,se),Q.el=we.el}if(ye&&queuePostRenderEffect(ye,Z),!ve&&(de=pe&&pe.onVnodeMounted)){const we=Q;queuePostRenderEffect(()=>invokeVNodeHook(de,xe,we),Z)}(Q.shapeFlag&256||xe&&isAsyncWrapper(xe.vnode)&&xe.vnode.shapeFlag&256)&&W.a&&queuePostRenderEffect(W.a,Z),W.isMounted=!0,Q=X=Y=null}},oe=W.effect=new ReactiveEffect(re,()=>queueJob(te),W.scope),te=W.update=()=>oe.run();te.id=W.uid,toggleRecurse(W,!0),te()},me=(W,Q,X)=>{Q.component=W;const Y=W.vnode.props;W.vnode=Q,W.next=null,updateProps(W,Q.props,Y,X),updateSlots(W,Q.children,X),pauseTracking(),flushPreFlushCbs(),resetTracking()},fe=(W,Q,X,Y,Z,se,ae,re,oe=!1)=>{const te=W&&W.children,de=W?W.shapeFlag:0,ue=Q.children,{patchFlag:pe,shapeFlag:_e}=Q;if(pe>0){if(pe&128){K(te,ue,X,Y,Z,se,ae,re,oe);return}else if(pe&256){ee(te,ue,X,Y,Z,se,ae,re,oe);return}}_e&8?(de&16&&Ce(te,Z,se),ue!==te&&d(X,ue)):de&16?_e&16?K(te,ue,X,Y,Z,se,ae,re,oe):Ce(te,Z,se,!0):(de&8&&d(X,""),_e&16&&$(ue,X,Y,Z,se,ae,re,oe))},ee=(W,Q,X,Y,Z,se,ae,re,oe)=>{W=W||EMPTY_ARR,Q=Q||EMPTY_ARR;const te=W.length,de=Q.length,ue=Math.min(te,de);let pe;for(pe=0;pede?Ce(W,Z,se,!0,!1,ue):$(Q,X,Y,Z,se,ae,re,oe,ue)},K=(W,Q,X,Y,Z,se,ae,re,oe)=>{let te=0;const de=Q.length;let ue=W.length-1,pe=de-1;for(;te<=ue&&te<=pe;){const _e=W[te],ye=Q[te]=oe?cloneIfMounted(Q[te]):normalizeVNode(Q[te]);if(isSameVNodeType(_e,ye))A(_e,ye,X,null,Z,se,ae,re,oe);else break;te++}for(;te<=ue&&te<=pe;){const _e=W[ue],ye=Q[pe]=oe?cloneIfMounted(Q[pe]):normalizeVNode(Q[pe]);if(isSameVNodeType(_e,ye))A(_e,ye,X,null,Z,se,ae,re,oe);else break;ue--,pe--}if(te>ue){if(te<=pe){const _e=pe+1,ye=_epe)for(;te<=ue;)ge(W[te],Z,se,!0),te++;else{const _e=te,ye=te,xe=new Map;for(te=ye;te<=pe;te++){const ke=Q[te]=oe?cloneIfMounted(Q[te]):normalizeVNode(Q[te]);ke.key!=null&&xe.set(ke.key,te)}let ve,we=0;const Oe=pe-ye+1;let Pe=!1,Le=0;const Re=new Array(Oe);for(te=0;te=Oe){ge(ke,Z,se,!0);continue}let Te;if(ke.key!=null)Te=xe.get(ke.key);else for(ve=ye;ve<=pe;ve++)if(Re[ve-ye]===0&&isSameVNodeType(ke,Q[ve])){Te=ve;break}Te===void 0?ge(ke,Z,se,!0):(Re[Te-ye]=te+1,Te>=Le?Le=Te:Pe=!0,A(ke,Q[Te],X,null,Z,se,ae,re,oe),we++)}const Ie=Pe?getSequence(Re):EMPTY_ARR;for(ve=Ie.length-1,te=Oe-1;te>=0;te--){const ke=ye+te,Te=Q[ke],$e=ke+1{const{el:se,type:ae,transition:re,children:oe,shapeFlag:te}=W;if(te&6){he(W.component.subTree,Q,X,Y);return}if(te&128){W.suspense.move(Q,X,Y);return}if(te&64){ae.move(W,Q,X,Me);return}if(ae===Fragment){s(se,Q,X);for(let ue=0;uere.enter(se),Z);else{const{leave:ue,delayLeave:pe,afterLeave:_e}=re,ye=()=>s(se,Q,X),xe=()=>{ue(se,()=>{ye(),_e&&_e()})};pe?pe(se,ye,xe):xe()}else s(se,Q,X)},ge=(W,Q,X,Y=!1,Z=!1)=>{const{type:se,props:ae,ref:re,children:oe,dynamicChildren:te,shapeFlag:de,patchFlag:ue,dirs:pe}=W;if(re!=null&&setRef(re,null,X,W,!0),de&256){Q.ctx.deactivate(W);return}const _e=de&1&&pe,ye=!isAsyncWrapper(W);let xe;if(ye&&(xe=ae&&ae.onVnodeBeforeUnmount)&&invokeVNodeHook(xe,Q,W),de&6)Ee(W.component,X,Y);else{if(de&128){W.suspense.unmount(X,Y);return}_e&&invokeDirectiveHook(W,null,Q,"beforeUnmount"),de&64?W.type.remove(W,Q,X,Z,Me,Y):te&&(se!==Fragment||ue>0&&ue&64)?Ce(te,Q,X,!1,!0):(se===Fragment&&ue&384||!Z&&de&16)&&Ce(oe,Q,X),Y&&be(W)}(ye&&(xe=ae&&ae.onVnodeUnmounted)||_e)&&queuePostRenderEffect(()=>{xe&&invokeVNodeHook(xe,Q,W),_e&&invokeDirectiveHook(W,null,Q,"unmounted")},X)},be=W=>{const{type:Q,el:X,anchor:Y,transition:Z}=W;if(Q===Fragment){Se(X,Y);return}if(Q===Static){R(W);return}const se=()=>{o(X),Z&&!Z.persisted&&Z.afterLeave&&Z.afterLeave()};if(W.shapeFlag&1&&Z&&!Z.persisted){const{leave:ae,delayLeave:re}=Z,oe=()=>ae(X,se);re?re(W.el,se,oe):oe()}else se()},Se=(W,Q)=>{let X;for(;W!==Q;)X=m(W),o(W),W=X;o(Q)},Ee=(W,Q,X)=>{const{bum:Y,scope:Z,update:se,subTree:ae,um:re}=W;Y&&invokeArrayFns(Y),Z.stop(),se&&(se.active=!1,ge(ae,W,Q,X)),re&&queuePostRenderEffect(re,Q),queuePostRenderEffect(()=>{W.isUnmounted=!0},Q),Q&&Q.pendingBranch&&!Q.isUnmounted&&W.asyncDep&&!W.asyncResolved&&W.suspenseId===Q.pendingId&&(Q.deps--,Q.deps===0&&Q.resolve())},Ce=(W,Q,X,Y=!1,Z=!1,se=0)=>{for(let ae=se;aeW.shapeFlag&6?Ae(W.component.subTree):W.shapeFlag&128?W.suspense.next():m(W.anchor||W.el),De=(W,Q,X)=>{W==null?Q._vnode&&ge(Q._vnode,null,null,!0):A(Q._vnode||null,W,Q,null,null,null,X),flushPreFlushCbs(),flushPostFlushCbs(),Q._vnode=W},Me={p:A,um:ge,m:he,r:be,mt:ne,mc:$,pc:fe,pbc:k,n:Ae,o:n};let Be,Ne;return e&&([Be,Ne]=e(Me)),{render:De,hydrate:Be,createApp:createAppAPI(De,Be)}}function toggleRecurse({effect:n,update:e},r){n.allowRecurse=e.allowRecurse=r}function traverseStaticChildren(n,e,r=!1){const s=n.children,o=e.children;if(isArray(s)&&isArray(o))for(let a=0;a>1,n[r[c]]0&&(e[s]=r[a-1]),r[a]=s)}}for(a=r.length,l=r[a-1];a-- >0;)r[a]=l,l=e[l];return r}const isTeleport=n=>n.__isTeleport,Fragment=Symbol(void 0),Text$1=Symbol(void 0),Comment=Symbol(void 0),Static=Symbol(void 0),blockStack=[];let currentBlock=null;function openBlock(n=!1){blockStack.push(currentBlock=n?null:[])}function closeBlock(){blockStack.pop(),currentBlock=blockStack[blockStack.length-1]||null}let isBlockTreeEnabled=1;function setBlockTracking(n){isBlockTreeEnabled+=n}function setupBlock(n){return n.dynamicChildren=isBlockTreeEnabled>0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(n),n}function createElementBlock(n,e,r,s,o,a){return setupBlock(createBaseVNode(n,e,r,s,o,a,!0))}function createBlock(n,e,r,s,o){return setupBlock(createVNode(n,e,r,s,o,!0))}function isVNode(n){return n?n.__v_isVNode===!0:!1}function isSameVNodeType(n,e){return n.type===e.type&&n.key===e.key}const InternalObjectKey="__vInternal",normalizeKey=({key:n})=>n??null,normalizeRef=({ref:n,ref_key:e,ref_for:r})=>n!=null?isString(n)||isRef(n)||isFunction(n)?{i:currentRenderingInstance,r:n,k:e,f:!!r}:n:null;function createBaseVNode(n,e=null,r=null,s=0,o=null,a=n===Fragment?0:1,l=!1,c=!1){const u={__v_isVNode:!0,__v_skip:!0,type:n,props:e,key:e&&normalizeKey(e),ref:e&&normalizeRef(e),scopeId:currentScopeId,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return c?(normalizeChildren(u,r),a&128&&n.normalize(u)):r&&(u.shapeFlag|=isString(r)?8:16),isBlockTreeEnabled>0&&!l&¤tBlock&&(u.patchFlag>0||a&6)&&u.patchFlag!==32&¤tBlock.push(u),u}const createVNode=_createVNode;function _createVNode(n,e=null,r=null,s=0,o=null,a=!1){if((!n||n===NULL_DYNAMIC_COMPONENT)&&(n=Comment),isVNode(n)){const c=cloneVNode(n,e,!0);return r&&normalizeChildren(c,r),isBlockTreeEnabled>0&&!a&¤tBlock&&(c.shapeFlag&6?currentBlock[currentBlock.indexOf(n)]=c:currentBlock.push(c)),c.patchFlag|=-2,c}if(isClassComponent(n)&&(n=n.__vccOpts),e){e=guardReactiveProps(e);let{class:c,style:u}=e;c&&!isString(c)&&(e.class=normalizeClass(c)),isObject$2(u)&&(isProxy(u)&&!isArray(u)&&(u=extend$3({},u)),e.style=normalizeStyle(u))}const l=isString(n)?1:isSuspense(n)?128:isTeleport(n)?64:isObject$2(n)?4:isFunction(n)?2:0;return createBaseVNode(n,e,r,s,o,l,a,!0)}function guardReactiveProps(n){return n?isProxy(n)||InternalObjectKey in n?extend$3({},n):n:null}function cloneVNode(n,e,r=!1){const{props:s,ref:o,patchFlag:a,children:l}=n,c=e?mergeProps(s||{},e):s;return{__v_isVNode:!0,__v_skip:!0,type:n.type,props:c,key:c&&normalizeKey(c),ref:e&&e.ref?r&&o?isArray(o)?o.concat(normalizeRef(e)):[o,normalizeRef(e)]:normalizeRef(e):o,scopeId:n.scopeId,slotScopeIds:n.slotScopeIds,children:l,target:n.target,targetAnchor:n.targetAnchor,staticCount:n.staticCount,shapeFlag:n.shapeFlag,patchFlag:e&&n.type!==Fragment?a===-1?16:a|16:a,dynamicProps:n.dynamicProps,dynamicChildren:n.dynamicChildren,appContext:n.appContext,dirs:n.dirs,transition:n.transition,component:n.component,suspense:n.suspense,ssContent:n.ssContent&&cloneVNode(n.ssContent),ssFallback:n.ssFallback&&cloneVNode(n.ssFallback),el:n.el,anchor:n.anchor,ctx:n.ctx,ce:n.ce}}function createTextVNode(n=" ",e=0){return createVNode(Text$1,null,n,e)}function createStaticVNode(n,e){const r=createVNode(Static,null,n);return r.staticCount=e,r}function createCommentVNode(n="",e=!1){return e?(openBlock(),createBlock(Comment,null,n)):createVNode(Comment,null,n)}function normalizeVNode(n){return n==null||typeof n=="boolean"?createVNode(Comment):isArray(n)?createVNode(Fragment,null,n.slice()):typeof n=="object"?cloneIfMounted(n):createVNode(Text$1,null,String(n))}function cloneIfMounted(n){return n.el===null&&n.patchFlag!==-1||n.memo?n:cloneVNode(n)}function normalizeChildren(n,e){let r=0;const{shapeFlag:s}=n;if(e==null)e=null;else if(isArray(e))r=16;else if(typeof e=="object")if(s&65){const o=e.default;o&&(o._c&&(o._d=!1),normalizeChildren(n,o()),o._c&&(o._d=!0));return}else{r=32;const o=e._;!o&&!(InternalObjectKey in e)?e._ctx=currentRenderingInstance:o===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?e._=1:(e._=2,n.patchFlag|=1024))}else isFunction(e)?(e={default:e,_ctx:currentRenderingInstance},r=32):(e=String(e),s&64?(r=16,e=[createTextVNode(e)]):r=8);n.children=e,n.shapeFlag|=r}function mergeProps(...n){const e={};for(let r=0;r{currentInstance=n,n.scope.on()},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),currentInstance=null};function isStatefulComponent(n){return n.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(n,e=!1){isInSSRComponentSetup=e;const{props:r,children:s}=n.vnode,o=isStatefulComponent(n);initProps(n,r,o,e),initSlots(n,s);const a=o?setupStatefulComponent(n,e):void 0;return isInSSRComponentSetup=!1,a}function setupStatefulComponent(n,e){const r=n.type;n.accessCache=Object.create(null),n.proxy=markRaw(new Proxy(n.ctx,PublicInstanceProxyHandlers));const{setup:s}=r;if(s){const o=n.setupContext=s.length>1?createSetupContext(n):null;setCurrentInstance(n),pauseTracking();const a=callWithErrorHandling(s,n,0,[n.props,o]);if(resetTracking(),unsetCurrentInstance(),isPromise(a)){if(a.then(unsetCurrentInstance,unsetCurrentInstance),e)return a.then(l=>{handleSetupResult(n,l,e)}).catch(l=>{handleError(l,n,0)});n.asyncDep=a}else handleSetupResult(n,a,e)}else finishComponentSetup(n,e)}function handleSetupResult(n,e,r){isFunction(e)?n.type.__ssrInlineRender?n.ssrRender=e:n.render=e:isObject$2(e)&&(n.setupState=proxyRefs(e)),finishComponentSetup(n,r)}let compile;function finishComponentSetup(n,e,r){const s=n.type;if(!n.render){if(!e&&compile&&!s.render){const o=s.template||resolveMergedOptions(n).template;if(o){const{isCustomElement:a,compilerOptions:l}=n.appContext.config,{delimiters:c,compilerOptions:u}=s,f=extend$3(extend$3({isCustomElement:a,delimiters:c},l),u);s.render=compile(o,f)}}n.render=s.render||NOOP}setCurrentInstance(n),pauseTracking(),applyOptions(n),resetTracking(),unsetCurrentInstance()}function createAttrsProxy(n){return new Proxy(n.attrs,{get(e,r){return track(n,"get","$attrs"),e[r]}})}function createSetupContext(n){const e=s=>{n.exposed=s||{}};let r;return{get attrs(){return r||(r=createAttrsProxy(n))},slots:n.slots,emit:n.emit,expose:e}}function getExposeProxy(n){if(n.exposed)return n.exposeProxy||(n.exposeProxy=new Proxy(proxyRefs(markRaw(n.exposed)),{get(e,r){if(r in e)return e[r];if(r in publicPropertiesMap)return publicPropertiesMap[r](n)},has(e,r){return r in e||r in publicPropertiesMap}}))}function getComponentName(n,e=!0){return isFunction(n)?n.displayName||n.name:n.name||e&&n.__name}function isClassComponent(n){return isFunction(n)&&"__vccOpts"in n}const computed=(n,e)=>computed$1(n,e,isInSSRComponentSetup);function h$1(n,e,r){const s=arguments.length;return s===2?isObject$2(e)&&!isArray(e)?isVNode(e)?createVNode(n,null,[e]):createVNode(n,e):createVNode(n,null,e):(s>3?r=Array.prototype.slice.call(arguments,2):s===3&&isVNode(r)&&(r=[r]),createVNode(n,e,r))}const ssrContextKey=Symbol(""),useSSRContext=()=>inject(ssrContextKey),version$2="3.2.47",svgNS="http://www.w3.org/2000/svg",doc$1=typeof document<"u"?document:null,templateContainer=doc$1&&doc$1.createElement("template"),nodeOps={insert:(n,e,r)=>{e.insertBefore(n,r||null)},remove:n=>{const e=n.parentNode;e&&e.removeChild(n)},createElement:(n,e,r,s)=>{const o=e?doc$1.createElementNS(svgNS,n):doc$1.createElement(n,r?{is:r}:void 0);return n==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:n=>doc$1.createTextNode(n),createComment:n=>doc$1.createComment(n),setText:(n,e)=>{n.nodeValue=e},setElementText:(n,e)=>{n.textContent=e},parentNode:n=>n.parentNode,nextSibling:n=>n.nextSibling,querySelector:n=>doc$1.querySelector(n),setScopeId(n,e){n.setAttribute(e,"")},insertStaticContent(n,e,r,s,o,a){const l=r?r.previousSibling:e.lastChild;if(o&&(o===a||o.nextSibling))for(;e.insertBefore(o.cloneNode(!0),r),!(o===a||!(o=o.nextSibling)););else{templateContainer.innerHTML=s?`${n}`:n;const c=templateContainer.content;if(s){const u=c.firstChild;for(;u.firstChild;)c.appendChild(u.firstChild);c.removeChild(u)}e.insertBefore(c,r)}return[l?l.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}};function patchClass(n,e,r){const s=n._vtc;s&&(e=(e?[e,...s]:[...s]).join(" ")),e==null?n.removeAttribute("class"):r?n.setAttribute("class",e):n.className=e}function patchStyle(n,e,r){const s=n.style,o=isString(r);if(r&&!o){if(e&&!isString(e))for(const a in e)r[a]==null&&setStyle(s,a,"");for(const a in r)setStyle(s,a,r[a])}else{const a=s.display;o?e!==r&&(s.cssText=r):e&&n.removeAttribute("style"),"_vod"in n&&(s.display=a)}}const importantRE=/\s*!important$/;function setStyle(n,e,r){if(isArray(r))r.forEach(s=>setStyle(n,e,s));else if(r==null&&(r=""),e.startsWith("--"))n.setProperty(e,r);else{const s=autoPrefix(n,e);importantRE.test(r)?n.setProperty(hyphenate(s),r.replace(importantRE,""),"important"):n[s]=r}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(n,e){const r=prefixCache[e];if(r)return r;let s=camelize(e);if(s!=="filter"&&s in n)return prefixCache[e]=s;s=capitalize(s);for(let o=0;ocachedNow||(p.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(n,e){const r=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=r.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(s,r.value),e,5,[s])};return r.value=n,r.attached=getNow(),r}function patchStopImmediatePropagation(n,e){if(isArray(e)){const r=n.stopImmediatePropagation;return n.stopImmediatePropagation=()=>{r.call(n),n._stopped=!0},e.map(s=>o=>!o._stopped&&s&&s(o))}else return e}const nativeOnRE=/^on[a-z]/,patchProp=(n,e,r,s,o=!1,a,l,c,u)=>{e==="class"?patchClass(n,s,o):e==="style"?patchStyle(n,r,s):isOn(e)?isModelListener(e)||patchEvent(n,e,r,s,l):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):shouldSetAsProp(n,e,s,o))?patchDOMProp(n,e,s,a,l,c,u):(e==="true-value"?n._trueValue=s:e==="false-value"&&(n._falseValue=s),patchAttr(n,e,s,o))};function shouldSetAsProp(n,e,r,s){return s?!!(e==="innerHTML"||e==="textContent"||e in n&&nativeOnRE.test(e)&&isFunction(r)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&n.tagName==="INPUT"||e==="type"&&n.tagName==="TEXTAREA"||nativeOnRE.test(e)&&isString(r)?!1:e in n}const getModelAssigner=n=>{const e=n.props["onUpdate:modelValue"]||!1;return isArray(e)?r=>invokeArrayFns(e,r):e};function onCompositionStart(n){n.target.composing=!0}function onCompositionEnd(n){const e=n.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const vModelText={created(n,{modifiers:{lazy:e,trim:r,number:s}},o){n._assign=getModelAssigner(o);const a=s||o.props&&o.props.type==="number";addEventListener(n,e?"change":"input",l=>{if(l.target.composing)return;let c=n.value;r&&(c=c.trim()),a&&(c=looseToNumber(c)),n._assign(c)}),r&&addEventListener(n,"change",()=>{n.value=n.value.trim()}),e||(addEventListener(n,"compositionstart",onCompositionStart),addEventListener(n,"compositionend",onCompositionEnd),addEventListener(n,"change",onCompositionEnd))},mounted(n,{value:e}){n.value=e??""},beforeUpdate(n,{value:e,modifiers:{lazy:r,trim:s,number:o}},a){if(n._assign=getModelAssigner(a),n.composing||document.activeElement===n&&n.type!=="range"&&(r||s&&n.value.trim()===e||(o||n.type==="number")&&looseToNumber(n.value)===e))return;const l=e??"";n.value!==l&&(n.value=l)}},vModelCheckbox={deep:!0,created(n,e,r){n._assign=getModelAssigner(r),addEventListener(n,"change",()=>{const s=n._modelValue,o=getValue(n),a=n.checked,l=n._assign;if(isArray(s)){const c=looseIndexOf(s,o),u=c!==-1;if(a&&!u)l(s.concat(o));else if(!a&&u){const f=[...s];f.splice(c,1),l(f)}}else if(isSet(s)){const c=new Set(s);a?c.add(o):c.delete(o),l(c)}else l(getCheckboxValue(n,a))})},mounted:setChecked,beforeUpdate(n,e,r){n._assign=getModelAssigner(r),setChecked(n,e,r)}};function setChecked(n,{value:e,oldValue:r},s){n._modelValue=e,isArray(e)?n.checked=looseIndexOf(e,s.props.value)>-1:isSet(e)?n.checked=e.has(s.props.value):e!==r&&(n.checked=looseEqual(e,getCheckboxValue(n,!0)))}const vModelSelect={deep:!0,created(n,{value:e,modifiers:{number:r}},s){const o=isSet(e);addEventListener(n,"change",()=>{const a=Array.prototype.filter.call(n.options,l=>l.selected).map(l=>r?looseToNumber(getValue(l)):getValue(l));n._assign(n.multiple?o?new Set(a):a:a[0])}),n._assign=getModelAssigner(s)},mounted(n,{value:e}){setSelected(n,e)},beforeUpdate(n,e,r){n._assign=getModelAssigner(r)},updated(n,{value:e}){setSelected(n,e)}};function setSelected(n,e){const r=n.multiple;if(!(r&&!isArray(e)&&!isSet(e))){for(let s=0,o=n.options.length;s-1:a.selected=e.has(l);else if(looseEqual(getValue(a),e)){n.selectedIndex!==s&&(n.selectedIndex=s);return}}!r&&n.selectedIndex!==-1&&(n.selectedIndex=-1)}}function getValue(n){return"_value"in n?n._value:n.value}function getCheckboxValue(n,e){const r=e?"_trueValue":"_falseValue";return r in n?n[r]:e}const systemModifiers=["ctrl","shift","alt","meta"],modifierGuards={stop:n=>n.stopPropagation(),prevent:n=>n.preventDefault(),self:n=>n.target!==n.currentTarget,ctrl:n=>!n.ctrlKey,shift:n=>!n.shiftKey,alt:n=>!n.altKey,meta:n=>!n.metaKey,left:n=>"button"in n&&n.button!==0,middle:n=>"button"in n&&n.button!==1,right:n=>"button"in n&&n.button!==2,exact:(n,e)=>systemModifiers.some(r=>n[`${r}Key`]&&!e.includes(r))},withModifiers=(n,e)=>(r,...s)=>{for(let o=0;o{const e=ensureRenderer().createApp(...n),{mount:r}=e;return e.mount=s=>{const o=normalizeContainer(s);if(!o)return;const a=e._component;!isFunction(a)&&!a.render&&!a.template&&(a.template=o.innerHTML),o.innerHTML="";const l=r(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},e};function normalizeContainer(n){return isString(n)?document.querySelector(n):n}const _export_sfc=(n,e)=>{const r=n.__vccOpts||n;for(const[s,o]of e)r[s]=o;return r},_sfc_main$g={props:{graph:{required:!0}},data(){return{graphType:"basic",graphDir:"right",graphText:`a/b/c +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function r(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(o){if(o.ep)return;o.ep=!0;const a=r(o);fetch(o.href,a)}})();function makeMap(n,e){const r=Object.create(null),s=n.split(",");for(let o=0;o!!r[o.toLowerCase()]:o=>!!r[o]}function normalizeStyle(n){if(isArray(n)){const e={};for(let r=0;r{if(r){const s=r.split(propertyDelimiterRE);s.length>1&&(e[s[0].trim()]=s[1].trim())}}),e}function normalizeClass(n){let e="";if(isString(n))e=n;else if(isArray(n))for(let r=0;rlooseEqual(r,e))}const toDisplayString=n=>isString(n)?n:n==null?"":isArray(n)||isObject$2(n)&&(n.toString===objectToString||!isFunction(n.toString))?JSON.stringify(n,replacer,2):String(n),replacer=(n,e)=>e&&e.__v_isRef?replacer(n,e.value):isMap(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((r,[s,o])=>(r[`${s} =>`]=o,r),{})}:isSet(e)?{[`Set(${e.size})`]:[...e.values()]}:isObject$2(e)&&!isArray(e)&&!isPlainObject(e)?String(e):e,EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,onRE=/^on[^a-z]/,isOn=n=>onRE.test(n),isModelListener=n=>n.startsWith("onUpdate:"),extend$3=Object.assign,remove$1=(n,e)=>{const r=n.indexOf(e);r>-1&&n.splice(r,1)},hasOwnProperty$1=Object.prototype.hasOwnProperty,hasOwn$2=(n,e)=>hasOwnProperty$1.call(n,e),isArray=Array.isArray,isMap=n=>toTypeString(n)==="[object Map]",isSet=n=>toTypeString(n)==="[object Set]",isDate=n=>toTypeString(n)==="[object Date]",isFunction=n=>typeof n=="function",isString=n=>typeof n=="string",isSymbol=n=>typeof n=="symbol",isObject$2=n=>n!==null&&typeof n=="object",isPromise=n=>isObject$2(n)&&isFunction(n.then)&&isFunction(n.catch),objectToString=Object.prototype.toString,toTypeString=n=>objectToString.call(n),toRawType=n=>toTypeString(n).slice(8,-1),isPlainObject=n=>toTypeString(n)==="[object Object]",isIntegerKey=n=>isString(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=n=>{const e=Object.create(null);return r=>e[r]||(e[r]=n(r))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction(n=>n.replace(camelizeRE,(e,r)=>r?r.toUpperCase():"")),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(n=>n.replace(hyphenateRE,"-$1").toLowerCase()),capitalize=cacheStringFunction(n=>n.charAt(0).toUpperCase()+n.slice(1)),toHandlerKey=cacheStringFunction(n=>n?`on${capitalize(n)}`:""),hasChanged=(n,e)=>!Object.is(n,e),invokeArrayFns=(n,e)=>{for(let r=0;r{Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value:r})},looseToNumber=n=>{const e=parseFloat(n);return isNaN(e)?n:e};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let activeEffectScope;class EffectScope{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=activeEffectScope,!e&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const r=activeEffectScope;try{return activeEffectScope=this,e()}finally{activeEffectScope=r}}}on(){activeEffectScope=this}off(){activeEffectScope=this.parent}stop(e){if(this._active){let r,s;for(r=0,s=this.effects.length;r{const e=new Set(n);return e.w=0,e.n=0,e},wasTracked=n=>(n.w&trackOpBit)>0,newTracked=n=>(n.n&trackOpBit)>0,initDepMarkers=({deps:n})=>{if(n.length)for(let e=0;e{const{deps:e}=n;if(e.length){let r=0;for(let s=0;s{(d==="length"||d>=u)&&c.push(f)})}else switch(r!==void 0&&c.push(l.get(r)),e){case"add":isArray(n)?isIntegerKey(r)&&c.push(l.get("length")):(c.push(l.get(ITERATE_KEY)),isMap(n)&&c.push(l.get(MAP_KEY_ITERATE_KEY)));break;case"delete":isArray(n)||(c.push(l.get(ITERATE_KEY)),isMap(n)&&c.push(l.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap(n)&&c.push(l.get(ITERATE_KEY));break}if(c.length===1)c[0]&&triggerEffects(c[0]);else{const u=[];for(const f of c)f&&u.push(...f);triggerEffects(createDep(u))}}function triggerEffects(n,e){const r=isArray(n)?n:[...n];for(const s of r)s.computed&&triggerEffect(s);for(const s of r)s.computed||triggerEffect(s)}function triggerEffect(n,e){(n!==activeEffect||n.allowRecurse)&&(n.scheduler?n.scheduler():n.run())}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(isSymbol)),get$1=createGetter(),shallowGet=createGetter(!1,!0),readonlyGet=createGetter(!0),arrayInstrumentations=createArrayInstrumentations();function createArrayInstrumentations(){const n={};return["includes","indexOf","lastIndexOf"].forEach(e=>{n[e]=function(...r){const s=toRaw(this);for(let a=0,l=this.length;a{n[e]=function(...r){pauseTracking();const s=toRaw(this)[e].apply(this,r);return resetTracking(),s}}),n}function hasOwnProperty(n){const e=toRaw(this);return track(e,"has",n),e.hasOwnProperty(n)}function createGetter(n=!1,e=!1){return function(s,o,a){if(o==="__v_isReactive")return!n;if(o==="__v_isReadonly")return n;if(o==="__v_isShallow")return e;if(o==="__v_raw"&&a===(n?e?shallowReadonlyMap:readonlyMap:e?shallowReactiveMap:reactiveMap).get(s))return s;const l=isArray(s);if(!n){if(l&&hasOwn$2(arrayInstrumentations,o))return Reflect.get(arrayInstrumentations,o,a);if(o==="hasOwnProperty")return hasOwnProperty}const c=Reflect.get(s,o,a);return(isSymbol(o)?builtInSymbols.has(o):isNonTrackableKeys(o))||(n||track(s,"get",o),e)?c:isRef(c)?l&&isIntegerKey(o)?c:c.value:isObject$2(c)?n?readonly(c):reactive(c):c}}const set$1=createSetter(),shallowSet=createSetter(!0);function createSetter(n=!1){return function(r,s,o,a){let l=r[s];if(isReadonly(l)&&isRef(l)&&!isRef(o))return!1;if(!n&&(!isShallow(o)&&!isReadonly(o)&&(l=toRaw(l),o=toRaw(o)),!isArray(r)&&isRef(l)&&!isRef(o)))return l.value=o,!0;const c=isArray(r)&&isIntegerKey(s)?Number(s)n,getProto=n=>Reflect.getPrototypeOf(n);function get(n,e,r=!1,s=!1){n=n.__v_raw;const o=toRaw(n),a=toRaw(e);r||(e!==a&&track(o,"get",e),track(o,"get",a));const{has:l}=getProto(o),c=s?toShallow:r?toReadonly:toReactive;if(l.call(o,e))return c(n.get(e));if(l.call(o,a))return c(n.get(a));n!==o&&n.get(e)}function has(n,e=!1){const r=this.__v_raw,s=toRaw(r),o=toRaw(n);return e||(n!==o&&track(s,"has",n),track(s,"has",o)),n===o?r.has(n):r.has(n)||r.has(o)}function size(n,e=!1){return n=n.__v_raw,!e&&track(toRaw(n),"iterate",ITERATE_KEY),Reflect.get(n,"size",n)}function add$1(n){n=toRaw(n);const e=toRaw(this);return getProto(e).has.call(e,n)||(e.add(n),trigger(e,"add",n,n)),this}function set(n,e){e=toRaw(e);const r=toRaw(this),{has:s,get:o}=getProto(r);let a=s.call(r,n);a||(n=toRaw(n),a=s.call(r,n));const l=o.call(r,n);return r.set(n,e),a?hasChanged(e,l)&&trigger(r,"set",n,e):trigger(r,"add",n,e),this}function deleteEntry(n){const e=toRaw(this),{has:r,get:s}=getProto(e);let o=r.call(e,n);o||(n=toRaw(n),o=r.call(e,n)),s&&s.call(e,n);const a=e.delete(n);return o&&trigger(e,"delete",n,void 0),a}function clear(){const n=toRaw(this),e=n.size!==0,r=n.clear();return e&&trigger(n,"clear",void 0,void 0),r}function createForEach(n,e){return function(s,o){const a=this,l=a.__v_raw,c=toRaw(l),u=e?toShallow:n?toReadonly:toReactive;return!n&&track(c,"iterate",ITERATE_KEY),l.forEach((f,d)=>s.call(o,u(f),u(d),a))}}function createIterableMethod(n,e,r){return function(...s){const o=this.__v_raw,a=toRaw(o),l=isMap(a),c=n==="entries"||n===Symbol.iterator&&l,u=n==="keys"&&l,f=o[n](...s),d=r?toShallow:e?toReadonly:toReactive;return!e&&track(a,"iterate",u?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:g,done:m}=f.next();return m?{value:g,done:m}:{value:c?[d(g[0]),d(g[1])]:d(g),done:m}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(n){return function(...e){return n==="delete"?!1:this}}function createInstrumentations(){const n={get(a){return get(this,a)},get size(){return size(this)},has,add:add$1,set,delete:deleteEntry,clear,forEach:createForEach(!1,!1)},e={get(a){return get(this,a,!1,!0)},get size(){return size(this)},has,add:add$1,set,delete:deleteEntry,clear,forEach:createForEach(!1,!0)},r={get(a){return get(this,a,!0)},get size(){return size(this,!0)},has(a){return has.call(this,a,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!1)},s={get(a){return get(this,a,!0,!0)},get size(){return size(this,!0)},has(a){return has.call(this,a,!0)},add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear"),forEach:createForEach(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{n[a]=createIterableMethod(a,!1,!1),r[a]=createIterableMethod(a,!0,!1),e[a]=createIterableMethod(a,!1,!0),s[a]=createIterableMethod(a,!0,!0)}),[n,r,e,s]}const[mutableInstrumentations,readonlyInstrumentations,shallowInstrumentations,shallowReadonlyInstrumentations]=createInstrumentations();function createInstrumentationGetter(n,e){const r=e?n?shallowReadonlyInstrumentations:shallowInstrumentations:n?readonlyInstrumentations:mutableInstrumentations;return(s,o,a)=>o==="__v_isReactive"?!n:o==="__v_isReadonly"?n:o==="__v_raw"?s:Reflect.get(hasOwn$2(r,o)&&o in s?r:s,o,a)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(n){return n.__v_skip||!Object.isExtensible(n)?0:targetTypeMap(toRawType(n))}function reactive(n){return isReadonly(n)?n:createReactiveObject(n,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(n){return createReactiveObject(n,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(n){return createReactiveObject(n,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function createReactiveObject(n,e,r,s,o){if(!isObject$2(n)||n.__v_raw&&!(e&&n.__v_isReactive))return n;const a=o.get(n);if(a)return a;const l=getTargetType(n);if(l===0)return n;const c=new Proxy(n,l===2?s:r);return o.set(n,c),c}function isReactive(n){return isReadonly(n)?isReactive(n.__v_raw):!!(n&&n.__v_isReactive)}function isReadonly(n){return!!(n&&n.__v_isReadonly)}function isShallow(n){return!!(n&&n.__v_isShallow)}function isProxy(n){return isReactive(n)||isReadonly(n)}function toRaw(n){const e=n&&n.__v_raw;return e?toRaw(e):n}function markRaw(n){return def(n,"__v_skip",!0),n}const toReactive=n=>isObject$2(n)?reactive(n):n,toReadonly=n=>isObject$2(n)?readonly(n):n;function trackRefValue(n){shouldTrack&&activeEffect&&(n=toRaw(n),trackEffects(n.dep||(n.dep=createDep())))}function triggerRefValue(n,e){n=toRaw(n);const r=n.dep;r&&triggerEffects(r)}function isRef(n){return!!(n&&n.__v_isRef===!0)}function shallowRef(n){return createRef(n,!0)}function createRef(n,e){return isRef(n)?n:new RefImpl(n,e)}class RefImpl{constructor(e,r){this.__v_isShallow=r,this.dep=void 0,this.__v_isRef=!0,this._rawValue=r?e:toRaw(e),this._value=r?e:toReactive(e)}get value(){return trackRefValue(this),this._value}set value(e){const r=this.__v_isShallow||isShallow(e)||isReadonly(e);e=r?e:toRaw(e),hasChanged(e,this._rawValue)&&(this._rawValue=e,this._value=r?e:toReactive(e),triggerRefValue(this))}}function unref(n){return isRef(n)?n.value:n}const shallowUnwrapHandlers={get:(n,e,r)=>unref(Reflect.get(n,e,r)),set:(n,e,r,s)=>{const o=n[e];return isRef(o)&&!isRef(r)?(o.value=r,!0):Reflect.set(n,e,r,s)}};function proxyRefs(n){return isReactive(n)?n:new Proxy(n,shallowUnwrapHandlers)}var _a$1;class ComputedRefImpl{constructor(e,r,s,o){this._setter=r,this.dep=void 0,this.__v_isRef=!0,this[_a$1]=!1,this._dirty=!0,this.effect=new ReactiveEffect(e,()=>{this._dirty||(this._dirty=!0,triggerRefValue(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=s}get value(){const e=toRaw(this);return trackRefValue(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}_a$1="__v_isReadonly";function computed$1(n,e,r=!1){let s,o;const a=isFunction(n);return a?(s=n,o=NOOP):(s=n.get,o=n.set),new ComputedRefImpl(s,o,a||!o,r)}function warn(n,...e){}function callWithErrorHandling(n,e,r,s){let o;try{o=s?n(...s):n()}catch(a){handleError(a,e,r)}return o}function callWithAsyncErrorHandling(n,e,r,s){if(isFunction(n)){const a=callWithErrorHandling(n,e,r,s);return a&&isPromise(a)&&a.catch(l=>{handleError(l,e,r)}),a}const o=[];for(let a=0;a>>1;getId(queue[s])flushIndex&&queue.splice(e,1)}function queuePostFlushCb(n){isArray(n)?pendingPostFlushCbs.push(...n):(!activePostFlushCbs||!activePostFlushCbs.includes(n,n.allowRecurse?postFlushIndex+1:postFlushIndex))&&pendingPostFlushCbs.push(n),queueFlush()}function flushPreFlushCbs(n,e=isFlushing?flushIndex+1:0){for(;egetId(r)-getId(s)),postFlushIndex=0;postFlushIndexn.id==null?1/0:n.id,comparator=(n,e)=>{const r=getId(n)-getId(e);if(r===0){if(n.pre&&!e.pre)return-1;if(e.pre&&!n.pre)return 1}return r};function flushJobs(n){isFlushPending=!1,isFlushing=!0,queue.sort(comparator);const e=NOOP;try{for(flushIndex=0;flushIndexisString(_)?_.trim():_)),g&&(o=r.map(looseToNumber))}let c,u=s[c=toHandlerKey(e)]||s[c=toHandlerKey(camelize(e))];!u&&a&&(u=s[c=toHandlerKey(hyphenate(e))]),u&&callWithAsyncErrorHandling(u,n,6,o);const f=s[c+"Once"];if(f){if(!n.emitted)n.emitted={};else if(n.emitted[c])return;n.emitted[c]=!0,callWithAsyncErrorHandling(f,n,6,o)}}function normalizeEmitsOptions(n,e,r=!1){const s=e.emitsCache,o=s.get(n);if(o!==void 0)return o;const a=n.emits;let l={},c=!1;if(!isFunction(n)){const u=f=>{const d=normalizeEmitsOptions(f,e,!0);d&&(c=!0,extend$3(l,d))};!r&&e.mixins.length&&e.mixins.forEach(u),n.extends&&u(n.extends),n.mixins&&n.mixins.forEach(u)}return!a&&!c?(isObject$2(n)&&s.set(n,null),null):(isArray(a)?a.forEach(u=>l[u]=null):extend$3(l,a),isObject$2(n)&&s.set(n,l),l)}function isEmitListener(n,e){return!n||!isOn(e)?!1:(e=e.slice(2).replace(/Once$/,""),hasOwn$2(n,e[0].toLowerCase()+e.slice(1))||hasOwn$2(n,hyphenate(e))||hasOwn$2(n,e))}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(n){const e=currentRenderingInstance;return currentRenderingInstance=n,currentScopeId=n&&n.type.__scopeId||null,e}function pushScopeId(n){currentScopeId=n}function popScopeId(){currentScopeId=null}function withCtx(n,e=currentRenderingInstance,r){if(!e||n._n)return n;const s=(...o)=>{s._d&&setBlockTracking(-1);const a=setCurrentRenderingInstance(e);let l;try{l=n(...o)}finally{setCurrentRenderingInstance(a),s._d&&setBlockTracking(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function markAttrsAccessed(){}function renderComponentRoot(n){const{type:e,vnode:r,proxy:s,withProxy:o,props:a,propsOptions:[l],slots:c,attrs:u,emit:f,render:d,renderCache:g,data:m,setupState:_,ctx:E,inheritAttrs:A}=n;let b,v;const M=setCurrentRenderingInstance(n);try{if(r.shapeFlag&4){const R=o||s;b=normalizeVNode(d.call(R,R,g,a,_,m,E)),v=u}else{const R=e;b=normalizeVNode(R.length>1?R(a,{attrs:u,slots:c,emit:f}):R(a,null)),v=e.props?u:getFunctionalFallthrough(u)}}catch(R){blockStack.length=0,handleError(R,n,1),b=createVNode(Comment)}let V=b;if(v&&A!==!1){const R=Object.keys(v),{shapeFlag:L}=V;R.length&&L&7&&(l&&R.some(isModelListener)&&(v=filterModelListeners(v,l)),V=cloneVNode(V,v))}return r.dirs&&(V=cloneVNode(V),V.dirs=V.dirs?V.dirs.concat(r.dirs):r.dirs),r.transition&&(V.transition=r.transition),b=V,setCurrentRenderingInstance(M),b}const getFunctionalFallthrough=n=>{let e;for(const r in n)(r==="class"||r==="style"||isOn(r))&&((e||(e={}))[r]=n[r]);return e},filterModelListeners=(n,e)=>{const r={};for(const s in n)(!isModelListener(s)||!(s.slice(9)in e))&&(r[s]=n[s]);return r};function shouldUpdateComponent(n,e,r){const{props:s,children:o,component:a}=n,{props:l,children:c,patchFlag:u}=e,f=a.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&u>=0){if(u&1024)return!0;if(u&16)return s?hasPropsChanged(s,l,f):!!l;if(u&8){const d=e.dynamicProps;for(let g=0;gn.__isSuspense;function queueEffectWithSuspense(n,e){e&&e.pendingBranch?isArray(n)?e.effects.push(...n):e.effects.push(n):queuePostFlushCb(n)}function provide(n,e){if(currentInstance){let r=currentInstance.provides;const s=currentInstance.parent&¤tInstance.parent.provides;s===r&&(r=currentInstance.provides=Object.create(s)),r[n]=e}}function inject(n,e,r=!1){const s=currentInstance||currentRenderingInstance;if(s){const o=s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides;if(o&&n in o)return o[n];if(arguments.length>1)return r&&isFunction(e)?e.call(s.proxy):e}}function watchPostEffect(n,e){return doWatch(n,null,{flush:"post"})}const INITIAL_WATCHER_VALUE={};function watch(n,e,r){return doWatch(n,e,r)}function doWatch(n,e,{immediate:r,deep:s,flush:o,onTrack:a,onTrigger:l}=EMPTY_OBJ){const c=getCurrentScope()===(currentInstance==null?void 0:currentInstance.scope)?currentInstance:null;let u,f=!1,d=!1;if(isRef(n)?(u=()=>n.value,f=isShallow(n)):isReactive(n)?(u=()=>n,s=!0):isArray(n)?(d=!0,f=n.some(V=>isReactive(V)||isShallow(V)),u=()=>n.map(V=>{if(isRef(V))return V.value;if(isReactive(V))return traverse(V);if(isFunction(V))return callWithErrorHandling(V,c,2)})):isFunction(n)?e?u=()=>callWithErrorHandling(n,c,2):u=()=>{if(!(c&&c.isUnmounted))return g&&g(),callWithAsyncErrorHandling(n,c,3,[m])}:u=NOOP,e&&s){const V=u;u=()=>traverse(V())}let g,m=V=>{g=v.onStop=()=>{callWithErrorHandling(V,c,4)}},_;if(isInSSRComponentSetup)if(m=NOOP,e?r&&callWithAsyncErrorHandling(e,c,3,[u(),d?[]:void 0,m]):u(),o==="sync"){const V=useSSRContext();_=V.__watcherHandles||(V.__watcherHandles=[])}else return NOOP;let E=d?new Array(n.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const A=()=>{if(v.active)if(e){const V=v.run();(s||f||(d?V.some((R,L)=>hasChanged(R,E[L])):hasChanged(V,E)))&&(g&&g(),callWithAsyncErrorHandling(e,c,3,[V,E===INITIAL_WATCHER_VALUE?void 0:d&&E[0]===INITIAL_WATCHER_VALUE?[]:E,m]),E=V)}else v.run()};A.allowRecurse=!!e;let b;o==="sync"?b=A:o==="post"?b=()=>queuePostRenderEffect(A,c&&c.suspense):(A.pre=!0,c&&(A.id=c.uid),b=()=>queueJob(A));const v=new ReactiveEffect(u,b);e?r?A():E=v.run():o==="post"?queuePostRenderEffect(v.run.bind(v),c&&c.suspense):v.run();const M=()=>{v.stop(),c&&c.scope&&remove$1(c.scope.effects,v)};return _&&_.push(M),M}function instanceWatch(n,e,r){const s=this.proxy,o=isString(n)?n.includes(".")?createPathGetter(s,n):()=>s[n]:n.bind(s,s);let a;isFunction(e)?a=e:(a=e.handler,r=e);const l=currentInstance;setCurrentInstance(this);const c=doWatch(o,a.bind(s),r);return l?setCurrentInstance(l):unsetCurrentInstance(),c}function createPathGetter(n,e){const r=e.split(".");return()=>{let s=n;for(let o=0;o{traverse(r,e)});else if(isPlainObject(n))for(const r in n)traverse(n[r],e);return n}function defineComponent(n){return isFunction(n)?{setup:n,name:n.name}:n}const isAsyncWrapper=n=>!!n.type.__asyncLoader,isKeepAlive=n=>n.type.__isKeepAlive;function onActivated(n,e){registerKeepAliveHook(n,"a",e)}function onDeactivated(n,e){registerKeepAliveHook(n,"da",e)}function registerKeepAliveHook(n,e,r=currentInstance){const s=n.__wdc||(n.__wdc=()=>{let o=r;for(;o;){if(o.isDeactivated)return;o=o.parent}return n()});if(injectHook(e,s,r),r){let o=r.parent;for(;o&&o.parent;)isKeepAlive(o.parent.vnode)&&injectToKeepAliveRoot(s,e,r,o),o=o.parent}}function injectToKeepAliveRoot(n,e,r,s){const o=injectHook(e,n,s,!0);onUnmounted(()=>{remove$1(s[e],o)},r)}function injectHook(n,e,r=currentInstance,s=!1){if(r){const o=r[n]||(r[n]=[]),a=e.__weh||(e.__weh=(...l)=>{if(r.isUnmounted)return;pauseTracking(),setCurrentInstance(r);const c=callWithAsyncErrorHandling(e,r,n,l);return unsetCurrentInstance(),resetTracking(),c});return s?o.unshift(a):o.push(a),a}}const createHook=n=>(e,r=currentInstance)=>(!isInSSRComponentSetup||n==="sp")&&injectHook(n,(...s)=>e(...s),r),onBeforeMount=createHook("bm"),onMounted=createHook("m"),onBeforeUpdate=createHook("bu"),onUpdated=createHook("u"),onBeforeUnmount=createHook("bum"),onUnmounted=createHook("um"),onServerPrefetch=createHook("sp"),onRenderTriggered=createHook("rtg"),onRenderTracked=createHook("rtc");function onErrorCaptured(n,e=currentInstance){injectHook("ec",n,e)}function withDirectives(n,e){const r=currentRenderingInstance;if(r===null)return n;const s=getExposeProxy(r)||r.proxy,o=n.dirs||(n.dirs=[]);for(let a=0;ae(l,c,void 0,a&&a[c]));else{const l=Object.keys(n);o=new Array(l.length);for(let c=0,u=l.length;cisVNode(e)?!(e.type===Comment||e.type===Fragment&&!ensureValidVNode(e.children)):!0)?n:null}const getPublicInstance=n=>n?isStatefulComponent(n)?getExposeProxy(n)||n.proxy:getPublicInstance(n.parent):null,publicPropertiesMap=extend$3(Object.create(null),{$:n=>n,$el:n=>n.vnode.el,$data:n=>n.data,$props:n=>n.props,$attrs:n=>n.attrs,$slots:n=>n.slots,$refs:n=>n.refs,$parent:n=>getPublicInstance(n.parent),$root:n=>getPublicInstance(n.root),$emit:n=>n.emit,$options:n=>resolveMergedOptions(n),$forceUpdate:n=>n.f||(n.f=()=>queueJob(n.update)),$nextTick:n=>n.n||(n.n=nextTick.bind(n.proxy)),$watch:n=>instanceWatch.bind(n)}),hasSetupBinding=(n,e)=>n!==EMPTY_OBJ&&!n.__isScriptSetup&&hasOwn$2(n,e),PublicInstanceProxyHandlers={get({_:n},e){const{ctx:r,setupState:s,data:o,props:a,accessCache:l,type:c,appContext:u}=n;let f;if(e[0]!=="$"){const _=l[e];if(_!==void 0)switch(_){case 1:return s[e];case 2:return o[e];case 4:return r[e];case 3:return a[e]}else{if(hasSetupBinding(s,e))return l[e]=1,s[e];if(o!==EMPTY_OBJ&&hasOwn$2(o,e))return l[e]=2,o[e];if((f=n.propsOptions[0])&&hasOwn$2(f,e))return l[e]=3,a[e];if(r!==EMPTY_OBJ&&hasOwn$2(r,e))return l[e]=4,r[e];shouldCacheAccess&&(l[e]=0)}}const d=publicPropertiesMap[e];let g,m;if(d)return e==="$attrs"&&track(n,"get",e),d(n);if((g=c.__cssModules)&&(g=g[e]))return g;if(r!==EMPTY_OBJ&&hasOwn$2(r,e))return l[e]=4,r[e];if(m=u.config.globalProperties,hasOwn$2(m,e))return m[e]},set({_:n},e,r){const{data:s,setupState:o,ctx:a}=n;return hasSetupBinding(o,e)?(o[e]=r,!0):s!==EMPTY_OBJ&&hasOwn$2(s,e)?(s[e]=r,!0):hasOwn$2(n.props,e)||e[0]==="$"&&e.slice(1)in n?!1:(a[e]=r,!0)},has({_:{data:n,setupState:e,accessCache:r,ctx:s,appContext:o,propsOptions:a}},l){let c;return!!r[l]||n!==EMPTY_OBJ&&hasOwn$2(n,l)||hasSetupBinding(e,l)||(c=a[0])&&hasOwn$2(c,l)||hasOwn$2(s,l)||hasOwn$2(publicPropertiesMap,l)||hasOwn$2(o.config.globalProperties,l)},defineProperty(n,e,r){return r.get!=null?n._.accessCache[e]=0:hasOwn$2(r,"value")&&this.set(n,e,r.value,null),Reflect.defineProperty(n,e,r)}};let shouldCacheAccess=!0;function applyOptions(n){const e=resolveMergedOptions(n),r=n.proxy,s=n.ctx;shouldCacheAccess=!1,e.beforeCreate&&callHook(e.beforeCreate,n,"bc");const{data:o,computed:a,methods:l,watch:c,provide:u,inject:f,created:d,beforeMount:g,mounted:m,beforeUpdate:_,updated:E,activated:A,deactivated:b,beforeDestroy:v,beforeUnmount:M,destroyed:V,unmounted:R,render:L,renderTracked:N,renderTriggered:$,errorCaptured:I,serverPrefetch:H,expose:k,inheritAttrs:W,components:G,directives:te,filters:se}=e;if(f&&resolveInjections(f,s,null,n.appContext.config.unwrapInjectedRef),l)for(const me in l){const fe=l[me];isFunction(fe)&&(s[me]=fe.bind(r))}if(o){const me=o.call(r,r);isObject$2(me)&&(n.data=reactive(me))}if(shouldCacheAccess=!0,a)for(const me in a){const fe=a[me],J=isFunction(fe)?fe.bind(r,r):isFunction(fe.get)?fe.get.bind(r,r):NOOP,K=!isFunction(fe)&&isFunction(fe.set)?fe.set.bind(r):NOOP,ue=computed({get:J,set:K});Object.defineProperty(s,me,{enumerable:!0,configurable:!0,get:()=>ue.value,set:ge=>ue.value=ge})}if(c)for(const me in c)createWatcher(c[me],s,r,me);if(u){const me=isFunction(u)?u.call(r):u;Reflect.ownKeys(me).forEach(fe=>{provide(fe,me[fe])})}d&&callHook(d,n,"c");function le(me,fe){isArray(fe)?fe.forEach(J=>me(J.bind(r))):fe&&me(fe.bind(r))}if(le(onBeforeMount,g),le(onMounted,m),le(onBeforeUpdate,_),le(onUpdated,E),le(onActivated,A),le(onDeactivated,b),le(onErrorCaptured,I),le(onRenderTracked,N),le(onRenderTriggered,$),le(onBeforeUnmount,M),le(onUnmounted,R),le(onServerPrefetch,H),isArray(k))if(k.length){const me=n.exposed||(n.exposed={});k.forEach(fe=>{Object.defineProperty(me,fe,{get:()=>r[fe],set:J=>r[fe]=J})})}else n.exposed||(n.exposed={});L&&n.render===NOOP&&(n.render=L),W!=null&&(n.inheritAttrs=W),G&&(n.components=G),te&&(n.directives=te)}function resolveInjections(n,e,r=NOOP,s=!1){isArray(n)&&(n=normalizeInject(n));for(const o in n){const a=n[o];let l;isObject$2(a)?"default"in a?l=inject(a.from||o,a.default,!0):l=inject(a.from||o):l=inject(a),isRef(l)&&s?Object.defineProperty(e,o,{enumerable:!0,configurable:!0,get:()=>l.value,set:c=>l.value=c}):e[o]=l}}function callHook(n,e,r){callWithAsyncErrorHandling(isArray(n)?n.map(s=>s.bind(e.proxy)):n.bind(e.proxy),e,r)}function createWatcher(n,e,r,s){const o=s.includes(".")?createPathGetter(r,s):()=>r[s];if(isString(n)){const a=e[n];isFunction(a)&&watch(o,a)}else if(isFunction(n))watch(o,n.bind(r));else if(isObject$2(n))if(isArray(n))n.forEach(a=>createWatcher(a,e,r,s));else{const a=isFunction(n.handler)?n.handler.bind(r):e[n.handler];isFunction(a)&&watch(o,a,n)}}function resolveMergedOptions(n){const e=n.type,{mixins:r,extends:s}=e,{mixins:o,optionsCache:a,config:{optionMergeStrategies:l}}=n.appContext,c=a.get(e);let u;return c?u=c:!o.length&&!r&&!s?u=e:(u={},o.length&&o.forEach(f=>mergeOptions(u,f,l,!0)),mergeOptions(u,e,l)),isObject$2(e)&&a.set(e,u),u}function mergeOptions(n,e,r,s=!1){const{mixins:o,extends:a}=e;a&&mergeOptions(n,a,r,!0),o&&o.forEach(l=>mergeOptions(n,l,r,!0));for(const l in e)if(!(s&&l==="expose")){const c=internalOptionMergeStrats[l]||r&&r[l];n[l]=c?c(n[l],e[l]):e[l]}return n}const internalOptionMergeStrats={data:mergeDataFn,props:mergeObjectOptions,emits:mergeObjectOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(n,e){return e?n?function(){return extend$3(isFunction(n)?n.call(this,this):n,isFunction(e)?e.call(this,this):e)}:e:n}function mergeInject(n,e){return mergeObjectOptions(normalizeInject(n),normalizeInject(e))}function normalizeInject(n){if(isArray(n)){const e={};for(let r=0;r0)&&!(l&16)){if(l&8){const d=n.vnode.dynamicProps;for(let g=0;g{u=!0;const[m,_]=normalizePropsOptions(g,e,!0);extend$3(l,m),_&&c.push(..._)};!r&&e.mixins.length&&e.mixins.forEach(d),n.extends&&d(n.extends),n.mixins&&n.mixins.forEach(d)}if(!a&&!u)return isObject$2(n)&&s.set(n,EMPTY_ARR),EMPTY_ARR;if(isArray(a))for(let d=0;d-1,_[1]=A<0||E-1||hasOwn$2(_,"default"))&&c.push(g)}}}const f=[l,c];return isObject$2(n)&&s.set(n,f),f}function validatePropName(n){return n[0]!=="$"}function getType(n){const e=n&&n.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:n===null?"null":""}function isSameType(n,e){return getType(n)===getType(e)}function getTypeIndex(n,e){return isArray(e)?e.findIndex(r=>isSameType(r,n)):isFunction(e)&&isSameType(e,n)?0:-1}const isInternalKey=n=>n[0]==="_"||n==="$stable",normalizeSlotValue=n=>isArray(n)?n.map(normalizeVNode):[normalizeVNode(n)],normalizeSlot=(n,e,r)=>{if(e._n)return e;const s=withCtx((...o)=>normalizeSlotValue(e(...o)),r);return s._c=!1,s},normalizeObjectSlots=(n,e,r)=>{const s=n._ctx;for(const o in n){if(isInternalKey(o))continue;const a=n[o];if(isFunction(a))e[o]=normalizeSlot(o,a,s);else if(a!=null){const l=normalizeSlotValue(a);e[o]=()=>l}}},normalizeVNodeSlots=(n,e)=>{const r=normalizeSlotValue(e);n.slots.default=()=>r},initSlots=(n,e)=>{if(n.vnode.shapeFlag&32){const r=e._;r?(n.slots=toRaw(e),def(e,"_",r)):normalizeObjectSlots(e,n.slots={})}else n.slots={},e&&normalizeVNodeSlots(n,e);def(n.slots,InternalObjectKey,1)},updateSlots=(n,e,r)=>{const{vnode:s,slots:o}=n;let a=!0,l=EMPTY_OBJ;if(s.shapeFlag&32){const c=e._;c?r&&c===1?a=!1:(extend$3(o,e),!r&&c===1&&delete o._):(a=!e.$stable,normalizeObjectSlots(e,o)),l=e}else e&&(normalizeVNodeSlots(n,e),l={default:1});if(a)for(const c in o)!isInternalKey(c)&&!(c in l)&&delete o[c]};function createAppContext(){return{app:null,config:{isNativeTag:NO,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 uid$1=0;function createAppAPI(n,e){return function(s,o=null){isFunction(s)||(s=Object.assign({},s)),o!=null&&!isObject$2(o)&&(o=null);const a=createAppContext(),l=new Set;let c=!1;const u=a.app={_uid:uid$1++,_component:s,_props:o,_container:null,_context:a,_instance:null,version:version$2,get config(){return a.config},set config(f){},use(f,...d){return l.has(f)||(f&&isFunction(f.install)?(l.add(f),f.install(u,...d)):isFunction(f)&&(l.add(f),f(u,...d))),u},mixin(f){return a.mixins.includes(f)||a.mixins.push(f),u},component(f,d){return d?(a.components[f]=d,u):a.components[f]},directive(f,d){return d?(a.directives[f]=d,u):a.directives[f]},mount(f,d,g){if(!c){const m=createVNode(s,o);return m.appContext=a,d&&e?e(m,f):n(m,f,g),c=!0,u._container=f,f.__vue_app__=u,getExposeProxy(m.component)||m.component.proxy}},unmount(){c&&(n(null,u._container),delete u._container.__vue_app__)},provide(f,d){return a.provides[f]=d,u}};return u}}function setRef(n,e,r,s,o=!1){if(isArray(n)){n.forEach((m,_)=>setRef(m,e&&(isArray(e)?e[_]:e),r,s,o));return}if(isAsyncWrapper(s)&&!o)return;const a=s.shapeFlag&4?getExposeProxy(s.component)||s.component.proxy:s.el,l=o?null:a,{i:c,r:u}=n,f=e&&e.r,d=c.refs===EMPTY_OBJ?c.refs={}:c.refs,g=c.setupState;if(f!=null&&f!==u&&(isString(f)?(d[f]=null,hasOwn$2(g,f)&&(g[f]=null)):isRef(f)&&(f.value=null)),isFunction(u))callWithErrorHandling(u,c,12,[l,d]);else{const m=isString(u),_=isRef(u);if(m||_){const E=()=>{if(n.f){const A=m?hasOwn$2(g,u)?g[u]:d[u]:u.value;o?isArray(A)&&remove$1(A,a):isArray(A)?A.includes(a)||A.push(a):m?(d[u]=[a],hasOwn$2(g,u)&&(g[u]=d[u])):(u.value=[a],n.k&&(d[n.k]=u.value))}else m?(d[u]=l,hasOwn$2(g,u)&&(g[u]=l)):_&&(u.value=l,n.k&&(d[n.k]=l))};l?(E.id=-1,queuePostRenderEffect(E,r)):E()}}}const queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(n){return baseCreateRenderer(n)}function baseCreateRenderer(n,e){const r=getGlobalThis();r.__VUE__=!0;const{insert:s,remove:o,patchProp:a,createElement:l,createText:c,createComment:u,setText:f,setElementText:d,parentNode:g,nextSibling:m,setScopeId:_=NOOP,insertStaticContent:E}=n,A=(q,Q,X,Y=null,Z=null,re=null,ae=!1,ne=null,oe=!!Q.dynamicChildren)=>{if(q===Q)return;q&&!isSameVNodeType(q,Q)&&(Y=Ae(q),ge(q,Z,re,!0),q=null),Q.patchFlag===-2&&(oe=!1,Q.dynamicChildren=null);const{type:ee,ref:de,shapeFlag:ce}=Q;switch(ee){case Text$1:b(q,Q,X,Y);break;case Comment:v(q,Q,X,Y);break;case Static:q==null&&M(Q,X,Y,ae);break;case Fragment:G(q,Q,X,Y,Z,re,ae,ne,oe);break;default:ce&1?L(q,Q,X,Y,Z,re,ae,ne,oe):ce&6?te(q,Q,X,Y,Z,re,ae,ne,oe):(ce&64||ce&128)&&ee.process(q,Q,X,Y,Z,re,ae,ne,oe,Me)}de!=null&&Z&&setRef(de,q&&q.ref,re,Q||q,!Q)},b=(q,Q,X,Y)=>{if(q==null)s(Q.el=c(Q.children),X,Y);else{const Z=Q.el=q.el;Q.children!==q.children&&f(Z,Q.children)}},v=(q,Q,X,Y)=>{q==null?s(Q.el=u(Q.children||""),X,Y):Q.el=q.el},M=(q,Q,X,Y)=>{[q.el,q.anchor]=E(q.children,Q,X,Y,q.el,q.anchor)},V=({el:q,anchor:Q},X,Y)=>{let Z;for(;q&&q!==Q;)Z=m(q),s(q,X,Y),q=Z;s(Q,X,Y)},R=({el:q,anchor:Q})=>{let X;for(;q&&q!==Q;)X=m(q),o(q),q=X;o(Q)},L=(q,Q,X,Y,Z,re,ae,ne,oe)=>{ae=ae||Q.type==="svg",q==null?N(Q,X,Y,Z,re,ae,ne,oe):H(q,Q,Z,re,ae,ne,oe)},N=(q,Q,X,Y,Z,re,ae,ne)=>{let oe,ee;const{type:de,props:ce,shapeFlag:pe,transition:_e,dirs:ye}=q;if(oe=q.el=l(q.type,re,ce&&ce.is,ce),pe&8?d(oe,q.children):pe&16&&I(q.children,oe,null,Y,Z,re&&de!=="foreignObject",ae,ne),ye&&invokeDirectiveHook(q,null,Y,"created"),$(oe,q,q.scopeId,ae,Y),ce){for(const ve in ce)ve!=="value"&&!isReservedProp(ve)&&a(oe,ve,null,ce[ve],re,q.children,Y,Z,Ce);"value"in ce&&a(oe,"value",null,ce.value),(ee=ce.onVnodeBeforeMount)&&invokeVNodeHook(ee,Y,q)}ye&&invokeDirectiveHook(q,null,Y,"beforeMount");const xe=(!Z||Z&&!Z.pendingBranch)&&_e&&!_e.persisted;xe&&_e.beforeEnter(oe),s(oe,Q,X),((ee=ce&&ce.onVnodeMounted)||xe||ye)&&queuePostRenderEffect(()=>{ee&&invokeVNodeHook(ee,Y,q),xe&&_e.enter(oe),ye&&invokeDirectiveHook(q,null,Y,"mounted")},Z)},$=(q,Q,X,Y,Z)=>{if(X&&_(q,X),Y)for(let re=0;re{for(let ee=oe;ee{const ne=Q.el=q.el;let{patchFlag:oe,dynamicChildren:ee,dirs:de}=Q;oe|=q.patchFlag&16;const ce=q.props||EMPTY_OBJ,pe=Q.props||EMPTY_OBJ;let _e;X&&toggleRecurse(X,!1),(_e=pe.onVnodeBeforeUpdate)&&invokeVNodeHook(_e,X,Q,q),de&&invokeDirectiveHook(Q,q,X,"beforeUpdate"),X&&toggleRecurse(X,!0);const ye=Z&&Q.type!=="foreignObject";if(ee?k(q.dynamicChildren,ee,ne,X,Y,ye,re):ae||fe(q,Q,ne,null,X,Y,ye,re,!1),oe>0){if(oe&16)W(ne,Q,ce,pe,X,Y,Z);else if(oe&2&&ce.class!==pe.class&&a(ne,"class",null,pe.class,Z),oe&4&&a(ne,"style",ce.style,pe.style,Z),oe&8){const xe=Q.dynamicProps;for(let ve=0;ve{_e&&invokeVNodeHook(_e,X,Q,q),de&&invokeDirectiveHook(Q,q,X,"updated")},Y)},k=(q,Q,X,Y,Z,re,ae)=>{for(let ne=0;ne{if(X!==Y){if(X!==EMPTY_OBJ)for(const ne in X)!isReservedProp(ne)&&!(ne in Y)&&a(q,ne,X[ne],null,ae,Q.children,Z,re,Ce);for(const ne in Y){if(isReservedProp(ne))continue;const oe=Y[ne],ee=X[ne];oe!==ee&&ne!=="value"&&a(q,ne,ee,oe,ae,Q.children,Z,re,Ce)}"value"in Y&&a(q,"value",X.value,Y.value)}},G=(q,Q,X,Y,Z,re,ae,ne,oe)=>{const ee=Q.el=q?q.el:c(""),de=Q.anchor=q?q.anchor:c("");let{patchFlag:ce,dynamicChildren:pe,slotScopeIds:_e}=Q;_e&&(ne=ne?ne.concat(_e):_e),q==null?(s(ee,X,Y),s(de,X,Y),I(Q.children,X,de,Z,re,ae,ne,oe)):ce>0&&ce&64&&pe&&q.dynamicChildren?(k(q.dynamicChildren,pe,X,Z,re,ae,ne),(Q.key!=null||Z&&Q===Z.subTree)&&traverseStaticChildren(q,Q,!0)):fe(q,Q,X,de,Z,re,ae,ne,oe)},te=(q,Q,X,Y,Z,re,ae,ne,oe)=>{Q.slotScopeIds=ne,q==null?Q.shapeFlag&512?Z.ctx.activate(Q,X,Y,ae,oe):se(Q,X,Y,Z,re,ae,oe):he(q,Q,oe)},se=(q,Q,X,Y,Z,re,ae)=>{const ne=q.component=createComponentInstance(q,Y,Z);if(isKeepAlive(q)&&(ne.ctx.renderer=Me),setupComponent(ne),ne.asyncDep){if(Z&&Z.registerDep(ne,le),!q.el){const oe=ne.subTree=createVNode(Comment);v(null,oe,Q,X)}return}le(ne,q,Q,X,Z,re,ae)},he=(q,Q,X)=>{const Y=Q.component=q.component;if(shouldUpdateComponent(q,Q,X))if(Y.asyncDep&&!Y.asyncResolved){me(Y,Q,X);return}else Y.next=Q,invalidateJob(Y.update),Y.update();else Q.el=q.el,Y.vnode=Q},le=(q,Q,X,Y,Z,re,ae)=>{const ne=()=>{if(q.isMounted){let{next:de,bu:ce,u:pe,parent:_e,vnode:ye}=q,xe=de,ve;toggleRecurse(q,!1),de?(de.el=ye.el,me(q,de,ae)):de=ye,ce&&invokeArrayFns(ce),(ve=de.props&&de.props.onVnodeBeforeUpdate)&&invokeVNodeHook(ve,_e,de,ye),toggleRecurse(q,!0);const we=renderComponentRoot(q),Oe=q.subTree;q.subTree=we,A(Oe,we,g(Oe.el),Ae(Oe),q,Z,re),de.el=we.el,xe===null&&updateHOCHostEl(q,we.el),pe&&queuePostRenderEffect(pe,Z),(ve=de.props&&de.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(ve,_e,de,ye),Z)}else{let de;const{el:ce,props:pe}=Q,{bm:_e,m:ye,parent:xe}=q,ve=isAsyncWrapper(Q);if(toggleRecurse(q,!1),_e&&invokeArrayFns(_e),!ve&&(de=pe&&pe.onVnodeBeforeMount)&&invokeVNodeHook(de,xe,Q),toggleRecurse(q,!0),ce&&Ne){const we=()=>{q.subTree=renderComponentRoot(q),Ne(ce,q.subTree,q,Z,null)};ve?Q.type.__asyncLoader().then(()=>!q.isUnmounted&&we()):we()}else{const we=q.subTree=renderComponentRoot(q);A(null,we,X,Y,q,Z,re),Q.el=we.el}if(ye&&queuePostRenderEffect(ye,Z),!ve&&(de=pe&&pe.onVnodeMounted)){const we=Q;queuePostRenderEffect(()=>invokeVNodeHook(de,xe,we),Z)}(Q.shapeFlag&256||xe&&isAsyncWrapper(xe.vnode)&&xe.vnode.shapeFlag&256)&&q.a&&queuePostRenderEffect(q.a,Z),q.isMounted=!0,Q=X=Y=null}},oe=q.effect=new ReactiveEffect(ne,()=>queueJob(ee),q.scope),ee=q.update=()=>oe.run();ee.id=q.uid,toggleRecurse(q,!0),ee()},me=(q,Q,X)=>{Q.component=q;const Y=q.vnode.props;q.vnode=Q,q.next=null,updateProps(q,Q.props,Y,X),updateSlots(q,Q.children,X),pauseTracking(),flushPreFlushCbs(),resetTracking()},fe=(q,Q,X,Y,Z,re,ae,ne,oe=!1)=>{const ee=q&&q.children,de=q?q.shapeFlag:0,ce=Q.children,{patchFlag:pe,shapeFlag:_e}=Q;if(pe>0){if(pe&128){K(ee,ce,X,Y,Z,re,ae,ne,oe);return}else if(pe&256){J(ee,ce,X,Y,Z,re,ae,ne,oe);return}}_e&8?(de&16&&Ce(ee,Z,re),ce!==ee&&d(X,ce)):de&16?_e&16?K(ee,ce,X,Y,Z,re,ae,ne,oe):Ce(ee,Z,re,!0):(de&8&&d(X,""),_e&16&&I(ce,X,Y,Z,re,ae,ne,oe))},J=(q,Q,X,Y,Z,re,ae,ne,oe)=>{q=q||EMPTY_ARR,Q=Q||EMPTY_ARR;const ee=q.length,de=Q.length,ce=Math.min(ee,de);let pe;for(pe=0;pede?Ce(q,Z,re,!0,!1,ce):I(Q,X,Y,Z,re,ae,ne,oe,ce)},K=(q,Q,X,Y,Z,re,ae,ne,oe)=>{let ee=0;const de=Q.length;let ce=q.length-1,pe=de-1;for(;ee<=ce&&ee<=pe;){const _e=q[ee],ye=Q[ee]=oe?cloneIfMounted(Q[ee]):normalizeVNode(Q[ee]);if(isSameVNodeType(_e,ye))A(_e,ye,X,null,Z,re,ae,ne,oe);else break;ee++}for(;ee<=ce&&ee<=pe;){const _e=q[ce],ye=Q[pe]=oe?cloneIfMounted(Q[pe]):normalizeVNode(Q[pe]);if(isSameVNodeType(_e,ye))A(_e,ye,X,null,Z,re,ae,ne,oe);else break;ce--,pe--}if(ee>ce){if(ee<=pe){const _e=pe+1,ye=_epe)for(;ee<=ce;)ge(q[ee],Z,re,!0),ee++;else{const _e=ee,ye=ee,xe=new Map;for(ee=ye;ee<=pe;ee++){const ke=Q[ee]=oe?cloneIfMounted(Q[ee]):normalizeVNode(Q[ee]);ke.key!=null&&xe.set(ke.key,ee)}let ve,we=0;const Oe=pe-ye+1;let Pe=!1,Le=0;const Re=new Array(Oe);for(ee=0;ee=Oe){ge(ke,Z,re,!0);continue}let Te;if(ke.key!=null)Te=xe.get(ke.key);else for(ve=ye;ve<=pe;ve++)if(Re[ve-ye]===0&&isSameVNodeType(ke,Q[ve])){Te=ve;break}Te===void 0?ge(ke,Z,re,!0):(Re[Te-ye]=ee+1,Te>=Le?Le=Te:Pe=!0,A(ke,Q[Te],X,null,Z,re,ae,ne,oe),we++)}const $e=Pe?getSequence(Re):EMPTY_ARR;for(ve=$e.length-1,ee=Oe-1;ee>=0;ee--){const ke=ye+ee,Te=Q[ke],Ie=ke+1{const{el:re,type:ae,transition:ne,children:oe,shapeFlag:ee}=q;if(ee&6){ue(q.component.subTree,Q,X,Y);return}if(ee&128){q.suspense.move(Q,X,Y);return}if(ee&64){ae.move(q,Q,X,Me);return}if(ae===Fragment){s(re,Q,X);for(let ce=0;cene.enter(re),Z);else{const{leave:ce,delayLeave:pe,afterLeave:_e}=ne,ye=()=>s(re,Q,X),xe=()=>{ce(re,()=>{ye(),_e&&_e()})};pe?pe(re,ye,xe):xe()}else s(re,Q,X)},ge=(q,Q,X,Y=!1,Z=!1)=>{const{type:re,props:ae,ref:ne,children:oe,dynamicChildren:ee,shapeFlag:de,patchFlag:ce,dirs:pe}=q;if(ne!=null&&setRef(ne,null,X,q,!0),de&256){Q.ctx.deactivate(q);return}const _e=de&1&&pe,ye=!isAsyncWrapper(q);let xe;if(ye&&(xe=ae&&ae.onVnodeBeforeUnmount)&&invokeVNodeHook(xe,Q,q),de&6)Ee(q.component,X,Y);else{if(de&128){q.suspense.unmount(X,Y);return}_e&&invokeDirectiveHook(q,null,Q,"beforeUnmount"),de&64?q.type.remove(q,Q,X,Z,Me,Y):ee&&(re!==Fragment||ce>0&&ce&64)?Ce(ee,Q,X,!1,!0):(re===Fragment&&ce&384||!Z&&de&16)&&Ce(oe,Q,X),Y&&be(q)}(ye&&(xe=ae&&ae.onVnodeUnmounted)||_e)&&queuePostRenderEffect(()=>{xe&&invokeVNodeHook(xe,Q,q),_e&&invokeDirectiveHook(q,null,Q,"unmounted")},X)},be=q=>{const{type:Q,el:X,anchor:Y,transition:Z}=q;if(Q===Fragment){Se(X,Y);return}if(Q===Static){R(q);return}const re=()=>{o(X),Z&&!Z.persisted&&Z.afterLeave&&Z.afterLeave()};if(q.shapeFlag&1&&Z&&!Z.persisted){const{leave:ae,delayLeave:ne}=Z,oe=()=>ae(X,re);ne?ne(q.el,re,oe):oe()}else re()},Se=(q,Q)=>{let X;for(;q!==Q;)X=m(q),o(q),q=X;o(Q)},Ee=(q,Q,X)=>{const{bum:Y,scope:Z,update:re,subTree:ae,um:ne}=q;Y&&invokeArrayFns(Y),Z.stop(),re&&(re.active=!1,ge(ae,q,Q,X)),ne&&queuePostRenderEffect(ne,Q),queuePostRenderEffect(()=>{q.isUnmounted=!0},Q),Q&&Q.pendingBranch&&!Q.isUnmounted&&q.asyncDep&&!q.asyncResolved&&q.suspenseId===Q.pendingId&&(Q.deps--,Q.deps===0&&Q.resolve())},Ce=(q,Q,X,Y=!1,Z=!1,re=0)=>{for(let ae=re;aeq.shapeFlag&6?Ae(q.component.subTree):q.shapeFlag&128?q.suspense.next():m(q.anchor||q.el),De=(q,Q,X)=>{q==null?Q._vnode&&ge(Q._vnode,null,null,!0):A(Q._vnode||null,q,Q,null,null,null,X),flushPreFlushCbs(),flushPostFlushCbs(),Q._vnode=q},Me={p:A,um:ge,m:ue,r:be,mt:se,mc:I,pc:fe,pbc:k,n:Ae,o:n};let Be,Ne;return e&&([Be,Ne]=e(Me)),{render:De,hydrate:Be,createApp:createAppAPI(De,Be)}}function toggleRecurse({effect:n,update:e},r){n.allowRecurse=e.allowRecurse=r}function traverseStaticChildren(n,e,r=!1){const s=n.children,o=e.children;if(isArray(s)&&isArray(o))for(let a=0;a>1,n[r[c]]0&&(e[s]=r[a-1]),r[a]=s)}}for(a=r.length,l=r[a-1];a-- >0;)r[a]=l,l=e[l];return r}const isTeleport=n=>n.__isTeleport,Fragment=Symbol(void 0),Text$1=Symbol(void 0),Comment=Symbol(void 0),Static=Symbol(void 0),blockStack=[];let currentBlock=null;function openBlock(n=!1){blockStack.push(currentBlock=n?null:[])}function closeBlock(){blockStack.pop(),currentBlock=blockStack[blockStack.length-1]||null}let isBlockTreeEnabled=1;function setBlockTracking(n){isBlockTreeEnabled+=n}function setupBlock(n){return n.dynamicChildren=isBlockTreeEnabled>0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(n),n}function createElementBlock(n,e,r,s,o,a){return setupBlock(createBaseVNode(n,e,r,s,o,a,!0))}function createBlock(n,e,r,s,o){return setupBlock(createVNode(n,e,r,s,o,!0))}function isVNode(n){return n?n.__v_isVNode===!0:!1}function isSameVNodeType(n,e){return n.type===e.type&&n.key===e.key}const InternalObjectKey="__vInternal",normalizeKey=({key:n})=>n??null,normalizeRef=({ref:n,ref_key:e,ref_for:r})=>n!=null?isString(n)||isRef(n)||isFunction(n)?{i:currentRenderingInstance,r:n,k:e,f:!!r}:n:null;function createBaseVNode(n,e=null,r=null,s=0,o=null,a=n===Fragment?0:1,l=!1,c=!1){const u={__v_isVNode:!0,__v_skip:!0,type:n,props:e,key:e&&normalizeKey(e),ref:e&&normalizeRef(e),scopeId:currentScopeId,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return c?(normalizeChildren(u,r),a&128&&n.normalize(u)):r&&(u.shapeFlag|=isString(r)?8:16),isBlockTreeEnabled>0&&!l&¤tBlock&&(u.patchFlag>0||a&6)&&u.patchFlag!==32&¤tBlock.push(u),u}const createVNode=_createVNode;function _createVNode(n,e=null,r=null,s=0,o=null,a=!1){if((!n||n===NULL_DYNAMIC_COMPONENT)&&(n=Comment),isVNode(n)){const c=cloneVNode(n,e,!0);return r&&normalizeChildren(c,r),isBlockTreeEnabled>0&&!a&¤tBlock&&(c.shapeFlag&6?currentBlock[currentBlock.indexOf(n)]=c:currentBlock.push(c)),c.patchFlag|=-2,c}if(isClassComponent(n)&&(n=n.__vccOpts),e){e=guardReactiveProps(e);let{class:c,style:u}=e;c&&!isString(c)&&(e.class=normalizeClass(c)),isObject$2(u)&&(isProxy(u)&&!isArray(u)&&(u=extend$3({},u)),e.style=normalizeStyle(u))}const l=isString(n)?1:isSuspense(n)?128:isTeleport(n)?64:isObject$2(n)?4:isFunction(n)?2:0;return createBaseVNode(n,e,r,s,o,l,a,!0)}function guardReactiveProps(n){return n?isProxy(n)||InternalObjectKey in n?extend$3({},n):n:null}function cloneVNode(n,e,r=!1){const{props:s,ref:o,patchFlag:a,children:l}=n,c=e?mergeProps(s||{},e):s;return{__v_isVNode:!0,__v_skip:!0,type:n.type,props:c,key:c&&normalizeKey(c),ref:e&&e.ref?r&&o?isArray(o)?o.concat(normalizeRef(e)):[o,normalizeRef(e)]:normalizeRef(e):o,scopeId:n.scopeId,slotScopeIds:n.slotScopeIds,children:l,target:n.target,targetAnchor:n.targetAnchor,staticCount:n.staticCount,shapeFlag:n.shapeFlag,patchFlag:e&&n.type!==Fragment?a===-1?16:a|16:a,dynamicProps:n.dynamicProps,dynamicChildren:n.dynamicChildren,appContext:n.appContext,dirs:n.dirs,transition:n.transition,component:n.component,suspense:n.suspense,ssContent:n.ssContent&&cloneVNode(n.ssContent),ssFallback:n.ssFallback&&cloneVNode(n.ssFallback),el:n.el,anchor:n.anchor,ctx:n.ctx,ce:n.ce}}function createTextVNode(n=" ",e=0){return createVNode(Text$1,null,n,e)}function createStaticVNode(n,e){const r=createVNode(Static,null,n);return r.staticCount=e,r}function createCommentVNode(n="",e=!1){return e?(openBlock(),createBlock(Comment,null,n)):createVNode(Comment,null,n)}function normalizeVNode(n){return n==null||typeof n=="boolean"?createVNode(Comment):isArray(n)?createVNode(Fragment,null,n.slice()):typeof n=="object"?cloneIfMounted(n):createVNode(Text$1,null,String(n))}function cloneIfMounted(n){return n.el===null&&n.patchFlag!==-1||n.memo?n:cloneVNode(n)}function normalizeChildren(n,e){let r=0;const{shapeFlag:s}=n;if(e==null)e=null;else if(isArray(e))r=16;else if(typeof e=="object")if(s&65){const o=e.default;o&&(o._c&&(o._d=!1),normalizeChildren(n,o()),o._c&&(o._d=!0));return}else{r=32;const o=e._;!o&&!(InternalObjectKey in e)?e._ctx=currentRenderingInstance:o===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?e._=1:(e._=2,n.patchFlag|=1024))}else isFunction(e)?(e={default:e,_ctx:currentRenderingInstance},r=32):(e=String(e),s&64?(r=16,e=[createTextVNode(e)]):r=8);n.children=e,n.shapeFlag|=r}function mergeProps(...n){const e={};for(let r=0;rcurrentInstance||currentRenderingInstance,setCurrentInstance=n=>{currentInstance=n,n.scope.on()},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),currentInstance=null};function isStatefulComponent(n){return n.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(n,e=!1){isInSSRComponentSetup=e;const{props:r,children:s}=n.vnode,o=isStatefulComponent(n);initProps(n,r,o,e),initSlots(n,s);const a=o?setupStatefulComponent(n,e):void 0;return isInSSRComponentSetup=!1,a}function setupStatefulComponent(n,e){const r=n.type;n.accessCache=Object.create(null),n.proxy=markRaw(new Proxy(n.ctx,PublicInstanceProxyHandlers));const{setup:s}=r;if(s){const o=n.setupContext=s.length>1?createSetupContext(n):null;setCurrentInstance(n),pauseTracking();const a=callWithErrorHandling(s,n,0,[n.props,o]);if(resetTracking(),unsetCurrentInstance(),isPromise(a)){if(a.then(unsetCurrentInstance,unsetCurrentInstance),e)return a.then(l=>{handleSetupResult(n,l,e)}).catch(l=>{handleError(l,n,0)});n.asyncDep=a}else handleSetupResult(n,a,e)}else finishComponentSetup(n,e)}function handleSetupResult(n,e,r){isFunction(e)?n.type.__ssrInlineRender?n.ssrRender=e:n.render=e:isObject$2(e)&&(n.setupState=proxyRefs(e)),finishComponentSetup(n,r)}let compile;function finishComponentSetup(n,e,r){const s=n.type;if(!n.render){if(!e&&compile&&!s.render){const o=s.template||resolveMergedOptions(n).template;if(o){const{isCustomElement:a,compilerOptions:l}=n.appContext.config,{delimiters:c,compilerOptions:u}=s,f=extend$3(extend$3({isCustomElement:a,delimiters:c},l),u);s.render=compile(o,f)}}n.render=s.render||NOOP}setCurrentInstance(n),pauseTracking(),applyOptions(n),resetTracking(),unsetCurrentInstance()}function createAttrsProxy(n){return new Proxy(n.attrs,{get(e,r){return track(n,"get","$attrs"),e[r]}})}function createSetupContext(n){const e=s=>{n.exposed=s||{}};let r;return{get attrs(){return r||(r=createAttrsProxy(n))},slots:n.slots,emit:n.emit,expose:e}}function getExposeProxy(n){if(n.exposed)return n.exposeProxy||(n.exposeProxy=new Proxy(proxyRefs(markRaw(n.exposed)),{get(e,r){if(r in e)return e[r];if(r in publicPropertiesMap)return publicPropertiesMap[r](n)},has(e,r){return r in e||r in publicPropertiesMap}}))}function getComponentName(n,e=!0){return isFunction(n)?n.displayName||n.name:n.name||e&&n.__name}function isClassComponent(n){return isFunction(n)&&"__vccOpts"in n}const computed=(n,e)=>computed$1(n,e,isInSSRComponentSetup);function h$1(n,e,r){const s=arguments.length;return s===2?isObject$2(e)&&!isArray(e)?isVNode(e)?createVNode(n,null,[e]):createVNode(n,e):createVNode(n,null,e):(s>3?r=Array.prototype.slice.call(arguments,2):s===3&&isVNode(r)&&(r=[r]),createVNode(n,e,r))}const ssrContextKey=Symbol(""),useSSRContext=()=>inject(ssrContextKey),version$2="3.2.47",svgNS="http://www.w3.org/2000/svg",doc$1=typeof document<"u"?document:null,templateContainer=doc$1&&doc$1.createElement("template"),nodeOps={insert:(n,e,r)=>{e.insertBefore(n,r||null)},remove:n=>{const e=n.parentNode;e&&e.removeChild(n)},createElement:(n,e,r,s)=>{const o=e?doc$1.createElementNS(svgNS,n):doc$1.createElement(n,r?{is:r}:void 0);return n==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:n=>doc$1.createTextNode(n),createComment:n=>doc$1.createComment(n),setText:(n,e)=>{n.nodeValue=e},setElementText:(n,e)=>{n.textContent=e},parentNode:n=>n.parentNode,nextSibling:n=>n.nextSibling,querySelector:n=>doc$1.querySelector(n),setScopeId(n,e){n.setAttribute(e,"")},insertStaticContent(n,e,r,s,o,a){const l=r?r.previousSibling:e.lastChild;if(o&&(o===a||o.nextSibling))for(;e.insertBefore(o.cloneNode(!0),r),!(o===a||!(o=o.nextSibling)););else{templateContainer.innerHTML=s?`${n}`:n;const c=templateContainer.content;if(s){const u=c.firstChild;for(;u.firstChild;)c.appendChild(u.firstChild);c.removeChild(u)}e.insertBefore(c,r)}return[l?l.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}};function patchClass(n,e,r){const s=n._vtc;s&&(e=(e?[e,...s]:[...s]).join(" ")),e==null?n.removeAttribute("class"):r?n.setAttribute("class",e):n.className=e}function patchStyle(n,e,r){const s=n.style,o=isString(r);if(r&&!o){if(e&&!isString(e))for(const a in e)r[a]==null&&setStyle(s,a,"");for(const a in r)setStyle(s,a,r[a])}else{const a=s.display;o?e!==r&&(s.cssText=r):e&&n.removeAttribute("style"),"_vod"in n&&(s.display=a)}}const importantRE=/\s*!important$/;function setStyle(n,e,r){if(isArray(r))r.forEach(s=>setStyle(n,e,s));else if(r==null&&(r=""),e.startsWith("--"))n.setProperty(e,r);else{const s=autoPrefix(n,e);importantRE.test(r)?n.setProperty(hyphenate(s),r.replace(importantRE,""),"important"):n[s]=r}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(n,e){const r=prefixCache[e];if(r)return r;let s=camelize(e);if(s!=="filter"&&s in n)return prefixCache[e]=s;s=capitalize(s);for(let o=0;ocachedNow||(p.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(n,e){const r=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=r.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(s,r.value),e,5,[s])};return r.value=n,r.attached=getNow(),r}function patchStopImmediatePropagation(n,e){if(isArray(e)){const r=n.stopImmediatePropagation;return n.stopImmediatePropagation=()=>{r.call(n),n._stopped=!0},e.map(s=>o=>!o._stopped&&s&&s(o))}else return e}const nativeOnRE=/^on[a-z]/,patchProp=(n,e,r,s,o=!1,a,l,c,u)=>{e==="class"?patchClass(n,s,o):e==="style"?patchStyle(n,r,s):isOn(e)?isModelListener(e)||patchEvent(n,e,r,s,l):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):shouldSetAsProp(n,e,s,o))?patchDOMProp(n,e,s,a,l,c,u):(e==="true-value"?n._trueValue=s:e==="false-value"&&(n._falseValue=s),patchAttr(n,e,s,o))};function shouldSetAsProp(n,e,r,s){return s?!!(e==="innerHTML"||e==="textContent"||e in n&&nativeOnRE.test(e)&&isFunction(r)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&n.tagName==="INPUT"||e==="type"&&n.tagName==="TEXTAREA"||nativeOnRE.test(e)&&isString(r)?!1:e in n}function useCssVars(n){const e=getCurrentInstance();if(!e)return;const r=e.ut=(o=n(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(a=>setVarsOnNode(a,o))},s=()=>{const o=n(e.proxy);setVarsOnVNode(e.subTree,o),r(o)};watchPostEffect(s),onMounted(()=>{const o=new MutationObserver(s);o.observe(e.subTree.el.parentNode,{childList:!0}),onUnmounted(()=>o.disconnect())})}function setVarsOnVNode(n,e){if(n.shapeFlag&128){const r=n.suspense;n=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{setVarsOnVNode(r.activeBranch,e)})}for(;n.component;)n=n.component.subTree;if(n.shapeFlag&1&&n.el)setVarsOnNode(n.el,e);else if(n.type===Fragment)n.children.forEach(r=>setVarsOnVNode(r,e));else if(n.type===Static){let{el:r,anchor:s}=n;for(;r&&(setVarsOnNode(r,e),r!==s);)r=r.nextSibling}}function setVarsOnNode(n,e){if(n.nodeType===1){const r=n.style;for(const s in e)r.setProperty(`--${s}`,e[s])}}const getModelAssigner=n=>{const e=n.props["onUpdate:modelValue"]||!1;return isArray(e)?r=>invokeArrayFns(e,r):e};function onCompositionStart(n){n.target.composing=!0}function onCompositionEnd(n){const e=n.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const vModelText={created(n,{modifiers:{lazy:e,trim:r,number:s}},o){n._assign=getModelAssigner(o);const a=s||o.props&&o.props.type==="number";addEventListener(n,e?"change":"input",l=>{if(l.target.composing)return;let c=n.value;r&&(c=c.trim()),a&&(c=looseToNumber(c)),n._assign(c)}),r&&addEventListener(n,"change",()=>{n.value=n.value.trim()}),e||(addEventListener(n,"compositionstart",onCompositionStart),addEventListener(n,"compositionend",onCompositionEnd),addEventListener(n,"change",onCompositionEnd))},mounted(n,{value:e}){n.value=e??""},beforeUpdate(n,{value:e,modifiers:{lazy:r,trim:s,number:o}},a){if(n._assign=getModelAssigner(a),n.composing||document.activeElement===n&&n.type!=="range"&&(r||s&&n.value.trim()===e||(o||n.type==="number")&&looseToNumber(n.value)===e))return;const l=e??"";n.value!==l&&(n.value=l)}},vModelCheckbox={deep:!0,created(n,e,r){n._assign=getModelAssigner(r),addEventListener(n,"change",()=>{const s=n._modelValue,o=getValue(n),a=n.checked,l=n._assign;if(isArray(s)){const c=looseIndexOf(s,o),u=c!==-1;if(a&&!u)l(s.concat(o));else if(!a&&u){const f=[...s];f.splice(c,1),l(f)}}else if(isSet(s)){const c=new Set(s);a?c.add(o):c.delete(o),l(c)}else l(getCheckboxValue(n,a))})},mounted:setChecked,beforeUpdate(n,e,r){n._assign=getModelAssigner(r),setChecked(n,e,r)}};function setChecked(n,{value:e,oldValue:r},s){n._modelValue=e,isArray(e)?n.checked=looseIndexOf(e,s.props.value)>-1:isSet(e)?n.checked=e.has(s.props.value):e!==r&&(n.checked=looseEqual(e,getCheckboxValue(n,!0)))}const vModelSelect={deep:!0,created(n,{value:e,modifiers:{number:r}},s){const o=isSet(e);addEventListener(n,"change",()=>{const a=Array.prototype.filter.call(n.options,l=>l.selected).map(l=>r?looseToNumber(getValue(l)):getValue(l));n._assign(n.multiple?o?new Set(a):a:a[0])}),n._assign=getModelAssigner(s)},mounted(n,{value:e}){setSelected(n,e)},beforeUpdate(n,e,r){n._assign=getModelAssigner(r)},updated(n,{value:e}){setSelected(n,e)}};function setSelected(n,e){const r=n.multiple;if(!(r&&!isArray(e)&&!isSet(e))){for(let s=0,o=n.options.length;s-1:a.selected=e.has(l);else if(looseEqual(getValue(a),e)){n.selectedIndex!==s&&(n.selectedIndex=s);return}}!r&&n.selectedIndex!==-1&&(n.selectedIndex=-1)}}function getValue(n){return"_value"in n?n._value:n.value}function getCheckboxValue(n,e){const r=e?"_trueValue":"_falseValue";return r in n?n[r]:e}const systemModifiers=["ctrl","shift","alt","meta"],modifierGuards={stop:n=>n.stopPropagation(),prevent:n=>n.preventDefault(),self:n=>n.target!==n.currentTarget,ctrl:n=>!n.ctrlKey,shift:n=>!n.shiftKey,alt:n=>!n.altKey,meta:n=>!n.metaKey,left:n=>"button"in n&&n.button!==0,middle:n=>"button"in n&&n.button!==1,right:n=>"button"in n&&n.button!==2,exact:(n,e)=>systemModifiers.some(r=>n[`${r}Key`]&&!e.includes(r))},withModifiers=(n,e)=>(r,...s)=>{for(let o=0;o{const e=ensureRenderer().createApp(...n),{mount:r}=e;return e.mount=s=>{const o=normalizeContainer(s);if(!o)return;const a=e._component;!isFunction(a)&&!a.render&&!a.template&&(a.template=o.innerHTML),o.innerHTML="";const l=r(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},e};function normalizeContainer(n){return isString(n)?document.querySelector(n):n}const _export_sfc=(n,e)=>{const r=n.__vccOpts||n;for(const[s,o]of e)r[s]=o;return r},_sfc_main$g={props:{graph:{required:!0}},data(){return{graphType:"basic",graphDir:"right",graphText:`a/b/c b/d/e/f/g e/i`,graphError:"",graphNodesFilter:"",connType:"",groupNodes:!1,edgeAlign:"",edgeSnap:""}},mounted(){this.$nextTick(()=>{this.createNodes()})},methods:{centerNodes(){const n=this.$parent.$refs.screen.panzoom;this.zoomNodes(),n.getZoom()>1&&this.zoomNodes(1)},zoomNodes(n=null){let e=1/0,r=1/0,s=-1/0,o=-1/0;(this.filterNodes||this.graph.nodes).forEach(l=>{l.xs&&(s=l.x+l.width),l.yo&&(o=l.y+l.height)}),e-=50,r-=50,s+=50,o+=50,this.$parent.$refs.screen.zoomRect({left:e,top:r,right:s,bottom:o},{scale:n})},createNodes(){this.graph.reset();const n=this.parsedGraph,e=(r,s)=>{this.graph.nodes.find(o=>o.id===r.id)||this.graph.createNode(r.id),s&&(this.graph.edges.find(o=>o.fromNode===s.id&&o.toNode===s.id)||this.graph.createEdge(s.id,r.id)),r.children.forEach(o=>e(o,r))};n.forEach(r=>e(r)),this.graphNodes(),this.centerNodes()},graphNodes(n){this.graph.graphNodes({nodes:n||this.graph.nodes,edges:this.graph.edges,type:this.graphType,dir:this.graphDir})}},computed:{filterNodes(){const n=this.graphNodesFilter.split(",").map(r=>r.trim()),e=this.graph.nodes.filter(r=>n.includes(r.id));return e.length?e:null},parsedGraph(){const n=[],e=[];return this.graphText.split(` -`).forEach(s=>{s.split("/").forEach((o,a,l)=>{const c=o.trim();if(!c)return;const u=a&&l[a-1].trim(),f={id:c,children:[]},d=u&&n.find(g=>g.id===u);d?d.children.push(f):e.push(f),n.push(f)})}),e}},watch:{parsedGraph(){this.$nextTick(this.createNodes)},connType(n){this.graph.edges.forEach(e=>{e.type=n})},graphDir(){this.graphNodes(),this.centerNodes()},graphType(){this.graphNodes(),this.centerNodes()},groupNodes(n){this.$emit("toggleGroupNodes",n)},edgeSnap(n){this.graph.edges.forEach(e=>{e.fromAnchor.snap=n,e.toAnchor.snap=n})},edgeAlign(n){this.graph.edges.forEach(e=>{e.fromAnchor.align=n,e.toAnchor.align=n})},anchorX(n){n?n.endsWith("%")||(n=parseFloat(n)):n="50%",this.graph.edges.forEach(e=>{e.fromAnchor.x=n,e.toAnchor.x=n})},anchorY(n){n?n.endsWith("%")||(n=parseFloat(n)):n="50%",this.graph.edges.forEach(e=>{e.fromAnchor.y=n,e.toAnchor.y=n})}}},_hoisted_1$g=createBaseVNode("div",{style:{"font-weight":"bold"}},"Graph",-1),_hoisted_2$c=createBaseVNode("span",null,"type",-1),_hoisted_3$9=createBaseVNode("option",{value:"basic"},"basic",-1),_hoisted_4$9=createBaseVNode("option",{value:"basic-invert"},"invert",-1),_hoisted_5$8=createBaseVNode("option",{value:"tree"},"tree",-1),_hoisted_6$7=[_hoisted_3$9,_hoisted_4$9,_hoisted_5$8],_hoisted_7$6=createBaseVNode("span",null,"dir ",-1),_hoisted_8$5=createBaseVNode("option",{value:"left"},"left",-1),_hoisted_9$1=createBaseVNode("option",{value:"right"},"right",-1),_hoisted_10$1=createBaseVNode("option",{value:"up"},"up",-1),_hoisted_11$1=createBaseVNode("option",{value:"down"},"down",-1),_hoisted_12$1=[_hoisted_8$5,_hoisted_9$1,_hoisted_10$1,_hoisted_11$1],_hoisted_13$1=createBaseVNode("div",{style:{"font-weight":"bold"}},"Edges",-1),_hoisted_14$1=createBaseVNode("span",null,"type ",-1),_hoisted_15$2=createStaticVNode('',5),_hoisted_20=[_hoisted_15$2],_hoisted_21=createBaseVNode("span",null,"snap ",-1),_hoisted_22=createBaseVNode("option",{value:"anchor"},"anchor",-1),_hoisted_23=createBaseVNode("option",{value:"rect"},"rect",-1),_hoisted_24=createBaseVNode("option",{value:"circle"},"circle",-1),_hoisted_25=[_hoisted_22,_hoisted_23,_hoisted_24],_hoisted_26=createBaseVNode("div",{style:{"font-weight":"bold"}},"Nodes",-1),_hoisted_27=createBaseVNode("span",null," Group",-1);function _sfc_render$g(n,e,r,s,o,a){return openBlock(),createElementBlock("div",null,[_hoisted_1$g,withDirectives(createBaseVNode("textarea",{"onUpdate:modelValue":e[0]||(e[0]=l=>o.graphText=l),placeholder:"add multiple lines",rows:"4"},null,512),[[vModelText,o.graphText]]),createBaseVNode("div",null,[_hoisted_2$c,withDirectives(createBaseVNode("select",{"onUpdate:modelValue":e[1]||(e[1]=l=>o.graphType=l)},_hoisted_6$7,512),[[vModelSelect,o.graphType]])]),createBaseVNode("div",null,[_hoisted_7$6,withDirectives(createBaseVNode("select",{"onUpdate:modelValue":e[2]||(e[2]=l=>o.graphDir=l)},_hoisted_12$1,512),[[vModelSelect,o.graphDir]])]),_hoisted_13$1,createBaseVNode("div",null,[_hoisted_14$1,withDirectives(createBaseVNode("select",{"onUpdate:modelValue":e[3]||(e[3]=l=>o.connType=l)},_hoisted_20,512),[[vModelSelect,o.connType]])]),createBaseVNode("div",null,[_hoisted_21,withDirectives(createBaseVNode("select",{"onUpdate:modelValue":e[4]||(e[4]=l=>o.edgeSnap=l)},_hoisted_25,512),[[vModelSelect,o.edgeSnap]])]),_hoisted_26,createBaseVNode("div",null,[withDirectives(createBaseVNode("input",{type:"text",placeholder:"a,b,c (nodes filter)","onUpdate:modelValue":e[5]||(e[5]=l=>o.graphNodesFilter=l)},null,512),[[vModelText,o.graphNodesFilter]])]),createBaseVNode("button",{onClick:e[6]||(e[6]=()=>a.zoomNodes(null,a.filterNodes))},"Zoom Nodes"),createBaseVNode("button",{onClick:e[7]||(e[7]=()=>a.graphNodes(a.filterNodes))},"Graph Nodes"),createBaseVNode("div",null,[withDirectives(createBaseVNode("input",{type:"checkbox",id:"groupNodes","onUpdate:modelValue":e[8]||(e[8]=l=>o.groupNodes=l)},null,512),[[vModelCheckbox,o.groupNodes]]),_hoisted_27])])}const SinkSidebar=_export_sfc(_sfc_main$g,[["render",_sfc_render$g]]);function findPosition$1(n,e,r="right",s,o={x:40,y:40},a=!1){const l=o.x||o,c=o.y||o,u=e?r==="down"||r==="up"?e.x:r==="right"?e.x+e.width+l:r==="left"?e.x-n.width-l:-1:0,f=e?r==="right"||r==="left"?e.y:r==="down"?e.y+e.height+c:r==="up"?e.y-n.height-c:-1:0,d=r==="down"||r==="up",g=r==="right"||r==="left",m=d?l*(a?-1:1):0,_=g?c*(a?-1:1):0,E=s.filter(v=>v.id!==n.id),A={x:u,y:f,width:n.width,height:n.height};let b=boxBoxes(A,E);for(;b.length;){const v=b[0];m?A.x=v.x+m+(m>0?v.width:-n.width):A.y=v.y+_+(_>0?v.height:-n.height),b=boxBoxes(A,E)}return{x:A.x,y:A.y}}function boxBox(n,e){return n.xe.x&&n.ye.y}function boxBoxes(n,e){return e.filter(r=>boxBox(r,n))}function createDAG(n,e){const r=n.map(o=>({id:o.id,x:o.x,y:o.y,width:o.width,height:o.height,parentIds:[],children:[]})),s={};return e.forEach(o=>{if(s[o.from+o.to])return;s[o.from+o.to]=!0;const a=r.find(c=>c.id===o.from),l=r.find(c=>c.id===o.to);a&&l&&(a.children.push(l),l.parentIds.push(a.id))}),removeCycles(r),r}const removeCycles=n=>{const e=[],r=l=>l.state===0,s=l=>l.state===1,o=l=>l.state===2;n.forEach(l=>{l.state=0});const a=l=>{l.state=1,l.children.forEach(c=>{o(c)||(s(c)?(l.children.splice(l.children.indexOf(c),1),c.parentIds.splice(c.parentIds.indexOf(l.id),1),e.push(`${c.id}:${l.id}`)):a(c))}),l.state=2};return n.forEach(l=>{r(l)&&a(l)}),e},dagToFlextree=(n,e,r=!1,s=40)=>{const o={id:n.id,size:[(r?n.height:n.width)+s,(r?n.width:n.height)+s],children:[]};e.push(o),n.children.forEach(a=>{dagToFlextree(a,o.children,r,s)})};function lineRect(n,e,r,s,o){const a=[o.x,o.y,o.x+o.width,o.y+o.height];return[lineLine(n,r,e,s,a[0],a[1],a[0],a[3]),lineLine(n,r,e,s,a[0],a[1],a[2],a[1]),lineLine(n,r,e,s,a[2],a[1],a[2],a[3]),lineLine(n,r,e,s,a[0],a[3],a[2],a[3])].filter(c=>c).map(c=>Object.assign(c,{distance:Math.sqrt((n-c.x)**2+(r-c.y)**2)})).sort((c,u)=>c.distance=r){if(!between(r,u,n))return!1}else if(!between(n,u,r))return!1;if(e>=s){if(!between(s,f,e))return!1}else if(!between(e,f,s))return!1;if(o>=l){if(!between(l,u,o))return!1}else if(!between(o,u,l))return!1;if(a>=c){if(!between(c,f,a))return!1}else if(!between(a,f,c))return!1;return{x:u,y:f}}const util$1={findPosition:findPosition$1,createDAG,dagToFlextree,boxBox,boxBoxes,lineLine,lineRect};function count(n){var e=0,r=n.children,s=r&&r.length;if(!s)e=1;else for(;--s>=0;)e+=r[s].value;n.value=e}function node_count(){return this.eachAfter(count)}function node_each(n){var e=this,r,s=[e],o,a,l;do for(r=s.reverse(),s=[];e=r.pop();)if(n(e),o=e.children,o)for(a=0,l=o.length;a=0;--o)r.push(s[o]);return this}function node_eachAfter(n){for(var e=this,r=[e],s=[],o,a,l;e=r.pop();)if(s.push(e),o=e.children,o)for(a=0,l=o.length;a=0;)r+=s[o].value;e.value=r})}function node_sort(n){return this.eachBefore(function(e){e.children&&e.children.sort(n)})}function node_path(n){for(var e=this,r=leastCommonAncestor(e,n),s=[e];e!==r;)e=e.parent,s.push(e);for(var o=s.length;n!==r;)s.splice(o,0,n),n=n.parent;return s}function leastCommonAncestor(n,e){if(n===e)return n;var r=n.ancestors(),s=e.ancestors(),o=null;for(n=r.pop(),e=s.pop();n===e;)o=n,n=r.pop(),e=s.pop();return o}function node_ancestors(){for(var n=this,e=[n];n=n.parent;)e.push(n);return e}function node_descendants(){var n=[];return this.each(function(e){n.push(e)}),n}function node_leaves(){var n=[];return this.eachBefore(function(e){e.children||n.push(e)}),n}function node_links(){var n=this,e=[];return n.each(function(r){r!==n&&e.push({source:r.parent,target:r})}),e}function hierarchy(n,e){var r=new Node$1(n),s=+n.value&&(r.value=n.value),o,a=[r],l,c,u,f;for(e==null&&(e=defaultChildren);o=a.pop();)if(s&&(o.value=+o.data.value),(c=e(o.data))&&(f=c.length))for(o.children=new Array(f),u=f-1;u>=0;--u)a.push(l=o.children[u]=new Node$1(c[u])),l.parent=o,l.depth=o.depth+1;return r.eachBefore(computeHeight)}function node_copy(){return hierarchy(this).eachBefore(copyData)}function defaultChildren(n){return n.children}function copyData(n){n.data=n.data.data}function computeHeight(n){var e=0;do n.height=e;while((n=n.parent)&&n.height<++e)}function Node$1(n){this.data=n,this.depth=this.height=0,this.parent=null}Node$1.prototype=hierarchy.prototype={constructor:Node$1,count:node_count,each:node_each,eachAfter:node_eachAfter,eachBefore:node_eachBefore,sum:node_sum,sort:node_sort,path:node_path,ancestors:node_ancestors,descendants:node_descendants,leaves:node_leaves,links:node_links,copy:node_copy};const name$1="d3-flextree",version$1="2.1.2",main="build/d3-flextree.js",module="index",author={name:"Chris Maloney",url:"http://chrismaloney.org"},description="Flexible tree layout algorithm that allows for variable node sizes.",keywords=["d3","d3-module","layout","tree","hierarchy","d3-hierarchy","plugin","d3-plugin","infovis","visualization","2d"],homepage="https://github.com/klortho/d3-flextree",license="WTFPL",repository={type:"git",url:"https://github.com/klortho/d3-flextree.git"},scripts={clean:"rm -rf build demo test","build:demo":"rollup -c --environment BUILD:demo","build:dev":"rollup -c --environment BUILD:dev","build:prod":"rollup -c --environment BUILD:prod","build:test":"rollup -c --environment BUILD:test",build:"rollup -c",lint:"eslint index.js src","test:main":"node test/bundle.js","test:browser":"node test/browser-tests.js",test:"npm-run-all test:*",prepare:"npm-run-all clean build lint test"},dependencies={"d3-hierarchy":"^1.1.5"},devDependencies={"babel-plugin-external-helpers":"^6.22.0","babel-preset-es2015-rollup":"^3.0.0",d3:"^4.13.0","d3-selection-multi":"^1.0.1",eslint:"^4.19.1",jsdom:"^11.6.2","npm-run-all":"^4.1.2",rollup:"^0.55.3","rollup-plugin-babel":"^2.7.1","rollup-plugin-commonjs":"^8.0.2","rollup-plugin-copy":"^0.2.3","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.2","rollup-plugin-uglify":"^3.0.0","uglify-es":"^3.3.9"},packageInfo={name:name$1,version:version$1,main,module,"jsnext:main":"index",author,description,keywords,homepage,license,repository,scripts,dependencies,devDependencies},{version}=packageInfo,defaults$4=Object.freeze({children:n=>n.children,nodeSize:n=>n.data.size,spacing:0});function flextree(n){const e=Object.assign({},defaults$4,n);function r(c){const u=e[c];return typeof u=="function"?u:()=>u}function s(c){const u=l(a(),c,f=>f.children);return u.update(),u.data}function o(){const c=r("nodeSize"),u=r("spacing");return class Ve extends hierarchy.prototype.constructor{constructor(d){super(d)}copy(){const d=l(this.constructor,this,g=>g.children);return d.each(g=>g.data=g.data.data),d}get size(){return c(this)}spacing(d){return u(this,d)}get nodes(){return this.descendants()}get xSize(){return this.size[0]}get ySize(){return this.size[1]}get top(){return this.y}get bottom(){return this.y+this.ySize}get left(){return this.x-this.xSize/2}get right(){return this.x+this.xSize/2}get root(){const d=this.ancestors();return d[d.length-1]}get numChildren(){return this.hasChildren?this.children.length:0}get hasChildren(){return!this.noChildren}get noChildren(){return this.children===null}get firstChild(){return this.hasChildren?this.children[0]:null}get lastChild(){return this.hasChildren?this.children[this.numChildren-1]:null}get extents(){return(this.children||[]).reduce((d,g)=>Ve.maxExtents(d,g.extents),this.nodeExtents)}get nodeExtents(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}static maxExtents(d,g){return{top:Math.min(d.top,g.top),bottom:Math.max(d.bottom,g.bottom),left:Math.min(d.left,g.left),right:Math.max(d.right,g.right)}}}}function a(){const c=o(),u=r("nodeSize"),f=r("spacing");return class extends c{constructor(d){super(d),Object.assign(this,{x:0,y:0,relX:0,prelim:0,shift:0,change:0,lExt:this,lExtRelX:0,lThr:null,rExt:this,rExtRelX:0,rThr:null})}get size(){return u(this.data)}spacing(d){return f(this.data,d.data)}get x(){return this.data.x}set x(d){this.data.x=d}get y(){return this.data.y}set y(d){this.data.y=d}update(){return layoutChildren(this),resolveX(this),this}}}function l(c,u,f){const d=(g,m)=>{const _=new c(g);Object.assign(_,{parent:m,depth:m===null?0:m.depth+1,height:0,length:1});const E=f(g)||[];return _.children=E.length===0?null:E.map(A=>d(A,_)),_.children&&Object.assign(_,_.children.reduce((A,b)=>({height:Math.max(A.height,b.height+1),length:A.length+b.length}),_)),_};return d(u,null)}return Object.assign(s,{nodeSize(c){return arguments.length?(e.nodeSize=c,s):e.nodeSize},spacing(c){return arguments.length?(e.spacing=c,s):e.spacing},children(c){return arguments.length?(e.children=c,s):e.children},hierarchy(c,u){const f=typeof u>"u"?e.children:u;return l(o(),c,f)},dump(c){const u=r("nodeSize"),f=d=>g=>{const m=d+" ",_=d+" ",{x:E,y:A}=g,b=u(g),v=g.children||[],M=v.length===0?" ":`,${m}children: [${_}${v.map(f(_)).join(_)}${m}],${d}`;return`{ size: [${b.join(", ")}],${m}x: ${E}, y: ${A}${M}},`};return f(` -`)(c)}}),s}flextree.version=version;const layoutChildren=(n,e=0)=>(n.y=e,(n.children||[]).reduce((r,s)=>{const[o,a]=r;layoutChildren(s,n.y+n.ySize);const l=(o===0?s.lExt:s.rExt).bottom;o!==0&&separate(n,o,a);const c=updateLows(l,o,a);return[o+1,c]},[0,null]),shiftChange(n),positionRoot(n),n),resolveX=(n,e,r)=>{typeof e>"u"&&(e=-n.relX-n.prelim,r=0);const s=e+n.relX;return n.relX=s+n.prelim-r,n.prelim=0,n.x=r+n.relX,(n.children||[]).forEach(o=>resolveX(o,s,n.x)),n},shiftChange=n=>{(n.children||[]).reduce((e,r)=>{const[s,o]=e,a=s+r.shift,l=o+a+r.change;return r.relX+=l,[a,l]},[0,0])},separate=(n,e,r)=>{const s=n.children[e-1],o=n.children[e];let a=s,l=s.relX,c=o,u=o.relX,f=!0;for(;a&&c;){a.bottom>r.lowY&&(r=r.next);const d=l+a.prelim-(u+c.prelim)+a.xSize/2+c.xSize/2+a.spacing(c);(d>0||d<0&&f)&&(u+=d,moveSubtree(o,d),distributeExtra(n,e,r.index,d)),f=!1;const g=a.bottom,m=c.bottom;g<=m&&(a=nextRContour(a),a&&(l+=a.relX)),g>=m&&(c=nextLContour(c),c&&(u+=c.relX))}!a&&c?setLThr(n,e,c,u):a&&!c&&setRThr(n,e,a,l)},moveSubtree=(n,e)=>{n.relX+=e,n.lExtRelX+=e,n.rExtRelX+=e},distributeExtra=(n,e,r,s)=>{const o=n.children[e],a=e-r;if(a>1){const l=s/a;n.children[r+1].shift+=l,o.shift-=l,o.change-=s-l}},nextLContour=n=>n.hasChildren?n.firstChild:n.lThr,nextRContour=n=>n.hasChildren?n.lastChild:n.rThr,setLThr=(n,e,r,s)=>{const o=n.firstChild,a=o.lExt,l=n.children[e];a.lThr=r;const c=s-r.relX-o.lExtRelX;a.relX+=c,a.prelim-=c,o.lExt=l.lExt,o.lExtRelX=l.lExtRelX},setRThr=(n,e,r,s)=>{const o=n.children[e],a=o.rExt,l=n.children[e-1];a.rThr=r;const c=s-r.relX-o.rExtRelX;a.relX+=c,a.prelim-=c,o.rExt=l.rExt,o.rExtRelX=l.rExtRelX},positionRoot=n=>{if(n.hasChildren){const e=n.firstChild,r=n.lastChild,s=(e.prelim+e.relX-e.xSize/2+r.relX+r.prelim+r.xSize/2)/2;Object.assign(n,{prelim:s,lExt:e.lExt,lExtRelX:e.lExtRelX,rExt:r.rExt,rExtRelX:r.rExtRelX})}},updateLows=(n,e,r)=>{for(;r!==null&&n>=r.lowY;)r=r.next;return{lowY:n,index:e,next:r}};class Graph{constructor(){this.nodes=[],this.edges=[]}positionNode({node:e,parent:r,dir:s="right",spacing:o=40,invertOffset:a=!1}={}){e=typeof e=="string"?this.nodes.find(c=>c.id===e):e,r=typeof r=="string"?this.nodes.find(c=>c.id===r):r;const l=util$1.findPosition(e,r,s,this.nodes,o,a);this.updateNode(e,{x:l.x,y:l.y})}graphNodes({nodes:e,edges:r,type:s="basic",dir:o="right",spacing:a=40}={}){e=e||this.nodes,r=r||this.edges;const l=util$1.createDAG(e,r);if(l.length)if(s==="basic"||s==="basic-invert"){const c={},u=(f,d)=>{if(c[f.id])return;const g=e.filter(_=>!!c[_.id]),m=util$1.findPosition(f,d,o,g,a,s==="basic-invert");f.x=m.x,f.y=m.y,this.updateNode(f.id,{x:f.x,y:f.y}),c[f.id]=!0,f.children.forEach(_=>u(_,f))};l.filter(f=>!f.parentIds.length).forEach(f=>u(f,null))}else if(s==="tree"){const c=flextree(),u=o==="left"||o==="right";l.filter(d=>!d.parentIds.length).forEach(d=>{const g=[],m=d.x,_=d.y;util$1.dagToFlextree(d,g,u,a);const E=c.hierarchy(g[0]);c(E);const A=o==="left"?-1:1,b=o==="up"?-1:1,v=M=>{this.updateNode(M.data.id,{x:(u?M.y:M.x)*A+m,y:(u?M.x:M.y)*b+_}),M.children&&M.children.forEach(v)};v(E)})}else throw new Error("unknown layout type "+s)}reset(){for(;this.edges.length;)this.edges.pop();for(;this.nodes.length;)this.nodes.pop()}createNode(e={}){typeof e=="string"&&(e={id:e});const r=Object.assign({id:Math.random().toString(36).slice(2),x:0,y:0,width:50,height:50},e);return this.nodes.push(r),r}updateNode(e,r={}){if(typeof e=="string"&&(e=this.nodes.find(s=>s.id===e)),!e)throw new Error(`node ${e} does not exist`);return Object.assign(e,r)}removeNode(e){const r=this.nodes.indexOf(e);return r>-1&&this.nodes.splice(r,1),r}createEdge(e,r,s={}){if(arguments.length===1?(s=arguments[0],e=s.from,r=s.to):(typeof e=="object"&&(e=e.id),typeof r=="object"&&(r=r.id)),!e)throw new Error("orig required");if(!r)throw new Error("dest required");const o=Object.assign({id:Math.random().toString(36).slice(2),from:e,to:r,fromAnchor:{x:"50%",y:"50%"},toAnchor:{x:"50%",y:"50%"},type:"linear",pathd:""},s);return this.edges.push(o),o}updateEdge(e,r){return Object.assign(e,r)}removeEdge(e){const r=this.edges.indexOf(e);return r>-1&&this.edges.splice(r,1),r}reorderGraph(){for(let e=0;e<200;e++){let r=0;for(let s of this.nodes){for(let l of this.nodes)if(l.id!==s.id){let c=l.x-s.x,u=l.y-s.y,f=Math.sqrt(c*c+u*u);this.edges.find(d=>d.to===s.id&&d.from===l.id||d.from===s.id&&d.to===l.id)?f<500?f<400?f<200?(s.x-=c,s.y-=u):(s.x-=c/3,s.y-=u/3):(r++,s.x+=c/6,s.y+=u/6):(s.x+=c/3,s.y+=u/3):f<1e3?f<100?(s.x-=c*3,s.y-=u*3):f<500?(s.x-=c/3,s.y-=u/3):(s.x-=c/9,s.y-=u/9):r++}let o=0-s.x,a=0-s.y;s.x+=o/15,s.y+=a/15}if(r/(this.nodes.length*this.nodes.length)>.7)break}}}const defaults$3=[{id:"arrow-start",type:"arrow-start",scale:.5,style:"fill: green"},{id:"arrow-end",type:"arrow-end",scale:.5,style:"fill: green"},{id:"square",type:"square",scale:.5,style:"fill: green"},{id:"circle",type:"circle",scale:.5,style:"fill: green"},{id:"cross",type:"cross",scale:1,style:"fill: none"},{id:"arrow-slim-start",type:"arrow-slim-start",scale:.5,style:"fill: green"},{id:"arrow-slim-end",type:"arrow-slim-end",scale:.5,style:"fill: green"}],_sfc_main$f={props:{markers:Array},computed:{all(){return this.markers.concat(defaults$3).map(n=>{const e=defaults$3.find(r=>r.type===n.type);if(!e)console.error("unknown marker",n);else return Object.assign({},e,n)}).filter(n=>n)}}},_hoisted_1$f=["id","markerWidth","markerHeight","refX","refY"],_hoisted_2$b=["id","markerWidth","markerHeight","refX","refY"],_hoisted_3$8=["id","markerWidth","markerHeight","refX","refY"],_hoisted_4$8=["id","markerWidth","markerHeight","refX","refY"],_hoisted_5$7=["id","markerWidth","markerHeight"],_hoisted_6$6=["id","markerWidth","markerHeight","refX","refY"],_hoisted_7$5=["id","markerWidth","markerHeight","refX","refY"];function _sfc_render$f(n,e,r,s,o,a){return openBlock(),createElementBlock("g",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(a.all,l=>(openBlock(),createElementBlock("g",{key:l.id},[l.type==="arrow-start"?(openBlock(),createElementBlock("marker",{key:0,id:l.id,orient:"auto",markerWidth:13*l.scale,markerHeight:13*l.scale,refX:1*l.scale,refY:5*l.scale},[createBaseVNode("path",{d:"M0,5 L10,10 L10,0 L0,5",style:normalizeStyle(`transform: scale(${l.scale});${l.style}`)},null,4)],8,_hoisted_1$f)):createCommentVNode("",!0),l.type==="arrow-end"?(openBlock(),createElementBlock("marker",{key:1,id:l.id,orient:"auto",markerWidth:13*l.scale,markerHeight:13*l.scale,refX:9*l.scale,refY:5*l.scale},[createBaseVNode("path",{d:"M0,0 L0,10 L10,5 L0,0",style:normalizeStyle(`${l.style};transform: scale(${l.scale})`)},null,4)],8,_hoisted_2$b)):createCommentVNode("",!0),l.type==="square"?(openBlock(),createElementBlock("marker",{key:2,id:l.id,orient:"auto",markerWidth:5*l.scale,markerHeight:5*l.scale,refX:2.5*l.scale,refY:2.5*l.scale},[createBaseVNode("rect",{x:"0",y:"0",width:"5",height:"5",style:normalizeStyle(`transform: scale(${l.scale});${l.style}`)},null,4)],8,_hoisted_3$8)):createCommentVNode("",!0),l.type==="circle"?(openBlock(),createElementBlock("marker",{key:3,id:l.id,markerWidth:10*l.scale,markerHeight:10*l.scale,refX:2.5*l.scale,refY:2.5*l.scale},[createBaseVNode("circle",{cx:"2.5",cy:"2.5",r:"2.5",style:normalizeStyle(`transform: scale(${l.scale});${l.style}`)},null,4)],8,_hoisted_4$8)):createCommentVNode("",!0),l.type==="cross"?(openBlock(),createElementBlock("marker",{key:4,id:l.id,markerWidth:13*l.scale,orient:"auto",markerHeight:13*l.scale,fill:"none",refX:"5",refY:"5",position:"50%"},[createBaseVNode("path",{d:"M 3,3 L 7,7 M 3,7 L 7,3",fill:"none",stroke:"green","stroke-width":"2",style:normalizeStyle(`transform: scale(${l.scale});${l.style}`)},null,4)],8,_hoisted_5$7)):createCommentVNode("",!0),l.type==="arrow-slim-start"?(openBlock(),createElementBlock("marker",{key:5,id:l.id,orient:"auto",markerWidth:13*l.scale,markerHeight:13*l.scale,refX:1*l.scale,refY:5*l.scale,fill:"none",stroke:"green","stroke-width":"2","stroke-linecap":"round"},[createBaseVNode("path",{d:"M1,5 L9,9 M9,1 L1,5",style:normalizeStyle(`transform: scale(${l.scale});${l.style}`)},null,4)],8,_hoisted_6$6)):createCommentVNode("",!0),l.type==="arrow-slim-end"?(openBlock(),createElementBlock("marker",{key:6,id:l.id,orient:"auto",markerWidth:15*l.scale,markerHeight:15*l.scale,refX:9*l.scale,refY:5*l.scale,"stroke-linecap":"round",fill:"none",stroke:"green","stroke-width":"2"},[createBaseVNode("path",{d:"M10,5 L1,1 M10,5 L1,9",style:normalizeStyle(`transform: scale(${l.scale});${l.style}`)},null,4)],8,_hoisted_7$5)):createCommentVNode("",!0)]))),128))])}const Markers$1=_export_sfc(_sfc_main$f,[["render",_sfc_render$f]]),Wheel=function(){var n="",e,r,s,o=[],a={passive:!0};window.addEventListener?(e="addEventListener",r="removeEventListener"):(e="attachEvent",r="detachEvent",n="on"),s="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll";function l(_,E){var A=function(b){!b&&(b=window.event);var v={originalEvent:b,target:b.target||b.srcElement,type:"wheel",deltaMode:b.type=="MozMousePixelScroll"?0:1,deltaX:0,delatZ:0,preventDefault:function(){b.preventDefault?b.preventDefault():b.returnValue=!1}};return s=="mousewheel"?(v.deltaY=-.025*b.wheelDelta,b.wheelDeltaX&&(v.deltaX=-.025*b.wheelDeltaX)):v.deltaY=b.detail,E(v)};return o.push({element:_,fn:A}),A}function c(_){for(var E=0;Ee?(clearTimeout(c),c=null,u=d,l=n.apply(o,a),c||(o=a=null)):!c&&r.trailing!==!1&&(c=setTimeout(f,g)),l}},createRequestAnimationFrame:function(n){var e=null;return n!=="auto"&&n<60&&n>1&&(e=Math.floor(1e3/n)),e===null?window.requestAnimationFrame||requestTimeout(33):requestTimeout(e)}};function requestTimeout(n){return function(e){window.setTimeout(e,n)}}let _browser="unknown";document.documentMode&&(_browser="ie");const SvgUtils={svgNS:"http://www.w3.org/2000/svg",xmlNS:"http://www.w3.org/XML/1998/namespace",xmlnsNS:"http://www.w3.org/2000/xmlns/",xlinkNS:"http://www.w3.org/1999/xlink",evNS:"http://www.w3.org/2001/xml-events",getBoundingClientRectNormalized:function(n){if(n.clientWidth&&n.clientHeight)return{width:n.clientWidth,height:n.clientHeight};if(n.getBoundingClientRect())return n.getBoundingClientRect();throw new Error("Cannot get BoundingClientRect for SVG.")},getOrCreateViewport:function(n,e){var r=null;if(Utils.isElement(e)?r=e:r=n.querySelector(e),!r){var s=Array.prototype.slice.call(n.childNodes||n.children).filter(function(u){return u.nodeName!=="defs"&&u.nodeName!=="#text"});s.length===1&&s[0].nodeName==="g"&&s[0].getAttribute("transform")===null&&(r=s[0])}if(!r){var o="viewport-"+new Date().toISOString().replace(/\D/g,"");r=document.createElementNS(this.svgNS,"g"),r.setAttribute("id",o);var a=n.childNodes||n.children;if(a&&a.length>0)for(var l=a.length;l>0;l--)a[a.length-l].nodeName!=="defs"&&r.appendChild(a[a.length-l]);n.appendChild(r)}var c=[];return r.getAttribute("class")&&(c=r.getAttribute("class").split(" ")),~c.indexOf("svg-pan-zoom_viewport")||(c.push("svg-pan-zoom_viewport"),r.setAttribute("class",c.join(" "))),r},setupSvgAttributes:function(n){if(n.setAttribute("xmlns",this.svgNS),n.setAttributeNS(this.xmlnsNS,"xmlns:xlink",this.xlinkNS),n.setAttributeNS(this.xmlnsNS,"xmlns:ev",this.evNS),n.parentNode!==null){var e=n.getAttribute("style")||"";e.toLowerCase().indexOf("overflow")===-1&&n.setAttribute("style","overflow: hidden; "+e)}},internetExplorerRedisplayInterval:300,refreshDefsGlobal:Utils.throttle(function(){for(var n=document.querySelectorAll("defs"),e=n.length,r=0;r=0;s--)this.eventListeners.hasOwnProperty(r[s])&&delete this.eventListeners[r[s]]}for(var o in this.eventListeners)(this.options.eventsListenerElement||this.svg).addEventListener(o,this.eventListeners[o],this.options.preventMouseEventsDefault?!1:passiveListenerOption);this.options.mouseWheelZoomEnabled&&(this.options.mouseWheelZoomEnabled=!1,this.enableMouseWheelZoom())};SvgPanZoom.prototype.enableMouseWheelZoom=function(){if(!this.options.mouseWheelZoomEnabled){var n=this;this.wheelListener=function(r){return n.handleMouseWheel(r)};var e=!this.options.preventMouseEventsDefault;Wheel.on(this.options.eventsListenerElement||this.svg,this.wheelListener,e),this.options.mouseWheelZoomEnabled=!0}};SvgPanZoom.prototype.disableMouseWheelZoom=function(){if(this.options.mouseWheelZoomEnabled){var n=!this.options.preventMouseEventsDefault;Wheel.off(this.options.eventsListenerElement||this.svg,this.wheelListener,n),this.options.mouseWheelZoomEnabled=!1}};SvgPanZoom.prototype.handleMouseWheel=function(n){if(!(!this.options.zoomEnabled||this.state!=="none")&&(this.options.preventMouseEventsDefault&&(n.preventDefault?n.preventDefault():n.returnValue=!1),!(this.options.onUserZoom&&this.options.onUserZoom(n)===!1))){var e=n.deltaY||1,r=Date.now()-this.lastMouseWheelEventTime,s=3+Math.max(0,30-r);this.lastMouseWheelEventTime=Date.now(),"deltaMode"in n&&n.deltaMode===0&&n.wheelDelta&&(e=n.deltaY===0?0:Math.abs(n.wheelDelta)/n.deltaY),e=-.30?1:-1)*Math.log(Math.abs(e)+10)/s;var o=this.svg.getScreenCTM().inverse(),a=SvgUtils.getEventPoint(n,this.svg).matrixTransform(o),l=Math.pow(1+this.options.zoomScaleSensitivity,-1*e);this.zoomAtPoint(l,a)}};SvgPanZoom.prototype.zoomAtPoint=function(n,e,r){var s=this.viewport.getOriginalState();r?(n=Math.max(this.options.minZoom*s.zoom,Math.min(this.options.maxZoom*s.zoom,n)),n=n/this.getZoom()):this.getZoom()*nthis.options.maxZoom*s.zoom&&(n=this.options.maxZoom*s.zoom/this.getZoom());var o=this.viewport.getCTM(),a=e.matrixTransform(o.inverse()),l=this.svg.createSVGMatrix().translate(a.x,a.y).scale(n).translate(-a.x,-a.y),c=o.multiply(l);c.a!==o.a&&this.viewport.setCTM(c)};SvgPanZoom.prototype.zoom=function(n,e){this.zoomAtPoint(n,SvgUtils.getSvgCenterPoint(this.svg,this.width,this.height),e)};SvgPanZoom.prototype.publicZoom=function(n,e){e&&(n=this.computeFromRelativeZoom(n)),this.zoom(n,e)};SvgPanZoom.prototype.publicZoomAtPoint=function(n,e,r){if(r&&(n=this.computeFromRelativeZoom(n)),Utils.getType(e)!=="SVGPoint")if("x"in e&&"y"in e)e=SvgUtils.createSVGPoint(this.svg,e.x,e.y);else throw new Error("Given point is invalid");this.zoomAtPoint(n,e,r)};SvgPanZoom.prototype.getZoom=function(){return this.viewport.getZoom()};SvgPanZoom.prototype.getRelativeZoom=function(){return this.viewport.getRelativeZoom()};SvgPanZoom.prototype.computeFromRelativeZoom=function(n){return n*this.viewport.getOriginalState().zoom};SvgPanZoom.prototype.resetZoom=function(){var n=this.viewport.getOriginalState();this.zoom(n.zoom,!0)};SvgPanZoom.prototype.resetPan=function(){this.pan(this.viewport.getOriginalState())};SvgPanZoom.prototype.reset=function(){this.resetZoom(),this.resetPan()};SvgPanZoom.prototype.handleDblClick=function(n){if(this.options.preventMouseEventsDefault&&(n.preventDefault?n.preventDefault():n.returnValue=!1),this.options.controlIconsEnabled){var e=n.target.getAttribute("class")||"";if(e.indexOf("svg-pan-zoom-control")>-1)return!1}var r;n.shiftKey?r=1/((1+this.options.zoomScaleSensitivity)*2):r=(1+this.options.zoomScaleSensitivity)*2;var s=SvgUtils.getEventPoint(n,this.svg).matrixTransform(this.svg.getScreenCTM().inverse());this.zoomAtPoint(r,s)};SvgPanZoom.prototype.handleMouseDown=function(n,e){this.options.preventMouseEventsDefault&&(n.preventDefault?n.preventDefault():n.returnValue=!1),Utils.mouseAndTouchNormalize(n,this.svg);const r=Utils.isDblClick(n,e);this.options.onDoubleClick&&r&&this.options.onDoubleClick(),this.options.dblClickZoomEnabled&&r?this.handleDblClick(n):(this.state="pan",this.firstEventCTM=this.viewport.getCTM(),this.stateOrigin=SvgUtils.getEventPoint(n,this.svg).matrixTransform(this.firstEventCTM.inverse()))};SvgPanZoom.prototype.handleMouseMove=function(n){if(this.options.preventMouseEventsDefault&&(n.preventDefault?n.preventDefault():n.returnValue=!1),this.state==="pan"&&this.options.panEnabled){if(this.options.onUserPan&&this.options.onUserPan(n)===!1)return;var e=SvgUtils.getEventPoint(n,this.svg).matrixTransform(this.firstEventCTM.inverse()),r=this.firstEventCTM.translate(e.x-this.stateOrigin.x,e.y-this.stateOrigin.y);this.viewport.setCTM(r)}};SvgPanZoom.prototype.handleMouseUp=function(n){this.options.preventMouseEventsDefault&&(n.preventDefault?n.preventDefault():n.returnValue=!1),this.state==="pan"&&(this.state="none")};SvgPanZoom.prototype.fit=function(){var n=this.viewport.getViewBox(),e=Math.min(this.width/n.width,this.height/n.height);this.zoom(e,!0)};SvgPanZoom.prototype.contain=function(){var n=this.viewport.getViewBox(),e=Math.max(this.width/n.width,this.height/n.height);this.zoom(e,!0)};SvgPanZoom.prototype.center=function(){var n=this.viewport.getViewBox(),e=(this.width-(n.width+n.x*2)*this.getZoom())*.5,r=(this.height-(n.height+n.y*2)*this.getZoom())*.5;this.getPublicInstance().pan({x:e,y:r})};SvgPanZoom.prototype.updateBBox=function(){this.viewport.simpleViewBoxCache()};SvgPanZoom.prototype.pan=function(n){var e=this.viewport.getCTM();e.e=n.x,e.f=n.y,this.viewport.setCTM(e)};SvgPanZoom.prototype.panBy=function(n){var e=this.viewport.getCTM();e.e+=n.x,e.f+=n.y,this.viewport.setCTM(e)};SvgPanZoom.prototype.getPan=function(){var n=this.viewport.getState();return{x:n.x,y:n.y}};SvgPanZoom.prototype.resize=function(){var n=SvgUtils.getBoundingClientRectNormalized(this.svg);this.width=n.width,this.height=n.height;var e=this.viewport;e.options.width=this.width,e.options.height=this.height,e.processCTM(),this.options.controlIconsEnabled&&(this.getPublicInstance().disableControlIcons(),this.getPublicInstance().enableControlIcons())};SvgPanZoom.prototype.destroy=function(){var n=this;this.beforeZoom=null,this.onZoom=null,this.beforePan=null,this.onPan=null,this.onUpdatedCTM=null,this.options.customEventsHandler!=null&&this.options.customEventsHandler.destroy({svgElement:this.svg,eventsListenerElement:this.options.eventsListenerElement,instance:this.getPublicInstance()});for(var e in this.eventListeners)(this.options.eventsListenerElement||this.svg).removeEventListener(e,this.eventListeners[e],this.options.preventMouseEventsDefault?!1:passiveListenerOption);this.disableMouseWheelZoom(),this.getPublicInstance().disableControlIcons(),this.reset(),instancesStore=instancesStore.filter(function(r){return r.svg!==n.svg}),delete this.options,delete this.viewport,delete this.publicInstance,delete this.pi,this.getPublicInstance=function(){return null}};SvgPanZoom.prototype.getPublicInstance=function(){var n=this;return this.publicInstance||(this.publicInstance=this.pi={options:this.options,enablePan:function(){return n.options.panEnabled=!0,n.pi},disablePan:function(){return n.options.panEnabled=!1,n.pi},isPanEnabled:function(){return!!n.options.panEnabled},pan:function(e){return n.pan(e),n.pi},panBy:function(e){return n.panBy(e),n.pi},getPan:function(){return n.getPan()},setBeforePan:function(e){return n.options.beforePan=e===null?null:Utils.proxy(e,n.publicInstance),n.pi},setOnPan:function(e){return n.options.onPan=e===null?null:Utils.proxy(e,n.publicInstance),n.pi},enableZoom:function(){return n.options.zoomEnabled=!0,n.pi},disableZoom:function(){return n.options.zoomEnabled=!1,n.pi},isZoomEnabled:function(){return!!n.options.zoomEnabled},enableControlIcons:function(){return n.options.controlIconsEnabled||(n.options.controlIconsEnabled=!0,ControlIcons.enable(n)),n.pi},disableControlIcons:function(){return n.options.controlIconsEnabled&&(n.options.controlIconsEnabled=!1,ControlIcons.disable(n)),n.pi},isControlIconsEnabled:function(){return!!n.options.controlIconsEnabled},enableDblClickZoom:function(){return n.options.dblClickZoomEnabled=!0,n.pi},disableDblClickZoom:function(){return n.options.dblClickZoomEnabled=!1,n.pi},isDblClickZoomEnabled:function(){return!!n.options.dblClickZoomEnabled},enableMouseWheelZoom:function(){return n.enableMouseWheelZoom(),n.pi},disableMouseWheelZoom:function(){return n.disableMouseWheelZoom(),n.pi},isMouseWheelZoomEnabled:function(){return!!n.options.mouseWheelZoomEnabled},setZoomScaleSensitivity:function(e){return n.options.zoomScaleSensitivity=e,n.pi},setMinZoom:function(e){return n.options.minZoom=e,n.pi},setMaxZoom:function(e){return n.options.maxZoom=e,n.pi},setBeforeZoom:function(e){return n.options.beforeZoom=e===null?null:Utils.proxy(e,n.publicInstance),n.pi},setOnZoom:function(e){return n.options.onZoom=e===null?null:Utils.proxy(e,n.publicInstance),n.pi},zoom:function(e){return n.publicZoom(e,!0),n.pi},zoomBy:function(e){return n.publicZoom(e,!1),n.pi},zoomAtPoint:function(e,r){return n.publicZoomAtPoint(e,r,!0),n.pi},zoomAtPointBy:function(e,r){return n.publicZoomAtPoint(e,r,!1),n.pi},zoomIn:function(){return this.zoomBy(1+n.options.zoomScaleSensitivity),n.pi},zoomOut:function(){return this.zoomBy(1/(1+n.options.zoomScaleSensitivity)),n.pi},getZoom:function(){return n.getRelativeZoom()},setOnUpdatedCTM:function(e){return n.options.onUpdatedCTM=e===null?null:Utils.proxy(e,n.publicInstance),n.pi},resetZoom:function(){return n.resetZoom(),n.pi},resetPan:function(){return n.resetPan(),n.pi},reset:function(){return n.reset(),n.pi},fit:function(){return n.fit(),n.pi},contain:function(){return n.contain(),n.pi},center:function(){return n.center(),n.pi},updateBBox:function(){return n.updateBBox(),n.pi},resize:function(){return n.resize(),n.pi},getSizes:function(){return{width:n.width,height:n.height,realZoom:n.getZoom(),viewBox:n.viewport.getViewBox()}},destroy:function(){return n.destroy(),n.pi}}),this.publicInstance};var instancesStore=[],svgPanZoom=function(n,e){var r=Utils.getSvg(n);if(r===null)return null;for(var s=instancesStore.length-1;s>=0;s--)if(instancesStore[s].svg===r)return instancesStore[s].instance.getPublicInstance();return instancesStore.push({svg:r,instance:new SvgPanZoom(r,e)}),instancesStore[instancesStore.length-1].instance.getPublicInstance()};const Screen_vue_vue_type_style_index_0_scoped_3ee11ae5_lang="",_sfc_main$e={props:{markers:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},components:{Markers:Markers$1},data(){return{panzoom:null}},mounted(){this.panzoom=svgPanZoom(this.$refs.screen,Object.assign({dblClickZoomEnabled:!1,mouseWheelZoomEnabled:!0,preventMouseEventsDefault:!0,controlIconsEnabled:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),fit:!1,contain:!1,center:!1,zoomScaleSensitivity:.4,minZoom:.1,maxZoom:5,onZoom:n=>{},onPan:n=>{},onUserZoom:n=>{},onUserPan:n=>{},onDoubleClick:()=>{},onUpdatedCTM:n=>{}},this.options)),this.panzoom.zoomRect=this.zoomRect,this.panzoom.zoomNode=this.zoomNode,this.panzoom.panNode=this.panNode},methods:{zoomTo({x:n,y:e,scale:r}){this.panzoom.zoom(r),this.panzoom.pan(n,e)},zoomRect(n,e={scale:null}){let r=e.scale;const s=this.$refs.screen,o=n.right-n.left,a=n.bottom-n.top;if(!r){const u=o/s.clientWidth,f=a/s.clientHeight;r=1/Math.max(u,f)}const l=-n.left*r+(s.clientWidth/r-o)/2*r,c=-n.top*r+(s.clientHeight/r-a)/2*r;this.panzoom.zoom(r),this.panzoom.pan({x:l,y:c})},zoomNode(n){const e=this.$refs.screen,r=e.clientWidth/2-n.width/2,s=e.clientHeight/2-n.height/2;this.zoomRect({left:n.x-r,right:n.x+n.width+r,top:n.y-s,bottom:n.y+n.height+s})},zoomNodes(n,e={padding:50,scale:null}){if(!n||!n.length)return;const r=e.padding||50,s=e.scale;let o=1/0,a=1/0,l=-1/0,c=-1/0;n.forEach(u=>{u.xl&&(l=u.x+u.width),u.yc&&(c=u.y+u.height)}),this.zoomRect({left:o-r,top:a-r,right:l+r,bottom:c+r},{scale:s})},panNode(n,e={offsetX,offsetY}){const r=e.offsetX||0,s=e.offsetY||0,o=this.panzoom.getZoom(),a=this.$el.clientWidth/2-(n.x+n.width/2)*o+r,l=this.$el.clientHeight/2-(n.y+n.height/2)*o+s;this.panzoom.pan({x:a,y:l})}}},_hoisted_1$e={class:"screen",ref:"screen"};function _sfc_render$e(n,e,r,s,o,a){const l=resolveComponent("markers");return openBlock(),createElementBlock("svg",_hoisted_1$e,[createBaseVNode("defs",null,[createVNode(l,{markers:r.markers},null,8,["markers"])]),createBaseVNode("g",null,[renderSlot(n.$slots,"default",{},void 0,!0)])],512)}const Screen=_export_sfc(_sfc_main$e,[["render",_sfc_render$e],["__scopeId","data-v-3ee11ae5"]]),drag={props:{dragThreshold:{type:Number,default:10}},data(){return{drag:{zoom:1,active:!1,prev:{x:0,y:0},threshold:{x:0,y:0,crossed:!1}}}},methods:{preventClicks(n){this.drag.threshold.crossed&&(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),document.removeEventListener("click",this.preventClicks,!0))},startDrag(n){let e=this.$parent;for(;e;){if(e.panzoom){this.drag.zoom=e.panzoom.getZoom();break}e=e.$parent}n.touches&&n.touches.length&&(n.clientX=n.touches[0].clientX,n.clientY=n.touches[0].clientY),this.drag.active=!0,this.drag.prev={x:n.clientX,y:n.clientY},this.drag.threshold={x:0,y:0,crossed:!1},document.addEventListener("mouseup",this.stopDrag),document.addEventListener("touchend",this.stopDrag),document.addEventListener("mousemove",this.applyDrag),document.addEventListener("touchmove",this.applyDrag),document.addEventListener("click",this.preventClicks,!0)},stopDrag(){this.drag.active=!1,document.removeEventListener("mouseup",this.stopDrag),document.removeEventListener("touchend",this.stopDrag),document.removeEventListener("mousemove",this.applyDrag),document.removeEventListener("touchmove",this.applyDrag)},applyDrag(n){n.touches&&n.touches.length&&(n.clientX=n.touches[0].clientX,n.clientY=n.touches[0].clientY);let e=(n.clientX-this.drag.prev.x)/this.drag.zoom,r=(n.clientY-this.drag.prev.y)/this.drag.zoom;if(this.drag.prev={x:n.clientX,y:n.clientY},!this.drag.threshold.crossed)if(Math.abs(this.drag.threshold.x)a.onMousedown&&a.onMousedown(...l)),onTouchstart:e[1]||(e[1]=(...l)=>a.onMousedown&&a.onMousedown(...l))},[createBaseVNode("div",{class:"outer",style:normalizeStyle(`padding: ${r.margin}px;`)},[createBaseVNode("div",{class:normalizeClass(["content",r.background&&"background"]),ref:"content"},[n.$slots.default?createCommentVNode("",!0):(openBlock(),createElementBlock("div",_hoisted_2$a,toDisplayString(r.data.id),1)),renderSlot(n.$slots,"default")],2)],4)],42,_hoisted_1$d)}const Node=_export_sfc(_sfc_main$d,[["render",_sfc_render$d]]);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getAugmentedNamespace(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var r=function s(){if(this instanceof s){var o=[null];o.push.apply(o,arguments);var a=Function.bind.apply(e,o);return new a}return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(n).forEach(function(s){var o=Object.getOwnPropertyDescriptor(n,s);Object.defineProperty(r,s,o.get?o:{enumerable:!0,get:function(){return n[s]}})}),r}var victorExports={},victor={get exports(){return victorExports},set exports(n){victorExports=n}};(function(n,e){n.exports=r;function r(c,u){if(!(this instanceof r))return new r(c,u);this.x=c||0,this.y=u||0}r.fromArray=function(c){return new r(c[0]||0,c[1]||0)},r.fromObject=function(c){return new r(c.x||0,c.y||0)},r.prototype.addX=function(c){return this.x+=c.x,this},r.prototype.addY=function(c){return this.y+=c.y,this},r.prototype.add=function(c){return this.x+=c.x,this.y+=c.y,this},r.prototype.addScalar=function(c){return this.x+=c,this.y+=c,this},r.prototype.addScalarX=function(c){return this.x+=c,this},r.prototype.addScalarY=function(c){return this.y+=c,this},r.prototype.subtractX=function(c){return this.x-=c.x,this},r.prototype.subtractY=function(c){return this.y-=c.y,this},r.prototype.subtract=function(c){return this.x-=c.x,this.y-=c.y,this},r.prototype.subtractScalar=function(c){return this.x-=c,this.y-=c,this},r.prototype.subtractScalarX=function(c){return this.x-=c,this},r.prototype.subtractScalarY=function(c){return this.y-=c,this},r.prototype.divideX=function(c){return this.x/=c.x,this},r.prototype.divideY=function(c){return this.y/=c.y,this},r.prototype.divide=function(c){return this.x/=c.x,this.y/=c.y,this},r.prototype.divideScalar=function(c){return c!==0?(this.x/=c,this.y/=c):(this.x=0,this.y=0),this},r.prototype.divideScalarX=function(c){return c!==0?this.x/=c:this.x=0,this},r.prototype.divideScalarY=function(c){return c!==0?this.y/=c:this.y=0,this},r.prototype.invertX=function(){return this.x*=-1,this},r.prototype.invertY=function(){return this.y*=-1,this},r.prototype.invert=function(){return this.invertX(),this.invertY(),this},r.prototype.multiplyX=function(c){return this.x*=c.x,this},r.prototype.multiplyY=function(c){return this.y*=c.y,this},r.prototype.multiply=function(c){return this.x*=c.x,this.y*=c.y,this},r.prototype.multiplyScalar=function(c){return this.x*=c,this.y*=c,this},r.prototype.multiplyScalarX=function(c){return this.x*=c,this},r.prototype.multiplyScalarY=function(c){return this.y*=c,this},r.prototype.normalize=function(){var c=this.length();return c===0?(this.x=1,this.y=0):this.divide(r(c,c)),this},r.prototype.norm=r.prototype.normalize,r.prototype.limit=function(c,u){return Math.abs(this.x)>c&&(this.x*=u),Math.abs(this.y)>c&&(this.y*=u),this},r.prototype.randomize=function(c,u){return this.randomizeX(c,u),this.randomizeY(c,u),this},r.prototype.randomizeX=function(c,u){var f=Math.min(c.x,u.x),d=Math.max(c.x,u.x);return this.x=o(f,d),this},r.prototype.randomizeY=function(c,u){var f=Math.min(c.y,u.y),d=Math.max(c.y,u.y);return this.y=o(f,d),this},r.prototype.randomizeAny=function(c,u){return Math.round(Math.random())?this.randomizeX(c,u):this.randomizeY(c,u),this},r.prototype.unfloat=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},r.prototype.toFixed=function(c){return typeof c>"u"&&(c=8),this.x=this.x.toFixed(c),this.y=this.y.toFixed(c),this},r.prototype.mixX=function(c,u){return typeof u>"u"&&(u=.5),this.x=(1-u)*this.x+u*c.x,this},r.prototype.mixY=function(c,u){return typeof u>"u"&&(u=.5),this.y=(1-u)*this.y+u*c.y,this},r.prototype.mix=function(c,u){return this.mixX(c,u),this.mixY(c,u),this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.copyX=function(c){return this.x=c.x,this},r.prototype.copyY=function(c){return this.y=c.y,this},r.prototype.copy=function(c){return this.copyX(c),this.copyY(c),this},r.prototype.zero=function(){return this.x=this.y=0,this},r.prototype.dot=function(c){return this.x*c.x+this.y*c.y},r.prototype.cross=function(c){return this.x*c.y-this.y*c.x},r.prototype.projectOnto=function(c){var u=(this.x*c.x+this.y*c.y)/(c.x*c.x+c.y*c.y);return this.x=u*c.x,this.y=u*c.y,this},r.prototype.horizontalAngle=function(){return Math.atan2(this.y,this.x)},r.prototype.horizontalAngleDeg=function(){return a(this.horizontalAngle())},r.prototype.verticalAngle=function(){return Math.atan2(this.x,this.y)},r.prototype.verticalAngleDeg=function(){return a(this.verticalAngle())},r.prototype.angle=r.prototype.horizontalAngle,r.prototype.angleDeg=r.prototype.horizontalAngleDeg,r.prototype.direction=r.prototype.horizontalAngle,r.prototype.rotate=function(c){var u=this.x*Math.cos(c)-this.y*Math.sin(c),f=this.x*Math.sin(c)+this.y*Math.cos(c);return this.x=u,this.y=f,this},r.prototype.rotateDeg=function(c){return c=l(c),this.rotate(c)},r.prototype.rotateTo=function(c){return this.rotate(c-this.angle())},r.prototype.rotateToDeg=function(c){return c=l(c),this.rotateTo(c)},r.prototype.rotateBy=function(c){var u=this.angle()+c;return this.rotate(u)},r.prototype.rotateByDeg=function(c){return c=l(c),this.rotateBy(c)},r.prototype.distanceX=function(c){return this.x-c.x},r.prototype.absDistanceX=function(c){return Math.abs(this.distanceX(c))},r.prototype.distanceY=function(c){return this.y-c.y},r.prototype.absDistanceY=function(c){return Math.abs(this.distanceY(c))},r.prototype.distance=function(c){return Math.sqrt(this.distanceSq(c))},r.prototype.distanceSq=function(c){var u=this.distanceX(c),f=this.distanceY(c);return u*u+f*f},r.prototype.length=function(){return Math.sqrt(this.lengthSq())},r.prototype.lengthSq=function(){return this.x*this.x+this.y*this.y},r.prototype.magnitude=r.prototype.length,r.prototype.isZero=function(){return this.x===0&&this.y===0},r.prototype.isEqualTo=function(c){return this.x===c.x&&this.y===c.y},r.prototype.toString=function(){return"x:"+this.x+", y:"+this.y},r.prototype.toArray=function(){return[this.x,this.y]},r.prototype.toObject=function(){return{x:this.x,y:this.y}};var s=180/Math.PI;function o(c,u){return Math.floor(Math.random()*(u-c+1)+c)}function a(c){return c*s}function l(c){return c/s}})(victor);const Victor=victorExports,Edge_vue_vue_type_style_index_0_scoped_20186235_lang="",_sfc_main$c={props:{data:{type:Object,required:!0},nodes:{type:Array}},mounted(){if(typeof this.data.id>"u"){const n=Math.random().toString(36).slice(2);this.$set?this.$set(this.data,"id",n):this.data.id=n}typeof this.data.pathd>"u"&&(this.$set?this.$set(this.data,"pathd",""):this.data.pathd="")},computed:{fromNode:n=>typeof n.data.from=="string"?n.nodes.find(e=>e.id===n.data.from):n.data.from,toNode:n=>typeof n.data.to=="string"?n.nodes.find(e=>e.id===n.data.to):n.data.to,fromAnchor:n=>n.parseAnchor(n.data.fromAnchor,n.fromNode),toAnchor:n=>n.parseAnchor(n.data.toAnchor,n.toNode),pos(){let n=this.fromNode.x+(this.fromAnchor.x||0),e=this.fromNode.y+(this.fromAnchor.y||0),r=this.toNode.x+(this.toAnchor.x||0),s=this.toNode.y+(this.toAnchor.y||0);if(this.fromAnchor&&this.fromAnchor.snap){if(this.fromAnchor.snap==="circle"){const o=Math.max(this.fromNode.width,this.fromNode.height)/2,a=new Victor(r-n,s-e).normalize();n+=a.x*o,e+=a.y*o}if(this.fromAnchor.snap==="rect"){const o=util$1.lineRect(r,n,s,e,this.fromNode);o&&(n=o.x,e=o.y)}}if(this.toAnchor&&this.toAnchor.snap){if(this.toAnchor.snap==="circle"){const o=Math.max(this.toNode.width,this.toNode.height)/2,a=new Victor(r-n,s-e).normalize();r-=a.x*o,s-=a.y*o}if(this.toAnchor.snap==="rect"){const o=util$1.lineRect(n,r,e,s,this.toNode);o&&(r=o.x,s=o.y)}}return{x1:n,x2:r,y1:e,y2:s}},path(){const n=Object.assign({},this.pos);let e=`M ${n.x1},${n.y1} `;const r=n.x1-n.x2,s=n.y1-n.y2;if(this.data.type==="hsmooth"||this.data.type==="smooth"&&Math.abs(r)>=Math.abs(s)){const o={x:n.x1-r/2,y:n.y1},a={x:n.x2+r/2,y:n.y2};e+=` C ${o.x},${o.y} ${a.x},${a.y} `}else if(this.data.type==="vsmooth"||this.data.type==="smooth"&&Math.abs(s)>Math.abs(r)){const o={x:n.x1,y:n.y1-s/2},a={x:n.x2,y:n.y2+s/2};e+=` C ${o.x},${o.y} ${a.x},${a.y} `}else if(this.data.type==="ortho"&&Math.abs(r)>=Math.abs(s)){const o={x:n.x1-r/2,y:n.y1},a={x:n.x2+r/2,y:n.y2};e+=` ${o.x},${o.y} ${a.x},${a.y} `}else if(this.data.type==="ortho"&&Math.abs(s)>Math.abs(r)){const o={x:n.x1,y:n.y1-s/2},a={x:n.x2,y:n.y2+s/2};e+=` ${o.x},${o.y} ${a.x},${a.y} `}return e+=` ${n.x2} ${n.y2}`,this.data.pathd=e,e}},methods:{parseAnchor(n,e){if(!n)return{x:0,y:0};let r=n.snap,s=n.align,o={x:n.x||0,y:n.y||0};if(typeof n=="string"&&(n==="rect"||n==="circle"?(r=n,o={x:"50%",y:"50%"}):s=n),s)if(s==="center")o={x:"50%",y:"50%"};else if(s==="left")o={x:0,y:"50%"};else if(s==="right")o={x:"100%",y:"50%"};else if(s==="top")o={x:"50%",y:0};else if(s==="top-left")o={x:0,y:0};else if(s==="top-right")o={x:"100%",y:0};else if(s==="bottom")o={x:"50%",y:"100%"};else if(s==="bottom-left")o={x:0,y:"100%"};else if(s==="bottom-right")o={x:"100%",y:"100%"};else throw new Error("unkown anchor align"+s);return o.x.endsWith&&(o.x=o.x.endsWith("%")?parseInt(o.x)/100*e.width:parseInt(o.x)),o.y.endsWith&&(o.y=o.y.endsWith("%")?parseInt(o.y)/100*e.height:parseInt(o.y)),{x:o.x,y:o.y,snap:r}}}},_hoisted_1$c=["d","id"];function _sfc_render$c(n,e,r,s,o,a){return openBlock(),createElementBlock("path",{class:"edge",d:a.path,id:r.data.id},null,8,_hoisted_1$c)}const Edge=_export_sfc(_sfc_main$c,[["render",_sfc_render$c],["__scopeId","data-v-20186235"]]),Group_vue_vue_type_style_index_0_lang="",_sfc_main$b={mixins:[drag],props:{nodes:{type:Array,default:[]},margin:{type:Number,default:20},padding:{type:Object,default:()=>({left:10,right:10,top:10,bottom:10})},disableDrag:!1},computed:{minX:n=>n.nodes.length?n.nodes.reduce((e,r)=>Math.min(e,r.x),1/0):0,maxX:n=>n.nodes.length?n.nodes.reduce((e,r)=>Math.max(e,r.x+r.width),-1/0):0,minY:n=>n.nodes.length?n.nodes.reduce((e,r)=>Math.min(e,r.y),1/0):0,maxY:n=>n.nodes.length?n.nodes.reduce((e,r)=>Math.max(e,r.y+r.height),-1/0):0,width:n=>n.maxX-n.minX,height:n=>n.maxY-n.minY,contentMargin:n=>n.margin&&{margin:n.margin+"px",width:`calc(100% - ${n.margin*2}px)`,height:`calc(100% - ${n.margin*2}px)`}},methods:{onDrag({x:n,y:e}){this.nodes.forEach(r=>{r.x+=n,r.y+=e})},onMousedown(n){n.stopPropagation(),this.disableDrag||(n.preventDefault(),this.startDrag(n))}}},_hoisted_1$b=["x","y","width","height"];function _sfc_render$b(n,e,r,s,o,a){return openBlock(),createElementBlock("foreignObject",{class:"group",x:a.minX-r.padding.left-r.margin,y:a.minY-r.padding.top-r.margin,width:a.width+(r.padding.left+r.padding.right)+r.margin*2,height:a.height+(r.padding.top+r.padding.bottom)+r.margin*2,onMousedown:e[0]||(e[0]=(...l)=>a.onMousedown&&a.onMousedown(...l))},[createBaseVNode("div",{class:"content",ref:"content",style:normalizeStyle(a.contentMargin)},[renderSlot(n.$slots,"default")],4)],40,_hoisted_1$b)}const Group=_export_sfc(_sfc_main$b,[["render",_sfc_render$b]]),Port_vue_vue_type_style_index_0_lang="",_sfc_main$a={props:{id:String,startOffset:Object,edgesFrom:{type:Array,default:()=>[]},edgesTo:{type:Array,default:()=>[]}},data(){return{offset:{x:0,y:0}}},mounted(){this.updatePosition()},methods:{updatePosition(){let n=this.$slots.default&&this.$slots.default.length===1&&this.$slots.default[0].elm&&this.$slots.default[0].elm.offsetWidth?this.$slots.default[0].elm:this.$el;for(this.offset=this.startOffset||{x:n.offsetWidth/2,y:n.offsetHeight/2};n&&!n.classList.contains("content");)this.offset.x+=n.offsetLeft||0,this.offset.y+=n.offsetTop||0,n=n.offsetParent;this.edgesFrom.forEach(e=>{Object.assign(e.fromAnchor,this.offset)}),this.edgesTo.forEach(e=>{Object.assign(e.toAnchor,this.offset)})}},watch:{edgesFrom:"updatePosition",edgesTo:"updatePosition"}},_hoisted_1$a={class:"port"};function _sfc_render$a(n,e,r,s,o,a){return openBlock(),createElementBlock("span",_hoisted_1$a,[renderSlot(n.$slots,"default")])}const Port=_export_sfc(_sfc_main$a,[["render",_sfc_render$a]]),Label_vue_vue_type_style_index_0_lang="",_sfc_main$9={components:{Node},props:{edge:{type:Object,required:!0},perc:{type:Number,default:50},offset:{type:Object,default:()=>({x:0,y:0})},align:{type:String,default:"center"},rotate:{type:Boolean,default:!1},useDrag:{type:Boolean,default:!1},connector:{type:Boolean,default:!1}},data(){return{pos:{x:0,y:0},node:{id:Math.random().toString(36).slice(2),x:250,y:0,width:100,height:100},angle:0}},mounted(){this.$nextTick(this.getPosition)},methods:{getPosition(){const n=document.getElementById(this.edge.id);if(!n)throw`element not found: ${this.edge.id}`;const e=n.getTotalLength()*this.perc/100;if(this.pos=n.getPointAtLength(e),this.rotate){const r=n.getPointAtLength(e+.01);this.angle=Math.atan2(r.y-this.pos.y,r.x-this.pos.x)}else this.angle=0},updateNodePos(){const n={x:0,y:0};this.align==="center"?(n.x=this.node.width/2,n.y=this.node.height/2):this.align==="top"?n.x=this.node.width/2:this.align==="top-right"?n.x=node.width:this.align==="left"?n.y=this.node.height/2:this.align==="right"?(n.x=this.node.width,n.y=this.node.height/2):this.align==="bottom-left"?n.y=this.node.height:this.align==="bottom"?(n.x=this.node.width/2,n.y=this.node.height):this.align==="bottom-right"&&(n.x=this.node.width,n.y=this.node.height),this.node.x=this.pos.x+this.offset.x-n.x,this.node.y=this.pos.y+this.offset.y-n.y}},computed:{nodeTransform:n=>` +`).forEach(s=>{s.split("/").forEach((o,a,l)=>{const c=o.trim();if(!c)return;const u=a&&l[a-1].trim(),f={id:c,children:[]},d=u&&n.find(g=>g.id===u);d?d.children.push(f):e.push(f),n.push(f)})}),e}},watch:{parsedGraph(){this.$nextTick(this.createNodes)},connType(n){this.graph.edges.forEach(e=>{e.type=n})},graphDir(){this.graphNodes(),this.centerNodes()},graphType(){this.graphNodes(),this.centerNodes()},groupNodes(n){this.$emit("toggleGroupNodes",n)},edgeSnap(n){this.graph.edges.forEach(e=>{e.fromAnchor.snap=n,e.toAnchor.snap=n})},edgeAlign(n){this.graph.edges.forEach(e=>{e.fromAnchor.align=n,e.toAnchor.align=n})},anchorX(n){n?n.endsWith("%")||(n=parseFloat(n)):n="50%",this.graph.edges.forEach(e=>{e.fromAnchor.x=n,e.toAnchor.x=n})},anchorY(n){n?n.endsWith("%")||(n=parseFloat(n)):n="50%",this.graph.edges.forEach(e=>{e.fromAnchor.y=n,e.toAnchor.y=n})}}},_hoisted_1$g=createBaseVNode("div",{style:{"font-weight":"bold"}},"Graph",-1),_hoisted_2$c=createBaseVNode("span",null,"type",-1),_hoisted_3$9=createBaseVNode("option",{value:"basic"},"basic",-1),_hoisted_4$9=createBaseVNode("option",{value:"basic-invert"},"invert",-1),_hoisted_5$8=createBaseVNode("option",{value:"tree"},"tree",-1),_hoisted_6$7=[_hoisted_3$9,_hoisted_4$9,_hoisted_5$8],_hoisted_7$6=createBaseVNode("span",null,"dir ",-1),_hoisted_8$5=createBaseVNode("option",{value:"left"},"left",-1),_hoisted_9$1=createBaseVNode("option",{value:"right"},"right",-1),_hoisted_10$1=createBaseVNode("option",{value:"up"},"up",-1),_hoisted_11$1=createBaseVNode("option",{value:"down"},"down",-1),_hoisted_12$1=[_hoisted_8$5,_hoisted_9$1,_hoisted_10$1,_hoisted_11$1],_hoisted_13$1=createBaseVNode("div",{style:{"font-weight":"bold"}},"Edges",-1),_hoisted_14$1=createBaseVNode("span",null,"type ",-1),_hoisted_15$2=createStaticVNode('',5),_hoisted_20=[_hoisted_15$2],_hoisted_21=createBaseVNode("span",null,"snap ",-1),_hoisted_22=createBaseVNode("option",{value:"anchor"},"anchor",-1),_hoisted_23=createBaseVNode("option",{value:"rect"},"rect",-1),_hoisted_24=createBaseVNode("option",{value:"circle"},"circle",-1),_hoisted_25=[_hoisted_22,_hoisted_23,_hoisted_24],_hoisted_26=createBaseVNode("div",{style:{"font-weight":"bold"}},"Nodes",-1),_hoisted_27=createBaseVNode("span",null," Group",-1);function _sfc_render$g(n,e,r,s,o,a){return openBlock(),createElementBlock("div",null,[_hoisted_1$g,withDirectives(createBaseVNode("textarea",{"onUpdate:modelValue":e[0]||(e[0]=l=>o.graphText=l),placeholder:"add multiple lines",rows:"4"},null,512),[[vModelText,o.graphText]]),createBaseVNode("div",null,[_hoisted_2$c,withDirectives(createBaseVNode("select",{"onUpdate:modelValue":e[1]||(e[1]=l=>o.graphType=l)},_hoisted_6$7,512),[[vModelSelect,o.graphType]])]),createBaseVNode("div",null,[_hoisted_7$6,withDirectives(createBaseVNode("select",{"onUpdate:modelValue":e[2]||(e[2]=l=>o.graphDir=l)},_hoisted_12$1,512),[[vModelSelect,o.graphDir]])]),_hoisted_13$1,createBaseVNode("div",null,[_hoisted_14$1,withDirectives(createBaseVNode("select",{"onUpdate:modelValue":e[3]||(e[3]=l=>o.connType=l)},_hoisted_20,512),[[vModelSelect,o.connType]])]),createBaseVNode("div",null,[_hoisted_21,withDirectives(createBaseVNode("select",{"onUpdate:modelValue":e[4]||(e[4]=l=>o.edgeSnap=l)},_hoisted_25,512),[[vModelSelect,o.edgeSnap]])]),_hoisted_26,createBaseVNode("div",null,[withDirectives(createBaseVNode("input",{type:"text",placeholder:"a,b,c (nodes filter)","onUpdate:modelValue":e[5]||(e[5]=l=>o.graphNodesFilter=l)},null,512),[[vModelText,o.graphNodesFilter]])]),createBaseVNode("button",{onClick:e[6]||(e[6]=()=>a.zoomNodes(null,a.filterNodes))},"Zoom Nodes"),createBaseVNode("button",{onClick:e[7]||(e[7]=()=>a.graphNodes(a.filterNodes))},"Graph Nodes"),createBaseVNode("div",null,[withDirectives(createBaseVNode("input",{type:"checkbox",id:"groupNodes","onUpdate:modelValue":e[8]||(e[8]=l=>o.groupNodes=l)},null,512),[[vModelCheckbox,o.groupNodes]]),_hoisted_27])])}const SinkSidebar=_export_sfc(_sfc_main$g,[["render",_sfc_render$g]]);function findPosition$1(n,e,r="right",s,o={x:40,y:40},a=!1){const l=o.x||o,c=o.y||o,u=e?r==="down"||r==="up"?e.x:r==="right"?e.x+e.width+l:r==="left"?e.x-n.width-l:-1:0,f=e?r==="right"||r==="left"?e.y:r==="down"?e.y+e.height+c:r==="up"?e.y-n.height-c:-1:0,d=r==="down"||r==="up",g=r==="right"||r==="left",m=d?l*(a?-1:1):0,_=g?c*(a?-1:1):0,E=s.filter(v=>v.id!==n.id),A={x:u,y:f,width:n.width,height:n.height};let b=boxBoxes(A,E);for(;b.length;){const v=b[0];m?A.x=v.x+m+(m>0?v.width:-n.width):A.y=v.y+_+(_>0?v.height:-n.height),b=boxBoxes(A,E)}return{x:A.x,y:A.y}}function boxBox(n,e){return n.xe.x&&n.ye.y}function boxBoxes(n,e){return e.filter(r=>boxBox(r,n))}function createDAG(n,e){const r=n.map(o=>({id:o.id,x:o.x,y:o.y,width:o.width,height:o.height,parentIds:[],children:[]})),s={};return e.forEach(o=>{if(s[o.from+o.to])return;s[o.from+o.to]=!0;const a=r.find(c=>c.id===o.from),l=r.find(c=>c.id===o.to);a&&l&&(a.children.push(l),l.parentIds.push(a.id))}),removeCycles(r),r}const removeCycles=n=>{const e=[],r=l=>l.state===0,s=l=>l.state===1,o=l=>l.state===2;n.forEach(l=>{l.state=0});const a=l=>{l.state=1,l.children.forEach(c=>{o(c)||(s(c)?(l.children.splice(l.children.indexOf(c),1),c.parentIds.splice(c.parentIds.indexOf(l.id),1),e.push(`${c.id}:${l.id}`)):a(c))}),l.state=2};return n.forEach(l=>{r(l)&&a(l)}),e},dagToFlextree=(n,e,r=!1,s=40)=>{const o={id:n.id,size:[(r?n.height:n.width)+s,(r?n.width:n.height)+s],children:[]};e.push(o),n.children.forEach(a=>{dagToFlextree(a,o.children,r,s)})};function lineRect(n,e,r,s,o){const a=[o.x,o.y,o.x+o.width,o.y+o.height];return[lineLine(n,r,e,s,a[0],a[1],a[0],a[3]),lineLine(n,r,e,s,a[0],a[1],a[2],a[1]),lineLine(n,r,e,s,a[2],a[1],a[2],a[3]),lineLine(n,r,e,s,a[0],a[3],a[2],a[3])].filter(c=>c).map(c=>Object.assign(c,{distance:Math.sqrt((n-c.x)**2+(r-c.y)**2)})).sort((c,u)=>c.distance=r){if(!between(r,u,n))return!1}else if(!between(n,u,r))return!1;if(e>=s){if(!between(s,f,e))return!1}else if(!between(e,f,s))return!1;if(o>=l){if(!between(l,u,o))return!1}else if(!between(o,u,l))return!1;if(a>=c){if(!between(c,f,a))return!1}else if(!between(a,f,c))return!1;return{x:u,y:f}}function isSafari(){return window?/constructor/i.test(window.HTMLElement)||function(n){return(n==null?void 0:n.toString())==="[object SafariRemoteNotification]"}(!window.safari||typeof safari<"u"&&window.safari.pushNotification)||/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream:!1}const util$1={findPosition:findPosition$1,createDAG,dagToFlextree,boxBox,boxBoxes,lineLine,lineRect,isSafari};function count(n){var e=0,r=n.children,s=r&&r.length;if(!s)e=1;else for(;--s>=0;)e+=r[s].value;n.value=e}function node_count(){return this.eachAfter(count)}function node_each(n){var e=this,r,s=[e],o,a,l;do for(r=s.reverse(),s=[];e=r.pop();)if(n(e),o=e.children,o)for(a=0,l=o.length;a=0;--o)r.push(s[o]);return this}function node_eachAfter(n){for(var e=this,r=[e],s=[],o,a,l;e=r.pop();)if(s.push(e),o=e.children,o)for(a=0,l=o.length;a=0;)r+=s[o].value;e.value=r})}function node_sort(n){return this.eachBefore(function(e){e.children&&e.children.sort(n)})}function node_path(n){for(var e=this,r=leastCommonAncestor(e,n),s=[e];e!==r;)e=e.parent,s.push(e);for(var o=s.length;n!==r;)s.splice(o,0,n),n=n.parent;return s}function leastCommonAncestor(n,e){if(n===e)return n;var r=n.ancestors(),s=e.ancestors(),o=null;for(n=r.pop(),e=s.pop();n===e;)o=n,n=r.pop(),e=s.pop();return o}function node_ancestors(){for(var n=this,e=[n];n=n.parent;)e.push(n);return e}function node_descendants(){var n=[];return this.each(function(e){n.push(e)}),n}function node_leaves(){var n=[];return this.eachBefore(function(e){e.children||n.push(e)}),n}function node_links(){var n=this,e=[];return n.each(function(r){r!==n&&e.push({source:r.parent,target:r})}),e}function hierarchy(n,e){var r=new Node$1(n),s=+n.value&&(r.value=n.value),o,a=[r],l,c,u,f;for(e==null&&(e=defaultChildren);o=a.pop();)if(s&&(o.value=+o.data.value),(c=e(o.data))&&(f=c.length))for(o.children=new Array(f),u=f-1;u>=0;--u)a.push(l=o.children[u]=new Node$1(c[u])),l.parent=o,l.depth=o.depth+1;return r.eachBefore(computeHeight)}function node_copy(){return hierarchy(this).eachBefore(copyData)}function defaultChildren(n){return n.children}function copyData(n){n.data=n.data.data}function computeHeight(n){var e=0;do n.height=e;while((n=n.parent)&&n.height<++e)}function Node$1(n){this.data=n,this.depth=this.height=0,this.parent=null}Node$1.prototype=hierarchy.prototype={constructor:Node$1,count:node_count,each:node_each,eachAfter:node_eachAfter,eachBefore:node_eachBefore,sum:node_sum,sort:node_sort,path:node_path,ancestors:node_ancestors,descendants:node_descendants,leaves:node_leaves,links:node_links,copy:node_copy};const name$1="d3-flextree",version$1="2.1.2",main="build/d3-flextree.js",module="index",author={name:"Chris Maloney",url:"http://chrismaloney.org"},description="Flexible tree layout algorithm that allows for variable node sizes.",keywords=["d3","d3-module","layout","tree","hierarchy","d3-hierarchy","plugin","d3-plugin","infovis","visualization","2d"],homepage="https://github.com/klortho/d3-flextree",license="WTFPL",repository={type:"git",url:"https://github.com/klortho/d3-flextree.git"},scripts={clean:"rm -rf build demo test","build:demo":"rollup -c --environment BUILD:demo","build:dev":"rollup -c --environment BUILD:dev","build:prod":"rollup -c --environment BUILD:prod","build:test":"rollup -c --environment BUILD:test",build:"rollup -c",lint:"eslint index.js src","test:main":"node test/bundle.js","test:browser":"node test/browser-tests.js",test:"npm-run-all test:*",prepare:"npm-run-all clean build lint test"},dependencies={"d3-hierarchy":"^1.1.5"},devDependencies={"babel-plugin-external-helpers":"^6.22.0","babel-preset-es2015-rollup":"^3.0.0",d3:"^4.13.0","d3-selection-multi":"^1.0.1",eslint:"^4.19.1",jsdom:"^11.6.2","npm-run-all":"^4.1.2",rollup:"^0.55.3","rollup-plugin-babel":"^2.7.1","rollup-plugin-commonjs":"^8.0.2","rollup-plugin-copy":"^0.2.3","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.2","rollup-plugin-uglify":"^3.0.0","uglify-es":"^3.3.9"},packageInfo={name:name$1,version:version$1,main,module,"jsnext:main":"index",author,description,keywords,homepage,license,repository,scripts,dependencies,devDependencies},{version}=packageInfo,defaults$4=Object.freeze({children:n=>n.children,nodeSize:n=>n.data.size,spacing:0});function flextree(n){const e=Object.assign({},defaults$4,n);function r(c){const u=e[c];return typeof u=="function"?u:()=>u}function s(c){const u=l(a(),c,f=>f.children);return u.update(),u.data}function o(){const c=r("nodeSize"),u=r("spacing");return class Ve extends hierarchy.prototype.constructor{constructor(d){super(d)}copy(){const d=l(this.constructor,this,g=>g.children);return d.each(g=>g.data=g.data.data),d}get size(){return c(this)}spacing(d){return u(this,d)}get nodes(){return this.descendants()}get xSize(){return this.size[0]}get ySize(){return this.size[1]}get top(){return this.y}get bottom(){return this.y+this.ySize}get left(){return this.x-this.xSize/2}get right(){return this.x+this.xSize/2}get root(){const d=this.ancestors();return d[d.length-1]}get numChildren(){return this.hasChildren?this.children.length:0}get hasChildren(){return!this.noChildren}get noChildren(){return this.children===null}get firstChild(){return this.hasChildren?this.children[0]:null}get lastChild(){return this.hasChildren?this.children[this.numChildren-1]:null}get extents(){return(this.children||[]).reduce((d,g)=>Ve.maxExtents(d,g.extents),this.nodeExtents)}get nodeExtents(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}static maxExtents(d,g){return{top:Math.min(d.top,g.top),bottom:Math.max(d.bottom,g.bottom),left:Math.min(d.left,g.left),right:Math.max(d.right,g.right)}}}}function a(){const c=o(),u=r("nodeSize"),f=r("spacing");return class extends c{constructor(d){super(d),Object.assign(this,{x:0,y:0,relX:0,prelim:0,shift:0,change:0,lExt:this,lExtRelX:0,lThr:null,rExt:this,rExtRelX:0,rThr:null})}get size(){return u(this.data)}spacing(d){return f(this.data,d.data)}get x(){return this.data.x}set x(d){this.data.x=d}get y(){return this.data.y}set y(d){this.data.y=d}update(){return layoutChildren(this),resolveX(this),this}}}function l(c,u,f){const d=(g,m)=>{const _=new c(g);Object.assign(_,{parent:m,depth:m===null?0:m.depth+1,height:0,length:1});const E=f(g)||[];return _.children=E.length===0?null:E.map(A=>d(A,_)),_.children&&Object.assign(_,_.children.reduce((A,b)=>({height:Math.max(A.height,b.height+1),length:A.length+b.length}),_)),_};return d(u,null)}return Object.assign(s,{nodeSize(c){return arguments.length?(e.nodeSize=c,s):e.nodeSize},spacing(c){return arguments.length?(e.spacing=c,s):e.spacing},children(c){return arguments.length?(e.children=c,s):e.children},hierarchy(c,u){const f=typeof u>"u"?e.children:u;return l(o(),c,f)},dump(c){const u=r("nodeSize"),f=d=>g=>{const m=d+" ",_=d+" ",{x:E,y:A}=g,b=u(g),v=g.children||[],M=v.length===0?" ":`,${m}children: [${_}${v.map(f(_)).join(_)}${m}],${d}`;return`{ size: [${b.join(", ")}],${m}x: ${E}, y: ${A}${M}},`};return f(` +`)(c)}}),s}flextree.version=version;const layoutChildren=(n,e=0)=>(n.y=e,(n.children||[]).reduce((r,s)=>{const[o,a]=r;layoutChildren(s,n.y+n.ySize);const l=(o===0?s.lExt:s.rExt).bottom;o!==0&&separate(n,o,a);const c=updateLows(l,o,a);return[o+1,c]},[0,null]),shiftChange(n),positionRoot(n),n),resolveX=(n,e,r)=>{typeof e>"u"&&(e=-n.relX-n.prelim,r=0);const s=e+n.relX;return n.relX=s+n.prelim-r,n.prelim=0,n.x=r+n.relX,(n.children||[]).forEach(o=>resolveX(o,s,n.x)),n},shiftChange=n=>{(n.children||[]).reduce((e,r)=>{const[s,o]=e,a=s+r.shift,l=o+a+r.change;return r.relX+=l,[a,l]},[0,0])},separate=(n,e,r)=>{const s=n.children[e-1],o=n.children[e];let a=s,l=s.relX,c=o,u=o.relX,f=!0;for(;a&&c;){a.bottom>r.lowY&&(r=r.next);const d=l+a.prelim-(u+c.prelim)+a.xSize/2+c.xSize/2+a.spacing(c);(d>0||d<0&&f)&&(u+=d,moveSubtree(o,d),distributeExtra(n,e,r.index,d)),f=!1;const g=a.bottom,m=c.bottom;g<=m&&(a=nextRContour(a),a&&(l+=a.relX)),g>=m&&(c=nextLContour(c),c&&(u+=c.relX))}!a&&c?setLThr(n,e,c,u):a&&!c&&setRThr(n,e,a,l)},moveSubtree=(n,e)=>{n.relX+=e,n.lExtRelX+=e,n.rExtRelX+=e},distributeExtra=(n,e,r,s)=>{const o=n.children[e],a=e-r;if(a>1){const l=s/a;n.children[r+1].shift+=l,o.shift-=l,o.change-=s-l}},nextLContour=n=>n.hasChildren?n.firstChild:n.lThr,nextRContour=n=>n.hasChildren?n.lastChild:n.rThr,setLThr=(n,e,r,s)=>{const o=n.firstChild,a=o.lExt,l=n.children[e];a.lThr=r;const c=s-r.relX-o.lExtRelX;a.relX+=c,a.prelim-=c,o.lExt=l.lExt,o.lExtRelX=l.lExtRelX},setRThr=(n,e,r,s)=>{const o=n.children[e],a=o.rExt,l=n.children[e-1];a.rThr=r;const c=s-r.relX-o.rExtRelX;a.relX+=c,a.prelim-=c,o.rExt=l.rExt,o.rExtRelX=l.rExtRelX},positionRoot=n=>{if(n.hasChildren){const e=n.firstChild,r=n.lastChild,s=(e.prelim+e.relX-e.xSize/2+r.relX+r.prelim+r.xSize/2)/2;Object.assign(n,{prelim:s,lExt:e.lExt,lExtRelX:e.lExtRelX,rExt:r.rExt,rExtRelX:r.rExtRelX})}},updateLows=(n,e,r)=>{for(;r!==null&&n>=r.lowY;)r=r.next;return{lowY:n,index:e,next:r}};class Graph{constructor(){this.nodes=[],this.edges=[]}positionNode({node:e,parent:r,dir:s="right",spacing:o=40,invertOffset:a=!1}={}){e=typeof e=="string"?this.nodes.find(c=>c.id===e):e,r=typeof r=="string"?this.nodes.find(c=>c.id===r):r;const l=util$1.findPosition(e,r,s,this.nodes,o,a);this.updateNode(e,{x:l.x,y:l.y})}graphNodes({nodes:e,edges:r,type:s="basic",dir:o="right",spacing:a=40}={}){e=e||this.nodes,r=r||this.edges;const l=util$1.createDAG(e,r);if(l.length)if(s==="basic"||s==="basic-invert"){const c={},u=(f,d)=>{if(c[f.id])return;const g=e.filter(_=>!!c[_.id]),m=util$1.findPosition(f,d,o,g,a,s==="basic-invert");f.x=m.x,f.y=m.y,this.updateNode(f.id,{x:f.x,y:f.y}),c[f.id]=!0,f.children.forEach(_=>u(_,f))};l.filter(f=>!f.parentIds.length).forEach(f=>u(f,null))}else if(s==="tree"){const c=flextree(),u=o==="left"||o==="right";l.filter(d=>!d.parentIds.length).forEach(d=>{const g=[],m=d.x,_=d.y;util$1.dagToFlextree(d,g,u,a);const E=c.hierarchy(g[0]);c(E);const A=o==="left"?-1:1,b=o==="up"?-1:1,v=M=>{this.updateNode(M.data.id,{x:(u?M.y:M.x)*A+m,y:(u?M.x:M.y)*b+_}),M.children&&M.children.forEach(v)};v(E)})}else throw new Error("unknown layout type "+s)}reset(){this.edges=[],this.nodes=[]}createNode(e={}){typeof e=="string"&&(e={id:e});const r=Object.assign({id:Math.random().toString(36).slice(2),x:0,y:0,width:50,height:50},e);return this.nodes.push(r),r}updateNode(e,r={}){if(typeof e=="string"&&(e=this.nodes.find(s=>s.id===e)),!e)throw new Error(`node ${e} does not exist`);return Object.assign(e,r)}removeNode(e){const r=this.nodes.indexOf(e);return r>-1&&this.nodes.splice(r,1),r}createEdge(e,r,s={}){if(arguments.length===1?(s=arguments[0],e=s.from,r=s.to):(typeof e=="object"&&(e=e.id),typeof r=="object"&&(r=r.id)),!e)throw new Error("orig required");if(!r)throw new Error("dest required");const o=Object.assign({id:Math.random().toString(36).slice(2),from:e,to:r,fromAnchor:{x:"50%",y:"50%"},toAnchor:{x:"50%",y:"50%"},type:"linear",pathd:""},s);return this.edges.push(o),o}updateEdge(e,r){return Object.assign(e,r)}removeEdge(e){const r=this.edges.indexOf(e);return r>-1&&this.edges.splice(r,1),r}reorderGraph(){for(let e=0;e<200;e++){let r=0;for(let s of this.nodes){for(let l of this.nodes)if(l.id!==s.id){let c=l.x-s.x,u=l.y-s.y,f=Math.sqrt(c*c+u*u);this.edges.find(d=>d.to===s.id&&d.from===l.id||d.from===s.id&&d.to===l.id)?f<500?f<400?f<200?(s.x-=c,s.y-=u):(s.x-=c/3,s.y-=u/3):(r++,s.x+=c/6,s.y+=u/6):(s.x+=c/3,s.y+=u/3):f<1e3?f<100?(s.x-=c*3,s.y-=u*3):f<500?(s.x-=c/3,s.y-=u/3):(s.x-=c/9,s.y-=u/9):r++}let o=0-s.x,a=0-s.y;s.x+=o/15,s.y+=a/15}if(r/(this.nodes.length*this.nodes.length)>.7)break}}}const defaults$3=[{id:"arrow-start",type:"arrow-start",scale:.5,style:"fill: green"},{id:"arrow-end",type:"arrow-end",scale:.5,style:"fill: green"},{id:"square",type:"square",scale:.5,style:"fill: green"},{id:"circle",type:"circle",scale:.5,style:"fill: green"},{id:"cross",type:"cross",scale:1,style:"fill: none"},{id:"arrow-slim-start",type:"arrow-slim-start",scale:.5,style:"fill: green"},{id:"arrow-slim-end",type:"arrow-slim-end",scale:.5,style:"fill: green"}],_sfc_main$f={props:{markers:Array},computed:{all(){return this.markers.concat(defaults$3).map(n=>{const e=defaults$3.find(r=>r.type===n.type);if(!e)console.error("unknown marker",n);else return Object.assign({},e,n)}).filter(n=>n)}}},_hoisted_1$f=["id","markerWidth","markerHeight","refX","refY"],_hoisted_2$b=["id","markerWidth","markerHeight","refX","refY"],_hoisted_3$8=["id","markerWidth","markerHeight","refX","refY"],_hoisted_4$8=["id","markerWidth","markerHeight","refX","refY"],_hoisted_5$7=["id","markerWidth","markerHeight"],_hoisted_6$6=["id","markerWidth","markerHeight","refX","refY"],_hoisted_7$5=["id","markerWidth","markerHeight","refX","refY"];function _sfc_render$f(n,e,r,s,o,a){return openBlock(),createElementBlock("g",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(a.all,l=>(openBlock(),createElementBlock("g",{key:l.id},[l.type==="arrow-start"?(openBlock(),createElementBlock("marker",{key:0,id:l.id,orient:"auto",markerWidth:13*l.scale,markerHeight:13*l.scale,refX:1*l.scale,refY:5*l.scale},[createBaseVNode("path",{d:"M0,5 L10,10 L10,0 L0,5",style:normalizeStyle(`transform: scale(${l.scale});${l.style}`)},null,4)],8,_hoisted_1$f)):createCommentVNode("",!0),l.type==="arrow-end"?(openBlock(),createElementBlock("marker",{key:1,id:l.id,orient:"auto",markerWidth:13*l.scale,markerHeight:13*l.scale,refX:9*l.scale,refY:5*l.scale},[createBaseVNode("path",{d:"M0,0 L0,10 L10,5 L0,0",style:normalizeStyle(`${l.style};transform: scale(${l.scale})`)},null,4)],8,_hoisted_2$b)):createCommentVNode("",!0),l.type==="square"?(openBlock(),createElementBlock("marker",{key:2,id:l.id,orient:"auto",markerWidth:5*l.scale,markerHeight:5*l.scale,refX:2.5*l.scale,refY:2.5*l.scale},[createBaseVNode("rect",{x:"0",y:"0",width:"5",height:"5",style:normalizeStyle(`transform: scale(${l.scale});${l.style}`)},null,4)],8,_hoisted_3$8)):createCommentVNode("",!0),l.type==="circle"?(openBlock(),createElementBlock("marker",{key:3,id:l.id,markerWidth:10*l.scale,markerHeight:10*l.scale,refX:2.5*l.scale,refY:2.5*l.scale},[createBaseVNode("circle",{cx:"2.5",cy:"2.5",r:"2.5",style:normalizeStyle(`transform: scale(${l.scale});${l.style}`)},null,4)],8,_hoisted_4$8)):createCommentVNode("",!0),l.type==="cross"?(openBlock(),createElementBlock("marker",{key:4,id:l.id,markerWidth:13*l.scale,orient:"auto",markerHeight:13*l.scale,fill:"none",refX:"5",refY:"5",position:"50%"},[createBaseVNode("path",{d:"M 3,3 L 7,7 M 3,7 L 7,3",fill:"none",stroke:"green","stroke-width":"2",style:normalizeStyle(`transform: scale(${l.scale});${l.style}`)},null,4)],8,_hoisted_5$7)):createCommentVNode("",!0),l.type==="arrow-slim-start"?(openBlock(),createElementBlock("marker",{key:5,id:l.id,orient:"auto",markerWidth:13*l.scale,markerHeight:13*l.scale,refX:1*l.scale,refY:5*l.scale,fill:"none",stroke:"green","stroke-width":"2","stroke-linecap":"round"},[createBaseVNode("path",{d:"M1,5 L9,9 M9,1 L1,5",style:normalizeStyle(`transform: scale(${l.scale});${l.style}`)},null,4)],8,_hoisted_6$6)):createCommentVNode("",!0),l.type==="arrow-slim-end"?(openBlock(),createElementBlock("marker",{key:6,id:l.id,orient:"auto",markerWidth:15*l.scale,markerHeight:15*l.scale,refX:9*l.scale,refY:5*l.scale,"stroke-linecap":"round",fill:"none",stroke:"green","stroke-width":"2"},[createBaseVNode("path",{d:"M10,5 L1,1 M10,5 L1,9",style:normalizeStyle(`transform: scale(${l.scale});${l.style}`)},null,4)],8,_hoisted_7$5)):createCommentVNode("",!0)]))),128))])}const Markers$1=_export_sfc(_sfc_main$f,[["render",_sfc_render$f]]),Wheel=function(){var n="",e,r,s,o=[],a={passive:!0};window.addEventListener?(e="addEventListener",r="removeEventListener"):(e="attachEvent",r="detachEvent",n="on"),s="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll";function l(_,E){var A=function(b){!b&&(b=window.event);var v={originalEvent:b,target:b.target||b.srcElement,type:"wheel",deltaMode:b.type=="MozMousePixelScroll"?0:1,deltaX:0,delatZ:0,preventDefault:function(){b.preventDefault?b.preventDefault():b.returnValue=!1}};return s=="mousewheel"?(v.deltaY=-.025*b.wheelDelta,b.wheelDeltaX&&(v.deltaX=-.025*b.wheelDeltaX)):v.deltaY=b.detail,E(v)};return o.push({element:_,fn:A}),A}function c(_){for(var E=0;Ee?(clearTimeout(c),c=null,u=d,l=n.apply(o,a),c||(o=a=null)):!c&&r.trailing!==!1&&(c=setTimeout(f,g)),l}},createRequestAnimationFrame:function(n){var e=null;return n!=="auto"&&n<60&&n>1&&(e=Math.floor(1e3/n)),e===null?window.requestAnimationFrame||requestTimeout(33):requestTimeout(e)}};function requestTimeout(n){return function(e){window.setTimeout(e,n)}}let _browser="unknown";document.documentMode&&(_browser="ie");const SvgUtils={svgNS:"http://www.w3.org/2000/svg",xmlNS:"http://www.w3.org/XML/1998/namespace",xmlnsNS:"http://www.w3.org/2000/xmlns/",xlinkNS:"http://www.w3.org/1999/xlink",evNS:"http://www.w3.org/2001/xml-events",getBoundingClientRectNormalized:function(n){if(n.clientWidth&&n.clientHeight)return{width:n.clientWidth,height:n.clientHeight};if(n.getBoundingClientRect())return n.getBoundingClientRect();throw new Error("Cannot get BoundingClientRect for SVG.")},getOrCreateViewport:function(n,e){var r=null;if(Utils.isElement(e)?r=e:r=n.querySelector(e),!r){var s=Array.prototype.slice.call(n.childNodes||n.children).filter(function(u){return u.nodeName!=="defs"&&u.nodeName!=="#text"});s.length===1&&s[0].nodeName==="g"&&s[0].getAttribute("transform")===null&&(r=s[0])}if(!r){var o="viewport-"+new Date().toISOString().replace(/\D/g,"");r=document.createElementNS(this.svgNS,"g"),r.setAttribute("id",o);var a=n.childNodes||n.children;if(a&&a.length>0)for(var l=a.length;l>0;l--)a[a.length-l].nodeName!=="defs"&&r.appendChild(a[a.length-l]);n.appendChild(r)}var c=[];return r.getAttribute("class")&&(c=r.getAttribute("class").split(" ")),~c.indexOf("svg-pan-zoom_viewport")||(c.push("svg-pan-zoom_viewport"),r.setAttribute("class",c.join(" "))),r},setupSvgAttributes:function(n){if(n.setAttribute("xmlns",this.svgNS),n.setAttributeNS(this.xmlnsNS,"xmlns:xlink",this.xlinkNS),n.setAttributeNS(this.xmlnsNS,"xmlns:ev",this.evNS),n.parentNode!==null){var e=n.getAttribute("style")||"";e.toLowerCase().indexOf("overflow")===-1&&n.setAttribute("style","overflow: hidden; "+e)}},internetExplorerRedisplayInterval:300,refreshDefsGlobal:Utils.throttle(function(){for(var n=document.querySelectorAll("defs"),e=n.length,r=0;r=0;s--)this.eventListeners.hasOwnProperty(r[s])&&delete this.eventListeners[r[s]]}for(var o in this.eventListeners)(this.options.eventsListenerElement||this.svg).addEventListener(o,this.eventListeners[o],this.options.preventMouseEventsDefault?!1:passiveListenerOption);this.options.mouseWheelZoomEnabled&&(this.options.mouseWheelZoomEnabled=!1,this.enableMouseWheelZoom())};SvgPanZoom.prototype.enableMouseWheelZoom=function(){if(!this.options.mouseWheelZoomEnabled){var n=this;this.wheelListener=function(r){return n.handleMouseWheel(r)};var e=!this.options.preventMouseEventsDefault;Wheel.on(this.options.eventsListenerElement||this.svg,this.wheelListener,e),this.options.mouseWheelZoomEnabled=!0}};SvgPanZoom.prototype.disableMouseWheelZoom=function(){if(this.options.mouseWheelZoomEnabled){var n=!this.options.preventMouseEventsDefault;Wheel.off(this.options.eventsListenerElement||this.svg,this.wheelListener,n),this.options.mouseWheelZoomEnabled=!1}};SvgPanZoom.prototype.handleMouseWheel=function(n){if(!(!this.options.zoomEnabled||this.state!=="none")&&(this.options.preventMouseEventsDefault&&(n.preventDefault?n.preventDefault():n.returnValue=!1),!(this.options.onUserZoom&&this.options.onUserZoom(n)===!1))){var e=n.deltaY||1,r=Date.now()-this.lastMouseWheelEventTime,s=3+Math.max(0,30-r);this.lastMouseWheelEventTime=Date.now(),"deltaMode"in n&&n.deltaMode===0&&n.wheelDelta&&(e=n.deltaY===0?0:Math.abs(n.wheelDelta)/n.deltaY),e=-.30?1:-1)*Math.log(Math.abs(e)+10)/s;var o=this.svg.getScreenCTM().inverse(),a=SvgUtils.getEventPoint(n,this.svg).matrixTransform(o),l=Math.pow(1+this.options.zoomScaleSensitivity,-1*e);this.zoomAtPoint(l,a)}};SvgPanZoom.prototype.zoomAtPoint=function(n,e,r){var s=this.viewport.getOriginalState();r?(n=Math.max(this.options.minZoom*s.zoom,Math.min(this.options.maxZoom*s.zoom,n)),n=n/this.getZoom()):this.getZoom()*nthis.options.maxZoom*s.zoom&&(n=this.options.maxZoom*s.zoom/this.getZoom());var o=this.viewport.getCTM(),a=e.matrixTransform(o.inverse()),l=this.svg.createSVGMatrix().translate(a.x,a.y).scale(n).translate(-a.x,-a.y),c=o.multiply(l);c.a!==o.a&&this.viewport.setCTM(c)};SvgPanZoom.prototype.zoom=function(n,e){this.zoomAtPoint(n,SvgUtils.getSvgCenterPoint(this.svg,this.width,this.height),e)};SvgPanZoom.prototype.publicZoom=function(n,e){e&&(n=this.computeFromRelativeZoom(n)),this.zoom(n,e)};SvgPanZoom.prototype.publicZoomAtPoint=function(n,e,r){if(r&&(n=this.computeFromRelativeZoom(n)),Utils.getType(e)!=="SVGPoint")if("x"in e&&"y"in e)e=SvgUtils.createSVGPoint(this.svg,e.x,e.y);else throw new Error("Given point is invalid");this.zoomAtPoint(n,e,r)};SvgPanZoom.prototype.getZoom=function(){return this.viewport.getZoom()};SvgPanZoom.prototype.getRelativeZoom=function(){return this.viewport.getRelativeZoom()};SvgPanZoom.prototype.computeFromRelativeZoom=function(n){return n*this.viewport.getOriginalState().zoom};SvgPanZoom.prototype.resetZoom=function(){var n=this.viewport.getOriginalState();this.zoom(n.zoom,!0)};SvgPanZoom.prototype.resetPan=function(){this.pan(this.viewport.getOriginalState())};SvgPanZoom.prototype.reset=function(){this.resetZoom(),this.resetPan()};SvgPanZoom.prototype.handleDblClick=function(n){if(this.options.preventMouseEventsDefault&&(n.preventDefault?n.preventDefault():n.returnValue=!1),this.options.controlIconsEnabled){var e=n.target.getAttribute("class")||"";if(e.indexOf("svg-pan-zoom-control")>-1)return!1}var r;n.shiftKey?r=1/((1+this.options.zoomScaleSensitivity)*2):r=(1+this.options.zoomScaleSensitivity)*2;var s=SvgUtils.getEventPoint(n,this.svg).matrixTransform(this.svg.getScreenCTM().inverse());this.zoomAtPoint(r,s)};SvgPanZoom.prototype.handleMouseDown=function(n,e){this.options.preventMouseEventsDefault&&(n.preventDefault?n.preventDefault():n.returnValue=!1),Utils.mouseAndTouchNormalize(n,this.svg);const r=Utils.isDblClick(n,e);this.options.onDoubleClick&&r&&this.options.onDoubleClick(),this.options.dblClickZoomEnabled&&r?this.handleDblClick(n):(this.state="pan",this.firstEventCTM=this.viewport.getCTM(),this.stateOrigin=SvgUtils.getEventPoint(n,this.svg).matrixTransform(this.firstEventCTM.inverse()))};SvgPanZoom.prototype.handleMouseMove=function(n){if(this.options.preventMouseEventsDefault&&(n.preventDefault?n.preventDefault():n.returnValue=!1),this.state==="pan"&&this.options.panEnabled){if(this.options.onUserPan&&this.options.onUserPan(n)===!1)return;var e=SvgUtils.getEventPoint(n,this.svg).matrixTransform(this.firstEventCTM.inverse()),r=this.firstEventCTM.translate(e.x-this.stateOrigin.x,e.y-this.stateOrigin.y);this.viewport.setCTM(r)}};SvgPanZoom.prototype.handleMouseUp=function(n){this.options.preventMouseEventsDefault&&(n.preventDefault?n.preventDefault():n.returnValue=!1),this.state==="pan"&&(this.state="none")};SvgPanZoom.prototype.fit=function(){var n=this.viewport.getViewBox(),e=Math.min(this.width/n.width,this.height/n.height);this.zoom(e,!0)};SvgPanZoom.prototype.contain=function(){var n=this.viewport.getViewBox(),e=Math.max(this.width/n.width,this.height/n.height);this.zoom(e,!0)};SvgPanZoom.prototype.center=function(){var n=this.viewport.getViewBox(),e=(this.width-(n.width+n.x*2)*this.getZoom())*.5,r=(this.height-(n.height+n.y*2)*this.getZoom())*.5;this.getPublicInstance().pan({x:e,y:r})};SvgPanZoom.prototype.updateBBox=function(){this.viewport.simpleViewBoxCache()};SvgPanZoom.prototype.pan=function(n){var e=this.viewport.getCTM();e.e=n.x,e.f=n.y,this.viewport.setCTM(e)};SvgPanZoom.prototype.panBy=function(n){var e=this.viewport.getCTM();e.e+=n.x,e.f+=n.y,this.viewport.setCTM(e)};SvgPanZoom.prototype.getPan=function(){var n=this.viewport.getState();return{x:n.x,y:n.y}};SvgPanZoom.prototype.resize=function(){var n=SvgUtils.getBoundingClientRectNormalized(this.svg);this.width=n.width,this.height=n.height;var e=this.viewport;e.options.width=this.width,e.options.height=this.height,e.processCTM(),this.options.controlIconsEnabled&&(this.getPublicInstance().disableControlIcons(),this.getPublicInstance().enableControlIcons())};SvgPanZoom.prototype.destroy=function(){var n=this;this.beforeZoom=null,this.onZoom=null,this.beforePan=null,this.onPan=null,this.onUpdatedCTM=null,this.options.customEventsHandler!=null&&this.options.customEventsHandler.destroy({svgElement:this.svg,eventsListenerElement:this.options.eventsListenerElement,instance:this.getPublicInstance()});for(var e in this.eventListeners)(this.options.eventsListenerElement||this.svg).removeEventListener(e,this.eventListeners[e],this.options.preventMouseEventsDefault?!1:passiveListenerOption);this.disableMouseWheelZoom(),this.getPublicInstance().disableControlIcons(),this.reset(),instancesStore=instancesStore.filter(function(r){return r.svg!==n.svg}),delete this.options,delete this.viewport,delete this.publicInstance,delete this.pi,this.getPublicInstance=function(){return null}};SvgPanZoom.prototype.getPublicInstance=function(){var n=this;return this.publicInstance||(this.publicInstance=this.pi={options:this.options,enablePan:function(){return n.options.panEnabled=!0,n.pi},disablePan:function(){return n.options.panEnabled=!1,n.pi},isPanEnabled:function(){return!!n.options.panEnabled},pan:function(e){return n.pan(e),n.pi},panBy:function(e){return n.panBy(e),n.pi},getPan:function(){return n.getPan()},setBeforePan:function(e){return n.options.beforePan=e===null?null:Utils.proxy(e,n.publicInstance),n.pi},setOnPan:function(e){return n.options.onPan=e===null?null:Utils.proxy(e,n.publicInstance),n.pi},enableZoom:function(){return n.options.zoomEnabled=!0,n.pi},disableZoom:function(){return n.options.zoomEnabled=!1,n.pi},isZoomEnabled:function(){return!!n.options.zoomEnabled},enableControlIcons:function(){return n.options.controlIconsEnabled||(n.options.controlIconsEnabled=!0,ControlIcons.enable(n)),n.pi},disableControlIcons:function(){return n.options.controlIconsEnabled&&(n.options.controlIconsEnabled=!1,ControlIcons.disable(n)),n.pi},isControlIconsEnabled:function(){return!!n.options.controlIconsEnabled},enableDblClickZoom:function(){return n.options.dblClickZoomEnabled=!0,n.pi},disableDblClickZoom:function(){return n.options.dblClickZoomEnabled=!1,n.pi},isDblClickZoomEnabled:function(){return!!n.options.dblClickZoomEnabled},enableMouseWheelZoom:function(){return n.enableMouseWheelZoom(),n.pi},disableMouseWheelZoom:function(){return n.disableMouseWheelZoom(),n.pi},isMouseWheelZoomEnabled:function(){return!!n.options.mouseWheelZoomEnabled},setZoomScaleSensitivity:function(e){return n.options.zoomScaleSensitivity=e,n.pi},setMinZoom:function(e){return n.options.minZoom=e,n.pi},setMaxZoom:function(e){return n.options.maxZoom=e,n.pi},setBeforeZoom:function(e){return n.options.beforeZoom=e===null?null:Utils.proxy(e,n.publicInstance),n.pi},setOnZoom:function(e){return n.options.onZoom=e===null?null:Utils.proxy(e,n.publicInstance),n.pi},zoom:function(e){return n.publicZoom(e,!0),n.pi},zoomBy:function(e){return n.publicZoom(e,!1),n.pi},zoomAtPoint:function(e,r){return n.publicZoomAtPoint(e,r,!0),n.pi},zoomAtPointBy:function(e,r){return n.publicZoomAtPoint(e,r,!1),n.pi},zoomIn:function(){return this.zoomBy(1+n.options.zoomScaleSensitivity),n.pi},zoomOut:function(){return this.zoomBy(1/(1+n.options.zoomScaleSensitivity)),n.pi},getZoom:function(){return n.getRelativeZoom()},setOnUpdatedCTM:function(e){return n.options.onUpdatedCTM=e===null?null:Utils.proxy(e,n.publicInstance),n.pi},resetZoom:function(){return n.resetZoom(),n.pi},resetPan:function(){return n.resetPan(),n.pi},reset:function(){return n.reset(),n.pi},fit:function(){return n.fit(),n.pi},contain:function(){return n.contain(),n.pi},center:function(){return n.center(),n.pi},updateBBox:function(){return n.updateBBox(),n.pi},resize:function(){return n.resize(),n.pi},getSizes:function(){return{width:n.width,height:n.height,realZoom:n.getZoom(),viewBox:n.viewport.getViewBox()}},destroy:function(){return n.destroy(),n.pi}}),this.publicInstance};var instancesStore=[],svgPanZoom=function(n,e){var r=Utils.getSvg(n);if(r===null)return null;for(var s=instancesStore.length-1;s>=0;s--)if(instancesStore[s].svg===r)return instancesStore[s].instance.getPublicInstance();return instancesStore.push({svg:r,instance:new SvgPanZoom(r,e)}),instancesStore[instancesStore.length-1].instance.getPublicInstance()};const Screen_vue_vue_type_style_index_0_scoped_ad4782f5_lang="",_sfc_main$e={props:{markers:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},components:{Markers:Markers$1},data(){return{panzoom:null}},mounted(){this.panzoom=svgPanZoom(this.$refs.screen,Object.assign({dblClickZoomEnabled:!1,mouseWheelZoomEnabled:!0,preventMouseEventsDefault:!0,controlIconsEnabled:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),fit:!1,contain:!1,center:!1,zoomScaleSensitivity:.4,minZoom:.1,maxZoom:5,onZoom:n=>{},onPan:n=>{},onUserZoom:n=>{},onUserPan:n=>{},onDoubleClick:()=>{},onUpdatedCTM:n=>{}},this.options)),this.panzoom.zoomRect=this.zoomRect,this.panzoom.zoomNode=this.zoomNode,this.panzoom.panNode=this.panNode},methods:{zoomTo({x:n,y:e,scale:r}){this.panzoom.zoom(r),this.panzoom.pan(n,e)},zoomRect(n,e={scale:null}){let r=e.scale;const s=this.$refs.screen,o=n.right-n.left,a=n.bottom-n.top;if(!r){const u=o/s.clientWidth,f=a/s.clientHeight;r=1/Math.max(u,f)}const l=-n.left*r+(s.clientWidth/r-o)/2*r,c=-n.top*r+(s.clientHeight/r-a)/2*r;this.panzoom.zoom(r),this.panzoom.pan({x:l,y:c})},zoomNode(n){const e=this.$refs.screen,r=e.clientWidth/2-n.width/2,s=e.clientHeight/2-n.height/2;this.zoomRect({left:n.x-r,right:n.x+n.width+r,top:n.y-s,bottom:n.y+n.height+s})},zoomNodes(n,e={padding:50,scale:null}){if(!n||!n.length)return;const r=e.padding||50,s=e.scale;let o=1/0,a=1/0,l=-1/0,c=-1/0;n.forEach(u=>{u.xl&&(l=u.x+u.width),u.yc&&(c=u.y+u.height)}),this.zoomRect({left:o-r,top:a-r,right:l+r,bottom:c+r},{scale:s})},panNode(n,e={offsetX,offsetY}){const r=e.offsetX||0,s=e.offsetY||0,o=this.panzoom.getZoom(),a=this.$el.clientWidth/2-(n.x+n.width/2)*o+r,l=this.$el.clientHeight/2-(n.y+n.height/2)*o+s;this.panzoom.pan({x:a,y:l})}}},_hoisted_1$e={class:"screen",ref:"screen"};function _sfc_render$e(n,e,r,s,o,a){const l=resolveComponent("markers");return openBlock(),createElementBlock("svg",_hoisted_1$e,[createBaseVNode("defs",null,[createVNode(l,{markers:r.markers},null,8,["markers"])]),createBaseVNode("g",null,[renderSlot(n.$slots,"default",{},void 0,!0)])],512)}const Screen=_export_sfc(_sfc_main$e,[["render",_sfc_render$e],["__scopeId","data-v-ad4782f5"]]),drag={props:{dragThreshold:{type:Number,default:10}},data(){return{drag:{zoom:1,active:!1,prev:{x:0,y:0},threshold:{x:0,y:0,crossed:!1}}}},methods:{preventClicks(n){this.drag.threshold.crossed&&(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),document.removeEventListener("click",this.preventClicks,!0))},startDrag(n){let e=this.$parent;for(;e;){if(e.panzoom){this.drag.zoom=e.panzoom.getZoom();break}e=e.$parent}n.touches&&n.touches.length&&(n.clientX=n.touches[0].clientX,n.clientY=n.touches[0].clientY),this.drag.active=!0,this.drag.prev={x:n.clientX,y:n.clientY},this.drag.threshold={x:0,y:0,crossed:!1},document.addEventListener("mouseup",this.stopDrag),document.addEventListener("touchend",this.stopDrag),document.addEventListener("mousemove",this.applyDrag),document.addEventListener("touchmove",this.applyDrag),document.addEventListener("click",this.preventClicks,!0)},stopDrag(){this.drag.active=!1,document.removeEventListener("mouseup",this.stopDrag),document.removeEventListener("touchend",this.stopDrag),document.removeEventListener("mousemove",this.applyDrag),document.removeEventListener("touchmove",this.applyDrag)},applyDrag(n){n.touches&&n.touches.length&&(n.clientX=n.touches[0].clientX,n.clientY=n.touches[0].clientY);let e=(n.clientX-this.drag.prev.x)/this.drag.zoom,r=(n.clientY-this.drag.prev.y)/this.drag.zoom;if(this.drag.prev={x:n.clientX,y:n.clientY},!this.drag.threshold.crossed)if(Math.abs(this.drag.threshold.x){useCssVars(n=>({37791327:n.position}))},__setup__$2=__default__$2.setup;__default__$2.setup=__setup__$2?(n,e)=>(__injectCSSVars__$2(),__setup__$2(n,e)):__injectCSSVars__$2;const _sfc_main$d=__default__$2,_hoisted_1$d=["x","y","width","height"],_hoisted_2$a={key:0,class:"default-label"};function _sfc_render$d(n,e,r,s,o,a){return openBlock(),createElementBlock("foreignObject",{class:normalizeClass(["node",!r.fit&&"fill"]),x:r.data.x-r.margin,y:r.data.y-r.margin,width:r.data.width+r.margin*2,height:r.data.height+r.margin*2,onMousedown:e[0]||(e[0]=(...l)=>a.onMousedown&&a.onMousedown(...l)),onTouchstart:e[1]||(e[1]=(...l)=>a.onMousedown&&a.onMousedown(...l))},[createBaseVNode("div",{class:"outer",style:normalizeStyle(`padding: ${r.margin}px;`)},[createBaseVNode("div",{class:normalizeClass(["content",r.background&&"background"]),ref:"content"},[n.$slots.default?createCommentVNode("",!0):(openBlock(),createElementBlock("div",_hoisted_2$a,toDisplayString(r.data.id),1)),renderSlot(n.$slots,"default")],2)],4)],42,_hoisted_1$d)}const Node=_export_sfc(_sfc_main$d,[["render",_sfc_render$d]]);function Victor(n,e){if(!(this instanceof Victor))return new Victor(n,e);this.x=n||0,this.y=e||0}Victor.fromArray=function(n){return new Victor(n[0]||0,n[1]||0)};Victor.fromObject=function(n){return new Victor(n.x||0,n.y||0)};Victor.prototype.addX=function(n){return this.x+=n.x,this};Victor.prototype.addY=function(n){return this.y+=n.y,this};Victor.prototype.add=function(n){return this.x+=n.x,this.y+=n.y,this};Victor.prototype.addScalar=function(n){return this.x+=n,this.y+=n,this};Victor.prototype.addScalarX=function(n){return this.x+=n,this};Victor.prototype.addScalarY=function(n){return this.y+=n,this};Victor.prototype.subtractX=function(n){return this.x-=n.x,this};Victor.prototype.subtractY=function(n){return this.y-=n.y,this};Victor.prototype.subtract=function(n){return this.x-=n.x,this.y-=n.y,this};Victor.prototype.subtractScalar=function(n){return this.x-=n,this.y-=n,this};Victor.prototype.subtractScalarX=function(n){return this.x-=n,this};Victor.prototype.subtractScalarY=function(n){return this.y-=n,this};Victor.prototype.divideX=function(n){return this.x/=n.x,this};Victor.prototype.divideY=function(n){return this.y/=n.y,this};Victor.prototype.divide=function(n){return this.x/=n.x,this.y/=n.y,this};Victor.prototype.divideScalar=function(n){return n!==0?(this.x/=n,this.y/=n):(this.x=0,this.y=0),this};Victor.prototype.divideScalarX=function(n){return n!==0?this.x/=n:this.x=0,this};Victor.prototype.divideScalarY=function(n){return n!==0?this.y/=n:this.y=0,this};Victor.prototype.invertX=function(){return this.x*=-1,this};Victor.prototype.invertY=function(){return this.y*=-1,this};Victor.prototype.invert=function(){return this.invertX(),this.invertY(),this};Victor.prototype.multiplyX=function(n){return this.x*=n.x,this};Victor.prototype.multiplyY=function(n){return this.y*=n.y,this};Victor.prototype.multiply=function(n){return this.x*=n.x,this.y*=n.y,this};Victor.prototype.multiplyScalar=function(n){return this.x*=n,this.y*=n,this};Victor.prototype.multiplyScalarX=function(n){return this.x*=n,this};Victor.prototype.multiplyScalarY=function(n){return this.y*=n,this};Victor.prototype.normalize=function(){var n=this.length();return n===0?(this.x=1,this.y=0):this.divide(Victor(n,n)),this};Victor.prototype.norm=Victor.prototype.normalize;Victor.prototype.limit=function(n,e){return Math.abs(this.x)>n&&(this.x*=e),Math.abs(this.y)>n&&(this.y*=e),this};Victor.prototype.randomize=function(n,e){return this.randomizeX(n,e),this.randomizeY(n,e),this};Victor.prototype.randomizeX=function(n,e){var r=Math.min(n.x,e.x),s=Math.max(n.x,e.x);return this.x=random(r,s),this};Victor.prototype.randomizeY=function(n,e){var r=Math.min(n.y,e.y),s=Math.max(n.y,e.y);return this.y=random(r,s),this};Victor.prototype.randomizeAny=function(n,e){return Math.round(Math.random())?this.randomizeX(n,e):this.randomizeY(n,e),this};Victor.prototype.unfloat=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this};Victor.prototype.toFixed=function(n){return typeof n>"u"&&(n=8),this.x=this.x.toFixed(n),this.y=this.y.toFixed(n),this};Victor.prototype.mixX=function(n,e){return typeof e>"u"&&(e=.5),this.x=(1-e)*this.x+e*n.x,this};Victor.prototype.mixY=function(n,e){return typeof e>"u"&&(e=.5),this.y=(1-e)*this.y+e*n.y,this};Victor.prototype.mix=function(n,e){return this.mixX(n,e),this.mixY(n,e),this};Victor.prototype.clone=function(){return new Victor(this.x,this.y)};Victor.prototype.copyX=function(n){return this.x=n.x,this};Victor.prototype.copyY=function(n){return this.y=n.y,this};Victor.prototype.copy=function(n){return this.copyX(n),this.copyY(n),this};Victor.prototype.zero=function(){return this.x=this.y=0,this};Victor.prototype.dot=function(n){return this.x*n.x+this.y*n.y};Victor.prototype.cross=function(n){return this.x*n.y-this.y*n.x};Victor.prototype.projectOnto=function(n){var e=(this.x*n.x+this.y*n.y)/(n.x*n.x+n.y*n.y);return this.x=e*n.x,this.y=e*n.y,this};Victor.prototype.horizontalAngle=function(){return Math.atan2(this.y,this.x)};Victor.prototype.horizontalAngleDeg=function(){return radian2degrees(this.horizontalAngle())};Victor.prototype.verticalAngle=function(){return Math.atan2(this.x,this.y)};Victor.prototype.verticalAngleDeg=function(){return radian2degrees(this.verticalAngle())};Victor.prototype.angle=Victor.prototype.horizontalAngle;Victor.prototype.angleDeg=Victor.prototype.horizontalAngleDeg;Victor.prototype.direction=Victor.prototype.horizontalAngle;Victor.prototype.rotate=function(n){var e=this.x*Math.cos(n)-this.y*Math.sin(n),r=this.x*Math.sin(n)+this.y*Math.cos(n);return this.x=e,this.y=r,this};Victor.prototype.rotateDeg=function(n){return n=degrees2radian(n),this.rotate(n)};Victor.prototype.rotateTo=function(n){return this.rotate(n-this.angle())};Victor.prototype.rotateToDeg=function(n){return n=degrees2radian(n),this.rotateTo(n)};Victor.prototype.rotateBy=function(n){var e=this.angle()+n;return this.rotate(e)};Victor.prototype.rotateByDeg=function(n){return n=degrees2radian(n),this.rotateBy(n)};Victor.prototype.distanceX=function(n){return this.x-n.x};Victor.prototype.absDistanceX=function(n){return Math.abs(this.distanceX(n))};Victor.prototype.distanceY=function(n){return this.y-n.y};Victor.prototype.absDistanceY=function(n){return Math.abs(this.distanceY(n))};Victor.prototype.distance=function(n){return Math.sqrt(this.distanceSq(n))};Victor.prototype.distanceSq=function(n){var e=this.distanceX(n),r=this.distanceY(n);return e*e+r*r};Victor.prototype.length=function(){return Math.sqrt(this.lengthSq())};Victor.prototype.lengthSq=function(){return this.x*this.x+this.y*this.y};Victor.prototype.magnitude=Victor.prototype.length;Victor.prototype.isZero=function(){return this.x===0&&this.y===0};Victor.prototype.isEqualTo=function(n){return this.x===n.x&&this.y===n.y};Victor.prototype.toString=function(){return"x:"+this.x+", y:"+this.y};Victor.prototype.toArray=function(){return[this.x,this.y]};Victor.prototype.toObject=function(){return{x:this.x,y:this.y}};var degrees=180/Math.PI;function random(n,e){return Math.floor(Math.random()*(e-n+1)+n)}function radian2degrees(n){return n*degrees}function degrees2radian(n){return n/degrees}const Edge_vue_vue_type_style_index_0_scoped_40cdf8f7_lang="",_sfc_main$c={props:{data:{type:Object,required:!0},nodes:{type:Array}},mounted(){if(typeof this.data.id>"u"){const n=Math.random().toString(36).slice(2);this.$set?this.$set(this.data,"id",n):this.data.id=n}typeof this.data.pathd>"u"&&(this.$set?this.$set(this.data,"pathd",""):this.data.pathd="")},computed:{fromNode:n=>typeof n.data.from=="string"?n.nodes.find(e=>e.id===n.data.from):n.data.from,toNode:n=>typeof n.data.to=="string"?n.nodes.find(e=>e.id===n.data.to):n.data.to,fromAnchor:n=>n.parseAnchor(n.data.fromAnchor,n.fromNode),toAnchor:n=>n.parseAnchor(n.data.toAnchor,n.toNode),pos(){let n=this.fromNode.x+(this.fromAnchor.x||0),e=this.fromNode.y+(this.fromAnchor.y||0),r=this.toNode.x+(this.toAnchor.x||0),s=this.toNode.y+(this.toAnchor.y||0);if(this.fromAnchor&&this.fromAnchor.snap){if(this.fromAnchor.snap==="circle"){const o=Math.max(this.fromNode.width,this.fromNode.height)/2,a=new Victor(r-n,s-e).normalize();n+=a.x*o,e+=a.y*o}if(this.fromAnchor.snap==="rect"){const o=util$1.lineRect(r,n,s,e,this.fromNode);o&&(n=o.x,e=o.y)}}if(this.toAnchor&&this.toAnchor.snap){if(this.toAnchor.snap==="circle"){const o=Math.max(this.toNode.width,this.toNode.height)/2,a=new Victor(r-n,s-e).normalize();r-=a.x*o,s-=a.y*o}if(this.toAnchor.snap==="rect"){const o=util$1.lineRect(n,r,e,s,this.toNode);o&&(r=o.x,s=o.y)}}return{x1:n,x2:r,y1:e,y2:s}},path(){const n=Object.assign({},this.pos);let e=`M ${n.x1},${n.y1} `;const r=n.x1-n.x2,s=n.y1-n.y2;if(this.data.type==="hsmooth"||this.data.type==="smooth"&&Math.abs(r)>=Math.abs(s)){const o={x:n.x1-r/2,y:n.y1},a={x:n.x2+r/2,y:n.y2};e+=` C ${o.x},${o.y} ${a.x},${a.y} `}else if(this.data.type==="vsmooth"||this.data.type==="smooth"&&Math.abs(s)>Math.abs(r)){const o={x:n.x1,y:n.y1-s/2},a={x:n.x2,y:n.y2+s/2};e+=` C ${o.x},${o.y} ${a.x},${a.y} `}else if(this.data.type==="ortho"&&Math.abs(r)>=Math.abs(s)){const o={x:n.x1-r/2,y:n.y1},a={x:n.x2+r/2,y:n.y2};e+=` ${o.x},${o.y} ${a.x},${a.y} `}else if(this.data.type==="ortho"&&Math.abs(s)>Math.abs(r)){const o={x:n.x1,y:n.y1-s/2},a={x:n.x2,y:n.y2+s/2};e+=` ${o.x},${o.y} ${a.x},${a.y} `}return e+=` ${n.x2} ${n.y2}`,this.data.pathd=e,e}},methods:{parseAnchor(n,e){if(!n)return{x:0,y:0};let r=n.snap,s=n.align,o={x:n.x||0,y:n.y||0};if(typeof n=="string"&&(n==="rect"||n==="circle"?(r=n,o={x:"50%",y:"50%"}):s=n),s)if(s==="center")o={x:"50%",y:"50%"};else if(s==="left")o={x:0,y:"50%"};else if(s==="right")o={x:"100%",y:"50%"};else if(s==="top")o={x:"50%",y:0};else if(s==="top-left")o={x:0,y:0};else if(s==="top-right")o={x:"100%",y:0};else if(s==="bottom")o={x:"50%",y:"100%"};else if(s==="bottom-left")o={x:0,y:"100%"};else if(s==="bottom-right")o={x:"100%",y:"100%"};else throw new Error("unkown anchor align"+s);return o.x.endsWith&&(o.x=o.x.endsWith("%")?parseInt(o.x)/100*e.width:parseInt(o.x)),o.y.endsWith&&(o.y=o.y.endsWith("%")?parseInt(o.y)/100*e.height:parseInt(o.y)),{x:o.x,y:o.y,snap:r}}}},_hoisted_1$c=["d","id"];function _sfc_render$c(n,e,r,s,o,a){return openBlock(),createElementBlock("path",{class:"edge",d:a.path,id:r.data.id},null,8,_hoisted_1$c)}const Edge=_export_sfc(_sfc_main$c,[["render",_sfc_render$c],["__scopeId","data-v-40cdf8f7"]]),Group_vue_vue_type_style_index_0_lang="",__default__$1={mixins:[drag],props:{nodes:{type:Array,default:[]},margin:{type:Number,default:20},padding:{type:Object,default:()=>({left:10,right:10,top:10,bottom:10})},disableDrag:!1},computed:{minX:n=>n.nodes.length?n.nodes.reduce((e,r)=>Math.min(e,r.x),1/0):0,maxX:n=>n.nodes.length?n.nodes.reduce((e,r)=>Math.max(e,r.x+r.width),-1/0):0,minY:n=>n.nodes.length?n.nodes.reduce((e,r)=>Math.min(e,r.y),1/0):0,maxY:n=>n.nodes.length?n.nodes.reduce((e,r)=>Math.max(e,r.y+r.height),-1/0):0,width:n=>n.maxX-n.minX,height:n=>n.maxY-n.minY,contentMargin:n=>n.margin&&{margin:n.margin+"px",width:`calc(100% - ${n.margin*2}px)`,height:`calc(100% - ${n.margin*2}px)`},position:()=>util$1.isSafari()?"static":"absolute"},methods:{onDrag({x:n,y:e}){this.nodes.forEach(r=>{r.x+=n,r.y+=e})},onMousedown(n){n.stopPropagation(),this.disableDrag||(n.preventDefault(),this.startDrag(n))}}},__injectCSSVars__$1=()=>{useCssVars(n=>({ece442fe:n.position}))},__setup__$1=__default__$1.setup;__default__$1.setup=__setup__$1?(n,e)=>(__injectCSSVars__$1(),__setup__$1(n,e)):__injectCSSVars__$1;const _sfc_main$b=__default__$1,_hoisted_1$b=["x","y","width","height"];function _sfc_render$b(n,e,r,s,o,a){return openBlock(),createElementBlock("foreignObject",{class:"group",x:a.minX-r.padding.left-r.margin,y:a.minY-r.padding.top-r.margin,width:a.width+(r.padding.left+r.padding.right)+r.margin*2,height:a.height+(r.padding.top+r.padding.bottom)+r.margin*2,onMousedown:e[0]||(e[0]=(...l)=>a.onMousedown&&a.onMousedown(...l))},[createBaseVNode("div",{class:"content",ref:"content",style:normalizeStyle(a.contentMargin)},[renderSlot(n.$slots,"default")],4)],40,_hoisted_1$b)}const Group=_export_sfc(_sfc_main$b,[["render",_sfc_render$b]]),Port_vue_vue_type_style_index_0_lang="",__default__={props:{id:String,startOffset:Object,edgesFrom:{type:Array,default:()=>[]},edgesTo:{type:Array,default:()=>[]}},data(){return{offset:{x:0,y:0},position:util$1.isSafari()?"static":"relative"}},mounted(){this.updatePosition()},methods:{updatePosition(){let n=this.$slots.default&&this.$slots.default.length===1&&this.$slots.default[0].elm&&this.$slots.default[0].elm.offsetWidth?this.$slots.default[0].elm:this.$el;for(this.offset=this.startOffset||{x:n.offsetWidth/2,y:n.offsetHeight/2};n&&!n.classList.contains("content");)this.offset.x+=n.offsetLeft||0,this.offset.y+=n.offsetTop||0,n=n.offsetParent;this.edgesFrom.forEach(e=>{Object.assign(e.fromAnchor,this.offset)}),this.edgesTo.forEach(e=>{Object.assign(e.toAnchor,this.offset)})}},watch:{edgesFrom:"updatePosition",edgesTo:"updatePosition"}},__injectCSSVars__=()=>{useCssVars(n=>({bf069048:n.position}))},__setup__=__default__.setup;__default__.setup=__setup__?(n,e)=>(__injectCSSVars__(),__setup__(n,e)):__injectCSSVars__;const _sfc_main$a=__default__,_hoisted_1$a={class:"port"};function _sfc_render$a(n,e,r,s,o,a){return openBlock(),createElementBlock("span",_hoisted_1$a,[renderSlot(n.$slots,"default")])}const Port=_export_sfc(_sfc_main$a,[["render",_sfc_render$a]]),Label_vue_vue_type_style_index_0_lang="",_sfc_main$9={components:{Node},props:{edge:{type:Object,required:!0},perc:{type:Number,default:50},offset:{type:Object,default:()=>({x:0,y:0})},align:{type:String,default:"center"},rotate:{type:Boolean,default:!1},useDrag:{type:Boolean,default:!1},connector:{type:Boolean,default:!1}},data(){return{pos:{x:0,y:0},node:{id:Math.random().toString(36).slice(2),x:250,y:0,width:100,height:100},angle:0}},mounted(){this.$nextTick(this.getPosition)},methods:{getPosition(){const n=document.getElementById(this.edge.id);if(!n)throw`element not found: ${this.edge.id}`;const e=n.getTotalLength()*this.perc/100;if(this.pos=n.getPointAtLength(e),this.rotate){const r=n.getPointAtLength(e+.01);this.angle=Math.atan2(r.y-this.pos.y,r.x-this.pos.x)}else this.angle=0},updateNodePos(){const n={x:0,y:0};this.align==="center"?(n.x=this.node.width/2,n.y=this.node.height/2):this.align==="top"?n.x=this.node.width/2:this.align==="top-right"?n.x=node.width:this.align==="left"?n.y=this.node.height/2:this.align==="right"?(n.x=this.node.width,n.y=this.node.height/2):this.align==="bottom-left"?n.y=this.node.height:this.align==="bottom"?(n.x=this.node.width/2,n.y=this.node.height):this.align==="bottom-right"&&(n.x=this.node.width,n.y=this.node.height),this.node.x=this.pos.x+this.offset.x-n.x,this.node.y=this.pos.y+this.offset.y-n.y}},computed:{nodeTransform:n=>` transform-origin: ${n.node.x+n.node.width/2}px ${n.node.y+n.node.height}px; - transform: rotate(${n.angle}rad);`},watch:{edge:{deep:!0,handler:"getPosition"},perc:"getPosition",pos:"updateNodePos","node.width":"updateNodePos","node.height":"updateNodePos",offset:"updateNodePos",offset:"updateNodePos",align:"updateNodePos",rotate:"getPosition"}},_hoisted_1$9={class:"label"},_hoisted_2$9=["d"];function _sfc_render$9(n,e,r,s,o,a){const l=resolveComponent("node");return openBlock(),createElementBlock("g",_hoisted_1$9,[r.connector?(openBlock(),createElementBlock("path",{key:0,class:"edge",d:`M ${o.pos.x} ${o.pos.y} L ${o.node.x+o.node.width/2} ${o.node.y+o.node.height/2}`},null,8,_hoisted_2$9)):createCommentVNode("",!0),createVNode(l,{ref:"node",data:o.node,useDrag:r.useDrag,style:normalizeStyle(a.nodeTransform),onDrag:e[0]||(e[0]=c=>n.$emit("drag",c))},{default:withCtx(()=>[renderSlot(n.$slots,"default")]),_:3},8,["data","useDrag","style"])])}const VLabel=_export_sfc(_sfc_main$9,[["render",_sfc_render$9]]),_sfc_main$8={components:{Screen,Node,Edge,Group,SinkSidebar},data(){return{graph:new Graph,groupNodes:!1}},methods:{toggleGroupNodes(n){this.groupNodes=n}}},_hoisted_1$8={class:"demo"},_hoisted_2$8={class:"viewport"};function _sfc_render$8(n,e,r,s,o,a){const l=resolveComponent("group"),c=resolveComponent("edge"),u=resolveComponent("node"),f=resolveComponent("screen"),d=resolveComponent("sink-sidebar");return openBlock(),createElementBlock("div",_hoisted_1$8,[createBaseVNode("div",_hoisted_2$8,[createVNode(f,{ref:"screen",markers:[]},{default:withCtx(()=>[o.groupNodes?(openBlock(),createBlock(l,{key:0,nodes:n.$refs.sidebar.filterNodes||o.graph.nodes},null,8,["nodes"])):createCommentVNode("",!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(o.graph.edges,g=>(openBlock(),createBlock(c,{data:g,nodes:o.graph.nodes,key:g.id},null,8,["data","nodes"]))),128)),(openBlock(!0),createElementBlock(Fragment,null,renderList(o.graph.nodes,g=>(openBlock(),createBlock(u,{data:g,key:g.id},null,8,["data"]))),128))]),_:1},512)]),createVNode(d,{class:"sidebar",graph:o.graph,onToggleGroupNodes:a.toggleGroupNodes,ref:"sidebar"},null,8,["graph","onToggleGroupNodes"])])}const Sink=_export_sfc(_sfc_main$8,[["render",_sfc_render$8]]);var jsExports={},js={get exports(){return jsExports},set exports(n){jsExports=n}},src={},javascriptExports={},javascript={get exports(){return javascriptExports},set exports(n){javascriptExports=n}},beautifier$2={},output={},hasRequiredOutput;function requireOutput(){if(hasRequiredOutput)return output;hasRequiredOutput=1;function n(s){this.__parent=s,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}n.prototype.clone_empty=function(){var s=new n(this.__parent);return s.set_indent(this.__indent_count,this.__alignment_count),s},n.prototype.item=function(s){return s<0?this.__items[this.__items.length+s]:this.__items[s]},n.prototype.has_match=function(s){for(var o=this.__items.length-1;o>=0;o--)if(this.__items[o].match(s))return!0;return!1},n.prototype.set_indent=function(s,o){this.is_empty()&&(this.__indent_count=s||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},n.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},n.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},n.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var s=this.__parent.current_line;return s.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),s.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),s.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,s.__items[0]===" "&&(s.__items.splice(0,1),s.__character_count-=1),!0}return!1},n.prototype.is_empty=function(){return this.__items.length===0},n.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},n.prototype.push=function(s){this.__items.push(s);var o=s.lastIndexOf(` + transform: rotate(${n.angle}rad);`},watch:{edge:{deep:!0,handler:"getPosition"},perc:"getPosition",pos:"updateNodePos","node.width":"updateNodePos","node.height":"updateNodePos",offset:"updateNodePos",offset:"updateNodePos",align:"updateNodePos",rotate:"getPosition"}},_hoisted_1$9={class:"label"},_hoisted_2$9=["d"];function _sfc_render$9(n,e,r,s,o,a){const l=resolveComponent("node");return openBlock(),createElementBlock("g",_hoisted_1$9,[r.connector?(openBlock(),createElementBlock("path",{key:0,class:"edge",d:`M ${o.pos.x} ${o.pos.y} L ${o.node.x+o.node.width/2} ${o.node.y+o.node.height/2}`},null,8,_hoisted_2$9)):createCommentVNode("",!0),createVNode(l,{ref:"node",data:o.node,useDrag:r.useDrag,style:normalizeStyle(a.nodeTransform),onDrag:e[0]||(e[0]=c=>n.$emit("drag",c))},{default:withCtx(()=>[renderSlot(n.$slots,"default")]),_:3},8,["data","useDrag","style"])])}const VLabel=_export_sfc(_sfc_main$9,[["render",_sfc_render$9]]),_sfc_main$8={components:{Screen,Node,Edge,Group,SinkSidebar},data(){return{graph:new Graph,groupNodes:!1}},methods:{toggleGroupNodes(n){this.groupNodes=n}}},_hoisted_1$8={class:"demo"},_hoisted_2$8={class:"viewport"};function _sfc_render$8(n,e,r,s,o,a){const l=resolveComponent("group"),c=resolveComponent("edge"),u=resolveComponent("node"),f=resolveComponent("screen"),d=resolveComponent("sink-sidebar");return openBlock(),createElementBlock("div",_hoisted_1$8,[createBaseVNode("div",_hoisted_2$8,[createVNode(f,{ref:"screen",markers:[]},{default:withCtx(()=>[o.groupNodes?(openBlock(),createBlock(l,{key:0,nodes:n.$refs.sidebar.filterNodes||o.graph.nodes},null,8,["nodes"])):createCommentVNode("",!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(o.graph.edges,g=>(openBlock(),createBlock(c,{data:g,nodes:o.graph.nodes,key:g.id},null,8,["data","nodes"]))),128)),(openBlock(!0),createElementBlock(Fragment,null,renderList(o.graph.nodes,g=>(openBlock(),createBlock(u,{data:g,key:g.id},null,8,["data"]))),128))]),_:1},512)]),createVNode(d,{class:"sidebar",graph:o.graph,onToggleGroupNodes:a.toggleGroupNodes,ref:"sidebar"},null,8,["graph","onToggleGroupNodes"])])}const Sink=_export_sfc(_sfc_main$8,[["render",_sfc_render$8]]);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getAugmentedNamespace(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var r=function s(){if(this instanceof s){var o=[null];o.push.apply(o,arguments);var a=Function.bind.apply(e,o);return new a}return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(n).forEach(function(s){var o=Object.getOwnPropertyDescriptor(n,s);Object.defineProperty(r,s,o.get?o:{enumerable:!0,get:function(){return n[s]}})}),r}var jsExports={},js={get exports(){return jsExports},set exports(n){jsExports=n}},src={},javascriptExports={},javascript={get exports(){return javascriptExports},set exports(n){javascriptExports=n}},beautifier$2={},output={},hasRequiredOutput;function requireOutput(){if(hasRequiredOutput)return output;hasRequiredOutput=1;function n(s){this.__parent=s,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}n.prototype.clone_empty=function(){var s=new n(this.__parent);return s.set_indent(this.__indent_count,this.__alignment_count),s},n.prototype.item=function(s){return s<0?this.__items[this.__items.length+s]:this.__items[s]},n.prototype.has_match=function(s){for(var o=this.__items.length-1;o>=0;o--)if(this.__items[o].match(s))return!0;return!1},n.prototype.set_indent=function(s,o){this.is_empty()&&(this.__indent_count=s||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},n.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},n.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},n.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var s=this.__parent.current_line;return s.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),s.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),s.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,s.__items[0]===" "&&(s.__items.splice(0,1),s.__character_count-=1),!0}return!1},n.prototype.is_empty=function(){return this.__items.length===0},n.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},n.prototype.push=function(s){this.__items.push(s);var o=s.lastIndexOf(` `);o!==-1?this.__character_count=s.length-o:this.__character_count+=s.length},n.prototype.pop=function(){var s=null;return this.is_empty()||(s=this.__items.pop(),this.__character_count-=s.length),s},n.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},n.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},n.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},n.prototype.toString=function(){var s="";return this.is_empty()?this.__parent.indent_empty_lines&&(s=this.__parent.get_indent_string(this.__indent_count)):(s=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),s+=this.__items.join("")),s};function e(s,o){this.__cache=[""],this.__indent_size=s.indent_size,this.__indent_string=s.indent_char,s.indent_with_tabs||(this.__indent_string=new Array(s.indent_size+1).join(s.indent_char)),o=o||"",s.indent_level>0&&(o=new Array(s.indent_level+1).join(this.__indent_string)),this.__base_string=o,this.__base_string_length=o.length}e.prototype.get_indent_size=function(s,o){var a=this.__base_string_length;return o=o||0,s<0&&(a=0),a+=s*this.__indent_size,a+=o,a},e.prototype.get_indent_string=function(s,o){var a=this.__base_string;return o=o||0,s<0&&(s=0,a=""),o+=s*this.__indent_size,this.__ensure_cache(o),a+=this.__cache[o],a},e.prototype.__ensure_cache=function(s){for(;s>=this.__cache.length;)this.__add_column()},e.prototype.__add_column=function(){var s=this.__cache.length,o=0,a="";this.__indent_size&&s>=this.__indent_size&&(o=Math.floor(s/this.__indent_size),s-=o*this.__indent_size,a=new Array(o+1).join(this.__indent_string)),s&&(a+=new Array(s+1).join(" ")),this.__cache.push(a)};function r(s,o){this.__indent_cache=new e(s,o),this.raw=!1,this._end_with_newline=s.end_with_newline,this.indent_size=s.indent_size,this.wrap_line_length=s.wrap_line_length,this.indent_empty_lines=s.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new n(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}return r.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},r.prototype.get_line_number=function(){return this.__lines.length},r.prototype.get_indent_string=function(s,o){return this.__indent_cache.get_indent_string(s,o)},r.prototype.get_indent_size=function(s,o){return this.__indent_cache.get_indent_size(s,o)},r.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},r.prototype.add_new_line=function(s){return this.is_empty()||!s&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},r.prototype.get_code=function(s){this.trim(!0);var o=this.current_line.pop();o&&(o[o.length-1]===` `&&(o=o.replace(/\n+$/g,"")),this.current_line.push(o)),this._end_with_newline&&this.__add_outputline();var a=this.__lines.join(` `);return s!==` @@ -14,33 +14,32 @@ e/i`,graphError:"",graphNodesFilter:"",connType:"",groupNodes:!1,edgeAlign:"",ed `+o+` You passed in: '`+this.raw_options[s]+"'");return l[0]},n.prototype._get_selection_list=function(s,o,a){if(!o||o.length===0)throw new Error("Selection list cannot be empty.");if(a=a||[o[0]],!this._is_valid_selection(a,o))throw new Error("Invalid Default Value!");var l=this._get_array(s,a);if(!this._is_valid_selection(l,o))throw new Error("Invalid Option Value: The option '"+s+`' can contain only the following values: `+o+` -You passed in: '`+this.raw_options[s]+"'");return l},n.prototype._is_valid_selection=function(s,o){return s.length&&o.length&&!s.some(function(a){return o.indexOf(a)===-1})};function e(s,o){var a={};s=r(s);var l;for(l in s)l!==o&&(a[l]=s[l]);if(o&&s[o])for(l in s[o])a[l]=s[o][l];return a}function r(s){var o={},a;for(a in s){var l=a.replace(/-/g,"_");o[l]=s[a]}return o}return options$2.Options=n,options$2.normalizeOpts=r,options$2.mergeOpts=e,options$2}var hasRequiredOptions$2;function requireOptions$2(){if(hasRequiredOptions$2)return options$3;hasRequiredOptions$2=1;var n=requireOptions$3().Options,e=["before-newline","after-newline","preserve-newline"];function r(s){n.call(this,s,"js");var o=this.raw_options.brace_style||null;o==="expand-strict"?this.raw_options.brace_style="expand":o==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var a=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var l=0;l0&&(this.__position-=1)},e.prototype.hasNext=function(){return this.__position=0&&r=0&&s=r.length&&this.__input.substring(s-r.length,s).toLowerCase()===r},inputscanner.InputScanner=e,inputscanner}var tokenizer$1={},tokenstream={},hasRequiredTokenstream;function requireTokenstream(){if(hasRequiredTokenstream)return tokenstream;hasRequiredTokenstream=1;function n(e){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=e}return n.prototype.restart=function(){this.__position=0},n.prototype.isEmpty=function(){return this.__tokens_length===0},n.prototype.hasNext=function(){return this.__position=0&&e/),erb:a.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:a.starting_with(/{%/).until_after(/%}/),django_value:a.starting_with(/{{/).until_after(/}}/),django_comment:a.starting_with(/{#/).until_after(/#}/),smarty:a.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:a.starting_with(/{\*/).until_after(/\*}/),smarty_literal:a.starting_with(/{literal}/).until_after(/{\/literal}/)}}return r.prototype=new n,r.prototype._create=function(){return new r(this._input,this)},r.prototype._update=function(){this.__set_templated_pattern()},r.prototype.disable=function(s){var o=this._create();return o._disabled[s]=!0,o._update(),o},r.prototype.read_options=function(s){var o=this._create();for(var a in e)o._disabled[a]=s.templating.indexOf(a)===-1;return o._update(),o},r.prototype.exclude=function(s){var o=this._create();return o._excluded[s]=!0,o._update(),o},r.prototype.read=function(){var s="";this._match_pattern?s=this._input.read(this._starting_pattern):s=this._input.read(this._starting_pattern,this.__template_pattern);for(var o=this._read_template();o;)this._match_pattern?o+=this._input.read(this._match_pattern):o+=this._input.readUntil(this.__template_pattern),s+=o,o=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},r.prototype.__set_templated_pattern=function(){var s=[];this._disabled.php||s.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||s.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||s.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(s.push(this.__patterns.django._starting_pattern.source),s.push(this.__patterns.django_value._starting_pattern.source),s.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||s.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&s.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+s.join("|")+")")},r.prototype._read_template=function(){var s="",o=this._input.peek();if(o==="<"){var a=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&a==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&a==="%"&&(s=s||this.__patterns.erb.read())}else o==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(s=s||this.__patterns.handlebars_comment.read(),s=s||this.__patterns.handlebars_unescaped.read(),s=s||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(s=s||this.__patterns.django_value.read()),this._excluded.django||(s=s||this.__patterns.django_comment.read(),s=s||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(s=s||this.__patterns.smarty_comment.read(),s=s||this.__patterns.smarty_literal.read(),s=s||this.__patterns.smarty.read()));return s},templatablepattern.TemplatablePattern=r,templatablepattern}var hasRequiredTokenizer$1;function requireTokenizer$1(){if(hasRequiredTokenizer$1)return tokenizer$2;hasRequiredTokenizer$1=1;var n=requireInputscanner().InputScanner,e=requireTokenizer$2().Tokenizer,r=requireTokenizer$2().TOKEN,s=requireDirectives().Directives,o=requireAcorn(),a=requirePattern().Pattern,l=requireTemplatablepattern().TemplatablePattern;function c(N,I){return I.indexOf(N)!==-1}var u={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:r.START,RAW:r.RAW,EOF:r.EOF},f=new s(/\/\*/,/\*\//),d=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,g=/[0-9]/,m=/[^\d\.]/,_=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),E=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";E=E.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),E="\\?\\.(?!\\d) "+E,E=E.replace(/ /g,"|");var A=new RegExp(E),b="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),v=b.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),M=new RegExp("^(?:"+v.join("|")+")$"),V,R=function(N,I){e.call(this,N,I),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var $=new a(this._input),H=new l(this._input).read_options(this._options);this.__patterns={template:H,identifier:H.starting_with(o.identifier).matching(o.identifierMatch),number:$.matching(d),punct:$.matching(A),comment:$.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:$.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:$.matching(//),include:$.starting_with(/#include/).until_after(o.lineBreak),shebang:$.starting_with(/#!/).until_after(o.lineBreak),xml:$.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:H.until(/['\\\n\r\u2028\u2029]/),double_quote:H.until(/["\\\n\r\u2028\u2029]/),template_text:H.until(/[`\\$]/),template_expression:H.until(/[`}\\]/)}};R.prototype=new e,R.prototype._is_comment=function(N){return N.type===u.COMMENT||N.type===u.BLOCK_COMMENT||N.type===u.UNKNOWN},R.prototype._is_opening=function(N){return N.type===u.START_BLOCK||N.type===u.START_EXPR},R.prototype._is_closing=function(N,I){return(N.type===u.END_BLOCK||N.type===u.END_EXPR)&&I&&(N.text==="]"&&I.text==="["||N.text===")"&&I.text==="("||N.text==="}"&&I.text==="{")},R.prototype._reset=function(){V=!1},R.prototype._get_next_token=function(N,I){var $=null;this._readWhitespace();var H=this._input.peek();return H===null?this._create_token(u.EOF,""):($=$||this._read_non_javascript(H),$=$||this._read_string(H),$=$||this._read_word(N),$=$||this._read_singles(H),$=$||this._read_comment(H),$=$||this._read_regexp(H,N),$=$||this._read_xml(H,N),$=$||this._read_punctuation(),$=$||this._create_token(u.UNKNOWN,this._input.next()),$)},R.prototype._read_word=function(N){var I;if(I=this.__patterns.identifier.read(),I!=="")return I=I.replace(o.allLineBreaks,` -`),!(N.type===u.DOT||N.type===u.RESERVED&&(N.text==="set"||N.text==="get"))&&M.test(I)?(I==="in"||I==="of")&&(N.type===u.WORD||N.type===u.STRING)?this._create_token(u.OPERATOR,I):this._create_token(u.RESERVED,I):this._create_token(u.WORD,I);if(I=this.__patterns.number.read(),I!=="")return this._create_token(u.WORD,I)},R.prototype._read_singles=function(N){var I=null;return N==="("||N==="["?I=this._create_token(u.START_EXPR,N):N===")"||N==="]"?I=this._create_token(u.END_EXPR,N):N==="{"?I=this._create_token(u.START_BLOCK,N):N==="}"?I=this._create_token(u.END_BLOCK,N):N===";"?I=this._create_token(u.SEMICOLON,N):N==="."&&m.test(this._input.peek(1))?I=this._create_token(u.DOT,N):N===","&&(I=this._create_token(u.COMMA,N)),I&&this._input.next(),I},R.prototype._read_punctuation=function(){var N=this.__patterns.punct.read();if(N!=="")return N==="="?this._create_token(u.EQUALS,N):N==="?."?this._create_token(u.DOT,N):this._create_token(u.OPERATOR,N)},R.prototype._read_non_javascript=function(N){var I="";if(N==="#"){if(this._is_first_token()&&(I=this.__patterns.shebang.read(),I))return this._create_token(u.UNKNOWN,I.trim()+` -`);if(I=this.__patterns.include.read(),I)return this._create_token(u.UNKNOWN,I.trim()+` -`);N=this._input.next();var $="#";if(this._input.hasNext()&&this._input.testChar(g)){do N=this._input.next(),$+=N;while(this._input.hasNext()&&N!=="#"&&N!=="=");return N==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?($+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&($+="{}",this._input.next(),this._input.next())),this._create_token(u.WORD,$)}this._input.back()}else if(N==="<"&&this._is_first_token()){if(I=this.__patterns.html_comment_start.read(),I){for(;this._input.hasNext()&&!this._input.testChar(o.newline);)I+=this._input.next();return V=!0,this._create_token(u.COMMENT,I)}}else if(V&&N==="-"&&(I=this.__patterns.html_comment_end.read(),I))return V=!1,this._create_token(u.COMMENT,I);return null},R.prototype._read_comment=function(N){var I=null;if(N==="/"){var $="";if(this._input.peek(1)==="*"){$=this.__patterns.block_comment.read();var H=f.get_directives($);H&&H.ignore==="start"&&($+=f.readIgnored(this._input)),$=$.replace(o.allLineBreaks,` -`),I=this._create_token(u.BLOCK_COMMENT,$),I.directives=H}else this._input.peek(1)==="/"&&($=this.__patterns.comment.read(),I=this._create_token(u.COMMENT,$))}return I},R.prototype._read_string=function(N){if(N==="`"||N==="'"||N==='"'){var I=this._input.next();return this.has_char_escapes=!1,N==="`"?I+=this._read_string_recursive("`",!0,"${"):I+=this._read_string_recursive(N),this.has_char_escapes&&this._options.unescape_strings&&(I=L(I)),this._input.peek()===N&&(I+=this._input.next()),I=I.replace(o.allLineBreaks,` -`),this._create_token(u.STRING,I)}return null},R.prototype._allow_regexp_or_xml=function(N){return N.type===u.RESERVED&&c(N.text,["return","case","throw","else","do","typeof","yield"])||N.type===u.END_EXPR&&N.text===")"&&N.opened.previous.type===u.RESERVED&&c(N.opened.previous.text,["if","while","for"])||c(N.type,[u.COMMENT,u.START_EXPR,u.START_BLOCK,u.START,u.END_BLOCK,u.OPERATOR,u.EQUALS,u.EOF,u.SEMICOLON,u.COMMA])},R.prototype._read_regexp=function(N,I){if(N==="/"&&this._allow_regexp_or_xml(I)){for(var $=this._input.next(),H=!1,k=!1;this._input.hasNext()&&(H||k||this._input.peek()!==N)&&!this._input.testChar(o.newline);)$+=this._input.peek(),H?H=!1:(H=this._input.peek()==="\\",this._input.peek()==="["?k=!0:this._input.peek()==="]"&&(k=!1)),this._input.next();return this._input.peek()===N&&($+=this._input.next(),$+=this._input.read(o.identifier)),this._create_token(u.STRING,$)}return null},R.prototype._read_xml=function(N,I){if(this._options.e4x&&N==="<"&&this._allow_regexp_or_xml(I)){var $="",H=this.__patterns.xml.read_match();if(H){for(var k=H[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),q=k.indexOf("{")===0,G=0;H;){var J=!!H[1],ne=H[2],ce=!!H[H.length-1]||ne.slice(0,8)==="![CDATA[";if(!ce&&(ne===k||q&&ne.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(J?--G:++G),$+=H[0],G<=0)break;H=this.__patterns.xml.read_match()}return H||($+=this._input.match(/[\s\S]*/g)[0]),$=$.replace(o.allLineBreaks,` -`),this._create_token(u.STRING,$)}}return null};function L(N){for(var I="",$=0,H=new n(N),k=null;H.hasNext();)if(k=H.match(/([\s]|[^\\]|\\\\)+/g),k&&(I+=k[0]),H.peek()==="\\"){if(H.next(),H.peek()==="x")k=H.match(/x([0-9A-Fa-f]{2})/g);else if(H.peek()==="u")k=H.match(/u([0-9A-Fa-f]{4})/g);else{I+="\\",H.hasNext()&&(I+=H.next());continue}if(!k||($=parseInt(k[1],16),$>126&&$<=255&&k[0].indexOf("x")===0))return N;if($>=0&&$<32){I+="\\"+k[0];continue}else $===34||$===39||$===92?I+="\\"+String.fromCharCode($):I+=String.fromCharCode($)}return I}return R.prototype._read_string_recursive=function(N,I,$){var H,k;N==="'"?k=this.__patterns.single_quote:N==='"'?k=this.__patterns.double_quote:N==="`"?k=this.__patterns.template_text:N==="}"&&(k=this.__patterns.template_expression);for(var q=k.read(),G="";this._input.hasNext();){if(G=this._input.next(),G===N||!I&&o.newline.test(G)){this._input.back();break}else G==="\\"&&this._input.hasNext()?(H=this._input.peek(),H==="x"||H==="u"?this.has_char_escapes=!0:H==="\r"&&this._input.peek(1)===` -`&&this._input.next(),G+=this._input.next()):$&&($==="${"&&G==="$"&&this._input.peek()==="{"&&(G+=this._input.next()),$===G&&(N==="`"?G+=this._read_string_recursive("}",I,"`"):G+=this._read_string_recursive("`",I,"${"),this._input.hasNext()&&(G+=this._input.next())));G+=k.read(),q+=G}return q},tokenizer$2.Tokenizer=R,tokenizer$2.TOKEN=u,tokenizer$2.positionable_operators=_.slice(),tokenizer$2.line_starters=b.slice(),tokenizer$2}var hasRequiredBeautifier$2;function requireBeautifier$2(){if(hasRequiredBeautifier$2)return beautifier$2;hasRequiredBeautifier$2=1;var n=requireOutput().Output,e=requireToken().Token,r=requireAcorn(),s=requireOptions$2().Options,o=requireTokenizer$1().Tokenizer,a=requireTokenizer$1().line_starters,l=requireTokenizer$1().positionable_operators,c=requireTokenizer$1().TOKEN;function u(k,q){return q.indexOf(k)!==-1}function f(k){return k.replace(/^\s+/g,"")}function d(k){for(var q={},G=0;GG&&(G=k.line_indent_level));var J={mode:q,parent:k,last_token:k?k.last_token:new e(c.START_BLOCK,""),last_word:k?k.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:G,alignment:0,line_indent_level:k?k.line_indent_level:G,start_line_index:this._output.get_line_number(),ternary_depth:0};return J},$.prototype._reset=function(k){var q=k.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new n(this._options,q),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(v.BlockStatement);var G=new o(k,this._options);return this._tokens=G.tokenize(),k},$.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var k,q=this._reset(this._source_text),G=this._options.eol;this._options.eol==="auto"&&(G=` -`,q&&r.lineBreak.test(q||"")&&(G=q.match(r.lineBreak)[0]));for(var J=this._tokens.next();J;)this.handle_token(J),this._last_last_text=this._flags.last_token.text,this._flags.last_token=J,J=this._tokens.next();return k=this._output.get_code(G),k},$.prototype.handle_token=function(k,q){k.type===c.START_EXPR?this.handle_start_expr(k):k.type===c.END_EXPR?this.handle_end_expr(k):k.type===c.START_BLOCK?this.handle_start_block(k):k.type===c.END_BLOCK?this.handle_end_block(k):k.type===c.WORD?this.handle_word(k):k.type===c.RESERVED?this.handle_word(k):k.type===c.SEMICOLON?this.handle_semicolon(k):k.type===c.STRING?this.handle_string(k):k.type===c.EQUALS?this.handle_equals(k):k.type===c.OPERATOR?this.handle_operator(k):k.type===c.COMMA?this.handle_comma(k):k.type===c.BLOCK_COMMENT?this.handle_block_comment(k,q):k.type===c.COMMENT?this.handle_comment(k,q):k.type===c.DOT?this.handle_dot(k):k.type===c.EOF?this.handle_eof(k):k.type===c.UNKNOWN?this.handle_unknown(k,q):this.handle_unknown(k,q)},$.prototype.handle_whitespace_and_comments=function(k,q){var G=k.newlines,J=this._options.keep_array_indentation&&R(this._flags.mode);if(k.comments_before)for(var ne=k.comments_before.next();ne;)this.handle_whitespace_and_comments(ne,q),this.handle_token(ne,q),ne=k.comments_before.next();if(J)for(var ce=0;ce0,q);else if(this._options.max_preserve_newlines&&G>this._options.max_preserve_newlines&&(G=this._options.max_preserve_newlines),this._options.preserve_newlines&&G>1){this.print_newline(!1,q);for(var le=1;le0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},$.prototype.set_mode=function(k){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,k),this._flags=this.create_flags(this._previous_flags,k),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},$.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===v.Statement&&M(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},$.prototype.start_of_object_property=function(){return this._flags.parent.mode===v.ObjectLiteral&&this._flags.mode===v.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||m(this._flags.last_token,["get","set"]))},$.prototype.start_of_statement=function(k){var q=!1;return q=q||m(this._flags.last_token,["var","let","const"])&&k.type===c.WORD,q=q||g(this._flags.last_token,"do"),q=q||!(this._flags.parent.mode===v.ObjectLiteral&&this._flags.mode===v.Statement)&&m(this._flags.last_token,H)&&!k.newlines,q=q||g(this._flags.last_token,"else")&&!(g(k,"if")&&!k.comments_before),q=q||this._flags.last_token.type===c.END_EXPR&&(this._previous_flags.mode===v.ForInitializer||this._previous_flags.mode===v.Conditional),q=q||this._flags.last_token.type===c.WORD&&this._flags.mode===v.BlockStatement&&!this._flags.in_case&&!(k.text==="--"||k.text==="++")&&this._last_last_text!=="function"&&k.type!==c.WORD&&k.type!==c.RESERVED,q=q||this._flags.mode===v.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||m(this._flags.last_token,["get","set"])),q?(this.set_mode(v.Statement),this.indent(),this.handle_whitespace_and_comments(k,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(k,m(k,["do","for","if","while"])),!0):!1},$.prototype.handle_start_expr=function(k){this.start_of_statement(k)||this.handle_whitespace_and_comments(k);var q=v.Expression;if(k.text==="["){if(this._flags.last_token.type===c.WORD||this._flags.last_token.text===")"){m(this._flags.last_token,a)&&(this._output.space_before_token=!0),this.print_token(k),this.set_mode(q),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}q=v.ArrayLiteral,R(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),u(this._flags.last_token.type,[c.START_EXPR,c.END_EXPR,c.WORD,c.OPERATOR,c.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===c.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,q=v.ForInitializer):u(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,q=v.Conditional):u(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&k.whitespace_before===""?this._output.space_before_token=!1:(u(this._flags.last_token.text,a)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===c.EQUALS||this._flags.last_token.type===c.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(k);else if(this._flags.last_token.type===c.WORD){this._output.space_before_token=!1;var G=this._tokens.peek(-3);if(this._options.space_after_named_function&&G){var J=this._tokens.peek(-4);m(G,["async","function"])||G.text==="*"&&m(J,["async","function"])?this._output.space_before_token=!0:this._flags.mode===v.ObjectLiteral?(G.text==="{"||G.text===","||G.text==="*"&&(J.text==="{"||J.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(k);(this._flags.last_token.type===c.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(u(this._last_last_text,["function","yield"])||this._flags.mode===v.ObjectLiteral&&u(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===c.START_BLOCK?this.print_newline():(this._flags.last_token.type===c.END_EXPR||this._flags.last_token.type===c.START_EXPR||this._flags.last_token.type===c.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===c.COMMA)&&this.allow_wrap_or_preserved_newline(k,k.newlines),this.print_token(k),this.set_mode(q),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},$.prototype.handle_end_expr=function(k){for(;this._flags.mode===v.Statement;)this.restore_mode();this.handle_whitespace_and_comments(k),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(k,k.text==="]"&&R(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===c.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(k),this.restore_mode(),M(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===v.Conditional&&(this._previous_flags.mode=v.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},$.prototype.handle_start_block=function(k){this.handle_whitespace_and_comments(k);var q=this._tokens.peek(),G=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===c.END_EXPR?(this.set_mode(v.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(v.BlockStatement):G&&(u(G.text,[":",","])&&u(q.type,[c.STRING,c.WORD,c.RESERVED])||u(q.text,["get","set","..."])&&u(G.type,[c.WORD,c.RESERVED]))?u(this._last_last_text,["class","interface"])&&!u(G.text,[":",","])?this.set_mode(v.BlockStatement):this.set_mode(v.ObjectLiteral):this._flags.last_token.type===c.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(v.BlockStatement):u(this._flags.last_token.type,[c.EQUALS,c.START_EXPR,c.COMMA,c.OPERATOR])||m(this._flags.last_token,["return","throw","import","default"])?this.set_mode(v.ObjectLiteral):this.set_mode(v.BlockStatement),this._flags.last_token&&m(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var J=!q.comments_before&&q.text==="}",ne=J&&this._flags.last_word==="function"&&this._flags.last_token.type===c.END_EXPR;if(this._options.brace_preserve_inline){var ce=0,le=null;this._flags.inline_frame=!0;do if(ce+=1,le=this._tokens.peek(ce-1),le.newlines){this._flags.inline_frame=!1;break}while(le.type!==c.EOF&&!(le.type===c.END_BLOCK&&le.opened===k))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&k.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==c.OPERATOR&&(ne||this._flags.last_token.type===c.EQUALS||m(this._flags.last_token,_)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(R(this._previous_flags.mode)&&(this._flags.last_token.type===c.START_EXPR||this._flags.last_token.type===c.COMMA)&&((this._flags.last_token.type===c.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===c.COMMA||this._flags.last_token.type===c.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(k),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==c.OPERATOR&&this._flags.last_token.type!==c.START_EXPR&&(this._flags.last_token.type===c.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(k),this.indent(),!J&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},$.prototype.handle_end_block=function(k){for(this.handle_whitespace_and_comments(k);this._flags.mode===v.Statement;)this.restore_mode();var q=this._flags.last_token.type===c.START_BLOCK;this._flags.inline_frame&&!q?this._output.space_before_token=!0:this._options.brace_style==="expand"?q||this.print_newline():q||(R(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(k)},$.prototype.handle_word=function(k){if(k.type===c.RESERVED){if(u(k.text,["set","get"])&&this._flags.mode!==v.ObjectLiteral)k.type=c.WORD;else if(k.text==="import"&&u(this._tokens.peek().text,["(","."]))k.type=c.WORD;else if(u(k.text,["as","from"])&&!this._flags.import_block)k.type=c.WORD;else if(this._flags.mode===v.ObjectLiteral){var q=this._tokens.peek();q.text===":"&&(k.type=c.WORD)}}if(this.start_of_statement(k)?m(this._flags.last_token,["var","let","const"])&&k.type===c.WORD&&(this._flags.declaration_statement=!0):k.newlines&&!L(this._flags.mode)&&(this._flags.last_token.type!==c.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==c.EQUALS&&(this._options.preserve_newlines||!m(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(k),this.print_newline()):this.handle_whitespace_and_comments(k),this._flags.do_block&&!this._flags.do_while)if(g(k,"while")){this._output.space_before_token=!0,this.print_token(k),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&g(k,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===v.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&m(k,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(k),this._flags.in_case=!0;return}if((this._flags.last_token.type===c.COMMA||this._flags.last_token.type===c.START_EXPR||this._flags.last_token.type===c.EQUALS||this._flags.last_token.type===c.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(k)),g(k,"function")){(u(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(u(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===c.OPERATOR))&&!this._output.just_added_blankline()&&!k.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===c.RESERVED||this._flags.last_token.type===c.WORD?m(this._flags.last_token,["get","set","new","export"])||m(this._flags.last_token,H)?this._output.space_before_token=!0:g(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===c.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(L(this._flags.mode)||R(this._flags.mode))||this.print_newline(),this.print_token(k),this._flags.last_word=k.text;return}var G="NONE";if(this._flags.last_token.type===c.END_BLOCK?this._previous_flags.inline_frame?G="SPACE":m(k,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&k.newlines?G="NEWLINE":(G="SPACE",this._output.space_before_token=!0):G="NEWLINE":this._flags.last_token.type===c.SEMICOLON&&this._flags.mode===v.BlockStatement?G="NEWLINE":this._flags.last_token.type===c.SEMICOLON&&L(this._flags.mode)?G="SPACE":this._flags.last_token.type===c.STRING?G="NEWLINE":this._flags.last_token.type===c.RESERVED||this._flags.last_token.type===c.WORD||this._flags.last_token.text==="*"&&(u(this._last_last_text,["function","yield"])||this._flags.mode===v.ObjectLiteral&&u(this._last_last_text,["{",","]))?G="SPACE":this._flags.last_token.type===c.START_BLOCK?this._flags.inline_frame?G="SPACE":G="NEWLINE":this._flags.last_token.type===c.END_EXPR&&(this._output.space_before_token=!0,G="NEWLINE"),m(k,a)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?G="SPACE":G="NEWLINE"),m(k,["else","catch","finally"]))if((!(this._flags.last_token.type===c.END_BLOCK&&this._previous_flags.mode===v.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&k.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var J=this._output.current_line;J.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else G==="NEWLINE"?m(this._flags.last_token,_)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&m(k,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==c.END_EXPR?(this._flags.last_token.type!==c.START_EXPR||!m(k,["var","let","const"]))&&this._flags.last_token.text!==":"&&(g(k,"if")&&g(k.previous,"else")?this._output.space_before_token=!0:this.print_newline()):m(k,a)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&R(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():G==="SPACE"&&(this._output.space_before_token=!0);k.previous&&(k.previous.type===c.WORD||k.previous.type===c.RESERVED)&&(this._output.space_before_token=!0),this.print_token(k),this._flags.last_word=k.text,k.type===c.RESERVED&&(k.text==="do"?this._flags.do_block=!0:k.text==="if"?this._flags.if_block=!0:k.text==="import"?this._flags.import_block=!0:this._flags.import_block&&g(k,"from")&&(this._flags.import_block=!1))},$.prototype.handle_semicolon=function(k){this.start_of_statement(k)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(k);for(var q=this._tokens.peek();this._flags.mode===v.Statement&&!(this._flags.if_block&&g(q,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(k)},$.prototype.handle_string=function(k){k.text.startsWith("`")&&k.newlines===0&&k.whitespace_before===""&&(k.previous.text===")"||this._flags.last_token.type===c.WORD)||(this.start_of_statement(k)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(k),this._flags.last_token.type===c.RESERVED||this._flags.last_token.type===c.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===c.COMMA||this._flags.last_token.type===c.START_EXPR||this._flags.last_token.type===c.EQUALS||this._flags.last_token.type===c.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(k):k.text.startsWith("`")&&this._flags.last_token.type===c.END_EXPR&&(k.previous.text==="]"||k.previous.text===")")&&k.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(k)},$.prototype.handle_equals=function(k){this.start_of_statement(k)||this.handle_whitespace_and_comments(k),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(k),this._output.space_before_token=!0},$.prototype.handle_comma=function(k){this.handle_whitespace_and_comments(k,!0),this.print_token(k),this._output.space_before_token=!0,this._flags.declaration_statement?(L(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(k)):this._flags.mode===v.ObjectLiteral||this._flags.mode===v.Statement&&this._flags.parent.mode===v.ObjectLiteral?(this._flags.mode===v.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(k)},$.prototype.handle_operator=function(k){var q=k.text==="*"&&(m(this._flags.last_token,["function","yield"])||u(this._flags.last_token.type,[c.START_BLOCK,c.COMMA,c.END_BLOCK,c.SEMICOLON])),G=u(k.text,["-","+"])&&(u(this._flags.last_token.type,[c.START_BLOCK,c.START_EXPR,c.EQUALS,c.OPERATOR])||u(this._flags.last_token.text,a)||this._flags.last_token.text===",");if(!this.start_of_statement(k)){var J=!q;this.handle_whitespace_and_comments(k,J)}if(k.text==="*"&&this._flags.last_token.type===c.DOT){this.print_token(k);return}if(k.text==="::"){this.print_token(k);return}if(this._flags.last_token.type===c.OPERATOR&&u(this._options.operator_position,b)&&this.allow_wrap_or_preserved_newline(k),k.text===":"&&this._flags.in_case){this.print_token(k),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==c.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var ne=!0,ce=!0,le=!1;if(k.text===":"?this._flags.ternary_depth===0?ne=!1:(this._flags.ternary_depth-=1,le=!0):k.text==="?"&&(this._flags.ternary_depth+=1),!G&&!q&&this._options.preserve_newlines&&u(k.text,l)){var me=k.text===":",fe=me&&le,ee=me&&!le;switch(this._options.operator_position){case A.before_newline:this._output.space_before_token=!ee,this.print_token(k),(!me||fe)&&this.allow_wrap_or_preserved_newline(k),this._output.space_before_token=!0;return;case A.after_newline:this._output.space_before_token=!0,!me||fe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(k):this._output.space_before_token=!1,this.print_token(k),this._output.space_before_token=!0;return;case A.preserve_newline:ee||this.allow_wrap_or_preserved_newline(k),ne=!(this._output.just_added_newline()||ee),this._output.space_before_token=ne,this.print_token(k),this._output.space_before_token=!0;return}}if(q){this.allow_wrap_or_preserved_newline(k),ne=!1;var K=this._tokens.peek();ce=K&&u(K.type,[c.WORD,c.RESERVED])}else if(k.text==="...")this.allow_wrap_or_preserved_newline(k),ne=this._flags.last_token.type===c.START_BLOCK,ce=!1;else if(u(k.text,["--","++","!","~"])||G){if((this._flags.last_token.type===c.COMMA||this._flags.last_token.type===c.START_EXPR)&&this.allow_wrap_or_preserved_newline(k),ne=!1,ce=!1,k.newlines&&(k.text==="--"||k.text==="++"||k.text==="~")){var he=m(this._flags.last_token,_)&&k.newlines;he&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(he,!0)}this._flags.last_token.text===";"&&L(this._flags.mode)&&(ne=!0),this._flags.last_token.type===c.RESERVED?ne=!0:this._flags.last_token.type===c.END_EXPR?ne=!(this._flags.last_token.text==="]"&&(k.text==="--"||k.text==="++")):this._flags.last_token.type===c.OPERATOR&&(ne=u(k.text,["--","-","++","+"])&&u(this._flags.last_token.text,["--","-","++","+"]),u(k.text,["+","-"])&&u(this._flags.last_token.text,["--","++"])&&(ce=!0)),(this._flags.mode===v.BlockStatement&&!this._flags.inline_frame||this._flags.mode===v.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||ne,this.print_token(k),this._output.space_before_token=ce},$.prototype.handle_block_comment=function(k,q){if(this._output.raw){this._output.add_raw_token(k),k.directives&&k.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(k.directives){this.print_newline(!1,q),this.print_token(k),k.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!r.newline.test(k.text)&&!k.newlines){this._output.space_before_token=!0,this.print_token(k),this._output.space_before_token=!0;return}else this.print_block_commment(k,q)},$.prototype.print_block_commment=function(k,q){var G=V(k.text),J,ne=!1,ce=!1,le=k.whitespace_before,me=le.length;if(this.print_newline(!1,q),this.print_token_line_indentation(k),this._output.add_token(G[0]),this.print_newline(!1,q),G.length>1){for(G=G.slice(1),ne=N(G,"*"),ce=I(G,le),ne&&(this._flags.alignment=1),J=0;J0&&(this.__position-=1)},e.prototype.hasNext=function(){return this.__position=0&&r=0&&s=r.length&&this.__input.substring(s-r.length,s).toLowerCase()===r},inputscanner.InputScanner=e,inputscanner}var tokenizer$1={},tokenstream={},hasRequiredTokenstream;function requireTokenstream(){if(hasRequiredTokenstream)return tokenstream;hasRequiredTokenstream=1;function n(e){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=e}return n.prototype.restart=function(){this.__position=0},n.prototype.isEmpty=function(){return this.__tokens_length===0},n.prototype.hasNext=function(){return this.__position=0&&e/),erb:a.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:a.starting_with(/{%/).until_after(/%}/),django_value:a.starting_with(/{{/).until_after(/}}/),django_comment:a.starting_with(/{#/).until_after(/#}/),smarty:a.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:a.starting_with(/{\*/).until_after(/\*}/),smarty_literal:a.starting_with(/{literal}/).until_after(/{\/literal}/)}}return r.prototype=new n,r.prototype._create=function(){return new r(this._input,this)},r.prototype._update=function(){this.__set_templated_pattern()},r.prototype.disable=function(s){var o=this._create();return o._disabled[s]=!0,o._update(),o},r.prototype.read_options=function(s){var o=this._create();for(var a in e)o._disabled[a]=s.templating.indexOf(a)===-1;return o._update(),o},r.prototype.exclude=function(s){var o=this._create();return o._excluded[s]=!0,o._update(),o},r.prototype.read=function(){var s="";this._match_pattern?s=this._input.read(this._starting_pattern):s=this._input.read(this._starting_pattern,this.__template_pattern);for(var o=this._read_template();o;)this._match_pattern?o+=this._input.read(this._match_pattern):o+=this._input.readUntil(this.__template_pattern),s+=o,o=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},r.prototype.__set_templated_pattern=function(){var s=[];this._disabled.php||s.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||s.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||s.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(s.push(this.__patterns.django._starting_pattern.source),s.push(this.__patterns.django_value._starting_pattern.source),s.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||s.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&s.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+s.join("|")+")")},r.prototype._read_template=function(){var s="",o=this._input.peek();if(o==="<"){var a=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&a==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&a==="%"&&(s=s||this.__patterns.erb.read())}else o==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(s=s||this.__patterns.handlebars_comment.read(),s=s||this.__patterns.handlebars_unescaped.read(),s=s||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(s=s||this.__patterns.django_value.read()),this._excluded.django||(s=s||this.__patterns.django_comment.read(),s=s||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(s=s||this.__patterns.smarty_comment.read(),s=s||this.__patterns.smarty_literal.read(),s=s||this.__patterns.smarty.read()));return s},templatablepattern.TemplatablePattern=r,templatablepattern}var hasRequiredTokenizer$1;function requireTokenizer$1(){if(hasRequiredTokenizer$1)return tokenizer$2;hasRequiredTokenizer$1=1;var n=requireInputscanner().InputScanner,e=requireTokenizer$2().Tokenizer,r=requireTokenizer$2().TOKEN,s=requireDirectives().Directives,o=requireAcorn(),a=requirePattern().Pattern,l=requireTemplatablepattern().TemplatablePattern;function c(N,$){return $.indexOf(N)!==-1}var u={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:r.START,RAW:r.RAW,EOF:r.EOF},f=new s(/\/\*/,/\*\//),d=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,g=/[0-9]/,m=/[^\d\.]/,_=">>> === !== << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),E=">>>= ... >>= <<= === >>> !== **= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";E=E.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),E="\\?\\.(?!\\d) "+E,E=E.replace(/ /g,"|");var A=new RegExp(E),b="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),v=b.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as"]),M=new RegExp("^(?:"+v.join("|")+")$"),V,R=function(N,$){e.call(this,N,$),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var I=new a(this._input),H=new l(this._input).read_options(this._options);this.__patterns={template:H,identifier:H.starting_with(o.identifier).matching(o.identifierMatch),number:I.matching(d),punct:I.matching(A),comment:I.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:I.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:I.matching(//),include:I.starting_with(/#include/).until_after(o.lineBreak),shebang:I.starting_with(/#!/).until_after(o.lineBreak),xml:I.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\]|)(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/),single_quote:H.until(/['\\\n\r\u2028\u2029]/),double_quote:H.until(/["\\\n\r\u2028\u2029]/),template_text:H.until(/[`\\$]/),template_expression:H.until(/[`}\\]/)}};R.prototype=new e,R.prototype._is_comment=function(N){return N.type===u.COMMENT||N.type===u.BLOCK_COMMENT||N.type===u.UNKNOWN},R.prototype._is_opening=function(N){return N.type===u.START_BLOCK||N.type===u.START_EXPR},R.prototype._is_closing=function(N,$){return(N.type===u.END_BLOCK||N.type===u.END_EXPR)&&$&&(N.text==="]"&&$.text==="["||N.text===")"&&$.text==="("||N.text==="}"&&$.text==="{")},R.prototype._reset=function(){V=!1},R.prototype._get_next_token=function(N,$){var I=null;this._readWhitespace();var H=this._input.peek();return H===null?this._create_token(u.EOF,""):(I=I||this._read_non_javascript(H),I=I||this._read_string(H),I=I||this._read_word(N),I=I||this._read_singles(H),I=I||this._read_comment(H),I=I||this._read_regexp(H,N),I=I||this._read_xml(H,N),I=I||this._read_punctuation(),I=I||this._create_token(u.UNKNOWN,this._input.next()),I)},R.prototype._read_word=function(N){var $;if($=this.__patterns.identifier.read(),$!=="")return $=$.replace(o.allLineBreaks,` +`),!(N.type===u.DOT||N.type===u.RESERVED&&(N.text==="set"||N.text==="get"))&&M.test($)?$==="in"||$==="of"?this._create_token(u.OPERATOR,$):this._create_token(u.RESERVED,$):this._create_token(u.WORD,$);if($=this.__patterns.number.read(),$!=="")return this._create_token(u.WORD,$)},R.prototype._read_singles=function(N){var $=null;return N==="("||N==="["?$=this._create_token(u.START_EXPR,N):N===")"||N==="]"?$=this._create_token(u.END_EXPR,N):N==="{"?$=this._create_token(u.START_BLOCK,N):N==="}"?$=this._create_token(u.END_BLOCK,N):N===";"?$=this._create_token(u.SEMICOLON,N):N==="."&&m.test(this._input.peek(1))?$=this._create_token(u.DOT,N):N===","&&($=this._create_token(u.COMMA,N)),$&&this._input.next(),$},R.prototype._read_punctuation=function(){var N=this.__patterns.punct.read();if(N!=="")return N==="="?this._create_token(u.EQUALS,N):N==="?."?this._create_token(u.DOT,N):this._create_token(u.OPERATOR,N)},R.prototype._read_non_javascript=function(N){var $="";if(N==="#"){if(this._is_first_token()&&($=this.__patterns.shebang.read(),$))return this._create_token(u.UNKNOWN,$.trim()+` +`);if($=this.__patterns.include.read(),$)return this._create_token(u.UNKNOWN,$.trim()+` +`);N=this._input.next();var I="#";if(this._input.hasNext()&&this._input.testChar(g)){do N=this._input.next(),I+=N;while(this._input.hasNext()&&N!=="#"&&N!=="=");return N==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(I+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(I+="{}",this._input.next(),this._input.next())),this._create_token(u.WORD,I)}this._input.back()}else if(N==="<"&&this._is_first_token()){if($=this.__patterns.html_comment_start.read(),$){for(;this._input.hasNext()&&!this._input.testChar(o.newline);)$+=this._input.next();return V=!0,this._create_token(u.COMMENT,$)}}else if(V&&N==="-"&&($=this.__patterns.html_comment_end.read(),$))return V=!1,this._create_token(u.COMMENT,$);return null},R.prototype._read_comment=function(N){var $=null;if(N==="/"){var I="";if(this._input.peek(1)==="*"){I=this.__patterns.block_comment.read();var H=f.get_directives(I);H&&H.ignore==="start"&&(I+=f.readIgnored(this._input)),I=I.replace(o.allLineBreaks,` +`),$=this._create_token(u.BLOCK_COMMENT,I),$.directives=H}else this._input.peek(1)==="/"&&(I=this.__patterns.comment.read(),$=this._create_token(u.COMMENT,I))}return $},R.prototype._read_string=function(N){if(N==="`"||N==="'"||N==='"'){var $=this._input.next();return this.has_char_escapes=!1,N==="`"?$+=this._read_string_recursive("`",!0,"${"):$+=this._read_string_recursive(N),this.has_char_escapes&&this._options.unescape_strings&&($=L($)),this._input.peek()===N&&($+=this._input.next()),$=$.replace(o.allLineBreaks,` +`),this._create_token(u.STRING,$)}return null},R.prototype._allow_regexp_or_xml=function(N){return N.type===u.RESERVED&&c(N.text,["return","case","throw","else","do","typeof","yield"])||N.type===u.END_EXPR&&N.text===")"&&N.opened.previous.type===u.RESERVED&&c(N.opened.previous.text,["if","while","for"])||c(N.type,[u.COMMENT,u.START_EXPR,u.START_BLOCK,u.START,u.END_BLOCK,u.OPERATOR,u.EQUALS,u.EOF,u.SEMICOLON,u.COMMA])},R.prototype._read_regexp=function(N,$){if(N==="/"&&this._allow_regexp_or_xml($)){for(var I=this._input.next(),H=!1,k=!1;this._input.hasNext()&&(H||k||this._input.peek()!==N)&&!this._input.testChar(o.newline);)I+=this._input.peek(),H?H=!1:(H=this._input.peek()==="\\",this._input.peek()==="["?k=!0:this._input.peek()==="]"&&(k=!1)),this._input.next();return this._input.peek()===N&&(I+=this._input.next(),I+=this._input.read(o.identifier)),this._create_token(u.STRING,I)}return null},R.prototype._read_xml=function(N,$){if(this._options.e4x&&N==="<"&&this._allow_regexp_or_xml($)){var I="",H=this.__patterns.xml.read_match();if(H){for(var k=H[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),W=k.indexOf("{")===0,G=0;H;){var te=!!H[1],se=H[2],he=!!H[H.length-1]||se.slice(0,8)==="![CDATA[";if(!he&&(se===k||W&&se.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(te?--G:++G),I+=H[0],G<=0)break;H=this.__patterns.xml.read_match()}return H||(I+=this._input.match(/[\s\S]*/g)[0]),I=I.replace(o.allLineBreaks,` +`),this._create_token(u.STRING,I)}}return null};function L(N){for(var $="",I=0,H=new n(N),k=null;H.hasNext();)if(k=H.match(/([\s]|[^\\]|\\\\)+/g),k&&($+=k[0]),H.peek()==="\\"){if(H.next(),H.peek()==="x")k=H.match(/x([0-9A-Fa-f]{2})/g);else if(H.peek()==="u")k=H.match(/u([0-9A-Fa-f]{4})/g);else{$+="\\",H.hasNext()&&($+=H.next());continue}if(!k||(I=parseInt(k[1],16),I>126&&I<=255&&k[0].indexOf("x")===0))return N;if(I>=0&&I<32){$+="\\"+k[0];continue}else I===34||I===39||I===92?$+="\\"+String.fromCharCode(I):$+=String.fromCharCode(I)}return $}return R.prototype._read_string_recursive=function(N,$,I){var H,k;N==="'"?k=this.__patterns.single_quote:N==='"'?k=this.__patterns.double_quote:N==="`"?k=this.__patterns.template_text:N==="}"&&(k=this.__patterns.template_expression);for(var W=k.read(),G="";this._input.hasNext();){if(G=this._input.next(),G===N||!$&&o.newline.test(G)){this._input.back();break}else G==="\\"&&this._input.hasNext()?(H=this._input.peek(),H==="x"||H==="u"?this.has_char_escapes=!0:H==="\r"&&this._input.peek(1)===` +`&&this._input.next(),G+=this._input.next()):I&&(I==="${"&&G==="$"&&this._input.peek()==="{"&&(G+=this._input.next()),I===G&&(N==="`"?G+=this._read_string_recursive("}",$,"`"):G+=this._read_string_recursive("`",$,"${"),this._input.hasNext()&&(G+=this._input.next())));G+=k.read(),W+=G}return W},tokenizer$2.Tokenizer=R,tokenizer$2.TOKEN=u,tokenizer$2.positionable_operators=_.slice(),tokenizer$2.line_starters=b.slice(),tokenizer$2}var hasRequiredBeautifier$2;function requireBeautifier$2(){if(hasRequiredBeautifier$2)return beautifier$2;hasRequiredBeautifier$2=1;var n=requireOutput().Output,e=requireToken().Token,r=requireAcorn(),s=requireOptions$2().Options,o=requireTokenizer$1().Tokenizer,a=requireTokenizer$1().line_starters,l=requireTokenizer$1().positionable_operators,c=requireTokenizer$1().TOKEN;function u(k,W){return W.indexOf(k)!==-1}function f(k){return k.replace(/^\s+/g,"")}function d(k){for(var W={},G=0;GG&&(G=k.line_indent_level));var te={mode:W,parent:k,last_token:k?k.last_token:new e(c.START_BLOCK,""),last_word:k?k.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:G,alignment:0,line_indent_level:k?k.line_indent_level:G,start_line_index:this._output.get_line_number(),ternary_depth:0};return te},I.prototype._reset=function(k){var W=k.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new n(this._options,W),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(v.BlockStatement);var G=new o(k,this._options);return this._tokens=G.tokenize(),k},I.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var k,W=this._reset(this._source_text),G=this._options.eol;this._options.eol==="auto"&&(G=` +`,W&&r.lineBreak.test(W||"")&&(G=W.match(r.lineBreak)[0]));for(var te=this._tokens.next();te;)this.handle_token(te),this._last_last_text=this._flags.last_token.text,this._flags.last_token=te,te=this._tokens.next();return k=this._output.get_code(G),k},I.prototype.handle_token=function(k,W){k.type===c.START_EXPR?this.handle_start_expr(k):k.type===c.END_EXPR?this.handle_end_expr(k):k.type===c.START_BLOCK?this.handle_start_block(k):k.type===c.END_BLOCK?this.handle_end_block(k):k.type===c.WORD?this.handle_word(k):k.type===c.RESERVED?this.handle_word(k):k.type===c.SEMICOLON?this.handle_semicolon(k):k.type===c.STRING?this.handle_string(k):k.type===c.EQUALS?this.handle_equals(k):k.type===c.OPERATOR?this.handle_operator(k):k.type===c.COMMA?this.handle_comma(k):k.type===c.BLOCK_COMMENT?this.handle_block_comment(k,W):k.type===c.COMMENT?this.handle_comment(k,W):k.type===c.DOT?this.handle_dot(k):k.type===c.EOF?this.handle_eof(k):k.type===c.UNKNOWN?this.handle_unknown(k,W):this.handle_unknown(k,W)},I.prototype.handle_whitespace_and_comments=function(k,W){var G=k.newlines,te=this._options.keep_array_indentation&&R(this._flags.mode);if(k.comments_before)for(var se=k.comments_before.next();se;)this.handle_whitespace_and_comments(se,W),this.handle_token(se,W),se=k.comments_before.next();if(te)for(var he=0;he0,W);else if(this._options.max_preserve_newlines&&G>this._options.max_preserve_newlines&&(G=this._options.max_preserve_newlines),this._options.preserve_newlines&&G>1){this.print_newline(!1,W);for(var le=1;le0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},I.prototype.set_mode=function(k){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,k),this._flags=this.create_flags(this._previous_flags,k),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},I.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===v.Statement&&M(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},I.prototype.start_of_object_property=function(){return this._flags.parent.mode===v.ObjectLiteral&&this._flags.mode===v.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||m(this._flags.last_token,["get","set"]))},I.prototype.start_of_statement=function(k){var W=!1;return W=W||m(this._flags.last_token,["var","let","const"])&&k.type===c.WORD,W=W||g(this._flags.last_token,"do"),W=W||!(this._flags.parent.mode===v.ObjectLiteral&&this._flags.mode===v.Statement)&&m(this._flags.last_token,H)&&!k.newlines,W=W||g(this._flags.last_token,"else")&&!(g(k,"if")&&!k.comments_before),W=W||this._flags.last_token.type===c.END_EXPR&&(this._previous_flags.mode===v.ForInitializer||this._previous_flags.mode===v.Conditional),W=W||this._flags.last_token.type===c.WORD&&this._flags.mode===v.BlockStatement&&!this._flags.in_case&&!(k.text==="--"||k.text==="++")&&this._last_last_text!=="function"&&k.type!==c.WORD&&k.type!==c.RESERVED,W=W||this._flags.mode===v.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||m(this._flags.last_token,["get","set"])),W?(this.set_mode(v.Statement),this.indent(),this.handle_whitespace_and_comments(k,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(k,m(k,["do","for","if","while"])),!0):!1},I.prototype.handle_start_expr=function(k){this.start_of_statement(k)||this.handle_whitespace_and_comments(k);var W=v.Expression;if(k.text==="["){if(this._flags.last_token.type===c.WORD||this._flags.last_token.text===")"){m(this._flags.last_token,a)&&(this._output.space_before_token=!0),this.print_token(k),this.set_mode(W),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}W=v.ArrayLiteral,R(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),u(this._flags.last_token.type,[c.START_EXPR,c.END_EXPR,c.WORD,c.OPERATOR,c.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===c.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,W=v.ForInitializer):u(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,W=v.Conditional):u(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&k.whitespace_before===""?this._output.space_before_token=!1:(u(this._flags.last_token.text,a)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===c.EQUALS||this._flags.last_token.type===c.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(k);else if(this._flags.last_token.type===c.WORD){this._output.space_before_token=!1;var G=this._tokens.peek(-3);if(this._options.space_after_named_function&&G){var te=this._tokens.peek(-4);m(G,["async","function"])||G.text==="*"&&m(te,["async","function"])?this._output.space_before_token=!0:this._flags.mode===v.ObjectLiteral&&(G.text==="{"||G.text===","||G.text==="*"&&(te.text==="{"||te.text===","))&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(k);(this._flags.last_token.type===c.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(u(this._last_last_text,["function","yield"])||this._flags.mode===v.ObjectLiteral&&u(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===c.START_BLOCK?this.print_newline():(this._flags.last_token.type===c.END_EXPR||this._flags.last_token.type===c.START_EXPR||this._flags.last_token.type===c.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===c.COMMA)&&this.allow_wrap_or_preserved_newline(k,k.newlines),this.print_token(k),this.set_mode(W),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},I.prototype.handle_end_expr=function(k){for(;this._flags.mode===v.Statement;)this.restore_mode();this.handle_whitespace_and_comments(k),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(k,k.text==="]"&&R(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===c.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(k),this.restore_mode(),M(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===v.Conditional&&(this._previous_flags.mode=v.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},I.prototype.handle_start_block=function(k){this.handle_whitespace_and_comments(k);var W=this._tokens.peek(),G=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===c.END_EXPR?(this.set_mode(v.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(v.BlockStatement):G&&(u(G.text,[":",","])&&u(W.type,[c.STRING,c.WORD,c.RESERVED])||u(W.text,["get","set","..."])&&u(G.type,[c.WORD,c.RESERVED]))?u(this._last_last_text,["class","interface"])?this.set_mode(v.BlockStatement):this.set_mode(v.ObjectLiteral):this._flags.last_token.type===c.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(v.BlockStatement):u(this._flags.last_token.type,[c.EQUALS,c.START_EXPR,c.COMMA,c.OPERATOR])||m(this._flags.last_token,["return","throw","import","default"])?this.set_mode(v.ObjectLiteral):this.set_mode(v.BlockStatement);var te=!W.comments_before&&W.text==="}",se=te&&this._flags.last_word==="function"&&this._flags.last_token.type===c.END_EXPR;if(this._options.brace_preserve_inline){var he=0,le=null;this._flags.inline_frame=!0;do if(he+=1,le=this._tokens.peek(he-1),le.newlines){this._flags.inline_frame=!1;break}while(le.type!==c.EOF&&!(le.type===c.END_BLOCK&&le.opened===k))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&k.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==c.OPERATOR&&(se||this._flags.last_token.type===c.EQUALS||m(this._flags.last_token,_)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(R(this._previous_flags.mode)&&(this._flags.last_token.type===c.START_EXPR||this._flags.last_token.type===c.COMMA)&&((this._flags.last_token.type===c.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===c.COMMA||this._flags.last_token.type===c.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(k),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==c.OPERATOR&&this._flags.last_token.type!==c.START_EXPR&&(this._flags.last_token.type===c.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(k),this.indent(),!te&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},I.prototype.handle_end_block=function(k){for(this.handle_whitespace_and_comments(k);this._flags.mode===v.Statement;)this.restore_mode();var W=this._flags.last_token.type===c.START_BLOCK;this._flags.inline_frame&&!W?this._output.space_before_token=!0:this._options.brace_style==="expand"?W||this.print_newline():W||(R(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(k)},I.prototype.handle_word=function(k){if(k.type===c.RESERVED){if(u(k.text,["set","get"])&&this._flags.mode!==v.ObjectLiteral)k.type=c.WORD;else if(k.text==="import"&&this._tokens.peek().text==="(")k.type=c.WORD;else if(u(k.text,["as","from"])&&!this._flags.import_block)k.type=c.WORD;else if(this._flags.mode===v.ObjectLiteral){var W=this._tokens.peek();W.text===":"&&(k.type=c.WORD)}}if(this.start_of_statement(k)?m(this._flags.last_token,["var","let","const"])&&k.type===c.WORD&&(this._flags.declaration_statement=!0):k.newlines&&!L(this._flags.mode)&&(this._flags.last_token.type!==c.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==c.EQUALS&&(this._options.preserve_newlines||!m(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(k),this.print_newline()):this.handle_whitespace_and_comments(k),this._flags.do_block&&!this._flags.do_while)if(g(k,"while")){this._output.space_before_token=!0,this.print_token(k),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&g(k,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===v.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&m(k,["case","default"])){this.print_newline(),this._flags.last_token.type!==c.END_BLOCK&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(k),this._flags.in_case=!0;return}if((this._flags.last_token.type===c.COMMA||this._flags.last_token.type===c.START_EXPR||this._flags.last_token.type===c.EQUALS||this._flags.last_token.type===c.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(k)),g(k,"function")){(u(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(u(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===c.OPERATOR))&&!this._output.just_added_blankline()&&!k.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===c.RESERVED||this._flags.last_token.type===c.WORD?m(this._flags.last_token,["get","set","new","export"])||m(this._flags.last_token,H)?this._output.space_before_token=!0:g(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===c.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(L(this._flags.mode)||R(this._flags.mode))||this.print_newline(),this.print_token(k),this._flags.last_word=k.text;return}var G="NONE";if(this._flags.last_token.type===c.END_BLOCK?this._previous_flags.inline_frame?G="SPACE":m(k,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&k.newlines?G="NEWLINE":(G="SPACE",this._output.space_before_token=!0):G="NEWLINE":this._flags.last_token.type===c.SEMICOLON&&this._flags.mode===v.BlockStatement?G="NEWLINE":this._flags.last_token.type===c.SEMICOLON&&L(this._flags.mode)?G="SPACE":this._flags.last_token.type===c.STRING?G="NEWLINE":this._flags.last_token.type===c.RESERVED||this._flags.last_token.type===c.WORD||this._flags.last_token.text==="*"&&(u(this._last_last_text,["function","yield"])||this._flags.mode===v.ObjectLiteral&&u(this._last_last_text,["{",","]))?G="SPACE":this._flags.last_token.type===c.START_BLOCK?this._flags.inline_frame?G="SPACE":G="NEWLINE":this._flags.last_token.type===c.END_EXPR&&(this._output.space_before_token=!0,G="NEWLINE"),m(k,a)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?G="SPACE":G="NEWLINE"),m(k,["else","catch","finally"]))if((!(this._flags.last_token.type===c.END_BLOCK&&this._previous_flags.mode===v.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&k.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var te=this._output.current_line;te.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else G==="NEWLINE"?m(this._flags.last_token,_)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&m(k,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==c.END_EXPR?(this._flags.last_token.type!==c.START_EXPR||!m(k,["var","let","const"]))&&this._flags.last_token.text!==":"&&(g(k,"if")&&g(k.previous,"else")?this._output.space_before_token=!0:this.print_newline()):m(k,a)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&R(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():G==="SPACE"&&(this._output.space_before_token=!0);k.previous&&(k.previous.type===c.WORD||k.previous.type===c.RESERVED)&&(this._output.space_before_token=!0),this.print_token(k),this._flags.last_word=k.text,k.type===c.RESERVED&&(k.text==="do"?this._flags.do_block=!0:k.text==="if"?this._flags.if_block=!0:k.text==="import"?this._flags.import_block=!0:this._flags.import_block&&g(k,"from")&&(this._flags.import_block=!1))},I.prototype.handle_semicolon=function(k){this.start_of_statement(k)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(k);for(var W=this._tokens.peek();this._flags.mode===v.Statement&&!(this._flags.if_block&&g(W,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(k)},I.prototype.handle_string=function(k){k.text.startsWith("`")&&k.newlines===0&&k.whitespace_before===""&&(k.previous.text===")"||this._flags.last_token.type===c.WORD)||(this.start_of_statement(k)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(k),this._flags.last_token.type===c.RESERVED||this._flags.last_token.type===c.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===c.COMMA||this._flags.last_token.type===c.START_EXPR||this._flags.last_token.type===c.EQUALS||this._flags.last_token.type===c.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(k):k.text.startsWith("`")&&this._flags.last_token.type===c.END_EXPR&&(k.previous.text==="]"||k.previous.text===")")&&k.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(k)},I.prototype.handle_equals=function(k){this.start_of_statement(k)||this.handle_whitespace_and_comments(k),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(k),this._output.space_before_token=!0},I.prototype.handle_comma=function(k){this.handle_whitespace_and_comments(k,!0),this.print_token(k),this._output.space_before_token=!0,this._flags.declaration_statement?(L(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(k)):this._flags.mode===v.ObjectLiteral||this._flags.mode===v.Statement&&this._flags.parent.mode===v.ObjectLiteral?(this._flags.mode===v.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(k)},I.prototype.handle_operator=function(k){var W=k.text==="*"&&(m(this._flags.last_token,["function","yield"])||u(this._flags.last_token.type,[c.START_BLOCK,c.COMMA,c.END_BLOCK,c.SEMICOLON])),G=u(k.text,["-","+"])&&(u(this._flags.last_token.type,[c.START_BLOCK,c.START_EXPR,c.EQUALS,c.OPERATOR])||u(this._flags.last_token.text,a)||this._flags.last_token.text===",");if(!this.start_of_statement(k)){var te=!W;this.handle_whitespace_and_comments(k,te)}if(m(this._flags.last_token,_)){this._output.space_before_token=!0,this.print_token(k);return}if(k.text==="*"&&this._flags.last_token.type===c.DOT){this.print_token(k);return}if(k.text==="::"){this.print_token(k);return}if(this._flags.last_token.type===c.OPERATOR&&u(this._options.operator_position,b)&&this.allow_wrap_or_preserved_newline(k),k.text===":"&&this._flags.in_case){this.print_token(k),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==c.START_BLOCK?(this.indent(),this.print_newline()):this._output.space_before_token=!0;return}var se=!0,he=!0,le=!1;if(k.text===":"?this._flags.ternary_depth===0?se=!1:(this._flags.ternary_depth-=1,le=!0):k.text==="?"&&(this._flags.ternary_depth+=1),!G&&!W&&this._options.preserve_newlines&&u(k.text,l)){var me=k.text===":",fe=me&&le,J=me&&!le;switch(this._options.operator_position){case A.before_newline:this._output.space_before_token=!J,this.print_token(k),(!me||fe)&&this.allow_wrap_or_preserved_newline(k),this._output.space_before_token=!0;return;case A.after_newline:this._output.space_before_token=!0,!me||fe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(k):this._output.space_before_token=!1,this.print_token(k),this._output.space_before_token=!0;return;case A.preserve_newline:J||this.allow_wrap_or_preserved_newline(k),se=!(this._output.just_added_newline()||J),this._output.space_before_token=se,this.print_token(k),this._output.space_before_token=!0;return}}if(W){this.allow_wrap_or_preserved_newline(k),se=!1;var K=this._tokens.peek();he=K&&u(K.type,[c.WORD,c.RESERVED])}else k.text==="..."?(this.allow_wrap_or_preserved_newline(k),se=this._flags.last_token.type===c.START_BLOCK,he=!1):(u(k.text,["--","++","!","~"])||G)&&((this._flags.last_token.type===c.COMMA||this._flags.last_token.type===c.START_EXPR)&&this.allow_wrap_or_preserved_newline(k),se=!1,he=!1,k.newlines&&(k.text==="--"||k.text==="++")&&this.print_newline(!1,!0),this._flags.last_token.text===";"&&L(this._flags.mode)&&(se=!0),this._flags.last_token.type===c.RESERVED?se=!0:this._flags.last_token.type===c.END_EXPR?se=!(this._flags.last_token.text==="]"&&(k.text==="--"||k.text==="++")):this._flags.last_token.type===c.OPERATOR&&(se=u(k.text,["--","-","++","+"])&&u(this._flags.last_token.text,["--","-","++","+"]),u(k.text,["+","-"])&&u(this._flags.last_token.text,["--","++"])&&(he=!0)),(this._flags.mode===v.BlockStatement&&!this._flags.inline_frame||this._flags.mode===v.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline());this._output.space_before_token=this._output.space_before_token||se,this.print_token(k),this._output.space_before_token=he},I.prototype.handle_block_comment=function(k,W){if(this._output.raw){this._output.add_raw_token(k),k.directives&&k.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(k.directives){this.print_newline(!1,W),this.print_token(k),k.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!r.newline.test(k.text)&&!k.newlines){this._output.space_before_token=!0,this.print_token(k),this._output.space_before_token=!0;return}else this.print_block_commment(k,W)},I.prototype.print_block_commment=function(k,W){var G=V(k.text),te,se=!1,he=!1,le=k.whitespace_before,me=le.length;if(this.print_newline(!1,W),this.print_token_line_indentation(k),this._output.add_token(G[0]),this.print_newline(!1,W),G.length>1){for(G=G.slice(1),se=N(G,"*"),he=$(G,le),se&&(this._flags.alignment=1),te=0;te0&&this._indentLevel--},g.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var m=this._source_text,_=this._options.eol;_==="auto"&&(_=` `,m&&a.test(m||"")&&(_=m.match(a)[0])),m=m.replace(l,` -`);var E=m.match(/^[\t ]*/)[0];this._output=new e(this._options,E),this._input=new r(m),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var A=0,b=!1,v=!1,M=!1,V=!1,R=!1,L=!1,N=this._ch,I=!1,$,H,k;$=this._input.read(u),H=$!=="",k=N,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),N=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var q=this._input.read(f),G=o.get_directives(q);G&&G.ignore==="start"&&(q+=o.readIgnored(this._input)),this.print_string(q),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(d)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(H),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var J=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);J.match(/[ :]$/)&&(J=this.eatString(": ").replace(/\s$/,""),this.print_string(J),this._output.space_before_token=!0),J=J.replace(/\s$/,""),J==="extend"?V=!0:J==="import"&&(R=!0),J in this.NESTED_AT_RULE?(this._nestedLevel+=1,J in this.CONDITIONAL_GROUP_RULE&&(M=!0)):!b&&A===0&&J.indexOf(":")!==-1&&(v=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(H),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")v&&(v=!1,this.outdent()),M?(M=!1,b=this._indentLevel>=this._nestedLevel):b=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&b&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(k==="("?this._output.space_before_token=!1:k!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),k==="{"&&this._output.trim(!0),R=!1,V=!1,v&&(this.outdent(),v=!1),this.print_string(this._ch),b=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var ne=0;ne"||this._ch==="+"||this._ch==="~")&&!v&&A===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&c.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(H),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),c.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var me=k==='"'||k==="'";this.preserveSingleSpace(me||H),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` -`&&I&&this._output.add_new_line()}var fe=this._output.get_code(_);return fe},beautifier$1.Beautifier=g,beautifier$1}var hasRequiredCss;function requireCss(){if(hasRequiredCss)return cssExports;hasRequiredCss=1;var n=requireBeautifier$1().Beautifier,e=requireOptions$1().Options;function r(s,o){var a=new n(s,o);return a.beautify()}return css$2.exports=r,cssExports.defaultOptions=function(){return new e},cssExports}var htmlExports={},html={get exports(){return htmlExports},set exports(n){htmlExports=n}},beautifier={},options={},hasRequiredOptions;function requireOptions(){if(hasRequiredOptions)return options;hasRequiredOptions=1;var n=requireOptions$3().Options;function e(r){n.call(this,r,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}return e.prototype=new n,options.Options=e,options}var tokenizer={},hasRequiredTokenizer;function requireTokenizer(){if(hasRequiredTokenizer)return tokenizer;hasRequiredTokenizer=1;var n=requireTokenizer$2().Tokenizer,e=requireTokenizer$2().TOKEN,r=requireDirectives().Directives,s=requireTemplatablepattern().TemplatablePattern,o=requirePattern().Pattern,a={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:e.START,RAW:e.RAW,EOF:e.EOF},l=new r(/<\!--/,/-->/),c=function(u,f){n.call(this,u,f),this._current_tag_name="";var d=new s(this._input).read_options(this._options),g=new o(this._input);if(this.__patterns={word:d.until(/[\n\r\t <]/),single_quote:d.until_after(/'/),double_quote:d.until_after(/"/),attribute:d.until(/[\n\r\t =>]|\/>/),element_name:d.until(/[\n\r\t >\/]/),handlebars_comment:g.starting_with(/{{!--/).until_after(/--}}/),handlebars:g.starting_with(/{{/).until_after(/}}/),handlebars_open:g.until(/[\n\r\t }]/),handlebars_raw_close:g.until(/}}/),comment:g.starting_with(//),cdata:g.starting_with(//),conditional_comment:g.starting_with(//),processing:g.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var m=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=g.matching(m).until_after(m)}};return c.prototype=new n,c.prototype._is_comment=function(u){return!1},c.prototype._is_opening=function(u){return u.type===a.TAG_OPEN},c.prototype._is_closing=function(u,f){return u.type===a.TAG_CLOSE&&f&&((u.text===">"||u.text==="/>")&&f.text[0]==="<"||u.text==="}}"&&f.text[0]==="{"&&f.text[1]==="{")},c.prototype._reset=function(){this._current_tag_name=""},c.prototype._get_next_token=function(u,f){var d=null;this._readWhitespace();var g=this._input.peek();return g===null?this._create_token(a.EOF,""):(d=d||this._read_open_handlebars(g,f),d=d||this._read_attribute(g,u,f),d=d||this._read_close(g,f),d=d||this._read_raw_content(g,u,f),d=d||this._read_content_word(g),d=d||this._read_comment_or_cdata(g),d=d||this._read_processing(g),d=d||this._read_open(g,f),d=d||this._create_token(a.UNKNOWN,this._input.next()),d)},c.prototype._read_comment_or_cdata=function(u){var f=null,d=null,g=null;if(u==="<"){var m=this._input.peek(1);m==="!"&&(d=this.__patterns.comment.read(),d?(g=l.get_directives(d),g&&g.ignore==="start"&&(d+=l.readIgnored(this._input))):d=this.__patterns.cdata.read()),d&&(f=this._create_token(a.COMMENT,d),f.directives=g)}return f},c.prototype._read_processing=function(u){var f=null,d=null,g=null;if(u==="<"){var m=this._input.peek(1);(m==="!"||m==="?")&&(d=this.__patterns.conditional_comment.read(),d=d||this.__patterns.processing.read()),d&&(f=this._create_token(a.COMMENT,d),f.directives=g)}return f},c.prototype._read_open=function(u,f){var d=null,g=null;return f||u==="<"&&(d=this._input.next(),this._input.peek()==="/"&&(d+=this._input.next()),d+=this.__patterns.element_name.read(),g=this._create_token(a.TAG_OPEN,d)),g},c.prototype._read_open_handlebars=function(u,f){var d=null,g=null;return f||this._options.indent_handlebars&&u==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(d=this.__patterns.handlebars_comment.read(),d=d||this.__patterns.handlebars.read(),g=this._create_token(a.COMMENT,d)):(d=this.__patterns.handlebars_open.read(),g=this._create_token(a.TAG_OPEN,d))),g},c.prototype._read_close=function(u,f){var d=null,g=null;return f&&(f.text[0]==="<"&&(u===">"||u==="/"&&this._input.peek(1)===">")?(d=this._input.next(),u==="/"&&(d+=this._input.next()),g=this._create_token(a.TAG_CLOSE,d)):f.text[0]==="{"&&u==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),g=this._create_token(a.TAG_CLOSE,"}}"))),g},c.prototype._read_attribute=function(u,f,d){var g=null,m="";if(d&&d.text[0]==="<")if(u==="=")g=this._create_token(a.EQUALS,this._input.next());else if(u==='"'||u==="'"){var _=this._input.next();u==='"'?_+=this.__patterns.double_quote.read():_+=this.__patterns.single_quote.read(),g=this._create_token(a.VALUE,_)}else m=this.__patterns.attribute.read(),m&&(f.type===a.EQUALS?g=this._create_token(a.VALUE,m):g=this._create_token(a.ATTRIBUTE,m));return g},c.prototype._is_content_unformatted=function(u){return this._options.void_elements.indexOf(u)===-1&&(this._options.content_unformatted.indexOf(u)!==-1||this._options.unformatted.indexOf(u)!==-1)},c.prototype._read_raw_content=function(u,f,d){var g="";if(d&&d.text[0]==="{")g=this.__patterns.handlebars_raw_close.read();else if(f.type===a.TAG_CLOSE&&f.opened.text[0]==="<"&&f.text[0]!=="/"){var m=f.opened.text.substr(1).toLowerCase();if(m==="script"||m==="style"){var _=this._read_comment_or_cdata(u);if(_)return _.type=a.TEXT,_;g=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(m)&&(g=this._input.readUntil(new RegExp("","ig")))}return g?this._create_token(a.TEXT,g):null},c.prototype._read_content_word=function(u){var f="";if(this._options.unformatted_content_delimiter&&u===this._options.unformatted_content_delimiter[0]&&(f=this.__patterns.unformatted_content_delimiter.read()),f||(f=this.__patterns.word.read()),f)return this._create_token(a.TEXT,f)},tokenizer.Tokenizer=c,tokenizer.TOKEN=a,tokenizer}var hasRequiredBeautifier;function requireBeautifier(){if(hasRequiredBeautifier)return beautifier;hasRequiredBeautifier=1;var n=requireOptions().Options,e=requireOutput().Output,r=requireTokenizer().Tokenizer,s=requireTokenizer().TOKEN,o=/\r\n|[\r\n]/,a=/\r\n|[\r\n]/g,l=function(b,v){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=b.max_preserve_newlines,this.preserve_newlines=b.preserve_newlines,this._output=new e(b,v)};l.prototype.current_line_has_match=function(b){return this._output.current_line.has_match(b)},l.prototype.set_space_before_token=function(b,v){this._output.space_before_token=b,this._output.non_breaking_space=v},l.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},l.prototype.add_raw_token=function(b){this._output.add_raw_token(b)},l.prototype.print_preserved_newlines=function(b){var v=0;b.type!==s.TEXT&&b.previous.type!==s.TEXT&&(v=b.newlines?1:0),this.preserve_newlines&&(v=b.newlines0);return v!==0},l.prototype.traverse_whitespace=function(b){return b.whitespace_before||b.newlines?(this.print_preserved_newlines(b)||(this._output.space_before_token=!0),!0):!1},l.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},l.prototype.print_newline=function(b){this._output.add_new_line(b)},l.prototype.print_token=function(b){b.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(b.text))},l.prototype.indent=function(){this.indent_level++},l.prototype.get_full_indent=function(b){return b=this.indent_level+(b||0),b<1?"":this._output.get_indent_string(b)};var c=function(b){for(var v=null,M=b.next;M.type!==s.EOF&&b.closed!==M;){if(M.type===s.ATTRIBUTE&&M.text==="type"){M.next&&M.next.type===s.EQUALS&&M.next.next&&M.next.next.type===s.VALUE&&(v=M.next.next.text);break}M=M.next}return v},u=function(b,v){var M=null,V=null;return v.closed?(b==="script"?M="text/javascript":b==="style"&&(M="text/css"),M=c(v)||M,M.search("text/css")>-1?V="css":M.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?V="javascript":M.search(/(text|application|dojo)\/(x-)?(html)/)>-1?V="html":M.search(/test\/null/)>-1&&(V="null"),V):null};function f(b,v){return v.indexOf(b)!==-1}function d(b,v,M){this.parent=b||null,this.tag=v?v.tag_name:"",this.indent_level=M||0,this.parser_token=v||null}function g(b){this._printer=b,this._current_frame=null}g.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},g.prototype.record_tag=function(b){var v=new d(this._current_frame,b,this._printer.indent_level);this._current_frame=v},g.prototype._try_pop_frame=function(b){var v=null;return b&&(v=b.parser_token,this._printer.indent_level=b.indent_level,this._current_frame=b.parent),v},g.prototype._get_frame=function(b,v){for(var M=this._current_frame;M&&b.indexOf(M.tag)===-1;){if(v&&v.indexOf(M.tag)!==-1){M=null;break}M=M.parent}return M},g.prototype.try_pop=function(b,v){var M=this._get_frame([b],v);return this._try_pop_frame(M)},g.prototype.indent_to_tag=function(b){var v=this._get_frame(b);v&&(this._printer.indent_level=v.indent_level)};function m(b,v,M,V){this._source_text=b||"",v=v||{},this._js_beautify=M,this._css_beautify=V,this._tag_stack=null;var R=new n(v,"html");this._options=R,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}m.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var b=this._source_text,v=this._options.eol;this._options.eol==="auto"&&(v=` +`);var E=m.match(/^[\t ]*/)[0];this._output=new e(this._options,E),this._input=new r(m),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var A=0,b=!1,v=!1,M=!1,V=!1,R=!1,L=this._ch,N,$,I;N=this._input.read(u),$=N!=="",I=L,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),L=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var H=this._input.read(f),k=o.get_directives(H);k&&k.ignore==="start"&&(H+=o.readIgnored(this._input)),this.print_string(H),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(d)),this.eatWhitespace(!0);else if(this._ch==="@")if(this.preserveSingleSpace($),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var W=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);W.match(/[ :]$/)&&(W=this.eatString(": ").replace(/\s$/,""),this.print_string(W),this._output.space_before_token=!0),W=W.replace(/\s$/,""),W==="extend"?V=!0:W==="import"&&(R=!0),W in this.NESTED_AT_RULE?(this._nestedLevel+=1,W in this.CONDITIONAL_GROUP_RULE&&(M=!0)):!b&&A===0&&W.indexOf(":")!==-1&&(v=!0,this.indent())}else this._ch==="#"&&this._input.peek()==="{"?(this.preserveSingleSpace($),this.print_string(this._ch+this.eatString("}"))):this._ch==="{"?(v&&(v=!1,this.outdent()),M?(M=!1,b=this._indentLevel>=this._nestedLevel):b=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&b&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line()):this._ch==="}"?(this.outdent(),this._output.add_new_line(),I==="{"&&this._output.trim(!0),R=!1,V=!1,v&&(this.outdent(),v=!1),this.print_string(this._ch),b=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0)):this._ch===":"?(b||M)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!V&&A===0?(this.print_string(":"),v||(v=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):this._ch==='"'||this._ch==="'"?(this.preserveSingleSpace($),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)):this._ch===";"?A===0?(v&&(this.outdent(),v=!1),V=!1,R=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0):this._ch==="("?this._input.lookBack("url")?(this.print_string(this._ch),this.eatWhitespace(),A++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),A&&(A--,this.outdent()))):(this.preserveSingleSpace($),this.print_string(this._ch),this.eatWhitespace(),A++,this.indent()):this._ch===")"?(A&&(A--,this.outdent()),this.print_string(this._ch)):this._ch===","?(this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&!v&&A===0&&!R&&!V?this._output.add_new_line():this._output.space_before_token=!0):(this._ch===">"||this._ch==="+"||this._ch==="~")&&!v&&A===0?this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&c.test(this._ch)&&(this._ch="")):this._ch==="]"?this.print_string(this._ch):this._ch==="["?(this.preserveSingleSpace($),this.print_string(this._ch)):this._ch==="="?(this.eatWhitespace(),this.print_string("="),c.test(this._ch)&&(this._ch="")):this._ch==="!"&&!this._input.lookBack("\\")?(this.print_string(" "),this.print_string(this._ch)):(this.preserveSingleSpace($),this.print_string(this._ch));var G=this._output.get_code(_);return G},beautifier$1.Beautifier=g,beautifier$1}var hasRequiredCss;function requireCss(){if(hasRequiredCss)return cssExports;hasRequiredCss=1;var n=requireBeautifier$1().Beautifier,e=requireOptions$1().Options;function r(s,o){var a=new n(s,o);return a.beautify()}return css$2.exports=r,cssExports.defaultOptions=function(){return new e},cssExports}var htmlExports={},html={get exports(){return htmlExports},set exports(n){htmlExports=n}},beautifier={},options={},hasRequiredOptions;function requireOptions(){if(hasRequiredOptions)return options;hasRequiredOptions=1;var n=requireOptions$3().Options;function e(r){n.call(this,r,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}return e.prototype=new n,options.Options=e,options}var tokenizer={},hasRequiredTokenizer;function requireTokenizer(){if(hasRequiredTokenizer)return tokenizer;hasRequiredTokenizer=1;var n=requireTokenizer$2().Tokenizer,e=requireTokenizer$2().TOKEN,r=requireDirectives().Directives,s=requireTemplatablepattern().TemplatablePattern,o=requirePattern().Pattern,a={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:e.START,RAW:e.RAW,EOF:e.EOF},l=new r(/<\!--/,/-->/),c=function(u,f){n.call(this,u,f),this._current_tag_name="";var d=new s(this._input).read_options(this._options),g=new o(this._input);if(this.__patterns={word:d.until(/[\n\r\t <]/),single_quote:d.until_after(/'/),double_quote:d.until_after(/"/),attribute:d.until(/[\n\r\t =>]|\/>/),element_name:d.until(/[\n\r\t >\/]/),handlebars_comment:g.starting_with(/{{!--/).until_after(/--}}/),handlebars:g.starting_with(/{{/).until_after(/}}/),handlebars_open:g.until(/[\n\r\t }]/),handlebars_raw_close:g.until(/}}/),comment:g.starting_with(//),cdata:g.starting_with(//),conditional_comment:g.starting_with(//),processing:g.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var m=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=g.matching(m).until_after(m)}};return c.prototype=new n,c.prototype._is_comment=function(u){return!1},c.prototype._is_opening=function(u){return u.type===a.TAG_OPEN},c.prototype._is_closing=function(u,f){return u.type===a.TAG_CLOSE&&f&&((u.text===">"||u.text==="/>")&&f.text[0]==="<"||u.text==="}}"&&f.text[0]==="{"&&f.text[1]==="{")},c.prototype._reset=function(){this._current_tag_name=""},c.prototype._get_next_token=function(u,f){var d=null;this._readWhitespace();var g=this._input.peek();return g===null?this._create_token(a.EOF,""):(d=d||this._read_open_handlebars(g,f),d=d||this._read_attribute(g,u,f),d=d||this._read_close(g,f),d=d||this._read_raw_content(g,u,f),d=d||this._read_content_word(g),d=d||this._read_comment_or_cdata(g),d=d||this._read_processing(g),d=d||this._read_open(g,f),d=d||this._create_token(a.UNKNOWN,this._input.next()),d)},c.prototype._read_comment_or_cdata=function(u){var f=null,d=null,g=null;if(u==="<"){var m=this._input.peek(1);m==="!"&&(d=this.__patterns.comment.read(),d?(g=l.get_directives(d),g&&g.ignore==="start"&&(d+=l.readIgnored(this._input))):d=this.__patterns.cdata.read()),d&&(f=this._create_token(a.COMMENT,d),f.directives=g)}return f},c.prototype._read_processing=function(u){var f=null,d=null,g=null;if(u==="<"){var m=this._input.peek(1);(m==="!"||m==="?")&&(d=this.__patterns.conditional_comment.read(),d=d||this.__patterns.processing.read()),d&&(f=this._create_token(a.COMMENT,d),f.directives=g)}return f},c.prototype._read_open=function(u,f){var d=null,g=null;return f||u==="<"&&(d=this._input.next(),this._input.peek()==="/"&&(d+=this._input.next()),d+=this.__patterns.element_name.read(),g=this._create_token(a.TAG_OPEN,d)),g},c.prototype._read_open_handlebars=function(u,f){var d=null,g=null;return f||this._options.indent_handlebars&&u==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(d=this.__patterns.handlebars_comment.read(),d=d||this.__patterns.handlebars.read(),g=this._create_token(a.COMMENT,d)):(d=this.__patterns.handlebars_open.read(),g=this._create_token(a.TAG_OPEN,d))),g},c.prototype._read_close=function(u,f){var d=null,g=null;return f&&(f.text[0]==="<"&&(u===">"||u==="/"&&this._input.peek(1)===">")?(d=this._input.next(),u==="/"&&(d+=this._input.next()),g=this._create_token(a.TAG_CLOSE,d)):f.text[0]==="{"&&u==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),g=this._create_token(a.TAG_CLOSE,"}}"))),g},c.prototype._read_attribute=function(u,f,d){var g=null,m="";if(d&&d.text[0]==="<")if(u==="=")g=this._create_token(a.EQUALS,this._input.next());else if(u==='"'||u==="'"){var _=this._input.next();u==='"'?_+=this.__patterns.double_quote.read():_+=this.__patterns.single_quote.read(),g=this._create_token(a.VALUE,_)}else m=this.__patterns.attribute.read(),m&&(f.type===a.EQUALS?g=this._create_token(a.VALUE,m):g=this._create_token(a.ATTRIBUTE,m));return g},c.prototype._is_content_unformatted=function(u){return this._options.void_elements.indexOf(u)===-1&&(this._options.content_unformatted.indexOf(u)!==-1||this._options.unformatted.indexOf(u)!==-1)},c.prototype._read_raw_content=function(u,f,d){var g="";if(d&&d.text[0]==="{")g=this.__patterns.handlebars_raw_close.read();else if(f.type===a.TAG_CLOSE&&f.opened.text[0]==="<"&&f.text[0]!=="/"){var m=f.opened.text.substr(1).toLowerCase();if(m==="script"||m==="style"){var _=this._read_comment_or_cdata(u);if(_)return _.type=a.TEXT,_;g=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(m)&&(g=this._input.readUntil(new RegExp("","ig")))}return g?this._create_token(a.TEXT,g):null},c.prototype._read_content_word=function(u){var f="";if(this._options.unformatted_content_delimiter&&u===this._options.unformatted_content_delimiter[0]&&(f=this.__patterns.unformatted_content_delimiter.read()),f||(f=this.__patterns.word.read()),f)return this._create_token(a.TEXT,f)},tokenizer.Tokenizer=c,tokenizer.TOKEN=a,tokenizer}var hasRequiredBeautifier;function requireBeautifier(){if(hasRequiredBeautifier)return beautifier;hasRequiredBeautifier=1;var n=requireOptions().Options,e=requireOutput().Output,r=requireTokenizer().Tokenizer,s=requireTokenizer().TOKEN,o=/\r\n|[\r\n]/,a=/\r\n|[\r\n]/g,l=function(b,v){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=b.max_preserve_newlines,this.preserve_newlines=b.preserve_newlines,this._output=new e(b,v)};l.prototype.current_line_has_match=function(b){return this._output.current_line.has_match(b)},l.prototype.set_space_before_token=function(b,v){this._output.space_before_token=b,this._output.non_breaking_space=v},l.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},l.prototype.add_raw_token=function(b){this._output.add_raw_token(b)},l.prototype.print_preserved_newlines=function(b){var v=0;b.type!==s.TEXT&&b.previous.type!==s.TEXT&&(v=b.newlines?1:0),this.preserve_newlines&&(v=b.newlines0);return v!==0},l.prototype.traverse_whitespace=function(b){return b.whitespace_before||b.newlines?(this.print_preserved_newlines(b)||(this._output.space_before_token=!0),!0):!1},l.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},l.prototype.print_newline=function(b){this._output.add_new_line(b)},l.prototype.print_token=function(b){b.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(b.text))},l.prototype.indent=function(){this.indent_level++},l.prototype.get_full_indent=function(b){return b=this.indent_level+(b||0),b<1?"":this._output.get_indent_string(b)};var c=function(b){for(var v=null,M=b.next;M.type!==s.EOF&&b.closed!==M;){if(M.type===s.ATTRIBUTE&&M.text==="type"){M.next&&M.next.type===s.EQUALS&&M.next.next&&M.next.next.type===s.VALUE&&(v=M.next.next.text);break}M=M.next}return v},u=function(b,v){var M=null,V=null;return v.closed?(b==="script"?M="text/javascript":b==="style"&&(M="text/css"),M=c(v)||M,M.search("text/css")>-1?V="css":M.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?V="javascript":M.search(/(text|application|dojo)\/(x-)?(html)/)>-1?V="html":M.search(/test\/null/)>-1&&(V="null"),V):null};function f(b,v){return v.indexOf(b)!==-1}function d(b,v,M){this.parent=b||null,this.tag=v?v.tag_name:"",this.indent_level=M||0,this.parser_token=v||null}function g(b){this._printer=b,this._current_frame=null}g.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},g.prototype.record_tag=function(b){var v=new d(this._current_frame,b,this._printer.indent_level);this._current_frame=v},g.prototype._try_pop_frame=function(b){var v=null;return b&&(v=b.parser_token,this._printer.indent_level=b.indent_level,this._current_frame=b.parent),v},g.prototype._get_frame=function(b,v){for(var M=this._current_frame;M&&b.indexOf(M.tag)===-1;){if(v&&v.indexOf(M.tag)!==-1){M=null;break}M=M.parent}return M},g.prototype.try_pop=function(b,v){var M=this._get_frame([b],v);return this._try_pop_frame(M)},g.prototype.indent_to_tag=function(b){var v=this._get_frame(b);v&&(this._printer.indent_level=v.indent_level)};function m(b,v,M,V){this._source_text=b||"",v=v||{},this._js_beautify=M,this._css_beautify=V,this._tag_stack=null;var R=new n(v,"html");this._options=R,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}m.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var b=this._source_text,v=this._options.eol;this._options.eol==="auto"&&(v=` `,b&&o.test(b)&&(v=b.match(o)[0])),b=b.replace(a,` -`);var M=b.match(/^[\t ]*/)[0],V={text:"",type:""},R=new _,L=new l(this._options,M),N=new r(b,this._options).tokenize();this._tag_stack=new g(L);for(var I=null,$=N.next();$.type!==s.EOF;)$.type===s.TAG_OPEN||$.type===s.COMMENT?(I=this._handle_tag_open(L,$,R,V),R=I):$.type===s.ATTRIBUTE||$.type===s.EQUALS||$.type===s.VALUE||$.type===s.TEXT&&!R.tag_complete?I=this._handle_inside_tag(L,$,R,N):$.type===s.TAG_CLOSE?I=this._handle_tag_close(L,$,R):$.type===s.TEXT?I=this._handle_text(L,$,R):L.add_raw_token($),V=I,$=N.next();var H=L._output.get_code(v);return H},m.prototype._handle_tag_close=function(b,v,M){var V={text:v.text,type:v.type};return b.alignment_size=0,M.tag_complete=!0,b.set_space_before_token(v.newlines||v.whitespace_before!=="",!0),M.is_unformatted?b.add_raw_token(v):(M.tag_start_char==="<"&&(b.set_space_before_token(v.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&M.has_wrapped_attrs&&b.print_newline(!1)),b.print_token(v)),M.indent_content&&!(M.is_unformatted||M.is_content_unformatted)&&(b.indent(),M.indent_content=!1),!M.is_inline_element&&!(M.is_unformatted||M.is_content_unformatted)&&b.set_wrap_point(),V},m.prototype._handle_inside_tag=function(b,v,M,V){var R=M.has_wrapped_attrs,L={text:v.text,type:v.type};if(b.set_space_before_token(v.newlines||v.whitespace_before!=="",!0),M.is_unformatted)b.add_raw_token(v);else if(M.tag_start_char==="{"&&v.type===s.TEXT)b.print_preserved_newlines(v)?(v.newlines=0,b.add_raw_token(v)):b.print_token(v);else{if(v.type===s.ATTRIBUTE?(b.set_space_before_token(!0),M.attr_count+=1):(v.type===s.EQUALS||v.type===s.VALUE&&v.previous.type===s.EQUALS)&&b.set_space_before_token(!1),v.type===s.ATTRIBUTE&&M.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(b.traverse_whitespace(v),R=R||v.newlines!==0),this._is_wrap_attributes_force)){var N=M.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&M.attr_count===1){var I=!0,$=0,H;do{if(H=V.peek($),H.type===s.ATTRIBUTE){I=!1;break}$+=1}while($<4&&H.type!==s.EOF&&H.type!==s.TAG_CLOSE);N=!I}N&&(b.print_newline(!1),R=!0)}b.print_token(v),R=R||b.previous_token_wrapped(),M.has_wrapped_attrs=R}return L},m.prototype._handle_text=function(b,v,M){var V={text:v.text,type:"TK_CONTENT"};return M.custom_beautifier_name?this._print_custom_beatifier_text(b,v,M):M.is_unformatted||M.is_content_unformatted?b.add_raw_token(v):(b.traverse_whitespace(v),b.print_token(v)),V},m.prototype._print_custom_beatifier_text=function(b,v,M){var V=this;if(v.text!==""){var R=v.text,L,N=1,I="",$="";M.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?L=this._js_beautify:M.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?L=this._css_beautify:M.custom_beautifier_name==="html"&&(L=function(ne,ce){var le=new m(ne,ce,V._js_beautify,V._css_beautify);return le.beautify()}),this._options.indent_scripts==="keep"?N=0:this._options.indent_scripts==="separate"&&(N=-b.indent_level);var H=b.get_full_indent(N);if(R=R.replace(/\n[ \t]*$/,""),M.custom_beautifier_name!=="html"&&R[0]==="<"&&R.match(/^(|]]>)$/.exec(R);if(!k){b.add_raw_token(v);return}I=H+k[1]+` -`,R=k[4],k[5]&&($=H+k[5]),R=R.replace(/\n[ \t]*$/,""),(k[2]||k[3].indexOf(` -`)!==-1)&&(k=k[3].match(/[ \t]+$/),k&&(v.whitespace_before=k[0]))}if(R)if(L){var q=function(){this.eol=` -`};q.prototype=this._options.raw_options;var G=new q;R=L(H+R,G)}else{var J=v.whitespace_before;J&&(R=R.replace(new RegExp(` -(`+J+")?","g"),` +`);var M=b.match(/^[\t ]*/)[0],V={text:"",type:""},R=new _,L=new l(this._options,M),N=new r(b,this._options).tokenize();this._tag_stack=new g(L);for(var $=null,I=N.next();I.type!==s.EOF;)I.type===s.TAG_OPEN||I.type===s.COMMENT?($=this._handle_tag_open(L,I,R,V),R=$):I.type===s.ATTRIBUTE||I.type===s.EQUALS||I.type===s.VALUE||I.type===s.TEXT&&!R.tag_complete?$=this._handle_inside_tag(L,I,R,N):I.type===s.TAG_CLOSE?$=this._handle_tag_close(L,I,R):I.type===s.TEXT?$=this._handle_text(L,I,R):L.add_raw_token(I),V=$,I=N.next();var H=L._output.get_code(v);return H},m.prototype._handle_tag_close=function(b,v,M){var V={text:v.text,type:v.type};return b.alignment_size=0,M.tag_complete=!0,b.set_space_before_token(v.newlines||v.whitespace_before!=="",!0),M.is_unformatted?b.add_raw_token(v):(M.tag_start_char==="<"&&(b.set_space_before_token(v.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&M.has_wrapped_attrs&&b.print_newline(!1)),b.print_token(v)),M.indent_content&&!(M.is_unformatted||M.is_content_unformatted)&&(b.indent(),M.indent_content=!1),!M.is_inline_element&&!(M.is_unformatted||M.is_content_unformatted)&&b.set_wrap_point(),V},m.prototype._handle_inside_tag=function(b,v,M,V){var R=M.has_wrapped_attrs,L={text:v.text,type:v.type};if(b.set_space_before_token(v.newlines||v.whitespace_before!=="",!0),M.is_unformatted)b.add_raw_token(v);else if(M.tag_start_char==="{"&&v.type===s.TEXT)b.print_preserved_newlines(v)?(v.newlines=0,b.add_raw_token(v)):b.print_token(v);else{if(v.type===s.ATTRIBUTE?(b.set_space_before_token(!0),M.attr_count+=1):(v.type===s.EQUALS||v.type===s.VALUE&&v.previous.type===s.EQUALS)&&b.set_space_before_token(!1),v.type===s.ATTRIBUTE&&M.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(b.traverse_whitespace(v),R=R||v.newlines!==0),this._is_wrap_attributes_force)){var N=M.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&M.attr_count===1){var $=!0,I=0,H;do{if(H=V.peek(I),H.type===s.ATTRIBUTE){$=!1;break}I+=1}while(I<4&&H.type!==s.EOF&&H.type!==s.TAG_CLOSE);N=!$}N&&(b.print_newline(!1),R=!0)}b.print_token(v),R=R||b.previous_token_wrapped(),M.has_wrapped_attrs=R}return L},m.prototype._handle_text=function(b,v,M){var V={text:v.text,type:"TK_CONTENT"};return M.custom_beautifier_name?this._print_custom_beatifier_text(b,v,M):M.is_unformatted||M.is_content_unformatted?b.add_raw_token(v):(b.traverse_whitespace(v),b.print_token(v)),V},m.prototype._print_custom_beatifier_text=function(b,v,M){var V=this;if(v.text!==""){var R=v.text,L,N=1,$="",I="";M.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?L=this._js_beautify:M.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?L=this._css_beautify:M.custom_beautifier_name==="html"&&(L=function(se,he){var le=new m(se,he,V._js_beautify,V._css_beautify);return le.beautify()}),this._options.indent_scripts==="keep"?N=0:this._options.indent_scripts==="separate"&&(N=-b.indent_level);var H=b.get_full_indent(N);if(R=R.replace(/\n[ \t]*$/,""),M.custom_beautifier_name!=="html"&&R[0]==="<"&&R.match(/^(|]]>)$/.exec(R);if(!k){b.add_raw_token(v);return}$=H+k[1]+` +`,R=k[4],k[5]&&(I=H+k[5]),R=R.replace(/\n[ \t]*$/,""),(k[2]||k[3].indexOf(` +`)!==-1)&&(k=k[3].match(/[ \t]+$/),k&&(v.whitespace_before=k[0]))}if(R)if(L){var W=function(){this.eol=` +`};W.prototype=this._options.raw_options;var G=new W;R=L(H+R,G)}else{var te=v.whitespace_before;te&&(R=R.replace(new RegExp(` +(`+te+")?","g"),` `)),R=H+R.replace(/\n/g,` -`+H)}I&&(R?R=I+R+` -`+$:R=I+$),b.print_newline(!1),R&&(v.text=R,v.whitespace_before="",v.newlines=0,b.add_raw_token(v),b.print_newline(!0))}},m.prototype._handle_tag_open=function(b,v,M,V){var R=this._get_tag_open_token(v);return(M.is_unformatted||M.is_content_unformatted)&&!M.is_empty_element&&v.type===s.TAG_OPEN&&v.text.indexOf("]*)/),this.tag_check=M?M[1]:""):(M=v.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=M?M[1]:"",(v.text.startsWith("{{#>")||v.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&v.next!==null?this.tag_check=v.next.text.split(" ")[0]:this.tag_check=v.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),v.type===s.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||v.closed&&v.closed.text==="/>";var V=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(V=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(V)))}};m.prototype._get_tag_open_token=function(b){var v=new _(this._tag_stack.get_parser_token(),b);return v.alignment_size=this._options.wrap_attributes_indent_size,v.is_end_tag=v.is_end_tag||f(v.tag_check,this._options.void_elements),v.is_empty_element=v.tag_complete||v.is_start_tag&&v.is_end_tag,v.is_unformatted=!v.tag_complete&&f(v.tag_check,this._options.unformatted),v.is_content_unformatted=!v.is_empty_element&&f(v.tag_check,this._options.content_unformatted),v.is_inline_element=f(v.tag_name,this._options.inline)||v.tag_start_char==="{",v},m.prototype._set_tag_position=function(b,v,M,V,R){if(M.is_empty_element||(M.is_end_tag?M.start_tag_token=this._tag_stack.try_pop(M.tag_name):(this._do_optional_end_element(M)&&(M.is_inline_element||b.print_newline(!1)),this._tag_stack.record_tag(M),(M.tag_name==="script"||M.tag_name==="style")&&!(M.is_unformatted||M.is_content_unformatted)&&(M.custom_beautifier_name=u(M.tag_check,v)))),f(M.tag_check,this._options.extra_liners)&&(b.print_newline(!1),b._output.just_added_blankline()||b.print_newline(!0)),M.is_empty_element){if(M.tag_start_char==="{"&&M.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),M.indent_content=!0;var L=b.current_line_has_match(/{{#if/);L||b.print_newline(!1)}M.tag_name==="!--"&&R.type===s.TAG_CLOSE&&V.is_end_tag&&M.text.indexOf(` +`+H)}$&&(R?R=$+R+` +`+I:R=$+I),b.print_newline(!1),R&&(v.text=R,v.whitespace_before="",v.newlines=0,b.add_raw_token(v),b.print_newline(!0))}},m.prototype._handle_tag_open=function(b,v,M,V){var R=this._get_tag_open_token(v);return(M.is_unformatted||M.is_content_unformatted)&&!M.is_empty_element&&v.type===s.TAG_OPEN&&v.text.indexOf("]*)/),this.tag_check=M?M[1]:""):(M=v.text.match(/^{{(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=M?M[1]:"",v.text==="{{#>"&&this.tag_check===">"&&v.next!==null&&(this.tag_check=v.next.text)),this.tag_check=this.tag_check.toLowerCase(),v.type===s.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||v.closed&&v.closed.text==="/>",this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(2)))}};m.prototype._get_tag_open_token=function(b){var v=new _(this._tag_stack.get_parser_token(),b);return v.alignment_size=this._options.wrap_attributes_indent_size,v.is_end_tag=v.is_end_tag||f(v.tag_check,this._options.void_elements),v.is_empty_element=v.tag_complete||v.is_start_tag&&v.is_end_tag,v.is_unformatted=!v.tag_complete&&f(v.tag_check,this._options.unformatted),v.is_content_unformatted=!v.is_empty_element&&f(v.tag_check,this._options.content_unformatted),v.is_inline_element=f(v.tag_name,this._options.inline)||v.tag_start_char==="{",v},m.prototype._set_tag_position=function(b,v,M,V,R){if(M.is_empty_element||(M.is_end_tag?M.start_tag_token=this._tag_stack.try_pop(M.tag_name):(this._do_optional_end_element(M)&&(M.is_inline_element||b.print_newline(!1)),this._tag_stack.record_tag(M),(M.tag_name==="script"||M.tag_name==="style")&&!(M.is_unformatted||M.is_content_unformatted)&&(M.custom_beautifier_name=u(M.tag_check,v)))),f(M.tag_check,this._options.extra_liners)&&(b.print_newline(!1),b._output.just_added_blankline()||b.print_newline(!0)),M.is_empty_element){if(M.tag_start_char==="{"&&M.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),M.indent_content=!0;var L=b.current_line_has_match(/{{#if/);L||b.print_newline(!1)}M.tag_name==="!--"&&R.type===s.TAG_CLOSE&&V.is_end_tag&&M.text.indexOf(` `)===-1||(M.is_inline_element||M.is_unformatted||b.print_newline(!1),this._calcluate_parent_multiline(b,M))}else if(M.is_end_tag){var N=!1;N=M.start_tag_token&&M.start_tag_token.multiline_content,N=N||!M.is_inline_element&&!(V.is_inline_element||V.is_unformatted)&&!(R.type===s.TAG_CLOSE&&M.start_tag_token===V)&&R.type!=="TK_CONTENT",(M.is_content_unformatted||M.is_unformatted)&&(N=!1),N&&b.print_newline(!1)}else M.indent_content=!M.custom_beautifier_name,M.tag_start_char==="<"&&(M.tag_name==="html"?M.indent_content=this._options.indent_inner_html:M.tag_name==="head"?M.indent_content=this._options.indent_head_inner_html:M.tag_name==="body"&&(M.indent_content=this._options.indent_body_inner_html)),!(M.is_inline_element||M.is_unformatted)&&(R.type!=="TK_CONTENT"||M.is_content_unformatted)&&b.print_newline(!1),this._calcluate_parent_multiline(b,M)},m.prototype._calcluate_parent_multiline=function(b,v){v.parent&&b._output.just_added_newline()&&!((v.is_inline_element||v.is_unformatted)&&v.parent.is_inline_element)&&(v.parent.multiline_content=!0)};var E=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],A=["a","audio","del","ins","map","noscript","video"];return m.prototype._do_optional_end_element=function(b){var v=null;if(!(b.is_empty_element||!b.is_start_tag||!b.parent)){if(b.tag_name==="body")v=v||this._tag_stack.try_pop("head");else if(b.tag_name==="li")v=v||this._tag_stack.try_pop("li",["ol","ul"]);else if(b.tag_name==="dd"||b.tag_name==="dt")v=v||this._tag_stack.try_pop("dt",["dl"]),v=v||this._tag_stack.try_pop("dd",["dl"]);else if(b.parent.tag_name==="p"&&E.indexOf(b.tag_name)!==-1){var M=b.parent.parent;(!M||A.indexOf(M.tag_name)===-1)&&(v=v||this._tag_stack.try_pop("p"))}else b.tag_name==="rp"||b.tag_name==="rt"?(v=v||this._tag_stack.try_pop("rt",["ruby","rtc"]),v=v||this._tag_stack.try_pop("rp",["ruby","rtc"])):b.tag_name==="optgroup"?v=v||this._tag_stack.try_pop("optgroup",["select"]):b.tag_name==="option"?v=v||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):b.tag_name==="colgroup"?v=v||this._tag_stack.try_pop("caption",["table"]):b.tag_name==="thead"?(v=v||this._tag_stack.try_pop("caption",["table"]),v=v||this._tag_stack.try_pop("colgroup",["table"])):b.tag_name==="tbody"||b.tag_name==="tfoot"?(v=v||this._tag_stack.try_pop("caption",["table"]),v=v||this._tag_stack.try_pop("colgroup",["table"]),v=v||this._tag_stack.try_pop("thead",["table"]),v=v||this._tag_stack.try_pop("tbody",["table"])):b.tag_name==="tr"?(v=v||this._tag_stack.try_pop("caption",["table"]),v=v||this._tag_stack.try_pop("colgroup",["table"]),v=v||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(b.tag_name==="th"||b.tag_name==="td")&&(v=v||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),v=v||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return b.parent=this._tag_stack.get_parser_token(),v}},beautifier.Beautifier=m,beautifier}var hasRequiredHtml;function requireHtml(){if(hasRequiredHtml)return htmlExports;hasRequiredHtml=1;var n=requireBeautifier().Beautifier,e=requireOptions().Options;function r(s,o,a,l){var c=new n(s,o,a,l);return c.beautify()}return html.exports=r,htmlExports.defaultOptions=function(){return new e},htmlExports}var hasRequiredSrc;function requireSrc(){if(hasRequiredSrc)return src;hasRequiredSrc=1;var n=requireJavascript(),e=requireCss(),r=requireHtml();function s(o,a,l,c){return l=l||n,c=c||e,r(o,a,l,c)}return s.defaultOptions=r.defaultOptions,src.js=n,src.css=e,src.html=s,src}(function(n){function e(r,s,o){var a=function(l,c){return r.js_beautify(l,c)};return a.js=r.js_beautify,a.css=s.css_beautify,a.html=o.html_beautify,a.js_beautify=r.js_beautify,a.css_beautify=s.css_beautify,a.html_beautify=o.html_beautify,a}(function(r){var s=requireSrc();s.js_beautify=s.js,s.css_beautify=s.css,s.html_beautify=s.html,r.exports=e(s,s,s)})(n)})(js);/*! * is-whitespace * @@ -85,18 +84,18 @@ $1`).replace(/>(\s*)(?= vnodes - - + +