diff --git a/package-lock.json b/package-lock.json index fa63d56..9cbc2e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@bonartm/quizdown", - "version": "0.2.4", + "version": "0.2.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@bonartm/quizdown", - "version": "0.2.4", + "version": "0.2.5", "license": "MIT", "dependencies": { "auto-bind": "^4.0.0", diff --git a/package.json b/package.json index 706073f..67cfb59 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bonartm/quizdown", - "version": "0.2.4", + "version": "0.2.5", "description": "Markdown for generating interactive quiz apps in the browser.", "private": false, "type": "module", diff --git a/public/build/quizdown.js b/public/build/quizdown.js index 0193046..8b7cf71 100644 --- a/public/build/quizdown.js +++ b/public/build/quizdown.js @@ -1,4 +1,4 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).quizdown={})}(this,(function(e){"use strict";function t(){}const n=e=>e;function r(e,t){for(const n in t)e[n]=t[n];return e}function i(e){return e()}function o(){return Object.create(null)}function a(e){e.forEach(i)}function s(e){return"function"==typeof e}function u(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function l(e,...n){if(null==e)return t;const r=e.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}function c(e){let t;return l(e,(e=>t=e))(),t}function f(e,t,n){e.$$.on_destroy.push(l(t,n))}function h(e,t,n,i){return e[1]&&i?r(n.ctx.slice(),e[1](i(t))):n.ctx}function p(e,t,n,r,i,o,a){const s=function(e,t,n,r){if(e[2]&&r){const i=e[2](r(n));if(void 0===t.dirty)return i;if("object"==typeof i){const e=[],n=Math.max(t.dirty.length,i.length);for(let r=0;rwindow.performance.now():()=>Date.now(),v=g?e=>requestAnimationFrame(e):t;const y=new Set;function b(e){y.forEach((t=>{t.c(e)||(y.delete(t),t.f())})),0!==y.size&&v(b)}function D(e){let t;return 0===y.size&&v(b),{promise:new Promise((n=>{y.add(t={c:e,f:n})})),abort(){y.delete(t)}}}function w(e){return document.createElement(e)}function E(e,t){e.appendChild(t)}function k(e,t,n,r=`svelte-${t}-style`){const i=x(e);if(!function(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}([i,"optionalAccess",e=>e.querySelector,"call",e=>e("#"+r)])){const e=w("style");e.id=r,e.textContent=n,E(i,e)}}function A(e){return e?e.getRootNode?e.getRootNode():e.ownerDocument:document}function x(e){const t=A(e);return t.host?t:t.head}function _(e,t,n){e.insertBefore(t,n||null)}function C(e){e.parentNode.removeChild(e)}function S(e,t){for(let n=0;ne.removeEventListener(t,n,r)}function L(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function $(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function I(e,t,n,r){e.style.setProperty(t,n,r?"important":"")}class B{constructor(e=null){this.a=e,this.e=this.n=null}m(e,t,n=null){this.e||(this.e=w(t.nodeName),this.t=t,this.h(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t>>0}(c)}_${s}`,h=A(e);M.add(h);const p=h.__svelte_stylesheet||(h.__svelte_stylesheet=function(e){return x(e).appendChild(w("style"))}(e).sheet),d=h.__svelte_rules||(h.__svelte_rules={});d[f]||(d[f]=!0,p.insertRule(`@keyframes ${f} ${c}`,p.cssRules.length));const g=e.style.animation||"";return e.style.animation=`${g?`${g}, `:""}${f} ${r}ms linear ${i}ms 1 both`,j+=1,f}function U(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),i=n.length-r.length;i&&(e.style.animation=r.join(", "),j-=i,j||v((()=>{j||(M.forEach((e=>{const t=e.__svelte_stylesheet;let n=t.cssRules.length;for(;n--;)t.deleteRule(n);e.__svelte_rules={}})),M.clear())})))}function q(e){const t=getComputedStyle(e);if("absolute"!==t.position&&"fixed"!==t.position){const{width:n,height:r}=t,i=e.getBoundingClientRect();e.style.position="absolute",e.style.width=n,e.style.height=r,function(e,t){const n=e.getBoundingClientRect();if(t.left!==n.left||t.top!==n.top){const r=getComputedStyle(e),i="none"===r.transform?"":r.transform;e.style.transform=`${i} translate(${t.left-n.left}px, ${t.top-n.top}px)`}}(e,i)}}function G(e){P=e}function H(e){(function(){if(!P)throw new Error("Function called outside component initialization");return P})().$$.on_mount.push(e)}const V=[],W=[],Y=[],K=[],J=Promise.resolve();let X=!1;function Z(e){Y.push(e)}let Q=!1;const ee=new Set;function te(){if(!Q){Q=!0;do{for(let e=0;e{re.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}}const le="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ce(e,t){e.f(),function(e,t){e.d(1),t.delete(e.key)}(e,t)}function fe(e){e&&e.c()}function he(e,t,n,r){const{fragment:o,on_mount:u,on_destroy:l,after_update:c}=e.$$;o&&o.m(t,n),r||Z((()=>{const t=u.map(i).filter(s);l?l.push(...t):a(t),e.$$.on_mount=[]})),c.forEach(Z)}function pe(e,t){const n=e.$$;null!==n.fragment&&(a(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function de(e,t){-1===e.$$.dirty[0]&&(V.push(e),X||(X=!0,J.then(te)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const i=r.length?r[0]:n;return h.ctx&&s(h.ctx[t],h.ctx[t]=i)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](i),p&&de(e,t)),n})):[],h.update(),p=!0,a(h.before_update),h.fragment=!!i&&i(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(C)}else h.fragment&&h.fragment.c();n.intro&&se(e.$$.fragment),he(e,n.target,n.anchor,n.customElement),te()}G(f)}class me{$destroy(){pe(this,1),this.$destroy=t}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ve(e){const t=e-1;return t*t*t+1}function ye(e,t,n={}){const r=getComputedStyle(e),i="none"===r.transform?"":r.transform,o=t.from.width/e.clientWidth,a=t.from.height/e.clientHeight,u=(t.from.left-t.to.left)/o,l=(t.from.top-t.to.top)/a,c=Math.sqrt(u*u+l*l),{delay:f=0,duration:h=(e=>120*Math.sqrt(e)),easing:p=ve}=n;return{delay:f,duration:s(h)?h(c):h,easing:p,css:(e,t)=>`transform: ${i} translate(${t*u}px, ${t*l}px);`}}const{Map:be}=le;function De(e){k(e,"hjc5c6",".dragdroplist.svelte-hjc5c6.svelte-hjc5c6{position:relative;padding:0}.list.svelte-hjc5c6.svelte-hjc5c6{cursor:grab;z-index:5;display:flex;flex-direction:column}.item.svelte-hjc5c6.svelte-hjc5c6{box-sizing:border-box;display:inline-flex;width:100%;margin-bottom:0.5em;border-radius:2px;user-select:none;margin:5px;padding:0;background-color:var(--quizdown-color-secondary);border:3px solid transparent}.item.svelte-hjc5c6.svelte-hjc5c6:last-child{margin-bottom:0}.item.svelte-hjc5c6.svelte-hjc5c6:not(#grabbed):not(#ghost){z-index:10}.item.svelte-hjc5c6>.svelte-hjc5c6{margin:auto auto auto 0}.buttons.svelte-hjc5c6.svelte-hjc5c6{width:32px;min-width:32px;margin:auto 0;display:flex;flex-direction:column}.buttons.svelte-hjc5c6 button.svelte-hjc5c6{cursor:pointer;width:18px;height:18px;margin:0 auto;padding:0;border:1px solid rgba(0, 0, 0, 0);background-color:inherit}.buttons.svelte-hjc5c6 button.svelte-hjc5c6:focus{border:1px solid black}.delete.svelte-hjc5c6.svelte-hjc5c6{width:32px}#grabbed.svelte-hjc5c6.svelte-hjc5c6{opacity:0}#ghost.svelte-hjc5c6.svelte-hjc5c6{pointer-events:none;z-index:-5;position:absolute;top:0;left:0;opacity:0;border:3px solid var(--quizdown-color-primary);background-color:var(--quizdown-color-secondary)}#ghost.svelte-hjc5c6 .svelte-hjc5c6{pointer-events:none}#ghost.haunting.svelte-hjc5c6.svelte-hjc5c6{z-index:20;opacity:1}")}function we(e,t,n){const r=e.slice();return r[28]=t[n],r[30]=n,r}function Ee(e){let t,n,r=e[28]+"";return{c(){t=w("p"),n=O(r)},m(e,r){_(e,t,r),E(t,n)},p(e,t){1&t&&r!==(r=e[28]+"")&&$(n,r)},d(e){e&&C(t)}}}function ke(e){let t,n,r=e[28].text+"";return{c(){t=w("p"),n=O(r)},m(e,r){_(e,t,r),E(t,n)},p(e,t){1&t&&r!==(r=e[28].text+"")&&$(n,r)},d(e){e&&C(t)}}}function Ae(e){let t,n,r=e[28].html+"";return{c(){n=N(),t=new B(n)},m(e,i){t.m(r,e,i),_(e,n,i)},p(e,n){1&n&&r!==(r=e[28].html+"")&&t.p(r)},d(e){e&&C(n),e&&t.d()}}}function xe(e){let t,n,r;function i(...t){return e[17](e[30],...t)}return{c(){t=w("button"),t.innerHTML='',L(t,"class","svelte-hjc5c6")},m(e,o){_(e,t,o),n||(r=R(t,"click",i),n=!0)},p(t,n){e=t},d(e){e&&C(t),n=!1,r()}}}function _e(e,r){let i,o,s,u,l,c,f,h,p,d,g,v,y,b,k,A,x,S,O,N,$,I,B,M,P=t;function j(...e){return r[15](r[30],...e)}function G(...e){return r[16](r[30],...e)}function H(e,t){return e[28].html?Ae:e[28].text?ke:Ee}let V=H(r),W=V(r),Y=r[1]&&xe(r);return{key:e,first:null,c(){i=w("div"),o=w("div"),s=w("button"),u=F("svg"),l=F("path"),c=F("path"),h=T(),p=w("button"),d=F("svg"),g=F("path"),v=F("path"),b=T(),k=w("div"),W.c(),A=T(),x=w("div"),Y&&Y.c(),S=T(),L(l,"d","M0 0h24v24H0V0z"),L(l,"fill","none"),L(c,"d","M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6 1.41 1.41z"),L(u,"xmlns","http://www.w3.org/2000/svg"),L(u,"viewBox","0 0 24 24"),L(u,"width","16px"),L(u,"height","16px"),L(s,"class","up svelte-hjc5c6"),L(s,"style",f="visibility: "+(r[30]>0?"":"hidden")+";"),L(g,"d","M0 0h24v24H0V0z"),L(g,"fill","none"),L(v,"d","M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"),L(d,"xmlns","http://www.w3.org/2000/svg"),L(d,"viewBox","0 0 24 24"),L(d,"width","16px"),L(d,"height","16px"),L(p,"class","down svelte-hjc5c6"),L(p,"style",y="visibility: "+(r[30]0?"":"hidden")+";")&&L(s,"style",f),1&t&&y!==(y="visibility: "+(r[30]{if(!v&&e>=c&&(v=!0),v&&e>=f&&(h(1,0),y()),!g)return!1;if(v){const t=0+1*l((e-c)/u);h(t,1-t)}return!0})),p&&(d=z(e,0,1,u,s,l,p)),s||(v=!0),h(0,1),y}(i,I,ye,{duration:200})},d(e){e&&C(i),W.d(),Y&&Y.d(),B=!1,a(M)}}}function Ce(e){let n,r,i,o,s,u,l,c,f,h=[],p=new be,g=e[0];const m=e=>e[28].id?e[28].id:JSON.stringify(e[28]);for(let t=0;ty.get(i)?(D.add(r),w(t)):(b.add(i),h--):(u(n,a),h--)}for(;h--;){const t=e[h];v.has(t.key)||u(t,a)}for(;p;)w(m[p-1]);return m}(h,t,m,1,e,g,p,l,ce,_e,null,we);for(let e=0;e{"data"in e&&n(0,a=e.data),"removesItems"in e&&n(1,s=e.removesItems)},[a,s,r,i,u,l,c,f,h,p,d,g,m,v,function(e){W[e?"unshift":"push"]((()=>{r=e,n(2,r)}))},function(e,t){g(e,e-1)},function(e,t){g(e,e+1)},function(e,t){v(e)},function(e){f(e.clientY,this)},function(e){f(e.touches[0].clientY,this)},function(e){e.stopPropagation(),d(0,e.target)},function(e){e.stopPropagation(),e.preventDefault(),p(e.touches[0])},function(e){e.stopPropagation(),h(e.clientY)},function(e){e.stopPropagation(),h(e.touches[0].clientY)},function(e){e.stopPropagation(),m()},function(e){e.stopPropagation(),m()},function(e){e.stopPropagation(),m(e.touches[0])}]}class Fe extends me{constructor(e){super(),ge(this,e,Se,Ce,u,{data:0,removesItems:1},De)}}function Oe(e){let t,n,r;function i(t){e[4](t)}let o={};return void 0!==e[0].answers&&(o.data=e[0].answers),t=new Fe({props:o}),W.push((()=>function(e,t,n){const r=e.$$.props[t];void 0!==r&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}(t,"data",i))),{c(){fe(t.$$.fragment)},m(e,n){he(t,e,n),r=!0},p(e,[r]){const i={};var o;!n&&1&r&&(n=!0,i.data=e[0].answers,o=()=>n=!1,K.push(o)),t.$set(i)},i(e){r||(se(t.$$.fragment,e),r=!0)},o(e){ue(t.$$.fragment,e),r=!1},d(e){pe(t,e)}}}function Te(e,n,r){let i,o,a,s=t;e.$$.on_destroy.push((()=>s()));let{quiz:u}=n;return e.$$set=e=>{"quiz"in e&&r(2,u=e.quiz)},e.$$.update=()=>{4&e.$$.dirty&&(r(1,i=u.counter),s(),s=l(i,(e=>r(3,a=e)))),12&e.$$.dirty&&r(0,o=u.questions[a]),1&e.$$.dirty&&r(0,o.selected=o.answers.map((e=>e.id)),o)},[o,i,u,a,function(t){e.$$.not_equal(o.answers,t)&&(o.answers=t,r(0,o),r(2,u),r(3,a))}]}class Ne extends me{constructor(e){super(),ge(this,e,Te,Oe,u,{quiz:2},null)}}function Re(e){k(e,"x07nhc","[type='checkbox'].svelte-x07nhc.svelte-x07nhc,[type='radio'].svelte-x07nhc.svelte-x07nhc{display:none}[type='radio'].svelte-x07nhc+span.svelte-x07nhc{border-radius:0.5em}[type='checkbox'].svelte-x07nhc+span.svelte-x07nhc{border-radius:2px}[type='checkbox'].svelte-x07nhc+span.svelte-x07nhc,[type='radio'].svelte-x07nhc+span.svelte-x07nhc{transition-duration:0.3s;background-color:var(--quizdown-color-secondary);display:block;padding:0.5rem;margin:5px;border:3px solid transparent;cursor:pointer}[type='checkbox'].svelte-x07nhc:hover+span.svelte-x07nhc,[type='radio'].svelte-x07nhc:hover+span.svelte-x07nhc{filter:brightness(0.9)}[type='checkbox'].svelte-x07nhc:checked+span.svelte-x07nhc,[type='radio'].svelte-x07nhc:checked+span.svelte-x07nhc{border:3px solid var(--quizdown-color-primary)}")}function Le(e,t,n){const r=e.slice();return r[7]=t[n],r[9]=n,r}function $e(e,t,n){const r=e.slice();return r[7]=t[n],r[9]=n,r}function Ie(e){let t,n=e[1].answers,r=[];for(let t=0;ts()));let{quiz:u}=n;const c=[[],[]];return e.$$set=e=>{"quiz"in e&&r(2,u=e.quiz)},e.$$.update=()=>{4&e.$$.dirty&&(r(0,i=u.counter),s(),s=l(i,(e=>r(3,a=e)))),12&e.$$.dirty&&r(1,o=u.questions[a])},[i,o,u,a,function(){o.selected=function(e,t,n){const r=new Set;for(let t=0;t{const e=i.indexOf(u);-1!==e&&i.splice(e,1),0===i.length&&(r(),r=null)}}}}function He(e,n,r){const i=!Array.isArray(e),o=i?[e]:e,u=n.length<2;return{subscribe:Ge(r,(e=>{let r=!1;const c=[];let f=0,h=t;const p=()=>{if(f)return;h();const r=n(i?c[0]:c,e);u?e(r):h=s(r)?r:t},d=o.map(((e,t)=>l(e,(e=>{c[t]=e,f&=~(1<{f|=1<1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Ct,(function(e,n,r,i,o,a){if(n)t.minimumIntegerDigits=r.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(a)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(St.test(i.stem))t.minimumIntegerDigits=i.stem.length;else if(xt.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(xt,(function(e,n,r,i,o,a){return"*"===r?t.minimumFractionDigits=n.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:o&&a?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+a.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""})),i.options.length&&(t=at(at({},t),Ft(i.options[0])))}else if(_t.test(i.stem))t=at(at({},t),Ft(i.stem));else{var o=Ot(i.stem);o&&(t=at(at({},t),o));var a=Tt(i.stem);a&&(t=at(at({},t),a))}}return t}function Lt(e,t){return{start:e,end:t}}var $t=!!String.prototype.startsWith,It=!!String.fromCodePoint,Bt=!!Object.fromEntries,Mt=!!String.prototype.codePointAt,Pt=!!String.prototype.trimStart,jt=!!String.prototype.trimEnd,zt=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Ut=!0;try{Ut="a"===(null===(At=Jt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===At?void 0:At[0])}catch(e){Ut=!1}var qt,Gt=$t?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},Ht=It?String.fromCodePoint:function(){for(var e=[],t=0;to;){if((n=e[o++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},Vt=Bt?Object.fromEntries:function(e){for(var t={},n=0,r=e;n=n)){var r,i=e.charCodeAt(t);return i<55296||i>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?i:r-56320+(i-55296<<10)+65536}},Yt=Pt?function(e){return e.trimStart()}:function(e){return e.replace(bt,"")},Kt=jt?function(e){return e.trimEnd()}:function(e){return e.replace(Dt,"")};function Jt(e,t){return new RegExp(e,t)}if(Ut){var Xt=Jt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");qt=function(e,t){var n;return Xt.lastIndex=t,null!==(n=Xt.exec(e)[1])&&void 0!==n?n:""}}else qt=function(e,t){for(var n=[];;){var r=Wt(e,t);if(void 0===r||tn(r)||nn(r))break;n.push(r),t+=r>=65536?2:1}return Ht.apply(void 0,n)};var Zt=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var r=[];!this.isEOF();){var i=this.char();if(123===i){if((o=this.parseArgument(e,n)).err)return o;r.push(o.val)}else{if(125===i&&e>0)break;if(35!==i||"plural"!==t&&"selectordinal"!==t){if(60===i&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(rt.UNMATCHED_CLOSING_TAG,Lt(this.clonePosition(),this.clonePosition()))}if(60===i&&!this.ignoreTag&&Qt(this.peek()||0)){if((o=this.parseTag(e,t)).err)return o;r.push(o.val)}else{var o;if((o=this.parseLiteral(e,t)).err)return o;r.push(o.val)}}else{var a=this.clonePosition();this.bump(),r.push({type:it.pound,location:Lt(a,this.clonePosition())})}}}return{val:r,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:it.literal,value:"<"+r+"/>",location:Lt(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var o=i.val,a=this.clonePosition();if(this.bumpIf("")?{val:{type:it.tag,value:r,children:o,location:Lt(n,this.clonePosition())},err:null}:this.error(rt.INVALID_TAG,Lt(a,this.clonePosition())))}return this.error(rt.UNCLOSED_TAG,Lt(n,this.clonePosition()))}return this.error(rt.INVALID_TAG,Lt(n,this.clonePosition()))},e.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&en(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r="";;){var i=this.tryParseQuote(t);if(i)r+=i;else{var o=this.tryParseUnquoted(e,t);if(o)r+=o;else{var a=this.tryParseLeftAngleBracket();if(!a)break;r+=a}}}var s=Lt(n,this.clonePosition());return{val:{type:it.literal,value:r,location:s},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(Qt(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(n);this.bump()}return Ht.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===t||"selectordinal"===t)||125===n&&e>0?null:(this.bump(),Ht(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(rt.EXPECT_ARGUMENT_CLOSING_BRACE,Lt(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(rt.EMPTY_ARGUMENT,Lt(n,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(rt.MALFORMED_ARGUMENT,Lt(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(rt.EXPECT_ARGUMENT_CLOSING_BRACE,Lt(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:it.argument,value:r,location:Lt(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(rt.EXPECT_ARGUMENT_CLOSING_BRACE,Lt(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(rt.MALFORMED_ARGUMENT,Lt(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=qt(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:Lt(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,r){var i,o=this.clonePosition(),a=this.parseIdentifierIfPossible().value,s=this.clonePosition();switch(a){case"":return this.error(rt.EXPECT_ARGUMENT_TYPE,Lt(o,s));case"number":case"date":case"time":this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var l=this.clonePosition();if((m=this.parseSimpleArgStyleIfPossible()).err)return m;if(0===(h=Kt(m.val)).length)return this.error(rt.EXPECT_ARGUMENT_STYLE,Lt(this.clonePosition(),this.clonePosition()));u={style:h,styleLocation:Lt(l,this.clonePosition())}}if((v=this.tryParseArgumentClose(r)).err)return v;var c=Lt(r,this.clonePosition());if(u&&Gt(null==u?void 0:u.style,"::",0)){var f=Yt(u.style.slice(2));if("number"===a)return(m=this.parseNumberSkeletonFromString(f,u.styleLocation)).err?m:{val:{type:it.number,value:n,location:c,style:m.val},err:null};if(0===f.length)return this.error(rt.EXPECT_DATE_TIME_SKELETON,c);var h={type:ot.dateTime,pattern:f,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?Et(f):{}};return{val:{type:"date"===a?it.date:it.time,value:n,location:c,style:h},err:null}}return{val:{type:"number"===a?it.number:"date"===a?it.date:it.time,value:n,location:c,style:null!==(i=null==u?void 0:u.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":var p=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(rt.EXPECT_SELECT_ARGUMENT_OPTIONS,Lt(p,at({},p)));this.bumpSpace();var d=this.parseIdentifierIfPossible(),g=0;if("select"!==a&&"offset"===d.value){if(!this.bumpIf(":"))return this.error(rt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Lt(this.clonePosition(),this.clonePosition()));var m;if(this.bumpSpace(),(m=this.tryParseDecimalInteger(rt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,rt.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return m;this.bumpSpace(),d=this.parseIdentifierIfPossible(),g=m.val}var v,y=this.tryParsePluralOrSelectOptions(e,a,t,d);if(y.err)return y;if((v=this.tryParseArgumentClose(r)).err)return v;var b=Lt(r,this.clonePosition());return"select"===a?{val:{type:it.select,value:n,options:Vt(y.val),location:b},err:null}:{val:{type:it.plural,value:n,options:Vt(y.val),offset:g,pluralType:"plural"===a?"cardinal":"ordinal",location:b},err:null};default:return this.error(rt.INVALID_ARGUMENT_TYPE,Lt(o,s))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(rt.EXPECT_ARGUMENT_CLOSING_BRACE,Lt(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(rt.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Lt(n,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],n=0,r=e.split(kt).filter((function(e){return e.length>0}));n=48&&a<=57))break;i=!0,o=10*o+(a-48),this.bump()}var s=Lt(r,this.clonePosition());return i?zt(o*=n)?{val:o,err:null}:this.error(t,s):this.error(e,s)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=Wt(this.message,e);if(void 0===t)throw Error("Offset "+e+" is at invalid UTF-16 code unit boundary");return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(Gt(this.message,e,this.offset())){for(var t=0;t=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset "+e+" must be greater than or equal to the current offset "+this.offset());for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset "+e+" is at invalid UTF-16 code unit boundary");if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&tn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();function Qt(e){return e>=97&&e<=122||e>=65&&e<=90}function en(e){return 45===e||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function tn(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function nn(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function rn(e){e.forEach((function(e){if(delete e.location,pt(e)||dt(e))for(var t in e.options)delete e.options[t].location,rn(e.options[t].value);else ct(e)&&vt(e.style)||(ft(e)||ht(e))&&yt(e.style)?delete e.style.location:mt(e)&&rn(e.children)}))}function on(e,t){void 0===t&&(t={}),t=at({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Zt(e,t).parse();if(n.err){var r=SyntaxError(rt[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||rn(n.val),n.val}function an(e,t){var n=t&&t.cache?t.cache:dn,r=t&&t.serializer?t.serializer:fn;return(t&&t.strategy?t.strategy:cn)(e,{cache:n,serializer:r})}function sn(e,t,n,r){var i,o=null==(i=r)||"number"==typeof i||"boolean"==typeof i?r:n(r),a=t.get(o);return void 0===a&&(a=e.call(this,r),t.set(o,a)),a}function un(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return void 0===o&&(o=e.apply(this,r),t.set(i,o)),o}function ln(e,t,n,r,i){return n.bind(t,e,r,i)}function cn(e,t){return ln(e,this,1===e.length?sn:un,t.cache.create(),t.serializer)}var fn=function(){return JSON.stringify(arguments)};function hn(){this.cache=Object.create(null)}hn.prototype.has=function(e){return e in this.cache},hn.prototype.get=function(e){return this.cache[e]},hn.prototype.set=function(e,t){this.cache[e]=t};var pn,dn={create:function(){return new hn}},gn={variadic:function(e,t){return ln(e,this,un,t.cache.create(),t.serializer)},monadic:function(e,t){return ln(e,this,sn,t.cache.create(),t.serializer)}};!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(pn||(pn={}));var mn,vn=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.code=n,i.originalMessage=r,i}return nt(t,e),t.prototype.toString=function(){return"[formatjs Error: "+this.code+"] "+this.message},t}(Error),yn=function(e){function t(t,n,r,i){return e.call(this,'Invalid values for "'+t+'": "'+n+'". Options are "'+Object.keys(r).join('", "')+'"',pn.INVALID_VALUE,i)||this}return nt(t,e),t}(vn),bn=function(e){function t(t,n,r){return e.call(this,'Value for "'+t+'" must be of type '+n,pn.INVALID_VALUE,r)||this}return nt(t,e),t}(vn),Dn=function(e){function t(t,n){return e.call(this,'The intl string context variable "'+t+'" was not provided to the string "'+n+'"',pn.MISSING_VALUE,n)||this}return nt(t,e),t}(vn);function wn(e){return"function"==typeof e}function En(e,t,n,r,i,o,a){if(1===e.length&&ut(e[0]))return[{type:mn.literal,value:e[0].value}];for(var s=[],u=0,l=e;un?(t in _n||(_n[t]={}),e in _n[t]||(_n[t][e]=n),n):n,Sn=(e,t)=>{if(null==t)return;if(t in _n&&e in _n[t])return _n[t][e];const n=Vn(t);for(let r=0;r0){const t=n.slice(e,n.length).join(".");if(t in r){r=r[t];break}}r=r[n[e]]}else r=void 0;return r}(function(e){return Fn[e]||null}(e),t):null}function Rn(e,...t){delete _n[e],On.update((n=>(n[e]=et.all([n[e]||{},...t]),n)))}He([On],(([e])=>Object.keys(e))),On.subscribe((e=>Fn=e));const Ln={};function $n(e){return Ln[e]}function In(e){return Vn(e).some((e=>{var t;return null===(t=$n(e))||void 0===t?void 0:t.size}))}const Bn={};function Mn(e){if(!In(e))return e in Bn?Bn[e]:void 0;const t=function(e){return Vn(e).map((e=>{const t=$n(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return Bn[e]=Promise.all(t.map((([e,t])=>function(e,t){return Promise.all(t.map((t=>(function(e,t){Ln[e].delete(t),0===Ln[e].size&&delete Ln[e]}(e,t),t().then((e=>e.default||e)))))).then((t=>Rn(e,...t)))}(e,t)))).then((()=>{if(In(e))return Mn(e);delete Bn[e]})),Bn[e]} +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).quizdown={})}(this,(function(e){"use strict";function t(){}const n=e=>e;function r(e,t){for(const n in t)e[n]=t[n];return e}function i(e){return e()}function o(){return Object.create(null)}function a(e){e.forEach(i)}function s(e){return"function"==typeof e}function u(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function l(e,...n){if(null==e)return t;const r=e.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}function c(e){let t;return l(e,(e=>t=e))(),t}function f(e,t,n){e.$$.on_destroy.push(l(t,n))}function h(e,t,n,i){return e[1]&&i?r(n.ctx.slice(),e[1](i(t))):n.ctx}function p(e,t,n,r,i,o,a){const s=function(e,t,n,r){if(e[2]&&r){const i=e[2](r(n));if(void 0===t.dirty)return i;if("object"==typeof i){const e=[],n=Math.max(t.dirty.length,i.length);for(let r=0;rwindow.performance.now():()=>Date.now(),v=g?e=>requestAnimationFrame(e):t;const y=new Set;function b(e){y.forEach((t=>{t.c(e)||(y.delete(t),t.f())})),0!==y.size&&v(b)}function D(e){let t;return 0===y.size&&v(b),{promise:new Promise((n=>{y.add(t={c:e,f:n})})),abort(){y.delete(t)}}}function w(e){return document.createElement(e)}function E(e,t){e.appendChild(t)}function k(e,t,n,r=`svelte-${t}-style`){const i=x(e);if(!function(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}([i,"optionalAccess",e=>e.querySelector,"call",e=>e("#"+r)])){const e=w("style");e.id=r,e.textContent=n,E(i,e)}}function A(e){return e?e.getRootNode?e.getRootNode():e.ownerDocument:document}function x(e){const t=A(e);return t.host?t:t.head}function _(e,t,n){e.insertBefore(t,n||null)}function C(e){e.parentNode.removeChild(e)}function S(e,t){for(let n=0;ne.removeEventListener(t,n,r)}function L(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function $(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function I(e,t,n,r){e.style.setProperty(t,n,r?"important":"")}class B{constructor(e=null){this.a=e,this.e=this.n=null}m(e,t,n=null){this.e||(this.e=w(t.nodeName),this.t=t,this.h(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t>>0}(c)}_${s}`,h=A(e);M.add(h);const p=h.__svelte_stylesheet||(h.__svelte_stylesheet=function(e){return x(e).appendChild(w("style"))}(e).sheet),d=h.__svelte_rules||(h.__svelte_rules={});d[f]||(d[f]=!0,p.insertRule(`@keyframes ${f} ${c}`,p.cssRules.length));const g=e.style.animation||"";return e.style.animation=`${g?`${g}, `:""}${f} ${r}ms linear ${i}ms 1 both`,j+=1,f}function q(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),i=n.length-r.length;i&&(e.style.animation=r.join(", "),j-=i,j||v((()=>{j||(M.forEach((e=>{const t=e.__svelte_stylesheet;let n=t.cssRules.length;for(;n--;)t.deleteRule(n);e.__svelte_rules={}})),M.clear())})))}function U(e){const t=getComputedStyle(e);if("absolute"!==t.position&&"fixed"!==t.position){const{width:n,height:r}=t,i=e.getBoundingClientRect();e.style.position="absolute",e.style.width=n,e.style.height=r,function(e,t){const n=e.getBoundingClientRect();if(t.left!==n.left||t.top!==n.top){const r=getComputedStyle(e),i="none"===r.transform?"":r.transform;e.style.transform=`${i} translate(${t.left-n.left}px, ${t.top-n.top}px)`}}(e,i)}}function G(e){P=e}function H(e){(function(){if(!P)throw new Error("Function called outside component initialization");return P})().$$.on_mount.push(e)}const V=[],W=[],Y=[],K=[],J=Promise.resolve();let X=!1;function Z(e){Y.push(e)}let Q=!1;const ee=new Set;function te(){if(!Q){Q=!0;do{for(let e=0;e{re.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}}const le="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ce(e,t){e.f(),function(e,t){e.d(1),t.delete(e.key)}(e,t)}function fe(e){e&&e.c()}function he(e,t,n,r){const{fragment:o,on_mount:u,on_destroy:l,after_update:c}=e.$$;o&&o.m(t,n),r||Z((()=>{const t=u.map(i).filter(s);l?l.push(...t):a(t),e.$$.on_mount=[]})),c.forEach(Z)}function pe(e,t){const n=e.$$;null!==n.fragment&&(a(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function de(e,t){-1===e.$$.dirty[0]&&(V.push(e),X||(X=!0,J.then(te)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const i=r.length?r[0]:n;return h.ctx&&s(h.ctx[t],h.ctx[t]=i)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](i),p&&de(e,t)),n})):[],h.update(),p=!0,a(h.before_update),h.fragment=!!i&&i(h.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);h.fragment&&h.fragment.l(e),e.forEach(C)}else h.fragment&&h.fragment.c();n.intro&&se(e.$$.fragment),he(e,n.target,n.anchor,n.customElement),te()}G(f)}class me{$destroy(){pe(this,1),this.$destroy=t}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ve(e){const t=e-1;return t*t*t+1}function ye(e,t,n={}){const r=getComputedStyle(e),i="none"===r.transform?"":r.transform,o=t.from.width/e.clientWidth,a=t.from.height/e.clientHeight,u=(t.from.left-t.to.left)/o,l=(t.from.top-t.to.top)/a,c=Math.sqrt(u*u+l*l),{delay:f=0,duration:h=(e=>120*Math.sqrt(e)),easing:p=ve}=n;return{delay:f,duration:s(h)?h(c):h,easing:p,css:(e,t)=>`transform: ${i} translate(${t*u}px, ${t*l}px);`}}const{Map:be}=le;function De(e){k(e,"hjc5c6",".dragdroplist.svelte-hjc5c6.svelte-hjc5c6{position:relative;padding:0}.list.svelte-hjc5c6.svelte-hjc5c6{cursor:grab;z-index:5;display:flex;flex-direction:column}.item.svelte-hjc5c6.svelte-hjc5c6{box-sizing:border-box;display:inline-flex;width:100%;margin-bottom:0.5em;border-radius:2px;user-select:none;margin:5px;padding:0;background-color:var(--quizdown-color-secondary);border:3px solid transparent}.item.svelte-hjc5c6.svelte-hjc5c6:last-child{margin-bottom:0}.item.svelte-hjc5c6.svelte-hjc5c6:not(#grabbed):not(#ghost){z-index:10}.item.svelte-hjc5c6>.svelte-hjc5c6{margin:auto auto auto 0}.buttons.svelte-hjc5c6.svelte-hjc5c6{width:32px;min-width:32px;margin:auto 0;display:flex;flex-direction:column}.buttons.svelte-hjc5c6 button.svelte-hjc5c6{cursor:pointer;width:18px;height:18px;margin:0 auto;padding:0;border:1px solid rgba(0, 0, 0, 0);background-color:inherit}.buttons.svelte-hjc5c6 button.svelte-hjc5c6:focus{border:1px solid black}.delete.svelte-hjc5c6.svelte-hjc5c6{width:32px}#grabbed.svelte-hjc5c6.svelte-hjc5c6{opacity:0}#ghost.svelte-hjc5c6.svelte-hjc5c6{pointer-events:none;z-index:-5;position:absolute;top:0;left:0;opacity:0;border:3px solid var(--quizdown-color-primary);background-color:var(--quizdown-color-secondary)}#ghost.svelte-hjc5c6 .svelte-hjc5c6{pointer-events:none}#ghost.haunting.svelte-hjc5c6.svelte-hjc5c6{z-index:20;opacity:1}")}function we(e,t,n){const r=e.slice();return r[28]=t[n],r[30]=n,r}function Ee(e){let t,n,r=e[28]+"";return{c(){t=w("p"),n=O(r)},m(e,r){_(e,t,r),E(t,n)},p(e,t){1&t&&r!==(r=e[28]+"")&&$(n,r)},d(e){e&&C(t)}}}function ke(e){let t,n,r=e[28].text+"";return{c(){t=w("p"),n=O(r)},m(e,r){_(e,t,r),E(t,n)},p(e,t){1&t&&r!==(r=e[28].text+"")&&$(n,r)},d(e){e&&C(t)}}}function Ae(e){let t,n,r=e[28].html+"";return{c(){n=N(),t=new B(n)},m(e,i){t.m(r,e,i),_(e,n,i)},p(e,n){1&n&&r!==(r=e[28].html+"")&&t.p(r)},d(e){e&&C(n),e&&t.d()}}}function xe(e){let t,n,r;function i(...t){return e[17](e[30],...t)}return{c(){t=w("button"),t.innerHTML='',L(t,"class","svelte-hjc5c6")},m(e,o){_(e,t,o),n||(r=R(t,"click",i),n=!0)},p(t,n){e=t},d(e){e&&C(t),n=!1,r()}}}function _e(e,r){let i,o,s,u,l,c,f,h,p,d,g,v,y,b,k,A,x,S,O,N,$,I,B,M,P=t;function j(...e){return r[15](r[30],...e)}function G(...e){return r[16](r[30],...e)}function H(e,t){return e[28].html?Ae:e[28].text?ke:Ee}let V=H(r),W=V(r),Y=r[1]&&xe(r);return{key:e,first:null,c(){i=w("div"),o=w("div"),s=w("button"),u=F("svg"),l=F("path"),c=F("path"),h=T(),p=w("button"),d=F("svg"),g=F("path"),v=F("path"),b=T(),k=w("div"),W.c(),A=T(),x=w("div"),Y&&Y.c(),S=T(),L(l,"d","M0 0h24v24H0V0z"),L(l,"fill","none"),L(c,"d","M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6 1.41 1.41z"),L(u,"xmlns","http://www.w3.org/2000/svg"),L(u,"viewBox","0 0 24 24"),L(u,"width","16px"),L(u,"height","16px"),L(s,"class","up svelte-hjc5c6"),L(s,"style",f="visibility: "+(r[30]>0?"":"hidden")+";"),L(g,"d","M0 0h24v24H0V0z"),L(g,"fill","none"),L(v,"d","M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"),L(d,"xmlns","http://www.w3.org/2000/svg"),L(d,"viewBox","0 0 24 24"),L(d,"width","16px"),L(d,"height","16px"),L(p,"class","down svelte-hjc5c6"),L(p,"style",y="visibility: "+(r[30]0?"":"hidden")+";")&&L(s,"style",f),1&t&&y!==(y="visibility: "+(r[30]{if(!v&&e>=c&&(v=!0),v&&e>=f&&(h(1,0),y()),!g)return!1;if(v){const t=0+1*l((e-c)/u);h(t,1-t)}return!0})),p&&(d=z(e,0,1,u,s,l,p)),s||(v=!0),h(0,1),y}(i,I,ye,{duration:200})},d(e){e&&C(i),W.d(),Y&&Y.d(),B=!1,a(M)}}}function Ce(e){let n,r,i,o,s,u,l,c,f,h=[],p=new be,g=e[0];const m=e=>e[28].id?e[28].id:JSON.stringify(e[28]);for(let t=0;ty.get(i)?(D.add(r),w(t)):(b.add(i),h--):(u(n,a),h--)}for(;h--;){const t=e[h];v.has(t.key)||u(t,a)}for(;p;)w(m[p-1]);return m}(h,t,m,1,e,g,p,l,ce,_e,null,we);for(let e=0;e{"data"in e&&n(0,a=e.data),"removesItems"in e&&n(1,s=e.removesItems)},[a,s,r,i,u,l,c,f,h,p,d,g,m,v,function(e){W[e?"unshift":"push"]((()=>{r=e,n(2,r)}))},function(e,t){g(e,e-1)},function(e,t){g(e,e+1)},function(e,t){v(e)},function(e){f(e.clientY,this)},function(e){f(e.touches[0].clientY,this)},function(e){e.stopPropagation(),d(0,e.target)},function(e){e.stopPropagation(),e.preventDefault(),p(e.touches[0])},function(e){e.stopPropagation(),h(e.clientY)},function(e){e.stopPropagation(),h(e.touches[0].clientY)},function(e){e.stopPropagation(),m()},function(e){e.stopPropagation(),m()},function(e){e.stopPropagation(),m(e.touches[0])}]}class Fe extends me{constructor(e){super(),ge(this,e,Se,Ce,u,{data:0,removesItems:1},De)}}function Oe(e){let t,n,r;function i(t){e[4](t)}let o={};return void 0!==e[0].answers&&(o.data=e[0].answers),t=new Fe({props:o}),W.push((()=>function(e,t,n){const r=e.$$.props[t];void 0!==r&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}(t,"data",i))),{c(){fe(t.$$.fragment)},m(e,n){he(t,e,n),r=!0},p(e,[r]){const i={};var o;!n&&1&r&&(n=!0,i.data=e[0].answers,o=()=>n=!1,K.push(o)),t.$set(i)},i(e){r||(se(t.$$.fragment,e),r=!0)},o(e){ue(t.$$.fragment,e),r=!1},d(e){pe(t,e)}}}function Te(e,n,r){let i,o,a,s=t;e.$$.on_destroy.push((()=>s()));let{quiz:u}=n;return e.$$set=e=>{"quiz"in e&&r(2,u=e.quiz)},e.$$.update=()=>{4&e.$$.dirty&&(r(1,i=u.counter),s(),s=l(i,(e=>r(3,a=e)))),12&e.$$.dirty&&r(0,o=u.questions[a]),1&e.$$.dirty&&r(0,o.selected=o.answers.map((e=>e.id)),o)},[o,i,u,a,function(t){e.$$.not_equal(o.answers,t)&&(o.answers=t,r(0,o),r(2,u),r(3,a))}]}class Ne extends me{constructor(e){super(),ge(this,e,Te,Oe,u,{quiz:2},null)}}function Re(e){k(e,"x07nhc","[type='checkbox'].svelte-x07nhc.svelte-x07nhc,[type='radio'].svelte-x07nhc.svelte-x07nhc{display:none}[type='radio'].svelte-x07nhc+span.svelte-x07nhc{border-radius:0.5em}[type='checkbox'].svelte-x07nhc+span.svelte-x07nhc{border-radius:2px}[type='checkbox'].svelte-x07nhc+span.svelte-x07nhc,[type='radio'].svelte-x07nhc+span.svelte-x07nhc{transition-duration:0.3s;background-color:var(--quizdown-color-secondary);display:block;padding:0.5rem;margin:5px;border:3px solid transparent;cursor:pointer}[type='checkbox'].svelte-x07nhc:hover+span.svelte-x07nhc,[type='radio'].svelte-x07nhc:hover+span.svelte-x07nhc{filter:brightness(0.9)}[type='checkbox'].svelte-x07nhc:checked+span.svelte-x07nhc,[type='radio'].svelte-x07nhc:checked+span.svelte-x07nhc{border:3px solid var(--quizdown-color-primary)}")}function Le(e,t,n){const r=e.slice();return r[7]=t[n],r[9]=n,r}function $e(e,t,n){const r=e.slice();return r[7]=t[n],r[9]=n,r}function Ie(e){let t,n=e[1].answers,r=[];for(let t=0;ts()));let{quiz:u}=n;const c=[[],[]];return e.$$set=e=>{"quiz"in e&&r(2,u=e.quiz)},e.$$.update=()=>{4&e.$$.dirty&&(r(0,i=u.counter),s(),s=l(i,(e=>r(3,a=e)))),12&e.$$.dirty&&r(1,o=u.questions[a])},[i,o,u,a,function(){o.selected=function(e,t,n){const r=new Set;for(let t=0;t{const e=i.indexOf(u);-1!==e&&i.splice(e,1),0===i.length&&(r(),r=null)}}}}function He(e,n,r){const i=!Array.isArray(e),o=i?[e]:e,u=n.length<2;return{subscribe:Ge(r,(e=>{let r=!1;const c=[];let f=0,h=t;const p=()=>{if(f)return;h();const r=n(i?c[0]:c,e);u?e(r):h=s(r)?r:t},d=o.map(((e,t)=>l(e,(e=>{c[t]=e,f&=~(1<{f|=1<1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Ct,(function(e,n,r,i,o,a){if(n)t.minimumIntegerDigits=r.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(a)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(St.test(i.stem))t.minimumIntegerDigits=i.stem.length;else if(xt.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(xt,(function(e,n,r,i,o,a){return"*"===r?t.minimumFractionDigits=n.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:o&&a?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+a.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""})),i.options.length&&(t=at(at({},t),Ft(i.options[0])))}else if(_t.test(i.stem))t=at(at({},t),Ft(i.stem));else{var o=Ot(i.stem);o&&(t=at(at({},t),o));var a=Tt(i.stem);a&&(t=at(at({},t),a))}}return t}function Lt(e,t){return{start:e,end:t}}var $t=!!String.prototype.startsWith,It=!!String.fromCodePoint,Bt=!!Object.fromEntries,Mt=!!String.prototype.codePointAt,Pt=!!String.prototype.trimStart,jt=!!String.prototype.trimEnd,zt=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},qt=!0;try{qt="a"===(null===(At=Jt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===At?void 0:At[0])}catch(e){qt=!1}var Ut,Gt=$t?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},Ht=It?String.fromCodePoint:function(){for(var e=[],t=0;to;){if((n=e[o++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},Vt=Bt?Object.fromEntries:function(e){for(var t={},n=0,r=e;n=n)){var r,i=e.charCodeAt(t);return i<55296||i>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?i:r-56320+(i-55296<<10)+65536}},Yt=Pt?function(e){return e.trimStart()}:function(e){return e.replace(bt,"")},Kt=jt?function(e){return e.trimEnd()}:function(e){return e.replace(Dt,"")};function Jt(e,t){return new RegExp(e,t)}if(qt){var Xt=Jt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ut=function(e,t){var n;return Xt.lastIndex=t,null!==(n=Xt.exec(e)[1])&&void 0!==n?n:""}}else Ut=function(e,t){for(var n=[];;){var r=Wt(e,t);if(void 0===r||tn(r)||nn(r))break;n.push(r),t+=r>=65536?2:1}return Ht.apply(void 0,n)};var Zt=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var r=[];!this.isEOF();){var i=this.char();if(123===i){if((o=this.parseArgument(e,n)).err)return o;r.push(o.val)}else{if(125===i&&e>0)break;if(35!==i||"plural"!==t&&"selectordinal"!==t){if(60===i&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(rt.UNMATCHED_CLOSING_TAG,Lt(this.clonePosition(),this.clonePosition()))}if(60===i&&!this.ignoreTag&&Qt(this.peek()||0)){if((o=this.parseTag(e,t)).err)return o;r.push(o.val)}else{var o;if((o=this.parseLiteral(e,t)).err)return o;r.push(o.val)}}else{var a=this.clonePosition();this.bump(),r.push({type:it.pound,location:Lt(a,this.clonePosition())})}}}return{val:r,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:it.literal,value:"<"+r+"/>",location:Lt(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var o=i.val,a=this.clonePosition();if(this.bumpIf("")?{val:{type:it.tag,value:r,children:o,location:Lt(n,this.clonePosition())},err:null}:this.error(rt.INVALID_TAG,Lt(a,this.clonePosition())))}return this.error(rt.UNCLOSED_TAG,Lt(n,this.clonePosition()))}return this.error(rt.INVALID_TAG,Lt(n,this.clonePosition()))},e.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&en(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r="";;){var i=this.tryParseQuote(t);if(i)r+=i;else{var o=this.tryParseUnquoted(e,t);if(o)r+=o;else{var a=this.tryParseLeftAngleBracket();if(!a)break;r+=a}}}var s=Lt(n,this.clonePosition());return{val:{type:it.literal,value:r,location:s},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(Qt(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(n);this.bump()}return Ht.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===t||"selectordinal"===t)||125===n&&e>0?null:(this.bump(),Ht(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(rt.EXPECT_ARGUMENT_CLOSING_BRACE,Lt(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(rt.EMPTY_ARGUMENT,Lt(n,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(rt.MALFORMED_ARGUMENT,Lt(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(rt.EXPECT_ARGUMENT_CLOSING_BRACE,Lt(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:it.argument,value:r,location:Lt(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(rt.EXPECT_ARGUMENT_CLOSING_BRACE,Lt(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(rt.MALFORMED_ARGUMENT,Lt(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=Ut(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:Lt(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,r){var i,o=this.clonePosition(),a=this.parseIdentifierIfPossible().value,s=this.clonePosition();switch(a){case"":return this.error(rt.EXPECT_ARGUMENT_TYPE,Lt(o,s));case"number":case"date":case"time":this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var l=this.clonePosition();if((m=this.parseSimpleArgStyleIfPossible()).err)return m;if(0===(h=Kt(m.val)).length)return this.error(rt.EXPECT_ARGUMENT_STYLE,Lt(this.clonePosition(),this.clonePosition()));u={style:h,styleLocation:Lt(l,this.clonePosition())}}if((v=this.tryParseArgumentClose(r)).err)return v;var c=Lt(r,this.clonePosition());if(u&&Gt(null==u?void 0:u.style,"::",0)){var f=Yt(u.style.slice(2));if("number"===a)return(m=this.parseNumberSkeletonFromString(f,u.styleLocation)).err?m:{val:{type:it.number,value:n,location:c,style:m.val},err:null};if(0===f.length)return this.error(rt.EXPECT_DATE_TIME_SKELETON,c);var h={type:ot.dateTime,pattern:f,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?Et(f):{}};return{val:{type:"date"===a?it.date:it.time,value:n,location:c,style:h},err:null}}return{val:{type:"number"===a?it.number:"date"===a?it.date:it.time,value:n,location:c,style:null!==(i=null==u?void 0:u.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":var p=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(rt.EXPECT_SELECT_ARGUMENT_OPTIONS,Lt(p,at({},p)));this.bumpSpace();var d=this.parseIdentifierIfPossible(),g=0;if("select"!==a&&"offset"===d.value){if(!this.bumpIf(":"))return this.error(rt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Lt(this.clonePosition(),this.clonePosition()));var m;if(this.bumpSpace(),(m=this.tryParseDecimalInteger(rt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,rt.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return m;this.bumpSpace(),d=this.parseIdentifierIfPossible(),g=m.val}var v,y=this.tryParsePluralOrSelectOptions(e,a,t,d);if(y.err)return y;if((v=this.tryParseArgumentClose(r)).err)return v;var b=Lt(r,this.clonePosition());return"select"===a?{val:{type:it.select,value:n,options:Vt(y.val),location:b},err:null}:{val:{type:it.plural,value:n,options:Vt(y.val),offset:g,pluralType:"plural"===a?"cardinal":"ordinal",location:b},err:null};default:return this.error(rt.INVALID_ARGUMENT_TYPE,Lt(o,s))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(rt.EXPECT_ARGUMENT_CLOSING_BRACE,Lt(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(rt.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Lt(n,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],n=0,r=e.split(kt).filter((function(e){return e.length>0}));n=48&&a<=57))break;i=!0,o=10*o+(a-48),this.bump()}var s=Lt(r,this.clonePosition());return i?zt(o*=n)?{val:o,err:null}:this.error(t,s):this.error(e,s)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=Wt(this.message,e);if(void 0===t)throw Error("Offset "+e+" is at invalid UTF-16 code unit boundary");return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(Gt(this.message,e,this.offset())){for(var t=0;t=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset "+e+" must be greater than or equal to the current offset "+this.offset());for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset "+e+" is at invalid UTF-16 code unit boundary");if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&tn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();function Qt(e){return e>=97&&e<=122||e>=65&&e<=90}function en(e){return 45===e||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function tn(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function nn(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function rn(e){e.forEach((function(e){if(delete e.location,pt(e)||dt(e))for(var t in e.options)delete e.options[t].location,rn(e.options[t].value);else ct(e)&&vt(e.style)||(ft(e)||ht(e))&&yt(e.style)?delete e.style.location:mt(e)&&rn(e.children)}))}function on(e,t){void 0===t&&(t={}),t=at({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Zt(e,t).parse();if(n.err){var r=SyntaxError(rt[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||rn(n.val),n.val}function an(e,t){var n=t&&t.cache?t.cache:dn,r=t&&t.serializer?t.serializer:fn;return(t&&t.strategy?t.strategy:cn)(e,{cache:n,serializer:r})}function sn(e,t,n,r){var i,o=null==(i=r)||"number"==typeof i||"boolean"==typeof i?r:n(r),a=t.get(o);return void 0===a&&(a=e.call(this,r),t.set(o,a)),a}function un(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return void 0===o&&(o=e.apply(this,r),t.set(i,o)),o}function ln(e,t,n,r,i){return n.bind(t,e,r,i)}function cn(e,t){return ln(e,this,1===e.length?sn:un,t.cache.create(),t.serializer)}var fn=function(){return JSON.stringify(arguments)};function hn(){this.cache=Object.create(null)}hn.prototype.has=function(e){return e in this.cache},hn.prototype.get=function(e){return this.cache[e]},hn.prototype.set=function(e,t){this.cache[e]=t};var pn,dn={create:function(){return new hn}},gn={variadic:function(e,t){return ln(e,this,un,t.cache.create(),t.serializer)},monadic:function(e,t){return ln(e,this,sn,t.cache.create(),t.serializer)}};!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(pn||(pn={}));var mn,vn=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.code=n,i.originalMessage=r,i}return nt(t,e),t.prototype.toString=function(){return"[formatjs Error: "+this.code+"] "+this.message},t}(Error),yn=function(e){function t(t,n,r,i){return e.call(this,'Invalid values for "'+t+'": "'+n+'". Options are "'+Object.keys(r).join('", "')+'"',pn.INVALID_VALUE,i)||this}return nt(t,e),t}(vn),bn=function(e){function t(t,n,r){return e.call(this,'Value for "'+t+'" must be of type '+n,pn.INVALID_VALUE,r)||this}return nt(t,e),t}(vn),Dn=function(e){function t(t,n){return e.call(this,'The intl string context variable "'+t+'" was not provided to the string "'+n+'"',pn.MISSING_VALUE,n)||this}return nt(t,e),t}(vn);function wn(e){return"function"==typeof e}function En(e,t,n,r,i,o,a){if(1===e.length&&ut(e[0]))return[{type:mn.literal,value:e[0].value}];for(var s=[],u=0,l=e;un?(t in _n||(_n[t]={}),e in _n[t]||(_n[t][e]=n),n):n,Sn=(e,t)=>{if(null==t)return;if(t in _n&&e in _n[t])return _n[t][e];const n=Vn(t);for(let r=0;r0){const t=n.slice(e,n.length).join(".");if(t in r){r=r[t];break}}r=r[n[e]]}else r=void 0;return r}(function(e){return Fn[e]||null}(e),t):null}function Rn(e,...t){delete _n[e],On.update((n=>(n[e]=et.all([n[e]||{},...t]),n)))}He([On],(([e])=>Object.keys(e))),On.subscribe((e=>Fn=e));const Ln={};function $n(e){return Ln[e]}function In(e){return Vn(e).some((e=>{var t;return null===(t=$n(e))||void 0===t?void 0:t.size}))}const Bn={};function Mn(e){if(!In(e))return e in Bn?Bn[e]:void 0;const t=function(e){return Vn(e).map((e=>{const t=$n(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return Bn[e]=Promise.all(t.map((([e,t])=>function(e,t){return Promise.all(t.map((t=>(function(e,t){Ln[e].delete(t),0===Ln[e].size&&delete Ln[e]}(e,t),t().then((e=>e.default||e)))))).then((t=>Rn(e,...t)))}(e,t)))).then((()=>{if(In(e))return Mn(e);delete Bn[e]})),Bn[e]} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -12,6 +12,6 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */function Pn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);in.slice(0,t+1).join("-"))).reverse()}function Vn(e,t=zn().fallbackLocale){const n=Hn(e);return t?[...new Set([...n,...Hn(t)])]:n}function Wn(){return qn}Gn.subscribe((e=>{qn=e,"undefined"!=typeof window&&null!==e&&document.documentElement.setAttribute("lang",e)}));const Yn=Gn.set;Gn.set=e=>{if(function(e){if(null==e)return;const t=Vn(e);for(let e=0;eUn.set(!0)),t):Un.set(!0),Mn(e).then((()=>{Yn(e)})).finally((()=>{clearTimeout(n),Un.set(!1)}))}return Yn(e)},Gn.update=e=>Yn(e(qn));const Kn=e=>{const t=Object.create(null);return n=>{const r=JSON.stringify(n);return r in t?t[r]:t[r]=e(n)}},Jn=(e,t)=>{const{formats:n}=zn();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Xn=Kn((e=>{var{locale:t,format:n}=e,r=Pn(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(r=Jn("number",n)),new Intl.NumberFormat(t,r)})),Zn=Kn((e=>{var{locale:t,format:n}=e,r=Pn(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?r=Jn("date",n):0===Object.keys(r).length&&(r=Jn("date","short")),new Intl.DateTimeFormat(t,r)})),Qn=Kn((e=>{var{locale:t,format:n}=e,r=Pn(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?r=Jn("time",n):0===Object.keys(r).length&&(r=Jn("time","short")),new Intl.DateTimeFormat(t,r)})),er=Kn(((e,t=Wn())=>new xn(e,t,zn().formats,{ignoreTag:zn().ignoreTag}))),tr=(e,t={})=>{"object"==typeof e&&(e=(t=e).id);const{values:n,locale:r=Wn(),default:i}=t;if(null==r)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let o=Sn(e,r);if(o){if("string"!=typeof o)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof o}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),o}else zn().warnOnMissingMessages&&console.warn(`[svelte-i18n] The message "${e}" was not found in "${Vn(r).join('", "')}".${In(Wn())?"\n\nNote: there are at least one loader still registered to this locale that wasn't executed.":""}`),o=i||e;if(!n)return o;let a=o;try{a=er(o,r).format(n)}catch(t){console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return a},nr=(e,t)=>((e={})=>{var{locale:t=Wn()}=e,n=Pn(e,["locale"]);return Qn(Object.assign({locale:t},n))})(t).format(e),rr=(e,t)=>((e={})=>{var{locale:t=Wn()}=e,n=Pn(e,["locale"]);return Zn(Object.assign({locale:t},n))})(t).format(e),ir=(e,t)=>((e={})=>{var{locale:t=Wn()}=e,n=Pn(e,["locale"]);return Xn(Object.assign({locale:t},n))})(t).format(e),or=(e,t=Wn())=>Sn(e,t),ar=He([Gn,On],(()=>tr));function sr(e){k(e,"xeqbwq",".top-list-item.svelte-xeqbwq.svelte-xeqbwq{margin-bottom:0.2rem;list-style-type:none}.top-list-item.svelte-xeqbwq.svelte-xeqbwq:hover{cursor:pointer;background-color:var(--quizdown-color-secondary)}.top-list-item.svelte-xeqbwq:hover .list-question.svelte-xeqbwq{text-decoration:underline}.list-comment.svelte-xeqbwq.svelte-xeqbwq{margin-left:2em;list-style-type:initial}")}function ur(e,t,n){const r=e.slice();return r[4]=t[n],r[6]=n,r}function lr(e,t,n){const r=e.slice();return r[7]=t[n],r}function cr(e){let t,n,r,i,o,a=e[4].answers[e[7]].html+"",s=e[4].answers[e[7]].comment+"";return{c(){t=w("li"),n=w("i"),r=O(":\n "),o=T(),i=new B(o),L(t,"class","list-comment svelte-xeqbwq")},m(e,u){_(e,t,u),E(t,n),n.innerHTML=a,E(t,r),i.m(s,t),E(t,o)},p(e,t){1&t&&a!==(a=e[4].answers[e[7]].html+"")&&(n.innerHTML=a),1&t&&s!==(s=e[4].answers[e[7]].comment+"")&&i.p(s)},d(e){e&&C(t)}}}function fr(e){let t,n=""!==e[4].answers[e[7]].comment&&cr(e);return{c(){n&&n.c(),t=N()},m(e,r){n&&n.m(e,r),_(e,t,r)},p(e,r){""!==e[4].answers[e[7]].comment?n?n.p(e,r):(n=cr(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(e){n&&n.d(e),e&&C(t)}}}function hr(e){let t,n,r,i,o,a,s,u,l,c,f,h,p=e[2][+e[4].solved]+"",d=e[6]+1+"",g=e[4].text+"",m=e[4].selected,v=[];for(let t=0;t${e[0].points}`,total:`${e[0].counter.max}`}})+"",a=e[0].questions,s=[];for(let t=0;t${e[0].points}`,total:`${e[0].counter.max}`}})+"")&&(n.innerHTML=o),5&t){let n;for(a=e[0].questions,n=0;nn(1,r=e)));let{quiz:i}=t;return e.$$set=e=>{"quiz"in e&&n(0,i=e.quiz)},[i,r,["❌","✅"],e=>i.jump(e)]}He([Gn],(()=>nr)),He([Gn],(()=>rr)),He([Gn],(()=>ir)),He([Gn,On],(()=>or));class gr extends me{constructor(e){super(),ge(this,e,dr,pr,u,{quiz:0},sr)}}function mr(e){let t,n,r,i,o,a,s,u,l,c,f=e[1]+1+"",h=e[3].text+"",p=null!==e[3].explanation&&""!==e[3].explanation&&yr(e);var d=e[5][e[3].type];function g(e){return{props:{quiz:e[0]}}}return d&&(u=new d(g(e))),{c(){t=w("h3"),n=O("Q"),r=O(f),i=O(": "),a=T(),p&&p.c(),s=T(),u&&fe(u.$$.fragment),l=N(),o=new B(null)},m(e,f){_(e,t,f),E(t,n),E(t,r),E(t,i),o.m(h,t),_(e,a,f),p&&p.m(e,f),_(e,s,f),u&&he(u,e,f),_(e,l,f),c=!0},p(e,t){(!c||2&t)&&f!==(f=e[1]+1+"")&&$(r,f),(!c||8&t)&&h!==(h=e[3].text+"")&&o.p(h),null!==e[3].explanation&&""!==e[3].explanation?p?p.p(e,t):(p=yr(e),p.c(),p.m(s.parentNode,s)):p&&(p.d(1),p=null);const n={};if(1&t&&(n.quiz=e[0]),d!==(d=e[5][e[3].type])){if(u){oe();const e=u;ue(e.$$.fragment,1,0,(()=>{pe(e,1)})),ae()}d?(u=new d(g(e)),fe(u.$$.fragment),se(u.$$.fragment,1),he(u,l.parentNode,l)):u=null}else d&&u.$set(n)},i(e){c||(u&&se(u.$$.fragment,e),c=!0)},o(e){u&&ue(u.$$.fragment,e),c=!1},d(e){e&&C(t),e&&C(a),p&&p.d(e),e&&C(s),e&&C(l),u&&pe(u,e)}}}function vr(e){let t,n,r,i,o,a=e[4]("results_title")+"";return i=new gr({props:{quiz:e[0]}}),{c(){t=w("h3"),n=O(a),r=T(),fe(i.$$.fragment)},m(e,a){_(e,t,a),E(t,n),_(e,r,a),he(i,e,a),o=!0},p(e,t){(!o||16&t)&&a!==(a=e[4]("results_title")+"")&&$(n,a);const r={};1&t&&(r.quiz=e[0]),i.$set(r)},i(e){o||(se(i.$$.fragment,e),o=!0)},o(e){ue(i.$$.fragment,e),o=!1},d(e){e&&C(t),e&&C(r),pe(i,e)}}}function yr(e){let t,n=e[3].explanation+"";return{c(){t=w("p")},m(e,r){_(e,t,r),t.innerHTML=n},p(e,r){8&r&&n!==(n=e[3].explanation+"")&&(t.innerHTML=n)},d(e){e&&C(t)}}}function br(e){let t,n,r,i;const o=[vr,mr],a=[];function s(e,t){return e[1]===e[2].max?0:1}return t=s(e),n=a[t]=o[t](e),{c(){n.c(),r=N()},m(e,n){a[t].m(e,n),_(e,r,n),i=!0},p(e,[i]){let u=t;t=s(e),t===u?a[t].p(e,i):(oe(),ue(a[u],1,1,(()=>{a[u]=null})),ae(),n=a[t],n?n.p(e,i):(n=a[t]=o[t](e),n.c()),se(n,1),n.m(r.parentNode,r))},i(e){i||(se(n),i=!0)},o(e){ue(n),i=!1},d(e){a[t].d(e),e&&C(r)}}}function Dr(e,n,r){let i,o,a,s,u=t;f(e,ar,(e=>r(4,s=e))),e.$$.on_destroy.push((()=>u()));let{quiz:c}=n,h={MultipleChoice:Ue,SingleChoice:Ue,Sequence:Ne};return e.$$set=e=>{"quiz"in e&&r(0,c=e.quiz)},e.$$.update=()=>{1&e.$$.dirty&&(r(2,i=c.counter),u(),u=l(i,(e=>r(1,a=e)))),3&e.$$.dirty&&r(3,o=c.questions[a])},[c,a,i,o,s,h]}class wr extends me{constructor(e){super(),ge(this,e,Dr,br,u,{quiz:0},null)}}function Er(e){k(e,"1wqt442","button.svelte-1wqt442:disabled{background-color:rgb(231, 231, 231);filter:grayscale(100%);color:gray;cursor:initial}button.svelte-1wqt442{background-color:var(--quizdown-color-secondary);color:var(--quizdown-color-text);padding:0.5rem 1rem;border-radius:4px;border:1px solid transparent;line-height:1;text-align:center;transition:opacity 0.2s ease;text-decoration:none;transform:scale(1);display:inline-block;cursor:pointer;margin:0.2rem;font-size:1em}button.svelte-1wqt442:hover:not(:checked):not(:active):not(:disabled){filter:brightness(0.9)}")}function kr(e){let t,n,r,i;const o=e[3].default,a=function(e,t,n,r){if(e){const i=h(e,t,n,r);return e[0](i)}}(o,e,e[2],null),u=a||function(e){let t;return{c(){t=O("Hello World")},m(e,n){_(e,t,n)},d(e){e&&C(t)}}}();return{c(){t=w("button"),u&&u.c(),t.disabled=e[1],L(t,"class","svelte-1wqt442")},m(o,a){_(o,t,a),u&&u.m(t,null),n=!0,r||(i=R(t,"click",(function(){s(e[0])&&e[0].apply(this,arguments)})),r=!0)},p(r,[i]){e=r,a&&a.p&&(!n||4&i)&&p(a,o,e,e[2],i,null,null),(!n||2&i)&&(t.disabled=e[1])},i(e){n||(se(u,e),n=!0)},o(e){ue(u,e),n=!1},d(e){e&&C(t),u&&u.d(e),r=!1,i()}}}function Ar(e,t,n){let{$$slots:r={},$$scope:i}=t,{buttonAction:o=(()=>alert("Life has never Svelte better"))}=t,{disabled:a=!1}=t;return e.$$set=e=>{"buttonAction"in e&&n(0,o=e.buttonAction),"disabled"in e&&n(1,a=e.disabled),"$$scope"in e&&n(2,i=e.$$scope)},[o,a,i,r]}class xr extends me{constructor(e){super(),ge(this,e,Ar,kr,u,{buttonAction:0,disabled:1},Er)}}function _r(e){k(e,"kh8fob",".button-row.svelte-kh8fob.svelte-kh8fob{margin-top:1em;display:flex;justify-content:left}.quizdown-credits.svelte-kh8fob a.svelte-kh8fob{color:gray;text-decoration:none}.quizdown-credits.svelte-kh8fob a.svelte-kh8fob:hover{text-decoration:underline}.quizdown-credits.svelte-kh8fob.svelte-kh8fob{margin-top:1rem;font-size:small;text-align:end;color:lightgray}.quizdown-hint.svelte-kh8fob.svelte-kh8fob{font-size:smaller}")}function Cr(e){let t,n,r,i,o,a;t=new xr({props:{disabled:null===e[5].hint||""===e[5].hint||e[2],buttonAction:e[8],$$slots:{default:[Fr]},$$scope:{ctx:e}}});const s=[Nr,Tr,Or],u=[];function l(e,t){return e[7]?0:e[1]===e[3].max-1?1:2}return r=l(e),i=u[r]=s[r](e),{c(){fe(t.$$.fragment),n=T(),i.c(),o=N()},m(e,i){he(t,e,i),_(e,n,i),u[r].m(e,i),_(e,o,i),a=!0},p(e,n){const a={};36&n&&(a.disabled=null===e[5].hint||""===e[5].hint||e[2]),4&n&&(a.buttonAction=e[8]),576&n&&(a.$$scope={dirty:n,ctx:e}),t.$set(a);let c=r;r=l(e),r===c?u[r].p(e,n):(oe(),ue(u[c],1,1,(()=>{u[c]=null})),ae(),i=u[r],i?i.p(e,n):(i=u[r]=s[r](e),i.c()),se(i,1),i.m(o.parentNode,o))},i(e){a||(se(t.$$.fragment,e),se(i),a=!0)},o(e){ue(t.$$.fragment,e),ue(i),a=!1},d(e){pe(t,e),e&&C(n),u[r].d(e),e&&C(o)}}}function Sr(e){let t,n;return t=new xr({props:{buttonAction:e[0].reset,$$slots:{default:[Ir]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,r){he(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.buttonAction=e[0].reset),576&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){pe(t,e)}}}function Fr(e){let t,n=e[6]("hint")+"";return{c(){t=O(n)},m(e,n){_(e,t,n)},p(e,r){64&r&&n!==(n=e[6]("hint")+"")&&$(t,n)},d(e){e&&C(t)}}}function Or(e){let t,n;return t=new xr({props:{buttonAction:e[0].next,$$slots:{default:[Rr]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,r){he(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.buttonAction=e[0].next),576&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){pe(t,e)}}}function Tr(e){let t,n;return t=new xr({props:{buttonAction:e[0].evaluate,$$slots:{default:[Lr]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,r){he(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.buttonAction=e[0].evaluate),576&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){pe(t,e)}}}function Nr(e){let t,n;return t=new xr({props:{buttonAction:e[0].evaluate,$$slots:{default:[$r]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,r){he(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.buttonAction=e[0].evaluate),576&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){pe(t,e)}}}function Rr(e){let t,n=e[6]("next")+"";return{c(){t=O(n)},m(e,n){_(e,t,n)},p(e,r){64&r&&n!==(n=e[6]("next")+"")&&$(t,n)},d(e){e&&C(t)}}}function Lr(e){let t,n=e[6]("evaluate")+"";return{c(){t=O(n)},m(e,n){_(e,t,n)},p(e,r){64&r&&n!==(n=e[6]("evaluate")+"")&&$(t,n)},d(e){e&&C(t)}}}function $r(e){let t,n=e[6]("evaluate")+"";return{c(){t=O(n)},m(e,n){_(e,t,n)},p(e,r){64&r&&n!==(n=e[6]("evaluate")+"")&&$(t,n)},d(e){e&&C(t)}}}function Ir(e){let t,n=e[6]("reset")+"";return{c(){t=O(n)},m(e,n){_(e,t,n)},p(e,r){64&r&&n!==(n=e[6]("reset")+"")&&$(t,n)},d(e){e&&C(t)}}}function Br(e){let t,n,r,i=e[5].hint+"";return{c(){t=w("p"),n=O("💡 "),r=new B(null),L(t,"class","quizdown-hint svelte-kh8fob")},m(e,o){_(e,t,o),E(t,n),r.m(i,t)},p(e,t){32&t&&i!==(i=e[5].hint+"")&&r.p(i)},d(e){e&&C(t)}}}function Mr(e){let t,n,r,i,o,a,s,u;const l=[Sr,Cr],c=[];function f(e,t){return e[1]===e[3].max?0:1}n=f(e),r=c[n]=l[n](e);let h=e[2]&&Br(e);return{c(){t=w("div"),r.c(),i=T(),h&&h.c(),o=T(),a=w("div"),s=w("a"),s.textContent="quizdown-js v0.2.4",L(t,"class","button-row svelte-kh8fob"),L(s,"href","https://github.com/bonartm/quizdown-js"),L(s,"class","svelte-kh8fob"),L(a,"class","quizdown-credits svelte-kh8fob")},m(e,r){_(e,t,r),c[n].m(t,null),_(e,i,r),h&&h.m(e,r),_(e,o,r),_(e,a,r),E(a,s),u=!0},p(e,[i]){let a=n;n=f(e),n===a?c[n].p(e,i):(oe(),ue(c[a],1,1,(()=>{c[a]=null})),ae(),r=c[n],r?r.p(e,i):(r=c[n]=l[n](e),r.c()),se(r,1),r.m(t,null)),e[2]?h?h.p(e,i):(h=Br(e),h.c(),h.m(o.parentNode,o)):h&&(h.d(1),h=null)},i(e){u||(se(r),u=!0)},o(e){ue(r),u=!1},d(e){e&&C(t),c[n].d(),e&&C(i),h&&h.d(e),e&&C(o),e&&C(a)}}}function Pr(e,n,r){let i,o,a,s,u,c,h=t,p=t;f(e,ar,(e=>r(6,u=e))),e.$$.on_destroy.push((()=>h())),e.$$.on_destroy.push((()=>p()));let{quiz:d}=n,g=!1;return e.$$set=e=>{"quiz"in e&&r(0,d=e.quiz)},e.$$.update=()=>{1&e.$$.dirty&&(r(3,i=d.counter),h(),h=l(i,(e=>r(1,s=e)))),1&e.$$.dirty&&(r(4,o=d.finished),p(),p=l(o,(e=>r(7,c=e)))),3&e.$$.dirty&&r(5,a=d.questions[s]),2&e.$$.dirty&&r(2,g=!1)},[d,s,g,i,o,a,u,c,()=>r(2,g=!g)]}class jr extends me{constructor(e){super(),ge(this,e,Pr,Mr,u,{quiz:0},_r)}}function zr(e){return"[object Date]"===Object.prototype.toString.call(e)}function Ur(e,t){if(e===t||e!=e)return()=>e;const n=typeof e;if(n!==typeof t||Array.isArray(e)!==Array.isArray(t))throw new Error("Cannot interpolate values of different type");if(Array.isArray(e)){const n=t.map(((t,n)=>Ur(e[n],t)));return e=>n.map((t=>t(e)))}if("object"===n){if(!e||!t)throw new Error("Object cannot be null");if(zr(e)&&zr(t)){e=e.getTime();const n=(t=t.getTime())-e;return t=>new Date(e+t*n)}const n=Object.keys(t),r={};return n.forEach((n=>{r[n]=Ur(e[n],t[n])})),e=>{const t={};return n.forEach((n=>{t[n]=r[n](e)})),t}}if("number"===n){const n=t-e;return t=>e+t*n}throw new Error(`Cannot interpolate ${n} values`)}function qr(e){k(e,"1ma47z2",".quizdown-progress.svelte-1ma47z2.svelte-1ma47z2{height:0.4em;width:100%;position:relative}.quizdown-progress.svelte-1ma47z2 .progress-slider.svelte-1ma47z2{background-color:var(--quizdown-color-primary);height:100%;display:block}")}function Gr(e){let n,r;return{c(){n=w("div"),r=w("div"),L(r,"class","progress-slider svelte-1ma47z2"),I(r,"width",e[2]),L(n,"class","quizdown-progress svelte-1ma47z2"),L(n,"data-label","")},m(e,t){_(e,n,t),E(n,r)},p(e,[t]){4&t&&I(r,"width",e[2])},i:t,o:t,d(e){e&&C(n)}}}function Hr(e,i,o){let a,s,u,c,h,p,d=t,g=t;e.$$.on_destroy.push((()=>d())),e.$$.on_destroy.push((()=>g()));let{quiz:v}=i;const y=function(e,t={}){const i=Ge(e);let o,a=e;function s(s,u){if(null==e)return i.set(e=s),Promise.resolve();a=s;let l=o,c=!1,{delay:f=0,duration:h=400,easing:p=n,interpolate:d=Ur}=r(r({},t),u);if(0===h)return l&&(l.abort(),l=null),i.set(e=a),Promise.resolve();const g=m()+f;let v;return o=D((t=>{if(th?(i.set(e=s),!1):(i.set(e=v(p(n/h))),!0)})),o.promise}return{set:s,update:(t,n)=>s(t(a,e),n),subscribe:i.subscribe}}(0,{duration:400,easing:ve});return f(e,y,(e=>o(7,p=e))),e.$$set=e=>{"quiz"in e&&o(4,v=e.quiz)},e.$$.update=()=>{16&e.$$.dirty&&(o(0,a=v.counter),g(),g=l(a,(e=>o(6,h=e)))),16&e.$$.dirty&&(o(1,s=v.finished),d(),d=l(s,(e=>o(5,c=e)))),112&e.$$.dirty&&(c?y.set(v.counter.max-.5):y.set(h+.1)),144&e.$$.dirty&&o(2,u=String(p/(v.counter.max-.5)*100)+"%")},[a,s,u,y,v,c,h,p]}class Vr extends me{constructor(e){super(),ge(this,e,Hr,Gr,u,{quiz:4},qr)}}var Wr={next:"Next",previous:"Previous",evaluate:"Evaluate",reset:"One more time!",hint:"💡 Show hint",results_title:"Your quiz results",results_text:"You have answered {points} out of {total} questions correctly!"},Yr={next:"Weiter",previous:"Zurück",evaluate:"Zum Ergebnis",reset:"Noch einmal!",hint:"💡 Tipp anzeigen",results_title:"Ihr Ergebnis",results_text:"Sie haben {points} von {total} Fragen richtig beantwortet!"};function Kr(e){Rn("de",Yr),Rn("en",Wr),function(e){const{formats:t}=e,n=Pn(e,["formats"]),r=e.initialLocale||e.fallbackLocale;Object.assign(jn,n,{initialLocale:r}),t&&("number"in t&&Object.assign(jn.formats.number,t.number),"date"in t&&Object.assign(jn.formats.date,t.date),"time"in t&&Object.assign(jn.formats.time,t.time)),Gn.set(r)}({fallbackLocale:"en",initialLocale:null===e?"undefined"==typeof window?null:window.navigator.language||window.navigator.languages[0]:e})}function Jr(e){k(e,"1xddctk","@import 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.6.0/build/styles/github.min.css';code, kbd{padding:0 0.4rem;font-size:85%;white-space:pre-wrap;border-radius:4px;padding:0.2em 0.4em;background-color:rgb(255, 255, 235);font-family:monospace, monospace}pre{background-color:rgb(255, 255, 235);padding:0.4rem;overflow-x:auto}pre code{background:none;padding:0}a{color:var(--quizdown-color-primary)}.quizdown-content.svelte-1xddctk{padding:1rem;max-width:800px;width:100%;margin:auto}.quizdown-card.svelte-1xddctk{box-shadow:0 4px 8px 0 rgba(0, 0, 0, 0.2);border-radius:0 0 4px 4px}.quizdown-container.svelte-1xddctk{padding:2px 16px}")}function Xr(e){let t,n,r,i,o,a,s,u,l;return r=new Vr({props:{quiz:e[0]}}),a=new wr({props:{quiz:e[0]}}),u=new jr({props:{quiz:e[0]}}),{c(){t=w("div"),n=w("div"),fe(r.$$.fragment),i=T(),o=w("div"),fe(a.$$.fragment),s=T(),fe(u.$$.fragment),L(o,"class","quizdown-container svelte-1xddctk"),L(n,"class","quizdown-card svelte-1xddctk"),L(t,"class","quizdown-content svelte-1xddctk")},m(c,f){_(c,t,f),E(t,n),he(r,n,null),E(n,i),E(n,o),he(a,o,null),E(o,s),he(u,o,null),e[2](t),l=!0},p(e,[t]){const n={};1&t&&(n.quiz=e[0]),r.$set(n);const i={};1&t&&(i.quiz=e[0]),a.$set(i);const o={};1&t&&(o.quiz=e[0]),u.$set(o)},i(e){l||(se(r.$$.fragment,e),se(a.$$.fragment,e),se(u.$$.fragment,e),l=!0)},o(e){ue(r.$$.fragment,e),ue(a.$$.fragment,e),ue(u.$$.fragment,e),l=!1},d(n){n&&C(t),pe(r),pe(a),pe(u),e[2](null)}}}function Zr(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))};let i,{quiz:o}=t;return Kr(o.config.locale),H((()=>r(void 0,void 0,void 0,(function*(){let e=o.config.primary_color,t=o.config.secondary_color,n=o.config.text_color;i.style.setProperty("--quizdown-color-primary",e),i.style.setProperty("--quizdown-color-secondary",t),i.style.setProperty("--quizdown-color-text",n)})))),e.$$set=e=>{"quiz"in e&&n(0,o=e.quiz)},[o,i,function(e){W[e?"unshift":"push"]((()=>{i=e,n(1,i)}))}]}class Qr extends me{constructor(e){super(),ge(this,e,Zr,Xr,u,{quiz:0},Jr)}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function ei(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}function ti(e){var t={exports:{}};return e(t,t.exports),t.exports}var ni=ti((function(e,t){e.exports=function(){function e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}function o(e){var t={exports:{}};return e(t,t.exports),t.exports}var a=o((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function n(t){e.exports.defaults=t}e.exports={defaults:t(),getDefaults:t,changeDefaults:n}})),s=/[&<>"']/,u=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,f={"&":"&","<":"<",">":">",'"':""","'":"'"},h=function(e){return f[e]};function p(e,t){if(t){if(s.test(e))return e.replace(u,h)}else if(l.test(e))return e.replace(c,h);return e}var d=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function g(e){return e.replace(d,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var m=/(^|[^\[])\^/g;function v(e,t){e=e.source||e,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(m,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var y=/[^\w:]/g,b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function D(e,t,n){if(e){var r;try{r=decodeURIComponent(g(n)).replace(y,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!b.test(n)&&(n=x(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}var w={},E=/^[^:]+:\/*[^/]*$/,k=/^([^:]+:)[\s\S]*$/,A=/^([^:]+:\/*[^/]*)[\s\S]*$/;function x(e,t){w[" "+e]||(E.test(e)?w[" "+e]=e+"/":w[" "+e]=S(e,"/",!0));var n=-1===(e=w[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(k,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(A,"$1")+t:e+t}function _(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}var N={escape:p,unescape:g,edit:v,cleanUrl:D,resolveUrl:x,noopTest:{exec:function(){}},merge:_,splitCells:C,rtrim:S,findClosingBracket:F,checkSanitizeDeprecation:O,repeatString:T},R=a.defaults,L=N.rtrim,$=N.splitCells,I=N.escape,B=N.findClosingBracket;function M(e,t,n){var r=t.href,i=t.title?I(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:o}:{type:"image",raw:n,href:r,title:i,text:I(o)}}function P(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}var j=function(){function e(e){this.options=e||R}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:L(n,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=P(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=L(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n}}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:$(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,o,a,s,u,l,c,f=t[0],h=t[2],p=h.length>1,d={type:"list",raw:f,ordered:p,start:p?+h.slice(0,-1):"",loose:!1,items:[]},g=t[0].match(this.rules.block.item),m=!1,v=g.length;i=this.rules.block.listItemStart.exec(g[0]);for(var y=0;yi[1].length:o[1].length>=i[0].length||o[1].length>3){g.splice(y,2,g[y]+(!this.options.pedantic&&o[1].length/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):I(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var r=L(n.slice(0,-1),"\\");if((n.length-r.length)%2==0)return}else{var i=B(t[2],"()");if(i>-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var a=t[2],s="";if(this.options.pedantic){var u=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);u&&(a=u[1],s=u[3])}else s=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^$/.test(n)?a.slice(1):a.slice(1,-1)),M(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:s?s.replace(this.rules.inline._escapes,"$1"):s},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return M(n,r,n[0])}},t.emStrong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var o,a,s=r[0].length-1,u=s,l=0,c="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+s);null!=(r=c.exec(t));)if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=o.length,r[3]||r[4])u+=a;else if(!((r[5]||r[6])&&s%3)||(s+a)%3){if(!((u-=a)>0)){if(u+l-a<=0&&!t.slice(c.lastIndex).match(c)&&(a=Math.min(a,a+u+l)),Math.min(s,a)%2)return{type:"em",raw:e.slice(0,s+r.index+a+1),text:e.slice(1,s+r.index+a)};if(Math.min(s,a)%2==0)return{type:"strong",raw:e.slice(0,s+r.index+a+1),text:e.slice(2,s+r.index+a-1)}}}else l+=a}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=I(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2]}},t.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=I(this.options.mangle?t(i[1]):i[1])):n=I(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=I(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=I(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r,i=this.rules.inline.text.exec(e);if(i)return r=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):I(i[0]):i[0]:I(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},e}(),z=N.noopTest,U=N.edit,q=N.merge,G={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:z,table:z,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};G.def=U(G.def).replace("label",G._label).replace("title",G._title).getRegex(),G.bullet=/(?:[*+-]|\d{1,9}[.)])/,G.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,G.item=U(G.item,"gm").replace(/bull/g,G.bullet).getRegex(),G.listItemStart=U(/^( *)(bull) */).replace("bull",G.bullet).getRegex(),G.list=U(G.list).replace(/bull/g,G.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+G.def.source+")").getRegex(),G._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",G._comment=/|$)/,G.html=U(G.html,"i").replace("comment",G._comment).replace("tag",G._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),G.paragraph=U(G._paragraph).replace("hr",G.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",G._tag).getRegex(),G.blockquote=U(G.blockquote).replace("paragraph",G.paragraph).getRegex(),G.normal=q({},G),G.gfm=q({},G.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),G.gfm.nptable=U(G.gfm.nptable).replace("hr",G.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",G._tag).getRegex(),G.gfm.table=U(G.gfm.table).replace("hr",G.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",G._tag).getRegex(),G.pedantic=q({},G.normal,{html:U("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",G._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,paragraph:U(G.normal._paragraph).replace("hr",G.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",G.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var H={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:z,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_]*?\*[^_]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^*]*?\_[^*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:z,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};H.punctuation=U(H.punctuation).replace(/punctuation/g,H._punctuation).getRegex(),H.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,H.escapedEmSt=/\\\*|\\_/g,H._comment=U(G._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),H.emStrong.lDelim=U(H.emStrong.lDelim).replace(/punct/g,H._punctuation).getRegex(),H.emStrong.rDelimAst=U(H.emStrong.rDelimAst,"g").replace(/punct/g,H._punctuation).getRegex(),H.emStrong.rDelimUnd=U(H.emStrong.rDelimUnd,"g").replace(/punct/g,H._punctuation).getRegex(),H._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,H._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,H._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,H.autolink=U(H.autolink).replace("scheme",H._scheme).replace("email",H._email).getRegex(),H._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,H.tag=U(H.tag).replace("comment",H._comment).replace("attribute",H._attribute).getRegex(),H._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,H._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,H._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,H.link=U(H.link).replace("label",H._label).replace("href",H._href).replace("title",H._title).getRegex(),H.reflink=U(H.reflink).replace("label",H._label).getRegex(),H.reflinkSearch=U(H.reflinkSearch,"g").replace("reflink",H.reflink).replace("nolink",H.nolink).getRegex(),H.normal=q({},H),H.pedantic=q({},H.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:U(/^!?\[(label)\]\((.*?)\)/).replace("label",H._label).getRegex(),reflink:U(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",H._label).getRegex()}),H.gfm=q({},H.normal,{escape:U(H.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var Q=function(){function e(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||W,this.options.tokenizer=this.options.tokenizer||new j,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:Y.normal,inline:K.normal};this.options.pedantic?(t.block=Y.pedantic,t.inline=K.pedantic):this.options.gfm&&(t.block=Y.gfm,this.options.breaks?t.inline=K.breaks:t.inline=K.gfm),this.tokenizer.rules=t}e.lex=function(t,n){return new e(n).lex(t)},e.lexInline=function(t,n){return new e(n).inlineTokens(t)};var n=e.prototype;return n.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},n.blockTokens=function(e,t,n){var r,i,o,a;for(void 0===t&&(t=[]),void 0===n&&(n=!0),this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e))e=e.substring(r.raw.length),(a=t[t.length-1])&&"paragraph"===a.type?(a.raw+="\n"+r.raw,a.text+="\n"+r.text):t.push(r);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),o=r.items.length,i=0;i0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(l));)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,a.index)+"["+J("a",a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,a.index)+"["+J("a",a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,a.index)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(s||(u=""),s=!1,i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e,n,r)){e=e.substring(i.raw.length),n=i.inLink,r=i.inRawBlock;var f=t[t.length-1];f&&"text"===i.type&&"text"===f.type?(f.raw+=i.raw,f.text+=i.text):t.push(i)}else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,r)),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length);var h=t[t.length-1];"link"===i.type?(i.tokens=this.inlineTokens(i.text,[],!0,r),t.push(i)):h&&"text"===i.type&&"text"===h.type?(h.raw+=i.raw,h.text+=i.text):t.push(i)}else if(i=this.tokenizer.emStrong(e,l,u))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.autolink(e,Z))e=e.substring(i.raw.length),t.push(i);else if(n||!(i=this.tokenizer.url(e,Z))){if(i=this.tokenizer.inlineText(e,r,X))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(u=i.raw.slice(-1)),s=!0,(o=t[t.length-1])&&"text"===o.type?(o.raw+=i.raw,o.text+=i.text):t.push(i);else if(e){var p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}throw new Error(p)}}else e=e.substring(i.raw.length),t.push(i);return t},t(e,null,[{key:"rules",get:function(){return{block:Y,inline:K}}}]),e}(),ee=a.defaults,te=N.cleanUrl,ne=N.escape,re=function(){function e(e){this.options=e||ee}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'
'+(n?e:ne(e,!0))+"
\n":"
"+(n?e:ne(e,!0))+"
\n"},t.blockquote=function(e){return"
\n"+e+"
\n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
\n":"
\n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=te(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"},t.image=function(e,t,n){if(null===(e=te(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},t.text=function(e){return e},e}(),ie=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),oe=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),ae=a.defaults,se=N.unescape,ue=function(){function e(e){this.options=e||ae,this.options.renderer=this.options.renderer||new re,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ie,this.slugger=new oe}e.parse=function(t,n){return new e(n).parse(t)},e.parseInline=function(t,n){return new e(n).parseInline(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,o,a,s,u,l,c,f,h,p,d,g,m,v,y,b,D="",w=e.length;for(n=0;n0&&"text"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):g+=b),g+=this.parse(m.tokens,d),c+=this.renderer.listitem(g,y,v);D+=this.renderer.list(c,h,p);continue;case"html":D+=this.renderer.html(f.text);continue;case"paragraph":D+=this.renderer.paragraph(this.parseInline(f.tokens));continue;case"text":for(c=f.tokens?this.parseInline(f.tokens):f.text;n+1An error occurred:

    "+fe(e.message+"",!0)+"
    ";throw e}}return ge.options=ge.setOptions=function(e){return le(ge.defaults,e),pe(ge.defaults),ge},ge.getDefaults=he,ge.defaults=de,ge.use=function(e){var t=le({},e);if(e.renderer&&function(){var n=ge.defaults.renderer||new re,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,o=new Array(i),a=0;aAn error occurred:

    "+fe(e.message+"",!0)+"
    ";throw e}},ge.Parser=ue,ge.parser=ue.parse,ge.Renderer=re,ge.TextRenderer=ie,ge.Lexer=Q,ge.lexer=Q.lex,ge.Tokenizer=j,ge.Slugger=oe,ge.parse=ge,ge}()})),ri=ti((function(e,t){e.exports=function(){function e(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1?n-1:0),i=1;i/gm),j=s(/^data-[\-\w.\u00B7-\uFFFF]/),z=s(/^aria-[\-\w]+$/),U=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=s(/^(?:\w+script|data):/i),G=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function V(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:W(),t=function(e){return K(e)};if(t.version="2.2.8",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var n=e.document,r=e.document,i=e.DocumentFragment,o=e.HTMLTemplateElement,s=e.Node,u=e.Element,l=e.NodeFilter,c=e.NamedNodeMap,f=void 0===c?e.NamedNodeMap||e.MozNamedAttrMap:c,E=e.Text,k=e.Comment,J=e.DOMParser,X=e.trustedTypes,Z=u.prototype,Q=_(Z,"cloneNode"),ee=_(Z,"nextSibling"),te=_(Z,"childNodes"),ne=_(Z,"parentNode");if("function"==typeof o){var re=r.createElement("template");re.content&&re.content.ownerDocument&&(r=re.content.ownerDocument)}var ie=Y(X,n),oe=ie&&Ie?ie.createHTML(""):"",ae=r,se=ae.implementation,ue=ae.createNodeIterator,le=ae.createDocumentFragment,ce=n.importNode,fe={};try{fe=x(r).documentMode?r.documentMode:{}}catch(e){}var he={};t.isSupported="function"==typeof ne&&se&&void 0!==se.createHTMLDocument&&9!==fe;var pe=M,de=P,ge=j,me=z,ve=q,ye=G,be=U,De=null,we=A({},[].concat(V(C),V(S),V(F),V(T),V(R))),Ee=null,ke=A({},[].concat(V(L),V($),V(I),V(B))),Ae=null,xe=null,_e=!0,Ce=!0,Se=!1,Fe=!1,Oe=!1,Te=!1,Ne=!1,Re=!1,Le=!1,$e=!0,Ie=!1,Be=!0,Me=!0,Pe=!1,je={},ze=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ue=null,qe=A({},["audio","video","img","source","image","track"]),Ge=null,He=A({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",We="http://www.w3.org/2000/svg",Ye="http://www.w3.org/1999/xhtml",Ke=Ye,Je=null,Xe=r.createElement("form"),Ze=function(e){Je&&Je===e||(e&&"object"===(void 0===e?"undefined":H(e))||(e={}),e=x(e),De="ALLOWED_TAGS"in e?A({},e.ALLOWED_TAGS):we,Ee="ALLOWED_ATTR"in e?A({},e.ALLOWED_ATTR):ke,Ge="ADD_URI_SAFE_ATTR"in e?A(x(He),e.ADD_URI_SAFE_ATTR):He,Ue="ADD_DATA_URI_TAGS"in e?A(x(qe),e.ADD_DATA_URI_TAGS):qe,Ae="FORBID_TAGS"in e?A({},e.FORBID_TAGS):{},xe="FORBID_ATTR"in e?A({},e.FORBID_ATTR):{},je="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,Ce=!1!==e.ALLOW_DATA_ATTR,Se=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=e.SAFE_FOR_TEMPLATES||!1,Oe=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,Le=e.RETURN_DOM_FRAGMENT||!1,$e=!1!==e.RETURN_DOM_IMPORT,Ie=e.RETURN_TRUSTED_TYPE||!1,Ne=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,Me=!1!==e.KEEP_CONTENT,Pe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||be,Ke=e.NAMESPACE||Ke,Fe&&(Ce=!1),Le&&(Re=!0),je&&(De=A({},[].concat(V(R))),Ee=[],!0===je.html&&(A(De,C),A(Ee,L)),!0===je.svg&&(A(De,S),A(Ee,$),A(Ee,B)),!0===je.svgFilters&&(A(De,F),A(Ee,$),A(Ee,B)),!0===je.mathMl&&(A(De,T),A(Ee,I),A(Ee,B))),e.ADD_TAGS&&(De===we&&(De=x(De)),A(De,e.ADD_TAGS)),e.ADD_ATTR&&(Ee===ke&&(Ee=x(Ee)),A(Ee,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&A(Ge,e.ADD_URI_SAFE_ATTR),Me&&(De["#text"]=!0),Oe&&A(De,["html","head","body"]),De.table&&(A(De,["tbody"]),delete Ae.tbody),a&&a(e),Je=e)},Qe=A({},["mi","mo","mn","ms","mtext"]),et=A({},["foreignobject","desc","title","annotation-xml"]),tt=A({},S);A(tt,F),A(tt,O);var nt=A({},T);A(nt,N);var rt=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:Ye,tagName:"template"});var n=g(e.tagName),r=g(t.tagName);if(e.namespaceURI===We)return t.namespaceURI===Ye?"svg"===n:t.namespaceURI===Ve?"svg"===n&&("annotation-xml"===r||Qe[r]):Boolean(tt[n]);if(e.namespaceURI===Ve)return t.namespaceURI===Ye?"math"===n:t.namespaceURI===We?"math"===n&&et[r]:Boolean(nt[n]);if(e.namespaceURI===Ye){if(t.namespaceURI===We&&!et[r])return!1;if(t.namespaceURI===Ve&&!Qe[r])return!1;var i=A({},["title","style","font","a","script"]);return!nt[n]&&(i[n]||!tt[n])}return!1},it=function(e){d(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=oe}catch(t){e.remove()}}},ot=function(e,n){try{d(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch(e){d(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e&&!Ee[e])if(Re||Le)try{it(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},at=function(e){var t=void 0,n=void 0;if(Ne)e=""+e;else{var i=m(e,/^[\r\n\t ]+/);n=i&&i[0]}var o=ie?ie.createHTML(e):e;if(Ke===Ye)try{t=(new J).parseFromString(o,"text/html")}catch(e){}t&&t.documentElement||((t=se.createDocument(Ke,"template",null)).documentElement.innerHTML=o);var a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),Oe?t.documentElement:a},st=function(e){return ue.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,(function(){return l.FILTER_ACCEPT}),!1)},ut=function(e){return!(e instanceof E||e instanceof k||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof f&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},lt=function(e){return"object"===(void 0===s?"undefined":H(s))?e instanceof s:e&&"object"===(void 0===e?"undefined":H(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ct=function(e,n,r){he[e]&&h(he[e],(function(e){e.call(t,n,r,Je)}))},ft=function(e){var n=void 0;if(ct("beforeSanitizeElements",e,null),ut(e))return it(e),!0;if(m(e.nodeName,/[\u0080-\uFFFF]/))return it(e),!0;var r=g(e.nodeName);if(ct("uponSanitizeElement",e,{tagName:r,allowedTags:De}),!lt(e.firstElementChild)&&(!lt(e.content)||!lt(e.content.firstElementChild))&&D(/<[/\w]/g,e.innerHTML)&&D(/<[/\w]/g,e.textContent))return it(e),!0;if(!De[r]||Ae[r]){if(Me&&!ze[r]){var i=ne(e)||e.parentNode,o=te(e)||e.childNodes;if(o&&i)for(var a=o.length-1;a>=0;--a)i.insertBefore(Q(o[a],!0),ee(e))}return it(e),!0}return e instanceof u&&!rt(e)?(it(e),!0):"noscript"!==r&&"noembed"!==r||!D(/<\/no(script|embed)/i,e.innerHTML)?(Fe&&3===e.nodeType&&(n=e.textContent,n=v(n,pe," "),n=v(n,de," "),e.textContent!==n&&(d(t.removed,{element:e.cloneNode()}),e.textContent=n)),ct("afterSanitizeElements",e,null),!1):(it(e),!0)},ht=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in r||n in Xe))return!1;if(Ce&&D(ge,t));else if(_e&&D(me,t));else{if(!Ee[t]||xe[t])return!1;if(Ge[t]);else if(D(be,v(n,ye,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!Ue[e])if(Se&&!D(ve,v(n,ye,"")));else if(n)return!1}return!0},pt=function(e){var n=void 0,r=void 0,i=void 0,o=void 0;ct("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ee};for(o=a.length;o--;){var u=n=a[o],l=u.name,c=u.namespaceURI;if(r=b(n.value),i=g(l),s.attrName=i,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,ct("uponSanitizeAttribute",e,s),r=s.attrValue,!s.forceKeepAttr&&(ot(l,e),s.keepAttr))if(D(/\/>/i,r))ot(l,e);else{Fe&&(r=v(r,pe," "),r=v(r,de," "));var f=e.nodeName.toLowerCase();if(ht(f,i,r))try{c?e.setAttributeNS(c,l,r):e.setAttribute(l,r),p(t.removed)}catch(e){}}}ct("afterSanitizeAttributes",e,null)}},dt=function e(t){var n=void 0,r=st(t);for(ct("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ct("uponSanitizeShadowNode",n,null),ft(n)||(n.content instanceof i&&e(n.content),pt(n));ct("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(r,o){var a=void 0,u=void 0,l=void 0,c=void 0,f=void 0;if(r||(r="\x3c!--\x3e"),"string"!=typeof r&&!lt(r)){if("function"!=typeof r.toString)throw w("toString is not a function");if("string"!=typeof(r=r.toString()))throw w("dirty is not a string, aborting")}if(!t.isSupported){if("object"===H(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof r)return e.toStaticHTML(r);if(lt(r))return e.toStaticHTML(r.outerHTML)}return r}if(Te||Ze(o),t.removed=[],"string"==typeof r&&(Pe=!1),Pe);else if(r instanceof s)1===(u=(a=at("\x3c!----\x3e")).ownerDocument.importNode(r,!0)).nodeType&&"BODY"===u.nodeName||"HTML"===u.nodeName?a=u:a.appendChild(u);else{if(!Re&&!Fe&&!Oe&&-1===r.indexOf("<"))return ie&&Ie?ie.createHTML(r):r;if(!(a=at(r)))return Re?null:oe}a&&Ne&&it(a.firstChild);for(var h=st(Pe?r:a);l=h.nextNode();)3===l.nodeType&&l===c||ft(l)||(l.content instanceof i&&dt(l.content),pt(l),c=l);if(c=null,Pe)return r;if(Re){if(Le)for(f=le.call(a.ownerDocument);a.firstChild;)f.appendChild(a.firstChild);else f=a;return $e&&(f=ce.call(n,f,!0)),f}var p=Oe?a.outerHTML:a.innerHTML;return Fe&&(p=v(p,pe," "),p=v(p,de," ")),ie&&Ie?ie.createHTML(p):p},t.setConfig=function(e){Ze(e),Te=!0},t.clearConfig=function(){Je=null,Te=!1},t.isValidAttribute=function(e,t,n){Je||Ze({});var r=g(e),i=g(t);return ht(r,i,n)},t.addHook=function(e,t){"function"==typeof t&&(he[e]=he[e]||[],d(he[e],t))},t.removeHook=function(e){he[e]&&p(he[e])},t.removeHooks=function(e){he[e]&&(he[e]=[])},t.removeAllHooks=function(){he={}},t}return K()}()})),ii=e=>{const t=(e=>{const t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce(((e,t)=>Math.min(e,t.length)),1/0):0})(e);if(0===t)return e;const n=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(n,"")}; -/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */function oi(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||oi(n)})),e}var ai=oi,si=oi;ai.default=si;class ui{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function li(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function ci(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const fi=e=>!!e.kind;class hi{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=li(e)}openNode(e){if(!fi(e))return;let t=e.kind;e.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(e){fi(e)&&(this.buffer+="")}value(){return this.buffer}span(e){this.buffer+=``}}class pi{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{pi._collapse(e)})))}}class di extends pi{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){return new hi(this,this.options).value()}finalize(){return!0}}function gi(e){return e?"string"==typeof e?e:e.source:null}const mi=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;const vi="[a-zA-Z]\\w*",yi="[a-zA-Z_]\\w*",bi="\\b\\d+(\\.\\d+)?",Di="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",wi="\\b(0b[01]+)",Ei={begin:"\\\\[\\s\\S]",relevance:0},ki={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[Ei]},Ai={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[Ei]},xi={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},_i=function(e,t,n={}){const r=ci({className:"comment",begin:e,end:t,contains:[]},n);return r.contains.push(xi),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),r},Ci=_i("//","$"),Si=_i("/\\*","\\*/"),Fi=_i("#","$"),Oi={className:"number",begin:bi,relevance:0},Ti={className:"number",begin:Di,relevance:0},Ni={className:"number",begin:wi,relevance:0},Ri={className:"number",begin:bi+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},Li={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[Ei,{begin:/\[/,end:/\]/,relevance:0,contains:[Ei]}]}]},$i={className:"title",begin:vi,relevance:0},Ii={className:"title",begin:yi,relevance:0},Bi={begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0};var Mi=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:vi,UNDERSCORE_IDENT_RE:yi,NUMBER_RE:bi,C_NUMBER_RE:Di,BINARY_NUMBER_RE:wi,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=function(...e){return e.map((e=>gi(e))).join("")}(t,/.*\b/,e.binary,/\b.*/)),ci({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:Ei,APOS_STRING_MODE:ki,QUOTE_STRING_MODE:Ai,PHRASAL_WORDS_MODE:xi,COMMENT:_i,C_LINE_COMMENT_MODE:Ci,C_BLOCK_COMMENT_MODE:Si,HASH_COMMENT_MODE:Fi,NUMBER_MODE:Oi,C_NUMBER_MODE:Ti,BINARY_NUMBER_MODE:Ni,CSS_NUMBER_MODE:Ri,REGEXP_MODE:Li,TITLE_MODE:$i,UNDERSCORE_TITLE_MODE:Ii,METHOD_GUARD:Bi,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function Pi(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function ji(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Pi,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function zi(e,t){Array.isArray(e.illegal)&&(e.illegal=function(...e){return"("+e.map((e=>gi(e))).join("|")+")"}(...e.illegal))}function Ui(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function qi(e,t){void 0===e.relevance&&(e.relevance=1)}const Gi=["of","and","for","in","not","or","if","then","parent","list","value"];function Hi(e,t,n="keyword"){const r={};return"string"==typeof e?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach((function(n){Object.assign(r,Hi(e[n],t,n))})),r;function i(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,Vi(n[0],n[1])]}))}}function Vi(e,t){return t?Number(t):function(e){return Gi.includes(e.toLowerCase())}(e)?0:1}function Wi(e,{plugins:t}){function n(t,n){return new RegExp(gi(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=function(e){return new RegExp(e.toString()+"|").exec("").length-1}(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=n(function(e,t="|"){let n=0;return e.map((e=>{n+=1;const t=n;let r=gi(e),i="";for(;r.length>0;){const e=mi.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?i+="\\"+String(Number(e[1])+t):(i+=e[0],"("===e[0]&&n++)}return i})).map((e=>`(${e})`)).join(t)}(e),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new r;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=ci(e.classNameAliases||{}),function t(r,o){const a=r;if(r.isCompiled)return a;[Ui].forEach((e=>e(r,o))),e.compilerExtensions.forEach((e=>e(r,o))),r.__beforeBegin=null,[ji,zi,qi].forEach((e=>e(r,o))),r.isCompiled=!0;let s=null;if("object"==typeof r.keywords&&(s=r.keywords.$pattern,delete r.keywords.$pattern),r.keywords&&(r.keywords=Hi(r.keywords,e.case_insensitive)),r.lexemes&&s)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return s=s||r.lexemes||/\w+/,a.keywordPatternRe=n(s,!0),o&&(r.begin||(r.begin=/\B|\b/),a.beginRe=n(r.begin),r.endSameAsBegin&&(r.end=r.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(a.endRe=n(r.end)),a.terminatorEnd=gi(r.end)||"",r.endsWithParent&&o.terminatorEnd&&(a.terminatorEnd+=(r.end?"|":"")+o.terminatorEnd)),r.illegal&&(a.illegalRe=n(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return ci(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(Yi(e))return ci(e,{starts:e.starts?ci(e.starts):null});if(Object.isFrozen(e))return ci(e);return e}("self"===e?r:e)}))),r.contains.forEach((function(e){t(e,a)})),r.starts&&t(r.starts,o),a.matcher=function(e){const t=new i;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(a),a}(e)}function Yi(e){return!!e&&(e.endsWithParent||Yi(e.starts))}function Ki(e){const t={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,li(this.code);let t={};return this.autoDetect?(t=e.highlightAuto(this.code),this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),t.value},autoDetect(){return!this.language||(e=this.autodetect,Boolean(e||""===e));var e},ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:t,VuePlugin:{install(e){e.component("highlightjs",t)}}}}const Ji={"after:highlightElement":({el:e,result:t,text:n})=>{const r=Zi(e);if(!r.length)return;const i=document.createElement("div");i.innerHTML=t.value,t.value=function(e,t,n){let r=0,i="";const o=[];function a(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset"}function u(e){i+=""}function l(e){("start"===e.event?s:u)(e.node)}for(;e.length||t.length;){let t=a();if(i+=li(n.substring(r,t[0].offset)),r=t[0].offset,t===e){o.reverse().forEach(u);do{l(t.splice(0,1)[0]),t=a()}while(t===e&&t.length&&t[0].offset===r);o.reverse().forEach(s)}else"start"===t[0].event?o.push(t[0].node):o.pop(),l(t.splice(0,1)[0])}return i+li(n.substr(r))}(r,Zi(i),n)}};function Xi(e){return e.nodeName.toLowerCase()}function Zi(e){const t=[];return function e(n,r){for(let i=n.firstChild;i;i=i.nextSibling)3===i.nodeType?r+=i.nodeValue.length:1===i.nodeType&&(t.push({event:"start",offset:r,node:i}),r=e(i,r),Xi(i).match(/br|hr|img|input/)||t.push({event:"stop",offset:r,node:i}));return r}(e,0),t}const Qi={},eo=e=>{console.error(e)},to=(e,...t)=>{console.log(`WARN: ${e}`,...t)},no=(e,t)=>{Qi[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Qi[`${e}/${t}`]=!0)},ro=li,io=ci,oo=Symbol("nomatch");var ao=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const o=/(^(<[^>]+>|\t|)+|\n)/gm,a="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let u={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:di};function l(e){return u.noHighlightRe.test(e)}function c(e,t,n,r){let i="",o="";"object"==typeof t?(i=e,n=t.ignoreIllegals,o=t.language,r=void 0):(no("10.7.0","highlight(lang, code, ...args) has been deprecated."),no("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),o=e,i=t);const a={code:i,language:o};k("before:highlight",a);const s=a.result?a.result:f(a.language,a.code,n,r);return s.code=a.code,k("after:highlight",s),s}function f(e,n,o,s){function l(e,t){const n=w.case_insensitive?t[0].toLowerCase():t[0];return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]}function c(){null!=A.subLanguage?function(){if(""===C)return;let e=null;if("string"==typeof A.subLanguage){if(!t[A.subLanguage])return void _.addText(C);e=f(A.subLanguage,C,!0,x[A.subLanguage]),x[A.subLanguage]=e.top}else e=h(C,A.subLanguage.length?A.subLanguage:null);A.relevance>0&&(S+=e.relevance),_.addSublanguage(e.emitter,e.language)}():function(){if(!A.keywords)return void _.addText(C);let e=0;A.keywordPatternRe.lastIndex=0;let t=A.keywordPatternRe.exec(C),n="";for(;t;){n+=C.substring(e,t.index);const r=l(A,t);if(r){const[e,i]=r;if(_.addText(n),n="",S+=i,e.startsWith("_"))n+=t[0];else{const n=w.classNameAliases[e]||e;_.addKeyword(t[0],n)}}else n+=t[0];e=A.keywordPatternRe.lastIndex,t=A.keywordPatternRe.exec(C)}n+=C.substr(e),_.addText(n)}(),C=""}function p(e){return e.className&&_.openNode(w.classNameAliases[e.className]||e.className),A=Object.create(e,{parent:{value:A}}),A}function d(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new ui(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return d(e.parent,t,n)}function g(e){return 0===A.matcher.regexIndex?(C+=e[0],1):(T=!0,0)}function m(e){const t=e[0],n=e.rule,r=new ui(n),i=[n.__beforeBegin,n["on:begin"]];for(const n of i)if(n&&(n(e,r),r.isMatchIgnored))return g(t);return n&&n.endSameAsBegin&&(n.endRe=new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),n.skip?C+=t:(n.excludeBegin&&(C+=t),c(),n.returnBegin||n.excludeBegin||(C=t)),p(n),n.returnBegin?0:t.length}function v(e){const t=e[0],r=n.substr(e.index),i=d(A,e,r);if(!i)return oo;const o=A;o.skip?C+=t:(o.returnEnd||o.excludeEnd||(C+=t),c(),o.excludeEnd&&(C=t));do{A.className&&_.closeNode(),A.skip||A.subLanguage||(S+=A.relevance),A=A.parent}while(A!==i.parent);return i.starts&&(i.endSameAsBegin&&(i.starts.endRe=i.endRe),p(i.starts)),o.returnEnd?0:t.length}let y={};function b(t,r){const a=r&&r[0];if(C+=t,null==a)return c(),0;if("begin"===y.type&&"end"===r.type&&y.index===r.index&&""===a){if(C+=n.slice(r.index,r.index+1),!i){const t=new Error("0 width match regex");throw t.languageName=e,t.badRule=y.rule,t}return 1}if(y=r,"begin"===r.type)return m(r);if("illegal"===r.type&&!o){const e=new Error('Illegal lexeme "'+a+'" for mode "'+(A.className||"")+'"');throw e.mode=A,e}if("end"===r.type){const e=v(r);if(e!==oo)return e}if("illegal"===r.type&&""===a)return 1;if(O>1e5&&O>3*r.index){throw new Error("potential infinite loop, way more iterations than matches")}return C+=a,a.length}const w=D(e);if(!w)throw eo(a.replace("{}",e)),new Error('Unknown language: "'+e+'"');const E=Wi(w,{plugins:r});let k="",A=s||E;const x={},_=new u.__emitter(u);!function(){const e=[];for(let t=A;t!==w;t=t.parent)t.className&&e.unshift(t.className);e.forEach((e=>_.openNode(e)))}();let C="",S=0,F=0,O=0,T=!1;try{for(A.matcher.considerAll();;){O++,T?T=!1:A.matcher.considerAll(),A.matcher.lastIndex=F;const e=A.matcher.exec(n);if(!e)break;const t=b(n.substring(F,e.index),e);F=e.index+t}return b(n.substr(F)),_.closeAllNodes(),_.finalize(),k=_.toHTML(),{relevance:Math.floor(S),value:k,language:e,illegal:!1,emitter:_,top:A}}catch(t){if(t.message&&t.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:t.message,context:n.slice(F-100,F+100),mode:t.mode},sofar:k,relevance:0,value:ro(n),emitter:_};if(i)return{illegal:!1,relevance:0,value:ro(n),emitter:_,language:e,top:A,errorRaised:t};throw t}}function h(e,n){n=n||u.languages||Object.keys(t);const r=function(e){const t={relevance:0,emitter:new u.__emitter(u),value:ro(e),illegal:!1,top:s};return t.emitter.addText(e),t}(e),i=n.filter(D).filter(E).map((t=>f(t,e,!1)));i.unshift(r);const o=i.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(D(e.language).supersetOf===t.language)return 1;if(D(t.language).supersetOf===e.language)return-1}return 0})),[a,l]=o,c=a;return c.second_best=l,c}const p={"before:highlightElement":({el:e})=>{u.useBR&&(e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n"))},"after:highlightElement":({result:e})=>{u.useBR&&(e.value=e.value.replace(/\n/g,"
    "))}},d=/^(<[^>]+>|\t)+/gm,g={"after:highlightElement":({result:e})=>{u.tabReplace&&(e.value=e.value.replace(d,(e=>e.replace(/\t/g,u.tabReplace))))}};function m(e){let t=null;const r=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=u.languageDetectRe.exec(t);if(n){const t=D(n[1]);return t||(to(a.replace("{}",n[1])),to("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>l(e)||D(e)))}(e);if(l(r))return;k("before:highlightElement",{el:e,language:r}),t=e;const i=t.textContent,o=r?c(i,{language:r,ignoreIllegals:!0}):h(i);k("after:highlightElement",{el:e,result:o,text:i}),e.innerHTML=o.value,function(e,t,r){const i=t?n[t]:r;e.classList.add("hljs"),i&&e.classList.add(i)}(e,r,o.language),e.result={language:o.language,re:o.relevance,relavance:o.relevance},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.relevance,relavance:o.second_best.relevance})}const v=()=>{if(v.called)return;v.called=!0,no("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead.");document.querySelectorAll("pre code").forEach(m)};let y=!1;function b(){if("loading"===document.readyState)return void(y=!0);document.querySelectorAll("pre code").forEach(m)}function D(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function w(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function E(e){const t=D(e);return t&&!t.disableAutodetect}function k(e,t){const n=e;r.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){y&&b()}),!1),Object.assign(e,{highlight:c,highlightAuto:h,highlightAll:b,fixMarkup:function(e){return no("10.2.0","fixMarkup will be removed entirely in v11.0"),no("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),t=e,u.tabReplace||u.useBR?t.replace(o,(e=>"\n"===e?u.useBR?"
    ":e:u.tabReplace?e.replace(/\t/g,u.tabReplace):e)):t;var t},highlightElement:m,highlightBlock:function(e){return no("10.7.0","highlightBlock will be removed entirely in v12.0"),no("10.7.0","Please use highlightElement now."),m(e)},configure:function(e){e.useBR&&(no("10.3.0","'useBR' will be removed entirely in v11.0"),no("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),u=io(u,e)},initHighlighting:v,initHighlightingOnLoad:function(){no("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),y=!0},registerLanguage:function(n,r){let o=null;try{o=r(e)}catch(e){if(eo("Language definition for '{}' could not be registered.".replace("{}",n)),!i)throw e;eo(e),o=s}o.name||(o.name=n),t[n]=o,o.rawDefinition=r.bind(null,e),o.aliases&&w(o.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:D,registerAliases:w,requireLanguage:function(e){no("10.4.0","requireLanguage will be removed entirely in v11."),no("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const t=D(e);if(t)return t;throw new Error("The '{}' language is required, but not loaded.".replace("{}",e))},autoDetection:E,inherit:io,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),r.push(e)},vuePlugin:Ki(e).VuePlugin}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString="10.7.2";for(const e in Mi)"object"==typeof Mi[e]&&ai(Mi[e]);return Object.assign(e,Mi),e.addPlugin(p),e.addPlugin(Ji),e.addPlugin(g),e}({});function so(e){return function(...e){return e.map((e=>function(e){return e?"string"==typeof e?e:e.source:null}(e))).join("")}("(?=",e,")")}var uo=function(e){const t={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:["and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},n={className:"meta",begin:/^(>>>|\.\.\.) /},r={className:"subst",begin:/\{/,end:/\}/,keywords:t,illegal:/#/},i={begin:/\{\{/,relevance:0},o={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,n],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,n],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,n,i,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,n,i,r]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,i,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i,r]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},a="[0-9](_?[0-9])*",s=`(\\b(${a}))?\\.(${a})|\\b(${a})\\.`,u={className:"number",relevance:0,variants:[{begin:`(\\b(${a})|(${s}))[eE][+-]?(${a})[jJ]?\\b`},{begin:`(${s})[jJ]?`},{begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\b"},{begin:"\\b0[bB](_?[01])+[lL]?\\b"},{begin:"\\b0[oO](_?[0-7])+[lL]?\\b"},{begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?\\b"},{begin:`\\b(${a})[jJ]\\b`}]},l={className:"comment",begin:so(/# type:/),end:/$/,keywords:t,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},c={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:["self",n,u,o,e.HASH_COMMENT_MODE]}]};return r.contains=[o,u,n],{name:"Python",aliases:["py","gyp","ipython"],keywords:t,illegal:/(<\/|->|\?)|=>/,contains:[n,u,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},o,l,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,c,{begin:/->/,endsWithParent:!0,keywords:t}]},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[u,c,o]}]}};var lo=function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}};function co(e){return(co="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ho(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}var Ro="&",Lo="#",$o="!",Io="-",Bo=".",Mo="ALIAS",Po="BLANK_LINE",jo="BLOCK_FOLDED",zo="BLOCK_LITERAL",Uo="COMMENT",qo="DIRECTIVE",Go="DOCUMENT",Ho="FLOW_MAP",Vo="FLOW_SEQ",Wo="MAP",Yo="MAP_KEY",Ko="MAP_VALUE",Jo="PLAIN",Xo="QUOTE_DOUBLE",Zo="QUOTE_SINGLE",Qo="SEQ",ea="SEQ_ITEM",ta="tag:yaml.org,2002:",na={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function ra(e){for(var t=[0],n=e.indexOf("\n");-1!==n;)n+=1,t.push(n),n=e.indexOf("\n",n);return t}function ia(e){var t,n;return"string"==typeof e?(t=ra(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=ra(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function oa(e,t){if("number"!=typeof e||e<0)return null;var n=ia(t),r=n.lineStarts,i=n.src;if(!r||!i||e>i.length)return null;for(var o=0;o=1)||e>r.length)return null;for(var o=r[e-1],a=r[e];a&&a>o&&"\n"===i[a-1];)--a;return i.slice(o,a)}var sa=function(){function e(t,n){fo(this,e),this.start=t,this.end=n||t}return po(e,[{key:"isEmpty",value:function(){return"number"!=typeof this.start||!this.end||this.end<=this.start}},{key:"setOrigRange",value:function(e,t){var n=this.start,r=this.end;if(0===e.length||r<=e[0])return this.origStart=n,this.origEnd=r,t;for(var i=t;in);)++i;this.origStart=n+i;for(var o=i;i=r);)++i;return this.origEnd=r+i,o}}],[{key:"copy",value:function(t){return new e(t.start,t.end)}}]),e}(),ua=function(){function e(t,n,r){fo(this,e),Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=t,this.value=null}return po(e,[{key:"getPropValue",value:function(e,t,n){if(!this.context)return null;var r=this.context.src,i=this.props[e];return i&&r[i.start]===t?r.slice(i.start+(n?1:0),i.end):null}},{key:"anchor",get:function(){for(var e=0;e0?e.join("\n"):null}},{key:"commentHasRequiredWhitespace",value:function(t){var n=this.context.src;if(this.header&&t===this.header.end)return!1;if(!this.valueRange)return!1;var r=this.valueRange.end;return t!==r||e.atBlank(n,r-1)}},{key:"hasComment",get:function(){if(this.context)for(var e=this.context.src,t=0;t=t.length||"\n"===t[i]?r+"\n":r}},{key:"atDocumentBoundary",value:function(e,t,n){var r=e[t];if(!r)return!0;var i=e[t-1];if(i&&"\n"!==i)return!1;if(n){if(r!==n)return!1}else if(r!==Io&&r!==Bo)return!1;var o=e[t+1],a=e[t+2];if(o!==r||a!==r)return!1;var s=e[t+3];return!s||"\n"===s||"\t"===s||" "===s}},{key:"endOfIdentifier",value:function(e,t){for(var n=e[t],r="<"===n,i=r?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];n&&-1===i.indexOf(n);)n=e[t+=1];return r&&">"===n&&(t+=1),t}},{key:"endOfIndent",value:function(e,t){for(var n=e[t];" "===n;)n=e[t+=1];return t}},{key:"endOfLine",value:function(e,t){for(var n=e[t];n&&"\n"!==n;)n=e[t+=1];return t}},{key:"endOfWhiteSpace",value:function(e,t){for(var n=e[t];"\t"===n||" "===n;)n=e[t+=1];return t}},{key:"startOfLine",value:function(e,t){var n=e[t-1];if("\n"===n)return t;for(;n&&"\n"!==n;)n=e[t-=1];return t+1}},{key:"endOfBlockIndent",value:function(t,n,r){var i=e.endOfIndent(t,r);if(i>r+n)return i;var o=e.endOfWhiteSpace(t,i),a=t[o];return a&&"\n"!==a?null:o}},{key:"atBlank",value:function(e,t,n){var r=e[t];return"\n"===r||"\t"===r||" "===r||n&&!r}},{key:"nextNodeIsIndented",value:function(e,t,n){return!(!e||t<0)&&(t>0||n&&"-"===e)}},{key:"normalizeOffset",value:function(t,n){var r=t[n];return r?"\n"!==r&&"\n"===t[n-1]?n-1:e.endOfWhiteSpace(t,n):n}},{key:"foldNewline",value:function(t,n,r){for(var i=0,o=!1,a="",s=t[n+1];" "===s||"\t"===s||"\n"===s;){switch(s){case"\n":i=0,n+=1,a+="\n";break;case"\t":i<=r&&(o=!0),n=e.endOfWhiteSpace(t,n+2)-1;break;case" ":i+=1,n+=1}s=t[n+1]}return a||(a=" "),s&&i<=r&&(o=!0),{fold:a,offset:n,error:o}}}]),e}(),la=function(e){mo(n,e);var t=Ao(n);function n(e,r,i){var o;if(fo(this,n),!(i&&r instanceof ua))throw new Error("Invalid arguments for new ".concat(e));return(o=t.call(this)).name=e,o.message=i,o.source=r,o}return po(n,[{key:"makePretty",value:function(){if(this.source){this.nodeType=this.source.type;var e=this.source.context&&this.source.context.root;if("number"==typeof this.offset){this.range=new sa(this.offset,this.offset+1);var t=e&&oa(this.offset,e);if(t){var n={line:t.line,col:t.col+1};this.linePos={start:t,end:n}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){var r=this.linePos.start,i=r.line,o=r.col;this.message+=" at line ".concat(i,", column ").concat(o);var a=e&&function(e,t){var n=e.start,r=e.end,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:80,o=aa(n.line,t);if(!o)return null;var a=n.col;if(o.length>i)if(a<=i-10)o=o.substr(0,i-1)+"…";else{var s=Math.round(i/2);o.length>a+s&&(o=o.substr(0,a+s-1)+"…"),a-=o.length-i,o="…"+o.substr(1-i)}var u=1,l="";r&&(r.line===n.line&&a+(r.col-n.col)<=i+1?u=r.col-n.col:(u=Math.min(o.length+1,i)-a,l="…"));var c=a>1?" ".repeat(a-1):"",f="^".repeat(u);return"".concat(o,"\n").concat(c).concat(f).concat(l)}(this.linePos,e);a&&(this.message+=":\n\n".concat(a,"\n"))}delete this.source}}}]),n}(wo(Error)),ca=function(e){mo(n,e);var t=Ao(n);function n(e,r){return fo(this,n),t.call(this,"YAMLReferenceError",e,r)}return n}(la),fa=function(e){mo(n,e);var t=Ao(n);function n(e,r){return fo(this,n),t.call(this,"YAMLSemanticError",e,r)}return n}(la),ha=function(e){mo(n,e);var t=Ao(n);function n(e,r){return fo(this,n),t.call(this,"YAMLSyntaxError",e,r)}return n}(la),pa=function(e){mo(n,e);var t=Ao(n);function n(e,r){return fo(this,n),t.call(this,"YAMLWarning",e,r)}return n}(la),da=function(e){mo(n,e);var t=Ao(n);function n(){return fo(this,n),t.apply(this,arguments)}return po(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;for(var e=this.valueRange,t=e.start,n=e.end,r=this.context.src,i=r[n-1];tl?r.slice(l,a+1):s)}else o+=s}var f=r[t];switch(f){case"\t":return{errors:[new fa(this,"Plain value cannot start with a tab character")],str:o};case"@":case"`":var h="Plain value cannot start with reserved character ".concat(f);return{errors:[new fa(this,h)],str:o};default:return o}}},{key:"parseBlockValue",value:function(e){for(var t=this.context,r=t.indent,i=t.inFlow,o=t.src,a=e,s=e,u=o[a];"\n"===u&&!ua.atDocumentBoundary(o,a+1);u=o[a]){var l=ua.endOfBlockIndent(o,r,a+1);if(null===l||"#"===o[l])break;a="\n"===o[l]?l:s=n.endOfLine(o,l,i)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=s,s}},{key:"parse",value:function(e,t){this.context=e;var r=e.inFlow,i=e.src,o=t,a=i[o];return a&&"#"!==a&&"\n"!==a&&(o=n.endOfLine(i,t,r)),this.valueRange=new sa(t,o),o=ua.endOfWhiteSpace(i,o),o=this.parseComment(o),this.hasComment&&!this.valueRange.isEmpty()||(o=this.parseBlockValue(o)),o}}],[{key:"endOfLine",value:function(e,t,n){for(var r=e[t],i=t;r&&"\n"!==r&&(!n||"["!==r&&"]"!==r&&"{"!==r&&"}"!==r&&","!==r);){var o=e[i+1];if(":"===r&&(!o||"\n"===o||"\t"===o||" "===o||n&&","===o))break;if((" "===r||"\t"===r)&&"#"===o)break;i+=1,r=o}return i}}]),n}(ua),ga=function(e){mo(n,e);var t=Ao(n);function n(){return fo(this,n),t.call(this,Po)}return po(n,[{key:"includesTrailingLines",get:function(){return!0}},{key:"parse",value:function(e,t){return this.context=e,this.range=new sa(t,t+1),t+1}}]),n}(ua),ma=function(e){mo(n,e);var t=Ao(n);function n(e,r){var i;return fo(this,n),(i=t.call(this,e,r)).node=null,i}return po(n,[{key:"includesTrailingLines",get:function(){return!!this.node&&this.node.includesTrailingLines}},{key:"parse",value:function(e,t){this.context=e;var n=e.parseNode,r=e.src,i=e.atLineStart,o=e.lineStart;i||this.type!==ea||(this.error=new fa(this,"Sequence items must not have preceding content on the same line"));for(var a=i?t-o:e.indent,s=ua.endOfWhiteSpace(r,t+1),u=r[s],l="#"===u,c=[],f=null;"\n"===u||"#"===u;){if("#"===u){var h=ua.endOfLine(r,s+1);c.push(new sa(s,h)),s=h}else{i=!0,o=s+1,"\n"===r[ua.endOfWhiteSpace(r,o)]&&0===c.length&&(o=(f=new ga).parse({src:r},o)),s=ua.endOfIndent(r,o)}u=r[s]}if(ua.nextNodeIsIndented(u,s-(o+a),this.type!==ea)?this.node=n({atLineStart:i,inCollection:!1,indent:a,lineStart:o,parent:this},s):u&&o>t+1&&(s=o-1),this.node){if(f){var p=e.parent.items||e.parent.contents;p&&p.push(f)}c.length&&Array.prototype.push.apply(this.props,c),s=this.node.range.end}else if(l){var d=c[0];this.props.push(d),s=d.end}else s=ua.endOfLine(r,t+1);var g=this.node?this.node.valueRange.end:s;return this.valueRange=new sa(t,g),s}},{key:"setOrigRanges",value:function(e,t){return t=xo(vo(n.prototype),"setOrigRanges",this).call(this,e,t),this.node?this.node.setOrigRanges(e,t):t}},{key:"toString",value:function(){var e=this.context.src,t=this.node,n=this.range,r=this.value;if(null!=r)return r;var i=t?e.slice(n.start,t.range.start)+String(t):e.slice(n.start,n.end);return ua.addStringTerminator(e,n.end,i)}}]),n}(ua),va=function(e){mo(n,e);var t=Ao(n);function n(){return fo(this,n),t.call(this,Uo)}return po(n,[{key:"parse",value:function(e,t){this.context=e;var n=this.parseComment(t);return this.range=new sa(t,n),n}}]),n}(ua);function ya(e){for(var t=e;t instanceof ma;)t=t.node;if(!(t instanceof ba))return null;for(var n=t.items.length,r=-1,i=n-1;i>=0;--i){var o=t.items[i];if(o.type===Uo){var a=o.context,s=a.indent,u=a.lineStart;if(s>0&&o.range.start>=u+s)break;r=i}else{if(o.type!==Po)break;r=i}}if(-1===r)return null;for(var l=t.items.splice(r,n-r),c=l[0].range.start;t.range.end=c,t.valueRange&&t.valueRange.end>c&&(t.valueRange.end=c),t!==e;)t=t.context.parent;return l}var ba=function(e){mo(n,e);var t=Ao(n);function n(e){var r;fo(this,n),r=t.call(this,e.type===ea?Qo:Wo);for(var i=e.props.length-1;i>=0;--i)if(e.props[i].start0}},{key:"parse",value:function(e,t){this.context=e;var r=e.parseNode,i=e.src,o=ua.startOfLine(i,t),a=this.items[0];a.context.parent=this,this.valueRange=sa.copy(a.valueRange);for(var s=a.range.start-a.context.lineStart,u=t,l=i[u=ua.normalizeOffset(i,u)],c=ua.endOfWhiteSpace(i,o)===u,f=!1;l;){for(;"\n"===l||"#"===l;){if(c&&"\n"===l&&!f){var h=new ga;if(u=h.parse({src:i},u),this.valueRange.end=u,u>=i.length){l=null;break}this.items.push(h),u-=1}else if("#"===l){if(u=i.length){l=null;break}}if(o=u+1,u=ua.endOfIndent(i,o),ua.atBlank(i,u)){var d=ua.endOfWhiteSpace(i,u),g=i[d];g&&"\n"!==g&&"#"!==g||(u=d)}l=i[u],c=!0}if(!l)break;if(u!==o+s&&(c||":"!==l)){if(ut&&(u=o);break}if(!this.error){this.error=new ha(this,"All collection items must start at the same column")}}if(a.type===ea){if("-"!==l){o>t&&(u=o);break}}else if("-"===l&&!this.error){var m=i[u+1];if(!m||"\n"===m||"\t"===m||" "===m){this.error=new ha(this,"A collection cannot be both a mapping and a sequence")}}var v=r({atLineStart:c,inCollection:!0,indent:s,lineStart:o,parent:this},u);if(!v)return u;if(this.items.push(v),this.valueRange.end=v.valueRange.end,l=i[u=ua.normalizeOffset(i,v.range.end)],c=!1,f=v.includesTrailingLines,l){for(var y=u-1,b=i[y];" "===b||"\t"===b;)b=i[--y];"\n"===b&&(o=y+1,c=!0)}var D=ya(v);D&&Array.prototype.push.apply(this.items,D)}return u}},{key:"setOrigRanges",value:function(e,t){return t=xo(vo(n.prototype),"setOrigRanges",this).call(this,e,t),this.items.forEach((function(n){t=n.setOrigRanges(e,t)})),t}},{key:"toString",value:function(){var e=this.context.src,t=this.items,n=this.range,r=this.value;if(null!=r)return r;for(var i=e.slice(n.start,t[0].range.start)+String(t[0]),o=1;o=i+r||("#"===o||"\n"===o)&&n.nextContentHasIndent(e,t,r))}}]),n}(ua),Da=function(e){mo(n,e);var t=Ao(n);function n(){var e;return fo(this,n),(e=t.call(this,qo)).name=null,e}return po(n,[{key:"parameters",get:function(){var e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}},{key:"parseName",value:function(e){for(var t=this.context.src,n=e,r=t[n];r&&"\n"!==r&&"\t"!==r&&" "!==r;)r=t[n+=1];return this.name=t.slice(e,n),n}},{key:"parseParameters",value:function(e){for(var t=this.context.src,n=e,r=t[n];r&&"\n"!==r&&"#"!==r;)r=t[n+=1];return this.valueRange=new sa(e,n),n}},{key:"parse",value:function(e,t){this.context=e;var n=this.parseName(t+1);return n=this.parseParameters(n),n=this.parseComment(n),this.range=new sa(t,n),n}}]),n}(ua),wa=function(e){mo(n,e);var t=Ao(n);function n(){var e;return fo(this,n),(e=t.call(this,Go)).directives=null,e.contents=null,e.directivesEndMarker=null,e.documentEndMarker=null,e}return po(n,[{key:"parseDirectives",value:function(e){var t=this.context.src;this.directives=[];for(var r=!0,i=!1,o=e;!ua.atDocumentBoundary(t,o,Io);)switch(t[o=n.startCommentOrEndBlankLine(t,o)]){case"\n":if(r){var a=new ga;(o=a.parse({src:t},o))0&&(this.contents=this.directives,this.directives=[]),o}return t[o]?(this.directivesEndMarker=new sa(o,o+3),o+3):(i?this.error=new fa(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),o)}},{key:"parseContents",value:function(e){var t=this.context,r=t.parseNode,i=t.src;this.contents||(this.contents=[]);for(var o=e;"-"===i[o-1];)o-=1;var a=ua.endOfWhiteSpace(i,e),s=o===e;for(this.valueRange=new sa(a);!ua.atDocumentBoundary(i,a,Bo);){switch(i[a]){case"\n":if(s){var u=new ga;(a=u.parse({src:i},a))0&&((t.length>0||e[0].type===Uo)&&(r+="---\n"),r+=e.join("")),"\n"!==r[r.length-1]&&(r+="\n"),r}}],[{key:"startCommentOrEndBlankLine",value:function(e,t){var n=ua.endOfWhiteSpace(e,t),r=e[n];return"#"===r||"\n"===r?n:t}}]),n}(ua),Ea=function(e){mo(n,e);var t=Ao(n);function n(){return fo(this,n),t.apply(this,arguments)}return po(n,[{key:"parse",value:function(e,t){this.context=e;var n=e.src,r=ua.endOfIdentifier(n,t+1);return this.valueRange=new sa(t+1,r),r=ua.endOfWhiteSpace(n,r),r=this.parseComment(r)}}]),n}(ua),ka="CLIP",Aa="KEEP",xa="STRIP",_a=function(e){mo(n,e);var t=Ao(n);function n(e,r){var i;return fo(this,n),(i=t.call(this,e,r)).blockIndent=null,i.chomping=ka,i.header=null,i}return po(n,[{key:"includesTrailingLines",get:function(){return this.chomping===Aa}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=this.valueRange,t=e.start,n=e.end,r=this.context,i=r.indent,o=r.src;if(this.valueRange.isEmpty())return"";for(var a=null,s=o[n-1];"\n"===s||"\t"===s||" "===s;){if((n-=1)<=t){if(this.chomping===Aa)break;return""}"\n"===s&&(a=n),s=o[n-1]}var u=n+1;a&&(this.chomping===Aa?(u=a,n=this.valueRange.end):n=a);for(var l=i+this.blockIndent,c=this.type===jo,f=!0,h="",p="",d=!1,g=t;gs&&(s=f);o="\n"===r[l]?l:a=ua.endOfLine(r,l)}return this.chomping!==Aa&&(o=r[a]?a+1:a),this.valueRange=new sa(e+1,o),o}},{key:"parse",value:function(e,t){this.context=e;var n=e.src,r=this.parseBlockHeader(t);return r=ua.endOfWhiteSpace(n,r),r=this.parseComment(r),r=this.parseBlockValue(r)}},{key:"setOrigRanges",value:function(e,t){return t=xo(vo(n.prototype),"setOrigRanges",this).call(this,e,t),this.header?this.header.setOrigRange(e,t):t}}]),n}(ua),Ca=function(e){mo(n,e);var t=Ao(n);function n(e,r){var i;return fo(this,n),(i=t.call(this,e,r)).items=null,i}return po(n,[{key:"prevNodeIsJsonLike",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.items.length,t=this.items[e-1];return!!t&&(t.jsonLike||t.type===Uo&&this.prevNodeIsJsonLike(e-1))}},{key:"parse",value:function(e,t){this.context=e;var n=e.parseNode,r=e.src,i=e.indent,o=e.lineStart,a=r[t];this.items=[{char:a,offset:t}];var s=ua.endOfWhiteSpace(r,t+1);for(a=r[s];a&&"]"!==a&&"}"!==a;){switch(a){case"\n":if(o=s+1,"\n"===r[ua.endOfWhiteSpace(r,o)]){var u=new ga;o=u.parse({src:r},o),this.items.push(u)}if((s=ua.endOfIndent(r,o))<=o+i&&(a=r[s],sn.offset);)++r;n.origOffset=n.offset+r,t=r}})),t}},{key:"toString",value:function(){var e=this.context.src,t=this.items,n=this.range,r=this.value;if(null!=r)return r;var i=t.filter((function(e){return e instanceof ua})),o="",a=n.start;return i.forEach((function(t){var n=e.slice(a,t.range.start);a=t.range.end,"\n"===(o+=n+String(t))[o.length-1]&&"\n"!==e[a-1]&&"\n"===e[a]&&(a+=1)})),o+=e.slice(a,n.end),ua.addStringTerminator(e,n.end,o)}}]),n}(ua),Sa=function(e){mo(n,e);var t=Ao(n);function n(){return fo(this,n),t.apply(this,arguments)}return po(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,n=t.start,r=t.end,i=this.context,o=i.indent,a=i.src;'"'!==a[r-1]&&e.push(new ha(this,'Missing closing "quote'));for(var s="",u=n+1;uf?a.slice(f,u+1):l)}else s+=l}return e.length>0?{errors:e,str:s}:s}},{key:"parseCharCode",value:function(e,t,n){var r=this.context.src,i=r.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;return isNaN(o)?(n.push(new ha(this,"Invalid escape sequence ".concat(r.substr(e-2,t+2)))),r.substr(e-2,t+2)):String.fromCodePoint(o)}},{key:"parse",value:function(e,t){this.context=e;var r=e.src,i=n.endOfQuote(r,t+1);return this.valueRange=new sa(t,i),i=ua.endOfWhiteSpace(r,i),i=this.parseComment(i)}}],[{key:"endOfQuote",value:function(e,t){for(var n=e[t];n&&'"'!==n;)n=e[t+="\\"===n?2:1];return t+1}}]),n}(ua),Fa=function(e){mo(n,e);var t=Ao(n);function n(){return fo(this,n),t.apply(this,arguments)}return po(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,n=t.start,r=t.end,i=this.context,o=i.indent,a=i.src;"'"!==a[r-1]&&e.push(new ha(this,"Missing closing 'quote"));for(var s="",u=n+1;uf?a.slice(f,u+1):l)}else s+=l}return e.length>0?{errors:e,str:s}:s}},{key:"parse",value:function(e,t){this.context=e;var r=e.src,i=n.endOfQuote(r,t+1);return this.valueRange=new sa(t,i),i=ua.endOfWhiteSpace(r,i),i=this.parseComment(i)}}],[{key:"endOfQuote",value:function(e,t){for(var n=e[t];n;)if("'"===n){if("'"!==e[t+1])break;n=e[t+=2]}else n=e[t+=1];return t+1}}]),n}(ua);function Oa(e,t){switch(e){case Mo:return new Ea(e,t);case jo:case zo:return new _a(e,t);case Ho:case Vo:return new Ca(e,t);case Yo:case Ko:case ea:return new ma(e,t);case Uo:case Jo:return new da(e,t);case Xo:return new Sa(e,t);case Zo:return new Fa(e,t);default:return null}}var Ta=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.atLineStart,o=r.inCollection,a=r.inFlow,s=r.indent,u=r.lineStart,l=r.parent;fo(this,e),go(this,"parseNode",(function(n,r){if(ua.atDocumentBoundary(t.src,r))return null;var i=new e(t,n),o=i.parseProps(r),a=o.props,s=o.type,u=o.valueStart,l=Oa(s,a),c=l.parse(i,u);if(l.range=new sa(r,c),c<=r&&(l.error=new Error("Node#parse consumed no characters"),l.error.parseEnd=c,l.error.source=l,l.range.end=r+1),i.nodeStartsCollection(l)){l.error||i.atLineStart||i.parent.type!==Go||(l.error=new ha(l,"Block collection must not have preceding content here (e.g. directives-end indicator)"));var f=new ba(l);return c=f.parse(new e(i),c),f.range=new sa(r,c),f}return l})),this.atLineStart=null!=i?i:n.atLineStart||!1,this.inCollection=null!=o?o:n.inCollection||!1,this.inFlow=null!=a?a:n.inFlow||!1,this.indent=null!=s?s:n.indent,this.lineStart=null!=u?u:n.lineStart,this.parent=null!=l?l:n.parent||{},this.root=n.root,this.src=n.src}return po(e,[{key:"nodeStartsCollection",value:function(e){var t=this.inCollection,n=this.inFlow,r=this.src;if(t||n)return!1;if(e instanceof ma)return!0;var i=e.range.end;return"\n"!==r[i]&&"\n"!==r[i-1]&&":"===r[i=ua.endOfWhiteSpace(r,i)]}},{key:"parseProps",value:function(t){for(var n=this.inFlow,r=this.parent,i=this.src,o=[],a=!1,s=i[t=this.atLineStart?ua.endOfIndent(i,t):ua.endOfWhiteSpace(i,t)];s===Ro||s===Lo||s===$o||"\n"===s;){if("\n"===s){var u=t,l=void 0;do{l=u+1,u=ua.endOfIndent(i,l)}while("\n"===i[u]);var c=u-(l+this.indent),f=r.type===ea&&r.context.atLineStart;if("#"!==i[u]&&!ua.nextNodeIsIndented(i[u],c,!f))break;this.atLineStart=!0,this.lineStart=l,a=!1,t=u}else if(s===Lo){var h=ua.endOfLine(i,t+1);o.push(new sa(t,h)),t=h}else{var p=ua.endOfIdentifier(i,t+1);s===$o&&","===i[p]&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(i.slice(t+1,p+13))&&(p=ua.endOfIdentifier(i,p+5)),o.push(new sa(t,p)),a=!0,t=ua.endOfWhiteSpace(i,p)}s=i[t]}return a&&":"===s&&ua.atBlank(i,t+1,!0)&&(t-=1),{props:o,type:e.parseType(i,t,n),valueStart:t}}}],[{key:"parseType",value:function(e,t,n){switch(e[t]){case"*":return Mo;case">":return jo;case"|":return zo;case"{":return Ho;case"[":return Vo;case"?":return!n&&ua.atBlank(e,t+1,!0)?Yo:Jo;case":":return!n&&ua.atBlank(e,t+1,!0)?Ko:Jo;case"-":return!n&&ua.atBlank(e,t+1,!0)?ea:Jo;case'"':return Xo;case"'":return Zo;default:return Jo}}}]),e}();function Na(e){var t=[];-1!==e.indexOf("\r")&&(e=e.replace(/\r\n?/g,(function(e,n){return e.length>1&&t.push(n),"\n"})));var n=[],r=0;do{var i=new wa,o=new Ta({src:e});r=i.parse(o,r),n.push(i)}while(r=0;--i){var o=t[i];if(Number.isInteger(o)&&o>=0){var a=[];a[o]=r,r=a}else{var s={};Object.defineProperty(s,o,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=s}}return e.createNode(r,!1)}var Ma=function(e){return null==e||"object"===co(e)&&e[Symbol.iterator]().next().done},Pa=function(e){mo(n,e);var t=Ao(n);function n(e){var r;return fo(this,n),go(Eo(r=t.call(this)),"items",[]),r.schema=e,r}return po(n,[{key:"addIn",value:function(e,t){if(Ma(e))this.add(t);else{var r=Co(e),i=r[0],o=r.slice(1),a=this.get(i,!0);if(a instanceof n)a.addIn(o,t);else{if(void 0!==a||!this.schema)throw new Error("Expected YAML collection at ".concat(i,". Remaining path: ").concat(o));this.set(i,Ba(this.schema,o,t))}}}},{key:"deleteIn",value:function(e){var t=Co(e),r=t[0],i=t.slice(1);if(0===i.length)return this.delete(r);var o=this.get(r,!0);if(o instanceof n)return o.deleteIn(i);throw new Error("Expected YAML collection at ".concat(r,". Remaining path: ").concat(i))}},{key:"getIn",value:function(e,t){var r=Co(e),i=r[0],o=r.slice(1),a=this.get(i,!0);return 0===o.length?!t&&a instanceof Ia?a.value:a:a instanceof n?a.getIn(o,t):void 0}},{key:"hasAllNullValues",value:function(){return this.items.every((function(e){if(!e||"PAIR"!==e.type)return!1;var t=e.value;return null==t||t instanceof Ia&&null==t.value&&!t.commentBefore&&!t.comment&&!t.tag}))}},{key:"hasIn",value:function(e){var t=Co(e),r=t[0],i=t.slice(1);if(0===i.length)return this.has(r);var o=this.get(r,!0);return o instanceof n&&o.hasIn(i)}},{key:"setIn",value:function(e,t){var r=Co(e),i=r[0],o=r.slice(1);if(0===o.length)this.set(i,t);else{var a=this.get(i,!0);if(a instanceof n)a.setIn(o,t);else{if(void 0!==a||!this.schema)throw new Error("Expected YAML collection at ".concat(i,". Remaining path: ").concat(o));this.set(i,Ba(this.schema,o,t))}}}},{key:"toJSON",value:function(){return null}},{key:"toString",value:function(e,t,r,i){var o=this,a=t.blockItem,s=t.flowChars,u=t.isMap,l=t.itemIndent,c=e,f=c.indent,h=c.indentStep,p=c.stringify,d=this.type===Ho||this.type===Vo||e.inFlow;d&&(l+=h);var g=u&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:g,indent:l,inFlow:d,type:null});var m,v=!1,y=!1,b=this.items.reduce((function(t,n,r){var i;n&&(!v&&n.spaceBefore&&t.push({type:"comment",str:""}),n.commentBefore&&n.commentBefore.match(/^.*$/gm).forEach((function(e){t.push({type:"comment",str:"#".concat(e)})})),n.comment&&(i=n.comment),d&&(!v&&n.spaceBefore||n.commentBefore||n.comment||n.key&&(n.key.commentBefore||n.key.comment)||n.value&&(n.value.commentBefore||n.value.comment))&&(y=!0)),v=!1;var a=p(n,e,(function(){return i=null}),(function(){return v=!0}));return d&&!y&&a.includes("\n")&&(y=!0),d&&rn.maxFlowStringSingleLineLength){m=D;var k,A=No(E);try{for(A.s();!(k=A.n()).done;){var x=k.value;m+=x?"\n".concat(h).concat(f).concat(x):"\n"}}catch(e){A.e(e)}finally{A.f()}m+="\n".concat(f).concat(w)}else m="".concat(D," ").concat(E.join(" ")," ").concat(w)}else{var _=b.map(a);m=_.shift();var C,S=No(_);try{for(S.s();!(C=S.n()).done;){var F=C.value;m+=F?"\n".concat(f).concat(F):"\n"}}catch(e){S.e(e)}finally{S.f()}}return this.comment?(m+="\n"+this.comment.replace(/^/gm,"".concat(f,"#")),r&&r()):v&&i&&i(),m}}]),n}(La);function ja(e){var t=e instanceof Ia?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}go(Pa,"maxFlowStringSingleLineLength",60);var za=function(e){mo(n,e);var t=Ao(n);function n(){return fo(this,n),t.apply(this,arguments)}return po(n,[{key:"add",value:function(e){this.items.push(e)}},{key:"delete",value:function(e){var t=ja(e);return"number"==typeof t&&this.items.splice(t,1).length>0}},{key:"get",value:function(e,t){var n=ja(e);if("number"==typeof n){var r=this.items[n];return!t&&r instanceof Ia?r.value:r}}},{key:"has",value:function(e){var t=ja(e);return"number"==typeof t&&t1&&void 0!==arguments[1]?arguments[1]:null;return fo(this,n),(r=t.call(this)).key=e,r.value=i,r.type=n.Type.PAIR,r}return po(n,[{key:"commentBefore",get:function(){return this.key instanceof La?this.key.commentBefore:void 0},set:function(e){if(null==this.key&&(this.key=new Ia(null)),!(this.key instanceof La)){throw new Error("Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.")}this.key.commentBefore=e}},{key:"addToJSMap",value:function(e,t){var n=$a(this.key,"",e);if(t instanceof Map){var r=$a(this.value,n,e);t.set(n,r)}else if(t instanceof Set)t.add(n);else{var i=function(e,t,n){return null===t?"":"object"!==co(t)?String(t):e instanceof La&&n&&n.doc?e.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(t)}(this.key,n,e),o=$a(this.value,i,e);i in t?Object.defineProperty(t,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[i]=o}return t}},{key:"toJSON",value:function(e,t){var n=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,n)}},{key:"toString",value:function(e,t,n){if(!e||!e.doc)return JSON.stringify(this);var r=e.doc.options,i=r.indent,o=r.indentSeq,a=r.simpleKeys,s=this.key,u=this.value,l=s instanceof La&&s.comment;if(a){if(l)throw new Error("With simple keys, key nodes cannot have comments");if(s instanceof Pa){throw new Error("With simple keys, collection cannot be used as a key value")}}var c=!a&&(!s||l||(s instanceof La?s instanceof Pa||s.type===jo||s.type===zo:"object"===co(s))),f=e,h=f.doc,p=f.indent,d=f.indentStep,g=f.stringify;e=Object.assign({},e,{implicitKey:!c,indent:p+d});var m=!1,v=g(s,e,(function(){return l=null}),(function(){return m=!0}));if(v=Ra(v,e.indent,l),!c&&v.length>1024){if(a)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");c=!0}if(e.allNullValues&&!a)return this.comment?(v=Ra(v,e.indent,this.comment),t&&t()):m&&!l&&n&&n(),e.inFlow&&!c?v:"? ".concat(v);v=c?"? ".concat(v,"\n").concat(p,":"):"".concat(v,":"),this.comment&&(v=Ra(v,e.indent,this.comment),t&&t());var y="",b=null;if(u instanceof La){if(u.spaceBefore&&(y="\n"),u.commentBefore){var D=u.commentBefore.replace(/^/gm,"".concat(e.indent,"#"));y+="\n".concat(D)}b=u.comment}else u&&"object"===co(u)&&(u=h.schema.createNode(u,!0));e.implicitKey=!1,!c&&!this.comment&&u instanceof Ia&&(e.indentAtStart=v.length+1),m=!1,!o&&i>=2&&!e.inFlow&&!c&&u instanceof za&&u.type!==Vo&&!u.tag&&!h.anchors.getName(u)&&(e.indent=e.indent.substr(2));var w=g(u,e,(function(){return b=null}),(function(){return m=!0})),E=" ";if(y||this.comment)E="".concat(y,"\n").concat(e.indent);else if(!c&&u instanceof Pa){("["===w[0]||"{"===w[0])&&!w.includes("\n")||(E="\n".concat(e.indent))}else"\n"===w[0]&&(E="");return m&&!b&&n&&n(),Ra(v+E+w,e.indent,b)}}]),n}(La);go(Ua,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var qa=function e(t,n){if(t instanceof Ga){var r=n.get(t.source);return r.count*r.aliasCount}if(t instanceof Pa){var i,o=0,a=No(t.items);try{for(a.s();!(i=a.n()).done;){var s=e(i.value,n);s>o&&(o=s)}}catch(e){a.e(e)}finally{a.f()}return o}if(t instanceof Ua){var u=e(t.key,n),l=e(t.value,n);return Math.max(u,l)}return 1},Ga=function(e){mo(n,e);var t=Ao(n);function n(e){var r;return fo(this,n),(r=t.call(this)).source=e,r.type=Mo,r}return po(n,[{key:"tag",set:function(e){throw new Error("Alias nodes cannot have tags")}},{key:"toJSON",value:function(e,t){if(!t)return $a(this.source,e,t);var n=t.anchors,r=t.maxAliasCount,i=n.get(this.source);if(!i||void 0===i.res){var o="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new ca(this.cstNode,o):new ReferenceError(o)}if(r>=0&&(i.count+=1,0===i.aliasCount&&(i.aliasCount=qa(this.source,n)),i.count*i.aliasCount>r)){var a="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new ca(this.cstNode,a):new ReferenceError(a)}return i.res}},{key:"toString",value:function(e){return n.stringify(this,e)}}],[{key:"stringify",value:function(e,t){var n=e.range,r=e.source,i=t.anchors,o=t.doc,a=t.implicitKey,s=t.inStringifyKey,u=Object.keys(i).find((function(e){return i[e]===r}));if(!u&&s&&(u=o.anchors.getName(r)||o.anchors.newName()),u)return"*".concat(u).concat(a?" ":"");var l=o.anchors.getName(r)?"Alias node must be after source node":"Source node not found for alias node";throw new Error("".concat(l," [").concat(n,"]"))}}]),n}(La);function Ha(e,t){var n,r=t instanceof Ia?t.value:t,i=No(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o instanceof Ua){if(o.key===t||o.key===r)return o;if(o.key&&o.key.value===r)return o}}}catch(e){i.e(e)}finally{i.f()}}go(Ga,"default",!0);var Va=function(e){mo(n,e);var t=Ao(n);function n(){return fo(this,n),t.apply(this,arguments)}return po(n,[{key:"add",value:function(e,t){e?e instanceof Ua||(e=new Ua(e.key||e,e.value)):e=new Ua(e);var n=Ha(this.items,e.key),r=this.schema&&this.schema.sortMapEntries;if(n){if(!t)throw new Error("Key ".concat(e.key," already set"));n.value=e.value}else if(r){var i=this.items.findIndex((function(t){return r(e,t)<0}));-1===i?this.items.push(e):this.items.splice(i,0,e)}else this.items.push(e)}},{key:"delete",value:function(e){var t=Ha(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}},{key:"get",value:function(e,t){var n=Ha(this.items,e),r=n&&n.value;return!t&&r instanceof Ia?r.value:r}},{key:"has",value:function(e){return!!Ha(this.items,e)}},{key:"set",value:function(e,t){this.add(new Ua(e,t),!0)}},{key:"toJSON",value:function(e,t,n){var r=n?new n:t&&t.mapAsMap?new Map:{};t&&t.onCreate&&t.onCreate(r);var i,o=No(this.items);try{for(o.s();!(i=o.n()).done;){i.value.addToJSMap(t,r)}}catch(e){o.e(e)}finally{o.f()}return r}},{key:"toString",value:function(e,t,r){if(!e)return JSON.stringify(this);var i,o=No(this.items);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(!(a instanceof Ua))throw new Error("Map items must all be pairs; found ".concat(JSON.stringify(a)," instead"))}}catch(e){o.e(e)}finally{o.f()}return xo(vo(n.prototype),"toString",this).call(this,e,{blockItem:function(e){return e.str},flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},t,r)}}]),n}(Pa),Wa=function(e){mo(n,e);var t=Ao(n);function n(e){var r;if(fo(this,n),e instanceof Ua){var i=e.value;i instanceof za||((i=new za).items.push(e.value),i.range=e.value.range),(r=t.call(this,e.key,i)).range=e.range}else r=t.call(this,new Ia("<<"),new za);return r.type=Ua.Type.MERGE_PAIR,ko(r)}return po(n,[{key:"addToJSMap",value:function(e,t){var n,r=No(this.value.items);try{for(r.s();!(n=r.n()).done;){var i=n.value.source;if(!(i instanceof Va))throw new Error("Merge sources must be maps");var o,a=No(i.toJSON(null,e,Map));try{for(a.s();!(o=a.n()).done;){var s=_o(o.value,2),u=s[0],l=s[1];t instanceof Map?t.has(u)||t.set(u,l):t instanceof Set?t.add(u):Object.prototype.hasOwnProperty.call(t,u)||Object.defineProperty(t,u,{value:l,writable:!0,enumerable:!0,configurable:!0})}}catch(e){a.e(e)}finally{a.f()}}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"toString",value:function(e,t){var r=this.value;if(r.items.length>1)return xo(vo(n.prototype),"toString",this).call(this,e,t);this.value=r.items[0];var i=xo(vo(n.prototype),"toString",this).call(this,e,t);return this.value=r,i}}]),n}(Ua),Ya={defaultType:zo,lineWidth:76},Ka={trueStr:"true",falseStr:"false"},Ja={asBigInt:!1},Xa={nullStr:"null"},Za={defaultType:Jo,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function Qa(e,t,n){var r,i=No(t);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=o.format,s=o.test,u=o.resolve;if(s){var l=e.match(s);if(l){var c=u.apply(null,l);return c instanceof Ia||(c=new Ia(c)),a&&(c.format=a),c}}}}catch(e){i.e(e)}finally{i.f()}return n&&(e=n(e)),new Ia(e)}var es="flow",ts="block",ns="quoted",rs=function(e,t){for(var n=e[t+1];" "===n||"\t"===n;){do{n=e[t+=1]}while(n&&"\n"!==n);n=e[t+1]}return t};function is(e,t,n,r){var i=r.indentAtStart,o=r.lineWidth,a=void 0===o?80:o,s=r.minContentWidth,u=void 0===s?20:s,l=r.onFold,c=r.onOverflow;if(!a||a<0)return e;var f=Math.max(1+u,1+a-t.length);if(e.length<=f)return e;var h=[],p={},d=a-t.length;"number"==typeof i&&(i>a-Math.max(2,u)?h.push(0):d=a-i);var g,m=void 0,v=void 0,y=!1,b=-1,D=-1,w=-1;for(n===ts&&-1!==(b=rs(e,b))&&(d=b+f);g=e[b+=1];){if(n===ns&&"\\"===g){switch(D=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}w=b}if("\n"===g)n===ts&&(b=rs(e,b)),d=b+f,m=void 0;else{if(" "===g&&v&&" "!==v&&"\n"!==v&&"\t"!==v){var E=e[b+1];E&&" "!==E&&"\n"!==E&&"\t"!==E&&(m=b)}if(b>=d)if(m)h.push(m),d=m+f,m=void 0;else if(n===ns){for(;" "===v||"\t"===v;)v=g,g=e[b+=1],y=!0;var k=b>w+1?b-2:D-1;if(p[k])return e;h.push(k),p[k]=!0,d=k+f,m=void 0}else y=!0}v=g}if(y&&c&&c(),0===h.length)return e;l&&l();for(var A=e.slice(0,h[0]),x=0;xr)return!0;if(i-(a=o+1)<=r)return!1}return!0}(a,Za.fold.lineWidth,s.length)),c=l?"|":">";if(!a)return c+"\n";var f="",h="";if(a=a.replace(/[\n\t ]*$/,(function(e){var t=e.indexOf("\n");return-1===t?c+="-":a!==e&&t===e.length-1||(c+="+",r&&r()),h=e.replace(/\n$/,""),""})).replace(/^[\n ]*/,(function(e){-1!==e.indexOf(" ")&&(c+=u);var t=e.match(/ +$/);return t?(f=e.slice(0,-t[0].length),t[0]):(f=e,"")})),h&&(h=h.replace(/\n+(?!\n|$)/g,"$&".concat(s))),f&&(f=f.replace(/\n+/g,"$&".concat(s))),i&&(c+=" #"+i.replace(/ ?[\r\n]+/g," "),n&&n()),!a)return"".concat(c).concat(u,"\n").concat(s).concat(h);if(l)return a=a.replace(/\n+/g,"$&".concat(s)),"".concat(c,"\n").concat(s).concat(f).concat(a).concat(h);a=a.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,"$&".concat(s));var p=is("".concat(f).concat(a).concat(h),s,ts,Za.fold);return"".concat(c,"\n").concat(s).concat(p)}function cs(e,t,n,r){var i=Za.defaultType,o=t.implicitKey,a=t.inFlow,s=e,u=s.type,l=s.value;"string"!=typeof l&&(l=String(l),e=Object.assign({},e,{value:l}));var c=function(i){switch(i){case jo:case zo:return ls(e,t,n,r);case Xo:return ss(l,t);case Zo:return us(l,t);case Jo:return function(e,t,n,r){var i=e.comment,o=e.type,a=e.value,s=t.actualString,u=t.implicitKey,l=t.indent,c=t.inFlow;if(u&&/[\n[\]{},]/.test(a)||c&&/[[\]{},]/.test(a))return ss(a,t);if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return u||c||-1===a.indexOf("\n")?-1!==a.indexOf('"')&&-1===a.indexOf("'")?us(a,t):ss(a,t):ls(e,t,n,r);if(!u&&!c&&o!==Jo&&-1!==a.indexOf("\n"))return ls(e,t,n,r);if(""===l&&as(a))return t.forceBlockIndent=!0,ls(e,t,n,r);var f=a.replace(/\n+/g,"$&\n".concat(l));if(s){var h=t.doc.schema.tags;if("string"!=typeof Qa(f,h,h.scalarFallback).value)return ss(a,t)}var p=u?f:is(f,l,es,os(t));return!i||c||-1===p.indexOf("\n")&&-1===i.indexOf("\n")?p:(n&&n(),function(e,t,n){if(!n)return e;var r=n.replace(/[\s\S]^/gm,"$&".concat(t,"#"));return"#".concat(r,"\n").concat(t).concat(e)}(p,l,i))}(e,t,n,r);default:return null}};u!==Xo&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(l)?u=Xo:!o&&!a||u!==jo&&u!==zo||(u=Xo);var f=c(u);if(null===f&&null===(f=c(i)))throw new Error("Unsupported default string type ".concat(i));return f}function fs(e){var t=e.format,n=e.minFractionDigits,r=e.tag,i=e.value;if("bigint"==typeof i)return String(i);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";var o=JSON.stringify(i);if(!t&&n&&(!r||"tag:yaml.org,2002:float"===r)&&/^\d/.test(o)){var a=o.indexOf(".");a<0&&(a=o.length,o+=".");for(var s=n-(o.length-a-1);s-- >0;)o+="0"}return o}function hs(e,t){var n,r,i;switch(t.type){case Ho:n="}",r="flow map";break;case Vo:n="]",r="flow sequence";break;default:return void e.push(new fa(t,"Not a flow collection!?"))}for(var o=t.items.length-1;o>=0;--o){var a=t.items[o];if(!a||a.type!==Uo){i=a;break}}if(i&&i.char!==n){var s,u="Expected ".concat(r," to end with ").concat(n);"number"==typeof i.offset?(s=new fa(t,u)).offset=i.offset+1:(s=new fa(i,u),i.range&&i.range.end&&(s.offset=i.range.end-i.range.start)),e.push(s)}}function ps(e,t){var n=t.context.src[t.range.start-1];if("\n"!==n&&"\t"!==n&&" "!==n){e.push(new fa(t,"Comments must be separated from other tokens by white space characters"))}}function ds(e,t){var n=String(t),r=n.substr(0,8)+"..."+n.substr(-8);return new fa(e,'The "'.concat(r,'" key is too long'))}function gs(e,t){var n,r=No(t);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.afterKey,a=i.before,s=i.comment,u=e.items[a];u?(o&&u.value&&(u=u.value),void 0===s?!o&&u.commentBefore||(u.spaceBefore=!0):u.commentBefore?u.commentBefore+="\n"+s:u.commentBefore=s):void 0!==s&&(e.comment?e.comment+="\n"+s:e.comment=s)}}catch(e){r.e(e)}finally{r.f()}}function ms(e,t){var n=t.strValue;return n?"string"==typeof n?n:(n.errors.forEach((function(n){n.source||(n.source=t),e.errors.push(n)})),n.str):""}function vs(e,t){var n=t.tag,r=t.type,i=!1;if(n){var o=n.handle,a=n.suffix,s=n.verbatim;if(s){if("!"!==s&&"!!"!==s)return s;var u="Verbatim tags aren't resolved, so ".concat(s," is invalid.");e.errors.push(new fa(t,u))}else if("!"!==o||a)try{return function(e,t){var n=t.tag,r=n.handle,i=n.suffix,o=e.tagPrefixes.find((function(e){return e.handle===r}));if(!o){var a=e.getDefaults().tagPrefixes;if(a&&(o=a.find((function(e){return e.handle===r}))),!o)throw new fa(t,"The ".concat(r," tag handle is non-default and was not declared."))}if(!i)throw new fa(t,"The ".concat(r," tag has no suffix."));if("!"===r&&"1.0"===(e.version||e.options.version)){if("^"===i[0])return e.warnings.push(new pa(t,"YAML 1.0 ^ tag expansion is not supported")),i;if(/[:/]/.test(i)){var s=i.match(/^([a-z0-9-]+)\/(.*)/i);return s?"tag:".concat(s[1],".yaml.org,2002:").concat(s[2]):"tag:".concat(i)}}return o.prefix+decodeURIComponent(i)}(e,t)}catch(t){e.errors.push(t)}else i=!0}switch(r){case jo:case zo:case Xo:case Zo:return na.STR;case Ho:case Wo:return na.MAP;case Vo:case Qo:return na.SEQ;case Jo:return i?na.STR:null;default:return null}}function ys(e,t,n){var r,i=e.schema.tags,o=[],a=No(i);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(s.tag===n){if(!s.test){var u=s.resolve(e,t);return u instanceof Pa?u:new Ia(u)}o.push(s)}}}catch(e){a.e(e)}finally{a.f()}var l=ms(e,t);return"string"==typeof l&&o.length>0?Qa(l,o,i.scalarFallback):null}function bs(e,t,n){try{var r=ys(e,t,n);if(r)return n&&t.tag&&(r.tag=n),r}catch(n){return n.source||(n.source=t),e.errors.push(n),null}try{var i=function(e){switch(e.type){case Ho:case Wo:return na.MAP;case Vo:case Qo:return na.SEQ;default:return na.STR}}(t);if(!i)throw new Error("The tag ".concat(n," is unavailable"));var o="The tag ".concat(n," is unavailable, falling back to ").concat(i);e.warnings.push(new pa(t,o));var a=ys(e,t,i);return a.tag=n,a}catch(n){var s=new ca(t,n.message);return s.stack=n.stack,e.errors.push(s),null}}function Ds(e,t){var n,r={before:[],after:[]},i=!1,o=!1,a=No(function(e){if(!e)return!1;var t=e.type;return t===Yo||t===Ko||t===ea}(t.context.parent)?t.context.parent.props.concat(t.props):t.props);try{for(a.s();!(n=a.n()).done;){var s=n.value,u=s.start,l=s.end;switch(t.context.src[u]){case Lo:if(!t.commentHasRequiredWhitespace(u)){e.push(new fa(t,"Comments must be separated from other tokens by white space characters"))}var c=t.header,f=t.valueRange;(f&&(u>f.start||c&&u>c.start)?r.after:r.before).push(t.context.src.slice(u+1,l));break;case Ro:if(i){e.push(new fa(t,"A node can have at most one anchor"))}i=!0;break;case $o:if(o){e.push(new fa(t,"A node can have at most one tag"))}o=!0}}}catch(e){a.e(e)}finally{a.f()}return{comments:r,hasAnchor:i,hasTag:o}}function ws(e,t){if(!t)return null;t.error&&e.errors.push(t.error);var n=Ds(e.errors,t),r=n.comments,i=n.hasAnchor,o=n.hasTag;if(i){var a=e.anchors,s=t.anchor,u=a.getNode(s);u&&(a.map[a.newName(s)]=u),a.map[s]=t}if(t.type===Mo&&(i||o)){e.errors.push(new fa(t,"An alias node must not specify any properties"))}var l=function(e,t){var n=e.anchors,r=e.errors,i=e.schema;if(t.type===Mo){var o=t.rawValue,a=n.getNode(o);if(!a){var s="Aliased anchor not found: ".concat(o);return r.push(new ca(t,s)),null}var u=new Ga(a);return n._cstAliases.push(u),u}var l=vs(e,t);if(l)return bs(e,t,l);if(t.type!==Jo){var c="Failed to resolve ".concat(t.type," node here");return r.push(new ha(t,c)),null}try{return Qa(ms(e,t),i.tags,i.tags.scalarFallback)}catch(e){return e.source||(e.source=t),r.push(e),null}}(e,t);if(l){l.range=[t.range.start,t.range.end],e.options.keepCstNodes&&(l.cstNode=t),e.options.keepNodeTypes&&(l.type=t.type);var c=r.before.join("\n");c&&(l.commentBefore=l.commentBefore?"".concat(l.commentBefore,"\n").concat(c):c);var f=r.after.join("\n");f&&(l.comment=l.comment?"".concat(l.comment,"\n").concat(f):f)}return t.resolved=l}function Es(e,t){if(t.type!==Wo&&t.type!==Ho){var n="A ".concat(t.type," node cannot be resolved as a mapping");return e.errors.push(new ha(t,n)),null}var r=t.type===Ho?function(e,t){for(var n=[],r=[],i=void 0,o=!1,a="{",s=0;s0){(l=new da(Jo,[])).context={parent:s,src:s.context.src};var c=s.range.start+1;if(l.range={start:c,end:c},l.valueRange={start:c,end:c},"number"==typeof s.range.origStart){var f=s.range.origStart+1;l.range.origStart=l.range.origEnd=f,l.valueRange.origStart=l.valueRange.origEnd=f}}var h=new Ua(i,ws(e,l));ks(s,h),r.push(h),i&&"number"==typeof o&&s.range.start>o+1024&&e.errors.push(ds(t,i)),i=void 0,o=null;break;default:void 0!==i&&r.push(new Ua(i)),i=ws(e,s),o=s.range.start,s.error&&e.errors.push(s.error);e:for(var p=a+1;;++p){var d=t.items[p];switch(d&&d.type){case Po:case Uo:continue e;case Ko:break e;default:var g="Implicit map keys need to be followed by map values";e.errors.push(new fa(s,g));break e}}if(s.valueRangeContainsNewline){var m="Implicit map keys need to be on a single line";e.errors.push(new fa(s,m))}}}void 0!==i&&r.push(new Ua(i));return{comments:n,items:r}}(e,t),i=r.comments,o=r.items,a=new Va;a.items=o,gs(a,i);for(var s=!1,u=0;ur.valueRange.start)return!1;if(i[a]!==Lo)return!1;for(var s=n;sa+1024&&e.errors.push(ds(t,o));for(var g=u.context.src,m=a;m1){throw new fa(t,"Each pair must have its own sequence indicator")}var o=i.items[0]||new Ua;i.commentBefore&&(o.commentBefore=o.commentBefore?"".concat(i.commentBefore,"\n").concat(o.commentBefore):i.commentBefore),i.comment&&(o.comment=o.comment?"".concat(i.comment,"\n").concat(o.comment):i.comment),i=o}n.items[r]=i instanceof Ua?i:new Ua(i)}}return n}function Cs(e,t,n){var r=new za(e);r.tag="tag:yaml.org,2002:pairs";var i,o=No(t);try{for(o.s();!(i=o.n()).done;){var a=i.value,s=void 0,u=void 0;if(Array.isArray(a)){if(2!==a.length)throw new TypeError("Expected [key, value] tuple: ".concat(a));s=a[0],u=a[1]}else if(a&&a instanceof Object){var l=Object.keys(a);if(1!==l.length)throw new TypeError("Expected { key: value } tuple: ".concat(a));u=a[s=l[0]]}else s=a;var c=e.createPair(s,u,n);r.items.push(c)}}catch(e){o.e(e)}finally{o.f()}return r}var Ss={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:_s,createNode:Cs},Fs=function(e){mo(n,e);var t=Ao(n);function n(){var e;return fo(this,n),go(Eo(e=t.call(this)),"add",Va.prototype.add.bind(Eo(e))),go(Eo(e),"delete",Va.prototype.delete.bind(Eo(e))),go(Eo(e),"get",Va.prototype.get.bind(Eo(e))),go(Eo(e),"has",Va.prototype.has.bind(Eo(e))),go(Eo(e),"set",Va.prototype.set.bind(Eo(e))),e.tag=n.tag,e}return po(n,[{key:"toJSON",value:function(e,t){var n=new Map;t&&t.onCreate&&t.onCreate(n);var r,i=No(this.items);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=void 0,s=void 0;if(o instanceof Ua?(a=$a(o.key,"",t),s=$a(o.value,a,t)):a=$a(o,"",t),n.has(a))throw new Error("Ordered maps must not include duplicate keys");n.set(a,s)}}catch(e){i.e(e)}finally{i.f()}return n}}]),n}(za);go(Fs,"tag","tag:yaml.org,2002:omap");var Os={identify:function(e){return e instanceof Map},nodeClass:Fs,default:!1,tag:"tag:yaml.org,2002:omap",resolve:function(e,t){var n,r=_s(e,t),i=[],o=No(r.items);try{for(o.s();!(n=o.n()).done;){var a=n.value.key;if(a instanceof Ia){if(i.includes(a.value)){throw new fa(t,"Ordered maps must not include duplicate keys")}i.push(a.value)}}}catch(e){o.e(e)}finally{o.f()}return Object.assign(new Fs,r)},createNode:function(e,t,n){var r=Cs(e,t,n),i=new Fs;return i.items=r.items,i}},Ts=function(e){mo(n,e);var t=Ao(n);function n(){var e;return fo(this,n),(e=t.call(this)).tag=n.tag,e}return po(n,[{key:"add",value:function(e){var t=e instanceof Ua?e:new Ua(e);Ha(this.items,t.key)||this.items.push(t)}},{key:"get",value:function(e,t){var n=Ha(this.items,e);return!t&&n instanceof Ua?n.key instanceof Ia?n.key.value:n.key:n}},{key:"set",value:function(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not ".concat(co(t)));var n=Ha(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Ua(e))}},{key:"toJSON",value:function(e,t){return xo(vo(n.prototype),"toJSON",this).call(this,e,t,Set)}},{key:"toString",value:function(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return xo(vo(n.prototype),"toString",this).call(this,e,t,r);throw new Error("Set items must all have null values")}}]),n}(Va);go(Ts,"tag","tag:yaml.org,2002:set");var Ns={identify:function(e){return e instanceof Set},nodeClass:Ts,default:!1,tag:"tag:yaml.org,2002:set",resolve:function(e,t){var n=Es(e,t);if(!n.hasAllNullValues())throw new fa(t,"Set items must all have null values");return Object.assign(new Ts,n)},createNode:function(e,t,n){var r,i=new Ts,o=No(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;i.items.push(e.createPair(a,null,n))}}catch(e){o.e(e)}finally{o.f()}return i}},Rs=function(e,t){var n=t.split(":").reduce((function(e,t){return 60*e+Number(t)}),0);return"-"===e?-n:n},Ls=function(e){var t=e.value;if(isNaN(t)||!isFinite(t))return fs(t);var n="";t<0&&(n="-",t=Math.abs(t));var r=[t%60];return t<60?r.unshift(0):(t=Math.round((t-r[0])/60),r.unshift(t%60),t>=60&&(t=Math.round((t-r[0])/60),r.unshift(t))),n+r.map((function(e){return e<10?"0"+String(e):String(e)})).join(":").replace(/000000\d*$/,"")},$s={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:function(e,t,n){return Rs(t,n.replace(/_/g,""))},stringify:Ls},Is={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:function(e,t,n){return Rs(t,n.replace(/_/g,""))},stringify:Ls},Bs={identify:function(e){return e instanceof Date},default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:function(e,t,n,r,i,o,a,s,u){s&&(s=(s+"00").substr(1,3));var l=Date.UTC(t,n-1,r,i||0,o||0,a||0,s||0);if(u&&"Z"!==u){var c=Rs(u[0],u.slice(1));Math.abs(c)<30&&(c*=60),l-=6e4*c}return new Date(l)},stringify:function(e){return e.value.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")}};function Ms(e){var t="undefined"!=typeof process&&process.env||{};return e?"undefined"!=typeof YAML_SILENCE_DEPRECATION_WARNINGS?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:"undefined"!=typeof YAML_SILENCE_WARNINGS?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function Ps(e,t){if(Ms(!1)){var n="undefined"!=typeof process&&process.emitWarning;n?n(e,t):console.warn(t?"".concat(t,": ").concat(e):e)}}var js={};var zs={createNode:function(e,t,n){var r=new Va(e);if(t instanceof Map){var i,o=No(t);try{for(o.s();!(i=o.n()).done;){var a=_o(i.value,2),s=a[0],u=a[1];r.items.push(e.createPair(s,u,n))}}catch(e){o.e(e)}finally{o.f()}}else if(t&&"object"===co(t))for(var l=0,c=Object.keys(t);l=0?n+r.toString(t):fs(e)}var Ws={identify:function(e){return null==e},createNode:function(e,t,n){return n.wrapScalars?new Ia(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:Xa,stringify:function(){return Xa.nullStr}},Ys={identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:function(e){return"t"===e[0]||"T"===e[0]},options:Ka,stringify:function(e){return e.value?Ka.trueStr:Ka.falseStr}},Ks={identify:function(e){return Gs(e)&&e>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:function(e,t){return Hs(e,t,8)},options:Ja,stringify:function(e){return Vs(e,8,"0o")}},Js={identify:Gs,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:function(e){return Hs(e,e,10)},options:Ja,stringify:fs},Xs={identify:function(e){return Gs(e)&&e>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:function(e,t){return Hs(e,t,16)},options:Ja,stringify:function(e){return Vs(e,16,"0x")}},Zs={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(e,t){return t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:fs},Qs={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:function(e){return parseFloat(e)},stringify:function(e){var t=e.value;return Number(t).toExponential()}},eu={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve:function(e,t,n){var r=t||n,i=new Ia(parseFloat(e));return r&&"0"===r[r.length-1]&&(i.minFractionDigits=r.length),i},stringify:fs},tu=qs.concat([Ws,Ys,Ks,Js,Xs,Zs,Qs,eu]),nu=function(e){return"bigint"==typeof e||Number.isInteger(e)},ru=function(e){var t=e.value;return JSON.stringify(t)},iu=[zs,Us,{identify:function(e){return"string"==typeof e},default:!0,tag:"tag:yaml.org,2002:str",resolve:ms,stringify:ru},{identify:function(e){return null==e},createNode:function(e,t,n){return n.wrapScalars?new Ia(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:function(){return null},stringify:ru},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:function(e){return"true"===e},stringify:ru},{identify:nu,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:function(e){return Ja.asBigInt?BigInt(e):parseInt(e,10)},stringify:function(e){var t=e.value;return nu(t)?t.toString():JSON.stringify(t)}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:function(e){return parseFloat(e)},stringify:ru}];iu.scalarFallback=function(e){throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(e)))};var ou=function(e){return e.value?Ka.trueStr:Ka.falseStr},au=function(e){return"bigint"==typeof e||Number.isInteger(e)};function su(e,t,n){var r=t.replace(/_/g,"");if(Ja.asBigInt){switch(n){case 2:r="0b".concat(r);break;case 8:r="0o".concat(r);break;case 16:r="0x".concat(r)}var i=BigInt(r);return"-"===e?BigInt(-1)*i:i}var o=parseInt(r,n);return"-"===e?-1*o:o}function uu(e,t,n){var r=e.value;if(au(r)){var i=r.toString(t);return r<0?"-"+n+i.substr(1):n+i}return fs(e)}var lu=qs.concat([{identify:function(e){return null==e},createNode:function(e,t,n){return n.wrapScalars?new Ia(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:Xa,stringify:function(){return Xa.nullStr}},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:function(){return!0},options:Ka,stringify:ou},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:function(){return!1},options:Ka,stringify:ou},{identify:au,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:function(e,t,n){return su(t,n,2)},stringify:function(e){return uu(e,2,"0b")}},{identify:au,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:function(e,t,n){return su(t,n,8)},stringify:function(e){return uu(e,8,"0")}},{identify:au,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:function(e,t,n){return su(t,n,10)},stringify:fs},{identify:au,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:function(e,t,n){return su(t,n,16)},stringify:function(e){return uu(e,16,"0x")}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(e,t){return t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:fs},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:function(e){return parseFloat(e.replace(/_/g,""))},stringify:function(e){var t=e.value;return Number(t).toExponential()}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve:function(e,t){var n=new Ia(parseFloat(e.replace(/_/g,"")));if(t){var r=t.replace(/_/g,"");"0"===r[r.length-1]&&(n.minFractionDigits=r.length)}return n},stringify:fs}],xs,Os,Ss,Ns,$s,Is,Bs),cu={core:tu,failsafe:qs,json:iu,yaml11:lu},fu={binary:xs,bool:Ys,float:eu,floatExp:Qs,floatNaN:Zs,floatTime:Is,int:Js,intHex:Xs,intOct:Ks,intTime:$s,map:zs,null:Ws,omap:Os,pairs:Ss,seq:Us,set:Ns,timestamp:Bs};function hu(e,t,n){if(e instanceof La)return e;var r=n.defaultPrefix,i=n.onTagObj,o=n.prevObjects,a=n.schema,s=n.wrapScalars;t&&t.startsWith("!!")&&(t=r+t.slice(2));var u=function(e,t,n){if(t){var r=n.filter((function(e){return e.tag===t})),i=r.find((function(e){return!e.format}))||r[0];if(!i)throw new Error("Tag ".concat(t," not found"));return i}return n.find((function(t){return(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format}))}(e,t,a.tags);if(!u){if("function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!==co(e))return s?new Ia(e):e;u=e instanceof Map?zs:e[Symbol.iterator]?Us:zs}i&&(i(u),delete n.onTagObj);var l={value:void 0,node:void 0};if(e&&"object"===co(e)&&o){var c=o.get(e);if(c){var f=new Ga(c);return n.aliasNodes.push(f),f}l.value=e,o.set(e,l)}return l.node=u.createNode?u.createNode(n.schema,e,n):s?new Ia(e):e,t&&l.node instanceof La&&(l.node.tag=t),l.node}var pu=function(e,t){return e.keyt.key?1:0},du=function(){function e(t){var n=t.customTags,r=t.merge,i=t.schema,o=t.sortMapEntries,a=t.tags;fo(this,e),this.merge=!!r,this.name=i,this.sortMapEntries=!0===o?pu:o||null,!n&&a&&function(e,t){if(!js[e]&&Ms(!0)){js[e]=!0;var n="The option '".concat(e,"' will be removed in a future release");Ps(n+=t?", use '".concat(t,"' instead."):".","DeprecationWarning")}}("tags","customTags"),this.tags=function(e,t,n,r){var i=e[r.replace(/\W/g,"")];if(!i){var o=Object.keys(e).map((function(e){return JSON.stringify(e)})).join(", ");throw new Error('Unknown schema "'.concat(r,'"; use one of ').concat(o))}if(Array.isArray(n)){var a,s=No(n);try{for(s.s();!(a=s.n()).done;){var u=a.value;i=i.concat(u)}}catch(e){s.e(e)}finally{s.f()}}else"function"==typeof n&&(i=n(i.slice()));for(var l=0;l");var a=t.substr(i.prefix.length).replace(/[!,[\]{}]/g,(function(e){return{"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[e]}));return i.handle+a}function bu(e,t,n,r){var i,o=t.doc,a=o.anchors,s=o.schema;if(!(e instanceof La)){var u={aliasNodes:[],onTagObj:function(e){return i=e},prevObjects:new Map};e=s.createNode(e,!0,null,u);var l,c=No(u.aliasNodes);try{for(c.s();!(l=c.n()).done;){var f=l.value;f.source=f.source.node;var h=a.getName(f.source);h||(h=a.newName(),a.map[h]=f.source)}}catch(e){c.e(e)}finally{c.f()}}if(e instanceof Ua)return e.toString(t,n,r);i||(i=function(e,t){if(t instanceof Ga)return Ga;if(t.tag){var n=e.filter((function(e){return e.tag===t.tag}));if(n.length>0)return n.find((function(e){return e.format===t.format}))||n[0]}var r,i;if(t instanceof Ia){i=t.value;var o=e.filter((function(e){return e.identify&&e.identify(i)||e.class&&i instanceof e.class}));r=o.find((function(e){return e.format===t.format}))||o.find((function(e){return!e.format}))}else i=t,r=e.find((function(e){return e.nodeClass&&i instanceof e.nodeClass}));if(!r){var a=i&&i.constructor?i.constructor.name:co(i);throw new Error("Tag not resolved for ".concat(a," value"))}return r}(s.tags,e));var p=function(e,t,n){var r=n.anchors,i=n.doc,o=[],a=i.anchors.getName(e);return a&&(r[a]=e,o.push("&".concat(a))),e.tag?o.push(yu(i,e.tag)):t.default||o.push(yu(i,t.tag)),o.join(" ")}(e,i,t);p.length>0&&(t.indentAtStart=(t.indentAtStart||0)+p.length+1);var d="function"==typeof i.stringify?i.stringify(e,t,n,r):e instanceof Ia?cs(e,t,n,r):e.toString(t,n,r);return p?e instanceof Ia||"{"===d[0]||"["===d[0]?"".concat(p," ").concat(d):"".concat(p,"\n").concat(t.indent).concat(d):d}var Du=function(){function e(t){fo(this,e),go(this,"map",Object.create(null)),this.prefix=t}return po(e,[{key:"createAlias",value:function(e,t){return this.setAnchor(e,t),new Ga(e)}},{key:"createMergePair",value:function(){for(var e=this,t=new Wa,n=arguments.length,r=new Array(n),i=0;i0&&!e.commentBefore&&(e.commentBefore=r.before.join("\n"),r.before=[]))}}catch(e){a.e(e)}finally{a.f()}if(e.contents=i||null,i){var l=r.before.join("\n");if(l){var c=i instanceof Pa&&i.items[0]?i.items[0]:i;c.commentBefore=c.commentBefore?"".concat(l,"\n").concat(c.commentBefore):l}e.comment=r.after.join("\n")||null}else e.comment=r.before.concat(r.after).join("\n")||null}(this,o),this.anchors.resolveNodes(),this.options.prettyErrors){var l,c=No(this.errors);try{for(c.s();!(l=c.n()).done;){var f=l.value;f instanceof la&&f.makePretty()}}catch(e){c.e(e)}finally{c.f()}var h,p=No(this.warnings);try{for(p.s();!(h=p.n()).done;){var d=h.value;d instanceof la&&d.makePretty()}}catch(e){p.e(e)}finally{p.f()}}return this}},{key:"listNonDefaultTags",value:function(){return Eu(this.contents).filter((function(e){return 0!==e.indexOf(du.defaultPrefix)}))}},{key:"setTagPrefix",value:function(e,t){if("!"!==e[0]||"!"!==e[e.length-1])throw new Error("Handle must start and end with !");if(t){var n=this.tagPrefixes.find((function(t){return t.handle===e}));n?n.prefix=t:this.tagPrefixes.push({handle:e,prefix:t})}else this.tagPrefixes=this.tagPrefixes.filter((function(t){return t.handle!==e}))}},{key:"toJSON",value:function(e,t){var n=this,r=this.options,i=r.keepBlobsInJSON,o=r.mapAsMap,a=r.maxAliasCount,s=i&&("string"!=typeof e||!(this.contents instanceof Ia)),u={doc:this,indentStep:" ",keep:s,mapAsMap:s&&!!o,maxAliasCount:a,stringify:bu},l=Object.keys(this.anchors.map);l.length>0&&(u.anchors=new Map(l.map((function(e){return[n.anchors.map[e],{alias:[],aliasCount:0,count:1}]}))));var c=$a(this.contents,e,u);if("function"==typeof t&&u.anchors){var f,h=No(u.anchors.values());try{for(h.s();!(f=h.n()).done;){var p=f.value,d=p.count;t(p.res,d)}}catch(e){h.e(e)}finally{h.f()}}return c}},{key:"toString",value:function(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");var e=this.options.indent;if(!Number.isInteger(e)||e<=0){var t=JSON.stringify(e);throw new Error('"indent" option must be a positive integer, not '.concat(t))}this.setSchema();var n=[],r=!1;if(this.version){var i="%YAML 1.2";"yaml-1.1"===this.schema.name&&("1.0"===this.version?i="%YAML:1.0":"1.1"===this.version&&(i="%YAML 1.1")),n.push(i),r=!0}var o=this.listNonDefaultTags();this.tagPrefixes.forEach((function(e){var t=e.handle,i=e.prefix;o.some((function(e){return 0===e.indexOf(i)}))&&(n.push("%TAG ".concat(t," ").concat(i)),r=!0)})),(r||this.directivesEndMarker)&&n.push("---"),this.commentBefore&&(!r&&this.directivesEndMarker||n.unshift(""),n.unshift(this.commentBefore.replace(/^/gm,"#")));var a={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:bu},s=!1,u=null;if(this.contents){this.contents instanceof La&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&n.push(""),this.contents.commentBefore&&n.push(this.contents.commentBefore.replace(/^/gm,"#")),a.forceBlockIndent=!!this.comment,u=this.contents.comment);var l=u?null:function(){return s=!0},c=bu(this.contents,a,(function(){return u=null}),l);n.push(Ra(c,"",u))}else void 0!==this.contents&&n.push(bu(this.contents,a));return this.comment&&(s&&!u||""===n[n.length-1]||n.push(""),n.push(this.comment.replace(/^/gm,"#"))),n.join("\n")+"\n"}}]),e}();go(_u,"defaults",vu);var Cu=function(e){mo(n,e);var t=Ao(n);function n(e){return fo(this,n),t.call(this,Object.assign({},gu,e))}return n}(_u);function Su(e,t){var n=Na(e),r=new Cu(t).parse(n[0]);if(n.length>1){r.errors.unshift(new fa(n[1],"Source contains multiple documents; please use YAML.parseAllDocuments()"))}return r}var Fu={createNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;void 0===n&&"string"==typeof t&&(n=t,t=!0);var r=Object.assign({},_u.defaults[gu.version],gu),i=new du(r);return i.createNode(e,t,n)},defaultOptions:gu,Document:Cu,parse:function(e,t){var n=Su(e,t);if(n.warnings.forEach((function(e){return Ps(e)})),n.errors.length>0)throw n.errors[0];return n.toJSON()},parseAllDocuments:function(e,t){var n,r,i=[],o=No(Na(e));try{for(o.s();!(r=o.n()).done;){var a=r.value,s=new Cu(t);s.parse(a,n),i.push(s),n=s}}catch(e){o.e(e)}finally{o.f()}return i},parseCST:Na,parseDocument:Su,scalarOptions:mu,stringify:function(e,t){var n=new Cu(t);return n.contents=e,String(n)}},Ou=ei(Object.freeze({__proto__:null,YAML:Fu})).YAML;var Tu=(e,{include:t,exclude:n}={})=>{const r=e=>{const r=t=>"string"==typeof t?e===t:t.test(e);return t?t.some(r):!n||!n.some(r)};for(const[t,n]of(e=>{const t=new Set;do{for(const n of Reflect.ownKeys(e))t.add([e,n])}while((e=Reflect.getPrototypeOf(e))&&e!==Object.prototype);return t})(e.constructor.prototype)){if("constructor"===n||!r(n))continue;const i=Reflect.getOwnPropertyDescriptor(t,n);i&&"function"==typeof i.value&&(e[n]=e[n].bind(e))}return e};class Nu{constructor(e,t,n,r,i,o){if(0===r.length)throw"no answers for question provided";this.text=e,this.explanation=t,this.hint=n,this.solved=!1,this.options=o,this.answers=r,o.shuffle_answers&&(this.answers=Nu.shuffle(r)),this.selected=[],this.type=i,Tu(this)}static is_equal(e,t){return JSON.stringify(e)===JSON.stringify(t)}static shuffle(e){let t,n,r=e.length;for(;0!==r;)n=Math.floor(Math.random()*r),r-=1,t=e[r],e[r]=e[n],e[n]=t;return e}reset(){this.selected=[],this.solved=!1,Nu.shuffle(this.answers)}}class Ru extends Nu{constructor(e,t,n,r,i){i.shuffle_answers=!0,super(e,t,n,r,"Sequence",i)}check(){let e=this.answers.map((e=>e.id));return this.solved=Nu.is_equal(e.sort(),this.selected),this.solved}}class Lu extends Nu{constructor(e,t,n,r,i){super(e,t,n,r,"MultipleChoice",i)}check(){let e=this.answers.map(((e,t)=>t)).filter((e=>this.answers[e].correct));return this.solved=Nu.is_equal(e.sort(),this.selected.sort()),this.solved}}class $u extends Nu{constructor(e,t,n,r,i){super(e,t,n,r,"SingleChoice",i);let o=this;r.forEach((function(e,t){if(e.correct){if(void 0!==o.correct)throw"Single choice question can only have one answer";o.correct=t}}))}check(){return this.solved=this.selected[0]===this.correct,this.solved}}class Iu{constructor(e,t,n,r){this.html=t,this.correct=n,this.id=e,this.comment=r,Tu(this)}}class Bu{constructor(e){this.val=Ge(0),this.max=e,this.subscribe=this.val.subscribe,Tu(this)}jump(e){this.val.set(e)}next(){this.val.update((e=>ee>0?e-1:e))}reset(){0==c(this.val)&&this.val.set(1),this.val.set(0)}}class Mu{constructor(e,t){if(0==e.length)throw"No questions for quiz provided";this.questions=e,this.counter=new Bu(this.questions.length),this.finished=Ge(!1),this.points=0,this.config=t,t.shuffle_questions&&(this.questions=Nu.shuffle(e)),Tu(this)}current(){let e=c(this.counter);return this.questions[e]}next(){this.counter.next()}previous(){this.counter.previous()}jump(e){this.counter.jump(e)}reset(){this.counter.reset(),this.questions.forEach((e=>e.reset())),this.finished.set(!1)}evaluate(){this.finished.set(!0);var e=0;for(var t of this.questions)t.check(),t.solved&&e++;this.points=e,this.jump(this.counter.max)}}function Pu(e,t){return void 0!==e?e:t}class ju{constructor(e){this.start_on_load=Pu(e.start_on_load,!0),this.shuffle_answers=Pu(e.shuffle_answers,!0),this.shuffle_questions=Pu(e.shuffle_questions,!1),this.primary_color=Pu(e.primary_color,"steelblue"),this.secondary_color=Pu(e.secondary_color,"#f2f2f2"),this.text_color=Pu(e.text_color,"black"),this.locale=Pu(e.locale,null)}}function zu(e,t){let n=new ju(e);for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}ao.registerLanguage("python",uo),ao.registerLanguage("plaintext",lo),ni.setOptions({highlight:function(e,t){const n=ao.getLanguage(t)?t:"plaintext";return ao.highlight(e,{language:n}).value}});const Uu={hr(e){const t=RegExp(/^ {0,3}(-{3,}(?=[^-\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~-]* *(?:\n+|$)|$)/).exec(e);if(t)return{type:"options",raw:t[0],data:Ou.parse(t[3],{})}}},qu={paragraph:e=>e,blockquote:e=>e,heading:e=>e};function Gu(e){return ri.sanitize(ni.parser(e))}function Hu(e,t){let n=ni.lexer((r=ii(e),(new DOMParser).parseFromString(r,"text/html").documentElement.textContent));var r;let i,o=[],a="",s="",u="",l=!0,c=new ju(t);return n.forEach((function(e,t){if("heading"==e.type&&(s="",u="",a=Gu([e]),i=new ju(c),l=!1),"options"==e.type&&(l?c=zu(c,e.data):i=zu(c,e.data)),"paragraph"!=e.type&&"code"!=e.type||(s+=Gu([e])),"blockquote"==e.type&&(u+=Gu([e])),"list"==e.type){let t=[];e.items.forEach((function(e,n){let r="",i="";e.tokens.forEach((function(e,t){"blockquote"==e.type?i+=Gu([e]):r+=Gu([e])})),t.push(new Iu(n,r,e.checked,i))})),e.ordered?e.items[0].task?o.push(new $u(a,s,u,t,i)):o.push(new Ru(a,s,u,t,i)):o.push(new Lu(a,s,u,t,i))}})),new Mu(o,c)}function Vu(e,t,n){let r;t.innerHTML="",t.shadowRoot?(r=t.shadowRoot,r.innerHTML=""):r=t.attachShadow({mode:"open"});try{let t=Hu(e,n);new Qr({target:r,intro:!1,props:{quiz:t}})}catch(e){r.innerHTML=`${e}. App could not render. Please check your quizdown syntax.`}}ni.use({renderer:qu,tokenizer:Uu}),e.create_app=Vu,e.init=function(e={}){let t=new ju(e);t.start_on_load&&"undefined"!=typeof document&&window.addEventListener("load",(function(){let e=document.querySelectorAll(".quizdown");for(let n of e)Vu(n.innerHTML,n,t)}),!1)},Object.defineProperty(e,"__esModule",{value:!0})})); + ***************************************************************************** */function Pn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);in.slice(0,t+1).join("-"))).reverse()}function Vn(e,t=zn().fallbackLocale){const n=Hn(e);return t?[...new Set([...n,...Hn(t)])]:n}function Wn(){return Un}Gn.subscribe((e=>{Un=e,"undefined"!=typeof window&&null!==e&&document.documentElement.setAttribute("lang",e)}));const Yn=Gn.set;Gn.set=e=>{if(function(e){if(null==e)return;const t=Vn(e);for(let e=0;eqn.set(!0)),t):qn.set(!0),Mn(e).then((()=>{Yn(e)})).finally((()=>{clearTimeout(n),qn.set(!1)}))}return Yn(e)},Gn.update=e=>Yn(e(Un));const Kn=e=>{const t=Object.create(null);return n=>{const r=JSON.stringify(n);return r in t?t[r]:t[r]=e(n)}},Jn=(e,t)=>{const{formats:n}=zn();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Xn=Kn((e=>{var{locale:t,format:n}=e,r=Pn(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(r=Jn("number",n)),new Intl.NumberFormat(t,r)})),Zn=Kn((e=>{var{locale:t,format:n}=e,r=Pn(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?r=Jn("date",n):0===Object.keys(r).length&&(r=Jn("date","short")),new Intl.DateTimeFormat(t,r)})),Qn=Kn((e=>{var{locale:t,format:n}=e,r=Pn(e,["locale","format"]);if(null==t)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?r=Jn("time",n):0===Object.keys(r).length&&(r=Jn("time","short")),new Intl.DateTimeFormat(t,r)})),er=Kn(((e,t=Wn())=>new xn(e,t,zn().formats,{ignoreTag:zn().ignoreTag}))),tr=(e,t={})=>{"object"==typeof e&&(e=(t=e).id);const{values:n,locale:r=Wn(),default:i}=t;if(null==r)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let o=Sn(e,r);if(o){if("string"!=typeof o)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof o}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),o}else zn().warnOnMissingMessages&&console.warn(`[svelte-i18n] The message "${e}" was not found in "${Vn(r).join('", "')}".${In(Wn())?"\n\nNote: there are at least one loader still registered to this locale that wasn't executed.":""}`),o=i||e;if(!n)return o;let a=o;try{a=er(o,r).format(n)}catch(t){console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return a},nr=(e,t)=>((e={})=>{var{locale:t=Wn()}=e,n=Pn(e,["locale"]);return Qn(Object.assign({locale:t},n))})(t).format(e),rr=(e,t)=>((e={})=>{var{locale:t=Wn()}=e,n=Pn(e,["locale"]);return Zn(Object.assign({locale:t},n))})(t).format(e),ir=(e,t)=>((e={})=>{var{locale:t=Wn()}=e,n=Pn(e,["locale"]);return Xn(Object.assign({locale:t},n))})(t).format(e),or=(e,t=Wn())=>Sn(e,t),ar=He([Gn,On],(()=>tr));function sr(e){k(e,"xeqbwq",".top-list-item.svelte-xeqbwq.svelte-xeqbwq{margin-bottom:0.2rem;list-style-type:none}.top-list-item.svelte-xeqbwq.svelte-xeqbwq:hover{cursor:pointer;background-color:var(--quizdown-color-secondary)}.top-list-item.svelte-xeqbwq:hover .list-question.svelte-xeqbwq{text-decoration:underline}.list-comment.svelte-xeqbwq.svelte-xeqbwq{margin-left:2em;list-style-type:initial}")}function ur(e,t,n){const r=e.slice();return r[4]=t[n],r[6]=n,r}function lr(e,t,n){const r=e.slice();return r[7]=t[n],r}function cr(e){let t,n,r,i,o,a=e[4].answers[e[7]].html+"",s=e[4].answers[e[7]].comment+"";return{c(){t=w("li"),n=w("i"),r=O(":\n "),o=T(),i=new B(o),L(t,"class","list-comment svelte-xeqbwq")},m(e,u){_(e,t,u),E(t,n),n.innerHTML=a,E(t,r),i.m(s,t),E(t,o)},p(e,t){1&t&&a!==(a=e[4].answers[e[7]].html+"")&&(n.innerHTML=a),1&t&&s!==(s=e[4].answers[e[7]].comment+"")&&i.p(s)},d(e){e&&C(t)}}}function fr(e){let t,n=""!==e[4].answers[e[7]].comment&&cr(e);return{c(){n&&n.c(),t=N()},m(e,r){n&&n.m(e,r),_(e,t,r)},p(e,r){""!==e[4].answers[e[7]].comment?n?n.p(e,r):(n=cr(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(e){n&&n.d(e),e&&C(t)}}}function hr(e){let t,n,r,i,o,a,s,u,l,c,f,h,p=e[2][+e[4].solved]+"",d=e[6]+1+"",g=e[4].text+"",m=e[4].selected,v=[];for(let t=0;t${e[0].points}`,total:`${e[0].counter.max}`}})+"",a=e[0].questions,s=[];for(let t=0;t${e[0].points}`,total:`${e[0].counter.max}`}})+"")&&(n.innerHTML=o),5&t){let n;for(a=e[0].questions,n=0;nn(1,r=e)));let{quiz:i}=t;return e.$$set=e=>{"quiz"in e&&n(0,i=e.quiz)},[i,r,["❌","✅"],e=>i.jump(e)]}He([Gn],(()=>nr)),He([Gn],(()=>rr)),He([Gn],(()=>ir)),He([Gn,On],(()=>or));class gr extends me{constructor(e){super(),ge(this,e,dr,pr,u,{quiz:0},sr)}}function mr(e){let t,n,r,i,o,a,s,u,l,c,f=e[1]+1+"",h=e[3].text+"",p=null!==e[3].explanation&&""!==e[3].explanation&&yr(e);var d=e[5][e[3].type];function g(e){return{props:{quiz:e[0]}}}return d&&(u=new d(g(e))),{c(){t=w("h3"),n=O("Q"),r=O(f),i=O(": "),a=T(),p&&p.c(),s=T(),u&&fe(u.$$.fragment),l=N(),o=new B(null)},m(e,f){_(e,t,f),E(t,n),E(t,r),E(t,i),o.m(h,t),_(e,a,f),p&&p.m(e,f),_(e,s,f),u&&he(u,e,f),_(e,l,f),c=!0},p(e,t){(!c||2&t)&&f!==(f=e[1]+1+"")&&$(r,f),(!c||8&t)&&h!==(h=e[3].text+"")&&o.p(h),null!==e[3].explanation&&""!==e[3].explanation?p?p.p(e,t):(p=yr(e),p.c(),p.m(s.parentNode,s)):p&&(p.d(1),p=null);const n={};if(1&t&&(n.quiz=e[0]),d!==(d=e[5][e[3].type])){if(u){oe();const e=u;ue(e.$$.fragment,1,0,(()=>{pe(e,1)})),ae()}d?(u=new d(g(e)),fe(u.$$.fragment),se(u.$$.fragment,1),he(u,l.parentNode,l)):u=null}else d&&u.$set(n)},i(e){c||(u&&se(u.$$.fragment,e),c=!0)},o(e){u&&ue(u.$$.fragment,e),c=!1},d(e){e&&C(t),e&&C(a),p&&p.d(e),e&&C(s),e&&C(l),u&&pe(u,e)}}}function vr(e){let t,n,r,i,o,a=e[4]("results_title")+"";return i=new gr({props:{quiz:e[0]}}),{c(){t=w("h3"),n=O(a),r=T(),fe(i.$$.fragment)},m(e,a){_(e,t,a),E(t,n),_(e,r,a),he(i,e,a),o=!0},p(e,t){(!o||16&t)&&a!==(a=e[4]("results_title")+"")&&$(n,a);const r={};1&t&&(r.quiz=e[0]),i.$set(r)},i(e){o||(se(i.$$.fragment,e),o=!0)},o(e){ue(i.$$.fragment,e),o=!1},d(e){e&&C(t),e&&C(r),pe(i,e)}}}function yr(e){let t,n=e[3].explanation+"";return{c(){t=w("p")},m(e,r){_(e,t,r),t.innerHTML=n},p(e,r){8&r&&n!==(n=e[3].explanation+"")&&(t.innerHTML=n)},d(e){e&&C(t)}}}function br(e){let t,n,r,i;const o=[vr,mr],a=[];function s(e,t){return e[1]===e[2].max?0:1}return t=s(e),n=a[t]=o[t](e),{c(){n.c(),r=N()},m(e,n){a[t].m(e,n),_(e,r,n),i=!0},p(e,[i]){let u=t;t=s(e),t===u?a[t].p(e,i):(oe(),ue(a[u],1,1,(()=>{a[u]=null})),ae(),n=a[t],n?n.p(e,i):(n=a[t]=o[t](e),n.c()),se(n,1),n.m(r.parentNode,r))},i(e){i||(se(n),i=!0)},o(e){ue(n),i=!1},d(e){a[t].d(e),e&&C(r)}}}function Dr(e,n,r){let i,o,a,s,u=t;f(e,ar,(e=>r(4,s=e))),e.$$.on_destroy.push((()=>u()));let{quiz:c}=n,h={MultipleChoice:qe,SingleChoice:qe,Sequence:Ne};return e.$$set=e=>{"quiz"in e&&r(0,c=e.quiz)},e.$$.update=()=>{1&e.$$.dirty&&(r(2,i=c.counter),u(),u=l(i,(e=>r(1,a=e)))),3&e.$$.dirty&&r(3,o=c.questions[a])},[c,a,i,o,s,h]}class wr extends me{constructor(e){super(),ge(this,e,Dr,br,u,{quiz:0},null)}}function Er(e){k(e,"1wqt442","button.svelte-1wqt442:disabled{background-color:rgb(231, 231, 231);filter:grayscale(100%);color:gray;cursor:initial}button.svelte-1wqt442{background-color:var(--quizdown-color-secondary);color:var(--quizdown-color-text);padding:0.5rem 1rem;border-radius:4px;border:1px solid transparent;line-height:1;text-align:center;transition:opacity 0.2s ease;text-decoration:none;transform:scale(1);display:inline-block;cursor:pointer;margin:0.2rem;font-size:1em}button.svelte-1wqt442:hover:not(:checked):not(:active):not(:disabled){filter:brightness(0.9)}")}function kr(e){let t,n,r,i;const o=e[3].default,a=function(e,t,n,r){if(e){const i=h(e,t,n,r);return e[0](i)}}(o,e,e[2],null),u=a||function(e){let t;return{c(){t=O("Hello World")},m(e,n){_(e,t,n)},d(e){e&&C(t)}}}();return{c(){t=w("button"),u&&u.c(),t.disabled=e[1],L(t,"class","svelte-1wqt442")},m(o,a){_(o,t,a),u&&u.m(t,null),n=!0,r||(i=R(t,"click",(function(){s(e[0])&&e[0].apply(this,arguments)})),r=!0)},p(r,[i]){e=r,a&&a.p&&(!n||4&i)&&p(a,o,e,e[2],i,null,null),(!n||2&i)&&(t.disabled=e[1])},i(e){n||(se(u,e),n=!0)},o(e){ue(u,e),n=!1},d(e){e&&C(t),u&&u.d(e),r=!1,i()}}}function Ar(e,t,n){let{$$slots:r={},$$scope:i}=t,{buttonAction:o=(()=>alert("Life has never Svelte better"))}=t,{disabled:a=!1}=t;return e.$$set=e=>{"buttonAction"in e&&n(0,o=e.buttonAction),"disabled"in e&&n(1,a=e.disabled),"$$scope"in e&&n(2,i=e.$$scope)},[o,a,i,r]}class xr extends me{constructor(e){super(),ge(this,e,Ar,kr,u,{buttonAction:0,disabled:1},Er)}}function _r(e){k(e,"kh8fob",".button-row.svelte-kh8fob.svelte-kh8fob{margin-top:1em;display:flex;justify-content:left}.quizdown-credits.svelte-kh8fob a.svelte-kh8fob{color:gray;text-decoration:none}.quizdown-credits.svelte-kh8fob a.svelte-kh8fob:hover{text-decoration:underline}.quizdown-credits.svelte-kh8fob.svelte-kh8fob{margin-top:1rem;font-size:small;text-align:end;color:lightgray}.quizdown-hint.svelte-kh8fob.svelte-kh8fob{font-size:smaller}")}function Cr(e){let t,n,r,i,o,a;t=new xr({props:{disabled:null===e[5].hint||""===e[5].hint||e[2],buttonAction:e[8],$$slots:{default:[Fr]},$$scope:{ctx:e}}});const s=[Nr,Tr,Or],u=[];function l(e,t){return e[7]?0:e[1]===e[3].max-1?1:2}return r=l(e),i=u[r]=s[r](e),{c(){fe(t.$$.fragment),n=T(),i.c(),o=N()},m(e,i){he(t,e,i),_(e,n,i),u[r].m(e,i),_(e,o,i),a=!0},p(e,n){const a={};36&n&&(a.disabled=null===e[5].hint||""===e[5].hint||e[2]),4&n&&(a.buttonAction=e[8]),576&n&&(a.$$scope={dirty:n,ctx:e}),t.$set(a);let c=r;r=l(e),r===c?u[r].p(e,n):(oe(),ue(u[c],1,1,(()=>{u[c]=null})),ae(),i=u[r],i?i.p(e,n):(i=u[r]=s[r](e),i.c()),se(i,1),i.m(o.parentNode,o))},i(e){a||(se(t.$$.fragment,e),se(i),a=!0)},o(e){ue(t.$$.fragment,e),ue(i),a=!1},d(e){pe(t,e),e&&C(n),u[r].d(e),e&&C(o)}}}function Sr(e){let t,n;return t=new xr({props:{buttonAction:e[0].reset,$$slots:{default:[Ir]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,r){he(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.buttonAction=e[0].reset),576&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){pe(t,e)}}}function Fr(e){let t,n=e[6]("hint")+"";return{c(){t=O(n)},m(e,n){_(e,t,n)},p(e,r){64&r&&n!==(n=e[6]("hint")+"")&&$(t,n)},d(e){e&&C(t)}}}function Or(e){let t,n;return t=new xr({props:{buttonAction:e[0].next,$$slots:{default:[Rr]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,r){he(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.buttonAction=e[0].next),576&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){pe(t,e)}}}function Tr(e){let t,n;return t=new xr({props:{buttonAction:e[0].evaluate,$$slots:{default:[Lr]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,r){he(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.buttonAction=e[0].evaluate),576&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){pe(t,e)}}}function Nr(e){let t,n;return t=new xr({props:{buttonAction:e[0].evaluate,$$slots:{default:[$r]},$$scope:{ctx:e}}}),{c(){fe(t.$$.fragment)},m(e,r){he(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.buttonAction=e[0].evaluate),576&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(se(t.$$.fragment,e),n=!0)},o(e){ue(t.$$.fragment,e),n=!1},d(e){pe(t,e)}}}function Rr(e){let t,n=e[6]("next")+"";return{c(){t=O(n)},m(e,n){_(e,t,n)},p(e,r){64&r&&n!==(n=e[6]("next")+"")&&$(t,n)},d(e){e&&C(t)}}}function Lr(e){let t,n=e[6]("evaluate")+"";return{c(){t=O(n)},m(e,n){_(e,t,n)},p(e,r){64&r&&n!==(n=e[6]("evaluate")+"")&&$(t,n)},d(e){e&&C(t)}}}function $r(e){let t,n=e[6]("evaluate")+"";return{c(){t=O(n)},m(e,n){_(e,t,n)},p(e,r){64&r&&n!==(n=e[6]("evaluate")+"")&&$(t,n)},d(e){e&&C(t)}}}function Ir(e){let t,n=e[6]("reset")+"";return{c(){t=O(n)},m(e,n){_(e,t,n)},p(e,r){64&r&&n!==(n=e[6]("reset")+"")&&$(t,n)},d(e){e&&C(t)}}}function Br(e){let t,n,r,i=e[5].hint+"";return{c(){t=w("p"),n=O("💡 "),r=new B(null),L(t,"class","quizdown-hint svelte-kh8fob")},m(e,o){_(e,t,o),E(t,n),r.m(i,t)},p(e,t){32&t&&i!==(i=e[5].hint+"")&&r.p(i)},d(e){e&&C(t)}}}function Mr(e){let t,n,r,i,o,a,s,u;const l=[Sr,Cr],c=[];function f(e,t){return e[1]===e[3].max?0:1}n=f(e),r=c[n]=l[n](e);let h=e[2]&&Br(e);return{c(){t=w("div"),r.c(),i=T(),h&&h.c(),o=T(),a=w("div"),s=w("a"),s.textContent="quizdown-js v0.2.5",L(t,"class","button-row svelte-kh8fob"),L(s,"href","https://github.com/bonartm/quizdown-js"),L(s,"class","svelte-kh8fob"),L(a,"class","quizdown-credits svelte-kh8fob")},m(e,r){_(e,t,r),c[n].m(t,null),_(e,i,r),h&&h.m(e,r),_(e,o,r),_(e,a,r),E(a,s),u=!0},p(e,[i]){let a=n;n=f(e),n===a?c[n].p(e,i):(oe(),ue(c[a],1,1,(()=>{c[a]=null})),ae(),r=c[n],r?r.p(e,i):(r=c[n]=l[n](e),r.c()),se(r,1),r.m(t,null)),e[2]?h?h.p(e,i):(h=Br(e),h.c(),h.m(o.parentNode,o)):h&&(h.d(1),h=null)},i(e){u||(se(r),u=!0)},o(e){ue(r),u=!1},d(e){e&&C(t),c[n].d(),e&&C(i),h&&h.d(e),e&&C(o),e&&C(a)}}}function Pr(e,n,r){let i,o,a,s,u,c,h=t,p=t;f(e,ar,(e=>r(6,u=e))),e.$$.on_destroy.push((()=>h())),e.$$.on_destroy.push((()=>p()));let{quiz:d}=n,g=!1;return e.$$set=e=>{"quiz"in e&&r(0,d=e.quiz)},e.$$.update=()=>{1&e.$$.dirty&&(r(3,i=d.counter),h(),h=l(i,(e=>r(1,s=e)))),1&e.$$.dirty&&(r(4,o=d.finished),p(),p=l(o,(e=>r(7,c=e)))),3&e.$$.dirty&&r(5,a=d.questions[s]),2&e.$$.dirty&&r(2,g=!1)},[d,s,g,i,o,a,u,c,()=>r(2,g=!g)]}class jr extends me{constructor(e){super(),ge(this,e,Pr,Mr,u,{quiz:0},_r)}}function zr(e){return"[object Date]"===Object.prototype.toString.call(e)}function qr(e,t){if(e===t||e!=e)return()=>e;const n=typeof e;if(n!==typeof t||Array.isArray(e)!==Array.isArray(t))throw new Error("Cannot interpolate values of different type");if(Array.isArray(e)){const n=t.map(((t,n)=>qr(e[n],t)));return e=>n.map((t=>t(e)))}if("object"===n){if(!e||!t)throw new Error("Object cannot be null");if(zr(e)&&zr(t)){e=e.getTime();const n=(t=t.getTime())-e;return t=>new Date(e+t*n)}const n=Object.keys(t),r={};return n.forEach((n=>{r[n]=qr(e[n],t[n])})),e=>{const t={};return n.forEach((n=>{t[n]=r[n](e)})),t}}if("number"===n){const n=t-e;return t=>e+t*n}throw new Error(`Cannot interpolate ${n} values`)}function Ur(e){k(e,"1ma47z2",".quizdown-progress.svelte-1ma47z2.svelte-1ma47z2{height:0.4em;width:100%;position:relative}.quizdown-progress.svelte-1ma47z2 .progress-slider.svelte-1ma47z2{background-color:var(--quizdown-color-primary);height:100%;display:block}")}function Gr(e){let n,r;return{c(){n=w("div"),r=w("div"),L(r,"class","progress-slider svelte-1ma47z2"),I(r,"width",e[2]),L(n,"class","quizdown-progress svelte-1ma47z2"),L(n,"data-label","")},m(e,t){_(e,n,t),E(n,r)},p(e,[t]){4&t&&I(r,"width",e[2])},i:t,o:t,d(e){e&&C(n)}}}function Hr(e,i,o){let a,s,u,c,h,p,d=t,g=t;e.$$.on_destroy.push((()=>d())),e.$$.on_destroy.push((()=>g()));let{quiz:v}=i;const y=function(e,t={}){const i=Ge(e);let o,a=e;function s(s,u){if(null==e)return i.set(e=s),Promise.resolve();a=s;let l=o,c=!1,{delay:f=0,duration:h=400,easing:p=n,interpolate:d=qr}=r(r({},t),u);if(0===h)return l&&(l.abort(),l=null),i.set(e=a),Promise.resolve();const g=m()+f;let v;return o=D((t=>{if(th?(i.set(e=s),!1):(i.set(e=v(p(n/h))),!0)})),o.promise}return{set:s,update:(t,n)=>s(t(a,e),n),subscribe:i.subscribe}}(0,{duration:400,easing:ve});return f(e,y,(e=>o(7,p=e))),e.$$set=e=>{"quiz"in e&&o(4,v=e.quiz)},e.$$.update=()=>{16&e.$$.dirty&&(o(0,a=v.counter),g(),g=l(a,(e=>o(6,h=e)))),16&e.$$.dirty&&(o(1,s=v.finished),d(),d=l(s,(e=>o(5,c=e)))),112&e.$$.dirty&&(c?y.set(v.counter.max-.5):y.set(h+.1)),144&e.$$.dirty&&o(2,u=String(p/(v.counter.max-.5)*100)+"%")},[a,s,u,y,v,c,h,p]}class Vr extends me{constructor(e){super(),ge(this,e,Hr,Gr,u,{quiz:4},Ur)}}var Wr={next:"Next",previous:"Previous",evaluate:"Evaluate",reset:"One more time!",hint:"💡 Show hint",results_title:"Your quiz results",results_text:"You have answered {points} out of {total} questions correctly!"},Yr={next:"Weiter",previous:"Zurück",evaluate:"Zum Ergebnis",reset:"Noch einmal!",hint:"💡 Tipp anzeigen",results_title:"Ihr Ergebnis",results_text:"Sie haben {points} von {total} Fragen richtig beantwortet!"};function Kr(e){Rn("de",Yr),Rn("en",Wr),function(e){const{formats:t}=e,n=Pn(e,["formats"]),r=e.initialLocale||e.fallbackLocale;Object.assign(jn,n,{initialLocale:r}),t&&("number"in t&&Object.assign(jn.formats.number,t.number),"date"in t&&Object.assign(jn.formats.date,t.date),"time"in t&&Object.assign(jn.formats.time,t.time)),Gn.set(r)}({fallbackLocale:"en",initialLocale:null===e?"undefined"==typeof window?null:window.navigator.language||window.navigator.languages[0]:e})}function Jr(e){k(e,"a0vuqh","@import 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.6.0/build/styles/github.min.css';img{max-height:400px;border-radius:4px;max-width:100%;height:auto}code, kbd{padding:0 0.4rem;font-size:85%;white-space:pre-wrap;border-radius:4px;padding:0.2em 0.4em;background-color:rgb(255, 255, 235);font-family:monospace, monospace}pre{background-color:rgb(255, 255, 235);padding:0.4rem;overflow-x:auto}pre code{background:none;padding:0}a{color:var(--quizdown-color-primary)}.quizdown-content.svelte-a0vuqh{padding:1rem;max-width:800px;width:100%;margin:auto}.quizdown-card.svelte-a0vuqh{box-shadow:0 4px 8px 0 rgba(0, 0, 0, 0.2);border-radius:0 0 4px 4px}.quizdown-container.svelte-a0vuqh{padding:2px 16px}")}function Xr(e){let t,n,r,i,o,a,s,u,l;return r=new Vr({props:{quiz:e[0]}}),a=new wr({props:{quiz:e[0]}}),u=new jr({props:{quiz:e[0]}}),{c(){t=w("div"),n=w("div"),fe(r.$$.fragment),i=T(),o=w("div"),fe(a.$$.fragment),s=T(),fe(u.$$.fragment),L(o,"class","quizdown-container svelte-a0vuqh"),L(n,"class","quizdown-card svelte-a0vuqh"),L(t,"class","quizdown-content svelte-a0vuqh")},m(c,f){_(c,t,f),E(t,n),he(r,n,null),E(n,i),E(n,o),he(a,o,null),E(o,s),he(u,o,null),e[2](t),l=!0},p(e,[t]){const n={};1&t&&(n.quiz=e[0]),r.$set(n);const i={};1&t&&(i.quiz=e[0]),a.$set(i);const o={};1&t&&(o.quiz=e[0]),u.$set(o)},i(e){l||(se(r.$$.fragment,e),se(a.$$.fragment,e),se(u.$$.fragment,e),l=!0)},o(e){ue(r.$$.fragment,e),ue(a.$$.fragment,e),ue(u.$$.fragment,e),l=!1},d(n){n&&C(t),pe(r),pe(a),pe(u),e[2](null)}}}function Zr(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))};let i,{quiz:o}=t;return Kr(o.config.locale),H((()=>r(void 0,void 0,void 0,(function*(){let e=o.config.primary_color,t=o.config.secondary_color,n=o.config.text_color;i.style.setProperty("--quizdown-color-primary",e),i.style.setProperty("--quizdown-color-secondary",t),i.style.setProperty("--quizdown-color-text",n)})))),e.$$set=e=>{"quiz"in e&&n(0,o=e.quiz)},[o,i,function(e){W[e?"unshift":"push"]((()=>{i=e,n(1,i)}))}]}class Qr extends me{constructor(e){super(),ge(this,e,Zr,Xr,u,{quiz:0},Jr)}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function ei(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}function ti(e){var t={exports:{}};return e(t,t.exports),t.exports +/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */}var ni=ti((function(e,t){e.exports=function(){function e(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1?n-1:0),i=1;i/gm),j=s(/^data-[\-\w.\u00B7-\uFFFF]/),z=s(/^aria-[\-\w]+$/),q=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),U=s(/^(?:\w+script|data):/i),G=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function V(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:W(),t=function(e){return K(e)};if(t.version="2.2.8",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var n=e.document,r=e.document,i=e.DocumentFragment,o=e.HTMLTemplateElement,s=e.Node,u=e.Element,l=e.NodeFilter,c=e.NamedNodeMap,f=void 0===c?e.NamedNodeMap||e.MozNamedAttrMap:c,E=e.Text,k=e.Comment,J=e.DOMParser,X=e.trustedTypes,Z=u.prototype,Q=_(Z,"cloneNode"),ee=_(Z,"nextSibling"),te=_(Z,"childNodes"),ne=_(Z,"parentNode");if("function"==typeof o){var re=r.createElement("template");re.content&&re.content.ownerDocument&&(r=re.content.ownerDocument)}var ie=Y(X,n),oe=ie&&Ie?ie.createHTML(""):"",ae=r,se=ae.implementation,ue=ae.createNodeIterator,le=ae.createDocumentFragment,ce=n.importNode,fe={};try{fe=x(r).documentMode?r.documentMode:{}}catch(e){}var he={};t.isSupported="function"==typeof ne&&se&&void 0!==se.createHTMLDocument&&9!==fe;var pe=M,de=P,ge=j,me=z,ve=U,ye=G,be=q,De=null,we=A({},[].concat(V(C),V(S),V(F),V(T),V(R))),Ee=null,ke=A({},[].concat(V(L),V($),V(I),V(B))),Ae=null,xe=null,_e=!0,Ce=!0,Se=!1,Fe=!1,Oe=!1,Te=!1,Ne=!1,Re=!1,Le=!1,$e=!0,Ie=!1,Be=!0,Me=!0,Pe=!1,je={},ze=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),qe=null,Ue=A({},["audio","video","img","source","image","track"]),Ge=null,He=A({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",We="http://www.w3.org/2000/svg",Ye="http://www.w3.org/1999/xhtml",Ke=Ye,Je=null,Xe=r.createElement("form"),Ze=function(e){Je&&Je===e||(e&&"object"===(void 0===e?"undefined":H(e))||(e={}),e=x(e),De="ALLOWED_TAGS"in e?A({},e.ALLOWED_TAGS):we,Ee="ALLOWED_ATTR"in e?A({},e.ALLOWED_ATTR):ke,Ge="ADD_URI_SAFE_ATTR"in e?A(x(He),e.ADD_URI_SAFE_ATTR):He,qe="ADD_DATA_URI_TAGS"in e?A(x(Ue),e.ADD_DATA_URI_TAGS):Ue,Ae="FORBID_TAGS"in e?A({},e.FORBID_TAGS):{},xe="FORBID_ATTR"in e?A({},e.FORBID_ATTR):{},je="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,Ce=!1!==e.ALLOW_DATA_ATTR,Se=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=e.SAFE_FOR_TEMPLATES||!1,Oe=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,Le=e.RETURN_DOM_FRAGMENT||!1,$e=!1!==e.RETURN_DOM_IMPORT,Ie=e.RETURN_TRUSTED_TYPE||!1,Ne=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,Me=!1!==e.KEEP_CONTENT,Pe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||be,Ke=e.NAMESPACE||Ke,Fe&&(Ce=!1),Le&&(Re=!0),je&&(De=A({},[].concat(V(R))),Ee=[],!0===je.html&&(A(De,C),A(Ee,L)),!0===je.svg&&(A(De,S),A(Ee,$),A(Ee,B)),!0===je.svgFilters&&(A(De,F),A(Ee,$),A(Ee,B)),!0===je.mathMl&&(A(De,T),A(Ee,I),A(Ee,B))),e.ADD_TAGS&&(De===we&&(De=x(De)),A(De,e.ADD_TAGS)),e.ADD_ATTR&&(Ee===ke&&(Ee=x(Ee)),A(Ee,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&A(Ge,e.ADD_URI_SAFE_ATTR),Me&&(De["#text"]=!0),Oe&&A(De,["html","head","body"]),De.table&&(A(De,["tbody"]),delete Ae.tbody),a&&a(e),Je=e)},Qe=A({},["mi","mo","mn","ms","mtext"]),et=A({},["foreignobject","desc","title","annotation-xml"]),tt=A({},S);A(tt,F),A(tt,O);var nt=A({},T);A(nt,N);var rt=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:Ye,tagName:"template"});var n=g(e.tagName),r=g(t.tagName);if(e.namespaceURI===We)return t.namespaceURI===Ye?"svg"===n:t.namespaceURI===Ve?"svg"===n&&("annotation-xml"===r||Qe[r]):Boolean(tt[n]);if(e.namespaceURI===Ve)return t.namespaceURI===Ye?"math"===n:t.namespaceURI===We?"math"===n&&et[r]:Boolean(nt[n]);if(e.namespaceURI===Ye){if(t.namespaceURI===We&&!et[r])return!1;if(t.namespaceURI===Ve&&!Qe[r])return!1;var i=A({},["title","style","font","a","script"]);return!nt[n]&&(i[n]||!tt[n])}return!1},it=function(e){d(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=oe}catch(t){e.remove()}}},ot=function(e,n){try{d(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch(e){d(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e&&!Ee[e])if(Re||Le)try{it(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},at=function(e){var t=void 0,n=void 0;if(Ne)e=""+e;else{var i=m(e,/^[\r\n\t ]+/);n=i&&i[0]}var o=ie?ie.createHTML(e):e;if(Ke===Ye)try{t=(new J).parseFromString(o,"text/html")}catch(e){}t&&t.documentElement||((t=se.createDocument(Ke,"template",null)).documentElement.innerHTML=o);var a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),Oe?t.documentElement:a},st=function(e){return ue.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,(function(){return l.FILTER_ACCEPT}),!1)},ut=function(e){return!(e instanceof E||e instanceof k||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof f&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},lt=function(e){return"object"===(void 0===s?"undefined":H(s))?e instanceof s:e&&"object"===(void 0===e?"undefined":H(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ct=function(e,n,r){he[e]&&h(he[e],(function(e){e.call(t,n,r,Je)}))},ft=function(e){var n=void 0;if(ct("beforeSanitizeElements",e,null),ut(e))return it(e),!0;if(m(e.nodeName,/[\u0080-\uFFFF]/))return it(e),!0;var r=g(e.nodeName);if(ct("uponSanitizeElement",e,{tagName:r,allowedTags:De}),!lt(e.firstElementChild)&&(!lt(e.content)||!lt(e.content.firstElementChild))&&D(/<[/\w]/g,e.innerHTML)&&D(/<[/\w]/g,e.textContent))return it(e),!0;if(!De[r]||Ae[r]){if(Me&&!ze[r]){var i=ne(e)||e.parentNode,o=te(e)||e.childNodes;if(o&&i)for(var a=o.length-1;a>=0;--a)i.insertBefore(Q(o[a],!0),ee(e))}return it(e),!0}return e instanceof u&&!rt(e)?(it(e),!0):"noscript"!==r&&"noembed"!==r||!D(/<\/no(script|embed)/i,e.innerHTML)?(Fe&&3===e.nodeType&&(n=e.textContent,n=v(n,pe," "),n=v(n,de," "),e.textContent!==n&&(d(t.removed,{element:e.cloneNode()}),e.textContent=n)),ct("afterSanitizeElements",e,null),!1):(it(e),!0)},ht=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in r||n in Xe))return!1;if(Ce&&D(ge,t));else if(_e&&D(me,t));else{if(!Ee[t]||xe[t])return!1;if(Ge[t]);else if(D(be,v(n,ye,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!qe[e])if(Se&&!D(ve,v(n,ye,"")));else if(n)return!1}return!0},pt=function(e){var n=void 0,r=void 0,i=void 0,o=void 0;ct("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ee};for(o=a.length;o--;){var u=n=a[o],l=u.name,c=u.namespaceURI;if(r=b(n.value),i=g(l),s.attrName=i,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,ct("uponSanitizeAttribute",e,s),r=s.attrValue,!s.forceKeepAttr&&(ot(l,e),s.keepAttr))if(D(/\/>/i,r))ot(l,e);else{Fe&&(r=v(r,pe," "),r=v(r,de," "));var f=e.nodeName.toLowerCase();if(ht(f,i,r))try{c?e.setAttributeNS(c,l,r):e.setAttribute(l,r),p(t.removed)}catch(e){}}}ct("afterSanitizeAttributes",e,null)}},dt=function e(t){var n=void 0,r=st(t);for(ct("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ct("uponSanitizeShadowNode",n,null),ft(n)||(n.content instanceof i&&e(n.content),pt(n));ct("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(r,o){var a=void 0,u=void 0,l=void 0,c=void 0,f=void 0;if(r||(r="\x3c!--\x3e"),"string"!=typeof r&&!lt(r)){if("function"!=typeof r.toString)throw w("toString is not a function");if("string"!=typeof(r=r.toString()))throw w("dirty is not a string, aborting")}if(!t.isSupported){if("object"===H(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof r)return e.toStaticHTML(r);if(lt(r))return e.toStaticHTML(r.outerHTML)}return r}if(Te||Ze(o),t.removed=[],"string"==typeof r&&(Pe=!1),Pe);else if(r instanceof s)1===(u=(a=at("\x3c!----\x3e")).ownerDocument.importNode(r,!0)).nodeType&&"BODY"===u.nodeName||"HTML"===u.nodeName?a=u:a.appendChild(u);else{if(!Re&&!Fe&&!Oe&&-1===r.indexOf("<"))return ie&&Ie?ie.createHTML(r):r;if(!(a=at(r)))return Re?null:oe}a&&Ne&&it(a.firstChild);for(var h=st(Pe?r:a);l=h.nextNode();)3===l.nodeType&&l===c||ft(l)||(l.content instanceof i&&dt(l.content),pt(l),c=l);if(c=null,Pe)return r;if(Re){if(Le)for(f=le.call(a.ownerDocument);a.firstChild;)f.appendChild(a.firstChild);else f=a;return $e&&(f=ce.call(n,f,!0)),f}var p=Oe?a.outerHTML:a.innerHTML;return Fe&&(p=v(p,pe," "),p=v(p,de," ")),ie&&Ie?ie.createHTML(p):p},t.setConfig=function(e){Ze(e),Te=!0},t.clearConfig=function(){Je=null,Te=!1},t.isValidAttribute=function(e,t,n){Je||Ze({});var r=g(e),i=g(t);return ht(r,i,n)},t.addHook=function(e,t){"function"==typeof t&&(he[e]=he[e]||[],d(he[e],t))},t.removeHook=function(e){he[e]&&p(he[e])},t.removeHooks=function(e){he[e]&&(he[e]=[])},t.removeAllHooks=function(){he={}},t}return K()}()})),ri=e=>{const t=(e=>{const t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce(((e,t)=>Math.min(e,t.length)),1/0):0})(e);if(0===t)return e;const n=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(n,"")};var ii=(e,{include:t,exclude:n}={})=>{const r=e=>{const r=t=>"string"==typeof t?e===t:t.test(e);return t?t.some(r):!n||!n.some(r)};for(const[t,n]of(e=>{const t=new Set;do{for(const n of Reflect.ownKeys(e))t.add([e,n])}while((e=Reflect.getPrototypeOf(e))&&e!==Object.prototype);return t})(e.constructor.prototype)){if("constructor"===n||!r(n))continue;const i=Reflect.getOwnPropertyDescriptor(t,n);i&&"function"==typeof i.value&&(e[n]=e[n].bind(e))}return e};class oi{constructor(e,t,n,r,i,o){if(0===r.length)throw"no answers for question provided";this.text=e,this.explanation=t,this.hint=n,this.solved=!1,this.options=o,this.answers=r,o.shuffle_answers&&(this.answers=oi.shuffle(r)),this.selected=[],this.type=i,ii(this)}static is_equal(e,t){return JSON.stringify(e)===JSON.stringify(t)}static shuffle(e){let t,n,r=e.length;for(;0!==r;)n=Math.floor(Math.random()*r),r-=1,t=e[r],e[r]=e[n],e[n]=t;return e}reset(){this.selected=[],this.solved=!1,oi.shuffle(this.answers)}}class ai extends oi{constructor(e,t,n,r,i){i.shuffle_answers=!0,super(e,t,n,r,"Sequence",i)}check(){let e=this.answers.map((e=>e.id));return this.solved=oi.is_equal(e.sort(),this.selected),this.solved}}class si extends oi{constructor(e,t,n,r,i){super(e,t,n,r,"MultipleChoice",i)}check(){let e=this.answers.map(((e,t)=>t)).filter((e=>this.answers[e].correct));return this.solved=oi.is_equal(e.sort(),this.selected.sort()),this.solved}}class ui extends oi{constructor(e,t,n,r,i){super(e,t,n,r,"SingleChoice",i);let o=this;r.forEach((function(e,t){if(e.correct){if(void 0!==o.correct)throw"Single choice question can only have one answer";o.correct=t}}))}check(){return this.solved=this.selected[0]===this.correct,this.solved}}class li{constructor(e,t,n,r){this.html=t,this.correct=n,this.id=e,this.comment=r,ii(this)}}class ci{constructor(e){this.val=Ge(0),this.max=e,this.subscribe=this.val.subscribe,ii(this)}jump(e){this.val.set(e)}next(){this.val.update((e=>ee>0?e-1:e))}reset(){0==c(this.val)&&this.val.set(1),this.val.set(0)}}class fi{constructor(e,t){if(0==e.length)throw"No questions for quiz provided";this.questions=e,this.counter=new ci(this.questions.length),this.finished=Ge(!1),this.points=0,this.config=t,t.shuffle_questions&&(this.questions=oi.shuffle(e)),ii(this)}current(){let e=c(this.counter);return this.questions[e]}next(){this.counter.next()}previous(){this.counter.previous()}jump(e){this.counter.jump(e)}reset(){this.counter.reset(),this.questions.forEach((e=>e.reset())),this.finished.set(!1)}evaluate(){this.finished.set(!0);var e=0;for(var t of this.questions)t.check(),t.solved&&e++;this.points=e,this.jump(this.counter.max)}}function hi(e,t){return void 0!==e?e:t}class pi{constructor(e){this.start_on_load=hi(e.start_on_load,!0),this.shuffle_answers=hi(e.shuffle_answers,!0),this.shuffle_questions=hi(e.shuffle_questions,!1),this.primary_color=hi(e.primary_color,"steelblue"),this.secondary_color=hi(e.secondary_color,"#f2f2f2"),this.text_color=hi(e.text_color,"black"),this.locale=hi(e.locale,null)}}function di(e,t){let n=new pi(e);for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}var gi=ti((function(e,t){e.exports=function(){function e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}function o(e){var t={exports:{}};return e(t,t.exports),t.exports}var a=o((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function n(t){e.exports.defaults=t}e.exports={defaults:t(),getDefaults:t,changeDefaults:n}})),s=/[&<>"']/,u=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,f={"&":"&","<":"<",">":">",'"':""","'":"'"},h=function(e){return f[e]};function p(e,t){if(t){if(s.test(e))return e.replace(u,h)}else if(l.test(e))return e.replace(c,h);return e}var d=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function g(e){return e.replace(d,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var m=/(^|[^\[])\^/g;function v(e,t){e=e.source||e,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(m,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var y=/[^\w:]/g,b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function D(e,t,n){if(e){var r;try{r=decodeURIComponent(g(n)).replace(y,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!b.test(n)&&(n=x(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}var w={},E=/^[^:]+:\/*[^/]*$/,k=/^([^:]+:)[\s\S]*$/,A=/^([^:]+:\/*[^/]*)[\s\S]*$/;function x(e,t){w[" "+e]||(E.test(e)?w[" "+e]=e+"/":w[" "+e]=S(e,"/",!0));var n=-1===(e=w[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(k,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(A,"$1")+t:e+t}function _(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}var N={escape:p,unescape:g,edit:v,cleanUrl:D,resolveUrl:x,noopTest:{exec:function(){}},merge:_,splitCells:C,rtrim:S,findClosingBracket:F,checkSanitizeDeprecation:O,repeatString:T},R=a.defaults,L=N.rtrim,$=N.splitCells,I=N.escape,B=N.findClosingBracket;function M(e,t,n){var r=t.href,i=t.title?I(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:o}:{type:"image",raw:n,href:r,title:i,text:I(o)}}function P(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}var j=function(){function e(e){this.options=e||R}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:L(n,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=P(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=L(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n}}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:$(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,o,a,s,u,l,c,f=t[0],h=t[2],p=h.length>1,d={type:"list",raw:f,ordered:p,start:p?+h.slice(0,-1):"",loose:!1,items:[]},g=t[0].match(this.rules.block.item),m=!1,v=g.length;i=this.rules.block.listItemStart.exec(g[0]);for(var y=0;yi[1].length:o[1].length>=i[0].length||o[1].length>3){g.splice(y,2,g[y]+(!this.options.pedantic&&o[1].length/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):I(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var r=L(n.slice(0,-1),"\\");if((n.length-r.length)%2==0)return}else{var i=B(t[2],"()");if(i>-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var a=t[2],s="";if(this.options.pedantic){var u=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);u&&(a=u[1],s=u[3])}else s=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^$/.test(n)?a.slice(1):a.slice(1,-1)),M(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:s?s.replace(this.rules.inline._escapes,"$1"):s},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return M(n,r,n[0])}},t.emStrong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var o,a,s=r[0].length-1,u=s,l=0,c="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+s);null!=(r=c.exec(t));)if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=o.length,r[3]||r[4])u+=a;else if(!((r[5]||r[6])&&s%3)||(s+a)%3){if(!((u-=a)>0)){if(u+l-a<=0&&!t.slice(c.lastIndex).match(c)&&(a=Math.min(a,a+u+l)),Math.min(s,a)%2)return{type:"em",raw:e.slice(0,s+r.index+a+1),text:e.slice(1,s+r.index+a)};if(Math.min(s,a)%2==0)return{type:"strong",raw:e.slice(0,s+r.index+a+1),text:e.slice(2,s+r.index+a-1)}}}else l+=a}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=I(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2]}},t.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=I(this.options.mangle?t(i[1]):i[1])):n=I(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=I(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=I(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r,i=this.rules.inline.text.exec(e);if(i)return r=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):I(i[0]):i[0]:I(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},e}(),z=N.noopTest,q=N.edit,U=N.merge,G={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:z,table:z,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};G.def=q(G.def).replace("label",G._label).replace("title",G._title).getRegex(),G.bullet=/(?:[*+-]|\d{1,9}[.)])/,G.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,G.item=q(G.item,"gm").replace(/bull/g,G.bullet).getRegex(),G.listItemStart=q(/^( *)(bull) */).replace("bull",G.bullet).getRegex(),G.list=q(G.list).replace(/bull/g,G.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+G.def.source+")").getRegex(),G._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",G._comment=/|$)/,G.html=q(G.html,"i").replace("comment",G._comment).replace("tag",G._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),G.paragraph=q(G._paragraph).replace("hr",G.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",G._tag).getRegex(),G.blockquote=q(G.blockquote).replace("paragraph",G.paragraph).getRegex(),G.normal=U({},G),G.gfm=U({},G.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),G.gfm.nptable=q(G.gfm.nptable).replace("hr",G.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",G._tag).getRegex(),G.gfm.table=q(G.gfm.table).replace("hr",G.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",G._tag).getRegex(),G.pedantic=U({},G.normal,{html:q("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",G._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,paragraph:q(G.normal._paragraph).replace("hr",G.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",G.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var H={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:z,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_]*?\*[^_]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^*]*?\_[^*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:z,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};H.punctuation=q(H.punctuation).replace(/punctuation/g,H._punctuation).getRegex(),H.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,H.escapedEmSt=/\\\*|\\_/g,H._comment=q(G._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),H.emStrong.lDelim=q(H.emStrong.lDelim).replace(/punct/g,H._punctuation).getRegex(),H.emStrong.rDelimAst=q(H.emStrong.rDelimAst,"g").replace(/punct/g,H._punctuation).getRegex(),H.emStrong.rDelimUnd=q(H.emStrong.rDelimUnd,"g").replace(/punct/g,H._punctuation).getRegex(),H._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,H._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,H._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,H.autolink=q(H.autolink).replace("scheme",H._scheme).replace("email",H._email).getRegex(),H._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,H.tag=q(H.tag).replace("comment",H._comment).replace("attribute",H._attribute).getRegex(),H._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,H._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,H._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,H.link=q(H.link).replace("label",H._label).replace("href",H._href).replace("title",H._title).getRegex(),H.reflink=q(H.reflink).replace("label",H._label).getRegex(),H.reflinkSearch=q(H.reflinkSearch,"g").replace("reflink",H.reflink).replace("nolink",H.nolink).getRegex(),H.normal=U({},H),H.pedantic=U({},H.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:q(/^!?\[(label)\]\((.*?)\)/).replace("label",H._label).getRegex(),reflink:q(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",H._label).getRegex()}),H.gfm=U({},H.normal,{escape:q(H.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var Q=function(){function e(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||W,this.options.tokenizer=this.options.tokenizer||new j,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:Y.normal,inline:K.normal};this.options.pedantic?(t.block=Y.pedantic,t.inline=K.pedantic):this.options.gfm&&(t.block=Y.gfm,this.options.breaks?t.inline=K.breaks:t.inline=K.gfm),this.tokenizer.rules=t}e.lex=function(t,n){return new e(n).lex(t)},e.lexInline=function(t,n){return new e(n).inlineTokens(t)};var n=e.prototype;return n.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},n.blockTokens=function(e,t,n){var r,i,o,a;for(void 0===t&&(t=[]),void 0===n&&(n=!0),this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e))e=e.substring(r.raw.length),(a=t[t.length-1])&&"paragraph"===a.type?(a.raw+="\n"+r.raw,a.text+="\n"+r.text):t.push(r);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),o=r.items.length,i=0;i0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(l));)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,a.index)+"["+J("a",a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,a.index)+"["+J("a",a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,a.index)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(s||(u=""),s=!1,i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e,n,r)){e=e.substring(i.raw.length),n=i.inLink,r=i.inRawBlock;var f=t[t.length-1];f&&"text"===i.type&&"text"===f.type?(f.raw+=i.raw,f.text+=i.text):t.push(i)}else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,r)),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length);var h=t[t.length-1];"link"===i.type?(i.tokens=this.inlineTokens(i.text,[],!0,r),t.push(i)):h&&"text"===i.type&&"text"===h.type?(h.raw+=i.raw,h.text+=i.text):t.push(i)}else if(i=this.tokenizer.emStrong(e,l,u))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.autolink(e,Z))e=e.substring(i.raw.length),t.push(i);else if(n||!(i=this.tokenizer.url(e,Z))){if(i=this.tokenizer.inlineText(e,r,X))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(u=i.raw.slice(-1)),s=!0,(o=t[t.length-1])&&"text"===o.type?(o.raw+=i.raw,o.text+=i.text):t.push(i);else if(e){var p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}throw new Error(p)}}else e=e.substring(i.raw.length),t.push(i);return t},t(e,null,[{key:"rules",get:function(){return{block:Y,inline:K}}}]),e}(),ee=a.defaults,te=N.cleanUrl,ne=N.escape,re=function(){function e(e){this.options=e||ee}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'
    '+(n?e:ne(e,!0))+"
    \n":"
    "+(n?e:ne(e,!0))+"
    \n"},t.blockquote=function(e){return"
    \n"+e+"
    \n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=te(this.options.sanitize,this.options.baseUrl,e)))return n;var r='
    "},t.image=function(e,t,n){if(null===(e=te(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},t.text=function(e){return e},e}(),ie=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),oe=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),ae=a.defaults,se=N.unescape,ue=function(){function e(e){this.options=e||ae,this.options.renderer=this.options.renderer||new re,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ie,this.slugger=new oe}e.parse=function(t,n){return new e(n).parse(t)},e.parseInline=function(t,n){return new e(n).parseInline(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,o,a,s,u,l,c,f,h,p,d,g,m,v,y,b,D="",w=e.length;for(n=0;n0&&"text"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):g+=b),g+=this.parse(m.tokens,d),c+=this.renderer.listitem(g,y,v);D+=this.renderer.list(c,h,p);continue;case"html":D+=this.renderer.html(f.text);continue;case"paragraph":D+=this.renderer.paragraph(this.parseInline(f.tokens));continue;case"text":for(c=f.tokens?this.parseInline(f.tokens):f.text;n+1An error occurred:

    "+fe(e.message+"",!0)+"
    ";throw e}}return ge.options=ge.setOptions=function(e){return le(ge.defaults,e),pe(ge.defaults),ge},ge.getDefaults=he,ge.defaults=de,ge.use=function(e){var t=le({},e);if(e.renderer&&function(){var n=ge.defaults.renderer||new re,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,o=new Array(i),a=0;aAn error occurred:

    "+fe(e.message+"",!0)+"
    ";throw e}},ge.Parser=ue,ge.parser=ue.parse,ge.Renderer=re,ge.TextRenderer=ie,ge.Lexer=Q,ge.lexer=Q.lex,ge.Tokenizer=j,ge.Slugger=oe,ge.parse=ge,ge}()}));function mi(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||mi(n)})),e}var vi=mi,yi=mi;vi.default=yi;class bi{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Di(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function wi(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const Ei=e=>!!e.kind;class ki{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=Di(e)}openNode(e){if(!Ei(e))return;let t=e.kind;e.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(e){Ei(e)&&(this.buffer+="")}value(){return this.buffer}span(e){this.buffer+=``}}class Ai{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{Ai._collapse(e)})))}}class xi extends Ai{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){return new ki(this,this.options).value()}finalize(){return!0}}function _i(e){return e?"string"==typeof e?e:e.source:null}const Ci=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;const Si="[a-zA-Z]\\w*",Fi="[a-zA-Z_]\\w*",Oi="\\b\\d+(\\.\\d+)?",Ti="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ni="\\b(0b[01]+)",Ri={begin:"\\\\[\\s\\S]",relevance:0},Li={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[Ri]},$i={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[Ri]},Ii={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Bi=function(e,t,n={}){const r=wi({className:"comment",begin:e,end:t,contains:[]},n);return r.contains.push(Ii),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),r},Mi=Bi("//","$"),Pi=Bi("/\\*","\\*/"),ji=Bi("#","$"),zi={className:"number",begin:Oi,relevance:0},qi={className:"number",begin:Ti,relevance:0},Ui={className:"number",begin:Ni,relevance:0},Gi={className:"number",begin:Oi+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},Hi={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[Ri,{begin:/\[/,end:/\]/,relevance:0,contains:[Ri]}]}]},Vi={className:"title",begin:Si,relevance:0},Wi={className:"title",begin:Fi,relevance:0},Yi={begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0};var Ki=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:Si,UNDERSCORE_IDENT_RE:Fi,NUMBER_RE:Oi,C_NUMBER_RE:Ti,BINARY_NUMBER_RE:Ni,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=function(...e){return e.map((e=>_i(e))).join("")}(t,/.*\b/,e.binary,/\b.*/)),wi({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:Ri,APOS_STRING_MODE:Li,QUOTE_STRING_MODE:$i,PHRASAL_WORDS_MODE:Ii,COMMENT:Bi,C_LINE_COMMENT_MODE:Mi,C_BLOCK_COMMENT_MODE:Pi,HASH_COMMENT_MODE:ji,NUMBER_MODE:zi,C_NUMBER_MODE:qi,BINARY_NUMBER_MODE:Ui,CSS_NUMBER_MODE:Gi,REGEXP_MODE:Hi,TITLE_MODE:Vi,UNDERSCORE_TITLE_MODE:Wi,METHOD_GUARD:Yi,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function Ji(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function Xi(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Ji,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function Zi(e,t){Array.isArray(e.illegal)&&(e.illegal=function(...e){return"("+e.map((e=>_i(e))).join("|")+")"}(...e.illegal))}function Qi(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function eo(e,t){void 0===e.relevance&&(e.relevance=1)}const to=["of","and","for","in","not","or","if","then","parent","list","value"];function no(e,t,n="keyword"){const r={};return"string"==typeof e?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach((function(n){Object.assign(r,no(e[n],t,n))})),r;function i(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,ro(n[0],n[1])]}))}}function ro(e,t){return t?Number(t):function(e){return to.includes(e.toLowerCase())}(e)?0:1}function io(e,{plugins:t}){function n(t,n){return new RegExp(_i(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=function(e){return new RegExp(e.toString()+"|").exec("").length-1}(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=n(function(e,t="|"){let n=0;return e.map((e=>{n+=1;const t=n;let r=_i(e),i="";for(;r.length>0;){const e=Ci.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?i+="\\"+String(Number(e[1])+t):(i+=e[0],"("===e[0]&&n++)}return i})).map((e=>`(${e})`)).join(t)}(e),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new r;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=wi(e.classNameAliases||{}),function t(r,o){const a=r;if(r.isCompiled)return a;[Qi].forEach((e=>e(r,o))),e.compilerExtensions.forEach((e=>e(r,o))),r.__beforeBegin=null,[Xi,Zi,eo].forEach((e=>e(r,o))),r.isCompiled=!0;let s=null;if("object"==typeof r.keywords&&(s=r.keywords.$pattern,delete r.keywords.$pattern),r.keywords&&(r.keywords=no(r.keywords,e.case_insensitive)),r.lexemes&&s)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return s=s||r.lexemes||/\w+/,a.keywordPatternRe=n(s,!0),o&&(r.begin||(r.begin=/\B|\b/),a.beginRe=n(r.begin),r.endSameAsBegin&&(r.end=r.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(a.endRe=n(r.end)),a.terminatorEnd=_i(r.end)||"",r.endsWithParent&&o.terminatorEnd&&(a.terminatorEnd+=(r.end?"|":"")+o.terminatorEnd)),r.illegal&&(a.illegalRe=n(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return wi(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(oo(e))return wi(e,{starts:e.starts?wi(e.starts):null});if(Object.isFrozen(e))return wi(e);return e}("self"===e?r:e)}))),r.contains.forEach((function(e){t(e,a)})),r.starts&&t(r.starts,o),a.matcher=function(e){const t=new i;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(a),a}(e)}function oo(e){return!!e&&(e.endsWithParent||oo(e.starts))}function ao(e){const t={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,Di(this.code);let t={};return this.autoDetect?(t=e.highlightAuto(this.code),this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),t.value},autoDetect(){return!this.language||(e=this.autodetect,Boolean(e||""===e));var e},ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:t,VuePlugin:{install(e){e.component("highlightjs",t)}}}}const so={"after:highlightElement":({el:e,result:t,text:n})=>{const r=lo(e);if(!r.length)return;const i=document.createElement("div");i.innerHTML=t.value,t.value=function(e,t,n){let r=0,i="";const o=[];function a(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset"}function u(e){i+=""}function l(e){("start"===e.event?s:u)(e.node)}for(;e.length||t.length;){let t=a();if(i+=Di(n.substring(r,t[0].offset)),r=t[0].offset,t===e){o.reverse().forEach(u);do{l(t.splice(0,1)[0]),t=a()}while(t===e&&t.length&&t[0].offset===r);o.reverse().forEach(s)}else"start"===t[0].event?o.push(t[0].node):o.pop(),l(t.splice(0,1)[0])}return i+Di(n.substr(r))}(r,lo(i),n)}};function uo(e){return e.nodeName.toLowerCase()}function lo(e){const t=[];return function e(n,r){for(let i=n.firstChild;i;i=i.nextSibling)3===i.nodeType?r+=i.nodeValue.length:1===i.nodeType&&(t.push({event:"start",offset:r,node:i}),r=e(i,r),uo(i).match(/br|hr|img|input/)||t.push({event:"stop",offset:r,node:i}));return r}(e,0),t}const co={},fo=e=>{console.error(e)},ho=(e,...t)=>{console.log(`WARN: ${e}`,...t)},po=(e,t)=>{co[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),co[`${e}/${t}`]=!0)},go=Di,mo=wi,vo=Symbol("nomatch");var yo=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const o=/(^(<[^>]+>|\t|)+|\n)/gm,a="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let u={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:xi};function l(e){return u.noHighlightRe.test(e)}function c(e,t,n,r){let i="",o="";"object"==typeof t?(i=e,n=t.ignoreIllegals,o=t.language,r=void 0):(po("10.7.0","highlight(lang, code, ...args) has been deprecated."),po("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),o=e,i=t);const a={code:i,language:o};k("before:highlight",a);const s=a.result?a.result:f(a.language,a.code,n,r);return s.code=a.code,k("after:highlight",s),s}function f(e,n,o,s){function l(e,t){const n=w.case_insensitive?t[0].toLowerCase():t[0];return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]}function c(){null!=A.subLanguage?function(){if(""===C)return;let e=null;if("string"==typeof A.subLanguage){if(!t[A.subLanguage])return void _.addText(C);e=f(A.subLanguage,C,!0,x[A.subLanguage]),x[A.subLanguage]=e.top}else e=h(C,A.subLanguage.length?A.subLanguage:null);A.relevance>0&&(S+=e.relevance),_.addSublanguage(e.emitter,e.language)}():function(){if(!A.keywords)return void _.addText(C);let e=0;A.keywordPatternRe.lastIndex=0;let t=A.keywordPatternRe.exec(C),n="";for(;t;){n+=C.substring(e,t.index);const r=l(A,t);if(r){const[e,i]=r;if(_.addText(n),n="",S+=i,e.startsWith("_"))n+=t[0];else{const n=w.classNameAliases[e]||e;_.addKeyword(t[0],n)}}else n+=t[0];e=A.keywordPatternRe.lastIndex,t=A.keywordPatternRe.exec(C)}n+=C.substr(e),_.addText(n)}(),C=""}function p(e){return e.className&&_.openNode(w.classNameAliases[e.className]||e.className),A=Object.create(e,{parent:{value:A}}),A}function d(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new bi(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return d(e.parent,t,n)}function g(e){return 0===A.matcher.regexIndex?(C+=e[0],1):(T=!0,0)}function m(e){const t=e[0],n=e.rule,r=new bi(n),i=[n.__beforeBegin,n["on:begin"]];for(const n of i)if(n&&(n(e,r),r.isMatchIgnored))return g(t);return n&&n.endSameAsBegin&&(n.endRe=new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),n.skip?C+=t:(n.excludeBegin&&(C+=t),c(),n.returnBegin||n.excludeBegin||(C=t)),p(n),n.returnBegin?0:t.length}function v(e){const t=e[0],r=n.substr(e.index),i=d(A,e,r);if(!i)return vo;const o=A;o.skip?C+=t:(o.returnEnd||o.excludeEnd||(C+=t),c(),o.excludeEnd&&(C=t));do{A.className&&_.closeNode(),A.skip||A.subLanguage||(S+=A.relevance),A=A.parent}while(A!==i.parent);return i.starts&&(i.endSameAsBegin&&(i.starts.endRe=i.endRe),p(i.starts)),o.returnEnd?0:t.length}let y={};function b(t,r){const a=r&&r[0];if(C+=t,null==a)return c(),0;if("begin"===y.type&&"end"===r.type&&y.index===r.index&&""===a){if(C+=n.slice(r.index,r.index+1),!i){const t=new Error("0 width match regex");throw t.languageName=e,t.badRule=y.rule,t}return 1}if(y=r,"begin"===r.type)return m(r);if("illegal"===r.type&&!o){const e=new Error('Illegal lexeme "'+a+'" for mode "'+(A.className||"")+'"');throw e.mode=A,e}if("end"===r.type){const e=v(r);if(e!==vo)return e}if("illegal"===r.type&&""===a)return 1;if(O>1e5&&O>3*r.index){throw new Error("potential infinite loop, way more iterations than matches")}return C+=a,a.length}const w=D(e);if(!w)throw fo(a.replace("{}",e)),new Error('Unknown language: "'+e+'"');const E=io(w,{plugins:r});let k="",A=s||E;const x={},_=new u.__emitter(u);!function(){const e=[];for(let t=A;t!==w;t=t.parent)t.className&&e.unshift(t.className);e.forEach((e=>_.openNode(e)))}();let C="",S=0,F=0,O=0,T=!1;try{for(A.matcher.considerAll();;){O++,T?T=!1:A.matcher.considerAll(),A.matcher.lastIndex=F;const e=A.matcher.exec(n);if(!e)break;const t=b(n.substring(F,e.index),e);F=e.index+t}return b(n.substr(F)),_.closeAllNodes(),_.finalize(),k=_.toHTML(),{relevance:Math.floor(S),value:k,language:e,illegal:!1,emitter:_,top:A}}catch(t){if(t.message&&t.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:t.message,context:n.slice(F-100,F+100),mode:t.mode},sofar:k,relevance:0,value:go(n),emitter:_};if(i)return{illegal:!1,relevance:0,value:go(n),emitter:_,language:e,top:A,errorRaised:t};throw t}}function h(e,n){n=n||u.languages||Object.keys(t);const r=function(e){const t={relevance:0,emitter:new u.__emitter(u),value:go(e),illegal:!1,top:s};return t.emitter.addText(e),t}(e),i=n.filter(D).filter(E).map((t=>f(t,e,!1)));i.unshift(r);const o=i.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(D(e.language).supersetOf===t.language)return 1;if(D(t.language).supersetOf===e.language)return-1}return 0})),[a,l]=o,c=a;return c.second_best=l,c}const p={"before:highlightElement":({el:e})=>{u.useBR&&(e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n"))},"after:highlightElement":({result:e})=>{u.useBR&&(e.value=e.value.replace(/\n/g,"
    "))}},d=/^(<[^>]+>|\t)+/gm,g={"after:highlightElement":({result:e})=>{u.tabReplace&&(e.value=e.value.replace(d,(e=>e.replace(/\t/g,u.tabReplace))))}};function m(e){let t=null;const r=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=u.languageDetectRe.exec(t);if(n){const t=D(n[1]);return t||(ho(a.replace("{}",n[1])),ho("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>l(e)||D(e)))}(e);if(l(r))return;k("before:highlightElement",{el:e,language:r}),t=e;const i=t.textContent,o=r?c(i,{language:r,ignoreIllegals:!0}):h(i);k("after:highlightElement",{el:e,result:o,text:i}),e.innerHTML=o.value,function(e,t,r){const i=t?n[t]:r;e.classList.add("hljs"),i&&e.classList.add(i)}(e,r,o.language),e.result={language:o.language,re:o.relevance,relavance:o.relevance},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.relevance,relavance:o.second_best.relevance})}const v=()=>{if(v.called)return;v.called=!0,po("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead.");document.querySelectorAll("pre code").forEach(m)};let y=!1;function b(){if("loading"===document.readyState)return void(y=!0);document.querySelectorAll("pre code").forEach(m)}function D(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function w(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function E(e){const t=D(e);return t&&!t.disableAutodetect}function k(e,t){const n=e;r.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){y&&b()}),!1),Object.assign(e,{highlight:c,highlightAuto:h,highlightAll:b,fixMarkup:function(e){return po("10.2.0","fixMarkup will be removed entirely in v11.0"),po("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),t=e,u.tabReplace||u.useBR?t.replace(o,(e=>"\n"===e?u.useBR?"
    ":e:u.tabReplace?e.replace(/\t/g,u.tabReplace):e)):t;var t},highlightElement:m,highlightBlock:function(e){return po("10.7.0","highlightBlock will be removed entirely in v12.0"),po("10.7.0","Please use highlightElement now."),m(e)},configure:function(e){e.useBR&&(po("10.3.0","'useBR' will be removed entirely in v11.0"),po("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),u=mo(u,e)},initHighlighting:v,initHighlightingOnLoad:function(){po("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),y=!0},registerLanguage:function(n,r){let o=null;try{o=r(e)}catch(e){if(fo("Language definition for '{}' could not be registered.".replace("{}",n)),!i)throw e;fo(e),o=s}o.name||(o.name=n),t[n]=o,o.rawDefinition=r.bind(null,e),o.aliases&&w(o.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:D,registerAliases:w,requireLanguage:function(e){po("10.4.0","requireLanguage will be removed entirely in v11."),po("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const t=D(e);if(t)return t;throw new Error("The '{}' language is required, but not loaded.".replace("{}",e))},autoDetection:E,inherit:mo,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),r.push(e)},vuePlugin:ao(e).VuePlugin}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString="10.7.2";for(const e in Ki)"object"==typeof Ki[e]&&vi(Ki[e]);return Object.assign(e,Ki),e.addPlugin(p),e.addPlugin(so),e.addPlugin(g),e}({});function bo(e){return function(...e){return e.map((e=>function(e){return e?"string"==typeof e?e:e.source:null}(e))).join("")}("(?=",e,")")}var Do=function(e){const t={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:["and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},n={className:"meta",begin:/^(>>>|\.\.\.) /},r={className:"subst",begin:/\{/,end:/\}/,keywords:t,illegal:/#/},i={begin:/\{\{/,relevance:0},o={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,n],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,n],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,n,i,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,n,i,r]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,i,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i,r]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},a="[0-9](_?[0-9])*",s=`(\\b(${a}))?\\.(${a})|\\b(${a})\\.`,u={className:"number",relevance:0,variants:[{begin:`(\\b(${a})|(${s}))[eE][+-]?(${a})[jJ]?\\b`},{begin:`(${s})[jJ]?`},{begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\b"},{begin:"\\b0[bB](_?[01])+[lL]?\\b"},{begin:"\\b0[oO](_?[0-7])+[lL]?\\b"},{begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?\\b"},{begin:`\\b(${a})[jJ]\\b`}]},l={className:"comment",begin:bo(/# type:/),end:/$/,keywords:t,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},c={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:["self",n,u,o,e.HASH_COMMENT_MODE]}]};return r.contains=[o,u,n],{name:"Python",aliases:["py","gyp","ipython"],keywords:t,illegal:/(<\/|->|\?)|=>/,contains:[n,u,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},o,l,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,c,{begin:/->/,endsWithParent:!0,keywords:t}]},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[u,c,o]}]}};function wo(e){return e?"string"==typeof e?e:e.source:null}function Eo(e){return ko("(?=",e,")")}function ko(...e){return e.map((e=>wo(e))).join("")}function Ao(...e){return"("+e.map((e=>wo(e))).join("|")+")"}var xo=function(e){const t=ko(/[A-Z_]/,function(e){return ko("(",e,")?")}(/[A-Z0-9_.-]*:/),/[A-Z0-9_.-]*/),n={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},r={begin:/\s/,contains:[{className:"meta-keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},i=e.inherit(r,{begin:/\(/,end:/\)/}),o=e.inherit(e.APOS_STRING_MODE,{className:"meta-string"}),a=e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"}),s={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin://,relevance:10,contains:[r,a,o,i,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[r,i,a,o]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},n,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[s],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[s],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:ko(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:s}]},{className:"tag",begin:ko(/<\//,Eo(ko(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}};var _o=function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}};function Co(e){return(Co="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function So(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fo(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}yo.registerLanguage("python",Do),yo.registerLanguage("html",xo),yo.registerLanguage("plaintext",_o);var Ko="&",Jo="#",Xo="!",Zo="-",Qo=".",ea="ALIAS",ta="BLANK_LINE",na="BLOCK_FOLDED",ra="BLOCK_LITERAL",ia="COMMENT",oa="DIRECTIVE",aa="DOCUMENT",sa="FLOW_MAP",ua="FLOW_SEQ",la="MAP",ca="MAP_KEY",fa="MAP_VALUE",ha="PLAIN",pa="QUOTE_DOUBLE",da="QUOTE_SINGLE",ga="SEQ",ma="SEQ_ITEM",va="tag:yaml.org,2002:",ya={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function ba(e){for(var t=[0],n=e.indexOf("\n");-1!==n;)n+=1,t.push(n),n=e.indexOf("\n",n);return t}function Da(e){var t,n;return"string"==typeof e?(t=ba(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=ba(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function wa(e,t){if("number"!=typeof e||e<0)return null;var n=Da(t),r=n.lineStarts,i=n.src;if(!r||!i||e>i.length)return null;for(var o=0;o=1)||e>r.length)return null;for(var o=r[e-1],a=r[e];a&&a>o&&"\n"===i[a-1];)--a;return i.slice(o,a)}var ka=function(){function e(t,n){So(this,e),this.start=t,this.end=n||t}return Oo(e,[{key:"isEmpty",value:function(){return"number"!=typeof this.start||!this.end||this.end<=this.start}},{key:"setOrigRange",value:function(e,t){var n=this.start,r=this.end;if(0===e.length||r<=e[0])return this.origStart=n,this.origEnd=r,t;for(var i=t;in);)++i;this.origStart=n+i;for(var o=i;i=r);)++i;return this.origEnd=r+i,o}}],[{key:"copy",value:function(t){return new e(t.start,t.end)}}]),e}(),Aa=function(){function e(t,n,r){So(this,e),Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=t,this.value=null}return Oo(e,[{key:"getPropValue",value:function(e,t,n){if(!this.context)return null;var r=this.context.src,i=this.props[e];return i&&r[i.start]===t?r.slice(i.start+(n?1:0),i.end):null}},{key:"anchor",get:function(){for(var e=0;e0?e.join("\n"):null}},{key:"commentHasRequiredWhitespace",value:function(t){var n=this.context.src;if(this.header&&t===this.header.end)return!1;if(!this.valueRange)return!1;var r=this.valueRange.end;return t!==r||e.atBlank(n,r-1)}},{key:"hasComment",get:function(){if(this.context)for(var e=this.context.src,t=0;t=t.length||"\n"===t[i]?r+"\n":r}},{key:"atDocumentBoundary",value:function(e,t,n){var r=e[t];if(!r)return!0;var i=e[t-1];if(i&&"\n"!==i)return!1;if(n){if(r!==n)return!1}else if(r!==Zo&&r!==Qo)return!1;var o=e[t+1],a=e[t+2];if(o!==r||a!==r)return!1;var s=e[t+3];return!s||"\n"===s||"\t"===s||" "===s}},{key:"endOfIdentifier",value:function(e,t){for(var n=e[t],r="<"===n,i=r?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];n&&-1===i.indexOf(n);)n=e[t+=1];return r&&">"===n&&(t+=1),t}},{key:"endOfIndent",value:function(e,t){for(var n=e[t];" "===n;)n=e[t+=1];return t}},{key:"endOfLine",value:function(e,t){for(var n=e[t];n&&"\n"!==n;)n=e[t+=1];return t}},{key:"endOfWhiteSpace",value:function(e,t){for(var n=e[t];"\t"===n||" "===n;)n=e[t+=1];return t}},{key:"startOfLine",value:function(e,t){var n=e[t-1];if("\n"===n)return t;for(;n&&"\n"!==n;)n=e[t-=1];return t+1}},{key:"endOfBlockIndent",value:function(t,n,r){var i=e.endOfIndent(t,r);if(i>r+n)return i;var o=e.endOfWhiteSpace(t,i),a=t[o];return a&&"\n"!==a?null:o}},{key:"atBlank",value:function(e,t,n){var r=e[t];return"\n"===r||"\t"===r||" "===r||n&&!r}},{key:"nextNodeIsIndented",value:function(e,t,n){return!(!e||t<0)&&(t>0||n&&"-"===e)}},{key:"normalizeOffset",value:function(t,n){var r=t[n];return r?"\n"!==r&&"\n"===t[n-1]?n-1:e.endOfWhiteSpace(t,n):n}},{key:"foldNewline",value:function(t,n,r){for(var i=0,o=!1,a="",s=t[n+1];" "===s||"\t"===s||"\n"===s;){switch(s){case"\n":i=0,n+=1,a+="\n";break;case"\t":i<=r&&(o=!0),n=e.endOfWhiteSpace(t,n+2)-1;break;case" ":i+=1,n+=1}s=t[n+1]}return a||(a=" "),s&&i<=r&&(o=!0),{fold:a,offset:n,error:o}}}]),e}(),xa=function(e){No(n,e);var t=jo(n);function n(e,r,i){var o;if(So(this,n),!(i&&r instanceof Aa))throw new Error("Invalid arguments for new ".concat(e));return(o=t.call(this)).name=e,o.message=i,o.source=r,o}return Oo(n,[{key:"makePretty",value:function(){if(this.source){this.nodeType=this.source.type;var e=this.source.context&&this.source.context.root;if("number"==typeof this.offset){this.range=new ka(this.offset,this.offset+1);var t=e&&wa(this.offset,e);if(t){var n={line:t.line,col:t.col+1};this.linePos={start:t,end:n}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){var r=this.linePos.start,i=r.line,o=r.col;this.message+=" at line ".concat(i,", column ").concat(o);var a=e&&function(e,t){var n=e.start,r=e.end,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:80,o=Ea(n.line,t);if(!o)return null;var a=n.col;if(o.length>i)if(a<=i-10)o=o.substr(0,i-1)+"…";else{var s=Math.round(i/2);o.length>a+s&&(o=o.substr(0,a+s-1)+"…"),a-=o.length-i,o="…"+o.substr(1-i)}var u=1,l="";r&&(r.line===n.line&&a+(r.col-n.col)<=i+1?u=r.col-n.col:(u=Math.min(o.length+1,i)-a,l="…"));var c=a>1?" ".repeat(a-1):"",f="^".repeat(u);return"".concat(o,"\n").concat(c).concat(f).concat(l)}(this.linePos,e);a&&(this.message+=":\n\n".concat(a,"\n"))}delete this.source}}}]),n}(Bo(Error)),_a=function(e){No(n,e);var t=jo(n);function n(e,r){return So(this,n),t.call(this,"YAMLReferenceError",e,r)}return n}(xa),Ca=function(e){No(n,e);var t=jo(n);function n(e,r){return So(this,n),t.call(this,"YAMLSemanticError",e,r)}return n}(xa),Sa=function(e){No(n,e);var t=jo(n);function n(e,r){return So(this,n),t.call(this,"YAMLSyntaxError",e,r)}return n}(xa),Fa=function(e){No(n,e);var t=jo(n);function n(e,r){return So(this,n),t.call(this,"YAMLWarning",e,r)}return n}(xa),Oa=function(e){No(n,e);var t=jo(n);function n(){return So(this,n),t.apply(this,arguments)}return Oo(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;for(var e=this.valueRange,t=e.start,n=e.end,r=this.context.src,i=r[n-1];tl?r.slice(l,a+1):s)}else o+=s}var f=r[t];switch(f){case"\t":return{errors:[new Ca(this,"Plain value cannot start with a tab character")],str:o};case"@":case"`":var h="Plain value cannot start with reserved character ".concat(f);return{errors:[new Ca(this,h)],str:o};default:return o}}},{key:"parseBlockValue",value:function(e){for(var t=this.context,r=t.indent,i=t.inFlow,o=t.src,a=e,s=e,u=o[a];"\n"===u&&!Aa.atDocumentBoundary(o,a+1);u=o[a]){var l=Aa.endOfBlockIndent(o,r,a+1);if(null===l||"#"===o[l])break;a="\n"===o[l]?l:s=n.endOfLine(o,l,i)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=s,s}},{key:"parse",value:function(e,t){this.context=e;var r=e.inFlow,i=e.src,o=t,a=i[o];return a&&"#"!==a&&"\n"!==a&&(o=n.endOfLine(i,t,r)),this.valueRange=new ka(t,o),o=Aa.endOfWhiteSpace(i,o),o=this.parseComment(o),this.hasComment&&!this.valueRange.isEmpty()||(o=this.parseBlockValue(o)),o}}],[{key:"endOfLine",value:function(e,t,n){for(var r=e[t],i=t;r&&"\n"!==r&&(!n||"["!==r&&"]"!==r&&"{"!==r&&"}"!==r&&","!==r);){var o=e[i+1];if(":"===r&&(!o||"\n"===o||"\t"===o||" "===o||n&&","===o))break;if((" "===r||"\t"===r)&&"#"===o)break;i+=1,r=o}return i}}]),n}(Aa),Ta=function(e){No(n,e);var t=jo(n);function n(){return So(this,n),t.call(this,ta)}return Oo(n,[{key:"includesTrailingLines",get:function(){return!0}},{key:"parse",value:function(e,t){return this.context=e,this.range=new ka(t,t+1),t+1}}]),n}(Aa),Na=function(e){No(n,e);var t=jo(n);function n(e,r){var i;return So(this,n),(i=t.call(this,e,r)).node=null,i}return Oo(n,[{key:"includesTrailingLines",get:function(){return!!this.node&&this.node.includesTrailingLines}},{key:"parse",value:function(e,t){this.context=e;var n=e.parseNode,r=e.src,i=e.atLineStart,o=e.lineStart;i||this.type!==ma||(this.error=new Ca(this,"Sequence items must not have preceding content on the same line"));for(var a=i?t-o:e.indent,s=Aa.endOfWhiteSpace(r,t+1),u=r[s],l="#"===u,c=[],f=null;"\n"===u||"#"===u;){if("#"===u){var h=Aa.endOfLine(r,s+1);c.push(new ka(s,h)),s=h}else{i=!0,o=s+1,"\n"===r[Aa.endOfWhiteSpace(r,o)]&&0===c.length&&(o=(f=new Ta).parse({src:r},o)),s=Aa.endOfIndent(r,o)}u=r[s]}if(Aa.nextNodeIsIndented(u,s-(o+a),this.type!==ma)?this.node=n({atLineStart:i,inCollection:!1,indent:a,lineStart:o,parent:this},s):u&&o>t+1&&(s=o-1),this.node){if(f){var p=e.parent.items||e.parent.contents;p&&p.push(f)}c.length&&Array.prototype.push.apply(this.props,c),s=this.node.range.end}else if(l){var d=c[0];this.props.push(d),s=d.end}else s=Aa.endOfLine(r,t+1);var g=this.node?this.node.valueRange.end:s;return this.valueRange=new ka(t,g),s}},{key:"setOrigRanges",value:function(e,t){return t=zo(Ro(n.prototype),"setOrigRanges",this).call(this,e,t),this.node?this.node.setOrigRanges(e,t):t}},{key:"toString",value:function(){var e=this.context.src,t=this.node,n=this.range,r=this.value;if(null!=r)return r;var i=t?e.slice(n.start,t.range.start)+String(t):e.slice(n.start,n.end);return Aa.addStringTerminator(e,n.end,i)}}]),n}(Aa),Ra=function(e){No(n,e);var t=jo(n);function n(){return So(this,n),t.call(this,ia)}return Oo(n,[{key:"parse",value:function(e,t){this.context=e;var n=this.parseComment(t);return this.range=new ka(t,n),n}}]),n}(Aa);function La(e){for(var t=e;t instanceof Na;)t=t.node;if(!(t instanceof $a))return null;for(var n=t.items.length,r=-1,i=n-1;i>=0;--i){var o=t.items[i];if(o.type===ia){var a=o.context,s=a.indent,u=a.lineStart;if(s>0&&o.range.start>=u+s)break;r=i}else{if(o.type!==ta)break;r=i}}if(-1===r)return null;for(var l=t.items.splice(r,n-r),c=l[0].range.start;t.range.end=c,t.valueRange&&t.valueRange.end>c&&(t.valueRange.end=c),t!==e;)t=t.context.parent;return l}var $a=function(e){No(n,e);var t=jo(n);function n(e){var r;So(this,n),r=t.call(this,e.type===ma?ga:la);for(var i=e.props.length-1;i>=0;--i)if(e.props[i].start0}},{key:"parse",value:function(e,t){this.context=e;var r=e.parseNode,i=e.src,o=Aa.startOfLine(i,t),a=this.items[0];a.context.parent=this,this.valueRange=ka.copy(a.valueRange);for(var s=a.range.start-a.context.lineStart,u=t,l=i[u=Aa.normalizeOffset(i,u)],c=Aa.endOfWhiteSpace(i,o)===u,f=!1;l;){for(;"\n"===l||"#"===l;){if(c&&"\n"===l&&!f){var h=new Ta;if(u=h.parse({src:i},u),this.valueRange.end=u,u>=i.length){l=null;break}this.items.push(h),u-=1}else if("#"===l){if(u=i.length){l=null;break}}if(o=u+1,u=Aa.endOfIndent(i,o),Aa.atBlank(i,u)){var d=Aa.endOfWhiteSpace(i,u),g=i[d];g&&"\n"!==g&&"#"!==g||(u=d)}l=i[u],c=!0}if(!l)break;if(u!==o+s&&(c||":"!==l)){if(ut&&(u=o);break}if(!this.error){this.error=new Sa(this,"All collection items must start at the same column")}}if(a.type===ma){if("-"!==l){o>t&&(u=o);break}}else if("-"===l&&!this.error){var m=i[u+1];if(!m||"\n"===m||"\t"===m||" "===m){this.error=new Sa(this,"A collection cannot be both a mapping and a sequence")}}var v=r({atLineStart:c,inCollection:!0,indent:s,lineStart:o,parent:this},u);if(!v)return u;if(this.items.push(v),this.valueRange.end=v.valueRange.end,l=i[u=Aa.normalizeOffset(i,v.range.end)],c=!1,f=v.includesTrailingLines,l){for(var y=u-1,b=i[y];" "===b||"\t"===b;)b=i[--y];"\n"===b&&(o=y+1,c=!0)}var D=La(v);D&&Array.prototype.push.apply(this.items,D)}return u}},{key:"setOrigRanges",value:function(e,t){return t=zo(Ro(n.prototype),"setOrigRanges",this).call(this,e,t),this.items.forEach((function(n){t=n.setOrigRanges(e,t)})),t}},{key:"toString",value:function(){var e=this.context.src,t=this.items,n=this.range,r=this.value;if(null!=r)return r;for(var i=e.slice(n.start,t[0].range.start)+String(t[0]),o=1;o=i+r||("#"===o||"\n"===o)&&n.nextContentHasIndent(e,t,r))}}]),n}(Aa),Ia=function(e){No(n,e);var t=jo(n);function n(){var e;return So(this,n),(e=t.call(this,oa)).name=null,e}return Oo(n,[{key:"parameters",get:function(){var e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}},{key:"parseName",value:function(e){for(var t=this.context.src,n=e,r=t[n];r&&"\n"!==r&&"\t"!==r&&" "!==r;)r=t[n+=1];return this.name=t.slice(e,n),n}},{key:"parseParameters",value:function(e){for(var t=this.context.src,n=e,r=t[n];r&&"\n"!==r&&"#"!==r;)r=t[n+=1];return this.valueRange=new ka(e,n),n}},{key:"parse",value:function(e,t){this.context=e;var n=this.parseName(t+1);return n=this.parseParameters(n),n=this.parseComment(n),this.range=new ka(t,n),n}}]),n}(Aa),Ba=function(e){No(n,e);var t=jo(n);function n(){var e;return So(this,n),(e=t.call(this,aa)).directives=null,e.contents=null,e.directivesEndMarker=null,e.documentEndMarker=null,e}return Oo(n,[{key:"parseDirectives",value:function(e){var t=this.context.src;this.directives=[];for(var r=!0,i=!1,o=e;!Aa.atDocumentBoundary(t,o,Zo);)switch(t[o=n.startCommentOrEndBlankLine(t,o)]){case"\n":if(r){var a=new Ta;(o=a.parse({src:t},o))0&&(this.contents=this.directives,this.directives=[]),o}return t[o]?(this.directivesEndMarker=new ka(o,o+3),o+3):(i?this.error=new Ca(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),o)}},{key:"parseContents",value:function(e){var t=this.context,r=t.parseNode,i=t.src;this.contents||(this.contents=[]);for(var o=e;"-"===i[o-1];)o-=1;var a=Aa.endOfWhiteSpace(i,e),s=o===e;for(this.valueRange=new ka(a);!Aa.atDocumentBoundary(i,a,Qo);){switch(i[a]){case"\n":if(s){var u=new Ta;(a=u.parse({src:i},a))0&&((t.length>0||e[0].type===ia)&&(r+="---\n"),r+=e.join("")),"\n"!==r[r.length-1]&&(r+="\n"),r}}],[{key:"startCommentOrEndBlankLine",value:function(e,t){var n=Aa.endOfWhiteSpace(e,t),r=e[n];return"#"===r||"\n"===r?n:t}}]),n}(Aa),Ma=function(e){No(n,e);var t=jo(n);function n(){return So(this,n),t.apply(this,arguments)}return Oo(n,[{key:"parse",value:function(e,t){this.context=e;var n=e.src,r=Aa.endOfIdentifier(n,t+1);return this.valueRange=new ka(t+1,r),r=Aa.endOfWhiteSpace(n,r),r=this.parseComment(r)}}]),n}(Aa),Pa="CLIP",ja="KEEP",za="STRIP",qa=function(e){No(n,e);var t=jo(n);function n(e,r){var i;return So(this,n),(i=t.call(this,e,r)).blockIndent=null,i.chomping=Pa,i.header=null,i}return Oo(n,[{key:"includesTrailingLines",get:function(){return this.chomping===ja}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=this.valueRange,t=e.start,n=e.end,r=this.context,i=r.indent,o=r.src;if(this.valueRange.isEmpty())return"";for(var a=null,s=o[n-1];"\n"===s||"\t"===s||" "===s;){if((n-=1)<=t){if(this.chomping===ja)break;return""}"\n"===s&&(a=n),s=o[n-1]}var u=n+1;a&&(this.chomping===ja?(u=a,n=this.valueRange.end):n=a);for(var l=i+this.blockIndent,c=this.type===na,f=!0,h="",p="",d=!1,g=t;gs&&(s=f);o="\n"===r[l]?l:a=Aa.endOfLine(r,l)}return this.chomping!==ja&&(o=r[a]?a+1:a),this.valueRange=new ka(e+1,o),o}},{key:"parse",value:function(e,t){this.context=e;var n=e.src,r=this.parseBlockHeader(t);return r=Aa.endOfWhiteSpace(n,r),r=this.parseComment(r),r=this.parseBlockValue(r)}},{key:"setOrigRanges",value:function(e,t){return t=zo(Ro(n.prototype),"setOrigRanges",this).call(this,e,t),this.header?this.header.setOrigRange(e,t):t}}]),n}(Aa),Ua=function(e){No(n,e);var t=jo(n);function n(e,r){var i;return So(this,n),(i=t.call(this,e,r)).items=null,i}return Oo(n,[{key:"prevNodeIsJsonLike",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.items.length,t=this.items[e-1];return!!t&&(t.jsonLike||t.type===ia&&this.prevNodeIsJsonLike(e-1))}},{key:"parse",value:function(e,t){this.context=e;var n=e.parseNode,r=e.src,i=e.indent,o=e.lineStart,a=r[t];this.items=[{char:a,offset:t}];var s=Aa.endOfWhiteSpace(r,t+1);for(a=r[s];a&&"]"!==a&&"}"!==a;){switch(a){case"\n":if(o=s+1,"\n"===r[Aa.endOfWhiteSpace(r,o)]){var u=new Ta;o=u.parse({src:r},o),this.items.push(u)}if((s=Aa.endOfIndent(r,o))<=o+i&&(a=r[s],sn.offset);)++r;n.origOffset=n.offset+r,t=r}})),t}},{key:"toString",value:function(){var e=this.context.src,t=this.items,n=this.range,r=this.value;if(null!=r)return r;var i=t.filter((function(e){return e instanceof Aa})),o="",a=n.start;return i.forEach((function(t){var n=e.slice(a,t.range.start);a=t.range.end,"\n"===(o+=n+String(t))[o.length-1]&&"\n"!==e[a-1]&&"\n"===e[a]&&(a+=1)})),o+=e.slice(a,n.end),Aa.addStringTerminator(e,n.end,o)}}]),n}(Aa),Ga=function(e){No(n,e);var t=jo(n);function n(){return So(this,n),t.apply(this,arguments)}return Oo(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,n=t.start,r=t.end,i=this.context,o=i.indent,a=i.src;'"'!==a[r-1]&&e.push(new Sa(this,'Missing closing "quote'));for(var s="",u=n+1;uf?a.slice(f,u+1):l)}else s+=l}return e.length>0?{errors:e,str:s}:s}},{key:"parseCharCode",value:function(e,t,n){var r=this.context.src,i=r.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;return isNaN(o)?(n.push(new Sa(this,"Invalid escape sequence ".concat(r.substr(e-2,t+2)))),r.substr(e-2,t+2)):String.fromCodePoint(o)}},{key:"parse",value:function(e,t){this.context=e;var r=e.src,i=n.endOfQuote(r,t+1);return this.valueRange=new ka(t,i),i=Aa.endOfWhiteSpace(r,i),i=this.parseComment(i)}}],[{key:"endOfQuote",value:function(e,t){for(var n=e[t];n&&'"'!==n;)n=e[t+="\\"===n?2:1];return t+1}}]),n}(Aa),Ha=function(e){No(n,e);var t=jo(n);function n(){return So(this,n),t.apply(this,arguments)}return Oo(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,n=t.start,r=t.end,i=this.context,o=i.indent,a=i.src;"'"!==a[r-1]&&e.push(new Sa(this,"Missing closing 'quote"));for(var s="",u=n+1;uf?a.slice(f,u+1):l)}else s+=l}return e.length>0?{errors:e,str:s}:s}},{key:"parse",value:function(e,t){this.context=e;var r=e.src,i=n.endOfQuote(r,t+1);return this.valueRange=new ka(t,i),i=Aa.endOfWhiteSpace(r,i),i=this.parseComment(i)}}],[{key:"endOfQuote",value:function(e,t){for(var n=e[t];n;)if("'"===n){if("'"!==e[t+1])break;n=e[t+=2]}else n=e[t+=1];return t+1}}]),n}(Aa);function Va(e,t){switch(e){case ea:return new Ma(e,t);case na:case ra:return new qa(e,t);case sa:case ua:return new Ua(e,t);case ca:case fa:case ma:return new Na(e,t);case ia:case ha:return new Oa(e,t);case pa:return new Ga(e,t);case da:return new Ha(e,t);default:return null}}var Wa=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.atLineStart,o=r.inCollection,a=r.inFlow,s=r.indent,u=r.lineStart,l=r.parent;So(this,e),To(this,"parseNode",(function(n,r){if(Aa.atDocumentBoundary(t.src,r))return null;var i=new e(t,n),o=i.parseProps(r),a=o.props,s=o.type,u=o.valueStart,l=Va(s,a),c=l.parse(i,u);if(l.range=new ka(r,c),c<=r&&(l.error=new Error("Node#parse consumed no characters"),l.error.parseEnd=c,l.error.source=l,l.range.end=r+1),i.nodeStartsCollection(l)){l.error||i.atLineStart||i.parent.type!==aa||(l.error=new Sa(l,"Block collection must not have preceding content here (e.g. directives-end indicator)"));var f=new $a(l);return c=f.parse(new e(i),c),f.range=new ka(r,c),f}return l})),this.atLineStart=null!=i?i:n.atLineStart||!1,this.inCollection=null!=o?o:n.inCollection||!1,this.inFlow=null!=a?a:n.inFlow||!1,this.indent=null!=s?s:n.indent,this.lineStart=null!=u?u:n.lineStart,this.parent=null!=l?l:n.parent||{},this.root=n.root,this.src=n.src}return Oo(e,[{key:"nodeStartsCollection",value:function(e){var t=this.inCollection,n=this.inFlow,r=this.src;if(t||n)return!1;if(e instanceof Na)return!0;var i=e.range.end;return"\n"!==r[i]&&"\n"!==r[i-1]&&":"===r[i=Aa.endOfWhiteSpace(r,i)]}},{key:"parseProps",value:function(t){for(var n=this.inFlow,r=this.parent,i=this.src,o=[],a=!1,s=i[t=this.atLineStart?Aa.endOfIndent(i,t):Aa.endOfWhiteSpace(i,t)];s===Ko||s===Jo||s===Xo||"\n"===s;){if("\n"===s){var u=t,l=void 0;do{l=u+1,u=Aa.endOfIndent(i,l)}while("\n"===i[u]);var c=u-(l+this.indent),f=r.type===ma&&r.context.atLineStart;if("#"!==i[u]&&!Aa.nextNodeIsIndented(i[u],c,!f))break;this.atLineStart=!0,this.lineStart=l,a=!1,t=u}else if(s===Jo){var h=Aa.endOfLine(i,t+1);o.push(new ka(t,h)),t=h}else{var p=Aa.endOfIdentifier(i,t+1);s===Xo&&","===i[p]&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(i.slice(t+1,p+13))&&(p=Aa.endOfIdentifier(i,p+5)),o.push(new ka(t,p)),a=!0,t=Aa.endOfWhiteSpace(i,p)}s=i[t]}return a&&":"===s&&Aa.atBlank(i,t+1,!0)&&(t-=1),{props:o,type:e.parseType(i,t,n),valueStart:t}}}],[{key:"parseType",value:function(e,t,n){switch(e[t]){case"*":return ea;case">":return na;case"|":return ra;case"{":return sa;case"[":return ua;case"?":return!n&&Aa.atBlank(e,t+1,!0)?ca:ha;case":":return!n&&Aa.atBlank(e,t+1,!0)?fa:ha;case"-":return!n&&Aa.atBlank(e,t+1,!0)?ma:ha;case'"':return pa;case"'":return da;default:return ha}}}]),e}();function Ya(e){var t=[];-1!==e.indexOf("\r")&&(e=e.replace(/\r\n?/g,(function(e,n){return e.length>1&&t.push(n),"\n"})));var n=[],r=0;do{var i=new Ba,o=new Wa({src:e});r=i.parse(o,r),n.push(i)}while(r=0;--i){var o=t[i];if(Number.isInteger(o)&&o>=0){var a=[];a[o]=r,r=a}else{var s={};Object.defineProperty(s,o,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=s}}return e.createNode(r,!1)}var es=function(e){return null==e||"object"===Co(e)&&e[Symbol.iterator]().next().done},ts=function(e){No(n,e);var t=jo(n);function n(e){var r;return So(this,n),To(Mo(r=t.call(this)),"items",[]),r.schema=e,r}return Oo(n,[{key:"addIn",value:function(e,t){if(es(e))this.add(t);else{var r=Uo(e),i=r[0],o=r.slice(1),a=this.get(i,!0);if(a instanceof n)a.addIn(o,t);else{if(void 0!==a||!this.schema)throw new Error("Expected YAML collection at ".concat(i,". Remaining path: ").concat(o));this.set(i,Qa(this.schema,o,t))}}}},{key:"deleteIn",value:function(e){var t=Uo(e),r=t[0],i=t.slice(1);if(0===i.length)return this.delete(r);var o=this.get(r,!0);if(o instanceof n)return o.deleteIn(i);throw new Error("Expected YAML collection at ".concat(r,". Remaining path: ").concat(i))}},{key:"getIn",value:function(e,t){var r=Uo(e),i=r[0],o=r.slice(1),a=this.get(i,!0);return 0===o.length?!t&&a instanceof Za?a.value:a:a instanceof n?a.getIn(o,t):void 0}},{key:"hasAllNullValues",value:function(){return this.items.every((function(e){if(!e||"PAIR"!==e.type)return!1;var t=e.value;return null==t||t instanceof Za&&null==t.value&&!t.commentBefore&&!t.comment&&!t.tag}))}},{key:"hasIn",value:function(e){var t=Uo(e),r=t[0],i=t.slice(1);if(0===i.length)return this.has(r);var o=this.get(r,!0);return o instanceof n&&o.hasIn(i)}},{key:"setIn",value:function(e,t){var r=Uo(e),i=r[0],o=r.slice(1);if(0===o.length)this.set(i,t);else{var a=this.get(i,!0);if(a instanceof n)a.setIn(o,t);else{if(void 0!==a||!this.schema)throw new Error("Expected YAML collection at ".concat(i,". Remaining path: ").concat(o));this.set(i,Qa(this.schema,o,t))}}}},{key:"toJSON",value:function(){return null}},{key:"toString",value:function(e,t,r,i){var o=this,a=t.blockItem,s=t.flowChars,u=t.isMap,l=t.itemIndent,c=e,f=c.indent,h=c.indentStep,p=c.stringify,d=this.type===sa||this.type===ua||e.inFlow;d&&(l+=h);var g=u&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:g,indent:l,inFlow:d,type:null});var m,v=!1,y=!1,b=this.items.reduce((function(t,n,r){var i;n&&(!v&&n.spaceBefore&&t.push({type:"comment",str:""}),n.commentBefore&&n.commentBefore.match(/^.*$/gm).forEach((function(e){t.push({type:"comment",str:"#".concat(e)})})),n.comment&&(i=n.comment),d&&(!v&&n.spaceBefore||n.commentBefore||n.comment||n.key&&(n.key.commentBefore||n.key.comment)||n.value&&(n.value.commentBefore||n.value.comment))&&(y=!0)),v=!1;var a=p(n,e,(function(){return i=null}),(function(){return v=!0}));return d&&!y&&a.includes("\n")&&(y=!0),d&&rn.maxFlowStringSingleLineLength){m=D;var k,A=Yo(E);try{for(A.s();!(k=A.n()).done;){var x=k.value;m+=x?"\n".concat(h).concat(f).concat(x):"\n"}}catch(e){A.e(e)}finally{A.f()}m+="\n".concat(f).concat(w)}else m="".concat(D," ").concat(E.join(" ")," ").concat(w)}else{var _=b.map(a);m=_.shift();var C,S=Yo(_);try{for(S.s();!(C=S.n()).done;){var F=C.value;m+=F?"\n".concat(f).concat(F):"\n"}}catch(e){S.e(e)}finally{S.f()}}return this.comment?(m+="\n"+this.comment.replace(/^/gm,"".concat(f,"#")),r&&r()):v&&i&&i(),m}}]),n}(Ja);function ns(e){var t=e instanceof Za?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}To(ts,"maxFlowStringSingleLineLength",60);var rs=function(e){No(n,e);var t=jo(n);function n(){return So(this,n),t.apply(this,arguments)}return Oo(n,[{key:"add",value:function(e){this.items.push(e)}},{key:"delete",value:function(e){var t=ns(e);return"number"==typeof t&&this.items.splice(t,1).length>0}},{key:"get",value:function(e,t){var n=ns(e);if("number"==typeof n){var r=this.items[n];return!t&&r instanceof Za?r.value:r}}},{key:"has",value:function(e){var t=ns(e);return"number"==typeof t&&t1&&void 0!==arguments[1]?arguments[1]:null;return So(this,n),(r=t.call(this)).key=e,r.value=i,r.type=n.Type.PAIR,r}return Oo(n,[{key:"commentBefore",get:function(){return this.key instanceof Ja?this.key.commentBefore:void 0},set:function(e){if(null==this.key&&(this.key=new Za(null)),!(this.key instanceof Ja)){throw new Error("Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.")}this.key.commentBefore=e}},{key:"addToJSMap",value:function(e,t){var n=Xa(this.key,"",e);if(t instanceof Map){var r=Xa(this.value,n,e);t.set(n,r)}else if(t instanceof Set)t.add(n);else{var i=function(e,t,n){return null===t?"":"object"!==Co(t)?String(t):e instanceof Ja&&n&&n.doc?e.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(t)}(this.key,n,e),o=Xa(this.value,i,e);i in t?Object.defineProperty(t,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[i]=o}return t}},{key:"toJSON",value:function(e,t){var n=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,n)}},{key:"toString",value:function(e,t,n){if(!e||!e.doc)return JSON.stringify(this);var r=e.doc.options,i=r.indent,o=r.indentSeq,a=r.simpleKeys,s=this.key,u=this.value,l=s instanceof Ja&&s.comment;if(a){if(l)throw new Error("With simple keys, key nodes cannot have comments");if(s instanceof ts){throw new Error("With simple keys, collection cannot be used as a key value")}}var c=!a&&(!s||l||(s instanceof Ja?s instanceof ts||s.type===na||s.type===ra:"object"===Co(s))),f=e,h=f.doc,p=f.indent,d=f.indentStep,g=f.stringify;e=Object.assign({},e,{implicitKey:!c,indent:p+d});var m=!1,v=g(s,e,(function(){return l=null}),(function(){return m=!0}));if(v=Ka(v,e.indent,l),!c&&v.length>1024){if(a)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");c=!0}if(e.allNullValues&&!a)return this.comment?(v=Ka(v,e.indent,this.comment),t&&t()):m&&!l&&n&&n(),e.inFlow&&!c?v:"? ".concat(v);v=c?"? ".concat(v,"\n").concat(p,":"):"".concat(v,":"),this.comment&&(v=Ka(v,e.indent,this.comment),t&&t());var y="",b=null;if(u instanceof Ja){if(u.spaceBefore&&(y="\n"),u.commentBefore){var D=u.commentBefore.replace(/^/gm,"".concat(e.indent,"#"));y+="\n".concat(D)}b=u.comment}else u&&"object"===Co(u)&&(u=h.schema.createNode(u,!0));e.implicitKey=!1,!c&&!this.comment&&u instanceof Za&&(e.indentAtStart=v.length+1),m=!1,!o&&i>=2&&!e.inFlow&&!c&&u instanceof rs&&u.type!==ua&&!u.tag&&!h.anchors.getName(u)&&(e.indent=e.indent.substr(2));var w=g(u,e,(function(){return b=null}),(function(){return m=!0})),E=" ";if(y||this.comment)E="".concat(y,"\n").concat(e.indent);else if(!c&&u instanceof ts){("["===w[0]||"{"===w[0])&&!w.includes("\n")||(E="\n".concat(e.indent))}else"\n"===w[0]&&(E="");return m&&!b&&n&&n(),Ka(v+E+w,e.indent,b)}}]),n}(Ja);To(is,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var os=function e(t,n){if(t instanceof as){var r=n.get(t.source);return r.count*r.aliasCount}if(t instanceof ts){var i,o=0,a=Yo(t.items);try{for(a.s();!(i=a.n()).done;){var s=e(i.value,n);s>o&&(o=s)}}catch(e){a.e(e)}finally{a.f()}return o}if(t instanceof is){var u=e(t.key,n),l=e(t.value,n);return Math.max(u,l)}return 1},as=function(e){No(n,e);var t=jo(n);function n(e){var r;return So(this,n),(r=t.call(this)).source=e,r.type=ea,r}return Oo(n,[{key:"tag",set:function(e){throw new Error("Alias nodes cannot have tags")}},{key:"toJSON",value:function(e,t){if(!t)return Xa(this.source,e,t);var n=t.anchors,r=t.maxAliasCount,i=n.get(this.source);if(!i||void 0===i.res){var o="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new _a(this.cstNode,o):new ReferenceError(o)}if(r>=0&&(i.count+=1,0===i.aliasCount&&(i.aliasCount=os(this.source,n)),i.count*i.aliasCount>r)){var a="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new _a(this.cstNode,a):new ReferenceError(a)}return i.res}},{key:"toString",value:function(e){return n.stringify(this,e)}}],[{key:"stringify",value:function(e,t){var n=e.range,r=e.source,i=t.anchors,o=t.doc,a=t.implicitKey,s=t.inStringifyKey,u=Object.keys(i).find((function(e){return i[e]===r}));if(!u&&s&&(u=o.anchors.getName(r)||o.anchors.newName()),u)return"*".concat(u).concat(a?" ":"");var l=o.anchors.getName(r)?"Alias node must be after source node":"Source node not found for alias node";throw new Error("".concat(l," [").concat(n,"]"))}}]),n}(Ja);function ss(e,t){var n,r=t instanceof Za?t.value:t,i=Yo(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o instanceof is){if(o.key===t||o.key===r)return o;if(o.key&&o.key.value===r)return o}}}catch(e){i.e(e)}finally{i.f()}}To(as,"default",!0);var us=function(e){No(n,e);var t=jo(n);function n(){return So(this,n),t.apply(this,arguments)}return Oo(n,[{key:"add",value:function(e,t){e?e instanceof is||(e=new is(e.key||e,e.value)):e=new is(e);var n=ss(this.items,e.key),r=this.schema&&this.schema.sortMapEntries;if(n){if(!t)throw new Error("Key ".concat(e.key," already set"));n.value=e.value}else if(r){var i=this.items.findIndex((function(t){return r(e,t)<0}));-1===i?this.items.push(e):this.items.splice(i,0,e)}else this.items.push(e)}},{key:"delete",value:function(e){var t=ss(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}},{key:"get",value:function(e,t){var n=ss(this.items,e),r=n&&n.value;return!t&&r instanceof Za?r.value:r}},{key:"has",value:function(e){return!!ss(this.items,e)}},{key:"set",value:function(e,t){this.add(new is(e,t),!0)}},{key:"toJSON",value:function(e,t,n){var r=n?new n:t&&t.mapAsMap?new Map:{};t&&t.onCreate&&t.onCreate(r);var i,o=Yo(this.items);try{for(o.s();!(i=o.n()).done;){i.value.addToJSMap(t,r)}}catch(e){o.e(e)}finally{o.f()}return r}},{key:"toString",value:function(e,t,r){if(!e)return JSON.stringify(this);var i,o=Yo(this.items);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(!(a instanceof is))throw new Error("Map items must all be pairs; found ".concat(JSON.stringify(a)," instead"))}}catch(e){o.e(e)}finally{o.f()}return zo(Ro(n.prototype),"toString",this).call(this,e,{blockItem:function(e){return e.str},flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},t,r)}}]),n}(ts),ls=function(e){No(n,e);var t=jo(n);function n(e){var r;if(So(this,n),e instanceof is){var i=e.value;i instanceof rs||((i=new rs).items.push(e.value),i.range=e.value.range),(r=t.call(this,e.key,i)).range=e.range}else r=t.call(this,new Za("<<"),new rs);return r.type=is.Type.MERGE_PAIR,Po(r)}return Oo(n,[{key:"addToJSMap",value:function(e,t){var n,r=Yo(this.value.items);try{for(r.s();!(n=r.n()).done;){var i=n.value.source;if(!(i instanceof us))throw new Error("Merge sources must be maps");var o,a=Yo(i.toJSON(null,e,Map));try{for(a.s();!(o=a.n()).done;){var s=qo(o.value,2),u=s[0],l=s[1];t instanceof Map?t.has(u)||t.set(u,l):t instanceof Set?t.add(u):Object.prototype.hasOwnProperty.call(t,u)||Object.defineProperty(t,u,{value:l,writable:!0,enumerable:!0,configurable:!0})}}catch(e){a.e(e)}finally{a.f()}}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"toString",value:function(e,t){var r=this.value;if(r.items.length>1)return zo(Ro(n.prototype),"toString",this).call(this,e,t);this.value=r.items[0];var i=zo(Ro(n.prototype),"toString",this).call(this,e,t);return this.value=r,i}}]),n}(is),cs={defaultType:ra,lineWidth:76},fs={trueStr:"true",falseStr:"false"},hs={asBigInt:!1},ps={nullStr:"null"},ds={defaultType:ha,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function gs(e,t,n){var r,i=Yo(t);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=o.format,s=o.test,u=o.resolve;if(s){var l=e.match(s);if(l){var c=u.apply(null,l);return c instanceof Za||(c=new Za(c)),a&&(c.format=a),c}}}}catch(e){i.e(e)}finally{i.f()}return n&&(e=n(e)),new Za(e)}var ms="flow",vs="block",ys="quoted",bs=function(e,t){for(var n=e[t+1];" "===n||"\t"===n;){do{n=e[t+=1]}while(n&&"\n"!==n);n=e[t+1]}return t};function Ds(e,t,n,r){var i=r.indentAtStart,o=r.lineWidth,a=void 0===o?80:o,s=r.minContentWidth,u=void 0===s?20:s,l=r.onFold,c=r.onOverflow;if(!a||a<0)return e;var f=Math.max(1+u,1+a-t.length);if(e.length<=f)return e;var h=[],p={},d=a-t.length;"number"==typeof i&&(i>a-Math.max(2,u)?h.push(0):d=a-i);var g,m=void 0,v=void 0,y=!1,b=-1,D=-1,w=-1;for(n===vs&&-1!==(b=bs(e,b))&&(d=b+f);g=e[b+=1];){if(n===ys&&"\\"===g){switch(D=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}w=b}if("\n"===g)n===vs&&(b=bs(e,b)),d=b+f,m=void 0;else{if(" "===g&&v&&" "!==v&&"\n"!==v&&"\t"!==v){var E=e[b+1];E&&" "!==E&&"\n"!==E&&"\t"!==E&&(m=b)}if(b>=d)if(m)h.push(m),d=m+f,m=void 0;else if(n===ys){for(;" "===v||"\t"===v;)v=g,g=e[b+=1],y=!0;var k=b>w+1?b-2:D-1;if(p[k])return e;h.push(k),p[k]=!0,d=k+f,m=void 0}else y=!0}v=g}if(y&&c&&c(),0===h.length)return e;l&&l();for(var A=e.slice(0,h[0]),x=0;xr)return!0;if(i-(a=o+1)<=r)return!1}return!0}(a,ds.fold.lineWidth,s.length)),c=l?"|":">";if(!a)return c+"\n";var f="",h="";if(a=a.replace(/[\n\t ]*$/,(function(e){var t=e.indexOf("\n");return-1===t?c+="-":a!==e&&t===e.length-1||(c+="+",r&&r()),h=e.replace(/\n$/,""),""})).replace(/^[\n ]*/,(function(e){-1!==e.indexOf(" ")&&(c+=u);var t=e.match(/ +$/);return t?(f=e.slice(0,-t[0].length),t[0]):(f=e,"")})),h&&(h=h.replace(/\n+(?!\n|$)/g,"$&".concat(s))),f&&(f=f.replace(/\n+/g,"$&".concat(s))),i&&(c+=" #"+i.replace(/ ?[\r\n]+/g," "),n&&n()),!a)return"".concat(c).concat(u,"\n").concat(s).concat(h);if(l)return a=a.replace(/\n+/g,"$&".concat(s)),"".concat(c,"\n").concat(s).concat(f).concat(a).concat(h);a=a.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,"$&".concat(s));var p=Ds("".concat(f).concat(a).concat(h),s,vs,ds.fold);return"".concat(c,"\n").concat(s).concat(p)}function _s(e,t,n,r){var i=ds.defaultType,o=t.implicitKey,a=t.inFlow,s=e,u=s.type,l=s.value;"string"!=typeof l&&(l=String(l),e=Object.assign({},e,{value:l}));var c=function(i){switch(i){case na:case ra:return xs(e,t,n,r);case pa:return ks(l,t);case da:return As(l,t);case ha:return function(e,t,n,r){var i=e.comment,o=e.type,a=e.value,s=t.actualString,u=t.implicitKey,l=t.indent,c=t.inFlow;if(u&&/[\n[\]{},]/.test(a)||c&&/[[\]{},]/.test(a))return ks(a,t);if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return u||c||-1===a.indexOf("\n")?-1!==a.indexOf('"')&&-1===a.indexOf("'")?As(a,t):ks(a,t):xs(e,t,n,r);if(!u&&!c&&o!==ha&&-1!==a.indexOf("\n"))return xs(e,t,n,r);if(""===l&&Es(a))return t.forceBlockIndent=!0,xs(e,t,n,r);var f=a.replace(/\n+/g,"$&\n".concat(l));if(s){var h=t.doc.schema.tags;if("string"!=typeof gs(f,h,h.scalarFallback).value)return ks(a,t)}var p=u?f:Ds(f,l,ms,ws(t));return!i||c||-1===p.indexOf("\n")&&-1===i.indexOf("\n")?p:(n&&n(),function(e,t,n){if(!n)return e;var r=n.replace(/[\s\S]^/gm,"$&".concat(t,"#"));return"#".concat(r,"\n").concat(t).concat(e)}(p,l,i))}(e,t,n,r);default:return null}};u!==pa&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(l)?u=pa:!o&&!a||u!==na&&u!==ra||(u=pa);var f=c(u);if(null===f&&null===(f=c(i)))throw new Error("Unsupported default string type ".concat(i));return f}function Cs(e){var t=e.format,n=e.minFractionDigits,r=e.tag,i=e.value;if("bigint"==typeof i)return String(i);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";var o=JSON.stringify(i);if(!t&&n&&(!r||"tag:yaml.org,2002:float"===r)&&/^\d/.test(o)){var a=o.indexOf(".");a<0&&(a=o.length,o+=".");for(var s=n-(o.length-a-1);s-- >0;)o+="0"}return o}function Ss(e,t){var n,r,i;switch(t.type){case sa:n="}",r="flow map";break;case ua:n="]",r="flow sequence";break;default:return void e.push(new Ca(t,"Not a flow collection!?"))}for(var o=t.items.length-1;o>=0;--o){var a=t.items[o];if(!a||a.type!==ia){i=a;break}}if(i&&i.char!==n){var s,u="Expected ".concat(r," to end with ").concat(n);"number"==typeof i.offset?(s=new Ca(t,u)).offset=i.offset+1:(s=new Ca(i,u),i.range&&i.range.end&&(s.offset=i.range.end-i.range.start)),e.push(s)}}function Fs(e,t){var n=t.context.src[t.range.start-1];if("\n"!==n&&"\t"!==n&&" "!==n){e.push(new Ca(t,"Comments must be separated from other tokens by white space characters"))}}function Os(e,t){var n=String(t),r=n.substr(0,8)+"..."+n.substr(-8);return new Ca(e,'The "'.concat(r,'" key is too long'))}function Ts(e,t){var n,r=Yo(t);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.afterKey,a=i.before,s=i.comment,u=e.items[a];u?(o&&u.value&&(u=u.value),void 0===s?!o&&u.commentBefore||(u.spaceBefore=!0):u.commentBefore?u.commentBefore+="\n"+s:u.commentBefore=s):void 0!==s&&(e.comment?e.comment+="\n"+s:e.comment=s)}}catch(e){r.e(e)}finally{r.f()}}function Ns(e,t){var n=t.strValue;return n?"string"==typeof n?n:(n.errors.forEach((function(n){n.source||(n.source=t),e.errors.push(n)})),n.str):""}function Rs(e,t){var n=t.tag,r=t.type,i=!1;if(n){var o=n.handle,a=n.suffix,s=n.verbatim;if(s){if("!"!==s&&"!!"!==s)return s;var u="Verbatim tags aren't resolved, so ".concat(s," is invalid.");e.errors.push(new Ca(t,u))}else if("!"!==o||a)try{return function(e,t){var n=t.tag,r=n.handle,i=n.suffix,o=e.tagPrefixes.find((function(e){return e.handle===r}));if(!o){var a=e.getDefaults().tagPrefixes;if(a&&(o=a.find((function(e){return e.handle===r}))),!o)throw new Ca(t,"The ".concat(r," tag handle is non-default and was not declared."))}if(!i)throw new Ca(t,"The ".concat(r," tag has no suffix."));if("!"===r&&"1.0"===(e.version||e.options.version)){if("^"===i[0])return e.warnings.push(new Fa(t,"YAML 1.0 ^ tag expansion is not supported")),i;if(/[:/]/.test(i)){var s=i.match(/^([a-z0-9-]+)\/(.*)/i);return s?"tag:".concat(s[1],".yaml.org,2002:").concat(s[2]):"tag:".concat(i)}}return o.prefix+decodeURIComponent(i)}(e,t)}catch(t){e.errors.push(t)}else i=!0}switch(r){case na:case ra:case pa:case da:return ya.STR;case sa:case la:return ya.MAP;case ua:case ga:return ya.SEQ;case ha:return i?ya.STR:null;default:return null}}function Ls(e,t,n){var r,i=e.schema.tags,o=[],a=Yo(i);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(s.tag===n){if(!s.test){var u=s.resolve(e,t);return u instanceof ts?u:new Za(u)}o.push(s)}}}catch(e){a.e(e)}finally{a.f()}var l=Ns(e,t);return"string"==typeof l&&o.length>0?gs(l,o,i.scalarFallback):null}function $s(e,t,n){try{var r=Ls(e,t,n);if(r)return n&&t.tag&&(r.tag=n),r}catch(n){return n.source||(n.source=t),e.errors.push(n),null}try{var i=function(e){switch(e.type){case sa:case la:return ya.MAP;case ua:case ga:return ya.SEQ;default:return ya.STR}}(t);if(!i)throw new Error("The tag ".concat(n," is unavailable"));var o="The tag ".concat(n," is unavailable, falling back to ").concat(i);e.warnings.push(new Fa(t,o));var a=Ls(e,t,i);return a.tag=n,a}catch(n){var s=new _a(t,n.message);return s.stack=n.stack,e.errors.push(s),null}}function Is(e,t){var n,r={before:[],after:[]},i=!1,o=!1,a=Yo(function(e){if(!e)return!1;var t=e.type;return t===ca||t===fa||t===ma}(t.context.parent)?t.context.parent.props.concat(t.props):t.props);try{for(a.s();!(n=a.n()).done;){var s=n.value,u=s.start,l=s.end;switch(t.context.src[u]){case Jo:if(!t.commentHasRequiredWhitespace(u)){e.push(new Ca(t,"Comments must be separated from other tokens by white space characters"))}var c=t.header,f=t.valueRange;(f&&(u>f.start||c&&u>c.start)?r.after:r.before).push(t.context.src.slice(u+1,l));break;case Ko:if(i){e.push(new Ca(t,"A node can have at most one anchor"))}i=!0;break;case Xo:if(o){e.push(new Ca(t,"A node can have at most one tag"))}o=!0}}}catch(e){a.e(e)}finally{a.f()}return{comments:r,hasAnchor:i,hasTag:o}}function Bs(e,t){if(!t)return null;t.error&&e.errors.push(t.error);var n=Is(e.errors,t),r=n.comments,i=n.hasAnchor,o=n.hasTag;if(i){var a=e.anchors,s=t.anchor,u=a.getNode(s);u&&(a.map[a.newName(s)]=u),a.map[s]=t}if(t.type===ea&&(i||o)){e.errors.push(new Ca(t,"An alias node must not specify any properties"))}var l=function(e,t){var n=e.anchors,r=e.errors,i=e.schema;if(t.type===ea){var o=t.rawValue,a=n.getNode(o);if(!a){var s="Aliased anchor not found: ".concat(o);return r.push(new _a(t,s)),null}var u=new as(a);return n._cstAliases.push(u),u}var l=Rs(e,t);if(l)return $s(e,t,l);if(t.type!==ha){var c="Failed to resolve ".concat(t.type," node here");return r.push(new Sa(t,c)),null}try{return gs(Ns(e,t),i.tags,i.tags.scalarFallback)}catch(e){return e.source||(e.source=t),r.push(e),null}}(e,t);if(l){l.range=[t.range.start,t.range.end],e.options.keepCstNodes&&(l.cstNode=t),e.options.keepNodeTypes&&(l.type=t.type);var c=r.before.join("\n");c&&(l.commentBefore=l.commentBefore?"".concat(l.commentBefore,"\n").concat(c):c);var f=r.after.join("\n");f&&(l.comment=l.comment?"".concat(l.comment,"\n").concat(f):f)}return t.resolved=l}function Ms(e,t){if(t.type!==la&&t.type!==sa){var n="A ".concat(t.type," node cannot be resolved as a mapping");return e.errors.push(new Sa(t,n)),null}var r=t.type===sa?function(e,t){for(var n=[],r=[],i=void 0,o=!1,a="{",s=0;s0){(l=new Oa(ha,[])).context={parent:s,src:s.context.src};var c=s.range.start+1;if(l.range={start:c,end:c},l.valueRange={start:c,end:c},"number"==typeof s.range.origStart){var f=s.range.origStart+1;l.range.origStart=l.range.origEnd=f,l.valueRange.origStart=l.valueRange.origEnd=f}}var h=new is(i,Bs(e,l));Ps(s,h),r.push(h),i&&"number"==typeof o&&s.range.start>o+1024&&e.errors.push(Os(t,i)),i=void 0,o=null;break;default:void 0!==i&&r.push(new is(i)),i=Bs(e,s),o=s.range.start,s.error&&e.errors.push(s.error);e:for(var p=a+1;;++p){var d=t.items[p];switch(d&&d.type){case ta:case ia:continue e;case fa:break e;default:var g="Implicit map keys need to be followed by map values";e.errors.push(new Ca(s,g));break e}}if(s.valueRangeContainsNewline){var m="Implicit map keys need to be on a single line";e.errors.push(new Ca(s,m))}}}void 0!==i&&r.push(new is(i));return{comments:n,items:r}}(e,t),i=r.comments,o=r.items,a=new us;a.items=o,Ts(a,i);for(var s=!1,u=0;ur.valueRange.start)return!1;if(i[a]!==Jo)return!1;for(var s=n;sa+1024&&e.errors.push(Os(t,o));for(var g=u.context.src,m=a;m1){throw new Ca(t,"Each pair must have its own sequence indicator")}var o=i.items[0]||new is;i.commentBefore&&(o.commentBefore=o.commentBefore?"".concat(i.commentBefore,"\n").concat(o.commentBefore):i.commentBefore),i.comment&&(o.comment=o.comment?"".concat(i.comment,"\n").concat(o.comment):i.comment),i=o}n.items[r]=i instanceof is?i:new is(i)}}return n}function Us(e,t,n){var r=new rs(e);r.tag="tag:yaml.org,2002:pairs";var i,o=Yo(t);try{for(o.s();!(i=o.n()).done;){var a=i.value,s=void 0,u=void 0;if(Array.isArray(a)){if(2!==a.length)throw new TypeError("Expected [key, value] tuple: ".concat(a));s=a[0],u=a[1]}else if(a&&a instanceof Object){var l=Object.keys(a);if(1!==l.length)throw new TypeError("Expected { key: value } tuple: ".concat(a));u=a[s=l[0]]}else s=a;var c=e.createPair(s,u,n);r.items.push(c)}}catch(e){o.e(e)}finally{o.f()}return r}var Gs={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:qs,createNode:Us},Hs=function(e){No(n,e);var t=jo(n);function n(){var e;return So(this,n),To(Mo(e=t.call(this)),"add",us.prototype.add.bind(Mo(e))),To(Mo(e),"delete",us.prototype.delete.bind(Mo(e))),To(Mo(e),"get",us.prototype.get.bind(Mo(e))),To(Mo(e),"has",us.prototype.has.bind(Mo(e))),To(Mo(e),"set",us.prototype.set.bind(Mo(e))),e.tag=n.tag,e}return Oo(n,[{key:"toJSON",value:function(e,t){var n=new Map;t&&t.onCreate&&t.onCreate(n);var r,i=Yo(this.items);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=void 0,s=void 0;if(o instanceof is?(a=Xa(o.key,"",t),s=Xa(o.value,a,t)):a=Xa(o,"",t),n.has(a))throw new Error("Ordered maps must not include duplicate keys");n.set(a,s)}}catch(e){i.e(e)}finally{i.f()}return n}}]),n}(rs);To(Hs,"tag","tag:yaml.org,2002:omap");var Vs={identify:function(e){return e instanceof Map},nodeClass:Hs,default:!1,tag:"tag:yaml.org,2002:omap",resolve:function(e,t){var n,r=qs(e,t),i=[],o=Yo(r.items);try{for(o.s();!(n=o.n()).done;){var a=n.value.key;if(a instanceof Za){if(i.includes(a.value)){throw new Ca(t,"Ordered maps must not include duplicate keys")}i.push(a.value)}}}catch(e){o.e(e)}finally{o.f()}return Object.assign(new Hs,r)},createNode:function(e,t,n){var r=Us(e,t,n),i=new Hs;return i.items=r.items,i}},Ws=function(e){No(n,e);var t=jo(n);function n(){var e;return So(this,n),(e=t.call(this)).tag=n.tag,e}return Oo(n,[{key:"add",value:function(e){var t=e instanceof is?e:new is(e);ss(this.items,t.key)||this.items.push(t)}},{key:"get",value:function(e,t){var n=ss(this.items,e);return!t&&n instanceof is?n.key instanceof Za?n.key.value:n.key:n}},{key:"set",value:function(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not ".concat(Co(t)));var n=ss(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new is(e))}},{key:"toJSON",value:function(e,t){return zo(Ro(n.prototype),"toJSON",this).call(this,e,t,Set)}},{key:"toString",value:function(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return zo(Ro(n.prototype),"toString",this).call(this,e,t,r);throw new Error("Set items must all have null values")}}]),n}(us);To(Ws,"tag","tag:yaml.org,2002:set");var Ys={identify:function(e){return e instanceof Set},nodeClass:Ws,default:!1,tag:"tag:yaml.org,2002:set",resolve:function(e,t){var n=Ms(e,t);if(!n.hasAllNullValues())throw new Ca(t,"Set items must all have null values");return Object.assign(new Ws,n)},createNode:function(e,t,n){var r,i=new Ws,o=Yo(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;i.items.push(e.createPair(a,null,n))}}catch(e){o.e(e)}finally{o.f()}return i}},Ks=function(e,t){var n=t.split(":").reduce((function(e,t){return 60*e+Number(t)}),0);return"-"===e?-n:n},Js=function(e){var t=e.value;if(isNaN(t)||!isFinite(t))return Cs(t);var n="";t<0&&(n="-",t=Math.abs(t));var r=[t%60];return t<60?r.unshift(0):(t=Math.round((t-r[0])/60),r.unshift(t%60),t>=60&&(t=Math.round((t-r[0])/60),r.unshift(t))),n+r.map((function(e){return e<10?"0"+String(e):String(e)})).join(":").replace(/000000\d*$/,"")},Xs={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:function(e,t,n){return Ks(t,n.replace(/_/g,""))},stringify:Js},Zs={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:function(e,t,n){return Ks(t,n.replace(/_/g,""))},stringify:Js},Qs={identify:function(e){return e instanceof Date},default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:function(e,t,n,r,i,o,a,s,u){s&&(s=(s+"00").substr(1,3));var l=Date.UTC(t,n-1,r,i||0,o||0,a||0,s||0);if(u&&"Z"!==u){var c=Ks(u[0],u.slice(1));Math.abs(c)<30&&(c*=60),l-=6e4*c}return new Date(l)},stringify:function(e){return e.value.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")}};function eu(e){var t="undefined"!=typeof process&&process.env||{};return e?"undefined"!=typeof YAML_SILENCE_DEPRECATION_WARNINGS?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:"undefined"!=typeof YAML_SILENCE_WARNINGS?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function tu(e,t){if(eu(!1)){var n="undefined"!=typeof process&&process.emitWarning;n?n(e,t):console.warn(t?"".concat(t,": ").concat(e):e)}}var nu={};var ru={createNode:function(e,t,n){var r=new us(e);if(t instanceof Map){var i,o=Yo(t);try{for(o.s();!(i=o.n()).done;){var a=qo(i.value,2),s=a[0],u=a[1];r.items.push(e.createPair(s,u,n))}}catch(e){o.e(e)}finally{o.f()}}else if(t&&"object"===Co(t))for(var l=0,c=Object.keys(t);l=0?n+r.toString(t):Cs(e)}var lu={identify:function(e){return null==e},createNode:function(e,t,n){return n.wrapScalars?new Za(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:ps,stringify:function(){return ps.nullStr}},cu={identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:function(e){return"t"===e[0]||"T"===e[0]},options:fs,stringify:function(e){return e.value?fs.trueStr:fs.falseStr}},fu={identify:function(e){return au(e)&&e>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:function(e,t){return su(e,t,8)},options:hs,stringify:function(e){return uu(e,8,"0o")}},hu={identify:au,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:function(e){return su(e,e,10)},options:hs,stringify:Cs},pu={identify:function(e){return au(e)&&e>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:function(e,t){return su(e,t,16)},options:hs,stringify:function(e){return uu(e,16,"0x")}},du={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(e,t){return t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:Cs},gu={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:function(e){return parseFloat(e)},stringify:function(e){var t=e.value;return Number(t).toExponential()}},mu={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve:function(e,t,n){var r=t||n,i=new Za(parseFloat(e));return r&&"0"===r[r.length-1]&&(i.minFractionDigits=r.length),i},stringify:Cs},vu=ou.concat([lu,cu,fu,hu,pu,du,gu,mu]),yu=function(e){return"bigint"==typeof e||Number.isInteger(e)},bu=function(e){var t=e.value;return JSON.stringify(t)},Du=[ru,iu,{identify:function(e){return"string"==typeof e},default:!0,tag:"tag:yaml.org,2002:str",resolve:Ns,stringify:bu},{identify:function(e){return null==e},createNode:function(e,t,n){return n.wrapScalars?new Za(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:function(){return null},stringify:bu},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:function(e){return"true"===e},stringify:bu},{identify:yu,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:function(e){return hs.asBigInt?BigInt(e):parseInt(e,10)},stringify:function(e){var t=e.value;return yu(t)?t.toString():JSON.stringify(t)}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:function(e){return parseFloat(e)},stringify:bu}];Du.scalarFallback=function(e){throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(e)))};var wu=function(e){return e.value?fs.trueStr:fs.falseStr},Eu=function(e){return"bigint"==typeof e||Number.isInteger(e)};function ku(e,t,n){var r=t.replace(/_/g,"");if(hs.asBigInt){switch(n){case 2:r="0b".concat(r);break;case 8:r="0o".concat(r);break;case 16:r="0x".concat(r)}var i=BigInt(r);return"-"===e?BigInt(-1)*i:i}var o=parseInt(r,n);return"-"===e?-1*o:o}function Au(e,t,n){var r=e.value;if(Eu(r)){var i=r.toString(t);return r<0?"-"+n+i.substr(1):n+i}return Cs(e)}var xu=ou.concat([{identify:function(e){return null==e},createNode:function(e,t,n){return n.wrapScalars?new Za(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:ps,stringify:function(){return ps.nullStr}},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:function(){return!0},options:fs,stringify:wu},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:function(){return!1},options:fs,stringify:wu},{identify:Eu,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:function(e,t,n){return ku(t,n,2)},stringify:function(e){return Au(e,2,"0b")}},{identify:Eu,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:function(e,t,n){return ku(t,n,8)},stringify:function(e){return Au(e,8,"0")}},{identify:Eu,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:function(e,t,n){return ku(t,n,10)},stringify:Cs},{identify:Eu,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:function(e,t,n){return ku(t,n,16)},stringify:function(e){return Au(e,16,"0x")}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(e,t){return t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:Cs},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:function(e){return parseFloat(e.replace(/_/g,""))},stringify:function(e){var t=e.value;return Number(t).toExponential()}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve:function(e,t){var n=new Za(parseFloat(e.replace(/_/g,"")));if(t){var r=t.replace(/_/g,"");"0"===r[r.length-1]&&(n.minFractionDigits=r.length)}return n},stringify:Cs}],zs,Vs,Gs,Ys,Xs,Zs,Qs),_u={core:vu,failsafe:ou,json:Du,yaml11:xu},Cu={binary:zs,bool:cu,float:mu,floatExp:gu,floatNaN:du,floatTime:Zs,int:hu,intHex:pu,intOct:fu,intTime:Xs,map:ru,null:lu,omap:Vs,pairs:Gs,seq:iu,set:Ys,timestamp:Qs};function Su(e,t,n){if(e instanceof Ja)return e;var r=n.defaultPrefix,i=n.onTagObj,o=n.prevObjects,a=n.schema,s=n.wrapScalars;t&&t.startsWith("!!")&&(t=r+t.slice(2));var u=function(e,t,n){if(t){var r=n.filter((function(e){return e.tag===t})),i=r.find((function(e){return!e.format}))||r[0];if(!i)throw new Error("Tag ".concat(t," not found"));return i}return n.find((function(t){return(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format}))}(e,t,a.tags);if(!u){if("function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!==Co(e))return s?new Za(e):e;u=e instanceof Map?ru:e[Symbol.iterator]?iu:ru}i&&(i(u),delete n.onTagObj);var l={value:void 0,node:void 0};if(e&&"object"===Co(e)&&o){var c=o.get(e);if(c){var f=new as(c);return n.aliasNodes.push(f),f}l.value=e,o.set(e,l)}return l.node=u.createNode?u.createNode(n.schema,e,n):s?new Za(e):e,t&&l.node instanceof Ja&&(l.node.tag=t),l.node}var Fu=function(e,t){return e.keyt.key?1:0},Ou=function(){function e(t){var n=t.customTags,r=t.merge,i=t.schema,o=t.sortMapEntries,a=t.tags;So(this,e),this.merge=!!r,this.name=i,this.sortMapEntries=!0===o?Fu:o||null,!n&&a&&function(e,t){if(!nu[e]&&eu(!0)){nu[e]=!0;var n="The option '".concat(e,"' will be removed in a future release");tu(n+=t?", use '".concat(t,"' instead."):".","DeprecationWarning")}}("tags","customTags"),this.tags=function(e,t,n,r){var i=e[r.replace(/\W/g,"")];if(!i){var o=Object.keys(e).map((function(e){return JSON.stringify(e)})).join(", ");throw new Error('Unknown schema "'.concat(r,'"; use one of ').concat(o))}if(Array.isArray(n)){var a,s=Yo(n);try{for(s.s();!(a=s.n()).done;){var u=a.value;i=i.concat(u)}}catch(e){s.e(e)}finally{s.f()}}else"function"==typeof n&&(i=n(i.slice()));for(var l=0;l");var a=t.substr(i.prefix.length).replace(/[!,[\]{}]/g,(function(e){return{"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[e]}));return i.handle+a}function $u(e,t,n,r){var i,o=t.doc,a=o.anchors,s=o.schema;if(!(e instanceof Ja)){var u={aliasNodes:[],onTagObj:function(e){return i=e},prevObjects:new Map};e=s.createNode(e,!0,null,u);var l,c=Yo(u.aliasNodes);try{for(c.s();!(l=c.n()).done;){var f=l.value;f.source=f.source.node;var h=a.getName(f.source);h||(h=a.newName(),a.map[h]=f.source)}}catch(e){c.e(e)}finally{c.f()}}if(e instanceof is)return e.toString(t,n,r);i||(i=function(e,t){if(t instanceof as)return as;if(t.tag){var n=e.filter((function(e){return e.tag===t.tag}));if(n.length>0)return n.find((function(e){return e.format===t.format}))||n[0]}var r,i;if(t instanceof Za){i=t.value;var o=e.filter((function(e){return e.identify&&e.identify(i)||e.class&&i instanceof e.class}));r=o.find((function(e){return e.format===t.format}))||o.find((function(e){return!e.format}))}else i=t,r=e.find((function(e){return e.nodeClass&&i instanceof e.nodeClass}));if(!r){var a=i&&i.constructor?i.constructor.name:Co(i);throw new Error("Tag not resolved for ".concat(a," value"))}return r}(s.tags,e));var p=function(e,t,n){var r=n.anchors,i=n.doc,o=[],a=i.anchors.getName(e);return a&&(r[a]=e,o.push("&".concat(a))),e.tag?o.push(Lu(i,e.tag)):t.default||o.push(Lu(i,t.tag)),o.join(" ")}(e,i,t);p.length>0&&(t.indentAtStart=(t.indentAtStart||0)+p.length+1);var d="function"==typeof i.stringify?i.stringify(e,t,n,r):e instanceof Za?_s(e,t,n,r):e.toString(t,n,r);return p?e instanceof Za||"{"===d[0]||"["===d[0]?"".concat(p," ").concat(d):"".concat(p,"\n").concat(t.indent).concat(d):d}var Iu=function(){function e(t){So(this,e),To(this,"map",Object.create(null)),this.prefix=t}return Oo(e,[{key:"createAlias",value:function(e,t){return this.setAnchor(e,t),new as(e)}},{key:"createMergePair",value:function(){for(var e=this,t=new ls,n=arguments.length,r=new Array(n),i=0;i0&&!e.commentBefore&&(e.commentBefore=r.before.join("\n"),r.before=[]))}}catch(e){a.e(e)}finally{a.f()}if(e.contents=i||null,i){var l=r.before.join("\n");if(l){var c=i instanceof ts&&i.items[0]?i.items[0]:i;c.commentBefore=c.commentBefore?"".concat(l,"\n").concat(c.commentBefore):l}e.comment=r.after.join("\n")||null}else e.comment=r.before.concat(r.after).join("\n")||null}(this,o),this.anchors.resolveNodes(),this.options.prettyErrors){var l,c=Yo(this.errors);try{for(c.s();!(l=c.n()).done;){var f=l.value;f instanceof xa&&f.makePretty()}}catch(e){c.e(e)}finally{c.f()}var h,p=Yo(this.warnings);try{for(p.s();!(h=p.n()).done;){var d=h.value;d instanceof xa&&d.makePretty()}}catch(e){p.e(e)}finally{p.f()}}return this}},{key:"listNonDefaultTags",value:function(){return Mu(this.contents).filter((function(e){return 0!==e.indexOf(Ou.defaultPrefix)}))}},{key:"setTagPrefix",value:function(e,t){if("!"!==e[0]||"!"!==e[e.length-1])throw new Error("Handle must start and end with !");if(t){var n=this.tagPrefixes.find((function(t){return t.handle===e}));n?n.prefix=t:this.tagPrefixes.push({handle:e,prefix:t})}else this.tagPrefixes=this.tagPrefixes.filter((function(t){return t.handle!==e}))}},{key:"toJSON",value:function(e,t){var n=this,r=this.options,i=r.keepBlobsInJSON,o=r.mapAsMap,a=r.maxAliasCount,s=i&&("string"!=typeof e||!(this.contents instanceof Za)),u={doc:this,indentStep:" ",keep:s,mapAsMap:s&&!!o,maxAliasCount:a,stringify:$u},l=Object.keys(this.anchors.map);l.length>0&&(u.anchors=new Map(l.map((function(e){return[n.anchors.map[e],{alias:[],aliasCount:0,count:1}]}))));var c=Xa(this.contents,e,u);if("function"==typeof t&&u.anchors){var f,h=Yo(u.anchors.values());try{for(h.s();!(f=h.n()).done;){var p=f.value,d=p.count;t(p.res,d)}}catch(e){h.e(e)}finally{h.f()}}return c}},{key:"toString",value:function(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");var e=this.options.indent;if(!Number.isInteger(e)||e<=0){var t=JSON.stringify(e);throw new Error('"indent" option must be a positive integer, not '.concat(t))}this.setSchema();var n=[],r=!1;if(this.version){var i="%YAML 1.2";"yaml-1.1"===this.schema.name&&("1.0"===this.version?i="%YAML:1.0":"1.1"===this.version&&(i="%YAML 1.1")),n.push(i),r=!0}var o=this.listNonDefaultTags();this.tagPrefixes.forEach((function(e){var t=e.handle,i=e.prefix;o.some((function(e){return 0===e.indexOf(i)}))&&(n.push("%TAG ".concat(t," ").concat(i)),r=!0)})),(r||this.directivesEndMarker)&&n.push("---"),this.commentBefore&&(!r&&this.directivesEndMarker||n.unshift(""),n.unshift(this.commentBefore.replace(/^/gm,"#")));var a={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:$u},s=!1,u=null;if(this.contents){this.contents instanceof Ja&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&n.push(""),this.contents.commentBefore&&n.push(this.contents.commentBefore.replace(/^/gm,"#")),a.forceBlockIndent=!!this.comment,u=this.contents.comment);var l=u?null:function(){return s=!0},c=$u(this.contents,a,(function(){return u=null}),l);n.push(Ka(c,"",u))}else void 0!==this.contents&&n.push($u(this.contents,a));return this.comment&&(s&&!u||""===n[n.length-1]||n.push(""),n.push(this.comment.replace(/^/gm,"#"))),n.join("\n")+"\n"}}]),e}();To(qu,"defaults",Ru);var Uu=function(e){No(n,e);var t=jo(n);function n(e){return So(this,n),t.call(this,Object.assign({},Tu,e))}return n}(qu);function Gu(e,t){var n=Ya(e),r=new Uu(t).parse(n[0]);if(n.length>1){r.errors.unshift(new Ca(n[1],"Source contains multiple documents; please use YAML.parseAllDocuments()"))}return r}var Hu={createNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;void 0===n&&"string"==typeof t&&(n=t,t=!0);var r=Object.assign({},qu.defaults[Tu.version],Tu),i=new Ou(r);return i.createNode(e,t,n)},defaultOptions:Tu,Document:Uu,parse:function(e,t){var n=Gu(e,t);if(n.warnings.forEach((function(e){return tu(e)})),n.errors.length>0)throw n.errors[0];return n.toJSON()},parseAllDocuments:function(e,t){var n,r,i=[],o=Yo(Ya(e));try{for(o.s();!(r=o.n()).done;){var a=r.value,s=new Uu(t);s.parse(a,n),i.push(s),n=s}}catch(e){o.e(e)}finally{o.f()}return i},parseCST:Ya,parseDocument:Gu,scalarOptions:Nu,stringify:function(e,t){var n=new Uu(t);return n.contents=e,String(n)}},Vu=ei(Object.freeze({__proto__:null,YAML:Hu})).YAML;gi.setOptions({highlight:function(e,t){const n=yo.getLanguage(t)?t:"plaintext";return yo.highlight(e,{language:n}).value}});const Wu={hr(e){const t=RegExp(/^ {0,3}(-{3,}(?=[^-\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~-]* *(?:\n+|$)|$)/).exec(e);if(t)return{type:"options",raw:t[0],data:Vu.parse(t[3],{})}}},Yu={paragraph:e=>e,blockquote:e=>e,heading:e=>e};function Ku(e){return ni.sanitize(gi.parser(e))}function Ju(e,t){let n=gi.lexer(ri(e).replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"));let r,i=[],o="",a="",s="",u=!0,l=new pi(t);return n.forEach((function(e,t){if("heading"==e.type&&(a="",s="",o=Ku([e]),r=new pi(l),u=!1),"options"==e.type&&(u?l=di(l,e.data):r=di(l,e.data)),"paragraph"!=e.type&&"code"!=e.type||(a+=Ku([e])),"blockquote"==e.type&&(s+=Ku([e])),"list"==e.type){let t=[];e.items.forEach((function(e,n){let r=function(e){let t="",n="";return e.tokens.forEach((function(e,r){"blockquote"==e.type?n+=Ku([e]):t+=Ku([e])})),{text:t,comment:n}}(e);t.push(new li(n,r.text,e.checked,r.comment))})),e.ordered?e.items[0].task?i.push(new ui(o,a,s,t,r)):i.push(new ai(o,a,s,t,r)):i.push(new si(o,a,s,t,r))}})),new fi(i,l)}function Xu(e,t,n){let r;t.innerHTML="",t.shadowRoot?(r=t.shadowRoot,r.innerHTML=""):r=t.attachShadow({mode:"open"});try{let t=Ju(e,n);new Qr({target:r,intro:!1,props:{quiz:t}})}catch(e){r.innerHTML=`${e}. App could not render. Please check your quizdown syntax.`}}gi.use({renderer:Yu,tokenizer:Wu}),e.create_app=Xu,e.init=function(e={}){let t=new pi(e);t.start_on_load&&"undefined"!=typeof document&&window.addEventListener("load",(function(){let e=document.querySelectorAll(".quizdown");for(let n of e)Xu(n.innerHTML,n,t)}),!1)},Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=quizdown.js.map diff --git a/public/build/quizdown.js.map b/public/build/quizdown.js.map index 3111fbc..9a704d4 100644 --- a/public/build/quizdown.js.map +++ b/public/build/quizdown.js.map @@ -1 +1 @@ -{"version":3,"file":"quizdown.js","sources":["../../node_modules/svelte/internal/index.mjs","../../node_modules/svelte/easing/index.mjs","../../node_modules/svelte/animate/index.mjs","../../src/components/DragDropList.svelte","../../src/components/SequenceView.svelte","../../src/components/ChoiceView.svelte","../../node_modules/svelte/store/index.mjs","../../node_modules/deepmerge/dist/cjs.js","../../node_modules/tslib/tslib.es6.js","../../node_modules/@formatjs/icu-messageformat-parser/lib/types.js","../../node_modules/@formatjs/icu-messageformat-parser/lib/error.js","../../node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js","../../node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js","../../node_modules/@formatjs/icu-skeleton-parser/lib/number.js","../../node_modules/@formatjs/icu-messageformat-parser/lib/parser.js","../../node_modules/@formatjs/icu-messageformat-parser/lib/index.js","../../node_modules/@formatjs/fast-memoize/lib/index.js","../../node_modules/intl-messageformat/lib/src/error.js","../../node_modules/intl-messageformat/lib/src/formatters.js","../../node_modules/intl-messageformat/lib/src/core.js","../../node_modules/svelte-i18n/dist/runtime.esm.js","../../src/components/ResultView.svelte","../../src/components/QuizSection.svelte","../../src/components/Button.svelte","../../src/components/Footer.svelte","../../node_modules/svelte/motion/index.mjs","../../src/components/ProgressBar.svelte","../../src/languages/i18n.ts","../../src/App.svelte","../../node_modules/marked/lib/marked.js","../../node_modules/dompurify/dist/purify.js","../../node_modules/strip-indent/index.js","../../node_modules/highlight.js/lib/core.js","../../node_modules/highlight.js/lib/languages/python.js","../../node_modules/highlight.js/lib/languages/plaintext.js","../../node_modules/yaml/browser/dist/PlainValue-b8036b75.js","../../node_modules/yaml/browser/dist/parse-cst.js","../../node_modules/yaml/browser/dist/resolveSeq-492ab440.js","../../node_modules/yaml/browser/dist/warnings-df54cb69.js","../../node_modules/yaml/browser/dist/Schema-e94716c8.js","../../node_modules/yaml/browser/dist/index.js","../../node_modules/auto-bind/index.js","../../src/quiz.ts","../../src/config.ts","../../src/parser.ts","../../src/quizdown.ts"],"sourcesContent":["function noop() {}\n\nconst identity = x => x;\n\nfunction assign(tar, src) {\n\t// @ts-ignore\n\tfor (const k in src) tar[k] = src[k];\n\treturn tar ;\n}\n\nfunction is_promise(value) {\n\treturn value && typeof value === 'object' && typeof value.then === 'function';\n}\n\nfunction add_location(element, file, line, column, char) {\n\telement.__svelte_meta = {\n\t\tloc: { file, line, column, char }\n\t};\n}\n\nfunction run(fn) {\n\treturn fn();\n}\n\nfunction blank_object() {\n\treturn Object.create(null);\n}\n\nfunction run_all(fns) {\n\tfns.forEach(run);\n}\n\nfunction is_function(thing) {\n\treturn typeof thing === 'function';\n}\n\nfunction safe_not_equal(a, b) {\n\treturn a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\n\nfunction not_equal(a, b) {\n\treturn a != a ? b == b : a !== b;\n}\n\nfunction is_empty(obj) {\n\treturn Object.keys(obj).length === 0;\n}\n\nfunction validate_store(store, name) {\n\tif (store != null && typeof store.subscribe !== 'function') {\n\t\tthrow new Error(`'${name}' is not a store with a 'subscribe' method`);\n\t}\n}\n\nfunction subscribe(store, ...callbacks) {\n\tif (store == null) {\n\t\treturn noop;\n\t}\n\tconst unsub = store.subscribe(...callbacks);\n\treturn unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\n\nfunction get_store_value(store) {\n\tlet value;\n\tsubscribe(store, _ => value = _)();\n\treturn value;\n}\n\nfunction component_subscribe(component, store, callback) {\n\tcomponent.$$.on_destroy.push(subscribe(store, callback));\n}\n\nfunction create_slot(definition, ctx, $$scope, fn) {\n\tif (definition) {\n\t\tconst slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n\t\treturn definition[0](slot_ctx);\n\t}\n}\n\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n\tconst context = definition[1] && fn\n\t\t? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n\t\t: $$scope.ctx;\n\treturn context;\n}\n\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n\tif (definition[2] && fn) {\n\t\tconst lets = definition[2](fn(dirty));\n\n\t\tif ($$scope.dirty === undefined) {\n\t\t\treturn lets;\n\t\t}\n\n\t\tif (typeof lets === 'object') {\n\t\t\tconst merged = [];\n\t\t\tconst len = Math.max($$scope.dirty.length, lets.length);\n\t\t\tfor (let i = 0; i < len; i += 1) {\n\t\t\t\tmerged[i] = $$scope.dirty[i] | lets[i];\n\t\t\t}\n\n\t\t\treturn merged;\n\t\t}\n\n\t\treturn $$scope.dirty | lets;\n\t}\n\n\treturn $$scope.dirty;\n}\n\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n\tconst slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n\tif (slot_changes) {\n\t\tconst slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n\t\tslot.p(slot_context, slot_changes);\n\t}\n}\n\nfunction update_slot_spread(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_spread_changes_fn, get_slot_context_fn) {\n\tconst slot_changes = get_slot_spread_changes_fn(dirty) | get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n\tif (slot_changes) {\n\t\tconst slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n\t\tslot.p(slot_context, slot_changes);\n\t}\n}\n\nfunction exclude_internal_props(props) {\n\tconst result = {};\n\tfor (const k in props) if (k[0] !== '$') result[k] = props[k];\n\treturn result;\n}\n\nfunction compute_rest_props(props, keys) {\n\tconst rest = {};\n\tkeys = new Set(keys);\n\tfor (const k in props) if (!keys.has(k) && k[0] !== '$') rest[k] = props[k];\n\treturn rest;\n}\n\nfunction compute_slots(slots) {\n\tconst result = {};\n\tfor (const key in slots) {\n\t\tresult[key] = true;\n\t}\n\treturn result;\n}\n\nfunction once(fn) {\n\tlet ran = false;\n\treturn function( ...args) {\n\t\tif (ran) return;\n\t\tran = true;\n\t\tfn.call(this, ...args);\n\t};\n}\n\nfunction null_to_empty(value) {\n\treturn value == null ? '' : value;\n}\n\nfunction set_store_value(store, ret, value = ret) {\n\tstore.set(value);\n\treturn ret;\n}\n\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\n\nfunction action_destroyer(action_result) {\n\treturn action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\n\nlet now = is_client\n\t? () => window.performance.now()\n\t: () => Date.now();\n\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n\n// used internally for testing\nfunction set_now(fn) {\n\tnow = fn;\n}\n\nfunction set_raf(fn) {\n\traf = fn;\n}\n\nconst tasks = new Set();\n\nfunction run_tasks(now) {\n\ttasks.forEach(task => {\n\t\tif (!task.c(now)) {\n\t\t\ttasks.delete(task);\n\t\t\ttask.f();\n\t\t}\n\t});\n\n\tif (tasks.size !== 0) raf(run_tasks);\n}\n\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n\ttasks.clear();\n}\n\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n\tlet task;\n\n\tif (tasks.size === 0) raf(run_tasks);\n\n\treturn {\n\t\tpromise: new Promise(fulfill => {\n\t\t\ttasks.add(task = { c: callback, f: fulfill });\n\t\t}),\n\t\tabort() {\n\t\t\ttasks.delete(task);\n\t\t}\n\t};\n}\n\nfunction _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }\nfunction element(name) {\n\treturn document.createElement(name);\n}\n\nfunction element_is(name, is) {\n\treturn document.createElement(name, { is });\n}\n\nfunction append(target, node) {\n\ttarget.appendChild(node);\n}\n\nfunction append_styles(\n\ttarget,\n\tstyleSheetId,\n\tstyles,\n\tstyleId = `svelte-${styleSheetId}-style`\n) {\n\tconst appendStylesTo = get_root_for_styles(target);\n\n\tif (!_optionalChain([appendStylesTo, 'optionalAccess', _ => _.querySelector, 'call', _2 => _2('#' + styleId)])) {\n\t\tconst style = element('style');\n\t\tstyle.id = styleId;\n\t\tstyle.textContent = styles;\n\t\tappend(appendStylesTo, style);\n\t}\n}\n\nfunction get_root_for_node(node) {\n\tif (!node) return document;\n\n\treturn (node.getRootNode ? node.getRootNode() : node.ownerDocument); // check for getRootNode because IE is still supported\n}\n\nfunction get_root_for_styles(node) {\n\tconst root = get_root_for_node(node);\n\treturn ((root ).host ? root : (root ).head) ;\n}\n\nfunction append_empty_stylesheet(node) {\n\treturn get_root_for_styles(node).appendChild(element('style') );\n}\n\nfunction insert(target, node, anchor) {\n\ttarget.insertBefore(node, anchor || null);\n}\n\nfunction detach(node) {\n\tnode.parentNode.removeChild(node);\n}\n\nfunction destroy_each(iterations, detaching) {\n\tfor (let i = 0; i < iterations.length; i += 1) {\n\t\tif (iterations[i]) iterations[i].d(detaching);\n\t}\n}\n\nfunction object_without_properties(obj, exclude) {\n\tconst target = {} ;\n\tfor (const k in obj) {\n\t\tif (\n\t\t\thas_prop(obj, k)\n\t\t\t// @ts-ignore\n\t\t\t&& exclude.indexOf(k) === -1\n\t\t) {\n\t\t\t// @ts-ignore\n\t\t\ttarget[k] = obj[k];\n\t\t}\n\t}\n\treturn target;\n}\n\nfunction svg_element(name) {\n\treturn document.createElementNS('http://www.w3.org/2000/svg', name);\n}\n\nfunction text(data) {\n\treturn document.createTextNode(data);\n}\n\nfunction space() {\n\treturn text(' ');\n}\n\nfunction empty() {\n\treturn text('');\n}\n\nfunction listen(node, event, handler, options) {\n\tnode.addEventListener(event, handler, options);\n\treturn () => node.removeEventListener(event, handler, options);\n}\n\nfunction prevent_default(fn) {\n\treturn function(event) {\n\t\tevent.preventDefault();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\nfunction stop_propagation(fn) {\n\treturn function(event) {\n\t\tevent.stopPropagation();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\nfunction self(fn) {\n\treturn function(event) {\n\t\t// @ts-ignore\n\t\tif (event.target === this) fn.call(this, event);\n\t};\n}\n\nfunction attr(node, attribute, value) {\n\tif (value == null) node.removeAttribute(attribute);\n\telse if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value);\n}\n\nfunction set_attributes(node, attributes) {\n\t// @ts-ignore\n\tconst descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n\tfor (const key in attributes) {\n\t\tif (attributes[key] == null) {\n\t\t\tnode.removeAttribute(key);\n\t\t} else if (key === 'style') {\n\t\t\tnode.style.cssText = attributes[key];\n\t\t} else if (key === '__value') {\n\t\t\t(node ).value = node[key] = attributes[key];\n\t\t} else if (descriptors[key] && descriptors[key].set) {\n\t\t\tnode[key] = attributes[key];\n\t\t} else {\n\t\t\tattr(node, key, attributes[key]);\n\t\t}\n\t}\n}\n\nfunction set_svg_attributes(node, attributes) {\n\tfor (const key in attributes) {\n\t\tattr(node, key, attributes[key]);\n\t}\n}\n\nfunction set_custom_element_data(node, prop, value) {\n\tif (prop in node) {\n\t\tnode[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n\t} else {\n\t\tattr(node, prop, value);\n\t}\n}\n\nfunction xlink_attr(node, attribute, value) {\n\tnode.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\n\nfunction get_binding_group_value(group, __value, checked) {\n\tconst value = new Set();\n\tfor (let i = 0; i < group.length; i += 1) {\n\t\tif (group[i].checked) value.add(group[i].__value);\n\t}\n\tif (!checked) {\n\t\tvalue.delete(__value);\n\t}\n\treturn Array.from(value);\n}\n\nfunction to_number(value) {\n\treturn value === '' ? null : +value;\n}\n\nfunction time_ranges_to_array(ranges) {\n\tconst array = [];\n\tfor (let i = 0; i < ranges.length; i += 1) {\n\t\tarray.push({ start: ranges.start(i), end: ranges.end(i) });\n\t}\n\treturn array;\n}\n\nfunction children(element) {\n\treturn Array.from(element.childNodes);\n}\n\nfunction claim_element(nodes, name, attributes, svg) {\n\tfor (let i = 0; i < nodes.length; i += 1) {\n\t\tconst node = nodes[i];\n\t\tif (node.nodeName === name) {\n\t\t\tlet j = 0;\n\t\t\tconst remove = [];\n\t\t\twhile (j < node.attributes.length) {\n\t\t\t\tconst attribute = node.attributes[j++];\n\t\t\t\tif (!attributes[attribute.name]) {\n\t\t\t\t\tremove.push(attribute.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (let k = 0; k < remove.length; k++) {\n\t\t\t\tnode.removeAttribute(remove[k]);\n\t\t\t}\n\t\t\treturn nodes.splice(i, 1)[0];\n\t\t}\n\t}\n\n\treturn svg ? svg_element(name) : element(name);\n}\n\nfunction claim_text(nodes, data) {\n\tfor (let i = 0; i < nodes.length; i += 1) {\n\t\tconst node = nodes[i];\n\t\tif (node.nodeType === 3) {\n\t\t\tnode.data = '' + data;\n\t\t\treturn nodes.splice(i, 1)[0];\n\t\t}\n\t}\n\n\treturn text(data);\n}\n\nfunction claim_space(nodes) {\n\treturn claim_text(nodes, ' ');\n}\n\nfunction set_data(text, data) {\n\tdata = '' + data;\n\tif (text.wholeText !== data) text.data = data;\n}\n\nfunction set_input_value(input, value) {\n\tinput.value = value == null ? '' : value;\n}\n\nfunction set_input_type(input, type) {\n\ttry {\n\t\tinput.type = type;\n\t} catch (e) {\n\t\t// do nothing\n\t}\n}\n\nfunction set_style(node, key, value, important) {\n\tnode.style.setProperty(key, value, important ? 'important' : '');\n}\n\nfunction select_option(select, value) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\n\t\tif (option.__value === value) {\n\t\t\toption.selected = true;\n\t\t\treturn;\n\t\t}\n\t}\n}\n\nfunction select_options(select, value) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\t\toption.selected = ~value.indexOf(option.__value);\n\t}\n}\n\nfunction select_value(select) {\n\tconst selected_option = select.querySelector(':checked') || select.options[0];\n\treturn selected_option && selected_option.__value;\n}\n\nfunction select_multiple_value(select) {\n\treturn [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\n\nfunction is_crossorigin() {\n\tif (crossorigin === undefined) {\n\t\tcrossorigin = false;\n\n\t\ttry {\n\t\t\tif (typeof window !== 'undefined' && window.parent) {\n\t\t\t\tvoid window.parent.document;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tcrossorigin = true;\n\t\t}\n\t}\n\n\treturn crossorigin;\n}\n\nfunction add_resize_listener(node, fn) {\n\tconst computed_style = getComputedStyle(node);\n\n\tif (computed_style.position === 'static') {\n\t\tnode.style.position = 'relative';\n\t}\n\n\tconst iframe = element('iframe');\n\tiframe.setAttribute('style',\n\t\t'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n\t\t'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;'\n\t);\n\tiframe.setAttribute('aria-hidden', 'true');\n\tiframe.tabIndex = -1;\n\n\tconst crossorigin = is_crossorigin();\n\n\tlet unsubscribe;\n\n\tif (crossorigin) {\n\t\tiframe.src = \"data:text/html,\";\n\t\tunsubscribe = listen(window, 'message', (event) => {\n\t\t\tif (event.source === iframe.contentWindow) fn();\n\t\t});\n\t} else {\n\t\tiframe.src = 'about:blank';\n\t\tiframe.onload = () => {\n\t\t\tunsubscribe = listen(iframe.contentWindow, 'resize', fn);\n\t\t};\n\t}\n\n\tappend(node, iframe);\n\n\treturn () => {\n\t\tif (crossorigin) {\n\t\t\tunsubscribe();\n\t\t} else if (unsubscribe && iframe.contentWindow) {\n\t\t\tunsubscribe();\n\t\t}\n\n\t\tdetach(iframe);\n\t};\n}\n\nfunction toggle_class(element, name, toggle) {\n\telement.classList[toggle ? 'add' : 'remove'](name);\n}\n\nfunction custom_event(type, detail) {\n\tconst e = document.createEvent('CustomEvent');\n\te.initCustomEvent(type, false, false, detail);\n\treturn e;\n}\n\nfunction query_selector_all(selector, parent = document.body) {\n\treturn Array.from(parent.querySelectorAll(selector));\n}\n\nclass HtmlTag {\n\t\n\t\n\t\n\t\n\n\tconstructor(anchor = null) {\n\t\tthis.a = anchor;\n\t\tthis.e = this.n = null;\n\t}\n\n\tm(html, target, anchor = null) {\n\t\tif (!this.e) {\n\t\t\tthis.e = element(target.nodeName );\n\t\t\tthis.t = target;\n\t\t\tthis.h(html);\n\t\t}\n\n\t\tthis.i(anchor);\n\t}\n\n\th(html) {\n\t\tthis.e.innerHTML = html;\n\t\tthis.n = Array.from(this.e.childNodes);\n\t}\n\n\ti(anchor) {\n\t\tfor (let i = 0; i < this.n.length; i += 1) {\n\t\t\tinsert(this.t, this.n[i], anchor);\n\t\t}\n\t}\n\n\tp(html) {\n\t\tthis.d();\n\t\tthis.h(html);\n\t\tthis.i(this.a);\n\t}\n\n\td() {\n\t\tthis.n.forEach(detach);\n\t}\n}\n\nfunction attribute_to_object(attributes) {\n\tconst result = {};\n\tfor (const attribute of attributes) {\n\t\tresult[attribute.name] = attribute.value;\n\t}\n\treturn result;\n}\n\nfunction get_custom_elements_slots(element) {\n\tconst result = {};\n\telement.childNodes.forEach((node) => {\n\t\tresult[node.slot || 'default'] = true;\n\t});\n\treturn result;\n}\n\nconst active_docs = new Set();\nlet active = 0;\n\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n\tlet hash = 5381;\n\tlet i = str.length;\n\n\twhile (i--) hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n\treturn hash >>> 0;\n}\n\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n\tconst step = 16.666 / duration;\n\tlet keyframes = '{\\n';\n\n\tfor (let p = 0; p <= 1; p += step) {\n\t\tconst t = a + (b - a) * ease(p);\n\t\tkeyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n\t}\n\n\tconst rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n\tconst name = `__svelte_${hash(rule)}_${uid}`;\n\tconst doc = get_root_for_node(node) ;\n\tactive_docs.add(doc);\n\tconst stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = append_empty_stylesheet(node).sheet );\n\tconst current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n\n\tif (!current_rules[name]) {\n\t\tcurrent_rules[name] = true;\n\t\tstylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n\t}\n\n\tconst animation = node.style.animation || '';\n\tnode.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n\n\tactive += 1;\n\treturn name;\n}\n\nfunction delete_rule(node, name) {\n\tconst previous = (node.style.animation || '').split(', ');\n\tconst next = previous.filter(name\n\t\t? anim => anim.indexOf(name) < 0 // remove specific animation\n\t\t: anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n\t);\n\tconst deleted = previous.length - next.length;\n\tif (deleted) {\n\t\tnode.style.animation = next.join(', ');\n\t\tactive -= deleted;\n\t\tif (!active) clear_rules();\n\t}\n}\n\nfunction clear_rules() {\n\traf(() => {\n\t\tif (active) return;\n\t\tactive_docs.forEach(doc => {\n\t\t\tconst stylesheet = doc.__svelte_stylesheet;\n\t\t\tlet i = stylesheet.cssRules.length;\n\t\t\twhile (i--) stylesheet.deleteRule(i);\n\t\t\tdoc.__svelte_rules = {};\n\t\t});\n\t\tactive_docs.clear();\n\t});\n}\n\n//todo: documentation says it is DOMRect, but in IE it would be ClientRect\n\n\n\n\nfunction create_animation(node, from, fn, params) {\n\tif (!from) return noop;\n\n\tconst to = node.getBoundingClientRect();\n\tif (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom) return noop;\n\n\n\tconst {\n\t\tdelay = 0,\n\t\tduration = 300,\n\t\teasing = identity,\n\t\t// @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n\t\tstart: start_time = now() + delay,\n\t\t// @ts-ignore todo:\n\t\tend = start_time + duration,\n\t\ttick = noop,\n\t\tcss\n\t} = fn(node, { from, to }, params);\n\n\tlet running = true;\n\tlet started = false;\n\tlet name;\n\n\tfunction start() {\n\t\tif (css) {\n\t\t\tname = create_rule(node, 0, 1, duration, delay, easing, css);\n\t\t}\n\n\t\tif (!delay) {\n\t\t\tstarted = true;\n\t\t}\n\t}\n\n\tfunction stop() {\n\t\tif (css) delete_rule(node, name);\n\t\trunning = false;\n\t}\n\n\tloop(now => {\n\t\tif (!started && now >= start_time) {\n\t\t\tstarted = true;\n\t\t}\n\n\t\tif (started && now >= end) {\n\t\t\ttick(1, 0);\n\t\t\tstop();\n\t\t}\n\n\t\tif (!running) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (started) {\n\t\t\tconst p = now - start_time;\n\t\t\tconst t = 0 + 1 * easing(p / duration);\n\t\t\ttick(t, 1 - t);\n\t\t}\n\n\t\treturn true;\n\t});\n\n\tstart();\n\n\ttick(0, 1);\n\n\treturn stop;\n}\n\nfunction fix_position(node) {\n\tconst style = getComputedStyle(node);\n\n\tif (style.position !== 'absolute' && style.position !== 'fixed') {\n\t\tconst { width, height } = style;\n\t\tconst a = node.getBoundingClientRect();\n\t\tnode.style.position = 'absolute';\n\t\tnode.style.width = width;\n\t\tnode.style.height = height;\n\t\tadd_transform(node, a);\n\t}\n}\n\nfunction add_transform(node, a) {\n\tconst b = node.getBoundingClientRect();\n\n\tif (a.left !== b.left || a.top !== b.top) {\n\t\tconst style = getComputedStyle(node);\n\t\tconst transform = style.transform === 'none' ? '' : style.transform;\n\n\t\tnode.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n\t}\n}\n\nlet current_component;\n\nfunction set_current_component(component) {\n\tcurrent_component = component;\n}\n\nfunction get_current_component() {\n\tif (!current_component) throw new Error('Function called outside component initialization');\n\treturn current_component;\n}\n\nfunction beforeUpdate(fn) {\n\tget_current_component().$$.before_update.push(fn);\n}\n\nfunction onMount(fn) {\n\tget_current_component().$$.on_mount.push(fn);\n}\n\nfunction afterUpdate(fn) {\n\tget_current_component().$$.after_update.push(fn);\n}\n\nfunction onDestroy(fn) {\n\tget_current_component().$$.on_destroy.push(fn);\n}\n\nfunction createEventDispatcher\n\n() {\n\tconst component = get_current_component();\n\n\treturn (type, detail) => {\n\t\tconst callbacks = component.$$.callbacks[type];\n\n\t\tif (callbacks) {\n\t\t\t// TODO are there situations where events could be dispatched\n\t\t\t// in a server (non-DOM) environment?\n\t\t\tconst event = custom_event(type, detail);\n\t\t\tcallbacks.slice().forEach(fn => {\n\t\t\t\tfn.call(component, event);\n\t\t\t});\n\t\t}\n\t};\n}\n\nfunction setContext(key, context) {\n\tget_current_component().$$.context.set(key, context);\n}\n\nfunction getContext(key) {\n\treturn get_current_component().$$.context.get(key);\n}\n\nfunction hasContext(key) {\n\treturn get_current_component().$$.context.has(key);\t\n}\n\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n\tconst callbacks = component.$$.callbacks[event.type];\n\n\tif (callbacks) {\n\t\tcallbacks.slice().forEach(fn => fn(event));\n\t}\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\n\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\n\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\n\nfunction schedule_update() {\n\tif (!update_scheduled) {\n\t\tupdate_scheduled = true;\n\t\tresolved_promise.then(flush);\n\t}\n}\n\nfunction tick() {\n\tschedule_update();\n\treturn resolved_promise;\n}\n\nfunction add_render_callback(fn) {\n\trender_callbacks.push(fn);\n}\n\nfunction add_flush_callback(fn) {\n\tflush_callbacks.push(fn);\n}\n\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n\tif (flushing) return;\n\tflushing = true;\n\n\tdo {\n\t\t// first, call beforeUpdate functions\n\t\t// and update components\n\t\tfor (let i = 0; i < dirty_components.length; i += 1) {\n\t\t\tconst component = dirty_components[i];\n\t\t\tset_current_component(component);\n\t\t\tupdate(component.$$);\n\t\t}\n\t\tset_current_component(null);\n\n\t\tdirty_components.length = 0;\n\n\t\twhile (binding_callbacks.length) binding_callbacks.pop()();\n\n\t\t// then, once components are updated, call\n\t\t// afterUpdate functions. This may cause\n\t\t// subsequent updates...\n\t\tfor (let i = 0; i < render_callbacks.length; i += 1) {\n\t\t\tconst callback = render_callbacks[i];\n\n\t\t\tif (!seen_callbacks.has(callback)) {\n\t\t\t\t// ...so guard against infinite loops\n\t\t\t\tseen_callbacks.add(callback);\n\n\t\t\t\tcallback();\n\t\t\t}\n\t\t}\n\n\t\trender_callbacks.length = 0;\n\t} while (dirty_components.length);\n\n\twhile (flush_callbacks.length) {\n\t\tflush_callbacks.pop()();\n\t}\n\n\tupdate_scheduled = false;\n\tflushing = false;\n\tseen_callbacks.clear();\n}\n\nfunction update($$) {\n\tif ($$.fragment !== null) {\n\t\t$$.update();\n\t\trun_all($$.before_update);\n\t\tconst dirty = $$.dirty;\n\t\t$$.dirty = [-1];\n\t\t$$.fragment && $$.fragment.p($$.ctx, dirty);\n\n\t\t$$.after_update.forEach(add_render_callback);\n\t}\n}\n\nlet promise;\n\nfunction wait() {\n\tif (!promise) {\n\t\tpromise = Promise.resolve();\n\t\tpromise.then(() => {\n\t\t\tpromise = null;\n\t\t});\n\t}\n\n\treturn promise;\n}\n\nfunction dispatch(node, direction, kind) {\n\tnode.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\n\nconst outroing = new Set();\nlet outros;\n\nfunction group_outros() {\n\toutros = {\n\t\tr: 0, // remaining outros\n\t\tc: [], // callbacks\n\t\tp: outros // parent group\n\t};\n}\n\nfunction check_outros() {\n\tif (!outros.r) {\n\t\trun_all(outros.c);\n\t}\n\toutros = outros.p;\n}\n\nfunction transition_in(block, local) {\n\tif (block && block.i) {\n\t\toutroing.delete(block);\n\t\tblock.i(local);\n\t}\n}\n\nfunction transition_out(block, local, detach, callback) {\n\tif (block && block.o) {\n\t\tif (outroing.has(block)) return;\n\t\toutroing.add(block);\n\n\t\toutros.c.push(() => {\n\t\t\toutroing.delete(block);\n\t\t\tif (callback) {\n\t\t\t\tif (detach) block.d(1);\n\t\t\t\tcallback();\n\t\t\t}\n\t\t});\n\n\t\tblock.o(local);\n\t}\n}\n\nconst null_transition = { duration: 0 };\n\n\n\nfunction create_in_transition(node, fn, params) {\n\tlet config = fn(node, params);\n\tlet running = false;\n\tlet animation_name;\n\tlet task;\n\tlet uid = 0;\n\n\tfunction cleanup() {\n\t\tif (animation_name) delete_rule(node, animation_name);\n\t}\n\n\tfunction go() {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = identity,\n\t\t\ttick = noop,\n\t\t\tcss\n\t\t} = config || null_transition;\n\n\t\tif (css) animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n\t\ttick(0, 1);\n\n\t\tconst start_time = now() + delay;\n\t\tconst end_time = start_time + duration;\n\n\t\tif (task) task.abort();\n\t\trunning = true;\n\n\t\tadd_render_callback(() => dispatch(node, true, 'start'));\n\n\t\ttask = loop(now => {\n\t\t\tif (running) {\n\t\t\t\tif (now >= end_time) {\n\t\t\t\t\ttick(1, 0);\n\n\t\t\t\t\tdispatch(node, true, 'end');\n\n\t\t\t\t\tcleanup();\n\t\t\t\t\treturn running = false;\n\t\t\t\t}\n\n\t\t\t\tif (now >= start_time) {\n\t\t\t\t\tconst t = easing((now - start_time) / duration);\n\t\t\t\t\ttick(t, 1 - t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn running;\n\t\t});\n\t}\n\n\tlet started = false;\n\n\treturn {\n\t\tstart() {\n\t\t\tif (started) return;\n\n\t\t\tdelete_rule(node);\n\n\t\t\tif (is_function(config)) {\n\t\t\t\tconfig = config();\n\t\t\t\twait().then(go);\n\t\t\t} else {\n\t\t\t\tgo();\n\t\t\t}\n\t\t},\n\n\t\tinvalidate() {\n\t\t\tstarted = false;\n\t\t},\n\n\t\tend() {\n\t\t\tif (running) {\n\t\t\t\tcleanup();\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t};\n}\n\nfunction create_out_transition(node, fn, params) {\n\tlet config = fn(node, params);\n\tlet running = true;\n\tlet animation_name;\n\n\tconst group = outros;\n\n\tgroup.r += 1;\n\n\tfunction go() {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = identity,\n\t\t\ttick = noop,\n\t\t\tcss\n\t\t} = config || null_transition;\n\n\t\tif (css) animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n\n\t\tconst start_time = now() + delay;\n\t\tconst end_time = start_time + duration;\n\n\t\tadd_render_callback(() => dispatch(node, false, 'start'));\n\n\t\tloop(now => {\n\t\t\tif (running) {\n\t\t\t\tif (now >= end_time) {\n\t\t\t\t\ttick(0, 1);\n\n\t\t\t\t\tdispatch(node, false, 'end');\n\n\t\t\t\t\tif (!--group.r) {\n\t\t\t\t\t\t// this will result in `end()` being called,\n\t\t\t\t\t\t// so we don't need to clean up here\n\t\t\t\t\t\trun_all(group.c);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (now >= start_time) {\n\t\t\t\t\tconst t = easing((now - start_time) / duration);\n\t\t\t\t\ttick(1 - t, t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn running;\n\t\t});\n\t}\n\n\tif (is_function(config)) {\n\t\twait().then(() => {\n\t\t\t// @ts-ignore\n\t\t\tconfig = config();\n\t\t\tgo();\n\t\t});\n\t} else {\n\t\tgo();\n\t}\n\n\treturn {\n\t\tend(reset) {\n\t\t\tif (reset && config.tick) {\n\t\t\t\tconfig.tick(1, 0);\n\t\t\t}\n\n\t\t\tif (running) {\n\t\t\t\tif (animation_name) delete_rule(node, animation_name);\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t};\n}\n\nfunction create_bidirectional_transition(node, fn, params, intro) {\n\tlet config = fn(node, params);\n\n\tlet t = intro ? 0 : 1;\n\n\tlet running_program = null;\n\tlet pending_program = null;\n\tlet animation_name = null;\n\n\tfunction clear_animation() {\n\t\tif (animation_name) delete_rule(node, animation_name);\n\t}\n\n\tfunction init(program, duration) {\n\t\tconst d = program.b - t;\n\t\tduration *= Math.abs(d);\n\n\t\treturn {\n\t\t\ta: t,\n\t\t\tb: program.b,\n\t\t\td,\n\t\t\tduration,\n\t\t\tstart: program.start,\n\t\t\tend: program.start + duration,\n\t\t\tgroup: program.group\n\t\t};\n\t}\n\n\tfunction go(b) {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = identity,\n\t\t\ttick = noop,\n\t\t\tcss\n\t\t} = config || null_transition;\n\n\t\tconst program = {\n\t\t\tstart: now() + delay,\n\t\t\tb\n\t\t};\n\n\t\tif (!b) {\n\t\t\t// @ts-ignore todo: improve typings\n\t\t\tprogram.group = outros;\n\t\t\toutros.r += 1;\n\t\t}\n\n\t\tif (running_program || pending_program) {\n\t\t\tpending_program = program;\n\t\t} else {\n\t\t\t// if this is an intro, and there's a delay, we need to do\n\t\t\t// an initial tick and/or apply CSS animation immediately\n\t\t\tif (css) {\n\t\t\t\tclear_animation();\n\t\t\t\tanimation_name = create_rule(node, t, b, duration, delay, easing, css);\n\t\t\t}\n\n\t\t\tif (b) tick(0, 1);\n\n\t\t\trunning_program = init(program, duration);\n\t\t\tadd_render_callback(() => dispatch(node, b, 'start'));\n\n\t\t\tloop(now => {\n\t\t\t\tif (pending_program && now > pending_program.start) {\n\t\t\t\t\trunning_program = init(pending_program, duration);\n\t\t\t\t\tpending_program = null;\n\n\t\t\t\t\tdispatch(node, running_program.b, 'start');\n\n\t\t\t\t\tif (css) {\n\t\t\t\t\t\tclear_animation();\n\t\t\t\t\t\tanimation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (running_program) {\n\t\t\t\t\tif (now >= running_program.end) {\n\t\t\t\t\t\ttick(t = running_program.b, 1 - t);\n\t\t\t\t\t\tdispatch(node, running_program.b, 'end');\n\n\t\t\t\t\t\tif (!pending_program) {\n\t\t\t\t\t\t\t// we're done\n\t\t\t\t\t\t\tif (running_program.b) {\n\t\t\t\t\t\t\t\t// intro — we can tidy up immediately\n\t\t\t\t\t\t\t\tclear_animation();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// outro — needs to be coordinated\n\t\t\t\t\t\t\t\tif (!--running_program.group.r) run_all(running_program.group.c);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\trunning_program = null;\n\t\t\t\t\t} else if (now >= running_program.start) {\n\t\t\t\t\t\tconst p = now - running_program.start;\n\t\t\t\t\t\tt = running_program.a + running_program.d * easing(p / running_program.duration);\n\t\t\t\t\t\ttick(t, 1 - t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn !!(running_program || pending_program);\n\t\t\t});\n\t\t}\n\t}\n\n\treturn {\n\t\trun(b) {\n\t\t\tif (is_function(config)) {\n\t\t\t\twait().then(() => {\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tconfig = config();\n\t\t\t\t\tgo(b);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tgo(b);\n\t\t\t}\n\t\t},\n\n\t\tend() {\n\t\t\tclear_animation();\n\t\t\trunning_program = pending_program = null;\n\t\t}\n\t};\n}\n\nfunction handle_promise(promise, info) {\n\tconst token = info.token = {};\n\n\tfunction update(type, index, key, value) {\n\t\tif (info.token !== token) return;\n\n\t\tinfo.resolved = value;\n\n\t\tlet child_ctx = info.ctx;\n\n\t\tif (key !== undefined) {\n\t\t\tchild_ctx = child_ctx.slice();\n\t\t\tchild_ctx[key] = value;\n\t\t}\n\n\t\tconst block = type && (info.current = type)(child_ctx);\n\n\t\tlet needs_flush = false;\n\n\t\tif (info.block) {\n\t\t\tif (info.blocks) {\n\t\t\t\tinfo.blocks.forEach((block, i) => {\n\t\t\t\t\tif (i !== index && block) {\n\t\t\t\t\t\tgroup_outros();\n\t\t\t\t\t\ttransition_out(block, 1, 1, () => {\n\t\t\t\t\t\t\tif (info.blocks[i] === block) {\n\t\t\t\t\t\t\t\tinfo.blocks[i] = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcheck_outros();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tinfo.block.d(1);\n\t\t\t}\n\n\t\t\tblock.c();\n\t\t\ttransition_in(block, 1);\n\t\t\tblock.m(info.mount(), info.anchor);\n\n\t\t\tneeds_flush = true;\n\t\t}\n\n\t\tinfo.block = block;\n\t\tif (info.blocks) info.blocks[index] = block;\n\n\t\tif (needs_flush) {\n\t\t\tflush();\n\t\t}\n\t}\n\n\tif (is_promise(promise)) {\n\t\tconst current_component = get_current_component();\n\t\tpromise.then(value => {\n\t\t\tset_current_component(current_component);\n\t\t\tupdate(info.then, 1, info.value, value);\n\t\t\tset_current_component(null);\n\t\t}, error => {\n\t\t\tset_current_component(current_component);\n\t\t\tupdate(info.catch, 2, info.error, error);\n\t\t\tset_current_component(null);\n\t\t\tif (!info.hasCatch) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t});\n\n\t\t// if we previously had a then/catch block, destroy it\n\t\tif (info.current !== info.pending) {\n\t\t\tupdate(info.pending, 0);\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\tif (info.current !== info.then) {\n\t\t\tupdate(info.then, 1, info.value, promise);\n\t\t\treturn true;\n\t\t}\n\n\t\tinfo.resolved = promise;\n\t}\n}\n\nfunction update_await_block_branch(info, ctx, dirty) {\n\tconst child_ctx = ctx.slice();\n\tconst { resolved } = info;\n\n\tif (info.current === info.then) {\n\t\tchild_ctx[info.value] = resolved;\n\t}\n\tif (info.current === info.catch) {\n\t\tchild_ctx[info.error] = resolved;\n\t}\n\n\tinfo.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n\t? window\n\t: typeof globalThis !== 'undefined'\n\t? globalThis\n\t: global) ;\n\nfunction destroy_block(block, lookup) {\n\tblock.d(1);\n\tlookup.delete(block.key);\n}\n\nfunction outro_and_destroy_block(block, lookup) {\n\ttransition_out(block, 1, 1, () => {\n\t\tlookup.delete(block.key);\n\t});\n}\n\nfunction fix_and_destroy_block(block, lookup) {\n\tblock.f();\n\tdestroy_block(block, lookup);\n}\n\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n\tblock.f();\n\toutro_and_destroy_block(block, lookup);\n}\n\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n\tlet o = old_blocks.length;\n\tlet n = list.length;\n\n\tlet i = o;\n\tconst old_indexes = {};\n\twhile (i--) old_indexes[old_blocks[i].key] = i;\n\n\tconst new_blocks = [];\n\tconst new_lookup = new Map();\n\tconst deltas = new Map();\n\n\ti = n;\n\twhile (i--) {\n\t\tconst child_ctx = get_context(ctx, list, i);\n\t\tconst key = get_key(child_ctx);\n\t\tlet block = lookup.get(key);\n\n\t\tif (!block) {\n\t\t\tblock = create_each_block(key, child_ctx);\n\t\t\tblock.c();\n\t\t} else if (dynamic) {\n\t\t\tblock.p(child_ctx, dirty);\n\t\t}\n\n\t\tnew_lookup.set(key, new_blocks[i] = block);\n\n\t\tif (key in old_indexes) deltas.set(key, Math.abs(i - old_indexes[key]));\n\t}\n\n\tconst will_move = new Set();\n\tconst did_move = new Set();\n\n\tfunction insert(block) {\n\t\ttransition_in(block, 1);\n\t\tblock.m(node, next);\n\t\tlookup.set(block.key, block);\n\t\tnext = block.first;\n\t\tn--;\n\t}\n\n\twhile (o && n) {\n\t\tconst new_block = new_blocks[n - 1];\n\t\tconst old_block = old_blocks[o - 1];\n\t\tconst new_key = new_block.key;\n\t\tconst old_key = old_block.key;\n\n\t\tif (new_block === old_block) {\n\t\t\t// do nothing\n\t\t\tnext = new_block.first;\n\t\t\to--;\n\t\t\tn--;\n\t\t} else if (!new_lookup.has(old_key)) {\n\t\t\t// remove old block\n\t\t\tdestroy(old_block, lookup);\n\t\t\to--;\n\t\t} else if (!lookup.has(new_key) || will_move.has(new_key)) {\n\t\t\tinsert(new_block);\n\t\t} else if (did_move.has(old_key)) {\n\t\t\to--;\n\n\t\t} else if (deltas.get(new_key) > deltas.get(old_key)) {\n\t\t\tdid_move.add(new_key);\n\t\t\tinsert(new_block);\n\n\t\t} else {\n\t\t\twill_move.add(old_key);\n\t\t\to--;\n\t\t}\n\t}\n\n\twhile (o--) {\n\t\tconst old_block = old_blocks[o];\n\t\tif (!new_lookup.has(old_block.key)) destroy(old_block, lookup);\n\t}\n\n\twhile (n) insert(new_blocks[n - 1]);\n\n\treturn new_blocks;\n}\n\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n\tconst keys = new Set();\n\tfor (let i = 0; i < list.length; i++) {\n\t\tconst key = get_key(get_context(ctx, list, i));\n\t\tif (keys.has(key)) {\n\t\t\tthrow new Error('Cannot have duplicate keys in a keyed each');\n\t\t}\n\t\tkeys.add(key);\n\t}\n}\n\nfunction get_spread_update(levels, updates) {\n\tconst update = {};\n\n\tconst to_null_out = {};\n\tconst accounted_for = { $$scope: 1 };\n\n\tlet i = levels.length;\n\twhile (i--) {\n\t\tconst o = levels[i];\n\t\tconst n = updates[i];\n\n\t\tif (n) {\n\t\t\tfor (const key in o) {\n\t\t\t\tif (!(key in n)) to_null_out[key] = 1;\n\t\t\t}\n\n\t\t\tfor (const key in n) {\n\t\t\t\tif (!accounted_for[key]) {\n\t\t\t\t\tupdate[key] = n[key];\n\t\t\t\t\taccounted_for[key] = 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlevels[i] = n;\n\t\t} else {\n\t\t\tfor (const key in o) {\n\t\t\t\taccounted_for[key] = 1;\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (const key in to_null_out) {\n\t\tif (!(key in update)) update[key] = undefined;\n\t}\n\n\treturn update;\n}\n\nfunction get_spread_object(spread_props) {\n\treturn typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n\t'allowfullscreen',\n\t'allowpaymentrequest',\n\t'async',\n\t'autofocus',\n\t'autoplay',\n\t'checked',\n\t'controls',\n\t'default',\n\t'defer',\n\t'disabled',\n\t'formnovalidate',\n\t'hidden',\n\t'ismap',\n\t'loop',\n\t'multiple',\n\t'muted',\n\t'nomodule',\n\t'novalidate',\n\t'open',\n\t'playsinline',\n\t'readonly',\n\t'required',\n\t'reversed',\n\t'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\n\nfunction spread(args, classes_to_add) {\n\tconst attributes = Object.assign({}, ...args);\n\tif (classes_to_add) {\n\t\tif (attributes.class == null) {\n\t\t\tattributes.class = classes_to_add;\n\t\t} else {\n\t\t\tattributes.class += ' ' + classes_to_add;\n\t\t}\n\t}\n\tlet str = '';\n\n\tObject.keys(attributes).forEach(name => {\n\t\tif (invalid_attribute_name_character.test(name)) return;\n\n\t\tconst value = attributes[name];\n\t\tif (value === true) str += ' ' + name;\n\t\telse if (boolean_attributes.has(name.toLowerCase())) {\n\t\t\tif (value) str += ' ' + name;\n\t\t} else if (value != null) {\n\t\t\tstr += ` ${name}=\"${String(value).replace(/\"/g, '"').replace(/'/g, ''')}\"`;\n\t\t}\n\t});\n\n\treturn str;\n}\n\nconst escaped = {\n\t'\"': '"',\n\t\"'\": ''',\n\t'&': '&',\n\t'<': '<',\n\t'>': '>'\n};\n\nfunction escape(html) {\n\treturn String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\n\nfunction each(items, fn) {\n\tlet str = '';\n\tfor (let i = 0; i < items.length; i += 1) {\n\t\tstr += fn(items[i], i);\n\t}\n\treturn str;\n}\n\nconst missing_component = {\n\t$$render: () => ''\n};\n\nfunction validate_component(component, name) {\n\tif (!component || !component.$$render) {\n\t\tif (name === 'svelte:component') name += ' this={...}';\n\t\tthrow new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n\t}\n\n\treturn component;\n}\n\nfunction debug(file, line, column, values) {\n\tconsole.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n\tconsole.log(values); // eslint-disable-line no-console\n\treturn '';\n}\n\nlet on_destroy;\n\nfunction create_ssr_component(fn) {\n\tfunction $$render(result, props, bindings, slots, context) {\n\t\tconst parent_component = current_component;\n\n\t\tconst $$ = {\n\t\t\ton_destroy,\n\t\t\tcontext: new Map(parent_component ? parent_component.$$.context : context || []),\n\n\t\t\t// these will be immediately discarded\n\t\t\ton_mount: [],\n\t\t\tbefore_update: [],\n\t\t\tafter_update: [],\n\t\t\tcallbacks: blank_object()\n\t\t};\n\n\t\tset_current_component({ $$ });\n\n\t\tconst html = fn(result, props, bindings, slots);\n\n\t\tset_current_component(parent_component);\n\t\treturn html;\n\t}\n\n\treturn {\n\t\trender: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n\t\t\ton_destroy = [];\n\n\t\t\tconst result\n\n\n\n\n\n\n = { title: '', head: '', css: new Set() };\n\n\t\t\tconst html = $$render(result, props, {}, $$slots, context);\n\n\t\t\trun_all(on_destroy);\n\n\t\t\treturn {\n\t\t\t\thtml,\n\t\t\t\tcss: {\n\t\t\t\t\tcode: Array.from(result.css).map(css => css.code).join('\\n'),\n\t\t\t\t\tmap: null // TODO\n\t\t\t\t},\n\t\t\t\thead: result.title + result.head\n\t\t\t};\n\t\t},\n\n\t\t$$render\n\t};\n}\n\nfunction add_attribute(name, value, boolean) {\n\tif (value == null || (boolean && !value)) return '';\n\treturn ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\n\nfunction add_classes(classes) {\n\treturn classes ? ` class=\"${classes}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n\tconst index = component.$$.props[name];\n\tif (index !== undefined) {\n\t\tcomponent.$$.bound[index] = callback;\n\t\tcallback(component.$$.ctx[index]);\n\t}\n}\n\nfunction create_component(block) {\n\tblock && block.c();\n}\n\nfunction claim_component(block, parent_nodes) {\n\tblock && block.l(parent_nodes);\n}\n\nfunction mount_component(component, target, anchor, customElement) {\n\tconst { fragment, on_mount, on_destroy, after_update } = component.$$;\n\n\tfragment && fragment.m(target, anchor);\n\n\tif (!customElement) {\n\t\t// onMount happens before the initial afterUpdate\n\t\tadd_render_callback(() => {\n\n\t\t\tconst new_on_destroy = on_mount.map(run).filter(is_function);\n\t\t\tif (on_destroy) {\n\t\t\t\ton_destroy.push(...new_on_destroy);\n\t\t\t} else {\n\t\t\t\t// Edge case - component was destroyed immediately,\n\t\t\t\t// most likely as a result of a binding initialising\n\t\t\t\trun_all(new_on_destroy);\n\t\t\t}\n\t\t\tcomponent.$$.on_mount = [];\n\t\t});\n\t}\n\n\tafter_update.forEach(add_render_callback);\n}\n\nfunction destroy_component(component, detaching) {\n\tconst $$ = component.$$;\n\tif ($$.fragment !== null) {\n\t\trun_all($$.on_destroy);\n\n\t\t$$.fragment && $$.fragment.d(detaching);\n\n\t\t// TODO null out other refs, including component.$$ (but need to\n\t\t// preserve final state?)\n\t\t$$.on_destroy = $$.fragment = null;\n\t\t$$.ctx = [];\n\t}\n}\n\nfunction make_dirty(component, i) {\n\tif (component.$$.dirty[0] === -1) {\n\t\tdirty_components.push(component);\n\t\tschedule_update();\n\t\tcomponent.$$.dirty.fill(0);\n\t}\n\tcomponent.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\n\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n\tconst parent_component = current_component;\n\tset_current_component(component);\n\n\tconst $$ = component.$$ = {\n\t\tfragment: null,\n\t\tctx: null,\n\n\t\t// state\n\t\tprops,\n\t\tupdate: noop,\n\t\tnot_equal,\n\t\tbound: blank_object(),\n\n\t\t// lifecycle\n\t\ton_mount: [],\n\t\ton_destroy: [],\n\t\ton_disconnect: [],\n\t\tbefore_update: [],\n\t\tafter_update: [],\n\t\tcontext: new Map(parent_component ? parent_component.$$.context : options.context || []),\n\n\t\t// everything else\n\t\tcallbacks: blank_object(),\n\t\tdirty,\n\t\tskip_bound: false,\n\t\troot: options.target || parent_component.$$.root\n\t};\n\n\tappend_styles && append_styles($$.root);\n\n\tlet ready = false;\n\n\t$$.ctx = instance\n\t\t? instance(component, options.props || {}, (i, ret, ...rest) => {\n\t\t\tconst value = rest.length ? rest[0] : ret;\n\t\t\tif ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n\t\t\t\tif (!$$.skip_bound && $$.bound[i]) $$.bound[i](value);\n\t\t\t\tif (ready) make_dirty(component, i);\n\t\t\t}\n\t\t\treturn ret;\n\t\t})\n\t\t: [];\n\n\t$$.update();\n\tready = true;\n\trun_all($$.before_update);\n\n\t// `false` as a special case of no DOM component\n\t$$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n\n\tif (options.target) {\n\t\tif (options.hydrate) {\n\t\t\tconst nodes = children(options.target);\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t$$.fragment && $$.fragment.l(nodes);\n\t\t\tnodes.forEach(detach);\n\t\t} else {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t$$.fragment && $$.fragment.c();\n\t\t}\n\n\t\tif (options.intro) transition_in(component.$$.fragment);\n\t\tmount_component(component, options.target, options.anchor, options.customElement);\n\t\tflush();\n\t}\n\n\tset_current_component(parent_component);\n}\n\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n\tSvelteElement = class extends HTMLElement {\n\t\t\n\t\t\n\t\tconstructor() {\n\t\t\tsuper();\n\t\t\tthis.attachShadow({ mode: 'open' });\n\t\t}\n\n\t\tconnectedCallback() {\n\t\t\tconst { on_mount } = this.$$;\n\t\t\tthis.$$.on_disconnect = on_mount.map(run).filter(is_function);\n\n\t\t\t// @ts-ignore todo: improve typings\n\t\t\tfor (const key in this.$$.slotted) {\n\t\t\t\t// @ts-ignore todo: improve typings\n\t\t\t\tthis.appendChild(this.$$.slotted[key]);\n\t\t\t}\n\t\t}\n\n\t\tattributeChangedCallback(attr, _oldValue, newValue) {\n\t\t\tthis[attr] = newValue;\n\t\t}\n\n\t\tdisconnectedCallback() {\n\t\t\trun_all(this.$$.on_disconnect);\n\t\t}\n\n\t\t$destroy() {\n\t\t\tdestroy_component(this, 1);\n\t\t\tthis.$destroy = noop;\n\t\t}\n\n\t\t$on(type, callback) {\n\t\t\t// TODO should this delegate to addEventListener?\n\t\t\tconst callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n\t\t\tcallbacks.push(callback);\n\n\t\t\treturn () => {\n\t\t\t\tconst index = callbacks.indexOf(callback);\n\t\t\t\tif (index !== -1) callbacks.splice(index, 1);\n\t\t\t};\n\t\t}\n\n\t\t$set($$props) {\n\t\t\tif (this.$$set && !is_empty($$props)) {\n\t\t\t\tthis.$$.skip_bound = true;\n\t\t\t\tthis.$$set($$props);\n\t\t\t\tthis.$$.skip_bound = false;\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n\t\n\t\n\n\t$destroy() {\n\t\tdestroy_component(this, 1);\n\t\tthis.$destroy = noop;\n\t}\n\n\t$on(type, callback) {\n\t\tconst callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n\t\tcallbacks.push(callback);\n\n\t\treturn () => {\n\t\t\tconst index = callbacks.indexOf(callback);\n\t\t\tif (index !== -1) callbacks.splice(index, 1);\n\t\t};\n\t}\n\n\t$set($$props) {\n\t\tif (this.$$set && !is_empty($$props)) {\n\t\t\tthis.$$.skip_bound = true;\n\t\t\tthis.$$set($$props);\n\t\t\tthis.$$.skip_bound = false;\n\t\t}\n\t}\n}\n\nfunction dispatch_dev(type, detail) {\n\tdocument.dispatchEvent(custom_event(type, { version: '3.38.2', ...detail }));\n}\n\nfunction append_dev(target, node) {\n\tdispatch_dev('SvelteDOMInsert', { target, node });\n\tappend(target, node);\n}\n\nfunction insert_dev(target, node, anchor) {\n\tdispatch_dev('SvelteDOMInsert', { target, node, anchor });\n\tinsert(target, node, anchor);\n}\n\nfunction detach_dev(node) {\n\tdispatch_dev('SvelteDOMRemove', { node });\n\tdetach(node);\n}\n\nfunction detach_between_dev(before, after) {\n\twhile (before.nextSibling && before.nextSibling !== after) {\n\t\tdetach_dev(before.nextSibling);\n\t}\n}\n\nfunction detach_before_dev(after) {\n\twhile (after.previousSibling) {\n\t\tdetach_dev(after.previousSibling);\n\t}\n}\n\nfunction detach_after_dev(before) {\n\twhile (before.nextSibling) {\n\t\tdetach_dev(before.nextSibling);\n\t}\n}\n\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n\tconst modifiers = options === true ? [ 'capture' ] : options ? Array.from(Object.keys(options)) : [];\n\tif (has_prevent_default) modifiers.push('preventDefault');\n\tif (has_stop_propagation) modifiers.push('stopPropagation');\n\n\tdispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n\n\tconst dispose = listen(node, event, handler, options);\n\treturn () => {\n\t\tdispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n\t\tdispose();\n\t};\n}\n\nfunction attr_dev(node, attribute, value) {\n\tattr(node, attribute, value);\n\n\tif (value == null) dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n\telse dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\n\nfunction prop_dev(node, property, value) {\n\tnode[property] = value;\n\n\tdispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\n\nfunction dataset_dev(node, property, value) {\n\tnode.dataset[property] = value;\n\n\tdispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\n\nfunction set_data_dev(text, data) {\n\tdata = '' + data;\n\tif (text.wholeText === data) return;\n\n\tdispatch_dev('SvelteDOMSetData', { node: text, data });\n\ttext.data = data;\n}\n\nfunction validate_each_argument(arg) {\n\tif (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n\t\tlet msg = '{#each} only iterates over array-like objects.';\n\t\tif (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n\t\t\tmsg += ' You can use a spread to convert this iterable into an array.';\n\t\t}\n\t\tthrow new Error(msg);\n\t}\n}\n\nfunction validate_slots(name, slot, keys) {\n\tfor (const slot_key of Object.keys(slot)) {\n\t\tif (!~keys.indexOf(slot_key)) {\n\t\t\tconsole.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n\t\t}\n\t}\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n\t/**\n\t * @private\n\t * For type checking capabilities only.\n\t * Does not exist at runtime.\n\t * ### DO NOT USE!\n\t */\n\t\n\t/**\n\t * @private\n\t * For type checking capabilities only.\n\t * Does not exist at runtime.\n\t * ### DO NOT USE!\n\t */\n\t\n\t/**\n\t * @private\n\t * For type checking capabilities only.\n\t * Does not exist at runtime.\n\t * ### DO NOT USE!\n\t */\n\t\n\n\tconstructor(options) {\n\t\tif (!options || (!options.target && !options.$$inline)) {\n\t\t\tthrow new Error(\"'target' is a required option\");\n\t\t}\n\n\t\tsuper();\n\t}\n\n\t$destroy() {\n\t\tsuper.$destroy();\n\t\tthis.$destroy = () => {\n\t\t\tconsole.warn('Component was already destroyed'); // eslint-disable-line no-console\n\t\t};\n\t}\n\n\t$capture_state() {}\n\n\t$inject_state() {}\n}\n\n// TODO https://github.com/microsoft/TypeScript/issues/41770 is the reason\n// why we have to split out SvelteComponentTyped to not break existing usage of SvelteComponent.\n// Try to find a better way for Svelte 4.0.\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * \n * \n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to seperate the more strictly typed class.\n */\nclass SvelteComponentTyped\n\n\n\n extends SvelteComponentDev {\n\t/**\n\t * @private\n\t * For type checking capabilities only.\n\t * Does not exist at runtime.\n\t * ### DO NOT USE!\n\t */\n\t\n\t/**\n\t * @private\n\t * For type checking capabilities only.\n\t * Does not exist at runtime.\n\t * ### DO NOT USE!\n\t */\n\t\n\t/**\n\t * @private\n\t * For type checking capabilities only.\n\t * Does not exist at runtime.\n\t * ### DO NOT USE!\n\t */\n\t\n\n\tconstructor(options) {\n\t\tsuper(options);\n\t}\n}\n\nfunction loop_guard(timeout) {\n\tconst start = Date.now();\n\treturn () => {\n\t\tif (Date.now() - start > timeout) {\n\t\t\tthrow new Error('Infinite loop detected');\n\t\t}\n\t};\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_node, get_root_for_styles, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_await_block_branch, update_keyed_each, update_slot, update_slot_spread, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","export { identity as linear } from '../internal/index.mjs';\n\n/*\nAdapted from https://github.com/mattdesl\nDistributed under MIT License https://github.com/mattdesl/eases/blob/master/LICENSE.md\n*/\n\nfunction backInOut(t) {\n\tconst s = 1.70158 * 1.525;\n\tif ((t *= 2) < 1) return 0.5 * (t * t * ((s + 1) * t - s));\n\treturn 0.5 * ((t -= 2) * t * ((s + 1) * t + s) + 2);\n}\n\nfunction backIn(t) {\n\tconst s = 1.70158;\n\treturn t * t * ((s + 1) * t - s);\n}\n\nfunction backOut(t) {\n\tconst s = 1.70158;\n\treturn --t * t * ((s + 1) * t + s) + 1;\n}\n\nfunction bounceOut(t) {\n\tconst a = 4.0 / 11.0;\n\tconst b = 8.0 / 11.0;\n\tconst c = 9.0 / 10.0;\n\n\tconst ca = 4356.0 / 361.0;\n\tconst cb = 35442.0 / 1805.0;\n\tconst cc = 16061.0 / 1805.0;\n\n\tconst t2 = t * t;\n\n\treturn t < a\n\t\t? 7.5625 * t2\n\t\t: t < b\n\t\t\t? 9.075 * t2 - 9.9 * t + 3.4\n\t\t\t: t < c\n\t\t\t\t? ca * t2 - cb * t + cc\n\t\t\t\t: 10.8 * t * t - 20.52 * t + 10.72;\n}\n\nfunction bounceInOut(t) {\n\treturn t < 0.5\n\t\t? 0.5 * (1.0 - bounceOut(1.0 - t * 2.0))\n\t\t: 0.5 * bounceOut(t * 2.0 - 1.0) + 0.5;\n}\n\nfunction bounceIn(t) {\n\treturn 1.0 - bounceOut(1.0 - t);\n}\n\nfunction circInOut(t) {\n\tif ((t *= 2) < 1) return -0.5 * (Math.sqrt(1 - t * t) - 1);\n\treturn 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\n}\n\nfunction circIn(t) {\n\treturn 1.0 - Math.sqrt(1.0 - t * t);\n}\n\nfunction circOut(t) {\n\treturn Math.sqrt(1 - --t * t);\n}\n\nfunction cubicInOut(t) {\n\treturn t < 0.5 ? 4.0 * t * t * t : 0.5 * Math.pow(2.0 * t - 2.0, 3.0) + 1.0;\n}\n\nfunction cubicIn(t) {\n\treturn t * t * t;\n}\n\nfunction cubicOut(t) {\n\tconst f = t - 1.0;\n\treturn f * f * f + 1.0;\n}\n\nfunction elasticInOut(t) {\n\treturn t < 0.5\n\t\t? 0.5 *\n\t\t\t\tMath.sin(((+13.0 * Math.PI) / 2) * 2.0 * t) *\n\t\t\t\tMath.pow(2.0, 10.0 * (2.0 * t - 1.0))\n\t\t: 0.5 *\n\t\t\t\tMath.sin(((-13.0 * Math.PI) / 2) * (2.0 * t - 1.0 + 1.0)) *\n\t\t\t\tMath.pow(2.0, -10.0 * (2.0 * t - 1.0)) +\n\t\t\t\t1.0;\n}\n\nfunction elasticIn(t) {\n\treturn Math.sin((13.0 * t * Math.PI) / 2) * Math.pow(2.0, 10.0 * (t - 1.0));\n}\n\nfunction elasticOut(t) {\n\treturn (\n\t\tMath.sin((-13.0 * (t + 1.0) * Math.PI) / 2) * Math.pow(2.0, -10.0 * t) + 1.0\n\t);\n}\n\nfunction expoInOut(t) {\n\treturn t === 0.0 || t === 1.0\n\t\t? t\n\t\t: t < 0.5\n\t\t\t? +0.5 * Math.pow(2.0, 20.0 * t - 10.0)\n\t\t\t: -0.5 * Math.pow(2.0, 10.0 - t * 20.0) + 1.0;\n}\n\nfunction expoIn(t) {\n\treturn t === 0.0 ? t : Math.pow(2.0, 10.0 * (t - 1.0));\n}\n\nfunction expoOut(t) {\n\treturn t === 1.0 ? t : 1.0 - Math.pow(2.0, -10.0 * t);\n}\n\nfunction quadInOut(t) {\n\tt /= 0.5;\n\tif (t < 1) return 0.5 * t * t;\n\tt--;\n\treturn -0.5 * (t * (t - 2) - 1);\n}\n\nfunction quadIn(t) {\n\treturn t * t;\n}\n\nfunction quadOut(t) {\n\treturn -t * (t - 2.0);\n}\n\nfunction quartInOut(t) {\n\treturn t < 0.5\n\t\t? +8.0 * Math.pow(t, 4.0)\n\t\t: -8.0 * Math.pow(t - 1.0, 4.0) + 1.0;\n}\n\nfunction quartIn(t) {\n\treturn Math.pow(t, 4.0);\n}\n\nfunction quartOut(t) {\n\treturn Math.pow(t - 1.0, 3.0) * (1.0 - t) + 1.0;\n}\n\nfunction quintInOut(t) {\n\tif ((t *= 2) < 1) return 0.5 * t * t * t * t * t;\n\treturn 0.5 * ((t -= 2) * t * t * t * t + 2);\n}\n\nfunction quintIn(t) {\n\treturn t * t * t * t * t;\n}\n\nfunction quintOut(t) {\n\treturn --t * t * t * t * t + 1;\n}\n\nfunction sineInOut(t) {\n\treturn -0.5 * (Math.cos(Math.PI * t) - 1);\n}\n\nfunction sineIn(t) {\n\tconst v = Math.cos(t * Math.PI * 0.5);\n\tif (Math.abs(v) < 1e-14) return 1;\n\telse return 1 - v;\n}\n\nfunction sineOut(t) {\n\treturn Math.sin((t * Math.PI) / 2);\n}\n\nexport { backIn, backInOut, backOut, bounceIn, bounceInOut, bounceOut, circIn, circInOut, circOut, cubicIn, cubicInOut, cubicOut, elasticIn, elasticInOut, elasticOut, expoIn, expoInOut, expoOut, quadIn, quadInOut, quadOut, quartIn, quartInOut, quartOut, quintIn, quintInOut, quintOut, sineIn, sineInOut, sineOut };\n","import { cubicOut } from '../easing/index.mjs';\nimport { is_function } from '../internal/index.mjs';\n\n// todo: same as Transition, should it be shared?\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction flip(node, animation, params = {}) {\n\tconst style = getComputedStyle(node);\n\tconst transform = style.transform === 'none' ? '' : style.transform;\n\tconst scaleX = animation.from.width / node.clientWidth;\n\tconst scaleY = animation.from.height / node.clientHeight;\n\n\tconst dx = (animation.from.left - animation.to.left) / scaleX;\n\tconst dy = (animation.from.top - animation.to.top) / scaleY;\n\n\tconst d = Math.sqrt(dx * dx + dy * dy);\n\n\tconst {\n\t\tdelay = 0,\n\t\tduration = (d) => Math.sqrt(d) * 120,\n\t\teasing = cubicOut\n\t} = params;\n\n\treturn {\n\t\tdelay,\n\t\tduration: is_function(duration) ? duration(d) : duration,\n\t\teasing,\n\t\tcss: (_t, u) => `transform: ${transform} translate(${u * dx}px, ${u * dy}px);`\n\t};\n}\n\nexport { flip };\n","\n\n
    \n \n

    \n
    \n \n {#each data as datum, i (datum.id ? datum.id : JSON.stringify(datum))}\n \n
    \n 0 ? '' : 'hidden') + ';'}\"\n on:click=\"{function (ev) {\n moveDatum(i, i - 1);\n }}\"\n >\n \n \n \n \n \n
    \n\n
    \n {#if datum.html}\n {@html datum.html}\n {:else if datum.text}\n

    {datum.text}

    \n {:else}\n

    {datum}

    \n {/if}\n
    \n\n
    \n {#if removesItems}\n \n \n \n {/if}\n
    \n \n {/each}\n \n\n\n\n","\n\n\n","\n\n{#if current.type === 'MultipleChoice'}\n {#each current.answers as answer, i}\n \n {/each}\n{:else}\n {#each current.answers as answer, i}\n \n {/each}\n{/if}\n\n\n","import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\n/** Callback to inform of a value updates. */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst subscriber_queue = [];\n\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n\treturn {\n\t\tsubscribe: writable(value, start).subscribe\n\t};\n}\n\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n\tlet stop;\n\tconst subscribers = [];\n\n\tfunction set(new_value) {\n\t\tif (safe_not_equal(value, new_value)) {\n\t\t\tvalue = new_value;\n\t\t\tif (stop) { // store is ready\n\t\t\t\tconst run_queue = !subscriber_queue.length;\n\t\t\t\tfor (let i = 0; i < subscribers.length; i += 1) {\n\t\t\t\t\tconst s = subscribers[i];\n\t\t\t\t\ts[1]();\n\t\t\t\t\tsubscriber_queue.push(s, value);\n\t\t\t\t}\n\t\t\t\tif (run_queue) {\n\t\t\t\t\tfor (let i = 0; i < subscriber_queue.length; i += 2) {\n\t\t\t\t\t\tsubscriber_queue[i][0](subscriber_queue[i + 1]);\n\t\t\t\t\t}\n\t\t\t\t\tsubscriber_queue.length = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction update(fn) {\n\t\tset(fn(value));\n\t}\n\n\tfunction subscribe(run, invalidate = noop) {\n\t\tconst subscriber = [run, invalidate];\n\t\tsubscribers.push(subscriber);\n\t\tif (subscribers.length === 1) {\n\t\t\tstop = start(set) || noop;\n\t\t}\n\t\trun(value);\n\n\t\treturn () => {\n\t\t\tconst index = subscribers.indexOf(subscriber);\n\t\t\tif (index !== -1) {\n\t\t\t\tsubscribers.splice(index, 1);\n\t\t\t}\n\t\t\tif (subscribers.length === 0) {\n\t\t\t\tstop();\n\t\t\t\tstop = null;\n\t\t\t}\n\t\t};\n\t}\n\n\treturn { set, update, subscribe };\n}\n\n/** One or more `Readable`s. */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction derived(stores, fn, initial_value) {\n\tconst single = !Array.isArray(stores);\n\tconst stores_array = single\n\t\t? [stores ]\n\t\t: stores ;\n\n\tconst auto = fn.length < 2;\n\n\treturn readable(initial_value, (set) => {\n\t\tlet inited = false;\n\t\tconst values = [];\n\n\t\tlet pending = 0;\n\t\tlet cleanup = noop;\n\n\t\tconst sync = () => {\n\t\t\tif (pending) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcleanup();\n\t\t\tconst result = fn(single ? values[0] : values, set);\n\t\t\tif (auto) {\n\t\t\t\tset(result );\n\t\t\t} else {\n\t\t\t\tcleanup = is_function(result) ? result : noop;\n\t\t\t}\n\t\t};\n\n\t\tconst unsubscribers = stores_array.map((store, i) => subscribe(\n\t\t\tstore,\n\t\t\t(value) => {\n\t\t\t\tvalues[i] = value;\n\t\t\t\tpending &= ~(1 << i);\n\t\t\t\tif (inited) {\n\t\t\t\t\tsync();\n\t\t\t\t}\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tpending |= (1 << i);\n\t\t\t})\n\t\t);\n\n\t\tinited = true;\n\t\tsync();\n\n\t\treturn function stop() {\n\t\t\trun_all(unsubscribers);\n\t\t\tcleanup();\n\t\t};\n\t});\n}\n\nexport { derived, readable, writable };\n","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn target.propertyIsEnumerable(symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","export var TYPE;\n(function (TYPE) {\n /**\n * Raw text\n */\n TYPE[TYPE[\"literal\"] = 0] = \"literal\";\n /**\n * Variable w/o any format, e.g `var` in `this is a {var}`\n */\n TYPE[TYPE[\"argument\"] = 1] = \"argument\";\n /**\n * Variable w/ number format\n */\n TYPE[TYPE[\"number\"] = 2] = \"number\";\n /**\n * Variable w/ date format\n */\n TYPE[TYPE[\"date\"] = 3] = \"date\";\n /**\n * Variable w/ time format\n */\n TYPE[TYPE[\"time\"] = 4] = \"time\";\n /**\n * Variable w/ select format\n */\n TYPE[TYPE[\"select\"] = 5] = \"select\";\n /**\n * Variable w/ plural format\n */\n TYPE[TYPE[\"plural\"] = 6] = \"plural\";\n /**\n * Only possible within plural argument.\n * This is the `#` symbol that will be substituted with the count.\n */\n TYPE[TYPE[\"pound\"] = 7] = \"pound\";\n /**\n * XML-like tag\n */\n TYPE[TYPE[\"tag\"] = 8] = \"tag\";\n})(TYPE || (TYPE = {}));\nexport var SKELETON_TYPE;\n(function (SKELETON_TYPE) {\n SKELETON_TYPE[SKELETON_TYPE[\"number\"] = 0] = \"number\";\n SKELETON_TYPE[SKELETON_TYPE[\"dateTime\"] = 1] = \"dateTime\";\n})(SKELETON_TYPE || (SKELETON_TYPE = {}));\n/**\n * Type Guards\n */\nexport function isLiteralElement(el) {\n return el.type === TYPE.literal;\n}\nexport function isArgumentElement(el) {\n return el.type === TYPE.argument;\n}\nexport function isNumberElement(el) {\n return el.type === TYPE.number;\n}\nexport function isDateElement(el) {\n return el.type === TYPE.date;\n}\nexport function isTimeElement(el) {\n return el.type === TYPE.time;\n}\nexport function isSelectElement(el) {\n return el.type === TYPE.select;\n}\nexport function isPluralElement(el) {\n return el.type === TYPE.plural;\n}\nexport function isPoundElement(el) {\n return el.type === TYPE.pound;\n}\nexport function isTagElement(el) {\n return el.type === TYPE.tag;\n}\nexport function isNumberSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.number);\n}\nexport function isDateTimeSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.dateTime);\n}\nexport function createLiteralElement(value) {\n return {\n type: TYPE.literal,\n value: value,\n };\n}\nexport function createNumberElement(value, style) {\n return {\n type: TYPE.number,\n value: value,\n style: style,\n };\n}\n","export var ErrorKind;\n(function (ErrorKind) {\n /** Argument is unclosed (e.g. `{0`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_CLOSING_BRACE\"] = 1] = \"EXPECT_ARGUMENT_CLOSING_BRACE\";\n /** Argument is empty (e.g. `{}`). */\n ErrorKind[ErrorKind[\"EMPTY_ARGUMENT\"] = 2] = \"EMPTY_ARGUMENT\";\n /** Argument is malformed (e.g. `{foo!}``) */\n ErrorKind[ErrorKind[\"MALFORMED_ARGUMENT\"] = 3] = \"MALFORMED_ARGUMENT\";\n /** Expect an argument type (e.g. `{foo,}`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_TYPE\"] = 4] = \"EXPECT_ARGUMENT_TYPE\";\n /** Unsupported argument type (e.g. `{foo,foo}`) */\n ErrorKind[ErrorKind[\"INVALID_ARGUMENT_TYPE\"] = 5] = \"INVALID_ARGUMENT_TYPE\";\n /** Expect an argument style (e.g. `{foo, number, }`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_STYLE\"] = 6] = \"EXPECT_ARGUMENT_STYLE\";\n /** The number skeleton is invalid. */\n ErrorKind[ErrorKind[\"INVALID_NUMBER_SKELETON\"] = 7] = \"INVALID_NUMBER_SKELETON\";\n /** The date time skeleton is invalid. */\n ErrorKind[ErrorKind[\"INVALID_DATE_TIME_SKELETON\"] = 8] = \"INVALID_DATE_TIME_SKELETON\";\n /** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */\n ErrorKind[ErrorKind[\"EXPECT_NUMBER_SKELETON\"] = 9] = \"EXPECT_NUMBER_SKELETON\";\n /** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */\n ErrorKind[ErrorKind[\"EXPECT_DATE_TIME_SKELETON\"] = 10] = \"EXPECT_DATE_TIME_SKELETON\";\n /** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */\n ErrorKind[ErrorKind[\"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\"] = 11] = \"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\";\n /** Missing select argument options (e.g. `{foo, select}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_OPTIONS\"] = 12] = \"EXPECT_SELECT_ARGUMENT_OPTIONS\";\n /** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 13] = \"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\";\n /** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */\n ErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 14] = \"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\";\n /** Expecting a selector in `select` argument (e.g `{foo, select}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR\"] = 15] = \"EXPECT_SELECT_ARGUMENT_SELECTOR\";\n /** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR\"] = 16] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR\";\n /** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\"] = 17] = \"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\";\n /**\n * Expecting a message fragment after the `plural` or `selectordinal` selector\n * (e.g. `{foo, plural, one}`)\n */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\"] = 18] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\";\n /** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */\n ErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_SELECTOR\"] = 19] = \"INVALID_PLURAL_ARGUMENT_SELECTOR\";\n /**\n * Duplicate selectors in `plural` or `selectordinal` argument.\n * (e.g. {foo, plural, one {#} one {#}})\n */\n ErrorKind[ErrorKind[\"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\"] = 20] = \"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\";\n /** Duplicate selectors in `select` argument.\n * (e.g. {foo, select, apple {apple} apple {apple}})\n */\n ErrorKind[ErrorKind[\"DUPLICATE_SELECT_ARGUMENT_SELECTOR\"] = 21] = \"DUPLICATE_SELECT_ARGUMENT_SELECTOR\";\n /** Plural or select argument option must have `other` clause. */\n ErrorKind[ErrorKind[\"MISSING_OTHER_CLAUSE\"] = 22] = \"MISSING_OTHER_CLAUSE\";\n /** The tag is malformed. (e.g. `foo) */\n ErrorKind[ErrorKind[\"INVALID_TAG\"] = 23] = \"INVALID_TAG\";\n /** The tag name is invalid. (e.g. `<123>foo`) */\n ErrorKind[ErrorKind[\"INVALID_TAG_NAME\"] = 25] = \"INVALID_TAG_NAME\";\n /** The closing tag does not match the opening tag. (e.g. `foo`) */\n ErrorKind[ErrorKind[\"UNMATCHED_CLOSING_TAG\"] = 26] = \"UNMATCHED_CLOSING_TAG\";\n /** The opening tag has unmatched closing tag. (e.g. `foo`) */\n ErrorKind[ErrorKind[\"UNCLOSED_TAG\"] = 27] = \"UNCLOSED_TAG\";\n})(ErrorKind || (ErrorKind = {}));\n","// @generated from regex-gen.ts\nexport var SPACE_SEPARATOR_START_REGEX = /^[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]*/i;\nexport var SPACE_SEPARATOR_END_REGEX = /[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]*$/i;\nexport var WHITE_SPACE_REGEX = /[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;\n","/**\n * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js\n * with some tweaks\n */\nvar DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;\n/**\n * Parse Date time skeleton into Intl.DateTimeFormatOptions\n * Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * @public\n * @param skeleton skeleton string\n */\nexport function parseDateTimeSkeleton(skeleton) {\n var result = {};\n skeleton.replace(DATE_TIME_REGEX, function (match) {\n var len = match.length;\n switch (match[0]) {\n // Era\n case 'G':\n result.era = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short';\n break;\n // Year\n case 'y':\n result.year = len === 2 ? '2-digit' : 'numeric';\n break;\n case 'Y':\n case 'u':\n case 'U':\n case 'r':\n throw new RangeError('`Y/u/U/r` (year) patterns are not supported, use `y` instead');\n // Quarter\n case 'q':\n case 'Q':\n throw new RangeError('`q/Q` (quarter) patterns are not supported');\n // Month\n case 'M':\n case 'L':\n result.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][len - 1];\n break;\n // Week\n case 'w':\n case 'W':\n throw new RangeError('`w/W` (week) patterns are not supported');\n case 'd':\n result.day = ['numeric', '2-digit'][len - 1];\n break;\n case 'D':\n case 'F':\n case 'g':\n throw new RangeError('`D/F/g` (day) patterns are not supported, use `d` instead');\n // Weekday\n case 'E':\n result.weekday = len === 4 ? 'short' : len === 5 ? 'narrow' : 'short';\n break;\n case 'e':\n if (len < 4) {\n throw new RangeError('`e..eee` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n case 'c':\n if (len < 4) {\n throw new RangeError('`c..ccc` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n // Period\n case 'a': // AM, PM\n result.hour12 = true;\n break;\n case 'b': // am, pm, noon, midnight\n case 'B': // flexible day periods\n throw new RangeError('`b/B` (period) patterns are not supported, use `a` instead');\n // Hour\n case 'h':\n result.hourCycle = 'h12';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'H':\n result.hourCycle = 'h23';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'K':\n result.hourCycle = 'h11';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'k':\n result.hourCycle = 'h24';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'j':\n case 'J':\n case 'C':\n throw new RangeError('`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead');\n // Minute\n case 'm':\n result.minute = ['numeric', '2-digit'][len - 1];\n break;\n // Second\n case 's':\n result.second = ['numeric', '2-digit'][len - 1];\n break;\n case 'S':\n case 'A':\n throw new RangeError('`S/A` (second) patterns are not supported, use `s` instead');\n // Zone\n case 'z': // 1..3, 4: specific non-location format\n result.timeZoneName = len < 4 ? 'short' : 'long';\n break;\n case 'Z': // 1..3, 4, 5: The ISO8601 varios formats\n case 'O': // 1, 4: miliseconds in day short, long\n case 'v': // 1, 4: generic non-location format\n case 'V': // 1, 2, 3, 4: time zone ID or city\n case 'X': // 1, 2, 3, 4: The ISO8601 varios formats\n case 'x': // 1, 2, 3, 4: The ISO8601 varios formats\n throw new RangeError('`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead');\n }\n return '';\n });\n return result;\n}\n","import { __assign } from \"tslib\";\nimport { WHITE_SPACE_REGEX } from './regex.generated';\nexport function parseNumberSkeletonFromString(skeleton) {\n if (skeleton.length === 0) {\n throw new Error('Number skeleton cannot be empty');\n }\n // Parse the skeleton\n var stringTokens = skeleton\n .split(WHITE_SPACE_REGEX)\n .filter(function (x) { return x.length > 0; });\n var tokens = [];\n for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {\n var stringToken = stringTokens_1[_i];\n var stemAndOptions = stringToken.split('/');\n if (stemAndOptions.length === 0) {\n throw new Error('Invalid number skeleton');\n }\n var stem = stemAndOptions[0], options = stemAndOptions.slice(1);\n for (var _a = 0, options_1 = options; _a < options_1.length; _a++) {\n var option = options_1[_a];\n if (option.length === 0) {\n throw new Error('Invalid number skeleton');\n }\n }\n tokens.push({ stem: stem, options: options });\n }\n return tokens;\n}\nfunction icuUnitToEcma(unit) {\n return unit.replace(/^(.*?)-/, '');\n}\nvar FRACTION_PRECISION_REGEX = /^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g;\nvar SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\\+|#+)?$/g;\nvar INTEGER_WIDTH_REGEX = /(\\*)(0+)|(#+)(0+)|(0+)/g;\nvar CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;\nfunction parseSignificantPrecision(str) {\n var result = {};\n str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {\n // @@@ case\n if (typeof g2 !== 'string') {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits = g1.length;\n }\n // @@@+ case\n else if (g2 === '+') {\n result.minimumSignificantDigits = g1.length;\n }\n // .### case\n else if (g1[0] === '#') {\n result.maximumSignificantDigits = g1.length;\n }\n // .@@## or .@@@ case\n else {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits =\n g1.length + (typeof g2 === 'string' ? g2.length : 0);\n }\n return '';\n });\n return result;\n}\nfunction parseSign(str) {\n switch (str) {\n case 'sign-auto':\n return {\n signDisplay: 'auto',\n };\n case 'sign-accounting':\n case '()':\n return {\n currencySign: 'accounting',\n };\n case 'sign-always':\n case '+!':\n return {\n signDisplay: 'always',\n };\n case 'sign-accounting-always':\n case '()!':\n return {\n signDisplay: 'always',\n currencySign: 'accounting',\n };\n case 'sign-except-zero':\n case '+?':\n return {\n signDisplay: 'exceptZero',\n };\n case 'sign-accounting-except-zero':\n case '()?':\n return {\n signDisplay: 'exceptZero',\n currencySign: 'accounting',\n };\n case 'sign-never':\n case '+_':\n return {\n signDisplay: 'never',\n };\n }\n}\nfunction parseConciseScientificAndEngineeringStem(stem) {\n // Engineering\n var result;\n if (stem[0] === 'E' && stem[1] === 'E') {\n result = {\n notation: 'engineering',\n };\n stem = stem.slice(2);\n }\n else if (stem[0] === 'E') {\n result = {\n notation: 'scientific',\n };\n stem = stem.slice(1);\n }\n if (result) {\n var signDisplay = stem.slice(0, 2);\n if (signDisplay === '+!') {\n result.signDisplay = 'always';\n stem = stem.slice(2);\n }\n else if (signDisplay === '+?') {\n result.signDisplay = 'exceptZero';\n stem = stem.slice(2);\n }\n if (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) {\n throw new Error('Malformed concise eng/scientific notation');\n }\n result.minimumIntegerDigits = stem.length;\n }\n return result;\n}\nfunction parseNotationOptions(opt) {\n var result = {};\n var signOpts = parseSign(opt);\n if (signOpts) {\n return signOpts;\n }\n return result;\n}\n/**\n * https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options\n */\nexport function parseNumberSkeleton(tokens) {\n var result = {};\n for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {\n var token = tokens_1[_i];\n switch (token.stem) {\n case 'percent':\n case '%':\n result.style = 'percent';\n continue;\n case '%x100':\n result.style = 'percent';\n result.scale = 100;\n continue;\n case 'currency':\n result.style = 'currency';\n result.currency = token.options[0];\n continue;\n case 'group-off':\n case ',_':\n result.useGrouping = false;\n continue;\n case 'precision-integer':\n case '.':\n result.maximumFractionDigits = 0;\n continue;\n case 'measure-unit':\n case 'unit':\n result.style = 'unit';\n result.unit = icuUnitToEcma(token.options[0]);\n continue;\n case 'compact-short':\n case 'K':\n result.notation = 'compact';\n result.compactDisplay = 'short';\n continue;\n case 'compact-long':\n case 'KK':\n result.notation = 'compact';\n result.compactDisplay = 'long';\n continue;\n case 'scientific':\n result = __assign(__assign(__assign({}, result), { notation: 'scientific' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'engineering':\n result = __assign(__assign(__assign({}, result), { notation: 'engineering' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'notation-simple':\n result.notation = 'standard';\n continue;\n // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h\n case 'unit-width-narrow':\n result.currencyDisplay = 'narrowSymbol';\n result.unitDisplay = 'narrow';\n continue;\n case 'unit-width-short':\n result.currencyDisplay = 'code';\n result.unitDisplay = 'short';\n continue;\n case 'unit-width-full-name':\n result.currencyDisplay = 'name';\n result.unitDisplay = 'long';\n continue;\n case 'unit-width-iso-code':\n result.currencyDisplay = 'symbol';\n continue;\n case 'scale':\n result.scale = parseFloat(token.options[0]);\n continue;\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n case 'integer-width':\n if (token.options.length > 1) {\n throw new RangeError('integer-width stems only accept a single optional option');\n }\n token.options[0].replace(INTEGER_WIDTH_REGEX, function (_, g1, g2, g3, g4, g5) {\n if (g1) {\n result.minimumIntegerDigits = g2.length;\n }\n else if (g3 && g4) {\n throw new Error('We currently do not support maximum integer digits');\n }\n else if (g5) {\n throw new Error('We currently do not support exact integer digits');\n }\n return '';\n });\n continue;\n }\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n if (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) {\n result.minimumIntegerDigits = token.stem.length;\n continue;\n }\n if (FRACTION_PRECISION_REGEX.test(token.stem)) {\n // Precision\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision\n // precision-integer case\n if (token.options.length > 1) {\n throw new RangeError('Fraction-precision stems only accept a single optional option');\n }\n token.stem.replace(FRACTION_PRECISION_REGEX, function (_, g1, g2, g3, g4, g5) {\n // .000* case (before ICU67 it was .000+)\n if (g2 === '*') {\n result.minimumFractionDigits = g1.length;\n }\n // .### case\n else if (g3 && g3[0] === '#') {\n result.maximumFractionDigits = g3.length;\n }\n // .00## case\n else if (g4 && g5) {\n result.minimumFractionDigits = g4.length;\n result.maximumFractionDigits = g4.length + g5.length;\n }\n else {\n result.minimumFractionDigits = g1.length;\n result.maximumFractionDigits = g1.length;\n }\n return '';\n });\n if (token.options.length) {\n result = __assign(__assign({}, result), parseSignificantPrecision(token.options[0]));\n }\n continue;\n }\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision\n if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {\n result = __assign(__assign({}, result), parseSignificantPrecision(token.stem));\n continue;\n }\n var signOpts = parseSign(token.stem);\n if (signOpts) {\n result = __assign(__assign({}, result), signOpts);\n }\n var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);\n if (conciseScientificAndEngineeringOpts) {\n result = __assign(__assign({}, result), conciseScientificAndEngineeringOpts);\n }\n }\n return result;\n}\n","var _a;\nimport { __assign } from \"tslib\";\nimport { ErrorKind } from './error';\nimport { SKELETON_TYPE, TYPE, } from './types';\nimport { SPACE_SEPARATOR_END_REGEX, SPACE_SEPARATOR_START_REGEX, } from './regex.generated';\nimport { parseNumberSkeleton, parseNumberSkeletonFromString, parseDateTimeSkeleton, } from '@formatjs/icu-skeleton-parser';\nfunction createLocation(start, end) {\n return { start: start, end: end };\n}\n// #region Ponyfills\n// Consolidate these variables up top for easier toggling during debugging\nvar hasNativeStartsWith = !!String.prototype.startsWith;\nvar hasNativeFromCodePoint = !!String.fromCodePoint;\nvar hasNativeFromEntries = !!Object.fromEntries;\nvar hasNativeCodePointAt = !!String.prototype.codePointAt;\nvar hasTrimStart = !!String.prototype.trimStart;\nvar hasTrimEnd = !!String.prototype.trimEnd;\nvar hasNativeIsSafeInteger = !!Number.isSafeInteger;\nvar isSafeInteger = hasNativeIsSafeInteger\n ? Number.isSafeInteger\n : function (n) {\n return (typeof n === 'number' &&\n isFinite(n) &&\n Math.floor(n) === n &&\n Math.abs(n) <= 0x1fffffffffffff);\n };\n// IE11 does not support y and u.\nvar REGEX_SUPPORTS_U_AND_Y = true;\ntry {\n var re = RE('([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)', 'yu');\n /**\n * legacy Edge or Xbox One browser\n * Unicode flag support: supported\n * Pattern_Syntax support: not supported\n * See https://github.com/formatjs/formatjs/issues/2822\n */\n REGEX_SUPPORTS_U_AND_Y = ((_a = re.exec('a')) === null || _a === void 0 ? void 0 : _a[0]) === 'a';\n}\ncatch (_) {\n REGEX_SUPPORTS_U_AND_Y = false;\n}\nvar startsWith = hasNativeStartsWith\n ? // Native\n function startsWith(s, search, position) {\n return s.startsWith(search, position);\n }\n : // For IE11\n function startsWith(s, search, position) {\n return s.slice(position, position + search.length) === search;\n };\nvar fromCodePoint = hasNativeFromCodePoint\n ? String.fromCodePoint\n : // IE11\n function fromCodePoint() {\n var codePoints = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n codePoints[_i] = arguments[_i];\n }\n var elements = '';\n var length = codePoints.length;\n var i = 0;\n var code;\n while (length > i) {\n code = codePoints[i++];\n if (code > 0x10ffff)\n throw RangeError(code + ' is not a valid code point');\n elements +=\n code < 0x10000\n ? String.fromCharCode(code)\n : String.fromCharCode(((code -= 0x10000) >> 10) + 0xd800, (code % 0x400) + 0xdc00);\n }\n return elements;\n };\nvar fromEntries = \n// native\nhasNativeFromEntries\n ? Object.fromEntries\n : // Ponyfill\n function fromEntries(entries) {\n var obj = {};\n for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\n var _a = entries_1[_i], k = _a[0], v = _a[1];\n obj[k] = v;\n }\n return obj;\n };\nvar codePointAt = hasNativeCodePointAt\n ? // Native\n function codePointAt(s, index) {\n return s.codePointAt(index);\n }\n : // IE 11\n function codePointAt(s, index) {\n var size = s.length;\n if (index < 0 || index >= size) {\n return undefined;\n }\n var first = s.charCodeAt(index);\n var second;\n return first < 0xd800 ||\n first > 0xdbff ||\n index + 1 === size ||\n (second = s.charCodeAt(index + 1)) < 0xdc00 ||\n second > 0xdfff\n ? first\n : ((first - 0xd800) << 10) + (second - 0xdc00) + 0x10000;\n };\nvar trimStart = hasTrimStart\n ? // Native\n function trimStart(s) {\n return s.trimStart();\n }\n : // Ponyfill\n function trimStart(s) {\n return s.replace(SPACE_SEPARATOR_START_REGEX, '');\n };\nvar trimEnd = hasTrimEnd\n ? // Native\n function trimEnd(s) {\n return s.trimEnd();\n }\n : // Ponyfill\n function trimEnd(s) {\n return s.replace(SPACE_SEPARATOR_END_REGEX, '');\n };\n// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.\nfunction RE(s, flag) {\n return new RegExp(s, flag);\n}\n// #endregion\nvar matchIdentifierAtIndex;\nif (REGEX_SUPPORTS_U_AND_Y) {\n // Native\n var IDENTIFIER_PREFIX_RE_1 = RE('([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)', 'yu');\n matchIdentifierAtIndex = function matchIdentifierAtIndex(s, index) {\n var _a;\n IDENTIFIER_PREFIX_RE_1.lastIndex = index;\n var match = IDENTIFIER_PREFIX_RE_1.exec(s);\n return (_a = match[1]) !== null && _a !== void 0 ? _a : '';\n };\n}\nelse {\n // IE11\n matchIdentifierAtIndex = function matchIdentifierAtIndex(s, index) {\n var match = [];\n while (true) {\n var c = codePointAt(s, index);\n if (c === undefined || _isWhiteSpace(c) || _isPatternSyntax(c)) {\n break;\n }\n match.push(c);\n index += c >= 0x10000 ? 2 : 1;\n }\n return fromCodePoint.apply(void 0, match);\n };\n}\nvar Parser = /** @class */ (function () {\n function Parser(message, options) {\n if (options === void 0) { options = {}; }\n this.message = message;\n this.position = { offset: 0, line: 1, column: 1 };\n this.ignoreTag = !!options.ignoreTag;\n this.requiresOtherClause = !!options.requiresOtherClause;\n this.shouldParseSkeletons = !!options.shouldParseSkeletons;\n }\n Parser.prototype.parse = function () {\n if (this.offset() !== 0) {\n throw Error('parser can only be used once');\n }\n return this.parseMessage(0, '', false);\n };\n Parser.prototype.parseMessage = function (nestingLevel, parentArgType, expectingCloseTag) {\n var elements = [];\n while (!this.isEOF()) {\n var char = this.char();\n if (char === 123 /* `{` */) {\n var result = this.parseArgument(nestingLevel, expectingCloseTag);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n else if (char === 125 /* `}` */ && nestingLevel > 0) {\n break;\n }\n else if (char === 35 /* `#` */ &&\n (parentArgType === 'plural' || parentArgType === 'selectordinal')) {\n var position = this.clonePosition();\n this.bump();\n elements.push({\n type: TYPE.pound,\n location: createLocation(position, this.clonePosition()),\n });\n }\n else if (char === 60 /* `<` */ &&\n !this.ignoreTag &&\n this.peek() === 47 // char code for '/'\n ) {\n if (expectingCloseTag) {\n break;\n }\n else {\n return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));\n }\n }\n else if (char === 60 /* `<` */ &&\n !this.ignoreTag &&\n _isAlpha(this.peek() || 0)) {\n var result = this.parseTag(nestingLevel, parentArgType);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n else {\n var result = this.parseLiteral(nestingLevel, parentArgType);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n }\n return { val: elements, err: null };\n };\n /**\n * A tag name must start with an ASCII lower/upper case letter. The grammar is based on the\n * [custom element name][] except that a dash is NOT always mandatory and uppercase letters\n * are accepted:\n *\n * ```\n * tag ::= \"<\" tagName (whitespace)* \"/>\" | \"<\" tagName (whitespace)* \">\" message \"\"\n * tagName ::= [a-z] (PENChar)*\n * PENChar ::=\n * \"-\" | \".\" | [0-9] | \"_\" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |\n * [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |\n * [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n * ```\n *\n * [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\n * NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do\n * since other tag-based engines like React allow it\n */\n Parser.prototype.parseTag = function (nestingLevel, parentArgType) {\n var startPosition = this.clonePosition();\n this.bump(); // `<`\n var tagName = this.parseTagName();\n this.bumpSpace();\n if (this.bumpIf('/>')) {\n // Self closing tag\n return {\n val: {\n type: TYPE.literal,\n value: \"<\" + tagName + \"/>\",\n location: createLocation(startPosition, this.clonePosition()),\n },\n err: null,\n };\n }\n else if (this.bumpIf('>')) {\n var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);\n if (childrenResult.err) {\n return childrenResult;\n }\n var children = childrenResult.val;\n // Expecting a close tag\n var endTagStartPosition = this.clonePosition();\n if (this.bumpIf('')) {\n return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));\n }\n return {\n val: {\n type: TYPE.tag,\n value: tagName,\n children: children,\n location: createLocation(startPosition, this.clonePosition()),\n },\n err: null,\n };\n }\n else {\n return this.error(ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition()));\n }\n }\n else {\n return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));\n }\n };\n /**\n * This method assumes that the caller has peeked ahead for the first tag character.\n */\n Parser.prototype.parseTagName = function () {\n var startOffset = this.offset();\n this.bump(); // the first tag name character\n while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {\n this.bump();\n }\n return this.message.slice(startOffset, this.offset());\n };\n Parser.prototype.parseLiteral = function (nestingLevel, parentArgType) {\n var start = this.clonePosition();\n var value = '';\n while (true) {\n var parseQuoteResult = this.tryParseQuote(parentArgType);\n if (parseQuoteResult) {\n value += parseQuoteResult;\n continue;\n }\n var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);\n if (parseUnquotedResult) {\n value += parseUnquotedResult;\n continue;\n }\n var parseLeftAngleResult = this.tryParseLeftAngleBracket();\n if (parseLeftAngleResult) {\n value += parseLeftAngleResult;\n continue;\n }\n break;\n }\n var location = createLocation(start, this.clonePosition());\n return {\n val: { type: TYPE.literal, value: value, location: location },\n err: null,\n };\n };\n Parser.prototype.tryParseLeftAngleBracket = function () {\n if (!this.isEOF() &&\n this.char() === 60 /* `<` */ &&\n (this.ignoreTag ||\n // If at the opening tag or closing tag position, bail.\n !_isAlphaOrSlash(this.peek() || 0))) {\n this.bump(); // `<`\n return '<';\n }\n return null;\n };\n /**\n * Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes\n * a character that requires quoting (that is, \"only where needed\"), and works the same in\n * nested messages as on the top level of the pattern. The new behavior is otherwise compatible.\n */\n Parser.prototype.tryParseQuote = function (parentArgType) {\n if (this.isEOF() || this.char() !== 39 /* `'` */) {\n return null;\n }\n // Parse escaped char following the apostrophe, or early return if there is no escaped char.\n // Check if is valid escaped character\n switch (this.peek()) {\n case 39 /* `'` */:\n // double quote, should return as a single quote.\n this.bump();\n this.bump();\n return \"'\";\n // '{', '<', '>', '}'\n case 123:\n case 60:\n case 62:\n case 125:\n break;\n case 35: // '#'\n if (parentArgType === 'plural' || parentArgType === 'selectordinal') {\n break;\n }\n return null;\n default:\n return null;\n }\n this.bump(); // apostrophe\n var codePoints = [this.char()]; // escaped char\n this.bump();\n // read chars until the optional closing apostrophe is found\n while (!this.isEOF()) {\n var ch = this.char();\n if (ch === 39 /* `'` */) {\n if (this.peek() === 39 /* `'` */) {\n codePoints.push(39);\n // Bump one more time because we need to skip 2 characters.\n this.bump();\n }\n else {\n // Optional closing apostrophe.\n this.bump();\n break;\n }\n }\n else {\n codePoints.push(ch);\n }\n this.bump();\n }\n return fromCodePoint.apply(void 0, codePoints);\n };\n Parser.prototype.tryParseUnquoted = function (nestingLevel, parentArgType) {\n if (this.isEOF()) {\n return null;\n }\n var ch = this.char();\n if (ch === 60 /* `<` */ ||\n ch === 123 /* `{` */ ||\n (ch === 35 /* `#` */ &&\n (parentArgType === 'plural' || parentArgType === 'selectordinal')) ||\n (ch === 125 /* `}` */ && nestingLevel > 0)) {\n return null;\n }\n else {\n this.bump();\n return fromCodePoint(ch);\n }\n };\n Parser.prototype.parseArgument = function (nestingLevel, expectingCloseTag) {\n var openingBracePosition = this.clonePosition();\n this.bump(); // `{`\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n if (this.char() === 125 /* `}` */) {\n this.bump();\n return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n // argument name\n var value = this.parseIdentifierIfPossible().value;\n if (!value) {\n return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n switch (this.char()) {\n // Simple argument: `{name}`\n case 125 /* `}` */: {\n this.bump(); // `}`\n return {\n val: {\n type: TYPE.argument,\n // value does not include the opening and closing braces.\n value: value,\n location: createLocation(openingBracePosition, this.clonePosition()),\n },\n err: null,\n };\n }\n // Argument with options: `{name, format, ...}`\n case 44 /* `,` */: {\n this.bump(); // `,`\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);\n }\n default:\n return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n };\n /**\n * Advance the parser until the end of the identifier, if it is currently on\n * an identifier character. Return an empty string otherwise.\n */\n Parser.prototype.parseIdentifierIfPossible = function () {\n var startingPosition = this.clonePosition();\n var startOffset = this.offset();\n var value = matchIdentifierAtIndex(this.message, startOffset);\n var endOffset = startOffset + value.length;\n this.bumpTo(endOffset);\n var endPosition = this.clonePosition();\n var location = createLocation(startingPosition, endPosition);\n return { value: value, location: location };\n };\n Parser.prototype.parseArgumentOptions = function (nestingLevel, expectingCloseTag, value, openingBracePosition) {\n var _a;\n // Parse this range:\n // {name, type, style}\n // ^---^\n var typeStartPosition = this.clonePosition();\n var argType = this.parseIdentifierIfPossible().value;\n var typeEndPosition = this.clonePosition();\n switch (argType) {\n case '':\n // Expecting a style string number, date, time, plural, selectordinal, or select.\n return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));\n case 'number':\n case 'date':\n case 'time': {\n // Parse this range:\n // {name, number, style}\n // ^-------^\n this.bumpSpace();\n var styleAndLocation = null;\n if (this.bumpIf(',')) {\n this.bumpSpace();\n var styleStartPosition = this.clonePosition();\n var result = this.parseSimpleArgStyleIfPossible();\n if (result.err) {\n return result;\n }\n var style = trimEnd(result.val);\n if (style.length === 0) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n var styleLocation = createLocation(styleStartPosition, this.clonePosition());\n styleAndLocation = { style: style, styleLocation: styleLocation };\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n var location_1 = createLocation(openingBracePosition, this.clonePosition());\n // Extract style or skeleton\n if (styleAndLocation && startsWith(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, '::', 0)) {\n // Skeleton starts with `::`.\n var skeleton = trimStart(styleAndLocation.style.slice(2));\n if (argType === 'number') {\n var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);\n if (result.err) {\n return result;\n }\n return {\n val: { type: TYPE.number, value: value, location: location_1, style: result.val },\n err: null,\n };\n }\n else {\n if (skeleton.length === 0) {\n return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);\n }\n var style = {\n type: SKELETON_TYPE.dateTime,\n pattern: skeleton,\n location: styleAndLocation.styleLocation,\n parsedOptions: this.shouldParseSkeletons\n ? parseDateTimeSkeleton(skeleton)\n : {},\n };\n var type = argType === 'date' ? TYPE.date : TYPE.time;\n return {\n val: { type: type, value: value, location: location_1, style: style },\n err: null,\n };\n }\n }\n // Regular style or no style.\n return {\n val: {\n type: argType === 'number'\n ? TYPE.number\n : argType === 'date'\n ? TYPE.date\n : TYPE.time,\n value: value,\n location: location_1,\n style: (_a = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a !== void 0 ? _a : null,\n },\n err: null,\n };\n }\n case 'plural':\n case 'selectordinal':\n case 'select': {\n // Parse this range:\n // {name, plural, options}\n // ^---------^\n var typeEndPosition_1 = this.clonePosition();\n this.bumpSpace();\n if (!this.bumpIf(',')) {\n return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, __assign({}, typeEndPosition_1)));\n }\n this.bumpSpace();\n // Parse offset:\n // {name, plural, offset:1, options}\n // ^-----^\n //\n // or the first option:\n //\n // {name, plural, one {...} other {...}}\n // ^--^\n var identifierAndLocation = this.parseIdentifierIfPossible();\n var pluralOffset = 0;\n if (argType !== 'select' && identifierAndLocation.value === 'offset') {\n if (!this.bumpIf(':')) {\n return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n this.bumpSpace();\n var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);\n if (result.err) {\n return result;\n }\n // Parse another identifier for option parsing\n this.bumpSpace();\n identifierAndLocation = this.parseIdentifierIfPossible();\n pluralOffset = result.val;\n }\n var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);\n if (optionsResult.err) {\n return optionsResult;\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n var location_2 = createLocation(openingBracePosition, this.clonePosition());\n if (argType === 'select') {\n return {\n val: {\n type: TYPE.select,\n value: value,\n options: fromEntries(optionsResult.val),\n location: location_2,\n },\n err: null,\n };\n }\n else {\n return {\n val: {\n type: TYPE.plural,\n value: value,\n options: fromEntries(optionsResult.val),\n offset: pluralOffset,\n pluralType: argType === 'plural' ? 'cardinal' : 'ordinal',\n location: location_2,\n },\n err: null,\n };\n }\n }\n default:\n return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));\n }\n };\n Parser.prototype.tryParseArgumentClose = function (openingBracePosition) {\n // Parse: {value, number, ::currency/GBP }\n //\n if (this.isEOF() || this.char() !== 125 /* `}` */) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n this.bump(); // `}`\n return { val: true, err: null };\n };\n /**\n * See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659\n */\n Parser.prototype.parseSimpleArgStyleIfPossible = function () {\n var nestedBraces = 0;\n var startPosition = this.clonePosition();\n while (!this.isEOF()) {\n var ch = this.char();\n switch (ch) {\n case 39 /* `'` */: {\n // Treat apostrophe as quoting but include it in the style part.\n // Find the end of the quoted literal text.\n this.bump();\n var apostrophePosition = this.clonePosition();\n if (!this.bumpUntil(\"'\")) {\n return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));\n }\n this.bump();\n break;\n }\n case 123 /* `{` */: {\n nestedBraces += 1;\n this.bump();\n break;\n }\n case 125 /* `}` */: {\n if (nestedBraces > 0) {\n nestedBraces -= 1;\n }\n else {\n return {\n val: this.message.slice(startPosition.offset, this.offset()),\n err: null,\n };\n }\n break;\n }\n default:\n this.bump();\n break;\n }\n }\n return {\n val: this.message.slice(startPosition.offset, this.offset()),\n err: null,\n };\n };\n Parser.prototype.parseNumberSkeletonFromString = function (skeleton, location) {\n var tokens = [];\n try {\n tokens = parseNumberSkeletonFromString(skeleton);\n }\n catch (e) {\n return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location);\n }\n return {\n val: {\n type: SKELETON_TYPE.number,\n tokens: tokens,\n location: location,\n parsedOptions: this.shouldParseSkeletons\n ? parseNumberSkeleton(tokens)\n : {},\n },\n err: null,\n };\n };\n /**\n * @param nesting_level The current nesting level of messages.\n * This can be positive when parsing message fragment in select or plural argument options.\n * @param parent_arg_type The parent argument's type.\n * @param parsed_first_identifier If provided, this is the first identifier-like selector of\n * the argument. It is a by-product of a previous parsing attempt.\n * @param expecting_close_tag If true, this message is directly or indirectly nested inside\n * between a pair of opening and closing tags. The nested message will not parse beyond\n * the closing tag boundary.\n */\n Parser.prototype.tryParsePluralOrSelectOptions = function (nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {\n var _a;\n var hasOtherClause = false;\n var options = [];\n var parsedSelectors = new Set();\n var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location;\n // Parse:\n // one {one apple}\n // ^--^\n while (true) {\n if (selector.length === 0) {\n var startPosition = this.clonePosition();\n if (parentArgType !== 'select' && this.bumpIf('=')) {\n // Try parse `={number}` selector\n var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);\n if (result.err) {\n return result;\n }\n selectorLocation = createLocation(startPosition, this.clonePosition());\n selector = this.message.slice(startPosition.offset, this.offset());\n }\n else {\n break;\n }\n }\n // Duplicate selector clauses\n if (parsedSelectors.has(selector)) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR\n : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);\n }\n if (selector === 'other') {\n hasOtherClause = true;\n }\n // Parse:\n // one {one apple}\n // ^----------^\n this.bumpSpace();\n var openingBracePosition = this.clonePosition();\n if (!this.bumpIf('{')) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\n : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));\n }\n var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);\n if (fragmentResult.err) {\n return fragmentResult;\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n options.push([\n selector,\n {\n value: fragmentResult.val,\n location: createLocation(openingBracePosition, this.clonePosition()),\n },\n ]);\n // Keep track of the existing selectors\n parsedSelectors.add(selector);\n // Prep next selector clause.\n this.bumpSpace();\n (_a = this.parseIdentifierIfPossible(), selector = _a.value, selectorLocation = _a.location);\n }\n if (options.length === 0) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR\n : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));\n }\n if (this.requiresOtherClause && !hasOtherClause) {\n return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n return { val: options, err: null };\n };\n Parser.prototype.tryParseDecimalInteger = function (expectNumberError, invalidNumberError) {\n var sign = 1;\n var startingPosition = this.clonePosition();\n if (this.bumpIf('+')) {\n }\n else if (this.bumpIf('-')) {\n sign = -1;\n }\n var hasDigits = false;\n var decimal = 0;\n while (!this.isEOF()) {\n var ch = this.char();\n if (ch >= 48 /* `0` */ && ch <= 57 /* `9` */) {\n hasDigits = true;\n decimal = decimal * 10 + (ch - 48);\n this.bump();\n }\n else {\n break;\n }\n }\n var location = createLocation(startingPosition, this.clonePosition());\n if (!hasDigits) {\n return this.error(expectNumberError, location);\n }\n decimal *= sign;\n if (!isSafeInteger(decimal)) {\n return this.error(invalidNumberError, location);\n }\n return { val: decimal, err: null };\n };\n Parser.prototype.offset = function () {\n return this.position.offset;\n };\n Parser.prototype.isEOF = function () {\n return this.offset() === this.message.length;\n };\n Parser.prototype.clonePosition = function () {\n // This is much faster than `Object.assign` or spread.\n return {\n offset: this.position.offset,\n line: this.position.line,\n column: this.position.column,\n };\n };\n /**\n * Return the code point at the current position of the parser.\n * Throws if the index is out of bound.\n */\n Parser.prototype.char = function () {\n var offset = this.position.offset;\n if (offset >= this.message.length) {\n throw Error('out of bound');\n }\n var code = codePointAt(this.message, offset);\n if (code === undefined) {\n throw Error(\"Offset \" + offset + \" is at invalid UTF-16 code unit boundary\");\n }\n return code;\n };\n Parser.prototype.error = function (kind, location) {\n return {\n val: null,\n err: {\n kind: kind,\n message: this.message,\n location: location,\n },\n };\n };\n /** Bump the parser to the next UTF-16 code unit. */\n Parser.prototype.bump = function () {\n if (this.isEOF()) {\n return;\n }\n var code = this.char();\n if (code === 10 /* '\\n' */) {\n this.position.line += 1;\n this.position.column = 1;\n this.position.offset += 1;\n }\n else {\n this.position.column += 1;\n // 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.\n this.position.offset += code < 0x10000 ? 1 : 2;\n }\n };\n /**\n * If the substring starting at the current position of the parser has\n * the given prefix, then bump the parser to the character immediately\n * following the prefix and return true. Otherwise, don't bump the parser\n * and return false.\n */\n Parser.prototype.bumpIf = function (prefix) {\n if (startsWith(this.message, prefix, this.offset())) {\n for (var i = 0; i < prefix.length; i++) {\n this.bump();\n }\n return true;\n }\n return false;\n };\n /**\n * Bump the parser until the pattern character is found and return `true`.\n * Otherwise bump to the end of the file and return `false`.\n */\n Parser.prototype.bumpUntil = function (pattern) {\n var currentOffset = this.offset();\n var index = this.message.indexOf(pattern, currentOffset);\n if (index >= 0) {\n this.bumpTo(index);\n return true;\n }\n else {\n this.bumpTo(this.message.length);\n return false;\n }\n };\n /**\n * Bump the parser to the target offset.\n * If target offset is beyond the end of the input, bump the parser to the end of the input.\n */\n Parser.prototype.bumpTo = function (targetOffset) {\n if (this.offset() > targetOffset) {\n throw Error(\"targetOffset \" + targetOffset + \" must be greater than or equal to the current offset \" + this.offset());\n }\n targetOffset = Math.min(targetOffset, this.message.length);\n while (true) {\n var offset = this.offset();\n if (offset === targetOffset) {\n break;\n }\n if (offset > targetOffset) {\n throw Error(\"targetOffset \" + targetOffset + \" is at invalid UTF-16 code unit boundary\");\n }\n this.bump();\n if (this.isEOF()) {\n break;\n }\n }\n };\n /** advance the parser through all whitespace to the next non-whitespace code unit. */\n Parser.prototype.bumpSpace = function () {\n while (!this.isEOF() && _isWhiteSpace(this.char())) {\n this.bump();\n }\n };\n /**\n * Peek at the *next* Unicode codepoint in the input without advancing the parser.\n * If the input has been exhausted, then this returns null.\n */\n Parser.prototype.peek = function () {\n if (this.isEOF()) {\n return null;\n }\n var code = this.char();\n var offset = this.offset();\n var nextCode = this.message.charCodeAt(offset + (code >= 0x10000 ? 2 : 1));\n return nextCode !== null && nextCode !== void 0 ? nextCode : null;\n };\n return Parser;\n}());\nexport { Parser };\n/**\n * This check if codepoint is alphabet (lower & uppercase)\n * @param codepoint\n * @returns\n */\nfunction _isAlpha(codepoint) {\n return ((codepoint >= 97 && codepoint <= 122) ||\n (codepoint >= 65 && codepoint <= 90));\n}\nfunction _isAlphaOrSlash(codepoint) {\n return _isAlpha(codepoint) || codepoint === 47; /* '/' */\n}\n/** See `parseTag` function docs. */\nfunction _isPotentialElementNameChar(c) {\n return (c === 45 /* '-' */ ||\n c === 46 /* '.' */ ||\n (c >= 48 && c <= 57) /* 0..9 */ ||\n c === 95 /* '_' */ ||\n (c >= 97 && c <= 122) /** a..z */ ||\n (c >= 65 && c <= 90) /* A..Z */ ||\n c == 0xb7 ||\n (c >= 0xc0 && c <= 0xd6) ||\n (c >= 0xd8 && c <= 0xf6) ||\n (c >= 0xf8 && c <= 0x37d) ||\n (c >= 0x37f && c <= 0x1fff) ||\n (c >= 0x200c && c <= 0x200d) ||\n (c >= 0x203f && c <= 0x2040) ||\n (c >= 0x2070 && c <= 0x218f) ||\n (c >= 0x2c00 && c <= 0x2fef) ||\n (c >= 0x3001 && c <= 0xd7ff) ||\n (c >= 0xf900 && c <= 0xfdcf) ||\n (c >= 0xfdf0 && c <= 0xfffd) ||\n (c >= 0x10000 && c <= 0xeffff));\n}\n/**\n * Code point equivalent of regex `\\p{White_Space}`.\n * From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n */\nfunction _isWhiteSpace(c) {\n return ((c >= 0x0009 && c <= 0x000d) ||\n c === 0x0020 ||\n c === 0x0085 ||\n (c >= 0x200e && c <= 0x200f) ||\n c === 0x2028 ||\n c === 0x2029);\n}\n/**\n * Code point equivalent of regex `\\p{Pattern_Syntax}`.\n * See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n */\nfunction _isPatternSyntax(c) {\n return ((c >= 0x0021 && c <= 0x0023) ||\n c === 0x0024 ||\n (c >= 0x0025 && c <= 0x0027) ||\n c === 0x0028 ||\n c === 0x0029 ||\n c === 0x002a ||\n c === 0x002b ||\n c === 0x002c ||\n c === 0x002d ||\n (c >= 0x002e && c <= 0x002f) ||\n (c >= 0x003a && c <= 0x003b) ||\n (c >= 0x003c && c <= 0x003e) ||\n (c >= 0x003f && c <= 0x0040) ||\n c === 0x005b ||\n c === 0x005c ||\n c === 0x005d ||\n c === 0x005e ||\n c === 0x0060 ||\n c === 0x007b ||\n c === 0x007c ||\n c === 0x007d ||\n c === 0x007e ||\n c === 0x00a1 ||\n (c >= 0x00a2 && c <= 0x00a5) ||\n c === 0x00a6 ||\n c === 0x00a7 ||\n c === 0x00a9 ||\n c === 0x00ab ||\n c === 0x00ac ||\n c === 0x00ae ||\n c === 0x00b0 ||\n c === 0x00b1 ||\n c === 0x00b6 ||\n c === 0x00bb ||\n c === 0x00bf ||\n c === 0x00d7 ||\n c === 0x00f7 ||\n (c >= 0x2010 && c <= 0x2015) ||\n (c >= 0x2016 && c <= 0x2017) ||\n c === 0x2018 ||\n c === 0x2019 ||\n c === 0x201a ||\n (c >= 0x201b && c <= 0x201c) ||\n c === 0x201d ||\n c === 0x201e ||\n c === 0x201f ||\n (c >= 0x2020 && c <= 0x2027) ||\n (c >= 0x2030 && c <= 0x2038) ||\n c === 0x2039 ||\n c === 0x203a ||\n (c >= 0x203b && c <= 0x203e) ||\n (c >= 0x2041 && c <= 0x2043) ||\n c === 0x2044 ||\n c === 0x2045 ||\n c === 0x2046 ||\n (c >= 0x2047 && c <= 0x2051) ||\n c === 0x2052 ||\n c === 0x2053 ||\n (c >= 0x2055 && c <= 0x205e) ||\n (c >= 0x2190 && c <= 0x2194) ||\n (c >= 0x2195 && c <= 0x2199) ||\n (c >= 0x219a && c <= 0x219b) ||\n (c >= 0x219c && c <= 0x219f) ||\n c === 0x21a0 ||\n (c >= 0x21a1 && c <= 0x21a2) ||\n c === 0x21a3 ||\n (c >= 0x21a4 && c <= 0x21a5) ||\n c === 0x21a6 ||\n (c >= 0x21a7 && c <= 0x21ad) ||\n c === 0x21ae ||\n (c >= 0x21af && c <= 0x21cd) ||\n (c >= 0x21ce && c <= 0x21cf) ||\n (c >= 0x21d0 && c <= 0x21d1) ||\n c === 0x21d2 ||\n c === 0x21d3 ||\n c === 0x21d4 ||\n (c >= 0x21d5 && c <= 0x21f3) ||\n (c >= 0x21f4 && c <= 0x22ff) ||\n (c >= 0x2300 && c <= 0x2307) ||\n c === 0x2308 ||\n c === 0x2309 ||\n c === 0x230a ||\n c === 0x230b ||\n (c >= 0x230c && c <= 0x231f) ||\n (c >= 0x2320 && c <= 0x2321) ||\n (c >= 0x2322 && c <= 0x2328) ||\n c === 0x2329 ||\n c === 0x232a ||\n (c >= 0x232b && c <= 0x237b) ||\n c === 0x237c ||\n (c >= 0x237d && c <= 0x239a) ||\n (c >= 0x239b && c <= 0x23b3) ||\n (c >= 0x23b4 && c <= 0x23db) ||\n (c >= 0x23dc && c <= 0x23e1) ||\n (c >= 0x23e2 && c <= 0x2426) ||\n (c >= 0x2427 && c <= 0x243f) ||\n (c >= 0x2440 && c <= 0x244a) ||\n (c >= 0x244b && c <= 0x245f) ||\n (c >= 0x2500 && c <= 0x25b6) ||\n c === 0x25b7 ||\n (c >= 0x25b8 && c <= 0x25c0) ||\n c === 0x25c1 ||\n (c >= 0x25c2 && c <= 0x25f7) ||\n (c >= 0x25f8 && c <= 0x25ff) ||\n (c >= 0x2600 && c <= 0x266e) ||\n c === 0x266f ||\n (c >= 0x2670 && c <= 0x2767) ||\n c === 0x2768 ||\n c === 0x2769 ||\n c === 0x276a ||\n c === 0x276b ||\n c === 0x276c ||\n c === 0x276d ||\n c === 0x276e ||\n c === 0x276f ||\n c === 0x2770 ||\n c === 0x2771 ||\n c === 0x2772 ||\n c === 0x2773 ||\n c === 0x2774 ||\n c === 0x2775 ||\n (c >= 0x2794 && c <= 0x27bf) ||\n (c >= 0x27c0 && c <= 0x27c4) ||\n c === 0x27c5 ||\n c === 0x27c6 ||\n (c >= 0x27c7 && c <= 0x27e5) ||\n c === 0x27e6 ||\n c === 0x27e7 ||\n c === 0x27e8 ||\n c === 0x27e9 ||\n c === 0x27ea ||\n c === 0x27eb ||\n c === 0x27ec ||\n c === 0x27ed ||\n c === 0x27ee ||\n c === 0x27ef ||\n (c >= 0x27f0 && c <= 0x27ff) ||\n (c >= 0x2800 && c <= 0x28ff) ||\n (c >= 0x2900 && c <= 0x2982) ||\n c === 0x2983 ||\n c === 0x2984 ||\n c === 0x2985 ||\n c === 0x2986 ||\n c === 0x2987 ||\n c === 0x2988 ||\n c === 0x2989 ||\n c === 0x298a ||\n c === 0x298b ||\n c === 0x298c ||\n c === 0x298d ||\n c === 0x298e ||\n c === 0x298f ||\n c === 0x2990 ||\n c === 0x2991 ||\n c === 0x2992 ||\n c === 0x2993 ||\n c === 0x2994 ||\n c === 0x2995 ||\n c === 0x2996 ||\n c === 0x2997 ||\n c === 0x2998 ||\n (c >= 0x2999 && c <= 0x29d7) ||\n c === 0x29d8 ||\n c === 0x29d9 ||\n c === 0x29da ||\n c === 0x29db ||\n (c >= 0x29dc && c <= 0x29fb) ||\n c === 0x29fc ||\n c === 0x29fd ||\n (c >= 0x29fe && c <= 0x2aff) ||\n (c >= 0x2b00 && c <= 0x2b2f) ||\n (c >= 0x2b30 && c <= 0x2b44) ||\n (c >= 0x2b45 && c <= 0x2b46) ||\n (c >= 0x2b47 && c <= 0x2b4c) ||\n (c >= 0x2b4d && c <= 0x2b73) ||\n (c >= 0x2b74 && c <= 0x2b75) ||\n (c >= 0x2b76 && c <= 0x2b95) ||\n c === 0x2b96 ||\n (c >= 0x2b97 && c <= 0x2bff) ||\n (c >= 0x2e00 && c <= 0x2e01) ||\n c === 0x2e02 ||\n c === 0x2e03 ||\n c === 0x2e04 ||\n c === 0x2e05 ||\n (c >= 0x2e06 && c <= 0x2e08) ||\n c === 0x2e09 ||\n c === 0x2e0a ||\n c === 0x2e0b ||\n c === 0x2e0c ||\n c === 0x2e0d ||\n (c >= 0x2e0e && c <= 0x2e16) ||\n c === 0x2e17 ||\n (c >= 0x2e18 && c <= 0x2e19) ||\n c === 0x2e1a ||\n c === 0x2e1b ||\n c === 0x2e1c ||\n c === 0x2e1d ||\n (c >= 0x2e1e && c <= 0x2e1f) ||\n c === 0x2e20 ||\n c === 0x2e21 ||\n c === 0x2e22 ||\n c === 0x2e23 ||\n c === 0x2e24 ||\n c === 0x2e25 ||\n c === 0x2e26 ||\n c === 0x2e27 ||\n c === 0x2e28 ||\n c === 0x2e29 ||\n (c >= 0x2e2a && c <= 0x2e2e) ||\n c === 0x2e2f ||\n (c >= 0x2e30 && c <= 0x2e39) ||\n (c >= 0x2e3a && c <= 0x2e3b) ||\n (c >= 0x2e3c && c <= 0x2e3f) ||\n c === 0x2e40 ||\n c === 0x2e41 ||\n c === 0x2e42 ||\n (c >= 0x2e43 && c <= 0x2e4f) ||\n (c >= 0x2e50 && c <= 0x2e51) ||\n c === 0x2e52 ||\n (c >= 0x2e53 && c <= 0x2e7f) ||\n (c >= 0x3001 && c <= 0x3003) ||\n c === 0x3008 ||\n c === 0x3009 ||\n c === 0x300a ||\n c === 0x300b ||\n c === 0x300c ||\n c === 0x300d ||\n c === 0x300e ||\n c === 0x300f ||\n c === 0x3010 ||\n c === 0x3011 ||\n (c >= 0x3012 && c <= 0x3013) ||\n c === 0x3014 ||\n c === 0x3015 ||\n c === 0x3016 ||\n c === 0x3017 ||\n c === 0x3018 ||\n c === 0x3019 ||\n c === 0x301a ||\n c === 0x301b ||\n c === 0x301c ||\n c === 0x301d ||\n (c >= 0x301e && c <= 0x301f) ||\n c === 0x3020 ||\n c === 0x3030 ||\n c === 0xfd3e ||\n c === 0xfd3f ||\n (c >= 0xfe45 && c <= 0xfe46));\n}\n","import { __assign } from \"tslib\";\nimport { ErrorKind } from './error';\nimport { Parser } from './parser';\nimport { isDateElement, isDateTimeSkeleton, isNumberElement, isNumberSkeleton, isPluralElement, isSelectElement, isTagElement, isTimeElement, } from './types';\nfunction pruneLocation(els) {\n els.forEach(function (el) {\n delete el.location;\n if (isSelectElement(el) || isPluralElement(el)) {\n for (var k in el.options) {\n delete el.options[k].location;\n pruneLocation(el.options[k].value);\n }\n }\n else if (isNumberElement(el) && isNumberSkeleton(el.style)) {\n delete el.style.location;\n }\n else if ((isDateElement(el) || isTimeElement(el)) &&\n isDateTimeSkeleton(el.style)) {\n delete el.style.location;\n }\n else if (isTagElement(el)) {\n pruneLocation(el.children);\n }\n });\n}\nexport function parse(message, opts) {\n if (opts === void 0) { opts = {}; }\n opts = __assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);\n var result = new Parser(message, opts).parse();\n if (result.err) {\n var error = SyntaxError(ErrorKind[result.err.kind]);\n // @ts-expect-error Assign to error object\n error.location = result.err.location;\n // @ts-expect-error Assign to error object\n error.originalMessage = result.err.message;\n throw error;\n }\n if (!(opts === null || opts === void 0 ? void 0 : opts.captureLocation)) {\n pruneLocation(result.val);\n }\n return result.val;\n}\nexport * from './types';\n","//\n// Main\n//\nexport default function memoize(fn, options) {\n var cache = options && options.cache ? options.cache : cacheDefault;\n var serializer = options && options.serializer ? options.serializer : serializerDefault;\n var strategy = options && options.strategy ? options.strategy : strategyDefault;\n return strategy(fn, {\n cache: cache,\n serializer: serializer,\n });\n}\n//\n// Strategy\n//\nfunction isPrimitive(value) {\n return (value == null || typeof value === 'number' || typeof value === 'boolean'); // || typeof value === \"string\" 'unsafe' primitive for our needs\n}\nfunction monadic(fn, cache, serializer, arg) {\n var cacheKey = isPrimitive(arg) ? arg : serializer(arg);\n var computedValue = cache.get(cacheKey);\n if (typeof computedValue === 'undefined') {\n computedValue = fn.call(this, arg);\n cache.set(cacheKey, computedValue);\n }\n return computedValue;\n}\nfunction variadic(fn, cache, serializer) {\n var args = Array.prototype.slice.call(arguments, 3);\n var cacheKey = serializer(args);\n var computedValue = cache.get(cacheKey);\n if (typeof computedValue === 'undefined') {\n computedValue = fn.apply(this, args);\n cache.set(cacheKey, computedValue);\n }\n return computedValue;\n}\nfunction assemble(fn, context, strategy, cache, serialize) {\n return strategy.bind(context, fn, cache, serialize);\n}\nfunction strategyDefault(fn, options) {\n var strategy = fn.length === 1 ? monadic : variadic;\n return assemble(fn, this, strategy, options.cache.create(), options.serializer);\n}\nfunction strategyVariadic(fn, options) {\n return assemble(fn, this, variadic, options.cache.create(), options.serializer);\n}\nfunction strategyMonadic(fn, options) {\n return assemble(fn, this, monadic, options.cache.create(), options.serializer);\n}\n//\n// Serializer\n//\nvar serializerDefault = function () {\n return JSON.stringify(arguments);\n};\n//\n// Cache\n//\nfunction ObjectWithoutPrototypeCache() {\n this.cache = Object.create(null);\n}\nObjectWithoutPrototypeCache.prototype.has = function (key) {\n return key in this.cache;\n};\nObjectWithoutPrototypeCache.prototype.get = function (key) {\n return this.cache[key];\n};\nObjectWithoutPrototypeCache.prototype.set = function (key, value) {\n this.cache[key] = value;\n};\nvar cacheDefault = {\n create: function create() {\n // @ts-ignore\n return new ObjectWithoutPrototypeCache();\n },\n};\nexport var strategies = {\n variadic: strategyVariadic,\n monadic: strategyMonadic,\n};\n","import { __extends } from \"tslib\";\nexport var ErrorCode;\n(function (ErrorCode) {\n // When we have a placeholder but no value to format\n ErrorCode[\"MISSING_VALUE\"] = \"MISSING_VALUE\";\n // When value supplied is invalid\n ErrorCode[\"INVALID_VALUE\"] = \"INVALID_VALUE\";\n // When we need specific Intl API but it's not available\n ErrorCode[\"MISSING_INTL_API\"] = \"MISSING_INTL_API\";\n})(ErrorCode || (ErrorCode = {}));\nvar FormatError = /** @class */ (function (_super) {\n __extends(FormatError, _super);\n function FormatError(msg, code, originalMessage) {\n var _this = _super.call(this, msg) || this;\n _this.code = code;\n _this.originalMessage = originalMessage;\n return _this;\n }\n FormatError.prototype.toString = function () {\n return \"[formatjs Error: \" + this.code + \"] \" + this.message;\n };\n return FormatError;\n}(Error));\nexport { FormatError };\nvar InvalidValueError = /** @class */ (function (_super) {\n __extends(InvalidValueError, _super);\n function InvalidValueError(variableId, value, options, originalMessage) {\n return _super.call(this, \"Invalid values for \\\"\" + variableId + \"\\\": \\\"\" + value + \"\\\". Options are \\\"\" + Object.keys(options).join('\", \"') + \"\\\"\", ErrorCode.INVALID_VALUE, originalMessage) || this;\n }\n return InvalidValueError;\n}(FormatError));\nexport { InvalidValueError };\nvar InvalidValueTypeError = /** @class */ (function (_super) {\n __extends(InvalidValueTypeError, _super);\n function InvalidValueTypeError(value, type, originalMessage) {\n return _super.call(this, \"Value for \\\"\" + value + \"\\\" must be of type \" + type, ErrorCode.INVALID_VALUE, originalMessage) || this;\n }\n return InvalidValueTypeError;\n}(FormatError));\nexport { InvalidValueTypeError };\nvar MissingValueError = /** @class */ (function (_super) {\n __extends(MissingValueError, _super);\n function MissingValueError(variableId, originalMessage) {\n return _super.call(this, \"The intl string context variable \\\"\" + variableId + \"\\\" was not provided to the string \\\"\" + originalMessage + \"\\\"\", ErrorCode.MISSING_VALUE, originalMessage) || this;\n }\n return MissingValueError;\n}(FormatError));\nexport { MissingValueError };\n","import { isArgumentElement, isDateElement, isDateTimeSkeleton, isLiteralElement, isNumberElement, isNumberSkeleton, isPluralElement, isPoundElement, isSelectElement, isTimeElement, isTagElement, } from '@formatjs/icu-messageformat-parser';\nimport { MissingValueError, InvalidValueError, ErrorCode, FormatError, InvalidValueTypeError, } from './error';\nexport var PART_TYPE;\n(function (PART_TYPE) {\n PART_TYPE[PART_TYPE[\"literal\"] = 0] = \"literal\";\n PART_TYPE[PART_TYPE[\"object\"] = 1] = \"object\";\n})(PART_TYPE || (PART_TYPE = {}));\nfunction mergeLiteral(parts) {\n if (parts.length < 2) {\n return parts;\n }\n return parts.reduce(function (all, part) {\n var lastPart = all[all.length - 1];\n if (!lastPart ||\n lastPart.type !== PART_TYPE.literal ||\n part.type !== PART_TYPE.literal) {\n all.push(part);\n }\n else {\n lastPart.value += part.value;\n }\n return all;\n }, []);\n}\nexport function isFormatXMLElementFn(el) {\n return typeof el === 'function';\n}\n// TODO(skeleton): add skeleton support\nexport function formatToParts(els, locales, formatters, formats, values, currentPluralValue, \n// For debugging\noriginalMessage) {\n // Hot path for straight simple msg translations\n if (els.length === 1 && isLiteralElement(els[0])) {\n return [\n {\n type: PART_TYPE.literal,\n value: els[0].value,\n },\n ];\n }\n var result = [];\n for (var _i = 0, els_1 = els; _i < els_1.length; _i++) {\n var el = els_1[_i];\n // Exit early for string parts.\n if (isLiteralElement(el)) {\n result.push({\n type: PART_TYPE.literal,\n value: el.value,\n });\n continue;\n }\n // TODO: should this part be literal type?\n // Replace `#` in plural rules with the actual numeric value.\n if (isPoundElement(el)) {\n if (typeof currentPluralValue === 'number') {\n result.push({\n type: PART_TYPE.literal,\n value: formatters.getNumberFormat(locales).format(currentPluralValue),\n });\n }\n continue;\n }\n var varName = el.value;\n // Enforce that all required values are provided by the caller.\n if (!(values && varName in values)) {\n throw new MissingValueError(varName, originalMessage);\n }\n var value = values[varName];\n if (isArgumentElement(el)) {\n if (!value || typeof value === 'string' || typeof value === 'number') {\n value =\n typeof value === 'string' || typeof value === 'number'\n ? String(value)\n : '';\n }\n result.push({\n type: typeof value === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n value: value,\n });\n continue;\n }\n // Recursively format plural and select parts' option — which can be a\n // nested pattern structure. The choosing of the option to use is\n // abstracted-by and delegated-to the part helper object.\n if (isDateElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.date[el.style]\n : isDateTimeSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTimeElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.time[el.style]\n : isDateTimeSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isNumberElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.number[el.style]\n : isNumberSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n if (style && style.scale) {\n value =\n value *\n (style.scale || 1);\n }\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getNumberFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTagElement(el)) {\n var children = el.children, value_1 = el.value;\n var formatFn = values[value_1];\n if (!isFormatXMLElementFn(formatFn)) {\n throw new InvalidValueTypeError(value_1, 'function', originalMessage);\n }\n var parts = formatToParts(children, locales, formatters, formats, values, currentPluralValue);\n var chunks = formatFn(parts.map(function (p) { return p.value; }));\n if (!Array.isArray(chunks)) {\n chunks = [chunks];\n }\n result.push.apply(result, chunks.map(function (c) {\n return {\n type: typeof c === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n value: c,\n };\n }));\n }\n if (isSelectElement(el)) {\n var opt = el.options[value] || el.options.other;\n if (!opt) {\n throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));\n continue;\n }\n if (isPluralElement(el)) {\n var opt = el.options[\"=\" + value];\n if (!opt) {\n if (!Intl.PluralRules) {\n throw new FormatError(\"Intl.PluralRules is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-pluralrules\\\"\\n\", ErrorCode.MISSING_INTL_API, originalMessage);\n }\n var rule = formatters\n .getPluralRules(locales, { type: el.pluralType })\n .select(value - (el.offset || 0));\n opt = el.options[rule] || el.options.other;\n }\n if (!opt) {\n throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0)));\n continue;\n }\n }\n return mergeLiteral(result);\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\nimport { __assign, __spreadArray } from \"tslib\";\nimport { parse } from '@formatjs/icu-messageformat-parser';\nimport memoize, { strategies } from '@formatjs/fast-memoize';\nimport { formatToParts, PART_TYPE, } from './formatters';\n// -- MessageFormat --------------------------------------------------------\nfunction mergeConfig(c1, c2) {\n if (!c2) {\n return c1;\n }\n return __assign(__assign(__assign({}, (c1 || {})), (c2 || {})), Object.keys(c1).reduce(function (all, k) {\n all[k] = __assign(__assign({}, c1[k]), (c2[k] || {}));\n return all;\n }, {}));\n}\nfunction mergeConfigs(defaultConfig, configs) {\n if (!configs) {\n return defaultConfig;\n }\n return Object.keys(defaultConfig).reduce(function (all, k) {\n all[k] = mergeConfig(defaultConfig[k], configs[k]);\n return all;\n }, __assign({}, defaultConfig));\n}\nfunction createFastMemoizeCache(store) {\n return {\n create: function () {\n return {\n has: function (key) {\n return key in store;\n },\n get: function (key) {\n return store[key];\n },\n set: function (key, value) {\n store[key] = value;\n },\n };\n },\n };\n}\nfunction createDefaultFormatters(cache) {\n if (cache === void 0) { cache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n }; }\n return {\n getNumberFormat: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();\n }, {\n cache: createFastMemoizeCache(cache.number),\n strategy: strategies.variadic,\n }),\n getDateTimeFormat: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();\n }, {\n cache: createFastMemoizeCache(cache.dateTime),\n strategy: strategies.variadic,\n }),\n getPluralRules: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();\n }, {\n cache: createFastMemoizeCache(cache.pluralRules),\n strategy: strategies.variadic,\n }),\n };\n}\nvar IntlMessageFormat = /** @class */ (function () {\n function IntlMessageFormat(message, locales, overrideFormats, opts) {\n var _this = this;\n if (locales === void 0) { locales = IntlMessageFormat.defaultLocale; }\n this.formatterCache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n };\n this.format = function (values) {\n var parts = _this.formatToParts(values);\n // Hot path for straight simple msg translations\n if (parts.length === 1) {\n return parts[0].value;\n }\n var result = parts.reduce(function (all, part) {\n if (!all.length ||\n part.type !== PART_TYPE.literal ||\n typeof all[all.length - 1] !== 'string') {\n all.push(part.value);\n }\n else {\n all[all.length - 1] += part.value;\n }\n return all;\n }, []);\n if (result.length <= 1) {\n return result[0] || '';\n }\n return result;\n };\n this.formatToParts = function (values) {\n return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, undefined, _this.message);\n };\n this.resolvedOptions = function () { return ({\n locale: Intl.NumberFormat.supportedLocalesOf(_this.locales)[0],\n }); };\n this.getAst = function () { return _this.ast; };\n if (typeof message === 'string') {\n this.message = message;\n if (!IntlMessageFormat.__parse) {\n throw new TypeError('IntlMessageFormat.__parse must be set to process `message` of type `string`');\n }\n // Parse string messages into an AST.\n this.ast = IntlMessageFormat.__parse(message, {\n ignoreTag: opts === null || opts === void 0 ? void 0 : opts.ignoreTag,\n });\n }\n else {\n this.ast = message;\n }\n if (!Array.isArray(this.ast)) {\n throw new TypeError('A message must be provided as a String or AST.');\n }\n // Creates a new object with the specified `formats` merged with the default\n // formats.\n this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);\n // Defined first because it's used to build the format pattern.\n this.locales = locales;\n this.formatters =\n (opts && opts.formatters) || createDefaultFormatters(this.formatterCache);\n }\n Object.defineProperty(IntlMessageFormat, \"defaultLocale\", {\n get: function () {\n if (!IntlMessageFormat.memoizedDefaultLocale) {\n IntlMessageFormat.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale;\n }\n return IntlMessageFormat.memoizedDefaultLocale;\n },\n enumerable: false,\n configurable: true\n });\n IntlMessageFormat.memoizedDefaultLocale = null;\n IntlMessageFormat.__parse = parse;\n // Default format options used as the prototype of the `formats` provided to the\n // constructor. These are used when constructing the internal Intl.NumberFormat\n // and Intl.DateTimeFormat instances.\n IntlMessageFormat.formats = {\n number: {\n currency: {\n style: 'currency',\n },\n percent: {\n style: 'percent',\n },\n },\n date: {\n short: {\n month: 'numeric',\n day: 'numeric',\n year: '2-digit',\n },\n medium: {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n },\n long: {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n full: {\n weekday: 'long',\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n },\n time: {\n short: {\n hour: 'numeric',\n minute: 'numeric',\n },\n medium: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n },\n long: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n full: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n },\n };\n return IntlMessageFormat;\n}());\nexport { IntlMessageFormat };\n","import{writable as e,derived as n}from\"svelte/store\";import t from\"deepmerge\";import o from\"intl-messageformat\";const r={},i=(e,n,t)=>t?(n in r||(r[n]={}),e in r[n]||(r[n][e]=t),t):t,a=(e,n)=>{if(null==n)return;if(n in r&&e in r[n])return r[n][e];const t=E(n);for(let o=0;o0){const n=t.slice(e,t.length).join(\".\");if(n in o){o=o[n];break}}o=o[t[e]]}else o=void 0;return o}(function(e){return l[e]||null}(e),n)}function m(e,...n){delete r[e],s.update((o=>(o[e]=t.all([o[e]||{},...n]),o)))}const f=n([s],(([e])=>Object.keys(e)));s.subscribe((e=>l=e));const d={};function g(e){return d[e]}function w(e){return E(e).some((e=>{var n;return null===(n=g(e))||void 0===n?void 0:n.size}))}function h(e,n){return Promise.all(n.map((n=>(function(e,n){d[e].delete(n),0===d[e].size&&delete d[e]}(e,n),n().then((e=>e.default||e)))))).then((n=>m(e,...n)))}const p={};function b(e){if(!w(e))return e in p?p[e]:void 0;const n=function(e){return E(e).map((e=>{const n=g(e);return[e,n?[...n]:[]]})).filter((([,e])=>e.length>0))}(e);return p[e]=Promise.all(n.map((([e,n])=>h(e,n)))).then((()=>{if(w(e))return b(e);delete p[e]})),p[e]}function y(e,n){g(e)||function(e){d[e]=new Set}(e);const t=g(e);g(e).has(n)||(u(e)||s.update((n=>(n[e]={},n))),t.add(n))}\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */function v(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);rt.slice(0,n+1).join(\"-\"))).reverse()}function E(e,n=j().fallbackLocale){const t=x(e);return n?[...new Set([...t,...x(n)])]:t}function D(){return L}T.subscribe((e=>{L=e,\"undefined\"!=typeof window&&null!==e&&document.documentElement.setAttribute(\"lang\",e)}));const M=T.set;T.set=e=>{if(function(e){if(null==e)return;const n=E(e);for(let e=0;ek.set(!0)),n):k.set(!0),b(e).then((()=>{M(e)})).finally((()=>{clearTimeout(t),k.set(!1)}))}return M(e)},T.update=e=>M(e(L));const S=(e,n)=>{const t=e.split(\"&\").find((e=>0===e.indexOf(`${n}=`)));return t?t.split(\"=\").pop():null},N=(e,n)=>{const t=n.exec(e);return t&&t[1]||null},P=e=>\"undefined\"==typeof window?null:N(window.location.hostname,e),A=e=>\"undefined\"==typeof window?null:N(window.location.pathname,e),I=()=>\"undefined\"==typeof window?null:window.navigator.language||window.navigator.languages[0],F=e=>\"undefined\"==typeof window?null:S(window.location.search.substr(1),e),z=e=>\"undefined\"==typeof window?null:S(window.location.hash.substr(1),e),Z=e=>{const n=Object.create(null);return t=>{const o=JSON.stringify(t);return o in n?n[o]:n[o]=e(t)}},C=(e,n)=>{const{formats:t}=j();if(e in t&&n in t[e])return t[e][n];throw new Error(`[svelte-i18n] Unknown \"${n}\" ${e} format.`)},G=Z((e=>{var{locale:n,format:t}=e,o=v(e,[\"locale\",\"format\"]);if(null==n)throw new Error('[svelte-i18n] A \"locale\" must be set to format numbers');return t&&(o=C(\"number\",t)),new Intl.NumberFormat(n,o)})),J=Z((e=>{var{locale:n,format:t}=e,o=v(e,[\"locale\",\"format\"]);if(null==n)throw new Error('[svelte-i18n] A \"locale\" must be set to format dates');return t?o=C(\"date\",t):0===Object.keys(o).length&&(o=C(\"date\",\"short\")),new Intl.DateTimeFormat(n,o)})),U=Z((e=>{var{locale:n,format:t}=e,o=v(e,[\"locale\",\"format\"]);if(null==n)throw new Error('[svelte-i18n] A \"locale\" must be set to format time values');return t?o=C(\"time\",t):0===Object.keys(o).length&&(o=C(\"time\",\"short\")),new Intl.DateTimeFormat(n,o)})),_=(e={})=>{var{locale:n=D()}=e,t=v(e,[\"locale\"]);return G(Object.assign({locale:n},t))},q=(e={})=>{var{locale:n=D()}=e,t=v(e,[\"locale\"]);return J(Object.assign({locale:n},t))},B=(e={})=>{var{locale:n=D()}=e,t=v(e,[\"locale\"]);return U(Object.assign({locale:n},t))},H=Z(((e,n=D())=>new o(e,n,j().formats,{ignoreTag:j().ignoreTag}))),K=(e,n={})=>{\"object\"==typeof e&&(e=(n=e).id);const{values:t,locale:o=D(),default:r}=n;if(null==o)throw new Error(\"[svelte-i18n] Cannot format a message without first setting the initial locale.\");let i=a(e,o);if(i){if(\"string\"!=typeof i)return console.warn(`[svelte-i18n] Message with id \"${e}\" must be of type \"string\", found: \"${typeof i}\". Gettin its value through the \"$format\" method is deprecated; use the \"json\" method instead.`),i}else j().warnOnMissingMessages&&console.warn(`[svelte-i18n] The message \"${e}\" was not found in \"${E(o).join('\", \"')}\".${w(D())?\"\\n\\nNote: there are at least one loader still registered to this locale that wasn't executed.\":\"\"}`),i=r||e;if(!t)return i;let l=i;try{l=H(i,o).format(t)}catch(n){console.warn(`[svelte-i18n] Message \"${e}\" has syntax error:`,n.message)}return l},Q=(e,n)=>B(n).format(e),R=(e,n)=>q(n).format(e),V=(e,n)=>_(n).format(e),W=(e,n=D())=>a(e,n),X=n([T,s],(()=>K)),Y=n([T],(()=>Q)),ee=n([T],(()=>R)),ne=n([T],(()=>V)),te=n([T,s],(()=>W));function oe(e){return e}function re(e){return b(e||D()||j().initialLocale)}export{X as _,m as addMessages,ee as date,oe as defineMessages,s as dictionary,X as format,q as getDateFormatter,z as getLocaleFromHash,P as getLocaleFromHostname,I as getLocaleFromNavigator,A as getLocaleFromPathname,F as getLocaleFromQueryString,H as getMessageFormatter,_ as getNumberFormatter,B as getTimeFormatter,$ as init,k as isLoading,te as json,T as locale,f as locales,ne as number,y as register,X as t,Y as time,re as waitLocale};\n","\n\n

    \n {@html $_('results_text', {\n values: {\n points: `${quiz.points}`,\n total: `${quiz.counter.max}`,\n },\n })}\n

    \n\n
      \n {#each quiz.questions as question, i}\n
    1. quiz.jump(i)}\">\n \n {emojis[+question.solved]}\n Q{i + 1}:{@html question.text}\n \n
        \n \n {#each question.selected as selected}\n {#if question.answers[selected].comment !== ''}\n
      1. \n {@html question.answers[selected].html}:\n {@html question.answers[selected].comment}\n
      2. \n {/if}\n {/each}\n
      \n
    2. \n {/each}\n
    \n\n\n","\n\n{#if $counter === counter.max}\n \n

    {$_('results_title')}

    \n \n{:else}\n \n \n

    Q{$counter + 1}: {@html current.text}

    \n \n {#if current.explanation !== null && current.explanation !== ''}\n

    {@html current.explanation}

    \n {/if}\n \n{/if}\n","\n\n\n\n\n","\n\n
    \n {#if $counter === counter.max}\n \n \n {:else}\n \n (show_hint = !show_hint)}\">{$_('hint')}\n {#if $finished}\n \n \n {:else if $counter === counter.max - 1}\n \n \n {:else}\n \n {/if}\n {/if}\n
    \n\n{#if show_hint}\n

    💡 {@html current.hint}

    \n{/if}\n\n
    \n\n\n","import { writable } from '../store/index.mjs';\nimport { now, loop, assign } from '../internal/index.mjs';\nimport { linear } from '../easing/index.mjs';\n\nfunction is_date(obj) {\n\treturn Object.prototype.toString.call(obj) === '[object Date]';\n}\n\nfunction tick_spring(ctx, last_value, current_value, target_value) {\n\tif (typeof current_value === 'number' || is_date(current_value)) {\n\t\t// @ts-ignore\n\t\tconst delta = target_value - current_value;\n\t\t// @ts-ignore\n\t\tconst velocity = (current_value - last_value) / (ctx.dt || 1 / 60); // guard div by 0\n\t\tconst spring = ctx.opts.stiffness * delta;\n\t\tconst damper = ctx.opts.damping * velocity;\n\t\tconst acceleration = (spring - damper) * ctx.inv_mass;\n\t\tconst d = (velocity + acceleration) * ctx.dt;\n\n\t\tif (Math.abs(d) < ctx.opts.precision && Math.abs(delta) < ctx.opts.precision) {\n\t\t\treturn target_value; // settled\n\t\t} else {\n\t\t\tctx.settled = false; // signal loop to keep ticking\n\t\t\t// @ts-ignore\n\t\t\treturn is_date(current_value) ?\n\t\t\t\tnew Date(current_value.getTime() + d) : current_value + d;\n\t\t}\n\t} else if (Array.isArray(current_value)) {\n\t\t// @ts-ignore\n\t\treturn current_value.map((_, i) =>\n\t\t\ttick_spring(ctx, last_value[i], current_value[i], target_value[i]));\n\t} else if (typeof current_value === 'object') {\n\t\tconst next_value = {};\n\t\tfor (const k in current_value) {\n\t\t\t// @ts-ignore\n\t\t\tnext_value[k] = tick_spring(ctx, last_value[k], current_value[k], target_value[k]);\n\t\t}\n\t\t// @ts-ignore\n\t\treturn next_value;\n\t} else {\n\t\tthrow new Error(`Cannot spring ${typeof current_value} values`);\n\t}\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction spring(value, opts = {}) {\n\tconst store = writable(value);\n\tconst { stiffness = 0.15, damping = 0.8, precision = 0.01 } = opts;\n\n\tlet last_time;\n\tlet task;\n\tlet current_token;\n\tlet last_value = value;\n\tlet target_value = value;\n\n\tlet inv_mass = 1;\n\tlet inv_mass_recovery_rate = 0;\n\tlet cancel_task = false;\n\n\tfunction set(new_value, opts = {}) {\n\t\ttarget_value = new_value;\n\t\tconst token = current_token = {};\n\n\t\tif (value == null || opts.hard || (spring.stiffness >= 1 && spring.damping >= 1)) {\n\t\t\tcancel_task = true; // cancel any running animation\n\t\t\tlast_time = now();\n\t\t\tlast_value = new_value;\n\t\t\tstore.set(value = target_value);\n\t\t\treturn Promise.resolve();\n\t\t} else if (opts.soft) {\n\t\t\tconst rate = opts.soft === true ? .5 : +opts.soft;\n\t\t\tinv_mass_recovery_rate = 1 / (rate * 60);\n\t\t\tinv_mass = 0; // infinite mass, unaffected by spring forces\n\t\t}\n\n\t\tif (!task) {\n\t\t\tlast_time = now();\n\t\t\tcancel_task = false;\n\n\t\t\ttask = loop(now => {\n\n\t\t\t\tif (cancel_task) {\n\t\t\t\t\tcancel_task = false;\n\t\t\t\t\ttask = null;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tinv_mass = Math.min(inv_mass + inv_mass_recovery_rate, 1);\n\n\t\t\t\tconst ctx = {\n\t\t\t\t\tinv_mass,\n\t\t\t\t\topts: spring,\n\t\t\t\t\tsettled: true, // tick_spring may signal false\n\t\t\t\t\tdt: (now - last_time) * 60 / 1000\n\t\t\t\t};\n\t\t\t\tconst next_value = tick_spring(ctx, last_value, value, target_value);\n\n\t\t\t\tlast_time = now;\n\t\t\t\tlast_value = value;\n\t\t\t\tstore.set(value = next_value);\n\n\t\t\t\tif (ctx.settled) {\n\t\t\t\t\ttask = null;\n\t\t\t\t}\n\t\t\t\treturn !ctx.settled;\n\t\t\t});\n\t\t}\n\n\t\treturn new Promise(fulfil => {\n\t\t\ttask.promise.then(() => {\n\t\t\t\tif (token === current_token) fulfil();\n\t\t\t});\n\t\t});\n\t}\n\n\tconst spring = {\n\t\tset,\n\t\tupdate: (fn, opts) => set(fn(target_value, value), opts),\n\t\tsubscribe: store.subscribe,\n\t\tstiffness,\n\t\tdamping,\n\t\tprecision\n\t};\n\n\treturn spring;\n}\n\nfunction get_interpolator(a, b) {\n\tif (a === b || a !== a) return () => a;\n\n\tconst type = typeof a;\n\n\tif (type !== typeof b || Array.isArray(a) !== Array.isArray(b)) {\n\t\tthrow new Error('Cannot interpolate values of different type');\n\t}\n\n\tif (Array.isArray(a)) {\n\t\tconst arr = b.map((bi, i) => {\n\t\t\treturn get_interpolator(a[i], bi);\n\t\t});\n\n\t\treturn t => arr.map(fn => fn(t));\n\t}\n\n\tif (type === 'object') {\n\t\tif (!a || !b) throw new Error('Object cannot be null');\n\n\t\tif (is_date(a) && is_date(b)) {\n\t\t\ta = a.getTime();\n\t\t\tb = b.getTime();\n\t\t\tconst delta = b - a;\n\t\t\treturn t => new Date(a + t * delta);\n\t\t}\n\n\t\tconst keys = Object.keys(b);\n\t\tconst interpolators = {};\n\n\t\tkeys.forEach(key => {\n\t\t\tinterpolators[key] = get_interpolator(a[key], b[key]);\n\t\t});\n\n\t\treturn t => {\n\t\t\tconst result = {};\n\t\t\tkeys.forEach(key => {\n\t\t\t\tresult[key] = interpolators[key](t);\n\t\t\t});\n\t\t\treturn result;\n\t\t};\n\t}\n\n\tif (type === 'number') {\n\t\tconst delta = b - a;\n\t\treturn t => a + t * delta;\n\t}\n\n\tthrow new Error(`Cannot interpolate ${type} values`);\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction tweened(value, defaults = {}) {\n\tconst store = writable(value);\n\n\tlet task;\n\tlet target_value = value;\n\n\tfunction set(new_value, opts) {\n\t\tif (value == null) {\n\t\t\tstore.set(value = new_value);\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\ttarget_value = new_value;\n\n\t\tlet previous_task = task;\n\t\tlet started = false;\n\n\t\tlet {\n\t\t\tdelay = 0,\n\t\t\tduration = 400,\n\t\t\teasing = linear,\n\t\t\tinterpolate = get_interpolator\n\t\t} = assign(assign({}, defaults), opts);\n\n\t\tif (duration === 0) {\n\t\t\tif (previous_task) {\n\t\t\t\tprevious_task.abort();\n\t\t\t\tprevious_task = null;\n\t\t\t}\n\n\t\t\tstore.set(value = target_value);\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\tconst start = now() + delay;\n\t\tlet fn;\n\n\t\ttask = loop(now => {\n\t\t\tif (now < start) return true;\n\n\t\t\tif (!started) {\n\t\t\t\tfn = interpolate(value, new_value);\n\t\t\t\tif (typeof duration === 'function') duration = duration(value, new_value);\n\t\t\t\tstarted = true;\n\t\t\t}\n\n\t\t\tif (previous_task) {\n\t\t\t\tprevious_task.abort();\n\t\t\t\tprevious_task = null;\n\t\t\t}\n\n\t\t\tconst elapsed = now - start;\n\n\t\t\tif (elapsed > duration) {\n\t\t\t\tstore.set(value = new_value);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// @ts-ignore\n\t\t\tstore.set(value = fn(easing(elapsed / duration)));\n\t\t\treturn true;\n\t\t});\n\n\t\treturn task.promise;\n\t}\n\n\treturn {\n\t\tset,\n\t\tupdate: (fn, opts) => set(fn(target_value, value), opts),\n\t\tsubscribe: store.subscribe\n\t};\n}\n\nexport { spring, tweened };\n","\n\n
    \n
    \n
    \n\n\n","import { init, addMessages, getLocaleFromNavigator } from 'svelte-i18n';\nimport en from './en.json';\nimport de from './de.json';\nexport default function (locale) {\n addMessages('de', de);\n addMessages('en', en);\n init({\n fallbackLocale: 'en',\n initialLocale: locale === null ? getLocaleFromNavigator() : locale,\n });\n}\n","\n\n
    \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n\n\n","/**\n * marked - a markdown parser\n * Copyright (c) 2011-2021, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/markedjs/marked\n */\n\n/**\n * DO NOT EDIT THIS FILE\n * The code in this file is generated from files in ./src/\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.marked = factory());\n}(this, (function () { 'use strict';\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n\n function _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it;\n\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n it = o[Symbol.iterator]();\n return it.next.bind(it);\n }\n\n function createCommonjsModule(fn) {\n var module = { exports: {} };\n \treturn fn(module, module.exports), module.exports;\n }\n\n var defaults$5 = createCommonjsModule(function (module) {\n function getDefaults() {\n return {\n baseUrl: null,\n breaks: false,\n gfm: true,\n headerIds: true,\n headerPrefix: '',\n highlight: null,\n langPrefix: 'language-',\n mangle: true,\n pedantic: false,\n renderer: null,\n sanitize: false,\n sanitizer: null,\n silent: false,\n smartLists: false,\n smartypants: false,\n tokenizer: null,\n walkTokens: null,\n xhtml: false\n };\n }\n\n function changeDefaults(newDefaults) {\n module.exports.defaults = newDefaults;\n }\n\n module.exports = {\n defaults: getDefaults(),\n getDefaults: getDefaults,\n changeDefaults: changeDefaults\n };\n });\n\n /**\n * Helpers\n */\n var escapeTest = /[&<>\"']/;\n var escapeReplace = /[&<>\"']/g;\n var escapeTestNoEncode = /[<>\"']|&(?!#?\\w+;)/;\n var escapeReplaceNoEncode = /[<>\"']|&(?!#?\\w+;)/g;\n var escapeReplacements = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n var getEscapeReplacement = function getEscapeReplacement(ch) {\n return escapeReplacements[ch];\n };\n\n function escape$2(html, encode) {\n if (encode) {\n if (escapeTest.test(html)) {\n return html.replace(escapeReplace, getEscapeReplacement);\n }\n } else {\n if (escapeTestNoEncode.test(html)) {\n return html.replace(escapeReplaceNoEncode, getEscapeReplacement);\n }\n }\n\n return html;\n }\n\n var unescapeTest = /&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig;\n\n function unescape$1(html) {\n // explicitly match decimal, hex, and named HTML entities\n return html.replace(unescapeTest, function (_, n) {\n n = n.toLowerCase();\n if (n === 'colon') return ':';\n\n if (n.charAt(0) === '#') {\n return n.charAt(1) === 'x' ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1));\n }\n\n return '';\n });\n }\n\n var caret = /(^|[^\\[])\\^/g;\n\n function edit$1(regex, opt) {\n regex = regex.source || regex;\n opt = opt || '';\n var obj = {\n replace: function replace(name, val) {\n val = val.source || val;\n val = val.replace(caret, '$1');\n regex = regex.replace(name, val);\n return obj;\n },\n getRegex: function getRegex() {\n return new RegExp(regex, opt);\n }\n };\n return obj;\n }\n\n var nonWordAndColonTest = /[^\\w:]/g;\n var originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;\n\n function cleanUrl$1(sanitize, base, href) {\n if (sanitize) {\n var prot;\n\n try {\n prot = decodeURIComponent(unescape$1(href)).replace(nonWordAndColonTest, '').toLowerCase();\n } catch (e) {\n return null;\n }\n\n if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) {\n return null;\n }\n }\n\n if (base && !originIndependentUrl.test(href)) {\n href = resolveUrl(base, href);\n }\n\n try {\n href = encodeURI(href).replace(/%25/g, '%');\n } catch (e) {\n return null;\n }\n\n return href;\n }\n\n var baseUrls = {};\n var justDomain = /^[^:]+:\\/*[^/]*$/;\n var protocol = /^([^:]+:)[\\s\\S]*$/;\n var domain = /^([^:]+:\\/*[^/]*)[\\s\\S]*$/;\n\n function resolveUrl(base, href) {\n if (!baseUrls[' ' + base]) {\n // we can ignore everything in base after the last slash of its path component,\n // but we might need to add _that_\n // https://tools.ietf.org/html/rfc3986#section-3\n if (justDomain.test(base)) {\n baseUrls[' ' + base] = base + '/';\n } else {\n baseUrls[' ' + base] = rtrim$1(base, '/', true);\n }\n }\n\n base = baseUrls[' ' + base];\n var relativeBase = base.indexOf(':') === -1;\n\n if (href.substring(0, 2) === '//') {\n if (relativeBase) {\n return href;\n }\n\n return base.replace(protocol, '$1') + href;\n } else if (href.charAt(0) === '/') {\n if (relativeBase) {\n return href;\n }\n\n return base.replace(domain, '$1') + href;\n } else {\n return base + href;\n }\n }\n\n var noopTest$1 = {\n exec: function noopTest() {}\n };\n\n function merge$2(obj) {\n var i = 1,\n target,\n key;\n\n for (; i < arguments.length; i++) {\n target = arguments[i];\n\n for (key in target) {\n if (Object.prototype.hasOwnProperty.call(target, key)) {\n obj[key] = target[key];\n }\n }\n }\n\n return obj;\n }\n\n function splitCells$1(tableRow, count) {\n // ensure that every cell-delimiting pipe has a space\n // before it to distinguish it from an escaped pipe\n var row = tableRow.replace(/\\|/g, function (match, offset, str) {\n var escaped = false,\n curr = offset;\n\n while (--curr >= 0 && str[curr] === '\\\\') {\n escaped = !escaped;\n }\n\n if (escaped) {\n // odd number of slashes means | is escaped\n // so we leave it alone\n return '|';\n } else {\n // add space before unescaped |\n return ' |';\n }\n }),\n cells = row.split(/ \\|/);\n var i = 0;\n\n if (cells.length > count) {\n cells.splice(count);\n } else {\n while (cells.length < count) {\n cells.push('');\n }\n }\n\n for (; i < cells.length; i++) {\n // leading or trailing whitespace is ignored per the gfm spec\n cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n }\n\n return cells;\n } // Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n // /c*$/ is vulnerable to REDOS.\n // invert: Remove suffix of non-c chars instead. Default falsey.\n\n\n function rtrim$1(str, c, invert) {\n var l = str.length;\n\n if (l === 0) {\n return '';\n } // Length of suffix matching the invert condition.\n\n\n var suffLen = 0; // Step left until we fail to match the invert condition.\n\n while (suffLen < l) {\n var currChar = str.charAt(l - suffLen - 1);\n\n if (currChar === c && !invert) {\n suffLen++;\n } else if (currChar !== c && invert) {\n suffLen++;\n } else {\n break;\n }\n }\n\n return str.substr(0, l - suffLen);\n }\n\n function findClosingBracket$1(str, b) {\n if (str.indexOf(b[1]) === -1) {\n return -1;\n }\n\n var l = str.length;\n var level = 0,\n i = 0;\n\n for (; i < l; i++) {\n if (str[i] === '\\\\') {\n i++;\n } else if (str[i] === b[0]) {\n level++;\n } else if (str[i] === b[1]) {\n level--;\n\n if (level < 0) {\n return i;\n }\n }\n }\n\n return -1;\n }\n\n function checkSanitizeDeprecation$1(opt) {\n if (opt && opt.sanitize && !opt.silent) {\n console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options');\n }\n } // copied from https://stackoverflow.com/a/5450113/806777\n\n\n function repeatString$1(pattern, count) {\n if (count < 1) {\n return '';\n }\n\n var result = '';\n\n while (count > 1) {\n if (count & 1) {\n result += pattern;\n }\n\n count >>= 1;\n pattern += pattern;\n }\n\n return result + pattern;\n }\n\n var helpers = {\n escape: escape$2,\n unescape: unescape$1,\n edit: edit$1,\n cleanUrl: cleanUrl$1,\n resolveUrl: resolveUrl,\n noopTest: noopTest$1,\n merge: merge$2,\n splitCells: splitCells$1,\n rtrim: rtrim$1,\n findClosingBracket: findClosingBracket$1,\n checkSanitizeDeprecation: checkSanitizeDeprecation$1,\n repeatString: repeatString$1\n };\n\n var defaults$4 = defaults$5.defaults;\n var rtrim = helpers.rtrim,\n splitCells = helpers.splitCells,\n _escape = helpers.escape,\n findClosingBracket = helpers.findClosingBracket;\n\n function outputLink(cap, link, raw) {\n var href = link.href;\n var title = link.title ? _escape(link.title) : null;\n var text = cap[1].replace(/\\\\([\\[\\]])/g, '$1');\n\n if (cap[0].charAt(0) !== '!') {\n return {\n type: 'link',\n raw: raw,\n href: href,\n title: title,\n text: text\n };\n } else {\n return {\n type: 'image',\n raw: raw,\n href: href,\n title: title,\n text: _escape(text)\n };\n }\n }\n\n function indentCodeCompensation(raw, text) {\n var matchIndentToCode = raw.match(/^(\\s+)(?:```)/);\n\n if (matchIndentToCode === null) {\n return text;\n }\n\n var indentToCode = matchIndentToCode[1];\n return text.split('\\n').map(function (node) {\n var matchIndentInNode = node.match(/^\\s+/);\n\n if (matchIndentInNode === null) {\n return node;\n }\n\n var indentInNode = matchIndentInNode[0];\n\n if (indentInNode.length >= indentToCode.length) {\n return node.slice(indentToCode.length);\n }\n\n return node;\n }).join('\\n');\n }\n /**\n * Tokenizer\n */\n\n\n var Tokenizer_1 = /*#__PURE__*/function () {\n function Tokenizer(options) {\n this.options = options || defaults$4;\n }\n\n var _proto = Tokenizer.prototype;\n\n _proto.space = function space(src) {\n var cap = this.rules.block.newline.exec(src);\n\n if (cap) {\n if (cap[0].length > 1) {\n return {\n type: 'space',\n raw: cap[0]\n };\n }\n\n return {\n raw: '\\n'\n };\n }\n };\n\n _proto.code = function code(src) {\n var cap = this.rules.block.code.exec(src);\n\n if (cap) {\n var text = cap[0].replace(/^ {1,4}/gm, '');\n return {\n type: 'code',\n raw: cap[0],\n codeBlockStyle: 'indented',\n text: !this.options.pedantic ? rtrim(text, '\\n') : text\n };\n }\n };\n\n _proto.fences = function fences(src) {\n var cap = this.rules.block.fences.exec(src);\n\n if (cap) {\n var raw = cap[0];\n var text = indentCodeCompensation(raw, cap[3] || '');\n return {\n type: 'code',\n raw: raw,\n lang: cap[2] ? cap[2].trim() : cap[2],\n text: text\n };\n }\n };\n\n _proto.heading = function heading(src) {\n var cap = this.rules.block.heading.exec(src);\n\n if (cap) {\n var text = cap[2].trim(); // remove trailing #s\n\n if (/#$/.test(text)) {\n var trimmed = rtrim(text, '#');\n\n if (this.options.pedantic) {\n text = trimmed.trim();\n } else if (!trimmed || / $/.test(trimmed)) {\n // CommonMark requires space before trailing #s\n text = trimmed.trim();\n }\n }\n\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[1].length,\n text: text\n };\n }\n };\n\n _proto.nptable = function nptable(src) {\n var cap = this.rules.block.nptable.exec(src);\n\n if (cap) {\n var item = {\n type: 'table',\n header: splitCells(cap[1].replace(/^ *| *\\| *$/g, '')),\n align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n cells: cap[3] ? cap[3].replace(/\\n$/, '').split('\\n') : [],\n raw: cap[0]\n };\n\n if (item.header.length === item.align.length) {\n var l = item.align.length;\n var i;\n\n for (i = 0; i < l; i++) {\n if (/^ *-+: *$/.test(item.align[i])) {\n item.align[i] = 'right';\n } else if (/^ *:-+: *$/.test(item.align[i])) {\n item.align[i] = 'center';\n } else if (/^ *:-+ *$/.test(item.align[i])) {\n item.align[i] = 'left';\n } else {\n item.align[i] = null;\n }\n }\n\n l = item.cells.length;\n\n for (i = 0; i < l; i++) {\n item.cells[i] = splitCells(item.cells[i], item.header.length);\n }\n\n return item;\n }\n }\n };\n\n _proto.hr = function hr(src) {\n var cap = this.rules.block.hr.exec(src);\n\n if (cap) {\n return {\n type: 'hr',\n raw: cap[0]\n };\n }\n };\n\n _proto.blockquote = function blockquote(src) {\n var cap = this.rules.block.blockquote.exec(src);\n\n if (cap) {\n var text = cap[0].replace(/^ *> ?/gm, '');\n return {\n type: 'blockquote',\n raw: cap[0],\n text: text\n };\n }\n };\n\n _proto.list = function list(src) {\n var cap = this.rules.block.list.exec(src);\n\n if (cap) {\n var raw = cap[0];\n var bull = cap[2];\n var isordered = bull.length > 1;\n var list = {\n type: 'list',\n raw: raw,\n ordered: isordered,\n start: isordered ? +bull.slice(0, -1) : '',\n loose: false,\n items: []\n }; // Get each top-level item.\n\n var itemMatch = cap[0].match(this.rules.block.item);\n var next = false,\n item,\n space,\n bcurr,\n bnext,\n addBack,\n loose,\n istask,\n ischecked,\n endMatch;\n var l = itemMatch.length;\n bcurr = this.rules.block.listItemStart.exec(itemMatch[0]);\n\n for (var i = 0; i < l; i++) {\n item = itemMatch[i];\n raw = item;\n\n if (!this.options.pedantic) {\n // Determine if current item contains the end of the list\n endMatch = item.match(new RegExp('\\\\n\\\\s*\\\\n {0,' + (bcurr[0].length - 1) + '}\\\\S'));\n\n if (endMatch) {\n addBack = item.length - endMatch.index + itemMatch.slice(i + 1).join('\\n').length;\n list.raw = list.raw.substring(0, list.raw.length - addBack);\n item = item.substring(0, endMatch.index);\n raw = item;\n l = i + 1;\n }\n } // Determine whether the next list item belongs here.\n // Backpedal if it does not belong in this list.\n\n\n if (i !== l - 1) {\n bnext = this.rules.block.listItemStart.exec(itemMatch[i + 1]);\n\n if (!this.options.pedantic ? bnext[1].length >= bcurr[0].length || bnext[1].length > 3 : bnext[1].length > bcurr[1].length) {\n // nested list or continuation\n itemMatch.splice(i, 2, itemMatch[i] + (!this.options.pedantic && bnext[1].length < bcurr[0].length && !itemMatch[i].match(/\\n$/) ? '' : '\\n') + itemMatch[i + 1]);\n i--;\n l--;\n continue;\n } else if ( // different bullet style\n !this.options.pedantic || this.options.smartLists ? bnext[2][bnext[2].length - 1] !== bull[bull.length - 1] : isordered === (bnext[2].length === 1)) {\n addBack = itemMatch.slice(i + 1).join('\\n').length;\n list.raw = list.raw.substring(0, list.raw.length - addBack);\n i = l - 1;\n }\n\n bcurr = bnext;\n } // Remove the list item's bullet\n // so it is seen as the next token.\n\n\n space = item.length;\n item = item.replace(/^ *([*+-]|\\d+[.)]) ?/, ''); // Outdent whatever the\n // list item contains. Hacky.\n\n if (~item.indexOf('\\n ')) {\n space -= item.length;\n item = !this.options.pedantic ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') : item.replace(/^ {1,4}/gm, '');\n } // trim item newlines at end\n\n\n item = rtrim(item, '\\n');\n\n if (i !== l - 1) {\n raw = raw + '\\n';\n } // Determine whether item is loose or not.\n // Use: /(^|\\n)(?! )[^\\n]+\\n\\n(?!\\s*$)/\n // for discount behavior.\n\n\n loose = next || /\\n\\n(?!\\s*$)/.test(raw);\n\n if (i !== l - 1) {\n next = raw.slice(-2) === '\\n\\n';\n if (!loose) loose = next;\n }\n\n if (loose) {\n list.loose = true;\n } // Check for task list items\n\n\n if (this.options.gfm) {\n istask = /^\\[[ xX]\\] /.test(item);\n ischecked = undefined;\n\n if (istask) {\n ischecked = item[1] !== ' ';\n item = item.replace(/^\\[[ xX]\\] +/, '');\n }\n }\n\n list.items.push({\n type: 'list_item',\n raw: raw,\n task: istask,\n checked: ischecked,\n loose: loose,\n text: item\n });\n }\n\n return list;\n }\n };\n\n _proto.html = function html(src) {\n var cap = this.rules.block.html.exec(src);\n\n if (cap) {\n return {\n type: this.options.sanitize ? 'paragraph' : 'html',\n raw: cap[0],\n pre: !this.options.sanitizer && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),\n text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0]\n };\n }\n };\n\n _proto.def = function def(src) {\n var cap = this.rules.block.def.exec(src);\n\n if (cap) {\n if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1);\n var tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n return {\n type: 'def',\n tag: tag,\n raw: cap[0],\n href: cap[2],\n title: cap[3]\n };\n }\n };\n\n _proto.table = function table(src) {\n var cap = this.rules.block.table.exec(src);\n\n if (cap) {\n var item = {\n type: 'table',\n header: splitCells(cap[1].replace(/^ *| *\\| *$/g, '')),\n align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n cells: cap[3] ? cap[3].replace(/\\n$/, '').split('\\n') : []\n };\n\n if (item.header.length === item.align.length) {\n item.raw = cap[0];\n var l = item.align.length;\n var i;\n\n for (i = 0; i < l; i++) {\n if (/^ *-+: *$/.test(item.align[i])) {\n item.align[i] = 'right';\n } else if (/^ *:-+: *$/.test(item.align[i])) {\n item.align[i] = 'center';\n } else if (/^ *:-+ *$/.test(item.align[i])) {\n item.align[i] = 'left';\n } else {\n item.align[i] = null;\n }\n }\n\n l = item.cells.length;\n\n for (i = 0; i < l; i++) {\n item.cells[i] = splitCells(item.cells[i].replace(/^ *\\| *| *\\| *$/g, ''), item.header.length);\n }\n\n return item;\n }\n }\n };\n\n _proto.lheading = function lheading(src) {\n var cap = this.rules.block.lheading.exec(src);\n\n if (cap) {\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[2].charAt(0) === '=' ? 1 : 2,\n text: cap[1]\n };\n }\n };\n\n _proto.paragraph = function paragraph(src) {\n var cap = this.rules.block.paragraph.exec(src);\n\n if (cap) {\n return {\n type: 'paragraph',\n raw: cap[0],\n text: cap[1].charAt(cap[1].length - 1) === '\\n' ? cap[1].slice(0, -1) : cap[1]\n };\n }\n };\n\n _proto.text = function text(src) {\n var cap = this.rules.block.text.exec(src);\n\n if (cap) {\n return {\n type: 'text',\n raw: cap[0],\n text: cap[0]\n };\n }\n };\n\n _proto.escape = function escape(src) {\n var cap = this.rules.inline.escape.exec(src);\n\n if (cap) {\n return {\n type: 'escape',\n raw: cap[0],\n text: _escape(cap[1])\n };\n }\n };\n\n _proto.tag = function tag(src, inLink, inRawBlock) {\n var cap = this.rules.inline.tag.exec(src);\n\n if (cap) {\n if (!inLink && /^
    /i.test(cap[0])) {\n inLink = false;\n }\n\n if (!inRawBlock && /^<(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n inRawBlock = true;\n } else if (inRawBlock && /^<\\/(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n inRawBlock = false;\n }\n\n return {\n type: this.options.sanitize ? 'text' : 'html',\n raw: cap[0],\n inLink: inLink,\n inRawBlock: inRawBlock,\n text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0]\n };\n }\n };\n\n _proto.link = function link(src) {\n var cap = this.rules.inline.link.exec(src);\n\n if (cap) {\n var trimmedUrl = cap[2].trim();\n\n if (!this.options.pedantic && /^$/.test(trimmedUrl)) {\n return;\n } // ending angle bracket cannot be escaped\n\n\n var rtrimSlash = rtrim(trimmedUrl.slice(0, -1), '\\\\');\n\n if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {\n return;\n }\n } else {\n // find closing parenthesis\n var lastParenIndex = findClosingBracket(cap[2], '()');\n\n if (lastParenIndex > -1) {\n var start = cap[0].indexOf('!') === 0 ? 5 : 4;\n var linkLen = start + cap[1].length + lastParenIndex;\n cap[2] = cap[2].substring(0, lastParenIndex);\n cap[0] = cap[0].substring(0, linkLen).trim();\n cap[3] = '';\n }\n }\n\n var href = cap[2];\n var title = '';\n\n if (this.options.pedantic) {\n // split pedantic href and title\n var link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n\n if (link) {\n href = link[1];\n title = link[3];\n }\n } else {\n title = cap[3] ? cap[3].slice(1, -1) : '';\n }\n\n href = href.trim();\n\n if (/^$/.test(trimmedUrl)) {\n // pedantic allows starting angle bracket without ending angle bracket\n href = href.slice(1);\n } else {\n href = href.slice(1, -1);\n }\n }\n\n return outputLink(cap, {\n href: href ? href.replace(this.rules.inline._escapes, '$1') : href,\n title: title ? title.replace(this.rules.inline._escapes, '$1') : title\n }, cap[0]);\n }\n };\n\n _proto.reflink = function reflink(src, links) {\n var cap;\n\n if ((cap = this.rules.inline.reflink.exec(src)) || (cap = this.rules.inline.nolink.exec(src))) {\n var link = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n link = links[link.toLowerCase()];\n\n if (!link || !link.href) {\n var text = cap[0].charAt(0);\n return {\n type: 'text',\n raw: text,\n text: text\n };\n }\n\n return outputLink(cap, link, cap[0]);\n }\n };\n\n _proto.emStrong = function emStrong(src, maskedSrc, prevChar) {\n if (prevChar === void 0) {\n prevChar = '';\n }\n\n var match = this.rules.inline.emStrong.lDelim.exec(src);\n if (!match) return;\n if (match[3] && prevChar.match(/(?:[0-9A-Za-z\\xAA\\xB2\\xB3\\xB5\\xB9\\xBA\\xBC-\\xBE\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u0660-\\u0669\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07C0-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08C7\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0966-\\u096F\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09E6-\\u09F1\\u09F4-\\u09F9\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A6F\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AE6-\\u0AEF\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B66-\\u0B6F\\u0B71-\\u0B77\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0BE6-\\u0BF2\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C66-\\u0C6F\\u0C78-\\u0C7E\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D58-\\u0D61\\u0D66-\\u0D78\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DE6-\\u0DEF\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F20-\\u0F33\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F-\\u1049\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u1090-\\u1099\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1369-\\u137C\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u17E0-\\u17E9\\u17F0-\\u17F9\\u1810-\\u1819\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B50-\\u1B59\\u1B83-\\u1BA0\\u1BAE-\\u1BE5\\u1C00-\\u1C23\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2070\\u2071\\u2074-\\u2079\\u207F-\\u2089\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2150-\\u2189\\u2460-\\u249B\\u24EA-\\u24FF\\u2776-\\u2793\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2CFD\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u3192-\\u3195\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3220-\\u3229\\u3248-\\u324F\\u3251-\\u325F\\u3280-\\u3289\\u32B1-\\u32BF\\u3400-\\u4DBF\\u4E00-\\u9FFC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7BF\\uA7C2-\\uA7CA\\uA7F5-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA830-\\uA835\\uA840-\\uA873\\uA882-\\uA8B3\\uA8D0-\\uA8D9\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA900-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF-\\uA9D9\\uA9E0-\\uA9E4\\uA9E6-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDD07-\\uDD33\\uDD40-\\uDD78\\uDD8A\\uDD8B\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDEE1-\\uDEFB\\uDF00-\\uDF23\\uDF2D-\\uDF4A\\uDF50-\\uDF75\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\uDCA0-\\uDCA9\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC58-\\uDC76\\uDC79-\\uDC9E\\uDCA7-\\uDCAF\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDCFB-\\uDD1B\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBC-\\uDDCF\\uDDD2-\\uDE00\\uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE40-\\uDE48\\uDE60-\\uDE7E\\uDE80-\\uDE9F\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDEEB-\\uDEEF\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF58-\\uDF72\\uDF78-\\uDF91\\uDFA9-\\uDFAF]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDCFA-\\uDD23\\uDD30-\\uDD39\\uDE60-\\uDE7E\\uDE80-\\uDEA9\\uDEB0\\uDEB1\\uDF00-\\uDF27\\uDF30-\\uDF45\\uDF51-\\uDF54\\uDFB0-\\uDFCB\\uDFE0-\\uDFF6]|\\uD804[\\uDC03-\\uDC37\\uDC52-\\uDC6F\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDCF0-\\uDCF9\\uDD03-\\uDD26\\uDD36-\\uDD3F\\uDD44\\uDD47\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDD0-\\uDDDA\\uDDDC\\uDDE1-\\uDDF4\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDEF0-\\uDEF9\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC50-\\uDC59\\uDC5F-\\uDC61\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDCD0-\\uDCD9\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE50-\\uDE59\\uDE80-\\uDEAA\\uDEB8\\uDEC0-\\uDEC9\\uDF00-\\uDF1A\\uDF30-\\uDF3B]|\\uD806[\\uDC00-\\uDC2B\\uDCA0-\\uDCF2\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD2F\\uDD3F\\uDD41\\uDD50-\\uDD59\\uDDA0-\\uDDA7\\uDDAA-\\uDDD0\\uDDE1\\uDDE3\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE89\\uDE9D\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC50-\\uDC6C\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD50-\\uDD59\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDDA0-\\uDDA9\\uDEE0-\\uDEF2\\uDFB0\\uDFC0-\\uDFD4]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE60-\\uDE69\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF50-\\uDF59\\uDF5B-\\uDF61\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE96\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82C[\\uDC00-\\uDD1E\\uDD50-\\uDD52\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD834[\\uDEE0-\\uDEF3\\uDF60-\\uDF78]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB\\uDFCE-\\uDFFF]|\\uD838[\\uDD00-\\uDD2C\\uDD37-\\uDD3D\\uDD40-\\uDD49\\uDD4E\\uDEC0-\\uDEEB\\uDEF0-\\uDEF9]|\\uD83A[\\uDC00-\\uDCC4\\uDCC7-\\uDCCF\\uDD00-\\uDD43\\uDD4B\\uDD50-\\uDD59]|\\uD83B[\\uDC71-\\uDCAB\\uDCAD-\\uDCAF\\uDCB1-\\uDCB4\\uDD01-\\uDD2D\\uDD2F-\\uDD3D\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD83C[\\uDD00-\\uDD0C]|\\uD83E[\\uDFF0-\\uDFF9]|\\uD869[\\uDC00-\\uDEDD\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A])/)) return; // _ can't be between two alphanumerics. \\p{L}\\p{N} includes non-english alphabet/numbers as well\n\n var nextChar = match[1] || match[2] || '';\n\n if (!nextChar || nextChar && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar))) {\n var lLength = match[0].length - 1;\n var rDelim,\n rLength,\n delimTotal = lLength,\n midDelimTotal = 0;\n var endReg = match[0][0] === '*' ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;\n endReg.lastIndex = 0;\n maskedSrc = maskedSrc.slice(-1 * src.length + lLength); // Bump maskedSrc to same section of string as src (move to lexer?)\n\n while ((match = endReg.exec(maskedSrc)) != null) {\n rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];\n if (!rDelim) continue; // matched the first alternative in rules.js (skip the * in __abc*abc__)\n\n rLength = rDelim.length;\n\n if (match[3] || match[4]) {\n // found another Left Delim\n delimTotal += rLength;\n continue;\n } else if (match[5] || match[6]) {\n // either Left or Right Delim\n if (lLength % 3 && !((lLength + rLength) % 3)) {\n midDelimTotal += rLength;\n continue; // CommonMark Emphasis Rules 9-10\n }\n }\n\n delimTotal -= rLength;\n if (delimTotal > 0) continue; // Haven't found enough closing delimiters\n // If this is the last rDelimiter, remove extra characters. *a*** -> *a*\n\n if (delimTotal + midDelimTotal - rLength <= 0 && !maskedSrc.slice(endReg.lastIndex).match(endReg)) {\n rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);\n }\n\n if (Math.min(lLength, rLength) % 2) {\n return {\n type: 'em',\n raw: src.slice(0, lLength + match.index + rLength + 1),\n text: src.slice(1, lLength + match.index + rLength)\n };\n }\n\n if (Math.min(lLength, rLength) % 2 === 0) {\n return {\n type: 'strong',\n raw: src.slice(0, lLength + match.index + rLength + 1),\n text: src.slice(2, lLength + match.index + rLength - 1)\n };\n }\n }\n }\n };\n\n _proto.codespan = function codespan(src) {\n var cap = this.rules.inline.code.exec(src);\n\n if (cap) {\n var text = cap[2].replace(/\\n/g, ' ');\n var hasNonSpaceChars = /[^ ]/.test(text);\n var hasSpaceCharsOnBothEnds = /^ /.test(text) && / $/.test(text);\n\n if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {\n text = text.substring(1, text.length - 1);\n }\n\n text = _escape(text, true);\n return {\n type: 'codespan',\n raw: cap[0],\n text: text\n };\n }\n };\n\n _proto.br = function br(src) {\n var cap = this.rules.inline.br.exec(src);\n\n if (cap) {\n return {\n type: 'br',\n raw: cap[0]\n };\n }\n };\n\n _proto.del = function del(src) {\n var cap = this.rules.inline.del.exec(src);\n\n if (cap) {\n return {\n type: 'del',\n raw: cap[0],\n text: cap[2]\n };\n }\n };\n\n _proto.autolink = function autolink(src, mangle) {\n var cap = this.rules.inline.autolink.exec(src);\n\n if (cap) {\n var text, href;\n\n if (cap[2] === '@') {\n text = _escape(this.options.mangle ? mangle(cap[1]) : cap[1]);\n href = 'mailto:' + text;\n } else {\n text = _escape(cap[1]);\n href = text;\n }\n\n return {\n type: 'link',\n raw: cap[0],\n text: text,\n href: href,\n tokens: [{\n type: 'text',\n raw: text,\n text: text\n }]\n };\n }\n };\n\n _proto.url = function url(src, mangle) {\n var cap;\n\n if (cap = this.rules.inline.url.exec(src)) {\n var text, href;\n\n if (cap[2] === '@') {\n text = _escape(this.options.mangle ? mangle(cap[0]) : cap[0]);\n href = 'mailto:' + text;\n } else {\n // do extended autolink path validation\n var prevCapZero;\n\n do {\n prevCapZero = cap[0];\n cap[0] = this.rules.inline._backpedal.exec(cap[0])[0];\n } while (prevCapZero !== cap[0]);\n\n text = _escape(cap[0]);\n\n if (cap[1] === 'www.') {\n href = 'http://' + text;\n } else {\n href = text;\n }\n }\n\n return {\n type: 'link',\n raw: cap[0],\n text: text,\n href: href,\n tokens: [{\n type: 'text',\n raw: text,\n text: text\n }]\n };\n }\n };\n\n _proto.inlineText = function inlineText(src, inRawBlock, smartypants) {\n var cap = this.rules.inline.text.exec(src);\n\n if (cap) {\n var text;\n\n if (inRawBlock) {\n text = this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0];\n } else {\n text = _escape(this.options.smartypants ? smartypants(cap[0]) : cap[0]);\n }\n\n return {\n type: 'text',\n raw: cap[0],\n text: text\n };\n }\n };\n\n return Tokenizer;\n }();\n\n var noopTest = helpers.noopTest,\n edit = helpers.edit,\n merge$1 = helpers.merge;\n /**\n * Block-Level Grammar\n */\n\n var block$1 = {\n newline: /^(?: *(?:\\n|$))+/,\n code: /^( {4}[^\\n]+(?:\\n(?: *(?:\\n|$))*)?)+/,\n fences: /^ {0,3}(`{3,}(?=[^`\\n]*\\n)|~{3,})([^\\n]*)\\n(?:|([\\s\\S]*?)\\n)(?: {0,3}\\1[~`]* *(?:\\n+|$)|$)/,\n hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)/,\n heading: /^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,\n blockquote: /^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/,\n list: /^( {0,3})(bull) [\\s\\S]+?(?:hr|def|\\n{2,}(?! )(?! {0,3}bull )\\n*|\\s*$)/,\n html: '^ {0,3}(?:' // optional indentation\n + '<(script|pre|style)[\\\\s>][\\\\s\\\\S]*?(?:[^\\\\n]*\\\\n+|$)' // (1)\n + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n + '|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)' // (3)\n + '|\\\\n*|$)' // (4)\n + '|\\\\n*|$)' // (5)\n + '|)[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (6)\n + '|<(?!script|pre|style)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (7) open tag\n + '|(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (7) closing tag\n + ')',\n def: /^ {0,3}\\[(label)\\]: *\\n? *]+)>?(?:(?: +\\n? *| *\\n *)(title))? *(?:\\n+|$)/,\n nptable: noopTest,\n table: noopTest,\n lheading: /^([^\\n]+)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n // regex template, placeholders will be replaced according to different paragraph\n // interruption rules of commonmark and the original markdown spec:\n _paragraph: /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html| +\\n)[^\\n]+)*)/,\n text: /^[^\\n]+/\n };\n block$1._label = /(?!\\s*\\])(?:\\\\[\\[\\]]|[^\\[\\]])+/;\n block$1._title = /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/;\n block$1.def = edit(block$1.def).replace('label', block$1._label).replace('title', block$1._title).getRegex();\n block$1.bullet = /(?:[*+-]|\\d{1,9}[.)])/;\n block$1.item = /^( *)(bull) ?[^\\n]*(?:\\n(?! *bull ?)[^\\n]*)*/;\n block$1.item = edit(block$1.item, 'gm').replace(/bull/g, block$1.bullet).getRegex();\n block$1.listItemStart = edit(/^( *)(bull) */).replace('bull', block$1.bullet).getRegex();\n block$1.list = edit(block$1.list).replace(/bull/g, block$1.bullet).replace('hr', '\\\\n+(?=\\\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$))').replace('def', '\\\\n+(?=' + block$1.def.source + ')').getRegex();\n block$1._tag = 'address|article|aside|base|basefont|blockquote|body|caption' + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' + '|track|ul';\n block$1._comment = /|$)/;\n block$1.html = edit(block$1.html, 'i').replace('comment', block$1._comment).replace('tag', block$1._tag).replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/).getRegex();\n block$1.paragraph = edit(block$1._paragraph).replace('hr', block$1.hr).replace('heading', ' {0,3}#{1,6} ').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n .replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|!--)').replace('tag', block$1._tag) // pars can be interrupted by type (6) html blocks\n .getRegex();\n block$1.blockquote = edit(block$1.blockquote).replace('paragraph', block$1.paragraph).getRegex();\n /**\n * Normal Block Grammar\n */\n\n block$1.normal = merge$1({}, block$1);\n /**\n * GFM Block Grammar\n */\n\n block$1.gfm = merge$1({}, block$1.normal, {\n nptable: '^ *([^|\\\\n ].*\\\\|.*)\\\\n' // Header\n + ' {0,3}([-:]+ *\\\\|[-| :]*)' // Align\n + '(?:\\\\n((?:(?!\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)',\n // Cells\n table: '^ *\\\\|(.+)\\\\n' // Header\n + ' {0,3}\\\\|?( *[-:]+[-| :]*)' // Align\n + '(?:\\\\n *((?:(?!\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)' // Cells\n\n });\n block$1.gfm.nptable = edit(block$1.gfm.nptable).replace('hr', block$1.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|!--)').replace('tag', block$1._tag) // tables can be interrupted by type (6) html blocks\n .getRegex();\n block$1.gfm.table = edit(block$1.gfm.table).replace('hr', block$1.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|!--)').replace('tag', block$1._tag) // tables can be interrupted by type (6) html blocks\n .getRegex();\n /**\n * Pedantic grammar (original John Gruber's loose markdown specification)\n */\n\n block$1.pedantic = merge$1({}, block$1.normal, {\n html: edit('^ *(?:comment *(?:\\\\n|\\\\s*$)' + '|<(tag)[\\\\s\\\\S]+? *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n + '|\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))').replace('comment', block$1._comment).replace(/tag/g, '(?!(?:' + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub' + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)' + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b').getRegex(),\n def: /^ *\\[([^\\]]+)\\]: *]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,\n heading: /^(#{1,6})(.*)(?:\\n+|$)/,\n fences: noopTest,\n // fences not supported\n paragraph: edit(block$1.normal._paragraph).replace('hr', block$1.hr).replace('heading', ' *#{1,6} *[^\\n]').replace('lheading', block$1.lheading).replace('blockquote', ' {0,3}>').replace('|fences', '').replace('|list', '').replace('|html', '').getRegex()\n });\n /**\n * Inline-Level Grammar\n */\n\n var inline$1 = {\n escape: /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,\n autolink: /^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/,\n url: noopTest,\n tag: '^comment' + '|^' // self-closing tag\n + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. \n + '|^' // declaration, e.g. \n + '|^',\n // CDATA section\n link: /^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/,\n reflink: /^!?\\[(label)\\]\\[(?!\\s*\\])((?:\\\\[\\[\\]]?|[^\\[\\]\\\\])+)\\]/,\n nolink: /^!?\\[(?!\\s*\\])((?:\\[[^\\[\\]]*\\]|\\\\[\\[\\]]|[^\\[\\]])*)\\](?:\\[\\])?/,\n reflinkSearch: 'reflink|nolink(?!\\\\()',\n emStrong: {\n lDelim: /^(?:\\*+(?:([punct_])|[^\\s*]))|^_+(?:([punct*])|([^\\s_]))/,\n // (1) and (2) can only be a Right Delimiter. (3) and (4) can only be Left. (5) and (6) can be either Left or Right.\n // () Skip other delimiter (1) #*** (2) a***#, a*** (3) #***a, ***a (4) ***# (5) #***# (6) a***a\n rDelimAst: /\\_\\_[^_]*?\\*[^_]*?\\_\\_|[punct_](\\*+)(?=[\\s]|$)|[^punct*_\\s](\\*+)(?=[punct_\\s]|$)|[punct_\\s](\\*+)(?=[^punct*_\\s])|[\\s](\\*+)(?=[punct_])|[punct_](\\*+)(?=[punct_])|[^punct*_\\s](\\*+)(?=[^punct*_\\s])/,\n rDelimUnd: /\\*\\*[^*]*?\\_[^*]*?\\*\\*|[punct*](\\_+)(?=[\\s]|$)|[^punct*_\\s](\\_+)(?=[punct*\\s]|$)|[punct*\\s](\\_+)(?=[^punct*_\\s])|[\\s](\\_+)(?=[punct*])|[punct*](\\_+)(?=[punct*])/ // ^- Not allowed for _\n\n },\n code: /^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,\n br: /^( {2,}|\\\\)\\n(?!\\s*$)/,\n del: noopTest,\n text: /^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\?@\\\\[\\\\]`^{|}~';\n inline$1.punctuation = edit(inline$1.punctuation).replace(/punctuation/g, inline$1._punctuation).getRegex(); // sequences em should skip over [title](link), `code`, \n\n inline$1.blockSkip = /\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>/g;\n inline$1.escapedEmSt = /\\\\\\*|\\\\_/g;\n inline$1._comment = edit(block$1._comment).replace('(?:-->|$)', '-->').getRegex();\n inline$1.emStrong.lDelim = edit(inline$1.emStrong.lDelim).replace(/punct/g, inline$1._punctuation).getRegex();\n inline$1.emStrong.rDelimAst = edit(inline$1.emStrong.rDelimAst, 'g').replace(/punct/g, inline$1._punctuation).getRegex();\n inline$1.emStrong.rDelimUnd = edit(inline$1.emStrong.rDelimUnd, 'g').replace(/punct/g, inline$1._punctuation).getRegex();\n inline$1._escapes = /\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/g;\n inline$1._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;\n inline$1._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;\n inline$1.autolink = edit(inline$1.autolink).replace('scheme', inline$1._scheme).replace('email', inline$1._email).getRegex();\n inline$1._attribute = /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/;\n inline$1.tag = edit(inline$1.tag).replace('comment', inline$1._comment).replace('attribute', inline$1._attribute).getRegex();\n inline$1._label = /(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/;\n inline$1._href = /<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/;\n inline$1._title = /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/;\n inline$1.link = edit(inline$1.link).replace('label', inline$1._label).replace('href', inline$1._href).replace('title', inline$1._title).getRegex();\n inline$1.reflink = edit(inline$1.reflink).replace('label', inline$1._label).getRegex();\n inline$1.reflinkSearch = edit(inline$1.reflinkSearch, 'g').replace('reflink', inline$1.reflink).replace('nolink', inline$1.nolink).getRegex();\n /**\n * Normal Inline Grammar\n */\n\n inline$1.normal = merge$1({}, inline$1);\n /**\n * Pedantic Inline Grammar\n */\n\n inline$1.pedantic = merge$1({}, inline$1.normal, {\n strong: {\n start: /^__|\\*\\*/,\n middle: /^__(?=\\S)([\\s\\S]*?\\S)__(?!_)|^\\*\\*(?=\\S)([\\s\\S]*?\\S)\\*\\*(?!\\*)/,\n endAst: /\\*\\*(?!\\*)/g,\n endUnd: /__(?!_)/g\n },\n em: {\n start: /^_|\\*/,\n middle: /^()\\*(?=\\S)([\\s\\S]*?\\S)\\*(?!\\*)|^_(?=\\S)([\\s\\S]*?\\S)_(?!_)/,\n endAst: /\\*(?!\\*)/g,\n endUnd: /_(?!_)/g\n },\n link: edit(/^!?\\[(label)\\]\\((.*?)\\)/).replace('label', inline$1._label).getRegex(),\n reflink: edit(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace('label', inline$1._label).getRegex()\n });\n /**\n * GFM Inline Grammar\n */\n\n inline$1.gfm = merge$1({}, inline$1.normal, {\n escape: edit(inline$1.escape).replace('])', '~|])').getRegex(),\n _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,\n url: /^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/,\n _backpedal: /(?:[^?!.,:;*_~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,\n del: /^(~~?)(?=[^\\s~])([\\s\\S]*?[^\\s~])\\1(?=[^~]|$)/,\n text: /^([`~]+|[^`~])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\ 0.5) {\n ch = 'x' + ch.toString(16);\n }\n\n out += '&#' + ch + ';';\n }\n\n return out;\n }\n /**\n * Block Lexer\n */\n\n\n var Lexer_1 = /*#__PURE__*/function () {\n function Lexer(options) {\n this.tokens = [];\n this.tokens.links = Object.create(null);\n this.options = options || defaults$3;\n this.options.tokenizer = this.options.tokenizer || new Tokenizer_1();\n this.tokenizer = this.options.tokenizer;\n this.tokenizer.options = this.options;\n var rules = {\n block: block.normal,\n inline: inline.normal\n };\n\n if (this.options.pedantic) {\n rules.block = block.pedantic;\n rules.inline = inline.pedantic;\n } else if (this.options.gfm) {\n rules.block = block.gfm;\n\n if (this.options.breaks) {\n rules.inline = inline.breaks;\n } else {\n rules.inline = inline.gfm;\n }\n }\n\n this.tokenizer.rules = rules;\n }\n /**\n * Expose Rules\n */\n\n\n /**\n * Static Lex Method\n */\n Lexer.lex = function lex(src, options) {\n var lexer = new Lexer(options);\n return lexer.lex(src);\n }\n /**\n * Static Lex Inline Method\n */\n ;\n\n Lexer.lexInline = function lexInline(src, options) {\n var lexer = new Lexer(options);\n return lexer.inlineTokens(src);\n }\n /**\n * Preprocessing\n */\n ;\n\n var _proto = Lexer.prototype;\n\n _proto.lex = function lex(src) {\n src = src.replace(/\\r\\n|\\r/g, '\\n').replace(/\\t/g, ' ');\n this.blockTokens(src, this.tokens, true);\n this.inline(this.tokens);\n return this.tokens;\n }\n /**\n * Lexing\n */\n ;\n\n _proto.blockTokens = function blockTokens(src, tokens, top) {\n if (tokens === void 0) {\n tokens = [];\n }\n\n if (top === void 0) {\n top = true;\n }\n\n if (this.options.pedantic) {\n src = src.replace(/^ +$/gm, '');\n }\n\n var token, i, l, lastToken;\n\n while (src) {\n // newline\n if (token = this.tokenizer.space(src)) {\n src = src.substring(token.raw.length);\n\n if (token.type) {\n tokens.push(token);\n }\n\n continue;\n } // code\n\n\n if (token = this.tokenizer.code(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1]; // An indented code block cannot interrupt a paragraph.\n\n if (lastToken && lastToken.type === 'paragraph') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n } else {\n tokens.push(token);\n }\n\n continue;\n } // fences\n\n\n if (token = this.tokenizer.fences(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // heading\n\n\n if (token = this.tokenizer.heading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // table no leading pipe (gfm)\n\n\n if (token = this.tokenizer.nptable(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // hr\n\n\n if (token = this.tokenizer.hr(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // blockquote\n\n\n if (token = this.tokenizer.blockquote(src)) {\n src = src.substring(token.raw.length);\n token.tokens = this.blockTokens(token.text, [], top);\n tokens.push(token);\n continue;\n } // list\n\n\n if (token = this.tokenizer.list(src)) {\n src = src.substring(token.raw.length);\n l = token.items.length;\n\n for (i = 0; i < l; i++) {\n token.items[i].tokens = this.blockTokens(token.items[i].text, [], false);\n }\n\n tokens.push(token);\n continue;\n } // html\n\n\n if (token = this.tokenizer.html(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // def\n\n\n if (top && (token = this.tokenizer.def(src))) {\n src = src.substring(token.raw.length);\n\n if (!this.tokens.links[token.tag]) {\n this.tokens.links[token.tag] = {\n href: token.href,\n title: token.title\n };\n }\n\n continue;\n } // table (gfm)\n\n\n if (token = this.tokenizer.table(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // lheading\n\n\n if (token = this.tokenizer.lheading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // top-level paragraph\n\n\n if (top && (token = this.tokenizer.paragraph(src))) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // text\n\n\n if (token = this.tokenizer.text(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n } else {\n tokens.push(token);\n }\n\n continue;\n }\n\n if (src) {\n var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n\n return tokens;\n };\n\n _proto.inline = function inline(tokens) {\n var i, j, k, l2, row, token;\n var l = tokens.length;\n\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n switch (token.type) {\n case 'paragraph':\n case 'text':\n case 'heading':\n {\n token.tokens = [];\n this.inlineTokens(token.text, token.tokens);\n break;\n }\n\n case 'table':\n {\n token.tokens = {\n header: [],\n cells: []\n }; // header\n\n l2 = token.header.length;\n\n for (j = 0; j < l2; j++) {\n token.tokens.header[j] = [];\n this.inlineTokens(token.header[j], token.tokens.header[j]);\n } // cells\n\n\n l2 = token.cells.length;\n\n for (j = 0; j < l2; j++) {\n row = token.cells[j];\n token.tokens.cells[j] = [];\n\n for (k = 0; k < row.length; k++) {\n token.tokens.cells[j][k] = [];\n this.inlineTokens(row[k], token.tokens.cells[j][k]);\n }\n }\n\n break;\n }\n\n case 'blockquote':\n {\n this.inline(token.tokens);\n break;\n }\n\n case 'list':\n {\n l2 = token.items.length;\n\n for (j = 0; j < l2; j++) {\n this.inline(token.items[j].tokens);\n }\n\n break;\n }\n }\n }\n\n return tokens;\n }\n /**\n * Lexing/Compiling\n */\n ;\n\n _proto.inlineTokens = function inlineTokens(src, tokens, inLink, inRawBlock) {\n if (tokens === void 0) {\n tokens = [];\n }\n\n if (inLink === void 0) {\n inLink = false;\n }\n\n if (inRawBlock === void 0) {\n inRawBlock = false;\n }\n\n var token, lastToken; // String with links masked to avoid interference with em and strong\n\n var maskedSrc = src;\n var match;\n var keepPrevChar, prevChar; // Mask out reflinks\n\n if (this.tokens.links) {\n var links = Object.keys(this.tokens.links);\n\n if (links.length > 0) {\n while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {\n if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);\n }\n }\n }\n } // Mask out other blocks\n\n\n while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);\n } // Mask out escaped em & strong delimiters\n\n\n while ((match = this.tokenizer.rules.inline.escapedEmSt.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);\n }\n\n while (src) {\n if (!keepPrevChar) {\n prevChar = '';\n }\n\n keepPrevChar = false; // escape\n\n if (token = this.tokenizer.escape(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // tag\n\n\n if (token = this.tokenizer.tag(src, inLink, inRawBlock)) {\n src = src.substring(token.raw.length);\n inLink = token.inLink;\n inRawBlock = token.inRawBlock;\n var _lastToken = tokens[tokens.length - 1];\n\n if (_lastToken && token.type === 'text' && _lastToken.type === 'text') {\n _lastToken.raw += token.raw;\n _lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n\n continue;\n } // link\n\n\n if (token = this.tokenizer.link(src)) {\n src = src.substring(token.raw.length);\n\n if (token.type === 'link') {\n token.tokens = this.inlineTokens(token.text, [], true, inRawBlock);\n }\n\n tokens.push(token);\n continue;\n } // reflink, nolink\n\n\n if (token = this.tokenizer.reflink(src, this.tokens.links)) {\n src = src.substring(token.raw.length);\n var _lastToken2 = tokens[tokens.length - 1];\n\n if (token.type === 'link') {\n token.tokens = this.inlineTokens(token.text, [], true, inRawBlock);\n tokens.push(token);\n } else if (_lastToken2 && token.type === 'text' && _lastToken2.type === 'text') {\n _lastToken2.raw += token.raw;\n _lastToken2.text += token.text;\n } else {\n tokens.push(token);\n }\n\n continue;\n } // em & strong\n\n\n if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {\n src = src.substring(token.raw.length);\n token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock);\n tokens.push(token);\n continue;\n } // code\n\n\n if (token = this.tokenizer.codespan(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // br\n\n\n if (token = this.tokenizer.br(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // del (gfm)\n\n\n if (token = this.tokenizer.del(src)) {\n src = src.substring(token.raw.length);\n token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock);\n tokens.push(token);\n continue;\n } // autolink\n\n\n if (token = this.tokenizer.autolink(src, mangle)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // url (gfm)\n\n\n if (!inLink && (token = this.tokenizer.url(src, mangle))) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // text\n\n\n if (token = this.tokenizer.inlineText(src, inRawBlock, smartypants)) {\n src = src.substring(token.raw.length);\n\n if (token.raw.slice(-1) !== '_') {\n // Track prevChar before string of ____ started\n prevChar = token.raw.slice(-1);\n }\n\n keepPrevChar = true;\n lastToken = tokens[tokens.length - 1];\n\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n\n continue;\n }\n\n if (src) {\n var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n\n return tokens;\n };\n\n _createClass(Lexer, null, [{\n key: \"rules\",\n get: function get() {\n return {\n block: block,\n inline: inline\n };\n }\n }]);\n\n return Lexer;\n }();\n\n var defaults$2 = defaults$5.defaults;\n var cleanUrl = helpers.cleanUrl,\n escape$1 = helpers.escape;\n /**\n * Renderer\n */\n\n var Renderer_1 = /*#__PURE__*/function () {\n function Renderer(options) {\n this.options = options || defaults$2;\n }\n\n var _proto = Renderer.prototype;\n\n _proto.code = function code(_code, infostring, escaped) {\n var lang = (infostring || '').match(/\\S*/)[0];\n\n if (this.options.highlight) {\n var out = this.options.highlight(_code, lang);\n\n if (out != null && out !== _code) {\n escaped = true;\n _code = out;\n }\n }\n\n _code = _code.replace(/\\n$/, '') + '\\n';\n\n if (!lang) {\n return '
    ' + (escaped ? _code : escape$1(_code, true)) + '
    \\n';\n }\n\n return '
    ' + (escaped ? _code : escape$1(_code, true)) + '
    \\n';\n };\n\n _proto.blockquote = function blockquote(quote) {\n return '
    \\n' + quote + '
    \\n';\n };\n\n _proto.html = function html(_html) {\n return _html;\n };\n\n _proto.heading = function heading(text, level, raw, slugger) {\n if (this.options.headerIds) {\n return '' + text + '\\n';\n } // ignore IDs\n\n\n return '' + text + '\\n';\n };\n\n _proto.hr = function hr() {\n return this.options.xhtml ? '
    \\n' : '
    \\n';\n };\n\n _proto.list = function list(body, ordered, start) {\n var type = ordered ? 'ol' : 'ul',\n startatt = ordered && start !== 1 ? ' start=\"' + start + '\"' : '';\n return '<' + type + startatt + '>\\n' + body + '\\n';\n };\n\n _proto.listitem = function listitem(text) {\n return '
  • ' + text + '
  • \\n';\n };\n\n _proto.checkbox = function checkbox(checked) {\n return ' ';\n };\n\n _proto.paragraph = function paragraph(text) {\n return '

    ' + text + '

    \\n';\n };\n\n _proto.table = function table(header, body) {\n if (body) body = '' + body + '';\n return '\\n' + '\\n' + header + '\\n' + body + '
    \\n';\n };\n\n _proto.tablerow = function tablerow(content) {\n return '\\n' + content + '\\n';\n };\n\n _proto.tablecell = function tablecell(content, flags) {\n var type = flags.header ? 'th' : 'td';\n var tag = flags.align ? '<' + type + ' align=\"' + flags.align + '\">' : '<' + type + '>';\n return tag + content + '\\n';\n } // span level renderer\n ;\n\n _proto.strong = function strong(text) {\n return '' + text + '';\n };\n\n _proto.em = function em(text) {\n return '' + text + '';\n };\n\n _proto.codespan = function codespan(text) {\n return '' + text + '';\n };\n\n _proto.br = function br() {\n return this.options.xhtml ? '
    ' : '
    ';\n };\n\n _proto.del = function del(text) {\n return '' + text + '';\n };\n\n _proto.link = function link(href, title, text) {\n href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n\n if (href === null) {\n return text;\n }\n\n var out = '
    ';\n return out;\n };\n\n _proto.image = function image(href, title, text) {\n href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n\n if (href === null) {\n return text;\n }\n\n var out = '\"'' : '>';\n return out;\n };\n\n _proto.text = function text(_text) {\n return _text;\n };\n\n return Renderer;\n }();\n\n /**\n * TextRenderer\n * returns only the textual part of the token\n */\n var TextRenderer_1 = /*#__PURE__*/function () {\n function TextRenderer() {}\n\n var _proto = TextRenderer.prototype;\n\n // no need for block level renderers\n _proto.strong = function strong(text) {\n return text;\n };\n\n _proto.em = function em(text) {\n return text;\n };\n\n _proto.codespan = function codespan(text) {\n return text;\n };\n\n _proto.del = function del(text) {\n return text;\n };\n\n _proto.html = function html(text) {\n return text;\n };\n\n _proto.text = function text(_text) {\n return _text;\n };\n\n _proto.link = function link(href, title, text) {\n return '' + text;\n };\n\n _proto.image = function image(href, title, text) {\n return '' + text;\n };\n\n _proto.br = function br() {\n return '';\n };\n\n return TextRenderer;\n }();\n\n /**\n * Slugger generates header id\n */\n var Slugger_1 = /*#__PURE__*/function () {\n function Slugger() {\n this.seen = {};\n }\n\n var _proto = Slugger.prototype;\n\n _proto.serialize = function serialize(value) {\n return value.toLowerCase().trim() // remove html tags\n .replace(/<[!\\/a-z].*?>/ig, '') // remove unwanted chars\n .replace(/[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#$%&()*+,./:;<=>?@[\\]^`{|}~]/g, '').replace(/\\s/g, '-');\n }\n /**\n * Finds the next safe (unique) slug to use\n */\n ;\n\n _proto.getNextSafeSlug = function getNextSafeSlug(originalSlug, isDryRun) {\n var slug = originalSlug;\n var occurenceAccumulator = 0;\n\n if (this.seen.hasOwnProperty(slug)) {\n occurenceAccumulator = this.seen[originalSlug];\n\n do {\n occurenceAccumulator++;\n slug = originalSlug + '-' + occurenceAccumulator;\n } while (this.seen.hasOwnProperty(slug));\n }\n\n if (!isDryRun) {\n this.seen[originalSlug] = occurenceAccumulator;\n this.seen[slug] = 0;\n }\n\n return slug;\n }\n /**\n * Convert string to unique id\n * @param {object} options\n * @param {boolean} options.dryrun Generates the next unique slug without updating the internal accumulator.\n */\n ;\n\n _proto.slug = function slug(value, options) {\n if (options === void 0) {\n options = {};\n }\n\n var slug = this.serialize(value);\n return this.getNextSafeSlug(slug, options.dryrun);\n };\n\n return Slugger;\n }();\n\n var defaults$1 = defaults$5.defaults;\n var unescape = helpers.unescape;\n /**\n * Parsing & Compiling\n */\n\n var Parser_1 = /*#__PURE__*/function () {\n function Parser(options) {\n this.options = options || defaults$1;\n this.options.renderer = this.options.renderer || new Renderer_1();\n this.renderer = this.options.renderer;\n this.renderer.options = this.options;\n this.textRenderer = new TextRenderer_1();\n this.slugger = new Slugger_1();\n }\n /**\n * Static Parse Method\n */\n\n\n Parser.parse = function parse(tokens, options) {\n var parser = new Parser(options);\n return parser.parse(tokens);\n }\n /**\n * Static Parse Inline Method\n */\n ;\n\n Parser.parseInline = function parseInline(tokens, options) {\n var parser = new Parser(options);\n return parser.parseInline(tokens);\n }\n /**\n * Parse Loop\n */\n ;\n\n var _proto = Parser.prototype;\n\n _proto.parse = function parse(tokens, top) {\n if (top === void 0) {\n top = true;\n }\n\n var out = '',\n i,\n j,\n k,\n l2,\n l3,\n row,\n cell,\n header,\n body,\n token,\n ordered,\n start,\n loose,\n itemBody,\n item,\n checked,\n task,\n checkbox;\n var l = tokens.length;\n\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n switch (token.type) {\n case 'space':\n {\n continue;\n }\n\n case 'hr':\n {\n out += this.renderer.hr();\n continue;\n }\n\n case 'heading':\n {\n out += this.renderer.heading(this.parseInline(token.tokens), token.depth, unescape(this.parseInline(token.tokens, this.textRenderer)), this.slugger);\n continue;\n }\n\n case 'code':\n {\n out += this.renderer.code(token.text, token.lang, token.escaped);\n continue;\n }\n\n case 'table':\n {\n header = ''; // header\n\n cell = '';\n l2 = token.header.length;\n\n for (j = 0; j < l2; j++) {\n cell += this.renderer.tablecell(this.parseInline(token.tokens.header[j]), {\n header: true,\n align: token.align[j]\n });\n }\n\n header += this.renderer.tablerow(cell);\n body = '';\n l2 = token.cells.length;\n\n for (j = 0; j < l2; j++) {\n row = token.tokens.cells[j];\n cell = '';\n l3 = row.length;\n\n for (k = 0; k < l3; k++) {\n cell += this.renderer.tablecell(this.parseInline(row[k]), {\n header: false,\n align: token.align[k]\n });\n }\n\n body += this.renderer.tablerow(cell);\n }\n\n out += this.renderer.table(header, body);\n continue;\n }\n\n case 'blockquote':\n {\n body = this.parse(token.tokens);\n out += this.renderer.blockquote(body);\n continue;\n }\n\n case 'list':\n {\n ordered = token.ordered;\n start = token.start;\n loose = token.loose;\n l2 = token.items.length;\n body = '';\n\n for (j = 0; j < l2; j++) {\n item = token.items[j];\n checked = item.checked;\n task = item.task;\n itemBody = '';\n\n if (item.task) {\n checkbox = this.renderer.checkbox(checked);\n\n if (loose) {\n if (item.tokens.length > 0 && item.tokens[0].type === 'text') {\n item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;\n\n if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {\n item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;\n }\n } else {\n item.tokens.unshift({\n type: 'text',\n text: checkbox\n });\n }\n } else {\n itemBody += checkbox;\n }\n }\n\n itemBody += this.parse(item.tokens, loose);\n body += this.renderer.listitem(itemBody, task, checked);\n }\n\n out += this.renderer.list(body, ordered, start);\n continue;\n }\n\n case 'html':\n {\n // TODO parse inline content if parameter markdown=1\n out += this.renderer.html(token.text);\n continue;\n }\n\n case 'paragraph':\n {\n out += this.renderer.paragraph(this.parseInline(token.tokens));\n continue;\n }\n\n case 'text':\n {\n body = token.tokens ? this.parseInline(token.tokens) : token.text;\n\n while (i + 1 < l && tokens[i + 1].type === 'text') {\n token = tokens[++i];\n body += '\\n' + (token.tokens ? this.parseInline(token.tokens) : token.text);\n }\n\n out += top ? this.renderer.paragraph(body) : body;\n continue;\n }\n\n default:\n {\n var errMsg = 'Token with \"' + token.type + '\" type was not found.';\n\n if (this.options.silent) {\n console.error(errMsg);\n return;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n\n return out;\n }\n /**\n * Parse Inline Tokens\n */\n ;\n\n _proto.parseInline = function parseInline(tokens, renderer) {\n renderer = renderer || this.renderer;\n var out = '',\n i,\n token;\n var l = tokens.length;\n\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n switch (token.type) {\n case 'escape':\n {\n out += renderer.text(token.text);\n break;\n }\n\n case 'html':\n {\n out += renderer.html(token.text);\n break;\n }\n\n case 'link':\n {\n out += renderer.link(token.href, token.title, this.parseInline(token.tokens, renderer));\n break;\n }\n\n case 'image':\n {\n out += renderer.image(token.href, token.title, token.text);\n break;\n }\n\n case 'strong':\n {\n out += renderer.strong(this.parseInline(token.tokens, renderer));\n break;\n }\n\n case 'em':\n {\n out += renderer.em(this.parseInline(token.tokens, renderer));\n break;\n }\n\n case 'codespan':\n {\n out += renderer.codespan(token.text);\n break;\n }\n\n case 'br':\n {\n out += renderer.br();\n break;\n }\n\n case 'del':\n {\n out += renderer.del(this.parseInline(token.tokens, renderer));\n break;\n }\n\n case 'text':\n {\n out += renderer.text(token.text);\n break;\n }\n\n default:\n {\n var errMsg = 'Token with \"' + token.type + '\" type was not found.';\n\n if (this.options.silent) {\n console.error(errMsg);\n return;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n\n return out;\n };\n\n return Parser;\n }();\n\n var merge = helpers.merge,\n checkSanitizeDeprecation = helpers.checkSanitizeDeprecation,\n escape = helpers.escape;\n var getDefaults = defaults$5.getDefaults,\n changeDefaults = defaults$5.changeDefaults,\n defaults = defaults$5.defaults;\n /**\n * Marked\n */\n\n function marked(src, opt, callback) {\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n throw new Error('marked(): input parameter is undefined or null');\n }\n\n if (typeof src !== 'string') {\n throw new Error('marked(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected');\n }\n\n if (typeof opt === 'function') {\n callback = opt;\n opt = null;\n }\n\n opt = merge({}, marked.defaults, opt || {});\n checkSanitizeDeprecation(opt);\n\n if (callback) {\n var highlight = opt.highlight;\n var tokens;\n\n try {\n tokens = Lexer_1.lex(src, opt);\n } catch (e) {\n return callback(e);\n }\n\n var done = function done(err) {\n var out;\n\n if (!err) {\n try {\n out = Parser_1.parse(tokens, opt);\n } catch (e) {\n err = e;\n }\n }\n\n opt.highlight = highlight;\n return err ? callback(err) : callback(null, out);\n };\n\n if (!highlight || highlight.length < 3) {\n return done();\n }\n\n delete opt.highlight;\n if (!tokens.length) return done();\n var pending = 0;\n marked.walkTokens(tokens, function (token) {\n if (token.type === 'code') {\n pending++;\n setTimeout(function () {\n highlight(token.text, token.lang, function (err, code) {\n if (err) {\n return done(err);\n }\n\n if (code != null && code !== token.text) {\n token.text = code;\n token.escaped = true;\n }\n\n pending--;\n\n if (pending === 0) {\n done();\n }\n });\n }, 0);\n }\n });\n\n if (pending === 0) {\n done();\n }\n\n return;\n }\n\n try {\n var _tokens = Lexer_1.lex(src, opt);\n\n if (opt.walkTokens) {\n marked.walkTokens(_tokens, opt.walkTokens);\n }\n\n return Parser_1.parse(_tokens, opt);\n } catch (e) {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n\n if (opt.silent) {\n return '

    An error occurred:

    ' + escape(e.message + '', true) + '
    ';\n }\n\n throw e;\n }\n }\n /**\n * Options\n */\n\n\n marked.options = marked.setOptions = function (opt) {\n merge(marked.defaults, opt);\n changeDefaults(marked.defaults);\n return marked;\n };\n\n marked.getDefaults = getDefaults;\n marked.defaults = defaults;\n /**\n * Use Extension\n */\n\n marked.use = function (extension) {\n var opts = merge({}, extension);\n\n if (extension.renderer) {\n (function () {\n var renderer = marked.defaults.renderer || new Renderer_1();\n\n var _loop = function _loop(prop) {\n var prevRenderer = renderer[prop];\n\n renderer[prop] = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var ret = extension.renderer[prop].apply(renderer, args);\n\n if (ret === false) {\n ret = prevRenderer.apply(renderer, args);\n }\n\n return ret;\n };\n };\n\n for (var prop in extension.renderer) {\n _loop(prop);\n }\n\n opts.renderer = renderer;\n })();\n }\n\n if (extension.tokenizer) {\n (function () {\n var tokenizer = marked.defaults.tokenizer || new Tokenizer_1();\n\n var _loop2 = function _loop2(prop) {\n var prevTokenizer = tokenizer[prop];\n\n tokenizer[prop] = function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var ret = extension.tokenizer[prop].apply(tokenizer, args);\n\n if (ret === false) {\n ret = prevTokenizer.apply(tokenizer, args);\n }\n\n return ret;\n };\n };\n\n for (var prop in extension.tokenizer) {\n _loop2(prop);\n }\n\n opts.tokenizer = tokenizer;\n })();\n }\n\n if (extension.walkTokens) {\n var walkTokens = marked.defaults.walkTokens;\n\n opts.walkTokens = function (token) {\n extension.walkTokens(token);\n\n if (walkTokens) {\n walkTokens(token);\n }\n };\n }\n\n marked.setOptions(opts);\n };\n /**\n * Run callback for every token\n */\n\n\n marked.walkTokens = function (tokens, callback) {\n for (var _iterator = _createForOfIteratorHelperLoose(tokens), _step; !(_step = _iterator()).done;) {\n var token = _step.value;\n callback(token);\n\n switch (token.type) {\n case 'table':\n {\n for (var _iterator2 = _createForOfIteratorHelperLoose(token.tokens.header), _step2; !(_step2 = _iterator2()).done;) {\n var cell = _step2.value;\n marked.walkTokens(cell, callback);\n }\n\n for (var _iterator3 = _createForOfIteratorHelperLoose(token.tokens.cells), _step3; !(_step3 = _iterator3()).done;) {\n var row = _step3.value;\n\n for (var _iterator4 = _createForOfIteratorHelperLoose(row), _step4; !(_step4 = _iterator4()).done;) {\n var _cell = _step4.value;\n marked.walkTokens(_cell, callback);\n }\n }\n\n break;\n }\n\n case 'list':\n {\n marked.walkTokens(token.items, callback);\n break;\n }\n\n default:\n {\n if (token.tokens) {\n marked.walkTokens(token.tokens, callback);\n }\n }\n }\n }\n };\n /**\n * Parse Inline\n */\n\n\n marked.parseInline = function (src, opt) {\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n throw new Error('marked.parseInline(): input parameter is undefined or null');\n }\n\n if (typeof src !== 'string') {\n throw new Error('marked.parseInline(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected');\n }\n\n opt = merge({}, marked.defaults, opt || {});\n checkSanitizeDeprecation(opt);\n\n try {\n var tokens = Lexer_1.lexInline(src, opt);\n\n if (opt.walkTokens) {\n marked.walkTokens(tokens, opt.walkTokens);\n }\n\n return Parser_1.parseInline(tokens, opt);\n } catch (e) {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n\n if (opt.silent) {\n return '

    An error occurred:

    ' + escape(e.message + '', true) + '
    ';\n }\n\n throw e;\n }\n };\n /**\n * Expose\n */\n\n\n marked.Parser = Parser_1;\n marked.parser = Parser_1.parse;\n marked.Renderer = Renderer_1;\n marked.TextRenderer = TextRenderer_1;\n marked.Lexer = Lexer_1;\n marked.lexer = Lexer_1.lex;\n marked.Tokenizer = Tokenizer_1;\n marked.Slugger = Slugger_1;\n marked.parse = marked;\n var marked_1 = marked;\n\n return marked_1;\n\n})));\n","/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.DOMPurify = factory());\n}(this, function () { 'use strict';\n\n function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n var hasOwnProperty = Object.hasOwnProperty,\n setPrototypeOf = Object.setPrototypeOf,\n isFrozen = Object.isFrozen,\n getPrototypeOf = Object.getPrototypeOf,\n getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n var freeze = Object.freeze,\n seal = Object.seal,\n create = Object.create; // eslint-disable-line import/no-mutable-exports\n\n var _ref = typeof Reflect !== 'undefined' && Reflect,\n apply = _ref.apply,\n construct = _ref.construct;\n\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n\n if (!construct) {\n construct = function construct(Func, args) {\n return new (Function.prototype.bind.apply(Func, [null].concat(_toConsumableArray(args))))();\n };\n }\n\n var arrayForEach = unapply(Array.prototype.forEach);\n var arrayPop = unapply(Array.prototype.pop);\n var arrayPush = unapply(Array.prototype.push);\n\n var stringToLowerCase = unapply(String.prototype.toLowerCase);\n var stringMatch = unapply(String.prototype.match);\n var stringReplace = unapply(String.prototype.replace);\n var stringIndexOf = unapply(String.prototype.indexOf);\n var stringTrim = unapply(String.prototype.trim);\n\n var regExpTest = unapply(RegExp.prototype.test);\n\n var typeErrorCreate = unconstruct(TypeError);\n\n function unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return apply(func, thisArg, args);\n };\n }\n\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return construct(func, args);\n };\n }\n\n /* Add properties to a lookup table */\n function addToSet(set, array) {\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n var l = array.length;\n while (l--) {\n var element = array[l];\n if (typeof element === 'string') {\n var lcElement = stringToLowerCase(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n }\n\n /* Shallow clone an object */\n function clone(object) {\n var newObject = create(null);\n\n var property = void 0;\n for (property in object) {\n if (apply(hasOwnProperty, object, [property])) {\n newObject[property] = object[property];\n }\n }\n\n return newObject;\n }\n\n /* IE10 doesn't support __lookupGetter__ so lets'\n * simulate it. It also automatically checks\n * if the prop is function or getter and behaves\n * accordingly. */\n function lookupGetter(object, prop) {\n while (object !== null) {\n var desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n }\n\n var html = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\n\n // SVG\n var svg = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n\n var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n\n // List of SVG elements that are disallowed by default.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'feimage', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n\n var mathMl = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']);\n\n // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n\n var text = freeze(['#text']);\n\n var html$1 = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\n\n var svg$1 = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n\n var mathMl$1 = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n\n var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n // eslint-disable-next-line unicorn/better-regex\n var MUSTACHE_EXPR = seal(/\\{\\{[\\s\\S]*|[\\s\\S]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n var ERB_EXPR = seal(/<%[\\s\\S]*|[\\s\\S]*%>/gm);\n var DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n var ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n var IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n var ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n\n var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n function _toConsumableArray$1(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n var getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {Document} document The document object (to determine policy name suffix)\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported).\n */\n var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {\n if ((typeof trustedTypes === 'undefined' ? 'undefined' : _typeof(trustedTypes)) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n var suffix = null;\n var ATTR_NAME = 'data-tt-policy-suffix';\n if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {\n suffix = document.currentScript.getAttribute(ATTR_NAME);\n }\n\n var policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML: function createHTML(html$$1) {\n return html$$1;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n\n function createDOMPurify() {\n var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n\n var DOMPurify = function DOMPurify(root) {\n return createDOMPurify(root);\n };\n\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = '2.2.8';\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n\n return DOMPurify;\n }\n\n var originalDocument = window.document;\n\n var document = window.document;\n var DocumentFragment = window.DocumentFragment,\n HTMLTemplateElement = window.HTMLTemplateElement,\n Node = window.Node,\n Element = window.Element,\n NodeFilter = window.NodeFilter,\n _window$NamedNodeMap = window.NamedNodeMap,\n NamedNodeMap = _window$NamedNodeMap === undefined ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,\n Text = window.Text,\n Comment = window.Comment,\n DOMParser = window.DOMParser,\n trustedTypes = window.trustedTypes;\n\n\n var ElementPrototype = Element.prototype;\n\n var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n var getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n var template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);\n var emptyHTML = trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML('') : '';\n\n var _document = document,\n implementation = _document.implementation,\n createNodeIterator = _document.createNodeIterator,\n createDocumentFragment = _document.createDocumentFragment;\n var importNode = originalDocument.importNode;\n\n\n var documentMode = {};\n try {\n documentMode = clone(document).documentMode ? document.documentMode : {};\n } catch (_) {}\n\n var hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;\n\n var MUSTACHE_EXPR$$1 = MUSTACHE_EXPR,\n ERB_EXPR$$1 = ERB_EXPR,\n DATA_ATTR$$1 = DATA_ATTR,\n ARIA_ATTR$$1 = ARIA_ATTR,\n IS_SCRIPT_OR_DATA$$1 = IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE$$1 = ATTR_WHITESPACE;\n var IS_ALLOWED_URI$$1 = IS_ALLOWED_URI;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n\n var ALLOWED_TAGS = null;\n var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(html), _toConsumableArray$1(svg), _toConsumableArray$1(svgFilters), _toConsumableArray$1(mathMl), _toConsumableArray$1(text)));\n\n /* Allowed attribute names */\n var ALLOWED_ATTR = null;\n var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray$1(html$1), _toConsumableArray$1(svg$1), _toConsumableArray$1(mathMl$1), _toConsumableArray$1(xml)));\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n var FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n var FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n var ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n var ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n var ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n var SAFE_FOR_TEMPLATES = false;\n\n /* Decide if document with ... should be returned */\n var WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n var SET_CONFIG = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n var FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n var RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n var RETURN_DOM_FRAGMENT = false;\n\n /* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM\n * `Node` is imported into the current `Document`. If this flag is not enabled the\n * `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by\n * DOMPurify.\n *\n * This defaults to `true` starting DOMPurify 2.2.0. Note that setting it to `false`\n * might cause XSS from attacks hidden in closed shadowroots in case the browser\n * supports Declarative Shadow: DOM https://web.dev/declarative-shadow-dom/\n */\n var RETURN_DOM_IMPORT = true;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n var RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks? */\n var SANITIZE_DOM = true;\n\n /* Keep element content when removing element? */\n var KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n var IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n var USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n var FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n\n /* Tags that are safe for data: URIs */\n var DATA_URI_TAGS = null;\n var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\n /* Attributes safe for values like \"javascript:\" */\n var URI_SAFE_ATTRIBUTES = null;\n var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'summary', 'title', 'value', 'style', 'xmlns']);\n\n var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n var NAMESPACE = HTML_NAMESPACE;\n\n /* Keep a reference to config to pass to hooks */\n var CONFIG = null;\n\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n\n var formElement = document.createElement('form');\n\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n var _parseConfig = function _parseConfig(cfg) {\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n\n /* Shield configuration object from tampering */\n if (!cfg || (typeof cfg === 'undefined' ? 'undefined' : _typeof(cfg)) !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n\n /* Set configuration parameters */\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR) : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS) : DEFAULT_DATA_URI_TAGS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_DOM_IMPORT = cfg.RETURN_DOM_IMPORT !== false; // Default true\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI$$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$$1;\n NAMESPACE = cfg.NAMESPACE || NAMESPACE;\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(text)));\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html);\n addToSet(ALLOWED_ATTR, html$1);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg);\n addToSet(ALLOWED_ATTR, svg$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl);\n addToSet(ALLOWED_ATTR, mathMl$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n\n var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n var ALL_SVG_TAGS = addToSet({}, svg);\n addToSet(ALL_SVG_TAGS, svgFilters);\n addToSet(ALL_SVG_TAGS, svgDisallowed);\n\n var ALL_MATHML_TAGS = addToSet({}, mathMl);\n addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n\n /**\n *\n *\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n var _checkValidNamespace = function _checkValidNamespace(element) {\n var parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: HTML_NAMESPACE,\n tagName: 'template'\n };\n }\n\n var tagName = stringToLowerCase(element.tagName);\n var parentTagName = stringToLowerCase(parent.tagName);\n\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n }\n\n // The only way to switch from MathML to SVG is via\n // svg if parent is either or MathML\n // text integration points.\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n }\n\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n }\n\n // The only way to switch from SVG to MathML is via\n // and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erronously deleted from\n // HTML namespace.\n var commonSvgAndHTMLElements = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return !ALL_MATHML_TAGS[tagName] && (commonSvgAndHTMLElements[tagName] || !ALL_SVG_TAGS[tagName]);\n }\n\n // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG or MathML). Return false just in case.\n return false;\n };\n\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n var _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, { element: node });\n try {\n node.parentNode.removeChild(node);\n } catch (_) {\n try {\n node.outerHTML = emptyHTML;\n } catch (_) {\n node.remove();\n }\n }\n };\n\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n var _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n\n node.removeAttribute(name);\n\n // We void attribute values for unremovable \"is\"\" attributes\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n var _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n var doc = void 0;\n var leadingWhitespace = void 0;\n\n if (FORCE_BODY) {\n dirty = '' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n var matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n\n var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, 'text/html');\n } catch (_) {}\n }\n\n /* Use createHTMLDocument in case DOMParser is not available */\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n doc.documentElement.innerHTML = dirtyPayload;\n }\n\n var body = doc.body || doc.documentElement;\n\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n\n /* Work on whole document or just its body */\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n\n /**\n * _createIterator\n *\n * @param {Document} root document/fragment to create iterator for\n * @return {Iterator} iterator instance\n */\n var _createIterator = function _createIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, function () {\n return NodeFilter.FILTER_ACCEPT;\n }, false);\n };\n\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n var _isClobbered = function _isClobbered(elm) {\n if (elm instanceof Text || elm instanceof Comment) {\n return false;\n }\n\n if (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function') {\n return true;\n }\n\n return false;\n };\n\n /**\n * _isNode\n *\n * @param {Node} obj object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n var _isNode = function _isNode(object) {\n return (typeof Node === 'undefined' ? 'undefined' : _typeof(Node)) === 'object' ? object instanceof Node : object && (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';\n };\n\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n var _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n\n arrayForEach(hooks[entryPoint], function (hook) {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n var _sanitizeElements = function _sanitizeElements(currentNode) {\n var content = void 0;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check if tagname contains Unicode */\n if (stringMatch(currentNode.nodeName, /[\\u0080-\\uFFFF]/)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n var tagName = stringToLowerCase(currentNode.nodeName);\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName: tagName,\n allowedTags: ALLOWED_TAGS\n });\n\n /* Detect mXSS attempts abusing namespace confusion */\n if (!_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove element if anything forbids its presence */\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Keep content except for bad-listed elements */\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n var parentNode = getParentNode(currentNode) || currentNode.parentNode;\n var childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n\n if (childNodes && parentNode) {\n var childCount = childNodes.length;\n\n for (var i = childCount - 1; i >= 0; --i) {\n parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));\n }\n }\n }\n\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check whether element has a valid namespace */\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n if ((tagName === 'noscript' || tagName === 'noembed') && regExpTest(/<\\/no(script|embed)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Sanitize element content to be template-safe */\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {\n /* Get the element's text content */\n content = currentNode.textContent;\n content = stringReplace(content, MUSTACHE_EXPR$$1, ' ');\n content = stringReplace(content, ERB_EXPR$$1, ' ');\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });\n currentNode.textContent = content;\n }\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeElements', currentNode, null);\n\n return false;\n };\n\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n var _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n return false;\n }\n\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$$1, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n return false;\n\n /* Check value is safe. First, is attr inert? If so, is safe */\n } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ; else if (!value) ; else {\n return false;\n }\n\n return true;\n };\n\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n var _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n var attr = void 0;\n var value = void 0;\n var lcName = void 0;\n var l = void 0;\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n\n var attributes = currentNode.attributes;\n\n /* Check if we have attributes; if not we might have a text node */\n\n if (!attributes) {\n return;\n }\n\n var hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR\n };\n l = attributes.length;\n\n /* Go backwards over all attributes; safely remove bad ones */\n while (l--) {\n attr = attributes[l];\n var _attr = attr,\n name = _attr.name,\n namespaceURI = _attr.namespaceURI;\n\n value = stringTrim(attr.value);\n lcName = stringToLowerCase(name);\n\n /* Execute a hook if present */\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n value = hookEvent.attrValue;\n /* Did the hooks approve of the attribute? */\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n\n /* Remove attribute */\n _removeAttribute(name, currentNode);\n\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n continue;\n }\n\n /* Work around a security issue in jQuery 3.0 */\n if (regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n value = stringReplace(value, MUSTACHE_EXPR$$1, ' ');\n value = stringReplace(value, ERB_EXPR$$1, ' ');\n }\n\n /* Is `value` valid for this attribute? */\n var lcTag = currentNode.nodeName.toLowerCase();\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n\n /* Handle invalid data-* attribute set by try-catching it */\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n\n arrayPop(DOMPurify.removed);\n } catch (_) {}\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n var _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n var shadowNode = void 0;\n var shadowIterator = _createIterator(fragment);\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n\n /* Deep shadow DOM detected */\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(shadowNode);\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} configuration object\n */\n // eslint-disable-next-line complexity\n DOMPurify.sanitize = function (dirty, cfg) {\n var body = void 0;\n var importedNode = void 0;\n var currentNode = void 0;\n var oldNode = void 0;\n var returnNode = void 0;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n if (!dirty) {\n dirty = '';\n }\n\n /* Stringify, in case dirty is an object */\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n // eslint-disable-next-line no-negated-condition\n if (typeof dirty.toString !== 'function') {\n throw typeErrorCreate('toString is not a function');\n } else {\n dirty = dirty.toString();\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n }\n }\n\n /* Check we can run. Otherwise fall back or ignore */\n if (!DOMPurify.isSupported) {\n if (_typeof(window.toStaticHTML) === 'object' || typeof window.toStaticHTML === 'function') {\n if (typeof dirty === 'string') {\n return window.toStaticHTML(dirty);\n }\n\n if (_isNode(dirty)) {\n return window.toStaticHTML(dirty.outerHTML);\n }\n }\n\n return dirty;\n }\n\n /* Assign config vars */\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n\n /* Clean up removed elements */\n DOMPurify.removed = [];\n\n /* Check if dirty is correctly typed for IN_PLACE */\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n\n if (IN_PLACE) ; else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : emptyHTML;\n }\n }\n\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n\n /* Get node iterator */\n var nodeIterator = _createIterator(IN_PLACE ? dirty : body);\n\n /* Now start iterating over the created document */\n while (currentNode = nodeIterator.nextNode()) {\n /* Fix IE's strange behavior with manipulated textNodes #89 */\n if (currentNode.nodeType === 3 && currentNode === oldNode) {\n continue;\n }\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n\n /* Shadow DOM detected, sanitize it */\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(currentNode);\n\n oldNode = currentNode;\n }\n\n oldNode = null;\n\n /* If we sanitized `dirty` in-place, return it. */\n if (IN_PLACE) {\n return dirty;\n }\n\n /* Return sanitized string or DOM */\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n\n if (RETURN_DOM_IMPORT) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n\n return returnNode;\n }\n\n var serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\n /* Sanitize final string template-safe */\n if (SAFE_FOR_TEMPLATES) {\n serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$$1, ' ');\n serializedHTML = stringReplace(serializedHTML, ERB_EXPR$$1, ' ');\n }\n\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n DOMPurify.setConfig = function (cfg) {\n _parseConfig(cfg);\n SET_CONFIG = true;\n };\n\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {string} tag Tag name of containing element.\n * @param {string} attr Attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n\n var lcTag = stringToLowerCase(tag);\n var lcName = stringToLowerCase(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n\n hooks[entryPoint] = hooks[entryPoint] || [];\n arrayPush(hooks[entryPoint], hookFunction);\n };\n\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n */\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n arrayPop(hooks[entryPoint]);\n }\n };\n\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n *\n */\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n\n return DOMPurify;\n }\n\n var purify = createDOMPurify();\n\n return purify;\n\n}));\n//# sourceMappingURL=purify.js.map\n","'use strict';\nconst minIndent = require('min-indent');\n\nmodule.exports = string => {\n\tconst indent = minIndent(string);\n\n\tif (indent === 0) {\n\t\treturn string;\n\t}\n\n\tconst regex = new RegExp(`^[ \\\\t]{${indent}}`, 'gm');\n\n\treturn string.replace(regex, '');\n};\n","function deepFreeze(obj) {\n if (obj instanceof Map) {\n obj.clear = obj.delete = obj.set = function () {\n throw new Error('map is read-only');\n };\n } else if (obj instanceof Set) {\n obj.add = obj.clear = obj.delete = function () {\n throw new Error('set is read-only');\n };\n }\n\n // Freeze self\n Object.freeze(obj);\n\n Object.getOwnPropertyNames(obj).forEach(function (name) {\n var prop = obj[name];\n\n // Freeze prop if it is an object\n if (typeof prop == 'object' && !Object.isFrozen(prop)) {\n deepFreeze(prop);\n }\n });\n\n return obj;\n}\n\nvar deepFreezeEs6 = deepFreeze;\nvar _default = deepFreeze;\ndeepFreezeEs6.default = _default;\n\n/** @implements CallbackResponse */\nclass Response {\n /**\n * @param {CompiledMode} mode\n */\n constructor(mode) {\n // eslint-disable-next-line no-undefined\n if (mode.data === undefined) mode.data = {};\n\n this.data = mode.data;\n this.isMatchIgnored = false;\n }\n\n ignoreMatch() {\n this.isMatchIgnored = true;\n }\n}\n\n/**\n * @param {string} value\n * @returns {string}\n */\nfunction escapeHTML(value) {\n return value\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n}\n\n/**\n * performs a shallow merge of multiple objects into one\n *\n * @template T\n * @param {T} original\n * @param {Record[]} objects\n * @returns {T} a single new object\n */\nfunction inherit(original, ...objects) {\n /** @type Record */\n const result = Object.create(null);\n\n for (const key in original) {\n result[key] = original[key];\n }\n objects.forEach(function(obj) {\n for (const key in obj) {\n result[key] = obj[key];\n }\n });\n return /** @type {T} */ (result);\n}\n\n/**\n * @typedef {object} Renderer\n * @property {(text: string) => void} addText\n * @property {(node: Node) => void} openNode\n * @property {(node: Node) => void} closeNode\n * @property {() => string} value\n */\n\n/** @typedef {{kind?: string, sublanguage?: boolean}} Node */\n/** @typedef {{walk: (r: Renderer) => void}} Tree */\n/** */\n\nconst SPAN_CLOSE = '';\n\n/**\n * Determines if a node needs to be wrapped in \n *\n * @param {Node} node */\nconst emitsWrappingTags = (node) => {\n return !!node.kind;\n};\n\n/** @type {Renderer} */\nclass HTMLRenderer {\n /**\n * Creates a new HTMLRenderer\n *\n * @param {Tree} parseTree - the parse tree (must support `walk` API)\n * @param {{classPrefix: string}} options\n */\n constructor(parseTree, options) {\n this.buffer = \"\";\n this.classPrefix = options.classPrefix;\n parseTree.walk(this);\n }\n\n /**\n * Adds texts to the output stream\n *\n * @param {string} text */\n addText(text) {\n this.buffer += escapeHTML(text);\n }\n\n /**\n * Adds a node open to the output stream (if needed)\n *\n * @param {Node} node */\n openNode(node) {\n if (!emitsWrappingTags(node)) return;\n\n let className = node.kind;\n if (!node.sublanguage) {\n className = `${this.classPrefix}${className}`;\n }\n this.span(className);\n }\n\n /**\n * Adds a node close to the output stream (if needed)\n *\n * @param {Node} node */\n closeNode(node) {\n if (!emitsWrappingTags(node)) return;\n\n this.buffer += SPAN_CLOSE;\n }\n\n /**\n * returns the accumulated buffer\n */\n value() {\n return this.buffer;\n }\n\n // helpers\n\n /**\n * Builds a span element\n *\n * @param {string} className */\n span(className) {\n this.buffer += ``;\n }\n}\n\n/** @typedef {{kind?: string, sublanguage?: boolean, children: Node[]} | string} Node */\n/** @typedef {{kind?: string, sublanguage?: boolean, children: Node[]} } DataNode */\n/** */\n\nclass TokenTree {\n constructor() {\n /** @type DataNode */\n this.rootNode = { children: [] };\n this.stack = [this.rootNode];\n }\n\n get top() {\n return this.stack[this.stack.length - 1];\n }\n\n get root() { return this.rootNode; }\n\n /** @param {Node} node */\n add(node) {\n this.top.children.push(node);\n }\n\n /** @param {string} kind */\n openNode(kind) {\n /** @type Node */\n const node = { kind, children: [] };\n this.add(node);\n this.stack.push(node);\n }\n\n closeNode() {\n if (this.stack.length > 1) {\n return this.stack.pop();\n }\n // eslint-disable-next-line no-undefined\n return undefined;\n }\n\n closeAllNodes() {\n while (this.closeNode());\n }\n\n toJSON() {\n return JSON.stringify(this.rootNode, null, 4);\n }\n\n /**\n * @typedef { import(\"./html_renderer\").Renderer } Renderer\n * @param {Renderer} builder\n */\n walk(builder) {\n // this does not\n return this.constructor._walk(builder, this.rootNode);\n // this works\n // return TokenTree._walk(builder, this.rootNode);\n }\n\n /**\n * @param {Renderer} builder\n * @param {Node} node\n */\n static _walk(builder, node) {\n if (typeof node === \"string\") {\n builder.addText(node);\n } else if (node.children) {\n builder.openNode(node);\n node.children.forEach((child) => this._walk(builder, child));\n builder.closeNode(node);\n }\n return builder;\n }\n\n /**\n * @param {Node} node\n */\n static _collapse(node) {\n if (typeof node === \"string\") return;\n if (!node.children) return;\n\n if (node.children.every(el => typeof el === \"string\")) {\n // node.text = node.children.join(\"\");\n // delete node.children;\n node.children = [node.children.join(\"\")];\n } else {\n node.children.forEach((child) => {\n TokenTree._collapse(child);\n });\n }\n }\n}\n\n/**\n Currently this is all private API, but this is the minimal API necessary\n that an Emitter must implement to fully support the parser.\n\n Minimal interface:\n\n - addKeyword(text, kind)\n - addText(text)\n - addSublanguage(emitter, subLanguageName)\n - finalize()\n - openNode(kind)\n - closeNode()\n - closeAllNodes()\n - toHTML()\n\n*/\n\n/**\n * @implements {Emitter}\n */\nclass TokenTreeEmitter extends TokenTree {\n /**\n * @param {*} options\n */\n constructor(options) {\n super();\n this.options = options;\n }\n\n /**\n * @param {string} text\n * @param {string} kind\n */\n addKeyword(text, kind) {\n if (text === \"\") { return; }\n\n this.openNode(kind);\n this.addText(text);\n this.closeNode();\n }\n\n /**\n * @param {string} text\n */\n addText(text) {\n if (text === \"\") { return; }\n\n this.add(text);\n }\n\n /**\n * @param {Emitter & {root: DataNode}} emitter\n * @param {string} name\n */\n addSublanguage(emitter, name) {\n /** @type DataNode */\n const node = emitter.root;\n node.kind = name;\n node.sublanguage = true;\n this.add(node);\n }\n\n toHTML() {\n const renderer = new HTMLRenderer(this, this.options);\n return renderer.value();\n }\n\n finalize() {\n return true;\n }\n}\n\n/**\n * @param {string} value\n * @returns {RegExp}\n * */\nfunction escape(value) {\n return new RegExp(value.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'), 'm');\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n if (!re) return null;\n if (typeof re === \"string\") return re;\n\n return re.source;\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n const joined = args.map((x) => source(x)).join(\"\");\n return joined;\n}\n\n/**\n * Any of the passed expresssions may match\n *\n * Creates a huge this | this | that | that match\n * @param {(RegExp | string)[] } args\n * @returns {string}\n */\nfunction either(...args) {\n const joined = '(' + args.map((x) => source(x)).join(\"|\") + \")\";\n return joined;\n}\n\n/**\n * @param {RegExp} re\n * @returns {number}\n */\nfunction countMatchGroups(re) {\n return (new RegExp(re.toString() + '|')).exec('').length - 1;\n}\n\n/**\n * Does lexeme start with a regular expression match at the beginning\n * @param {RegExp} re\n * @param {string} lexeme\n */\nfunction startsWith(re, lexeme) {\n const match = re && re.exec(lexeme);\n return match && match.index === 0;\n}\n\n// BACKREF_RE matches an open parenthesis or backreference. To avoid\n// an incorrect parse, it additionally matches the following:\n// - [...] elements, where the meaning of parentheses and escapes change\n// - other escape sequences, so we do not misparse escape sequences as\n// interesting elements\n// - non-matching or lookahead parentheses, which do not capture. These\n// follow the '(' with a '?'.\nconst BACKREF_RE = /\\[(?:[^\\\\\\]]|\\\\.)*\\]|\\(\\??|\\\\([1-9][0-9]*)|\\\\./;\n\n// join logically computes regexps.join(separator), but fixes the\n// backreferences so they continue to match.\n// it also places each individual regular expression into it's own\n// match group, keeping track of the sequencing of those match groups\n// is currently an exercise for the caller. :-)\n/**\n * @param {(string | RegExp)[]} regexps\n * @param {string} separator\n * @returns {string}\n */\nfunction join(regexps, separator = \"|\") {\n let numCaptures = 0;\n\n return regexps.map((regex) => {\n numCaptures += 1;\n const offset = numCaptures;\n let re = source(regex);\n let out = '';\n\n while (re.length > 0) {\n const match = BACKREF_RE.exec(re);\n if (!match) {\n out += re;\n break;\n }\n out += re.substring(0, match.index);\n re = re.substring(match.index + match[0].length);\n if (match[0][0] === '\\\\' && match[1]) {\n // Adjust the backreference.\n out += '\\\\' + String(Number(match[1]) + offset);\n } else {\n out += match[0];\n if (match[0] === '(') {\n numCaptures++;\n }\n }\n }\n return out;\n }).map(re => `(${re})`).join(separator);\n}\n\n// Common regexps\nconst MATCH_NOTHING_RE = /\\b\\B/;\nconst IDENT_RE = '[a-zA-Z]\\\\w*';\nconst UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\\\w*';\nconst NUMBER_RE = '\\\\b\\\\d+(\\\\.\\\\d+)?';\nconst C_NUMBER_RE = '(-?)(\\\\b0[xX][a-fA-F0-9]+|(\\\\b\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)([eE][-+]?\\\\d+)?)'; // 0x..., 0..., decimal, float\nconst BINARY_NUMBER_RE = '\\\\b(0b[01]+)'; // 0b...\nconst RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\\\*|\\\\*=|\\\\+|\\\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\\\?|\\\\[|\\\\{|\\\\(|\\\\^|\\\\^=|\\\\||\\\\|=|\\\\|\\\\||~';\n\n/**\n* @param { Partial & {binary?: string | RegExp} } opts\n*/\nconst SHEBANG = (opts = {}) => {\n const beginShebang = /^#![ ]*\\//;\n if (opts.binary) {\n opts.begin = concat(\n beginShebang,\n /.*\\b/,\n opts.binary,\n /\\b.*/);\n }\n return inherit({\n className: 'meta',\n begin: beginShebang,\n end: /$/,\n relevance: 0,\n /** @type {ModeCallback} */\n \"on:begin\": (m, resp) => {\n if (m.index !== 0) resp.ignoreMatch();\n }\n }, opts);\n};\n\n// Common modes\nconst BACKSLASH_ESCAPE = {\n begin: '\\\\\\\\[\\\\s\\\\S]', relevance: 0\n};\nconst APOS_STRING_MODE = {\n className: 'string',\n begin: '\\'',\n end: '\\'',\n illegal: '\\\\n',\n contains: [BACKSLASH_ESCAPE]\n};\nconst QUOTE_STRING_MODE = {\n className: 'string',\n begin: '\"',\n end: '\"',\n illegal: '\\\\n',\n contains: [BACKSLASH_ESCAPE]\n};\nconst PHRASAL_WORDS_MODE = {\n begin: /\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\\b/\n};\n/**\n * Creates a comment mode\n *\n * @param {string | RegExp} begin\n * @param {string | RegExp} end\n * @param {Mode | {}} [modeOptions]\n * @returns {Partial}\n */\nconst COMMENT = function(begin, end, modeOptions = {}) {\n const mode = inherit(\n {\n className: 'comment',\n begin,\n end,\n contains: []\n },\n modeOptions\n );\n mode.contains.push(PHRASAL_WORDS_MODE);\n mode.contains.push({\n className: 'doctag',\n begin: '(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):',\n relevance: 0\n });\n return mode;\n};\nconst C_LINE_COMMENT_MODE = COMMENT('//', '$');\nconst C_BLOCK_COMMENT_MODE = COMMENT('/\\\\*', '\\\\*/');\nconst HASH_COMMENT_MODE = COMMENT('#', '$');\nconst NUMBER_MODE = {\n className: 'number',\n begin: NUMBER_RE,\n relevance: 0\n};\nconst C_NUMBER_MODE = {\n className: 'number',\n begin: C_NUMBER_RE,\n relevance: 0\n};\nconst BINARY_NUMBER_MODE = {\n className: 'number',\n begin: BINARY_NUMBER_RE,\n relevance: 0\n};\nconst CSS_NUMBER_MODE = {\n className: 'number',\n begin: NUMBER_RE + '(' +\n '%|em|ex|ch|rem' +\n '|vw|vh|vmin|vmax' +\n '|cm|mm|in|pt|pc|px' +\n '|deg|grad|rad|turn' +\n '|s|ms' +\n '|Hz|kHz' +\n '|dpi|dpcm|dppx' +\n ')?',\n relevance: 0\n};\nconst REGEXP_MODE = {\n // this outer rule makes sure we actually have a WHOLE regex and not simply\n // an expression such as:\n //\n // 3 / something\n //\n // (which will then blow up when regex's `illegal` sees the newline)\n begin: /(?=\\/[^/\\n]*\\/)/,\n contains: [{\n className: 'regexp',\n begin: /\\//,\n end: /\\/[gimuy]*/,\n illegal: /\\n/,\n contains: [\n BACKSLASH_ESCAPE,\n {\n begin: /\\[/,\n end: /\\]/,\n relevance: 0,\n contains: [BACKSLASH_ESCAPE]\n }\n ]\n }]\n};\nconst TITLE_MODE = {\n className: 'title',\n begin: IDENT_RE,\n relevance: 0\n};\nconst UNDERSCORE_TITLE_MODE = {\n className: 'title',\n begin: UNDERSCORE_IDENT_RE,\n relevance: 0\n};\nconst METHOD_GUARD = {\n // excludes method names from keyword processing\n begin: '\\\\.\\\\s*' + UNDERSCORE_IDENT_RE,\n relevance: 0\n};\n\n/**\n * Adds end same as begin mechanics to a mode\n *\n * Your mode must include at least a single () match group as that first match\n * group is what is used for comparison\n * @param {Partial} mode\n */\nconst END_SAME_AS_BEGIN = function(mode) {\n return Object.assign(mode,\n {\n /** @type {ModeCallback} */\n 'on:begin': (m, resp) => { resp.data._beginMatch = m[1]; },\n /** @type {ModeCallback} */\n 'on:end': (m, resp) => { if (resp.data._beginMatch !== m[1]) resp.ignoreMatch(); }\n });\n};\n\nvar MODES = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MATCH_NOTHING_RE: MATCH_NOTHING_RE,\n IDENT_RE: IDENT_RE,\n UNDERSCORE_IDENT_RE: UNDERSCORE_IDENT_RE,\n NUMBER_RE: NUMBER_RE,\n C_NUMBER_RE: C_NUMBER_RE,\n BINARY_NUMBER_RE: BINARY_NUMBER_RE,\n RE_STARTERS_RE: RE_STARTERS_RE,\n SHEBANG: SHEBANG,\n BACKSLASH_ESCAPE: BACKSLASH_ESCAPE,\n APOS_STRING_MODE: APOS_STRING_MODE,\n QUOTE_STRING_MODE: QUOTE_STRING_MODE,\n PHRASAL_WORDS_MODE: PHRASAL_WORDS_MODE,\n COMMENT: COMMENT,\n C_LINE_COMMENT_MODE: C_LINE_COMMENT_MODE,\n C_BLOCK_COMMENT_MODE: C_BLOCK_COMMENT_MODE,\n HASH_COMMENT_MODE: HASH_COMMENT_MODE,\n NUMBER_MODE: NUMBER_MODE,\n C_NUMBER_MODE: C_NUMBER_MODE,\n BINARY_NUMBER_MODE: BINARY_NUMBER_MODE,\n CSS_NUMBER_MODE: CSS_NUMBER_MODE,\n REGEXP_MODE: REGEXP_MODE,\n TITLE_MODE: TITLE_MODE,\n UNDERSCORE_TITLE_MODE: UNDERSCORE_TITLE_MODE,\n METHOD_GUARD: METHOD_GUARD,\n END_SAME_AS_BEGIN: END_SAME_AS_BEGIN\n});\n\n// Grammar extensions / plugins\n// See: https://github.com/highlightjs/highlight.js/issues/2833\n\n// Grammar extensions allow \"syntactic sugar\" to be added to the grammar modes\n// without requiring any underlying changes to the compiler internals.\n\n// `compileMatch` being the perfect small example of now allowing a grammar\n// author to write `match` when they desire to match a single expression rather\n// than being forced to use `begin`. The extension then just moves `match` into\n// `begin` when it runs. Ie, no features have been added, but we've just made\n// the experience of writing (and reading grammars) a little bit nicer.\n\n// ------\n\n// TODO: We need negative look-behind support to do this properly\n/**\n * Skip a match if it has a preceding dot\n *\n * This is used for `beginKeywords` to prevent matching expressions such as\n * `bob.keyword.do()`. The mode compiler automatically wires this up as a\n * special _internal_ 'on:begin' callback for modes with `beginKeywords`\n * @param {RegExpMatchArray} match\n * @param {CallbackResponse} response\n */\nfunction skipIfhasPrecedingDot(match, response) {\n const before = match.input[match.index - 1];\n if (before === \".\") {\n response.ignoreMatch();\n }\n}\n\n\n/**\n * `beginKeywords` syntactic sugar\n * @type {CompilerExt}\n */\nfunction beginKeywords(mode, parent) {\n if (!parent) return;\n if (!mode.beginKeywords) return;\n\n // for languages with keywords that include non-word characters checking for\n // a word boundary is not sufficient, so instead we check for a word boundary\n // or whitespace - this does no harm in any case since our keyword engine\n // doesn't allow spaces in keywords anyways and we still check for the boundary\n // first\n mode.begin = '\\\\b(' + mode.beginKeywords.split(' ').join('|') + ')(?!\\\\.)(?=\\\\b|\\\\s)';\n mode.__beforeBegin = skipIfhasPrecedingDot;\n mode.keywords = mode.keywords || mode.beginKeywords;\n delete mode.beginKeywords;\n\n // prevents double relevance, the keywords themselves provide\n // relevance, the mode doesn't need to double it\n // eslint-disable-next-line no-undefined\n if (mode.relevance === undefined) mode.relevance = 0;\n}\n\n/**\n * Allow `illegal` to contain an array of illegal values\n * @type {CompilerExt}\n */\nfunction compileIllegal(mode, _parent) {\n if (!Array.isArray(mode.illegal)) return;\n\n mode.illegal = either(...mode.illegal);\n}\n\n/**\n * `match` to match a single expression for readability\n * @type {CompilerExt}\n */\nfunction compileMatch(mode, _parent) {\n if (!mode.match) return;\n if (mode.begin || mode.end) throw new Error(\"begin & end are not supported with match\");\n\n mode.begin = mode.match;\n delete mode.match;\n}\n\n/**\n * provides the default 1 relevance to all modes\n * @type {CompilerExt}\n */\nfunction compileRelevance(mode, _parent) {\n // eslint-disable-next-line no-undefined\n if (mode.relevance === undefined) mode.relevance = 1;\n}\n\n// keywords that should have no default relevance value\nconst COMMON_KEYWORDS = [\n 'of',\n 'and',\n 'for',\n 'in',\n 'not',\n 'or',\n 'if',\n 'then',\n 'parent', // common variable name\n 'list', // common variable name\n 'value' // common variable name\n];\n\nconst DEFAULT_KEYWORD_CLASSNAME = \"keyword\";\n\n/**\n * Given raw keywords from a language definition, compile them.\n *\n * @param {string | Record | Array} rawKeywords\n * @param {boolean} caseInsensitive\n */\nfunction compileKeywords(rawKeywords, caseInsensitive, className = DEFAULT_KEYWORD_CLASSNAME) {\n /** @type KeywordDict */\n const compiledKeywords = {};\n\n // input can be a string of keywords, an array of keywords, or a object with\n // named keys representing className (which can then point to a string or array)\n if (typeof rawKeywords === 'string') {\n compileList(className, rawKeywords.split(\" \"));\n } else if (Array.isArray(rawKeywords)) {\n compileList(className, rawKeywords);\n } else {\n Object.keys(rawKeywords).forEach(function(className) {\n // collapse all our objects back into the parent object\n Object.assign(\n compiledKeywords,\n compileKeywords(rawKeywords[className], caseInsensitive, className)\n );\n });\n }\n return compiledKeywords;\n\n // ---\n\n /**\n * Compiles an individual list of keywords\n *\n * Ex: \"for if when while|5\"\n *\n * @param {string} className\n * @param {Array} keywordList\n */\n function compileList(className, keywordList) {\n if (caseInsensitive) {\n keywordList = keywordList.map(x => x.toLowerCase());\n }\n keywordList.forEach(function(keyword) {\n const pair = keyword.split('|');\n compiledKeywords[pair[0]] = [className, scoreForKeyword(pair[0], pair[1])];\n });\n }\n}\n\n/**\n * Returns the proper score for a given keyword\n *\n * Also takes into account comment keywords, which will be scored 0 UNLESS\n * another score has been manually assigned.\n * @param {string} keyword\n * @param {string} [providedScore]\n */\nfunction scoreForKeyword(keyword, providedScore) {\n // manual scores always win over common keywords\n // so you can force a score of 1 if you really insist\n if (providedScore) {\n return Number(providedScore);\n }\n\n return commonKeyword(keyword) ? 0 : 1;\n}\n\n/**\n * Determines if a given keyword is common or not\n *\n * @param {string} keyword */\nfunction commonKeyword(keyword) {\n return COMMON_KEYWORDS.includes(keyword.toLowerCase());\n}\n\n// compilation\n\n/**\n * Compiles a language definition result\n *\n * Given the raw result of a language definition (Language), compiles this so\n * that it is ready for highlighting code.\n * @param {Language} language\n * @param {{plugins: HLJSPlugin[]}} opts\n * @returns {CompiledLanguage}\n */\nfunction compileLanguage(language, { plugins }) {\n /**\n * Builds a regex with the case sensativility of the current language\n *\n * @param {RegExp | string} value\n * @param {boolean} [global]\n */\n function langRe(value, global) {\n return new RegExp(\n source(value),\n 'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : '')\n );\n }\n\n /**\n Stores multiple regular expressions and allows you to quickly search for\n them all in a string simultaneously - returning the first match. It does\n this by creating a huge (a|b|c) regex - each individual item wrapped with ()\n and joined by `|` - using match groups to track position. When a match is\n found checking which position in the array has content allows us to figure\n out which of the original regexes / match groups triggered the match.\n\n The match object itself (the result of `Regex.exec`) is returned but also\n enhanced by merging in any meta-data that was registered with the regex.\n This is how we keep track of which mode matched, and what type of rule\n (`illegal`, `begin`, end, etc).\n */\n class MultiRegex {\n constructor() {\n this.matchIndexes = {};\n // @ts-ignore\n this.regexes = [];\n this.matchAt = 1;\n this.position = 0;\n }\n\n // @ts-ignore\n addRule(re, opts) {\n opts.position = this.position++;\n // @ts-ignore\n this.matchIndexes[this.matchAt] = opts;\n this.regexes.push([opts, re]);\n this.matchAt += countMatchGroups(re) + 1;\n }\n\n compile() {\n if (this.regexes.length === 0) {\n // avoids the need to check length every time exec is called\n // @ts-ignore\n this.exec = () => null;\n }\n const terminators = this.regexes.map(el => el[1]);\n this.matcherRe = langRe(join(terminators), true);\n this.lastIndex = 0;\n }\n\n /** @param {string} s */\n exec(s) {\n this.matcherRe.lastIndex = this.lastIndex;\n const match = this.matcherRe.exec(s);\n if (!match) { return null; }\n\n // eslint-disable-next-line no-undefined\n const i = match.findIndex((el, i) => i > 0 && el !== undefined);\n // @ts-ignore\n const matchData = this.matchIndexes[i];\n // trim off any earlier non-relevant match groups (ie, the other regex\n // match groups that make up the multi-matcher)\n match.splice(0, i);\n\n return Object.assign(match, matchData);\n }\n }\n\n /*\n Created to solve the key deficiently with MultiRegex - there is no way to\n test for multiple matches at a single location. Why would we need to do\n that? In the future a more dynamic engine will allow certain matches to be\n ignored. An example: if we matched say the 3rd regex in a large group but\n decided to ignore it - we'd need to started testing again at the 4th\n regex... but MultiRegex itself gives us no real way to do that.\n\n So what this class creates MultiRegexs on the fly for whatever search\n position they are needed.\n\n NOTE: These additional MultiRegex objects are created dynamically. For most\n grammars most of the time we will never actually need anything more than the\n first MultiRegex - so this shouldn't have too much overhead.\n\n Say this is our search group, and we match regex3, but wish to ignore it.\n\n regex1 | regex2 | regex3 | regex4 | regex5 ' ie, startAt = 0\n\n What we need is a new MultiRegex that only includes the remaining\n possibilities:\n\n regex4 | regex5 ' ie, startAt = 3\n\n This class wraps all that complexity up in a simple API... `startAt` decides\n where in the array of expressions to start doing the matching. It\n auto-increments, so if a match is found at position 2, then startAt will be\n set to 3. If the end is reached startAt will return to 0.\n\n MOST of the time the parser will be setting startAt manually to 0.\n */\n class ResumableMultiRegex {\n constructor() {\n // @ts-ignore\n this.rules = [];\n // @ts-ignore\n this.multiRegexes = [];\n this.count = 0;\n\n this.lastIndex = 0;\n this.regexIndex = 0;\n }\n\n // @ts-ignore\n getMatcher(index) {\n if (this.multiRegexes[index]) return this.multiRegexes[index];\n\n const matcher = new MultiRegex();\n this.rules.slice(index).forEach(([re, opts]) => matcher.addRule(re, opts));\n matcher.compile();\n this.multiRegexes[index] = matcher;\n return matcher;\n }\n\n resumingScanAtSamePosition() {\n return this.regexIndex !== 0;\n }\n\n considerAll() {\n this.regexIndex = 0;\n }\n\n // @ts-ignore\n addRule(re, opts) {\n this.rules.push([re, opts]);\n if (opts.type === \"begin\") this.count++;\n }\n\n /** @param {string} s */\n exec(s) {\n const m = this.getMatcher(this.regexIndex);\n m.lastIndex = this.lastIndex;\n let result = m.exec(s);\n\n // The following is because we have no easy way to say \"resume scanning at the\n // existing position but also skip the current rule ONLY\". What happens is\n // all prior rules are also skipped which can result in matching the wrong\n // thing. Example of matching \"booger\":\n\n // our matcher is [string, \"booger\", number]\n //\n // ....booger....\n\n // if \"booger\" is ignored then we'd really need a regex to scan from the\n // SAME position for only: [string, number] but ignoring \"booger\" (if it\n // was the first match), a simple resume would scan ahead who knows how\n // far looking only for \"number\", ignoring potential string matches (or\n // future \"booger\" matches that might be valid.)\n\n // So what we do: We execute two matchers, one resuming at the same\n // position, but the second full matcher starting at the position after:\n\n // /--- resume first regex match here (for [number])\n // |/---- full match here for [string, \"booger\", number]\n // vv\n // ....booger....\n\n // Which ever results in a match first is then used. So this 3-4 step\n // process essentially allows us to say \"match at this position, excluding\n // a prior rule that was ignored\".\n //\n // 1. Match \"booger\" first, ignore. Also proves that [string] does non match.\n // 2. Resume matching for [number]\n // 3. Match at index + 1 for [string, \"booger\", number]\n // 4. If #2 and #3 result in matches, which came first?\n if (this.resumingScanAtSamePosition()) {\n if (result && result.index === this.lastIndex) ; else { // use the second matcher result\n const m2 = this.getMatcher(0);\n m2.lastIndex = this.lastIndex + 1;\n result = m2.exec(s);\n }\n }\n\n if (result) {\n this.regexIndex += result.position + 1;\n if (this.regexIndex === this.count) {\n // wrap-around to considering all matches again\n this.considerAll();\n }\n }\n\n return result;\n }\n }\n\n /**\n * Given a mode, builds a huge ResumableMultiRegex that can be used to walk\n * the content and find matches.\n *\n * @param {CompiledMode} mode\n * @returns {ResumableMultiRegex}\n */\n function buildModeRegex(mode) {\n const mm = new ResumableMultiRegex();\n\n mode.contains.forEach(term => mm.addRule(term.begin, { rule: term, type: \"begin\" }));\n\n if (mode.terminatorEnd) {\n mm.addRule(mode.terminatorEnd, { type: \"end\" });\n }\n if (mode.illegal) {\n mm.addRule(mode.illegal, { type: \"illegal\" });\n }\n\n return mm;\n }\n\n /** skip vs abort vs ignore\n *\n * @skip - The mode is still entered and exited normally (and contains rules apply),\n * but all content is held and added to the parent buffer rather than being\n * output when the mode ends. Mostly used with `sublanguage` to build up\n * a single large buffer than can be parsed by sublanguage.\n *\n * - The mode begin ands ends normally.\n * - Content matched is added to the parent mode buffer.\n * - The parser cursor is moved forward normally.\n *\n * @abort - A hack placeholder until we have ignore. Aborts the mode (as if it\n * never matched) but DOES NOT continue to match subsequent `contains`\n * modes. Abort is bad/suboptimal because it can result in modes\n * farther down not getting applied because an earlier rule eats the\n * content but then aborts.\n *\n * - The mode does not begin.\n * - Content matched by `begin` is added to the mode buffer.\n * - The parser cursor is moved forward accordingly.\n *\n * @ignore - Ignores the mode (as if it never matched) and continues to match any\n * subsequent `contains` modes. Ignore isn't technically possible with\n * the current parser implementation.\n *\n * - The mode does not begin.\n * - Content matched by `begin` is ignored.\n * - The parser cursor is not moved forward.\n */\n\n /**\n * Compiles an individual mode\n *\n * This can raise an error if the mode contains certain detectable known logic\n * issues.\n * @param {Mode} mode\n * @param {CompiledMode | null} [parent]\n * @returns {CompiledMode | never}\n */\n function compileMode(mode, parent) {\n const cmode = /** @type CompiledMode */ (mode);\n if (mode.isCompiled) return cmode;\n\n [\n // do this early so compiler extensions generally don't have to worry about\n // the distinction between match/begin\n compileMatch\n ].forEach(ext => ext(mode, parent));\n\n language.compilerExtensions.forEach(ext => ext(mode, parent));\n\n // __beforeBegin is considered private API, internal use only\n mode.__beforeBegin = null;\n\n [\n beginKeywords,\n // do this later so compiler extensions that come earlier have access to the\n // raw array if they wanted to perhaps manipulate it, etc.\n compileIllegal,\n // default to 1 relevance if not specified\n compileRelevance\n ].forEach(ext => ext(mode, parent));\n\n mode.isCompiled = true;\n\n let keywordPattern = null;\n if (typeof mode.keywords === \"object\") {\n keywordPattern = mode.keywords.$pattern;\n delete mode.keywords.$pattern;\n }\n\n if (mode.keywords) {\n mode.keywords = compileKeywords(mode.keywords, language.case_insensitive);\n }\n\n // both are not allowed\n if (mode.lexemes && keywordPattern) {\n throw new Error(\"ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) \");\n }\n\n // `mode.lexemes` was the old standard before we added and now recommend\n // using `keywords.$pattern` to pass the keyword pattern\n keywordPattern = keywordPattern || mode.lexemes || /\\w+/;\n cmode.keywordPatternRe = langRe(keywordPattern, true);\n\n if (parent) {\n if (!mode.begin) mode.begin = /\\B|\\b/;\n cmode.beginRe = langRe(mode.begin);\n if (mode.endSameAsBegin) mode.end = mode.begin;\n if (!mode.end && !mode.endsWithParent) mode.end = /\\B|\\b/;\n if (mode.end) cmode.endRe = langRe(mode.end);\n cmode.terminatorEnd = source(mode.end) || '';\n if (mode.endsWithParent && parent.terminatorEnd) {\n cmode.terminatorEnd += (mode.end ? '|' : '') + parent.terminatorEnd;\n }\n }\n if (mode.illegal) cmode.illegalRe = langRe(/** @type {RegExp | string} */ (mode.illegal));\n if (!mode.contains) mode.contains = [];\n\n mode.contains = [].concat(...mode.contains.map(function(c) {\n return expandOrCloneMode(c === 'self' ? mode : c);\n }));\n mode.contains.forEach(function(c) { compileMode(/** @type Mode */ (c), cmode); });\n\n if (mode.starts) {\n compileMode(mode.starts, parent);\n }\n\n cmode.matcher = buildModeRegex(cmode);\n return cmode;\n }\n\n if (!language.compilerExtensions) language.compilerExtensions = [];\n\n // self is not valid at the top-level\n if (language.contains && language.contains.includes('self')) {\n throw new Error(\"ERR: contains `self` is not supported at the top-level of a language. See documentation.\");\n }\n\n // we need a null object, which inherit will guarantee\n language.classNameAliases = inherit(language.classNameAliases || {});\n\n return compileMode(/** @type Mode */ (language));\n}\n\n/**\n * Determines if a mode has a dependency on it's parent or not\n *\n * If a mode does have a parent dependency then often we need to clone it if\n * it's used in multiple places so that each copy points to the correct parent,\n * where-as modes without a parent can often safely be re-used at the bottom of\n * a mode chain.\n *\n * @param {Mode | null} mode\n * @returns {boolean} - is there a dependency on the parent?\n * */\nfunction dependencyOnParent(mode) {\n if (!mode) return false;\n\n return mode.endsWithParent || dependencyOnParent(mode.starts);\n}\n\n/**\n * Expands a mode or clones it if necessary\n *\n * This is necessary for modes with parental dependenceis (see notes on\n * `dependencyOnParent`) and for nodes that have `variants` - which must then be\n * exploded into their own individual modes at compile time.\n *\n * @param {Mode} mode\n * @returns {Mode | Mode[]}\n * */\nfunction expandOrCloneMode(mode) {\n if (mode.variants && !mode.cachedVariants) {\n mode.cachedVariants = mode.variants.map(function(variant) {\n return inherit(mode, { variants: null }, variant);\n });\n }\n\n // EXPAND\n // if we have variants then essentially \"replace\" the mode with the variants\n // this happens in compileMode, where this function is called from\n if (mode.cachedVariants) {\n return mode.cachedVariants;\n }\n\n // CLONE\n // if we have dependencies on parents then we need a unique\n // instance of ourselves, so we can be reused with many\n // different parents without issue\n if (dependencyOnParent(mode)) {\n return inherit(mode, { starts: mode.starts ? inherit(mode.starts) : null });\n }\n\n if (Object.isFrozen(mode)) {\n return inherit(mode);\n }\n\n // no special dependency issues, just return ourselves\n return mode;\n}\n\nvar version = \"10.7.2\";\n\n// @ts-nocheck\n\nfunction hasValueOrEmptyAttribute(value) {\n return Boolean(value || value === \"\");\n}\n\nfunction BuildVuePlugin(hljs) {\n const Component = {\n props: [\"language\", \"code\", \"autodetect\"],\n data: function() {\n return {\n detectedLanguage: \"\",\n unknownLanguage: false\n };\n },\n computed: {\n className() {\n if (this.unknownLanguage) return \"\";\n\n return \"hljs \" + this.detectedLanguage;\n },\n highlighted() {\n // no idea what language to use, return raw code\n if (!this.autoDetect && !hljs.getLanguage(this.language)) {\n console.warn(`The language \"${this.language}\" you specified could not be found.`);\n this.unknownLanguage = true;\n return escapeHTML(this.code);\n }\n\n let result = {};\n if (this.autoDetect) {\n result = hljs.highlightAuto(this.code);\n this.detectedLanguage = result.language;\n } else {\n result = hljs.highlight(this.language, this.code, this.ignoreIllegals);\n this.detectedLanguage = this.language;\n }\n return result.value;\n },\n autoDetect() {\n return !this.language || hasValueOrEmptyAttribute(this.autodetect);\n },\n ignoreIllegals() {\n return true;\n }\n },\n // this avoids needing to use a whole Vue compilation pipeline just\n // to build Highlight.js\n render(createElement) {\n return createElement(\"pre\", {}, [\n createElement(\"code\", {\n class: this.className,\n domProps: { innerHTML: this.highlighted }\n })\n ]);\n }\n // template: `
    `\n };\n\n const VuePlugin = {\n install(Vue) {\n Vue.component('highlightjs', Component);\n }\n };\n\n return { Component, VuePlugin };\n}\n\n/* plugin itself */\n\n/** @type {HLJSPlugin} */\nconst mergeHTMLPlugin = {\n \"after:highlightElement\": ({ el, result, text }) => {\n const originalStream = nodeStream(el);\n if (!originalStream.length) return;\n\n const resultNode = document.createElement('div');\n resultNode.innerHTML = result.value;\n result.value = mergeStreams(originalStream, nodeStream(resultNode), text);\n }\n};\n\n/* Stream merging support functions */\n\n/**\n * @typedef Event\n * @property {'start'|'stop'} event\n * @property {number} offset\n * @property {Node} node\n */\n\n/**\n * @param {Node} node\n */\nfunction tag(node) {\n return node.nodeName.toLowerCase();\n}\n\n/**\n * @param {Node} node\n */\nfunction nodeStream(node) {\n /** @type Event[] */\n const result = [];\n (function _nodeStream(node, offset) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n if (child.nodeType === 3) {\n offset += child.nodeValue.length;\n } else if (child.nodeType === 1) {\n result.push({\n event: 'start',\n offset: offset,\n node: child\n });\n offset = _nodeStream(child, offset);\n // Prevent void elements from having an end tag that would actually\n // double them in the output. There are more void elements in HTML\n // but we list only those realistically expected in code display.\n if (!tag(child).match(/br|hr|img|input/)) {\n result.push({\n event: 'stop',\n offset: offset,\n node: child\n });\n }\n }\n }\n return offset;\n })(node, 0);\n return result;\n}\n\n/**\n * @param {any} original - the original stream\n * @param {any} highlighted - stream of the highlighted source\n * @param {string} value - the original source itself\n */\nfunction mergeStreams(original, highlighted, value) {\n let processed = 0;\n let result = '';\n const nodeStack = [];\n\n function selectStream() {\n if (!original.length || !highlighted.length) {\n return original.length ? original : highlighted;\n }\n if (original[0].offset !== highlighted[0].offset) {\n return (original[0].offset < highlighted[0].offset) ? original : highlighted;\n }\n\n /*\n To avoid starting the stream just before it should stop the order is\n ensured that original always starts first and closes last:\n\n if (event1 == 'start' && event2 == 'start')\n return original;\n if (event1 == 'start' && event2 == 'stop')\n return highlighted;\n if (event1 == 'stop' && event2 == 'start')\n return original;\n if (event1 == 'stop' && event2 == 'stop')\n return highlighted;\n\n ... which is collapsed to:\n */\n return highlighted[0].event === 'start' ? original : highlighted;\n }\n\n /**\n * @param {Node} node\n */\n function open(node) {\n /** @param {Attr} attr */\n function attributeString(attr) {\n return ' ' + attr.nodeName + '=\"' + escapeHTML(attr.value) + '\"';\n }\n // @ts-ignore\n result += '<' + tag(node) + [].map.call(node.attributes, attributeString).join('') + '>';\n }\n\n /**\n * @param {Node} node\n */\n function close(node) {\n result += '';\n }\n\n /**\n * @param {Event} event\n */\n function render(event) {\n (event.event === 'start' ? open : close)(event.node);\n }\n\n while (original.length || highlighted.length) {\n let stream = selectStream();\n result += escapeHTML(value.substring(processed, stream[0].offset));\n processed = stream[0].offset;\n if (stream === original) {\n /*\n On any opening or closing tag of the original markup we first close\n the entire highlighted node stack, then render the original tag along\n with all the following original tags at the same offset and then\n reopen all the tags on the highlighted stack.\n */\n nodeStack.reverse().forEach(close);\n do {\n render(stream.splice(0, 1)[0]);\n stream = selectStream();\n } while (stream === original && stream.length && stream[0].offset === processed);\n nodeStack.reverse().forEach(open);\n } else {\n if (stream[0].event === 'start') {\n nodeStack.push(stream[0].node);\n } else {\n nodeStack.pop();\n }\n render(stream.splice(0, 1)[0]);\n }\n }\n return result + escapeHTML(value.substr(processed));\n}\n\n/*\n\nFor the reasoning behind this please see:\nhttps://github.com/highlightjs/highlight.js/issues/2880#issuecomment-747275419\n\n*/\n\n/**\n * @type {Record}\n */\nconst seenDeprecations = {};\n\n/**\n * @param {string} message\n */\nconst error = (message) => {\n console.error(message);\n};\n\n/**\n * @param {string} message\n * @param {any} args\n */\nconst warn = (message, ...args) => {\n console.log(`WARN: ${message}`, ...args);\n};\n\n/**\n * @param {string} version\n * @param {string} message\n */\nconst deprecated = (version, message) => {\n if (seenDeprecations[`${version}/${message}`]) return;\n\n console.log(`Deprecated as of ${version}. ${message}`);\n seenDeprecations[`${version}/${message}`] = true;\n};\n\n/*\nSyntax highlighting with language autodetection.\nhttps://highlightjs.org/\n*/\n\nconst escape$1 = escapeHTML;\nconst inherit$1 = inherit;\nconst NO_MATCH = Symbol(\"nomatch\");\n\n/**\n * @param {any} hljs - object that is extended (legacy)\n * @returns {HLJSApi}\n */\nconst HLJS = function(hljs) {\n // Global internal variables used within the highlight.js library.\n /** @type {Record} */\n const languages = Object.create(null);\n /** @type {Record} */\n const aliases = Object.create(null);\n /** @type {HLJSPlugin[]} */\n const plugins = [];\n\n // safe/production mode - swallows more errors, tries to keep running\n // even if a single syntax or parse hits a fatal error\n let SAFE_MODE = true;\n const fixMarkupRe = /(^(<[^>]+>|\\t|)+|\\n)/gm;\n const LANGUAGE_NOT_FOUND = \"Could not find the language '{}', did you forget to load/include a language module?\";\n /** @type {Language} */\n const PLAINTEXT_LANGUAGE = { disableAutodetect: true, name: 'Plain text', contains: [] };\n\n // Global options used when within external APIs. This is modified when\n // calling the `hljs.configure` function.\n /** @type HLJSOptions */\n let options = {\n noHighlightRe: /^(no-?highlight)$/i,\n languageDetectRe: /\\blang(?:uage)?-([\\w-]+)\\b/i,\n classPrefix: 'hljs-',\n tabReplace: null,\n useBR: false,\n languages: null,\n // beta configuration options, subject to change, welcome to discuss\n // https://github.com/highlightjs/highlight.js/issues/1086\n __emitter: TokenTreeEmitter\n };\n\n /* Utility functions */\n\n /**\n * Tests a language name to see if highlighting should be skipped\n * @param {string} languageName\n */\n function shouldNotHighlight(languageName) {\n return options.noHighlightRe.test(languageName);\n }\n\n /**\n * @param {HighlightedHTMLElement} block - the HTML element to determine language for\n */\n function blockLanguage(block) {\n let classes = block.className + ' ';\n\n classes += block.parentNode ? block.parentNode.className : '';\n\n // language-* takes precedence over non-prefixed class names.\n const match = options.languageDetectRe.exec(classes);\n if (match) {\n const language = getLanguage(match[1]);\n if (!language) {\n warn(LANGUAGE_NOT_FOUND.replace(\"{}\", match[1]));\n warn(\"Falling back to no-highlight mode for this block.\", block);\n }\n return language ? match[1] : 'no-highlight';\n }\n\n return classes\n .split(/\\s+/)\n .find((_class) => shouldNotHighlight(_class) || getLanguage(_class));\n }\n\n /**\n * Core highlighting function.\n *\n * OLD API\n * highlight(lang, code, ignoreIllegals, continuation)\n *\n * NEW API\n * highlight(code, {lang, ignoreIllegals})\n *\n * @param {string} codeOrlanguageName - the language to use for highlighting\n * @param {string | HighlightOptions} optionsOrCode - the code to highlight\n * @param {boolean} [ignoreIllegals] - whether to ignore illegal matches, default is to bail\n * @param {CompiledMode} [continuation] - current continuation mode, if any\n *\n * @returns {HighlightResult} Result - an object that represents the result\n * @property {string} language - the language name\n * @property {number} relevance - the relevance score\n * @property {string} value - the highlighted HTML code\n * @property {string} code - the original raw code\n * @property {CompiledMode} top - top of the current mode stack\n * @property {boolean} illegal - indicates whether any illegal matches were found\n */\n function highlight(codeOrlanguageName, optionsOrCode, ignoreIllegals, continuation) {\n let code = \"\";\n let languageName = \"\";\n if (typeof optionsOrCode === \"object\") {\n code = codeOrlanguageName;\n ignoreIllegals = optionsOrCode.ignoreIllegals;\n languageName = optionsOrCode.language;\n // continuation not supported at all via the new API\n // eslint-disable-next-line no-undefined\n continuation = undefined;\n } else {\n // old API\n deprecated(\"10.7.0\", \"highlight(lang, code, ...args) has been deprecated.\");\n deprecated(\"10.7.0\", \"Please use highlight(code, options) instead.\\nhttps://github.com/highlightjs/highlight.js/issues/2277\");\n languageName = codeOrlanguageName;\n code = optionsOrCode;\n }\n\n /** @type {BeforeHighlightContext} */\n const context = {\n code,\n language: languageName\n };\n // the plugin can change the desired language or the code to be highlighted\n // just be changing the object it was passed\n fire(\"before:highlight\", context);\n\n // a before plugin can usurp the result completely by providing it's own\n // in which case we don't even need to call highlight\n const result = context.result\n ? context.result\n : _highlight(context.language, context.code, ignoreIllegals, continuation);\n\n result.code = context.code;\n // the plugin can change anything in result to suite it\n fire(\"after:highlight\", result);\n\n return result;\n }\n\n /**\n * private highlight that's used internally and does not fire callbacks\n *\n * @param {string} languageName - the language to use for highlighting\n * @param {string} codeToHighlight - the code to highlight\n * @param {boolean?} [ignoreIllegals] - whether to ignore illegal matches, default is to bail\n * @param {CompiledMode?} [continuation] - current continuation mode, if any\n * @returns {HighlightResult} - result of the highlight operation\n */\n function _highlight(languageName, codeToHighlight, ignoreIllegals, continuation) {\n /**\n * Return keyword data if a match is a keyword\n * @param {CompiledMode} mode - current mode\n * @param {RegExpMatchArray} match - regexp match data\n * @returns {KeywordData | false}\n */\n function keywordData(mode, match) {\n const matchText = language.case_insensitive ? match[0].toLowerCase() : match[0];\n return Object.prototype.hasOwnProperty.call(mode.keywords, matchText) && mode.keywords[matchText];\n }\n\n function processKeywords() {\n if (!top.keywords) {\n emitter.addText(modeBuffer);\n return;\n }\n\n let lastIndex = 0;\n top.keywordPatternRe.lastIndex = 0;\n let match = top.keywordPatternRe.exec(modeBuffer);\n let buf = \"\";\n\n while (match) {\n buf += modeBuffer.substring(lastIndex, match.index);\n const data = keywordData(top, match);\n if (data) {\n const [kind, keywordRelevance] = data;\n emitter.addText(buf);\n buf = \"\";\n\n relevance += keywordRelevance;\n if (kind.startsWith(\"_\")) {\n // _ implied for relevance only, do not highlight\n // by applying a class name\n buf += match[0];\n } else {\n const cssClass = language.classNameAliases[kind] || kind;\n emitter.addKeyword(match[0], cssClass);\n }\n } else {\n buf += match[0];\n }\n lastIndex = top.keywordPatternRe.lastIndex;\n match = top.keywordPatternRe.exec(modeBuffer);\n }\n buf += modeBuffer.substr(lastIndex);\n emitter.addText(buf);\n }\n\n function processSubLanguage() {\n if (modeBuffer === \"\") return;\n /** @type HighlightResult */\n let result = null;\n\n if (typeof top.subLanguage === 'string') {\n if (!languages[top.subLanguage]) {\n emitter.addText(modeBuffer);\n return;\n }\n result = _highlight(top.subLanguage, modeBuffer, true, continuations[top.subLanguage]);\n continuations[top.subLanguage] = /** @type {CompiledMode} */ (result.top);\n } else {\n result = highlightAuto(modeBuffer, top.subLanguage.length ? top.subLanguage : null);\n }\n\n // Counting embedded language score towards the host language may be disabled\n // with zeroing the containing mode relevance. Use case in point is Markdown that\n // allows XML everywhere and makes every XML snippet to have a much larger Markdown\n // score.\n if (top.relevance > 0) {\n relevance += result.relevance;\n }\n emitter.addSublanguage(result.emitter, result.language);\n }\n\n function processBuffer() {\n if (top.subLanguage != null) {\n processSubLanguage();\n } else {\n processKeywords();\n }\n modeBuffer = '';\n }\n\n /**\n * @param {Mode} mode - new mode to start\n */\n function startNewMode(mode) {\n if (mode.className) {\n emitter.openNode(language.classNameAliases[mode.className] || mode.className);\n }\n top = Object.create(mode, { parent: { value: top } });\n return top;\n }\n\n /**\n * @param {CompiledMode } mode - the mode to potentially end\n * @param {RegExpMatchArray} match - the latest match\n * @param {string} matchPlusRemainder - match plus remainder of content\n * @returns {CompiledMode | void} - the next mode, or if void continue on in current mode\n */\n function endOfMode(mode, match, matchPlusRemainder) {\n let matched = startsWith(mode.endRe, matchPlusRemainder);\n\n if (matched) {\n if (mode[\"on:end\"]) {\n const resp = new Response(mode);\n mode[\"on:end\"](match, resp);\n if (resp.isMatchIgnored) matched = false;\n }\n\n if (matched) {\n while (mode.endsParent && mode.parent) {\n mode = mode.parent;\n }\n return mode;\n }\n }\n // even if on:end fires an `ignore` it's still possible\n // that we might trigger the end node because of a parent mode\n if (mode.endsWithParent) {\n return endOfMode(mode.parent, match, matchPlusRemainder);\n }\n }\n\n /**\n * Handle matching but then ignoring a sequence of text\n *\n * @param {string} lexeme - string containing full match text\n */\n function doIgnore(lexeme) {\n if (top.matcher.regexIndex === 0) {\n // no more regexs to potentially match here, so we move the cursor forward one\n // space\n modeBuffer += lexeme[0];\n return 1;\n } else {\n // no need to move the cursor, we still have additional regexes to try and\n // match at this very spot\n resumeScanAtSamePosition = true;\n return 0;\n }\n }\n\n /**\n * Handle the start of a new potential mode match\n *\n * @param {EnhancedMatch} match - the current match\n * @returns {number} how far to advance the parse cursor\n */\n function doBeginMatch(match) {\n const lexeme = match[0];\n const newMode = match.rule;\n\n const resp = new Response(newMode);\n // first internal before callbacks, then the public ones\n const beforeCallbacks = [newMode.__beforeBegin, newMode[\"on:begin\"]];\n for (const cb of beforeCallbacks) {\n if (!cb) continue;\n cb(match, resp);\n if (resp.isMatchIgnored) return doIgnore(lexeme);\n }\n\n if (newMode && newMode.endSameAsBegin) {\n newMode.endRe = escape(lexeme);\n }\n\n if (newMode.skip) {\n modeBuffer += lexeme;\n } else {\n if (newMode.excludeBegin) {\n modeBuffer += lexeme;\n }\n processBuffer();\n if (!newMode.returnBegin && !newMode.excludeBegin) {\n modeBuffer = lexeme;\n }\n }\n startNewMode(newMode);\n // if (mode[\"after:begin\"]) {\n // let resp = new Response(mode);\n // mode[\"after:begin\"](match, resp);\n // }\n return newMode.returnBegin ? 0 : lexeme.length;\n }\n\n /**\n * Handle the potential end of mode\n *\n * @param {RegExpMatchArray} match - the current match\n */\n function doEndMatch(match) {\n const lexeme = match[0];\n const matchPlusRemainder = codeToHighlight.substr(match.index);\n\n const endMode = endOfMode(top, match, matchPlusRemainder);\n if (!endMode) { return NO_MATCH; }\n\n const origin = top;\n if (origin.skip) {\n modeBuffer += lexeme;\n } else {\n if (!(origin.returnEnd || origin.excludeEnd)) {\n modeBuffer += lexeme;\n }\n processBuffer();\n if (origin.excludeEnd) {\n modeBuffer = lexeme;\n }\n }\n do {\n if (top.className) {\n emitter.closeNode();\n }\n if (!top.skip && !top.subLanguage) {\n relevance += top.relevance;\n }\n top = top.parent;\n } while (top !== endMode.parent);\n if (endMode.starts) {\n if (endMode.endSameAsBegin) {\n endMode.starts.endRe = endMode.endRe;\n }\n startNewMode(endMode.starts);\n }\n return origin.returnEnd ? 0 : lexeme.length;\n }\n\n function processContinuations() {\n const list = [];\n for (let current = top; current !== language; current = current.parent) {\n if (current.className) {\n list.unshift(current.className);\n }\n }\n list.forEach(item => emitter.openNode(item));\n }\n\n /** @type {{type?: MatchType, index?: number, rule?: Mode}}} */\n let lastMatch = {};\n\n /**\n * Process an individual match\n *\n * @param {string} textBeforeMatch - text preceeding the match (since the last match)\n * @param {EnhancedMatch} [match] - the match itself\n */\n function processLexeme(textBeforeMatch, match) {\n const lexeme = match && match[0];\n\n // add non-matched text to the current mode buffer\n modeBuffer += textBeforeMatch;\n\n if (lexeme == null) {\n processBuffer();\n return 0;\n }\n\n // we've found a 0 width match and we're stuck, so we need to advance\n // this happens when we have badly behaved rules that have optional matchers to the degree that\n // sometimes they can end up matching nothing at all\n // Ref: https://github.com/highlightjs/highlight.js/issues/2140\n if (lastMatch.type === \"begin\" && match.type === \"end\" && lastMatch.index === match.index && lexeme === \"\") {\n // spit the \"skipped\" character that our regex choked on back into the output sequence\n modeBuffer += codeToHighlight.slice(match.index, match.index + 1);\n if (!SAFE_MODE) {\n /** @type {AnnotatedError} */\n const err = new Error('0 width match regex');\n err.languageName = languageName;\n err.badRule = lastMatch.rule;\n throw err;\n }\n return 1;\n }\n lastMatch = match;\n\n if (match.type === \"begin\") {\n return doBeginMatch(match);\n } else if (match.type === \"illegal\" && !ignoreIllegals) {\n // illegal match, we do not continue processing\n /** @type {AnnotatedError} */\n const err = new Error('Illegal lexeme \"' + lexeme + '\" for mode \"' + (top.className || '') + '\"');\n err.mode = top;\n throw err;\n } else if (match.type === \"end\") {\n const processed = doEndMatch(match);\n if (processed !== NO_MATCH) {\n return processed;\n }\n }\n\n // edge case for when illegal matches $ (end of line) which is technically\n // a 0 width match but not a begin/end match so it's not caught by the\n // first handler (when ignoreIllegals is true)\n if (match.type === \"illegal\" && lexeme === \"\") {\n // advance so we aren't stuck in an infinite loop\n return 1;\n }\n\n // infinite loops are BAD, this is a last ditch catch all. if we have a\n // decent number of iterations yet our index (cursor position in our\n // parsing) still 3x behind our index then something is very wrong\n // so we bail\n if (iterations > 100000 && iterations > match.index * 3) {\n const err = new Error('potential infinite loop, way more iterations than matches');\n throw err;\n }\n\n /*\n Why might be find ourselves here? Only one occasion now. An end match that was\n triggered but could not be completed. When might this happen? When an `endSameasBegin`\n rule sets the end rule to a specific match. Since the overall mode termination rule that's\n being used to scan the text isn't recompiled that means that any match that LOOKS like\n the end (but is not, because it is not an exact match to the beginning) will\n end up here. A definite end match, but when `doEndMatch` tries to \"reapply\"\n the end rule and fails to match, we wind up here, and just silently ignore the end.\n\n This causes no real harm other than stopping a few times too many.\n */\n\n modeBuffer += lexeme;\n return lexeme.length;\n }\n\n const language = getLanguage(languageName);\n if (!language) {\n error(LANGUAGE_NOT_FOUND.replace(\"{}\", languageName));\n throw new Error('Unknown language: \"' + languageName + '\"');\n }\n\n const md = compileLanguage(language, { plugins });\n let result = '';\n /** @type {CompiledMode} */\n let top = continuation || md;\n /** @type Record */\n const continuations = {}; // keep continuations for sub-languages\n const emitter = new options.__emitter(options);\n processContinuations();\n let modeBuffer = '';\n let relevance = 0;\n let index = 0;\n let iterations = 0;\n let resumeScanAtSamePosition = false;\n\n try {\n top.matcher.considerAll();\n\n for (;;) {\n iterations++;\n if (resumeScanAtSamePosition) {\n // only regexes not matched previously will now be\n // considered for a potential match\n resumeScanAtSamePosition = false;\n } else {\n top.matcher.considerAll();\n }\n top.matcher.lastIndex = index;\n\n const match = top.matcher.exec(codeToHighlight);\n // console.log(\"match\", match[0], match.rule && match.rule.begin)\n\n if (!match) break;\n\n const beforeMatch = codeToHighlight.substring(index, match.index);\n const processedCount = processLexeme(beforeMatch, match);\n index = match.index + processedCount;\n }\n processLexeme(codeToHighlight.substr(index));\n emitter.closeAllNodes();\n emitter.finalize();\n result = emitter.toHTML();\n\n return {\n // avoid possible breakage with v10 clients expecting\n // this to always be an integer\n relevance: Math.floor(relevance),\n value: result,\n language: languageName,\n illegal: false,\n emitter: emitter,\n top: top\n };\n } catch (err) {\n if (err.message && err.message.includes('Illegal')) {\n return {\n illegal: true,\n illegalBy: {\n msg: err.message,\n context: codeToHighlight.slice(index - 100, index + 100),\n mode: err.mode\n },\n sofar: result,\n relevance: 0,\n value: escape$1(codeToHighlight),\n emitter: emitter\n };\n } else if (SAFE_MODE) {\n return {\n illegal: false,\n relevance: 0,\n value: escape$1(codeToHighlight),\n emitter: emitter,\n language: languageName,\n top: top,\n errorRaised: err\n };\n } else {\n throw err;\n }\n }\n }\n\n /**\n * returns a valid highlight result, without actually doing any actual work,\n * auto highlight starts with this and it's possible for small snippets that\n * auto-detection may not find a better match\n * @param {string} code\n * @returns {HighlightResult}\n */\n function justTextHighlightResult(code) {\n const result = {\n relevance: 0,\n emitter: new options.__emitter(options),\n value: escape$1(code),\n illegal: false,\n top: PLAINTEXT_LANGUAGE\n };\n result.emitter.addText(code);\n return result;\n }\n\n /**\n Highlighting with language detection. Accepts a string with the code to\n highlight. Returns an object with the following properties:\n\n - language (detected language)\n - relevance (int)\n - value (an HTML string with highlighting markup)\n - second_best (object with the same structure for second-best heuristically\n detected language, may be absent)\n\n @param {string} code\n @param {Array} [languageSubset]\n @returns {AutoHighlightResult}\n */\n function highlightAuto(code, languageSubset) {\n languageSubset = languageSubset || options.languages || Object.keys(languages);\n const plaintext = justTextHighlightResult(code);\n\n const results = languageSubset.filter(getLanguage).filter(autoDetection).map(name =>\n _highlight(name, code, false)\n );\n results.unshift(plaintext); // plaintext is always an option\n\n const sorted = results.sort((a, b) => {\n // sort base on relevance\n if (a.relevance !== b.relevance) return b.relevance - a.relevance;\n\n // always award the tie to the base language\n // ie if C++ and Arduino are tied, it's more likely to be C++\n if (a.language && b.language) {\n if (getLanguage(a.language).supersetOf === b.language) {\n return 1;\n } else if (getLanguage(b.language).supersetOf === a.language) {\n return -1;\n }\n }\n\n // otherwise say they are equal, which has the effect of sorting on\n // relevance while preserving the original ordering - which is how ties\n // have historically been settled, ie the language that comes first always\n // wins in the case of a tie\n return 0;\n });\n\n const [best, secondBest] = sorted;\n\n /** @type {AutoHighlightResult} */\n const result = best;\n result.second_best = secondBest;\n\n return result;\n }\n\n /**\n Post-processing of the highlighted markup:\n\n - replace TABs with something more useful\n - replace real line-breaks with '
    ' for non-pre containers\n\n @param {string} html\n @returns {string}\n */\n function fixMarkup(html) {\n if (!(options.tabReplace || options.useBR)) {\n return html;\n }\n\n return html.replace(fixMarkupRe, match => {\n if (match === '\\n') {\n return options.useBR ? '
    ' : match;\n } else if (options.tabReplace) {\n return match.replace(/\\t/g, options.tabReplace);\n }\n return match;\n });\n }\n\n /**\n * Builds new class name for block given the language name\n *\n * @param {HTMLElement} element\n * @param {string} [currentLang]\n * @param {string} [resultLang]\n */\n function updateClassName(element, currentLang, resultLang) {\n const language = currentLang ? aliases[currentLang] : resultLang;\n\n element.classList.add(\"hljs\");\n if (language) element.classList.add(language);\n }\n\n /** @type {HLJSPlugin} */\n const brPlugin = {\n \"before:highlightElement\": ({ el }) => {\n if (options.useBR) {\n el.innerHTML = el.innerHTML.replace(/\\n/g, '').replace(//g, '\\n');\n }\n },\n \"after:highlightElement\": ({ result }) => {\n if (options.useBR) {\n result.value = result.value.replace(/\\n/g, \"
    \");\n }\n }\n };\n\n const TAB_REPLACE_RE = /^(<[^>]+>|\\t)+/gm;\n /** @type {HLJSPlugin} */\n const tabReplacePlugin = {\n \"after:highlightElement\": ({ result }) => {\n if (options.tabReplace) {\n result.value = result.value.replace(TAB_REPLACE_RE, (m) =>\n m.replace(/\\t/g, options.tabReplace)\n );\n }\n }\n };\n\n /**\n * Applies highlighting to a DOM node containing code. Accepts a DOM node and\n * two optional parameters for fixMarkup.\n *\n * @param {HighlightedHTMLElement} element - the HTML element to highlight\n */\n function highlightElement(element) {\n /** @type HTMLElement */\n let node = null;\n const language = blockLanguage(element);\n\n if (shouldNotHighlight(language)) return;\n\n // support for v10 API\n fire(\"before:highlightElement\",\n { el: element, language: language });\n\n node = element;\n const text = node.textContent;\n const result = language ? highlight(text, { language, ignoreIllegals: true }) : highlightAuto(text);\n\n // support for v10 API\n fire(\"after:highlightElement\", { el: element, result, text });\n\n element.innerHTML = result.value;\n updateClassName(element, language, result.language);\n element.result = {\n language: result.language,\n // TODO: remove with version 11.0\n re: result.relevance,\n relavance: result.relevance\n };\n if (result.second_best) {\n element.second_best = {\n language: result.second_best.language,\n // TODO: remove with version 11.0\n re: result.second_best.relevance,\n relavance: result.second_best.relevance\n };\n }\n }\n\n /**\n * Updates highlight.js global options with the passed options\n *\n * @param {Partial} userOptions\n */\n function configure(userOptions) {\n if (userOptions.useBR) {\n deprecated(\"10.3.0\", \"'useBR' will be removed entirely in v11.0\");\n deprecated(\"10.3.0\", \"Please see https://github.com/highlightjs/highlight.js/issues/2559\");\n }\n options = inherit$1(options, userOptions);\n }\n\n /**\n * Highlights to all
     blocks on a page\n   *\n   * @type {Function & {called?: boolean}}\n   */\n  // TODO: remove v12, deprecated\n  const initHighlighting = () => {\n    if (initHighlighting.called) return;\n    initHighlighting.called = true;\n\n    deprecated(\"10.6.0\", \"initHighlighting() is deprecated.  Use highlightAll() instead.\");\n\n    const blocks = document.querySelectorAll('pre code');\n    blocks.forEach(highlightElement);\n  };\n\n  // Higlights all when DOMContentLoaded fires\n  // TODO: remove v12, deprecated\n  function initHighlightingOnLoad() {\n    deprecated(\"10.6.0\", \"initHighlightingOnLoad() is deprecated.  Use highlightAll() instead.\");\n    wantsHighlight = true;\n  }\n\n  let wantsHighlight = false;\n\n  /**\n   * auto-highlights all pre>code elements on the page\n   */\n  function highlightAll() {\n    // if we are called too early in the loading process\n    if (document.readyState === \"loading\") {\n      wantsHighlight = true;\n      return;\n    }\n\n    const blocks = document.querySelectorAll('pre code');\n    blocks.forEach(highlightElement);\n  }\n\n  function boot() {\n    // if a highlight was requested before DOM was loaded, do now\n    if (wantsHighlight) highlightAll();\n  }\n\n  // make sure we are in the browser environment\n  if (typeof window !== 'undefined' && window.addEventListener) {\n    window.addEventListener('DOMContentLoaded', boot, false);\n  }\n\n  /**\n   * Register a language grammar module\n   *\n   * @param {string} languageName\n   * @param {LanguageFn} languageDefinition\n   */\n  function registerLanguage(languageName, languageDefinition) {\n    let lang = null;\n    try {\n      lang = languageDefinition(hljs);\n    } catch (error$1) {\n      error(\"Language definition for '{}' could not be registered.\".replace(\"{}\", languageName));\n      // hard or soft error\n      if (!SAFE_MODE) { throw error$1; } else { error(error$1); }\n      // languages that have serious errors are replaced with essentially a\n      // \"plaintext\" stand-in so that the code blocks will still get normal\n      // css classes applied to them - and one bad language won't break the\n      // entire highlighter\n      lang = PLAINTEXT_LANGUAGE;\n    }\n    // give it a temporary name if it doesn't have one in the meta-data\n    if (!lang.name) lang.name = languageName;\n    languages[languageName] = lang;\n    lang.rawDefinition = languageDefinition.bind(null, hljs);\n\n    if (lang.aliases) {\n      registerAliases(lang.aliases, { languageName });\n    }\n  }\n\n  /**\n   * Remove a language grammar module\n   *\n   * @param {string} languageName\n   */\n  function unregisterLanguage(languageName) {\n    delete languages[languageName];\n    for (const alias of Object.keys(aliases)) {\n      if (aliases[alias] === languageName) {\n        delete aliases[alias];\n      }\n    }\n  }\n\n  /**\n   * @returns {string[]} List of language internal names\n   */\n  function listLanguages() {\n    return Object.keys(languages);\n  }\n\n  /**\n    intended usage: When one language truly requires another\n\n    Unlike `getLanguage`, this will throw when the requested language\n    is not available.\n\n    @param {string} name - name of the language to fetch/require\n    @returns {Language | never}\n  */\n  function requireLanguage(name) {\n    deprecated(\"10.4.0\", \"requireLanguage will be removed entirely in v11.\");\n    deprecated(\"10.4.0\", \"Please see https://github.com/highlightjs/highlight.js/pull/2844\");\n\n    const lang = getLanguage(name);\n    if (lang) { return lang; }\n\n    const err = new Error('The \\'{}\\' language is required, but not loaded.'.replace('{}', name));\n    throw err;\n  }\n\n  /**\n   * @param {string} name - name of the language to retrieve\n   * @returns {Language | undefined}\n   */\n  function getLanguage(name) {\n    name = (name || '').toLowerCase();\n    return languages[name] || languages[aliases[name]];\n  }\n\n  /**\n   *\n   * @param {string|string[]} aliasList - single alias or list of aliases\n   * @param {{languageName: string}} opts\n   */\n  function registerAliases(aliasList, { languageName }) {\n    if (typeof aliasList === 'string') {\n      aliasList = [aliasList];\n    }\n    aliasList.forEach(alias => { aliases[alias.toLowerCase()] = languageName; });\n  }\n\n  /**\n   * Determines if a given language has auto-detection enabled\n   * @param {string} name - name of the language\n   */\n  function autoDetection(name) {\n    const lang = getLanguage(name);\n    return lang && !lang.disableAutodetect;\n  }\n\n  /**\n   * Upgrades the old highlightBlock plugins to the new\n   * highlightElement API\n   * @param {HLJSPlugin} plugin\n   */\n  function upgradePluginAPI(plugin) {\n    // TODO: remove with v12\n    if (plugin[\"before:highlightBlock\"] && !plugin[\"before:highlightElement\"]) {\n      plugin[\"before:highlightElement\"] = (data) => {\n        plugin[\"before:highlightBlock\"](\n          Object.assign({ block: data.el }, data)\n        );\n      };\n    }\n    if (plugin[\"after:highlightBlock\"] && !plugin[\"after:highlightElement\"]) {\n      plugin[\"after:highlightElement\"] = (data) => {\n        plugin[\"after:highlightBlock\"](\n          Object.assign({ block: data.el }, data)\n        );\n      };\n    }\n  }\n\n  /**\n   * @param {HLJSPlugin} plugin\n   */\n  function addPlugin(plugin) {\n    upgradePluginAPI(plugin);\n    plugins.push(plugin);\n  }\n\n  /**\n   *\n   * @param {PluginEvent} event\n   * @param {any} args\n   */\n  function fire(event, args) {\n    const cb = event;\n    plugins.forEach(function(plugin) {\n      if (plugin[cb]) {\n        plugin[cb](args);\n      }\n    });\n  }\n\n  /**\n  Note: fixMarkup is deprecated and will be removed entirely in v11\n\n  @param {string} arg\n  @returns {string}\n  */\n  function deprecateFixMarkup(arg) {\n    deprecated(\"10.2.0\", \"fixMarkup will be removed entirely in v11.0\");\n    deprecated(\"10.2.0\", \"Please see https://github.com/highlightjs/highlight.js/issues/2534\");\n\n    return fixMarkup(arg);\n  }\n\n  /**\n   *\n   * @param {HighlightedHTMLElement} el\n   */\n  function deprecateHighlightBlock(el) {\n    deprecated(\"10.7.0\", \"highlightBlock will be removed entirely in v12.0\");\n    deprecated(\"10.7.0\", \"Please use highlightElement now.\");\n\n    return highlightElement(el);\n  }\n\n  /* Interface definition */\n  Object.assign(hljs, {\n    highlight,\n    highlightAuto,\n    highlightAll,\n    fixMarkup: deprecateFixMarkup,\n    highlightElement,\n    // TODO: Remove with v12 API\n    highlightBlock: deprecateHighlightBlock,\n    configure,\n    initHighlighting,\n    initHighlightingOnLoad,\n    registerLanguage,\n    unregisterLanguage,\n    listLanguages,\n    getLanguage,\n    registerAliases,\n    requireLanguage,\n    autoDetection,\n    inherit: inherit$1,\n    addPlugin,\n    // plugins for frameworks\n    vuePlugin: BuildVuePlugin(hljs).VuePlugin\n  });\n\n  hljs.debugMode = function() { SAFE_MODE = false; };\n  hljs.safeMode = function() { SAFE_MODE = true; };\n  hljs.versionString = version;\n\n  for (const key in MODES) {\n    // @ts-ignore\n    if (typeof MODES[key] === \"object\") {\n      // @ts-ignore\n      deepFreezeEs6(MODES[key]);\n    }\n  }\n\n  // merge all the modes/regexs into our main object\n  Object.assign(hljs, MODES);\n\n  // built-in plugins, likely to be moved out of core in the future\n  hljs.addPlugin(brPlugin); // slated to be removed in v11\n  hljs.addPlugin(mergeHTMLPlugin);\n  hljs.addPlugin(tabReplacePlugin);\n  return hljs;\n};\n\n// export an \"instance\" of the highlighter\nvar highlight = HLJS({});\n\nmodule.exports = highlight;\n","/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n  if (!re) return null;\n  if (typeof re === \"string\") return re;\n\n  return re.source;\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction lookahead(re) {\n  return concat('(?=', re, ')');\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n  const joined = args.map((x) => source(x)).join(\"\");\n  return joined;\n}\n\n/*\nLanguage: Python\nDescription: Python is an interpreted, object-oriented, high-level programming language with dynamic semantics.\nWebsite: https://www.python.org\nCategory: common\n*/\n\nfunction python(hljs) {\n  const RESERVED_WORDS = [\n    'and',\n    'as',\n    'assert',\n    'async',\n    'await',\n    'break',\n    'class',\n    'continue',\n    'def',\n    'del',\n    'elif',\n    'else',\n    'except',\n    'finally',\n    'for',\n    'from',\n    'global',\n    'if',\n    'import',\n    'in',\n    'is',\n    'lambda',\n    'nonlocal|10',\n    'not',\n    'or',\n    'pass',\n    'raise',\n    'return',\n    'try',\n    'while',\n    'with',\n    'yield'\n  ];\n\n  const BUILT_INS = [\n    '__import__',\n    'abs',\n    'all',\n    'any',\n    'ascii',\n    'bin',\n    'bool',\n    'breakpoint',\n    'bytearray',\n    'bytes',\n    'callable',\n    'chr',\n    'classmethod',\n    'compile',\n    'complex',\n    'delattr',\n    'dict',\n    'dir',\n    'divmod',\n    'enumerate',\n    'eval',\n    'exec',\n    'filter',\n    'float',\n    'format',\n    'frozenset',\n    'getattr',\n    'globals',\n    'hasattr',\n    'hash',\n    'help',\n    'hex',\n    'id',\n    'input',\n    'int',\n    'isinstance',\n    'issubclass',\n    'iter',\n    'len',\n    'list',\n    'locals',\n    'map',\n    'max',\n    'memoryview',\n    'min',\n    'next',\n    'object',\n    'oct',\n    'open',\n    'ord',\n    'pow',\n    'print',\n    'property',\n    'range',\n    'repr',\n    'reversed',\n    'round',\n    'set',\n    'setattr',\n    'slice',\n    'sorted',\n    'staticmethod',\n    'str',\n    'sum',\n    'super',\n    'tuple',\n    'type',\n    'vars',\n    'zip'\n  ];\n\n  const LITERALS = [\n    '__debug__',\n    'Ellipsis',\n    'False',\n    'None',\n    'NotImplemented',\n    'True'\n  ];\n\n  // https://docs.python.org/3/library/typing.html\n  // TODO: Could these be supplemented by a CamelCase matcher in certain\n  // contexts, leaving these remaining only for relevance hinting?\n  const TYPES = [\n    \"Any\",\n    \"Callable\",\n    \"Coroutine\",\n    \"Dict\",\n    \"List\",\n    \"Literal\",\n    \"Generic\",\n    \"Optional\",\n    \"Sequence\",\n    \"Set\",\n    \"Tuple\",\n    \"Type\",\n    \"Union\"\n  ];\n\n  const KEYWORDS = {\n    $pattern: /[A-Za-z]\\w+|__\\w+__/,\n    keyword: RESERVED_WORDS,\n    built_in: BUILT_INS,\n    literal: LITERALS,\n    type: TYPES\n  };\n\n  const PROMPT = {\n    className: 'meta',\n    begin: /^(>>>|\\.\\.\\.) /\n  };\n\n  const SUBST = {\n    className: 'subst',\n    begin: /\\{/,\n    end: /\\}/,\n    keywords: KEYWORDS,\n    illegal: /#/\n  };\n\n  const LITERAL_BRACKET = {\n    begin: /\\{\\{/,\n    relevance: 0\n  };\n\n  const STRING = {\n    className: 'string',\n    contains: [ hljs.BACKSLASH_ESCAPE ],\n    variants: [\n      {\n        begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,\n        end: /'''/,\n        contains: [\n          hljs.BACKSLASH_ESCAPE,\n          PROMPT\n        ],\n        relevance: 10\n      },\n      {\n        begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?\"\"\"/,\n        end: /\"\"\"/,\n        contains: [\n          hljs.BACKSLASH_ESCAPE,\n          PROMPT\n        ],\n        relevance: 10\n      },\n      {\n        begin: /([fF][rR]|[rR][fF]|[fF])'''/,\n        end: /'''/,\n        contains: [\n          hljs.BACKSLASH_ESCAPE,\n          PROMPT,\n          LITERAL_BRACKET,\n          SUBST\n        ]\n      },\n      {\n        begin: /([fF][rR]|[rR][fF]|[fF])\"\"\"/,\n        end: /\"\"\"/,\n        contains: [\n          hljs.BACKSLASH_ESCAPE,\n          PROMPT,\n          LITERAL_BRACKET,\n          SUBST\n        ]\n      },\n      {\n        begin: /([uU]|[rR])'/,\n        end: /'/,\n        relevance: 10\n      },\n      {\n        begin: /([uU]|[rR])\"/,\n        end: /\"/,\n        relevance: 10\n      },\n      {\n        begin: /([bB]|[bB][rR]|[rR][bB])'/,\n        end: /'/\n      },\n      {\n        begin: /([bB]|[bB][rR]|[rR][bB])\"/,\n        end: /\"/\n      },\n      {\n        begin: /([fF][rR]|[rR][fF]|[fF])'/,\n        end: /'/,\n        contains: [\n          hljs.BACKSLASH_ESCAPE,\n          LITERAL_BRACKET,\n          SUBST\n        ]\n      },\n      {\n        begin: /([fF][rR]|[rR][fF]|[fF])\"/,\n        end: /\"/,\n        contains: [\n          hljs.BACKSLASH_ESCAPE,\n          LITERAL_BRACKET,\n          SUBST\n        ]\n      },\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE\n    ]\n  };\n\n  // https://docs.python.org/3.9/reference/lexical_analysis.html#numeric-literals\n  const digitpart = '[0-9](_?[0-9])*';\n  const pointfloat = `(\\\\b(${digitpart}))?\\\\.(${digitpart})|\\\\b(${digitpart})\\\\.`;\n  const NUMBER = {\n    className: 'number',\n    relevance: 0,\n    variants: [\n      // exponentfloat, pointfloat\n      // https://docs.python.org/3.9/reference/lexical_analysis.html#floating-point-literals\n      // optionally imaginary\n      // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals\n      // Note: no leading \\b because floats can start with a decimal point\n      // and we don't want to mishandle e.g. `fn(.5)`,\n      // no trailing \\b for pointfloat because it can end with a decimal point\n      // and we don't want to mishandle e.g. `0..hex()`; this should be safe\n      // because both MUST contain a decimal point and so cannot be confused with\n      // the interior part of an identifier\n      {\n        begin: `(\\\\b(${digitpart})|(${pointfloat}))[eE][+-]?(${digitpart})[jJ]?\\\\b`\n      },\n      {\n        begin: `(${pointfloat})[jJ]?`\n      },\n\n      // decinteger, bininteger, octinteger, hexinteger\n      // https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals\n      // optionally \"long\" in Python 2\n      // https://docs.python.org/2.7/reference/lexical_analysis.html#integer-and-long-integer-literals\n      // decinteger is optionally imaginary\n      // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals\n      {\n        begin: '\\\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\\\b'\n      },\n      {\n        begin: '\\\\b0[bB](_?[01])+[lL]?\\\\b'\n      },\n      {\n        begin: '\\\\b0[oO](_?[0-7])+[lL]?\\\\b'\n      },\n      {\n        begin: '\\\\b0[xX](_?[0-9a-fA-F])+[lL]?\\\\b'\n      },\n\n      // imagnumber (digitpart-based)\n      // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals\n      {\n        begin: `\\\\b(${digitpart})[jJ]\\\\b`\n      }\n    ]\n  };\n  const COMMENT_TYPE = {\n    className: \"comment\",\n    begin: lookahead(/# type:/),\n    end: /$/,\n    keywords: KEYWORDS,\n    contains: [\n      { // prevent keywords from coloring `type`\n        begin: /# type:/\n      },\n      // comment within a datatype comment includes no keywords\n      {\n        begin: /#/,\n        end: /\\b\\B/,\n        endsWithParent: true\n      }\n    ]\n  };\n  const PARAMS = {\n    className: 'params',\n    variants: [\n      // Exclude params in functions without params\n      {\n        className: \"\",\n        begin: /\\(\\s*\\)/,\n        skip: true\n      },\n      {\n        begin: /\\(/,\n        end: /\\)/,\n        excludeBegin: true,\n        excludeEnd: true,\n        keywords: KEYWORDS,\n        contains: [\n          'self',\n          PROMPT,\n          NUMBER,\n          STRING,\n          hljs.HASH_COMMENT_MODE\n        ]\n      }\n    ]\n  };\n  SUBST.contains = [\n    STRING,\n    NUMBER,\n    PROMPT\n  ];\n\n  return {\n    name: 'Python',\n    aliases: [\n      'py',\n      'gyp',\n      'ipython'\n    ],\n    keywords: KEYWORDS,\n    illegal: /(<\\/|->|\\?)|=>/,\n    contains: [\n      PROMPT,\n      NUMBER,\n      {\n        // very common convention\n        begin: /\\bself\\b/\n      },\n      {\n        // eat \"if\" prior to string so that it won't accidentally be\n        // labeled as an f-string\n        beginKeywords: \"if\",\n        relevance: 0\n      },\n      STRING,\n      COMMENT_TYPE,\n      hljs.HASH_COMMENT_MODE,\n      {\n        variants: [\n          {\n            className: 'function',\n            beginKeywords: 'def'\n          },\n          {\n            className: 'class',\n            beginKeywords: 'class'\n          }\n        ],\n        end: /:/,\n        illegal: /[${=;\\n,]/,\n        contains: [\n          hljs.UNDERSCORE_TITLE_MODE,\n          PARAMS,\n          {\n            begin: /->/,\n            endsWithParent: true,\n            keywords: KEYWORDS\n          }\n        ]\n      },\n      {\n        className: 'meta',\n        begin: /^[\\t ]*@/,\n        end: /(?=#)|$/,\n        contains: [\n          NUMBER,\n          PARAMS,\n          STRING\n        ]\n      }\n    ]\n  };\n}\n\nmodule.exports = python;\n","/*\nLanguage: Plain text\nAuthor: Egor Rogov (e.rogov@postgrespro.ru)\nDescription: Plain text without any highlighting.\nCategory: common\n*/\n\nfunction plaintext(hljs) {\n  return {\n    name: 'Plain text',\n    aliases: [\n      'text',\n      'txt'\n    ],\n    disableAutodetect: true\n  };\n}\n\nmodule.exports = plaintext;\n","function _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function (obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function (obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n\n  return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\n\nfunction _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  return Constructor;\n}\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction _inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  };\n  return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n\n  return _setPrototypeOf(o, p);\n}\n\nfunction _isNativeReflectConstruct() {\n  if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n  if (Reflect.construct.sham) return false;\n  if (typeof Proxy === \"function\") return true;\n\n  try {\n    Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\nfunction _construct(Parent, args, Class) {\n  if (_isNativeReflectConstruct()) {\n    _construct = Reflect.construct;\n  } else {\n    _construct = function _construct(Parent, args, Class) {\n      var a = [null];\n      a.push.apply(a, args);\n      var Constructor = Function.bind.apply(Parent, a);\n      var instance = new Constructor();\n      if (Class) _setPrototypeOf(instance, Class.prototype);\n      return instance;\n    };\n  }\n\n  return _construct.apply(null, arguments);\n}\n\nfunction _isNativeFunction(fn) {\n  return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\n\nfunction _wrapNativeSuper(Class) {\n  var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n  _wrapNativeSuper = function _wrapNativeSuper(Class) {\n    if (Class === null || !_isNativeFunction(Class)) return Class;\n\n    if (typeof Class !== \"function\") {\n      throw new TypeError(\"Super expression must either be null or a function\");\n    }\n\n    if (typeof _cache !== \"undefined\") {\n      if (_cache.has(Class)) return _cache.get(Class);\n\n      _cache.set(Class, Wrapper);\n    }\n\n    function Wrapper() {\n      return _construct(Class, arguments, _getPrototypeOf(this).constructor);\n    }\n\n    Wrapper.prototype = Object.create(Class.prototype, {\n      constructor: {\n        value: Wrapper,\n        enumerable: false,\n        writable: true,\n        configurable: true\n      }\n    });\n    return _setPrototypeOf(Wrapper, Class);\n  };\n\n  return _wrapNativeSuper(Class);\n}\n\nfunction _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n    return call;\n  }\n\n  return _assertThisInitialized(self);\n}\n\nfunction _createSuper(Derived) {\n  var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n  return function _createSuperInternal() {\n    var Super = _getPrototypeOf(Derived),\n        result;\n\n    if (hasNativeReflectConstruct) {\n      var NewTarget = _getPrototypeOf(this).constructor;\n\n      result = Reflect.construct(Super, arguments, NewTarget);\n    } else {\n      result = Super.apply(this, arguments);\n    }\n\n    return _possibleConstructorReturn(this, result);\n  };\n}\n\nfunction _superPropBase(object, property) {\n  while (!Object.prototype.hasOwnProperty.call(object, property)) {\n    object = _getPrototypeOf(object);\n    if (object === null) break;\n  }\n\n  return object;\n}\n\nfunction _get(target, property, receiver) {\n  if (typeof Reflect !== \"undefined\" && Reflect.get) {\n    _get = Reflect.get;\n  } else {\n    _get = function _get(target, property, receiver) {\n      var base = _superPropBase(target, property);\n\n      if (!base) return;\n      var desc = Object.getOwnPropertyDescriptor(base, property);\n\n      if (desc.get) {\n        return desc.get.call(receiver);\n      }\n\n      return desc.value;\n    };\n  }\n\n  return _get(target, property, receiver || target);\n}\n\nfunction _slicedToArray(arr, i) {\n  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toArray(arr) {\n  return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();\n}\n\nfunction _arrayWithHoles(arr) {\n  if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n  if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n  if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n  var _arr = [];\n  var _n = true;\n  var _d = false;\n  var _e = undefined;\n\n  try {\n    for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n      _arr.push(_s.value);\n\n      if (i && _arr.length === i) break;\n    }\n  } catch (err) {\n    _d = true;\n    _e = err;\n  } finally {\n    try {\n      if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n    } finally {\n      if (_d) throw _e;\n    }\n  }\n\n  return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n\n  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n  return arr2;\n}\n\nfunction _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) {\n  var it;\n\n  if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n    if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n      if (it) o = it;\n      var i = 0;\n\n      var F = function () {};\n\n      return {\n        s: F,\n        n: function () {\n          if (i >= o.length) return {\n            done: true\n          };\n          return {\n            done: false,\n            value: o[i++]\n          };\n        },\n        e: function (e) {\n          throw e;\n        },\n        f: F\n      };\n    }\n\n    throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n  }\n\n  var normalCompletion = true,\n      didErr = false,\n      err;\n  return {\n    s: function () {\n      it = o[Symbol.iterator]();\n    },\n    n: function () {\n      var step = it.next();\n      normalCompletion = step.done;\n      return step;\n    },\n    e: function (e) {\n      didErr = true;\n      err = e;\n    },\n    f: function () {\n      try {\n        if (!normalCompletion && it.return != null) it.return();\n      } finally {\n        if (didErr) throw err;\n      }\n    }\n  };\n}\n\nvar Char = {\n  ANCHOR: '&',\n  COMMENT: '#',\n  TAG: '!',\n  DIRECTIVES_END: '-',\n  DOCUMENT_END: '.'\n};\nvar Type = {\n  ALIAS: 'ALIAS',\n  BLANK_LINE: 'BLANK_LINE',\n  BLOCK_FOLDED: 'BLOCK_FOLDED',\n  BLOCK_LITERAL: 'BLOCK_LITERAL',\n  COMMENT: 'COMMENT',\n  DIRECTIVE: 'DIRECTIVE',\n  DOCUMENT: 'DOCUMENT',\n  FLOW_MAP: 'FLOW_MAP',\n  FLOW_SEQ: 'FLOW_SEQ',\n  MAP: 'MAP',\n  MAP_KEY: 'MAP_KEY',\n  MAP_VALUE: 'MAP_VALUE',\n  PLAIN: 'PLAIN',\n  QUOTE_DOUBLE: 'QUOTE_DOUBLE',\n  QUOTE_SINGLE: 'QUOTE_SINGLE',\n  SEQ: 'SEQ',\n  SEQ_ITEM: 'SEQ_ITEM'\n};\nvar defaultTagPrefix = 'tag:yaml.org,2002:';\nvar defaultTags = {\n  MAP: 'tag:yaml.org,2002:map',\n  SEQ: 'tag:yaml.org,2002:seq',\n  STR: 'tag:yaml.org,2002:str'\n};\n\nfunction findLineStarts(src) {\n  var ls = [0];\n  var offset = src.indexOf('\\n');\n\n  while (offset !== -1) {\n    offset += 1;\n    ls.push(offset);\n    offset = src.indexOf('\\n', offset);\n  }\n\n  return ls;\n}\n\nfunction getSrcInfo(cst) {\n  var lineStarts, src;\n\n  if (typeof cst === 'string') {\n    lineStarts = findLineStarts(cst);\n    src = cst;\n  } else {\n    if (Array.isArray(cst)) cst = cst[0];\n\n    if (cst && cst.context) {\n      if (!cst.lineStarts) cst.lineStarts = findLineStarts(cst.context.src);\n      lineStarts = cst.lineStarts;\n      src = cst.context.src;\n    }\n  }\n\n  return {\n    lineStarts: lineStarts,\n    src: src\n  };\n}\n/**\n * @typedef {Object} LinePos - One-indexed position in the source\n * @property {number} line\n * @property {number} col\n */\n\n/**\n * Determine the line/col position matching a character offset.\n *\n * Accepts a source string or a CST document as the second parameter. With\n * the latter, starting indices for lines are cached in the document as\n * `lineStarts: number[]`.\n *\n * Returns a one-indexed `{ line, col }` location if found, or\n * `undefined` otherwise.\n *\n * @param {number} offset\n * @param {string|Document|Document[]} cst\n * @returns {?LinePos}\n */\n\n\nfunction getLinePos(offset, cst) {\n  if (typeof offset !== 'number' || offset < 0) return null;\n\n  var _getSrcInfo = getSrcInfo(cst),\n      lineStarts = _getSrcInfo.lineStarts,\n      src = _getSrcInfo.src;\n\n  if (!lineStarts || !src || offset > src.length) return null;\n\n  for (var i = 0; i < lineStarts.length; ++i) {\n    var start = lineStarts[i];\n\n    if (offset < start) {\n      return {\n        line: i,\n        col: offset - lineStarts[i - 1] + 1\n      };\n    }\n\n    if (offset === start) return {\n      line: i + 1,\n      col: 1\n    };\n  }\n\n  var line = lineStarts.length;\n  return {\n    line: line,\n    col: offset - lineStarts[line - 1] + 1\n  };\n}\n/**\n * Get a specified line from the source.\n *\n * Accepts a source string or a CST document as the second parameter. With\n * the latter, starting indices for lines are cached in the document as\n * `lineStarts: number[]`.\n *\n * Returns the line as a string if found, or `null` otherwise.\n *\n * @param {number} line One-indexed line number\n * @param {string|Document|Document[]} cst\n * @returns {?string}\n */\n\nfunction getLine(line, cst) {\n  var _getSrcInfo2 = getSrcInfo(cst),\n      lineStarts = _getSrcInfo2.lineStarts,\n      src = _getSrcInfo2.src;\n\n  if (!lineStarts || !(line >= 1) || line > lineStarts.length) return null;\n  var start = lineStarts[line - 1];\n  var end = lineStarts[line]; // undefined for last line; that's ok for slice()\n\n  while (end && end > start && src[end - 1] === '\\n') {\n    --end;\n  }\n\n  return src.slice(start, end);\n}\n/**\n * Pretty-print the starting line from the source indicated by the range `pos`\n *\n * Trims output to `maxWidth` chars while keeping the starting column visible,\n * using `…` at either end to indicate dropped characters.\n *\n * Returns a two-line string (or `null`) with `\\n` as separator; the second line\n * will hold appropriately indented `^` marks indicating the column range.\n *\n * @param {Object} pos\n * @param {LinePos} pos.start\n * @param {LinePos} [pos.end]\n * @param {string|Document|Document[]*} cst\n * @param {number} [maxWidth=80]\n * @returns {?string}\n */\n\nfunction getPrettyContext(_ref, cst) {\n  var start = _ref.start,\n      end = _ref.end;\n  var maxWidth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 80;\n  var src = getLine(start.line, cst);\n  if (!src) return null;\n  var col = start.col;\n\n  if (src.length > maxWidth) {\n    if (col <= maxWidth - 10) {\n      src = src.substr(0, maxWidth - 1) + '…';\n    } else {\n      var halfWidth = Math.round(maxWidth / 2);\n      if (src.length > col + halfWidth) src = src.substr(0, col + halfWidth - 1) + '…';\n      col -= src.length - maxWidth;\n      src = '…' + src.substr(1 - maxWidth);\n    }\n  }\n\n  var errLen = 1;\n  var errEnd = '';\n\n  if (end) {\n    if (end.line === start.line && col + (end.col - start.col) <= maxWidth + 1) {\n      errLen = end.col - start.col;\n    } else {\n      errLen = Math.min(src.length + 1, maxWidth) - col;\n      errEnd = '…';\n    }\n  }\n\n  var offset = col > 1 ? ' '.repeat(col - 1) : '';\n  var err = '^'.repeat(errLen);\n  return \"\".concat(src, \"\\n\").concat(offset).concat(err).concat(errEnd);\n}\n\nvar Range = /*#__PURE__*/function () {\n  function Range(start, end) {\n    _classCallCheck(this, Range);\n\n    this.start = start;\n    this.end = end || start;\n  }\n\n  _createClass(Range, [{\n    key: \"isEmpty\",\n    value: function isEmpty() {\n      return typeof this.start !== 'number' || !this.end || this.end <= this.start;\n    }\n    /**\n     * Set `origStart` and `origEnd` to point to the original source range for\n     * this node, which may differ due to dropped CR characters.\n     *\n     * @param {number[]} cr - Positions of dropped CR characters\n     * @param {number} offset - Starting index of `cr` from the last call\n     * @returns {number} - The next offset, matching the one found for `origStart`\n     */\n\n  }, {\n    key: \"setOrigRange\",\n    value: function setOrigRange(cr, offset) {\n      var start = this.start,\n          end = this.end;\n\n      if (cr.length === 0 || end <= cr[0]) {\n        this.origStart = start;\n        this.origEnd = end;\n        return offset;\n      }\n\n      var i = offset;\n\n      while (i < cr.length) {\n        if (cr[i] > start) break;else ++i;\n      }\n\n      this.origStart = start + i;\n      var nextOffset = i;\n\n      while (i < cr.length) {\n        // if end was at \\n, it should now be at \\r\n        if (cr[i] >= end) break;else ++i;\n      }\n\n      this.origEnd = end + i;\n      return nextOffset;\n    }\n  }], [{\n    key: \"copy\",\n    value: function copy(orig) {\n      return new Range(orig.start, orig.end);\n    }\n  }]);\n\n  return Range;\n}();\n\n/** Root class of all nodes */\n\nvar Node = /*#__PURE__*/function () {\n  function Node(type, props, context) {\n    _classCallCheck(this, Node);\n\n    Object.defineProperty(this, 'context', {\n      value: context || null,\n      writable: true\n    });\n    this.error = null;\n    this.range = null;\n    this.valueRange = null;\n    this.props = props || [];\n    this.type = type;\n    this.value = null;\n  }\n\n  _createClass(Node, [{\n    key: \"getPropValue\",\n    value: function getPropValue(idx, key, skipKey) {\n      if (!this.context) return null;\n      var src = this.context.src;\n      var prop = this.props[idx];\n      return prop && src[prop.start] === key ? src.slice(prop.start + (skipKey ? 1 : 0), prop.end) : null;\n    }\n  }, {\n    key: \"anchor\",\n    get: function get() {\n      for (var i = 0; i < this.props.length; ++i) {\n        var anchor = this.getPropValue(i, Char.ANCHOR, true);\n        if (anchor != null) return anchor;\n      }\n\n      return null;\n    }\n  }, {\n    key: \"comment\",\n    get: function get() {\n      var comments = [];\n\n      for (var i = 0; i < this.props.length; ++i) {\n        var comment = this.getPropValue(i, Char.COMMENT, true);\n        if (comment != null) comments.push(comment);\n      }\n\n      return comments.length > 0 ? comments.join('\\n') : null;\n    }\n  }, {\n    key: \"commentHasRequiredWhitespace\",\n    value: function commentHasRequiredWhitespace(start) {\n      var src = this.context.src;\n      if (this.header && start === this.header.end) return false;\n      if (!this.valueRange) return false;\n      var end = this.valueRange.end;\n      return start !== end || Node.atBlank(src, end - 1);\n    }\n  }, {\n    key: \"hasComment\",\n    get: function get() {\n      if (this.context) {\n        var src = this.context.src;\n\n        for (var i = 0; i < this.props.length; ++i) {\n          if (src[this.props[i].start] === Char.COMMENT) return true;\n        }\n      }\n\n      return false;\n    }\n  }, {\n    key: \"hasProps\",\n    get: function get() {\n      if (this.context) {\n        var src = this.context.src;\n\n        for (var i = 0; i < this.props.length; ++i) {\n          if (src[this.props[i].start] !== Char.COMMENT) return true;\n        }\n      }\n\n      return false;\n    }\n  }, {\n    key: \"includesTrailingLines\",\n    get: function get() {\n      return false;\n    }\n  }, {\n    key: \"jsonLike\",\n    get: function get() {\n      var jsonLikeTypes = [Type.FLOW_MAP, Type.FLOW_SEQ, Type.QUOTE_DOUBLE, Type.QUOTE_SINGLE];\n      return jsonLikeTypes.indexOf(this.type) !== -1;\n    }\n  }, {\n    key: \"rangeAsLinePos\",\n    get: function get() {\n      if (!this.range || !this.context) return undefined;\n      var start = getLinePos(this.range.start, this.context.root);\n      if (!start) return undefined;\n      var end = getLinePos(this.range.end, this.context.root);\n      return {\n        start: start,\n        end: end\n      };\n    }\n  }, {\n    key: \"rawValue\",\n    get: function get() {\n      if (!this.valueRange || !this.context) return null;\n      var _this$valueRange = this.valueRange,\n          start = _this$valueRange.start,\n          end = _this$valueRange.end;\n      return this.context.src.slice(start, end);\n    }\n  }, {\n    key: \"tag\",\n    get: function get() {\n      for (var i = 0; i < this.props.length; ++i) {\n        var tag = this.getPropValue(i, Char.TAG, false);\n\n        if (tag != null) {\n          if (tag[1] === '<') {\n            return {\n              verbatim: tag.slice(2, -1)\n            };\n          } else {\n            // eslint-disable-next-line no-unused-vars\n            var _tag$match = tag.match(/^(.*!)([^!]*)$/),\n                _tag$match2 = _slicedToArray(_tag$match, 3);\n                _tag$match2[0];\n                var handle = _tag$match2[1],\n                suffix = _tag$match2[2];\n\n            return {\n              handle: handle,\n              suffix: suffix\n            };\n          }\n        }\n      }\n\n      return null;\n    }\n  }, {\n    key: \"valueRangeContainsNewline\",\n    get: function get() {\n      if (!this.valueRange || !this.context) return false;\n      var _this$valueRange2 = this.valueRange,\n          start = _this$valueRange2.start,\n          end = _this$valueRange2.end;\n      var src = this.context.src;\n\n      for (var i = start; i < end; ++i) {\n        if (src[i] === '\\n') return true;\n      }\n\n      return false;\n    }\n  }, {\n    key: \"parseComment\",\n    value: function parseComment(start) {\n      var src = this.context.src;\n\n      if (src[start] === Char.COMMENT) {\n        var end = Node.endOfLine(src, start + 1);\n        var commentRange = new Range(start, end);\n        this.props.push(commentRange);\n        return end;\n      }\n\n      return start;\n    }\n    /**\n     * Populates the `origStart` and `origEnd` values of all ranges for this\n     * node. Extended by child classes to handle descendant nodes.\n     *\n     * @param {number[]} cr - Positions of dropped CR characters\n     * @param {number} offset - Starting index of `cr` from the last call\n     * @returns {number} - The next offset, matching the one found for `origStart`\n     */\n\n  }, {\n    key: \"setOrigRanges\",\n    value: function setOrigRanges(cr, offset) {\n      if (this.range) offset = this.range.setOrigRange(cr, offset);\n      if (this.valueRange) this.valueRange.setOrigRange(cr, offset);\n      this.props.forEach(function (prop) {\n        return prop.setOrigRange(cr, offset);\n      });\n      return offset;\n    }\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      var src = this.context.src,\n          range = this.range,\n          value = this.value;\n      if (value != null) return value;\n      var str = src.slice(range.start, range.end);\n      return Node.addStringTerminator(src, range.end, str);\n    }\n  }], [{\n    key: \"addStringTerminator\",\n    value: function addStringTerminator(src, offset, str) {\n      if (str[str.length - 1] === '\\n') return str;\n      var next = Node.endOfWhiteSpace(src, offset);\n      return next >= src.length || src[next] === '\\n' ? str + '\\n' : str;\n    } // ^(---|...)\n\n  }, {\n    key: \"atDocumentBoundary\",\n    value: function atDocumentBoundary(src, offset, sep) {\n      var ch0 = src[offset];\n      if (!ch0) return true;\n      var prev = src[offset - 1];\n      if (prev && prev !== '\\n') return false;\n\n      if (sep) {\n        if (ch0 !== sep) return false;\n      } else {\n        if (ch0 !== Char.DIRECTIVES_END && ch0 !== Char.DOCUMENT_END) return false;\n      }\n\n      var ch1 = src[offset + 1];\n      var ch2 = src[offset + 2];\n      if (ch1 !== ch0 || ch2 !== ch0) return false;\n      var ch3 = src[offset + 3];\n      return !ch3 || ch3 === '\\n' || ch3 === '\\t' || ch3 === ' ';\n    }\n  }, {\n    key: \"endOfIdentifier\",\n    value: function endOfIdentifier(src, offset) {\n      var ch = src[offset];\n      var isVerbatim = ch === '<';\n      var notOk = isVerbatim ? ['\\n', '\\t', ' ', '>'] : ['\\n', '\\t', ' ', '[', ']', '{', '}', ','];\n\n      while (ch && notOk.indexOf(ch) === -1) {\n        ch = src[offset += 1];\n      }\n\n      if (isVerbatim && ch === '>') offset += 1;\n      return offset;\n    }\n  }, {\n    key: \"endOfIndent\",\n    value: function endOfIndent(src, offset) {\n      var ch = src[offset];\n\n      while (ch === ' ') {\n        ch = src[offset += 1];\n      }\n\n      return offset;\n    }\n  }, {\n    key: \"endOfLine\",\n    value: function endOfLine(src, offset) {\n      var ch = src[offset];\n\n      while (ch && ch !== '\\n') {\n        ch = src[offset += 1];\n      }\n\n      return offset;\n    }\n  }, {\n    key: \"endOfWhiteSpace\",\n    value: function endOfWhiteSpace(src, offset) {\n      var ch = src[offset];\n\n      while (ch === '\\t' || ch === ' ') {\n        ch = src[offset += 1];\n      }\n\n      return offset;\n    }\n  }, {\n    key: \"startOfLine\",\n    value: function startOfLine(src, offset) {\n      var ch = src[offset - 1];\n      if (ch === '\\n') return offset;\n\n      while (ch && ch !== '\\n') {\n        ch = src[offset -= 1];\n      }\n\n      return offset + 1;\n    }\n    /**\n     * End of indentation, or null if the line's indent level is not more\n     * than `indent`\n     *\n     * @param {string} src\n     * @param {number} indent\n     * @param {number} lineStart\n     * @returns {?number}\n     */\n\n  }, {\n    key: \"endOfBlockIndent\",\n    value: function endOfBlockIndent(src, indent, lineStart) {\n      var inEnd = Node.endOfIndent(src, lineStart);\n\n      if (inEnd > lineStart + indent) {\n        return inEnd;\n      } else {\n        var wsEnd = Node.endOfWhiteSpace(src, inEnd);\n        var ch = src[wsEnd];\n        if (!ch || ch === '\\n') return wsEnd;\n      }\n\n      return null;\n    }\n  }, {\n    key: \"atBlank\",\n    value: function atBlank(src, offset, endAsBlank) {\n      var ch = src[offset];\n      return ch === '\\n' || ch === '\\t' || ch === ' ' || endAsBlank && !ch;\n    }\n  }, {\n    key: \"nextNodeIsIndented\",\n    value: function nextNodeIsIndented(ch, indentDiff, indicatorAsIndent) {\n      if (!ch || indentDiff < 0) return false;\n      if (indentDiff > 0) return true;\n      return indicatorAsIndent && ch === '-';\n    } // should be at line or string end, or at next non-whitespace char\n\n  }, {\n    key: \"normalizeOffset\",\n    value: function normalizeOffset(src, offset) {\n      var ch = src[offset];\n      return !ch ? offset : ch !== '\\n' && src[offset - 1] === '\\n' ? offset - 1 : Node.endOfWhiteSpace(src, offset);\n    } // fold single newline into space, multiple newlines to N - 1 newlines\n    // presumes src[offset] === '\\n'\n\n  }, {\n    key: \"foldNewline\",\n    value: function foldNewline(src, offset, indent) {\n      var inCount = 0;\n      var error = false;\n      var fold = '';\n      var ch = src[offset + 1];\n\n      while (ch === ' ' || ch === '\\t' || ch === '\\n') {\n        switch (ch) {\n          case '\\n':\n            inCount = 0;\n            offset += 1;\n            fold += '\\n';\n            break;\n\n          case '\\t':\n            if (inCount <= indent) error = true;\n            offset = Node.endOfWhiteSpace(src, offset + 2) - 1;\n            break;\n\n          case ' ':\n            inCount += 1;\n            offset += 1;\n            break;\n        }\n\n        ch = src[offset + 1];\n      }\n\n      if (!fold) fold = ' ';\n      if (ch && inCount <= indent) error = true;\n      return {\n        fold: fold,\n        offset: offset,\n        error: error\n      };\n    }\n  }]);\n\n  return Node;\n}();\n\nvar YAMLError = /*#__PURE__*/function (_Error) {\n  _inherits(YAMLError, _Error);\n\n  var _super = _createSuper(YAMLError);\n\n  function YAMLError(name, source, message) {\n    var _this;\n\n    _classCallCheck(this, YAMLError);\n\n    if (!message || !(source instanceof Node)) throw new Error(\"Invalid arguments for new \".concat(name));\n    _this = _super.call(this);\n    _this.name = name;\n    _this.message = message;\n    _this.source = source;\n    return _this;\n  }\n\n  _createClass(YAMLError, [{\n    key: \"makePretty\",\n    value: function makePretty() {\n      if (!this.source) return;\n      this.nodeType = this.source.type;\n      var cst = this.source.context && this.source.context.root;\n\n      if (typeof this.offset === 'number') {\n        this.range = new Range(this.offset, this.offset + 1);\n        var start = cst && getLinePos(this.offset, cst);\n\n        if (start) {\n          var end = {\n            line: start.line,\n            col: start.col + 1\n          };\n          this.linePos = {\n            start: start,\n            end: end\n          };\n        }\n\n        delete this.offset;\n      } else {\n        this.range = this.source.range;\n        this.linePos = this.source.rangeAsLinePos;\n      }\n\n      if (this.linePos) {\n        var _this$linePos$start = this.linePos.start,\n            line = _this$linePos$start.line,\n            col = _this$linePos$start.col;\n        this.message += \" at line \".concat(line, \", column \").concat(col);\n        var ctx = cst && getPrettyContext(this.linePos, cst);\n        if (ctx) this.message += \":\\n\\n\".concat(ctx, \"\\n\");\n      }\n\n      delete this.source;\n    }\n  }]);\n\n  return YAMLError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\nvar YAMLReferenceError = /*#__PURE__*/function (_YAMLError) {\n  _inherits(YAMLReferenceError, _YAMLError);\n\n  var _super2 = _createSuper(YAMLReferenceError);\n\n  function YAMLReferenceError(source, message) {\n    _classCallCheck(this, YAMLReferenceError);\n\n    return _super2.call(this, 'YAMLReferenceError', source, message);\n  }\n\n  return YAMLReferenceError;\n}(YAMLError);\nvar YAMLSemanticError = /*#__PURE__*/function (_YAMLError2) {\n  _inherits(YAMLSemanticError, _YAMLError2);\n\n  var _super3 = _createSuper(YAMLSemanticError);\n\n  function YAMLSemanticError(source, message) {\n    _classCallCheck(this, YAMLSemanticError);\n\n    return _super3.call(this, 'YAMLSemanticError', source, message);\n  }\n\n  return YAMLSemanticError;\n}(YAMLError);\nvar YAMLSyntaxError = /*#__PURE__*/function (_YAMLError3) {\n  _inherits(YAMLSyntaxError, _YAMLError3);\n\n  var _super4 = _createSuper(YAMLSyntaxError);\n\n  function YAMLSyntaxError(source, message) {\n    _classCallCheck(this, YAMLSyntaxError);\n\n    return _super4.call(this, 'YAMLSyntaxError', source, message);\n  }\n\n  return YAMLSyntaxError;\n}(YAMLError);\nvar YAMLWarning = /*#__PURE__*/function (_YAMLError4) {\n  _inherits(YAMLWarning, _YAMLError4);\n\n  var _super5 = _createSuper(YAMLWarning);\n\n  function YAMLWarning(source, message) {\n    _classCallCheck(this, YAMLWarning);\n\n    return _super5.call(this, 'YAMLWarning', source, message);\n  }\n\n  return YAMLWarning;\n}(YAMLError);\n\nvar PlainValue = /*#__PURE__*/function (_Node) {\n  _inherits(PlainValue, _Node);\n\n  var _super = _createSuper(PlainValue);\n\n  function PlainValue() {\n    _classCallCheck(this, PlainValue);\n\n    return _super.apply(this, arguments);\n  }\n\n  _createClass(PlainValue, [{\n    key: \"strValue\",\n    get: function get() {\n      if (!this.valueRange || !this.context) return null;\n      var _this$valueRange = this.valueRange,\n          start = _this$valueRange.start,\n          end = _this$valueRange.end;\n      var src = this.context.src;\n      var ch = src[end - 1];\n\n      while (start < end && (ch === '\\n' || ch === '\\t' || ch === ' ')) {\n        ch = src[--end - 1];\n      }\n\n      var str = '';\n\n      for (var i = start; i < end; ++i) {\n        var _ch = src[i];\n\n        if (_ch === '\\n') {\n          var _Node$foldNewline = Node.foldNewline(src, i, -1),\n              fold = _Node$foldNewline.fold,\n              offset = _Node$foldNewline.offset;\n\n          str += fold;\n          i = offset;\n        } else if (_ch === ' ' || _ch === '\\t') {\n          // trim trailing whitespace\n          var wsStart = i;\n          var next = src[i + 1];\n\n          while (i < end && (next === ' ' || next === '\\t')) {\n            i += 1;\n            next = src[i + 1];\n          }\n\n          if (next !== '\\n') str += i > wsStart ? src.slice(wsStart, i + 1) : _ch;\n        } else {\n          str += _ch;\n        }\n      }\n\n      var ch0 = src[start];\n\n      switch (ch0) {\n        case '\\t':\n          {\n            var msg = 'Plain value cannot start with a tab character';\n            var errors = [new YAMLSemanticError(this, msg)];\n            return {\n              errors: errors,\n              str: str\n            };\n          }\n\n        case '@':\n        case '`':\n          {\n            var _msg = \"Plain value cannot start with reserved character \".concat(ch0);\n\n            var _errors = [new YAMLSemanticError(this, _msg)];\n            return {\n              errors: _errors,\n              str: str\n            };\n          }\n\n        default:\n          return str;\n      }\n    }\n  }, {\n    key: \"parseBlockValue\",\n    value: function parseBlockValue(start) {\n      var _this$context = this.context,\n          indent = _this$context.indent,\n          inFlow = _this$context.inFlow,\n          src = _this$context.src;\n      var offset = start;\n      var valueEnd = start;\n\n      for (var ch = src[offset]; ch === '\\n'; ch = src[offset]) {\n        if (Node.atDocumentBoundary(src, offset + 1)) break;\n        var end = Node.endOfBlockIndent(src, indent, offset + 1);\n        if (end === null || src[end] === '#') break;\n\n        if (src[end] === '\\n') {\n          offset = end;\n        } else {\n          valueEnd = PlainValue.endOfLine(src, end, inFlow);\n          offset = valueEnd;\n        }\n      }\n\n      if (this.valueRange.isEmpty()) this.valueRange.start = start;\n      this.valueRange.end = valueEnd;\n      return valueEnd;\n    }\n    /**\n     * Parses a plain value from the source\n     *\n     * Accepted forms are:\n     * ```\n     * #comment\n     *\n     * first line\n     *\n     * first line #comment\n     *\n     * first line\n     * block\n     * lines\n     *\n     * #comment\n     * block\n     * lines\n     * ```\n     * where block lines are empty or have an indent level greater than `indent`.\n     *\n     * @param {ParseContext} context\n     * @param {number} start - Index of first character\n     * @returns {number} - Index of the character after this scalar, may be `\\n`\n     */\n\n  }, {\n    key: \"parse\",\n    value: function parse(context, start) {\n      this.context = context;\n      var inFlow = context.inFlow,\n          src = context.src;\n      var offset = start;\n      var ch = src[offset];\n\n      if (ch && ch !== '#' && ch !== '\\n') {\n        offset = PlainValue.endOfLine(src, start, inFlow);\n      }\n\n      this.valueRange = new Range(start, offset);\n      offset = Node.endOfWhiteSpace(src, offset);\n      offset = this.parseComment(offset);\n\n      if (!this.hasComment || this.valueRange.isEmpty()) {\n        offset = this.parseBlockValue(offset);\n      }\n\n      return offset;\n    }\n  }], [{\n    key: \"endOfLine\",\n    value: function endOfLine(src, start, inFlow) {\n      var ch = src[start];\n      var offset = start;\n\n      while (ch && ch !== '\\n') {\n        if (inFlow && (ch === '[' || ch === ']' || ch === '{' || ch === '}' || ch === ',')) break;\n        var next = src[offset + 1];\n        if (ch === ':' && (!next || next === '\\n' || next === '\\t' || next === ' ' || inFlow && next === ',')) break;\n        if ((ch === ' ' || ch === '\\t') && next === '#') break;\n        offset += 1;\n        ch = next;\n      }\n\n      return offset;\n    }\n  }]);\n\n  return PlainValue;\n}(Node);\n\nexport { Char as C, Node as N, PlainValue as P, Range as R, Type as T, YAMLSyntaxError as Y, _createForOfIteratorHelper as _, _typeof as a, _createClass as b, _classCallCheck as c, defaultTagPrefix as d, _defineProperty as e, YAMLWarning as f, YAMLSemanticError as g, _slicedToArray as h, YAMLError as i, _inherits as j, _createSuper as k, _get as l, _getPrototypeOf as m, defaultTags as n, YAMLReferenceError as o, _assertThisInitialized as p, _toArray as q, _possibleConstructorReturn as r };\n","import { j as _inherits, k as _createSuper, c as _classCallCheck, T as Type, b as _createClass, R as Range, N as Node, g as YAMLSemanticError, l as _get, m as _getPrototypeOf, Y as YAMLSyntaxError, C as Char, e as _defineProperty, P as PlainValue } from './PlainValue-b8036b75.js';\n\nvar BlankLine = /*#__PURE__*/function (_Node) {\n  _inherits(BlankLine, _Node);\n\n  var _super = _createSuper(BlankLine);\n\n  function BlankLine() {\n    _classCallCheck(this, BlankLine);\n\n    return _super.call(this, Type.BLANK_LINE);\n  }\n  /* istanbul ignore next */\n\n\n  _createClass(BlankLine, [{\n    key: \"includesTrailingLines\",\n    get: function get() {\n      // This is never called from anywhere, but if it were,\n      // this is the value it should return.\n      return true;\n    }\n    /**\n     * Parses a blank line from the source\n     *\n     * @param {ParseContext} context\n     * @param {number} start - Index of first \\n character\n     * @returns {number} - Index of the character after this\n     */\n\n  }, {\n    key: \"parse\",\n    value: function parse(context, start) {\n      this.context = context;\n      this.range = new Range(start, start + 1);\n      return start + 1;\n    }\n  }]);\n\n  return BlankLine;\n}(Node);\n\nvar CollectionItem = /*#__PURE__*/function (_Node) {\n  _inherits(CollectionItem, _Node);\n\n  var _super = _createSuper(CollectionItem);\n\n  function CollectionItem(type, props) {\n    var _this;\n\n    _classCallCheck(this, CollectionItem);\n\n    _this = _super.call(this, type, props);\n    _this.node = null;\n    return _this;\n  }\n\n  _createClass(CollectionItem, [{\n    key: \"includesTrailingLines\",\n    get: function get() {\n      return !!this.node && this.node.includesTrailingLines;\n    }\n    /**\n     * @param {ParseContext} context\n     * @param {number} start - Index of first character\n     * @returns {number} - Index of the character after this\n     */\n\n  }, {\n    key: \"parse\",\n    value: function parse(context, start) {\n      this.context = context;\n      var parseNode = context.parseNode,\n          src = context.src;\n      var atLineStart = context.atLineStart,\n          lineStart = context.lineStart;\n      if (!atLineStart && this.type === Type.SEQ_ITEM) this.error = new YAMLSemanticError(this, 'Sequence items must not have preceding content on the same line');\n      var indent = atLineStart ? start - lineStart : context.indent;\n      var offset = Node.endOfWhiteSpace(src, start + 1);\n      var ch = src[offset];\n      var inlineComment = ch === '#';\n      var comments = [];\n      var blankLine = null;\n\n      while (ch === '\\n' || ch === '#') {\n        if (ch === '#') {\n          var _end = Node.endOfLine(src, offset + 1);\n\n          comments.push(new Range(offset, _end));\n          offset = _end;\n        } else {\n          atLineStart = true;\n          lineStart = offset + 1;\n          var wsEnd = Node.endOfWhiteSpace(src, lineStart);\n\n          if (src[wsEnd] === '\\n' && comments.length === 0) {\n            blankLine = new BlankLine();\n            lineStart = blankLine.parse({\n              src: src\n            }, lineStart);\n          }\n\n          offset = Node.endOfIndent(src, lineStart);\n        }\n\n        ch = src[offset];\n      }\n\n      if (Node.nextNodeIsIndented(ch, offset - (lineStart + indent), this.type !== Type.SEQ_ITEM)) {\n        this.node = parseNode({\n          atLineStart: atLineStart,\n          inCollection: false,\n          indent: indent,\n          lineStart: lineStart,\n          parent: this\n        }, offset);\n      } else if (ch && lineStart > start + 1) {\n        offset = lineStart - 1;\n      }\n\n      if (this.node) {\n        if (blankLine) {\n          // Only blank lines preceding non-empty nodes are captured. Note that\n          // this means that collection item range start indices do not always\n          // increase monotonically. -- eemeli/yaml#126\n          var items = context.parent.items || context.parent.contents;\n          if (items) items.push(blankLine);\n        }\n\n        if (comments.length) Array.prototype.push.apply(this.props, comments);\n        offset = this.node.range.end;\n      } else {\n        if (inlineComment) {\n          var c = comments[0];\n          this.props.push(c);\n          offset = c.end;\n        } else {\n          offset = Node.endOfLine(src, start + 1);\n        }\n      }\n\n      var end = this.node ? this.node.valueRange.end : offset;\n      this.valueRange = new Range(start, end);\n      return offset;\n    }\n  }, {\n    key: \"setOrigRanges\",\n    value: function setOrigRanges(cr, offset) {\n      offset = _get(_getPrototypeOf(CollectionItem.prototype), \"setOrigRanges\", this).call(this, cr, offset);\n      return this.node ? this.node.setOrigRanges(cr, offset) : offset;\n    }\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      var src = this.context.src,\n          node = this.node,\n          range = this.range,\n          value = this.value;\n      if (value != null) return value;\n      var str = node ? src.slice(range.start, node.range.start) + String(node) : src.slice(range.start, range.end);\n      return Node.addStringTerminator(src, range.end, str);\n    }\n  }]);\n\n  return CollectionItem;\n}(Node);\n\nvar Comment = /*#__PURE__*/function (_Node) {\n  _inherits(Comment, _Node);\n\n  var _super = _createSuper(Comment);\n\n  function Comment() {\n    _classCallCheck(this, Comment);\n\n    return _super.call(this, Type.COMMENT);\n  }\n  /**\n   * Parses a comment line from the source\n   *\n   * @param {ParseContext} context\n   * @param {number} start - Index of first character\n   * @returns {number} - Index of the character after this scalar\n   */\n\n\n  _createClass(Comment, [{\n    key: \"parse\",\n    value: function parse(context, start) {\n      this.context = context;\n      var offset = this.parseComment(start);\n      this.range = new Range(start, offset);\n      return offset;\n    }\n  }]);\n\n  return Comment;\n}(Node);\n\nfunction grabCollectionEndComments(node) {\n  var cnode = node;\n\n  while (cnode instanceof CollectionItem) {\n    cnode = cnode.node;\n  }\n\n  if (!(cnode instanceof Collection)) return null;\n  var len = cnode.items.length;\n  var ci = -1;\n\n  for (var i = len - 1; i >= 0; --i) {\n    var n = cnode.items[i];\n\n    if (n.type === Type.COMMENT) {\n      // Keep sufficiently indented comments with preceding node\n      var _n$context = n.context,\n          indent = _n$context.indent,\n          lineStart = _n$context.lineStart;\n      if (indent > 0 && n.range.start >= lineStart + indent) break;\n      ci = i;\n    } else if (n.type === Type.BLANK_LINE) ci = i;else break;\n  }\n\n  if (ci === -1) return null;\n  var ca = cnode.items.splice(ci, len - ci);\n  var prevEnd = ca[0].range.start;\n\n  while (true) {\n    cnode.range.end = prevEnd;\n    if (cnode.valueRange && cnode.valueRange.end > prevEnd) cnode.valueRange.end = prevEnd;\n    if (cnode === node) break;\n    cnode = cnode.context.parent;\n  }\n\n  return ca;\n}\nvar Collection = /*#__PURE__*/function (_Node) {\n  _inherits(Collection, _Node);\n\n  var _super = _createSuper(Collection);\n\n  function Collection(firstItem) {\n    var _this;\n\n    _classCallCheck(this, Collection);\n\n    _this = _super.call(this, firstItem.type === Type.SEQ_ITEM ? Type.SEQ : Type.MAP);\n\n    for (var i = firstItem.props.length - 1; i >= 0; --i) {\n      if (firstItem.props[i].start < firstItem.context.lineStart) {\n        // props on previous line are assumed by the collection\n        _this.props = firstItem.props.slice(0, i + 1);\n        firstItem.props = firstItem.props.slice(i + 1);\n        var itemRange = firstItem.props[0] || firstItem.valueRange;\n        firstItem.range.start = itemRange.start;\n        break;\n      }\n    }\n\n    _this.items = [firstItem];\n    var ec = grabCollectionEndComments(firstItem);\n    if (ec) Array.prototype.push.apply(_this.items, ec);\n    return _this;\n  }\n\n  _createClass(Collection, [{\n    key: \"includesTrailingLines\",\n    get: function get() {\n      return this.items.length > 0;\n    }\n    /**\n     * @param {ParseContext} context\n     * @param {number} start - Index of first character\n     * @returns {number} - Index of the character after this\n     */\n\n  }, {\n    key: \"parse\",\n    value: function parse(context, start) {\n      this.context = context;\n      var parseNode = context.parseNode,\n          src = context.src; // It's easier to recalculate lineStart here rather than tracking down the\n      // last context from which to read it -- eemeli/yaml#2\n\n      var lineStart = Node.startOfLine(src, start);\n      var firstItem = this.items[0]; // First-item context needs to be correct for later comment handling\n      // -- eemeli/yaml#17\n\n      firstItem.context.parent = this;\n      this.valueRange = Range.copy(firstItem.valueRange);\n      var indent = firstItem.range.start - firstItem.context.lineStart;\n      var offset = start;\n      offset = Node.normalizeOffset(src, offset);\n      var ch = src[offset];\n      var atLineStart = Node.endOfWhiteSpace(src, lineStart) === offset;\n      var prevIncludesTrailingLines = false;\n\n      while (ch) {\n        while (ch === '\\n' || ch === '#') {\n          if (atLineStart && ch === '\\n' && !prevIncludesTrailingLines) {\n            var blankLine = new BlankLine();\n            offset = blankLine.parse({\n              src: src\n            }, offset);\n            this.valueRange.end = offset;\n\n            if (offset >= src.length) {\n              ch = null;\n              break;\n            }\n\n            this.items.push(blankLine);\n            offset -= 1; // blankLine.parse() consumes terminal newline\n          } else if (ch === '#') {\n            if (offset < lineStart + indent && !Collection.nextContentHasIndent(src, offset, indent)) {\n              return offset;\n            }\n\n            var comment = new Comment();\n            offset = comment.parse({\n              indent: indent,\n              lineStart: lineStart,\n              src: src\n            }, offset);\n            this.items.push(comment);\n            this.valueRange.end = offset;\n\n            if (offset >= src.length) {\n              ch = null;\n              break;\n            }\n          }\n\n          lineStart = offset + 1;\n          offset = Node.endOfIndent(src, lineStart);\n\n          if (Node.atBlank(src, offset)) {\n            var wsEnd = Node.endOfWhiteSpace(src, offset);\n            var next = src[wsEnd];\n\n            if (!next || next === '\\n' || next === '#') {\n              offset = wsEnd;\n            }\n          }\n\n          ch = src[offset];\n          atLineStart = true;\n        }\n\n        if (!ch) {\n          break;\n        }\n\n        if (offset !== lineStart + indent && (atLineStart || ch !== ':')) {\n          if (offset < lineStart + indent) {\n            if (lineStart > start) offset = lineStart;\n            break;\n          } else if (!this.error) {\n            var msg = 'All collection items must start at the same column';\n            this.error = new YAMLSyntaxError(this, msg);\n          }\n        }\n\n        if (firstItem.type === Type.SEQ_ITEM) {\n          if (ch !== '-') {\n            if (lineStart > start) offset = lineStart;\n            break;\n          }\n        } else if (ch === '-' && !this.error) {\n          // map key may start with -, as long as it's followed by a non-whitespace char\n          var _next = src[offset + 1];\n\n          if (!_next || _next === '\\n' || _next === '\\t' || _next === ' ') {\n            var _msg = 'A collection cannot be both a mapping and a sequence';\n            this.error = new YAMLSyntaxError(this, _msg);\n          }\n        }\n\n        var node = parseNode({\n          atLineStart: atLineStart,\n          inCollection: true,\n          indent: indent,\n          lineStart: lineStart,\n          parent: this\n        }, offset);\n        if (!node) return offset; // at next document start\n\n        this.items.push(node);\n        this.valueRange.end = node.valueRange.end;\n        offset = Node.normalizeOffset(src, node.range.end);\n        ch = src[offset];\n        atLineStart = false;\n        prevIncludesTrailingLines = node.includesTrailingLines; // Need to reset lineStart and atLineStart here if preceding node's range\n        // has advanced to check the current line's indentation level\n        // -- eemeli/yaml#10 & eemeli/yaml#38\n\n        if (ch) {\n          var ls = offset - 1;\n          var prev = src[ls];\n\n          while (prev === ' ' || prev === '\\t') {\n            prev = src[--ls];\n          }\n\n          if (prev === '\\n') {\n            lineStart = ls + 1;\n            atLineStart = true;\n          }\n        }\n\n        var ec = grabCollectionEndComments(node);\n        if (ec) Array.prototype.push.apply(this.items, ec);\n      }\n\n      return offset;\n    }\n  }, {\n    key: \"setOrigRanges\",\n    value: function setOrigRanges(cr, offset) {\n      offset = _get(_getPrototypeOf(Collection.prototype), \"setOrigRanges\", this).call(this, cr, offset);\n      this.items.forEach(function (node) {\n        offset = node.setOrigRanges(cr, offset);\n      });\n      return offset;\n    }\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      var src = this.context.src,\n          items = this.items,\n          range = this.range,\n          value = this.value;\n      if (value != null) return value;\n      var str = src.slice(range.start, items[0].range.start) + String(items[0]);\n\n      for (var i = 1; i < items.length; ++i) {\n        var item = items[i];\n        var _item$context = item.context,\n            atLineStart = _item$context.atLineStart,\n            indent = _item$context.indent;\n        if (atLineStart) for (var _i = 0; _i < indent; ++_i) {\n          str += ' ';\n        }\n        str += String(item);\n      }\n\n      return Node.addStringTerminator(src, range.end, str);\n    }\n  }], [{\n    key: \"nextContentHasIndent\",\n    value: function nextContentHasIndent(src, offset, indent) {\n      var lineStart = Node.endOfLine(src, offset) + 1;\n      offset = Node.endOfWhiteSpace(src, lineStart);\n      var ch = src[offset];\n      if (!ch) return false;\n      if (offset >= lineStart + indent) return true;\n      if (ch !== '#' && ch !== '\\n') return false;\n      return Collection.nextContentHasIndent(src, offset, indent);\n    }\n  }]);\n\n  return Collection;\n}(Node);\n\nvar Directive = /*#__PURE__*/function (_Node) {\n  _inherits(Directive, _Node);\n\n  var _super = _createSuper(Directive);\n\n  function Directive() {\n    var _this;\n\n    _classCallCheck(this, Directive);\n\n    _this = _super.call(this, Type.DIRECTIVE);\n    _this.name = null;\n    return _this;\n  }\n\n  _createClass(Directive, [{\n    key: \"parameters\",\n    get: function get() {\n      var raw = this.rawValue;\n      return raw ? raw.trim().split(/[ \\t]+/) : [];\n    }\n  }, {\n    key: \"parseName\",\n    value: function parseName(start) {\n      var src = this.context.src;\n      var offset = start;\n      var ch = src[offset];\n\n      while (ch && ch !== '\\n' && ch !== '\\t' && ch !== ' ') {\n        ch = src[offset += 1];\n      }\n\n      this.name = src.slice(start, offset);\n      return offset;\n    }\n  }, {\n    key: \"parseParameters\",\n    value: function parseParameters(start) {\n      var src = this.context.src;\n      var offset = start;\n      var ch = src[offset];\n\n      while (ch && ch !== '\\n' && ch !== '#') {\n        ch = src[offset += 1];\n      }\n\n      this.valueRange = new Range(start, offset);\n      return offset;\n    }\n  }, {\n    key: \"parse\",\n    value: function parse(context, start) {\n      this.context = context;\n      var offset = this.parseName(start + 1);\n      offset = this.parseParameters(offset);\n      offset = this.parseComment(offset);\n      this.range = new Range(start, offset);\n      return offset;\n    }\n  }]);\n\n  return Directive;\n}(Node);\n\nvar Document = /*#__PURE__*/function (_Node) {\n  _inherits(Document, _Node);\n\n  var _super = _createSuper(Document);\n\n  function Document() {\n    var _this;\n\n    _classCallCheck(this, Document);\n\n    _this = _super.call(this, Type.DOCUMENT);\n    _this.directives = null;\n    _this.contents = null;\n    _this.directivesEndMarker = null;\n    _this.documentEndMarker = null;\n    return _this;\n  }\n\n  _createClass(Document, [{\n    key: \"parseDirectives\",\n    value: function parseDirectives(start) {\n      var src = this.context.src;\n      this.directives = [];\n      var atLineStart = true;\n      var hasDirectives = false;\n      var offset = start;\n\n      while (!Node.atDocumentBoundary(src, offset, Char.DIRECTIVES_END)) {\n        offset = Document.startCommentOrEndBlankLine(src, offset);\n\n        switch (src[offset]) {\n          case '\\n':\n            if (atLineStart) {\n              var blankLine = new BlankLine();\n              offset = blankLine.parse({\n                src: src\n              }, offset);\n\n              if (offset < src.length) {\n                this.directives.push(blankLine);\n              }\n            } else {\n              offset += 1;\n              atLineStart = true;\n            }\n\n            break;\n\n          case '#':\n            {\n              var comment = new Comment();\n              offset = comment.parse({\n                src: src\n              }, offset);\n              this.directives.push(comment);\n              atLineStart = false;\n            }\n            break;\n\n          case '%':\n            {\n              var directive = new Directive();\n              offset = directive.parse({\n                parent: this,\n                src: src\n              }, offset);\n              this.directives.push(directive);\n              hasDirectives = true;\n              atLineStart = false;\n            }\n            break;\n\n          default:\n            if (hasDirectives) {\n              this.error = new YAMLSemanticError(this, 'Missing directives-end indicator line');\n            } else if (this.directives.length > 0) {\n              this.contents = this.directives;\n              this.directives = [];\n            }\n\n            return offset;\n        }\n      }\n\n      if (src[offset]) {\n        this.directivesEndMarker = new Range(offset, offset + 3);\n        return offset + 3;\n      }\n\n      if (hasDirectives) {\n        this.error = new YAMLSemanticError(this, 'Missing directives-end indicator line');\n      } else if (this.directives.length > 0) {\n        this.contents = this.directives;\n        this.directives = [];\n      }\n\n      return offset;\n    }\n  }, {\n    key: \"parseContents\",\n    value: function parseContents(start) {\n      var _this$context = this.context,\n          parseNode = _this$context.parseNode,\n          src = _this$context.src;\n      if (!this.contents) this.contents = [];\n      var lineStart = start;\n\n      while (src[lineStart - 1] === '-') {\n        lineStart -= 1;\n      }\n\n      var offset = Node.endOfWhiteSpace(src, start);\n      var atLineStart = lineStart === start;\n      this.valueRange = new Range(offset);\n\n      while (!Node.atDocumentBoundary(src, offset, Char.DOCUMENT_END)) {\n        switch (src[offset]) {\n          case '\\n':\n            if (atLineStart) {\n              var blankLine = new BlankLine();\n              offset = blankLine.parse({\n                src: src\n              }, offset);\n\n              if (offset < src.length) {\n                this.contents.push(blankLine);\n              }\n            } else {\n              offset += 1;\n              atLineStart = true;\n            }\n\n            lineStart = offset;\n            break;\n\n          case '#':\n            {\n              var comment = new Comment();\n              offset = comment.parse({\n                src: src\n              }, offset);\n              this.contents.push(comment);\n              atLineStart = false;\n            }\n            break;\n\n          default:\n            {\n              var iEnd = Node.endOfIndent(src, offset);\n              var context = {\n                atLineStart: atLineStart,\n                indent: -1,\n                inFlow: false,\n                inCollection: false,\n                lineStart: lineStart,\n                parent: this\n              };\n              var node = parseNode(context, iEnd);\n              if (!node) return this.valueRange.end = iEnd; // at next document start\n\n              this.contents.push(node);\n              offset = node.range.end;\n              atLineStart = false;\n              var ec = grabCollectionEndComments(node);\n              if (ec) Array.prototype.push.apply(this.contents, ec);\n            }\n        }\n\n        offset = Document.startCommentOrEndBlankLine(src, offset);\n      }\n\n      this.valueRange.end = offset;\n\n      if (src[offset]) {\n        this.documentEndMarker = new Range(offset, offset + 3);\n        offset += 3;\n\n        if (src[offset]) {\n          offset = Node.endOfWhiteSpace(src, offset);\n\n          if (src[offset] === '#') {\n            var _comment = new Comment();\n\n            offset = _comment.parse({\n              src: src\n            }, offset);\n            this.contents.push(_comment);\n          }\n\n          switch (src[offset]) {\n            case '\\n':\n              offset += 1;\n              break;\n\n            case undefined:\n              break;\n\n            default:\n              this.error = new YAMLSyntaxError(this, 'Document end marker line cannot have a non-comment suffix');\n          }\n        }\n      }\n\n      return offset;\n    }\n    /**\n     * @param {ParseContext} context\n     * @param {number} start - Index of first character\n     * @returns {number} - Index of the character after this\n     */\n\n  }, {\n    key: \"parse\",\n    value: function parse(context, start) {\n      context.root = this;\n      this.context = context;\n      var src = context.src;\n      var offset = src.charCodeAt(start) === 0xfeff ? start + 1 : start; // skip BOM\n\n      offset = this.parseDirectives(offset);\n      offset = this.parseContents(offset);\n      return offset;\n    }\n  }, {\n    key: \"setOrigRanges\",\n    value: function setOrigRanges(cr, offset) {\n      offset = _get(_getPrototypeOf(Document.prototype), \"setOrigRanges\", this).call(this, cr, offset);\n      this.directives.forEach(function (node) {\n        offset = node.setOrigRanges(cr, offset);\n      });\n      if (this.directivesEndMarker) offset = this.directivesEndMarker.setOrigRange(cr, offset);\n      this.contents.forEach(function (node) {\n        offset = node.setOrigRanges(cr, offset);\n      });\n      if (this.documentEndMarker) offset = this.documentEndMarker.setOrigRange(cr, offset);\n      return offset;\n    }\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      var contents = this.contents,\n          directives = this.directives,\n          value = this.value;\n      if (value != null) return value;\n      var str = directives.join('');\n\n      if (contents.length > 0) {\n        if (directives.length > 0 || contents[0].type === Type.COMMENT) str += '---\\n';\n        str += contents.join('');\n      }\n\n      if (str[str.length - 1] !== '\\n') str += '\\n';\n      return str;\n    }\n  }], [{\n    key: \"startCommentOrEndBlankLine\",\n    value: function startCommentOrEndBlankLine(src, start) {\n      var offset = Node.endOfWhiteSpace(src, start);\n      var ch = src[offset];\n      return ch === '#' || ch === '\\n' ? offset : start;\n    }\n  }]);\n\n  return Document;\n}(Node);\n\nvar Alias = /*#__PURE__*/function (_Node) {\n  _inherits(Alias, _Node);\n\n  var _super = _createSuper(Alias);\n\n  function Alias() {\n    _classCallCheck(this, Alias);\n\n    return _super.apply(this, arguments);\n  }\n\n  _createClass(Alias, [{\n    key: \"parse\",\n    value:\n    /**\n     * Parses an *alias from the source\n     *\n     * @param {ParseContext} context\n     * @param {number} start - Index of first character\n     * @returns {number} - Index of the character after this scalar\n     */\n    function parse(context, start) {\n      this.context = context;\n      var src = context.src;\n      var offset = Node.endOfIdentifier(src, start + 1);\n      this.valueRange = new Range(start + 1, offset);\n      offset = Node.endOfWhiteSpace(src, offset);\n      offset = this.parseComment(offset);\n      return offset;\n    }\n  }]);\n\n  return Alias;\n}(Node);\n\nvar Chomp = {\n  CLIP: 'CLIP',\n  KEEP: 'KEEP',\n  STRIP: 'STRIP'\n};\nvar BlockValue = /*#__PURE__*/function (_Node) {\n  _inherits(BlockValue, _Node);\n\n  var _super = _createSuper(BlockValue);\n\n  function BlockValue(type, props) {\n    var _this;\n\n    _classCallCheck(this, BlockValue);\n\n    _this = _super.call(this, type, props);\n    _this.blockIndent = null;\n    _this.chomping = Chomp.CLIP;\n    _this.header = null;\n    return _this;\n  }\n\n  _createClass(BlockValue, [{\n    key: \"includesTrailingLines\",\n    get: function get() {\n      return this.chomping === Chomp.KEEP;\n    }\n  }, {\n    key: \"strValue\",\n    get: function get() {\n      if (!this.valueRange || !this.context) return null;\n      var _this$valueRange = this.valueRange,\n          start = _this$valueRange.start,\n          end = _this$valueRange.end;\n      var _this$context = this.context,\n          indent = _this$context.indent,\n          src = _this$context.src;\n      if (this.valueRange.isEmpty()) return '';\n      var lastNewLine = null;\n      var ch = src[end - 1];\n\n      while (ch === '\\n' || ch === '\\t' || ch === ' ') {\n        end -= 1;\n\n        if (end <= start) {\n          if (this.chomping === Chomp.KEEP) break;else return ''; // probably never happens\n        }\n\n        if (ch === '\\n') lastNewLine = end;\n        ch = src[end - 1];\n      }\n\n      var keepStart = end + 1;\n\n      if (lastNewLine) {\n        if (this.chomping === Chomp.KEEP) {\n          keepStart = lastNewLine;\n          end = this.valueRange.end;\n        } else {\n          end = lastNewLine;\n        }\n      }\n\n      var bi = indent + this.blockIndent;\n      var folded = this.type === Type.BLOCK_FOLDED;\n      var atStart = true;\n      var str = '';\n      var sep = '';\n      var prevMoreIndented = false;\n\n      for (var i = start; i < end; ++i) {\n        for (var j = 0; j < bi; ++j) {\n          if (src[i] !== ' ') break;\n          i += 1;\n        }\n\n        var _ch = src[i];\n\n        if (_ch === '\\n') {\n          if (sep === '\\n') str += '\\n';else sep = '\\n';\n        } else {\n          var lineEnd = Node.endOfLine(src, i);\n          var line = src.slice(i, lineEnd);\n          i = lineEnd;\n\n          if (folded && (_ch === ' ' || _ch === '\\t') && i < keepStart) {\n            if (sep === ' ') sep = '\\n';else if (!prevMoreIndented && !atStart && sep === '\\n') sep = '\\n\\n';\n            str += sep + line; //+ ((lineEnd < end && src[lineEnd]) || '')\n\n            sep = lineEnd < end && src[lineEnd] || '';\n            prevMoreIndented = true;\n          } else {\n            str += sep + line;\n            sep = folded && i < keepStart ? ' ' : '\\n';\n            prevMoreIndented = false;\n          }\n\n          if (atStart && line !== '') atStart = false;\n        }\n      }\n\n      return this.chomping === Chomp.STRIP ? str : str + '\\n';\n    }\n  }, {\n    key: \"parseBlockHeader\",\n    value: function parseBlockHeader(start) {\n      var src = this.context.src;\n      var offset = start + 1;\n      var bi = '';\n\n      while (true) {\n        var ch = src[offset];\n\n        switch (ch) {\n          case '-':\n            this.chomping = Chomp.STRIP;\n            break;\n\n          case '+':\n            this.chomping = Chomp.KEEP;\n            break;\n\n          case '0':\n          case '1':\n          case '2':\n          case '3':\n          case '4':\n          case '5':\n          case '6':\n          case '7':\n          case '8':\n          case '9':\n            bi += ch;\n            break;\n\n          default:\n            this.blockIndent = Number(bi) || null;\n            this.header = new Range(start, offset);\n            return offset;\n        }\n\n        offset += 1;\n      }\n    }\n  }, {\n    key: \"parseBlockValue\",\n    value: function parseBlockValue(start) {\n      var _this$context2 = this.context,\n          indent = _this$context2.indent,\n          src = _this$context2.src;\n      var explicit = !!this.blockIndent;\n      var offset = start;\n      var valueEnd = start;\n      var minBlockIndent = 1;\n\n      for (var ch = src[offset]; ch === '\\n'; ch = src[offset]) {\n        offset += 1;\n        if (Node.atDocumentBoundary(src, offset)) break;\n        var end = Node.endOfBlockIndent(src, indent, offset); // should not include tab?\n\n        if (end === null) break;\n        var _ch2 = src[end];\n        var lineIndent = end - (offset + indent);\n\n        if (!this.blockIndent) {\n          // no explicit block indent, none yet detected\n          if (src[end] !== '\\n') {\n            // first line with non-whitespace content\n            if (lineIndent < minBlockIndent) {\n              var msg = 'Block scalars with more-indented leading empty lines must use an explicit indentation indicator';\n              this.error = new YAMLSemanticError(this, msg);\n            }\n\n            this.blockIndent = lineIndent;\n          } else if (lineIndent > minBlockIndent) {\n            // empty line with more whitespace\n            minBlockIndent = lineIndent;\n          }\n        } else if (_ch2 && _ch2 !== '\\n' && lineIndent < this.blockIndent) {\n          if (src[end] === '#') break;\n\n          if (!this.error) {\n            var _src = explicit ? 'explicit indentation indicator' : 'first line';\n\n            var _msg = \"Block scalars must not be less indented than their \".concat(_src);\n\n            this.error = new YAMLSemanticError(this, _msg);\n          }\n        }\n\n        if (src[end] === '\\n') {\n          offset = end;\n        } else {\n          offset = valueEnd = Node.endOfLine(src, end);\n        }\n      }\n\n      if (this.chomping !== Chomp.KEEP) {\n        offset = src[valueEnd] ? valueEnd + 1 : valueEnd;\n      }\n\n      this.valueRange = new Range(start + 1, offset);\n      return offset;\n    }\n    /**\n     * Parses a block value from the source\n     *\n     * Accepted forms are:\n     * ```\n     * BS\n     * block\n     * lines\n     *\n     * BS #comment\n     * block\n     * lines\n     * ```\n     * where the block style BS matches the regexp `[|>][-+1-9]*` and block lines\n     * are empty or have an indent level greater than `indent`.\n     *\n     * @param {ParseContext} context\n     * @param {number} start - Index of first character\n     * @returns {number} - Index of the character after this block\n     */\n\n  }, {\n    key: \"parse\",\n    value: function parse(context, start) {\n      this.context = context;\n      var src = context.src;\n      var offset = this.parseBlockHeader(start);\n      offset = Node.endOfWhiteSpace(src, offset);\n      offset = this.parseComment(offset);\n      offset = this.parseBlockValue(offset);\n      return offset;\n    }\n  }, {\n    key: \"setOrigRanges\",\n    value: function setOrigRanges(cr, offset) {\n      offset = _get(_getPrototypeOf(BlockValue.prototype), \"setOrigRanges\", this).call(this, cr, offset);\n      return this.header ? this.header.setOrigRange(cr, offset) : offset;\n    }\n  }]);\n\n  return BlockValue;\n}(Node);\n\nvar FlowCollection = /*#__PURE__*/function (_Node) {\n  _inherits(FlowCollection, _Node);\n\n  var _super = _createSuper(FlowCollection);\n\n  function FlowCollection(type, props) {\n    var _this;\n\n    _classCallCheck(this, FlowCollection);\n\n    _this = _super.call(this, type, props);\n    _this.items = null;\n    return _this;\n  }\n\n  _createClass(FlowCollection, [{\n    key: \"prevNodeIsJsonLike\",\n    value: function prevNodeIsJsonLike() {\n      var idx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.items.length;\n      var node = this.items[idx - 1];\n      return !!node && (node.jsonLike || node.type === Type.COMMENT && this.prevNodeIsJsonLike(idx - 1));\n    }\n    /**\n     * @param {ParseContext} context\n     * @param {number} start - Index of first character\n     * @returns {number} - Index of the character after this\n     */\n\n  }, {\n    key: \"parse\",\n    value: function parse(context, start) {\n      this.context = context;\n      var parseNode = context.parseNode,\n          src = context.src;\n      var indent = context.indent,\n          lineStart = context.lineStart;\n      var char = src[start]; // { or [\n\n      this.items = [{\n        char: char,\n        offset: start\n      }];\n      var offset = Node.endOfWhiteSpace(src, start + 1);\n      char = src[offset];\n\n      while (char && char !== ']' && char !== '}') {\n        switch (char) {\n          case '\\n':\n            {\n              lineStart = offset + 1;\n              var wsEnd = Node.endOfWhiteSpace(src, lineStart);\n\n              if (src[wsEnd] === '\\n') {\n                var blankLine = new BlankLine();\n                lineStart = blankLine.parse({\n                  src: src\n                }, lineStart);\n                this.items.push(blankLine);\n              }\n\n              offset = Node.endOfIndent(src, lineStart);\n\n              if (offset <= lineStart + indent) {\n                char = src[offset];\n\n                if (offset < lineStart + indent || char !== ']' && char !== '}') {\n                  var msg = 'Insufficient indentation in flow collection';\n                  this.error = new YAMLSemanticError(this, msg);\n                }\n              }\n            }\n            break;\n\n          case ',':\n            {\n              this.items.push({\n                char: char,\n                offset: offset\n              });\n              offset += 1;\n            }\n            break;\n\n          case '#':\n            {\n              var comment = new Comment();\n              offset = comment.parse({\n                src: src\n              }, offset);\n              this.items.push(comment);\n            }\n            break;\n\n          case '?':\n          case ':':\n            {\n              var next = src[offset + 1];\n\n              if (next === '\\n' || next === '\\t' || next === ' ' || next === ',' || // in-flow : after JSON-like key does not need to be followed by whitespace\n              char === ':' && this.prevNodeIsJsonLike()) {\n                this.items.push({\n                  char: char,\n                  offset: offset\n                });\n                offset += 1;\n                break;\n              }\n            }\n          // fallthrough\n\n          default:\n            {\n              var node = parseNode({\n                atLineStart: false,\n                inCollection: false,\n                inFlow: true,\n                indent: -1,\n                lineStart: lineStart,\n                parent: this\n              }, offset);\n\n              if (!node) {\n                // at next document start\n                this.valueRange = new Range(start, offset);\n                return offset;\n              }\n\n              this.items.push(node);\n              offset = Node.normalizeOffset(src, node.range.end);\n            }\n        }\n\n        offset = Node.endOfWhiteSpace(src, offset);\n        char = src[offset];\n      }\n\n      this.valueRange = new Range(start, offset + 1);\n\n      if (char) {\n        this.items.push({\n          char: char,\n          offset: offset\n        });\n        offset = Node.endOfWhiteSpace(src, offset + 1);\n        offset = this.parseComment(offset);\n      }\n\n      return offset;\n    }\n  }, {\n    key: \"setOrigRanges\",\n    value: function setOrigRanges(cr, offset) {\n      offset = _get(_getPrototypeOf(FlowCollection.prototype), \"setOrigRanges\", this).call(this, cr, offset);\n      this.items.forEach(function (node) {\n        if (node instanceof Node) {\n          offset = node.setOrigRanges(cr, offset);\n        } else if (cr.length === 0) {\n          node.origOffset = node.offset;\n        } else {\n          var i = offset;\n\n          while (i < cr.length) {\n            if (cr[i] > node.offset) break;else ++i;\n          }\n\n          node.origOffset = node.offset + i;\n          offset = i;\n        }\n      });\n      return offset;\n    }\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      var src = this.context.src,\n          items = this.items,\n          range = this.range,\n          value = this.value;\n      if (value != null) return value;\n      var nodes = items.filter(function (item) {\n        return item instanceof Node;\n      });\n      var str = '';\n      var prevEnd = range.start;\n      nodes.forEach(function (node) {\n        var prefix = src.slice(prevEnd, node.range.start);\n        prevEnd = node.range.end;\n        str += prefix + String(node);\n\n        if (str[str.length - 1] === '\\n' && src[prevEnd - 1] !== '\\n' && src[prevEnd] === '\\n') {\n          // Comment range does not include the terminal newline, but its\n          // stringified value does. Without this fix, newlines at comment ends\n          // get duplicated.\n          prevEnd += 1;\n        }\n      });\n      str += src.slice(prevEnd, range.end);\n      return Node.addStringTerminator(src, range.end, str);\n    }\n  }]);\n\n  return FlowCollection;\n}(Node);\n\nvar QuoteDouble = /*#__PURE__*/function (_Node) {\n  _inherits(QuoteDouble, _Node);\n\n  var _super = _createSuper(QuoteDouble);\n\n  function QuoteDouble() {\n    _classCallCheck(this, QuoteDouble);\n\n    return _super.apply(this, arguments);\n  }\n\n  _createClass(QuoteDouble, [{\n    key: \"strValue\",\n    get:\n    /**\n     * @returns {string | { str: string, errors: YAMLSyntaxError[] }}\n     */\n    function get() {\n      if (!this.valueRange || !this.context) return null;\n      var errors = [];\n      var _this$valueRange = this.valueRange,\n          start = _this$valueRange.start,\n          end = _this$valueRange.end;\n      var _this$context = this.context,\n          indent = _this$context.indent,\n          src = _this$context.src;\n      if (src[end - 1] !== '\"') errors.push(new YAMLSyntaxError(this, 'Missing closing \"quote')); // Using String#replace is too painful with escaped newlines preceded by\n      // escaped backslashes; also, this should be faster.\n\n      var str = '';\n\n      for (var i = start + 1; i < end - 1; ++i) {\n        var ch = src[i];\n\n        if (ch === '\\n') {\n          if (Node.atDocumentBoundary(src, i + 1)) errors.push(new YAMLSemanticError(this, 'Document boundary indicators are not allowed within string values'));\n\n          var _Node$foldNewline = Node.foldNewline(src, i, indent),\n              fold = _Node$foldNewline.fold,\n              offset = _Node$foldNewline.offset,\n              error = _Node$foldNewline.error;\n\n          str += fold;\n          i = offset;\n          if (error) errors.push(new YAMLSemanticError(this, 'Multi-line double-quoted string needs to be sufficiently indented'));\n        } else if (ch === '\\\\') {\n          i += 1;\n\n          switch (src[i]) {\n            case '0':\n              str += '\\0';\n              break;\n            // null character\n\n            case 'a':\n              str += '\\x07';\n              break;\n            // bell character\n\n            case 'b':\n              str += '\\b';\n              break;\n            // backspace\n\n            case 'e':\n              str += '\\x1b';\n              break;\n            // escape character\n\n            case 'f':\n              str += '\\f';\n              break;\n            // form feed\n\n            case 'n':\n              str += '\\n';\n              break;\n            // line feed\n\n            case 'r':\n              str += '\\r';\n              break;\n            // carriage return\n\n            case 't':\n              str += '\\t';\n              break;\n            // horizontal tab\n\n            case 'v':\n              str += '\\v';\n              break;\n            // vertical tab\n\n            case 'N':\n              str += \"\\x85\";\n              break;\n            // Unicode next line\n\n            case '_':\n              str += \"\\xA0\";\n              break;\n            // Unicode non-breaking space\n\n            case 'L':\n              str += \"\\u2028\";\n              break;\n            // Unicode line separator\n\n            case 'P':\n              str += \"\\u2029\";\n              break;\n            // Unicode paragraph separator\n\n            case ' ':\n              str += ' ';\n              break;\n\n            case '\"':\n              str += '\"';\n              break;\n\n            case '/':\n              str += '/';\n              break;\n\n            case '\\\\':\n              str += '\\\\';\n              break;\n\n            case '\\t':\n              str += '\\t';\n              break;\n\n            case 'x':\n              str += this.parseCharCode(i + 1, 2, errors);\n              i += 2;\n              break;\n\n            case 'u':\n              str += this.parseCharCode(i + 1, 4, errors);\n              i += 4;\n              break;\n\n            case 'U':\n              str += this.parseCharCode(i + 1, 8, errors);\n              i += 8;\n              break;\n\n            case '\\n':\n              // skip escaped newlines, but still trim the following line\n              while (src[i + 1] === ' ' || src[i + 1] === '\\t') {\n                i += 1;\n              }\n\n              break;\n\n            default:\n              errors.push(new YAMLSyntaxError(this, \"Invalid escape sequence \".concat(src.substr(i - 1, 2))));\n              str += '\\\\' + src[i];\n          }\n        } else if (ch === ' ' || ch === '\\t') {\n          // trim trailing whitespace\n          var wsStart = i;\n          var next = src[i + 1];\n\n          while (next === ' ' || next === '\\t') {\n            i += 1;\n            next = src[i + 1];\n          }\n\n          if (next !== '\\n') str += i > wsStart ? src.slice(wsStart, i + 1) : ch;\n        } else {\n          str += ch;\n        }\n      }\n\n      return errors.length > 0 ? {\n        errors: errors,\n        str: str\n      } : str;\n    }\n  }, {\n    key: \"parseCharCode\",\n    value: function parseCharCode(offset, length, errors) {\n      var src = this.context.src;\n      var cc = src.substr(offset, length);\n      var ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);\n      var code = ok ? parseInt(cc, 16) : NaN;\n\n      if (isNaN(code)) {\n        errors.push(new YAMLSyntaxError(this, \"Invalid escape sequence \".concat(src.substr(offset - 2, length + 2))));\n        return src.substr(offset - 2, length + 2);\n      }\n\n      return String.fromCodePoint(code);\n    }\n    /**\n     * Parses a \"double quoted\" value from the source\n     *\n     * @param {ParseContext} context\n     * @param {number} start - Index of first character\n     * @returns {number} - Index of the character after this scalar\n     */\n\n  }, {\n    key: \"parse\",\n    value: function parse(context, start) {\n      this.context = context;\n      var src = context.src;\n      var offset = QuoteDouble.endOfQuote(src, start + 1);\n      this.valueRange = new Range(start, offset);\n      offset = Node.endOfWhiteSpace(src, offset);\n      offset = this.parseComment(offset);\n      return offset;\n    }\n  }], [{\n    key: \"endOfQuote\",\n    value: function endOfQuote(src, offset) {\n      var ch = src[offset];\n\n      while (ch && ch !== '\"') {\n        offset += ch === '\\\\' ? 2 : 1;\n        ch = src[offset];\n      }\n\n      return offset + 1;\n    }\n  }]);\n\n  return QuoteDouble;\n}(Node);\n\nvar QuoteSingle = /*#__PURE__*/function (_Node) {\n  _inherits(QuoteSingle, _Node);\n\n  var _super = _createSuper(QuoteSingle);\n\n  function QuoteSingle() {\n    _classCallCheck(this, QuoteSingle);\n\n    return _super.apply(this, arguments);\n  }\n\n  _createClass(QuoteSingle, [{\n    key: \"strValue\",\n    get:\n    /**\n     * @returns {string | { str: string, errors: YAMLSyntaxError[] }}\n     */\n    function get() {\n      if (!this.valueRange || !this.context) return null;\n      var errors = [];\n      var _this$valueRange = this.valueRange,\n          start = _this$valueRange.start,\n          end = _this$valueRange.end;\n      var _this$context = this.context,\n          indent = _this$context.indent,\n          src = _this$context.src;\n      if (src[end - 1] !== \"'\") errors.push(new YAMLSyntaxError(this, \"Missing closing 'quote\"));\n      var str = '';\n\n      for (var i = start + 1; i < end - 1; ++i) {\n        var ch = src[i];\n\n        if (ch === '\\n') {\n          if (Node.atDocumentBoundary(src, i + 1)) errors.push(new YAMLSemanticError(this, 'Document boundary indicators are not allowed within string values'));\n\n          var _Node$foldNewline = Node.foldNewline(src, i, indent),\n              fold = _Node$foldNewline.fold,\n              offset = _Node$foldNewline.offset,\n              error = _Node$foldNewline.error;\n\n          str += fold;\n          i = offset;\n          if (error) errors.push(new YAMLSemanticError(this, 'Multi-line single-quoted string needs to be sufficiently indented'));\n        } else if (ch === \"'\") {\n          str += ch;\n          i += 1;\n          if (src[i] !== \"'\") errors.push(new YAMLSyntaxError(this, 'Unescaped single quote? This should not happen.'));\n        } else if (ch === ' ' || ch === '\\t') {\n          // trim trailing whitespace\n          var wsStart = i;\n          var next = src[i + 1];\n\n          while (next === ' ' || next === '\\t') {\n            i += 1;\n            next = src[i + 1];\n          }\n\n          if (next !== '\\n') str += i > wsStart ? src.slice(wsStart, i + 1) : ch;\n        } else {\n          str += ch;\n        }\n      }\n\n      return errors.length > 0 ? {\n        errors: errors,\n        str: str\n      } : str;\n    }\n    /**\n     * Parses a 'single quoted' value from the source\n     *\n     * @param {ParseContext} context\n     * @param {number} start - Index of first character\n     * @returns {number} - Index of the character after this scalar\n     */\n\n  }, {\n    key: \"parse\",\n    value: function parse(context, start) {\n      this.context = context;\n      var src = context.src;\n      var offset = QuoteSingle.endOfQuote(src, start + 1);\n      this.valueRange = new Range(start, offset);\n      offset = Node.endOfWhiteSpace(src, offset);\n      offset = this.parseComment(offset);\n      return offset;\n    }\n  }], [{\n    key: \"endOfQuote\",\n    value: function endOfQuote(src, offset) {\n      var ch = src[offset];\n\n      while (ch) {\n        if (ch === \"'\") {\n          if (src[offset + 1] !== \"'\") break;\n          ch = src[offset += 2];\n        } else {\n          ch = src[offset += 1];\n        }\n      }\n\n      return offset + 1;\n    }\n  }]);\n\n  return QuoteSingle;\n}(Node);\n\nfunction createNewNode(type, props) {\n  switch (type) {\n    case Type.ALIAS:\n      return new Alias(type, props);\n\n    case Type.BLOCK_FOLDED:\n    case Type.BLOCK_LITERAL:\n      return new BlockValue(type, props);\n\n    case Type.FLOW_MAP:\n    case Type.FLOW_SEQ:\n      return new FlowCollection(type, props);\n\n    case Type.MAP_KEY:\n    case Type.MAP_VALUE:\n    case Type.SEQ_ITEM:\n      return new CollectionItem(type, props);\n\n    case Type.COMMENT:\n    case Type.PLAIN:\n      return new PlainValue(type, props);\n\n    case Type.QUOTE_DOUBLE:\n      return new QuoteDouble(type, props);\n\n    case Type.QUOTE_SINGLE:\n      return new QuoteSingle(type, props);\n\n    /* istanbul ignore next */\n\n    default:\n      return null;\n    // should never happen\n  }\n}\n/**\n * @param {boolean} atLineStart - Node starts at beginning of line\n * @param {boolean} inFlow - true if currently in a flow context\n * @param {boolean} inCollection - true if currently in a collection context\n * @param {number} indent - Current level of indentation\n * @param {number} lineStart - Start of the current line\n * @param {Node} parent - The parent of the node\n * @param {string} src - Source of the YAML document\n */\n\n\nvar ParseContext = /*#__PURE__*/function () {\n  function ParseContext() {\n    var _this = this;\n\n    var orig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n    var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n        atLineStart = _ref.atLineStart,\n        inCollection = _ref.inCollection,\n        inFlow = _ref.inFlow,\n        indent = _ref.indent,\n        lineStart = _ref.lineStart,\n        parent = _ref.parent;\n\n    _classCallCheck(this, ParseContext);\n\n    _defineProperty(this, \"parseNode\", function (overlay, start) {\n      if (Node.atDocumentBoundary(_this.src, start)) return null;\n      var context = new ParseContext(_this, overlay);\n\n      var _context$parseProps = context.parseProps(start),\n          props = _context$parseProps.props,\n          type = _context$parseProps.type,\n          valueStart = _context$parseProps.valueStart;\n\n      var node = createNewNode(type, props);\n      var offset = node.parse(context, valueStart);\n      node.range = new Range(start, offset);\n      /* istanbul ignore if */\n\n      if (offset <= start) {\n        // This should never happen, but if it does, let's make sure to at least\n        // step one character forward to avoid a busy loop.\n        node.error = new Error(\"Node#parse consumed no characters\");\n        node.error.parseEnd = offset;\n        node.error.source = node;\n        node.range.end = start + 1;\n      }\n\n      if (context.nodeStartsCollection(node)) {\n        if (!node.error && !context.atLineStart && context.parent.type === Type.DOCUMENT) {\n          node.error = new YAMLSyntaxError(node, 'Block collection must not have preceding content here (e.g. directives-end indicator)');\n        }\n\n        var collection = new Collection(node);\n        offset = collection.parse(new ParseContext(context), offset);\n        collection.range = new Range(start, offset);\n        return collection;\n      }\n\n      return node;\n    });\n\n    this.atLineStart = atLineStart != null ? atLineStart : orig.atLineStart || false;\n    this.inCollection = inCollection != null ? inCollection : orig.inCollection || false;\n    this.inFlow = inFlow != null ? inFlow : orig.inFlow || false;\n    this.indent = indent != null ? indent : orig.indent;\n    this.lineStart = lineStart != null ? lineStart : orig.lineStart;\n    this.parent = parent != null ? parent : orig.parent || {};\n    this.root = orig.root;\n    this.src = orig.src;\n  }\n\n  _createClass(ParseContext, [{\n    key: \"nodeStartsCollection\",\n    value: function nodeStartsCollection(node) {\n      var inCollection = this.inCollection,\n          inFlow = this.inFlow,\n          src = this.src;\n      if (inCollection || inFlow) return false;\n      if (node instanceof CollectionItem) return true; // check for implicit key\n\n      var offset = node.range.end;\n      if (src[offset] === '\\n' || src[offset - 1] === '\\n') return false;\n      offset = Node.endOfWhiteSpace(src, offset);\n      return src[offset] === ':';\n    } // Anchor and tag are before type, which determines the node implementation\n    // class; hence this intermediate step.\n\n  }, {\n    key: \"parseProps\",\n    value: function parseProps(offset) {\n      var inFlow = this.inFlow,\n          parent = this.parent,\n          src = this.src;\n      var props = [];\n      var lineHasProps = false;\n      offset = this.atLineStart ? Node.endOfIndent(src, offset) : Node.endOfWhiteSpace(src, offset);\n      var ch = src[offset];\n\n      while (ch === Char.ANCHOR || ch === Char.COMMENT || ch === Char.TAG || ch === '\\n') {\n        if (ch === '\\n') {\n          var inEnd = offset;\n          var lineStart = void 0;\n\n          do {\n            lineStart = inEnd + 1;\n            inEnd = Node.endOfIndent(src, lineStart);\n          } while (src[inEnd] === '\\n');\n\n          var indentDiff = inEnd - (lineStart + this.indent);\n          var noIndicatorAsIndent = parent.type === Type.SEQ_ITEM && parent.context.atLineStart;\n          if (src[inEnd] !== '#' && !Node.nextNodeIsIndented(src[inEnd], indentDiff, !noIndicatorAsIndent)) break;\n          this.atLineStart = true;\n          this.lineStart = lineStart;\n          lineHasProps = false;\n          offset = inEnd;\n        } else if (ch === Char.COMMENT) {\n          var end = Node.endOfLine(src, offset + 1);\n          props.push(new Range(offset, end));\n          offset = end;\n        } else {\n          var _end = Node.endOfIdentifier(src, offset + 1);\n\n          if (ch === Char.TAG && src[_end] === ',' && /^[a-zA-Z0-9-]+\\.[a-zA-Z0-9-]+,\\d\\d\\d\\d(-\\d\\d){0,2}\\/\\S/.test(src.slice(offset + 1, _end + 13))) {\n            // Let's presume we're dealing with a YAML 1.0 domain tag here, rather\n            // than an empty but 'foo.bar' private-tagged node in a flow collection\n            // followed without whitespace by a plain string starting with a year\n            // or date divided by something.\n            _end = Node.endOfIdentifier(src, _end + 5);\n          }\n\n          props.push(new Range(offset, _end));\n          lineHasProps = true;\n          offset = Node.endOfWhiteSpace(src, _end);\n        }\n\n        ch = src[offset];\n      } // '- &a : b' has an anchor on an empty node\n\n\n      if (lineHasProps && ch === ':' && Node.atBlank(src, offset + 1, true)) offset -= 1;\n      var type = ParseContext.parseType(src, offset, inFlow);\n      return {\n        props: props,\n        type: type,\n        valueStart: offset\n      };\n    }\n    /**\n     * Parses a node from the source\n     * @param {ParseContext} overlay\n     * @param {number} start - Index of first non-whitespace character for the node\n     * @returns {?Node} - null if at a document boundary\n     */\n\n  }], [{\n    key: \"parseType\",\n    value: function parseType(src, offset, inFlow) {\n      switch (src[offset]) {\n        case '*':\n          return Type.ALIAS;\n\n        case '>':\n          return Type.BLOCK_FOLDED;\n\n        case '|':\n          return Type.BLOCK_LITERAL;\n\n        case '{':\n          return Type.FLOW_MAP;\n\n        case '[':\n          return Type.FLOW_SEQ;\n\n        case '?':\n          return !inFlow && Node.atBlank(src, offset + 1, true) ? Type.MAP_KEY : Type.PLAIN;\n\n        case ':':\n          return !inFlow && Node.atBlank(src, offset + 1, true) ? Type.MAP_VALUE : Type.PLAIN;\n\n        case '-':\n          return !inFlow && Node.atBlank(src, offset + 1, true) ? Type.SEQ_ITEM : Type.PLAIN;\n\n        case '\"':\n          return Type.QUOTE_DOUBLE;\n\n        case \"'\":\n          return Type.QUOTE_SINGLE;\n\n        default:\n          return Type.PLAIN;\n      }\n    }\n  }]);\n\n  return ParseContext;\n}();\n\n// Published as 'yaml/parse-cst'\nfunction parse(src) {\n  var cr = [];\n\n  if (src.indexOf('\\r') !== -1) {\n    src = src.replace(/\\r\\n?/g, function (match, offset) {\n      if (match.length > 1) cr.push(offset);\n      return '\\n';\n    });\n  }\n\n  var documents = [];\n  var offset = 0;\n\n  do {\n    var doc = new Document();\n    var context = new ParseContext({\n      src: src\n    });\n    offset = doc.parse(context, offset);\n    documents.push(doc);\n  } while (offset < src.length);\n\n  documents.setOrigRanges = function () {\n    if (cr.length === 0) return false;\n\n    for (var i = 1; i < cr.length; ++i) {\n      cr[i] -= i;\n    }\n\n    var crOffset = 0;\n\n    for (var _i = 0; _i < documents.length; ++_i) {\n      crOffset = documents[_i].setOrigRanges(cr, crOffset);\n    }\n\n    cr.splice(0, cr.length);\n    return true;\n  };\n\n  documents.toString = function () {\n    return documents.join('...\\n');\n  };\n\n  return documents;\n}\n\nexport { parse };\n","import { c as _classCallCheck, j as _inherits, k as _createSuper, b as _createClass, e as _defineProperty, p as _assertThisInitialized, a as _typeof, q as _toArray, T as Type, _ as _createForOfIteratorHelper, l as _get, m as _getPrototypeOf, o as YAMLReferenceError, r as _possibleConstructorReturn, h as _slicedToArray, g as YAMLSemanticError, n as defaultTags, f as YAMLWarning, C as Char, Y as YAMLSyntaxError, P as PlainValue } from './PlainValue-b8036b75.js';\n\nfunction addCommentBefore(str, indent, comment) {\n  if (!comment) return str;\n  var cc = comment.replace(/[\\s\\S]^/gm, \"$&\".concat(indent, \"#\"));\n  return \"#\".concat(cc, \"\\n\").concat(indent).concat(str);\n}\nfunction addComment(str, indent, comment) {\n  return !comment ? str : comment.indexOf('\\n') === -1 ? \"\".concat(str, \" #\").concat(comment) : \"\".concat(str, \"\\n\") + comment.replace(/^/gm, \"\".concat(indent || '', \"#\"));\n}\n\nvar Node = function Node() {\n  _classCallCheck(this, Node);\n};\n\nfunction toJSON(value, arg, ctx) {\n  if (Array.isArray(value)) return value.map(function (v, i) {\n    return toJSON(v, String(i), ctx);\n  });\n\n  if (value && typeof value.toJSON === 'function') {\n    var anchor = ctx && ctx.anchors && ctx.anchors.get(value);\n    if (anchor) ctx.onCreate = function (res) {\n      anchor.res = res;\n      delete ctx.onCreate;\n    };\n    var res = value.toJSON(arg, ctx);\n    if (anchor && ctx.onCreate) ctx.onCreate(res);\n    return res;\n  }\n\n  if ((!ctx || !ctx.keep) && typeof value === 'bigint') return Number(value);\n  return value;\n}\n\nvar Scalar = /*#__PURE__*/function (_Node) {\n  _inherits(Scalar, _Node);\n\n  var _super = _createSuper(Scalar);\n\n  function Scalar(value) {\n    var _this;\n\n    _classCallCheck(this, Scalar);\n\n    _this = _super.call(this);\n    _this.value = value;\n    return _this;\n  }\n\n  _createClass(Scalar, [{\n    key: \"toJSON\",\n    value: function toJSON$1(arg, ctx) {\n      return ctx && ctx.keep ? this.value : toJSON(this.value, arg, ctx);\n    }\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      return String(this.value);\n    }\n  }]);\n\n  return Scalar;\n}(Node);\n\nfunction collectionFromPath(schema, path, value) {\n  var v = value;\n\n  for (var i = path.length - 1; i >= 0; --i) {\n    var k = path[i];\n\n    if (Number.isInteger(k) && k >= 0) {\n      var a = [];\n      a[k] = v;\n      v = a;\n    } else {\n      var o = {};\n      Object.defineProperty(o, k, {\n        value: v,\n        writable: true,\n        enumerable: true,\n        configurable: true\n      });\n      v = o;\n    }\n  }\n\n  return schema.createNode(v, false);\n} // null, undefined, or an empty non-string iterable (e.g. [])\n\n\nvar isEmptyPath = function isEmptyPath(path) {\n  return path == null || _typeof(path) === 'object' && path[Symbol.iterator]().next().done;\n};\nvar Collection = /*#__PURE__*/function (_Node) {\n  _inherits(Collection, _Node);\n\n  var _super = _createSuper(Collection);\n\n  function Collection(schema) {\n    var _this;\n\n    _classCallCheck(this, Collection);\n\n    _this = _super.call(this);\n\n    _defineProperty(_assertThisInitialized(_this), \"items\", []);\n\n    _this.schema = schema;\n    return _this;\n  }\n\n  _createClass(Collection, [{\n    key: \"addIn\",\n    value: function addIn(path, value) {\n      if (isEmptyPath(path)) this.add(value);else {\n        var _path = _toArray(path),\n            key = _path[0],\n            rest = _path.slice(1);\n\n        var node = this.get(key, true);\n        if (node instanceof Collection) node.addIn(rest, value);else if (node === undefined && this.schema) this.set(key, collectionFromPath(this.schema, rest, value));else throw new Error(\"Expected YAML collection at \".concat(key, \". Remaining path: \").concat(rest));\n      }\n    }\n  }, {\n    key: \"deleteIn\",\n    value: function deleteIn(_ref) {\n      var _ref2 = _toArray(_ref),\n          key = _ref2[0],\n          rest = _ref2.slice(1);\n\n      if (rest.length === 0) return this.delete(key);\n      var node = this.get(key, true);\n      if (node instanceof Collection) return node.deleteIn(rest);else throw new Error(\"Expected YAML collection at \".concat(key, \". Remaining path: \").concat(rest));\n    }\n  }, {\n    key: \"getIn\",\n    value: function getIn(_ref3, keepScalar) {\n      var _ref4 = _toArray(_ref3),\n          key = _ref4[0],\n          rest = _ref4.slice(1);\n\n      var node = this.get(key, true);\n      if (rest.length === 0) return !keepScalar && node instanceof Scalar ? node.value : node;else return node instanceof Collection ? node.getIn(rest, keepScalar) : undefined;\n    }\n  }, {\n    key: \"hasAllNullValues\",\n    value: function hasAllNullValues() {\n      return this.items.every(function (node) {\n        if (!node || node.type !== 'PAIR') return false;\n        var n = node.value;\n        return n == null || n instanceof Scalar && n.value == null && !n.commentBefore && !n.comment && !n.tag;\n      });\n    }\n  }, {\n    key: \"hasIn\",\n    value: function hasIn(_ref5) {\n      var _ref6 = _toArray(_ref5),\n          key = _ref6[0],\n          rest = _ref6.slice(1);\n\n      if (rest.length === 0) return this.has(key);\n      var node = this.get(key, true);\n      return node instanceof Collection ? node.hasIn(rest) : false;\n    }\n  }, {\n    key: \"setIn\",\n    value: function setIn(_ref7, value) {\n      var _ref8 = _toArray(_ref7),\n          key = _ref8[0],\n          rest = _ref8.slice(1);\n\n      if (rest.length === 0) {\n        this.set(key, value);\n      } else {\n        var node = this.get(key, true);\n        if (node instanceof Collection) node.setIn(rest, value);else if (node === undefined && this.schema) this.set(key, collectionFromPath(this.schema, rest, value));else throw new Error(\"Expected YAML collection at \".concat(key, \". Remaining path: \").concat(rest));\n      }\n    } // overridden in implementations\n\n    /* istanbul ignore next */\n\n  }, {\n    key: \"toJSON\",\n    value: function toJSON() {\n      return null;\n    }\n  }, {\n    key: \"toString\",\n    value: function toString(ctx, _ref9, onComment, onChompKeep) {\n      var _this2 = this;\n\n      var blockItem = _ref9.blockItem,\n          flowChars = _ref9.flowChars,\n          isMap = _ref9.isMap,\n          itemIndent = _ref9.itemIndent;\n      var _ctx = ctx,\n          indent = _ctx.indent,\n          indentStep = _ctx.indentStep,\n          stringify = _ctx.stringify;\n      var inFlow = this.type === Type.FLOW_MAP || this.type === Type.FLOW_SEQ || ctx.inFlow;\n      if (inFlow) itemIndent += indentStep;\n      var allNullValues = isMap && this.hasAllNullValues();\n      ctx = Object.assign({}, ctx, {\n        allNullValues: allNullValues,\n        indent: itemIndent,\n        inFlow: inFlow,\n        type: null\n      });\n      var chompKeep = false;\n      var hasItemWithNewLine = false;\n      var nodes = this.items.reduce(function (nodes, item, i) {\n        var comment;\n\n        if (item) {\n          if (!chompKeep && item.spaceBefore) nodes.push({\n            type: 'comment',\n            str: ''\n          });\n          if (item.commentBefore) item.commentBefore.match(/^.*$/gm).forEach(function (line) {\n            nodes.push({\n              type: 'comment',\n              str: \"#\".concat(line)\n            });\n          });\n          if (item.comment) comment = item.comment;\n          if (inFlow && (!chompKeep && item.spaceBefore || item.commentBefore || item.comment || item.key && (item.key.commentBefore || item.key.comment) || item.value && (item.value.commentBefore || item.value.comment))) hasItemWithNewLine = true;\n        }\n\n        chompKeep = false;\n        var str = stringify(item, ctx, function () {\n          return comment = null;\n        }, function () {\n          return chompKeep = true;\n        });\n        if (inFlow && !hasItemWithNewLine && str.includes('\\n')) hasItemWithNewLine = true;\n        if (inFlow && i < _this2.items.length - 1) str += ',';\n        str = addComment(str, itemIndent, comment);\n        if (chompKeep && (comment || inFlow)) chompKeep = false;\n        nodes.push({\n          type: 'item',\n          str: str\n        });\n        return nodes;\n      }, []);\n      var str;\n\n      if (nodes.length === 0) {\n        str = flowChars.start + flowChars.end;\n      } else if (inFlow) {\n        var start = flowChars.start,\n            end = flowChars.end;\n        var strings = nodes.map(function (n) {\n          return n.str;\n        });\n\n        if (hasItemWithNewLine || strings.reduce(function (sum, str) {\n          return sum + str.length + 2;\n        }, 2) > Collection.maxFlowStringSingleLineLength) {\n          str = start;\n\n          var _iterator = _createForOfIteratorHelper(strings),\n              _step;\n\n          try {\n            for (_iterator.s(); !(_step = _iterator.n()).done;) {\n              var s = _step.value;\n              str += s ? \"\\n\".concat(indentStep).concat(indent).concat(s) : '\\n';\n            }\n          } catch (err) {\n            _iterator.e(err);\n          } finally {\n            _iterator.f();\n          }\n\n          str += \"\\n\".concat(indent).concat(end);\n        } else {\n          str = \"\".concat(start, \" \").concat(strings.join(' '), \" \").concat(end);\n        }\n      } else {\n        var _strings = nodes.map(blockItem);\n\n        str = _strings.shift();\n\n        var _iterator2 = _createForOfIteratorHelper(_strings),\n            _step2;\n\n        try {\n          for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n            var _s = _step2.value;\n            str += _s ? \"\\n\".concat(indent).concat(_s) : '\\n';\n          }\n        } catch (err) {\n          _iterator2.e(err);\n        } finally {\n          _iterator2.f();\n        }\n      }\n\n      if (this.comment) {\n        str += '\\n' + this.comment.replace(/^/gm, \"\".concat(indent, \"#\"));\n        if (onComment) onComment();\n      } else if (chompKeep && onChompKeep) onChompKeep();\n\n      return str;\n    }\n  }]);\n\n  return Collection;\n}(Node);\n\n_defineProperty(Collection, \"maxFlowStringSingleLineLength\", 60);\n\nfunction asItemIndex(key) {\n  var idx = key instanceof Scalar ? key.value : key;\n  if (idx && typeof idx === 'string') idx = Number(idx);\n  return Number.isInteger(idx) && idx >= 0 ? idx : null;\n}\n\nvar YAMLSeq = /*#__PURE__*/function (_Collection) {\n  _inherits(YAMLSeq, _Collection);\n\n  var _super = _createSuper(YAMLSeq);\n\n  function YAMLSeq() {\n    _classCallCheck(this, YAMLSeq);\n\n    return _super.apply(this, arguments);\n  }\n\n  _createClass(YAMLSeq, [{\n    key: \"add\",\n    value: function add(value) {\n      this.items.push(value);\n    }\n  }, {\n    key: \"delete\",\n    value: function _delete(key) {\n      var idx = asItemIndex(key);\n      if (typeof idx !== 'number') return false;\n      var del = this.items.splice(idx, 1);\n      return del.length > 0;\n    }\n  }, {\n    key: \"get\",\n    value: function get(key, keepScalar) {\n      var idx = asItemIndex(key);\n      if (typeof idx !== 'number') return undefined;\n      var it = this.items[idx];\n      return !keepScalar && it instanceof Scalar ? it.value : it;\n    }\n  }, {\n    key: \"has\",\n    value: function has(key) {\n      var idx = asItemIndex(key);\n      return typeof idx === 'number' && idx < this.items.length;\n    }\n  }, {\n    key: \"set\",\n    value: function set(key, value) {\n      var idx = asItemIndex(key);\n      if (typeof idx !== 'number') throw new Error(\"Expected a valid index, not \".concat(key, \".\"));\n      this.items[idx] = value;\n    }\n  }, {\n    key: \"toJSON\",\n    value: function toJSON$1(_, ctx) {\n      var seq = [];\n      if (ctx && ctx.onCreate) ctx.onCreate(seq);\n      var i = 0;\n\n      var _iterator = _createForOfIteratorHelper(this.items),\n          _step;\n\n      try {\n        for (_iterator.s(); !(_step = _iterator.n()).done;) {\n          var item = _step.value;\n          seq.push(toJSON(item, String(i++), ctx));\n        }\n      } catch (err) {\n        _iterator.e(err);\n      } finally {\n        _iterator.f();\n      }\n\n      return seq;\n    }\n  }, {\n    key: \"toString\",\n    value: function toString(ctx, onComment, onChompKeep) {\n      if (!ctx) return JSON.stringify(this);\n      return _get(_getPrototypeOf(YAMLSeq.prototype), \"toString\", this).call(this, ctx, {\n        blockItem: function blockItem(n) {\n          return n.type === 'comment' ? n.str : \"- \".concat(n.str);\n        },\n        flowChars: {\n          start: '[',\n          end: ']'\n        },\n        isMap: false,\n        itemIndent: (ctx.indent || '') + '  '\n      }, onComment, onChompKeep);\n    }\n  }]);\n\n  return YAMLSeq;\n}(Collection);\n\nvar stringifyKey = function stringifyKey(key, jsKey, ctx) {\n  if (jsKey === null) return '';\n  if (_typeof(jsKey) !== 'object') return String(jsKey);\n  if (key instanceof Node && ctx && ctx.doc) return key.toString({\n    anchors: Object.create(null),\n    doc: ctx.doc,\n    indent: '',\n    indentStep: ctx.indentStep,\n    inFlow: true,\n    inStringifyKey: true,\n    stringify: ctx.stringify\n  });\n  return JSON.stringify(jsKey);\n};\n\nvar Pair = /*#__PURE__*/function (_Node) {\n  _inherits(Pair, _Node);\n\n  var _super = _createSuper(Pair);\n\n  function Pair(key) {\n    var _this;\n\n    var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n    _classCallCheck(this, Pair);\n\n    _this = _super.call(this);\n    _this.key = key;\n    _this.value = value;\n    _this.type = Pair.Type.PAIR;\n    return _this;\n  }\n\n  _createClass(Pair, [{\n    key: \"commentBefore\",\n    get: function get() {\n      return this.key instanceof Node ? this.key.commentBefore : undefined;\n    },\n    set: function set(cb) {\n      if (this.key == null) this.key = new Scalar(null);\n      if (this.key instanceof Node) this.key.commentBefore = cb;else {\n        var msg = 'Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.';\n        throw new Error(msg);\n      }\n    }\n  }, {\n    key: \"addToJSMap\",\n    value: function addToJSMap(ctx, map) {\n      var key = toJSON(this.key, '', ctx);\n\n      if (map instanceof Map) {\n        var value = toJSON(this.value, key, ctx);\n        map.set(key, value);\n      } else if (map instanceof Set) {\n        map.add(key);\n      } else {\n        var stringKey = stringifyKey(this.key, key, ctx);\n\n        var _value = toJSON(this.value, stringKey, ctx);\n\n        if (stringKey in map) Object.defineProperty(map, stringKey, {\n          value: _value,\n          writable: true,\n          enumerable: true,\n          configurable: true\n        });else map[stringKey] = _value;\n      }\n\n      return map;\n    }\n  }, {\n    key: \"toJSON\",\n    value: function toJSON(_, ctx) {\n      var pair = ctx && ctx.mapAsMap ? new Map() : {};\n      return this.addToJSMap(ctx, pair);\n    }\n  }, {\n    key: \"toString\",\n    value: function toString(ctx, onComment, onChompKeep) {\n      if (!ctx || !ctx.doc) return JSON.stringify(this);\n      var _ctx$doc$options = ctx.doc.options,\n          indentSize = _ctx$doc$options.indent,\n          indentSeq = _ctx$doc$options.indentSeq,\n          simpleKeys = _ctx$doc$options.simpleKeys;\n      var key = this.key,\n          value = this.value;\n      var keyComment = key instanceof Node && key.comment;\n\n      if (simpleKeys) {\n        if (keyComment) {\n          throw new Error('With simple keys, key nodes cannot have comments');\n        }\n\n        if (key instanceof Collection) {\n          var msg = 'With simple keys, collection cannot be used as a key value';\n          throw new Error(msg);\n        }\n      }\n\n      var explicitKey = !simpleKeys && (!key || keyComment || (key instanceof Node ? key instanceof Collection || key.type === Type.BLOCK_FOLDED || key.type === Type.BLOCK_LITERAL : _typeof(key) === 'object'));\n      var _ctx = ctx,\n          doc = _ctx.doc,\n          indent = _ctx.indent,\n          indentStep = _ctx.indentStep,\n          stringify = _ctx.stringify;\n      ctx = Object.assign({}, ctx, {\n        implicitKey: !explicitKey,\n        indent: indent + indentStep\n      });\n      var chompKeep = false;\n      var str = stringify(key, ctx, function () {\n        return keyComment = null;\n      }, function () {\n        return chompKeep = true;\n      });\n      str = addComment(str, ctx.indent, keyComment);\n\n      if (!explicitKey && str.length > 1024) {\n        if (simpleKeys) throw new Error('With simple keys, single line scalar must not span more than 1024 characters');\n        explicitKey = true;\n      }\n\n      if (ctx.allNullValues && !simpleKeys) {\n        if (this.comment) {\n          str = addComment(str, ctx.indent, this.comment);\n          if (onComment) onComment();\n        } else if (chompKeep && !keyComment && onChompKeep) onChompKeep();\n\n        return ctx.inFlow && !explicitKey ? str : \"? \".concat(str);\n      }\n\n      str = explicitKey ? \"? \".concat(str, \"\\n\").concat(indent, \":\") : \"\".concat(str, \":\");\n\n      if (this.comment) {\n        // expected (but not strictly required) to be a single-line comment\n        str = addComment(str, ctx.indent, this.comment);\n        if (onComment) onComment();\n      }\n\n      var vcb = '';\n      var valueComment = null;\n\n      if (value instanceof Node) {\n        if (value.spaceBefore) vcb = '\\n';\n\n        if (value.commentBefore) {\n          var cs = value.commentBefore.replace(/^/gm, \"\".concat(ctx.indent, \"#\"));\n          vcb += \"\\n\".concat(cs);\n        }\n\n        valueComment = value.comment;\n      } else if (value && _typeof(value) === 'object') {\n        value = doc.schema.createNode(value, true);\n      }\n\n      ctx.implicitKey = false;\n      if (!explicitKey && !this.comment && value instanceof Scalar) ctx.indentAtStart = str.length + 1;\n      chompKeep = false;\n\n      if (!indentSeq && indentSize >= 2 && !ctx.inFlow && !explicitKey && value instanceof YAMLSeq && value.type !== Type.FLOW_SEQ && !value.tag && !doc.anchors.getName(value)) {\n        // If indentSeq === false, consider '- ' as part of indentation where possible\n        ctx.indent = ctx.indent.substr(2);\n      }\n\n      var valueStr = stringify(value, ctx, function () {\n        return valueComment = null;\n      }, function () {\n        return chompKeep = true;\n      });\n      var ws = ' ';\n\n      if (vcb || this.comment) {\n        ws = \"\".concat(vcb, \"\\n\").concat(ctx.indent);\n      } else if (!explicitKey && value instanceof Collection) {\n        var flow = valueStr[0] === '[' || valueStr[0] === '{';\n        if (!flow || valueStr.includes('\\n')) ws = \"\\n\".concat(ctx.indent);\n      } else if (valueStr[0] === '\\n') ws = '';\n\n      if (chompKeep && !valueComment && onChompKeep) onChompKeep();\n      return addComment(str + ws + valueStr, ctx.indent, valueComment);\n    }\n  }]);\n\n  return Pair;\n}(Node);\n\n_defineProperty(Pair, \"Type\", {\n  PAIR: 'PAIR',\n  MERGE_PAIR: 'MERGE_PAIR'\n});\n\nvar getAliasCount = function getAliasCount(node, anchors) {\n  if (node instanceof Alias) {\n    var anchor = anchors.get(node.source);\n    return anchor.count * anchor.aliasCount;\n  } else if (node instanceof Collection) {\n    var count = 0;\n\n    var _iterator = _createForOfIteratorHelper(node.items),\n        _step;\n\n    try {\n      for (_iterator.s(); !(_step = _iterator.n()).done;) {\n        var item = _step.value;\n        var c = getAliasCount(item, anchors);\n        if (c > count) count = c;\n      }\n    } catch (err) {\n      _iterator.e(err);\n    } finally {\n      _iterator.f();\n    }\n\n    return count;\n  } else if (node instanceof Pair) {\n    var kc = getAliasCount(node.key, anchors);\n    var vc = getAliasCount(node.value, anchors);\n    return Math.max(kc, vc);\n  }\n\n  return 1;\n};\n\nvar Alias = /*#__PURE__*/function (_Node) {\n  _inherits(Alias, _Node);\n\n  var _super = _createSuper(Alias);\n\n  function Alias(source) {\n    var _this;\n\n    _classCallCheck(this, Alias);\n\n    _this = _super.call(this);\n    _this.source = source;\n    _this.type = Type.ALIAS;\n    return _this;\n  }\n\n  _createClass(Alias, [{\n    key: \"tag\",\n    set: function set(t) {\n      throw new Error('Alias nodes cannot have tags');\n    }\n  }, {\n    key: \"toJSON\",\n    value: function toJSON$1(arg, ctx) {\n      if (!ctx) return toJSON(this.source, arg, ctx);\n      var anchors = ctx.anchors,\n          maxAliasCount = ctx.maxAliasCount;\n      var anchor = anchors.get(this.source);\n      /* istanbul ignore if */\n\n      if (!anchor || anchor.res === undefined) {\n        var msg = 'This should not happen: Alias anchor was not resolved?';\n        if (this.cstNode) throw new YAMLReferenceError(this.cstNode, msg);else throw new ReferenceError(msg);\n      }\n\n      if (maxAliasCount >= 0) {\n        anchor.count += 1;\n        if (anchor.aliasCount === 0) anchor.aliasCount = getAliasCount(this.source, anchors);\n\n        if (anchor.count * anchor.aliasCount > maxAliasCount) {\n          var _msg = 'Excessive alias count indicates a resource exhaustion attack';\n          if (this.cstNode) throw new YAMLReferenceError(this.cstNode, _msg);else throw new ReferenceError(_msg);\n        }\n      }\n\n      return anchor.res;\n    } // Only called when stringifying an alias mapping key while constructing\n    // Object output.\n\n  }, {\n    key: \"toString\",\n    value: function toString(ctx) {\n      return Alias.stringify(this, ctx);\n    }\n  }], [{\n    key: \"stringify\",\n    value: function stringify(_ref, _ref2) {\n      var range = _ref.range,\n          source = _ref.source;\n      var anchors = _ref2.anchors,\n          doc = _ref2.doc,\n          implicitKey = _ref2.implicitKey,\n          inStringifyKey = _ref2.inStringifyKey;\n      var anchor = Object.keys(anchors).find(function (a) {\n        return anchors[a] === source;\n      });\n      if (!anchor && inStringifyKey) anchor = doc.anchors.getName(source) || doc.anchors.newName();\n      if (anchor) return \"*\".concat(anchor).concat(implicitKey ? ' ' : '');\n      var msg = doc.anchors.getName(source) ? 'Alias node must be after source node' : 'Source node not found for alias node';\n      throw new Error(\"\".concat(msg, \" [\").concat(range, \"]\"));\n    }\n  }]);\n\n  return Alias;\n}(Node);\n\n_defineProperty(Alias, \"default\", true);\n\nfunction findPair(items, key) {\n  var k = key instanceof Scalar ? key.value : key;\n\n  var _iterator = _createForOfIteratorHelper(items),\n      _step;\n\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var it = _step.value;\n\n      if (it instanceof Pair) {\n        if (it.key === key || it.key === k) return it;\n        if (it.key && it.key.value === k) return it;\n      }\n    }\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n\n  return undefined;\n}\nvar YAMLMap = /*#__PURE__*/function (_Collection) {\n  _inherits(YAMLMap, _Collection);\n\n  var _super = _createSuper(YAMLMap);\n\n  function YAMLMap() {\n    _classCallCheck(this, YAMLMap);\n\n    return _super.apply(this, arguments);\n  }\n\n  _createClass(YAMLMap, [{\n    key: \"add\",\n    value: function add(pair, overwrite) {\n      if (!pair) pair = new Pair(pair);else if (!(pair instanceof Pair)) pair = new Pair(pair.key || pair, pair.value);\n      var prev = findPair(this.items, pair.key);\n      var sortEntries = this.schema && this.schema.sortMapEntries;\n\n      if (prev) {\n        if (overwrite) prev.value = pair.value;else throw new Error(\"Key \".concat(pair.key, \" already set\"));\n      } else if (sortEntries) {\n        var i = this.items.findIndex(function (item) {\n          return sortEntries(pair, item) < 0;\n        });\n        if (i === -1) this.items.push(pair);else this.items.splice(i, 0, pair);\n      } else {\n        this.items.push(pair);\n      }\n    }\n  }, {\n    key: \"delete\",\n    value: function _delete(key) {\n      var it = findPair(this.items, key);\n      if (!it) return false;\n      var del = this.items.splice(this.items.indexOf(it), 1);\n      return del.length > 0;\n    }\n  }, {\n    key: \"get\",\n    value: function get(key, keepScalar) {\n      var it = findPair(this.items, key);\n      var node = it && it.value;\n      return !keepScalar && node instanceof Scalar ? node.value : node;\n    }\n  }, {\n    key: \"has\",\n    value: function has(key) {\n      return !!findPair(this.items, key);\n    }\n  }, {\n    key: \"set\",\n    value: function set(key, value) {\n      this.add(new Pair(key, value), true);\n    }\n    /**\n     * @param {*} arg ignored\n     * @param {*} ctx Conversion context, originally set in Document#toJSON()\n     * @param {Class} Type If set, forces the returned collection type\n     * @returns {*} Instance of Type, Map, or Object\n     */\n\n  }, {\n    key: \"toJSON\",\n    value: function toJSON(_, ctx, Type) {\n      var map = Type ? new Type() : ctx && ctx.mapAsMap ? new Map() : {};\n      if (ctx && ctx.onCreate) ctx.onCreate(map);\n\n      var _iterator2 = _createForOfIteratorHelper(this.items),\n          _step2;\n\n      try {\n        for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n          var item = _step2.value;\n          item.addToJSMap(ctx, map);\n        }\n      } catch (err) {\n        _iterator2.e(err);\n      } finally {\n        _iterator2.f();\n      }\n\n      return map;\n    }\n  }, {\n    key: \"toString\",\n    value: function toString(ctx, onComment, onChompKeep) {\n      if (!ctx) return JSON.stringify(this);\n\n      var _iterator3 = _createForOfIteratorHelper(this.items),\n          _step3;\n\n      try {\n        for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n          var item = _step3.value;\n          if (!(item instanceof Pair)) throw new Error(\"Map items must all be pairs; found \".concat(JSON.stringify(item), \" instead\"));\n        }\n      } catch (err) {\n        _iterator3.e(err);\n      } finally {\n        _iterator3.f();\n      }\n\n      return _get(_getPrototypeOf(YAMLMap.prototype), \"toString\", this).call(this, ctx, {\n        blockItem: function blockItem(n) {\n          return n.str;\n        },\n        flowChars: {\n          start: '{',\n          end: '}'\n        },\n        isMap: true,\n        itemIndent: ctx.indent || ''\n      }, onComment, onChompKeep);\n    }\n  }]);\n\n  return YAMLMap;\n}(Collection);\n\nvar MERGE_KEY = '<<';\nvar Merge = /*#__PURE__*/function (_Pair) {\n  _inherits(Merge, _Pair);\n\n  var _super = _createSuper(Merge);\n\n  function Merge(pair) {\n    var _this;\n\n    _classCallCheck(this, Merge);\n\n    if (pair instanceof Pair) {\n      var seq = pair.value;\n\n      if (!(seq instanceof YAMLSeq)) {\n        seq = new YAMLSeq();\n        seq.items.push(pair.value);\n        seq.range = pair.value.range;\n      }\n\n      _this = _super.call(this, pair.key, seq);\n      _this.range = pair.range;\n    } else {\n      _this = _super.call(this, new Scalar(MERGE_KEY), new YAMLSeq());\n    }\n\n    _this.type = Pair.Type.MERGE_PAIR;\n    return _possibleConstructorReturn(_this);\n  } // If the value associated with a merge key is a single mapping node, each of\n  // its key/value pairs is inserted into the current mapping, unless the key\n  // already exists in it. If the value associated with the merge key is a\n  // sequence, then this sequence is expected to contain mapping nodes and each\n  // of these nodes is merged in turn according to its order in the sequence.\n  // Keys in mapping nodes earlier in the sequence override keys specified in\n  // later mapping nodes. -- http://yaml.org/type/merge.html\n\n\n  _createClass(Merge, [{\n    key: \"addToJSMap\",\n    value: function addToJSMap(ctx, map) {\n      var _iterator = _createForOfIteratorHelper(this.value.items),\n          _step;\n\n      try {\n        for (_iterator.s(); !(_step = _iterator.n()).done;) {\n          var source = _step.value.source;\n          if (!(source instanceof YAMLMap)) throw new Error('Merge sources must be maps');\n          var srcMap = source.toJSON(null, ctx, Map);\n\n          var _iterator2 = _createForOfIteratorHelper(srcMap),\n              _step2;\n\n          try {\n            for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n              var _step2$value = _slicedToArray(_step2.value, 2),\n                  key = _step2$value[0],\n                  value = _step2$value[1];\n\n              if (map instanceof Map) {\n                if (!map.has(key)) map.set(key, value);\n              } else if (map instanceof Set) {\n                map.add(key);\n              } else if (!Object.prototype.hasOwnProperty.call(map, key)) {\n                Object.defineProperty(map, key, {\n                  value: value,\n                  writable: true,\n                  enumerable: true,\n                  configurable: true\n                });\n              }\n            }\n          } catch (err) {\n            _iterator2.e(err);\n          } finally {\n            _iterator2.f();\n          }\n        }\n      } catch (err) {\n        _iterator.e(err);\n      } finally {\n        _iterator.f();\n      }\n\n      return map;\n    }\n  }, {\n    key: \"toString\",\n    value: function toString(ctx, onComment) {\n      var seq = this.value;\n      if (seq.items.length > 1) return _get(_getPrototypeOf(Merge.prototype), \"toString\", this).call(this, ctx, onComment);\n      this.value = seq.items[0];\n\n      var str = _get(_getPrototypeOf(Merge.prototype), \"toString\", this).call(this, ctx, onComment);\n\n      this.value = seq;\n      return str;\n    }\n  }]);\n\n  return Merge;\n}(Pair);\n\nvar binaryOptions = {\n  defaultType: Type.BLOCK_LITERAL,\n  lineWidth: 76\n};\nvar boolOptions = {\n  trueStr: 'true',\n  falseStr: 'false'\n};\nvar intOptions = {\n  asBigInt: false\n};\nvar nullOptions = {\n  nullStr: 'null'\n};\nvar strOptions = {\n  defaultType: Type.PLAIN,\n  doubleQuoted: {\n    jsonEncoding: false,\n    minMultiLineLength: 40\n  },\n  fold: {\n    lineWidth: 80,\n    minContentWidth: 20\n  }\n};\n\nfunction resolveScalar(str, tags, scalarFallback) {\n  var _iterator = _createForOfIteratorHelper(tags),\n      _step;\n\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var _step$value = _step.value,\n          format = _step$value.format,\n          test = _step$value.test,\n          resolve = _step$value.resolve;\n\n      if (test) {\n        var match = str.match(test);\n\n        if (match) {\n          var res = resolve.apply(null, match);\n          if (!(res instanceof Scalar)) res = new Scalar(res);\n          if (format) res.format = format;\n          return res;\n        }\n      }\n    }\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n\n  if (scalarFallback) str = scalarFallback(str);\n  return new Scalar(str);\n}\n\nvar FOLD_FLOW = 'flow';\nvar FOLD_BLOCK = 'block';\nvar FOLD_QUOTED = 'quoted'; // presumes i+1 is at the start of a line\n// returns index of last newline in more-indented block\n\nvar consumeMoreIndentedLines = function consumeMoreIndentedLines(text, i) {\n  var ch = text[i + 1];\n\n  while (ch === ' ' || ch === '\\t') {\n    do {\n      ch = text[i += 1];\n    } while (ch && ch !== '\\n');\n\n    ch = text[i + 1];\n  }\n\n  return i;\n};\n/**\n * Tries to keep input at up to `lineWidth` characters, splitting only on spaces\n * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are\n * terminated with `\\n` and started with `indent`.\n *\n * @param {string} text\n * @param {string} indent\n * @param {string} [mode='flow'] `'block'` prevents more-indented lines\n *   from being folded; `'quoted'` allows for `\\` escapes, including escaped\n *   newlines\n * @param {Object} options\n * @param {number} [options.indentAtStart] Accounts for leading contents on\n *   the first line, defaulting to `indent.length`\n * @param {number} [options.lineWidth=80]\n * @param {number} [options.minContentWidth=20] Allow highly indented lines to\n *   stretch the line width or indent content from the start\n * @param {function} options.onFold Called once if the text is folded\n * @param {function} options.onFold Called once if any line of text exceeds\n *   lineWidth characters\n */\n\n\nfunction foldFlowLines(text, indent, mode, _ref) {\n  var indentAtStart = _ref.indentAtStart,\n      _ref$lineWidth = _ref.lineWidth,\n      lineWidth = _ref$lineWidth === void 0 ? 80 : _ref$lineWidth,\n      _ref$minContentWidth = _ref.minContentWidth,\n      minContentWidth = _ref$minContentWidth === void 0 ? 20 : _ref$minContentWidth,\n      onFold = _ref.onFold,\n      onOverflow = _ref.onOverflow;\n  if (!lineWidth || lineWidth < 0) return text;\n  var endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);\n  if (text.length <= endStep) return text;\n  var folds = [];\n  var escapedFolds = {};\n  var end = lineWidth - indent.length;\n\n  if (typeof indentAtStart === 'number') {\n    if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) folds.push(0);else end = lineWidth - indentAtStart;\n  }\n\n  var split = undefined;\n  var prev = undefined;\n  var overflow = false;\n  var i = -1;\n  var escStart = -1;\n  var escEnd = -1;\n\n  if (mode === FOLD_BLOCK) {\n    i = consumeMoreIndentedLines(text, i);\n    if (i !== -1) end = i + endStep;\n  }\n\n  for (var ch; ch = text[i += 1];) {\n    if (mode === FOLD_QUOTED && ch === '\\\\') {\n      escStart = i;\n\n      switch (text[i + 1]) {\n        case 'x':\n          i += 3;\n          break;\n\n        case 'u':\n          i += 5;\n          break;\n\n        case 'U':\n          i += 9;\n          break;\n\n        default:\n          i += 1;\n      }\n\n      escEnd = i;\n    }\n\n    if (ch === '\\n') {\n      if (mode === FOLD_BLOCK) i = consumeMoreIndentedLines(text, i);\n      end = i + endStep;\n      split = undefined;\n    } else {\n      if (ch === ' ' && prev && prev !== ' ' && prev !== '\\n' && prev !== '\\t') {\n        // space surrounded by non-space can be replaced with newline + indent\n        var next = text[i + 1];\n        if (next && next !== ' ' && next !== '\\n' && next !== '\\t') split = i;\n      }\n\n      if (i >= end) {\n        if (split) {\n          folds.push(split);\n          end = split + endStep;\n          split = undefined;\n        } else if (mode === FOLD_QUOTED) {\n          // white-space collected at end may stretch past lineWidth\n          while (prev === ' ' || prev === '\\t') {\n            prev = ch;\n            ch = text[i += 1];\n            overflow = true;\n          } // Account for newline escape, but don't break preceding escape\n\n\n          var j = i > escEnd + 1 ? i - 2 : escStart - 1; // Bail out if lineWidth & minContentWidth are shorter than an escape string\n\n          if (escapedFolds[j]) return text;\n          folds.push(j);\n          escapedFolds[j] = true;\n          end = j + endStep;\n          split = undefined;\n        } else {\n          overflow = true;\n        }\n      }\n    }\n\n    prev = ch;\n  }\n\n  if (overflow && onOverflow) onOverflow();\n  if (folds.length === 0) return text;\n  if (onFold) onFold();\n  var res = text.slice(0, folds[0]);\n\n  for (var _i = 0; _i < folds.length; ++_i) {\n    var fold = folds[_i];\n\n    var _end = folds[_i + 1] || text.length;\n\n    if (fold === 0) res = \"\\n\".concat(indent).concat(text.slice(0, _end));else {\n      if (mode === FOLD_QUOTED && escapedFolds[fold]) res += \"\".concat(text[fold], \"\\\\\");\n      res += \"\\n\".concat(indent).concat(text.slice(fold + 1, _end));\n    }\n  }\n\n  return res;\n}\n\nvar getFoldOptions = function getFoldOptions(_ref) {\n  var indentAtStart = _ref.indentAtStart;\n  return indentAtStart ? Object.assign({\n    indentAtStart: indentAtStart\n  }, strOptions.fold) : strOptions.fold;\n}; // Also checks for lines starting with %, as parsing the output as YAML 1.1 will\n// presume that's starting a new document.\n\n\nvar containsDocumentMarker = function containsDocumentMarker(str) {\n  return /^(%|---|\\.\\.\\.)/m.test(str);\n};\n\nfunction lineLengthOverLimit(str, lineWidth, indentLength) {\n  if (!lineWidth || lineWidth < 0) return false;\n  var limit = lineWidth - indentLength;\n  var strLen = str.length;\n  if (strLen <= limit) return false;\n\n  for (var i = 0, start = 0; i < strLen; ++i) {\n    if (str[i] === '\\n') {\n      if (i - start > limit) return true;\n      start = i + 1;\n      if (strLen - start <= limit) return false;\n    }\n  }\n\n  return true;\n}\n\nfunction doubleQuotedString(value, ctx) {\n  var implicitKey = ctx.implicitKey;\n  var _strOptions$doubleQuo = strOptions.doubleQuoted,\n      jsonEncoding = _strOptions$doubleQuo.jsonEncoding,\n      minMultiLineLength = _strOptions$doubleQuo.minMultiLineLength;\n  var json = JSON.stringify(value);\n  if (jsonEncoding) return json;\n  var indent = ctx.indent || (containsDocumentMarker(value) ? '  ' : '');\n  var str = '';\n  var start = 0;\n\n  for (var i = 0, ch = json[i]; ch; ch = json[++i]) {\n    if (ch === ' ' && json[i + 1] === '\\\\' && json[i + 2] === 'n') {\n      // space before newline needs to be escaped to not be folded\n      str += json.slice(start, i) + '\\\\ ';\n      i += 1;\n      start = i;\n      ch = '\\\\';\n    }\n\n    if (ch === '\\\\') switch (json[i + 1]) {\n      case 'u':\n        {\n          str += json.slice(start, i);\n          var code = json.substr(i + 2, 4);\n\n          switch (code) {\n            case '0000':\n              str += '\\\\0';\n              break;\n\n            case '0007':\n              str += '\\\\a';\n              break;\n\n            case '000b':\n              str += '\\\\v';\n              break;\n\n            case '001b':\n              str += '\\\\e';\n              break;\n\n            case '0085':\n              str += '\\\\N';\n              break;\n\n            case '00a0':\n              str += '\\\\_';\n              break;\n\n            case '2028':\n              str += '\\\\L';\n              break;\n\n            case '2029':\n              str += '\\\\P';\n              break;\n\n            default:\n              if (code.substr(0, 2) === '00') str += '\\\\x' + code.substr(2);else str += json.substr(i, 6);\n          }\n\n          i += 5;\n          start = i + 1;\n        }\n        break;\n\n      case 'n':\n        if (implicitKey || json[i + 2] === '\"' || json.length < minMultiLineLength) {\n          i += 1;\n        } else {\n          // folding will eat first newline\n          str += json.slice(start, i) + '\\n\\n';\n\n          while (json[i + 2] === '\\\\' && json[i + 3] === 'n' && json[i + 4] !== '\"') {\n            str += '\\n';\n            i += 2;\n          }\n\n          str += indent; // space after newline needs to be escaped to not be folded\n\n          if (json[i + 2] === ' ') str += '\\\\';\n          i += 1;\n          start = i + 1;\n        }\n\n        break;\n\n      default:\n        i += 1;\n    }\n  }\n\n  str = start ? str + json.slice(start) : json;\n  return implicitKey ? str : foldFlowLines(str, indent, FOLD_QUOTED, getFoldOptions(ctx));\n}\n\nfunction singleQuotedString(value, ctx) {\n  if (ctx.implicitKey) {\n    if (/\\n/.test(value)) return doubleQuotedString(value, ctx);\n  } else {\n    // single quoted string can't have leading or trailing whitespace around newline\n    if (/[ \\t]\\n|\\n[ \\t]/.test(value)) return doubleQuotedString(value, ctx);\n  }\n\n  var indent = ctx.indent || (containsDocumentMarker(value) ? '  ' : '');\n  var res = \"'\" + value.replace(/'/g, \"''\").replace(/\\n+/g, \"$&\\n\".concat(indent)) + \"'\";\n  return ctx.implicitKey ? res : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx));\n}\n\nfunction blockString(_ref2, ctx, onComment, onChompKeep) {\n  var comment = _ref2.comment,\n      type = _ref2.type,\n      value = _ref2.value;\n\n  // 1. Block can't end in whitespace unless the last line is non-empty.\n  // 2. Strings consisting of only whitespace are best rendered explicitly.\n  if (/\\n[\\t ]+$/.test(value) || /^\\s*$/.test(value)) {\n    return doubleQuotedString(value, ctx);\n  }\n\n  var indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? '  ' : '');\n  var indentSize = indent ? '2' : '1'; // root is at -1\n\n  var literal = type === Type.BLOCK_FOLDED ? false : type === Type.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, strOptions.fold.lineWidth, indent.length);\n  var header = literal ? '|' : '>';\n  if (!value) return header + '\\n';\n  var wsStart = '';\n  var wsEnd = '';\n  value = value.replace(/[\\n\\t ]*$/, function (ws) {\n    var n = ws.indexOf('\\n');\n\n    if (n === -1) {\n      header += '-'; // strip\n    } else if (value === ws || n !== ws.length - 1) {\n      header += '+'; // keep\n\n      if (onChompKeep) onChompKeep();\n    }\n\n    wsEnd = ws.replace(/\\n$/, '');\n    return '';\n  }).replace(/^[\\n ]*/, function (ws) {\n    if (ws.indexOf(' ') !== -1) header += indentSize;\n    var m = ws.match(/ +$/);\n\n    if (m) {\n      wsStart = ws.slice(0, -m[0].length);\n      return m[0];\n    } else {\n      wsStart = ws;\n      return '';\n    }\n  });\n  if (wsEnd) wsEnd = wsEnd.replace(/\\n+(?!\\n|$)/g, \"$&\".concat(indent));\n  if (wsStart) wsStart = wsStart.replace(/\\n+/g, \"$&\".concat(indent));\n\n  if (comment) {\n    header += ' #' + comment.replace(/ ?[\\r\\n]+/g, ' ');\n    if (onComment) onComment();\n  }\n\n  if (!value) return \"\".concat(header).concat(indentSize, \"\\n\").concat(indent).concat(wsEnd);\n\n  if (literal) {\n    value = value.replace(/\\n+/g, \"$&\".concat(indent));\n    return \"\".concat(header, \"\\n\").concat(indent).concat(wsStart).concat(value).concat(wsEnd);\n  }\n\n  value = value.replace(/\\n+/g, '\\n$&').replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g, '$1$2') // more-indented lines aren't folded\n  //         ^ ind.line  ^ empty     ^ capture next empty lines only at end of indent\n  .replace(/\\n+/g, \"$&\".concat(indent));\n  var body = foldFlowLines(\"\".concat(wsStart).concat(value).concat(wsEnd), indent, FOLD_BLOCK, strOptions.fold);\n  return \"\".concat(header, \"\\n\").concat(indent).concat(body);\n}\n\nfunction plainString(item, ctx, onComment, onChompKeep) {\n  var comment = item.comment,\n      type = item.type,\n      value = item.value;\n  var actualString = ctx.actualString,\n      implicitKey = ctx.implicitKey,\n      indent = ctx.indent,\n      inFlow = ctx.inFlow;\n\n  if (implicitKey && /[\\n[\\]{},]/.test(value) || inFlow && /[[\\]{},]/.test(value)) {\n    return doubleQuotedString(value, ctx);\n  }\n\n  if (!value || /^[\\n\\t ,[\\]{}#&*!|>'\"%@`]|^[?-]$|^[?-][ \\t]|[\\n:][ \\t]|[ \\t]\\n|[\\n\\t ]#|[\\n\\t :]$/.test(value)) {\n    // not allowed:\n    // - empty string, '-' or '?'\n    // - start with an indicator character (except [?:-]) or /[?-] /\n    // - '\\n ', ': ' or ' \\n' anywhere\n    // - '#' not preceded by a non-space char\n    // - end with ' ' or ':'\n    return implicitKey || inFlow || value.indexOf('\\n') === -1 ? value.indexOf('\"') !== -1 && value.indexOf(\"'\") === -1 ? singleQuotedString(value, ctx) : doubleQuotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep);\n  }\n\n  if (!implicitKey && !inFlow && type !== Type.PLAIN && value.indexOf('\\n') !== -1) {\n    // Where allowed & type not set explicitly, prefer block style for multiline strings\n    return blockString(item, ctx, onComment, onChompKeep);\n  }\n\n  if (indent === '' && containsDocumentMarker(value)) {\n    ctx.forceBlockIndent = true;\n    return blockString(item, ctx, onComment, onChompKeep);\n  }\n\n  var str = value.replace(/\\n+/g, \"$&\\n\".concat(indent)); // Verify that output will be parsed as a string, as e.g. plain numbers and\n  // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'),\n  // and others in v1.1.\n\n  if (actualString) {\n    var tags = ctx.doc.schema.tags;\n    var resolved = resolveScalar(str, tags, tags.scalarFallback).value;\n    if (typeof resolved !== 'string') return doubleQuotedString(value, ctx);\n  }\n\n  var body = implicitKey ? str : foldFlowLines(str, indent, FOLD_FLOW, getFoldOptions(ctx));\n\n  if (comment && !inFlow && (body.indexOf('\\n') !== -1 || comment.indexOf('\\n') !== -1)) {\n    if (onComment) onComment();\n    return addCommentBefore(body, indent, comment);\n  }\n\n  return body;\n}\n\nfunction stringifyString(item, ctx, onComment, onChompKeep) {\n  var defaultType = strOptions.defaultType;\n  var implicitKey = ctx.implicitKey,\n      inFlow = ctx.inFlow;\n  var _item = item,\n      type = _item.type,\n      value = _item.value;\n\n  if (typeof value !== 'string') {\n    value = String(value);\n    item = Object.assign({}, item, {\n      value: value\n    });\n  }\n\n  var _stringify = function _stringify(_type) {\n    switch (_type) {\n      case Type.BLOCK_FOLDED:\n      case Type.BLOCK_LITERAL:\n        return blockString(item, ctx, onComment, onChompKeep);\n\n      case Type.QUOTE_DOUBLE:\n        return doubleQuotedString(value, ctx);\n\n      case Type.QUOTE_SINGLE:\n        return singleQuotedString(value, ctx);\n\n      case Type.PLAIN:\n        return plainString(item, ctx, onComment, onChompKeep);\n\n      default:\n        return null;\n    }\n  };\n\n  if (type !== Type.QUOTE_DOUBLE && /[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f]/.test(value)) {\n    // force double quotes on control characters\n    type = Type.QUOTE_DOUBLE;\n  } else if ((implicitKey || inFlow) && (type === Type.BLOCK_FOLDED || type === Type.BLOCK_LITERAL)) {\n    // should not happen; blocks are not valid inside flow containers\n    type = Type.QUOTE_DOUBLE;\n  }\n\n  var res = _stringify(type);\n\n  if (res === null) {\n    res = _stringify(defaultType);\n    if (res === null) throw new Error(\"Unsupported default string type \".concat(defaultType));\n  }\n\n  return res;\n}\n\nfunction stringifyNumber(_ref) {\n  var format = _ref.format,\n      minFractionDigits = _ref.minFractionDigits,\n      tag = _ref.tag,\n      value = _ref.value;\n  if (typeof value === 'bigint') return String(value);\n  if (!isFinite(value)) return isNaN(value) ? '.nan' : value < 0 ? '-.inf' : '.inf';\n  var n = JSON.stringify(value);\n\n  if (!format && minFractionDigits && (!tag || tag === 'tag:yaml.org,2002:float') && /^\\d/.test(n)) {\n    var i = n.indexOf('.');\n\n    if (i < 0) {\n      i = n.length;\n      n += '.';\n    }\n\n    var d = minFractionDigits - (n.length - i - 1);\n\n    while (d-- > 0) {\n      n += '0';\n    }\n  }\n\n  return n;\n}\n\nfunction checkFlowCollectionEnd(errors, cst) {\n  var char, name;\n\n  switch (cst.type) {\n    case Type.FLOW_MAP:\n      char = '}';\n      name = 'flow map';\n      break;\n\n    case Type.FLOW_SEQ:\n      char = ']';\n      name = 'flow sequence';\n      break;\n\n    default:\n      errors.push(new YAMLSemanticError(cst, 'Not a flow collection!?'));\n      return;\n  }\n\n  var lastItem;\n\n  for (var i = cst.items.length - 1; i >= 0; --i) {\n    var item = cst.items[i];\n\n    if (!item || item.type !== Type.COMMENT) {\n      lastItem = item;\n      break;\n    }\n  }\n\n  if (lastItem && lastItem.char !== char) {\n    var msg = \"Expected \".concat(name, \" to end with \").concat(char);\n    var err;\n\n    if (typeof lastItem.offset === 'number') {\n      err = new YAMLSemanticError(cst, msg);\n      err.offset = lastItem.offset + 1;\n    } else {\n      err = new YAMLSemanticError(lastItem, msg);\n      if (lastItem.range && lastItem.range.end) err.offset = lastItem.range.end - lastItem.range.start;\n    }\n\n    errors.push(err);\n  }\n}\nfunction checkFlowCommentSpace(errors, comment) {\n  var prev = comment.context.src[comment.range.start - 1];\n\n  if (prev !== '\\n' && prev !== '\\t' && prev !== ' ') {\n    var msg = 'Comments must be separated from other tokens by white space characters';\n    errors.push(new YAMLSemanticError(comment, msg));\n  }\n}\nfunction getLongKeyError(source, key) {\n  var sk = String(key);\n  var k = sk.substr(0, 8) + '...' + sk.substr(-8);\n  return new YAMLSemanticError(source, \"The \\\"\".concat(k, \"\\\" key is too long\"));\n}\nfunction resolveComments(collection, comments) {\n  var _iterator = _createForOfIteratorHelper(comments),\n      _step;\n\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var _step$value = _step.value,\n          afterKey = _step$value.afterKey,\n          before = _step$value.before,\n          comment = _step$value.comment;\n      var item = collection.items[before];\n\n      if (!item) {\n        if (comment !== undefined) {\n          if (collection.comment) collection.comment += '\\n' + comment;else collection.comment = comment;\n        }\n      } else {\n        if (afterKey && item.value) item = item.value;\n\n        if (comment === undefined) {\n          if (afterKey || !item.commentBefore) item.spaceBefore = true;\n        } else {\n          if (item.commentBefore) item.commentBefore += '\\n' + comment;else item.commentBefore = comment;\n        }\n      }\n    }\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n}\n\n// on error, will return { str: string, errors: Error[] }\nfunction resolveString(doc, node) {\n  var res = node.strValue;\n  if (!res) return '';\n  if (typeof res === 'string') return res;\n  res.errors.forEach(function (error) {\n    if (!error.source) error.source = node;\n    doc.errors.push(error);\n  });\n  return res.str;\n}\n\nfunction resolveTagHandle(doc, node) {\n  var _node$tag = node.tag,\n      handle = _node$tag.handle,\n      suffix = _node$tag.suffix;\n  var prefix = doc.tagPrefixes.find(function (p) {\n    return p.handle === handle;\n  });\n\n  if (!prefix) {\n    var dtp = doc.getDefaults().tagPrefixes;\n    if (dtp) prefix = dtp.find(function (p) {\n      return p.handle === handle;\n    });\n    if (!prefix) throw new YAMLSemanticError(node, \"The \".concat(handle, \" tag handle is non-default and was not declared.\"));\n  }\n\n  if (!suffix) throw new YAMLSemanticError(node, \"The \".concat(handle, \" tag has no suffix.\"));\n\n  if (handle === '!' && (doc.version || doc.options.version) === '1.0') {\n    if (suffix[0] === '^') {\n      doc.warnings.push(new YAMLWarning(node, 'YAML 1.0 ^ tag expansion is not supported'));\n      return suffix;\n    }\n\n    if (/[:/]/.test(suffix)) {\n      // word/foo -> tag:word.yaml.org,2002:foo\n      var vocab = suffix.match(/^([a-z0-9-]+)\\/(.*)/i);\n      return vocab ? \"tag:\".concat(vocab[1], \".yaml.org,2002:\").concat(vocab[2]) : \"tag:\".concat(suffix);\n    }\n  }\n\n  return prefix.prefix + decodeURIComponent(suffix);\n}\n\nfunction resolveTagName(doc, node) {\n  var tag = node.tag,\n      type = node.type;\n  var nonSpecific = false;\n\n  if (tag) {\n    var handle = tag.handle,\n        suffix = tag.suffix,\n        verbatim = tag.verbatim;\n\n    if (verbatim) {\n      if (verbatim !== '!' && verbatim !== '!!') return verbatim;\n      var msg = \"Verbatim tags aren't resolved, so \".concat(verbatim, \" is invalid.\");\n      doc.errors.push(new YAMLSemanticError(node, msg));\n    } else if (handle === '!' && !suffix) {\n      nonSpecific = true;\n    } else {\n      try {\n        return resolveTagHandle(doc, node);\n      } catch (error) {\n        doc.errors.push(error);\n      }\n    }\n  }\n\n  switch (type) {\n    case Type.BLOCK_FOLDED:\n    case Type.BLOCK_LITERAL:\n    case Type.QUOTE_DOUBLE:\n    case Type.QUOTE_SINGLE:\n      return defaultTags.STR;\n\n    case Type.FLOW_MAP:\n    case Type.MAP:\n      return defaultTags.MAP;\n\n    case Type.FLOW_SEQ:\n    case Type.SEQ:\n      return defaultTags.SEQ;\n\n    case Type.PLAIN:\n      return nonSpecific ? defaultTags.STR : null;\n\n    default:\n      return null;\n  }\n}\n\nfunction resolveByTagName(doc, node, tagName) {\n  var tags = doc.schema.tags;\n  var matchWithTest = [];\n\n  var _iterator = _createForOfIteratorHelper(tags),\n      _step;\n\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var tag = _step.value;\n\n      if (tag.tag === tagName) {\n        if (tag.test) matchWithTest.push(tag);else {\n          var res = tag.resolve(doc, node);\n          return res instanceof Collection ? res : new Scalar(res);\n        }\n      }\n    }\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n\n  var str = resolveString(doc, node);\n  if (typeof str === 'string' && matchWithTest.length > 0) return resolveScalar(str, matchWithTest, tags.scalarFallback);\n  return null;\n}\n\nfunction getFallbackTagName(_ref) {\n  var type = _ref.type;\n\n  switch (type) {\n    case Type.FLOW_MAP:\n    case Type.MAP:\n      return defaultTags.MAP;\n\n    case Type.FLOW_SEQ:\n    case Type.SEQ:\n      return defaultTags.SEQ;\n\n    default:\n      return defaultTags.STR;\n  }\n}\n\nfunction resolveTag(doc, node, tagName) {\n  try {\n    var res = resolveByTagName(doc, node, tagName);\n\n    if (res) {\n      if (tagName && node.tag) res.tag = tagName;\n      return res;\n    }\n  } catch (error) {\n    /* istanbul ignore if */\n    if (!error.source) error.source = node;\n    doc.errors.push(error);\n    return null;\n  }\n\n  try {\n    var fallback = getFallbackTagName(node);\n    if (!fallback) throw new Error(\"The tag \".concat(tagName, \" is unavailable\"));\n    var msg = \"The tag \".concat(tagName, \" is unavailable, falling back to \").concat(fallback);\n    doc.warnings.push(new YAMLWarning(node, msg));\n\n    var _res = resolveByTagName(doc, node, fallback);\n\n    _res.tag = tagName;\n    return _res;\n  } catch (error) {\n    var refError = new YAMLReferenceError(node, error.message);\n    refError.stack = error.stack;\n    doc.errors.push(refError);\n    return null;\n  }\n}\n\nvar isCollectionItem = function isCollectionItem(node) {\n  if (!node) return false;\n  var type = node.type;\n  return type === Type.MAP_KEY || type === Type.MAP_VALUE || type === Type.SEQ_ITEM;\n};\n\nfunction resolveNodeProps(errors, node) {\n  var comments = {\n    before: [],\n    after: []\n  };\n  var hasAnchor = false;\n  var hasTag = false;\n  var props = isCollectionItem(node.context.parent) ? node.context.parent.props.concat(node.props) : node.props;\n\n  var _iterator = _createForOfIteratorHelper(props),\n      _step;\n\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var _step$value = _step.value,\n          start = _step$value.start,\n          end = _step$value.end;\n\n      switch (node.context.src[start]) {\n        case Char.COMMENT:\n          {\n            if (!node.commentHasRequiredWhitespace(start)) {\n              var msg = 'Comments must be separated from other tokens by white space characters';\n              errors.push(new YAMLSemanticError(node, msg));\n            }\n\n            var header = node.header,\n                valueRange = node.valueRange;\n            var cc = valueRange && (start > valueRange.start || header && start > header.start) ? comments.after : comments.before;\n            cc.push(node.context.src.slice(start + 1, end));\n            break;\n          }\n        // Actual anchor & tag resolution is handled by schema, here we just complain\n\n        case Char.ANCHOR:\n          if (hasAnchor) {\n            var _msg = 'A node can have at most one anchor';\n            errors.push(new YAMLSemanticError(node, _msg));\n          }\n\n          hasAnchor = true;\n          break;\n\n        case Char.TAG:\n          if (hasTag) {\n            var _msg2 = 'A node can have at most one tag';\n            errors.push(new YAMLSemanticError(node, _msg2));\n          }\n\n          hasTag = true;\n          break;\n      }\n    }\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n\n  return {\n    comments: comments,\n    hasAnchor: hasAnchor,\n    hasTag: hasTag\n  };\n}\n\nfunction resolveNodeValue(doc, node) {\n  var anchors = doc.anchors,\n      errors = doc.errors,\n      schema = doc.schema;\n\n  if (node.type === Type.ALIAS) {\n    var name = node.rawValue;\n    var src = anchors.getNode(name);\n\n    if (!src) {\n      var msg = \"Aliased anchor not found: \".concat(name);\n      errors.push(new YAMLReferenceError(node, msg));\n      return null;\n    } // Lazy resolution for circular references\n\n\n    var res = new Alias(src);\n\n    anchors._cstAliases.push(res);\n\n    return res;\n  }\n\n  var tagName = resolveTagName(doc, node);\n  if (tagName) return resolveTag(doc, node, tagName);\n\n  if (node.type !== Type.PLAIN) {\n    var _msg3 = \"Failed to resolve \".concat(node.type, \" node here\");\n\n    errors.push(new YAMLSyntaxError(node, _msg3));\n    return null;\n  }\n\n  try {\n    var str = resolveString(doc, node);\n    return resolveScalar(str, schema.tags, schema.tags.scalarFallback);\n  } catch (error) {\n    if (!error.source) error.source = node;\n    errors.push(error);\n    return null;\n  }\n} // sets node.resolved on success\n\n\nfunction resolveNode(doc, node) {\n  if (!node) return null;\n  if (node.error) doc.errors.push(node.error);\n\n  var _resolveNodeProps = resolveNodeProps(doc.errors, node),\n      comments = _resolveNodeProps.comments,\n      hasAnchor = _resolveNodeProps.hasAnchor,\n      hasTag = _resolveNodeProps.hasTag;\n\n  if (hasAnchor) {\n    var anchors = doc.anchors;\n    var name = node.anchor;\n    var prev = anchors.getNode(name); // At this point, aliases for any preceding node with the same anchor\n    // name have already been resolved, so it may safely be renamed.\n\n    if (prev) anchors.map[anchors.newName(name)] = prev; // During parsing, we need to store the CST node in anchors.map as\n    // anchors need to be available during resolution to allow for\n    // circular references.\n\n    anchors.map[name] = node;\n  }\n\n  if (node.type === Type.ALIAS && (hasAnchor || hasTag)) {\n    var msg = 'An alias node must not specify any properties';\n    doc.errors.push(new YAMLSemanticError(node, msg));\n  }\n\n  var res = resolveNodeValue(doc, node);\n\n  if (res) {\n    res.range = [node.range.start, node.range.end];\n    if (doc.options.keepCstNodes) res.cstNode = node;\n    if (doc.options.keepNodeTypes) res.type = node.type;\n    var cb = comments.before.join('\\n');\n\n    if (cb) {\n      res.commentBefore = res.commentBefore ? \"\".concat(res.commentBefore, \"\\n\").concat(cb) : cb;\n    }\n\n    var ca = comments.after.join('\\n');\n    if (ca) res.comment = res.comment ? \"\".concat(res.comment, \"\\n\").concat(ca) : ca;\n  }\n\n  return node.resolved = res;\n}\n\nfunction resolveMap(doc, cst) {\n  if (cst.type !== Type.MAP && cst.type !== Type.FLOW_MAP) {\n    var msg = \"A \".concat(cst.type, \" node cannot be resolved as a mapping\");\n    doc.errors.push(new YAMLSyntaxError(cst, msg));\n    return null;\n  }\n\n  var _ref = cst.type === Type.FLOW_MAP ? resolveFlowMapItems(doc, cst) : resolveBlockMapItems(doc, cst),\n      comments = _ref.comments,\n      items = _ref.items;\n\n  var map = new YAMLMap();\n  map.items = items;\n  resolveComments(map, comments);\n  var hasCollectionKey = false;\n\n  for (var i = 0; i < items.length; ++i) {\n    var iKey = items[i].key;\n    if (iKey instanceof Collection) hasCollectionKey = true;\n\n    if (doc.schema.merge && iKey && iKey.value === MERGE_KEY) {\n      items[i] = new Merge(items[i]);\n      var sources = items[i].value.items;\n      var error = null;\n      sources.some(function (node) {\n        if (node instanceof Alias) {\n          // During parsing, alias sources are CST nodes; to account for\n          // circular references their resolved values can't be used here.\n          var type = node.source.type;\n          if (type === Type.MAP || type === Type.FLOW_MAP) return false;\n          return error = 'Merge nodes aliases can only point to maps';\n        }\n\n        return error = 'Merge nodes can only have Alias nodes as values';\n      });\n      if (error) doc.errors.push(new YAMLSemanticError(cst, error));\n    } else {\n      for (var j = i + 1; j < items.length; ++j) {\n        var jKey = items[j].key;\n\n        if (iKey === jKey || iKey && jKey && Object.prototype.hasOwnProperty.call(iKey, 'value') && iKey.value === jKey.value) {\n          var _msg = \"Map keys must be unique; \\\"\".concat(iKey, \"\\\" is repeated\");\n\n          doc.errors.push(new YAMLSemanticError(cst, _msg));\n          break;\n        }\n      }\n    }\n  }\n\n  if (hasCollectionKey && !doc.options.mapAsMap) {\n    var warn = 'Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.';\n    doc.warnings.push(new YAMLWarning(cst, warn));\n  }\n\n  cst.resolved = map;\n  return map;\n}\n\nvar valueHasPairComment = function valueHasPairComment(_ref2) {\n  var _ref2$context = _ref2.context,\n      lineStart = _ref2$context.lineStart,\n      node = _ref2$context.node,\n      src = _ref2$context.src,\n      props = _ref2.props;\n  if (props.length === 0) return false;\n  var start = props[0].start;\n  if (node && start > node.valueRange.start) return false;\n  if (src[start] !== Char.COMMENT) return false;\n\n  for (var i = lineStart; i < start; ++i) {\n    if (src[i] === '\\n') return false;\n  }\n\n  return true;\n};\n\nfunction resolvePairComment(item, pair) {\n  if (!valueHasPairComment(item)) return;\n  var comment = item.getPropValue(0, Char.COMMENT, true);\n  var found = false;\n  var cb = pair.value.commentBefore;\n\n  if (cb && cb.startsWith(comment)) {\n    pair.value.commentBefore = cb.substr(comment.length + 1);\n    found = true;\n  } else {\n    var cc = pair.value.comment;\n\n    if (!item.node && cc && cc.startsWith(comment)) {\n      pair.value.comment = cc.substr(comment.length + 1);\n      found = true;\n    }\n  }\n\n  if (found) pair.comment = comment;\n}\n\nfunction resolveBlockMapItems(doc, cst) {\n  var comments = [];\n  var items = [];\n  var key = undefined;\n  var keyStart = null;\n\n  for (var i = 0; i < cst.items.length; ++i) {\n    var item = cst.items[i];\n\n    switch (item.type) {\n      case Type.BLANK_LINE:\n        comments.push({\n          afterKey: !!key,\n          before: items.length\n        });\n        break;\n\n      case Type.COMMENT:\n        comments.push({\n          afterKey: !!key,\n          before: items.length,\n          comment: item.comment\n        });\n        break;\n\n      case Type.MAP_KEY:\n        if (key !== undefined) items.push(new Pair(key));\n        if (item.error) doc.errors.push(item.error);\n        key = resolveNode(doc, item.node);\n        keyStart = null;\n        break;\n\n      case Type.MAP_VALUE:\n        {\n          if (key === undefined) key = null;\n          if (item.error) doc.errors.push(item.error);\n\n          if (!item.context.atLineStart && item.node && item.node.type === Type.MAP && !item.node.context.atLineStart) {\n            var msg = 'Nested mappings are not allowed in compact mappings';\n            doc.errors.push(new YAMLSemanticError(item.node, msg));\n          }\n\n          var valueNode = item.node;\n\n          if (!valueNode && item.props.length > 0) {\n            // Comments on an empty mapping value need to be preserved, so we\n            // need to construct a minimal empty node here to use instead of the\n            // missing `item.node`. -- eemeli/yaml#19\n            valueNode = new PlainValue(Type.PLAIN, []);\n            valueNode.context = {\n              parent: item,\n              src: item.context.src\n            };\n            var pos = item.range.start + 1;\n            valueNode.range = {\n              start: pos,\n              end: pos\n            };\n            valueNode.valueRange = {\n              start: pos,\n              end: pos\n            };\n\n            if (typeof item.range.origStart === 'number') {\n              var origPos = item.range.origStart + 1;\n              valueNode.range.origStart = valueNode.range.origEnd = origPos;\n              valueNode.valueRange.origStart = valueNode.valueRange.origEnd = origPos;\n            }\n          }\n\n          var pair = new Pair(key, resolveNode(doc, valueNode));\n          resolvePairComment(item, pair);\n          items.push(pair);\n\n          if (key && typeof keyStart === 'number') {\n            if (item.range.start > keyStart + 1024) doc.errors.push(getLongKeyError(cst, key));\n          }\n\n          key = undefined;\n          keyStart = null;\n        }\n        break;\n\n      default:\n        if (key !== undefined) items.push(new Pair(key));\n        key = resolveNode(doc, item);\n        keyStart = item.range.start;\n        if (item.error) doc.errors.push(item.error);\n\n        next: for (var j = i + 1;; ++j) {\n          var nextItem = cst.items[j];\n\n          switch (nextItem && nextItem.type) {\n            case Type.BLANK_LINE:\n            case Type.COMMENT:\n              continue next;\n\n            case Type.MAP_VALUE:\n              break next;\n\n            default:\n              {\n                var _msg2 = 'Implicit map keys need to be followed by map values';\n                doc.errors.push(new YAMLSemanticError(item, _msg2));\n                break next;\n              }\n          }\n        }\n\n        if (item.valueRangeContainsNewline) {\n          var _msg3 = 'Implicit map keys need to be on a single line';\n          doc.errors.push(new YAMLSemanticError(item, _msg3));\n        }\n\n    }\n  }\n\n  if (key !== undefined) items.push(new Pair(key));\n  return {\n    comments: comments,\n    items: items\n  };\n}\n\nfunction resolveFlowMapItems(doc, cst) {\n  var comments = [];\n  var items = [];\n  var key = undefined;\n  var explicitKey = false;\n  var next = '{';\n\n  for (var i = 0; i < cst.items.length; ++i) {\n    var item = cst.items[i];\n\n    if (typeof item.char === 'string') {\n      var char = item.char,\n          offset = item.offset;\n\n      if (char === '?' && key === undefined && !explicitKey) {\n        explicitKey = true;\n        next = ':';\n        continue;\n      }\n\n      if (char === ':') {\n        if (key === undefined) key = null;\n\n        if (next === ':') {\n          next = ',';\n          continue;\n        }\n      } else {\n        if (explicitKey) {\n          if (key === undefined && char !== ',') key = null;\n          explicitKey = false;\n        }\n\n        if (key !== undefined) {\n          items.push(new Pair(key));\n          key = undefined;\n\n          if (char === ',') {\n            next = ':';\n            continue;\n          }\n        }\n      }\n\n      if (char === '}') {\n        if (i === cst.items.length - 1) continue;\n      } else if (char === next) {\n        next = ':';\n        continue;\n      }\n\n      var msg = \"Flow map contains an unexpected \".concat(char);\n      var err = new YAMLSyntaxError(cst, msg);\n      err.offset = offset;\n      doc.errors.push(err);\n    } else if (item.type === Type.BLANK_LINE) {\n      comments.push({\n        afterKey: !!key,\n        before: items.length\n      });\n    } else if (item.type === Type.COMMENT) {\n      checkFlowCommentSpace(doc.errors, item);\n      comments.push({\n        afterKey: !!key,\n        before: items.length,\n        comment: item.comment\n      });\n    } else if (key === undefined) {\n      if (next === ',') doc.errors.push(new YAMLSemanticError(item, 'Separator , missing in flow map'));\n      key = resolveNode(doc, item);\n    } else {\n      if (next !== ',') doc.errors.push(new YAMLSemanticError(item, 'Indicator : missing in flow map entry'));\n      items.push(new Pair(key, resolveNode(doc, item)));\n      key = undefined;\n      explicitKey = false;\n    }\n  }\n\n  checkFlowCollectionEnd(doc.errors, cst);\n  if (key !== undefined) items.push(new Pair(key));\n  return {\n    comments: comments,\n    items: items\n  };\n}\n\nfunction resolveSeq(doc, cst) {\n  if (cst.type !== Type.SEQ && cst.type !== Type.FLOW_SEQ) {\n    var msg = \"A \".concat(cst.type, \" node cannot be resolved as a sequence\");\n    doc.errors.push(new YAMLSyntaxError(cst, msg));\n    return null;\n  }\n\n  var _ref = cst.type === Type.FLOW_SEQ ? resolveFlowSeqItems(doc, cst) : resolveBlockSeqItems(doc, cst),\n      comments = _ref.comments,\n      items = _ref.items;\n\n  var seq = new YAMLSeq();\n  seq.items = items;\n  resolveComments(seq, comments);\n\n  if (!doc.options.mapAsMap && items.some(function (it) {\n    return it instanceof Pair && it.key instanceof Collection;\n  })) {\n    var warn = 'Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.';\n    doc.warnings.push(new YAMLWarning(cst, warn));\n  }\n\n  cst.resolved = seq;\n  return seq;\n}\n\nfunction resolveBlockSeqItems(doc, cst) {\n  var comments = [];\n  var items = [];\n\n  for (var i = 0; i < cst.items.length; ++i) {\n    var item = cst.items[i];\n\n    switch (item.type) {\n      case Type.BLANK_LINE:\n        comments.push({\n          before: items.length\n        });\n        break;\n\n      case Type.COMMENT:\n        comments.push({\n          comment: item.comment,\n          before: items.length\n        });\n        break;\n\n      case Type.SEQ_ITEM:\n        if (item.error) doc.errors.push(item.error);\n        items.push(resolveNode(doc, item.node));\n\n        if (item.hasProps) {\n          var msg = 'Sequence items cannot have tags or anchors before the - indicator';\n          doc.errors.push(new YAMLSemanticError(item, msg));\n        }\n\n        break;\n\n      default:\n        if (item.error) doc.errors.push(item.error);\n        doc.errors.push(new YAMLSyntaxError(item, \"Unexpected \".concat(item.type, \" node in sequence\")));\n    }\n  }\n\n  return {\n    comments: comments,\n    items: items\n  };\n}\n\nfunction resolveFlowSeqItems(doc, cst) {\n  var comments = [];\n  var items = [];\n  var explicitKey = false;\n  var key = undefined;\n  var keyStart = null;\n  var next = '[';\n  var prevItem = null;\n\n  for (var i = 0; i < cst.items.length; ++i) {\n    var item = cst.items[i];\n\n    if (typeof item.char === 'string') {\n      var char = item.char,\n          offset = item.offset;\n\n      if (char !== ':' && (explicitKey || key !== undefined)) {\n        if (explicitKey && key === undefined) key = next ? items.pop() : null;\n        items.push(new Pair(key));\n        explicitKey = false;\n        key = undefined;\n        keyStart = null;\n      }\n\n      if (char === next) {\n        next = null;\n      } else if (!next && char === '?') {\n        explicitKey = true;\n      } else if (next !== '[' && char === ':' && key === undefined) {\n        if (next === ',') {\n          key = items.pop();\n\n          if (key instanceof Pair) {\n            var msg = 'Chaining flow sequence pairs is invalid';\n            var err = new YAMLSemanticError(cst, msg);\n            err.offset = offset;\n            doc.errors.push(err);\n          }\n\n          if (!explicitKey && typeof keyStart === 'number') {\n            var keyEnd = item.range ? item.range.start : item.offset;\n            if (keyEnd > keyStart + 1024) doc.errors.push(getLongKeyError(cst, key));\n            var src = prevItem.context.src;\n\n            for (var _i = keyStart; _i < keyEnd; ++_i) {\n              if (src[_i] === '\\n') {\n                var _msg = 'Implicit keys of flow sequence pairs need to be on a single line';\n                doc.errors.push(new YAMLSemanticError(prevItem, _msg));\n                break;\n              }\n            }\n          }\n        } else {\n          key = null;\n        }\n\n        keyStart = null;\n        explicitKey = false;\n        next = null;\n      } else if (next === '[' || char !== ']' || i < cst.items.length - 1) {\n        var _msg2 = \"Flow sequence contains an unexpected \".concat(char);\n\n        var _err = new YAMLSyntaxError(cst, _msg2);\n\n        _err.offset = offset;\n        doc.errors.push(_err);\n      }\n    } else if (item.type === Type.BLANK_LINE) {\n      comments.push({\n        before: items.length\n      });\n    } else if (item.type === Type.COMMENT) {\n      checkFlowCommentSpace(doc.errors, item);\n      comments.push({\n        comment: item.comment,\n        before: items.length\n      });\n    } else {\n      if (next) {\n        var _msg3 = \"Expected a \".concat(next, \" in flow sequence\");\n\n        doc.errors.push(new YAMLSemanticError(item, _msg3));\n      }\n\n      var value = resolveNode(doc, item);\n\n      if (key === undefined) {\n        items.push(value);\n        prevItem = item;\n      } else {\n        items.push(new Pair(key, value));\n        key = undefined;\n      }\n\n      keyStart = item.range.start;\n      next = ',';\n    }\n  }\n\n  checkFlowCollectionEnd(doc.errors, cst);\n  if (key !== undefined) items.push(new Pair(key));\n  return {\n    comments: comments,\n    items: items\n  };\n}\n\nexport { Alias as A, Collection as C, Merge as M, Node as N, Pair as P, Scalar as S, YAMLSeq as Y, boolOptions as a, binaryOptions as b, stringifyString as c, YAMLMap as d, isEmptyPath as e, addComment as f, resolveMap as g, resolveSeq as h, intOptions as i, resolveString as j, stringifyNumber as k, findPair as l, nullOptions as n, resolveNode as r, strOptions as s, toJSON as t };\n","import { o as YAMLReferenceError, T as Type, g as YAMLSemanticError, _ as _createForOfIteratorHelper, e as _defineProperty, j as _inherits, k as _createSuper, c as _classCallCheck, p as _assertThisInitialized, b as _createClass, a as _typeof, l as _get, m as _getPrototypeOf } from './PlainValue-b8036b75.js';\nimport { j as resolveString, b as binaryOptions, c as stringifyString, h as resolveSeq, P as Pair, d as YAMLMap, Y as YAMLSeq, t as toJSON, S as Scalar, l as findPair, g as resolveMap, k as stringifyNumber } from './resolveSeq-492ab440.js';\n\n/* global atob, btoa, Buffer */\nvar binary = {\n  identify: function identify(value) {\n    return value instanceof Uint8Array;\n  },\n  // Buffer inherits from Uint8Array\n  default: false,\n  tag: 'tag:yaml.org,2002:binary',\n\n  /**\n   * Returns a Buffer in node and an Uint8Array in browsers\n   *\n   * To use the resulting buffer as an image, you'll want to do something like:\n   *\n   *   const blob = new Blob([buffer], { type: 'image/jpeg' })\n   *   document.querySelector('#photo').src = URL.createObjectURL(blob)\n   */\n  resolve: function resolve(doc, node) {\n    var src = resolveString(doc, node);\n\n    if (typeof Buffer === 'function') {\n      return Buffer.from(src, 'base64');\n    } else if (typeof atob === 'function') {\n      // On IE 11, atob() can't handle newlines\n      var str = atob(src.replace(/[\\n\\r]/g, ''));\n      var buffer = new Uint8Array(str.length);\n\n      for (var i = 0; i < str.length; ++i) {\n        buffer[i] = str.charCodeAt(i);\n      }\n\n      return buffer;\n    } else {\n      var msg = 'This environment does not support reading binary tags; either Buffer or atob is required';\n      doc.errors.push(new YAMLReferenceError(node, msg));\n      return null;\n    }\n  },\n  options: binaryOptions,\n  stringify: function stringify(_ref, ctx, onComment, onChompKeep) {\n    var comment = _ref.comment,\n        type = _ref.type,\n        value = _ref.value;\n    var src;\n\n    if (typeof Buffer === 'function') {\n      src = value instanceof Buffer ? value.toString('base64') : Buffer.from(value.buffer).toString('base64');\n    } else if (typeof btoa === 'function') {\n      var s = '';\n\n      for (var i = 0; i < value.length; ++i) {\n        s += String.fromCharCode(value[i]);\n      }\n\n      src = btoa(s);\n    } else {\n      throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');\n    }\n\n    if (!type) type = binaryOptions.defaultType;\n\n    if (type === Type.QUOTE_DOUBLE) {\n      value = src;\n    } else {\n      var lineWidth = binaryOptions.lineWidth;\n      var n = Math.ceil(src.length / lineWidth);\n      var lines = new Array(n);\n\n      for (var _i = 0, o = 0; _i < n; ++_i, o += lineWidth) {\n        lines[_i] = src.substr(o, lineWidth);\n      }\n\n      value = lines.join(type === Type.BLOCK_LITERAL ? '\\n' : ' ');\n    }\n\n    return stringifyString({\n      comment: comment,\n      type: type,\n      value: value\n    }, ctx, onComment, onChompKeep);\n  }\n};\n\nfunction parsePairs(doc, cst) {\n  var seq = resolveSeq(doc, cst);\n\n  for (var i = 0; i < seq.items.length; ++i) {\n    var item = seq.items[i];\n    if (item instanceof Pair) continue;else if (item instanceof YAMLMap) {\n      if (item.items.length > 1) {\n        var msg = 'Each pair must have its own sequence indicator';\n        throw new YAMLSemanticError(cst, msg);\n      }\n\n      var pair = item.items[0] || new Pair();\n      if (item.commentBefore) pair.commentBefore = pair.commentBefore ? \"\".concat(item.commentBefore, \"\\n\").concat(pair.commentBefore) : item.commentBefore;\n      if (item.comment) pair.comment = pair.comment ? \"\".concat(item.comment, \"\\n\").concat(pair.comment) : item.comment;\n      item = pair;\n    }\n    seq.items[i] = item instanceof Pair ? item : new Pair(item);\n  }\n\n  return seq;\n}\nfunction createPairs(schema, iterable, ctx) {\n  var pairs = new YAMLSeq(schema);\n  pairs.tag = 'tag:yaml.org,2002:pairs';\n\n  var _iterator = _createForOfIteratorHelper(iterable),\n      _step;\n\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var it = _step.value;\n      var key = void 0,\n          value = void 0;\n\n      if (Array.isArray(it)) {\n        if (it.length === 2) {\n          key = it[0];\n          value = it[1];\n        } else throw new TypeError(\"Expected [key, value] tuple: \".concat(it));\n      } else if (it && it instanceof Object) {\n        var keys = Object.keys(it);\n\n        if (keys.length === 1) {\n          key = keys[0];\n          value = it[key];\n        } else throw new TypeError(\"Expected { key: value } tuple: \".concat(it));\n      } else {\n        key = it;\n      }\n\n      var pair = schema.createPair(key, value, ctx);\n      pairs.items.push(pair);\n    }\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n\n  return pairs;\n}\nvar pairs = {\n  default: false,\n  tag: 'tag:yaml.org,2002:pairs',\n  resolve: parsePairs,\n  createNode: createPairs\n};\n\nvar YAMLOMap = /*#__PURE__*/function (_YAMLSeq) {\n  _inherits(YAMLOMap, _YAMLSeq);\n\n  var _super = _createSuper(YAMLOMap);\n\n  function YAMLOMap() {\n    var _this;\n\n    _classCallCheck(this, YAMLOMap);\n\n    _this = _super.call(this);\n\n    _defineProperty(_assertThisInitialized(_this), \"add\", YAMLMap.prototype.add.bind(_assertThisInitialized(_this)));\n\n    _defineProperty(_assertThisInitialized(_this), \"delete\", YAMLMap.prototype.delete.bind(_assertThisInitialized(_this)));\n\n    _defineProperty(_assertThisInitialized(_this), \"get\", YAMLMap.prototype.get.bind(_assertThisInitialized(_this)));\n\n    _defineProperty(_assertThisInitialized(_this), \"has\", YAMLMap.prototype.has.bind(_assertThisInitialized(_this)));\n\n    _defineProperty(_assertThisInitialized(_this), \"set\", YAMLMap.prototype.set.bind(_assertThisInitialized(_this)));\n\n    _this.tag = YAMLOMap.tag;\n    return _this;\n  }\n\n  _createClass(YAMLOMap, [{\n    key: \"toJSON\",\n    value: function toJSON$1(_, ctx) {\n      var map = new Map();\n      if (ctx && ctx.onCreate) ctx.onCreate(map);\n\n      var _iterator = _createForOfIteratorHelper(this.items),\n          _step;\n\n      try {\n        for (_iterator.s(); !(_step = _iterator.n()).done;) {\n          var pair = _step.value;\n          var key = void 0,\n              value = void 0;\n\n          if (pair instanceof Pair) {\n            key = toJSON(pair.key, '', ctx);\n            value = toJSON(pair.value, key, ctx);\n          } else {\n            key = toJSON(pair, '', ctx);\n          }\n\n          if (map.has(key)) throw new Error('Ordered maps must not include duplicate keys');\n          map.set(key, value);\n        }\n      } catch (err) {\n        _iterator.e(err);\n      } finally {\n        _iterator.f();\n      }\n\n      return map;\n    }\n  }]);\n\n  return YAMLOMap;\n}(YAMLSeq);\n\n_defineProperty(YAMLOMap, \"tag\", 'tag:yaml.org,2002:omap');\n\nfunction parseOMap(doc, cst) {\n  var pairs = parsePairs(doc, cst);\n  var seenKeys = [];\n\n  var _iterator2 = _createForOfIteratorHelper(pairs.items),\n      _step2;\n\n  try {\n    for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n      var key = _step2.value.key;\n\n      if (key instanceof Scalar) {\n        if (seenKeys.includes(key.value)) {\n          var msg = 'Ordered maps must not include duplicate keys';\n          throw new YAMLSemanticError(cst, msg);\n        } else {\n          seenKeys.push(key.value);\n        }\n      }\n    }\n  } catch (err) {\n    _iterator2.e(err);\n  } finally {\n    _iterator2.f();\n  }\n\n  return Object.assign(new YAMLOMap(), pairs);\n}\n\nfunction createOMap(schema, iterable, ctx) {\n  var pairs = createPairs(schema, iterable, ctx);\n  var omap = new YAMLOMap();\n  omap.items = pairs.items;\n  return omap;\n}\n\nvar omap = {\n  identify: function identify(value) {\n    return value instanceof Map;\n  },\n  nodeClass: YAMLOMap,\n  default: false,\n  tag: 'tag:yaml.org,2002:omap',\n  resolve: parseOMap,\n  createNode: createOMap\n};\n\nvar YAMLSet = /*#__PURE__*/function (_YAMLMap) {\n  _inherits(YAMLSet, _YAMLMap);\n\n  var _super = _createSuper(YAMLSet);\n\n  function YAMLSet() {\n    var _this;\n\n    _classCallCheck(this, YAMLSet);\n\n    _this = _super.call(this);\n    _this.tag = YAMLSet.tag;\n    return _this;\n  }\n\n  _createClass(YAMLSet, [{\n    key: \"add\",\n    value: function add(key) {\n      var pair = key instanceof Pair ? key : new Pair(key);\n      var prev = findPair(this.items, pair.key);\n      if (!prev) this.items.push(pair);\n    }\n  }, {\n    key: \"get\",\n    value: function get(key, keepPair) {\n      var pair = findPair(this.items, key);\n      return !keepPair && pair instanceof Pair ? pair.key instanceof Scalar ? pair.key.value : pair.key : pair;\n    }\n  }, {\n    key: \"set\",\n    value: function set(key, value) {\n      if (typeof value !== 'boolean') throw new Error(\"Expected boolean value for set(key, value) in a YAML set, not \".concat(_typeof(value)));\n      var prev = findPair(this.items, key);\n\n      if (prev && !value) {\n        this.items.splice(this.items.indexOf(prev), 1);\n      } else if (!prev && value) {\n        this.items.push(new Pair(key));\n      }\n    }\n  }, {\n    key: \"toJSON\",\n    value: function toJSON(_, ctx) {\n      return _get(_getPrototypeOf(YAMLSet.prototype), \"toJSON\", this).call(this, _, ctx, Set);\n    }\n  }, {\n    key: \"toString\",\n    value: function toString(ctx, onComment, onChompKeep) {\n      if (!ctx) return JSON.stringify(this);\n      if (this.hasAllNullValues()) return _get(_getPrototypeOf(YAMLSet.prototype), \"toString\", this).call(this, ctx, onComment, onChompKeep);else throw new Error('Set items must all have null values');\n    }\n  }]);\n\n  return YAMLSet;\n}(YAMLMap);\n\n_defineProperty(YAMLSet, \"tag\", 'tag:yaml.org,2002:set');\n\nfunction parseSet(doc, cst) {\n  var map = resolveMap(doc, cst);\n  if (!map.hasAllNullValues()) throw new YAMLSemanticError(cst, 'Set items must all have null values');\n  return Object.assign(new YAMLSet(), map);\n}\n\nfunction createSet(schema, iterable, ctx) {\n  var set = new YAMLSet();\n\n  var _iterator = _createForOfIteratorHelper(iterable),\n      _step;\n\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var value = _step.value;\n      set.items.push(schema.createPair(value, null, ctx));\n    }\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n\n  return set;\n}\n\nvar set = {\n  identify: function identify(value) {\n    return value instanceof Set;\n  },\n  nodeClass: YAMLSet,\n  default: false,\n  tag: 'tag:yaml.org,2002:set',\n  resolve: parseSet,\n  createNode: createSet\n};\n\nvar parseSexagesimal = function parseSexagesimal(sign, parts) {\n  var n = parts.split(':').reduce(function (n, p) {\n    return n * 60 + Number(p);\n  }, 0);\n  return sign === '-' ? -n : n;\n}; // hhhh:mm:ss.sss\n\n\nvar stringifySexagesimal = function stringifySexagesimal(_ref) {\n  var value = _ref.value;\n  if (isNaN(value) || !isFinite(value)) return stringifyNumber(value);\n  var sign = '';\n\n  if (value < 0) {\n    sign = '-';\n    value = Math.abs(value);\n  }\n\n  var parts = [value % 60]; // seconds, including ms\n\n  if (value < 60) {\n    parts.unshift(0); // at least one : is required\n  } else {\n    value = Math.round((value - parts[0]) / 60);\n    parts.unshift(value % 60); // minutes\n\n    if (value >= 60) {\n      value = Math.round((value - parts[0]) / 60);\n      parts.unshift(value); // hours\n    }\n  }\n\n  return sign + parts.map(function (n) {\n    return n < 10 ? '0' + String(n) : String(n);\n  }).join(':').replace(/000000\\d*$/, '') // % 60 may introduce error\n  ;\n};\n\nvar intTime = {\n  identify: function identify(value) {\n    return typeof value === 'number';\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:int',\n  format: 'TIME',\n  test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,\n  resolve: function resolve(str, sign, parts) {\n    return parseSexagesimal(sign, parts.replace(/_/g, ''));\n  },\n  stringify: stringifySexagesimal\n};\nvar floatTime = {\n  identify: function identify(value) {\n    return typeof value === 'number';\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:float',\n  format: 'TIME',\n  test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*)$/,\n  resolve: function resolve(str, sign, parts) {\n    return parseSexagesimal(sign, parts.replace(/_/g, ''));\n  },\n  stringify: stringifySexagesimal\n};\nvar timestamp = {\n  identify: function identify(value) {\n    return value instanceof Date;\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:timestamp',\n  // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part\n  // may be omitted altogether, resulting in a date format. In such a case, the time part is\n  // assumed to be 00:00:00Z (start of day, UTC).\n  test: RegExp('^(?:' + '([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd\n  '(?:(?:t|T|[ \\\\t]+)' + // t | T | whitespace\n  '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)?\n  '(?:[ \\\\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30\n  ')?' + ')$'),\n  resolve: function resolve(str, year, month, day, hour, minute, second, millisec, tz) {\n    if (millisec) millisec = (millisec + '00').substr(1, 3);\n    var date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec || 0);\n\n    if (tz && tz !== 'Z') {\n      var d = parseSexagesimal(tz[0], tz.slice(1));\n      if (Math.abs(d) < 30) d *= 60;\n      date -= 60000 * d;\n    }\n\n    return new Date(date);\n  },\n  stringify: function stringify(_ref2) {\n    var value = _ref2.value;\n    return value.toISOString().replace(/((T00:00)?:00)?\\.000Z$/, '');\n  }\n};\n\n/* global console, process, YAML_SILENCE_DEPRECATION_WARNINGS, YAML_SILENCE_WARNINGS */\nfunction shouldWarn(deprecation) {\n  var env = typeof process !== 'undefined' && process.env || {};\n\n  if (deprecation) {\n    if (typeof YAML_SILENCE_DEPRECATION_WARNINGS !== 'undefined') return !YAML_SILENCE_DEPRECATION_WARNINGS;\n    return !env.YAML_SILENCE_DEPRECATION_WARNINGS;\n  }\n\n  if (typeof YAML_SILENCE_WARNINGS !== 'undefined') return !YAML_SILENCE_WARNINGS;\n  return !env.YAML_SILENCE_WARNINGS;\n}\n\nfunction warn(warning, type) {\n  if (shouldWarn(false)) {\n    var emit = typeof process !== 'undefined' && process.emitWarning; // This will throw in Jest if `warning` is an Error instance due to\n    // https://github.com/facebook/jest/issues/2549\n\n    if (emit) emit(warning, type);else {\n      // eslint-disable-next-line no-console\n      console.warn(type ? \"\".concat(type, \": \").concat(warning) : warning);\n    }\n  }\n}\nfunction warnFileDeprecation(filename) {\n  if (shouldWarn(true)) {\n    var path = filename.replace(/.*yaml[/\\\\]/i, '').replace(/\\.js$/, '').replace(/\\\\/g, '/');\n    warn(\"The endpoint 'yaml/\".concat(path, \"' will be removed in a future release.\"), 'DeprecationWarning');\n  }\n}\nvar warned = {};\nfunction warnOptionDeprecation(name, alternative) {\n  if (!warned[name] && shouldWarn(true)) {\n    warned[name] = true;\n    var msg = \"The option '\".concat(name, \"' will be removed in a future release\");\n    msg += alternative ? \", use '\".concat(alternative, \"' instead.\") : '.';\n    warn(msg, 'DeprecationWarning');\n  }\n}\n\nexport { warnOptionDeprecation as a, binary as b, warnFileDeprecation as c, floatTime as f, intTime as i, omap as o, pairs as p, set as s, timestamp as t, warn as w };\n","import { _ as _createForOfIteratorHelper, h as _slicedToArray, a as _typeof, b as _createClass, e as _defineProperty, c as _classCallCheck, d as defaultTagPrefix, n as defaultTags } from './PlainValue-b8036b75.js';\nimport { d as YAMLMap, g as resolveMap, Y as YAMLSeq, h as resolveSeq, j as resolveString, c as stringifyString, s as strOptions, S as Scalar, n as nullOptions, a as boolOptions, i as intOptions, k as stringifyNumber, N as Node, A as Alias, P as Pair } from './resolveSeq-492ab440.js';\nimport { b as binary, o as omap, p as pairs, s as set, i as intTime, f as floatTime, t as timestamp, a as warnOptionDeprecation } from './warnings-df54cb69.js';\n\nfunction createMap(schema, obj, ctx) {\n  var map = new YAMLMap(schema);\n\n  if (obj instanceof Map) {\n    var _iterator = _createForOfIteratorHelper(obj),\n        _step;\n\n    try {\n      for (_iterator.s(); !(_step = _iterator.n()).done;) {\n        var _step$value = _slicedToArray(_step.value, 2),\n            key = _step$value[0],\n            value = _step$value[1];\n\n        map.items.push(schema.createPair(key, value, ctx));\n      }\n    } catch (err) {\n      _iterator.e(err);\n    } finally {\n      _iterator.f();\n    }\n  } else if (obj && _typeof(obj) === 'object') {\n    for (var _i = 0, _Object$keys = Object.keys(obj); _i < _Object$keys.length; _i++) {\n      var _key = _Object$keys[_i];\n      map.items.push(schema.createPair(_key, obj[_key], ctx));\n    }\n  }\n\n  if (typeof schema.sortMapEntries === 'function') {\n    map.items.sort(schema.sortMapEntries);\n  }\n\n  return map;\n}\n\nvar map = {\n  createNode: createMap,\n  default: true,\n  nodeClass: YAMLMap,\n  tag: 'tag:yaml.org,2002:map',\n  resolve: resolveMap\n};\n\nfunction createSeq(schema, obj, ctx) {\n  var seq = new YAMLSeq(schema);\n\n  if (obj && obj[Symbol.iterator]) {\n    var _iterator = _createForOfIteratorHelper(obj),\n        _step;\n\n    try {\n      for (_iterator.s(); !(_step = _iterator.n()).done;) {\n        var it = _step.value;\n        var v = schema.createNode(it, ctx.wrapScalars, null, ctx);\n        seq.items.push(v);\n      }\n    } catch (err) {\n      _iterator.e(err);\n    } finally {\n      _iterator.f();\n    }\n  }\n\n  return seq;\n}\n\nvar seq = {\n  createNode: createSeq,\n  default: true,\n  nodeClass: YAMLSeq,\n  tag: 'tag:yaml.org,2002:seq',\n  resolve: resolveSeq\n};\n\nvar string = {\n  identify: function identify(value) {\n    return typeof value === 'string';\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:str',\n  resolve: resolveString,\n  stringify: function stringify(item, ctx, onComment, onChompKeep) {\n    ctx = Object.assign({\n      actualString: true\n    }, ctx);\n    return stringifyString(item, ctx, onComment, onChompKeep);\n  },\n  options: strOptions\n};\n\nvar failsafe = [map, seq, string];\n\n/* global BigInt */\n\nvar intIdentify$2 = function intIdentify(value) {\n  return typeof value === 'bigint' || Number.isInteger(value);\n};\n\nvar intResolve$1 = function intResolve(src, part, radix) {\n  return intOptions.asBigInt ? BigInt(src) : parseInt(part, radix);\n};\n\nfunction intStringify$1(node, radix, prefix) {\n  var value = node.value;\n  if (intIdentify$2(value) && value >= 0) return prefix + value.toString(radix);\n  return stringifyNumber(node);\n}\n\nvar nullObj = {\n  identify: function identify(value) {\n    return value == null;\n  },\n  createNode: function createNode(schema, value, ctx) {\n    return ctx.wrapScalars ? new Scalar(null) : null;\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:null',\n  test: /^(?:~|[Nn]ull|NULL)?$/,\n  resolve: function resolve() {\n    return null;\n  },\n  options: nullOptions,\n  stringify: function stringify() {\n    return nullOptions.nullStr;\n  }\n};\nvar boolObj = {\n  identify: function identify(value) {\n    return typeof value === 'boolean';\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:bool',\n  test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,\n  resolve: function resolve(str) {\n    return str[0] === 't' || str[0] === 'T';\n  },\n  options: boolOptions,\n  stringify: function stringify(_ref) {\n    var value = _ref.value;\n    return value ? boolOptions.trueStr : boolOptions.falseStr;\n  }\n};\nvar octObj = {\n  identify: function identify(value) {\n    return intIdentify$2(value) && value >= 0;\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:int',\n  format: 'OCT',\n  test: /^0o([0-7]+)$/,\n  resolve: function resolve(str, oct) {\n    return intResolve$1(str, oct, 8);\n  },\n  options: intOptions,\n  stringify: function stringify(node) {\n    return intStringify$1(node, 8, '0o');\n  }\n};\nvar intObj = {\n  identify: intIdentify$2,\n  default: true,\n  tag: 'tag:yaml.org,2002:int',\n  test: /^[-+]?[0-9]+$/,\n  resolve: function resolve(str) {\n    return intResolve$1(str, str, 10);\n  },\n  options: intOptions,\n  stringify: stringifyNumber\n};\nvar hexObj = {\n  identify: function identify(value) {\n    return intIdentify$2(value) && value >= 0;\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:int',\n  format: 'HEX',\n  test: /^0x([0-9a-fA-F]+)$/,\n  resolve: function resolve(str, hex) {\n    return intResolve$1(str, hex, 16);\n  },\n  options: intOptions,\n  stringify: function stringify(node) {\n    return intStringify$1(node, 16, '0x');\n  }\n};\nvar nanObj = {\n  identify: function identify(value) {\n    return typeof value === 'number';\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:float',\n  test: /^(?:[-+]?\\.inf|(\\.nan))$/i,\n  resolve: function resolve(str, nan) {\n    return nan ? NaN : str[0] === '-' ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY;\n  },\n  stringify: stringifyNumber\n};\nvar expObj = {\n  identify: function identify(value) {\n    return typeof value === 'number';\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:float',\n  format: 'EXP',\n  test: /^[-+]?(?:\\.[0-9]+|[0-9]+(?:\\.[0-9]*)?)[eE][-+]?[0-9]+$/,\n  resolve: function resolve(str) {\n    return parseFloat(str);\n  },\n  stringify: function stringify(_ref2) {\n    var value = _ref2.value;\n    return Number(value).toExponential();\n  }\n};\nvar floatObj = {\n  identify: function identify(value) {\n    return typeof value === 'number';\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:float',\n  test: /^[-+]?(?:\\.([0-9]+)|[0-9]+\\.([0-9]*))$/,\n  resolve: function resolve(str, frac1, frac2) {\n    var frac = frac1 || frac2;\n    var node = new Scalar(parseFloat(str));\n    if (frac && frac[frac.length - 1] === '0') node.minFractionDigits = frac.length;\n    return node;\n  },\n  stringify: stringifyNumber\n};\nvar core = failsafe.concat([nullObj, boolObj, octObj, intObj, hexObj, nanObj, expObj, floatObj]);\n\n/* global BigInt */\n\nvar intIdentify$1 = function intIdentify(value) {\n  return typeof value === 'bigint' || Number.isInteger(value);\n};\n\nvar stringifyJSON = function stringifyJSON(_ref) {\n  var value = _ref.value;\n  return JSON.stringify(value);\n};\n\nvar json = [map, seq, {\n  identify: function identify(value) {\n    return typeof value === 'string';\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:str',\n  resolve: resolveString,\n  stringify: stringifyJSON\n}, {\n  identify: function identify(value) {\n    return value == null;\n  },\n  createNode: function createNode(schema, value, ctx) {\n    return ctx.wrapScalars ? new Scalar(null) : null;\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:null',\n  test: /^null$/,\n  resolve: function resolve() {\n    return null;\n  },\n  stringify: stringifyJSON\n}, {\n  identify: function identify(value) {\n    return typeof value === 'boolean';\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:bool',\n  test: /^true|false$/,\n  resolve: function resolve(str) {\n    return str === 'true';\n  },\n  stringify: stringifyJSON\n}, {\n  identify: intIdentify$1,\n  default: true,\n  tag: 'tag:yaml.org,2002:int',\n  test: /^-?(?:0|[1-9][0-9]*)$/,\n  resolve: function resolve(str) {\n    return intOptions.asBigInt ? BigInt(str) : parseInt(str, 10);\n  },\n  stringify: function stringify(_ref2) {\n    var value = _ref2.value;\n    return intIdentify$1(value) ? value.toString() : JSON.stringify(value);\n  }\n}, {\n  identify: function identify(value) {\n    return typeof value === 'number';\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:float',\n  test: /^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,\n  resolve: function resolve(str) {\n    return parseFloat(str);\n  },\n  stringify: stringifyJSON\n}];\n\njson.scalarFallback = function (str) {\n  throw new SyntaxError(\"Unresolved plain scalar \".concat(JSON.stringify(str)));\n};\n\n/* global BigInt */\n\nvar boolStringify = function boolStringify(_ref) {\n  var value = _ref.value;\n  return value ? boolOptions.trueStr : boolOptions.falseStr;\n};\n\nvar intIdentify = function intIdentify(value) {\n  return typeof value === 'bigint' || Number.isInteger(value);\n};\n\nfunction intResolve(sign, src, radix) {\n  var str = src.replace(/_/g, '');\n\n  if (intOptions.asBigInt) {\n    switch (radix) {\n      case 2:\n        str = \"0b\".concat(str);\n        break;\n\n      case 8:\n        str = \"0o\".concat(str);\n        break;\n\n      case 16:\n        str = \"0x\".concat(str);\n        break;\n    }\n\n    var _n = BigInt(str);\n\n    return sign === '-' ? BigInt(-1) * _n : _n;\n  }\n\n  var n = parseInt(str, radix);\n  return sign === '-' ? -1 * n : n;\n}\n\nfunction intStringify(node, radix, prefix) {\n  var value = node.value;\n\n  if (intIdentify(value)) {\n    var str = value.toString(radix);\n    return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;\n  }\n\n  return stringifyNumber(node);\n}\n\nvar yaml11 = failsafe.concat([{\n  identify: function identify(value) {\n    return value == null;\n  },\n  createNode: function createNode(schema, value, ctx) {\n    return ctx.wrapScalars ? new Scalar(null) : null;\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:null',\n  test: /^(?:~|[Nn]ull|NULL)?$/,\n  resolve: function resolve() {\n    return null;\n  },\n  options: nullOptions,\n  stringify: function stringify() {\n    return nullOptions.nullStr;\n  }\n}, {\n  identify: function identify(value) {\n    return typeof value === 'boolean';\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:bool',\n  test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,\n  resolve: function resolve() {\n    return true;\n  },\n  options: boolOptions,\n  stringify: boolStringify\n}, {\n  identify: function identify(value) {\n    return typeof value === 'boolean';\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:bool',\n  test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,\n  resolve: function resolve() {\n    return false;\n  },\n  options: boolOptions,\n  stringify: boolStringify\n}, {\n  identify: intIdentify,\n  default: true,\n  tag: 'tag:yaml.org,2002:int',\n  format: 'BIN',\n  test: /^([-+]?)0b([0-1_]+)$/,\n  resolve: function resolve(str, sign, bin) {\n    return intResolve(sign, bin, 2);\n  },\n  stringify: function stringify(node) {\n    return intStringify(node, 2, '0b');\n  }\n}, {\n  identify: intIdentify,\n  default: true,\n  tag: 'tag:yaml.org,2002:int',\n  format: 'OCT',\n  test: /^([-+]?)0([0-7_]+)$/,\n  resolve: function resolve(str, sign, oct) {\n    return intResolve(sign, oct, 8);\n  },\n  stringify: function stringify(node) {\n    return intStringify(node, 8, '0');\n  }\n}, {\n  identify: intIdentify,\n  default: true,\n  tag: 'tag:yaml.org,2002:int',\n  test: /^([-+]?)([0-9][0-9_]*)$/,\n  resolve: function resolve(str, sign, abs) {\n    return intResolve(sign, abs, 10);\n  },\n  stringify: stringifyNumber\n}, {\n  identify: intIdentify,\n  default: true,\n  tag: 'tag:yaml.org,2002:int',\n  format: 'HEX',\n  test: /^([-+]?)0x([0-9a-fA-F_]+)$/,\n  resolve: function resolve(str, sign, hex) {\n    return intResolve(sign, hex, 16);\n  },\n  stringify: function stringify(node) {\n    return intStringify(node, 16, '0x');\n  }\n}, {\n  identify: function identify(value) {\n    return typeof value === 'number';\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:float',\n  test: /^(?:[-+]?\\.inf|(\\.nan))$/i,\n  resolve: function resolve(str, nan) {\n    return nan ? NaN : str[0] === '-' ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY;\n  },\n  stringify: stringifyNumber\n}, {\n  identify: function identify(value) {\n    return typeof value === 'number';\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:float',\n  format: 'EXP',\n  test: /^[-+]?([0-9][0-9_]*)?(\\.[0-9_]*)?[eE][-+]?[0-9]+$/,\n  resolve: function resolve(str) {\n    return parseFloat(str.replace(/_/g, ''));\n  },\n  stringify: function stringify(_ref2) {\n    var value = _ref2.value;\n    return Number(value).toExponential();\n  }\n}, {\n  identify: function identify(value) {\n    return typeof value === 'number';\n  },\n  default: true,\n  tag: 'tag:yaml.org,2002:float',\n  test: /^[-+]?(?:[0-9][0-9_]*)?\\.([0-9_]*)$/,\n  resolve: function resolve(str, frac) {\n    var node = new Scalar(parseFloat(str.replace(/_/g, '')));\n\n    if (frac) {\n      var f = frac.replace(/_/g, '');\n      if (f[f.length - 1] === '0') node.minFractionDigits = f.length;\n    }\n\n    return node;\n  },\n  stringify: stringifyNumber\n}], binary, omap, pairs, set, intTime, floatTime, timestamp);\n\nvar schemas = {\n  core: core,\n  failsafe: failsafe,\n  json: json,\n  yaml11: yaml11\n};\nvar tags = {\n  binary: binary,\n  bool: boolObj,\n  float: floatObj,\n  floatExp: expObj,\n  floatNaN: nanObj,\n  floatTime: floatTime,\n  int: intObj,\n  intHex: hexObj,\n  intOct: octObj,\n  intTime: intTime,\n  map: map,\n  null: nullObj,\n  omap: omap,\n  pairs: pairs,\n  seq: seq,\n  set: set,\n  timestamp: timestamp\n};\n\nfunction findTagObject(value, tagName, tags) {\n  if (tagName) {\n    var match = tags.filter(function (t) {\n      return t.tag === tagName;\n    });\n    var tagObj = match.find(function (t) {\n      return !t.format;\n    }) || match[0];\n    if (!tagObj) throw new Error(\"Tag \".concat(tagName, \" not found\"));\n    return tagObj;\n  } // TODO: deprecate/remove class check\n\n\n  return tags.find(function (t) {\n    return (t.identify && t.identify(value) || t.class && value instanceof t.class) && !t.format;\n  });\n}\n\nfunction createNode(value, tagName, ctx) {\n  if (value instanceof Node) return value;\n  var defaultPrefix = ctx.defaultPrefix,\n      onTagObj = ctx.onTagObj,\n      prevObjects = ctx.prevObjects,\n      schema = ctx.schema,\n      wrapScalars = ctx.wrapScalars;\n  if (tagName && tagName.startsWith('!!')) tagName = defaultPrefix + tagName.slice(2);\n  var tagObj = findTagObject(value, tagName, schema.tags);\n\n  if (!tagObj) {\n    if (typeof value.toJSON === 'function') value = value.toJSON();\n    if (!value || _typeof(value) !== 'object') return wrapScalars ? new Scalar(value) : value;\n    tagObj = value instanceof Map ? map : value[Symbol.iterator] ? seq : map;\n  }\n\n  if (onTagObj) {\n    onTagObj(tagObj);\n    delete ctx.onTagObj;\n  } // Detect duplicate references to the same object & use Alias nodes for all\n  // after first. The `obj` wrapper allows for circular references to resolve.\n\n\n  var obj = {\n    value: undefined,\n    node: undefined\n  };\n\n  if (value && _typeof(value) === 'object' && prevObjects) {\n    var prev = prevObjects.get(value);\n\n    if (prev) {\n      var alias = new Alias(prev); // leaves source dirty; must be cleaned by caller\n\n      ctx.aliasNodes.push(alias); // defined along with prevObjects\n\n      return alias;\n    }\n\n    obj.value = value;\n    prevObjects.set(value, obj);\n  }\n\n  obj.node = tagObj.createNode ? tagObj.createNode(ctx.schema, value, ctx) : wrapScalars ? new Scalar(value) : value;\n  if (tagName && obj.node instanceof Node) obj.node.tag = tagName;\n  return obj.node;\n}\n\nfunction getSchemaTags(schemas, knownTags, customTags, schemaId) {\n  var tags = schemas[schemaId.replace(/\\W/g, '')]; // 'yaml-1.1' -> 'yaml11'\n\n  if (!tags) {\n    var keys = Object.keys(schemas).map(function (key) {\n      return JSON.stringify(key);\n    }).join(', ');\n    throw new Error(\"Unknown schema \\\"\".concat(schemaId, \"\\\"; use one of \").concat(keys));\n  }\n\n  if (Array.isArray(customTags)) {\n    var _iterator = _createForOfIteratorHelper(customTags),\n        _step;\n\n    try {\n      for (_iterator.s(); !(_step = _iterator.n()).done;) {\n        var tag = _step.value;\n        tags = tags.concat(tag);\n      }\n    } catch (err) {\n      _iterator.e(err);\n    } finally {\n      _iterator.f();\n    }\n  } else if (typeof customTags === 'function') {\n    tags = customTags(tags.slice());\n  }\n\n  for (var i = 0; i < tags.length; ++i) {\n    var _tag = tags[i];\n\n    if (typeof _tag === 'string') {\n      var tagObj = knownTags[_tag];\n\n      if (!tagObj) {\n        var _keys = Object.keys(knownTags).map(function (key) {\n          return JSON.stringify(key);\n        }).join(', ');\n\n        throw new Error(\"Unknown custom tag \\\"\".concat(_tag, \"\\\"; use one of \").concat(_keys));\n      }\n\n      tags[i] = tagObj;\n    }\n  }\n\n  return tags;\n}\n\nvar sortMapEntriesByKey = function sortMapEntriesByKey(a, b) {\n  return a.key < b.key ? -1 : a.key > b.key ? 1 : 0;\n};\n\nvar Schema = /*#__PURE__*/function () {\n  // TODO: remove in v2\n  // TODO: remove in v2\n  function Schema(_ref) {\n    var customTags = _ref.customTags,\n        merge = _ref.merge,\n        schema = _ref.schema,\n        sortMapEntries = _ref.sortMapEntries,\n        deprecatedCustomTags = _ref.tags;\n\n    _classCallCheck(this, Schema);\n\n    this.merge = !!merge;\n    this.name = schema;\n    this.sortMapEntries = sortMapEntries === true ? sortMapEntriesByKey : sortMapEntries || null;\n    if (!customTags && deprecatedCustomTags) warnOptionDeprecation('tags', 'customTags');\n    this.tags = getSchemaTags(schemas, tags, customTags || deprecatedCustomTags, schema);\n  }\n\n  _createClass(Schema, [{\n    key: \"createNode\",\n    value: function createNode$1(value, wrapScalars, tagName, ctx) {\n      var baseCtx = {\n        defaultPrefix: Schema.defaultPrefix,\n        schema: this,\n        wrapScalars: wrapScalars\n      };\n      var createCtx = ctx ? Object.assign(ctx, baseCtx) : baseCtx;\n      return createNode(value, tagName, createCtx);\n    }\n  }, {\n    key: \"createPair\",\n    value: function createPair(key, value, ctx) {\n      if (!ctx) ctx = {\n        wrapScalars: true\n      };\n      var k = this.createNode(key, ctx.wrapScalars, null, ctx);\n      var v = this.createNode(value, ctx.wrapScalars, null, ctx);\n      return new Pair(k, v);\n    }\n  }]);\n\n  return Schema;\n}();\n\n_defineProperty(Schema, \"defaultPrefix\", defaultTagPrefix);\n\n_defineProperty(Schema, \"defaultTags\", defaultTags);\n\nexport { Schema as S };\n","import { d as defaultTagPrefix, _ as _createForOfIteratorHelper, a as _typeof, b as _createClass, c as _classCallCheck, e as _defineProperty, Y as YAMLSyntaxError, T as Type, f as YAMLWarning, g as YAMLSemanticError, h as _slicedToArray, i as YAMLError, j as _inherits, k as _createSuper } from './PlainValue-b8036b75.js';\nimport { parse as parse$1 } from './parse-cst.js';\nimport { b as binaryOptions, a as boolOptions, i as intOptions, n as nullOptions, s as strOptions, N as Node, P as Pair, S as Scalar, c as stringifyString, A as Alias, Y as YAMLSeq, d as YAMLMap, M as Merge, C as Collection, r as resolveNode, e as isEmptyPath, t as toJSON, f as addComment } from './resolveSeq-492ab440.js';\nimport { S as Schema } from './Schema-e94716c8.js';\nimport { w as warn } from './warnings-df54cb69.js';\n\nvar defaultOptions = {\n  anchorPrefix: 'a',\n  customTags: null,\n  indent: 2,\n  indentSeq: true,\n  keepCstNodes: false,\n  keepNodeTypes: true,\n  keepBlobsInJSON: true,\n  mapAsMap: false,\n  maxAliasCount: 100,\n  prettyErrors: false,\n  // TODO Set true in v2\n  simpleKeys: false,\n  version: '1.2'\n};\nvar scalarOptions = {\n  get binary() {\n    return binaryOptions;\n  },\n\n  set binary(opt) {\n    Object.assign(binaryOptions, opt);\n  },\n\n  get bool() {\n    return boolOptions;\n  },\n\n  set bool(opt) {\n    Object.assign(boolOptions, opt);\n  },\n\n  get int() {\n    return intOptions;\n  },\n\n  set int(opt) {\n    Object.assign(intOptions, opt);\n  },\n\n  get null() {\n    return nullOptions;\n  },\n\n  set null(opt) {\n    Object.assign(nullOptions, opt);\n  },\n\n  get str() {\n    return strOptions;\n  },\n\n  set str(opt) {\n    Object.assign(strOptions, opt);\n  }\n\n};\nvar documentOptions = {\n  '1.0': {\n    schema: 'yaml-1.1',\n    merge: true,\n    tagPrefixes: [{\n      handle: '!',\n      prefix: defaultTagPrefix\n    }, {\n      handle: '!!',\n      prefix: 'tag:private.yaml.org,2002:'\n    }]\n  },\n  1.1: {\n    schema: 'yaml-1.1',\n    merge: true,\n    tagPrefixes: [{\n      handle: '!',\n      prefix: '!'\n    }, {\n      handle: '!!',\n      prefix: defaultTagPrefix\n    }]\n  },\n  1.2: {\n    schema: 'core',\n    merge: false,\n    tagPrefixes: [{\n      handle: '!',\n      prefix: '!'\n    }, {\n      handle: '!!',\n      prefix: defaultTagPrefix\n    }]\n  }\n};\n\nfunction stringifyTag(doc, tag) {\n  if ((doc.version || doc.options.version) === '1.0') {\n    var priv = tag.match(/^tag:private\\.yaml\\.org,2002:([^:/]+)$/);\n    if (priv) return '!' + priv[1];\n    var vocab = tag.match(/^tag:([a-zA-Z0-9-]+)\\.yaml\\.org,2002:(.*)/);\n    return vocab ? \"!\".concat(vocab[1], \"/\").concat(vocab[2]) : \"!\".concat(tag.replace(/^tag:/, ''));\n  }\n\n  var p = doc.tagPrefixes.find(function (p) {\n    return tag.indexOf(p.prefix) === 0;\n  });\n\n  if (!p) {\n    var dtp = doc.getDefaults().tagPrefixes;\n    p = dtp && dtp.find(function (p) {\n      return tag.indexOf(p.prefix) === 0;\n    });\n  }\n\n  if (!p) return tag[0] === '!' ? tag : \"!<\".concat(tag, \">\");\n  var suffix = tag.substr(p.prefix.length).replace(/[!,[\\]{}]/g, function (ch) {\n    return {\n      '!': '%21',\n      ',': '%2C',\n      '[': '%5B',\n      ']': '%5D',\n      '{': '%7B',\n      '}': '%7D'\n    }[ch];\n  });\n  return p.handle + suffix;\n}\n\nfunction getTagObject(tags, item) {\n  if (item instanceof Alias) return Alias;\n\n  if (item.tag) {\n    var match = tags.filter(function (t) {\n      return t.tag === item.tag;\n    });\n    if (match.length > 0) return match.find(function (t) {\n      return t.format === item.format;\n    }) || match[0];\n  }\n\n  var tagObj, obj;\n\n  if (item instanceof Scalar) {\n    obj = item.value; // TODO: deprecate/remove class check\n\n    var _match = tags.filter(function (t) {\n      return t.identify && t.identify(obj) || t.class && obj instanceof t.class;\n    });\n\n    tagObj = _match.find(function (t) {\n      return t.format === item.format;\n    }) || _match.find(function (t) {\n      return !t.format;\n    });\n  } else {\n    obj = item;\n    tagObj = tags.find(function (t) {\n      return t.nodeClass && obj instanceof t.nodeClass;\n    });\n  }\n\n  if (!tagObj) {\n    var name = obj && obj.constructor ? obj.constructor.name : _typeof(obj);\n    throw new Error(\"Tag not resolved for \".concat(name, \" value\"));\n  }\n\n  return tagObj;\n} // needs to be called before value stringifier to allow for circular anchor refs\n\n\nfunction stringifyProps(node, tagObj, _ref) {\n  var anchors = _ref.anchors,\n      doc = _ref.doc;\n  var props = [];\n  var anchor = doc.anchors.getName(node);\n\n  if (anchor) {\n    anchors[anchor] = node;\n    props.push(\"&\".concat(anchor));\n  }\n\n  if (node.tag) {\n    props.push(stringifyTag(doc, node.tag));\n  } else if (!tagObj.default) {\n    props.push(stringifyTag(doc, tagObj.tag));\n  }\n\n  return props.join(' ');\n}\n\nfunction stringify$1(item, ctx, onComment, onChompKeep) {\n  var _ctx$doc = ctx.doc,\n      anchors = _ctx$doc.anchors,\n      schema = _ctx$doc.schema;\n  var tagObj;\n\n  if (!(item instanceof Node)) {\n    var createCtx = {\n      aliasNodes: [],\n      onTagObj: function onTagObj(o) {\n        return tagObj = o;\n      },\n      prevObjects: new Map()\n    };\n    item = schema.createNode(item, true, null, createCtx);\n\n    var _iterator = _createForOfIteratorHelper(createCtx.aliasNodes),\n        _step;\n\n    try {\n      for (_iterator.s(); !(_step = _iterator.n()).done;) {\n        var alias = _step.value;\n        alias.source = alias.source.node;\n        var name = anchors.getName(alias.source);\n\n        if (!name) {\n          name = anchors.newName();\n          anchors.map[name] = alias.source;\n        }\n      }\n    } catch (err) {\n      _iterator.e(err);\n    } finally {\n      _iterator.f();\n    }\n  }\n\n  if (item instanceof Pair) return item.toString(ctx, onComment, onChompKeep);\n  if (!tagObj) tagObj = getTagObject(schema.tags, item);\n  var props = stringifyProps(item, tagObj, ctx);\n  if (props.length > 0) ctx.indentAtStart = (ctx.indentAtStart || 0) + props.length + 1;\n  var str = typeof tagObj.stringify === 'function' ? tagObj.stringify(item, ctx, onComment, onChompKeep) : item instanceof Scalar ? stringifyString(item, ctx, onComment, onChompKeep) : item.toString(ctx, onComment, onChompKeep);\n  if (!props) return str;\n  return item instanceof Scalar || str[0] === '{' || str[0] === '[' ? \"\".concat(props, \" \").concat(str) : \"\".concat(props, \"\\n\").concat(ctx.indent).concat(str);\n}\n\nvar Anchors = /*#__PURE__*/function () {\n  function Anchors(prefix) {\n    _classCallCheck(this, Anchors);\n\n    _defineProperty(this, \"map\", Object.create(null));\n\n    this.prefix = prefix;\n  }\n\n  _createClass(Anchors, [{\n    key: \"createAlias\",\n    value: function createAlias(node, name) {\n      this.setAnchor(node, name);\n      return new Alias(node);\n    }\n  }, {\n    key: \"createMergePair\",\n    value: function createMergePair() {\n      var _this = this;\n\n      var merge = new Merge();\n\n      for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {\n        sources[_key] = arguments[_key];\n      }\n\n      merge.value.items = sources.map(function (s) {\n        if (s instanceof Alias) {\n          if (s.source instanceof YAMLMap) return s;\n        } else if (s instanceof YAMLMap) {\n          return _this.createAlias(s);\n        }\n\n        throw new Error('Merge sources must be Map nodes or their Aliases');\n      });\n      return merge;\n    }\n  }, {\n    key: \"getName\",\n    value: function getName(node) {\n      var map = this.map;\n      return Object.keys(map).find(function (a) {\n        return map[a] === node;\n      });\n    }\n  }, {\n    key: \"getNames\",\n    value: function getNames() {\n      return Object.keys(this.map);\n    }\n  }, {\n    key: \"getNode\",\n    value: function getNode(name) {\n      return this.map[name];\n    }\n  }, {\n    key: \"newName\",\n    value: function newName(prefix) {\n      if (!prefix) prefix = this.prefix;\n      var names = Object.keys(this.map);\n\n      for (var i = 1; true; ++i) {\n        var name = \"\".concat(prefix).concat(i);\n        if (!names.includes(name)) return name;\n      }\n    } // During parsing, map & aliases contain CST nodes\n\n  }, {\n    key: \"resolveNodes\",\n    value: function resolveNodes() {\n      var map = this.map,\n          _cstAliases = this._cstAliases;\n      Object.keys(map).forEach(function (a) {\n        map[a] = map[a].resolved;\n      });\n\n      _cstAliases.forEach(function (a) {\n        a.source = a.source.resolved;\n      });\n\n      delete this._cstAliases;\n    }\n  }, {\n    key: \"setAnchor\",\n    value: function setAnchor(node, name) {\n      if (node != null && !Anchors.validAnchorNode(node)) {\n        throw new Error('Anchors may only be set for Scalar, Seq and Map nodes');\n      }\n\n      if (name && /[\\x00-\\x19\\s,[\\]{}]/.test(name)) {\n        throw new Error('Anchor names must not contain whitespace or control characters');\n      }\n\n      var map = this.map;\n      var prev = node && Object.keys(map).find(function (a) {\n        return map[a] === node;\n      });\n\n      if (prev) {\n        if (!name) {\n          return prev;\n        } else if (prev !== name) {\n          delete map[prev];\n          map[name] = node;\n        }\n      } else {\n        if (!name) {\n          if (!node) return null;\n          name = this.newName();\n        }\n\n        map[name] = node;\n      }\n\n      return name;\n    }\n  }], [{\n    key: \"validAnchorNode\",\n    value: function validAnchorNode(node) {\n      return node instanceof Scalar || node instanceof YAMLSeq || node instanceof YAMLMap;\n    }\n  }]);\n\n  return Anchors;\n}();\n\nvar visit = function visit(node, tags) {\n  if (node && _typeof(node) === 'object') {\n    var tag = node.tag;\n\n    if (node instanceof Collection) {\n      if (tag) tags[tag] = true;\n      node.items.forEach(function (n) {\n        return visit(n, tags);\n      });\n    } else if (node instanceof Pair) {\n      visit(node.key, tags);\n      visit(node.value, tags);\n    } else if (node instanceof Scalar) {\n      if (tag) tags[tag] = true;\n    }\n  }\n\n  return tags;\n};\n\nvar listTagNames = function listTagNames(node) {\n  return Object.keys(visit(node, {}));\n};\n\nfunction parseContents(doc, contents) {\n  var comments = {\n    before: [],\n    after: []\n  };\n  var body = undefined;\n  var spaceBefore = false;\n\n  var _iterator = _createForOfIteratorHelper(contents),\n      _step;\n\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var node = _step.value;\n\n      if (node.valueRange) {\n        if (body !== undefined) {\n          var msg = 'Document contains trailing content not separated by a ... or --- line';\n          doc.errors.push(new YAMLSyntaxError(node, msg));\n          break;\n        }\n\n        var res = resolveNode(doc, node);\n\n        if (spaceBefore) {\n          res.spaceBefore = true;\n          spaceBefore = false;\n        }\n\n        body = res;\n      } else if (node.comment !== null) {\n        var cc = body === undefined ? comments.before : comments.after;\n        cc.push(node.comment);\n      } else if (node.type === Type.BLANK_LINE) {\n        spaceBefore = true;\n\n        if (body === undefined && comments.before.length > 0 && !doc.commentBefore) {\n          // space-separated comments at start are parsed as document comments\n          doc.commentBefore = comments.before.join('\\n');\n          comments.before = [];\n        }\n      }\n    }\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n\n  doc.contents = body || null;\n\n  if (!body) {\n    doc.comment = comments.before.concat(comments.after).join('\\n') || null;\n  } else {\n    var cb = comments.before.join('\\n');\n\n    if (cb) {\n      var cbNode = body instanceof Collection && body.items[0] ? body.items[0] : body;\n      cbNode.commentBefore = cbNode.commentBefore ? \"\".concat(cb, \"\\n\").concat(cbNode.commentBefore) : cb;\n    }\n\n    doc.comment = comments.after.join('\\n') || null;\n  }\n}\n\nfunction resolveTagDirective(_ref, directive) {\n  var tagPrefixes = _ref.tagPrefixes;\n\n  var _directive$parameters = _slicedToArray(directive.parameters, 2),\n      handle = _directive$parameters[0],\n      prefix = _directive$parameters[1];\n\n  if (!handle || !prefix) {\n    var msg = 'Insufficient parameters given for %TAG directive';\n    throw new YAMLSemanticError(directive, msg);\n  }\n\n  if (tagPrefixes.some(function (p) {\n    return p.handle === handle;\n  })) {\n    var _msg = 'The %TAG directive must only be given at most once per handle in the same document.';\n    throw new YAMLSemanticError(directive, _msg);\n  }\n\n  return {\n    handle: handle,\n    prefix: prefix\n  };\n}\n\nfunction resolveYamlDirective(doc, directive) {\n  var _directive$parameters2 = _slicedToArray(directive.parameters, 1),\n      version = _directive$parameters2[0];\n\n  if (directive.name === 'YAML:1.0') version = '1.0';\n\n  if (!version) {\n    var msg = 'Insufficient parameters given for %YAML directive';\n    throw new YAMLSemanticError(directive, msg);\n  }\n\n  if (!documentOptions[version]) {\n    var v0 = doc.version || doc.options.version;\n\n    var _msg2 = \"Document will be parsed as YAML \".concat(v0, \" rather than YAML \").concat(version);\n\n    doc.warnings.push(new YAMLWarning(directive, _msg2));\n  }\n\n  return version;\n}\n\nfunction parseDirectives(doc, directives, prevDoc) {\n  var directiveComments = [];\n  var hasDirectives = false;\n\n  var _iterator = _createForOfIteratorHelper(directives),\n      _step;\n\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var directive = _step.value;\n      var comment = directive.comment,\n          name = directive.name;\n\n      switch (name) {\n        case 'TAG':\n          try {\n            doc.tagPrefixes.push(resolveTagDirective(doc, directive));\n          } catch (error) {\n            doc.errors.push(error);\n          }\n\n          hasDirectives = true;\n          break;\n\n        case 'YAML':\n        case 'YAML:1.0':\n          if (doc.version) {\n            var msg = 'The %YAML directive must only be given at most once per document.';\n            doc.errors.push(new YAMLSemanticError(directive, msg));\n          }\n\n          try {\n            doc.version = resolveYamlDirective(doc, directive);\n          } catch (error) {\n            doc.errors.push(error);\n          }\n\n          hasDirectives = true;\n          break;\n\n        default:\n          if (name) {\n            var _msg3 = \"YAML only supports %TAG and %YAML directives, and not %\".concat(name);\n\n            doc.warnings.push(new YAMLWarning(directive, _msg3));\n          }\n\n      }\n\n      if (comment) directiveComments.push(comment);\n    }\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n\n  if (prevDoc && !hasDirectives && '1.1' === (doc.version || prevDoc.version || doc.options.version)) {\n    var copyTagPrefix = function copyTagPrefix(_ref2) {\n      var handle = _ref2.handle,\n          prefix = _ref2.prefix;\n      return {\n        handle: handle,\n        prefix: prefix\n      };\n    };\n\n    doc.tagPrefixes = prevDoc.tagPrefixes.map(copyTagPrefix);\n    doc.version = prevDoc.version;\n  }\n\n  doc.commentBefore = directiveComments.join('\\n') || null;\n}\n\nfunction assertCollection(contents) {\n  if (contents instanceof Collection) return true;\n  throw new Error('Expected a YAML collection as document contents');\n}\n\nvar Document$1 = /*#__PURE__*/function () {\n  function Document(options) {\n    _classCallCheck(this, Document);\n\n    this.anchors = new Anchors(options.anchorPrefix);\n    this.commentBefore = null;\n    this.comment = null;\n    this.contents = null;\n    this.directivesEndMarker = null;\n    this.errors = [];\n    this.options = options;\n    this.schema = null;\n    this.tagPrefixes = [];\n    this.version = null;\n    this.warnings = [];\n  }\n\n  _createClass(Document, [{\n    key: \"add\",\n    value: function add(value) {\n      assertCollection(this.contents);\n      return this.contents.add(value);\n    }\n  }, {\n    key: \"addIn\",\n    value: function addIn(path, value) {\n      assertCollection(this.contents);\n      this.contents.addIn(path, value);\n    }\n  }, {\n    key: \"delete\",\n    value: function _delete(key) {\n      assertCollection(this.contents);\n      return this.contents.delete(key);\n    }\n  }, {\n    key: \"deleteIn\",\n    value: function deleteIn(path) {\n      if (isEmptyPath(path)) {\n        if (this.contents == null) return false;\n        this.contents = null;\n        return true;\n      }\n\n      assertCollection(this.contents);\n      return this.contents.deleteIn(path);\n    }\n  }, {\n    key: \"getDefaults\",\n    value: function getDefaults() {\n      return Document.defaults[this.version] || Document.defaults[this.options.version] || {};\n    }\n  }, {\n    key: \"get\",\n    value: function get(key, keepScalar) {\n      return this.contents instanceof Collection ? this.contents.get(key, keepScalar) : undefined;\n    }\n  }, {\n    key: \"getIn\",\n    value: function getIn(path, keepScalar) {\n      if (isEmptyPath(path)) return !keepScalar && this.contents instanceof Scalar ? this.contents.value : this.contents;\n      return this.contents instanceof Collection ? this.contents.getIn(path, keepScalar) : undefined;\n    }\n  }, {\n    key: \"has\",\n    value: function has(key) {\n      return this.contents instanceof Collection ? this.contents.has(key) : false;\n    }\n  }, {\n    key: \"hasIn\",\n    value: function hasIn(path) {\n      if (isEmptyPath(path)) return this.contents !== undefined;\n      return this.contents instanceof Collection ? this.contents.hasIn(path) : false;\n    }\n  }, {\n    key: \"set\",\n    value: function set(key, value) {\n      assertCollection(this.contents);\n      this.contents.set(key, value);\n    }\n  }, {\n    key: \"setIn\",\n    value: function setIn(path, value) {\n      if (isEmptyPath(path)) this.contents = value;else {\n        assertCollection(this.contents);\n        this.contents.setIn(path, value);\n      }\n    }\n  }, {\n    key: \"setSchema\",\n    value: function setSchema(id, customTags) {\n      if (!id && !customTags && this.schema) return;\n      if (typeof id === 'number') id = id.toFixed(1);\n\n      if (id === '1.0' || id === '1.1' || id === '1.2') {\n        if (this.version) this.version = id;else this.options.version = id;\n        delete this.options.schema;\n      } else if (id && typeof id === 'string') {\n        this.options.schema = id;\n      }\n\n      if (Array.isArray(customTags)) this.options.customTags = customTags;\n      var opt = Object.assign({}, this.getDefaults(), this.options);\n      this.schema = new Schema(opt);\n    }\n  }, {\n    key: \"parse\",\n    value: function parse(node, prevDoc) {\n      if (this.options.keepCstNodes) this.cstNode = node;\n      if (this.options.keepNodeTypes) this.type = 'DOCUMENT';\n      var _node$directives = node.directives,\n          directives = _node$directives === void 0 ? [] : _node$directives,\n          _node$contents = node.contents,\n          contents = _node$contents === void 0 ? [] : _node$contents,\n          directivesEndMarker = node.directivesEndMarker,\n          error = node.error,\n          valueRange = node.valueRange;\n\n      if (error) {\n        if (!error.source) error.source = this;\n        this.errors.push(error);\n      }\n\n      parseDirectives(this, directives, prevDoc);\n      if (directivesEndMarker) this.directivesEndMarker = true;\n      this.range = valueRange ? [valueRange.start, valueRange.end] : null;\n      this.setSchema();\n      this.anchors._cstAliases = [];\n      parseContents(this, contents);\n      this.anchors.resolveNodes();\n\n      if (this.options.prettyErrors) {\n        var _iterator = _createForOfIteratorHelper(this.errors),\n            _step;\n\n        try {\n          for (_iterator.s(); !(_step = _iterator.n()).done;) {\n            var _error = _step.value;\n            if (_error instanceof YAMLError) _error.makePretty();\n          }\n        } catch (err) {\n          _iterator.e(err);\n        } finally {\n          _iterator.f();\n        }\n\n        var _iterator2 = _createForOfIteratorHelper(this.warnings),\n            _step2;\n\n        try {\n          for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n            var warn = _step2.value;\n            if (warn instanceof YAMLError) warn.makePretty();\n          }\n        } catch (err) {\n          _iterator2.e(err);\n        } finally {\n          _iterator2.f();\n        }\n      }\n\n      return this;\n    }\n  }, {\n    key: \"listNonDefaultTags\",\n    value: function listNonDefaultTags() {\n      return listTagNames(this.contents).filter(function (t) {\n        return t.indexOf(Schema.defaultPrefix) !== 0;\n      });\n    }\n  }, {\n    key: \"setTagPrefix\",\n    value: function setTagPrefix(handle, prefix) {\n      if (handle[0] !== '!' || handle[handle.length - 1] !== '!') throw new Error('Handle must start and end with !');\n\n      if (prefix) {\n        var prev = this.tagPrefixes.find(function (p) {\n          return p.handle === handle;\n        });\n        if (prev) prev.prefix = prefix;else this.tagPrefixes.push({\n          handle: handle,\n          prefix: prefix\n        });\n      } else {\n        this.tagPrefixes = this.tagPrefixes.filter(function (p) {\n          return p.handle !== handle;\n        });\n      }\n    }\n  }, {\n    key: \"toJSON\",\n    value: function toJSON$1(arg, onAnchor) {\n      var _this = this;\n\n      var _this$options = this.options,\n          keepBlobsInJSON = _this$options.keepBlobsInJSON,\n          mapAsMap = _this$options.mapAsMap,\n          maxAliasCount = _this$options.maxAliasCount;\n      var keep = keepBlobsInJSON && (typeof arg !== 'string' || !(this.contents instanceof Scalar));\n      var ctx = {\n        doc: this,\n        indentStep: '  ',\n        keep: keep,\n        mapAsMap: keep && !!mapAsMap,\n        maxAliasCount: maxAliasCount,\n        stringify: stringify$1 // Requiring directly in Pair would create circular dependencies\n\n      };\n      var anchorNames = Object.keys(this.anchors.map);\n      if (anchorNames.length > 0) ctx.anchors = new Map(anchorNames.map(function (name) {\n        return [_this.anchors.map[name], {\n          alias: [],\n          aliasCount: 0,\n          count: 1\n        }];\n      }));\n\n      var res = toJSON(this.contents, arg, ctx);\n\n      if (typeof onAnchor === 'function' && ctx.anchors) {\n        var _iterator3 = _createForOfIteratorHelper(ctx.anchors.values()),\n            _step3;\n\n        try {\n          for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n            var _step3$value = _step3.value,\n                count = _step3$value.count,\n                _res = _step3$value.res;\n            onAnchor(_res, count);\n          }\n        } catch (err) {\n          _iterator3.e(err);\n        } finally {\n          _iterator3.f();\n        }\n      }\n\n      return res;\n    }\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      if (this.errors.length > 0) throw new Error('Document with errors cannot be stringified');\n      var indentSize = this.options.indent;\n\n      if (!Number.isInteger(indentSize) || indentSize <= 0) {\n        var s = JSON.stringify(indentSize);\n        throw new Error(\"\\\"indent\\\" option must be a positive integer, not \".concat(s));\n      }\n\n      this.setSchema();\n      var lines = [];\n      var hasDirectives = false;\n\n      if (this.version) {\n        var vd = '%YAML 1.2';\n\n        if (this.schema.name === 'yaml-1.1') {\n          if (this.version === '1.0') vd = '%YAML:1.0';else if (this.version === '1.1') vd = '%YAML 1.1';\n        }\n\n        lines.push(vd);\n        hasDirectives = true;\n      }\n\n      var tagNames = this.listNonDefaultTags();\n      this.tagPrefixes.forEach(function (_ref) {\n        var handle = _ref.handle,\n            prefix = _ref.prefix;\n\n        if (tagNames.some(function (t) {\n          return t.indexOf(prefix) === 0;\n        })) {\n          lines.push(\"%TAG \".concat(handle, \" \").concat(prefix));\n          hasDirectives = true;\n        }\n      });\n      if (hasDirectives || this.directivesEndMarker) lines.push('---');\n\n      if (this.commentBefore) {\n        if (hasDirectives || !this.directivesEndMarker) lines.unshift('');\n        lines.unshift(this.commentBefore.replace(/^/gm, '#'));\n      }\n\n      var ctx = {\n        anchors: Object.create(null),\n        doc: this,\n        indent: '',\n        indentStep: ' '.repeat(indentSize),\n        stringify: stringify$1 // Requiring directly in nodes would create circular dependencies\n\n      };\n      var chompKeep = false;\n      var contentComment = null;\n\n      if (this.contents) {\n        if (this.contents instanceof Node) {\n          if (this.contents.spaceBefore && (hasDirectives || this.directivesEndMarker)) lines.push('');\n          if (this.contents.commentBefore) lines.push(this.contents.commentBefore.replace(/^/gm, '#')); // top-level block scalars need to be indented if followed by a comment\n\n          ctx.forceBlockIndent = !!this.comment;\n          contentComment = this.contents.comment;\n        }\n\n        var onChompKeep = contentComment ? null : function () {\n          return chompKeep = true;\n        };\n        var body = stringify$1(this.contents, ctx, function () {\n          return contentComment = null;\n        }, onChompKeep);\n        lines.push(addComment(body, '', contentComment));\n      } else if (this.contents !== undefined) {\n        lines.push(stringify$1(this.contents, ctx));\n      }\n\n      if (this.comment) {\n        if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '') lines.push('');\n        lines.push(this.comment.replace(/^/gm, '#'));\n      }\n\n      return lines.join('\\n') + '\\n';\n    }\n  }]);\n\n  return Document;\n}();\n\n_defineProperty(Document$1, \"defaults\", documentOptions);\n\nfunction createNode(value) {\n  var wrapScalars = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n  var tag = arguments.length > 2 ? arguments[2] : undefined;\n\n  if (tag === undefined && typeof wrapScalars === 'string') {\n    tag = wrapScalars;\n    wrapScalars = true;\n  }\n\n  var options = Object.assign({}, Document$1.defaults[defaultOptions.version], defaultOptions);\n  var schema = new Schema(options);\n  return schema.createNode(value, wrapScalars, tag);\n}\n\nvar Document = /*#__PURE__*/function (_YAMLDocument) {\n  _inherits(Document, _YAMLDocument);\n\n  var _super = _createSuper(Document);\n\n  function Document(options) {\n    _classCallCheck(this, Document);\n\n    return _super.call(this, Object.assign({}, defaultOptions, options));\n  }\n\n  return Document;\n}(Document$1);\n\nfunction parseAllDocuments(src, options) {\n  var stream = [];\n  var prev;\n\n  var _iterator = _createForOfIteratorHelper(parse$1(src)),\n      _step;\n\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var cstDoc = _step.value;\n      var doc = new Document(options);\n      doc.parse(cstDoc, prev);\n      stream.push(doc);\n      prev = doc;\n    }\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n\n  return stream;\n}\n\nfunction parseDocument(src, options) {\n  var cst = parse$1(src);\n  var doc = new Document(options).parse(cst[0]);\n\n  if (cst.length > 1) {\n    var errMsg = 'Source contains multiple documents; please use YAML.parseAllDocuments()';\n    doc.errors.unshift(new YAMLSemanticError(cst[1], errMsg));\n  }\n\n  return doc;\n}\n\nfunction parse(src, options) {\n  var doc = parseDocument(src, options);\n  doc.warnings.forEach(function (warning) {\n    return warn(warning);\n  });\n  if (doc.errors.length > 0) throw doc.errors[0];\n  return doc.toJSON();\n}\n\nfunction stringify(value, options) {\n  var doc = new Document(options);\n  doc.contents = value;\n  return String(doc);\n}\n\nvar YAML = {\n  createNode: createNode,\n  defaultOptions: defaultOptions,\n  Document: Document,\n  parse: parse,\n  parseAllDocuments: parseAllDocuments,\n  parseCST: parse$1,\n  parseDocument: parseDocument,\n  scalarOptions: scalarOptions,\n  stringify: stringify\n};\n\nexport { YAML };\n","'use strict';\n\n// Gets all non-builtin properties up the prototype chain\nconst getAllProperties = object => {\n\tconst properties = new Set();\n\n\tdo {\n\t\tfor (const key of Reflect.ownKeys(object)) {\n\t\t\tproperties.add([object, key]);\n\t\t}\n\t} while ((object = Reflect.getPrototypeOf(object)) && object !== Object.prototype);\n\n\treturn properties;\n};\n\nmodule.exports = (self, {include, exclude} = {}) => {\n\tconst filter = key => {\n\t\tconst match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);\n\n\t\tif (include) {\n\t\t\treturn include.some(match);\n\t\t}\n\n\t\tif (exclude) {\n\t\t\treturn !exclude.some(match);\n\t\t}\n\n\t\treturn true;\n\t};\n\n\tfor (const [object, key] of getAllProperties(self.constructor.prototype)) {\n\t\tif (key === 'constructor' || !filter(key)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst descriptor = Reflect.getOwnPropertyDescriptor(object, key);\n\t\tif (descriptor && typeof descriptor.value === 'function') {\n\t\t\tself[key] = self[key].bind(self);\n\t\t}\n\t}\n\n\treturn self;\n};\n","import { writable, get } from 'svelte/store';\nimport autoBind from 'auto-bind';\nexport class BaseQuestion {\n    constructor(text, explanation, hint, answers, type, options) {\n        if (answers.length === 0) {\n            throw 'no answers for question provided';\n        }\n        this.text = text;\n        this.explanation = explanation;\n        this.hint = hint;\n        this.solved = false;\n        this.options = options;\n        this.answers = answers;\n        if (options['shuffle_answers']) {\n            this.answers = BaseQuestion.shuffle(answers);\n        }\n        this.selected = [];\n        this.type = type;\n        autoBind(this);\n    }\n    static is_equal(a1, a2) {\n        return JSON.stringify(a1) === JSON.stringify(a2);\n    }\n    static shuffle(array) {\n        // https://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array\n        let currentIndex = array.length, temporaryValue, randomIndex;\n        // While there remain elements to shuffle...\n        while (0 !== currentIndex) {\n            // Pick a remaining element...\n            randomIndex = Math.floor(Math.random() * currentIndex);\n            currentIndex -= 1;\n            // And swap it with the current element.\n            temporaryValue = array[currentIndex];\n            array[currentIndex] = array[randomIndex];\n            array[randomIndex] = temporaryValue;\n        }\n        return array;\n    }\n    reset() {\n        this.selected = [];\n        this.solved = false;\n        BaseQuestion.shuffle(this.answers);\n    }\n}\nclass Blanks extends BaseQuestion {\n    check() {\n        this.solved = false;\n        return this.solved;\n    }\n}\nclass Pairs extends BaseQuestion {\n    check() {\n        this.solved = false;\n        return this.solved;\n    }\n}\nexport class Sequence extends BaseQuestion {\n    constructor(text, explanation, hint, answers, options) {\n        // always enable shuffling for sequence questions\n        options['shuffle_answers'] = true;\n        super(text, explanation, hint, answers, 'Sequence', options);\n    }\n    check() {\n        // extract answer ids from answers\n        let true_answer_ids = this.answers.map((answer) => answer.id);\n        this.solved = BaseQuestion.is_equal(true_answer_ids.sort(), this.selected);\n        return this.solved;\n    }\n}\nexport class MultipleChoice extends BaseQuestion {\n    constructor(text, explanation, hint, answers, options) {\n        super(text, explanation, hint, answers, 'MultipleChoice', options);\n    }\n    check() {\n        let true_answer_ids = this.answers\n            .map((answer, i) => i)\n            .filter((i) => this.answers[i].correct);\n        this.solved = BaseQuestion.is_equal(true_answer_ids.sort(), this.selected.sort());\n        return this.solved;\n    }\n}\nexport class SingleChoice extends BaseQuestion {\n    constructor(text, explanation, hint, answers, options) {\n        super(text, explanation, hint, answers, 'SingleChoice', options);\n        let self = this;\n        answers.forEach(function (answer, i) {\n            if (answer.correct) {\n                if (typeof self.correct !== 'undefined') {\n                    throw 'Single choice question can only have one answer';\n                }\n                self.correct = i;\n            }\n        });\n    }\n    check() {\n        this.solved = this.selected[0] === this.correct;\n        return this.solved;\n    }\n}\nexport class Answer {\n    constructor(id, html, correct, comment) {\n        this.html = html;\n        this.correct = correct;\n        this.id = id;\n        this.comment = comment;\n        autoBind(this);\n    }\n}\nclass Counter {\n    constructor(max) {\n        this.val = writable(0);\n        this.max = max;\n        this.subscribe = this.val.subscribe;\n        autoBind(this);\n    }\n    jump(i) {\n        this.val.set(i);\n    }\n    next() {\n        this.val.update((val) => (val < this.max - 1 ? val + 1 : val));\n    }\n    previous() {\n        this.val.update((val) => (val > 0 ? val - 1 : val));\n    }\n    reset() {\n        // trigger a change\n        if (get(this.val) == 0)\n            this.val.set(1);\n        this.val.set(0);\n    }\n}\nexport class Quiz {\n    constructor(questions, config) {\n        if (questions.length == 0) {\n            throw 'No questions for quiz provided';\n        }\n        this.questions = questions;\n        this.counter = new Counter(this.questions.length);\n        this.finished = writable(false);\n        this.points = 0;\n        this.config = config;\n        if (config['shuffle_questions']) {\n            this.questions = BaseQuestion.shuffle(questions);\n        }\n        autoBind(this);\n    }\n    current() {\n        let n = get(this.counter);\n        return this.questions[n];\n    }\n    next() {\n        this.counter.next();\n    }\n    previous() {\n        this.counter.previous();\n    }\n    jump(i) {\n        this.counter.jump(i);\n    }\n    reset() {\n        this.counter.reset();\n        this.questions.forEach((q) => q.reset());\n        this.finished.set(false);\n    }\n    evaluate() {\n        this.finished.set(true);\n        var points = 0;\n        for (var q of this.questions) {\n            q.check();\n            if (q.solved)\n                points++;\n        }\n        this.points = points;\n        this.jump(this.counter.max);\n    }\n}\n","function get(attr, def) {\n    return typeof attr != 'undefined' ? attr : def;\n}\nexport class Config {\n    constructor(options) {\n        this.start_on_load = get(options.start_on_load, true);\n        this.shuffle_answers = get(options.shuffle_answers, true);\n        this.shuffle_questions = get(options.shuffle_questions, false);\n        this.primary_color = get(options.primary_color, 'steelblue');\n        this.secondary_color = get(options.secondary_color, '#f2f2f2');\n        this.text_color = get(options.text_color, 'black');\n        this.locale = get(options.locale, null);\n    }\n}\nexport function merge_attributes(base_config, new_config) {\n    //new_config overwrites entries in config1\n    let config = new Config(base_config);\n    for (let attrname in new_config) {\n        if (Object.prototype.hasOwnProperty.call(new_config, attrname)) {\n            config[attrname] = new_config[attrname];\n        }\n    }\n    return config;\n}\n","import marked from 'marked';\nimport DOMPurify from 'dompurify';\nimport stripIndent from 'strip-indent';\nimport hljs from 'highlight.js/lib/core';\nimport python from 'highlight.js/lib/languages/python';\nimport plaintext from 'highlight.js/lib/languages/plaintext';\nimport YAML from 'yaml';\nimport { Quiz, MultipleChoice, SingleChoice, Sequence, Answer, } from './quiz.js';\nimport { Config, merge_attributes } from './config.js';\nhljs.registerLanguage('python', python);\nhljs.registerLanguage('plaintext', plaintext);\n// this does not work....\n// ['javascript', 'python', 'bash'].forEach(async (langName) => {\n//     const langModule = await import(`highlight.js/lib/languages/${langName}`);\n//     hljs.registerLanguage(langName, langModule);\n// });\nmarked.setOptions({\n    highlight: function (code, language) {\n        const validLanguage = hljs.getLanguage(language)\n            ? language\n            : 'plaintext';\n        return hljs.highlight(code, { language: validLanguage }).value;\n    },\n});\n// customize tokenizer to include yaml like header blocks\nconst tokenizer = {\n    hr(src) {\n        //adapted from https://github.com/markedjs/marked/blob/master/src/rules.js\n        const regex = RegExp(/^ {0,3}(-{3,}(?=[^-\\n]*\\n)|~{3,})([^\\n]*)\\n(?:|([\\s\\S]*?)\\n)(?: {0,3}\\1[~-]* *(?:\\n+|$)|$)/);\n        const cap = regex.exec(src);\n        if (cap) {\n            return {\n                type: 'options',\n                raw: cap[0],\n                data: YAML.parse(cap[3], {}),\n            };\n        }\n    },\n};\n// customize renderer\nconst renderer = {\n    // disable paragraph\n    paragraph(text) {\n        return text;\n    },\n    //disable blockquote\n    blockquote(text) {\n        return text;\n    },\n    //disable heading\n    heading(text) {\n        return text;\n    },\n};\n// @ts-ignore\nmarked.use({ renderer, tokenizer });\nfunction parse_tokens(tokens) {\n    return DOMPurify.sanitize(marked.parser(tokens));\n}\nfunction html_decode(input) {\n    // https://stackoverflow.com/questions/1912501/unescape-html-entities-in-javascript\n    var doc = new DOMParser().parseFromString(input, 'text/html');\n    return doc.documentElement.textContent;\n}\nfunction parse_quizdown(raw_quizdown, global_config) {\n    let tokens = marked.lexer(html_decode(stripIndent(raw_quizdown)));\n    let questions = [];\n    let text = '';\n    let explanation = '';\n    let hint = '';\n    let before_first = true;\n    // global_config < quiz_config < question_config\n    let quiz_config = new Config(global_config);\n    let question_config;\n    tokens.forEach(function (el, i) {\n        if (el['type'] == 'heading') {\n            // start a new question\n            explanation = '';\n            hint = '';\n            text = parse_tokens([el]);\n            question_config = new Config(quiz_config);\n            before_first = false;\n        }\n        if (el['type'] == 'options') {\n            if (before_first) {\n                // comes before the first heading: quiz config\n                quiz_config = merge_attributes(quiz_config, el['data']);\n            }\n            else {\n                // comes after a heading: question config\n                question_config = merge_attributes(quiz_config, el['data']);\n            }\n        }\n        if (el['type'] == 'paragraph' || el['type'] == 'code') {\n            explanation += parse_tokens([el]);\n        }\n        if (el['type'] == 'blockquote') {\n            hint += parse_tokens([el]);\n        }\n        if (el['type'] == 'list') {\n            let answers = [];\n            el['items'].forEach(function (item, i) {\n                let text = '';\n                let comment = '';\n                item['tokens'].forEach(function (token, i) {\n                    if (token['type'] == 'blockquote') {\n                        comment += parse_tokens([token]);\n                    }\n                    else {\n                        text += parse_tokens([token]);\n                    }\n                });\n                answers.push(new Answer(i, text, item['checked'], comment));\n            });\n            if (el['ordered']) {\n                if (el['items'][0]['task']) {\n                    // single choice list\n                    questions.push(new SingleChoice(text, explanation, hint, answers, question_config));\n                }\n                else {\n                    // sequence list\n                    questions.push(new Sequence(text, explanation, hint, answers, question_config));\n                }\n            }\n            else {\n                // multiple choice list\n                questions.push(new MultipleChoice(text, explanation, hint, answers, question_config));\n            }\n        }\n    });\n    return new Quiz(questions, quiz_config);\n}\nexport default parse_quizdown;\n","import App from './App.svelte';\nimport parse_quizdown from './parser.js';\nimport { Config } from './config.js';\nexport function create_app(raw_quizdown, node, config) {\n    node.innerHTML = '';\n    let root;\n    if (!!node.shadowRoot) {\n        //clear root if it allready exists\n        root = node.shadowRoot;\n        root.innerHTML = '';\n    }\n    else {\n        root = node.attachShadow({ mode: 'open' });\n    }\n    try {\n        let quiz = parse_quizdown(raw_quizdown, config);\n        new App({\n            // https://github.com/sveltejs/svelte/pull/5870\n            target: root,\n            intro: false,\n            props: {\n                quiz: quiz,\n            },\n        });\n    }\n    catch (e) {\n        root.innerHTML = `${e}. App could not render. Please check your quizdown syntax.`;\n    }\n}\nexport function init(config = {}) {\n    let global_config = new Config(config);\n    if (global_config.start_on_load) {\n        if (typeof document !== 'undefined') {\n            window.addEventListener('load', function () {\n                let nodes = document.querySelectorAll('.quizdown');\n                for (let node of nodes) {\n                    create_app(node.innerHTML, node, global_config);\n                }\n            }, false);\n        }\n    }\n}\n"],"names":["fn","fns","safe_not_equal","b","callbacks","subscribe","component","store","callback","assign","$$scope","get_slot_changes_fn","definition","dirty","merged","max","i","len","slot_context","get_slot_context","slot","window","now","forEach","tasks","delete","task","loop","fulfill","name","node","target","styleSheetId","styles","style","id","textContent","append","get_root_for_node","iterations","length","event","options","attribute","text","data","this","a","anchor","e","element","t","html","n","insert","d","h","duration","p","step","ease","keyframes","rule","hash","active_docs","doc","stylesheet","current_rules","active","previous","animation","anim","indexOf","deleteRule","width","height","position","top","add_transform","current_component","get_current_component","binding_callbacks","render_callbacks","set_current_component","update","flush_callbacks","update_scheduled","flushing","seen_callbacks","$$","run_all","before_update","r","c","outros","block","outroing","has","push","globalThis","lookup","destroy_block","mount_component","on_destroy","after_update","destroy_component","dirty_components","resolved_promise","fragment","props","not_equal","on_mount","on_disconnect","skip_bound","root","ctx","value","rest","ret","ready","hydrate","nodes","flush","$$props","$$set","params","transform","scaleX","from","clientWidth","dx","left","delay","easing","cubicOut","css","JSON","end","tick","running","started","stop","old_blocks","o","new_blocks","new_lookup","child_ctx","get_key","will_move","transition_in","m","set","next","new_block","old_block","new_key","key","did_move","destroy","ghost","grabbed","lastTarget","removesItems","mouseY","offsetY","clientY","touchEnter","targetElement","moveDatum","slice","ev","index","stopPropagation","undefined","writable","new_value","s","subscriber_queue","invalidate","noop","subscribers","stores","single","pending","cleanup","auto","unsubscribers","values","sync","inited","stringValue","Symbol","cloneUnlessOtherwiseSpecified","deepmerge","val","property","_","destination","arrayMerge","sourceIsArray","Array","isArray","source","extendStatics","Object","TypeError","__assign","__spreadArray","il","j","el","SKELETON_TYPE","SPACE_SEPARATOR_START_REGEX","result","hourCycle","FRACTION_PRECISION_REGEX","SIGNIFICANT_PRECISION_REGEX","INTEGER_WIDTH_REGEX","g2","minimumSignificantDigits","g1","maximumSignificantDigits","signDisplay","stem","signOpts","tokens","notation","currencyDisplay","token","CONCISE_INTEGER_WIDTH_REGEX","minimumFractionDigits","g4","conciseScientificAndEngineeringOpts","hasNativeStartsWith","hasNativeFromCodePoint","hasNativeFromEntries","fromEntries","hasNativeCodePointAt","hasTrimStart","hasTrimEnd","prototype","Number","isFinite","Math","floor","REGEX_SUPPORTS_U_AND_Y","matchIdentifierAtIndex","search","_i","elements","code","String","fromCharCode","entries","entries_1","_a","size","first","flag","IDENTIFIER_PREFIX_RE_1","exec","match","Parser","message","offset","ignoreTag","requiresOtherClause","char","err","expectingCloseTag","_isAlpha","type","startPosition","tagName","childrenResult","endTagStartPosition","closingTagNameStartPosition","bumpSpace","children","startOffset","isEOF","start","parseQuoteResult","parseUnquotedResult","parseLeftAngleResult","bump","parentArgType","codePoints","ch","openingBracePosition","startingPosition","endOffset","typeStartPosition","argType","parseIdentifierIfPossible","styleAndLocation","bumpIf","styleStartPosition","argCloseResult","skeleton","pattern","location","parseDateTimeSkeleton","TYPE","date","location_1","typeEndPosition_1","identifierAndLocation","pluralOffset","optionsResult","location_2","pluralType","nestedBraces","apostrophePosition","parseNumberSkeletonFromString","split","WHITE_SPACE_REGEX","stemAndOptions","stringTokens_1","options_1","parseNumberSkeleton","hasOtherClause","parsedSelectors","selector","selectorLocation","ErrorKind","DUPLICATE_SELECT_ARGUMENT_SELECTOR","EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT","fragmentResult","EXPECT_SELECT_ARGUMENT_SELECTOR","tryParseDecimalInteger","sign","hasDigits","decimal","line","kind","column","startsWith$1","prefix","currentOffset","targetOffset","charCodeAt","isSelectElement","isTimeElement","isDateTimeSkeleton","opts","error","originalMessage","cache","serializer","cacheKey","computedValue","args","variadic","serializerDefault","ObjectWithoutPrototypeCache","cacheDefault","strategies","FormatError","_this","__extends","InvalidValueError","variableId","InvalidValueTypeError","MissingValueError","els","isLiteralElement","isPoundElement","currentPluralValue","isArgumentElement","isDateElement","formats","parsedOptions","getDateTimeFormat","isNumberElement","getNumberFormat","isTagElement","formatFn","chunks","formatters","map","opt","isPluralElement","PluralRules","getPluralRules","parts","lastPart","part","PART_TYPE","mergeConfigs","all","c1","IntlMessageFormat","locales","number","dateTime","reduce","literal","__parse","ast","pluralRules","defineProperty","enumerable","memoizedDefaultLocale","month","day","weekday","hour","minute","second","points","quiz","MultipleChoice","SingleChoice","$$slots","buttonAction","getTime","keys","interpolators","defaults","previous_task","interpolate","addMessages","de","init","fallbackLocale","primary_color","secondary_color","text_color","config","setProperty","descriptor","configurable","protoProps","staticProps","Constructor","_arrayLikeToArray","minLen","arr","_createForOfIteratorHelperLoose","it","done","iterator","exports","getDefaults","baseUrl","breaks","gfm","headerIds","headerPrefix","highlight","langPrefix","mangle","pedantic","renderer","sanitize","sanitizer","silent","smartLists","smartypants","tokenizer","walkTokens","xhtml","changeDefaults","escapeTest","escapeReplace","escapeTestNoEncode","escapeReplaceNoEncode","&","<",">","\"","'","regex","nonWordAndColonTest","prot","decodeURIComponent","href","encodeURI","baseUrls","justDomain","protocol","base","arguments","cells","escaped","curr","l","currChar","findClosingBracket$1","str","level","checkSanitizeDeprecation$1","count","escape","escape$2","unescape","edit","cleanUrl","cleanUrl$1","resolveUrl","noopTest","merge","splitCells","rtrim","findClosingBracket","checkSanitizeDeprecation","repeatString","defaults$4","_escape","title","raw","src","codeBlockStyle","lang","cap","depth","header","align","item","space","bcurr","bnext","addBack","loose","istask","ischecked","endMatch","bull","isordered","ordered","items","itemMatch","list","join","checked","pre","substring","tag","inRawBlock","inLink","linkLen","lastParenIndex","reflink","link","rDelim","rLength","lLength","delimTotal","midDelimTotal","endReg","maskedSrc","min","hasNonSpaceChars","test","hasSpaceCharsOnBothEnds","prevCapZero","_backpedal","helpers","newline","fences","hr","heading","blockquote","def","nptable","table","_paragraph","_label","_title","block$1","bullet","listItemStart","_tag","_comment","replace","paragraph","autolink","url","nolink","reflinkSearch","rDelimAst","br","del","punctuation","_punctuation","inline$1","blockSkip","escapedEmSt","emStrong","lDelim","getRegex","_escapes","_scheme","_email","_attribute","_href","middle","endAst","merge$1","_extended_email","inline","defaults$3","defaults$5","out","links","rules","lex","Lexer","lexInline","blockTokens","lastToken","lheading","console","row","k","_lastToken","_lastToken2","codespan","inlineText","keepPrevChar","defaults$2","_code","body","flags","slug","originalSlug","occurenceAccumulator","seen","defaults$1","textRenderer","l2","l3","cell","itemBody","checkbox","parse","Parser_1","marked","extension","prop","_iterator3","parser","Renderer","TextRenderer","TextRenderer_1","Lexer_1","lexer","Tokenizer","Slugger","factory","hasOwnProperty","setPrototypeOf","isFrozen","getPrototypeOf","getOwnPropertyDescriptor","freeze","seal","_ref","apply","thisValue","arrayForEach","arrayPop","pop","stringToLowerCase","toLowerCase","stringMatch","stringReplace","unapply","stringIndexOf","unconstruct","func","array","lcElement","object","lookupGetter","desc","get","fallbackValue","MUSTACHE_EXPR","ERB_EXPR","DATA_ATTR","ARIA_ATTR","IS_SCRIPT_OR_DATA","trustedTypes","suffix","ATTR_NAME","policyName","document","DocumentFragment","HTMLTemplateElement","Node","Element","NodeFilter","_window$NamedNodeMap","NamedNodeMap","Text","Comment","DOMParser","cloneNode","getNextSibling","getChildNodes","ElementPrototype","template","createElement","content","trustedTypesPolicy","_document","implementation","createNodeIterator","createDocumentFragment","documentMode","MUSTACHE_EXPR$$1","ERB_EXPR$$1","DATA_ATTR$$1","ARIA_ATTR$$1","IS_SCRIPT_OR_DATA$$1","ATTR_WHITESPACE$$1","ALLOWED_TAGS","ALLOWED_ATTR","DATA_URI_TAGS","URI_SAFE_ATTRIBUTES","MATHML_NAMESPACE","SVG_NAMESPACE","cfg","addToSet","DEFAULT_ALLOWED_TAGS","clone","FORBID_TAGS","FORBID_ATTR","USE_PROFILES","ALLOW_ARIA_ATTR","ALLOW_DATA_ATTR","ALLOW_UNKNOWN_PROTOCOLS","SAFE_FOR_TEMPLATES","WHOLE_DOCUMENT","RETURN_DOM","RETURN_DOM_FRAGMENT","RETURN_DOM_IMPORT","RETURN_TRUSTED_TYPE","FORCE_BODY","SANITIZE_DOM","KEEP_CONTENT","IN_PLACE","IS_ALLOWED_URI$$1","NAMESPACE","svg","svg$1","svgFilters","mathMl","mathMl$1","CONFIG","ALL_SVG_TAGS","namespaceURI","HTML_NAMESPACE","arrayPush","_forceRemove","hook","nodeName","allowedTags","parentNode","getParentNode","currentNode","attr","lcName","attrName","attrValue","keepAttr","allowedAttributes","_attr","hookEvent","_executeHook","_removeAttribute","lcTag","shadowNode","importedNode","oldNode","serializedHTML","_parseConfig","SET_CONFIG","entryPoint","hookFunction","hooks","removeAllHooks","obj","Map","clear","Set","add","deepFreezeEs6","escapeHTML","buffer","className","rootNode","stack","builder","child","TokenTree","super","openNode","addText","sublanguage","HTMLRenderer","source$1","re","IDENT_RE","UNDERSCORE_IDENT_RE","NUMBER_RE","C_NUMBER_RE","BINARY_NUMBER_RE","begin","illegal","contains","modeOptions","mode","PHRASAL_WORDS_MODE","relevance","C_LINE_COMMENT_MODE","C_BLOCK_COMMENT_MODE","HASH_COMMENT_MODE","BACKSLASH_ESCAPE","MODES","__proto__","MATCH_NOTHING_RE","RE_STARTERS_RE","SHEBANG","beginShebang","APOS_STRING_MODE","QUOTE_STRING_MODE","COMMENT","NUMBER_MODE","C_NUMBER_MODE","BINARY_NUMBER_MODE","CSS_NUMBER_MODE","REGEXP_MODE","TITLE_MODE","UNDERSCORE_TITLE_MODE","METHOD_GUARD","on:end","parent","__beforeBegin","skipIfhasPrecedingDot","COMMON_KEYWORDS","rawKeywords","compiledKeywords","compileKeywords","keyword","langRe","RegExp","regexes","matchAt","matchIndexes","matcherRe","numCaptures","multiRegexes","lastIndex","matcher","m2","compileMatch","compileRelevance","keywordPattern","keywords","cmode","endSameAsBegin","terminatorEnd","illegalRe","cachedVariants","detectedLanguage","unknownLanguage","autoDetect","getLanguage","language","class","domProps","resultNode","processed","attributeString","render","nodeStack","stream","original","deprecated","seenDeprecations","escape$1","inherit$1","fixMarkupRe","noHighlightRe","languageDetectRe","classPrefix","tabReplace","useBR","__emitter","shouldNotHighlight","languageName","ignoreIllegals","context","processBuffer","emitter","subLanguage","keywordPatternRe","buf","classNameAliases","modeBuffer","matchPlusRemainder","lexeme","endsWithParent","doIgnore","resumeScanAtSamePosition","cb","newMode","skip","excludeBegin","endOfMode","codeToHighlight","Error","doEndMatch","NO_MATCH","LANGUAGE_NOT_FOUND","continuations","processContinuations","processLexeme","closeAllNodes","msg","sofar","errorRaised","languageSubset","filter","_highlight","warn","updateClassName","relavance","second_best","initHighlighting","wantsHighlight","aliasList","addEventListener","highlightAuto","highlightAll","fixMarkup","highlightBlock","configure","initHighlightingOnLoad","registerLanguage","languageDefinition","languages","unregisterLanguage","listLanguages","registerAliases","requireLanguage","autoDetection","inherit","plugin","upgradePluginAPI","vuePlugin","hljs","debugMode","safeMode","SAFE_MODE","addPlugin","brPlugin","mergeHTMLPlugin","lookahead","$pattern","built_in","PROMPT","LITERAL_BRACKET","digitpart","pointfloat","KEYWORDS","excludeEnd","NUMBER","STRING","beginKeywords","COMMENT_TYPE","PARAMS","disableAutodetect","_defineProperty","Reflect","Boolean","instance","Wrapper","Super","_slicedToArray","_arr","_n","_d","_toArray","_createForOfIteratorHelper","F","f","normalCompletion","didErr","defaultTagPrefix","MAP","SEQ","STR","ls","lineStarts","cst","_getSrcInfo","col","_getSrcInfo2","origStart","cr","range","valueRange","getPropValue","Char","comment","Type","getLinePos","_this$valueRange","verbatim","_tag$match2","handle","_this$valueRange2","commentRange","setOrigRange","ch0","prev","ch1","ch2","isVerbatim","lineStart","wsEnd","inCount","fold","_this$linePos$start","linePos","maxWidth","getLine","halfWidth","errLen","repeat","_Node$foldNewline","wsStart","errors","_this$context","indent","inFlow","Node$1","valueEnd","isEmpty","PlainValue","Range","BlankLine","parseNode","atLineStart","endOfWhiteSpace","inlineComment","comments","blankLine","nextNodeIsIndented","inCollection","CollectionItem","cnode","_n$context","ci","ca","firstItem","ec","atBlank","normalizeOffset","_item$context","Collection","parseParameters","Directive","directives","contents","directivesEndMarker","hasDirectives","directive","iEnd","parseDirectives","parseContents","Document","parseComment","Alias","blockIndent","chomping","lastNewLine","keepStart","bi","folded","atStart","sep","lineEnd","endOfLine","_ch","_this$context2","explicit","_ch2","lineIndent","parseBlockValue","BlockValue","idx","origOffset","prevEnd","FlowCollection","cc","QuoteDouble","YAMLSyntaxError","QuoteSingle","atDocumentBoundary","_context$parseProps","parseEnd","nodeStartsCollection","collection","orig","inEnd","indentDiff","noIndicatorAsIndent","lineHasProps","valueStart","documents","Document$2","addComment","_classCallCheck","toJSON","anchors","res","path","_path","_ref2","_ref3","keepScalar","_ref4","_ref5","_ref6","_ref7","_ref8","blockItem","_ref9","flowChars","isMap","itemIndent","_ctx","indentStep","stringify","allNullValues","chompKeep","hasItemWithNewLine","includes","_iterator","_step","_iterator2","_step2","asItemIndex","splice","seq","call","Pair","jsKey","_typeof","inStringifyKey","mapAsMap","_ctx$doc$options","indentSize","indentSeq","simpleKeys","explicitKey","implicitKey","vcb","ws","valueComment","PAIR","MERGE_PAIR","getAliasCount","kc","arg","maxAliasCount","_msg","pair","findPair","YAMLSeq","_step2$value","defaultType","lineWidth","trueStr","falseStr","asBigInt","nullStr","jsonEncoding","_step$value","format","FOLD_FLOW","FOLD_BLOCK","indentAtStart","_ref$lineWidth","_ref$minContentWidth","minContentWidth","onFold","onOverflow","endStep","folds","escapedFolds","overflow","escStart","consumeMoreIndentedLines","FOLD_QUOTED","concat","_strOptions$doubleQuo","minMultiLineLength","json","singleQuotedString","forceBlockIndent","limit","indentLength","strLen","strOptions","_item","actualString","tags","minFractionDigits","isNaN","lastItem","YAMLSemanticError","sk","substr","afterKey","before","resolveString","resolveTagName","_node$tag","tagPrefixes","find","dtp","resolveTagHandle","fallback","getFallbackTagName","_res","refError","after","hasAnchor","hasTag","_resolveNodeProps","resolveScalar","keepCstNodes","cstNode","resolveMap","checkFlowCommentSpace","checkFlowCollectionEnd","keyStart","valueNode","origPos","resolveNode","resolvePairComment","_msg2","_msg3","resolveComments","iKey","schema","sources","jKey","_ref2$context","found","startsWith","resolveSeq","keyEnd","_err","hasProps","default","atob","binaryOptions","parsePairs","commentBefore","resolve","createNode","YAMLOMap","nodeClass","pairs","omap","YAMLSet","round","millisec","tz","parseSexagesimal","shouldWarn","YAML_SILENCE_DEPRECATION_WARNINGS","YAML_SILENCE_WARNINGS","_key","v","nullOptions","boolOptions","intOptions","identify","frac","frac1","parseFloat","intResolve","radix","toString","core","failsafe","yaml11","binary","bool","float","floatExp","expObj","floatNaN","floatTime","int","intHex","hexObj","intOct","intTime","null","nullObj","timestamp","defaultPrefix","onTagObj","prevObjects","wrapScalars","tagObj","customTags","sortMapEntries","warned","warnOptionDeprecation","schemas","knownTags","anchorPrefix","keepNodeTypes","keepBlobsInJSON","version","priv","!",",","[","]","{","}","_ctx$doc","aliasNodes","alias","onComment","_match","constructor","_len","visit","Scalar","_directive$parameters","assertCollection","_node$directives","_node$contents","directiveComments","resolveYamlDirective","setSchema","_cstAliases","_error","_this$options","keep","anchorNames","aliasCount","_step3$value","lines","tagNames","unshift","spaceBefore","contentComment","parseDocument","parse$1","Document$1","defaultOptions","parseAllDocuments","cstDoc","parseCST","scalarOptions","self","include","properties","answers","explanation","hint","solved","selected","a1","randomIndex","temporaryValue","currentIndex","true_answer_ids","answer","correct","get_store_value","questions","counter","finished","q","start_on_load","shuffle_answers","shuffle_questions","Config","core$1","validLanguage","raw_quizdown","parseFromString","quiz_config","question_config","create_app","App","intro","global_config"],"mappings":"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rB7F,mCACAA,MACA7H,YAAY6H,QAIZ7H,YAAYA,sDAQgBsS,MAC5BtS,yHAGJsS,qCAEI,IAAI5E,mBACAA,eAGAA,iFAGJ1N,YACIA,iCAMKuO,2BACLvO,KAAK0O,sEAST1O,yBAGJ,IAAI4M,cACAc,kBACW1N,KAAKyN,QAAQ8E,sDAnyBT,GA8yB3B,kDAQA,8BAEc,QACLxP,GAAK,WACA,QACLA,GAAK,IAAMA,GAAK,KAChBA,sBAEAA,GAAK,KAAQA,GAAK,KAClBA,GAAK,KAAQA,GAAK,KAClBA,GAAK,aACLA,GAAK,cACLA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,qCAOd,mCAEc,KAANA,GACM,SACLA,GAAK,eACA,OAANA,YAOR,oCAEc,QACLA,GAAK,WACA,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACM,QACLA,GAAK,IAAUA,GAAK,IACpBA,GAAK,IAAUA,GAAK,IACpBA,GAAK,IAAUA,GAAK,IACpBA,GAAK,WACA,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,SACLA,GAAK,aACA,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,SACLA,GAAK,MAAUA,GAAK,MACpBA,GAAK,eACA,OAANA,GACM,OAANA,GACM,UACLA,GAAK,eACA,OAANA,GACM,OAANA,GACM,UACLA,GAAK,MAAUA,GAAK,MACpBA,GAAK,eACA,OAANA,GACM,UACLA,GAAK,MAAUA,GAAK,MACpBA,GAAK,eACA,OAANA,GACM,OAANA,GACM,UACLA,GAAK,eACA,OAANA,GACM,UACLA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,eACA,UACLA,GAAK,eACA,UACLA,GAAK,eACA,UACLA,GAAK,eACA,UACLA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,eACA,OAANA,GACM,OAANA,GACM,UACLA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,eACA,OAANA,GACM,OAANA,GACM,OAANA,GACM,UACLA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,cACA,OAANA,GACM,UACLA,GAAK,eACA,UACLA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,eACA,UACLA,GAAK,eACA,UACLA,GAAK,MAAUA,GAAK,MACpBA,GAAK,MAAUA,GAAK,MACpBA,GAAK,eACA,UACLA,GAAK,gBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,WACLA,GAAK,OAAUA,GAAK,OACpBA,GAAK,iBACA,QAANA,GACM,WACLA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,WACLA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,WACLA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,WACLA,GAAK,iBACA,QAANA,GACM,WACLA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,iBACA,WACLA,GAAK,OAAUA,GAAK,OACpBA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,WACLA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,WACLA,GAAK,iBACA,WACLA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,WACLA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,WACLA,GAAK,iBACA,WACLA,GAAK,OAAUA,GAAK,OACpBA,GAAK,OAAUA,GAAK,OACpBA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,WACLA,GAAK,OAAUA,GAAK,OACpBA,GAAK,iBACA,WACLA,GAAK,OAAUA,GAAK,OACpBA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,WACLA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,WACLA,GAAK,iBACA,QAANA,GACM,QAANA,GACM,QAANA,GACM,8BC1uCd,iBACQtE,kBAAkB2L,wBAEdoI,GAAgBpI,uBACFA,+FAQaqI,QAC3BC,6DAQZ,YAAiBjF,cACTkF,UACJA,8BA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A,QACA,SACA,YACA,UACA,UACA,UACA,OACA,OACA,MACA,KACA,QACA,MACA,aACA,aACA,OACA,MACA,OACA,SACA,MACA,MACA,aACA,MACA,OACA,SACA,MACA,OACA,MACA,MACA,QACA,WACA,QACA,OACA,WACA,QACA,MACA,UACA,QACA,SACA,eACA,MACA,MACA,QACA,QACA,OACA,OACA,OAmCAtjB,SA/BA,YACA,WACA,QACA,OACA,iBACA,QA2BA9H,MApBA,MACA,WACA,YACA,OACA,OACA,UACA,UACA,WACA,WACA,MACA,QACA,OACA,aAYAygB,iBACAkB,2BAIAlB,UAAW,QACXkB,WACAjqB,SACAotB,WACAlD,gBAIAD,aACAM,gBAIAxB,mBACAoB,SAAU,gCAGNF,+CACAjqB,oBAEEizB,qCAMFhJ,+CACAjqB,oBAEEizB,qCAMFhJ,oCACAjqB,oBAEEizB,mBACAU,EACAC,OAKF3J,oCACAjqB,oBAEEizB,mBACAU,EACAC,OAKF3J,qBACAjqB,uBAIAiqB,qBACAjqB,uBAIAiqB,4CAIAA,4CAIAA,kCACAjqB,kBAEEizB,mBACAW,OAKF3J,kCACAjqB,kBAEEizB,mBACAW,MAIJX,EAAK/H,uCAMH2I,oBACAC,0CAEJ/K,UAAW,SACXwB,sSA8CAxB,oBACAkB,oBACAjqB,QACAotB,SAAU2G,+BAON9J,UACAjqB,mCAMJ+oB,8BAIIA,aACAkB,0BAIAA,WACAjqB,SACAswB,gBACA0D,cACA5G,SAAU2G,YAER,OACAJ,EACAM,EACAC,6CAONA,EACAD,EACAN,IAIAv6B,uBAEE,KACA,iBAGFg0B,WACAlD,mCAEEyJ,EACAM,sBAQEE,gCAGFD,EACAE,EACAnB,gCAIMlK,2CAIAA,0CAIJ/oB,QACAkqB,8BAEE+I,wBACAoB,GAEEpK,WACA+F,iCAMJjH,iBACAkB,iBACAjqB,wBAEEi0B,EACAI,gBC9aV,mBAEIj7B,2BAEE,cAGFk7B,uBCdJ,yBAGwB,qEACA/L,GAClB,6BAIA,yGAON,+FAMA,YAA2BjvB,iBACTf,IAAUwB,YACxB,WACAuY,EAAW7B,4BACX6B,EAAW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"}
    \ No newline at end of file
    +{"version":3,"file":"quizdown.js","sources":["../../node_modules/svelte/internal/index.mjs","../../node_modules/svelte/easing/index.mjs","../../node_modules/svelte/animate/index.mjs","../../src/components/DragDropList.svelte","../../src/components/SequenceView.svelte","../../src/components/ChoiceView.svelte","../../node_modules/svelte/store/index.mjs","../../node_modules/deepmerge/dist/cjs.js","../../node_modules/tslib/tslib.es6.js","../../node_modules/@formatjs/icu-messageformat-parser/lib/types.js","../../node_modules/@formatjs/icu-messageformat-parser/lib/error.js","../../node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js","../../node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js","../../node_modules/@formatjs/icu-skeleton-parser/lib/number.js","../../node_modules/@formatjs/icu-messageformat-parser/lib/parser.js","../../node_modules/@formatjs/icu-messageformat-parser/lib/index.js","../../node_modules/@formatjs/fast-memoize/lib/index.js","../../node_modules/intl-messageformat/lib/src/error.js","../../node_modules/intl-messageformat/lib/src/formatters.js","../../node_modules/intl-messageformat/lib/src/core.js","../../node_modules/svelte-i18n/dist/runtime.esm.js","../../src/components/ResultView.svelte","../../src/components/QuizSection.svelte","../../src/components/Button.svelte","../../src/components/Footer.svelte","../../node_modules/svelte/motion/index.mjs","../../src/components/ProgressBar.svelte","../../src/languages/i18n.ts","../../src/App.svelte","../../node_modules/dompurify/dist/purify.js","../../node_modules/strip-indent/index.js","../../node_modules/auto-bind/index.js","../../src/quiz.ts","../../src/config.ts","../../node_modules/marked/lib/marked.js","../../node_modules/highlight.js/lib/core.js","../../node_modules/highlight.js/lib/languages/python.js","../../node_modules/highlight.js/lib/languages/xml.js","../../node_modules/highlight.js/lib/languages/plaintext.js","../../node_modules/yaml/browser/dist/PlainValue-b8036b75.js","../../src/highlight.ts","../../node_modules/yaml/browser/dist/parse-cst.js","../../node_modules/yaml/browser/dist/resolveSeq-492ab440.js","../../node_modules/yaml/browser/dist/warnings-df54cb69.js","../../node_modules/yaml/browser/dist/Schema-e94716c8.js","../../node_modules/yaml/browser/dist/index.js","../../src/customized_marked.ts","../../src/parser.ts","../../src/quizdown.ts"],"sourcesContent":["function noop() {}\n\nconst identity = x => x;\n\nfunction assign(tar, src) {\n\t// @ts-ignore\n\tfor (const k in src) tar[k] = src[k];\n\treturn tar ;\n}\n\nfunction is_promise(value) {\n\treturn value && typeof value === 'object' && typeof value.then === 'function';\n}\n\nfunction add_location(element, file, line, column, char) {\n\telement.__svelte_meta = {\n\t\tloc: { file, line, column, char }\n\t};\n}\n\nfunction run(fn) {\n\treturn fn();\n}\n\nfunction blank_object() {\n\treturn Object.create(null);\n}\n\nfunction run_all(fns) {\n\tfns.forEach(run);\n}\n\nfunction is_function(thing) {\n\treturn typeof thing === 'function';\n}\n\nfunction safe_not_equal(a, b) {\n\treturn a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\n\nfunction not_equal(a, b) {\n\treturn a != a ? b == b : a !== b;\n}\n\nfunction is_empty(obj) {\n\treturn Object.keys(obj).length === 0;\n}\n\nfunction validate_store(store, name) {\n\tif (store != null && typeof store.subscribe !== 'function') {\n\t\tthrow new Error(`'${name}' is not a store with a 'subscribe' method`);\n\t}\n}\n\nfunction subscribe(store, ...callbacks) {\n\tif (store == null) {\n\t\treturn noop;\n\t}\n\tconst unsub = store.subscribe(...callbacks);\n\treturn unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\n\nfunction get_store_value(store) {\n\tlet value;\n\tsubscribe(store, _ => value = _)();\n\treturn value;\n}\n\nfunction component_subscribe(component, store, callback) {\n\tcomponent.$$.on_destroy.push(subscribe(store, callback));\n}\n\nfunction create_slot(definition, ctx, $$scope, fn) {\n\tif (definition) {\n\t\tconst slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n\t\treturn definition[0](slot_ctx);\n\t}\n}\n\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n\tconst context = definition[1] && fn\n\t\t? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n\t\t: $$scope.ctx;\n\treturn context;\n}\n\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n\tif (definition[2] && fn) {\n\t\tconst lets = definition[2](fn(dirty));\n\n\t\tif ($$scope.dirty === undefined) {\n\t\t\treturn lets;\n\t\t}\n\n\t\tif (typeof lets === 'object') {\n\t\t\tconst merged = [];\n\t\t\tconst len = Math.max($$scope.dirty.length, lets.length);\n\t\t\tfor (let i = 0; i < len; i += 1) {\n\t\t\t\tmerged[i] = $$scope.dirty[i] | lets[i];\n\t\t\t}\n\n\t\t\treturn merged;\n\t\t}\n\n\t\treturn $$scope.dirty | lets;\n\t}\n\n\treturn $$scope.dirty;\n}\n\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n\tconst slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n\tif (slot_changes) {\n\t\tconst slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n\t\tslot.p(slot_context, slot_changes);\n\t}\n}\n\nfunction update_slot_spread(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_spread_changes_fn, get_slot_context_fn) {\n\tconst slot_changes = get_slot_spread_changes_fn(dirty) | get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n\tif (slot_changes) {\n\t\tconst slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n\t\tslot.p(slot_context, slot_changes);\n\t}\n}\n\nfunction exclude_internal_props(props) {\n\tconst result = {};\n\tfor (const k in props) if (k[0] !== '$') result[k] = props[k];\n\treturn result;\n}\n\nfunction compute_rest_props(props, keys) {\n\tconst rest = {};\n\tkeys = new Set(keys);\n\tfor (const k in props) if (!keys.has(k) && k[0] !== '$') rest[k] = props[k];\n\treturn rest;\n}\n\nfunction compute_slots(slots) {\n\tconst result = {};\n\tfor (const key in slots) {\n\t\tresult[key] = true;\n\t}\n\treturn result;\n}\n\nfunction once(fn) {\n\tlet ran = false;\n\treturn function( ...args) {\n\t\tif (ran) return;\n\t\tran = true;\n\t\tfn.call(this, ...args);\n\t};\n}\n\nfunction null_to_empty(value) {\n\treturn value == null ? '' : value;\n}\n\nfunction set_store_value(store, ret, value = ret) {\n\tstore.set(value);\n\treturn ret;\n}\n\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\n\nfunction action_destroyer(action_result) {\n\treturn action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\n\nlet now = is_client\n\t? () => window.performance.now()\n\t: () => Date.now();\n\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n\n// used internally for testing\nfunction set_now(fn) {\n\tnow = fn;\n}\n\nfunction set_raf(fn) {\n\traf = fn;\n}\n\nconst tasks = new Set();\n\nfunction run_tasks(now) {\n\ttasks.forEach(task => {\n\t\tif (!task.c(now)) {\n\t\t\ttasks.delete(task);\n\t\t\ttask.f();\n\t\t}\n\t});\n\n\tif (tasks.size !== 0) raf(run_tasks);\n}\n\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n\ttasks.clear();\n}\n\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n\tlet task;\n\n\tif (tasks.size === 0) raf(run_tasks);\n\n\treturn {\n\t\tpromise: new Promise(fulfill => {\n\t\t\ttasks.add(task = { c: callback, f: fulfill });\n\t\t}),\n\t\tabort() {\n\t\t\ttasks.delete(task);\n\t\t}\n\t};\n}\n\nfunction _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }\nfunction element(name) {\n\treturn document.createElement(name);\n}\n\nfunction element_is(name, is) {\n\treturn document.createElement(name, { is });\n}\n\nfunction append(target, node) {\n\ttarget.appendChild(node);\n}\n\nfunction append_styles(\n\ttarget,\n\tstyleSheetId,\n\tstyles,\n\tstyleId = `svelte-${styleSheetId}-style`\n) {\n\tconst appendStylesTo = get_root_for_styles(target);\n\n\tif (!_optionalChain([appendStylesTo, 'optionalAccess', _ => _.querySelector, 'call', _2 => _2('#' + styleId)])) {\n\t\tconst style = element('style');\n\t\tstyle.id = styleId;\n\t\tstyle.textContent = styles;\n\t\tappend(appendStylesTo, style);\n\t}\n}\n\nfunction get_root_for_node(node) {\n\tif (!node) return document;\n\n\treturn (node.getRootNode ? node.getRootNode() : node.ownerDocument); // check for getRootNode because IE is still supported\n}\n\nfunction get_root_for_styles(node) {\n\tconst root = get_root_for_node(node);\n\treturn ((root ).host ? root : (root ).head) ;\n}\n\nfunction append_empty_stylesheet(node) {\n\treturn get_root_for_styles(node).appendChild(element('style') );\n}\n\nfunction insert(target, node, anchor) {\n\ttarget.insertBefore(node, anchor || null);\n}\n\nfunction detach(node) {\n\tnode.parentNode.removeChild(node);\n}\n\nfunction destroy_each(iterations, detaching) {\n\tfor (let i = 0; i < iterations.length; i += 1) {\n\t\tif (iterations[i]) iterations[i].d(detaching);\n\t}\n}\n\nfunction object_without_properties(obj, exclude) {\n\tconst target = {} ;\n\tfor (const k in obj) {\n\t\tif (\n\t\t\thas_prop(obj, k)\n\t\t\t// @ts-ignore\n\t\t\t&& exclude.indexOf(k) === -1\n\t\t) {\n\t\t\t// @ts-ignore\n\t\t\ttarget[k] = obj[k];\n\t\t}\n\t}\n\treturn target;\n}\n\nfunction svg_element(name) {\n\treturn document.createElementNS('http://www.w3.org/2000/svg', name);\n}\n\nfunction text(data) {\n\treturn document.createTextNode(data);\n}\n\nfunction space() {\n\treturn text(' ');\n}\n\nfunction empty() {\n\treturn text('');\n}\n\nfunction listen(node, event, handler, options) {\n\tnode.addEventListener(event, handler, options);\n\treturn () => node.removeEventListener(event, handler, options);\n}\n\nfunction prevent_default(fn) {\n\treturn function(event) {\n\t\tevent.preventDefault();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\nfunction stop_propagation(fn) {\n\treturn function(event) {\n\t\tevent.stopPropagation();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\nfunction self(fn) {\n\treturn function(event) {\n\t\t// @ts-ignore\n\t\tif (event.target === this) fn.call(this, event);\n\t};\n}\n\nfunction attr(node, attribute, value) {\n\tif (value == null) node.removeAttribute(attribute);\n\telse if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value);\n}\n\nfunction set_attributes(node, attributes) {\n\t// @ts-ignore\n\tconst descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n\tfor (const key in attributes) {\n\t\tif (attributes[key] == null) {\n\t\t\tnode.removeAttribute(key);\n\t\t} else if (key === 'style') {\n\t\t\tnode.style.cssText = attributes[key];\n\t\t} else if (key === '__value') {\n\t\t\t(node ).value = node[key] = attributes[key];\n\t\t} else if (descriptors[key] && descriptors[key].set) {\n\t\t\tnode[key] = attributes[key];\n\t\t} else {\n\t\t\tattr(node, key, attributes[key]);\n\t\t}\n\t}\n}\n\nfunction set_svg_attributes(node, attributes) {\n\tfor (const key in attributes) {\n\t\tattr(node, key, attributes[key]);\n\t}\n}\n\nfunction set_custom_element_data(node, prop, value) {\n\tif (prop in node) {\n\t\tnode[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n\t} else {\n\t\tattr(node, prop, value);\n\t}\n}\n\nfunction xlink_attr(node, attribute, value) {\n\tnode.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\n\nfunction get_binding_group_value(group, __value, checked) {\n\tconst value = new Set();\n\tfor (let i = 0; i < group.length; i += 1) {\n\t\tif (group[i].checked) value.add(group[i].__value);\n\t}\n\tif (!checked) {\n\t\tvalue.delete(__value);\n\t}\n\treturn Array.from(value);\n}\n\nfunction to_number(value) {\n\treturn value === '' ? null : +value;\n}\n\nfunction time_ranges_to_array(ranges) {\n\tconst array = [];\n\tfor (let i = 0; i < ranges.length; i += 1) {\n\t\tarray.push({ start: ranges.start(i), end: ranges.end(i) });\n\t}\n\treturn array;\n}\n\nfunction children(element) {\n\treturn Array.from(element.childNodes);\n}\n\nfunction claim_element(nodes, name, attributes, svg) {\n\tfor (let i = 0; i < nodes.length; i += 1) {\n\t\tconst node = nodes[i];\n\t\tif (node.nodeName === name) {\n\t\t\tlet j = 0;\n\t\t\tconst remove = [];\n\t\t\twhile (j < node.attributes.length) {\n\t\t\t\tconst attribute = node.attributes[j++];\n\t\t\t\tif (!attributes[attribute.name]) {\n\t\t\t\t\tremove.push(attribute.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (let k = 0; k < remove.length; k++) {\n\t\t\t\tnode.removeAttribute(remove[k]);\n\t\t\t}\n\t\t\treturn nodes.splice(i, 1)[0];\n\t\t}\n\t}\n\n\treturn svg ? svg_element(name) : element(name);\n}\n\nfunction claim_text(nodes, data) {\n\tfor (let i = 0; i < nodes.length; i += 1) {\n\t\tconst node = nodes[i];\n\t\tif (node.nodeType === 3) {\n\t\t\tnode.data = '' + data;\n\t\t\treturn nodes.splice(i, 1)[0];\n\t\t}\n\t}\n\n\treturn text(data);\n}\n\nfunction claim_space(nodes) {\n\treturn claim_text(nodes, ' ');\n}\n\nfunction set_data(text, data) {\n\tdata = '' + data;\n\tif (text.wholeText !== data) text.data = data;\n}\n\nfunction set_input_value(input, value) {\n\tinput.value = value == null ? '' : value;\n}\n\nfunction set_input_type(input, type) {\n\ttry {\n\t\tinput.type = type;\n\t} catch (e) {\n\t\t// do nothing\n\t}\n}\n\nfunction set_style(node, key, value, important) {\n\tnode.style.setProperty(key, value, important ? 'important' : '');\n}\n\nfunction select_option(select, value) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\n\t\tif (option.__value === value) {\n\t\t\toption.selected = true;\n\t\t\treturn;\n\t\t}\n\t}\n}\n\nfunction select_options(select, value) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\t\toption.selected = ~value.indexOf(option.__value);\n\t}\n}\n\nfunction select_value(select) {\n\tconst selected_option = select.querySelector(':checked') || select.options[0];\n\treturn selected_option && selected_option.__value;\n}\n\nfunction select_multiple_value(select) {\n\treturn [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\n\nfunction is_crossorigin() {\n\tif (crossorigin === undefined) {\n\t\tcrossorigin = false;\n\n\t\ttry {\n\t\t\tif (typeof window !== 'undefined' && window.parent) {\n\t\t\t\tvoid window.parent.document;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tcrossorigin = true;\n\t\t}\n\t}\n\n\treturn crossorigin;\n}\n\nfunction add_resize_listener(node, fn) {\n\tconst computed_style = getComputedStyle(node);\n\n\tif (computed_style.position === 'static') {\n\t\tnode.style.position = 'relative';\n\t}\n\n\tconst iframe = element('iframe');\n\tiframe.setAttribute('style',\n\t\t'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n\t\t'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;'\n\t);\n\tiframe.setAttribute('aria-hidden', 'true');\n\tiframe.tabIndex = -1;\n\n\tconst crossorigin = is_crossorigin();\n\n\tlet unsubscribe;\n\n\tif (crossorigin) {\n\t\tiframe.src = \"data:text/html,\";\n\t\tunsubscribe = listen(window, 'message', (event) => {\n\t\t\tif (event.source === iframe.contentWindow) fn();\n\t\t});\n\t} else {\n\t\tiframe.src = 'about:blank';\n\t\tiframe.onload = () => {\n\t\t\tunsubscribe = listen(iframe.contentWindow, 'resize', fn);\n\t\t};\n\t}\n\n\tappend(node, iframe);\n\n\treturn () => {\n\t\tif (crossorigin) {\n\t\t\tunsubscribe();\n\t\t} else if (unsubscribe && iframe.contentWindow) {\n\t\t\tunsubscribe();\n\t\t}\n\n\t\tdetach(iframe);\n\t};\n}\n\nfunction toggle_class(element, name, toggle) {\n\telement.classList[toggle ? 'add' : 'remove'](name);\n}\n\nfunction custom_event(type, detail) {\n\tconst e = document.createEvent('CustomEvent');\n\te.initCustomEvent(type, false, false, detail);\n\treturn e;\n}\n\nfunction query_selector_all(selector, parent = document.body) {\n\treturn Array.from(parent.querySelectorAll(selector));\n}\n\nclass HtmlTag {\n\t\n\t\n\t\n\t\n\n\tconstructor(anchor = null) {\n\t\tthis.a = anchor;\n\t\tthis.e = this.n = null;\n\t}\n\n\tm(html, target, anchor = null) {\n\t\tif (!this.e) {\n\t\t\tthis.e = element(target.nodeName );\n\t\t\tthis.t = target;\n\t\t\tthis.h(html);\n\t\t}\n\n\t\tthis.i(anchor);\n\t}\n\n\th(html) {\n\t\tthis.e.innerHTML = html;\n\t\tthis.n = Array.from(this.e.childNodes);\n\t}\n\n\ti(anchor) {\n\t\tfor (let i = 0; i < this.n.length; i += 1) {\n\t\t\tinsert(this.t, this.n[i], anchor);\n\t\t}\n\t}\n\n\tp(html) {\n\t\tthis.d();\n\t\tthis.h(html);\n\t\tthis.i(this.a);\n\t}\n\n\td() {\n\t\tthis.n.forEach(detach);\n\t}\n}\n\nfunction attribute_to_object(attributes) {\n\tconst result = {};\n\tfor (const attribute of attributes) {\n\t\tresult[attribute.name] = attribute.value;\n\t}\n\treturn result;\n}\n\nfunction get_custom_elements_slots(element) {\n\tconst result = {};\n\telement.childNodes.forEach((node) => {\n\t\tresult[node.slot || 'default'] = true;\n\t});\n\treturn result;\n}\n\nconst active_docs = new Set();\nlet active = 0;\n\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n\tlet hash = 5381;\n\tlet i = str.length;\n\n\twhile (i--) hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n\treturn hash >>> 0;\n}\n\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n\tconst step = 16.666 / duration;\n\tlet keyframes = '{\\n';\n\n\tfor (let p = 0; p <= 1; p += step) {\n\t\tconst t = a + (b - a) * ease(p);\n\t\tkeyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n\t}\n\n\tconst rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n\tconst name = `__svelte_${hash(rule)}_${uid}`;\n\tconst doc = get_root_for_node(node) ;\n\tactive_docs.add(doc);\n\tconst stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = append_empty_stylesheet(node).sheet );\n\tconst current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n\n\tif (!current_rules[name]) {\n\t\tcurrent_rules[name] = true;\n\t\tstylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n\t}\n\n\tconst animation = node.style.animation || '';\n\tnode.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n\n\tactive += 1;\n\treturn name;\n}\n\nfunction delete_rule(node, name) {\n\tconst previous = (node.style.animation || '').split(', ');\n\tconst next = previous.filter(name\n\t\t? anim => anim.indexOf(name) < 0 // remove specific animation\n\t\t: anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n\t);\n\tconst deleted = previous.length - next.length;\n\tif (deleted) {\n\t\tnode.style.animation = next.join(', ');\n\t\tactive -= deleted;\n\t\tif (!active) clear_rules();\n\t}\n}\n\nfunction clear_rules() {\n\traf(() => {\n\t\tif (active) return;\n\t\tactive_docs.forEach(doc => {\n\t\t\tconst stylesheet = doc.__svelte_stylesheet;\n\t\t\tlet i = stylesheet.cssRules.length;\n\t\t\twhile (i--) stylesheet.deleteRule(i);\n\t\t\tdoc.__svelte_rules = {};\n\t\t});\n\t\tactive_docs.clear();\n\t});\n}\n\n//todo: documentation says it is DOMRect, but in IE it would be ClientRect\n\n\n\n\nfunction create_animation(node, from, fn, params) {\n\tif (!from) return noop;\n\n\tconst to = node.getBoundingClientRect();\n\tif (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom) return noop;\n\n\n\tconst {\n\t\tdelay = 0,\n\t\tduration = 300,\n\t\teasing = identity,\n\t\t// @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n\t\tstart: start_time = now() + delay,\n\t\t// @ts-ignore todo:\n\t\tend = start_time + duration,\n\t\ttick = noop,\n\t\tcss\n\t} = fn(node, { from, to }, params);\n\n\tlet running = true;\n\tlet started = false;\n\tlet name;\n\n\tfunction start() {\n\t\tif (css) {\n\t\t\tname = create_rule(node, 0, 1, duration, delay, easing, css);\n\t\t}\n\n\t\tif (!delay) {\n\t\t\tstarted = true;\n\t\t}\n\t}\n\n\tfunction stop() {\n\t\tif (css) delete_rule(node, name);\n\t\trunning = false;\n\t}\n\n\tloop(now => {\n\t\tif (!started && now >= start_time) {\n\t\t\tstarted = true;\n\t\t}\n\n\t\tif (started && now >= end) {\n\t\t\ttick(1, 0);\n\t\t\tstop();\n\t\t}\n\n\t\tif (!running) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (started) {\n\t\t\tconst p = now - start_time;\n\t\t\tconst t = 0 + 1 * easing(p / duration);\n\t\t\ttick(t, 1 - t);\n\t\t}\n\n\t\treturn true;\n\t});\n\n\tstart();\n\n\ttick(0, 1);\n\n\treturn stop;\n}\n\nfunction fix_position(node) {\n\tconst style = getComputedStyle(node);\n\n\tif (style.position !== 'absolute' && style.position !== 'fixed') {\n\t\tconst { width, height } = style;\n\t\tconst a = node.getBoundingClientRect();\n\t\tnode.style.position = 'absolute';\n\t\tnode.style.width = width;\n\t\tnode.style.height = height;\n\t\tadd_transform(node, a);\n\t}\n}\n\nfunction add_transform(node, a) {\n\tconst b = node.getBoundingClientRect();\n\n\tif (a.left !== b.left || a.top !== b.top) {\n\t\tconst style = getComputedStyle(node);\n\t\tconst transform = style.transform === 'none' ? '' : style.transform;\n\n\t\tnode.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n\t}\n}\n\nlet current_component;\n\nfunction set_current_component(component) {\n\tcurrent_component = component;\n}\n\nfunction get_current_component() {\n\tif (!current_component) throw new Error('Function called outside component initialization');\n\treturn current_component;\n}\n\nfunction beforeUpdate(fn) {\n\tget_current_component().$$.before_update.push(fn);\n}\n\nfunction onMount(fn) {\n\tget_current_component().$$.on_mount.push(fn);\n}\n\nfunction afterUpdate(fn) {\n\tget_current_component().$$.after_update.push(fn);\n}\n\nfunction onDestroy(fn) {\n\tget_current_component().$$.on_destroy.push(fn);\n}\n\nfunction createEventDispatcher\n\n() {\n\tconst component = get_current_component();\n\n\treturn (type, detail) => {\n\t\tconst callbacks = component.$$.callbacks[type];\n\n\t\tif (callbacks) {\n\t\t\t// TODO are there situations where events could be dispatched\n\t\t\t// in a server (non-DOM) environment?\n\t\t\tconst event = custom_event(type, detail);\n\t\t\tcallbacks.slice().forEach(fn => {\n\t\t\t\tfn.call(component, event);\n\t\t\t});\n\t\t}\n\t};\n}\n\nfunction setContext(key, context) {\n\tget_current_component().$$.context.set(key, context);\n}\n\nfunction getContext(key) {\n\treturn get_current_component().$$.context.get(key);\n}\n\nfunction hasContext(key) {\n\treturn get_current_component().$$.context.has(key);\t\n}\n\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n\tconst callbacks = component.$$.callbacks[event.type];\n\n\tif (callbacks) {\n\t\tcallbacks.slice().forEach(fn => fn(event));\n\t}\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\n\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\n\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\n\nfunction schedule_update() {\n\tif (!update_scheduled) {\n\t\tupdate_scheduled = true;\n\t\tresolved_promise.then(flush);\n\t}\n}\n\nfunction tick() {\n\tschedule_update();\n\treturn resolved_promise;\n}\n\nfunction add_render_callback(fn) {\n\trender_callbacks.push(fn);\n}\n\nfunction add_flush_callback(fn) {\n\tflush_callbacks.push(fn);\n}\n\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n\tif (flushing) return;\n\tflushing = true;\n\n\tdo {\n\t\t// first, call beforeUpdate functions\n\t\t// and update components\n\t\tfor (let i = 0; i < dirty_components.length; i += 1) {\n\t\t\tconst component = dirty_components[i];\n\t\t\tset_current_component(component);\n\t\t\tupdate(component.$$);\n\t\t}\n\t\tset_current_component(null);\n\n\t\tdirty_components.length = 0;\n\n\t\twhile (binding_callbacks.length) binding_callbacks.pop()();\n\n\t\t// then, once components are updated, call\n\t\t// afterUpdate functions. This may cause\n\t\t// subsequent updates...\n\t\tfor (let i = 0; i < render_callbacks.length; i += 1) {\n\t\t\tconst callback = render_callbacks[i];\n\n\t\t\tif (!seen_callbacks.has(callback)) {\n\t\t\t\t// ...so guard against infinite loops\n\t\t\t\tseen_callbacks.add(callback);\n\n\t\t\t\tcallback();\n\t\t\t}\n\t\t}\n\n\t\trender_callbacks.length = 0;\n\t} while (dirty_components.length);\n\n\twhile (flush_callbacks.length) {\n\t\tflush_callbacks.pop()();\n\t}\n\n\tupdate_scheduled = false;\n\tflushing = false;\n\tseen_callbacks.clear();\n}\n\nfunction update($$) {\n\tif ($$.fragment !== null) {\n\t\t$$.update();\n\t\trun_all($$.before_update);\n\t\tconst dirty = $$.dirty;\n\t\t$$.dirty = [-1];\n\t\t$$.fragment && $$.fragment.p($$.ctx, dirty);\n\n\t\t$$.after_update.forEach(add_render_callback);\n\t}\n}\n\nlet promise;\n\nfunction wait() {\n\tif (!promise) {\n\t\tpromise = Promise.resolve();\n\t\tpromise.then(() => {\n\t\t\tpromise = null;\n\t\t});\n\t}\n\n\treturn promise;\n}\n\nfunction dispatch(node, direction, kind) {\n\tnode.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\n\nconst outroing = new Set();\nlet outros;\n\nfunction group_outros() {\n\toutros = {\n\t\tr: 0,     // remaining outros\n\t\tc: [],    // callbacks\n\t\tp: outros // parent group\n\t};\n}\n\nfunction check_outros() {\n\tif (!outros.r) {\n\t\trun_all(outros.c);\n\t}\n\toutros = outros.p;\n}\n\nfunction transition_in(block, local) {\n\tif (block && block.i) {\n\t\toutroing.delete(block);\n\t\tblock.i(local);\n\t}\n}\n\nfunction transition_out(block, local, detach, callback) {\n\tif (block && block.o) {\n\t\tif (outroing.has(block)) return;\n\t\toutroing.add(block);\n\n\t\toutros.c.push(() => {\n\t\t\toutroing.delete(block);\n\t\t\tif (callback) {\n\t\t\t\tif (detach) block.d(1);\n\t\t\t\tcallback();\n\t\t\t}\n\t\t});\n\n\t\tblock.o(local);\n\t}\n}\n\nconst null_transition = { duration: 0 };\n\n\n\nfunction create_in_transition(node, fn, params) {\n\tlet config = fn(node, params);\n\tlet running = false;\n\tlet animation_name;\n\tlet task;\n\tlet uid = 0;\n\n\tfunction cleanup() {\n\t\tif (animation_name) delete_rule(node, animation_name);\n\t}\n\n\tfunction go() {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = identity,\n\t\t\ttick = noop,\n\t\t\tcss\n\t\t} = config || null_transition;\n\n\t\tif (css) animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n\t\ttick(0, 1);\n\n\t\tconst start_time = now() + delay;\n\t\tconst end_time = start_time + duration;\n\n\t\tif (task) task.abort();\n\t\trunning = true;\n\n\t\tadd_render_callback(() => dispatch(node, true, 'start'));\n\n\t\ttask = loop(now => {\n\t\t\tif (running) {\n\t\t\t\tif (now >= end_time) {\n\t\t\t\t\ttick(1, 0);\n\n\t\t\t\t\tdispatch(node, true, 'end');\n\n\t\t\t\t\tcleanup();\n\t\t\t\t\treturn running = false;\n\t\t\t\t}\n\n\t\t\t\tif (now >= start_time) {\n\t\t\t\t\tconst t = easing((now - start_time) / duration);\n\t\t\t\t\ttick(t, 1 - t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn running;\n\t\t});\n\t}\n\n\tlet started = false;\n\n\treturn {\n\t\tstart() {\n\t\t\tif (started) return;\n\n\t\t\tdelete_rule(node);\n\n\t\t\tif (is_function(config)) {\n\t\t\t\tconfig = config();\n\t\t\t\twait().then(go);\n\t\t\t} else {\n\t\t\t\tgo();\n\t\t\t}\n\t\t},\n\n\t\tinvalidate() {\n\t\t\tstarted = false;\n\t\t},\n\n\t\tend() {\n\t\t\tif (running) {\n\t\t\t\tcleanup();\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t};\n}\n\nfunction create_out_transition(node, fn, params) {\n\tlet config = fn(node, params);\n\tlet running = true;\n\tlet animation_name;\n\n\tconst group = outros;\n\n\tgroup.r += 1;\n\n\tfunction go() {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = identity,\n\t\t\ttick = noop,\n\t\t\tcss\n\t\t} = config || null_transition;\n\n\t\tif (css) animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n\n\t\tconst start_time = now() + delay;\n\t\tconst end_time = start_time + duration;\n\n\t\tadd_render_callback(() => dispatch(node, false, 'start'));\n\n\t\tloop(now => {\n\t\t\tif (running) {\n\t\t\t\tif (now >= end_time) {\n\t\t\t\t\ttick(0, 1);\n\n\t\t\t\t\tdispatch(node, false, 'end');\n\n\t\t\t\t\tif (!--group.r) {\n\t\t\t\t\t\t// this will result in `end()` being called,\n\t\t\t\t\t\t// so we don't need to clean up here\n\t\t\t\t\t\trun_all(group.c);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (now >= start_time) {\n\t\t\t\t\tconst t = easing((now - start_time) / duration);\n\t\t\t\t\ttick(1 - t, t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn running;\n\t\t});\n\t}\n\n\tif (is_function(config)) {\n\t\twait().then(() => {\n\t\t\t// @ts-ignore\n\t\t\tconfig = config();\n\t\t\tgo();\n\t\t});\n\t} else {\n\t\tgo();\n\t}\n\n\treturn {\n\t\tend(reset) {\n\t\t\tif (reset && config.tick) {\n\t\t\t\tconfig.tick(1, 0);\n\t\t\t}\n\n\t\t\tif (running) {\n\t\t\t\tif (animation_name) delete_rule(node, animation_name);\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t};\n}\n\nfunction create_bidirectional_transition(node, fn, params, intro) {\n\tlet config = fn(node, params);\n\n\tlet t = intro ? 0 : 1;\n\n\tlet running_program = null;\n\tlet pending_program = null;\n\tlet animation_name = null;\n\n\tfunction clear_animation() {\n\t\tif (animation_name) delete_rule(node, animation_name);\n\t}\n\n\tfunction init(program, duration) {\n\t\tconst d = program.b - t;\n\t\tduration *= Math.abs(d);\n\n\t\treturn {\n\t\t\ta: t,\n\t\t\tb: program.b,\n\t\t\td,\n\t\t\tduration,\n\t\t\tstart: program.start,\n\t\t\tend: program.start + duration,\n\t\t\tgroup: program.group\n\t\t};\n\t}\n\n\tfunction go(b) {\n\t\tconst {\n\t\t\tdelay = 0,\n\t\t\tduration = 300,\n\t\t\teasing = identity,\n\t\t\ttick = noop,\n\t\t\tcss\n\t\t} = config || null_transition;\n\n\t\tconst program = {\n\t\t\tstart: now() + delay,\n\t\t\tb\n\t\t};\n\n\t\tif (!b) {\n\t\t\t// @ts-ignore todo: improve typings\n\t\t\tprogram.group = outros;\n\t\t\toutros.r += 1;\n\t\t}\n\n\t\tif (running_program || pending_program) {\n\t\t\tpending_program = program;\n\t\t} else {\n\t\t\t// if this is an intro, and there's a delay, we need to do\n\t\t\t// an initial tick and/or apply CSS animation immediately\n\t\t\tif (css) {\n\t\t\t\tclear_animation();\n\t\t\t\tanimation_name = create_rule(node, t, b, duration, delay, easing, css);\n\t\t\t}\n\n\t\t\tif (b) tick(0, 1);\n\n\t\t\trunning_program = init(program, duration);\n\t\t\tadd_render_callback(() => dispatch(node, b, 'start'));\n\n\t\t\tloop(now => {\n\t\t\t\tif (pending_program && now > pending_program.start) {\n\t\t\t\t\trunning_program = init(pending_program, duration);\n\t\t\t\t\tpending_program = null;\n\n\t\t\t\t\tdispatch(node, running_program.b, 'start');\n\n\t\t\t\t\tif (css) {\n\t\t\t\t\t\tclear_animation();\n\t\t\t\t\t\tanimation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (running_program) {\n\t\t\t\t\tif (now >= running_program.end) {\n\t\t\t\t\t\ttick(t = running_program.b, 1 - t);\n\t\t\t\t\t\tdispatch(node, running_program.b, 'end');\n\n\t\t\t\t\t\tif (!pending_program) {\n\t\t\t\t\t\t\t// we're done\n\t\t\t\t\t\t\tif (running_program.b) {\n\t\t\t\t\t\t\t\t// intro — we can tidy up immediately\n\t\t\t\t\t\t\t\tclear_animation();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// outro — needs to be coordinated\n\t\t\t\t\t\t\t\tif (!--running_program.group.r) run_all(running_program.group.c);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\trunning_program = null;\n\t\t\t\t\t} else if (now >= running_program.start) {\n\t\t\t\t\t\tconst p = now - running_program.start;\n\t\t\t\t\t\tt = running_program.a + running_program.d * easing(p / running_program.duration);\n\t\t\t\t\t\ttick(t, 1 - t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn !!(running_program || pending_program);\n\t\t\t});\n\t\t}\n\t}\n\n\treturn {\n\t\trun(b) {\n\t\t\tif (is_function(config)) {\n\t\t\t\twait().then(() => {\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tconfig = config();\n\t\t\t\t\tgo(b);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tgo(b);\n\t\t\t}\n\t\t},\n\n\t\tend() {\n\t\t\tclear_animation();\n\t\t\trunning_program = pending_program = null;\n\t\t}\n\t};\n}\n\nfunction handle_promise(promise, info) {\n\tconst token = info.token = {};\n\n\tfunction update(type, index, key, value) {\n\t\tif (info.token !== token) return;\n\n\t\tinfo.resolved = value;\n\n\t\tlet child_ctx = info.ctx;\n\n\t\tif (key !== undefined) {\n\t\t\tchild_ctx = child_ctx.slice();\n\t\t\tchild_ctx[key] = value;\n\t\t}\n\n\t\tconst block = type && (info.current = type)(child_ctx);\n\n\t\tlet needs_flush = false;\n\n\t\tif (info.block) {\n\t\t\tif (info.blocks) {\n\t\t\t\tinfo.blocks.forEach((block, i) => {\n\t\t\t\t\tif (i !== index && block) {\n\t\t\t\t\t\tgroup_outros();\n\t\t\t\t\t\ttransition_out(block, 1, 1, () => {\n\t\t\t\t\t\t\tif (info.blocks[i] === block) {\n\t\t\t\t\t\t\t\tinfo.blocks[i] = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcheck_outros();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tinfo.block.d(1);\n\t\t\t}\n\n\t\t\tblock.c();\n\t\t\ttransition_in(block, 1);\n\t\t\tblock.m(info.mount(), info.anchor);\n\n\t\t\tneeds_flush = true;\n\t\t}\n\n\t\tinfo.block = block;\n\t\tif (info.blocks) info.blocks[index] = block;\n\n\t\tif (needs_flush) {\n\t\t\tflush();\n\t\t}\n\t}\n\n\tif (is_promise(promise)) {\n\t\tconst current_component = get_current_component();\n\t\tpromise.then(value => {\n\t\t\tset_current_component(current_component);\n\t\t\tupdate(info.then, 1, info.value, value);\n\t\t\tset_current_component(null);\n\t\t}, error => {\n\t\t\tset_current_component(current_component);\n\t\t\tupdate(info.catch, 2, info.error, error);\n\t\t\tset_current_component(null);\n\t\t\tif (!info.hasCatch) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t});\n\n\t\t// if we previously had a then/catch block, destroy it\n\t\tif (info.current !== info.pending) {\n\t\t\tupdate(info.pending, 0);\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\tif (info.current !== info.then) {\n\t\t\tupdate(info.then, 1, info.value, promise);\n\t\t\treturn true;\n\t\t}\n\n\t\tinfo.resolved = promise;\n\t}\n}\n\nfunction update_await_block_branch(info, ctx, dirty) {\n\tconst child_ctx = ctx.slice();\n\tconst { resolved } = info;\n\n\tif (info.current === info.then) {\n\t\tchild_ctx[info.value] = resolved;\n\t}\n\tif (info.current === info.catch) {\n\t\tchild_ctx[info.error] = resolved;\n\t}\n\n\tinfo.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n\t? window\n\t: typeof globalThis !== 'undefined'\n\t? globalThis\n\t: global) ;\n\nfunction destroy_block(block, lookup) {\n\tblock.d(1);\n\tlookup.delete(block.key);\n}\n\nfunction outro_and_destroy_block(block, lookup) {\n\ttransition_out(block, 1, 1, () => {\n\t\tlookup.delete(block.key);\n\t});\n}\n\nfunction fix_and_destroy_block(block, lookup) {\n\tblock.f();\n\tdestroy_block(block, lookup);\n}\n\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n\tblock.f();\n\toutro_and_destroy_block(block, lookup);\n}\n\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n\tlet o = old_blocks.length;\n\tlet n = list.length;\n\n\tlet i = o;\n\tconst old_indexes = {};\n\twhile (i--) old_indexes[old_blocks[i].key] = i;\n\n\tconst new_blocks = [];\n\tconst new_lookup = new Map();\n\tconst deltas = new Map();\n\n\ti = n;\n\twhile (i--) {\n\t\tconst child_ctx = get_context(ctx, list, i);\n\t\tconst key = get_key(child_ctx);\n\t\tlet block = lookup.get(key);\n\n\t\tif (!block) {\n\t\t\tblock = create_each_block(key, child_ctx);\n\t\t\tblock.c();\n\t\t} else if (dynamic) {\n\t\t\tblock.p(child_ctx, dirty);\n\t\t}\n\n\t\tnew_lookup.set(key, new_blocks[i] = block);\n\n\t\tif (key in old_indexes) deltas.set(key, Math.abs(i - old_indexes[key]));\n\t}\n\n\tconst will_move = new Set();\n\tconst did_move = new Set();\n\n\tfunction insert(block) {\n\t\ttransition_in(block, 1);\n\t\tblock.m(node, next);\n\t\tlookup.set(block.key, block);\n\t\tnext = block.first;\n\t\tn--;\n\t}\n\n\twhile (o && n) {\n\t\tconst new_block = new_blocks[n - 1];\n\t\tconst old_block = old_blocks[o - 1];\n\t\tconst new_key = new_block.key;\n\t\tconst old_key = old_block.key;\n\n\t\tif (new_block === old_block) {\n\t\t\t// do nothing\n\t\t\tnext = new_block.first;\n\t\t\to--;\n\t\t\tn--;\n\t\t} else if (!new_lookup.has(old_key)) {\n\t\t\t// remove old block\n\t\t\tdestroy(old_block, lookup);\n\t\t\to--;\n\t\t} else if (!lookup.has(new_key) || will_move.has(new_key)) {\n\t\t\tinsert(new_block);\n\t\t} else if (did_move.has(old_key)) {\n\t\t\to--;\n\n\t\t} else if (deltas.get(new_key) > deltas.get(old_key)) {\n\t\t\tdid_move.add(new_key);\n\t\t\tinsert(new_block);\n\n\t\t} else {\n\t\t\twill_move.add(old_key);\n\t\t\to--;\n\t\t}\n\t}\n\n\twhile (o--) {\n\t\tconst old_block = old_blocks[o];\n\t\tif (!new_lookup.has(old_block.key)) destroy(old_block, lookup);\n\t}\n\n\twhile (n) insert(new_blocks[n - 1]);\n\n\treturn new_blocks;\n}\n\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n\tconst keys = new Set();\n\tfor (let i = 0; i < list.length; i++) {\n\t\tconst key = get_key(get_context(ctx, list, i));\n\t\tif (keys.has(key)) {\n\t\t\tthrow new Error('Cannot have duplicate keys in a keyed each');\n\t\t}\n\t\tkeys.add(key);\n\t}\n}\n\nfunction get_spread_update(levels, updates) {\n\tconst update = {};\n\n\tconst to_null_out = {};\n\tconst accounted_for = { $$scope: 1 };\n\n\tlet i = levels.length;\n\twhile (i--) {\n\t\tconst o = levels[i];\n\t\tconst n = updates[i];\n\n\t\tif (n) {\n\t\t\tfor (const key in o) {\n\t\t\t\tif (!(key in n)) to_null_out[key] = 1;\n\t\t\t}\n\n\t\t\tfor (const key in n) {\n\t\t\t\tif (!accounted_for[key]) {\n\t\t\t\t\tupdate[key] = n[key];\n\t\t\t\t\taccounted_for[key] = 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlevels[i] = n;\n\t\t} else {\n\t\t\tfor (const key in o) {\n\t\t\t\taccounted_for[key] = 1;\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (const key in to_null_out) {\n\t\tif (!(key in update)) update[key] = undefined;\n\t}\n\n\treturn update;\n}\n\nfunction get_spread_object(spread_props) {\n\treturn typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n\t'allowfullscreen',\n\t'allowpaymentrequest',\n\t'async',\n\t'autofocus',\n\t'autoplay',\n\t'checked',\n\t'controls',\n\t'default',\n\t'defer',\n\t'disabled',\n\t'formnovalidate',\n\t'hidden',\n\t'ismap',\n\t'loop',\n\t'multiple',\n\t'muted',\n\t'nomodule',\n\t'novalidate',\n\t'open',\n\t'playsinline',\n\t'readonly',\n\t'required',\n\t'reversed',\n\t'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\n\nfunction spread(args, classes_to_add) {\n\tconst attributes = Object.assign({}, ...args);\n\tif (classes_to_add) {\n\t\tif (attributes.class == null) {\n\t\t\tattributes.class = classes_to_add;\n\t\t} else {\n\t\t\tattributes.class += ' ' + classes_to_add;\n\t\t}\n\t}\n\tlet str = '';\n\n\tObject.keys(attributes).forEach(name => {\n\t\tif (invalid_attribute_name_character.test(name)) return;\n\n\t\tconst value = attributes[name];\n\t\tif (value === true) str += ' ' + name;\n\t\telse if (boolean_attributes.has(name.toLowerCase())) {\n\t\t\tif (value) str += ' ' + name;\n\t\t} else if (value != null) {\n\t\t\tstr += ` ${name}=\"${String(value).replace(/\"/g, '"').replace(/'/g, ''')}\"`;\n\t\t}\n\t});\n\n\treturn str;\n}\n\nconst escaped = {\n\t'\"': '"',\n\t\"'\": ''',\n\t'&': '&',\n\t'<': '<',\n\t'>': '>'\n};\n\nfunction escape(html) {\n\treturn String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\n\nfunction each(items, fn) {\n\tlet str = '';\n\tfor (let i = 0; i < items.length; i += 1) {\n\t\tstr += fn(items[i], i);\n\t}\n\treturn str;\n}\n\nconst missing_component = {\n\t$$render: () => ''\n};\n\nfunction validate_component(component, name) {\n\tif (!component || !component.$$render) {\n\t\tif (name === 'svelte:component') name += ' this={...}';\n\t\tthrow new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n\t}\n\n\treturn component;\n}\n\nfunction debug(file, line, column, values) {\n\tconsole.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n\tconsole.log(values); // eslint-disable-line no-console\n\treturn '';\n}\n\nlet on_destroy;\n\nfunction create_ssr_component(fn) {\n\tfunction $$render(result, props, bindings, slots, context) {\n\t\tconst parent_component = current_component;\n\n\t\tconst $$ = {\n\t\t\ton_destroy,\n\t\t\tcontext: new Map(parent_component ? parent_component.$$.context : context || []),\n\n\t\t\t// these will be immediately discarded\n\t\t\ton_mount: [],\n\t\t\tbefore_update: [],\n\t\t\tafter_update: [],\n\t\t\tcallbacks: blank_object()\n\t\t};\n\n\t\tset_current_component({ $$ });\n\n\t\tconst html = fn(result, props, bindings, slots);\n\n\t\tset_current_component(parent_component);\n\t\treturn html;\n\t}\n\n\treturn {\n\t\trender: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n\t\t\ton_destroy = [];\n\n\t\t\tconst result\n\n\n\n\n\n\n = { title: '', head: '', css: new Set() };\n\n\t\t\tconst html = $$render(result, props, {}, $$slots, context);\n\n\t\t\trun_all(on_destroy);\n\n\t\t\treturn {\n\t\t\t\thtml,\n\t\t\t\tcss: {\n\t\t\t\t\tcode: Array.from(result.css).map(css => css.code).join('\\n'),\n\t\t\t\t\tmap: null // TODO\n\t\t\t\t},\n\t\t\t\thead: result.title + result.head\n\t\t\t};\n\t\t},\n\n\t\t$$render\n\t};\n}\n\nfunction add_attribute(name, value, boolean) {\n\tif (value == null || (boolean && !value)) return '';\n\treturn ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\n\nfunction add_classes(classes) {\n\treturn classes ? ` class=\"${classes}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n\tconst index = component.$$.props[name];\n\tif (index !== undefined) {\n\t\tcomponent.$$.bound[index] = callback;\n\t\tcallback(component.$$.ctx[index]);\n\t}\n}\n\nfunction create_component(block) {\n\tblock && block.c();\n}\n\nfunction claim_component(block, parent_nodes) {\n\tblock && block.l(parent_nodes);\n}\n\nfunction mount_component(component, target, anchor, customElement) {\n\tconst { fragment, on_mount, on_destroy, after_update } = component.$$;\n\n\tfragment && fragment.m(target, anchor);\n\n\tif (!customElement) {\n\t\t// onMount happens before the initial afterUpdate\n\t\tadd_render_callback(() => {\n\n\t\t\tconst new_on_destroy = on_mount.map(run).filter(is_function);\n\t\t\tif (on_destroy) {\n\t\t\t\ton_destroy.push(...new_on_destroy);\n\t\t\t} else {\n\t\t\t\t// Edge case - component was destroyed immediately,\n\t\t\t\t// most likely as a result of a binding initialising\n\t\t\t\trun_all(new_on_destroy);\n\t\t\t}\n\t\t\tcomponent.$$.on_mount = [];\n\t\t});\n\t}\n\n\tafter_update.forEach(add_render_callback);\n}\n\nfunction destroy_component(component, detaching) {\n\tconst $$ = component.$$;\n\tif ($$.fragment !== null) {\n\t\trun_all($$.on_destroy);\n\n\t\t$$.fragment && $$.fragment.d(detaching);\n\n\t\t// TODO null out other refs, including component.$$ (but need to\n\t\t// preserve final state?)\n\t\t$$.on_destroy = $$.fragment = null;\n\t\t$$.ctx = [];\n\t}\n}\n\nfunction make_dirty(component, i) {\n\tif (component.$$.dirty[0] === -1) {\n\t\tdirty_components.push(component);\n\t\tschedule_update();\n\t\tcomponent.$$.dirty.fill(0);\n\t}\n\tcomponent.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\n\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n\tconst parent_component = current_component;\n\tset_current_component(component);\n\n\tconst $$ = component.$$ = {\n\t\tfragment: null,\n\t\tctx: null,\n\n\t\t// state\n\t\tprops,\n\t\tupdate: noop,\n\t\tnot_equal,\n\t\tbound: blank_object(),\n\n\t\t// lifecycle\n\t\ton_mount: [],\n\t\ton_destroy: [],\n\t\ton_disconnect: [],\n\t\tbefore_update: [],\n\t\tafter_update: [],\n\t\tcontext: new Map(parent_component ? parent_component.$$.context : options.context || []),\n\n\t\t// everything else\n\t\tcallbacks: blank_object(),\n\t\tdirty,\n\t\tskip_bound: false,\n\t\troot: options.target || parent_component.$$.root\n\t};\n\n\tappend_styles && append_styles($$.root);\n\n\tlet ready = false;\n\n\t$$.ctx = instance\n\t\t? instance(component, options.props || {}, (i, ret, ...rest) => {\n\t\t\tconst value = rest.length ? rest[0] : ret;\n\t\t\tif ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n\t\t\t\tif (!$$.skip_bound && $$.bound[i]) $$.bound[i](value);\n\t\t\t\tif (ready) make_dirty(component, i);\n\t\t\t}\n\t\t\treturn ret;\n\t\t})\n\t\t: [];\n\n\t$$.update();\n\tready = true;\n\trun_all($$.before_update);\n\n\t// `false` as a special case of no DOM component\n\t$$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n\n\tif (options.target) {\n\t\tif (options.hydrate) {\n\t\t\tconst nodes = children(options.target);\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t$$.fragment && $$.fragment.l(nodes);\n\t\t\tnodes.forEach(detach);\n\t\t} else {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t$$.fragment && $$.fragment.c();\n\t\t}\n\n\t\tif (options.intro) transition_in(component.$$.fragment);\n\t\tmount_component(component, options.target, options.anchor, options.customElement);\n\t\tflush();\n\t}\n\n\tset_current_component(parent_component);\n}\n\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n\tSvelteElement = class extends HTMLElement {\n\t\t\n\t\t\n\t\tconstructor() {\n\t\t\tsuper();\n\t\t\tthis.attachShadow({ mode: 'open' });\n\t\t}\n\n\t\tconnectedCallback() {\n\t\t\tconst { on_mount } = this.$$;\n\t\t\tthis.$$.on_disconnect = on_mount.map(run).filter(is_function);\n\n\t\t\t// @ts-ignore todo: improve typings\n\t\t\tfor (const key in this.$$.slotted) {\n\t\t\t\t// @ts-ignore todo: improve typings\n\t\t\t\tthis.appendChild(this.$$.slotted[key]);\n\t\t\t}\n\t\t}\n\n\t\tattributeChangedCallback(attr, _oldValue, newValue) {\n\t\t\tthis[attr] = newValue;\n\t\t}\n\n\t\tdisconnectedCallback() {\n\t\t\trun_all(this.$$.on_disconnect);\n\t\t}\n\n\t\t$destroy() {\n\t\t\tdestroy_component(this, 1);\n\t\t\tthis.$destroy = noop;\n\t\t}\n\n\t\t$on(type, callback) {\n\t\t\t// TODO should this delegate to addEventListener?\n\t\t\tconst callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n\t\t\tcallbacks.push(callback);\n\n\t\t\treturn () => {\n\t\t\t\tconst index = callbacks.indexOf(callback);\n\t\t\t\tif (index !== -1) callbacks.splice(index, 1);\n\t\t\t};\n\t\t}\n\n\t\t$set($$props) {\n\t\t\tif (this.$$set && !is_empty($$props)) {\n\t\t\t\tthis.$$.skip_bound = true;\n\t\t\t\tthis.$$set($$props);\n\t\t\t\tthis.$$.skip_bound = false;\n\t\t\t}\n\t\t}\n\t};\n}\n\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n\t\n\t\n\n\t$destroy() {\n\t\tdestroy_component(this, 1);\n\t\tthis.$destroy = noop;\n\t}\n\n\t$on(type, callback) {\n\t\tconst callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n\t\tcallbacks.push(callback);\n\n\t\treturn () => {\n\t\t\tconst index = callbacks.indexOf(callback);\n\t\t\tif (index !== -1) callbacks.splice(index, 1);\n\t\t};\n\t}\n\n\t$set($$props) {\n\t\tif (this.$$set && !is_empty($$props)) {\n\t\t\tthis.$$.skip_bound = true;\n\t\t\tthis.$$set($$props);\n\t\t\tthis.$$.skip_bound = false;\n\t\t}\n\t}\n}\n\nfunction dispatch_dev(type, detail) {\n\tdocument.dispatchEvent(custom_event(type, { version: '3.38.2', ...detail }));\n}\n\nfunction append_dev(target, node) {\n\tdispatch_dev('SvelteDOMInsert', { target, node });\n\tappend(target, node);\n}\n\nfunction insert_dev(target, node, anchor) {\n\tdispatch_dev('SvelteDOMInsert', { target, node, anchor });\n\tinsert(target, node, anchor);\n}\n\nfunction detach_dev(node) {\n\tdispatch_dev('SvelteDOMRemove', { node });\n\tdetach(node);\n}\n\nfunction detach_between_dev(before, after) {\n\twhile (before.nextSibling && before.nextSibling !== after) {\n\t\tdetach_dev(before.nextSibling);\n\t}\n}\n\nfunction detach_before_dev(after) {\n\twhile (after.previousSibling) {\n\t\tdetach_dev(after.previousSibling);\n\t}\n}\n\nfunction detach_after_dev(before) {\n\twhile (before.nextSibling) {\n\t\tdetach_dev(before.nextSibling);\n\t}\n}\n\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n\tconst modifiers = options === true ? [ 'capture' ] : options ? Array.from(Object.keys(options)) : [];\n\tif (has_prevent_default) modifiers.push('preventDefault');\n\tif (has_stop_propagation) modifiers.push('stopPropagation');\n\n\tdispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n\n\tconst dispose = listen(node, event, handler, options);\n\treturn () => {\n\t\tdispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n\t\tdispose();\n\t};\n}\n\nfunction attr_dev(node, attribute, value) {\n\tattr(node, attribute, value);\n\n\tif (value == null) dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n\telse dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\n\nfunction prop_dev(node, property, value) {\n\tnode[property] = value;\n\n\tdispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\n\nfunction dataset_dev(node, property, value) {\n\tnode.dataset[property] = value;\n\n\tdispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\n\nfunction set_data_dev(text, data) {\n\tdata = '' + data;\n\tif (text.wholeText === data) return;\n\n\tdispatch_dev('SvelteDOMSetData', { node: text, data });\n\ttext.data = data;\n}\n\nfunction validate_each_argument(arg) {\n\tif (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n\t\tlet msg = '{#each} only iterates over array-like objects.';\n\t\tif (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n\t\t\tmsg += ' You can use a spread to convert this iterable into an array.';\n\t\t}\n\t\tthrow new Error(msg);\n\t}\n}\n\nfunction validate_slots(name, slot, keys) {\n\tfor (const slot_key of Object.keys(slot)) {\n\t\tif (!~keys.indexOf(slot_key)) {\n\t\t\tconsole.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n\t\t}\n\t}\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n\t/**\n\t * @private\n\t * For type checking capabilities only.\n\t * Does not exist at runtime.\n\t * ### DO NOT USE!\n\t */\n\t\n\t/**\n\t * @private\n\t * For type checking capabilities only.\n\t * Does not exist at runtime.\n\t * ### DO NOT USE!\n\t */\n\t\n\t/**\n\t * @private\n\t * For type checking capabilities only.\n\t * Does not exist at runtime.\n\t * ### DO NOT USE!\n\t */\n\t\n\n\tconstructor(options) {\n\t\tif (!options || (!options.target && !options.$$inline)) {\n\t\t\tthrow new Error(\"'target' is a required option\");\n\t\t}\n\n\t\tsuper();\n\t}\n\n\t$destroy() {\n\t\tsuper.$destroy();\n\t\tthis.$destroy = () => {\n\t\t\tconsole.warn('Component was already destroyed'); // eslint-disable-line no-console\n\t\t};\n\t}\n\n\t$capture_state() {}\n\n\t$inject_state() {}\n}\n\n// TODO https://github.com/microsoft/TypeScript/issues/41770 is the reason\n// why we have to split out SvelteComponentTyped to not break existing usage of SvelteComponent.\n// Try to find a better way for Svelte 4.0.\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * \n * \n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to seperate the more strictly typed class.\n */\nclass SvelteComponentTyped\n\n\n\n extends SvelteComponentDev {\n\t/**\n\t * @private\n\t * For type checking capabilities only.\n\t * Does not exist at runtime.\n\t * ### DO NOT USE!\n\t */\n\t\n\t/**\n\t * @private\n\t * For type checking capabilities only.\n\t * Does not exist at runtime.\n\t * ### DO NOT USE!\n\t */\n\t\n\t/**\n\t * @private\n\t * For type checking capabilities only.\n\t * Does not exist at runtime.\n\t * ### DO NOT USE!\n\t */\n\t\n\n\tconstructor(options) {\n\t\tsuper(options);\n\t}\n}\n\nfunction loop_guard(timeout) {\n\tconst start = Date.now();\n\treturn () => {\n\t\tif (Date.now() - start > timeout) {\n\t\t\tthrow new Error('Infinite loop detected');\n\t\t}\n\t};\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_node, get_root_for_styles, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_await_block_branch, update_keyed_each, update_slot, update_slot_spread, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","export { identity as linear } from '../internal/index.mjs';\n\n/*\nAdapted from https://github.com/mattdesl\nDistributed under MIT License https://github.com/mattdesl/eases/blob/master/LICENSE.md\n*/\n\nfunction backInOut(t) {\n\tconst s = 1.70158 * 1.525;\n\tif ((t *= 2) < 1) return 0.5 * (t * t * ((s + 1) * t - s));\n\treturn 0.5 * ((t -= 2) * t * ((s + 1) * t + s) + 2);\n}\n\nfunction backIn(t) {\n\tconst s = 1.70158;\n\treturn t * t * ((s + 1) * t - s);\n}\n\nfunction backOut(t) {\n\tconst s = 1.70158;\n\treturn --t * t * ((s + 1) * t + s) + 1;\n}\n\nfunction bounceOut(t) {\n\tconst a = 4.0 / 11.0;\n\tconst b = 8.0 / 11.0;\n\tconst c = 9.0 / 10.0;\n\n\tconst ca = 4356.0 / 361.0;\n\tconst cb = 35442.0 / 1805.0;\n\tconst cc = 16061.0 / 1805.0;\n\n\tconst t2 = t * t;\n\n\treturn t < a\n\t\t? 7.5625 * t2\n\t\t: t < b\n\t\t\t? 9.075 * t2 - 9.9 * t + 3.4\n\t\t\t: t < c\n\t\t\t\t? ca * t2 - cb * t + cc\n\t\t\t\t: 10.8 * t * t - 20.52 * t + 10.72;\n}\n\nfunction bounceInOut(t) {\n\treturn t < 0.5\n\t\t? 0.5 * (1.0 - bounceOut(1.0 - t * 2.0))\n\t\t: 0.5 * bounceOut(t * 2.0 - 1.0) + 0.5;\n}\n\nfunction bounceIn(t) {\n\treturn 1.0 - bounceOut(1.0 - t);\n}\n\nfunction circInOut(t) {\n\tif ((t *= 2) < 1) return -0.5 * (Math.sqrt(1 - t * t) - 1);\n\treturn 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\n}\n\nfunction circIn(t) {\n\treturn 1.0 - Math.sqrt(1.0 - t * t);\n}\n\nfunction circOut(t) {\n\treturn Math.sqrt(1 - --t * t);\n}\n\nfunction cubicInOut(t) {\n\treturn t < 0.5 ? 4.0 * t * t * t : 0.5 * Math.pow(2.0 * t - 2.0, 3.0) + 1.0;\n}\n\nfunction cubicIn(t) {\n\treturn t * t * t;\n}\n\nfunction cubicOut(t) {\n\tconst f = t - 1.0;\n\treturn f * f * f + 1.0;\n}\n\nfunction elasticInOut(t) {\n\treturn t < 0.5\n\t\t? 0.5 *\n\t\t\t\tMath.sin(((+13.0 * Math.PI) / 2) * 2.0 * t) *\n\t\t\t\tMath.pow(2.0, 10.0 * (2.0 * t - 1.0))\n\t\t: 0.5 *\n\t\t\t\tMath.sin(((-13.0 * Math.PI) / 2) * (2.0 * t - 1.0 + 1.0)) *\n\t\t\t\tMath.pow(2.0, -10.0 * (2.0 * t - 1.0)) +\n\t\t\t\t1.0;\n}\n\nfunction elasticIn(t) {\n\treturn Math.sin((13.0 * t * Math.PI) / 2) * Math.pow(2.0, 10.0 * (t - 1.0));\n}\n\nfunction elasticOut(t) {\n\treturn (\n\t\tMath.sin((-13.0 * (t + 1.0) * Math.PI) / 2) * Math.pow(2.0, -10.0 * t) + 1.0\n\t);\n}\n\nfunction expoInOut(t) {\n\treturn t === 0.0 || t === 1.0\n\t\t? t\n\t\t: t < 0.5\n\t\t\t? +0.5 * Math.pow(2.0, 20.0 * t - 10.0)\n\t\t\t: -0.5 * Math.pow(2.0, 10.0 - t * 20.0) + 1.0;\n}\n\nfunction expoIn(t) {\n\treturn t === 0.0 ? t : Math.pow(2.0, 10.0 * (t - 1.0));\n}\n\nfunction expoOut(t) {\n\treturn t === 1.0 ? t : 1.0 - Math.pow(2.0, -10.0 * t);\n}\n\nfunction quadInOut(t) {\n\tt /= 0.5;\n\tif (t < 1) return 0.5 * t * t;\n\tt--;\n\treturn -0.5 * (t * (t - 2) - 1);\n}\n\nfunction quadIn(t) {\n\treturn t * t;\n}\n\nfunction quadOut(t) {\n\treturn -t * (t - 2.0);\n}\n\nfunction quartInOut(t) {\n\treturn t < 0.5\n\t\t? +8.0 * Math.pow(t, 4.0)\n\t\t: -8.0 * Math.pow(t - 1.0, 4.0) + 1.0;\n}\n\nfunction quartIn(t) {\n\treturn Math.pow(t, 4.0);\n}\n\nfunction quartOut(t) {\n\treturn Math.pow(t - 1.0, 3.0) * (1.0 - t) + 1.0;\n}\n\nfunction quintInOut(t) {\n\tif ((t *= 2) < 1) return 0.5 * t * t * t * t * t;\n\treturn 0.5 * ((t -= 2) * t * t * t * t + 2);\n}\n\nfunction quintIn(t) {\n\treturn t * t * t * t * t;\n}\n\nfunction quintOut(t) {\n\treturn --t * t * t * t * t + 1;\n}\n\nfunction sineInOut(t) {\n\treturn -0.5 * (Math.cos(Math.PI * t) - 1);\n}\n\nfunction sineIn(t) {\n\tconst v = Math.cos(t * Math.PI * 0.5);\n\tif (Math.abs(v) < 1e-14) return 1;\n\telse return 1 - v;\n}\n\nfunction sineOut(t) {\n\treturn Math.sin((t * Math.PI) / 2);\n}\n\nexport { backIn, backInOut, backOut, bounceIn, bounceInOut, bounceOut, circIn, circInOut, circOut, cubicIn, cubicInOut, cubicOut, elasticIn, elasticInOut, elasticOut, expoIn, expoInOut, expoOut, quadIn, quadInOut, quadOut, quartIn, quartInOut, quartOut, quintIn, quintInOut, quintOut, sineIn, sineInOut, sineOut };\n","import { cubicOut } from '../easing/index.mjs';\nimport { is_function } from '../internal/index.mjs';\n\n// todo: same as Transition, should it be shared?\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction flip(node, animation, params = {}) {\n\tconst style = getComputedStyle(node);\n\tconst transform = style.transform === 'none' ? '' : style.transform;\n\tconst scaleX = animation.from.width / node.clientWidth;\n\tconst scaleY = animation.from.height / node.clientHeight;\n\n\tconst dx = (animation.from.left - animation.to.left) / scaleX;\n\tconst dy = (animation.from.top - animation.to.top) / scaleY;\n\n\tconst d = Math.sqrt(dx * dx + dy * dy);\n\n\tconst {\n\t\tdelay = 0,\n\t\tduration = (d) => Math.sqrt(d) * 120,\n\t\teasing = cubicOut\n\t} = params;\n\n\treturn {\n\t\tdelay,\n\t\tduration: is_function(duration) ? duration(d) : duration,\n\t\teasing,\n\t\tcss: (_t, u) => `transform: ${transform} translate(${u * dx}px, ${u * dy}px);`\n\t};\n}\n\nexport { flip };\n","\n\n
    \n \n

    \n
    \n \n {#each data as datum, i (datum.id ? datum.id : JSON.stringify(datum))}\n \n
    \n 0 ? '' : 'hidden') + ';'}\"\n on:click=\"{function (ev) {\n moveDatum(i, i - 1);\n }}\"\n >\n \n \n \n \n \n
    \n\n
    \n {#if datum.html}\n {@html datum.html}\n {:else if datum.text}\n

    {datum.text}

    \n {:else}\n

    {datum}

    \n {/if}\n
    \n\n
    \n {#if removesItems}\n \n \n \n {/if}\n
    \n \n {/each}\n \n\n\n\n","\n\n\n","\n\n{#if current.type === 'MultipleChoice'}\n {#each current.answers as answer, i}\n \n {/each}\n{:else}\n {#each current.answers as answer, i}\n \n {/each}\n{/if}\n\n\n","import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\n/** Callback to inform of a value updates. */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst subscriber_queue = [];\n\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n\treturn {\n\t\tsubscribe: writable(value, start).subscribe\n\t};\n}\n\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n\tlet stop;\n\tconst subscribers = [];\n\n\tfunction set(new_value) {\n\t\tif (safe_not_equal(value, new_value)) {\n\t\t\tvalue = new_value;\n\t\t\tif (stop) { // store is ready\n\t\t\t\tconst run_queue = !subscriber_queue.length;\n\t\t\t\tfor (let i = 0; i < subscribers.length; i += 1) {\n\t\t\t\t\tconst s = subscribers[i];\n\t\t\t\t\ts[1]();\n\t\t\t\t\tsubscriber_queue.push(s, value);\n\t\t\t\t}\n\t\t\t\tif (run_queue) {\n\t\t\t\t\tfor (let i = 0; i < subscriber_queue.length; i += 2) {\n\t\t\t\t\t\tsubscriber_queue[i][0](subscriber_queue[i + 1]);\n\t\t\t\t\t}\n\t\t\t\t\tsubscriber_queue.length = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction update(fn) {\n\t\tset(fn(value));\n\t}\n\n\tfunction subscribe(run, invalidate = noop) {\n\t\tconst subscriber = [run, invalidate];\n\t\tsubscribers.push(subscriber);\n\t\tif (subscribers.length === 1) {\n\t\t\tstop = start(set) || noop;\n\t\t}\n\t\trun(value);\n\n\t\treturn () => {\n\t\t\tconst index = subscribers.indexOf(subscriber);\n\t\t\tif (index !== -1) {\n\t\t\t\tsubscribers.splice(index, 1);\n\t\t\t}\n\t\t\tif (subscribers.length === 0) {\n\t\t\t\tstop();\n\t\t\t\tstop = null;\n\t\t\t}\n\t\t};\n\t}\n\n\treturn { set, update, subscribe };\n}\n\n/** One or more `Readable`s. */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction derived(stores, fn, initial_value) {\n\tconst single = !Array.isArray(stores);\n\tconst stores_array = single\n\t\t? [stores ]\n\t\t: stores ;\n\n\tconst auto = fn.length < 2;\n\n\treturn readable(initial_value, (set) => {\n\t\tlet inited = false;\n\t\tconst values = [];\n\n\t\tlet pending = 0;\n\t\tlet cleanup = noop;\n\n\t\tconst sync = () => {\n\t\t\tif (pending) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcleanup();\n\t\t\tconst result = fn(single ? values[0] : values, set);\n\t\t\tif (auto) {\n\t\t\t\tset(result );\n\t\t\t} else {\n\t\t\t\tcleanup = is_function(result) ? result : noop;\n\t\t\t}\n\t\t};\n\n\t\tconst unsubscribers = stores_array.map((store, i) => subscribe(\n\t\t\tstore,\n\t\t\t(value) => {\n\t\t\t\tvalues[i] = value;\n\t\t\t\tpending &= ~(1 << i);\n\t\t\t\tif (inited) {\n\t\t\t\t\tsync();\n\t\t\t\t}\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tpending |= (1 << i);\n\t\t\t})\n\t\t);\n\n\t\tinited = true;\n\t\tsync();\n\n\t\treturn function stop() {\n\t\t\trun_all(unsubscribers);\n\t\t\tcleanup();\n\t\t};\n\t});\n}\n\nexport { derived, readable, writable };\n","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn target.propertyIsEnumerable(symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","export var TYPE;\n(function (TYPE) {\n /**\n * Raw text\n */\n TYPE[TYPE[\"literal\"] = 0] = \"literal\";\n /**\n * Variable w/o any format, e.g `var` in `this is a {var}`\n */\n TYPE[TYPE[\"argument\"] = 1] = \"argument\";\n /**\n * Variable w/ number format\n */\n TYPE[TYPE[\"number\"] = 2] = \"number\";\n /**\n * Variable w/ date format\n */\n TYPE[TYPE[\"date\"] = 3] = \"date\";\n /**\n * Variable w/ time format\n */\n TYPE[TYPE[\"time\"] = 4] = \"time\";\n /**\n * Variable w/ select format\n */\n TYPE[TYPE[\"select\"] = 5] = \"select\";\n /**\n * Variable w/ plural format\n */\n TYPE[TYPE[\"plural\"] = 6] = \"plural\";\n /**\n * Only possible within plural argument.\n * This is the `#` symbol that will be substituted with the count.\n */\n TYPE[TYPE[\"pound\"] = 7] = \"pound\";\n /**\n * XML-like tag\n */\n TYPE[TYPE[\"tag\"] = 8] = \"tag\";\n})(TYPE || (TYPE = {}));\nexport var SKELETON_TYPE;\n(function (SKELETON_TYPE) {\n SKELETON_TYPE[SKELETON_TYPE[\"number\"] = 0] = \"number\";\n SKELETON_TYPE[SKELETON_TYPE[\"dateTime\"] = 1] = \"dateTime\";\n})(SKELETON_TYPE || (SKELETON_TYPE = {}));\n/**\n * Type Guards\n */\nexport function isLiteralElement(el) {\n return el.type === TYPE.literal;\n}\nexport function isArgumentElement(el) {\n return el.type === TYPE.argument;\n}\nexport function isNumberElement(el) {\n return el.type === TYPE.number;\n}\nexport function isDateElement(el) {\n return el.type === TYPE.date;\n}\nexport function isTimeElement(el) {\n return el.type === TYPE.time;\n}\nexport function isSelectElement(el) {\n return el.type === TYPE.select;\n}\nexport function isPluralElement(el) {\n return el.type === TYPE.plural;\n}\nexport function isPoundElement(el) {\n return el.type === TYPE.pound;\n}\nexport function isTagElement(el) {\n return el.type === TYPE.tag;\n}\nexport function isNumberSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.number);\n}\nexport function isDateTimeSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.dateTime);\n}\nexport function createLiteralElement(value) {\n return {\n type: TYPE.literal,\n value: value,\n };\n}\nexport function createNumberElement(value, style) {\n return {\n type: TYPE.number,\n value: value,\n style: style,\n };\n}\n","export var ErrorKind;\n(function (ErrorKind) {\n /** Argument is unclosed (e.g. `{0`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_CLOSING_BRACE\"] = 1] = \"EXPECT_ARGUMENT_CLOSING_BRACE\";\n /** Argument is empty (e.g. `{}`). */\n ErrorKind[ErrorKind[\"EMPTY_ARGUMENT\"] = 2] = \"EMPTY_ARGUMENT\";\n /** Argument is malformed (e.g. `{foo!}``) */\n ErrorKind[ErrorKind[\"MALFORMED_ARGUMENT\"] = 3] = \"MALFORMED_ARGUMENT\";\n /** Expect an argument type (e.g. `{foo,}`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_TYPE\"] = 4] = \"EXPECT_ARGUMENT_TYPE\";\n /** Unsupported argument type (e.g. `{foo,foo}`) */\n ErrorKind[ErrorKind[\"INVALID_ARGUMENT_TYPE\"] = 5] = \"INVALID_ARGUMENT_TYPE\";\n /** Expect an argument style (e.g. `{foo, number, }`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_STYLE\"] = 6] = \"EXPECT_ARGUMENT_STYLE\";\n /** The number skeleton is invalid. */\n ErrorKind[ErrorKind[\"INVALID_NUMBER_SKELETON\"] = 7] = \"INVALID_NUMBER_SKELETON\";\n /** The date time skeleton is invalid. */\n ErrorKind[ErrorKind[\"INVALID_DATE_TIME_SKELETON\"] = 8] = \"INVALID_DATE_TIME_SKELETON\";\n /** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */\n ErrorKind[ErrorKind[\"EXPECT_NUMBER_SKELETON\"] = 9] = \"EXPECT_NUMBER_SKELETON\";\n /** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */\n ErrorKind[ErrorKind[\"EXPECT_DATE_TIME_SKELETON\"] = 10] = \"EXPECT_DATE_TIME_SKELETON\";\n /** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */\n ErrorKind[ErrorKind[\"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\"] = 11] = \"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\";\n /** Missing select argument options (e.g. `{foo, select}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_OPTIONS\"] = 12] = \"EXPECT_SELECT_ARGUMENT_OPTIONS\";\n /** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 13] = \"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\";\n /** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */\n ErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 14] = \"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\";\n /** Expecting a selector in `select` argument (e.g `{foo, select}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR\"] = 15] = \"EXPECT_SELECT_ARGUMENT_SELECTOR\";\n /** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR\"] = 16] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR\";\n /** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\"] = 17] = \"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\";\n /**\n * Expecting a message fragment after the `plural` or `selectordinal` selector\n * (e.g. `{foo, plural, one}`)\n */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\"] = 18] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\";\n /** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */\n ErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_SELECTOR\"] = 19] = \"INVALID_PLURAL_ARGUMENT_SELECTOR\";\n /**\n * Duplicate selectors in `plural` or `selectordinal` argument.\n * (e.g. {foo, plural, one {#} one {#}})\n */\n ErrorKind[ErrorKind[\"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\"] = 20] = \"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\";\n /** Duplicate selectors in `select` argument.\n * (e.g. {foo, select, apple {apple} apple {apple}})\n */\n ErrorKind[ErrorKind[\"DUPLICATE_SELECT_ARGUMENT_SELECTOR\"] = 21] = \"DUPLICATE_SELECT_ARGUMENT_SELECTOR\";\n /** Plural or select argument option must have `other` clause. */\n ErrorKind[ErrorKind[\"MISSING_OTHER_CLAUSE\"] = 22] = \"MISSING_OTHER_CLAUSE\";\n /** The tag is malformed. (e.g. `foo) */\n ErrorKind[ErrorKind[\"INVALID_TAG\"] = 23] = \"INVALID_TAG\";\n /** The tag name is invalid. (e.g. `<123>foo`) */\n ErrorKind[ErrorKind[\"INVALID_TAG_NAME\"] = 25] = \"INVALID_TAG_NAME\";\n /** The closing tag does not match the opening tag. (e.g. `foo`) */\n ErrorKind[ErrorKind[\"UNMATCHED_CLOSING_TAG\"] = 26] = \"UNMATCHED_CLOSING_TAG\";\n /** The opening tag has unmatched closing tag. (e.g. `foo`) */\n ErrorKind[ErrorKind[\"UNCLOSED_TAG\"] = 27] = \"UNCLOSED_TAG\";\n})(ErrorKind || (ErrorKind = {}));\n","// @generated from regex-gen.ts\nexport var SPACE_SEPARATOR_START_REGEX = /^[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]*/i;\nexport var SPACE_SEPARATOR_END_REGEX = /[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]*$/i;\nexport var WHITE_SPACE_REGEX = /[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;\n","/**\n * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js\n * with some tweaks\n */\nvar DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;\n/**\n * Parse Date time skeleton into Intl.DateTimeFormatOptions\n * Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * @public\n * @param skeleton skeleton string\n */\nexport function parseDateTimeSkeleton(skeleton) {\n var result = {};\n skeleton.replace(DATE_TIME_REGEX, function (match) {\n var len = match.length;\n switch (match[0]) {\n // Era\n case 'G':\n result.era = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short';\n break;\n // Year\n case 'y':\n result.year = len === 2 ? '2-digit' : 'numeric';\n break;\n case 'Y':\n case 'u':\n case 'U':\n case 'r':\n throw new RangeError('`Y/u/U/r` (year) patterns are not supported, use `y` instead');\n // Quarter\n case 'q':\n case 'Q':\n throw new RangeError('`q/Q` (quarter) patterns are not supported');\n // Month\n case 'M':\n case 'L':\n result.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][len - 1];\n break;\n // Week\n case 'w':\n case 'W':\n throw new RangeError('`w/W` (week) patterns are not supported');\n case 'd':\n result.day = ['numeric', '2-digit'][len - 1];\n break;\n case 'D':\n case 'F':\n case 'g':\n throw new RangeError('`D/F/g` (day) patterns are not supported, use `d` instead');\n // Weekday\n case 'E':\n result.weekday = len === 4 ? 'short' : len === 5 ? 'narrow' : 'short';\n break;\n case 'e':\n if (len < 4) {\n throw new RangeError('`e..eee` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n case 'c':\n if (len < 4) {\n throw new RangeError('`c..ccc` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n // Period\n case 'a': // AM, PM\n result.hour12 = true;\n break;\n case 'b': // am, pm, noon, midnight\n case 'B': // flexible day periods\n throw new RangeError('`b/B` (period) patterns are not supported, use `a` instead');\n // Hour\n case 'h':\n result.hourCycle = 'h12';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'H':\n result.hourCycle = 'h23';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'K':\n result.hourCycle = 'h11';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'k':\n result.hourCycle = 'h24';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'j':\n case 'J':\n case 'C':\n throw new RangeError('`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead');\n // Minute\n case 'm':\n result.minute = ['numeric', '2-digit'][len - 1];\n break;\n // Second\n case 's':\n result.second = ['numeric', '2-digit'][len - 1];\n break;\n case 'S':\n case 'A':\n throw new RangeError('`S/A` (second) patterns are not supported, use `s` instead');\n // Zone\n case 'z': // 1..3, 4: specific non-location format\n result.timeZoneName = len < 4 ? 'short' : 'long';\n break;\n case 'Z': // 1..3, 4, 5: The ISO8601 varios formats\n case 'O': // 1, 4: miliseconds in day short, long\n case 'v': // 1, 4: generic non-location format\n case 'V': // 1, 2, 3, 4: time zone ID or city\n case 'X': // 1, 2, 3, 4: The ISO8601 varios formats\n case 'x': // 1, 2, 3, 4: The ISO8601 varios formats\n throw new RangeError('`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead');\n }\n return '';\n });\n return result;\n}\n","import { __assign } from \"tslib\";\nimport { WHITE_SPACE_REGEX } from './regex.generated';\nexport function parseNumberSkeletonFromString(skeleton) {\n if (skeleton.length === 0) {\n throw new Error('Number skeleton cannot be empty');\n }\n // Parse the skeleton\n var stringTokens = skeleton\n .split(WHITE_SPACE_REGEX)\n .filter(function (x) { return x.length > 0; });\n var tokens = [];\n for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {\n var stringToken = stringTokens_1[_i];\n var stemAndOptions = stringToken.split('/');\n if (stemAndOptions.length === 0) {\n throw new Error('Invalid number skeleton');\n }\n var stem = stemAndOptions[0], options = stemAndOptions.slice(1);\n for (var _a = 0, options_1 = options; _a < options_1.length; _a++) {\n var option = options_1[_a];\n if (option.length === 0) {\n throw new Error('Invalid number skeleton');\n }\n }\n tokens.push({ stem: stem, options: options });\n }\n return tokens;\n}\nfunction icuUnitToEcma(unit) {\n return unit.replace(/^(.*?)-/, '');\n}\nvar FRACTION_PRECISION_REGEX = /^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g;\nvar SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\\+|#+)?$/g;\nvar INTEGER_WIDTH_REGEX = /(\\*)(0+)|(#+)(0+)|(0+)/g;\nvar CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;\nfunction parseSignificantPrecision(str) {\n var result = {};\n str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {\n // @@@ case\n if (typeof g2 !== 'string') {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits = g1.length;\n }\n // @@@+ case\n else if (g2 === '+') {\n result.minimumSignificantDigits = g1.length;\n }\n // .### case\n else if (g1[0] === '#') {\n result.maximumSignificantDigits = g1.length;\n }\n // .@@## or .@@@ case\n else {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits =\n g1.length + (typeof g2 === 'string' ? g2.length : 0);\n }\n return '';\n });\n return result;\n}\nfunction parseSign(str) {\n switch (str) {\n case 'sign-auto':\n return {\n signDisplay: 'auto',\n };\n case 'sign-accounting':\n case '()':\n return {\n currencySign: 'accounting',\n };\n case 'sign-always':\n case '+!':\n return {\n signDisplay: 'always',\n };\n case 'sign-accounting-always':\n case '()!':\n return {\n signDisplay: 'always',\n currencySign: 'accounting',\n };\n case 'sign-except-zero':\n case '+?':\n return {\n signDisplay: 'exceptZero',\n };\n case 'sign-accounting-except-zero':\n case '()?':\n return {\n signDisplay: 'exceptZero',\n currencySign: 'accounting',\n };\n case 'sign-never':\n case '+_':\n return {\n signDisplay: 'never',\n };\n }\n}\nfunction parseConciseScientificAndEngineeringStem(stem) {\n // Engineering\n var result;\n if (stem[0] === 'E' && stem[1] === 'E') {\n result = {\n notation: 'engineering',\n };\n stem = stem.slice(2);\n }\n else if (stem[0] === 'E') {\n result = {\n notation: 'scientific',\n };\n stem = stem.slice(1);\n }\n if (result) {\n var signDisplay = stem.slice(0, 2);\n if (signDisplay === '+!') {\n result.signDisplay = 'always';\n stem = stem.slice(2);\n }\n else if (signDisplay === '+?') {\n result.signDisplay = 'exceptZero';\n stem = stem.slice(2);\n }\n if (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) {\n throw new Error('Malformed concise eng/scientific notation');\n }\n result.minimumIntegerDigits = stem.length;\n }\n return result;\n}\nfunction parseNotationOptions(opt) {\n var result = {};\n var signOpts = parseSign(opt);\n if (signOpts) {\n return signOpts;\n }\n return result;\n}\n/**\n * https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options\n */\nexport function parseNumberSkeleton(tokens) {\n var result = {};\n for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {\n var token = tokens_1[_i];\n switch (token.stem) {\n case 'percent':\n case '%':\n result.style = 'percent';\n continue;\n case '%x100':\n result.style = 'percent';\n result.scale = 100;\n continue;\n case 'currency':\n result.style = 'currency';\n result.currency = token.options[0];\n continue;\n case 'group-off':\n case ',_':\n result.useGrouping = false;\n continue;\n case 'precision-integer':\n case '.':\n result.maximumFractionDigits = 0;\n continue;\n case 'measure-unit':\n case 'unit':\n result.style = 'unit';\n result.unit = icuUnitToEcma(token.options[0]);\n continue;\n case 'compact-short':\n case 'K':\n result.notation = 'compact';\n result.compactDisplay = 'short';\n continue;\n case 'compact-long':\n case 'KK':\n result.notation = 'compact';\n result.compactDisplay = 'long';\n continue;\n case 'scientific':\n result = __assign(__assign(__assign({}, result), { notation: 'scientific' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'engineering':\n result = __assign(__assign(__assign({}, result), { notation: 'engineering' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'notation-simple':\n result.notation = 'standard';\n continue;\n // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h\n case 'unit-width-narrow':\n result.currencyDisplay = 'narrowSymbol';\n result.unitDisplay = 'narrow';\n continue;\n case 'unit-width-short':\n result.currencyDisplay = 'code';\n result.unitDisplay = 'short';\n continue;\n case 'unit-width-full-name':\n result.currencyDisplay = 'name';\n result.unitDisplay = 'long';\n continue;\n case 'unit-width-iso-code':\n result.currencyDisplay = 'symbol';\n continue;\n case 'scale':\n result.scale = parseFloat(token.options[0]);\n continue;\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n case 'integer-width':\n if (token.options.length > 1) {\n throw new RangeError('integer-width stems only accept a single optional option');\n }\n token.options[0].replace(INTEGER_WIDTH_REGEX, function (_, g1, g2, g3, g4, g5) {\n if (g1) {\n result.minimumIntegerDigits = g2.length;\n }\n else if (g3 && g4) {\n throw new Error('We currently do not support maximum integer digits');\n }\n else if (g5) {\n throw new Error('We currently do not support exact integer digits');\n }\n return '';\n });\n continue;\n }\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n if (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) {\n result.minimumIntegerDigits = token.stem.length;\n continue;\n }\n if (FRACTION_PRECISION_REGEX.test(token.stem)) {\n // Precision\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision\n // precision-integer case\n if (token.options.length > 1) {\n throw new RangeError('Fraction-precision stems only accept a single optional option');\n }\n token.stem.replace(FRACTION_PRECISION_REGEX, function (_, g1, g2, g3, g4, g5) {\n // .000* case (before ICU67 it was .000+)\n if (g2 === '*') {\n result.minimumFractionDigits = g1.length;\n }\n // .### case\n else if (g3 && g3[0] === '#') {\n result.maximumFractionDigits = g3.length;\n }\n // .00## case\n else if (g4 && g5) {\n result.minimumFractionDigits = g4.length;\n result.maximumFractionDigits = g4.length + g5.length;\n }\n else {\n result.minimumFractionDigits = g1.length;\n result.maximumFractionDigits = g1.length;\n }\n return '';\n });\n if (token.options.length) {\n result = __assign(__assign({}, result), parseSignificantPrecision(token.options[0]));\n }\n continue;\n }\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision\n if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {\n result = __assign(__assign({}, result), parseSignificantPrecision(token.stem));\n continue;\n }\n var signOpts = parseSign(token.stem);\n if (signOpts) {\n result = __assign(__assign({}, result), signOpts);\n }\n var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);\n if (conciseScientificAndEngineeringOpts) {\n result = __assign(__assign({}, result), conciseScientificAndEngineeringOpts);\n }\n }\n return result;\n}\n","var _a;\nimport { __assign } from \"tslib\";\nimport { ErrorKind } from './error';\nimport { SKELETON_TYPE, TYPE, } from './types';\nimport { SPACE_SEPARATOR_END_REGEX, SPACE_SEPARATOR_START_REGEX, } from './regex.generated';\nimport { parseNumberSkeleton, parseNumberSkeletonFromString, parseDateTimeSkeleton, } from '@formatjs/icu-skeleton-parser';\nfunction createLocation(start, end) {\n return { start: start, end: end };\n}\n// #region Ponyfills\n// Consolidate these variables up top for easier toggling during debugging\nvar hasNativeStartsWith = !!String.prototype.startsWith;\nvar hasNativeFromCodePoint = !!String.fromCodePoint;\nvar hasNativeFromEntries = !!Object.fromEntries;\nvar hasNativeCodePointAt = !!String.prototype.codePointAt;\nvar hasTrimStart = !!String.prototype.trimStart;\nvar hasTrimEnd = !!String.prototype.trimEnd;\nvar hasNativeIsSafeInteger = !!Number.isSafeInteger;\nvar isSafeInteger = hasNativeIsSafeInteger\n ? Number.isSafeInteger\n : function (n) {\n return (typeof n === 'number' &&\n isFinite(n) &&\n Math.floor(n) === n &&\n Math.abs(n) <= 0x1fffffffffffff);\n };\n// IE11 does not support y and u.\nvar REGEX_SUPPORTS_U_AND_Y = true;\ntry {\n var re = RE('([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)', 'yu');\n /**\n * legacy Edge or Xbox One browser\n * Unicode flag support: supported\n * Pattern_Syntax support: not supported\n * See https://github.com/formatjs/formatjs/issues/2822\n */\n REGEX_SUPPORTS_U_AND_Y = ((_a = re.exec('a')) === null || _a === void 0 ? void 0 : _a[0]) === 'a';\n}\ncatch (_) {\n REGEX_SUPPORTS_U_AND_Y = false;\n}\nvar startsWith = hasNativeStartsWith\n ? // Native\n function startsWith(s, search, position) {\n return s.startsWith(search, position);\n }\n : // For IE11\n function startsWith(s, search, position) {\n return s.slice(position, position + search.length) === search;\n };\nvar fromCodePoint = hasNativeFromCodePoint\n ? String.fromCodePoint\n : // IE11\n function fromCodePoint() {\n var codePoints = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n codePoints[_i] = arguments[_i];\n }\n var elements = '';\n var length = codePoints.length;\n var i = 0;\n var code;\n while (length > i) {\n code = codePoints[i++];\n if (code > 0x10ffff)\n throw RangeError(code + ' is not a valid code point');\n elements +=\n code < 0x10000\n ? String.fromCharCode(code)\n : String.fromCharCode(((code -= 0x10000) >> 10) + 0xd800, (code % 0x400) + 0xdc00);\n }\n return elements;\n };\nvar fromEntries = \n// native\nhasNativeFromEntries\n ? Object.fromEntries\n : // Ponyfill\n function fromEntries(entries) {\n var obj = {};\n for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\n var _a = entries_1[_i], k = _a[0], v = _a[1];\n obj[k] = v;\n }\n return obj;\n };\nvar codePointAt = hasNativeCodePointAt\n ? // Native\n function codePointAt(s, index) {\n return s.codePointAt(index);\n }\n : // IE 11\n function codePointAt(s, index) {\n var size = s.length;\n if (index < 0 || index >= size) {\n return undefined;\n }\n var first = s.charCodeAt(index);\n var second;\n return first < 0xd800 ||\n first > 0xdbff ||\n index + 1 === size ||\n (second = s.charCodeAt(index + 1)) < 0xdc00 ||\n second > 0xdfff\n ? first\n : ((first - 0xd800) << 10) + (second - 0xdc00) + 0x10000;\n };\nvar trimStart = hasTrimStart\n ? // Native\n function trimStart(s) {\n return s.trimStart();\n }\n : // Ponyfill\n function trimStart(s) {\n return s.replace(SPACE_SEPARATOR_START_REGEX, '');\n };\nvar trimEnd = hasTrimEnd\n ? // Native\n function trimEnd(s) {\n return s.trimEnd();\n }\n : // Ponyfill\n function trimEnd(s) {\n return s.replace(SPACE_SEPARATOR_END_REGEX, '');\n };\n// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.\nfunction RE(s, flag) {\n return new RegExp(s, flag);\n}\n// #endregion\nvar matchIdentifierAtIndex;\nif (REGEX_SUPPORTS_U_AND_Y) {\n // Native\n var IDENTIFIER_PREFIX_RE_1 = RE('([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)', 'yu');\n matchIdentifierAtIndex = function matchIdentifierAtIndex(s, index) {\n var _a;\n IDENTIFIER_PREFIX_RE_1.lastIndex = index;\n var match = IDENTIFIER_PREFIX_RE_1.exec(s);\n return (_a = match[1]) !== null && _a !== void 0 ? _a : '';\n };\n}\nelse {\n // IE11\n matchIdentifierAtIndex = function matchIdentifierAtIndex(s, index) {\n var match = [];\n while (true) {\n var c = codePointAt(s, index);\n if (c === undefined || _isWhiteSpace(c) || _isPatternSyntax(c)) {\n break;\n }\n match.push(c);\n index += c >= 0x10000 ? 2 : 1;\n }\n return fromCodePoint.apply(void 0, match);\n };\n}\nvar Parser = /** @class */ (function () {\n function Parser(message, options) {\n if (options === void 0) { options = {}; }\n this.message = message;\n this.position = { offset: 0, line: 1, column: 1 };\n this.ignoreTag = !!options.ignoreTag;\n this.requiresOtherClause = !!options.requiresOtherClause;\n this.shouldParseSkeletons = !!options.shouldParseSkeletons;\n }\n Parser.prototype.parse = function () {\n if (this.offset() !== 0) {\n throw Error('parser can only be used once');\n }\n return this.parseMessage(0, '', false);\n };\n Parser.prototype.parseMessage = function (nestingLevel, parentArgType, expectingCloseTag) {\n var elements = [];\n while (!this.isEOF()) {\n var char = this.char();\n if (char === 123 /* `{` */) {\n var result = this.parseArgument(nestingLevel, expectingCloseTag);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n else if (char === 125 /* `}` */ && nestingLevel > 0) {\n break;\n }\n else if (char === 35 /* `#` */ &&\n (parentArgType === 'plural' || parentArgType === 'selectordinal')) {\n var position = this.clonePosition();\n this.bump();\n elements.push({\n type: TYPE.pound,\n location: createLocation(position, this.clonePosition()),\n });\n }\n else if (char === 60 /* `<` */ &&\n !this.ignoreTag &&\n this.peek() === 47 // char code for '/'\n ) {\n if (expectingCloseTag) {\n break;\n }\n else {\n return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));\n }\n }\n else if (char === 60 /* `<` */ &&\n !this.ignoreTag &&\n _isAlpha(this.peek() || 0)) {\n var result = this.parseTag(nestingLevel, parentArgType);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n else {\n var result = this.parseLiteral(nestingLevel, parentArgType);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n }\n return { val: elements, err: null };\n };\n /**\n * A tag name must start with an ASCII lower/upper case letter. The grammar is based on the\n * [custom element name][] except that a dash is NOT always mandatory and uppercase letters\n * are accepted:\n *\n * ```\n * tag ::= \"<\" tagName (whitespace)* \"/>\" | \"<\" tagName (whitespace)* \">\" message \"\"\n * tagName ::= [a-z] (PENChar)*\n * PENChar ::=\n * \"-\" | \".\" | [0-9] | \"_\" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |\n * [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |\n * [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n * ```\n *\n * [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\n * NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do\n * since other tag-based engines like React allow it\n */\n Parser.prototype.parseTag = function (nestingLevel, parentArgType) {\n var startPosition = this.clonePosition();\n this.bump(); // `<`\n var tagName = this.parseTagName();\n this.bumpSpace();\n if (this.bumpIf('/>')) {\n // Self closing tag\n return {\n val: {\n type: TYPE.literal,\n value: \"<\" + tagName + \"/>\",\n location: createLocation(startPosition, this.clonePosition()),\n },\n err: null,\n };\n }\n else if (this.bumpIf('>')) {\n var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);\n if (childrenResult.err) {\n return childrenResult;\n }\n var children = childrenResult.val;\n // Expecting a close tag\n var endTagStartPosition = this.clonePosition();\n if (this.bumpIf('')) {\n return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));\n }\n return {\n val: {\n type: TYPE.tag,\n value: tagName,\n children: children,\n location: createLocation(startPosition, this.clonePosition()),\n },\n err: null,\n };\n }\n else {\n return this.error(ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition()));\n }\n }\n else {\n return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));\n }\n };\n /**\n * This method assumes that the caller has peeked ahead for the first tag character.\n */\n Parser.prototype.parseTagName = function () {\n var startOffset = this.offset();\n this.bump(); // the first tag name character\n while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {\n this.bump();\n }\n return this.message.slice(startOffset, this.offset());\n };\n Parser.prototype.parseLiteral = function (nestingLevel, parentArgType) {\n var start = this.clonePosition();\n var value = '';\n while (true) {\n var parseQuoteResult = this.tryParseQuote(parentArgType);\n if (parseQuoteResult) {\n value += parseQuoteResult;\n continue;\n }\n var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);\n if (parseUnquotedResult) {\n value += parseUnquotedResult;\n continue;\n }\n var parseLeftAngleResult = this.tryParseLeftAngleBracket();\n if (parseLeftAngleResult) {\n value += parseLeftAngleResult;\n continue;\n }\n break;\n }\n var location = createLocation(start, this.clonePosition());\n return {\n val: { type: TYPE.literal, value: value, location: location },\n err: null,\n };\n };\n Parser.prototype.tryParseLeftAngleBracket = function () {\n if (!this.isEOF() &&\n this.char() === 60 /* `<` */ &&\n (this.ignoreTag ||\n // If at the opening tag or closing tag position, bail.\n !_isAlphaOrSlash(this.peek() || 0))) {\n this.bump(); // `<`\n return '<';\n }\n return null;\n };\n /**\n * Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes\n * a character that requires quoting (that is, \"only where needed\"), and works the same in\n * nested messages as on the top level of the pattern. The new behavior is otherwise compatible.\n */\n Parser.prototype.tryParseQuote = function (parentArgType) {\n if (this.isEOF() || this.char() !== 39 /* `'` */) {\n return null;\n }\n // Parse escaped char following the apostrophe, or early return if there is no escaped char.\n // Check if is valid escaped character\n switch (this.peek()) {\n case 39 /* `'` */:\n // double quote, should return as a single quote.\n this.bump();\n this.bump();\n return \"'\";\n // '{', '<', '>', '}'\n case 123:\n case 60:\n case 62:\n case 125:\n break;\n case 35: // '#'\n if (parentArgType === 'plural' || parentArgType === 'selectordinal') {\n break;\n }\n return null;\n default:\n return null;\n }\n this.bump(); // apostrophe\n var codePoints = [this.char()]; // escaped char\n this.bump();\n // read chars until the optional closing apostrophe is found\n while (!this.isEOF()) {\n var ch = this.char();\n if (ch === 39 /* `'` */) {\n if (this.peek() === 39 /* `'` */) {\n codePoints.push(39);\n // Bump one more time because we need to skip 2 characters.\n this.bump();\n }\n else {\n // Optional closing apostrophe.\n this.bump();\n break;\n }\n }\n else {\n codePoints.push(ch);\n }\n this.bump();\n }\n return fromCodePoint.apply(void 0, codePoints);\n };\n Parser.prototype.tryParseUnquoted = function (nestingLevel, parentArgType) {\n if (this.isEOF()) {\n return null;\n }\n var ch = this.char();\n if (ch === 60 /* `<` */ ||\n ch === 123 /* `{` */ ||\n (ch === 35 /* `#` */ &&\n (parentArgType === 'plural' || parentArgType === 'selectordinal')) ||\n (ch === 125 /* `}` */ && nestingLevel > 0)) {\n return null;\n }\n else {\n this.bump();\n return fromCodePoint(ch);\n }\n };\n Parser.prototype.parseArgument = function (nestingLevel, expectingCloseTag) {\n var openingBracePosition = this.clonePosition();\n this.bump(); // `{`\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n if (this.char() === 125 /* `}` */) {\n this.bump();\n return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n // argument name\n var value = this.parseIdentifierIfPossible().value;\n if (!value) {\n return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n switch (this.char()) {\n // Simple argument: `{name}`\n case 125 /* `}` */: {\n this.bump(); // `}`\n return {\n val: {\n type: TYPE.argument,\n // value does not include the opening and closing braces.\n value: value,\n location: createLocation(openingBracePosition, this.clonePosition()),\n },\n err: null,\n };\n }\n // Argument with options: `{name, format, ...}`\n case 44 /* `,` */: {\n this.bump(); // `,`\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);\n }\n default:\n return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n };\n /**\n * Advance the parser until the end of the identifier, if it is currently on\n * an identifier character. Return an empty string otherwise.\n */\n Parser.prototype.parseIdentifierIfPossible = function () {\n var startingPosition = this.clonePosition();\n var startOffset = this.offset();\n var value = matchIdentifierAtIndex(this.message, startOffset);\n var endOffset = startOffset + value.length;\n this.bumpTo(endOffset);\n var endPosition = this.clonePosition();\n var location = createLocation(startingPosition, endPosition);\n return { value: value, location: location };\n };\n Parser.prototype.parseArgumentOptions = function (nestingLevel, expectingCloseTag, value, openingBracePosition) {\n var _a;\n // Parse this range:\n // {name, type, style}\n // ^---^\n var typeStartPosition = this.clonePosition();\n var argType = this.parseIdentifierIfPossible().value;\n var typeEndPosition = this.clonePosition();\n switch (argType) {\n case '':\n // Expecting a style string number, date, time, plural, selectordinal, or select.\n return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));\n case 'number':\n case 'date':\n case 'time': {\n // Parse this range:\n // {name, number, style}\n // ^-------^\n this.bumpSpace();\n var styleAndLocation = null;\n if (this.bumpIf(',')) {\n this.bumpSpace();\n var styleStartPosition = this.clonePosition();\n var result = this.parseSimpleArgStyleIfPossible();\n if (result.err) {\n return result;\n }\n var style = trimEnd(result.val);\n if (style.length === 0) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n var styleLocation = createLocation(styleStartPosition, this.clonePosition());\n styleAndLocation = { style: style, styleLocation: styleLocation };\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n var location_1 = createLocation(openingBracePosition, this.clonePosition());\n // Extract style or skeleton\n if (styleAndLocation && startsWith(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, '::', 0)) {\n // Skeleton starts with `::`.\n var skeleton = trimStart(styleAndLocation.style.slice(2));\n if (argType === 'number') {\n var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);\n if (result.err) {\n return result;\n }\n return {\n val: { type: TYPE.number, value: value, location: location_1, style: result.val },\n err: null,\n };\n }\n else {\n if (skeleton.length === 0) {\n return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);\n }\n var style = {\n type: SKELETON_TYPE.dateTime,\n pattern: skeleton,\n location: styleAndLocation.styleLocation,\n parsedOptions: this.shouldParseSkeletons\n ? parseDateTimeSkeleton(skeleton)\n : {},\n };\n var type = argType === 'date' ? TYPE.date : TYPE.time;\n return {\n val: { type: type, value: value, location: location_1, style: style },\n err: null,\n };\n }\n }\n // Regular style or no style.\n return {\n val: {\n type: argType === 'number'\n ? TYPE.number\n : argType === 'date'\n ? TYPE.date\n : TYPE.time,\n value: value,\n location: location_1,\n style: (_a = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a !== void 0 ? _a : null,\n },\n err: null,\n };\n }\n case 'plural':\n case 'selectordinal':\n case 'select': {\n // Parse this range:\n // {name, plural, options}\n // ^---------^\n var typeEndPosition_1 = this.clonePosition();\n this.bumpSpace();\n if (!this.bumpIf(',')) {\n return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, __assign({}, typeEndPosition_1)));\n }\n this.bumpSpace();\n // Parse offset:\n // {name, plural, offset:1, options}\n // ^-----^\n //\n // or the first option:\n //\n // {name, plural, one {...} other {...}}\n // ^--^\n var identifierAndLocation = this.parseIdentifierIfPossible();\n var pluralOffset = 0;\n if (argType !== 'select' && identifierAndLocation.value === 'offset') {\n if (!this.bumpIf(':')) {\n return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n this.bumpSpace();\n var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);\n if (result.err) {\n return result;\n }\n // Parse another identifier for option parsing\n this.bumpSpace();\n identifierAndLocation = this.parseIdentifierIfPossible();\n pluralOffset = result.val;\n }\n var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);\n if (optionsResult.err) {\n return optionsResult;\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n var location_2 = createLocation(openingBracePosition, this.clonePosition());\n if (argType === 'select') {\n return {\n val: {\n type: TYPE.select,\n value: value,\n options: fromEntries(optionsResult.val),\n location: location_2,\n },\n err: null,\n };\n }\n else {\n return {\n val: {\n type: TYPE.plural,\n value: value,\n options: fromEntries(optionsResult.val),\n offset: pluralOffset,\n pluralType: argType === 'plural' ? 'cardinal' : 'ordinal',\n location: location_2,\n },\n err: null,\n };\n }\n }\n default:\n return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));\n }\n };\n Parser.prototype.tryParseArgumentClose = function (openingBracePosition) {\n // Parse: {value, number, ::currency/GBP }\n //\n if (this.isEOF() || this.char() !== 125 /* `}` */) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n this.bump(); // `}`\n return { val: true, err: null };\n };\n /**\n * See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659\n */\n Parser.prototype.parseSimpleArgStyleIfPossible = function () {\n var nestedBraces = 0;\n var startPosition = this.clonePosition();\n while (!this.isEOF()) {\n var ch = this.char();\n switch (ch) {\n case 39 /* `'` */: {\n // Treat apostrophe as quoting but include it in the style part.\n // Find the end of the quoted literal text.\n this.bump();\n var apostrophePosition = this.clonePosition();\n if (!this.bumpUntil(\"'\")) {\n return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));\n }\n this.bump();\n break;\n }\n case 123 /* `{` */: {\n nestedBraces += 1;\n this.bump();\n break;\n }\n case 125 /* `}` */: {\n if (nestedBraces > 0) {\n nestedBraces -= 1;\n }\n else {\n return {\n val: this.message.slice(startPosition.offset, this.offset()),\n err: null,\n };\n }\n break;\n }\n default:\n this.bump();\n break;\n }\n }\n return {\n val: this.message.slice(startPosition.offset, this.offset()),\n err: null,\n };\n };\n Parser.prototype.parseNumberSkeletonFromString = function (skeleton, location) {\n var tokens = [];\n try {\n tokens = parseNumberSkeletonFromString(skeleton);\n }\n catch (e) {\n return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location);\n }\n return {\n val: {\n type: SKELETON_TYPE.number,\n tokens: tokens,\n location: location,\n parsedOptions: this.shouldParseSkeletons\n ? parseNumberSkeleton(tokens)\n : {},\n },\n err: null,\n };\n };\n /**\n * @param nesting_level The current nesting level of messages.\n * This can be positive when parsing message fragment in select or plural argument options.\n * @param parent_arg_type The parent argument's type.\n * @param parsed_first_identifier If provided, this is the first identifier-like selector of\n * the argument. It is a by-product of a previous parsing attempt.\n * @param expecting_close_tag If true, this message is directly or indirectly nested inside\n * between a pair of opening and closing tags. The nested message will not parse beyond\n * the closing tag boundary.\n */\n Parser.prototype.tryParsePluralOrSelectOptions = function (nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {\n var _a;\n var hasOtherClause = false;\n var options = [];\n var parsedSelectors = new Set();\n var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location;\n // Parse:\n // one {one apple}\n // ^--^\n while (true) {\n if (selector.length === 0) {\n var startPosition = this.clonePosition();\n if (parentArgType !== 'select' && this.bumpIf('=')) {\n // Try parse `={number}` selector\n var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);\n if (result.err) {\n return result;\n }\n selectorLocation = createLocation(startPosition, this.clonePosition());\n selector = this.message.slice(startPosition.offset, this.offset());\n }\n else {\n break;\n }\n }\n // Duplicate selector clauses\n if (parsedSelectors.has(selector)) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR\n : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);\n }\n if (selector === 'other') {\n hasOtherClause = true;\n }\n // Parse:\n // one {one apple}\n // ^----------^\n this.bumpSpace();\n var openingBracePosition = this.clonePosition();\n if (!this.bumpIf('{')) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\n : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));\n }\n var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);\n if (fragmentResult.err) {\n return fragmentResult;\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n options.push([\n selector,\n {\n value: fragmentResult.val,\n location: createLocation(openingBracePosition, this.clonePosition()),\n },\n ]);\n // Keep track of the existing selectors\n parsedSelectors.add(selector);\n // Prep next selector clause.\n this.bumpSpace();\n (_a = this.parseIdentifierIfPossible(), selector = _a.value, selectorLocation = _a.location);\n }\n if (options.length === 0) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR\n : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));\n }\n if (this.requiresOtherClause && !hasOtherClause) {\n return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n return { val: options, err: null };\n };\n Parser.prototype.tryParseDecimalInteger = function (expectNumberError, invalidNumberError) {\n var sign = 1;\n var startingPosition = this.clonePosition();\n if (this.bumpIf('+')) {\n }\n else if (this.bumpIf('-')) {\n sign = -1;\n }\n var hasDigits = false;\n var decimal = 0;\n while (!this.isEOF()) {\n var ch = this.char();\n if (ch >= 48 /* `0` */ && ch <= 57 /* `9` */) {\n hasDigits = true;\n decimal = decimal * 10 + (ch - 48);\n this.bump();\n }\n else {\n break;\n }\n }\n var location = createLocation(startingPosition, this.clonePosition());\n if (!hasDigits) {\n return this.error(expectNumberError, location);\n }\n decimal *= sign;\n if (!isSafeInteger(decimal)) {\n return this.error(invalidNumberError, location);\n }\n return { val: decimal, err: null };\n };\n Parser.prototype.offset = function () {\n return this.position.offset;\n };\n Parser.prototype.isEOF = function () {\n return this.offset() === this.message.length;\n };\n Parser.prototype.clonePosition = function () {\n // This is much faster than `Object.assign` or spread.\n return {\n offset: this.position.offset,\n line: this.position.line,\n column: this.position.column,\n };\n };\n /**\n * Return the code point at the current position of the parser.\n * Throws if the index is out of bound.\n */\n Parser.prototype.char = function () {\n var offset = this.position.offset;\n if (offset >= this.message.length) {\n throw Error('out of bound');\n }\n var code = codePointAt(this.message, offset);\n if (code === undefined) {\n throw Error(\"Offset \" + offset + \" is at invalid UTF-16 code unit boundary\");\n }\n return code;\n };\n Parser.prototype.error = function (kind, location) {\n return {\n val: null,\n err: {\n kind: kind,\n message: this.message,\n location: location,\n },\n };\n };\n /** Bump the parser to the next UTF-16 code unit. */\n Parser.prototype.bump = function () {\n if (this.isEOF()) {\n return;\n }\n var code = this.char();\n if (code === 10 /* '\\n' */) {\n this.position.line += 1;\n this.position.column = 1;\n this.position.offset += 1;\n }\n else {\n this.position.column += 1;\n // 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.\n this.position.offset += code < 0x10000 ? 1 : 2;\n }\n };\n /**\n * If the substring starting at the current position of the parser has\n * the given prefix, then bump the parser to the character immediately\n * following the prefix and return true. Otherwise, don't bump the parser\n * and return false.\n */\n Parser.prototype.bumpIf = function (prefix) {\n if (startsWith(this.message, prefix, this.offset())) {\n for (var i = 0; i < prefix.length; i++) {\n this.bump();\n }\n return true;\n }\n return false;\n };\n /**\n * Bump the parser until the pattern character is found and return `true`.\n * Otherwise bump to the end of the file and return `false`.\n */\n Parser.prototype.bumpUntil = function (pattern) {\n var currentOffset = this.offset();\n var index = this.message.indexOf(pattern, currentOffset);\n if (index >= 0) {\n this.bumpTo(index);\n return true;\n }\n else {\n this.bumpTo(this.message.length);\n return false;\n }\n };\n /**\n * Bump the parser to the target offset.\n * If target offset is beyond the end of the input, bump the parser to the end of the input.\n */\n Parser.prototype.bumpTo = function (targetOffset) {\n if (this.offset() > targetOffset) {\n throw Error(\"targetOffset \" + targetOffset + \" must be greater than or equal to the current offset \" + this.offset());\n }\n targetOffset = Math.min(targetOffset, this.message.length);\n while (true) {\n var offset = this.offset();\n if (offset === targetOffset) {\n break;\n }\n if (offset > targetOffset) {\n throw Error(\"targetOffset \" + targetOffset + \" is at invalid UTF-16 code unit boundary\");\n }\n this.bump();\n if (this.isEOF()) {\n break;\n }\n }\n };\n /** advance the parser through all whitespace to the next non-whitespace code unit. */\n Parser.prototype.bumpSpace = function () {\n while (!this.isEOF() && _isWhiteSpace(this.char())) {\n this.bump();\n }\n };\n /**\n * Peek at the *next* Unicode codepoint in the input without advancing the parser.\n * If the input has been exhausted, then this returns null.\n */\n Parser.prototype.peek = function () {\n if (this.isEOF()) {\n return null;\n }\n var code = this.char();\n var offset = this.offset();\n var nextCode = this.message.charCodeAt(offset + (code >= 0x10000 ? 2 : 1));\n return nextCode !== null && nextCode !== void 0 ? nextCode : null;\n };\n return Parser;\n}());\nexport { Parser };\n/**\n * This check if codepoint is alphabet (lower & uppercase)\n * @param codepoint\n * @returns\n */\nfunction _isAlpha(codepoint) {\n return ((codepoint >= 97 && codepoint <= 122) ||\n (codepoint >= 65 && codepoint <= 90));\n}\nfunction _isAlphaOrSlash(codepoint) {\n return _isAlpha(codepoint) || codepoint === 47; /* '/' */\n}\n/** See `parseTag` function docs. */\nfunction _isPotentialElementNameChar(c) {\n return (c === 45 /* '-' */ ||\n c === 46 /* '.' */ ||\n (c >= 48 && c <= 57) /* 0..9 */ ||\n c === 95 /* '_' */ ||\n (c >= 97 && c <= 122) /** a..z */ ||\n (c >= 65 && c <= 90) /* A..Z */ ||\n c == 0xb7 ||\n (c >= 0xc0 && c <= 0xd6) ||\n (c >= 0xd8 && c <= 0xf6) ||\n (c >= 0xf8 && c <= 0x37d) ||\n (c >= 0x37f && c <= 0x1fff) ||\n (c >= 0x200c && c <= 0x200d) ||\n (c >= 0x203f && c <= 0x2040) ||\n (c >= 0x2070 && c <= 0x218f) ||\n (c >= 0x2c00 && c <= 0x2fef) ||\n (c >= 0x3001 && c <= 0xd7ff) ||\n (c >= 0xf900 && c <= 0xfdcf) ||\n (c >= 0xfdf0 && c <= 0xfffd) ||\n (c >= 0x10000 && c <= 0xeffff));\n}\n/**\n * Code point equivalent of regex `\\p{White_Space}`.\n * From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n */\nfunction _isWhiteSpace(c) {\n return ((c >= 0x0009 && c <= 0x000d) ||\n c === 0x0020 ||\n c === 0x0085 ||\n (c >= 0x200e && c <= 0x200f) ||\n c === 0x2028 ||\n c === 0x2029);\n}\n/**\n * Code point equivalent of regex `\\p{Pattern_Syntax}`.\n * See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n */\nfunction _isPatternSyntax(c) {\n return ((c >= 0x0021 && c <= 0x0023) ||\n c === 0x0024 ||\n (c >= 0x0025 && c <= 0x0027) ||\n c === 0x0028 ||\n c === 0x0029 ||\n c === 0x002a ||\n c === 0x002b ||\n c === 0x002c ||\n c === 0x002d ||\n (c >= 0x002e && c <= 0x002f) ||\n (c >= 0x003a && c <= 0x003b) ||\n (c >= 0x003c && c <= 0x003e) ||\n (c >= 0x003f && c <= 0x0040) ||\n c === 0x005b ||\n c === 0x005c ||\n c === 0x005d ||\n c === 0x005e ||\n c === 0x0060 ||\n c === 0x007b ||\n c === 0x007c ||\n c === 0x007d ||\n c === 0x007e ||\n c === 0x00a1 ||\n (c >= 0x00a2 && c <= 0x00a5) ||\n c === 0x00a6 ||\n c === 0x00a7 ||\n c === 0x00a9 ||\n c === 0x00ab ||\n c === 0x00ac ||\n c === 0x00ae ||\n c === 0x00b0 ||\n c === 0x00b1 ||\n c === 0x00b6 ||\n c === 0x00bb ||\n c === 0x00bf ||\n c === 0x00d7 ||\n c === 0x00f7 ||\n (c >= 0x2010 && c <= 0x2015) ||\n (c >= 0x2016 && c <= 0x2017) ||\n c === 0x2018 ||\n c === 0x2019 ||\n c === 0x201a ||\n (c >= 0x201b && c <= 0x201c) ||\n c === 0x201d ||\n c === 0x201e ||\n c === 0x201f ||\n (c >= 0x2020 && c <= 0x2027) ||\n (c >= 0x2030 && c <= 0x2038) ||\n c === 0x2039 ||\n c === 0x203a ||\n (c >= 0x203b && c <= 0x203e) ||\n (c >= 0x2041 && c <= 0x2043) ||\n c === 0x2044 ||\n c === 0x2045 ||\n c === 0x2046 ||\n (c >= 0x2047 && c <= 0x2051) ||\n c === 0x2052 ||\n c === 0x2053 ||\n (c >= 0x2055 && c <= 0x205e) ||\n (c >= 0x2190 && c <= 0x2194) ||\n (c >= 0x2195 && c <= 0x2199) ||\n (c >= 0x219a && c <= 0x219b) ||\n (c >= 0x219c && c <= 0x219f) ||\n c === 0x21a0 ||\n (c >= 0x21a1 && c <= 0x21a2) ||\n c === 0x21a3 ||\n (c >= 0x21a4 && c <= 0x21a5) ||\n c === 0x21a6 ||\n (c >= 0x21a7 && c <= 0x21ad) ||\n c === 0x21ae ||\n (c >= 0x21af && c <= 0x21cd) ||\n (c >= 0x21ce && c <= 0x21cf) ||\n (c >= 0x21d0 && c <= 0x21d1) ||\n c === 0x21d2 ||\n c === 0x21d3 ||\n c === 0x21d4 ||\n (c >= 0x21d5 && c <= 0x21f3) ||\n (c >= 0x21f4 && c <= 0x22ff) ||\n (c >= 0x2300 && c <= 0x2307) ||\n c === 0x2308 ||\n c === 0x2309 ||\n c === 0x230a ||\n c === 0x230b ||\n (c >= 0x230c && c <= 0x231f) ||\n (c >= 0x2320 && c <= 0x2321) ||\n (c >= 0x2322 && c <= 0x2328) ||\n c === 0x2329 ||\n c === 0x232a ||\n (c >= 0x232b && c <= 0x237b) ||\n c === 0x237c ||\n (c >= 0x237d && c <= 0x239a) ||\n (c >= 0x239b && c <= 0x23b3) ||\n (c >= 0x23b4 && c <= 0x23db) ||\n (c >= 0x23dc && c <= 0x23e1) ||\n (c >= 0x23e2 && c <= 0x2426) ||\n (c >= 0x2427 && c <= 0x243f) ||\n (c >= 0x2440 && c <= 0x244a) ||\n (c >= 0x244b && c <= 0x245f) ||\n (c >= 0x2500 && c <= 0x25b6) ||\n c === 0x25b7 ||\n (c >= 0x25b8 && c <= 0x25c0) ||\n c === 0x25c1 ||\n (c >= 0x25c2 && c <= 0x25f7) ||\n (c >= 0x25f8 && c <= 0x25ff) ||\n (c >= 0x2600 && c <= 0x266e) ||\n c === 0x266f ||\n (c >= 0x2670 && c <= 0x2767) ||\n c === 0x2768 ||\n c === 0x2769 ||\n c === 0x276a ||\n c === 0x276b ||\n c === 0x276c ||\n c === 0x276d ||\n c === 0x276e ||\n c === 0x276f ||\n c === 0x2770 ||\n c === 0x2771 ||\n c === 0x2772 ||\n c === 0x2773 ||\n c === 0x2774 ||\n c === 0x2775 ||\n (c >= 0x2794 && c <= 0x27bf) ||\n (c >= 0x27c0 && c <= 0x27c4) ||\n c === 0x27c5 ||\n c === 0x27c6 ||\n (c >= 0x27c7 && c <= 0x27e5) ||\n c === 0x27e6 ||\n c === 0x27e7 ||\n c === 0x27e8 ||\n c === 0x27e9 ||\n c === 0x27ea ||\n c === 0x27eb ||\n c === 0x27ec ||\n c === 0x27ed ||\n c === 0x27ee ||\n c === 0x27ef ||\n (c >= 0x27f0 && c <= 0x27ff) ||\n (c >= 0x2800 && c <= 0x28ff) ||\n (c >= 0x2900 && c <= 0x2982) ||\n c === 0x2983 ||\n c === 0x2984 ||\n c === 0x2985 ||\n c === 0x2986 ||\n c === 0x2987 ||\n c === 0x2988 ||\n c === 0x2989 ||\n c === 0x298a ||\n c === 0x298b ||\n c === 0x298c ||\n c === 0x298d ||\n c === 0x298e ||\n c === 0x298f ||\n c === 0x2990 ||\n c === 0x2991 ||\n c === 0x2992 ||\n c === 0x2993 ||\n c === 0x2994 ||\n c === 0x2995 ||\n c === 0x2996 ||\n c === 0x2997 ||\n c === 0x2998 ||\n (c >= 0x2999 && c <= 0x29d7) ||\n c === 0x29d8 ||\n c === 0x29d9 ||\n c === 0x29da ||\n c === 0x29db ||\n (c >= 0x29dc && c <= 0x29fb) ||\n c === 0x29fc ||\n c === 0x29fd ||\n (c >= 0x29fe && c <= 0x2aff) ||\n (c >= 0x2b00 && c <= 0x2b2f) ||\n (c >= 0x2b30 && c <= 0x2b44) ||\n (c >= 0x2b45 && c <= 0x2b46) ||\n (c >= 0x2b47 && c <= 0x2b4c) ||\n (c >= 0x2b4d && c <= 0x2b73) ||\n (c >= 0x2b74 && c <= 0x2b75) ||\n (c >= 0x2b76 && c <= 0x2b95) ||\n c === 0x2b96 ||\n (c >= 0x2b97 && c <= 0x2bff) ||\n (c >= 0x2e00 && c <= 0x2e01) ||\n c === 0x2e02 ||\n c === 0x2e03 ||\n c === 0x2e04 ||\n c === 0x2e05 ||\n (c >= 0x2e06 && c <= 0x2e08) ||\n c === 0x2e09 ||\n c === 0x2e0a ||\n c === 0x2e0b ||\n c === 0x2e0c ||\n c === 0x2e0d ||\n (c >= 0x2e0e && c <= 0x2e16) ||\n c === 0x2e17 ||\n (c >= 0x2e18 && c <= 0x2e19) ||\n c === 0x2e1a ||\n c === 0x2e1b ||\n c === 0x2e1c ||\n c === 0x2e1d ||\n (c >= 0x2e1e && c <= 0x2e1f) ||\n c === 0x2e20 ||\n c === 0x2e21 ||\n c === 0x2e22 ||\n c === 0x2e23 ||\n c === 0x2e24 ||\n c === 0x2e25 ||\n c === 0x2e26 ||\n c === 0x2e27 ||\n c === 0x2e28 ||\n c === 0x2e29 ||\n (c >= 0x2e2a && c <= 0x2e2e) ||\n c === 0x2e2f ||\n (c >= 0x2e30 && c <= 0x2e39) ||\n (c >= 0x2e3a && c <= 0x2e3b) ||\n (c >= 0x2e3c && c <= 0x2e3f) ||\n c === 0x2e40 ||\n c === 0x2e41 ||\n c === 0x2e42 ||\n (c >= 0x2e43 && c <= 0x2e4f) ||\n (c >= 0x2e50 && c <= 0x2e51) ||\n c === 0x2e52 ||\n (c >= 0x2e53 && c <= 0x2e7f) ||\n (c >= 0x3001 && c <= 0x3003) ||\n c === 0x3008 ||\n c === 0x3009 ||\n c === 0x300a ||\n c === 0x300b ||\n c === 0x300c ||\n c === 0x300d ||\n c === 0x300e ||\n c === 0x300f ||\n c === 0x3010 ||\n c === 0x3011 ||\n (c >= 0x3012 && c <= 0x3013) ||\n c === 0x3014 ||\n c === 0x3015 ||\n c === 0x3016 ||\n c === 0x3017 ||\n c === 0x3018 ||\n c === 0x3019 ||\n c === 0x301a ||\n c === 0x301b ||\n c === 0x301c ||\n c === 0x301d ||\n (c >= 0x301e && c <= 0x301f) ||\n c === 0x3020 ||\n c === 0x3030 ||\n c === 0xfd3e ||\n c === 0xfd3f ||\n (c >= 0xfe45 && c <= 0xfe46));\n}\n","import { __assign } from \"tslib\";\nimport { ErrorKind } from './error';\nimport { Parser } from './parser';\nimport { isDateElement, isDateTimeSkeleton, isNumberElement, isNumberSkeleton, isPluralElement, isSelectElement, isTagElement, isTimeElement, } from './types';\nfunction pruneLocation(els) {\n els.forEach(function (el) {\n delete el.location;\n if (isSelectElement(el) || isPluralElement(el)) {\n for (var k in el.options) {\n delete el.options[k].location;\n pruneLocation(el.options[k].value);\n }\n }\n else if (isNumberElement(el) && isNumberSkeleton(el.style)) {\n delete el.style.location;\n }\n else if ((isDateElement(el) || isTimeElement(el)) &&\n isDateTimeSkeleton(el.style)) {\n delete el.style.location;\n }\n else if (isTagElement(el)) {\n pruneLocation(el.children);\n }\n });\n}\nexport function parse(message, opts) {\n if (opts === void 0) { opts = {}; }\n opts = __assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);\n var result = new Parser(message, opts).parse();\n if (result.err) {\n var error = SyntaxError(ErrorKind[result.err.kind]);\n // @ts-expect-error Assign to error object\n error.location = result.err.location;\n // @ts-expect-error Assign to error object\n error.originalMessage = result.err.message;\n throw error;\n }\n if (!(opts === null || opts === void 0 ? void 0 : opts.captureLocation)) {\n pruneLocation(result.val);\n }\n return result.val;\n}\nexport * from './types';\n","//\n// Main\n//\nexport default function memoize(fn, options) {\n var cache = options && options.cache ? options.cache : cacheDefault;\n var serializer = options && options.serializer ? options.serializer : serializerDefault;\n var strategy = options && options.strategy ? options.strategy : strategyDefault;\n return strategy(fn, {\n cache: cache,\n serializer: serializer,\n });\n}\n//\n// Strategy\n//\nfunction isPrimitive(value) {\n return (value == null || typeof value === 'number' || typeof value === 'boolean'); // || typeof value === \"string\" 'unsafe' primitive for our needs\n}\nfunction monadic(fn, cache, serializer, arg) {\n var cacheKey = isPrimitive(arg) ? arg : serializer(arg);\n var computedValue = cache.get(cacheKey);\n if (typeof computedValue === 'undefined') {\n computedValue = fn.call(this, arg);\n cache.set(cacheKey, computedValue);\n }\n return computedValue;\n}\nfunction variadic(fn, cache, serializer) {\n var args = Array.prototype.slice.call(arguments, 3);\n var cacheKey = serializer(args);\n var computedValue = cache.get(cacheKey);\n if (typeof computedValue === 'undefined') {\n computedValue = fn.apply(this, args);\n cache.set(cacheKey, computedValue);\n }\n return computedValue;\n}\nfunction assemble(fn, context, strategy, cache, serialize) {\n return strategy.bind(context, fn, cache, serialize);\n}\nfunction strategyDefault(fn, options) {\n var strategy = fn.length === 1 ? monadic : variadic;\n return assemble(fn, this, strategy, options.cache.create(), options.serializer);\n}\nfunction strategyVariadic(fn, options) {\n return assemble(fn, this, variadic, options.cache.create(), options.serializer);\n}\nfunction strategyMonadic(fn, options) {\n return assemble(fn, this, monadic, options.cache.create(), options.serializer);\n}\n//\n// Serializer\n//\nvar serializerDefault = function () {\n return JSON.stringify(arguments);\n};\n//\n// Cache\n//\nfunction ObjectWithoutPrototypeCache() {\n this.cache = Object.create(null);\n}\nObjectWithoutPrototypeCache.prototype.has = function (key) {\n return key in this.cache;\n};\nObjectWithoutPrototypeCache.prototype.get = function (key) {\n return this.cache[key];\n};\nObjectWithoutPrototypeCache.prototype.set = function (key, value) {\n this.cache[key] = value;\n};\nvar cacheDefault = {\n create: function create() {\n // @ts-ignore\n return new ObjectWithoutPrototypeCache();\n },\n};\nexport var strategies = {\n variadic: strategyVariadic,\n monadic: strategyMonadic,\n};\n","import { __extends } from \"tslib\";\nexport var ErrorCode;\n(function (ErrorCode) {\n // When we have a placeholder but no value to format\n ErrorCode[\"MISSING_VALUE\"] = \"MISSING_VALUE\";\n // When value supplied is invalid\n ErrorCode[\"INVALID_VALUE\"] = \"INVALID_VALUE\";\n // When we need specific Intl API but it's not available\n ErrorCode[\"MISSING_INTL_API\"] = \"MISSING_INTL_API\";\n})(ErrorCode || (ErrorCode = {}));\nvar FormatError = /** @class */ (function (_super) {\n __extends(FormatError, _super);\n function FormatError(msg, code, originalMessage) {\n var _this = _super.call(this, msg) || this;\n _this.code = code;\n _this.originalMessage = originalMessage;\n return _this;\n }\n FormatError.prototype.toString = function () {\n return \"[formatjs Error: \" + this.code + \"] \" + this.message;\n };\n return FormatError;\n}(Error));\nexport { FormatError };\nvar InvalidValueError = /** @class */ (function (_super) {\n __extends(InvalidValueError, _super);\n function InvalidValueError(variableId, value, options, originalMessage) {\n return _super.call(this, \"Invalid values for \\\"\" + variableId + \"\\\": \\\"\" + value + \"\\\". Options are \\\"\" + Object.keys(options).join('\", \"') + \"\\\"\", ErrorCode.INVALID_VALUE, originalMessage) || this;\n }\n return InvalidValueError;\n}(FormatError));\nexport { InvalidValueError };\nvar InvalidValueTypeError = /** @class */ (function (_super) {\n __extends(InvalidValueTypeError, _super);\n function InvalidValueTypeError(value, type, originalMessage) {\n return _super.call(this, \"Value for \\\"\" + value + \"\\\" must be of type \" + type, ErrorCode.INVALID_VALUE, originalMessage) || this;\n }\n return InvalidValueTypeError;\n}(FormatError));\nexport { InvalidValueTypeError };\nvar MissingValueError = /** @class */ (function (_super) {\n __extends(MissingValueError, _super);\n function MissingValueError(variableId, originalMessage) {\n return _super.call(this, \"The intl string context variable \\\"\" + variableId + \"\\\" was not provided to the string \\\"\" + originalMessage + \"\\\"\", ErrorCode.MISSING_VALUE, originalMessage) || this;\n }\n return MissingValueError;\n}(FormatError));\nexport { MissingValueError };\n","import { isArgumentElement, isDateElement, isDateTimeSkeleton, isLiteralElement, isNumberElement, isNumberSkeleton, isPluralElement, isPoundElement, isSelectElement, isTimeElement, isTagElement, } from '@formatjs/icu-messageformat-parser';\nimport { MissingValueError, InvalidValueError, ErrorCode, FormatError, InvalidValueTypeError, } from './error';\nexport var PART_TYPE;\n(function (PART_TYPE) {\n PART_TYPE[PART_TYPE[\"literal\"] = 0] = \"literal\";\n PART_TYPE[PART_TYPE[\"object\"] = 1] = \"object\";\n})(PART_TYPE || (PART_TYPE = {}));\nfunction mergeLiteral(parts) {\n if (parts.length < 2) {\n return parts;\n }\n return parts.reduce(function (all, part) {\n var lastPart = all[all.length - 1];\n if (!lastPart ||\n lastPart.type !== PART_TYPE.literal ||\n part.type !== PART_TYPE.literal) {\n all.push(part);\n }\n else {\n lastPart.value += part.value;\n }\n return all;\n }, []);\n}\nexport function isFormatXMLElementFn(el) {\n return typeof el === 'function';\n}\n// TODO(skeleton): add skeleton support\nexport function formatToParts(els, locales, formatters, formats, values, currentPluralValue, \n// For debugging\noriginalMessage) {\n // Hot path for straight simple msg translations\n if (els.length === 1 && isLiteralElement(els[0])) {\n return [\n {\n type: PART_TYPE.literal,\n value: els[0].value,\n },\n ];\n }\n var result = [];\n for (var _i = 0, els_1 = els; _i < els_1.length; _i++) {\n var el = els_1[_i];\n // Exit early for string parts.\n if (isLiteralElement(el)) {\n result.push({\n type: PART_TYPE.literal,\n value: el.value,\n });\n continue;\n }\n // TODO: should this part be literal type?\n // Replace `#` in plural rules with the actual numeric value.\n if (isPoundElement(el)) {\n if (typeof currentPluralValue === 'number') {\n result.push({\n type: PART_TYPE.literal,\n value: formatters.getNumberFormat(locales).format(currentPluralValue),\n });\n }\n continue;\n }\n var varName = el.value;\n // Enforce that all required values are provided by the caller.\n if (!(values && varName in values)) {\n throw new MissingValueError(varName, originalMessage);\n }\n var value = values[varName];\n if (isArgumentElement(el)) {\n if (!value || typeof value === 'string' || typeof value === 'number') {\n value =\n typeof value === 'string' || typeof value === 'number'\n ? String(value)\n : '';\n }\n result.push({\n type: typeof value === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n value: value,\n });\n continue;\n }\n // Recursively format plural and select parts' option — which can be a\n // nested pattern structure. The choosing of the option to use is\n // abstracted-by and delegated-to the part helper object.\n if (isDateElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.date[el.style]\n : isDateTimeSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTimeElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.time[el.style]\n : isDateTimeSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isNumberElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.number[el.style]\n : isNumberSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n if (style && style.scale) {\n value =\n value *\n (style.scale || 1);\n }\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getNumberFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTagElement(el)) {\n var children = el.children, value_1 = el.value;\n var formatFn = values[value_1];\n if (!isFormatXMLElementFn(formatFn)) {\n throw new InvalidValueTypeError(value_1, 'function', originalMessage);\n }\n var parts = formatToParts(children, locales, formatters, formats, values, currentPluralValue);\n var chunks = formatFn(parts.map(function (p) { return p.value; }));\n if (!Array.isArray(chunks)) {\n chunks = [chunks];\n }\n result.push.apply(result, chunks.map(function (c) {\n return {\n type: typeof c === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n value: c,\n };\n }));\n }\n if (isSelectElement(el)) {\n var opt = el.options[value] || el.options.other;\n if (!opt) {\n throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));\n continue;\n }\n if (isPluralElement(el)) {\n var opt = el.options[\"=\" + value];\n if (!opt) {\n if (!Intl.PluralRules) {\n throw new FormatError(\"Intl.PluralRules is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-pluralrules\\\"\\n\", ErrorCode.MISSING_INTL_API, originalMessage);\n }\n var rule = formatters\n .getPluralRules(locales, { type: el.pluralType })\n .select(value - (el.offset || 0));\n opt = el.options[rule] || el.options.other;\n }\n if (!opt) {\n throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0)));\n continue;\n }\n }\n return mergeLiteral(result);\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\nimport { __assign, __spreadArray } from \"tslib\";\nimport { parse } from '@formatjs/icu-messageformat-parser';\nimport memoize, { strategies } from '@formatjs/fast-memoize';\nimport { formatToParts, PART_TYPE, } from './formatters';\n// -- MessageFormat --------------------------------------------------------\nfunction mergeConfig(c1, c2) {\n if (!c2) {\n return c1;\n }\n return __assign(__assign(__assign({}, (c1 || {})), (c2 || {})), Object.keys(c1).reduce(function (all, k) {\n all[k] = __assign(__assign({}, c1[k]), (c2[k] || {}));\n return all;\n }, {}));\n}\nfunction mergeConfigs(defaultConfig, configs) {\n if (!configs) {\n return defaultConfig;\n }\n return Object.keys(defaultConfig).reduce(function (all, k) {\n all[k] = mergeConfig(defaultConfig[k], configs[k]);\n return all;\n }, __assign({}, defaultConfig));\n}\nfunction createFastMemoizeCache(store) {\n return {\n create: function () {\n return {\n has: function (key) {\n return key in store;\n },\n get: function (key) {\n return store[key];\n },\n set: function (key, value) {\n store[key] = value;\n },\n };\n },\n };\n}\nfunction createDefaultFormatters(cache) {\n if (cache === void 0) { cache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n }; }\n return {\n getNumberFormat: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args)))();\n }, {\n cache: createFastMemoizeCache(cache.number),\n strategy: strategies.variadic,\n }),\n getDateTimeFormat: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args)))();\n }, {\n cache: createFastMemoizeCache(cache.dateTime),\n strategy: strategies.variadic,\n }),\n getPluralRules: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args)))();\n }, {\n cache: createFastMemoizeCache(cache.pluralRules),\n strategy: strategies.variadic,\n }),\n };\n}\nvar IntlMessageFormat = /** @class */ (function () {\n function IntlMessageFormat(message, locales, overrideFormats, opts) {\n var _this = this;\n if (locales === void 0) { locales = IntlMessageFormat.defaultLocale; }\n this.formatterCache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n };\n this.format = function (values) {\n var parts = _this.formatToParts(values);\n // Hot path for straight simple msg translations\n if (parts.length === 1) {\n return parts[0].value;\n }\n var result = parts.reduce(function (all, part) {\n if (!all.length ||\n part.type !== PART_TYPE.literal ||\n typeof all[all.length - 1] !== 'string') {\n all.push(part.value);\n }\n else {\n all[all.length - 1] += part.value;\n }\n return all;\n }, []);\n if (result.length <= 1) {\n return result[0] || '';\n }\n return result;\n };\n this.formatToParts = function (values) {\n return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, undefined, _this.message);\n };\n this.resolvedOptions = function () { return ({\n locale: Intl.NumberFormat.supportedLocalesOf(_this.locales)[0],\n }); };\n this.getAst = function () { return _this.ast; };\n if (typeof message === 'string') {\n this.message = message;\n if (!IntlMessageFormat.__parse) {\n throw new TypeError('IntlMessageFormat.__parse must be set to process `message` of type `string`');\n }\n // Parse string messages into an AST.\n this.ast = IntlMessageFormat.__parse(message, {\n ignoreTag: opts === null || opts === void 0 ? void 0 : opts.ignoreTag,\n });\n }\n else {\n this.ast = message;\n }\n if (!Array.isArray(this.ast)) {\n throw new TypeError('A message must be provided as a String or AST.');\n }\n // Creates a new object with the specified `formats` merged with the default\n // formats.\n this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);\n // Defined first because it's used to build the format pattern.\n this.locales = locales;\n this.formatters =\n (opts && opts.formatters) || createDefaultFormatters(this.formatterCache);\n }\n Object.defineProperty(IntlMessageFormat, \"defaultLocale\", {\n get: function () {\n if (!IntlMessageFormat.memoizedDefaultLocale) {\n IntlMessageFormat.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale;\n }\n return IntlMessageFormat.memoizedDefaultLocale;\n },\n enumerable: false,\n configurable: true\n });\n IntlMessageFormat.memoizedDefaultLocale = null;\n IntlMessageFormat.__parse = parse;\n // Default format options used as the prototype of the `formats` provided to the\n // constructor. These are used when constructing the internal Intl.NumberFormat\n // and Intl.DateTimeFormat instances.\n IntlMessageFormat.formats = {\n number: {\n currency: {\n style: 'currency',\n },\n percent: {\n style: 'percent',\n },\n },\n date: {\n short: {\n month: 'numeric',\n day: 'numeric',\n year: '2-digit',\n },\n medium: {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n },\n long: {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n full: {\n weekday: 'long',\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n },\n time: {\n short: {\n hour: 'numeric',\n minute: 'numeric',\n },\n medium: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n },\n long: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n full: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n },\n };\n return IntlMessageFormat;\n}());\nexport { IntlMessageFormat };\n","import{writable as e,derived as n}from\"svelte/store\";import t from\"deepmerge\";import o from\"intl-messageformat\";const r={},i=(e,n,t)=>t?(n in r||(r[n]={}),e in r[n]||(r[n][e]=t),t):t,a=(e,n)=>{if(null==n)return;if(n in r&&e in r[n])return r[n][e];const t=E(n);for(let o=0;o0){const n=t.slice(e,t.length).join(\".\");if(n in o){o=o[n];break}}o=o[t[e]]}else o=void 0;return o}(function(e){return l[e]||null}(e),n)}function m(e,...n){delete r[e],s.update((o=>(o[e]=t.all([o[e]||{},...n]),o)))}const f=n([s],(([e])=>Object.keys(e)));s.subscribe((e=>l=e));const d={};function g(e){return d[e]}function w(e){return E(e).some((e=>{var n;return null===(n=g(e))||void 0===n?void 0:n.size}))}function h(e,n){return Promise.all(n.map((n=>(function(e,n){d[e].delete(n),0===d[e].size&&delete d[e]}(e,n),n().then((e=>e.default||e)))))).then((n=>m(e,...n)))}const p={};function b(e){if(!w(e))return e in p?p[e]:void 0;const n=function(e){return E(e).map((e=>{const n=g(e);return[e,n?[...n]:[]]})).filter((([,e])=>e.length>0))}(e);return p[e]=Promise.all(n.map((([e,n])=>h(e,n)))).then((()=>{if(w(e))return b(e);delete p[e]})),p[e]}function y(e,n){g(e)||function(e){d[e]=new Set}(e);const t=g(e);g(e).has(n)||(u(e)||s.update((n=>(n[e]={},n))),t.add(n))}\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */function v(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);rt.slice(0,n+1).join(\"-\"))).reverse()}function E(e,n=j().fallbackLocale){const t=x(e);return n?[...new Set([...t,...x(n)])]:t}function D(){return L}T.subscribe((e=>{L=e,\"undefined\"!=typeof window&&null!==e&&document.documentElement.setAttribute(\"lang\",e)}));const M=T.set;T.set=e=>{if(function(e){if(null==e)return;const n=E(e);for(let e=0;ek.set(!0)),n):k.set(!0),b(e).then((()=>{M(e)})).finally((()=>{clearTimeout(t),k.set(!1)}))}return M(e)},T.update=e=>M(e(L));const S=(e,n)=>{const t=e.split(\"&\").find((e=>0===e.indexOf(`${n}=`)));return t?t.split(\"=\").pop():null},N=(e,n)=>{const t=n.exec(e);return t&&t[1]||null},P=e=>\"undefined\"==typeof window?null:N(window.location.hostname,e),A=e=>\"undefined\"==typeof window?null:N(window.location.pathname,e),I=()=>\"undefined\"==typeof window?null:window.navigator.language||window.navigator.languages[0],F=e=>\"undefined\"==typeof window?null:S(window.location.search.substr(1),e),z=e=>\"undefined\"==typeof window?null:S(window.location.hash.substr(1),e),Z=e=>{const n=Object.create(null);return t=>{const o=JSON.stringify(t);return o in n?n[o]:n[o]=e(t)}},C=(e,n)=>{const{formats:t}=j();if(e in t&&n in t[e])return t[e][n];throw new Error(`[svelte-i18n] Unknown \"${n}\" ${e} format.`)},G=Z((e=>{var{locale:n,format:t}=e,o=v(e,[\"locale\",\"format\"]);if(null==n)throw new Error('[svelte-i18n] A \"locale\" must be set to format numbers');return t&&(o=C(\"number\",t)),new Intl.NumberFormat(n,o)})),J=Z((e=>{var{locale:n,format:t}=e,o=v(e,[\"locale\",\"format\"]);if(null==n)throw new Error('[svelte-i18n] A \"locale\" must be set to format dates');return t?o=C(\"date\",t):0===Object.keys(o).length&&(o=C(\"date\",\"short\")),new Intl.DateTimeFormat(n,o)})),U=Z((e=>{var{locale:n,format:t}=e,o=v(e,[\"locale\",\"format\"]);if(null==n)throw new Error('[svelte-i18n] A \"locale\" must be set to format time values');return t?o=C(\"time\",t):0===Object.keys(o).length&&(o=C(\"time\",\"short\")),new Intl.DateTimeFormat(n,o)})),_=(e={})=>{var{locale:n=D()}=e,t=v(e,[\"locale\"]);return G(Object.assign({locale:n},t))},q=(e={})=>{var{locale:n=D()}=e,t=v(e,[\"locale\"]);return J(Object.assign({locale:n},t))},B=(e={})=>{var{locale:n=D()}=e,t=v(e,[\"locale\"]);return U(Object.assign({locale:n},t))},H=Z(((e,n=D())=>new o(e,n,j().formats,{ignoreTag:j().ignoreTag}))),K=(e,n={})=>{\"object\"==typeof e&&(e=(n=e).id);const{values:t,locale:o=D(),default:r}=n;if(null==o)throw new Error(\"[svelte-i18n] Cannot format a message without first setting the initial locale.\");let i=a(e,o);if(i){if(\"string\"!=typeof i)return console.warn(`[svelte-i18n] Message with id \"${e}\" must be of type \"string\", found: \"${typeof i}\". Gettin its value through the \"$format\" method is deprecated; use the \"json\" method instead.`),i}else j().warnOnMissingMessages&&console.warn(`[svelte-i18n] The message \"${e}\" was not found in \"${E(o).join('\", \"')}\".${w(D())?\"\\n\\nNote: there are at least one loader still registered to this locale that wasn't executed.\":\"\"}`),i=r||e;if(!t)return i;let l=i;try{l=H(i,o).format(t)}catch(n){console.warn(`[svelte-i18n] Message \"${e}\" has syntax error:`,n.message)}return l},Q=(e,n)=>B(n).format(e),R=(e,n)=>q(n).format(e),V=(e,n)=>_(n).format(e),W=(e,n=D())=>a(e,n),X=n([T,s],(()=>K)),Y=n([T],(()=>Q)),ee=n([T],(()=>R)),ne=n([T],(()=>V)),te=n([T,s],(()=>W));function oe(e){return e}function re(e){return b(e||D()||j().initialLocale)}export{X as _,m as addMessages,ee as date,oe as defineMessages,s as dictionary,X as format,q as getDateFormatter,z as getLocaleFromHash,P as getLocaleFromHostname,I as getLocaleFromNavigator,A as getLocaleFromPathname,F as getLocaleFromQueryString,H as getMessageFormatter,_ as getNumberFormatter,B as getTimeFormatter,$ as init,k as isLoading,te as json,T as locale,f as locales,ne as number,y as register,X as t,Y as time,re as waitLocale};\n","\n\n

    \n {@html $_('results_text', {\n values: {\n points: `${quiz.points}`,\n total: `${quiz.counter.max}`,\n },\n })}\n

    \n\n
      \n {#each quiz.questions as question, i}\n
    1. quiz.jump(i)}\">\n \n {emojis[+question.solved]}\n Q{i + 1}:{@html question.text}\n \n
        \n \n {#each question.selected as selected}\n {#if question.answers[selected].comment !== ''}\n
      1. \n {@html question.answers[selected].html}:\n {@html question.answers[selected].comment}\n
      2. \n {/if}\n {/each}\n
      \n
    2. \n {/each}\n
    \n\n\n","\n\n{#if $counter === counter.max}\n \n

    {$_('results_title')}

    \n \n{:else}\n \n \n

    Q{$counter + 1}: {@html current.text}

    \n \n {#if current.explanation !== null && current.explanation !== ''}\n

    {@html current.explanation}

    \n {/if}\n \n{/if}\n","\n\n\n\n\n","\n\n
    \n {#if $counter === counter.max}\n \n \n {:else}\n \n (show_hint = !show_hint)}\">{$_('hint')}\n {#if $finished}\n \n \n {:else if $counter === counter.max - 1}\n \n \n {:else}\n \n {/if}\n {/if}\n
    \n\n{#if show_hint}\n

    💡 {@html current.hint}

    \n{/if}\n\n
    \n\n\n","import { writable } from '../store/index.mjs';\nimport { now, loop, assign } from '../internal/index.mjs';\nimport { linear } from '../easing/index.mjs';\n\nfunction is_date(obj) {\n\treturn Object.prototype.toString.call(obj) === '[object Date]';\n}\n\nfunction tick_spring(ctx, last_value, current_value, target_value) {\n\tif (typeof current_value === 'number' || is_date(current_value)) {\n\t\t// @ts-ignore\n\t\tconst delta = target_value - current_value;\n\t\t// @ts-ignore\n\t\tconst velocity = (current_value - last_value) / (ctx.dt || 1 / 60); // guard div by 0\n\t\tconst spring = ctx.opts.stiffness * delta;\n\t\tconst damper = ctx.opts.damping * velocity;\n\t\tconst acceleration = (spring - damper) * ctx.inv_mass;\n\t\tconst d = (velocity + acceleration) * ctx.dt;\n\n\t\tif (Math.abs(d) < ctx.opts.precision && Math.abs(delta) < ctx.opts.precision) {\n\t\t\treturn target_value; // settled\n\t\t} else {\n\t\t\tctx.settled = false; // signal loop to keep ticking\n\t\t\t// @ts-ignore\n\t\t\treturn is_date(current_value) ?\n\t\t\t\tnew Date(current_value.getTime() + d) : current_value + d;\n\t\t}\n\t} else if (Array.isArray(current_value)) {\n\t\t// @ts-ignore\n\t\treturn current_value.map((_, i) =>\n\t\t\ttick_spring(ctx, last_value[i], current_value[i], target_value[i]));\n\t} else if (typeof current_value === 'object') {\n\t\tconst next_value = {};\n\t\tfor (const k in current_value) {\n\t\t\t// @ts-ignore\n\t\t\tnext_value[k] = tick_spring(ctx, last_value[k], current_value[k], target_value[k]);\n\t\t}\n\t\t// @ts-ignore\n\t\treturn next_value;\n\t} else {\n\t\tthrow new Error(`Cannot spring ${typeof current_value} values`);\n\t}\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction spring(value, opts = {}) {\n\tconst store = writable(value);\n\tconst { stiffness = 0.15, damping = 0.8, precision = 0.01 } = opts;\n\n\tlet last_time;\n\tlet task;\n\tlet current_token;\n\tlet last_value = value;\n\tlet target_value = value;\n\n\tlet inv_mass = 1;\n\tlet inv_mass_recovery_rate = 0;\n\tlet cancel_task = false;\n\n\tfunction set(new_value, opts = {}) {\n\t\ttarget_value = new_value;\n\t\tconst token = current_token = {};\n\n\t\tif (value == null || opts.hard || (spring.stiffness >= 1 && spring.damping >= 1)) {\n\t\t\tcancel_task = true; // cancel any running animation\n\t\t\tlast_time = now();\n\t\t\tlast_value = new_value;\n\t\t\tstore.set(value = target_value);\n\t\t\treturn Promise.resolve();\n\t\t} else if (opts.soft) {\n\t\t\tconst rate = opts.soft === true ? .5 : +opts.soft;\n\t\t\tinv_mass_recovery_rate = 1 / (rate * 60);\n\t\t\tinv_mass = 0; // infinite mass, unaffected by spring forces\n\t\t}\n\n\t\tif (!task) {\n\t\t\tlast_time = now();\n\t\t\tcancel_task = false;\n\n\t\t\ttask = loop(now => {\n\n\t\t\t\tif (cancel_task) {\n\t\t\t\t\tcancel_task = false;\n\t\t\t\t\ttask = null;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tinv_mass = Math.min(inv_mass + inv_mass_recovery_rate, 1);\n\n\t\t\t\tconst ctx = {\n\t\t\t\t\tinv_mass,\n\t\t\t\t\topts: spring,\n\t\t\t\t\tsettled: true, // tick_spring may signal false\n\t\t\t\t\tdt: (now - last_time) * 60 / 1000\n\t\t\t\t};\n\t\t\t\tconst next_value = tick_spring(ctx, last_value, value, target_value);\n\n\t\t\t\tlast_time = now;\n\t\t\t\tlast_value = value;\n\t\t\t\tstore.set(value = next_value);\n\n\t\t\t\tif (ctx.settled) {\n\t\t\t\t\ttask = null;\n\t\t\t\t}\n\t\t\t\treturn !ctx.settled;\n\t\t\t});\n\t\t}\n\n\t\treturn new Promise(fulfil => {\n\t\t\ttask.promise.then(() => {\n\t\t\t\tif (token === current_token) fulfil();\n\t\t\t});\n\t\t});\n\t}\n\n\tconst spring = {\n\t\tset,\n\t\tupdate: (fn, opts) => set(fn(target_value, value), opts),\n\t\tsubscribe: store.subscribe,\n\t\tstiffness,\n\t\tdamping,\n\t\tprecision\n\t};\n\n\treturn spring;\n}\n\nfunction get_interpolator(a, b) {\n\tif (a === b || a !== a) return () => a;\n\n\tconst type = typeof a;\n\n\tif (type !== typeof b || Array.isArray(a) !== Array.isArray(b)) {\n\t\tthrow new Error('Cannot interpolate values of different type');\n\t}\n\n\tif (Array.isArray(a)) {\n\t\tconst arr = b.map((bi, i) => {\n\t\t\treturn get_interpolator(a[i], bi);\n\t\t});\n\n\t\treturn t => arr.map(fn => fn(t));\n\t}\n\n\tif (type === 'object') {\n\t\tif (!a || !b) throw new Error('Object cannot be null');\n\n\t\tif (is_date(a) && is_date(b)) {\n\t\t\ta = a.getTime();\n\t\t\tb = b.getTime();\n\t\t\tconst delta = b - a;\n\t\t\treturn t => new Date(a + t * delta);\n\t\t}\n\n\t\tconst keys = Object.keys(b);\n\t\tconst interpolators = {};\n\n\t\tkeys.forEach(key => {\n\t\t\tinterpolators[key] = get_interpolator(a[key], b[key]);\n\t\t});\n\n\t\treturn t => {\n\t\t\tconst result = {};\n\t\t\tkeys.forEach(key => {\n\t\t\t\tresult[key] = interpolators[key](t);\n\t\t\t});\n\t\t\treturn result;\n\t\t};\n\t}\n\n\tif (type === 'number') {\n\t\tconst delta = b - a;\n\t\treturn t => a + t * delta;\n\t}\n\n\tthrow new Error(`Cannot interpolate ${type} values`);\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction tweened(value, defaults = {}) {\n\tconst store = writable(value);\n\n\tlet task;\n\tlet target_value = value;\n\n\tfunction set(new_value, opts) {\n\t\tif (value == null) {\n\t\t\tstore.set(value = new_value);\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\ttarget_value = new_value;\n\n\t\tlet previous_task = task;\n\t\tlet started = false;\n\n\t\tlet {\n\t\t\tdelay = 0,\n\t\t\tduration = 400,\n\t\t\teasing = linear,\n\t\t\tinterpolate = get_interpolator\n\t\t} = assign(assign({}, defaults), opts);\n\n\t\tif (duration === 0) {\n\t\t\tif (previous_task) {\n\t\t\t\tprevious_task.abort();\n\t\t\t\tprevious_task = null;\n\t\t\t}\n\n\t\t\tstore.set(value = target_value);\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\tconst start = now() + delay;\n\t\tlet fn;\n\n\t\ttask = loop(now => {\n\t\t\tif (now < start) return true;\n\n\t\t\tif (!started) {\n\t\t\t\tfn = interpolate(value, new_value);\n\t\t\t\tif (typeof duration === 'function') duration = duration(value, new_value);\n\t\t\t\tstarted = true;\n\t\t\t}\n\n\t\t\tif (previous_task) {\n\t\t\t\tprevious_task.abort();\n\t\t\t\tprevious_task = null;\n\t\t\t}\n\n\t\t\tconst elapsed = now - start;\n\n\t\t\tif (elapsed > duration) {\n\t\t\t\tstore.set(value = new_value);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// @ts-ignore\n\t\t\tstore.set(value = fn(easing(elapsed / duration)));\n\t\t\treturn true;\n\t\t});\n\n\t\treturn task.promise;\n\t}\n\n\treturn {\n\t\tset,\n\t\tupdate: (fn, opts) => set(fn(target_value, value), opts),\n\t\tsubscribe: store.subscribe\n\t};\n}\n\nexport { spring, tweened };\n","\n\n
    \n
    \n
    \n\n\n","import { init, addMessages, getLocaleFromNavigator } from 'svelte-i18n';\nimport en from './en.json';\nimport de from './de.json';\nexport default function (locale) {\n addMessages('de', de);\n addMessages('en', en);\n init({\n fallbackLocale: 'en',\n initialLocale: locale === null ? getLocaleFromNavigator() : locale,\n });\n}\n","\n\n
    \n
    \n \n
    \n \n
    \n
    \n
    \n
    \n\n\n","/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.DOMPurify = factory());\n}(this, function () { 'use strict';\n\n function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n var hasOwnProperty = Object.hasOwnProperty,\n setPrototypeOf = Object.setPrototypeOf,\n isFrozen = Object.isFrozen,\n getPrototypeOf = Object.getPrototypeOf,\n getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n var freeze = Object.freeze,\n seal = Object.seal,\n create = Object.create; // eslint-disable-line import/no-mutable-exports\n\n var _ref = typeof Reflect !== 'undefined' && Reflect,\n apply = _ref.apply,\n construct = _ref.construct;\n\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n\n if (!construct) {\n construct = function construct(Func, args) {\n return new (Function.prototype.bind.apply(Func, [null].concat(_toConsumableArray(args))))();\n };\n }\n\n var arrayForEach = unapply(Array.prototype.forEach);\n var arrayPop = unapply(Array.prototype.pop);\n var arrayPush = unapply(Array.prototype.push);\n\n var stringToLowerCase = unapply(String.prototype.toLowerCase);\n var stringMatch = unapply(String.prototype.match);\n var stringReplace = unapply(String.prototype.replace);\n var stringIndexOf = unapply(String.prototype.indexOf);\n var stringTrim = unapply(String.prototype.trim);\n\n var regExpTest = unapply(RegExp.prototype.test);\n\n var typeErrorCreate = unconstruct(TypeError);\n\n function unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return apply(func, thisArg, args);\n };\n }\n\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return construct(func, args);\n };\n }\n\n /* Add properties to a lookup table */\n function addToSet(set, array) {\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n var l = array.length;\n while (l--) {\n var element = array[l];\n if (typeof element === 'string') {\n var lcElement = stringToLowerCase(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n }\n\n /* Shallow clone an object */\n function clone(object) {\n var newObject = create(null);\n\n var property = void 0;\n for (property in object) {\n if (apply(hasOwnProperty, object, [property])) {\n newObject[property] = object[property];\n }\n }\n\n return newObject;\n }\n\n /* IE10 doesn't support __lookupGetter__ so lets'\n * simulate it. It also automatically checks\n * if the prop is function or getter and behaves\n * accordingly. */\n function lookupGetter(object, prop) {\n while (object !== null) {\n var desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n }\n\n var html = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\n\n // SVG\n var svg = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n\n var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n\n // List of SVG elements that are disallowed by default.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'feimage', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n\n var mathMl = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']);\n\n // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n\n var text = freeze(['#text']);\n\n var html$1 = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\n\n var svg$1 = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n\n var mathMl$1 = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n\n var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n // eslint-disable-next-line unicorn/better-regex\n var MUSTACHE_EXPR = seal(/\\{\\{[\\s\\S]*|[\\s\\S]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n var ERB_EXPR = seal(/<%[\\s\\S]*|[\\s\\S]*%>/gm);\n var DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n var ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n var IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n var ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n\n var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n function _toConsumableArray$1(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n var getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {Document} document The document object (to determine policy name suffix)\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported).\n */\n var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {\n if ((typeof trustedTypes === 'undefined' ? 'undefined' : _typeof(trustedTypes)) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n var suffix = null;\n var ATTR_NAME = 'data-tt-policy-suffix';\n if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {\n suffix = document.currentScript.getAttribute(ATTR_NAME);\n }\n\n var policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML: function createHTML(html$$1) {\n return html$$1;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n\n function createDOMPurify() {\n var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n\n var DOMPurify = function DOMPurify(root) {\n return createDOMPurify(root);\n };\n\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = '2.2.8';\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n\n return DOMPurify;\n }\n\n var originalDocument = window.document;\n\n var document = window.document;\n var DocumentFragment = window.DocumentFragment,\n HTMLTemplateElement = window.HTMLTemplateElement,\n Node = window.Node,\n Element = window.Element,\n NodeFilter = window.NodeFilter,\n _window$NamedNodeMap = window.NamedNodeMap,\n NamedNodeMap = _window$NamedNodeMap === undefined ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,\n Text = window.Text,\n Comment = window.Comment,\n DOMParser = window.DOMParser,\n trustedTypes = window.trustedTypes;\n\n\n var ElementPrototype = Element.prototype;\n\n var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n var getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n var template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);\n var emptyHTML = trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML('') : '';\n\n var _document = document,\n implementation = _document.implementation,\n createNodeIterator = _document.createNodeIterator,\n createDocumentFragment = _document.createDocumentFragment;\n var importNode = originalDocument.importNode;\n\n\n var documentMode = {};\n try {\n documentMode = clone(document).documentMode ? document.documentMode : {};\n } catch (_) {}\n\n var hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;\n\n var MUSTACHE_EXPR$$1 = MUSTACHE_EXPR,\n ERB_EXPR$$1 = ERB_EXPR,\n DATA_ATTR$$1 = DATA_ATTR,\n ARIA_ATTR$$1 = ARIA_ATTR,\n IS_SCRIPT_OR_DATA$$1 = IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE$$1 = ATTR_WHITESPACE;\n var IS_ALLOWED_URI$$1 = IS_ALLOWED_URI;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n\n var ALLOWED_TAGS = null;\n var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(html), _toConsumableArray$1(svg), _toConsumableArray$1(svgFilters), _toConsumableArray$1(mathMl), _toConsumableArray$1(text)));\n\n /* Allowed attribute names */\n var ALLOWED_ATTR = null;\n var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray$1(html$1), _toConsumableArray$1(svg$1), _toConsumableArray$1(mathMl$1), _toConsumableArray$1(xml)));\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n var FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n var FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n var ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n var ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n var ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n var SAFE_FOR_TEMPLATES = false;\n\n /* Decide if document with ... should be returned */\n var WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n var SET_CONFIG = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n var FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n var RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n var RETURN_DOM_FRAGMENT = false;\n\n /* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM\n * `Node` is imported into the current `Document`. If this flag is not enabled the\n * `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by\n * DOMPurify.\n *\n * This defaults to `true` starting DOMPurify 2.2.0. Note that setting it to `false`\n * might cause XSS from attacks hidden in closed shadowroots in case the browser\n * supports Declarative Shadow: DOM https://web.dev/declarative-shadow-dom/\n */\n var RETURN_DOM_IMPORT = true;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n var RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks? */\n var SANITIZE_DOM = true;\n\n /* Keep element content when removing element? */\n var KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n var IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n var USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n var FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n\n /* Tags that are safe for data: URIs */\n var DATA_URI_TAGS = null;\n var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\n /* Attributes safe for values like \"javascript:\" */\n var URI_SAFE_ATTRIBUTES = null;\n var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'summary', 'title', 'value', 'style', 'xmlns']);\n\n var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n var NAMESPACE = HTML_NAMESPACE;\n\n /* Keep a reference to config to pass to hooks */\n var CONFIG = null;\n\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n\n var formElement = document.createElement('form');\n\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n var _parseConfig = function _parseConfig(cfg) {\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n\n /* Shield configuration object from tampering */\n if (!cfg || (typeof cfg === 'undefined' ? 'undefined' : _typeof(cfg)) !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n\n /* Set configuration parameters */\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR) : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS) : DEFAULT_DATA_URI_TAGS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_DOM_IMPORT = cfg.RETURN_DOM_IMPORT !== false; // Default true\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI$$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$$1;\n NAMESPACE = cfg.NAMESPACE || NAMESPACE;\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(text)));\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html);\n addToSet(ALLOWED_ATTR, html$1);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg);\n addToSet(ALLOWED_ATTR, svg$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl);\n addToSet(ALLOWED_ATTR, mathMl$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n\n var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n var ALL_SVG_TAGS = addToSet({}, svg);\n addToSet(ALL_SVG_TAGS, svgFilters);\n addToSet(ALL_SVG_TAGS, svgDisallowed);\n\n var ALL_MATHML_TAGS = addToSet({}, mathMl);\n addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n\n /**\n *\n *\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n var _checkValidNamespace = function _checkValidNamespace(element) {\n var parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: HTML_NAMESPACE,\n tagName: 'template'\n };\n }\n\n var tagName = stringToLowerCase(element.tagName);\n var parentTagName = stringToLowerCase(parent.tagName);\n\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n }\n\n // The only way to switch from MathML to SVG is via\n // svg if parent is either or MathML\n // text integration points.\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n }\n\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n }\n\n // The only way to switch from SVG to MathML is via\n // and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erronously deleted from\n // HTML namespace.\n var commonSvgAndHTMLElements = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return !ALL_MATHML_TAGS[tagName] && (commonSvgAndHTMLElements[tagName] || !ALL_SVG_TAGS[tagName]);\n }\n\n // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG or MathML). Return false just in case.\n return false;\n };\n\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n var _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, { element: node });\n try {\n node.parentNode.removeChild(node);\n } catch (_) {\n try {\n node.outerHTML = emptyHTML;\n } catch (_) {\n node.remove();\n }\n }\n };\n\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n var _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n\n node.removeAttribute(name);\n\n // We void attribute values for unremovable \"is\"\" attributes\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n var _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n var doc = void 0;\n var leadingWhitespace = void 0;\n\n if (FORCE_BODY) {\n dirty = '' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n var matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n\n var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, 'text/html');\n } catch (_) {}\n }\n\n /* Use createHTMLDocument in case DOMParser is not available */\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n doc.documentElement.innerHTML = dirtyPayload;\n }\n\n var body = doc.body || doc.documentElement;\n\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n\n /* Work on whole document or just its body */\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n\n /**\n * _createIterator\n *\n * @param {Document} root document/fragment to create iterator for\n * @return {Iterator} iterator instance\n */\n var _createIterator = function _createIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, function () {\n return NodeFilter.FILTER_ACCEPT;\n }, false);\n };\n\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n var _isClobbered = function _isClobbered(elm) {\n if (elm instanceof Text || elm instanceof Comment) {\n return false;\n }\n\n if (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function') {\n return true;\n }\n\n return false;\n };\n\n /**\n * _isNode\n *\n * @param {Node} obj object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n var _isNode = function _isNode(object) {\n return (typeof Node === 'undefined' ? 'undefined' : _typeof(Node)) === 'object' ? object instanceof Node : object && (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';\n };\n\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n var _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n\n arrayForEach(hooks[entryPoint], function (hook) {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n var _sanitizeElements = function _sanitizeElements(currentNode) {\n var content = void 0;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check if tagname contains Unicode */\n if (stringMatch(currentNode.nodeName, /[\\u0080-\\uFFFF]/)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n var tagName = stringToLowerCase(currentNode.nodeName);\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName: tagName,\n allowedTags: ALLOWED_TAGS\n });\n\n /* Detect mXSS attempts abusing namespace confusion */\n if (!_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove element if anything forbids its presence */\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Keep content except for bad-listed elements */\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n var parentNode = getParentNode(currentNode) || currentNode.parentNode;\n var childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n\n if (childNodes && parentNode) {\n var childCount = childNodes.length;\n\n for (var i = childCount - 1; i >= 0; --i) {\n parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));\n }\n }\n }\n\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check whether element has a valid namespace */\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n if ((tagName === 'noscript' || tagName === 'noembed') && regExpTest(/<\\/no(script|embed)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Sanitize element content to be template-safe */\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {\n /* Get the element's text content */\n content = currentNode.textContent;\n content = stringReplace(content, MUSTACHE_EXPR$$1, ' ');\n content = stringReplace(content, ERB_EXPR$$1, ' ');\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });\n currentNode.textContent = content;\n }\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeElements', currentNode, null);\n\n return false;\n };\n\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n var _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n return false;\n }\n\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$$1, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n return false;\n\n /* Check value is safe. First, is attr inert? If so, is safe */\n } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ; else if (!value) ; else {\n return false;\n }\n\n return true;\n };\n\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n var _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n var attr = void 0;\n var value = void 0;\n var lcName = void 0;\n var l = void 0;\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n\n var attributes = currentNode.attributes;\n\n /* Check if we have attributes; if not we might have a text node */\n\n if (!attributes) {\n return;\n }\n\n var hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR\n };\n l = attributes.length;\n\n /* Go backwards over all attributes; safely remove bad ones */\n while (l--) {\n attr = attributes[l];\n var _attr = attr,\n name = _attr.name,\n namespaceURI = _attr.namespaceURI;\n\n value = stringTrim(attr.value);\n lcName = stringToLowerCase(name);\n\n /* Execute a hook if present */\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n value = hookEvent.attrValue;\n /* Did the hooks approve of the attribute? */\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n\n /* Remove attribute */\n _removeAttribute(name, currentNode);\n\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n continue;\n }\n\n /* Work around a security issue in jQuery 3.0 */\n if (regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n value = stringReplace(value, MUSTACHE_EXPR$$1, ' ');\n value = stringReplace(value, ERB_EXPR$$1, ' ');\n }\n\n /* Is `value` valid for this attribute? */\n var lcTag = currentNode.nodeName.toLowerCase();\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n\n /* Handle invalid data-* attribute set by try-catching it */\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n\n arrayPop(DOMPurify.removed);\n } catch (_) {}\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n var _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n var shadowNode = void 0;\n var shadowIterator = _createIterator(fragment);\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n\n /* Deep shadow DOM detected */\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(shadowNode);\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} configuration object\n */\n // eslint-disable-next-line complexity\n DOMPurify.sanitize = function (dirty, cfg) {\n var body = void 0;\n var importedNode = void 0;\n var currentNode = void 0;\n var oldNode = void 0;\n var returnNode = void 0;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n if (!dirty) {\n dirty = '';\n }\n\n /* Stringify, in case dirty is an object */\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n // eslint-disable-next-line no-negated-condition\n if (typeof dirty.toString !== 'function') {\n throw typeErrorCreate('toString is not a function');\n } else {\n dirty = dirty.toString();\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n }\n }\n\n /* Check we can run. Otherwise fall back or ignore */\n if (!DOMPurify.isSupported) {\n if (_typeof(window.toStaticHTML) === 'object' || typeof window.toStaticHTML === 'function') {\n if (typeof dirty === 'string') {\n return window.toStaticHTML(dirty);\n }\n\n if (_isNode(dirty)) {\n return window.toStaticHTML(dirty.outerHTML);\n }\n }\n\n return dirty;\n }\n\n /* Assign config vars */\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n\n /* Clean up removed elements */\n DOMPurify.removed = [];\n\n /* Check if dirty is correctly typed for IN_PLACE */\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n\n if (IN_PLACE) ; else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : emptyHTML;\n }\n }\n\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n\n /* Get node iterator */\n var nodeIterator = _createIterator(IN_PLACE ? dirty : body);\n\n /* Now start iterating over the created document */\n while (currentNode = nodeIterator.nextNode()) {\n /* Fix IE's strange behavior with manipulated textNodes #89 */\n if (currentNode.nodeType === 3 && currentNode === oldNode) {\n continue;\n }\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n\n /* Shadow DOM detected, sanitize it */\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(currentNode);\n\n oldNode = currentNode;\n }\n\n oldNode = null;\n\n /* If we sanitized `dirty` in-place, return it. */\n if (IN_PLACE) {\n return dirty;\n }\n\n /* Return sanitized string or DOM */\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n\n if (RETURN_DOM_IMPORT) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n\n return returnNode;\n }\n\n var serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\n /* Sanitize final string template-safe */\n if (SAFE_FOR_TEMPLATES) {\n serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$$1, ' ');\n serializedHTML = stringReplace(serializedHTML, ERB_EXPR$$1, ' ');\n }\n\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n DOMPurify.setConfig = function (cfg) {\n _parseConfig(cfg);\n SET_CONFIG = true;\n };\n\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {string} tag Tag name of containing element.\n * @param {string} attr Attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n\n var lcTag = stringToLowerCase(tag);\n var lcName = stringToLowerCase(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n\n hooks[entryPoint] = hooks[entryPoint] || [];\n arrayPush(hooks[entryPoint], hookFunction);\n };\n\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n */\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n arrayPop(hooks[entryPoint]);\n }\n };\n\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n *\n */\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n\n return DOMPurify;\n }\n\n var purify = createDOMPurify();\n\n return purify;\n\n}));\n//# sourceMappingURL=purify.js.map\n","'use strict';\nconst minIndent = require('min-indent');\n\nmodule.exports = string => {\n\tconst indent = minIndent(string);\n\n\tif (indent === 0) {\n\t\treturn string;\n\t}\n\n\tconst regex = new RegExp(`^[ \\\\t]{${indent}}`, 'gm');\n\n\treturn string.replace(regex, '');\n};\n","'use strict';\n\n// Gets all non-builtin properties up the prototype chain\nconst getAllProperties = object => {\n\tconst properties = new Set();\n\n\tdo {\n\t\tfor (const key of Reflect.ownKeys(object)) {\n\t\t\tproperties.add([object, key]);\n\t\t}\n\t} while ((object = Reflect.getPrototypeOf(object)) && object !== Object.prototype);\n\n\treturn properties;\n};\n\nmodule.exports = (self, {include, exclude} = {}) => {\n\tconst filter = key => {\n\t\tconst match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);\n\n\t\tif (include) {\n\t\t\treturn include.some(match);\n\t\t}\n\n\t\tif (exclude) {\n\t\t\treturn !exclude.some(match);\n\t\t}\n\n\t\treturn true;\n\t};\n\n\tfor (const [object, key] of getAllProperties(self.constructor.prototype)) {\n\t\tif (key === 'constructor' || !filter(key)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst descriptor = Reflect.getOwnPropertyDescriptor(object, key);\n\t\tif (descriptor && typeof descriptor.value === 'function') {\n\t\t\tself[key] = self[key].bind(self);\n\t\t}\n\t}\n\n\treturn self;\n};\n","import { writable, get } from 'svelte/store';\nimport autoBind from 'auto-bind';\nexport class BaseQuestion {\n constructor(text, explanation, hint, answers, type, options) {\n if (answers.length === 0) {\n throw 'no answers for question provided';\n }\n this.text = text;\n this.explanation = explanation;\n this.hint = hint;\n this.solved = false;\n this.options = options;\n this.answers = answers;\n if (options['shuffle_answers']) {\n this.answers = BaseQuestion.shuffle(answers);\n }\n this.selected = [];\n this.type = type;\n autoBind(this);\n }\n static is_equal(a1, a2) {\n return JSON.stringify(a1) === JSON.stringify(a2);\n }\n static shuffle(array) {\n // https://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array\n let currentIndex = array.length, temporaryValue, randomIndex;\n // While there remain elements to shuffle...\n while (0 !== currentIndex) {\n // Pick a remaining element...\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n // And swap it with the current element.\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n }\n reset() {\n this.selected = [];\n this.solved = false;\n BaseQuestion.shuffle(this.answers);\n }\n}\nclass Blanks extends BaseQuestion {\n check() {\n this.solved = false;\n return this.solved;\n }\n}\nclass Pairs extends BaseQuestion {\n check() {\n this.solved = false;\n return this.solved;\n }\n}\nexport class Sequence extends BaseQuestion {\n constructor(text, explanation, hint, answers, options) {\n // always enable shuffling for sequence questions\n options['shuffle_answers'] = true;\n super(text, explanation, hint, answers, 'Sequence', options);\n }\n check() {\n // extract answer ids from answers\n let true_answer_ids = this.answers.map((answer) => answer.id);\n this.solved = BaseQuestion.is_equal(true_answer_ids.sort(), this.selected);\n return this.solved;\n }\n}\nexport class MultipleChoice extends BaseQuestion {\n constructor(text, explanation, hint, answers, options) {\n super(text, explanation, hint, answers, 'MultipleChoice', options);\n }\n check() {\n let true_answer_ids = this.answers\n .map((answer, i) => i)\n .filter((i) => this.answers[i].correct);\n this.solved = BaseQuestion.is_equal(true_answer_ids.sort(), this.selected.sort());\n return this.solved;\n }\n}\nexport class SingleChoice extends BaseQuestion {\n constructor(text, explanation, hint, answers, options) {\n super(text, explanation, hint, answers, 'SingleChoice', options);\n let self = this;\n answers.forEach(function (answer, i) {\n if (answer.correct) {\n if (typeof self.correct !== 'undefined') {\n throw 'Single choice question can only have one answer';\n }\n self.correct = i;\n }\n });\n }\n check() {\n this.solved = this.selected[0] === this.correct;\n return this.solved;\n }\n}\nexport class Answer {\n constructor(id, html, correct, comment) {\n this.html = html;\n this.correct = correct;\n this.id = id;\n this.comment = comment;\n autoBind(this);\n }\n}\nclass Counter {\n constructor(max) {\n this.val = writable(0);\n this.max = max;\n this.subscribe = this.val.subscribe;\n autoBind(this);\n }\n jump(i) {\n this.val.set(i);\n }\n next() {\n this.val.update((val) => (val < this.max - 1 ? val + 1 : val));\n }\n previous() {\n this.val.update((val) => (val > 0 ? val - 1 : val));\n }\n reset() {\n // trigger a change\n if (get(this.val) == 0)\n this.val.set(1);\n this.val.set(0);\n }\n}\nexport class Quiz {\n constructor(questions, config) {\n if (questions.length == 0) {\n throw 'No questions for quiz provided';\n }\n this.questions = questions;\n this.counter = new Counter(this.questions.length);\n this.finished = writable(false);\n this.points = 0;\n this.config = config;\n if (config['shuffle_questions']) {\n this.questions = BaseQuestion.shuffle(questions);\n }\n autoBind(this);\n }\n current() {\n let n = get(this.counter);\n return this.questions[n];\n }\n next() {\n this.counter.next();\n }\n previous() {\n this.counter.previous();\n }\n jump(i) {\n this.counter.jump(i);\n }\n reset() {\n this.counter.reset();\n this.questions.forEach((q) => q.reset());\n this.finished.set(false);\n }\n evaluate() {\n this.finished.set(true);\n var points = 0;\n for (var q of this.questions) {\n q.check();\n if (q.solved)\n points++;\n }\n this.points = points;\n this.jump(this.counter.max);\n }\n}\n","function get(attr, def) {\n return typeof attr != 'undefined' ? attr : def;\n}\nexport class Config {\n constructor(options) {\n this.start_on_load = get(options.start_on_load, true);\n this.shuffle_answers = get(options.shuffle_answers, true);\n this.shuffle_questions = get(options.shuffle_questions, false);\n this.primary_color = get(options.primary_color, 'steelblue');\n this.secondary_color = get(options.secondary_color, '#f2f2f2');\n this.text_color = get(options.text_color, 'black');\n this.locale = get(options.locale, null);\n }\n}\nexport function merge_attributes(base_config, new_config) {\n //new_config overwrites entries in config1\n let config = new Config(base_config);\n for (let attrname in new_config) {\n if (Object.prototype.hasOwnProperty.call(new_config, attrname)) {\n config[attrname] = new_config[attrname];\n }\n }\n return config;\n}\n","/**\n * marked - a markdown parser\n * Copyright (c) 2011-2021, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/markedjs/marked\n */\n\n/**\n * DO NOT EDIT THIS FILE\n * The code in this file is generated from files in ./src/\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.marked = factory());\n}(this, (function () { 'use strict';\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n\n function _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it;\n\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n it = o[Symbol.iterator]();\n return it.next.bind(it);\n }\n\n function createCommonjsModule(fn) {\n var module = { exports: {} };\n \treturn fn(module, module.exports), module.exports;\n }\n\n var defaults$5 = createCommonjsModule(function (module) {\n function getDefaults() {\n return {\n baseUrl: null,\n breaks: false,\n gfm: true,\n headerIds: true,\n headerPrefix: '',\n highlight: null,\n langPrefix: 'language-',\n mangle: true,\n pedantic: false,\n renderer: null,\n sanitize: false,\n sanitizer: null,\n silent: false,\n smartLists: false,\n smartypants: false,\n tokenizer: null,\n walkTokens: null,\n xhtml: false\n };\n }\n\n function changeDefaults(newDefaults) {\n module.exports.defaults = newDefaults;\n }\n\n module.exports = {\n defaults: getDefaults(),\n getDefaults: getDefaults,\n changeDefaults: changeDefaults\n };\n });\n\n /**\n * Helpers\n */\n var escapeTest = /[&<>\"']/;\n var escapeReplace = /[&<>\"']/g;\n var escapeTestNoEncode = /[<>\"']|&(?!#?\\w+;)/;\n var escapeReplaceNoEncode = /[<>\"']|&(?!#?\\w+;)/g;\n var escapeReplacements = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n var getEscapeReplacement = function getEscapeReplacement(ch) {\n return escapeReplacements[ch];\n };\n\n function escape$2(html, encode) {\n if (encode) {\n if (escapeTest.test(html)) {\n return html.replace(escapeReplace, getEscapeReplacement);\n }\n } else {\n if (escapeTestNoEncode.test(html)) {\n return html.replace(escapeReplaceNoEncode, getEscapeReplacement);\n }\n }\n\n return html;\n }\n\n var unescapeTest = /&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig;\n\n function unescape$1(html) {\n // explicitly match decimal, hex, and named HTML entities\n return html.replace(unescapeTest, function (_, n) {\n n = n.toLowerCase();\n if (n === 'colon') return ':';\n\n if (n.charAt(0) === '#') {\n return n.charAt(1) === 'x' ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1));\n }\n\n return '';\n });\n }\n\n var caret = /(^|[^\\[])\\^/g;\n\n function edit$1(regex, opt) {\n regex = regex.source || regex;\n opt = opt || '';\n var obj = {\n replace: function replace(name, val) {\n val = val.source || val;\n val = val.replace(caret, '$1');\n regex = regex.replace(name, val);\n return obj;\n },\n getRegex: function getRegex() {\n return new RegExp(regex, opt);\n }\n };\n return obj;\n }\n\n var nonWordAndColonTest = /[^\\w:]/g;\n var originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;\n\n function cleanUrl$1(sanitize, base, href) {\n if (sanitize) {\n var prot;\n\n try {\n prot = decodeURIComponent(unescape$1(href)).replace(nonWordAndColonTest, '').toLowerCase();\n } catch (e) {\n return null;\n }\n\n if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) {\n return null;\n }\n }\n\n if (base && !originIndependentUrl.test(href)) {\n href = resolveUrl(base, href);\n }\n\n try {\n href = encodeURI(href).replace(/%25/g, '%');\n } catch (e) {\n return null;\n }\n\n return href;\n }\n\n var baseUrls = {};\n var justDomain = /^[^:]+:\\/*[^/]*$/;\n var protocol = /^([^:]+:)[\\s\\S]*$/;\n var domain = /^([^:]+:\\/*[^/]*)[\\s\\S]*$/;\n\n function resolveUrl(base, href) {\n if (!baseUrls[' ' + base]) {\n // we can ignore everything in base after the last slash of its path component,\n // but we might need to add _that_\n // https://tools.ietf.org/html/rfc3986#section-3\n if (justDomain.test(base)) {\n baseUrls[' ' + base] = base + '/';\n } else {\n baseUrls[' ' + base] = rtrim$1(base, '/', true);\n }\n }\n\n base = baseUrls[' ' + base];\n var relativeBase = base.indexOf(':') === -1;\n\n if (href.substring(0, 2) === '//') {\n if (relativeBase) {\n return href;\n }\n\n return base.replace(protocol, '$1') + href;\n } else if (href.charAt(0) === '/') {\n if (relativeBase) {\n return href;\n }\n\n return base.replace(domain, '$1') + href;\n } else {\n return base + href;\n }\n }\n\n var noopTest$1 = {\n exec: function noopTest() {}\n };\n\n function merge$2(obj) {\n var i = 1,\n target,\n key;\n\n for (; i < arguments.length; i++) {\n target = arguments[i];\n\n for (key in target) {\n if (Object.prototype.hasOwnProperty.call(target, key)) {\n obj[key] = target[key];\n }\n }\n }\n\n return obj;\n }\n\n function splitCells$1(tableRow, count) {\n // ensure that every cell-delimiting pipe has a space\n // before it to distinguish it from an escaped pipe\n var row = tableRow.replace(/\\|/g, function (match, offset, str) {\n var escaped = false,\n curr = offset;\n\n while (--curr >= 0 && str[curr] === '\\\\') {\n escaped = !escaped;\n }\n\n if (escaped) {\n // odd number of slashes means | is escaped\n // so we leave it alone\n return '|';\n } else {\n // add space before unescaped |\n return ' |';\n }\n }),\n cells = row.split(/ \\|/);\n var i = 0;\n\n if (cells.length > count) {\n cells.splice(count);\n } else {\n while (cells.length < count) {\n cells.push('');\n }\n }\n\n for (; i < cells.length; i++) {\n // leading or trailing whitespace is ignored per the gfm spec\n cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n }\n\n return cells;\n } // Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n // /c*$/ is vulnerable to REDOS.\n // invert: Remove suffix of non-c chars instead. Default falsey.\n\n\n function rtrim$1(str, c, invert) {\n var l = str.length;\n\n if (l === 0) {\n return '';\n } // Length of suffix matching the invert condition.\n\n\n var suffLen = 0; // Step left until we fail to match the invert condition.\n\n while (suffLen < l) {\n var currChar = str.charAt(l - suffLen - 1);\n\n if (currChar === c && !invert) {\n suffLen++;\n } else if (currChar !== c && invert) {\n suffLen++;\n } else {\n break;\n }\n }\n\n return str.substr(0, l - suffLen);\n }\n\n function findClosingBracket$1(str, b) {\n if (str.indexOf(b[1]) === -1) {\n return -1;\n }\n\n var l = str.length;\n var level = 0,\n i = 0;\n\n for (; i < l; i++) {\n if (str[i] === '\\\\') {\n i++;\n } else if (str[i] === b[0]) {\n level++;\n } else if (str[i] === b[1]) {\n level--;\n\n if (level < 0) {\n return i;\n }\n }\n }\n\n return -1;\n }\n\n function checkSanitizeDeprecation$1(opt) {\n if (opt && opt.sanitize && !opt.silent) {\n console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options');\n }\n } // copied from https://stackoverflow.com/a/5450113/806777\n\n\n function repeatString$1(pattern, count) {\n if (count < 1) {\n return '';\n }\n\n var result = '';\n\n while (count > 1) {\n if (count & 1) {\n result += pattern;\n }\n\n count >>= 1;\n pattern += pattern;\n }\n\n return result + pattern;\n }\n\n var helpers = {\n escape: escape$2,\n unescape: unescape$1,\n edit: edit$1,\n cleanUrl: cleanUrl$1,\n resolveUrl: resolveUrl,\n noopTest: noopTest$1,\n merge: merge$2,\n splitCells: splitCells$1,\n rtrim: rtrim$1,\n findClosingBracket: findClosingBracket$1,\n checkSanitizeDeprecation: checkSanitizeDeprecation$1,\n repeatString: repeatString$1\n };\n\n var defaults$4 = defaults$5.defaults;\n var rtrim = helpers.rtrim,\n splitCells = helpers.splitCells,\n _escape = helpers.escape,\n findClosingBracket = helpers.findClosingBracket;\n\n function outputLink(cap, link, raw) {\n var href = link.href;\n var title = link.title ? _escape(link.title) : null;\n var text = cap[1].replace(/\\\\([\\[\\]])/g, '$1');\n\n if (cap[0].charAt(0) !== '!') {\n return {\n type: 'link',\n raw: raw,\n href: href,\n title: title,\n text: text\n };\n } else {\n return {\n type: 'image',\n raw: raw,\n href: href,\n title: title,\n text: _escape(text)\n };\n }\n }\n\n function indentCodeCompensation(raw, text) {\n var matchIndentToCode = raw.match(/^(\\s+)(?:```)/);\n\n if (matchIndentToCode === null) {\n return text;\n }\n\n var indentToCode = matchIndentToCode[1];\n return text.split('\\n').map(function (node) {\n var matchIndentInNode = node.match(/^\\s+/);\n\n if (matchIndentInNode === null) {\n return node;\n }\n\n var indentInNode = matchIndentInNode[0];\n\n if (indentInNode.length >= indentToCode.length) {\n return node.slice(indentToCode.length);\n }\n\n return node;\n }).join('\\n');\n }\n /**\n * Tokenizer\n */\n\n\n var Tokenizer_1 = /*#__PURE__*/function () {\n function Tokenizer(options) {\n this.options = options || defaults$4;\n }\n\n var _proto = Tokenizer.prototype;\n\n _proto.space = function space(src) {\n var cap = this.rules.block.newline.exec(src);\n\n if (cap) {\n if (cap[0].length > 1) {\n return {\n type: 'space',\n raw: cap[0]\n };\n }\n\n return {\n raw: '\\n'\n };\n }\n };\n\n _proto.code = function code(src) {\n var cap = this.rules.block.code.exec(src);\n\n if (cap) {\n var text = cap[0].replace(/^ {1,4}/gm, '');\n return {\n type: 'code',\n raw: cap[0],\n codeBlockStyle: 'indented',\n text: !this.options.pedantic ? rtrim(text, '\\n') : text\n };\n }\n };\n\n _proto.fences = function fences(src) {\n var cap = this.rules.block.fences.exec(src);\n\n if (cap) {\n var raw = cap[0];\n var text = indentCodeCompensation(raw, cap[3] || '');\n return {\n type: 'code',\n raw: raw,\n lang: cap[2] ? cap[2].trim() : cap[2],\n text: text\n };\n }\n };\n\n _proto.heading = function heading(src) {\n var cap = this.rules.block.heading.exec(src);\n\n if (cap) {\n var text = cap[2].trim(); // remove trailing #s\n\n if (/#$/.test(text)) {\n var trimmed = rtrim(text, '#');\n\n if (this.options.pedantic) {\n text = trimmed.trim();\n } else if (!trimmed || / $/.test(trimmed)) {\n // CommonMark requires space before trailing #s\n text = trimmed.trim();\n }\n }\n\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[1].length,\n text: text\n };\n }\n };\n\n _proto.nptable = function nptable(src) {\n var cap = this.rules.block.nptable.exec(src);\n\n if (cap) {\n var item = {\n type: 'table',\n header: splitCells(cap[1].replace(/^ *| *\\| *$/g, '')),\n align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n cells: cap[3] ? cap[3].replace(/\\n$/, '').split('\\n') : [],\n raw: cap[0]\n };\n\n if (item.header.length === item.align.length) {\n var l = item.align.length;\n var i;\n\n for (i = 0; i < l; i++) {\n if (/^ *-+: *$/.test(item.align[i])) {\n item.align[i] = 'right';\n } else if (/^ *:-+: *$/.test(item.align[i])) {\n item.align[i] = 'center';\n } else if (/^ *:-+ *$/.test(item.align[i])) {\n item.align[i] = 'left';\n } else {\n item.align[i] = null;\n }\n }\n\n l = item.cells.length;\n\n for (i = 0; i < l; i++) {\n item.cells[i] = splitCells(item.cells[i], item.header.length);\n }\n\n return item;\n }\n }\n };\n\n _proto.hr = function hr(src) {\n var cap = this.rules.block.hr.exec(src);\n\n if (cap) {\n return {\n type: 'hr',\n raw: cap[0]\n };\n }\n };\n\n _proto.blockquote = function blockquote(src) {\n var cap = this.rules.block.blockquote.exec(src);\n\n if (cap) {\n var text = cap[0].replace(/^ *> ?/gm, '');\n return {\n type: 'blockquote',\n raw: cap[0],\n text: text\n };\n }\n };\n\n _proto.list = function list(src) {\n var cap = this.rules.block.list.exec(src);\n\n if (cap) {\n var raw = cap[0];\n var bull = cap[2];\n var isordered = bull.length > 1;\n var list = {\n type: 'list',\n raw: raw,\n ordered: isordered,\n start: isordered ? +bull.slice(0, -1) : '',\n loose: false,\n items: []\n }; // Get each top-level item.\n\n var itemMatch = cap[0].match(this.rules.block.item);\n var next = false,\n item,\n space,\n bcurr,\n bnext,\n addBack,\n loose,\n istask,\n ischecked,\n endMatch;\n var l = itemMatch.length;\n bcurr = this.rules.block.listItemStart.exec(itemMatch[0]);\n\n for (var i = 0; i < l; i++) {\n item = itemMatch[i];\n raw = item;\n\n if (!this.options.pedantic) {\n // Determine if current item contains the end of the list\n endMatch = item.match(new RegExp('\\\\n\\\\s*\\\\n {0,' + (bcurr[0].length - 1) + '}\\\\S'));\n\n if (endMatch) {\n addBack = item.length - endMatch.index + itemMatch.slice(i + 1).join('\\n').length;\n list.raw = list.raw.substring(0, list.raw.length - addBack);\n item = item.substring(0, endMatch.index);\n raw = item;\n l = i + 1;\n }\n } // Determine whether the next list item belongs here.\n // Backpedal if it does not belong in this list.\n\n\n if (i !== l - 1) {\n bnext = this.rules.block.listItemStart.exec(itemMatch[i + 1]);\n\n if (!this.options.pedantic ? bnext[1].length >= bcurr[0].length || bnext[1].length > 3 : bnext[1].length > bcurr[1].length) {\n // nested list or continuation\n itemMatch.splice(i, 2, itemMatch[i] + (!this.options.pedantic && bnext[1].length < bcurr[0].length && !itemMatch[i].match(/\\n$/) ? '' : '\\n') + itemMatch[i + 1]);\n i--;\n l--;\n continue;\n } else if ( // different bullet style\n !this.options.pedantic || this.options.smartLists ? bnext[2][bnext[2].length - 1] !== bull[bull.length - 1] : isordered === (bnext[2].length === 1)) {\n addBack = itemMatch.slice(i + 1).join('\\n').length;\n list.raw = list.raw.substring(0, list.raw.length - addBack);\n i = l - 1;\n }\n\n bcurr = bnext;\n } // Remove the list item's bullet\n // so it is seen as the next token.\n\n\n space = item.length;\n item = item.replace(/^ *([*+-]|\\d+[.)]) ?/, ''); // Outdent whatever the\n // list item contains. Hacky.\n\n if (~item.indexOf('\\n ')) {\n space -= item.length;\n item = !this.options.pedantic ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') : item.replace(/^ {1,4}/gm, '');\n } // trim item newlines at end\n\n\n item = rtrim(item, '\\n');\n\n if (i !== l - 1) {\n raw = raw + '\\n';\n } // Determine whether item is loose or not.\n // Use: /(^|\\n)(?! )[^\\n]+\\n\\n(?!\\s*$)/\n // for discount behavior.\n\n\n loose = next || /\\n\\n(?!\\s*$)/.test(raw);\n\n if (i !== l - 1) {\n next = raw.slice(-2) === '\\n\\n';\n if (!loose) loose = next;\n }\n\n if (loose) {\n list.loose = true;\n } // Check for task list items\n\n\n if (this.options.gfm) {\n istask = /^\\[[ xX]\\] /.test(item);\n ischecked = undefined;\n\n if (istask) {\n ischecked = item[1] !== ' ';\n item = item.replace(/^\\[[ xX]\\] +/, '');\n }\n }\n\n list.items.push({\n type: 'list_item',\n raw: raw,\n task: istask,\n checked: ischecked,\n loose: loose,\n text: item\n });\n }\n\n return list;\n }\n };\n\n _proto.html = function html(src) {\n var cap = this.rules.block.html.exec(src);\n\n if (cap) {\n return {\n type: this.options.sanitize ? 'paragraph' : 'html',\n raw: cap[0],\n pre: !this.options.sanitizer && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),\n text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0]\n };\n }\n };\n\n _proto.def = function def(src) {\n var cap = this.rules.block.def.exec(src);\n\n if (cap) {\n if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1);\n var tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n return {\n type: 'def',\n tag: tag,\n raw: cap[0],\n href: cap[2],\n title: cap[3]\n };\n }\n };\n\n _proto.table = function table(src) {\n var cap = this.rules.block.table.exec(src);\n\n if (cap) {\n var item = {\n type: 'table',\n header: splitCells(cap[1].replace(/^ *| *\\| *$/g, '')),\n align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n cells: cap[3] ? cap[3].replace(/\\n$/, '').split('\\n') : []\n };\n\n if (item.header.length === item.align.length) {\n item.raw = cap[0];\n var l = item.align.length;\n var i;\n\n for (i = 0; i < l; i++) {\n if (/^ *-+: *$/.test(item.align[i])) {\n item.align[i] = 'right';\n } else if (/^ *:-+: *$/.test(item.align[i])) {\n item.align[i] = 'center';\n } else if (/^ *:-+ *$/.test(item.align[i])) {\n item.align[i] = 'left';\n } else {\n item.align[i] = null;\n }\n }\n\n l = item.cells.length;\n\n for (i = 0; i < l; i++) {\n item.cells[i] = splitCells(item.cells[i].replace(/^ *\\| *| *\\| *$/g, ''), item.header.length);\n }\n\n return item;\n }\n }\n };\n\n _proto.lheading = function lheading(src) {\n var cap = this.rules.block.lheading.exec(src);\n\n if (cap) {\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[2].charAt(0) === '=' ? 1 : 2,\n text: cap[1]\n };\n }\n };\n\n _proto.paragraph = function paragraph(src) {\n var cap = this.rules.block.paragraph.exec(src);\n\n if (cap) {\n return {\n type: 'paragraph',\n raw: cap[0],\n text: cap[1].charAt(cap[1].length - 1) === '\\n' ? cap[1].slice(0, -1) : cap[1]\n };\n }\n };\n\n _proto.text = function text(src) {\n var cap = this.rules.block.text.exec(src);\n\n if (cap) {\n return {\n type: 'text',\n raw: cap[0],\n text: cap[0]\n };\n }\n };\n\n _proto.escape = function escape(src) {\n var cap = this.rules.inline.escape.exec(src);\n\n if (cap) {\n return {\n type: 'escape',\n raw: cap[0],\n text: _escape(cap[1])\n };\n }\n };\n\n _proto.tag = function tag(src, inLink, inRawBlock) {\n var cap = this.rules.inline.tag.exec(src);\n\n if (cap) {\n if (!inLink && /^/i.test(cap[0])) {\n inLink = false;\n }\n\n if (!inRawBlock && /^<(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n inRawBlock = true;\n } else if (inRawBlock && /^<\\/(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n inRawBlock = false;\n }\n\n return {\n type: this.options.sanitize ? 'text' : 'html',\n raw: cap[0],\n inLink: inLink,\n inRawBlock: inRawBlock,\n text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0]\n };\n }\n };\n\n _proto.link = function link(src) {\n var cap = this.rules.inline.link.exec(src);\n\n if (cap) {\n var trimmedUrl = cap[2].trim();\n\n if (!this.options.pedantic && /^$/.test(trimmedUrl)) {\n return;\n } // ending angle bracket cannot be escaped\n\n\n var rtrimSlash = rtrim(trimmedUrl.slice(0, -1), '\\\\');\n\n if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {\n return;\n }\n } else {\n // find closing parenthesis\n var lastParenIndex = findClosingBracket(cap[2], '()');\n\n if (lastParenIndex > -1) {\n var start = cap[0].indexOf('!') === 0 ? 5 : 4;\n var linkLen = start + cap[1].length + lastParenIndex;\n cap[2] = cap[2].substring(0, lastParenIndex);\n cap[0] = cap[0].substring(0, linkLen).trim();\n cap[3] = '';\n }\n }\n\n var href = cap[2];\n var title = '';\n\n if (this.options.pedantic) {\n // split pedantic href and title\n var link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n\n if (link) {\n href = link[1];\n title = link[3];\n }\n } else {\n title = cap[3] ? cap[3].slice(1, -1) : '';\n }\n\n href = href.trim();\n\n if (/^$/.test(trimmedUrl)) {\n // pedantic allows starting angle bracket without ending angle bracket\n href = href.slice(1);\n } else {\n href = href.slice(1, -1);\n }\n }\n\n return outputLink(cap, {\n href: href ? href.replace(this.rules.inline._escapes, '$1') : href,\n title: title ? title.replace(this.rules.inline._escapes, '$1') : title\n }, cap[0]);\n }\n };\n\n _proto.reflink = function reflink(src, links) {\n var cap;\n\n if ((cap = this.rules.inline.reflink.exec(src)) || (cap = this.rules.inline.nolink.exec(src))) {\n var link = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n link = links[link.toLowerCase()];\n\n if (!link || !link.href) {\n var text = cap[0].charAt(0);\n return {\n type: 'text',\n raw: text,\n text: text\n };\n }\n\n return outputLink(cap, link, cap[0]);\n }\n };\n\n _proto.emStrong = function emStrong(src, maskedSrc, prevChar) {\n if (prevChar === void 0) {\n prevChar = '';\n }\n\n var match = this.rules.inline.emStrong.lDelim.exec(src);\n if (!match) return;\n if (match[3] && prevChar.match(/(?:[0-9A-Za-z\\xAA\\xB2\\xB3\\xB5\\xB9\\xBA\\xBC-\\xBE\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u0660-\\u0669\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07C0-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08C7\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0966-\\u096F\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09E6-\\u09F1\\u09F4-\\u09F9\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A6F\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AE6-\\u0AEF\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B66-\\u0B6F\\u0B71-\\u0B77\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0BE6-\\u0BF2\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C66-\\u0C6F\\u0C78-\\u0C7E\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D58-\\u0D61\\u0D66-\\u0D78\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DE6-\\u0DEF\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F20-\\u0F33\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F-\\u1049\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u1090-\\u1099\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1369-\\u137C\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u17E0-\\u17E9\\u17F0-\\u17F9\\u1810-\\u1819\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B50-\\u1B59\\u1B83-\\u1BA0\\u1BAE-\\u1BE5\\u1C00-\\u1C23\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2070\\u2071\\u2074-\\u2079\\u207F-\\u2089\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2150-\\u2189\\u2460-\\u249B\\u24EA-\\u24FF\\u2776-\\u2793\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2CFD\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u3192-\\u3195\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3220-\\u3229\\u3248-\\u324F\\u3251-\\u325F\\u3280-\\u3289\\u32B1-\\u32BF\\u3400-\\u4DBF\\u4E00-\\u9FFC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7BF\\uA7C2-\\uA7CA\\uA7F5-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA830-\\uA835\\uA840-\\uA873\\uA882-\\uA8B3\\uA8D0-\\uA8D9\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA900-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF-\\uA9D9\\uA9E0-\\uA9E4\\uA9E6-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDD07-\\uDD33\\uDD40-\\uDD78\\uDD8A\\uDD8B\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDEE1-\\uDEFB\\uDF00-\\uDF23\\uDF2D-\\uDF4A\\uDF50-\\uDF75\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\uDCA0-\\uDCA9\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC58-\\uDC76\\uDC79-\\uDC9E\\uDCA7-\\uDCAF\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDCFB-\\uDD1B\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBC-\\uDDCF\\uDDD2-\\uDE00\\uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE40-\\uDE48\\uDE60-\\uDE7E\\uDE80-\\uDE9F\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDEEB-\\uDEEF\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF58-\\uDF72\\uDF78-\\uDF91\\uDFA9-\\uDFAF]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDCFA-\\uDD23\\uDD30-\\uDD39\\uDE60-\\uDE7E\\uDE80-\\uDEA9\\uDEB0\\uDEB1\\uDF00-\\uDF27\\uDF30-\\uDF45\\uDF51-\\uDF54\\uDFB0-\\uDFCB\\uDFE0-\\uDFF6]|\\uD804[\\uDC03-\\uDC37\\uDC52-\\uDC6F\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDCF0-\\uDCF9\\uDD03-\\uDD26\\uDD36-\\uDD3F\\uDD44\\uDD47\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDD0-\\uDDDA\\uDDDC\\uDDE1-\\uDDF4\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDEF0-\\uDEF9\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC50-\\uDC59\\uDC5F-\\uDC61\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDCD0-\\uDCD9\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE50-\\uDE59\\uDE80-\\uDEAA\\uDEB8\\uDEC0-\\uDEC9\\uDF00-\\uDF1A\\uDF30-\\uDF3B]|\\uD806[\\uDC00-\\uDC2B\\uDCA0-\\uDCF2\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD2F\\uDD3F\\uDD41\\uDD50-\\uDD59\\uDDA0-\\uDDA7\\uDDAA-\\uDDD0\\uDDE1\\uDDE3\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE89\\uDE9D\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC50-\\uDC6C\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD50-\\uDD59\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDDA0-\\uDDA9\\uDEE0-\\uDEF2\\uDFB0\\uDFC0-\\uDFD4]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE60-\\uDE69\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF50-\\uDF59\\uDF5B-\\uDF61\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE96\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82C[\\uDC00-\\uDD1E\\uDD50-\\uDD52\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD834[\\uDEE0-\\uDEF3\\uDF60-\\uDF78]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB\\uDFCE-\\uDFFF]|\\uD838[\\uDD00-\\uDD2C\\uDD37-\\uDD3D\\uDD40-\\uDD49\\uDD4E\\uDEC0-\\uDEEB\\uDEF0-\\uDEF9]|\\uD83A[\\uDC00-\\uDCC4\\uDCC7-\\uDCCF\\uDD00-\\uDD43\\uDD4B\\uDD50-\\uDD59]|\\uD83B[\\uDC71-\\uDCAB\\uDCAD-\\uDCAF\\uDCB1-\\uDCB4\\uDD01-\\uDD2D\\uDD2F-\\uDD3D\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD83C[\\uDD00-\\uDD0C]|\\uD83E[\\uDFF0-\\uDFF9]|\\uD869[\\uDC00-\\uDEDD\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A])/)) return; // _ can't be between two alphanumerics. \\p{L}\\p{N} includes non-english alphabet/numbers as well\n\n var nextChar = match[1] || match[2] || '';\n\n if (!nextChar || nextChar && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar))) {\n var lLength = match[0].length - 1;\n var rDelim,\n rLength,\n delimTotal = lLength,\n midDelimTotal = 0;\n var endReg = match[0][0] === '*' ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;\n endReg.lastIndex = 0;\n maskedSrc = maskedSrc.slice(-1 * src.length + lLength); // Bump maskedSrc to same section of string as src (move to lexer?)\n\n while ((match = endReg.exec(maskedSrc)) != null) {\n rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];\n if (!rDelim) continue; // matched the first alternative in rules.js (skip the * in __abc*abc__)\n\n rLength = rDelim.length;\n\n if (match[3] || match[4]) {\n // found another Left Delim\n delimTotal += rLength;\n continue;\n } else if (match[5] || match[6]) {\n // either Left or Right Delim\n if (lLength % 3 && !((lLength + rLength) % 3)) {\n midDelimTotal += rLength;\n continue; // CommonMark Emphasis Rules 9-10\n }\n }\n\n delimTotal -= rLength;\n if (delimTotal > 0) continue; // Haven't found enough closing delimiters\n // If this is the last rDelimiter, remove extra characters. *a*** -> *a*\n\n if (delimTotal + midDelimTotal - rLength <= 0 && !maskedSrc.slice(endReg.lastIndex).match(endReg)) {\n rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);\n }\n\n if (Math.min(lLength, rLength) % 2) {\n return {\n type: 'em',\n raw: src.slice(0, lLength + match.index + rLength + 1),\n text: src.slice(1, lLength + match.index + rLength)\n };\n }\n\n if (Math.min(lLength, rLength) % 2 === 0) {\n return {\n type: 'strong',\n raw: src.slice(0, lLength + match.index + rLength + 1),\n text: src.slice(2, lLength + match.index + rLength - 1)\n };\n }\n }\n }\n };\n\n _proto.codespan = function codespan(src) {\n var cap = this.rules.inline.code.exec(src);\n\n if (cap) {\n var text = cap[2].replace(/\\n/g, ' ');\n var hasNonSpaceChars = /[^ ]/.test(text);\n var hasSpaceCharsOnBothEnds = /^ /.test(text) && / $/.test(text);\n\n if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {\n text = text.substring(1, text.length - 1);\n }\n\n text = _escape(text, true);\n return {\n type: 'codespan',\n raw: cap[0],\n text: text\n };\n }\n };\n\n _proto.br = function br(src) {\n var cap = this.rules.inline.br.exec(src);\n\n if (cap) {\n return {\n type: 'br',\n raw: cap[0]\n };\n }\n };\n\n _proto.del = function del(src) {\n var cap = this.rules.inline.del.exec(src);\n\n if (cap) {\n return {\n type: 'del',\n raw: cap[0],\n text: cap[2]\n };\n }\n };\n\n _proto.autolink = function autolink(src, mangle) {\n var cap = this.rules.inline.autolink.exec(src);\n\n if (cap) {\n var text, href;\n\n if (cap[2] === '@') {\n text = _escape(this.options.mangle ? mangle(cap[1]) : cap[1]);\n href = 'mailto:' + text;\n } else {\n text = _escape(cap[1]);\n href = text;\n }\n\n return {\n type: 'link',\n raw: cap[0],\n text: text,\n href: href,\n tokens: [{\n type: 'text',\n raw: text,\n text: text\n }]\n };\n }\n };\n\n _proto.url = function url(src, mangle) {\n var cap;\n\n if (cap = this.rules.inline.url.exec(src)) {\n var text, href;\n\n if (cap[2] === '@') {\n text = _escape(this.options.mangle ? mangle(cap[0]) : cap[0]);\n href = 'mailto:' + text;\n } else {\n // do extended autolink path validation\n var prevCapZero;\n\n do {\n prevCapZero = cap[0];\n cap[0] = this.rules.inline._backpedal.exec(cap[0])[0];\n } while (prevCapZero !== cap[0]);\n\n text = _escape(cap[0]);\n\n if (cap[1] === 'www.') {\n href = 'http://' + text;\n } else {\n href = text;\n }\n }\n\n return {\n type: 'link',\n raw: cap[0],\n text: text,\n href: href,\n tokens: [{\n type: 'text',\n raw: text,\n text: text\n }]\n };\n }\n };\n\n _proto.inlineText = function inlineText(src, inRawBlock, smartypants) {\n var cap = this.rules.inline.text.exec(src);\n\n if (cap) {\n var text;\n\n if (inRawBlock) {\n text = this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : _escape(cap[0]) : cap[0];\n } else {\n text = _escape(this.options.smartypants ? smartypants(cap[0]) : cap[0]);\n }\n\n return {\n type: 'text',\n raw: cap[0],\n text: text\n };\n }\n };\n\n return Tokenizer;\n }();\n\n var noopTest = helpers.noopTest,\n edit = helpers.edit,\n merge$1 = helpers.merge;\n /**\n * Block-Level Grammar\n */\n\n var block$1 = {\n newline: /^(?: *(?:\\n|$))+/,\n code: /^( {4}[^\\n]+(?:\\n(?: *(?:\\n|$))*)?)+/,\n fences: /^ {0,3}(`{3,}(?=[^`\\n]*\\n)|~{3,})([^\\n]*)\\n(?:|([\\s\\S]*?)\\n)(?: {0,3}\\1[~`]* *(?:\\n+|$)|$)/,\n hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)/,\n heading: /^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,\n blockquote: /^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/,\n list: /^( {0,3})(bull) [\\s\\S]+?(?:hr|def|\\n{2,}(?! )(?! {0,3}bull )\\n*|\\s*$)/,\n html: '^ {0,3}(?:' // optional indentation\n + '<(script|pre|style)[\\\\s>][\\\\s\\\\S]*?(?:[^\\\\n]*\\\\n+|$)' // (1)\n + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n + '|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)' // (3)\n + '|\\\\n*|$)' // (4)\n + '|\\\\n*|$)' // (5)\n + '|)[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (6)\n + '|<(?!script|pre|style)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (7) open tag\n + '|(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:\\\\n{2,}|$)' // (7) closing tag\n + ')',\n def: /^ {0,3}\\[(label)\\]: *\\n? *]+)>?(?:(?: +\\n? *| *\\n *)(title))? *(?:\\n+|$)/,\n nptable: noopTest,\n table: noopTest,\n lheading: /^([^\\n]+)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n // regex template, placeholders will be replaced according to different paragraph\n // interruption rules of commonmark and the original markdown spec:\n _paragraph: /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html| +\\n)[^\\n]+)*)/,\n text: /^[^\\n]+/\n };\n block$1._label = /(?!\\s*\\])(?:\\\\[\\[\\]]|[^\\[\\]])+/;\n block$1._title = /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/;\n block$1.def = edit(block$1.def).replace('label', block$1._label).replace('title', block$1._title).getRegex();\n block$1.bullet = /(?:[*+-]|\\d{1,9}[.)])/;\n block$1.item = /^( *)(bull) ?[^\\n]*(?:\\n(?! *bull ?)[^\\n]*)*/;\n block$1.item = edit(block$1.item, 'gm').replace(/bull/g, block$1.bullet).getRegex();\n block$1.listItemStart = edit(/^( *)(bull) */).replace('bull', block$1.bullet).getRegex();\n block$1.list = edit(block$1.list).replace(/bull/g, block$1.bullet).replace('hr', '\\\\n+(?=\\\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$))').replace('def', '\\\\n+(?=' + block$1.def.source + ')').getRegex();\n block$1._tag = 'address|article|aside|base|basefont|blockquote|body|caption' + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' + '|track|ul';\n block$1._comment = /|$)/;\n block$1.html = edit(block$1.html, 'i').replace('comment', block$1._comment).replace('tag', block$1._tag).replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/).getRegex();\n block$1.paragraph = edit(block$1._paragraph).replace('hr', block$1.hr).replace('heading', ' {0,3}#{1,6} ').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n .replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|!--)').replace('tag', block$1._tag) // pars can be interrupted by type (6) html blocks\n .getRegex();\n block$1.blockquote = edit(block$1.blockquote).replace('paragraph', block$1.paragraph).getRegex();\n /**\n * Normal Block Grammar\n */\n\n block$1.normal = merge$1({}, block$1);\n /**\n * GFM Block Grammar\n */\n\n block$1.gfm = merge$1({}, block$1.normal, {\n nptable: '^ *([^|\\\\n ].*\\\\|.*)\\\\n' // Header\n + ' {0,3}([-:]+ *\\\\|[-| :]*)' // Align\n + '(?:\\\\n((?:(?!\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)',\n // Cells\n table: '^ *\\\\|(.+)\\\\n' // Header\n + ' {0,3}\\\\|?( *[-:]+[-| :]*)' // Align\n + '(?:\\\\n *((?:(?!\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)' // Cells\n\n });\n block$1.gfm.nptable = edit(block$1.gfm.nptable).replace('hr', block$1.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|!--)').replace('tag', block$1._tag) // tables can be interrupted by type (6) html blocks\n .getRegex();\n block$1.gfm.table = edit(block$1.gfm.table).replace('hr', block$1.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|!--)').replace('tag', block$1._tag) // tables can be interrupted by type (6) html blocks\n .getRegex();\n /**\n * Pedantic grammar (original John Gruber's loose markdown specification)\n */\n\n block$1.pedantic = merge$1({}, block$1.normal, {\n html: edit('^ *(?:comment *(?:\\\\n|\\\\s*$)' + '|<(tag)[\\\\s\\\\S]+? *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n + '|\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))').replace('comment', block$1._comment).replace(/tag/g, '(?!(?:' + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub' + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)' + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b').getRegex(),\n def: /^ *\\[([^\\]]+)\\]: *]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,\n heading: /^(#{1,6})(.*)(?:\\n+|$)/,\n fences: noopTest,\n // fences not supported\n paragraph: edit(block$1.normal._paragraph).replace('hr', block$1.hr).replace('heading', ' *#{1,6} *[^\\n]').replace('lheading', block$1.lheading).replace('blockquote', ' {0,3}>').replace('|fences', '').replace('|list', '').replace('|html', '').getRegex()\n });\n /**\n * Inline-Level Grammar\n */\n\n var inline$1 = {\n escape: /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,\n autolink: /^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/,\n url: noopTest,\n tag: '^comment' + '|^' // self-closing tag\n + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. \n + '|^' // declaration, e.g. \n + '|^',\n // CDATA section\n link: /^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/,\n reflink: /^!?\\[(label)\\]\\[(?!\\s*\\])((?:\\\\[\\[\\]]?|[^\\[\\]\\\\])+)\\]/,\n nolink: /^!?\\[(?!\\s*\\])((?:\\[[^\\[\\]]*\\]|\\\\[\\[\\]]|[^\\[\\]])*)\\](?:\\[\\])?/,\n reflinkSearch: 'reflink|nolink(?!\\\\()',\n emStrong: {\n lDelim: /^(?:\\*+(?:([punct_])|[^\\s*]))|^_+(?:([punct*])|([^\\s_]))/,\n // (1) and (2) can only be a Right Delimiter. (3) and (4) can only be Left. (5) and (6) can be either Left or Right.\n // () Skip other delimiter (1) #*** (2) a***#, a*** (3) #***a, ***a (4) ***# (5) #***# (6) a***a\n rDelimAst: /\\_\\_[^_]*?\\*[^_]*?\\_\\_|[punct_](\\*+)(?=[\\s]|$)|[^punct*_\\s](\\*+)(?=[punct_\\s]|$)|[punct_\\s](\\*+)(?=[^punct*_\\s])|[\\s](\\*+)(?=[punct_])|[punct_](\\*+)(?=[punct_])|[^punct*_\\s](\\*+)(?=[^punct*_\\s])/,\n rDelimUnd: /\\*\\*[^*]*?\\_[^*]*?\\*\\*|[punct*](\\_+)(?=[\\s]|$)|[^punct*_\\s](\\_+)(?=[punct*\\s]|$)|[punct*\\s](\\_+)(?=[^punct*_\\s])|[\\s](\\_+)(?=[punct*])|[punct*](\\_+)(?=[punct*])/ // ^- Not allowed for _\n\n },\n code: /^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,\n br: /^( {2,}|\\\\)\\n(?!\\s*$)/,\n del: noopTest,\n text: /^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\?@\\\\[\\\\]`^{|}~';\n inline$1.punctuation = edit(inline$1.punctuation).replace(/punctuation/g, inline$1._punctuation).getRegex(); // sequences em should skip over [title](link), `code`, \n\n inline$1.blockSkip = /\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>/g;\n inline$1.escapedEmSt = /\\\\\\*|\\\\_/g;\n inline$1._comment = edit(block$1._comment).replace('(?:-->|$)', '-->').getRegex();\n inline$1.emStrong.lDelim = edit(inline$1.emStrong.lDelim).replace(/punct/g, inline$1._punctuation).getRegex();\n inline$1.emStrong.rDelimAst = edit(inline$1.emStrong.rDelimAst, 'g').replace(/punct/g, inline$1._punctuation).getRegex();\n inline$1.emStrong.rDelimUnd = edit(inline$1.emStrong.rDelimUnd, 'g').replace(/punct/g, inline$1._punctuation).getRegex();\n inline$1._escapes = /\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/g;\n inline$1._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;\n inline$1._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;\n inline$1.autolink = edit(inline$1.autolink).replace('scheme', inline$1._scheme).replace('email', inline$1._email).getRegex();\n inline$1._attribute = /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/;\n inline$1.tag = edit(inline$1.tag).replace('comment', inline$1._comment).replace('attribute', inline$1._attribute).getRegex();\n inline$1._label = /(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/;\n inline$1._href = /<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/;\n inline$1._title = /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/;\n inline$1.link = edit(inline$1.link).replace('label', inline$1._label).replace('href', inline$1._href).replace('title', inline$1._title).getRegex();\n inline$1.reflink = edit(inline$1.reflink).replace('label', inline$1._label).getRegex();\n inline$1.reflinkSearch = edit(inline$1.reflinkSearch, 'g').replace('reflink', inline$1.reflink).replace('nolink', inline$1.nolink).getRegex();\n /**\n * Normal Inline Grammar\n */\n\n inline$1.normal = merge$1({}, inline$1);\n /**\n * Pedantic Inline Grammar\n */\n\n inline$1.pedantic = merge$1({}, inline$1.normal, {\n strong: {\n start: /^__|\\*\\*/,\n middle: /^__(?=\\S)([\\s\\S]*?\\S)__(?!_)|^\\*\\*(?=\\S)([\\s\\S]*?\\S)\\*\\*(?!\\*)/,\n endAst: /\\*\\*(?!\\*)/g,\n endUnd: /__(?!_)/g\n },\n em: {\n start: /^_|\\*/,\n middle: /^()\\*(?=\\S)([\\s\\S]*?\\S)\\*(?!\\*)|^_(?=\\S)([\\s\\S]*?\\S)_(?!_)/,\n endAst: /\\*(?!\\*)/g,\n endUnd: /_(?!_)/g\n },\n link: edit(/^!?\\[(label)\\]\\((.*?)\\)/).replace('label', inline$1._label).getRegex(),\n reflink: edit(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace('label', inline$1._label).getRegex()\n });\n /**\n * GFM Inline Grammar\n */\n\n inline$1.gfm = merge$1({}, inline$1.normal, {\n escape: edit(inline$1.escape).replace('])', '~|])').getRegex(),\n _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,\n url: /^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/,\n _backpedal: /(?:[^?!.,:;*_~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,\n del: /^(~~?)(?=[^\\s~])([\\s\\S]*?[^\\s~])\\1(?=[^~]|$)/,\n text: /^([`~]+|[^`~])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\ 0.5) {\n ch = 'x' + ch.toString(16);\n }\n\n out += '&#' + ch + ';';\n }\n\n return out;\n }\n /**\n * Block Lexer\n */\n\n\n var Lexer_1 = /*#__PURE__*/function () {\n function Lexer(options) {\n this.tokens = [];\n this.tokens.links = Object.create(null);\n this.options = options || defaults$3;\n this.options.tokenizer = this.options.tokenizer || new Tokenizer_1();\n this.tokenizer = this.options.tokenizer;\n this.tokenizer.options = this.options;\n var rules = {\n block: block.normal,\n inline: inline.normal\n };\n\n if (this.options.pedantic) {\n rules.block = block.pedantic;\n rules.inline = inline.pedantic;\n } else if (this.options.gfm) {\n rules.block = block.gfm;\n\n if (this.options.breaks) {\n rules.inline = inline.breaks;\n } else {\n rules.inline = inline.gfm;\n }\n }\n\n this.tokenizer.rules = rules;\n }\n /**\n * Expose Rules\n */\n\n\n /**\n * Static Lex Method\n */\n Lexer.lex = function lex(src, options) {\n var lexer = new Lexer(options);\n return lexer.lex(src);\n }\n /**\n * Static Lex Inline Method\n */\n ;\n\n Lexer.lexInline = function lexInline(src, options) {\n var lexer = new Lexer(options);\n return lexer.inlineTokens(src);\n }\n /**\n * Preprocessing\n */\n ;\n\n var _proto = Lexer.prototype;\n\n _proto.lex = function lex(src) {\n src = src.replace(/\\r\\n|\\r/g, '\\n').replace(/\\t/g, ' ');\n this.blockTokens(src, this.tokens, true);\n this.inline(this.tokens);\n return this.tokens;\n }\n /**\n * Lexing\n */\n ;\n\n _proto.blockTokens = function blockTokens(src, tokens, top) {\n if (tokens === void 0) {\n tokens = [];\n }\n\n if (top === void 0) {\n top = true;\n }\n\n if (this.options.pedantic) {\n src = src.replace(/^ +$/gm, '');\n }\n\n var token, i, l, lastToken;\n\n while (src) {\n // newline\n if (token = this.tokenizer.space(src)) {\n src = src.substring(token.raw.length);\n\n if (token.type) {\n tokens.push(token);\n }\n\n continue;\n } // code\n\n\n if (token = this.tokenizer.code(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1]; // An indented code block cannot interrupt a paragraph.\n\n if (lastToken && lastToken.type === 'paragraph') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n } else {\n tokens.push(token);\n }\n\n continue;\n } // fences\n\n\n if (token = this.tokenizer.fences(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // heading\n\n\n if (token = this.tokenizer.heading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // table no leading pipe (gfm)\n\n\n if (token = this.tokenizer.nptable(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // hr\n\n\n if (token = this.tokenizer.hr(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // blockquote\n\n\n if (token = this.tokenizer.blockquote(src)) {\n src = src.substring(token.raw.length);\n token.tokens = this.blockTokens(token.text, [], top);\n tokens.push(token);\n continue;\n } // list\n\n\n if (token = this.tokenizer.list(src)) {\n src = src.substring(token.raw.length);\n l = token.items.length;\n\n for (i = 0; i < l; i++) {\n token.items[i].tokens = this.blockTokens(token.items[i].text, [], false);\n }\n\n tokens.push(token);\n continue;\n } // html\n\n\n if (token = this.tokenizer.html(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // def\n\n\n if (top && (token = this.tokenizer.def(src))) {\n src = src.substring(token.raw.length);\n\n if (!this.tokens.links[token.tag]) {\n this.tokens.links[token.tag] = {\n href: token.href,\n title: token.title\n };\n }\n\n continue;\n } // table (gfm)\n\n\n if (token = this.tokenizer.table(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // lheading\n\n\n if (token = this.tokenizer.lheading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // top-level paragraph\n\n\n if (top && (token = this.tokenizer.paragraph(src))) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // text\n\n\n if (token = this.tokenizer.text(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n } else {\n tokens.push(token);\n }\n\n continue;\n }\n\n if (src) {\n var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n\n return tokens;\n };\n\n _proto.inline = function inline(tokens) {\n var i, j, k, l2, row, token;\n var l = tokens.length;\n\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n switch (token.type) {\n case 'paragraph':\n case 'text':\n case 'heading':\n {\n token.tokens = [];\n this.inlineTokens(token.text, token.tokens);\n break;\n }\n\n case 'table':\n {\n token.tokens = {\n header: [],\n cells: []\n }; // header\n\n l2 = token.header.length;\n\n for (j = 0; j < l2; j++) {\n token.tokens.header[j] = [];\n this.inlineTokens(token.header[j], token.tokens.header[j]);\n } // cells\n\n\n l2 = token.cells.length;\n\n for (j = 0; j < l2; j++) {\n row = token.cells[j];\n token.tokens.cells[j] = [];\n\n for (k = 0; k < row.length; k++) {\n token.tokens.cells[j][k] = [];\n this.inlineTokens(row[k], token.tokens.cells[j][k]);\n }\n }\n\n break;\n }\n\n case 'blockquote':\n {\n this.inline(token.tokens);\n break;\n }\n\n case 'list':\n {\n l2 = token.items.length;\n\n for (j = 0; j < l2; j++) {\n this.inline(token.items[j].tokens);\n }\n\n break;\n }\n }\n }\n\n return tokens;\n }\n /**\n * Lexing/Compiling\n */\n ;\n\n _proto.inlineTokens = function inlineTokens(src, tokens, inLink, inRawBlock) {\n if (tokens === void 0) {\n tokens = [];\n }\n\n if (inLink === void 0) {\n inLink = false;\n }\n\n if (inRawBlock === void 0) {\n inRawBlock = false;\n }\n\n var token, lastToken; // String with links masked to avoid interference with em and strong\n\n var maskedSrc = src;\n var match;\n var keepPrevChar, prevChar; // Mask out reflinks\n\n if (this.tokens.links) {\n var links = Object.keys(this.tokens.links);\n\n if (links.length > 0) {\n while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {\n if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);\n }\n }\n }\n } // Mask out other blocks\n\n\n while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);\n } // Mask out escaped em & strong delimiters\n\n\n while ((match = this.tokenizer.rules.inline.escapedEmSt.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);\n }\n\n while (src) {\n if (!keepPrevChar) {\n prevChar = '';\n }\n\n keepPrevChar = false; // escape\n\n if (token = this.tokenizer.escape(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // tag\n\n\n if (token = this.tokenizer.tag(src, inLink, inRawBlock)) {\n src = src.substring(token.raw.length);\n inLink = token.inLink;\n inRawBlock = token.inRawBlock;\n var _lastToken = tokens[tokens.length - 1];\n\n if (_lastToken && token.type === 'text' && _lastToken.type === 'text') {\n _lastToken.raw += token.raw;\n _lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n\n continue;\n } // link\n\n\n if (token = this.tokenizer.link(src)) {\n src = src.substring(token.raw.length);\n\n if (token.type === 'link') {\n token.tokens = this.inlineTokens(token.text, [], true, inRawBlock);\n }\n\n tokens.push(token);\n continue;\n } // reflink, nolink\n\n\n if (token = this.tokenizer.reflink(src, this.tokens.links)) {\n src = src.substring(token.raw.length);\n var _lastToken2 = tokens[tokens.length - 1];\n\n if (token.type === 'link') {\n token.tokens = this.inlineTokens(token.text, [], true, inRawBlock);\n tokens.push(token);\n } else if (_lastToken2 && token.type === 'text' && _lastToken2.type === 'text') {\n _lastToken2.raw += token.raw;\n _lastToken2.text += token.text;\n } else {\n tokens.push(token);\n }\n\n continue;\n } // em & strong\n\n\n if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {\n src = src.substring(token.raw.length);\n token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock);\n tokens.push(token);\n continue;\n } // code\n\n\n if (token = this.tokenizer.codespan(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // br\n\n\n if (token = this.tokenizer.br(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // del (gfm)\n\n\n if (token = this.tokenizer.del(src)) {\n src = src.substring(token.raw.length);\n token.tokens = this.inlineTokens(token.text, [], inLink, inRawBlock);\n tokens.push(token);\n continue;\n } // autolink\n\n\n if (token = this.tokenizer.autolink(src, mangle)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // url (gfm)\n\n\n if (!inLink && (token = this.tokenizer.url(src, mangle))) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n } // text\n\n\n if (token = this.tokenizer.inlineText(src, inRawBlock, smartypants)) {\n src = src.substring(token.raw.length);\n\n if (token.raw.slice(-1) !== '_') {\n // Track prevChar before string of ____ started\n prevChar = token.raw.slice(-1);\n }\n\n keepPrevChar = true;\n lastToken = tokens[tokens.length - 1];\n\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n\n continue;\n }\n\n if (src) {\n var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n\n return tokens;\n };\n\n _createClass(Lexer, null, [{\n key: \"rules\",\n get: function get() {\n return {\n block: block,\n inline: inline\n };\n }\n }]);\n\n return Lexer;\n }();\n\n var defaults$2 = defaults$5.defaults;\n var cleanUrl = helpers.cleanUrl,\n escape$1 = helpers.escape;\n /**\n * Renderer\n */\n\n var Renderer_1 = /*#__PURE__*/function () {\n function Renderer(options) {\n this.options = options || defaults$2;\n }\n\n var _proto = Renderer.prototype;\n\n _proto.code = function code(_code, infostring, escaped) {\n var lang = (infostring || '').match(/\\S*/)[0];\n\n if (this.options.highlight) {\n var out = this.options.highlight(_code, lang);\n\n if (out != null && out !== _code) {\n escaped = true;\n _code = out;\n }\n }\n\n _code = _code.replace(/\\n$/, '') + '\\n';\n\n if (!lang) {\n return '
    ' + (escaped ? _code : escape$1(_code, true)) + '
    \\n';\n }\n\n return '
    ' + (escaped ? _code : escape$1(_code, true)) + '
    \\n';\n };\n\n _proto.blockquote = function blockquote(quote) {\n return '
    \\n' + quote + '
    \\n';\n };\n\n _proto.html = function html(_html) {\n return _html;\n };\n\n _proto.heading = function heading(text, level, raw, slugger) {\n if (this.options.headerIds) {\n return '' + text + '\\n';\n } // ignore IDs\n\n\n return '' + text + '\\n';\n };\n\n _proto.hr = function hr() {\n return this.options.xhtml ? '
    \\n' : '
    \\n';\n };\n\n _proto.list = function list(body, ordered, start) {\n var type = ordered ? 'ol' : 'ul',\n startatt = ordered && start !== 1 ? ' start=\"' + start + '\"' : '';\n return '<' + type + startatt + '>\\n' + body + '\\n';\n };\n\n _proto.listitem = function listitem(text) {\n return '
  • ' + text + '
  • \\n';\n };\n\n _proto.checkbox = function checkbox(checked) {\n return ' ';\n };\n\n _proto.paragraph = function paragraph(text) {\n return '

    ' + text + '

    \\n';\n };\n\n _proto.table = function table(header, body) {\n if (body) body = '' + body + '';\n return '\\n' + '\\n' + header + '\\n' + body + '
    \\n';\n };\n\n _proto.tablerow = function tablerow(content) {\n return '\\n' + content + '\\n';\n };\n\n _proto.tablecell = function tablecell(content, flags) {\n var type = flags.header ? 'th' : 'td';\n var tag = flags.align ? '<' + type + ' align=\"' + flags.align + '\">' : '<' + type + '>';\n return tag + content + '\\n';\n } // span level renderer\n ;\n\n _proto.strong = function strong(text) {\n return '' + text + '';\n };\n\n _proto.em = function em(text) {\n return '' + text + '';\n };\n\n _proto.codespan = function codespan(text) {\n return '' + text + '';\n };\n\n _proto.br = function br() {\n return this.options.xhtml ? '
    ' : '
    ';\n };\n\n _proto.del = function del(text) {\n return '' + text + '';\n };\n\n _proto.link = function link(href, title, text) {\n href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n\n if (href === null) {\n return text;\n }\n\n var out = '
    ';\n return out;\n };\n\n _proto.image = function image(href, title, text) {\n href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n\n if (href === null) {\n return text;\n }\n\n var out = '\"'' : '>';\n return out;\n };\n\n _proto.text = function text(_text) {\n return _text;\n };\n\n return Renderer;\n }();\n\n /**\n * TextRenderer\n * returns only the textual part of the token\n */\n var TextRenderer_1 = /*#__PURE__*/function () {\n function TextRenderer() {}\n\n var _proto = TextRenderer.prototype;\n\n // no need for block level renderers\n _proto.strong = function strong(text) {\n return text;\n };\n\n _proto.em = function em(text) {\n return text;\n };\n\n _proto.codespan = function codespan(text) {\n return text;\n };\n\n _proto.del = function del(text) {\n return text;\n };\n\n _proto.html = function html(text) {\n return text;\n };\n\n _proto.text = function text(_text) {\n return _text;\n };\n\n _proto.link = function link(href, title, text) {\n return '' + text;\n };\n\n _proto.image = function image(href, title, text) {\n return '' + text;\n };\n\n _proto.br = function br() {\n return '';\n };\n\n return TextRenderer;\n }();\n\n /**\n * Slugger generates header id\n */\n var Slugger_1 = /*#__PURE__*/function () {\n function Slugger() {\n this.seen = {};\n }\n\n var _proto = Slugger.prototype;\n\n _proto.serialize = function serialize(value) {\n return value.toLowerCase().trim() // remove html tags\n .replace(/<[!\\/a-z].*?>/ig, '') // remove unwanted chars\n .replace(/[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#$%&()*+,./:;<=>?@[\\]^`{|}~]/g, '').replace(/\\s/g, '-');\n }\n /**\n * Finds the next safe (unique) slug to use\n */\n ;\n\n _proto.getNextSafeSlug = function getNextSafeSlug(originalSlug, isDryRun) {\n var slug = originalSlug;\n var occurenceAccumulator = 0;\n\n if (this.seen.hasOwnProperty(slug)) {\n occurenceAccumulator = this.seen[originalSlug];\n\n do {\n occurenceAccumulator++;\n slug = originalSlug + '-' + occurenceAccumulator;\n } while (this.seen.hasOwnProperty(slug));\n }\n\n if (!isDryRun) {\n this.seen[originalSlug] = occurenceAccumulator;\n this.seen[slug] = 0;\n }\n\n return slug;\n }\n /**\n * Convert string to unique id\n * @param {object} options\n * @param {boolean} options.dryrun Generates the next unique slug without updating the internal accumulator.\n */\n ;\n\n _proto.slug = function slug(value, options) {\n if (options === void 0) {\n options = {};\n }\n\n var slug = this.serialize(value);\n return this.getNextSafeSlug(slug, options.dryrun);\n };\n\n return Slugger;\n }();\n\n var defaults$1 = defaults$5.defaults;\n var unescape = helpers.unescape;\n /**\n * Parsing & Compiling\n */\n\n var Parser_1 = /*#__PURE__*/function () {\n function Parser(options) {\n this.options = options || defaults$1;\n this.options.renderer = this.options.renderer || new Renderer_1();\n this.renderer = this.options.renderer;\n this.renderer.options = this.options;\n this.textRenderer = new TextRenderer_1();\n this.slugger = new Slugger_1();\n }\n /**\n * Static Parse Method\n */\n\n\n Parser.parse = function parse(tokens, options) {\n var parser = new Parser(options);\n return parser.parse(tokens);\n }\n /**\n * Static Parse Inline Method\n */\n ;\n\n Parser.parseInline = function parseInline(tokens, options) {\n var parser = new Parser(options);\n return parser.parseInline(tokens);\n }\n /**\n * Parse Loop\n */\n ;\n\n var _proto = Parser.prototype;\n\n _proto.parse = function parse(tokens, top) {\n if (top === void 0) {\n top = true;\n }\n\n var out = '',\n i,\n j,\n k,\n l2,\n l3,\n row,\n cell,\n header,\n body,\n token,\n ordered,\n start,\n loose,\n itemBody,\n item,\n checked,\n task,\n checkbox;\n var l = tokens.length;\n\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n switch (token.type) {\n case 'space':\n {\n continue;\n }\n\n case 'hr':\n {\n out += this.renderer.hr();\n continue;\n }\n\n case 'heading':\n {\n out += this.renderer.heading(this.parseInline(token.tokens), token.depth, unescape(this.parseInline(token.tokens, this.textRenderer)), this.slugger);\n continue;\n }\n\n case 'code':\n {\n out += this.renderer.code(token.text, token.lang, token.escaped);\n continue;\n }\n\n case 'table':\n {\n header = ''; // header\n\n cell = '';\n l2 = token.header.length;\n\n for (j = 0; j < l2; j++) {\n cell += this.renderer.tablecell(this.parseInline(token.tokens.header[j]), {\n header: true,\n align: token.align[j]\n });\n }\n\n header += this.renderer.tablerow(cell);\n body = '';\n l2 = token.cells.length;\n\n for (j = 0; j < l2; j++) {\n row = token.tokens.cells[j];\n cell = '';\n l3 = row.length;\n\n for (k = 0; k < l3; k++) {\n cell += this.renderer.tablecell(this.parseInline(row[k]), {\n header: false,\n align: token.align[k]\n });\n }\n\n body += this.renderer.tablerow(cell);\n }\n\n out += this.renderer.table(header, body);\n continue;\n }\n\n case 'blockquote':\n {\n body = this.parse(token.tokens);\n out += this.renderer.blockquote(body);\n continue;\n }\n\n case 'list':\n {\n ordered = token.ordered;\n start = token.start;\n loose = token.loose;\n l2 = token.items.length;\n body = '';\n\n for (j = 0; j < l2; j++) {\n item = token.items[j];\n checked = item.checked;\n task = item.task;\n itemBody = '';\n\n if (item.task) {\n checkbox = this.renderer.checkbox(checked);\n\n if (loose) {\n if (item.tokens.length > 0 && item.tokens[0].type === 'text') {\n item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;\n\n if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {\n item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;\n }\n } else {\n item.tokens.unshift({\n type: 'text',\n text: checkbox\n });\n }\n } else {\n itemBody += checkbox;\n }\n }\n\n itemBody += this.parse(item.tokens, loose);\n body += this.renderer.listitem(itemBody, task, checked);\n }\n\n out += this.renderer.list(body, ordered, start);\n continue;\n }\n\n case 'html':\n {\n // TODO parse inline content if parameter markdown=1\n out += this.renderer.html(token.text);\n continue;\n }\n\n case 'paragraph':\n {\n out += this.renderer.paragraph(this.parseInline(token.tokens));\n continue;\n }\n\n case 'text':\n {\n body = token.tokens ? this.parseInline(token.tokens) : token.text;\n\n while (i + 1 < l && tokens[i + 1].type === 'text') {\n token = tokens[++i];\n body += '\\n' + (token.tokens ? this.parseInline(token.tokens) : token.text);\n }\n\n out += top ? this.renderer.paragraph(body) : body;\n continue;\n }\n\n default:\n {\n var errMsg = 'Token with \"' + token.type + '\" type was not found.';\n\n if (this.options.silent) {\n console.error(errMsg);\n return;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n\n return out;\n }\n /**\n * Parse Inline Tokens\n */\n ;\n\n _proto.parseInline = function parseInline(tokens, renderer) {\n renderer = renderer || this.renderer;\n var out = '',\n i,\n token;\n var l = tokens.length;\n\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n switch (token.type) {\n case 'escape':\n {\n out += renderer.text(token.text);\n break;\n }\n\n case 'html':\n {\n out += renderer.html(token.text);\n break;\n }\n\n case 'link':\n {\n out += renderer.link(token.href, token.title, this.parseInline(token.tokens, renderer));\n break;\n }\n\n case 'image':\n {\n out += renderer.image(token.href, token.title, token.text);\n break;\n }\n\n case 'strong':\n {\n out += renderer.strong(this.parseInline(token.tokens, renderer));\n break;\n }\n\n case 'em':\n {\n out += renderer.em(this.parseInline(token.tokens, renderer));\n break;\n }\n\n case 'codespan':\n {\n out += renderer.codespan(token.text);\n break;\n }\n\n case 'br':\n {\n out += renderer.br();\n break;\n }\n\n case 'del':\n {\n out += renderer.del(this.parseInline(token.tokens, renderer));\n break;\n }\n\n case 'text':\n {\n out += renderer.text(token.text);\n break;\n }\n\n default:\n {\n var errMsg = 'Token with \"' + token.type + '\" type was not found.';\n\n if (this.options.silent) {\n console.error(errMsg);\n return;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n\n return out;\n };\n\n return Parser;\n }();\n\n var merge = helpers.merge,\n checkSanitizeDeprecation = helpers.checkSanitizeDeprecation,\n escape = helpers.escape;\n var getDefaults = defaults$5.getDefaults,\n changeDefaults = defaults$5.changeDefaults,\n defaults = defaults$5.defaults;\n /**\n * Marked\n */\n\n function marked(src, opt, callback) {\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n throw new Error('marked(): input parameter is undefined or null');\n }\n\n if (typeof src !== 'string') {\n throw new Error('marked(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected');\n }\n\n if (typeof opt === 'function') {\n callback = opt;\n opt = null;\n }\n\n opt = merge({}, marked.defaults, opt || {});\n checkSanitizeDeprecation(opt);\n\n if (callback) {\n var highlight = opt.highlight;\n var tokens;\n\n try {\n tokens = Lexer_1.lex(src, opt);\n } catch (e) {\n return callback(e);\n }\n\n var done = function done(err) {\n var out;\n\n if (!err) {\n try {\n out = Parser_1.parse(tokens, opt);\n } catch (e) {\n err = e;\n }\n }\n\n opt.highlight = highlight;\n return err ? callback(err) : callback(null, out);\n };\n\n if (!highlight || highlight.length < 3) {\n return done();\n }\n\n delete opt.highlight;\n if (!tokens.length) return done();\n var pending = 0;\n marked.walkTokens(tokens, function (token) {\n if (token.type === 'code') {\n pending++;\n setTimeout(function () {\n highlight(token.text, token.lang, function (err, code) {\n if (err) {\n return done(err);\n }\n\n if (code != null && code !== token.text) {\n token.text = code;\n token.escaped = true;\n }\n\n pending--;\n\n if (pending === 0) {\n done();\n }\n });\n }, 0);\n }\n });\n\n if (pending === 0) {\n done();\n }\n\n return;\n }\n\n try {\n var _tokens = Lexer_1.lex(src, opt);\n\n if (opt.walkTokens) {\n marked.walkTokens(_tokens, opt.walkTokens);\n }\n\n return Parser_1.parse(_tokens, opt);\n } catch (e) {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n\n if (opt.silent) {\n return '

    An error occurred:

    ' + escape(e.message + '', true) + '
    ';\n }\n\n throw e;\n }\n }\n /**\n * Options\n */\n\n\n marked.options = marked.setOptions = function (opt) {\n merge(marked.defaults, opt);\n changeDefaults(marked.defaults);\n return marked;\n };\n\n marked.getDefaults = getDefaults;\n marked.defaults = defaults;\n /**\n * Use Extension\n */\n\n marked.use = function (extension) {\n var opts = merge({}, extension);\n\n if (extension.renderer) {\n (function () {\n var renderer = marked.defaults.renderer || new Renderer_1();\n\n var _loop = function _loop(prop) {\n var prevRenderer = renderer[prop];\n\n renderer[prop] = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var ret = extension.renderer[prop].apply(renderer, args);\n\n if (ret === false) {\n ret = prevRenderer.apply(renderer, args);\n }\n\n return ret;\n };\n };\n\n for (var prop in extension.renderer) {\n _loop(prop);\n }\n\n opts.renderer = renderer;\n })();\n }\n\n if (extension.tokenizer) {\n (function () {\n var tokenizer = marked.defaults.tokenizer || new Tokenizer_1();\n\n var _loop2 = function _loop2(prop) {\n var prevTokenizer = tokenizer[prop];\n\n tokenizer[prop] = function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var ret = extension.tokenizer[prop].apply(tokenizer, args);\n\n if (ret === false) {\n ret = prevTokenizer.apply(tokenizer, args);\n }\n\n return ret;\n };\n };\n\n for (var prop in extension.tokenizer) {\n _loop2(prop);\n }\n\n opts.tokenizer = tokenizer;\n })();\n }\n\n if (extension.walkTokens) {\n var walkTokens = marked.defaults.walkTokens;\n\n opts.walkTokens = function (token) {\n extension.walkTokens(token);\n\n if (walkTokens) {\n walkTokens(token);\n }\n };\n }\n\n marked.setOptions(opts);\n };\n /**\n * Run callback for every token\n */\n\n\n marked.walkTokens = function (tokens, callback) {\n for (var _iterator = _createForOfIteratorHelperLoose(tokens), _step; !(_step = _iterator()).done;) {\n var token = _step.value;\n callback(token);\n\n switch (token.type) {\n case 'table':\n {\n for (var _iterator2 = _createForOfIteratorHelperLoose(token.tokens.header), _step2; !(_step2 = _iterator2()).done;) {\n var cell = _step2.value;\n marked.walkTokens(cell, callback);\n }\n\n for (var _iterator3 = _createForOfIteratorHelperLoose(token.tokens.cells), _step3; !(_step3 = _iterator3()).done;) {\n var row = _step3.value;\n\n for (var _iterator4 = _createForOfIteratorHelperLoose(row), _step4; !(_step4 = _iterator4()).done;) {\n var _cell = _step4.value;\n marked.walkTokens(_cell, callback);\n }\n }\n\n break;\n }\n\n case 'list':\n {\n marked.walkTokens(token.items, callback);\n break;\n }\n\n default:\n {\n if (token.tokens) {\n marked.walkTokens(token.tokens, callback);\n }\n }\n }\n }\n };\n /**\n * Parse Inline\n */\n\n\n marked.parseInline = function (src, opt) {\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n throw new Error('marked.parseInline(): input parameter is undefined or null');\n }\n\n if (typeof src !== 'string') {\n throw new Error('marked.parseInline(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected');\n }\n\n opt = merge({}, marked.defaults, opt || {});\n checkSanitizeDeprecation(opt);\n\n try {\n var tokens = Lexer_1.lexInline(src, opt);\n\n if (opt.walkTokens) {\n marked.walkTokens(tokens, opt.walkTokens);\n }\n\n return Parser_1.parseInline(tokens, opt);\n } catch (e) {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n\n if (opt.silent) {\n return '

    An error occurred:

    ' + escape(e.message + '', true) + '
    ';\n }\n\n throw e;\n }\n };\n /**\n * Expose\n */\n\n\n marked.Parser = Parser_1;\n marked.parser = Parser_1.parse;\n marked.Renderer = Renderer_1;\n marked.TextRenderer = TextRenderer_1;\n marked.Lexer = Lexer_1;\n marked.lexer = Lexer_1.lex;\n marked.Tokenizer = Tokenizer_1;\n marked.Slugger = Slugger_1;\n marked.parse = marked;\n var marked_1 = marked;\n\n return marked_1;\n\n})));\n","function deepFreeze(obj) {\n if (obj instanceof Map) {\n obj.clear = obj.delete = obj.set = function () {\n throw new Error('map is read-only');\n };\n } else if (obj instanceof Set) {\n obj.add = obj.clear = obj.delete = function () {\n throw new Error('set is read-only');\n };\n }\n\n // Freeze self\n Object.freeze(obj);\n\n Object.getOwnPropertyNames(obj).forEach(function (name) {\n var prop = obj[name];\n\n // Freeze prop if it is an object\n if (typeof prop == 'object' && !Object.isFrozen(prop)) {\n deepFreeze(prop);\n }\n });\n\n return obj;\n}\n\nvar deepFreezeEs6 = deepFreeze;\nvar _default = deepFreeze;\ndeepFreezeEs6.default = _default;\n\n/** @implements CallbackResponse */\nclass Response {\n /**\n * @param {CompiledMode} mode\n */\n constructor(mode) {\n // eslint-disable-next-line no-undefined\n if (mode.data === undefined) mode.data = {};\n\n this.data = mode.data;\n this.isMatchIgnored = false;\n }\n\n ignoreMatch() {\n this.isMatchIgnored = true;\n }\n}\n\n/**\n * @param {string} value\n * @returns {string}\n */\nfunction escapeHTML(value) {\n return value\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n}\n\n/**\n * performs a shallow merge of multiple objects into one\n *\n * @template T\n * @param {T} original\n * @param {Record[]} objects\n * @returns {T} a single new object\n */\nfunction inherit(original, ...objects) {\n /** @type Record */\n const result = Object.create(null);\n\n for (const key in original) {\n result[key] = original[key];\n }\n objects.forEach(function(obj) {\n for (const key in obj) {\n result[key] = obj[key];\n }\n });\n return /** @type {T} */ (result);\n}\n\n/**\n * @typedef {object} Renderer\n * @property {(text: string) => void} addText\n * @property {(node: Node) => void} openNode\n * @property {(node: Node) => void} closeNode\n * @property {() => string} value\n */\n\n/** @typedef {{kind?: string, sublanguage?: boolean}} Node */\n/** @typedef {{walk: (r: Renderer) => void}} Tree */\n/** */\n\nconst SPAN_CLOSE = '';\n\n/**\n * Determines if a node needs to be wrapped in \n *\n * @param {Node} node */\nconst emitsWrappingTags = (node) => {\n return !!node.kind;\n};\n\n/** @type {Renderer} */\nclass HTMLRenderer {\n /**\n * Creates a new HTMLRenderer\n *\n * @param {Tree} parseTree - the parse tree (must support `walk` API)\n * @param {{classPrefix: string}} options\n */\n constructor(parseTree, options) {\n this.buffer = \"\";\n this.classPrefix = options.classPrefix;\n parseTree.walk(this);\n }\n\n /**\n * Adds texts to the output stream\n *\n * @param {string} text */\n addText(text) {\n this.buffer += escapeHTML(text);\n }\n\n /**\n * Adds a node open to the output stream (if needed)\n *\n * @param {Node} node */\n openNode(node) {\n if (!emitsWrappingTags(node)) return;\n\n let className = node.kind;\n if (!node.sublanguage) {\n className = `${this.classPrefix}${className}`;\n }\n this.span(className);\n }\n\n /**\n * Adds a node close to the output stream (if needed)\n *\n * @param {Node} node */\n closeNode(node) {\n if (!emitsWrappingTags(node)) return;\n\n this.buffer += SPAN_CLOSE;\n }\n\n /**\n * returns the accumulated buffer\n */\n value() {\n return this.buffer;\n }\n\n // helpers\n\n /**\n * Builds a span element\n *\n * @param {string} className */\n span(className) {\n this.buffer += ``;\n }\n}\n\n/** @typedef {{kind?: string, sublanguage?: boolean, children: Node[]} | string} Node */\n/** @typedef {{kind?: string, sublanguage?: boolean, children: Node[]} } DataNode */\n/** */\n\nclass TokenTree {\n constructor() {\n /** @type DataNode */\n this.rootNode = { children: [] };\n this.stack = [this.rootNode];\n }\n\n get top() {\n return this.stack[this.stack.length - 1];\n }\n\n get root() { return this.rootNode; }\n\n /** @param {Node} node */\n add(node) {\n this.top.children.push(node);\n }\n\n /** @param {string} kind */\n openNode(kind) {\n /** @type Node */\n const node = { kind, children: [] };\n this.add(node);\n this.stack.push(node);\n }\n\n closeNode() {\n if (this.stack.length > 1) {\n return this.stack.pop();\n }\n // eslint-disable-next-line no-undefined\n return undefined;\n }\n\n closeAllNodes() {\n while (this.closeNode());\n }\n\n toJSON() {\n return JSON.stringify(this.rootNode, null, 4);\n }\n\n /**\n * @typedef { import(\"./html_renderer\").Renderer } Renderer\n * @param {Renderer} builder\n */\n walk(builder) {\n // this does not\n return this.constructor._walk(builder, this.rootNode);\n // this works\n // return TokenTree._walk(builder, this.rootNode);\n }\n\n /**\n * @param {Renderer} builder\n * @param {Node} node\n */\n static _walk(builder, node) {\n if (typeof node === \"string\") {\n builder.addText(node);\n } else if (node.children) {\n builder.openNode(node);\n node.children.forEach((child) => this._walk(builder, child));\n builder.closeNode(node);\n }\n return builder;\n }\n\n /**\n * @param {Node} node\n */\n static _collapse(node) {\n if (typeof node === \"string\") return;\n if (!node.children) return;\n\n if (node.children.every(el => typeof el === \"string\")) {\n // node.text = node.children.join(\"\");\n // delete node.children;\n node.children = [node.children.join(\"\")];\n } else {\n node.children.forEach((child) => {\n TokenTree._collapse(child);\n });\n }\n }\n}\n\n/**\n Currently this is all private API, but this is the minimal API necessary\n that an Emitter must implement to fully support the parser.\n\n Minimal interface:\n\n - addKeyword(text, kind)\n - addText(text)\n - addSublanguage(emitter, subLanguageName)\n - finalize()\n - openNode(kind)\n - closeNode()\n - closeAllNodes()\n - toHTML()\n\n*/\n\n/**\n * @implements {Emitter}\n */\nclass TokenTreeEmitter extends TokenTree {\n /**\n * @param {*} options\n */\n constructor(options) {\n super();\n this.options = options;\n }\n\n /**\n * @param {string} text\n * @param {string} kind\n */\n addKeyword(text, kind) {\n if (text === \"\") { return; }\n\n this.openNode(kind);\n this.addText(text);\n this.closeNode();\n }\n\n /**\n * @param {string} text\n */\n addText(text) {\n if (text === \"\") { return; }\n\n this.add(text);\n }\n\n /**\n * @param {Emitter & {root: DataNode}} emitter\n * @param {string} name\n */\n addSublanguage(emitter, name) {\n /** @type DataNode */\n const node = emitter.root;\n node.kind = name;\n node.sublanguage = true;\n this.add(node);\n }\n\n toHTML() {\n const renderer = new HTMLRenderer(this, this.options);\n return renderer.value();\n }\n\n finalize() {\n return true;\n }\n}\n\n/**\n * @param {string} value\n * @returns {RegExp}\n * */\nfunction escape(value) {\n return new RegExp(value.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'), 'm');\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n if (!re) return null;\n if (typeof re === \"string\") return re;\n\n return re.source;\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n const joined = args.map((x) => source(x)).join(\"\");\n return joined;\n}\n\n/**\n * Any of the passed expresssions may match\n *\n * Creates a huge this | this | that | that match\n * @param {(RegExp | string)[] } args\n * @returns {string}\n */\nfunction either(...args) {\n const joined = '(' + args.map((x) => source(x)).join(\"|\") + \")\";\n return joined;\n}\n\n/**\n * @param {RegExp} re\n * @returns {number}\n */\nfunction countMatchGroups(re) {\n return (new RegExp(re.toString() + '|')).exec('').length - 1;\n}\n\n/**\n * Does lexeme start with a regular expression match at the beginning\n * @param {RegExp} re\n * @param {string} lexeme\n */\nfunction startsWith(re, lexeme) {\n const match = re && re.exec(lexeme);\n return match && match.index === 0;\n}\n\n// BACKREF_RE matches an open parenthesis or backreference. To avoid\n// an incorrect parse, it additionally matches the following:\n// - [...] elements, where the meaning of parentheses and escapes change\n// - other escape sequences, so we do not misparse escape sequences as\n// interesting elements\n// - non-matching or lookahead parentheses, which do not capture. These\n// follow the '(' with a '?'.\nconst BACKREF_RE = /\\[(?:[^\\\\\\]]|\\\\.)*\\]|\\(\\??|\\\\([1-9][0-9]*)|\\\\./;\n\n// join logically computes regexps.join(separator), but fixes the\n// backreferences so they continue to match.\n// it also places each individual regular expression into it's own\n// match group, keeping track of the sequencing of those match groups\n// is currently an exercise for the caller. :-)\n/**\n * @param {(string | RegExp)[]} regexps\n * @param {string} separator\n * @returns {string}\n */\nfunction join(regexps, separator = \"|\") {\n let numCaptures = 0;\n\n return regexps.map((regex) => {\n numCaptures += 1;\n const offset = numCaptures;\n let re = source(regex);\n let out = '';\n\n while (re.length > 0) {\n const match = BACKREF_RE.exec(re);\n if (!match) {\n out += re;\n break;\n }\n out += re.substring(0, match.index);\n re = re.substring(match.index + match[0].length);\n if (match[0][0] === '\\\\' && match[1]) {\n // Adjust the backreference.\n out += '\\\\' + String(Number(match[1]) + offset);\n } else {\n out += match[0];\n if (match[0] === '(') {\n numCaptures++;\n }\n }\n }\n return out;\n }).map(re => `(${re})`).join(separator);\n}\n\n// Common regexps\nconst MATCH_NOTHING_RE = /\\b\\B/;\nconst IDENT_RE = '[a-zA-Z]\\\\w*';\nconst UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\\\w*';\nconst NUMBER_RE = '\\\\b\\\\d+(\\\\.\\\\d+)?';\nconst C_NUMBER_RE = '(-?)(\\\\b0[xX][a-fA-F0-9]+|(\\\\b\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)([eE][-+]?\\\\d+)?)'; // 0x..., 0..., decimal, float\nconst BINARY_NUMBER_RE = '\\\\b(0b[01]+)'; // 0b...\nconst RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\\\*|\\\\*=|\\\\+|\\\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\\\?|\\\\[|\\\\{|\\\\(|\\\\^|\\\\^=|\\\\||\\\\|=|\\\\|\\\\||~';\n\n/**\n* @param { Partial & {binary?: string | RegExp} } opts\n*/\nconst SHEBANG = (opts = {}) => {\n const beginShebang = /^#![ ]*\\//;\n if (opts.binary) {\n opts.begin = concat(\n beginShebang,\n /.*\\b/,\n opts.binary,\n /\\b.*/);\n }\n return inherit({\n className: 'meta',\n begin: beginShebang,\n end: /$/,\n relevance: 0,\n /** @type {ModeCallback} */\n \"on:begin\": (m, resp) => {\n if (m.index !== 0) resp.ignoreMatch();\n }\n }, opts);\n};\n\n// Common modes\nconst BACKSLASH_ESCAPE = {\n begin: '\\\\\\\\[\\\\s\\\\S]', relevance: 0\n};\nconst APOS_STRING_MODE = {\n className: 'string',\n begin: '\\'',\n end: '\\'',\n illegal: '\\\\n',\n contains: [BACKSLASH_ESCAPE]\n};\nconst QUOTE_STRING_MODE = {\n className: 'string',\n begin: '\"',\n end: '\"',\n illegal: '\\\\n',\n contains: [BACKSLASH_ESCAPE]\n};\nconst PHRASAL_WORDS_MODE = {\n begin: /\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\\b/\n};\n/**\n * Creates a comment mode\n *\n * @param {string | RegExp} begin\n * @param {string | RegExp} end\n * @param {Mode | {}} [modeOptions]\n * @returns {Partial}\n */\nconst COMMENT = function(begin, end, modeOptions = {}) {\n const mode = inherit(\n {\n className: 'comment',\n begin,\n end,\n contains: []\n },\n modeOptions\n );\n mode.contains.push(PHRASAL_WORDS_MODE);\n mode.contains.push({\n className: 'doctag',\n begin: '(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):',\n relevance: 0\n });\n return mode;\n};\nconst C_LINE_COMMENT_MODE = COMMENT('//', '$');\nconst C_BLOCK_COMMENT_MODE = COMMENT('/\\\\*', '\\\\*/');\nconst HASH_COMMENT_MODE = COMMENT('#', '$');\nconst NUMBER_MODE = {\n className: 'number',\n begin: NUMBER_RE,\n relevance: 0\n};\nconst C_NUMBER_MODE = {\n className: 'number',\n begin: C_NUMBER_RE,\n relevance: 0\n};\nconst BINARY_NUMBER_MODE = {\n className: 'number',\n begin: BINARY_NUMBER_RE,\n relevance: 0\n};\nconst CSS_NUMBER_MODE = {\n className: 'number',\n begin: NUMBER_RE + '(' +\n '%|em|ex|ch|rem' +\n '|vw|vh|vmin|vmax' +\n '|cm|mm|in|pt|pc|px' +\n '|deg|grad|rad|turn' +\n '|s|ms' +\n '|Hz|kHz' +\n '|dpi|dpcm|dppx' +\n ')?',\n relevance: 0\n};\nconst REGEXP_MODE = {\n // this outer rule makes sure we actually have a WHOLE regex and not simply\n // an expression such as:\n //\n // 3 / something\n //\n // (which will then blow up when regex's `illegal` sees the newline)\n begin: /(?=\\/[^/\\n]*\\/)/,\n contains: [{\n className: 'regexp',\n begin: /\\//,\n end: /\\/[gimuy]*/,\n illegal: /\\n/,\n contains: [\n BACKSLASH_ESCAPE,\n {\n begin: /\\[/,\n end: /\\]/,\n relevance: 0,\n contains: [BACKSLASH_ESCAPE]\n }\n ]\n }]\n};\nconst TITLE_MODE = {\n className: 'title',\n begin: IDENT_RE,\n relevance: 0\n};\nconst UNDERSCORE_TITLE_MODE = {\n className: 'title',\n begin: UNDERSCORE_IDENT_RE,\n relevance: 0\n};\nconst METHOD_GUARD = {\n // excludes method names from keyword processing\n begin: '\\\\.\\\\s*' + UNDERSCORE_IDENT_RE,\n relevance: 0\n};\n\n/**\n * Adds end same as begin mechanics to a mode\n *\n * Your mode must include at least a single () match group as that first match\n * group is what is used for comparison\n * @param {Partial} mode\n */\nconst END_SAME_AS_BEGIN = function(mode) {\n return Object.assign(mode,\n {\n /** @type {ModeCallback} */\n 'on:begin': (m, resp) => { resp.data._beginMatch = m[1]; },\n /** @type {ModeCallback} */\n 'on:end': (m, resp) => { if (resp.data._beginMatch !== m[1]) resp.ignoreMatch(); }\n });\n};\n\nvar MODES = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MATCH_NOTHING_RE: MATCH_NOTHING_RE,\n IDENT_RE: IDENT_RE,\n UNDERSCORE_IDENT_RE: UNDERSCORE_IDENT_RE,\n NUMBER_RE: NUMBER_RE,\n C_NUMBER_RE: C_NUMBER_RE,\n BINARY_NUMBER_RE: BINARY_NUMBER_RE,\n RE_STARTERS_RE: RE_STARTERS_RE,\n SHEBANG: SHEBANG,\n BACKSLASH_ESCAPE: BACKSLASH_ESCAPE,\n APOS_STRING_MODE: APOS_STRING_MODE,\n QUOTE_STRING_MODE: QUOTE_STRING_MODE,\n PHRASAL_WORDS_MODE: PHRASAL_WORDS_MODE,\n COMMENT: COMMENT,\n C_LINE_COMMENT_MODE: C_LINE_COMMENT_MODE,\n C_BLOCK_COMMENT_MODE: C_BLOCK_COMMENT_MODE,\n HASH_COMMENT_MODE: HASH_COMMENT_MODE,\n NUMBER_MODE: NUMBER_MODE,\n C_NUMBER_MODE: C_NUMBER_MODE,\n BINARY_NUMBER_MODE: BINARY_NUMBER_MODE,\n CSS_NUMBER_MODE: CSS_NUMBER_MODE,\n REGEXP_MODE: REGEXP_MODE,\n TITLE_MODE: TITLE_MODE,\n UNDERSCORE_TITLE_MODE: UNDERSCORE_TITLE_MODE,\n METHOD_GUARD: METHOD_GUARD,\n END_SAME_AS_BEGIN: END_SAME_AS_BEGIN\n});\n\n// Grammar extensions / plugins\n// See: https://github.com/highlightjs/highlight.js/issues/2833\n\n// Grammar extensions allow \"syntactic sugar\" to be added to the grammar modes\n// without requiring any underlying changes to the compiler internals.\n\n// `compileMatch` being the perfect small example of now allowing a grammar\n// author to write `match` when they desire to match a single expression rather\n// than being forced to use `begin`. The extension then just moves `match` into\n// `begin` when it runs. Ie, no features have been added, but we've just made\n// the experience of writing (and reading grammars) a little bit nicer.\n\n// ------\n\n// TODO: We need negative look-behind support to do this properly\n/**\n * Skip a match if it has a preceding dot\n *\n * This is used for `beginKeywords` to prevent matching expressions such as\n * `bob.keyword.do()`. The mode compiler automatically wires this up as a\n * special _internal_ 'on:begin' callback for modes with `beginKeywords`\n * @param {RegExpMatchArray} match\n * @param {CallbackResponse} response\n */\nfunction skipIfhasPrecedingDot(match, response) {\n const before = match.input[match.index - 1];\n if (before === \".\") {\n response.ignoreMatch();\n }\n}\n\n\n/**\n * `beginKeywords` syntactic sugar\n * @type {CompilerExt}\n */\nfunction beginKeywords(mode, parent) {\n if (!parent) return;\n if (!mode.beginKeywords) return;\n\n // for languages with keywords that include non-word characters checking for\n // a word boundary is not sufficient, so instead we check for a word boundary\n // or whitespace - this does no harm in any case since our keyword engine\n // doesn't allow spaces in keywords anyways and we still check for the boundary\n // first\n mode.begin = '\\\\b(' + mode.beginKeywords.split(' ').join('|') + ')(?!\\\\.)(?=\\\\b|\\\\s)';\n mode.__beforeBegin = skipIfhasPrecedingDot;\n mode.keywords = mode.keywords || mode.beginKeywords;\n delete mode.beginKeywords;\n\n // prevents double relevance, the keywords themselves provide\n // relevance, the mode doesn't need to double it\n // eslint-disable-next-line no-undefined\n if (mode.relevance === undefined) mode.relevance = 0;\n}\n\n/**\n * Allow `illegal` to contain an array of illegal values\n * @type {CompilerExt}\n */\nfunction compileIllegal(mode, _parent) {\n if (!Array.isArray(mode.illegal)) return;\n\n mode.illegal = either(...mode.illegal);\n}\n\n/**\n * `match` to match a single expression for readability\n * @type {CompilerExt}\n */\nfunction compileMatch(mode, _parent) {\n if (!mode.match) return;\n if (mode.begin || mode.end) throw new Error(\"begin & end are not supported with match\");\n\n mode.begin = mode.match;\n delete mode.match;\n}\n\n/**\n * provides the default 1 relevance to all modes\n * @type {CompilerExt}\n */\nfunction compileRelevance(mode, _parent) {\n // eslint-disable-next-line no-undefined\n if (mode.relevance === undefined) mode.relevance = 1;\n}\n\n// keywords that should have no default relevance value\nconst COMMON_KEYWORDS = [\n 'of',\n 'and',\n 'for',\n 'in',\n 'not',\n 'or',\n 'if',\n 'then',\n 'parent', // common variable name\n 'list', // common variable name\n 'value' // common variable name\n];\n\nconst DEFAULT_KEYWORD_CLASSNAME = \"keyword\";\n\n/**\n * Given raw keywords from a language definition, compile them.\n *\n * @param {string | Record | Array} rawKeywords\n * @param {boolean} caseInsensitive\n */\nfunction compileKeywords(rawKeywords, caseInsensitive, className = DEFAULT_KEYWORD_CLASSNAME) {\n /** @type KeywordDict */\n const compiledKeywords = {};\n\n // input can be a string of keywords, an array of keywords, or a object with\n // named keys representing className (which can then point to a string or array)\n if (typeof rawKeywords === 'string') {\n compileList(className, rawKeywords.split(\" \"));\n } else if (Array.isArray(rawKeywords)) {\n compileList(className, rawKeywords);\n } else {\n Object.keys(rawKeywords).forEach(function(className) {\n // collapse all our objects back into the parent object\n Object.assign(\n compiledKeywords,\n compileKeywords(rawKeywords[className], caseInsensitive, className)\n );\n });\n }\n return compiledKeywords;\n\n // ---\n\n /**\n * Compiles an individual list of keywords\n *\n * Ex: \"for if when while|5\"\n *\n * @param {string} className\n * @param {Array} keywordList\n */\n function compileList(className, keywordList) {\n if (caseInsensitive) {\n keywordList = keywordList.map(x => x.toLowerCase());\n }\n keywordList.forEach(function(keyword) {\n const pair = keyword.split('|');\n compiledKeywords[pair[0]] = [className, scoreForKeyword(pair[0], pair[1])];\n });\n }\n}\n\n/**\n * Returns the proper score for a given keyword\n *\n * Also takes into account comment keywords, which will be scored 0 UNLESS\n * another score has been manually assigned.\n * @param {string} keyword\n * @param {string} [providedScore]\n */\nfunction scoreForKeyword(keyword, providedScore) {\n // manual scores always win over common keywords\n // so you can force a score of 1 if you really insist\n if (providedScore) {\n return Number(providedScore);\n }\n\n return commonKeyword(keyword) ? 0 : 1;\n}\n\n/**\n * Determines if a given keyword is common or not\n *\n * @param {string} keyword */\nfunction commonKeyword(keyword) {\n return COMMON_KEYWORDS.includes(keyword.toLowerCase());\n}\n\n// compilation\n\n/**\n * Compiles a language definition result\n *\n * Given the raw result of a language definition (Language), compiles this so\n * that it is ready for highlighting code.\n * @param {Language} language\n * @param {{plugins: HLJSPlugin[]}} opts\n * @returns {CompiledLanguage}\n */\nfunction compileLanguage(language, { plugins }) {\n /**\n * Builds a regex with the case sensativility of the current language\n *\n * @param {RegExp | string} value\n * @param {boolean} [global]\n */\n function langRe(value, global) {\n return new RegExp(\n source(value),\n 'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : '')\n );\n }\n\n /**\n Stores multiple regular expressions and allows you to quickly search for\n them all in a string simultaneously - returning the first match. It does\n this by creating a huge (a|b|c) regex - each individual item wrapped with ()\n and joined by `|` - using match groups to track position. When a match is\n found checking which position in the array has content allows us to figure\n out which of the original regexes / match groups triggered the match.\n\n The match object itself (the result of `Regex.exec`) is returned but also\n enhanced by merging in any meta-data that was registered with the regex.\n This is how we keep track of which mode matched, and what type of rule\n (`illegal`, `begin`, end, etc).\n */\n class MultiRegex {\n constructor() {\n this.matchIndexes = {};\n // @ts-ignore\n this.regexes = [];\n this.matchAt = 1;\n this.position = 0;\n }\n\n // @ts-ignore\n addRule(re, opts) {\n opts.position = this.position++;\n // @ts-ignore\n this.matchIndexes[this.matchAt] = opts;\n this.regexes.push([opts, re]);\n this.matchAt += countMatchGroups(re) + 1;\n }\n\n compile() {\n if (this.regexes.length === 0) {\n // avoids the need to check length every time exec is called\n // @ts-ignore\n this.exec = () => null;\n }\n const terminators = this.regexes.map(el => el[1]);\n this.matcherRe = langRe(join(terminators), true);\n this.lastIndex = 0;\n }\n\n /** @param {string} s */\n exec(s) {\n this.matcherRe.lastIndex = this.lastIndex;\n const match = this.matcherRe.exec(s);\n if (!match) { return null; }\n\n // eslint-disable-next-line no-undefined\n const i = match.findIndex((el, i) => i > 0 && el !== undefined);\n // @ts-ignore\n const matchData = this.matchIndexes[i];\n // trim off any earlier non-relevant match groups (ie, the other regex\n // match groups that make up the multi-matcher)\n match.splice(0, i);\n\n return Object.assign(match, matchData);\n }\n }\n\n /*\n Created to solve the key deficiently with MultiRegex - there is no way to\n test for multiple matches at a single location. Why would we need to do\n that? In the future a more dynamic engine will allow certain matches to be\n ignored. An example: if we matched say the 3rd regex in a large group but\n decided to ignore it - we'd need to started testing again at the 4th\n regex... but MultiRegex itself gives us no real way to do that.\n\n So what this class creates MultiRegexs on the fly for whatever search\n position they are needed.\n\n NOTE: These additional MultiRegex objects are created dynamically. For most\n grammars most of the time we will never actually need anything more than the\n first MultiRegex - so this shouldn't have too much overhead.\n\n Say this is our search group, and we match regex3, but wish to ignore it.\n\n regex1 | regex2 | regex3 | regex4 | regex5 ' ie, startAt = 0\n\n What we need is a new MultiRegex that only includes the remaining\n possibilities:\n\n regex4 | regex5 ' ie, startAt = 3\n\n This class wraps all that complexity up in a simple API... `startAt` decides\n where in the array of expressions to start doing the matching. It\n auto-increments, so if a match is found at position 2, then startAt will be\n set to 3. If the end is reached startAt will return to 0.\n\n MOST of the time the parser will be setting startAt manually to 0.\n */\n class ResumableMultiRegex {\n constructor() {\n // @ts-ignore\n this.rules = [];\n // @ts-ignore\n this.multiRegexes = [];\n this.count = 0;\n\n this.lastIndex = 0;\n this.regexIndex = 0;\n }\n\n // @ts-ignore\n getMatcher(index) {\n if (this.multiRegexes[index]) return this.multiRegexes[index];\n\n const matcher = new MultiRegex();\n this.rules.slice(index).forEach(([re, opts]) => matcher.addRule(re, opts));\n matcher.compile();\n this.multiRegexes[index] = matcher;\n return matcher;\n }\n\n resumingScanAtSamePosition() {\n return this.regexIndex !== 0;\n }\n\n considerAll() {\n this.regexIndex = 0;\n }\n\n // @ts-ignore\n addRule(re, opts) {\n this.rules.push([re, opts]);\n if (opts.type === \"begin\") this.count++;\n }\n\n /** @param {string} s */\n exec(s) {\n const m = this.getMatcher(this.regexIndex);\n m.lastIndex = this.lastIndex;\n let result = m.exec(s);\n\n // The following is because we have no easy way to say \"resume scanning at the\n // existing position but also skip the current rule ONLY\". What happens is\n // all prior rules are also skipped which can result in matching the wrong\n // thing. Example of matching \"booger\":\n\n // our matcher is [string, \"booger\", number]\n //\n // ....booger....\n\n // if \"booger\" is ignored then we'd really need a regex to scan from the\n // SAME position for only: [string, number] but ignoring \"booger\" (if it\n // was the first match), a simple resume would scan ahead who knows how\n // far looking only for \"number\", ignoring potential string matches (or\n // future \"booger\" matches that might be valid.)\n\n // So what we do: We execute two matchers, one resuming at the same\n // position, but the second full matcher starting at the position after:\n\n // /--- resume first regex match here (for [number])\n // |/---- full match here for [string, \"booger\", number]\n // vv\n // ....booger....\n\n // Which ever results in a match first is then used. So this 3-4 step\n // process essentially allows us to say \"match at this position, excluding\n // a prior rule that was ignored\".\n //\n // 1. Match \"booger\" first, ignore. Also proves that [string] does non match.\n // 2. Resume matching for [number]\n // 3. Match at index + 1 for [string, \"booger\", number]\n // 4. If #2 and #3 result in matches, which came first?\n if (this.resumingScanAtSamePosition()) {\n if (result && result.index === this.lastIndex) ; else { // use the second matcher result\n const m2 = this.getMatcher(0);\n m2.lastIndex = this.lastIndex + 1;\n result = m2.exec(s);\n }\n }\n\n if (result) {\n this.regexIndex += result.position + 1;\n if (this.regexIndex === this.count) {\n // wrap-around to considering all matches again\n this.considerAll();\n }\n }\n\n return result;\n }\n }\n\n /**\n * Given a mode, builds a huge ResumableMultiRegex that can be used to walk\n * the content and find matches.\n *\n * @param {CompiledMode} mode\n * @returns {ResumableMultiRegex}\n */\n function buildModeRegex(mode) {\n const mm = new ResumableMultiRegex();\n\n mode.contains.forEach(term => mm.addRule(term.begin, { rule: term, type: \"begin\" }));\n\n if (mode.terminatorEnd) {\n mm.addRule(mode.terminatorEnd, { type: \"end\" });\n }\n if (mode.illegal) {\n mm.addRule(mode.illegal, { type: \"illegal\" });\n }\n\n return mm;\n }\n\n /** skip vs abort vs ignore\n *\n * @skip - The mode is still entered and exited normally (and contains rules apply),\n * but all content is held and added to the parent buffer rather than being\n * output when the mode ends. Mostly used with `sublanguage` to build up\n * a single large buffer than can be parsed by sublanguage.\n *\n * - The mode begin ands ends normally.\n * - Content matched is added to the parent mode buffer.\n * - The parser cursor is moved forward normally.\n *\n * @abort - A hack placeholder until we have ignore. Aborts the mode (as if it\n * never matched) but DOES NOT continue to match subsequent `contains`\n * modes. Abort is bad/suboptimal because it can result in modes\n * farther down not getting applied because an earlier rule eats the\n * content but then aborts.\n *\n * - The mode does not begin.\n * - Content matched by `begin` is added to the mode buffer.\n * - The parser cursor is moved forward accordingly.\n *\n * @ignore - Ignores the mode (as if it never matched) and continues to match any\n * subsequent `contains` modes. Ignore isn't technically possible with\n * the current parser implementation.\n *\n * - The mode does not begin.\n * - Content matched by `begin` is ignored.\n * - The parser cursor is not moved forward.\n */\n\n /**\n * Compiles an individual mode\n *\n * This can raise an error if the mode contains certain detectable known logic\n * issues.\n * @param {Mode} mode\n * @param {CompiledMode | null} [parent]\n * @returns {CompiledMode | never}\n */\n function compileMode(mode, parent) {\n const cmode = /** @type CompiledMode */ (mode);\n if (mode.isCompiled) return cmode;\n\n [\n // do this early so compiler extensions generally don't have to worry about\n // the distinction between match/begin\n compileMatch\n ].forEach(ext => ext(mode, parent));\n\n language.compilerExtensions.forEach(ext => ext(mode, parent));\n\n // __beforeBegin is considered private API, internal use only\n mode.__beforeBegin = null;\n\n [\n beginKeywords,\n // do this later so compiler extensions that come earlier have access to the\n // raw array if they wanted to perhaps manipulate it, etc.\n compileIllegal,\n // default to 1 relevance if not specified\n compileRelevance\n ].forEach(ext => ext(mode, parent));\n\n mode.isCompiled = true;\n\n let keywordPattern = null;\n if (typeof mode.keywords === \"object\") {\n keywordPattern = mode.keywords.$pattern;\n delete mode.keywords.$pattern;\n }\n\n if (mode.keywords) {\n mode.keywords = compileKeywords(mode.keywords, language.case_insensitive);\n }\n\n // both are not allowed\n if (mode.lexemes && keywordPattern) {\n throw new Error(\"ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) \");\n }\n\n // `mode.lexemes` was the old standard before we added and now recommend\n // using `keywords.$pattern` to pass the keyword pattern\n keywordPattern = keywordPattern || mode.lexemes || /\\w+/;\n cmode.keywordPatternRe = langRe(keywordPattern, true);\n\n if (parent) {\n if (!mode.begin) mode.begin = /\\B|\\b/;\n cmode.beginRe = langRe(mode.begin);\n if (mode.endSameAsBegin) mode.end = mode.begin;\n if (!mode.end && !mode.endsWithParent) mode.end = /\\B|\\b/;\n if (mode.end) cmode.endRe = langRe(mode.end);\n cmode.terminatorEnd = source(mode.end) || '';\n if (mode.endsWithParent && parent.terminatorEnd) {\n cmode.terminatorEnd += (mode.end ? '|' : '') + parent.terminatorEnd;\n }\n }\n if (mode.illegal) cmode.illegalRe = langRe(/** @type {RegExp | string} */ (mode.illegal));\n if (!mode.contains) mode.contains = [];\n\n mode.contains = [].concat(...mode.contains.map(function(c) {\n return expandOrCloneMode(c === 'self' ? mode : c);\n }));\n mode.contains.forEach(function(c) { compileMode(/** @type Mode */ (c), cmode); });\n\n if (mode.starts) {\n compileMode(mode.starts, parent);\n }\n\n cmode.matcher = buildModeRegex(cmode);\n return cmode;\n }\n\n if (!language.compilerExtensions) language.compilerExtensions = [];\n\n // self is not valid at the top-level\n if (language.contains && language.contains.includes('self')) {\n throw new Error(\"ERR: contains `self` is not supported at the top-level of a language. See documentation.\");\n }\n\n // we need a null object, which inherit will guarantee\n language.classNameAliases = inherit(language.classNameAliases || {});\n\n return compileMode(/** @type Mode */ (language));\n}\n\n/**\n * Determines if a mode has a dependency on it's parent or not\n *\n * If a mode does have a parent dependency then often we need to clone it if\n * it's used in multiple places so that each copy points to the correct parent,\n * where-as modes without a parent can often safely be re-used at the bottom of\n * a mode chain.\n *\n * @param {Mode | null} mode\n * @returns {boolean} - is there a dependency on the parent?\n * */\nfunction dependencyOnParent(mode) {\n if (!mode) return false;\n\n return mode.endsWithParent || dependencyOnParent(mode.starts);\n}\n\n/**\n * Expands a mode or clones it if necessary\n *\n * This is necessary for modes with parental dependenceis (see notes on\n * `dependencyOnParent`) and for nodes that have `variants` - which must then be\n * exploded into their own individual modes at compile time.\n *\n * @param {Mode} mode\n * @returns {Mode | Mode[]}\n * */\nfunction expandOrCloneMode(mode) {\n if (mode.variants && !mode.cachedVariants) {\n mode.cachedVariants = mode.variants.map(function(variant) {\n return inherit(mode, { variants: null }, variant);\n });\n }\n\n // EXPAND\n // if we have variants then essentially \"replace\" the mode with the variants\n // this happens in compileMode, where this function is called from\n if (mode.cachedVariants) {\n return mode.cachedVariants;\n }\n\n // CLONE\n // if we have dependencies on parents then we need a unique\n // instance of ourselves, so we can be reused with many\n // different parents without issue\n if (dependencyOnParent(mode)) {\n return inherit(mode, { starts: mode.starts ? inherit(mode.starts) : null });\n }\n\n if (Object.isFrozen(mode)) {\n return inherit(mode);\n }\n\n // no special dependency issues, just return ourselves\n return mode;\n}\n\nvar version = \"10.7.2\";\n\n// @ts-nocheck\n\nfunction hasValueOrEmptyAttribute(value) {\n return Boolean(value || value === \"\");\n}\n\nfunction BuildVuePlugin(hljs) {\n const Component = {\n props: [\"language\", \"code\", \"autodetect\"],\n data: function() {\n return {\n detectedLanguage: \"\",\n unknownLanguage: false\n };\n },\n computed: {\n className() {\n if (this.unknownLanguage) return \"\";\n\n return \"hljs \" + this.detectedLanguage;\n },\n highlighted() {\n // no idea what language to use, return raw code\n if (!this.autoDetect && !hljs.getLanguage(this.language)) {\n console.warn(`The language \"${this.language}\" you specified could not be found.`);\n this.unknownLanguage = true;\n return escapeHTML(this.code);\n }\n\n let result = {};\n if (this.autoDetect) {\n result = hljs.highlightAuto(this.code);\n this.detectedLanguage = result.language;\n } else {\n result = hljs.highlight(this.language, this.code, this.ignoreIllegals);\n this.detectedLanguage = this.language;\n }\n return result.value;\n },\n autoDetect() {\n return !this.language || hasValueOrEmptyAttribute(this.autodetect);\n },\n ignoreIllegals() {\n return true;\n }\n },\n // this avoids needing to use a whole Vue compilation pipeline just\n // to build Highlight.js\n render(createElement) {\n return createElement(\"pre\", {}, [\n createElement(\"code\", {\n class: this.className,\n domProps: { innerHTML: this.highlighted }\n })\n ]);\n }\n // template: `
    `\n };\n\n const VuePlugin = {\n install(Vue) {\n Vue.component('highlightjs', Component);\n }\n };\n\n return { Component, VuePlugin };\n}\n\n/* plugin itself */\n\n/** @type {HLJSPlugin} */\nconst mergeHTMLPlugin = {\n \"after:highlightElement\": ({ el, result, text }) => {\n const originalStream = nodeStream(el);\n if (!originalStream.length) return;\n\n const resultNode = document.createElement('div');\n resultNode.innerHTML = result.value;\n result.value = mergeStreams(originalStream, nodeStream(resultNode), text);\n }\n};\n\n/* Stream merging support functions */\n\n/**\n * @typedef Event\n * @property {'start'|'stop'} event\n * @property {number} offset\n * @property {Node} node\n */\n\n/**\n * @param {Node} node\n */\nfunction tag(node) {\n return node.nodeName.toLowerCase();\n}\n\n/**\n * @param {Node} node\n */\nfunction nodeStream(node) {\n /** @type Event[] */\n const result = [];\n (function _nodeStream(node, offset) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n if (child.nodeType === 3) {\n offset += child.nodeValue.length;\n } else if (child.nodeType === 1) {\n result.push({\n event: 'start',\n offset: offset,\n node: child\n });\n offset = _nodeStream(child, offset);\n // Prevent void elements from having an end tag that would actually\n // double them in the output. There are more void elements in HTML\n // but we list only those realistically expected in code display.\n if (!tag(child).match(/br|hr|img|input/)) {\n result.push({\n event: 'stop',\n offset: offset,\n node: child\n });\n }\n }\n }\n return offset;\n })(node, 0);\n return result;\n}\n\n/**\n * @param {any} original - the original stream\n * @param {any} highlighted - stream of the highlighted source\n * @param {string} value - the original source itself\n */\nfunction mergeStreams(original, highlighted, value) {\n let processed = 0;\n let result = '';\n const nodeStack = [];\n\n function selectStream() {\n if (!original.length || !highlighted.length) {\n return original.length ? original : highlighted;\n }\n if (original[0].offset !== highlighted[0].offset) {\n return (original[0].offset < highlighted[0].offset) ? original : highlighted;\n }\n\n /*\n To avoid starting the stream just before it should stop the order is\n ensured that original always starts first and closes last:\n\n if (event1 == 'start' && event2 == 'start')\n return original;\n if (event1 == 'start' && event2 == 'stop')\n return highlighted;\n if (event1 == 'stop' && event2 == 'start')\n return original;\n if (event1 == 'stop' && event2 == 'stop')\n return highlighted;\n\n ... which is collapsed to:\n */\n return highlighted[0].event === 'start' ? original : highlighted;\n }\n\n /**\n * @param {Node} node\n */\n function open(node) {\n /** @param {Attr} attr */\n function attributeString(attr) {\n return ' ' + attr.nodeName + '=\"' + escapeHTML(attr.value) + '\"';\n }\n // @ts-ignore\n result += '<' + tag(node) + [].map.call(node.attributes, attributeString).join('') + '>';\n }\n\n /**\n * @param {Node} node\n */\n function close(node) {\n result += '';\n }\n\n /**\n * @param {Event} event\n */\n function render(event) {\n (event.event === 'start' ? open : close)(event.node);\n }\n\n while (original.length || highlighted.length) {\n let stream = selectStream();\n result += escapeHTML(value.substring(processed, stream[0].offset));\n processed = stream[0].offset;\n if (stream === original) {\n /*\n On any opening or closing tag of the original markup we first close\n the entire highlighted node stack, then render the original tag along\n with all the following original tags at the same offset and then\n reopen all the tags on the highlighted stack.\n */\n nodeStack.reverse().forEach(close);\n do {\n render(stream.splice(0, 1)[0]);\n stream = selectStream();\n } while (stream === original && stream.length && stream[0].offset === processed);\n nodeStack.reverse().forEach(open);\n } else {\n if (stream[0].event === 'start') {\n nodeStack.push(stream[0].node);\n } else {\n nodeStack.pop();\n }\n render(stream.splice(0, 1)[0]);\n }\n }\n return result + escapeHTML(value.substr(processed));\n}\n\n/*\n\nFor the reasoning behind this please see:\nhttps://github.com/highlightjs/highlight.js/issues/2880#issuecomment-747275419\n\n*/\n\n/**\n * @type {Record}\n */\nconst seenDeprecations = {};\n\n/**\n * @param {string} message\n */\nconst error = (message) => {\n console.error(message);\n};\n\n/**\n * @param {string} message\n * @param {any} args\n */\nconst warn = (message, ...args) => {\n console.log(`WARN: ${message}`, ...args);\n};\n\n/**\n * @param {string} version\n * @param {string} message\n */\nconst deprecated = (version, message) => {\n if (seenDeprecations[`${version}/${message}`]) return;\n\n console.log(`Deprecated as of ${version}. ${message}`);\n seenDeprecations[`${version}/${message}`] = true;\n};\n\n/*\nSyntax highlighting with language autodetection.\nhttps://highlightjs.org/\n*/\n\nconst escape$1 = escapeHTML;\nconst inherit$1 = inherit;\nconst NO_MATCH = Symbol(\"nomatch\");\n\n/**\n * @param {any} hljs - object that is extended (legacy)\n * @returns {HLJSApi}\n */\nconst HLJS = function(hljs) {\n // Global internal variables used within the highlight.js library.\n /** @type {Record} */\n const languages = Object.create(null);\n /** @type {Record} */\n const aliases = Object.create(null);\n /** @type {HLJSPlugin[]} */\n const plugins = [];\n\n // safe/production mode - swallows more errors, tries to keep running\n // even if a single syntax or parse hits a fatal error\n let SAFE_MODE = true;\n const fixMarkupRe = /(^(<[^>]+>|\\t|)+|\\n)/gm;\n const LANGUAGE_NOT_FOUND = \"Could not find the language '{}', did you forget to load/include a language module?\";\n /** @type {Language} */\n const PLAINTEXT_LANGUAGE = { disableAutodetect: true, name: 'Plain text', contains: [] };\n\n // Global options used when within external APIs. This is modified when\n // calling the `hljs.configure` function.\n /** @type HLJSOptions */\n let options = {\n noHighlightRe: /^(no-?highlight)$/i,\n languageDetectRe: /\\blang(?:uage)?-([\\w-]+)\\b/i,\n classPrefix: 'hljs-',\n tabReplace: null,\n useBR: false,\n languages: null,\n // beta configuration options, subject to change, welcome to discuss\n // https://github.com/highlightjs/highlight.js/issues/1086\n __emitter: TokenTreeEmitter\n };\n\n /* Utility functions */\n\n /**\n * Tests a language name to see if highlighting should be skipped\n * @param {string} languageName\n */\n function shouldNotHighlight(languageName) {\n return options.noHighlightRe.test(languageName);\n }\n\n /**\n * @param {HighlightedHTMLElement} block - the HTML element to determine language for\n */\n function blockLanguage(block) {\n let classes = block.className + ' ';\n\n classes += block.parentNode ? block.parentNode.className : '';\n\n // language-* takes precedence over non-prefixed class names.\n const match = options.languageDetectRe.exec(classes);\n if (match) {\n const language = getLanguage(match[1]);\n if (!language) {\n warn(LANGUAGE_NOT_FOUND.replace(\"{}\", match[1]));\n warn(\"Falling back to no-highlight mode for this block.\", block);\n }\n return language ? match[1] : 'no-highlight';\n }\n\n return classes\n .split(/\\s+/)\n .find((_class) => shouldNotHighlight(_class) || getLanguage(_class));\n }\n\n /**\n * Core highlighting function.\n *\n * OLD API\n * highlight(lang, code, ignoreIllegals, continuation)\n *\n * NEW API\n * highlight(code, {lang, ignoreIllegals})\n *\n * @param {string} codeOrlanguageName - the language to use for highlighting\n * @param {string | HighlightOptions} optionsOrCode - the code to highlight\n * @param {boolean} [ignoreIllegals] - whether to ignore illegal matches, default is to bail\n * @param {CompiledMode} [continuation] - current continuation mode, if any\n *\n * @returns {HighlightResult} Result - an object that represents the result\n * @property {string} language - the language name\n * @property {number} relevance - the relevance score\n * @property {string} value - the highlighted HTML code\n * @property {string} code - the original raw code\n * @property {CompiledMode} top - top of the current mode stack\n * @property {boolean} illegal - indicates whether any illegal matches were found\n */\n function highlight(codeOrlanguageName, optionsOrCode, ignoreIllegals, continuation) {\n let code = \"\";\n let languageName = \"\";\n if (typeof optionsOrCode === \"object\") {\n code = codeOrlanguageName;\n ignoreIllegals = optionsOrCode.ignoreIllegals;\n languageName = optionsOrCode.language;\n // continuation not supported at all via the new API\n // eslint-disable-next-line no-undefined\n continuation = undefined;\n } else {\n // old API\n deprecated(\"10.7.0\", \"highlight(lang, code, ...args) has been deprecated.\");\n deprecated(\"10.7.0\", \"Please use highlight(code, options) instead.\\nhttps://github.com/highlightjs/highlight.js/issues/2277\");\n languageName = codeOrlanguageName;\n code = optionsOrCode;\n }\n\n /** @type {BeforeHighlightContext} */\n const context = {\n code,\n language: languageName\n };\n // the plugin can change the desired language or the code to be highlighted\n // just be changing the object it was passed\n fire(\"before:highlight\", context);\n\n // a before plugin can usurp the result completely by providing it's own\n // in which case we don't even need to call highlight\n const result = context.result\n ? context.result\n : _highlight(context.language, context.code, ignoreIllegals, continuation);\n\n result.code = context.code;\n // the plugin can change anything in result to suite it\n fire(\"after:highlight\", result);\n\n return result;\n }\n\n /**\n * private highlight that's used internally and does not fire callbacks\n *\n * @param {string} languageName - the language to use for highlighting\n * @param {string} codeToHighlight - the code to highlight\n * @param {boolean?} [ignoreIllegals] - whether to ignore illegal matches, default is to bail\n * @param {CompiledMode?} [continuation] - current continuation mode, if any\n * @returns {HighlightResult} - result of the highlight operation\n */\n function _highlight(languageName, codeToHighlight, ignoreIllegals, continuation) {\n /**\n * Return keyword data if a match is a keyword\n * @param {CompiledMode} mode - current mode\n * @param {RegExpMatchArray} match - regexp match data\n * @returns {KeywordData | false}\n */\n function keywordData(mode, match) {\n const matchText = language.case_insensitive ? match[0].toLowerCase() : match[0];\n return Object.prototype.hasOwnProperty.call(mode.keywords, matchText) && mode.keywords[matchText];\n }\n\n function processKeywords() {\n if (!top.keywords) {\n emitter.addText(modeBuffer);\n return;\n }\n\n let lastIndex = 0;\n top.keywordPatternRe.lastIndex = 0;\n let match = top.keywordPatternRe.exec(modeBuffer);\n let buf = \"\";\n\n while (match) {\n buf += modeBuffer.substring(lastIndex, match.index);\n const data = keywordData(top, match);\n if (data) {\n const [kind, keywordRelevance] = data;\n emitter.addText(buf);\n buf = \"\";\n\n relevance += keywordRelevance;\n if (kind.startsWith(\"_\")) {\n // _ implied for relevance only, do not highlight\n // by applying a class name\n buf += match[0];\n } else {\n const cssClass = language.classNameAliases[kind] || kind;\n emitter.addKeyword(match[0], cssClass);\n }\n } else {\n buf += match[0];\n }\n lastIndex = top.keywordPatternRe.lastIndex;\n match = top.keywordPatternRe.exec(modeBuffer);\n }\n buf += modeBuffer.substr(lastIndex);\n emitter.addText(buf);\n }\n\n function processSubLanguage() {\n if (modeBuffer === \"\") return;\n /** @type HighlightResult */\n let result = null;\n\n if (typeof top.subLanguage === 'string') {\n if (!languages[top.subLanguage]) {\n emitter.addText(modeBuffer);\n return;\n }\n result = _highlight(top.subLanguage, modeBuffer, true, continuations[top.subLanguage]);\n continuations[top.subLanguage] = /** @type {CompiledMode} */ (result.top);\n } else {\n result = highlightAuto(modeBuffer, top.subLanguage.length ? top.subLanguage : null);\n }\n\n // Counting embedded language score towards the host language may be disabled\n // with zeroing the containing mode relevance. Use case in point is Markdown that\n // allows XML everywhere and makes every XML snippet to have a much larger Markdown\n // score.\n if (top.relevance > 0) {\n relevance += result.relevance;\n }\n emitter.addSublanguage(result.emitter, result.language);\n }\n\n function processBuffer() {\n if (top.subLanguage != null) {\n processSubLanguage();\n } else {\n processKeywords();\n }\n modeBuffer = '';\n }\n\n /**\n * @param {Mode} mode - new mode to start\n */\n function startNewMode(mode) {\n if (mode.className) {\n emitter.openNode(language.classNameAliases[mode.className] || mode.className);\n }\n top = Object.create(mode, { parent: { value: top } });\n return top;\n }\n\n /**\n * @param {CompiledMode } mode - the mode to potentially end\n * @param {RegExpMatchArray} match - the latest match\n * @param {string} matchPlusRemainder - match plus remainder of content\n * @returns {CompiledMode | void} - the next mode, or if void continue on in current mode\n */\n function endOfMode(mode, match, matchPlusRemainder) {\n let matched = startsWith(mode.endRe, matchPlusRemainder);\n\n if (matched) {\n if (mode[\"on:end\"]) {\n const resp = new Response(mode);\n mode[\"on:end\"](match, resp);\n if (resp.isMatchIgnored) matched = false;\n }\n\n if (matched) {\n while (mode.endsParent && mode.parent) {\n mode = mode.parent;\n }\n return mode;\n }\n }\n // even if on:end fires an `ignore` it's still possible\n // that we might trigger the end node because of a parent mode\n if (mode.endsWithParent) {\n return endOfMode(mode.parent, match, matchPlusRemainder);\n }\n }\n\n /**\n * Handle matching but then ignoring a sequence of text\n *\n * @param {string} lexeme - string containing full match text\n */\n function doIgnore(lexeme) {\n if (top.matcher.regexIndex === 0) {\n // no more regexs to potentially match here, so we move the cursor forward one\n // space\n modeBuffer += lexeme[0];\n return 1;\n } else {\n // no need to move the cursor, we still have additional regexes to try and\n // match at this very spot\n resumeScanAtSamePosition = true;\n return 0;\n }\n }\n\n /**\n * Handle the start of a new potential mode match\n *\n * @param {EnhancedMatch} match - the current match\n * @returns {number} how far to advance the parse cursor\n */\n function doBeginMatch(match) {\n const lexeme = match[0];\n const newMode = match.rule;\n\n const resp = new Response(newMode);\n // first internal before callbacks, then the public ones\n const beforeCallbacks = [newMode.__beforeBegin, newMode[\"on:begin\"]];\n for (const cb of beforeCallbacks) {\n if (!cb) continue;\n cb(match, resp);\n if (resp.isMatchIgnored) return doIgnore(lexeme);\n }\n\n if (newMode && newMode.endSameAsBegin) {\n newMode.endRe = escape(lexeme);\n }\n\n if (newMode.skip) {\n modeBuffer += lexeme;\n } else {\n if (newMode.excludeBegin) {\n modeBuffer += lexeme;\n }\n processBuffer();\n if (!newMode.returnBegin && !newMode.excludeBegin) {\n modeBuffer = lexeme;\n }\n }\n startNewMode(newMode);\n // if (mode[\"after:begin\"]) {\n // let resp = new Response(mode);\n // mode[\"after:begin\"](match, resp);\n // }\n return newMode.returnBegin ? 0 : lexeme.length;\n }\n\n /**\n * Handle the potential end of mode\n *\n * @param {RegExpMatchArray} match - the current match\n */\n function doEndMatch(match) {\n const lexeme = match[0];\n const matchPlusRemainder = codeToHighlight.substr(match.index);\n\n const endMode = endOfMode(top, match, matchPlusRemainder);\n if (!endMode) { return NO_MATCH; }\n\n const origin = top;\n if (origin.skip) {\n modeBuffer += lexeme;\n } else {\n if (!(origin.returnEnd || origin.excludeEnd)) {\n modeBuffer += lexeme;\n }\n processBuffer();\n if (origin.excludeEnd) {\n modeBuffer = lexeme;\n }\n }\n do {\n if (top.className) {\n emitter.closeNode();\n }\n if (!top.skip && !top.subLanguage) {\n relevance += top.relevance;\n }\n top = top.parent;\n } while (top !== endMode.parent);\n if (endMode.starts) {\n if (endMode.endSameAsBegin) {\n endMode.starts.endRe = endMode.endRe;\n }\n startNewMode(endMode.starts);\n }\n return origin.returnEnd ? 0 : lexeme.length;\n }\n\n function processContinuations() {\n const list = [];\n for (let current = top; current !== language; current = current.parent) {\n if (current.className) {\n list.unshift(current.className);\n }\n }\n list.forEach(item => emitter.openNode(item));\n }\n\n /** @type {{type?: MatchType, index?: number, rule?: Mode}}} */\n let lastMatch = {};\n\n /**\n * Process an individual match\n *\n * @param {string} textBeforeMatch - text preceeding the match (since the last match)\n * @param {EnhancedMatch} [match] - the match itself\n */\n function processLexeme(textBeforeMatch, match) {\n const lexeme = match && match[0];\n\n // add non-matched text to the current mode buffer\n modeBuffer += textBeforeMatch;\n\n if (lexeme == null) {\n processBuffer();\n return 0;\n }\n\n // we've found a 0 width match and we're stuck, so we need to advance\n // this happens when we have badly behaved rules that have optional matchers to the degree that\n // sometimes they can end up matching nothing at all\n // Ref: https://github.com/highlightjs/highlight.js/issues/2140\n if (lastMatch.type === \"begin\" && match.type === \"end\" && lastMatch.index === match.index && lexeme === \"\") {\n // spit the \"skipped\" character that our regex choked on back into the output sequence\n modeBuffer += codeToHighlight.slice(match.index, match.index + 1);\n if (!SAFE_MODE) {\n /** @type {AnnotatedError} */\n const err = new Error('0 width match regex');\n err.languageName = languageName;\n err.badRule = lastMatch.rule;\n throw err;\n }\n return 1;\n }\n lastMatch = match;\n\n if (match.type === \"begin\") {\n return doBeginMatch(match);\n } else if (match.type === \"illegal\" && !ignoreIllegals) {\n // illegal match, we do not continue processing\n /** @type {AnnotatedError} */\n const err = new Error('Illegal lexeme \"' + lexeme + '\" for mode \"' + (top.className || '') + '\"');\n err.mode = top;\n throw err;\n } else if (match.type === \"end\") {\n const processed = doEndMatch(match);\n if (processed !== NO_MATCH) {\n return processed;\n }\n }\n\n // edge case for when illegal matches $ (end of line) which is technically\n // a 0 width match but not a begin/end match so it's not caught by the\n // first handler (when ignoreIllegals is true)\n if (match.type === \"illegal\" && lexeme === \"\") {\n // advance so we aren't stuck in an infinite loop\n return 1;\n }\n\n // infinite loops are BAD, this is a last ditch catch all. if we have a\n // decent number of iterations yet our index (cursor position in our\n // parsing) still 3x behind our index then something is very wrong\n // so we bail\n if (iterations > 100000 && iterations > match.index * 3) {\n const err = new Error('potential infinite loop, way more iterations than matches');\n throw err;\n }\n\n /*\n Why might be find ourselves here? Only one occasion now. An end match that was\n triggered but could not be completed. When might this happen? When an `endSameasBegin`\n rule sets the end rule to a specific match. Since the overall mode termination rule that's\n being used to scan the text isn't recompiled that means that any match that LOOKS like\n the end (but is not, because it is not an exact match to the beginning) will\n end up here. A definite end match, but when `doEndMatch` tries to \"reapply\"\n the end rule and fails to match, we wind up here, and just silently ignore the end.\n\n This causes no real harm other than stopping a few times too many.\n */\n\n modeBuffer += lexeme;\n return lexeme.length;\n }\n\n const language = getLanguage(languageName);\n if (!language) {\n error(LANGUAGE_NOT_FOUND.replace(\"{}\", languageName));\n throw new Error('Unknown language: \"' + languageName + '\"');\n }\n\n const md = compileLanguage(language, { plugins });\n let result = '';\n /** @type {CompiledMode} */\n let top = continuation || md;\n /** @type Record */\n const continuations = {}; // keep continuations for sub-languages\n const emitter = new options.__emitter(options);\n processContinuations();\n let modeBuffer = '';\n let relevance = 0;\n let index = 0;\n let iterations = 0;\n let resumeScanAtSamePosition = false;\n\n try {\n top.matcher.considerAll();\n\n for (;;) {\n iterations++;\n if (resumeScanAtSamePosition) {\n // only regexes not matched previously will now be\n // considered for a potential match\n resumeScanAtSamePosition = false;\n } else {\n top.matcher.considerAll();\n }\n top.matcher.lastIndex = index;\n\n const match = top.matcher.exec(codeToHighlight);\n // console.log(\"match\", match[0], match.rule && match.rule.begin)\n\n if (!match) break;\n\n const beforeMatch = codeToHighlight.substring(index, match.index);\n const processedCount = processLexeme(beforeMatch, match);\n index = match.index + processedCount;\n }\n processLexeme(codeToHighlight.substr(index));\n emitter.closeAllNodes();\n emitter.finalize();\n result = emitter.toHTML();\n\n return {\n // avoid possible breakage with v10 clients expecting\n // this to always be an integer\n relevance: Math.floor(relevance),\n value: result,\n language: languageName,\n illegal: false,\n emitter: emitter,\n top: top\n };\n } catch (err) {\n if (err.message && err.message.includes('Illegal')) {\n return {\n illegal: true,\n illegalBy: {\n msg: err.message,\n context: codeToHighlight.slice(index - 100, index + 100),\n mode: err.mode\n },\n sofar: result,\n relevance: 0,\n value: escape$1(codeToHighlight),\n emitter: emitter\n };\n } else if (SAFE_MODE) {\n return {\n illegal: false,\n relevance: 0,\n value: escape$1(codeToHighlight),\n emitter: emitter,\n language: languageName,\n top: top,\n errorRaised: err\n };\n } else {\n throw err;\n }\n }\n }\n\n /**\n * returns a valid highlight result, without actually doing any actual work,\n * auto highlight starts with this and it's possible for small snippets that\n * auto-detection may not find a better match\n * @param {string} code\n * @returns {HighlightResult}\n */\n function justTextHighlightResult(code) {\n const result = {\n relevance: 0,\n emitter: new options.__emitter(options),\n value: escape$1(code),\n illegal: false,\n top: PLAINTEXT_LANGUAGE\n };\n result.emitter.addText(code);\n return result;\n }\n\n /**\n Highlighting with language detection. Accepts a string with the code to\n highlight. Returns an object with the following properties:\n\n - language (detected language)\n - relevance (int)\n - value (an HTML string with highlighting markup)\n - second_best (object with the same structure for second-best heuristically\n detected language, may be absent)\n\n @param {string} code\n @param {Array} [languageSubset]\n @returns {AutoHighlightResult}\n */\n function highlightAuto(code, languageSubset) {\n languageSubset = languageSubset || options.languages || Object.keys(languages);\n const plaintext = justTextHighlightResult(code);\n\n const results = languageSubset.filter(getLanguage).filter(autoDetection).map(name =>\n _highlight(name, code, false)\n );\n results.unshift(plaintext); // plaintext is always an option\n\n const sorted = results.sort((a, b) => {\n // sort base on relevance\n if (a.relevance !== b.relevance) return b.relevance - a.relevance;\n\n // always award the tie to the base language\n // ie if C++ and Arduino are tied, it's more likely to be C++\n if (a.language && b.language) {\n if (getLanguage(a.language).supersetOf === b.language) {\n return 1;\n } else if (getLanguage(b.language).supersetOf === a.language) {\n return -1;\n }\n }\n\n // otherwise say they are equal, which has the effect of sorting on\n // relevance while preserving the original ordering - which is how ties\n // have historically been settled, ie the language that comes first always\n // wins in the case of a tie\n return 0;\n });\n\n const [best, secondBest] = sorted;\n\n /** @type {AutoHighlightResult} */\n const result = best;\n result.second_best = secondBest;\n\n return result;\n }\n\n /**\n Post-processing of the highlighted markup:\n\n - replace TABs with something more useful\n - replace real line-breaks with '
    ' for non-pre containers\n\n @param {string} html\n @returns {string}\n */\n function fixMarkup(html) {\n if (!(options.tabReplace || options.useBR)) {\n return html;\n }\n\n return html.replace(fixMarkupRe, match => {\n if (match === '\\n') {\n return options.useBR ? '
    ' : match;\n } else if (options.tabReplace) {\n return match.replace(/\\t/g, options.tabReplace);\n }\n return match;\n });\n }\n\n /**\n * Builds new class name for block given the language name\n *\n * @param {HTMLElement} element\n * @param {string} [currentLang]\n * @param {string} [resultLang]\n */\n function updateClassName(element, currentLang, resultLang) {\n const language = currentLang ? aliases[currentLang] : resultLang;\n\n element.classList.add(\"hljs\");\n if (language) element.classList.add(language);\n }\n\n /** @type {HLJSPlugin} */\n const brPlugin = {\n \"before:highlightElement\": ({ el }) => {\n if (options.useBR) {\n el.innerHTML = el.innerHTML.replace(/\\n/g, '').replace(//g, '\\n');\n }\n },\n \"after:highlightElement\": ({ result }) => {\n if (options.useBR) {\n result.value = result.value.replace(/\\n/g, \"
    \");\n }\n }\n };\n\n const TAB_REPLACE_RE = /^(<[^>]+>|\\t)+/gm;\n /** @type {HLJSPlugin} */\n const tabReplacePlugin = {\n \"after:highlightElement\": ({ result }) => {\n if (options.tabReplace) {\n result.value = result.value.replace(TAB_REPLACE_RE, (m) =>\n m.replace(/\\t/g, options.tabReplace)\n );\n }\n }\n };\n\n /**\n * Applies highlighting to a DOM node containing code. Accepts a DOM node and\n * two optional parameters for fixMarkup.\n *\n * @param {HighlightedHTMLElement} element - the HTML element to highlight\n */\n function highlightElement(element) {\n /** @type HTMLElement */\n let node = null;\n const language = blockLanguage(element);\n\n if (shouldNotHighlight(language)) return;\n\n // support for v10 API\n fire(\"before:highlightElement\",\n { el: element, language: language });\n\n node = element;\n const text = node.textContent;\n const result = language ? highlight(text, { language, ignoreIllegals: true }) : highlightAuto(text);\n\n // support for v10 API\n fire(\"after:highlightElement\", { el: element, result, text });\n\n element.innerHTML = result.value;\n updateClassName(element, language, result.language);\n element.result = {\n language: result.language,\n // TODO: remove with version 11.0\n re: result.relevance,\n relavance: result.relevance\n };\n if (result.second_best) {\n element.second_best = {\n language: result.second_best.language,\n // TODO: remove with version 11.0\n re: result.second_best.relevance,\n relavance: result.second_best.relevance\n };\n }\n }\n\n /**\n * Updates highlight.js global options with the passed options\n *\n * @param {Partial} userOptions\n */\n function configure(userOptions) {\n if (userOptions.useBR) {\n deprecated(\"10.3.0\", \"'useBR' will be removed entirely in v11.0\");\n deprecated(\"10.3.0\", \"Please see https://github.com/highlightjs/highlight.js/issues/2559\");\n }\n options = inherit$1(options, userOptions);\n }\n\n /**\n * Highlights to all
     blocks on a page\n   *\n   * @type {Function & {called?: boolean}}\n   */\n  // TODO: remove v12, deprecated\n  const initHighlighting = () => {\n    if (initHighlighting.called) return;\n    initHighlighting.called = true;\n\n    deprecated(\"10.6.0\", \"initHighlighting() is deprecated.  Use highlightAll() instead.\");\n\n    const blocks = document.querySelectorAll('pre code');\n    blocks.forEach(highlightElement);\n  };\n\n  // Higlights all when DOMContentLoaded fires\n  // TODO: remove v12, deprecated\n  function initHighlightingOnLoad() {\n    deprecated(\"10.6.0\", \"initHighlightingOnLoad() is deprecated.  Use highlightAll() instead.\");\n    wantsHighlight = true;\n  }\n\n  let wantsHighlight = false;\n\n  /**\n   * auto-highlights all pre>code elements on the page\n   */\n  function highlightAll() {\n    // if we are called too early in the loading process\n    if (document.readyState === \"loading\") {\n      wantsHighlight = true;\n      return;\n    }\n\n    const blocks = document.querySelectorAll('pre code');\n    blocks.forEach(highlightElement);\n  }\n\n  function boot() {\n    // if a highlight was requested before DOM was loaded, do now\n    if (wantsHighlight) highlightAll();\n  }\n\n  // make sure we are in the browser environment\n  if (typeof window !== 'undefined' && window.addEventListener) {\n    window.addEventListener('DOMContentLoaded', boot, false);\n  }\n\n  /**\n   * Register a language grammar module\n   *\n   * @param {string} languageName\n   * @param {LanguageFn} languageDefinition\n   */\n  function registerLanguage(languageName, languageDefinition) {\n    let lang = null;\n    try {\n      lang = languageDefinition(hljs);\n    } catch (error$1) {\n      error(\"Language definition for '{}' could not be registered.\".replace(\"{}\", languageName));\n      // hard or soft error\n      if (!SAFE_MODE) { throw error$1; } else { error(error$1); }\n      // languages that have serious errors are replaced with essentially a\n      // \"plaintext\" stand-in so that the code blocks will still get normal\n      // css classes applied to them - and one bad language won't break the\n      // entire highlighter\n      lang = PLAINTEXT_LANGUAGE;\n    }\n    // give it a temporary name if it doesn't have one in the meta-data\n    if (!lang.name) lang.name = languageName;\n    languages[languageName] = lang;\n    lang.rawDefinition = languageDefinition.bind(null, hljs);\n\n    if (lang.aliases) {\n      registerAliases(lang.aliases, { languageName });\n    }\n  }\n\n  /**\n   * Remove a language grammar module\n   *\n   * @param {string} languageName\n   */\n  function unregisterLanguage(languageName) {\n    delete languages[languageName];\n    for (const alias of Object.keys(aliases)) {\n      if (aliases[alias] === languageName) {\n        delete aliases[alias];\n      }\n    }\n  }\n\n  /**\n   * @returns {string[]} List of language internal names\n   */\n  function listLanguages() {\n    return Object.keys(languages);\n  }\n\n  /**\n    intended usage: When one language truly requires another\n\n    Unlike `getLanguage`, this will throw when the requested language\n    is not available.\n\n    @param {string} name - name of the language to fetch/require\n    @returns {Language | never}\n  */\n  function requireLanguage(name) {\n    deprecated(\"10.4.0\", \"requireLanguage will be removed entirely in v11.\");\n    deprecated(\"10.4.0\", \"Please see https://github.com/highlightjs/highlight.js/pull/2844\");\n\n    const lang = getLanguage(name);\n    if (lang) { return lang; }\n\n    const err = new Error('The \\'{}\\' language is required, but not loaded.'.replace('{}', name));\n    throw err;\n  }\n\n  /**\n   * @param {string} name - name of the language to retrieve\n   * @returns {Language | undefined}\n   */\n  function getLanguage(name) {\n    name = (name || '').toLowerCase();\n    return languages[name] || languages[aliases[name]];\n  }\n\n  /**\n   *\n   * @param {string|string[]} aliasList - single alias or list of aliases\n   * @param {{languageName: string}} opts\n   */\n  function registerAliases(aliasList, { languageName }) {\n    if (typeof aliasList === 'string') {\n      aliasList = [aliasList];\n    }\n    aliasList.forEach(alias => { aliases[alias.toLowerCase()] = languageName; });\n  }\n\n  /**\n   * Determines if a given language has auto-detection enabled\n   * @param {string} name - name of the language\n   */\n  function autoDetection(name) {\n    const lang = getLanguage(name);\n    return lang && !lang.disableAutodetect;\n  }\n\n  /**\n   * Upgrades the old highlightBlock plugins to the new\n   * highlightElement API\n   * @param {HLJSPlugin} plugin\n   */\n  function upgradePluginAPI(plugin) {\n    // TODO: remove with v12\n    if (plugin[\"before:highlightBlock\"] && !plugin[\"before:highlightElement\"]) {\n      plugin[\"before:highlightElement\"] = (data) => {\n        plugin[\"before:highlightBlock\"](\n          Object.assign({ block: data.el }, data)\n        );\n      };\n    }\n    if (plugin[\"after:highlightBlock\"] && !plugin[\"after:highlightElement\"]) {\n      plugin[\"after:highlightElement\"] = (data) => {\n        plugin[\"after:highlightBlock\"](\n          Object.assign({ block: data.el }, data)\n        );\n      };\n    }\n  }\n\n  /**\n   * @param {HLJSPlugin} plugin\n   */\n  function addPlugin(plugin) {\n    upgradePluginAPI(plugin);\n    plugins.push(plugin);\n  }\n\n  /**\n   *\n   * @param {PluginEvent} event\n   * @param {any} args\n   */\n  function fire(event, args) {\n    const cb = event;\n    plugins.forEach(function(plugin) {\n      if (plugin[cb]) {\n        plugin[cb](args);\n      }\n    });\n  }\n\n  /**\n  Note: fixMarkup is deprecated and will be removed entirely in v11\n\n  @param {string} arg\n  @returns {string}\n  */\n  function deprecateFixMarkup(arg) {\n    deprecated(\"10.2.0\", \"fixMarkup will be removed entirely in v11.0\");\n    deprecated(\"10.2.0\", \"Please see https://github.com/highlightjs/highlight.js/issues/2534\");\n\n    return fixMarkup(arg);\n  }\n\n  /**\n   *\n   * @param {HighlightedHTMLElement} el\n   */\n  function deprecateHighlightBlock(el) {\n    deprecated(\"10.7.0\", \"highlightBlock will be removed entirely in v12.0\");\n    deprecated(\"10.7.0\", \"Please use highlightElement now.\");\n\n    return highlightElement(el);\n  }\n\n  /* Interface definition */\n  Object.assign(hljs, {\n    highlight,\n    highlightAuto,\n    highlightAll,\n    fixMarkup: deprecateFixMarkup,\n    highlightElement,\n    // TODO: Remove with v12 API\n    highlightBlock: deprecateHighlightBlock,\n    configure,\n    initHighlighting,\n    initHighlightingOnLoad,\n    registerLanguage,\n    unregisterLanguage,\n    listLanguages,\n    getLanguage,\n    registerAliases,\n    requireLanguage,\n    autoDetection,\n    inherit: inherit$1,\n    addPlugin,\n    // plugins for frameworks\n    vuePlugin: BuildVuePlugin(hljs).VuePlugin\n  });\n\n  hljs.debugMode = function() { SAFE_MODE = false; };\n  hljs.safeMode = function() { SAFE_MODE = true; };\n  hljs.versionString = version;\n\n  for (const key in MODES) {\n    // @ts-ignore\n    if (typeof MODES[key] === \"object\") {\n      // @ts-ignore\n      deepFreezeEs6(MODES[key]);\n    }\n  }\n\n  // merge all the modes/regexs into our main object\n  Object.assign(hljs, MODES);\n\n  // built-in plugins, likely to be moved out of core in the future\n  hljs.addPlugin(brPlugin); // slated to be removed in v11\n  hljs.addPlugin(mergeHTMLPlugin);\n  hljs.addPlugin(tabReplacePlugin);\n  return hljs;\n};\n\n// export an \"instance\" of the highlighter\nvar highlight = HLJS({});\n\nmodule.exports = highlight;\n","/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n  if (!re) return null;\n  if (typeof re === \"string\") return re;\n\n  return re.source;\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction lookahead(re) {\n  return concat('(?=', re, ')');\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n  const joined = args.map((x) => source(x)).join(\"\");\n  return joined;\n}\n\n/*\nLanguage: Python\nDescription: Python is an interpreted, object-oriented, high-level programming language with dynamic semantics.\nWebsite: https://www.python.org\nCategory: common\n*/\n\nfunction python(hljs) {\n  const RESERVED_WORDS = [\n    'and',\n    'as',\n    'assert',\n    'async',\n    'await',\n    'break',\n    'class',\n    'continue',\n    'def',\n    'del',\n    'elif',\n    'else',\n    'except',\n    'finally',\n    'for',\n    'from',\n    'global',\n    'if',\n    'import',\n    'in',\n    'is',\n    'lambda',\n    'nonlocal|10',\n    'not',\n    'or',\n    'pass',\n    'raise',\n    'return',\n    'try',\n    'while',\n    'with',\n    'yield'\n  ];\n\n  const BUILT_INS = [\n    '__import__',\n    'abs',\n    'all',\n    'any',\n    'ascii',\n    'bin',\n    'bool',\n    'breakpoint',\n    'bytearray',\n    'bytes',\n    'callable',\n    'chr',\n    'classmethod',\n    'compile',\n    'complex',\n    'delattr',\n    'dict',\n    'dir',\n    'divmod',\n    'enumerate',\n    'eval',\n    'exec',\n    'filter',\n    'float',\n    'format',\n    'frozenset',\n    'getattr',\n    'globals',\n    'hasattr',\n    'hash',\n    'help',\n    'hex',\n    'id',\n    'input',\n    'int',\n    'isinstance',\n    'issubclass',\n    'iter',\n    'len',\n    'list',\n    'locals',\n    'map',\n    'max',\n    'memoryview',\n    'min',\n    'next',\n    'object',\n    'oct',\n    'open',\n    'ord',\n    'pow',\n    'print',\n    'property',\n    'range',\n    'repr',\n    'reversed',\n    'round',\n    'set',\n    'setattr',\n    'slice',\n    'sorted',\n    'staticmethod',\n    'str',\n    'sum',\n    'super',\n    'tuple',\n    'type',\n    'vars',\n    'zip'\n  ];\n\n  const LITERALS = [\n    '__debug__',\n    'Ellipsis',\n    'False',\n    'None',\n    'NotImplemented',\n    'True'\n  ];\n\n  // https://docs.python.org/3/library/typing.html\n  // TODO: Could these be supplemented by a CamelCase matcher in certain\n  // contexts, leaving these remaining only for relevance hinting?\n  const TYPES = [\n    \"Any\",\n    \"Callable\",\n    \"Coroutine\",\n    \"Dict\",\n    \"List\",\n    \"Literal\",\n    \"Generic\",\n    \"Optional\",\n    \"Sequence\",\n    \"Set\",\n    \"Tuple\",\n    \"Type\",\n    \"Union\"\n  ];\n\n  const KEYWORDS = {\n    $pattern: /[A-Za-z]\\w+|__\\w+__/,\n    keyword: RESERVED_WORDS,\n    built_in: BUILT_INS,\n    literal: LITERALS,\n    type: TYPES\n  };\n\n  const PROMPT = {\n    className: 'meta',\n    begin: /^(>>>|\\.\\.\\.) /\n  };\n\n  const SUBST = {\n    className: 'subst',\n    begin: /\\{/,\n    end: /\\}/,\n    keywords: KEYWORDS,\n    illegal: /#/\n  };\n\n  const LITERAL_BRACKET = {\n    begin: /\\{\\{/,\n    relevance: 0\n  };\n\n  const STRING = {\n    className: 'string',\n    contains: [ hljs.BACKSLASH_ESCAPE ],\n    variants: [\n      {\n        begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,\n        end: /'''/,\n        contains: [\n          hljs.BACKSLASH_ESCAPE,\n          PROMPT\n        ],\n        relevance: 10\n      },\n      {\n        begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?\"\"\"/,\n        end: /\"\"\"/,\n        contains: [\n          hljs.BACKSLASH_ESCAPE,\n          PROMPT\n        ],\n        relevance: 10\n      },\n      {\n        begin: /([fF][rR]|[rR][fF]|[fF])'''/,\n        end: /'''/,\n        contains: [\n          hljs.BACKSLASH_ESCAPE,\n          PROMPT,\n          LITERAL_BRACKET,\n          SUBST\n        ]\n      },\n      {\n        begin: /([fF][rR]|[rR][fF]|[fF])\"\"\"/,\n        end: /\"\"\"/,\n        contains: [\n          hljs.BACKSLASH_ESCAPE,\n          PROMPT,\n          LITERAL_BRACKET,\n          SUBST\n        ]\n      },\n      {\n        begin: /([uU]|[rR])'/,\n        end: /'/,\n        relevance: 10\n      },\n      {\n        begin: /([uU]|[rR])\"/,\n        end: /\"/,\n        relevance: 10\n      },\n      {\n        begin: /([bB]|[bB][rR]|[rR][bB])'/,\n        end: /'/\n      },\n      {\n        begin: /([bB]|[bB][rR]|[rR][bB])\"/,\n        end: /\"/\n      },\n      {\n        begin: /([fF][rR]|[rR][fF]|[fF])'/,\n        end: /'/,\n        contains: [\n          hljs.BACKSLASH_ESCAPE,\n          LITERAL_BRACKET,\n          SUBST\n        ]\n      },\n      {\n        begin: /([fF][rR]|[rR][fF]|[fF])\"/,\n        end: /\"/,\n        contains: [\n          hljs.BACKSLASH_ESCAPE,\n          LITERAL_BRACKET,\n          SUBST\n        ]\n      },\n      hljs.APOS_STRING_MODE,\n      hljs.QUOTE_STRING_MODE\n    ]\n  };\n\n  // https://docs.python.org/3.9/reference/lexical_analysis.html#numeric-literals\n  const digitpart = '[0-9](_?[0-9])*';\n  const pointfloat = `(\\\\b(${digitpart}))?\\\\.(${digitpart})|\\\\b(${digitpart})\\\\.`;\n  const NUMBER = {\n    className: 'number',\n    relevance: 0,\n    variants: [\n      // exponentfloat, pointfloat\n      // https://docs.python.org/3.9/reference/lexical_analysis.html#floating-point-literals\n      // optionally imaginary\n      // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals\n      // Note: no leading \\b because floats can start with a decimal point\n      // and we don't want to mishandle e.g. `fn(.5)`,\n      // no trailing \\b for pointfloat because it can end with a decimal point\n      // and we don't want to mishandle e.g. `0..hex()`; this should be safe\n      // because both MUST contain a decimal point and so cannot be confused with\n      // the interior part of an identifier\n      {\n        begin: `(\\\\b(${digitpart})|(${pointfloat}))[eE][+-]?(${digitpart})[jJ]?\\\\b`\n      },\n      {\n        begin: `(${pointfloat})[jJ]?`\n      },\n\n      // decinteger, bininteger, octinteger, hexinteger\n      // https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals\n      // optionally \"long\" in Python 2\n      // https://docs.python.org/2.7/reference/lexical_analysis.html#integer-and-long-integer-literals\n      // decinteger is optionally imaginary\n      // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals\n      {\n        begin: '\\\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\\\b'\n      },\n      {\n        begin: '\\\\b0[bB](_?[01])+[lL]?\\\\b'\n      },\n      {\n        begin: '\\\\b0[oO](_?[0-7])+[lL]?\\\\b'\n      },\n      {\n        begin: '\\\\b0[xX](_?[0-9a-fA-F])+[lL]?\\\\b'\n      },\n\n      // imagnumber (digitpart-based)\n      // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals\n      {\n        begin: `\\\\b(${digitpart})[jJ]\\\\b`\n      }\n    ]\n  };\n  const COMMENT_TYPE = {\n    className: \"comment\",\n    begin: lookahead(/# type:/),\n    end: /$/,\n    keywords: KEYWORDS,\n    contains: [\n      { // prevent keywords from coloring `type`\n        begin: /# type:/\n      },\n      // comment within a datatype comment includes no keywords\n      {\n        begin: /#/,\n        end: /\\b\\B/,\n        endsWithParent: true\n      }\n    ]\n  };\n  const PARAMS = {\n    className: 'params',\n    variants: [\n      // Exclude params in functions without params\n      {\n        className: \"\",\n        begin: /\\(\\s*\\)/,\n        skip: true\n      },\n      {\n        begin: /\\(/,\n        end: /\\)/,\n        excludeBegin: true,\n        excludeEnd: true,\n        keywords: KEYWORDS,\n        contains: [\n          'self',\n          PROMPT,\n          NUMBER,\n          STRING,\n          hljs.HASH_COMMENT_MODE\n        ]\n      }\n    ]\n  };\n  SUBST.contains = [\n    STRING,\n    NUMBER,\n    PROMPT\n  ];\n\n  return {\n    name: 'Python',\n    aliases: [\n      'py',\n      'gyp',\n      'ipython'\n    ],\n    keywords: KEYWORDS,\n    illegal: /(<\\/|->|\\?)|=>/,\n    contains: [\n      PROMPT,\n      NUMBER,\n      {\n        // very common convention\n        begin: /\\bself\\b/\n      },\n      {\n        // eat \"if\" prior to string so that it won't accidentally be\n        // labeled as an f-string\n        beginKeywords: \"if\",\n        relevance: 0\n      },\n      STRING,\n      COMMENT_TYPE,\n      hljs.HASH_COMMENT_MODE,\n      {\n        variants: [\n          {\n            className: 'function',\n            beginKeywords: 'def'\n          },\n          {\n            className: 'class',\n            beginKeywords: 'class'\n          }\n        ],\n        end: /:/,\n        illegal: /[${=;\\n,]/,\n        contains: [\n          hljs.UNDERSCORE_TITLE_MODE,\n          PARAMS,\n          {\n            begin: /->/,\n            endsWithParent: true,\n            keywords: KEYWORDS\n          }\n        ]\n      },\n      {\n        className: 'meta',\n        begin: /^[\\t ]*@/,\n        end: /(?=#)|$/,\n        contains: [\n          NUMBER,\n          PARAMS,\n          STRING\n        ]\n      }\n    ]\n  };\n}\n\nmodule.exports = python;\n","/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n  if (!re) return null;\n  if (typeof re === \"string\") return re;\n\n  return re.source;\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction lookahead(re) {\n  return concat('(?=', re, ')');\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction optional(re) {\n  return concat('(', re, ')?');\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n  const joined = args.map((x) => source(x)).join(\"\");\n  return joined;\n}\n\n/**\n * Any of the passed expresssions may match\n *\n * Creates a huge this | this | that | that match\n * @param {(RegExp | string)[] } args\n * @returns {string}\n */\nfunction either(...args) {\n  const joined = '(' + args.map((x) => source(x)).join(\"|\") + \")\";\n  return joined;\n}\n\n/*\nLanguage: HTML, XML\nWebsite: https://www.w3.org/XML/\nCategory: common\nAudit: 2020\n*/\n\n/** @type LanguageFn */\nfunction xml(hljs) {\n  // Element names can contain letters, digits, hyphens, underscores, and periods\n  const TAG_NAME_RE = concat(/[A-Z_]/, optional(/[A-Z0-9_.-]*:/), /[A-Z0-9_.-]*/);\n  const XML_IDENT_RE = /[A-Za-z0-9._:-]+/;\n  const XML_ENTITIES = {\n    className: 'symbol',\n    begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/\n  };\n  const XML_META_KEYWORDS = {\n    begin: /\\s/,\n    contains: [\n      {\n        className: 'meta-keyword',\n        begin: /#?[a-z_][a-z1-9_-]+/,\n        illegal: /\\n/\n      }\n    ]\n  };\n  const XML_META_PAR_KEYWORDS = hljs.inherit(XML_META_KEYWORDS, {\n    begin: /\\(/,\n    end: /\\)/\n  });\n  const APOS_META_STRING_MODE = hljs.inherit(hljs.APOS_STRING_MODE, {\n    className: 'meta-string'\n  });\n  const QUOTE_META_STRING_MODE = hljs.inherit(hljs.QUOTE_STRING_MODE, {\n    className: 'meta-string'\n  });\n  const TAG_INTERNALS = {\n    endsWithParent: true,\n    illegal: /`]+/\n              }\n            ]\n          }\n        ]\n      }\n    ]\n  };\n  return {\n    name: 'HTML, XML',\n    aliases: [\n      'html',\n      'xhtml',\n      'rss',\n      'atom',\n      'xjb',\n      'xsd',\n      'xsl',\n      'plist',\n      'wsf',\n      'svg'\n    ],\n    case_insensitive: true,\n    contains: [\n      {\n        className: 'meta',\n        begin: //,\n        relevance: 10,\n        contains: [\n          XML_META_KEYWORDS,\n          QUOTE_META_STRING_MODE,\n          APOS_META_STRING_MODE,\n          XML_META_PAR_KEYWORDS,\n          {\n            begin: /\\[/,\n            end: /\\]/,\n            contains: [\n              {\n                className: 'meta',\n                begin: //,\n                contains: [\n                  XML_META_KEYWORDS,\n                  XML_META_PAR_KEYWORDS,\n                  QUOTE_META_STRING_MODE,\n                  APOS_META_STRING_MODE\n                ]\n              }\n            ]\n          }\n        ]\n      },\n      hljs.COMMENT(\n        //,\n        {\n          relevance: 10\n        }\n      ),\n      {\n        begin: //,\n        relevance: 10\n      },\n      XML_ENTITIES,\n      {\n        className: 'meta',\n        begin: /<\\?xml/,\n        end: /\\?>/,\n        relevance: 10\n      },\n      {\n        className: 'tag',\n        /*\n        The lookahead pattern (?=...) ensures that 'begin' only matches\n        ')/,\n        end: />/,\n        keywords: {\n          name: 'style'\n        },\n        contains: [ TAG_INTERNALS ],\n        starts: {\n          end: /<\\/style>/,\n          returnEnd: true,\n          subLanguage: [\n            'css',\n            'xml'\n          ]\n        }\n      },\n      {\n        className: 'tag',\n        // See the comment in the