apprun 3.35.0 → 3.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/WHATSNEW.md +9 -1
- package/apprun.d.ts +4 -4
- package/dist/apprun-dev-tools.js +1 -1
- package/dist/apprun-dev-tools.js.map +1 -1
- package/dist/apprun-html.esm.js +7 -7
- package/dist/apprun-html.esm.js.map +1 -1
- package/dist/apprun-html.js +1 -1
- package/dist/apprun-html.js.map +1 -1
- package/dist/apprun-play-html.esm.js +7 -7
- package/dist/apprun-play-html.esm.js.map +1 -1
- package/dist/apprun-play.js +1 -1
- package/dist/apprun-play.js.map +1 -1
- package/dist/apprun.esm.js +1 -1
- package/dist/apprun.esm.js.map +1 -1
- package/dist/apprun.js +1 -1
- package/dist/apprun.js.map +1 -1
- package/esm/app.js +55 -11
- package/esm/app.js.map +1 -1
- package/esm/apprun-html.js +8 -4
- package/esm/apprun-html.js.map +1 -1
- package/esm/apprun.js +64 -14
- package/esm/apprun.js.map +1 -1
- package/esm/component.js +56 -19
- package/esm/component.js.map +1 -1
- package/esm/decorator.js +22 -5
- package/esm/decorator.js.map +1 -1
- package/esm/directive.js +64 -13
- package/esm/directive.js.map +1 -1
- package/esm/router.js +22 -4
- package/esm/router.js.map +1 -1
- package/esm/type-utils.js +91 -0
- package/esm/type-utils.js.map +1 -0
- package/esm/types.js +32 -11
- package/esm/types.js.map +1 -1
- package/esm/vdom-my.js +66 -43
- package/esm/vdom-my.js.map +1 -1
- package/esm/version.js +15 -0
- package/esm/version.js.map +1 -0
- package/esm/web-component.js +30 -10
- package/esm/web-component.js.map +1 -1
- package/jest.config.js +1 -7
- package/jsx-runtime.js +1 -1
- package/jsx-runtime.js.map +1 -1
- package/package.json +1 -1
- package/plan/plan-apprun-bugfixes.md +207 -0
- package/src/app.ts +52 -11
- package/src/apprun-html.ts +8 -4
- package/src/apprun.ts +76 -17
- package/src/component.ts +58 -20
- package/src/decorator.ts +23 -6
- package/src/directive.ts +64 -13
- package/src/router.ts +23 -5
- package/src/type-utils.ts +130 -0
- package/src/types.ts +33 -12
- package/src/vdom-my.ts +75 -39
- package/src/version.ts +16 -0
- package/src/web-component.ts +31 -11
package/README.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# AppRun [![Build][travis-image]][travis-url] [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][downloads-url] [![License][license-image]][license-url] [![twitter][twitter-badge]][twitter] [![Discord Chat][discord-image]][discord-invite]
|
|
2
2
|
|
|
3
|
+
## News
|
|
4
|
+
|
|
5
|
+
We just released [AppRun 3.36.0](https://github.com/yysun/apprun/releases/tag/v3.36.0). See [whats new](WHATSNEW.md) for details.
|
|
6
|
+
|
|
7
|
+
In this release we had a code review by using Copilot and Claude Sonnet 4, which found and fixed minor bugs and edge cases in virtual DOM handling, as well as bugs in router initialization logic. Also improved overall code quality and stability.
|
|
3
8
|
|
|
4
9
|
## Introduction
|
|
5
10
|
|
package/WHATSNEW.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
## What's New
|
|
2
2
|
|
|
3
|
-
> July 12, 2025, V3.
|
|
3
|
+
> July 12, 2025, V3.36.0
|
|
4
|
+
|
|
5
|
+
Code review by using Copilot and Claude Sonnet 4
|
|
6
|
+
- Enhanced type definitions (apprun.d.ts) for better TypeScript support
|
|
7
|
+
- Fixed minor bugs and edge cases in virtual DOM handling
|
|
8
|
+
- Fixed bugs in router initialization logic
|
|
9
|
+
|
|
10
|
+
> July 11, 2025, V3.35.0
|
|
11
|
+
|
|
4
12
|
|
|
5
13
|
### Support auto use router for pretty links
|
|
6
14
|
|
package/apprun.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ declare module 'apprun' {
|
|
|
3
3
|
export type Element = HTMLElement | string;
|
|
4
4
|
|
|
5
5
|
export type VNode = {
|
|
6
|
-
tag: string,
|
|
6
|
+
tag: string | Function,
|
|
7
7
|
props: {},
|
|
8
8
|
children: Array<VNode | string>
|
|
9
9
|
};
|
|
10
|
-
export type VDOM = false | string | VNode | Array<VNode | string
|
|
10
|
+
export type VDOM = false | string | VNode | Array<VNode | string> | any; // TemplateResult from lit-html
|
|
11
11
|
export type View<T> = (state: T) => VDOM | void;
|
|
12
12
|
export type Action<T> = (state: T, ...p: any[]) => T | Promise<T> | void;
|
|
13
13
|
export type ActionDef<T, E> = (readonly [E, Action<T>, {}?]);
|
|
@@ -37,7 +37,8 @@ declare module 'apprun' {
|
|
|
37
37
|
transition?: boolean;
|
|
38
38
|
history?;
|
|
39
39
|
route?: string;
|
|
40
|
-
rendered?: (state: T) => void
|
|
40
|
+
rendered?: (state: T) => void;
|
|
41
|
+
mounted?: (props: any, children: any[], state: T) => T | void;
|
|
41
42
|
};
|
|
42
43
|
|
|
43
44
|
export interface IApp {
|
|
@@ -76,7 +77,6 @@ declare module 'apprun' {
|
|
|
76
77
|
mounted: (props: any, children: any[], state: T) => T | void;
|
|
77
78
|
unmount: () => void;
|
|
78
79
|
unload: (state: T) => void;
|
|
79
|
-
render(element: HTMLElement, node: any): void;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
export function on<E>(name?: E, options?: EventOptions): any;
|
package/dist/apprun-dev-tools.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see apprun-dev-tools.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.apprun=t():e.apprun=t()}(this,(()=>(()=>{"use strict";var e={859:(e,t,n)=>{n.d(t,{A:()=>r});let i;const o="undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};o.app&&o._AppRunVersions?i=o.app:(i=new class{constructor(){this._events={}}on(e,t,n={}){this._events[e]=this._events[e]||[],this._events[e].push({fn:t,options:n})}off(e,t){const n=this._events[e]||[];this._events[e]=n.filter((e=>e.fn!==t))}find(e){return this._events[e]}run(e,...t){const n=this.getSubscribers(e,this._events);return console.assert(n&&n.length>0,"No subscriber for event: "+e),n.forEach((n=>{const{fn:i,options:o}=n;return o.delay?this.delay(e,i,t,o):Object.keys(o).length>0?i.apply(this,[...t,o]):i.apply(this,t),!n.options.once})),n.length}once(e,t,n={}){this.on(e,t,Object.assign(Object.assign({},n),{once:!0}))}delay(e,t,n,i){i._t&&clearTimeout(i._t),i._t=setTimeout((()=>{clearTimeout(i._t),Object.keys(i).length>0?t.apply(this,[...n,i]):t.apply(this,n)}),i.delay)}runAsync(e,...t){const n=this.getSubscribers(e,this._events);console.assert(n&&n.length>0,"No subscriber for event: "+e);const i=n.map((e=>{const{fn:n,options:i}=e;return Object.keys(i).length>0?n.apply(this,[...t,i]):n.apply(this,t)}));return Promise.all(i)}query(e,...t){return this.runAsync(e,...t)}getSubscribers(e,t){const n=t[e]||[];return t[e]=n.filter((e=>!e.options.once)),Object.keys(t).filter((t=>t.endsWith("*")&&e.startsWith(t.replace("*","")))).sort(((e,t)=>t.length-e.length)).forEach((i=>n.push(...t[i].map((t=>Object.assign(Object.assign({},t),{options:Object.assign(Object.assign({},t.options),{event:e})})))))),n}},o.app=i,o._AppRunVersions="AppRun-3.3.11");const r=i}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,n),r.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i=n(859);function o(e){return e.map((e=>a(e))).join("")}function r(e){for(var t in e)null==e[t]?delete e[t]:"object"==typeof e[t]&&r(e[t])}function a(e){if(!e)return"";if(e._$litType$)return e.toString();if(r(e),Array.isArray(e))return o(e);if("string"==typeof e)return e.startsWith("_html:")?e.substring(6):e;if(e.tag){const t=e.props?function(e){return Object.keys(e).map((t=>{return` ${"className"===t?"class":t}="${n=e[t],"object"==typeof n?Object.keys(n).map((e=>`${e}:${n[e]}`)).join(";"):n.toString()}"`;var n})).join("")}(e.props):"",n=e.children?o(e.children):"";return`<${e.tag}${t}>${n}</${e.tag}>`}return"object"==typeof e?JSON.stringify(e):void 0}const l=a;let s;function c(e){s=window.open("",e),s.document.write(`<html>\n <title>AppRun Analyzer | ${document.location.href}</title>\n <style>\n body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI" }\n </style>\n <body><pre>`)}function u(e){s.document.write(e+"\n")}function p(){s.document.write("</pre>\n </body>\n </html>"),s.document.close()}app.debug=!0;const f=e=>{u(`import ${e.constructor.name} from '../src/${e.constructor.name}'`),u(`describe('${e.constructor.name}', ()=>{`),e._actions.forEach((t=>{"."!==t.name&&(u(` it ('should handle event: ${t.name}', (done)=>{`),u(` const component = new ${e.constructor.name}().mount();`),u(` component.run('${t.name}');`),u(" setTimeout(() => {"),u(" //expect(?).toHaveBeenCalled();"),u(" //expect(component.state).toBe(?);"),u(" done();"),u(" })"))})),u("});")};let d=!1,h=[];app.on("debug",(e=>{d&&e.vdom&&(h.push(e),console.log(`* ${h.length} state(s) recorded.`))}));function g(e){return null==e}var m={isNothing:g,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:g(e)?[]:[e]},repeat:function(e,t){var n,i="";for(n=0;n<t;n+=1)i+=e;return i},isNegativeZero:function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},extend:function(e,t){var n,i,o,r;if(t)for(n=0,i=(r=Object.keys(t)).length;n<i;n+=1)e[o=r[n]]=t[o];return e}};function y(e,t){var n="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+="\n\n"+e.mark.snippet),i+" "+n):i}function b(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=y(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}b.prototype=Object.create(Error.prototype),b.prototype.constructor=b,b.prototype.toString=function(e){return this.name+": "+y(this,e)};var v=b;function A(e,t,n,i,o){var r="",a="",l=Math.floor(o/2)-1;return i-t>l&&(t=i-l+(r=" ... ").length),n-i>l&&(n=i+l-(a=" ...").length),{str:r+e.slice(t,n).replace(/\t/g,"→")+a,pos:i-t+r.length}}function w(e,t){return m.repeat(" ",t-e.length)+e}var k=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],x=["scalar","sequence","mapping"],C=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===k.indexOf(t))throw new v('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===x.indexOf(this.kind))throw new v('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function O(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,i){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=i)})),n[t]=e})),n}function S(e){return this.extend(e)}S.prototype.extend=function(e){var t=[],n=[];if(e instanceof C)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new v("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof C))throw new v("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new v("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new v("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof C))throw new v("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(S.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=O(i,"implicit"),i.compiledExplicit=O(i,"explicit"),i.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return n}(i.compiledImplicit,i.compiledExplicit),i};var j=S,I=new C("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}}),_=new C("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}}),T=new C("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}}),E=new j({explicit:[I,_,T]}),N=new C("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),L=new C("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function F(e){return 48<=e&&e<=55}function M(e){return 48<=e&&e<=57}var $=new C("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=e.length,o=0,r=!1;if(!i)return!1;if("-"!==(t=e[o])&&"+"!==t||(t=e[++o]),"0"===t){if(o+1===i)return!0;if("b"===(t=e[++o])){for(o++;o<i;o++)if("_"!==(t=e[o])){if("0"!==t&&"1"!==t)return!1;r=!0}return r&&"_"!==t}if("x"===t){for(o++;o<i;o++)if("_"!==(t=e[o])){if(!(48<=(n=e.charCodeAt(o))&&n<=57||65<=n&&n<=70||97<=n&&n<=102))return!1;r=!0}return r&&"_"!==t}if("o"===t){for(o++;o<i;o++)if("_"!==(t=e[o])){if(!F(e.charCodeAt(o)))return!1;r=!0}return r&&"_"!==t}}if("_"===t)return!1;for(;o<i;o++)if("_"!==(t=e[o])){if(!M(e.charCodeAt(o)))return!1;r=!0}return!(!r||"_"===t)},construct:function(e){var t,n=e,i=1;if(-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(t=n[0])&&"+"!==t||("-"===t&&(i=-1),t=(n=n.slice(1))[0]),"0"===n)return 0;if("0"===t){if("b"===n[1])return i*parseInt(n.slice(2),2);if("x"===n[1])return i*parseInt(n.slice(2),16);if("o"===n[1])return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!m.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),D=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),R=/^[-+]?[0-9]+e/,U=new C("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!D.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||m.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(m.isNegativeZero(e))return"-0.0";return n=e.toString(10),R.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),q=E.extend({implicit:[N,L,$,U]}),Y=q,B=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),P=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),V=new C("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==B.exec(e)||null!==P.exec(e))},construct:function(e){var t,n,i,o,r,a,l,s,c=0,u=null;if(null===(t=B.exec(e))&&(t=P.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(n,i,o));if(r=+t[4],a=+t[5],l=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),s=new Date(Date.UTC(n,i,o,r,a,l,c)),u&&s.setTime(s.getTime()-u),s},instanceOf:Date,represent:function(e){return e.toISOString()}}),W=new C("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),G="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",K=new C("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,o=e.length,r=G;for(n=0;n<o;n++)if(!((t=r.indexOf(e.charAt(n)))>64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),o=i.length,r=G,a=0,l=[];for(t=0;t<o;t++)t%4==0&&t&&(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|r.indexOf(i.charAt(t));return 0==(n=o%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,i="",o=0,r=e.length,a=G;for(t=0;t<r;t++)t%3==0&&t&&(i+=a[o>>18&63],i+=a[o>>12&63],i+=a[o>>6&63],i+=a[63&o]),o=(o<<8)+e[t];return 0==(n=r%3)?(i+=a[o>>18&63],i+=a[o>>12&63],i+=a[o>>6&63],i+=a[63&o]):2===n?(i+=a[o>>10&63],i+=a[o>>4&63],i+=a[o<<2&63],i+=a[64]):1===n&&(i+=a[o>>2&63],i+=a[o<<4&63],i+=a[64],i+=a[64]),i}}),H=Object.prototype.hasOwnProperty,J=Object.prototype.toString,Z=new C("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,o,r,a=[],l=e;for(t=0,n=l.length;t<n;t+=1){if(i=l[t],r=!1,"[object Object]"!==J.call(i))return!1;for(o in i)if(H.call(i,o)){if(r)return!1;r=!0}if(!r)return!1;if(-1!==a.indexOf(o))return!1;a.push(o)}return!0},construct:function(e){return null!==e?e:[]}}),z=Object.prototype.toString,X=new C("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,o,r,a=e;for(r=new Array(a.length),t=0,n=a.length;t<n;t+=1){if(i=a[t],"[object Object]"!==z.call(i))return!1;if(1!==(o=Object.keys(i)).length)return!1;r[t]=[o[0],i[o[0]]]}return!0},construct:function(e){if(null===e)return[];var t,n,i,o,r,a=e;for(r=new Array(a.length),t=0,n=a.length;t<n;t+=1)i=a[t],o=Object.keys(i),r[t]=[o[0],i[o[0]]];return r}}),Q=Object.prototype.hasOwnProperty,ee=new C("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,n=e;for(t in n)if(Q.call(n,t)&&null!==n[t])return!1;return!0},construct:function(e){return null!==e?e:{}}}),te=Y.extend({implicit:[V,W],explicit:[K,Z,X,ee]}),ne=Object.prototype.hasOwnProperty,ie=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,oe=/[\x85\u2028\u2029]/,re=/[,\[\]\{\}]/,ae=/^(?:!|!!|![a-z\-]+!)$/i,le=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function se(e){return Object.prototype.toString.call(e)}function ce(e){return 10===e||13===e}function ue(e){return 9===e||32===e}function pe(e){return 9===e||32===e||10===e||13===e}function fe(e){return 44===e||91===e||93===e||123===e||125===e}function de(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function he(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function ge(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var me=new Array(256),ye=new Array(256),be=0;be<256;be++)me[be]=he(be)?1:0,ye[be]=he(be);function ve(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||te,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ae(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var n,i=/\r?\n|\r|\0/g,o=[0],r=[],a=-1;n=i.exec(e.buffer);)r.push(n.index),o.push(n.index+n[0].length),e.position<=n.index&&a<0&&(a=o.length-2);a<0&&(a=o.length-1);var l,s,c="",u=Math.min(e.line+t.linesAfter,r.length).toString().length,p=t.maxLength-(t.indent+u+3);for(l=1;l<=t.linesBefore&&!(a-l<0);l++)s=A(e.buffer,o[a-l],r[a-l],e.position-(o[a]-o[a-l]),p),c=m.repeat(" ",t.indent)+w((e.line-l+1).toString(),u)+" | "+s.str+"\n"+c;for(s=A(e.buffer,o[a],r[a],e.position,p),c+=m.repeat(" ",t.indent)+w((e.line+1).toString(),u)+" | "+s.str+"\n",c+=m.repeat("-",t.indent+u+3+s.pos)+"^\n",l=1;l<=t.linesAfter&&!(a+l>=r.length);l++)s=A(e.buffer,o[a+l],r[a+l],e.position-(o[a]-o[a+l]),p),c+=m.repeat(" ",t.indent)+w((e.line+l+1).toString(),u)+" | "+s.str+"\n";return c.replace(/\n$/,"")}(n),new v(t,n)}function we(e,t){throw Ae(e,t)}function ke(e,t){e.onWarning&&e.onWarning.call(null,Ae(e,t))}var xe={YAML:function(e,t,n){var i,o,r;null!==e.version&&we(e,"duplication of %YAML directive"),1!==n.length&&we(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&we(e,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),r=parseInt(i[2],10),1!==o&&we(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=r<2,1!==r&&2!==r&&ke(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,o;2!==n.length&&we(e,"TAG directive accepts exactly two arguments"),i=n[0],o=n[1],ae.test(i)||we(e,"ill-formed tag handle (first argument) of the TAG directive"),ne.call(e.tagMap,i)&&we(e,'there is a previously declared suffix for "'+i+'" tag handle'),le.test(o)||we(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(t){we(e,"tag prefix is malformed: "+o)}e.tagMap[i]=o}};function Ce(e,t,n,i){var o,r,a,l;if(t<n){if(l=e.input.slice(t,n),i)for(o=0,r=l.length;o<r;o+=1)9===(a=l.charCodeAt(o))||32<=a&&a<=1114111||we(e,"expected valid JSON character");else ie.test(l)&&we(e,"the stream contains non-printable characters");e.result+=l}}function Oe(e,t,n,i){var o,r,a,l;for(m.isObject(n)||we(e,"cannot merge mappings; the provided source object is unacceptable"),a=0,l=(o=Object.keys(n)).length;a<l;a+=1)r=o[a],ne.call(t,r)||(t[r]=n[r],i[r]=!0)}function Se(e,t,n,i,o,r,a,l,s){var c,u;if(Array.isArray(o))for(c=0,u=(o=Array.prototype.slice.call(o)).length;c<u;c+=1)Array.isArray(o[c])&&we(e,"nested arrays are not supported inside keys"),"object"==typeof o&&"[object Object]"===se(o[c])&&(o[c]="[object Object]");if("object"==typeof o&&"[object Object]"===se(o)&&(o="[object Object]"),o=String(o),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(r))for(c=0,u=r.length;c<u;c+=1)Oe(e,t,r[c],n);else Oe(e,t,r,n);else e.json||ne.call(n,o)||!ne.call(t,o)||(e.line=a||e.line,e.lineStart=l||e.lineStart,e.position=s||e.position,we(e,"duplicated mapping key")),"__proto__"===o?Object.defineProperty(t,o,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[o]=r,delete n[o];return t}function je(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):we(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Ie(e,t,n){for(var i=0,o=e.input.charCodeAt(e.position);0!==o;){for(;ue(o);)9===o&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&35===o)do{o=e.input.charCodeAt(++e.position)}while(10!==o&&13!==o&&0!==o);if(!ce(o))break;for(je(e),o=e.input.charCodeAt(e.position),i++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==n&&0!==i&&e.lineIndent<n&&ke(e,"deficient indentation"),i}function _e(e){var t,n=e.position;return!(45!==(t=e.input.charCodeAt(n))&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,0!==(t=e.input.charCodeAt(n))&&!pe(t)))}function Te(e,t){1===t?e.result+=" ":t>1&&(e.result+=m.repeat("\n",t-1))}function Ee(e,t){var n,i,o=e.tag,r=e.anchor,a=[],l=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,we(e,"tab characters must not be used in indentation")),45===i)&&pe(e.input.charCodeAt(e.position+1));)if(l=!0,e.position++,Ie(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,Fe(e,t,3,!1,!0),a.push(e.result),Ie(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)we(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!l&&(e.tag=o,e.anchor=r,e.kind="sequence",e.result=a,!0)}function Ne(e){var t,n,i,o,r=!1,a=!1;if(33!==(o=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&we(e,"duplication of a tag property"),60===(o=e.input.charCodeAt(++e.position))?(r=!0,o=e.input.charCodeAt(++e.position)):33===o?(a=!0,n="!!",o=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&62!==o);e.position<e.length?(i=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):we(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!pe(o);)33===o&&(a?we(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),ae.test(n)||we(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),re.test(i)&&we(e,"tag suffix cannot contain flow indicator characters")}i&&!le.test(i)&&we(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(t){we(e,"tag name is malformed: "+i)}return r?e.tag=i:ne.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:"!"===n?e.tag="!"+i:"!!"===n?e.tag="tag:yaml.org,2002:"+i:we(e,'undeclared tag handle "'+n+'"'),!0}function Le(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&we(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!pe(n)&&!fe(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&we(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Fe(e,t,n,i,o){var r,a,l,s,c,u,p,f,d,h=1,g=!1,y=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,r=a=l=4===n||3===n,i&&Ie(e,!0,-1)&&(g=!0,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)),1===h)for(;Ne(e)||Le(e);)Ie(e,!0,-1)?(g=!0,l=r,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)):l=!1;if(l&&(l=g||o),1!==h&&4!==n||(f=1===n||2===n?t:t+1,d=e.position-e.lineStart,1===h?l&&(Ee(e,d)||function(e,t,n){var i,o,r,a,l,s,c,u=e.tag,p=e.anchor,f={},d=Object.create(null),h=null,g=null,m=null,y=!1,b=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=f),c=e.input.charCodeAt(e.position);0!==c;){if(y||-1===e.firstTabInLine||(e.position=e.firstTabInLine,we(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),r=e.line,63!==c&&58!==c||!pe(i)){if(a=e.line,l=e.lineStart,s=e.position,!Fe(e,n,2,!1,!0))break;if(e.line===r){for(c=e.input.charCodeAt(e.position);ue(c);)c=e.input.charCodeAt(++e.position);if(58===c)pe(c=e.input.charCodeAt(++e.position))||we(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Se(e,f,d,h,g,null,a,l,s),h=g=m=null),b=!0,y=!1,o=!1,h=e.tag,g=e.result;else{if(!b)return e.tag=u,e.anchor=p,!0;we(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return e.tag=u,e.anchor=p,!0;we(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(Se(e,f,d,h,g,null,a,l,s),h=g=m=null),b=!0,y=!0,o=!0):y?(y=!1,o=!0):we(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=i;if((e.line===r||e.lineIndent>t)&&(y&&(a=e.line,l=e.lineStart,s=e.position),Fe(e,t,4,!0,o)&&(y?g=e.result:m=e.result),y||(Se(e,f,d,h,g,m,a,l,s),h=g=m=null),Ie(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===r||e.lineIndent>t)&&0!==c)we(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Se(e,f,d,h,g,null,a,l,s),b&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=f),b}(e,d,f))||function(e,t){var n,i,o,r,a,l,s,c,u,p,f,d,h=!0,g=e.tag,m=e.anchor,y=Object.create(null);if(91===(d=e.input.charCodeAt(e.position)))a=93,c=!1,r=[];else{if(123!==d)return!1;a=125,c=!0,r={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=r),d=e.input.charCodeAt(++e.position);0!==d;){if(Ie(e,!0,t),(d=e.input.charCodeAt(e.position))===a)return e.position++,e.tag=g,e.anchor=m,e.kind=c?"mapping":"sequence",e.result=r,!0;h?44===d&&we(e,"expected the node content, but found ','"):we(e,"missed comma between flow collection entries"),f=null,l=s=!1,63===d&&pe(e.input.charCodeAt(e.position+1))&&(l=s=!0,e.position++,Ie(e,!0,t)),n=e.line,i=e.lineStart,o=e.position,Fe(e,t,1,!1,!0),p=e.tag,u=e.result,Ie(e,!0,t),d=e.input.charCodeAt(e.position),!s&&e.line!==n||58!==d||(l=!0,d=e.input.charCodeAt(++e.position),Ie(e,!0,t),Fe(e,t,1,!1,!0),f=e.result),c?Se(e,r,y,p,u,f,n,i,o):l?r.push(Se(e,null,y,p,u,f,n,i,o)):r.push(u),Ie(e,!0,t),44===(d=e.input.charCodeAt(e.position))?(h=!0,d=e.input.charCodeAt(++e.position)):h=!1}we(e,"unexpected end of the stream within a flow collection")}(e,f)?y=!0:(a&&function(e,t){var n,i,o,r,a,l=1,s=!1,c=!1,u=t,p=0,f=!1;if(124===(r=e.input.charCodeAt(e.position)))i=!1;else{if(62!==r)return!1;i=!0}for(e.kind="scalar",e.result="";0!==r;)if(43===(r=e.input.charCodeAt(++e.position))||45===r)1===l?l=43===r?3:2:we(e,"repeat of a chomping mode identifier");else{if(!((o=48<=(a=r)&&a<=57?a-48:-1)>=0))break;0===o?we(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?we(e,"repeat of an indentation width identifier"):(u=t+o-1,c=!0)}if(ue(r)){do{r=e.input.charCodeAt(++e.position)}while(ue(r));if(35===r)do{r=e.input.charCodeAt(++e.position)}while(!ce(r)&&0!==r)}for(;0!==r;){for(je(e),e.lineIndent=0,r=e.input.charCodeAt(e.position);(!c||e.lineIndent<u)&&32===r;)e.lineIndent++,r=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>u&&(u=e.lineIndent),ce(r))p++;else{if(e.lineIndent<u){3===l?e.result+=m.repeat("\n",s?1+p:p):1===l&&s&&(e.result+="\n");break}for(i?ue(r)?(f=!0,e.result+=m.repeat("\n",s?1+p:p)):f?(f=!1,e.result+=m.repeat("\n",p+1)):0===p?s&&(e.result+=" "):e.result+=m.repeat("\n",p):e.result+=m.repeat("\n",s?1+p:p),s=!0,c=!0,p=0,n=e.position;!ce(r)&&0!==r;)r=e.input.charCodeAt(++e.position);Ce(e,n,e.position,!1)}}return!0}(e,f)||function(e,t){var n,i,o;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(Ce(e,i,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;i=e.position,e.position++,o=e.position}else ce(n)?(Ce(e,i,o,!0),Te(e,Ie(e,!1,t)),i=o=e.position):e.position===e.lineStart&&_e(e)?we(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);we(e,"unexpected end of the stream within a single quoted scalar")}(e,f)||function(e,t){var n,i,o,r,a,l,s;if(34!==(l=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return Ce(e,n,e.position,!0),e.position++,!0;if(92===l){if(Ce(e,n,e.position,!0),ce(l=e.input.charCodeAt(++e.position)))Ie(e,!1,t);else if(l<256&&me[l])e.result+=ye[l],e.position++;else if((a=120===(s=l)?2:117===s?4:85===s?8:0)>0){for(o=a,r=0;o>0;o--)(a=de(l=e.input.charCodeAt(++e.position)))>=0?r=(r<<4)+a:we(e,"expected hexadecimal character");e.result+=ge(r),e.position++}else we(e,"unknown escape sequence");n=i=e.position}else ce(l)?(Ce(e,n,i,!0),Te(e,Ie(e,!1,t)),n=i=e.position):e.position===e.lineStart&&_e(e)?we(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}we(e,"unexpected end of the stream within a double quoted scalar")}(e,f)?y=!0:function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!pe(i)&&!fe(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&we(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),ne.call(e.anchorMap,n)||we(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],Ie(e,!0,-1),!0}(e)?(y=!0,null===e.tag&&null===e.anchor||we(e,"alias node should not have any properties")):function(e,t,n){var i,o,r,a,l,s,c,u,p=e.kind,f=e.result;if(pe(u=e.input.charCodeAt(e.position))||fe(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(pe(i=e.input.charCodeAt(e.position+1))||n&&fe(i)))return!1;for(e.kind="scalar",e.result="",o=r=e.position,a=!1;0!==u;){if(58===u){if(pe(i=e.input.charCodeAt(e.position+1))||n&&fe(i))break}else if(35===u){if(pe(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&_e(e)||n&&fe(u))break;if(ce(u)){if(l=e.line,s=e.lineStart,c=e.lineIndent,Ie(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=r,e.line=l,e.lineStart=s,e.lineIndent=c;break}}a&&(Ce(e,o,r,!1),Te(e,e.line-l),o=r=e.position,a=!1),ue(u)||(r=e.position+1),u=e.input.charCodeAt(++e.position)}return Ce(e,o,r,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,f,1===n)&&(y=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===h&&(y=l&&Ee(e,d))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&we(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),s=0,c=e.implicitTypes.length;s<c;s+=1)if((p=e.implicitTypes[s]).resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(ne.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,s=0,c=(u=e.typeMap.multi[e.kind||"fallback"]).length;s<c;s+=1)if(e.tag.slice(0,u[s].tag.length)===u[s].tag){p=u[s];break}p||we(e,"unknown tag !<"+e.tag+">"),null!==e.result&&p.kind!==e.kind&&we(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):we(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function Me(e){var t,n,i,o,r=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(o=e.input.charCodeAt(e.position))&&(Ie(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==o));){for(a=!0,o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!pe(o);)o=e.input.charCodeAt(++e.position);for(i=[],(n=e.input.slice(t,e.position)).length<1&&we(e,"directive name must not be less than one character in length");0!==o;){for(;ue(o);)o=e.input.charCodeAt(++e.position);if(35===o){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&!ce(o));break}if(ce(o))break;for(t=e.position;0!==o&&!pe(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==o&&je(e),ne.call(xe,n)?xe[n](e,n,i):ke(e,'unknown document directive "'+n+'"')}Ie(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,Ie(e,!0,-1)):a&&we(e,"directives end mark is expected"),Fe(e,e.lineIndent-1,4,!1,!0),Ie(e,!0,-1),e.checkLineBreaks&&oe.test(e.input.slice(r,e.position))&&ke(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&_e(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,Ie(e,!0,-1)):e.position<e.length-1&&we(e,"end of the stream or a document separator is expected")}function $e(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new ve(e,t),i=e.indexOf("\0");for(-1!==i&&(n.position=i,we(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Me(n);return n.documents}var De={loadAll:function(e,t,n){null!==t&&"object"==typeof t&&void 0===n&&(n=t,t=null);var i=$e(e,n);if("function"!=typeof t)return i;for(var o=0,r=i.length;o<r;o+=1)t(i[o])},load:function(e,t){var n=$e(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new v("expected a single document in the stream, but found more")}}},Re=Object.prototype.toString,Ue=Object.prototype.hasOwnProperty,qe=65279,Ye={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Be=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Pe=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Ve(e){var t,n,i;if(t=e.toString(16).toUpperCase(),e<=255)n="x",i=2;else if(e<=65535)n="u",i=4;else{if(!(e<=4294967295))throw new v("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+m.repeat("0",i-t.length)+t}function We(e){this.schema=e.schema||te,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=m.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,i,o,r,a,l,s;if(null===t)return{};for(n={},o=0,r=(i=Object.keys(t)).length;o<r;o+=1)a=i[o],l=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(s=e.compiledTypeMap.fallback[a])&&Ue.call(s.styleAliases,l)&&(l=s.styleAliases[l]),n[a]=l;return n}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ge(e,t){for(var n,i=m.repeat(" ",t),o=0,r=-1,a="",l=e.length;o<l;)-1===(r=e.indexOf("\n",o))?(n=e.slice(o),o=l):(n=e.slice(o,r+1),o=r+1),n.length&&"\n"!==n&&(a+=i),a+=n;return a}function Ke(e,t){return"\n"+m.repeat(" ",e.indent*t)}function He(e){return 32===e||9===e}function Je(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==qe||65536<=e&&e<=1114111}function Ze(e){return Je(e)&&e!==qe&&13!==e&&10!==e}function ze(e,t,n){var i=Ze(e),o=i&&!He(e);return(n?i:i&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!o)||Ze(t)&&!He(t)&&35===e||58===t&&o}function Xe(e,t){var n,i=e.charCodeAt(t);return i>=55296&&i<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1))>=56320&&n<=57343?1024*(i-55296)+n-56320+65536:i}function Qe(e){return/^\n* /.test(e)}function et(e,t,n,i,o){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Be.indexOf(t)||Pe.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var r=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-r),l=i||e.flowLevel>-1&&n>=e.flowLevel;switch(function(e,t,n,i,o,r,a,l){var s,c,u=0,p=null,f=!1,d=!1,h=-1!==i,g=-1,m=Je(c=Xe(e,0))&&c!==qe&&!He(c)&&45!==c&&63!==c&&58!==c&&44!==c&&91!==c&&93!==c&&123!==c&&125!==c&&35!==c&&38!==c&&42!==c&&33!==c&&124!==c&&61!==c&&62!==c&&39!==c&&34!==c&&37!==c&&64!==c&&96!==c&&function(e){return!He(e)&&58!==e}(Xe(e,e.length-1));if(t||a)for(s=0;s<e.length;u>=65536?s+=2:s++){if(!Je(u=Xe(e,s)))return 5;m=m&&ze(u,p,l),p=u}else{for(s=0;s<e.length;u>=65536?s+=2:s++){if(10===(u=Xe(e,s)))f=!0,h&&(d=d||s-g-1>i&&" "!==e[g+1],g=s);else if(!Je(u))return 5;m=m&&ze(u,p,l),p=u}d=d||h&&s-g-1>i&&" "!==e[g+1]}return f||d?n>9&&Qe(e)?5:a?2===r?5:2:d?4:3:!m||a||o(e)?2===r?5:2:1}(t,l,e.indent,a,(function(t){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n<i;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}(e,t)}),e.quotingType,e.forceQuotes&&!i,o)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+tt(t,e.indent)+nt(Ge(t,r));case 4:return">"+tt(t,e.indent)+nt(Ge(function(e,t){for(var n,i,o,r=/(\n+)([^\n]*)/g,a=(o=-1!==(o=e.indexOf("\n"))?o:e.length,r.lastIndex=o,it(e.slice(0,o),t)),l="\n"===e[0]||" "===e[0];i=r.exec(e);){var s=i[1],c=i[2];n=" "===c[0],a+=s+(l||n||""===c?"":"\n")+it(c,t),l=n}return a}(t,a),r));case 5:return'"'+function(e){for(var t,n="",i=0,o=0;o<e.length;i>=65536?o+=2:o++)i=Xe(e,o),!(t=Ye[i])&&Je(i)?(n+=e[o],i>=65536&&(n+=e[o+1])):n+=t||Ve(i);return n}(t)+'"';default:throw new v("impossible error: invalid scalar style")}}()}function tt(e,t){var n=Qe(e)?String(t):"",i="\n"===e[e.length-1];return n+(!i||"\n"!==e[e.length-2]&&"\n"!==e?i?"":"-":"+")+"\n"}function nt(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function it(e,t){if(""===e||" "===e[0])return e;for(var n,i,o=/ [^ ]/g,r=0,a=0,l=0,s="";n=o.exec(e);)(l=n.index)-r>t&&(i=a>r?a:l,s+="\n"+e.slice(r,i),r=i+1),a=l;return s+="\n",e.length-r>t&&a>r?s+=e.slice(r,a)+"\n"+e.slice(a+1):s+=e.slice(r),s.slice(1)}function ot(e,t,n,i){var o,r,a,l="",s=e.tag;for(o=0,r=n.length;o<r;o+=1)a=n[o],e.replacer&&(a=e.replacer.call(n,String(o),a)),(at(e,t+1,a,!0,!0,!1,!0)||void 0===a&&at(e,t+1,null,!0,!0,!1,!0))&&(i&&""===l||(l+=Ke(e,t)),e.dump&&10===e.dump.charCodeAt(0)?l+="-":l+="- ",l+=e.dump);e.tag=s,e.dump=l||"[]"}function rt(e,t,n){var i,o,r,a,l,s;for(r=0,a=(o=n?e.explicitTypes:e.implicitTypes).length;r<a;r+=1)if(((l=o[r]).instanceOf||l.predicate)&&(!l.instanceOf||"object"==typeof t&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(n?l.multi&&l.representName?e.tag=l.representName(t):e.tag=l.tag:e.tag="?",l.represent){if(s=e.styleMap[l.tag]||l.defaultStyle,"[object Function]"===Re.call(l.represent))i=l.represent(t,s);else{if(!Ue.call(l.represent,s))throw new v("!<"+l.tag+'> tag resolver accepts not "'+s+'" style');i=l.represent[s](t,s)}e.dump=i}return!0}return!1}function at(e,t,n,i,o,r,a){e.tag=null,e.dump=n,rt(e,n,!1)||rt(e,n,!0);var l,s=Re.call(e.dump),c=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var u,p,f="[object Object]"===s||"[object Array]"===s;if(f&&(p=-1!==(u=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||p||2!==e.indent&&t>0)&&(o=!1),p&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(f&&p&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),"[object Object]"===s)i&&0!==Object.keys(e.dump).length?(function(e,t,n,i){var o,r,a,l,s,c,u="",p=e.tag,f=Object.keys(n);if(!0===e.sortKeys)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new v("sortKeys must be a boolean or a function");for(o=0,r=f.length;o<r;o+=1)c="",i&&""===u||(c+=Ke(e,t)),l=n[a=f[o]],e.replacer&&(l=e.replacer.call(n,a,l)),at(e,t+1,a,!0,!0,!0)&&((s=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?c+="?":c+="? "),c+=e.dump,s&&(c+=Ke(e,t)),at(e,t+1,l,!0,s)&&(e.dump&&10===e.dump.charCodeAt(0)?c+=":":c+=": ",u+=c+=e.dump));e.tag=p,e.dump=u||"{}"}(e,t,e.dump,o),p&&(e.dump="&ref_"+u+e.dump)):(function(e,t,n){var i,o,r,a,l,s="",c=e.tag,u=Object.keys(n);for(i=0,o=u.length;i<o;i+=1)l="",""!==s&&(l+=", "),e.condenseFlow&&(l+='"'),a=n[r=u[i]],e.replacer&&(a=e.replacer.call(n,r,a)),at(e,t,r,!1,!1)&&(e.dump.length>1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),at(e,t,a,!1,!1)&&(s+=l+=e.dump));e.tag=c,e.dump="{"+s+"}"}(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if("[object Array]"===s)i&&0!==e.dump.length?(e.noArrayIndent&&!a&&t>0?ot(e,t-1,e.dump,o):ot(e,t,e.dump,o),p&&(e.dump="&ref_"+u+e.dump)):(function(e,t,n){var i,o,r,a="",l=e.tag;for(i=0,o=n.length;i<o;i+=1)r=n[i],e.replacer&&(r=e.replacer.call(n,String(i),r)),(at(e,t,r,!1,!1)||void 0===r&&at(e,t,null,!1,!1))&&(""!==a&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=l,e.dump="["+a+"]"}(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else{if("[object String]"!==s){if("[object Undefined]"===s)return!1;if(e.skipInvalid)return!1;throw new v("unacceptable kind of an object to dump "+s)}"?"!==e.tag&&et(e,e.dump,t,r,c)}null!==e.tag&&"?"!==e.tag&&(l=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),l="!"===e.tag[0]?"!"+l:"tag:yaml.org,2002:"===l.slice(0,18)?"!!"+l.slice(18):"!<"+l+">",e.dump=l+" "+e.dump)}return!0}function lt(e,t){var n,i,o=[],r=[];for(st(e,o,r),n=0,i=r.length;n<i;n+=1)t.duplicates.push(o[r[n]]);t.usedDuplicates=new Array(i)}function st(e,t,n){var i,o,r;if(null!==e&&"object"==typeof e)if(-1!==(o=t.indexOf(e)))-1===n.indexOf(o)&&n.push(o);else if(t.push(e),Array.isArray(e))for(o=0,r=e.length;o<r;o+=1)st(e[o],t,n);else for(o=0,r=(i=Object.keys(e)).length;o<r;o+=1)st(e[i[o]],t,n)}function ct(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}const ut={Type:C,Schema:j,FAILSAFE_SCHEMA:E,JSON_SCHEMA:q,CORE_SCHEMA:Y,DEFAULT_SCHEMA:te,load:De.load,loadAll:De.loadAll,dump:function(e,t){var n=new We(t=t||{});n.noRefs||lt(e,n);var i=e;return n.replacer&&(i=n.replacer.call({"":i},"",i)),at(n,0,i,!0,!0)?n.dump+"\n":""},YAMLException:v,types:{binary:K,float:U,map:T,null:N,pairs:X,set:ee,timestamp:V,bool:L,int:$,merge:W,omap:Z,seq:_,str:I},safeLoad:ct("safeLoad","load"),safeLoadAll:ct("safeLoadAll","loadAll"),safeDump:ct("safeDump","dump")};var pt;function ft(e,t){return"function"==typeof t?t.toString():["",null].includes(t)||"object"==typeof t&&(0===t.length||0===Object.keys(t).length)?void 0:t}function dt(e){const t={get(e,t,n){const i=Reflect.get(e,t,n);return"object"==typeof i&&null!==i?Array.isArray(i)?i.map((e=>dt(e))):dt(i):`{${t}}`}};return Array.isArray(e)?e.map((e=>dt(e))):new Proxy(e,t)}function ht(e){let t;if("object"==typeof e.state){const n=dt(e.state);t=e.view(n)}else t=e.view(e.state);return t}function gt(e){const t=window.open("","_apprun_debug","toolbar=0");t.document.write(`<html>\n <title>AppRun Analyzer | ${document.location.href}</title>\n <style>\n body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI" }\n li { margin-left: 80px; }\n </style>\n <body>\n <div id="main">${e}</div>\n <\/script>\n </body>\n </html>`),t.document.close()}i.A.debug=!0,window["_apprun-help"]=["",()=>{Object.keys(window).forEach((e=>{e.startsWith("_apprun-")&&("_apprun-help"===e?console.log("AppRun Commands:"):console.log(`* ${e.substring(8)}: ${window[e][0]}`))}))}];const mt=()=>{const e={components:{}};i.A.run("get-components",e);const{components:t}=e;return t};let yt=Number(null===(pt=null===window||void 0===window?void 0:window.localStorage)||void 0===pt?void 0:pt.getItem("__apprun_debugging__"))||0;if(i.A.on("debug",(e=>{1&yt&&e.event&&console.log(e),2&yt&&e.vdom&&console.log(e)})),window["_apprun-components"]=["components [print]",e=>{(e=>{const t=mt(),n=[];if(t instanceof Map)for(let[e,i]of t){const t="string"==typeof e?document.getElementById(e)||document.querySelector(e):e;n.push({element:t,comps:i})}else Object.keys(t).forEach((e=>{const i="string"==typeof e?document.getElementById(e)||document.querySelector(e):e;n.push({element:i,comps:t[e]})}));if(e){const e=(e=>{const t=({components:e})=>i.A.h("ul",null,e.map((e=>{const t=ht(e),n=e._actions.map((e=>e.name)),o={state:e.state,view:t,actions:n,update:e.update};return i.A.h("li",null,i.A.h("div",null,e.constructor.name),i.A.h("div",null,i.A.h("pre",null,(r=ut.dump(o,{replacer:ft}))?r.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"):r)),i.A.h("br",null));var r})));return i.A.h("ul",null,e.map((({element:e,comps:n})=>i.A.h("li",null,i.A.h("div",null,(e=>i.A.h("div",null,e.tagName.toLowerCase(),e.id?"#"+e.id:""," ",e.className&&e.className.split(" ").map((e=>"."+e)).join()))(e)),i.A.h(t,{components:n})))))})(n);gt(l(e))}else n.forEach((({element:e,comps:t})=>console.log(e,t)))})("print"===e)}],window["_apprun-events"]=["events [print]",e=>{(e=>{const t=i.A._events,n={},o=mt(),r=e=>e._actions.forEach((t=>{n[t.name]=n[t.name]||[],n[t.name].push(e)}));if(o instanceof Map)for(let[e,t]of o)t.forEach(r);else Object.keys(o).forEach((e=>o[e].forEach(r)));const a=[];if(Object.keys(n).forEach((e=>{a.push({event:e,components:n[e],global:!!t[e]})})),a.sort(((e,t)=>e.event>t.event?1:-1)).map((e=>e.event)),e){const e=(e=>{const t=({components:e})=>i.A.h("ul",null,e.map((e=>i.A.h("li",null,i.A.h("div",null,e.constructor.name))))),n=({events:e,global:n})=>i.A.h("ul",null,e&&e.filter((e=>e.global===n&&"."!==e.event)).map((({event:e,components:n})=>i.A.h("li",null,i.A.h("div",null,e),i.A.h(t,{components:n})))));return i.A.h("div",null,i.A.h("div",null,"GLOBAL EVENTS"),i.A.h(n,{events:e,global:!0}),i.A.h("div",null,"LOCAL EVENTS"),i.A.h(n,{events:e,global:!1}))})(a);gt(l(e))}else console.log("=== GLOBAL EVENTS ==="),a.filter((e=>e.global&&"."!==e.event)).forEach((({event:e,components:t})=>console.log({event:e},t))),console.log("=== LOCAL EVENTS ==="),a.filter((e=>!e.global&&"."!==e.event)).forEach((({event:e,components:t})=>console.log({event:e},t)))})("print"===e)}],window["_apprun-log"]=["log [event|view] on|off",(e,t)=>{var n;"on"===e?yt=3:"off"===e?yt=0:"event"===e?"on"===t?yt|=1:"off"===t&&(yt&=-2):"view"===e&&("on"===t?yt|=2:"off"===t&&(yt&=-3)),console.log(`* log ${e} ${t||""}`),null===(n=null===window||void 0===window?void 0:window.localStorage)||void 0===n||n.setItem("__apprun_debugging__",`${yt}`)}],window["_apprun-create-event-tests"]=["create-event-tests",()=>(()=>{const e={components:{}};app.run("get-components",e);const{components:t}=e;if(c(""),t instanceof Map)for(let[e,n]of t)n.forEach(f);else Object.keys(t).forEach((e=>{t[e].forEach(f)}));p()})()],window["_apprun-create-state-tests"]=["create-state-tests <start|stop>",e=>{var t;"start"===(t=e)?(h=[],d=!0,console.log("* State logging started.")):"stop"===t?(0!==h.length?(c(""),h.forEach(((e,t)=>{u(` it ('view snapshot: #${t+1}', ()=>{`),u(` const component = new ${e.component.constructor.name}()`),u(` const state = ${JSON.stringify(e.state,void 0,2)};`),u(" const vdom = component['view'](state);"),u(" expect(JSON.stringify(vdom)).toMatchSnapshot();"),u(" })")})),p()):console.log("* No state recorded."),d=!1,h=[],console.log("* State logging stopped.")):console.log("create-state-tests <start|stop>")}],window._apprun=e=>{const[t,...n]=e[0].split(" ").filter((e=>!!e)),i=window[`_apprun-${t}`];i?i[1](...n):window["_apprun-help"][1]()},console.info('AppRun DevTools 2.27: type "_apprun `help`" to list all available commands.'),window.__REDUX_DEVTOOLS_EXTENSION__){let e=!1;const t=window.__REDUX_DEVTOOLS_EXTENSION__.connect();if(t){const n=location.hash||"#";t.send(n,"");const o=[{component:null,state:""}];console.info("Connected to the Redux DevTools"),t.subscribe((t=>{if("START"===t.type)e=!0;else if("STOP"===t.type)e=!1;else if("DISPATCH"===t.type){const e=t.payload.index;if(0===e)i.A.run(n);else{const{component:t,state:n}=o[e];null==t||t.setState(n)}}}));const r=(e,n,i)=>{null!=i&&(o.push({component:e,state:i}),t.send(n,i))};i.A.on("debug",(t=>{if(e&&t.event){const e=t.newState,n={type:t.event,payload:t.p},i=t.component;e instanceof Promise?e.then((e=>r(i,n,e))):r(i,n,e)}}))}}return{}})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.apprun=t():e.apprun=t()}(this,(()=>(()=>{"use strict";var e={859:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(672);const o=i.C;let r;const a="undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};a.app&&a._AppRunVersions?r=a.app:(r=new class{constructor(){this._events={}}on(e,t,n={}){this._events[e]=this._events[e]||[],this._events[e].push({fn:t,options:n})}off(e,t){const n=this._events[e]||[];this._events[e]=n.filter((e=>e.fn!==t))}find(e){return this._events[e]}run(e,...t){const n=this.getSubscribers(e,this._events);return console.assert(n&&n.length>0,"No subscriber for event: "+e),n.forEach((n=>{const{fn:i,options:o}=n;if(!i||"function"!=typeof i)return console.error(`AppRun event handler for '${e}' is not a function:`,i),!1;if(o.delay)this.delay(e,i,t,o);else try{Object.keys(o).length>0?i.apply(this,[...t,o]):i.apply(this,t)}catch(t){console.error(`Error in event handler for '${e}':`,t)}return!n.options.once})),n.length}once(e,t,n={}){this.on(e,t,Object.assign(Object.assign({},n),{once:!0}))}delay(e,t,n,i){i._t&&clearTimeout(i._t),i._t=setTimeout((()=>{clearTimeout(i._t);try{Object.keys(i).length>0?t.apply(this,[...n,i]):t.apply(this,n)}catch(t){console.error(`Error in delayed event handler for '${e}':`,t)}}),i.delay)}runAsync(e,...t){const n=this.getSubscribers(e,this._events);console.assert(n&&n.length>0,"No subscriber for event: "+e);const i=n.map((n=>{const{fn:i,options:o}=n;if(!i||"function"!=typeof i)return console.error(`AppRun async event handler for '${e}' is not a function:`,i),Promise.resolve(null);try{return Object.keys(o).length>0?i.apply(this,[...t,o]):i.apply(this,t)}catch(t){return console.error(`Error in async event handler for '${e}':`,t),Promise.reject(t)}}));return Promise.all(i)}query(e,...t){return this.runAsync(e,...t)}getSubscribers(e,t){const n=t[e]||[];return t[e]=n.filter((e=>!e.options.once)),Object.keys(t).filter((t=>t.endsWith("*")&&e.startsWith(t.replace("*","")))).sort(((e,t)=>t.length-e.length)).forEach((i=>n.push(...t[i].map((t=>Object.assign(Object.assign({},t),{options:Object.assign(Object.assign({},t.options),{event:e})})))))),n}},a.app=r,a._AppRunVersions=o);const l=r},672:(e,t,n)=>{n.d(t,{C:()=>i});const i="AppRun-3.36.0"}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,n),r.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i=n(859);function o(e){return e.map((e=>a(e))).join("")}function r(e){for(var t in e)null==e[t]?delete e[t]:"object"==typeof e[t]&&r(e[t])}function a(e){if(!e)return"";if(e._$litType$)return e.toString();if(r(e),Array.isArray(e))return o(e);if("string"==typeof e)return e.startsWith("_html:")?e.substring(6):e;if(e.tag){const t=e.props?function(e){return Object.keys(e).map((t=>{return` ${"className"===t?"class":t}="${n=e[t],"object"==typeof n?Object.keys(n).map((e=>`${e}:${n[e]}`)).join(";"):n.toString()}"`;var n})).join("")}(e.props):"",n=e.children?o(e.children):"";return`<${e.tag}${t}>${n}</${e.tag}>`}return"object"==typeof e?JSON.stringify(e):void 0}const l=a;let s;function c(e){s=window.open("",e),s.document.write(`<html>\n <title>AppRun Analyzer | ${document.location.href}</title>\n <style>\n body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI" }\n </style>\n <body><pre>`)}function u(e){s.document.write(e+"\n")}function p(){s.document.write("</pre>\n </body>\n </html>"),s.document.close()}app.debug=!0;const f=e=>{u(`import ${e.constructor.name} from '../src/${e.constructor.name}'`),u(`describe('${e.constructor.name}', ()=>{`),e._actions.forEach((t=>{"."!==t.name&&(u(` it ('should handle event: ${t.name}', (done)=>{`),u(` const component = new ${e.constructor.name}().mount();`),u(` component.run('${t.name}');`),u(" setTimeout(() => {"),u(" //expect(?).toHaveBeenCalled();"),u(" //expect(component.state).toBe(?);"),u(" done();"),u(" })"))})),u("});")};let d=!1,h=[];app.on("debug",(e=>{d&&e.vdom&&(h.push(e),console.log(`* ${h.length} state(s) recorded.`))}));function g(e){return null==e}var m={isNothing:g,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:g(e)?[]:[e]},repeat:function(e,t){var n,i="";for(n=0;n<t;n+=1)i+=e;return i},isNegativeZero:function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},extend:function(e,t){var n,i,o,r;if(t)for(n=0,i=(r=Object.keys(t)).length;n<i;n+=1)e[o=r[n]]=t[o];return e}};function y(e,t){var n="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+="\n\n"+e.mark.snippet),i+" "+n):i}function b(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=y(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}b.prototype=Object.create(Error.prototype),b.prototype.constructor=b,b.prototype.toString=function(e){return this.name+": "+y(this,e)};var v=b;function A(e,t,n,i,o){var r="",a="",l=Math.floor(o/2)-1;return i-t>l&&(t=i-l+(r=" ... ").length),n-i>l&&(n=i+l-(a=" ...").length),{str:r+e.slice(t,n).replace(/\t/g,"→")+a,pos:i-t+r.length}}function w(e,t){return m.repeat(" ",t-e.length)+e}var k=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],x=["scalar","sequence","mapping"],C=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===k.indexOf(t))throw new v('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===x.indexOf(this.kind))throw new v('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function O(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,i){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=i)})),n[t]=e})),n}function j(e){return this.extend(e)}j.prototype.extend=function(e){var t=[],n=[];if(e instanceof C)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new v("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof C))throw new v("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new v("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new v("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof C))throw new v("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(j.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=O(i,"implicit"),i.compiledExplicit=O(i,"explicit"),i.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return n}(i.compiledImplicit,i.compiledExplicit),i};var S=j,I=new C("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}}),_=new C("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}}),E=new C("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}}),T=new S({explicit:[I,_,E]}),N=new C("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),L=new C("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function F(e){return 48<=e&&e<=55}function M(e){return 48<=e&&e<=57}var $=new C("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=e.length,o=0,r=!1;if(!i)return!1;if("-"!==(t=e[o])&&"+"!==t||(t=e[++o]),"0"===t){if(o+1===i)return!0;if("b"===(t=e[++o])){for(o++;o<i;o++)if("_"!==(t=e[o])){if("0"!==t&&"1"!==t)return!1;r=!0}return r&&"_"!==t}if("x"===t){for(o++;o<i;o++)if("_"!==(t=e[o])){if(!(48<=(n=e.charCodeAt(o))&&n<=57||65<=n&&n<=70||97<=n&&n<=102))return!1;r=!0}return r&&"_"!==t}if("o"===t){for(o++;o<i;o++)if("_"!==(t=e[o])){if(!F(e.charCodeAt(o)))return!1;r=!0}return r&&"_"!==t}}if("_"===t)return!1;for(;o<i;o++)if("_"!==(t=e[o])){if(!M(e.charCodeAt(o)))return!1;r=!0}return!(!r||"_"===t)},construct:function(e){var t,n=e,i=1;if(-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(t=n[0])&&"+"!==t||("-"===t&&(i=-1),t=(n=n.slice(1))[0]),"0"===n)return 0;if("0"===t){if("b"===n[1])return i*parseInt(n.slice(2),2);if("x"===n[1])return i*parseInt(n.slice(2),16);if("o"===n[1])return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!m.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),D=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),R=/^[-+]?[0-9]+e/,U=new C("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!D.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||m.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(m.isNegativeZero(e))return"-0.0";return n=e.toString(10),R.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),q=T.extend({implicit:[N,L,$,U]}),Y=q,B=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),P=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),V=new C("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==B.exec(e)||null!==P.exec(e))},construct:function(e){var t,n,i,o,r,a,l,s,c=0,u=null;if(null===(t=B.exec(e))&&(t=P.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(n,i,o));if(r=+t[4],a=+t[5],l=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),s=new Date(Date.UTC(n,i,o,r,a,l,c)),u&&s.setTime(s.getTime()-u),s},instanceOf:Date,represent:function(e){return e.toISOString()}}),W=new C("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),G="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",K=new C("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,o=e.length,r=G;for(n=0;n<o;n++)if(!((t=r.indexOf(e.charAt(n)))>64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),o=i.length,r=G,a=0,l=[];for(t=0;t<o;t++)t%4==0&&t&&(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|r.indexOf(i.charAt(t));return 0==(n=o%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,i="",o=0,r=e.length,a=G;for(t=0;t<r;t++)t%3==0&&t&&(i+=a[o>>18&63],i+=a[o>>12&63],i+=a[o>>6&63],i+=a[63&o]),o=(o<<8)+e[t];return 0==(n=r%3)?(i+=a[o>>18&63],i+=a[o>>12&63],i+=a[o>>6&63],i+=a[63&o]):2===n?(i+=a[o>>10&63],i+=a[o>>4&63],i+=a[o<<2&63],i+=a[64]):1===n&&(i+=a[o>>2&63],i+=a[o<<4&63],i+=a[64],i+=a[64]),i}}),H=Object.prototype.hasOwnProperty,J=Object.prototype.toString,Z=new C("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,o,r,a=[],l=e;for(t=0,n=l.length;t<n;t+=1){if(i=l[t],r=!1,"[object Object]"!==J.call(i))return!1;for(o in i)if(H.call(i,o)){if(r)return!1;r=!0}if(!r)return!1;if(-1!==a.indexOf(o))return!1;a.push(o)}return!0},construct:function(e){return null!==e?e:[]}}),z=Object.prototype.toString,X=new C("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,o,r,a=e;for(r=new Array(a.length),t=0,n=a.length;t<n;t+=1){if(i=a[t],"[object Object]"!==z.call(i))return!1;if(1!==(o=Object.keys(i)).length)return!1;r[t]=[o[0],i[o[0]]]}return!0},construct:function(e){if(null===e)return[];var t,n,i,o,r,a=e;for(r=new Array(a.length),t=0,n=a.length;t<n;t+=1)i=a[t],o=Object.keys(i),r[t]=[o[0],i[o[0]]];return r}}),Q=Object.prototype.hasOwnProperty,ee=new C("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,n=e;for(t in n)if(Q.call(n,t)&&null!==n[t])return!1;return!0},construct:function(e){return null!==e?e:{}}}),te=Y.extend({implicit:[V,W],explicit:[K,Z,X,ee]}),ne=Object.prototype.hasOwnProperty,ie=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,oe=/[\x85\u2028\u2029]/,re=/[,\[\]\{\}]/,ae=/^(?:!|!!|![a-z\-]+!)$/i,le=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function se(e){return Object.prototype.toString.call(e)}function ce(e){return 10===e||13===e}function ue(e){return 9===e||32===e}function pe(e){return 9===e||32===e||10===e||13===e}function fe(e){return 44===e||91===e||93===e||123===e||125===e}function de(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function he(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function ge(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var me=new Array(256),ye=new Array(256),be=0;be<256;be++)me[be]=he(be)?1:0,ye[be]=he(be);function ve(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||te,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ae(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var n,i=/\r?\n|\r|\0/g,o=[0],r=[],a=-1;n=i.exec(e.buffer);)r.push(n.index),o.push(n.index+n[0].length),e.position<=n.index&&a<0&&(a=o.length-2);a<0&&(a=o.length-1);var l,s,c="",u=Math.min(e.line+t.linesAfter,r.length).toString().length,p=t.maxLength-(t.indent+u+3);for(l=1;l<=t.linesBefore&&!(a-l<0);l++)s=A(e.buffer,o[a-l],r[a-l],e.position-(o[a]-o[a-l]),p),c=m.repeat(" ",t.indent)+w((e.line-l+1).toString(),u)+" | "+s.str+"\n"+c;for(s=A(e.buffer,o[a],r[a],e.position,p),c+=m.repeat(" ",t.indent)+w((e.line+1).toString(),u)+" | "+s.str+"\n",c+=m.repeat("-",t.indent+u+3+s.pos)+"^\n",l=1;l<=t.linesAfter&&!(a+l>=r.length);l++)s=A(e.buffer,o[a+l],r[a+l],e.position-(o[a]-o[a+l]),p),c+=m.repeat(" ",t.indent)+w((e.line+l+1).toString(),u)+" | "+s.str+"\n";return c.replace(/\n$/,"")}(n),new v(t,n)}function we(e,t){throw Ae(e,t)}function ke(e,t){e.onWarning&&e.onWarning.call(null,Ae(e,t))}var xe={YAML:function(e,t,n){var i,o,r;null!==e.version&&we(e,"duplication of %YAML directive"),1!==n.length&&we(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&we(e,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),r=parseInt(i[2],10),1!==o&&we(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=r<2,1!==r&&2!==r&&ke(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,o;2!==n.length&&we(e,"TAG directive accepts exactly two arguments"),i=n[0],o=n[1],ae.test(i)||we(e,"ill-formed tag handle (first argument) of the TAG directive"),ne.call(e.tagMap,i)&&we(e,'there is a previously declared suffix for "'+i+'" tag handle'),le.test(o)||we(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(t){we(e,"tag prefix is malformed: "+o)}e.tagMap[i]=o}};function Ce(e,t,n,i){var o,r,a,l;if(t<n){if(l=e.input.slice(t,n),i)for(o=0,r=l.length;o<r;o+=1)9===(a=l.charCodeAt(o))||32<=a&&a<=1114111||we(e,"expected valid JSON character");else ie.test(l)&&we(e,"the stream contains non-printable characters");e.result+=l}}function Oe(e,t,n,i){var o,r,a,l;for(m.isObject(n)||we(e,"cannot merge mappings; the provided source object is unacceptable"),a=0,l=(o=Object.keys(n)).length;a<l;a+=1)r=o[a],ne.call(t,r)||(t[r]=n[r],i[r]=!0)}function je(e,t,n,i,o,r,a,l,s){var c,u;if(Array.isArray(o))for(c=0,u=(o=Array.prototype.slice.call(o)).length;c<u;c+=1)Array.isArray(o[c])&&we(e,"nested arrays are not supported inside keys"),"object"==typeof o&&"[object Object]"===se(o[c])&&(o[c]="[object Object]");if("object"==typeof o&&"[object Object]"===se(o)&&(o="[object Object]"),o=String(o),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(r))for(c=0,u=r.length;c<u;c+=1)Oe(e,t,r[c],n);else Oe(e,t,r,n);else e.json||ne.call(n,o)||!ne.call(t,o)||(e.line=a||e.line,e.lineStart=l||e.lineStart,e.position=s||e.position,we(e,"duplicated mapping key")),"__proto__"===o?Object.defineProperty(t,o,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[o]=r,delete n[o];return t}function Se(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):we(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Ie(e,t,n){for(var i=0,o=e.input.charCodeAt(e.position);0!==o;){for(;ue(o);)9===o&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&35===o)do{o=e.input.charCodeAt(++e.position)}while(10!==o&&13!==o&&0!==o);if(!ce(o))break;for(Se(e),o=e.input.charCodeAt(e.position),i++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==n&&0!==i&&e.lineIndent<n&&ke(e,"deficient indentation"),i}function _e(e){var t,n=e.position;return!(45!==(t=e.input.charCodeAt(n))&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,0!==(t=e.input.charCodeAt(n))&&!pe(t)))}function Ee(e,t){1===t?e.result+=" ":t>1&&(e.result+=m.repeat("\n",t-1))}function Te(e,t){var n,i,o=e.tag,r=e.anchor,a=[],l=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,we(e,"tab characters must not be used in indentation")),45===i)&&pe(e.input.charCodeAt(e.position+1));)if(l=!0,e.position++,Ie(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,Fe(e,t,3,!1,!0),a.push(e.result),Ie(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)we(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!l&&(e.tag=o,e.anchor=r,e.kind="sequence",e.result=a,!0)}function Ne(e){var t,n,i,o,r=!1,a=!1;if(33!==(o=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&we(e,"duplication of a tag property"),60===(o=e.input.charCodeAt(++e.position))?(r=!0,o=e.input.charCodeAt(++e.position)):33===o?(a=!0,n="!!",o=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&62!==o);e.position<e.length?(i=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):we(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!pe(o);)33===o&&(a?we(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),ae.test(n)||we(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),re.test(i)&&we(e,"tag suffix cannot contain flow indicator characters")}i&&!le.test(i)&&we(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(t){we(e,"tag name is malformed: "+i)}return r?e.tag=i:ne.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:"!"===n?e.tag="!"+i:"!!"===n?e.tag="tag:yaml.org,2002:"+i:we(e,'undeclared tag handle "'+n+'"'),!0}function Le(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&we(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!pe(n)&&!fe(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&we(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Fe(e,t,n,i,o){var r,a,l,s,c,u,p,f,d,h=1,g=!1,y=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,r=a=l=4===n||3===n,i&&Ie(e,!0,-1)&&(g=!0,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)),1===h)for(;Ne(e)||Le(e);)Ie(e,!0,-1)?(g=!0,l=r,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)):l=!1;if(l&&(l=g||o),1!==h&&4!==n||(f=1===n||2===n?t:t+1,d=e.position-e.lineStart,1===h?l&&(Te(e,d)||function(e,t,n){var i,o,r,a,l,s,c,u=e.tag,p=e.anchor,f={},d=Object.create(null),h=null,g=null,m=null,y=!1,b=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=f),c=e.input.charCodeAt(e.position);0!==c;){if(y||-1===e.firstTabInLine||(e.position=e.firstTabInLine,we(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),r=e.line,63!==c&&58!==c||!pe(i)){if(a=e.line,l=e.lineStart,s=e.position,!Fe(e,n,2,!1,!0))break;if(e.line===r){for(c=e.input.charCodeAt(e.position);ue(c);)c=e.input.charCodeAt(++e.position);if(58===c)pe(c=e.input.charCodeAt(++e.position))||we(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(je(e,f,d,h,g,null,a,l,s),h=g=m=null),b=!0,y=!1,o=!1,h=e.tag,g=e.result;else{if(!b)return e.tag=u,e.anchor=p,!0;we(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return e.tag=u,e.anchor=p,!0;we(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(je(e,f,d,h,g,null,a,l,s),h=g=m=null),b=!0,y=!0,o=!0):y?(y=!1,o=!0):we(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=i;if((e.line===r||e.lineIndent>t)&&(y&&(a=e.line,l=e.lineStart,s=e.position),Fe(e,t,4,!0,o)&&(y?g=e.result:m=e.result),y||(je(e,f,d,h,g,m,a,l,s),h=g=m=null),Ie(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===r||e.lineIndent>t)&&0!==c)we(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&je(e,f,d,h,g,null,a,l,s),b&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=f),b}(e,d,f))||function(e,t){var n,i,o,r,a,l,s,c,u,p,f,d,h=!0,g=e.tag,m=e.anchor,y=Object.create(null);if(91===(d=e.input.charCodeAt(e.position)))a=93,c=!1,r=[];else{if(123!==d)return!1;a=125,c=!0,r={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=r),d=e.input.charCodeAt(++e.position);0!==d;){if(Ie(e,!0,t),(d=e.input.charCodeAt(e.position))===a)return e.position++,e.tag=g,e.anchor=m,e.kind=c?"mapping":"sequence",e.result=r,!0;h?44===d&&we(e,"expected the node content, but found ','"):we(e,"missed comma between flow collection entries"),f=null,l=s=!1,63===d&&pe(e.input.charCodeAt(e.position+1))&&(l=s=!0,e.position++,Ie(e,!0,t)),n=e.line,i=e.lineStart,o=e.position,Fe(e,t,1,!1,!0),p=e.tag,u=e.result,Ie(e,!0,t),d=e.input.charCodeAt(e.position),!s&&e.line!==n||58!==d||(l=!0,d=e.input.charCodeAt(++e.position),Ie(e,!0,t),Fe(e,t,1,!1,!0),f=e.result),c?je(e,r,y,p,u,f,n,i,o):l?r.push(je(e,null,y,p,u,f,n,i,o)):r.push(u),Ie(e,!0,t),44===(d=e.input.charCodeAt(e.position))?(h=!0,d=e.input.charCodeAt(++e.position)):h=!1}we(e,"unexpected end of the stream within a flow collection")}(e,f)?y=!0:(a&&function(e,t){var n,i,o,r,a,l=1,s=!1,c=!1,u=t,p=0,f=!1;if(124===(r=e.input.charCodeAt(e.position)))i=!1;else{if(62!==r)return!1;i=!0}for(e.kind="scalar",e.result="";0!==r;)if(43===(r=e.input.charCodeAt(++e.position))||45===r)1===l?l=43===r?3:2:we(e,"repeat of a chomping mode identifier");else{if(!((o=48<=(a=r)&&a<=57?a-48:-1)>=0))break;0===o?we(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?we(e,"repeat of an indentation width identifier"):(u=t+o-1,c=!0)}if(ue(r)){do{r=e.input.charCodeAt(++e.position)}while(ue(r));if(35===r)do{r=e.input.charCodeAt(++e.position)}while(!ce(r)&&0!==r)}for(;0!==r;){for(Se(e),e.lineIndent=0,r=e.input.charCodeAt(e.position);(!c||e.lineIndent<u)&&32===r;)e.lineIndent++,r=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>u&&(u=e.lineIndent),ce(r))p++;else{if(e.lineIndent<u){3===l?e.result+=m.repeat("\n",s?1+p:p):1===l&&s&&(e.result+="\n");break}for(i?ue(r)?(f=!0,e.result+=m.repeat("\n",s?1+p:p)):f?(f=!1,e.result+=m.repeat("\n",p+1)):0===p?s&&(e.result+=" "):e.result+=m.repeat("\n",p):e.result+=m.repeat("\n",s?1+p:p),s=!0,c=!0,p=0,n=e.position;!ce(r)&&0!==r;)r=e.input.charCodeAt(++e.position);Ce(e,n,e.position,!1)}}return!0}(e,f)||function(e,t){var n,i,o;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(Ce(e,i,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;i=e.position,e.position++,o=e.position}else ce(n)?(Ce(e,i,o,!0),Ee(e,Ie(e,!1,t)),i=o=e.position):e.position===e.lineStart&&_e(e)?we(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);we(e,"unexpected end of the stream within a single quoted scalar")}(e,f)||function(e,t){var n,i,o,r,a,l,s;if(34!==(l=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return Ce(e,n,e.position,!0),e.position++,!0;if(92===l){if(Ce(e,n,e.position,!0),ce(l=e.input.charCodeAt(++e.position)))Ie(e,!1,t);else if(l<256&&me[l])e.result+=ye[l],e.position++;else if((a=120===(s=l)?2:117===s?4:85===s?8:0)>0){for(o=a,r=0;o>0;o--)(a=de(l=e.input.charCodeAt(++e.position)))>=0?r=(r<<4)+a:we(e,"expected hexadecimal character");e.result+=ge(r),e.position++}else we(e,"unknown escape sequence");n=i=e.position}else ce(l)?(Ce(e,n,i,!0),Ee(e,Ie(e,!1,t)),n=i=e.position):e.position===e.lineStart&&_e(e)?we(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}we(e,"unexpected end of the stream within a double quoted scalar")}(e,f)?y=!0:function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!pe(i)&&!fe(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&we(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),ne.call(e.anchorMap,n)||we(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],Ie(e,!0,-1),!0}(e)?(y=!0,null===e.tag&&null===e.anchor||we(e,"alias node should not have any properties")):function(e,t,n){var i,o,r,a,l,s,c,u,p=e.kind,f=e.result;if(pe(u=e.input.charCodeAt(e.position))||fe(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(pe(i=e.input.charCodeAt(e.position+1))||n&&fe(i)))return!1;for(e.kind="scalar",e.result="",o=r=e.position,a=!1;0!==u;){if(58===u){if(pe(i=e.input.charCodeAt(e.position+1))||n&&fe(i))break}else if(35===u){if(pe(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&_e(e)||n&&fe(u))break;if(ce(u)){if(l=e.line,s=e.lineStart,c=e.lineIndent,Ie(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=r,e.line=l,e.lineStart=s,e.lineIndent=c;break}}a&&(Ce(e,o,r,!1),Ee(e,e.line-l),o=r=e.position,a=!1),ue(u)||(r=e.position+1),u=e.input.charCodeAt(++e.position)}return Ce(e,o,r,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,f,1===n)&&(y=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===h&&(y=l&&Te(e,d))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&we(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),s=0,c=e.implicitTypes.length;s<c;s+=1)if((p=e.implicitTypes[s]).resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(ne.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,s=0,c=(u=e.typeMap.multi[e.kind||"fallback"]).length;s<c;s+=1)if(e.tag.slice(0,u[s].tag.length)===u[s].tag){p=u[s];break}p||we(e,"unknown tag !<"+e.tag+">"),null!==e.result&&p.kind!==e.kind&&we(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):we(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function Me(e){var t,n,i,o,r=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(o=e.input.charCodeAt(e.position))&&(Ie(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==o));){for(a=!0,o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!pe(o);)o=e.input.charCodeAt(++e.position);for(i=[],(n=e.input.slice(t,e.position)).length<1&&we(e,"directive name must not be less than one character in length");0!==o;){for(;ue(o);)o=e.input.charCodeAt(++e.position);if(35===o){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&!ce(o));break}if(ce(o))break;for(t=e.position;0!==o&&!pe(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==o&&Se(e),ne.call(xe,n)?xe[n](e,n,i):ke(e,'unknown document directive "'+n+'"')}Ie(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,Ie(e,!0,-1)):a&&we(e,"directives end mark is expected"),Fe(e,e.lineIndent-1,4,!1,!0),Ie(e,!0,-1),e.checkLineBreaks&&oe.test(e.input.slice(r,e.position))&&ke(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&_e(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,Ie(e,!0,-1)):e.position<e.length-1&&we(e,"end of the stream or a document separator is expected")}function $e(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new ve(e,t),i=e.indexOf("\0");for(-1!==i&&(n.position=i,we(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Me(n);return n.documents}var De={loadAll:function(e,t,n){null!==t&&"object"==typeof t&&void 0===n&&(n=t,t=null);var i=$e(e,n);if("function"!=typeof t)return i;for(var o=0,r=i.length;o<r;o+=1)t(i[o])},load:function(e,t){var n=$e(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new v("expected a single document in the stream, but found more")}}},Re=Object.prototype.toString,Ue=Object.prototype.hasOwnProperty,qe=65279,Ye={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Be=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Pe=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Ve(e){var t,n,i;if(t=e.toString(16).toUpperCase(),e<=255)n="x",i=2;else if(e<=65535)n="u",i=4;else{if(!(e<=4294967295))throw new v("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+m.repeat("0",i-t.length)+t}function We(e){this.schema=e.schema||te,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=m.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,i,o,r,a,l,s;if(null===t)return{};for(n={},o=0,r=(i=Object.keys(t)).length;o<r;o+=1)a=i[o],l=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(s=e.compiledTypeMap.fallback[a])&&Ue.call(s.styleAliases,l)&&(l=s.styleAliases[l]),n[a]=l;return n}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ge(e,t){for(var n,i=m.repeat(" ",t),o=0,r=-1,a="",l=e.length;o<l;)-1===(r=e.indexOf("\n",o))?(n=e.slice(o),o=l):(n=e.slice(o,r+1),o=r+1),n.length&&"\n"!==n&&(a+=i),a+=n;return a}function Ke(e,t){return"\n"+m.repeat(" ",e.indent*t)}function He(e){return 32===e||9===e}function Je(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==qe||65536<=e&&e<=1114111}function Ze(e){return Je(e)&&e!==qe&&13!==e&&10!==e}function ze(e,t,n){var i=Ze(e),o=i&&!He(e);return(n?i:i&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!o)||Ze(t)&&!He(t)&&35===e||58===t&&o}function Xe(e,t){var n,i=e.charCodeAt(t);return i>=55296&&i<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1))>=56320&&n<=57343?1024*(i-55296)+n-56320+65536:i}function Qe(e){return/^\n* /.test(e)}function et(e,t,n,i,o){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Be.indexOf(t)||Pe.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var r=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-r),l=i||e.flowLevel>-1&&n>=e.flowLevel;switch(function(e,t,n,i,o,r,a,l){var s,c,u=0,p=null,f=!1,d=!1,h=-1!==i,g=-1,m=Je(c=Xe(e,0))&&c!==qe&&!He(c)&&45!==c&&63!==c&&58!==c&&44!==c&&91!==c&&93!==c&&123!==c&&125!==c&&35!==c&&38!==c&&42!==c&&33!==c&&124!==c&&61!==c&&62!==c&&39!==c&&34!==c&&37!==c&&64!==c&&96!==c&&function(e){return!He(e)&&58!==e}(Xe(e,e.length-1));if(t||a)for(s=0;s<e.length;u>=65536?s+=2:s++){if(!Je(u=Xe(e,s)))return 5;m=m&&ze(u,p,l),p=u}else{for(s=0;s<e.length;u>=65536?s+=2:s++){if(10===(u=Xe(e,s)))f=!0,h&&(d=d||s-g-1>i&&" "!==e[g+1],g=s);else if(!Je(u))return 5;m=m&&ze(u,p,l),p=u}d=d||h&&s-g-1>i&&" "!==e[g+1]}return f||d?n>9&&Qe(e)?5:a?2===r?5:2:d?4:3:!m||a||o(e)?2===r?5:2:1}(t,l,e.indent,a,(function(t){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n<i;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}(e,t)}),e.quotingType,e.forceQuotes&&!i,o)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+tt(t,e.indent)+nt(Ge(t,r));case 4:return">"+tt(t,e.indent)+nt(Ge(function(e,t){for(var n,i,o,r=/(\n+)([^\n]*)/g,a=(o=-1!==(o=e.indexOf("\n"))?o:e.length,r.lastIndex=o,it(e.slice(0,o),t)),l="\n"===e[0]||" "===e[0];i=r.exec(e);){var s=i[1],c=i[2];n=" "===c[0],a+=s+(l||n||""===c?"":"\n")+it(c,t),l=n}return a}(t,a),r));case 5:return'"'+function(e){for(var t,n="",i=0,o=0;o<e.length;i>=65536?o+=2:o++)i=Xe(e,o),!(t=Ye[i])&&Je(i)?(n+=e[o],i>=65536&&(n+=e[o+1])):n+=t||Ve(i);return n}(t)+'"';default:throw new v("impossible error: invalid scalar style")}}()}function tt(e,t){var n=Qe(e)?String(t):"",i="\n"===e[e.length-1];return n+(!i||"\n"!==e[e.length-2]&&"\n"!==e?i?"":"-":"+")+"\n"}function nt(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function it(e,t){if(""===e||" "===e[0])return e;for(var n,i,o=/ [^ ]/g,r=0,a=0,l=0,s="";n=o.exec(e);)(l=n.index)-r>t&&(i=a>r?a:l,s+="\n"+e.slice(r,i),r=i+1),a=l;return s+="\n",e.length-r>t&&a>r?s+=e.slice(r,a)+"\n"+e.slice(a+1):s+=e.slice(r),s.slice(1)}function ot(e,t,n,i){var o,r,a,l="",s=e.tag;for(o=0,r=n.length;o<r;o+=1)a=n[o],e.replacer&&(a=e.replacer.call(n,String(o),a)),(at(e,t+1,a,!0,!0,!1,!0)||void 0===a&&at(e,t+1,null,!0,!0,!1,!0))&&(i&&""===l||(l+=Ke(e,t)),e.dump&&10===e.dump.charCodeAt(0)?l+="-":l+="- ",l+=e.dump);e.tag=s,e.dump=l||"[]"}function rt(e,t,n){var i,o,r,a,l,s;for(r=0,a=(o=n?e.explicitTypes:e.implicitTypes).length;r<a;r+=1)if(((l=o[r]).instanceOf||l.predicate)&&(!l.instanceOf||"object"==typeof t&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(n?l.multi&&l.representName?e.tag=l.representName(t):e.tag=l.tag:e.tag="?",l.represent){if(s=e.styleMap[l.tag]||l.defaultStyle,"[object Function]"===Re.call(l.represent))i=l.represent(t,s);else{if(!Ue.call(l.represent,s))throw new v("!<"+l.tag+'> tag resolver accepts not "'+s+'" style');i=l.represent[s](t,s)}e.dump=i}return!0}return!1}function at(e,t,n,i,o,r,a){e.tag=null,e.dump=n,rt(e,n,!1)||rt(e,n,!0);var l,s=Re.call(e.dump),c=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var u,p,f="[object Object]"===s||"[object Array]"===s;if(f&&(p=-1!==(u=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||p||2!==e.indent&&t>0)&&(o=!1),p&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(f&&p&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),"[object Object]"===s)i&&0!==Object.keys(e.dump).length?(function(e,t,n,i){var o,r,a,l,s,c,u="",p=e.tag,f=Object.keys(n);if(!0===e.sortKeys)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new v("sortKeys must be a boolean or a function");for(o=0,r=f.length;o<r;o+=1)c="",i&&""===u||(c+=Ke(e,t)),l=n[a=f[o]],e.replacer&&(l=e.replacer.call(n,a,l)),at(e,t+1,a,!0,!0,!0)&&((s=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?c+="?":c+="? "),c+=e.dump,s&&(c+=Ke(e,t)),at(e,t+1,l,!0,s)&&(e.dump&&10===e.dump.charCodeAt(0)?c+=":":c+=": ",u+=c+=e.dump));e.tag=p,e.dump=u||"{}"}(e,t,e.dump,o),p&&(e.dump="&ref_"+u+e.dump)):(function(e,t,n){var i,o,r,a,l,s="",c=e.tag,u=Object.keys(n);for(i=0,o=u.length;i<o;i+=1)l="",""!==s&&(l+=", "),e.condenseFlow&&(l+='"'),a=n[r=u[i]],e.replacer&&(a=e.replacer.call(n,r,a)),at(e,t,r,!1,!1)&&(e.dump.length>1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),at(e,t,a,!1,!1)&&(s+=l+=e.dump));e.tag=c,e.dump="{"+s+"}"}(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if("[object Array]"===s)i&&0!==e.dump.length?(e.noArrayIndent&&!a&&t>0?ot(e,t-1,e.dump,o):ot(e,t,e.dump,o),p&&(e.dump="&ref_"+u+e.dump)):(function(e,t,n){var i,o,r,a="",l=e.tag;for(i=0,o=n.length;i<o;i+=1)r=n[i],e.replacer&&(r=e.replacer.call(n,String(i),r)),(at(e,t,r,!1,!1)||void 0===r&&at(e,t,null,!1,!1))&&(""!==a&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=l,e.dump="["+a+"]"}(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else{if("[object String]"!==s){if("[object Undefined]"===s)return!1;if(e.skipInvalid)return!1;throw new v("unacceptable kind of an object to dump "+s)}"?"!==e.tag&&et(e,e.dump,t,r,c)}null!==e.tag&&"?"!==e.tag&&(l=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),l="!"===e.tag[0]?"!"+l:"tag:yaml.org,2002:"===l.slice(0,18)?"!!"+l.slice(18):"!<"+l+">",e.dump=l+" "+e.dump)}return!0}function lt(e,t){var n,i,o=[],r=[];for(st(e,o,r),n=0,i=r.length;n<i;n+=1)t.duplicates.push(o[r[n]]);t.usedDuplicates=new Array(i)}function st(e,t,n){var i,o,r;if(null!==e&&"object"==typeof e)if(-1!==(o=t.indexOf(e)))-1===n.indexOf(o)&&n.push(o);else if(t.push(e),Array.isArray(e))for(o=0,r=e.length;o<r;o+=1)st(e[o],t,n);else for(o=0,r=(i=Object.keys(e)).length;o<r;o+=1)st(e[i[o]],t,n)}function ct(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}const ut={Type:C,Schema:S,FAILSAFE_SCHEMA:T,JSON_SCHEMA:q,CORE_SCHEMA:Y,DEFAULT_SCHEMA:te,load:De.load,loadAll:De.loadAll,dump:function(e,t){var n=new We(t=t||{});n.noRefs||lt(e,n);var i=e;return n.replacer&&(i=n.replacer.call({"":i},"",i)),at(n,0,i,!0,!0)?n.dump+"\n":""},YAMLException:v,types:{binary:K,float:U,map:E,null:N,pairs:X,set:ee,timestamp:V,bool:L,int:$,merge:W,omap:Z,seq:_,str:I},safeLoad:ct("safeLoad","load"),safeLoadAll:ct("safeLoadAll","loadAll"),safeDump:ct("safeDump","dump")};var pt;function ft(e,t){return"function"==typeof t?t.toString():["",null].includes(t)||"object"==typeof t&&(0===t.length||0===Object.keys(t).length)?void 0:t}function dt(e){const t={get(e,t,n){const i=Reflect.get(e,t,n);return"object"==typeof i&&null!==i?Array.isArray(i)?i.map((e=>dt(e))):dt(i):`{${t}}`}};return Array.isArray(e)?e.map((e=>dt(e))):new Proxy(e,t)}function ht(e){let t;if("object"==typeof e.state){const n=dt(e.state);t=e.view(n)}else t=e.view(e.state);return t}function gt(e){const t=window.open("","_apprun_debug","toolbar=0");t.document.write(`<html>\n <title>AppRun Analyzer | ${document.location.href}</title>\n <style>\n body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI" }\n li { margin-left: 80px; }\n </style>\n <body>\n <div id="main">${e}</div>\n <\/script>\n </body>\n </html>`),t.document.close()}i.A.debug=!0,window["_apprun-help"]=["",()=>{Object.keys(window).forEach((e=>{e.startsWith("_apprun-")&&("_apprun-help"===e?console.log("AppRun Commands:"):console.log(`* ${e.substring(8)}: ${window[e][0]}`))}))}];const mt=()=>{const e={components:{}};i.A.run("get-components",e);const{components:t}=e;return t};let yt=Number(null===(pt=null===window||void 0===window?void 0:window.localStorage)||void 0===pt?void 0:pt.getItem("__apprun_debugging__"))||0;if(i.A.on("debug",(e=>{1&yt&&e.event&&console.log(e),2&yt&&e.vdom&&console.log(e)})),window["_apprun-components"]=["components [print]",e=>{(e=>{const t=mt(),n=[];if(t instanceof Map)for(let[e,i]of t){const t="string"==typeof e?document.getElementById(e)||document.querySelector(e):e;n.push({element:t,comps:i})}else Object.keys(t).forEach((e=>{const i="string"==typeof e?document.getElementById(e)||document.querySelector(e):e;n.push({element:i,comps:t[e]})}));if(e){const e=(e=>{const t=({components:e})=>i.A.h("ul",null,e.map((e=>{const t=ht(e),n=e._actions.map((e=>e.name)),o={state:e.state,view:t,actions:n,update:e.update};return i.A.h("li",null,i.A.h("div",null,e.constructor.name),i.A.h("div",null,i.A.h("pre",null,(r=ut.dump(o,{replacer:ft}))?r.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"):r)),i.A.h("br",null));var r})));return i.A.h("ul",null,e.map((({element:e,comps:n})=>i.A.h("li",null,i.A.h("div",null,(e=>i.A.h("div",null,e.tagName.toLowerCase(),e.id?"#"+e.id:""," ",e.className&&e.className.split(" ").map((e=>"."+e)).join()))(e)),i.A.h(t,{components:n})))))})(n);gt(l(e))}else n.forEach((({element:e,comps:t})=>console.log(e,t)))})("print"===e)}],window["_apprun-events"]=["events [print]",e=>{(e=>{const t=i.A._events,n={},o=mt(),r=e=>e._actions.forEach((t=>{n[t.name]=n[t.name]||[],n[t.name].push(e)}));if(o instanceof Map)for(let[e,t]of o)t.forEach(r);else Object.keys(o).forEach((e=>o[e].forEach(r)));const a=[];if(Object.keys(n).forEach((e=>{a.push({event:e,components:n[e],global:!!t[e]})})),a.sort(((e,t)=>e.event>t.event?1:-1)).map((e=>e.event)),e){const e=(e=>{const t=({components:e})=>i.A.h("ul",null,e.map((e=>i.A.h("li",null,i.A.h("div",null,e.constructor.name))))),n=({events:e,global:n})=>i.A.h("ul",null,e&&e.filter((e=>e.global===n&&"."!==e.event)).map((({event:e,components:n})=>i.A.h("li",null,i.A.h("div",null,e),i.A.h(t,{components:n})))));return i.A.h("div",null,i.A.h("div",null,"GLOBAL EVENTS"),i.A.h(n,{events:e,global:!0}),i.A.h("div",null,"LOCAL EVENTS"),i.A.h(n,{events:e,global:!1}))})(a);gt(l(e))}else console.log("=== GLOBAL EVENTS ==="),a.filter((e=>e.global&&"."!==e.event)).forEach((({event:e,components:t})=>console.log({event:e},t))),console.log("=== LOCAL EVENTS ==="),a.filter((e=>!e.global&&"."!==e.event)).forEach((({event:e,components:t})=>console.log({event:e},t)))})("print"===e)}],window["_apprun-log"]=["log [event|view] on|off",(e,t)=>{var n;"on"===e?yt=3:"off"===e?yt=0:"event"===e?"on"===t?yt|=1:"off"===t&&(yt&=-2):"view"===e&&("on"===t?yt|=2:"off"===t&&(yt&=-3)),console.log(`* log ${e} ${t||""}`),null===(n=null===window||void 0===window?void 0:window.localStorage)||void 0===n||n.setItem("__apprun_debugging__",`${yt}`)}],window["_apprun-create-event-tests"]=["create-event-tests",()=>(()=>{const e={components:{}};app.run("get-components",e);const{components:t}=e;if(c(""),t instanceof Map)for(let[e,n]of t)n.forEach(f);else Object.keys(t).forEach((e=>{t[e].forEach(f)}));p()})()],window["_apprun-create-state-tests"]=["create-state-tests <start|stop>",e=>{var t;"start"===(t=e)?(h=[],d=!0,console.log("* State logging started.")):"stop"===t?(0!==h.length?(c(""),h.forEach(((e,t)=>{u(` it ('view snapshot: #${t+1}', ()=>{`),u(` const component = new ${e.component.constructor.name}()`),u(` const state = ${JSON.stringify(e.state,void 0,2)};`),u(" const vdom = component['view'](state);"),u(" expect(JSON.stringify(vdom)).toMatchSnapshot();"),u(" })")})),p()):console.log("* No state recorded."),d=!1,h=[],console.log("* State logging stopped.")):console.log("create-state-tests <start|stop>")}],window._apprun=e=>{const[t,...n]=e[0].split(" ").filter((e=>!!e)),i=window[`_apprun-${t}`];i?i[1](...n):window["_apprun-help"][1]()},console.info('AppRun DevTools 2.27: type "_apprun `help`" to list all available commands.'),window.__REDUX_DEVTOOLS_EXTENSION__){let e=!1;const t=window.__REDUX_DEVTOOLS_EXTENSION__.connect();if(t){const n=location.hash||"#";t.send(n,"");const o=[{component:null,state:""}];console.info("Connected to the Redux DevTools"),t.subscribe((t=>{if("START"===t.type)e=!0;else if("STOP"===t.type)e=!1;else if("DISPATCH"===t.type){const e=t.payload.index;if(0===e)i.A.run(n);else{const{component:t,state:n}=o[e];null==t||t.setState(n)}}}));const r=(e,n,i)=>{null!=i&&(o.push({component:e,state:i}),t.send(n,i))};i.A.on("debug",(t=>{if(e&&t.event){const e=t.newState,n={type:t.event,payload:t.p},i=t.component;e instanceof Promise?e.then((e=>r(i,n,e))):r(i,n,e)}}))}}return{}})()));
|
|
3
3
|
//# sourceMappingURL=apprun-dev-tools.js.map
|