diff --git a/README.md b/README.md index cab579080..419bed4de 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,10 @@ See [website overview](/website) for more information about the Swift.org websit Swift.org uses [Jekyll](https://jekyllrb.com), a blog-aware, static site generator in Ruby. +## Calendar Updates + +Update Calendar events in [calendar.yml](/_data/calendar.yml) (events are Pacific Time Zone) + ### Running locally Requirements diff --git a/_data/calendar.yml b/_data/calendar.yml new file mode 100644 index 000000000..fe5e1d670 --- /dev/null +++ b/_data/calendar.yml @@ -0,0 +1,14 @@ +- date: 2023-3-22 + entries: + - name: Test 1 + description: Description 1 + location: Location 1 + url: https://www.swift.org + start: "08:30:00" + duration: 0H30M + - name: Test 2 + description: Description 2 + location: Location 2 + url: https://www.swift.org + start: "18:00:00" + duration: 2H30M diff --git a/_data/navigation.yml b/_data/navigation.yml index 6867ba0ff..b76072d03 100644 --- a/_data/navigation.yml +++ b/_data/navigation.yml @@ -68,6 +68,8 @@ name: license - title: Forums name: forums + - title: Calendar + url: /calendar/ - title: Diversity url: /diversity/ sections: diff --git a/assets/javascripts/color-scheme-toggle.js b/assets/javascripts/color-scheme-toggle.js index fc5875236..193ba804b 100644 --- a/assets/javascripts/color-scheme-toggle.js +++ b/assets/javascripts/color-scheme-toggle.js @@ -134,6 +134,15 @@ function getColorSchemeAttribute() { function updateColorSchemeAttribute(color) { document.body.setAttribute('data-color-scheme', color); + setupComponentsColorScheme(); +} + +function setupComponentsColorScheme() { + setTimeout(() => { + if (document.querySelector('swift-calendar')) { + document.querySelector('swift-calendar').setAttribute('theme', getColorSchemeAttribute()); + } + }) } function preferredColorSchemeSetting() { @@ -179,4 +188,6 @@ function ready() { getToggleRadioNodeList().addEventListener('change', (e) => { setColorSchemeFor(e.target.value); }); + + setupComponentsColorScheme(); } diff --git a/assets/javascripts/web-components/components/assets/close-dark.png b/assets/javascripts/web-components/components/assets/close-dark.png new file mode 100644 index 000000000..01626427d Binary files /dev/null and b/assets/javascripts/web-components/components/assets/close-dark.png differ diff --git a/assets/javascripts/web-components/components/assets/close-light.png b/assets/javascripts/web-components/components/assets/close-light.png new file mode 100644 index 000000000..8cec08502 Binary files /dev/null and b/assets/javascripts/web-components/components/assets/close-light.png differ diff --git a/assets/javascripts/web-components/components/assets/next-dark.png b/assets/javascripts/web-components/components/assets/next-dark.png new file mode 100644 index 000000000..bc183e103 Binary files /dev/null and b/assets/javascripts/web-components/components/assets/next-dark.png differ diff --git a/assets/javascripts/web-components/components/assets/next-light.png b/assets/javascripts/web-components/components/assets/next-light.png new file mode 100644 index 000000000..10735046c Binary files /dev/null and b/assets/javascripts/web-components/components/assets/next-light.png differ diff --git a/assets/javascripts/web-components/components/assets/prev-dark.png b/assets/javascripts/web-components/components/assets/prev-dark.png new file mode 100644 index 000000000..f1703e88c Binary files /dev/null and b/assets/javascripts/web-components/components/assets/prev-dark.png differ diff --git a/assets/javascripts/web-components/components/assets/prev-light.png b/assets/javascripts/web-components/components/assets/prev-light.png new file mode 100644 index 000000000..2c2295406 Binary files /dev/null and b/assets/javascripts/web-components/components/assets/prev-light.png differ diff --git a/assets/javascripts/web-components/components/files/SwiftEvents.ics b/assets/javascripts/web-components/components/files/SwiftEvents.ics new file mode 100644 index 000000000..5e17d019c --- /dev/null +++ b/assets/javascripts/web-components/components/files/SwiftEvents.ics @@ -0,0 +1,39 @@ +--- +layout: none +--- +BEGIN:VCALENDAR +VERSION:2.0 +CALSCALE:GREGORIAN +BEGIN:VTIMEZONE +TZID:America/Los_Angeles +BEGIN:DAYLIGHT +TZOFFSETFROM:-0800 +RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU +TZNAME:PDT +TZOFFSETTO:-0700 +END:DAYLIGHT +BEGIN:STANDARD +TZOFFSETFROM:-0700 +RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU +TZNAME:PST +TZOFFSETTO:-0800 +END:STANDARD +END:VTIMEZONE +PRODID:Swift Calendar +METHOD:PUBLISH +X-PUBLISHED-TTL:PT1H +{% for calendar in site.data.calendar %} +{% for entry in calendar.entries %} +BEGIN:VEVENT +UID:{{ calendar.date | date: "%Y%m%d" }}{{ entry.name }}@swift.org +SUMMARY:{{ entry.name }} +DTSTAMP:{{ site.time | date: "%Y%m%dT%H%M%S" }} +DTSTART;TZID="America/Los_Angeles":{{ calendar.date | append:" " | append:entry.start | append:" " | append:"-0700" | date: "%Y%m%dT%H%M%S" }} +DESCRIPTION:{{ entry.description }} +URL:{{ entry.url }} +LOCATION:{{ entry.location }} +DURATION:PT{{ entry.duration }} +END:VEVENT +{% endfor %} +{% endfor %} +END:VCALENDAR diff --git a/assets/javascripts/web-components/components/files/feed.xml b/assets/javascripts/web-components/components/files/feed.xml new file mode 100644 index 000000000..760297796 --- /dev/null +++ b/assets/javascripts/web-components/components/files/feed.xml @@ -0,0 +1,22 @@ +--- +layout: none +--- + + + + {{ "Swift Calendar" | xml_escape }} + {{ "Swift Calendar" | xml_escape }} + https://www.swift.org + + {{ site.time | date_to_rfc822 }} + {{ site.time | date_to_rfc822 }} + {% for calendar in site.data.calendar %} + {% for entry in calendar.entries %} + + {{ entry.name | xml_escape }} + {{ entry.description | xml_escape }} + + {% endfor %} + {% endfor %} + + diff --git a/assets/javascripts/web-components/index.esm.js b/assets/javascripts/web-components/index.esm.js new file mode 100644 index 000000000..54c3b6281 --- /dev/null +++ b/assets/javascripts/web-components/index.esm.js @@ -0,0 +1,2 @@ + +//# sourceMappingURL=index.esm.js.map \ No newline at end of file diff --git a/assets/javascripts/web-components/index.esm.js.map b/assets/javascripts/web-components/index.esm.js.map new file mode 100644 index 000000000..3e517f16b --- /dev/null +++ b/assets/javascripts/web-components/index.esm.js.map @@ -0,0 +1 @@ +{"version":3,"names":[],"sources":[],"mappings":""} \ No newline at end of file diff --git a/assets/javascripts/web-components/p-6c241004.js b/assets/javascripts/web-components/p-6c241004.js new file mode 100644 index 000000000..11f6372fb --- /dev/null +++ b/assets/javascripts/web-components/p-6c241004.js @@ -0,0 +1,3 @@ +const t="web-components-stencil";let e;let n;let s;let l=false;let o=false;let c=false;let i=false;let f=false;const r=t=>{const e=new URL(t,Ct.t);return e.origin!==jt.location.origin?e.href:e.pathname};const u=(t,e="")=>{{return()=>{}}};const a=(t,e)=>{{return()=>{}}};const d="{visibility:hidden}.hydrated{visibility:inherit}";const h={};const $=t=>t!=null;const p=t=>{t=typeof t;return t==="object"||t==="function"};function y(t){var e,n,s;return(s=(n=(e=t.head)===null||e===void 0?void 0:e.querySelector('meta[name="csp-nonce"]'))===null||n===void 0?void 0:n.getAttribute("content"))!==null&&s!==void 0?s:undefined}const m=(t,e,...n)=>{let s=null;let l=null;let o=false;let c=false;const i=[];const f=e=>{for(let n=0;nt[e])).join(" ")}}}if(typeof t==="function"){return t(e===null?{}:e,i,S)}const r=b(t,null);r.o=e;if(i.length>0){r.i=i}{r.u=l}return r};const b=(t,e)=>{const n={h:0,$:t,l:e,p:null,i:null};{n.o=null}{n.u=null}return n};const w={};const v=t=>t&&t.$===w;const S={forEach:(t,e)=>t.map(g).forEach(e),map:(t,e)=>t.map(g).map(e).map(k)};const g=t=>({vattrs:t.o,vchildren:t.i,vkey:t.m,vname:t.u,vtag:t.$,vtext:t.l});const k=t=>{if(typeof t.vtag==="function"){const e=Object.assign({},t.vattrs);if(t.vkey){e.key=t.vkey}if(t.vname){e.name=t.vname}return m(t.vtag,e,...t.vchildren||[])}const e=b(t.vtag,t.vtext);e.o=t.vattrs;e.i=t.vchildren;e.m=t.vkey;e.u=t.vname;return e};const j=(t,e)=>{if(t!=null&&!p(t)){if(e&4){return t==="false"?false:t===""||!!t}if(e&1){return String(t)}return t}return t};const M=(t,e,n)=>{const s=Ct.ce(e,n);t.dispatchEvent(s);return s};const C=new WeakMap;const O=(t,e,n)=>{let s=kt.get(t);if(Rt&&n){s=s||new CSSStyleSheet;if(typeof s==="string"){s=e}else{s.replaceSync(e)}}else{s=e}kt.set(t,s)};const R=(t,e,n,s)=>{var l;let o=T(e);const c=kt.get(o);t=t.nodeType===11?t:Mt;if(c){if(typeof c==="string"){t=t.head||t;let e=C.get(t);let n;if(!e){C.set(t,e=new Set)}if(!e.has(o)){{{n=Mt.createElement("style");n.innerHTML=c}const e=(l=Ct.v)!==null&&l!==void 0?l:y(Mt);if(e!=null){n.setAttribute("nonce",e)}t.insertBefore(n,t.querySelector("link"))}if(e){e.add(o)}}}else if(!t.adoptedStyleSheets.includes(c)){t.adoptedStyleSheets=[...t.adoptedStyleSheets,c]}}return o};const P=t=>{const e=t.S;const n=t.g;const s=e.h;const l=u("attachStyles",e.k);const o=R(n.getRootNode(),e);if(s&10){n["s-sc"]=o;n.classList.add(o+"-h");if(s&2){n.classList.add(o+"-s")}}l()};const T=(t,e)=>"sc-"+t.k;const U=(t,e,n,s,l,o)=>{if(n!==s){let c=wt(t,e);let i=e.toLowerCase();if(e==="class"){const e=t.classList;const l=E(n);const o=E(s);e.remove(...l.filter((t=>t&&!o.includes(t))));e.add(...o.filter((t=>t&&!l.includes(t))))}else if(!c&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"){e=e.slice(3)}else if(wt(jt,i)){e=i.slice(2)}else{e=i[2]+e.slice(3)}if(n){Ct.rel(t,e,n,false)}if(s){Ct.ael(t,e,s,false)}}else{const i=p(s);if((c||i&&s!==null)&&!l){try{if(!t.tagName.includes("-")){const l=s==null?"":s;if(e==="list"){c=false}else if(n==null||t[e]!=l){t[e]=l}}else{t[e]=s}}catch(t){}}if(s==null||s===false){if(s!==false||t.getAttribute(e)===""){{t.removeAttribute(e)}}}else if((!c||o&4||l)&&!i){s=s===true?"":s;{t.setAttribute(e,s)}}}}};const x=/\s/;const E=t=>!t?[]:t.split(x);const L=(t,e,n,s)=>{const l=e.p.nodeType===11&&e.p.host?e.p.host:e.p;const o=t&&t.o||h;const c=e.o||h;{for(s in o){if(!(s in c)){U(l,s,o[s],undefined,n,e.h)}}}for(s in c){U(l,s,o[s],c[s],n,e.h)}};const N=(t,o,f,r)=>{const u=o.i[f];let a=0;let d;let h;let p;if(!l){c=true;if(u.$==="slot"){if(e){r.classList.add(e+"-s")}u.h|=u.i?2:1}}if(u.l!==null){d=u.p=Mt.createTextNode(u.l)}else if(u.h&1){d=u.p=Mt.createTextNode("")}else{d=u.p=Mt.createElement(u.h&2?"slot-fb":u.$);{L(null,u,i)}if($(e)&&d["s-si"]!==e){d.classList.add(d["s-si"]=e)}if(u.i){for(a=0;a{Ct.h|=1;const n=t.childNodes;for(let t=n.length-1;t>=0;t--){const l=n[t];if(l["s-hn"]!==s&&l["s-ol"]){V(l).insertBefore(l,I(l));l["s-ol"].remove();l["s-ol"]=undefined;c=true}if(e){W(l,e)}}Ct.h&=~1};const A=(t,e,n,s,l,o)=>{let c=t["s-cr"]&&t["s-cr"].parentNode||t;let i;for(;l<=o;++l){if(s[l]){i=N(null,n,l,t);if(i){s[l].p=i;c.insertBefore(i,I(e))}}}};const F=(t,e,n)=>{for(let s=e;s<=n;++s){const e=t[s];if(e){const t=e.p;if(t){{o=true;if(t["s-ol"]){t["s-ol"].remove()}else{W(t,true)}}t.remove()}}}};const q=(t,e,n,s)=>{let l=0;let o=0;let c=e.length-1;let i=e[0];let f=e[c];let r=s.length-1;let u=s[0];let a=s[r];let d;while(l<=c&&o<=r){if(i==null){i=e[++l]}else if(f==null){f=e[--c]}else if(u==null){u=s[++o]}else if(a==null){a=s[--r]}else if(H(i,u)){_(i,u);i=e[++l];u=s[++o]}else if(H(f,a)){_(f,a);f=e[--c];a=s[--r]}else if(H(i,a)){if(i.$==="slot"||a.$==="slot"){W(i.p.parentNode,false)}_(i,a);t.insertBefore(i.p,f.p.nextSibling);i=e[++l];a=s[--r]}else if(H(f,u)){if(i.$==="slot"||a.$==="slot"){W(f.p.parentNode,false)}_(f,u);t.insertBefore(f.p,i.p);f=e[--c];u=s[++o]}else{{d=N(e&&e[o],n,o,t);u=s[++o]}if(d){{V(i.p).insertBefore(d,I(i.p))}}}}if(l>c){A(t,s[r+1]==null?null:s[r+1].p,n,s,o,r)}else if(o>r){F(e,l,c)}};const H=(t,e)=>{if(t.$===e.$){if(t.$==="slot"){return t.u===e.u}return true}return false};const I=t=>t&&t["s-ol"]||t;const V=t=>(t["s-ol"]?t["s-ol"]:t).parentNode;const _=(t,e)=>{const n=e.p=t.p;const s=t.i;const l=e.i;const o=e.$;const c=e.l;let f;if(c===null){{if(o==="slot");else{L(t,e,i)}}if(s!==null&&l!==null){q(n,s,e,l)}else if(l!==null){if(t.l!==null){n.textContent=""}A(n,null,e,l,0,l.length-1)}else if(s!==null){F(s,0,s.length-1)}}else if(f=n["s-cr"]){f.parentNode.textContent=c}else if(t.l!==c){n.data=c}};const z=t=>{const e=t.childNodes;let n;let s;let l;let o;let c;let i;for(s=0,l=e.length;s{let e;let n;let s;let l;let c;let i;let f=0;const r=t.childNodes;const u=r.length;for(;f=0;i--){n=s[i];if(!n["s-cn"]&&!n["s-nr"]&&n["s-hn"]!==e["s-hn"]){if(G(n,l)){c=B.find((t=>t.j===n));o=true;n["s-sn"]=n["s-sn"]||l;if(c){c.M=e}else{B.push({M:e,j:n})}if(n["s-sr"]){B.map((t=>{if(G(t.j,n["s-sn"])){c=B.find((t=>t.j===n));if(c&&!t.M){t.M=c.M}}}))}}else if(!B.some((t=>t.j===n))){B.push({j:n})}}}}if(e.nodeType===1){D(e)}}};const G=(t,e)=>{if(t.nodeType===1){if(t.getAttribute("slot")===null&&e===""){return true}if(t.getAttribute("slot")===e){return true}return false}if(t["s-sn"]===e){return true}return e===""};const J=(t,i)=>{const f=t.g;const r=t.S;const u=t.C||b(null,null);const a=v(i)?i:m(null,null,i);s=f.tagName;if(r.O){a.o=a.o||{};r.O.map((([t,e])=>a.o[e]=f[t]))}a.$=null;a.h|=4;t.C=a;a.p=u.p=f;{e=f["s-sc"]}{n=f["s-cr"];l=(r.h&1)!==0;o=false}_(u,a);{Ct.h|=1;if(c){D(a.p);let t;let e;let n;let s;let l;let o;let c=0;for(;c{if(e&&!t.R&&e["s-p"]){e["s-p"].push(new Promise((e=>t.R=e)))}};const Q=(t,e)=>{{t.h|=16}if(t.h&4){t.h|=512;return}K(t,t.P);const n=()=>X(t,e);return Nt(n)};const X=(t,e)=>{const n=u("scheduleUpdate",t.S.k);const s=t.T;let l;if(e){{l=st(s,"componentWillLoad")}}n();return Y(l,(()=>Z(t,s,e)))};const Y=(t,e)=>t instanceof Promise?t.then(e):e();const Z=async(t,e,n)=>{const s=t.g;const l=u("update",t.S.k);const o=s["s-rc"];if(n){P(t)}const c=u("render",t.S.k);{tt(t,e)}if(o){o.map((t=>t()));s["s-rc"]=undefined}c();l();{const e=s["s-p"];const n=()=>et(t);if(e.length===0){n()}else{Promise.all(e).then(n);t.h|=4;e.length=0}}};const tt=(t,e,n)=>{try{e=e.render();{t.h&=~16}{t.h|=2}{{{J(t,e)}}}}catch(e){vt(e,t.g)}return null};const et=t=>{const e=t.S.k;const n=t.g;const s=u("postUpdate",e);const l=t.P;if(!(t.h&64)){t.h|=64;{lt(n)}s();{t.U(n);if(!l){nt()}}}else{s()}{if(t.R){t.R();t.R=undefined}if(t.h&512){Lt((()=>Q(t,false)))}t.h&=~(4|512)}};const nt=e=>{{lt(Mt.documentElement)}Lt((()=>M(jt,"appload",{detail:{namespace:t}})))};const st=(t,e,n)=>{if(t&&t[e]){try{return t[e](n)}catch(t){vt(t)}}return undefined};const lt=t=>t.classList.add("hydrated");const ot=(t,e)=>yt(t).L.get(e);const ct=(t,e,n,s)=>{const l=yt(t);const o=l.L.get(e);const c=l.h;const i=l.T;n=j(n,s.N[e][0]);const f=Number.isNaN(o)&&Number.isNaN(n);const r=n!==o&&!f;if((!(c&8)||o===undefined)&&r){l.L.set(e,n);if(i){if((c&(2|16))===2){Q(l,false)}}}};const it=(t,e,n)=>{if(e.N){const s=Object.entries(e.N);const l=t.prototype;s.map((([t,[s]])=>{if(s&31||n&2&&s&32){Object.defineProperty(l,t,{get(){return ot(this,t)},set(n){ct(this,t,n,e)},configurable:true,enumerable:true})}}));if(n&1){const n=new Map;l.attributeChangedCallback=function(t,e,s){Ct.jmp((()=>{const e=n.get(t);if(this.hasOwnProperty(e)){s=this[e];delete this[e]}else if(l.hasOwnProperty(e)&&typeof this[e]==="number"&&this[e]==s){return}this[e]=s===null&&typeof this[e]==="boolean"?false:s}))};t.observedAttributes=s.filter((([t,e])=>e[0]&15)).map((([t,s])=>{const l=s[1]||t;n.set(l,t);if(s[0]&512){e.O.push([t,l])}return l}))}}return t};const ft=async(t,e,n,s,l)=>{if((e.h&32)===0){e.h|=32;{l=gt(n);if(l.then){const t=a();l=await l;t()}if(!l.isProxied){it(l,n,2);l.isProxied=true}const t=u("createInstance",n.k);{e.h|=8}try{new l(e)}catch(t){vt(t)}{e.h&=~8}t()}if(l.style){let t=l.style;const e=T(n);if(!kt.has(e)){const s=u("registerStyles",n.k);O(e,t,!!(n.h&1));s()}}}const o=e.P;const c=()=>Q(e,true);if(o&&o["s-rc"]){o["s-rc"].push(c)}else{c()}};const rt=t=>{if((Ct.h&1)===0){const e=yt(t);const n=e.S;const s=u("connectedCallback",n.k);if(!(e.h&1)){e.h|=1;{if(n.h&(4|8)){ut(t)}}{let n=t;while(n=n.parentNode||n.host){if(n["s-p"]){K(e,e.P=n);break}}}if(n.N){Object.entries(n.N).map((([e,[n]])=>{if(n&31&&t.hasOwnProperty(e)){const n=t[e];delete t[e];t[e]=n}}))}{ft(t,e,n)}}s()}};const ut=t=>{const e=t["s-cr"]=Mt.createComment("");e["s-cn"]=true;t.insertBefore(e,t.firstChild)};const at=t=>{if((Ct.h&1)===0){yt(t)}};const dt=(t,e={})=>{var n;const s=u();const l=[];const o=e.exclude||[];const c=jt.customElements;const i=Mt.head;const f=i.querySelector("meta[charset]");const r=Mt.createElement("style");const a=[];let h;let $=true;Object.assign(Ct,e);Ct.t=new URL(e.resourcesUrl||"./",Mt.baseURI).href;t.map((t=>{t[1].map((e=>{const n={h:e[0],k:e[1],N:e[2],W:e[3]};{n.N=e[2]}{n.O=[]}const s=n.k;const i=class extends HTMLElement{constructor(t){super(t);t=this;bt(t,n)}connectedCallback(){if(h){clearTimeout(h);h=null}if($){a.push(this)}else{Ct.jmp((()=>rt(this)))}}disconnectedCallback(){Ct.jmp((()=>at(this)))}componentOnReady(){return yt(this).A}};n.F=t[0];if(!o.includes(s)&&!c.get(s)){l.push(s);c.define(s,it(i,n,1))}}))}));{r.innerHTML=l+d;r.setAttribute("data-styles","");const t=(n=Ct.v)!==null&&n!==void 0?n:y(Mt);if(t!=null){r.setAttribute("nonce",t)}i.insertBefore(r,f?f.nextSibling:i.firstChild)}$=false;if(a.length){a.map((t=>t.connectedCallback()))}else{{Ct.jmp((()=>h=setTimeout(nt,30)))}}s()};const ht=(t,e)=>e;const $t=t=>Ct.v=t;const pt=new WeakMap;const yt=t=>pt.get(t);const mt=(t,e)=>pt.set(e.T=t,e);const bt=(t,e)=>{const n={h:0,g:t,S:e,L:new Map};{n.A=new Promise((t=>n.U=t));t["s-p"]=[];t["s-rc"]=[]}return pt.set(t,n)};const wt=(t,e)=>e in t;const vt=(t,e)=>(0,console.error)(t,e);const St=new Map;const gt=(t,e,n)=>{const s=t.k.replace(/-/g,"_");const l=t.F;const o=St.get(l);if(o){return o[s]} +/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${l}.entry.js${""}`).then((t=>{{St.set(l,t)}return t[s]}),vt)};const kt=new Map;const jt=typeof window!=="undefined"?window:{};const Mt=jt.document||{head:{}};const Ct={h:0,t:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,s)=>t.addEventListener(e,n,s),rel:(t,e,n,s)=>t.removeEventListener(e,n,s),ce:(t,e)=>new CustomEvent(t,e)};const Ot=t=>Promise.resolve(t);const Rt=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(t){}return false})();const Pt=[];const Tt=[];const Ut=(t,e)=>n=>{t.push(n);if(!f){f=true;if(e&&Ct.h&4){Lt(Et)}else{Ct.raf(Et)}}};const xt=t=>{for(let e=0;e{xt(Pt);{xt(Tt);if(f=Pt.length>0){Ct.raf(Et)}}};const Lt=t=>Ot().then(t);const Nt=Ut(Tt,true);export{ht as F,dt as b,r as g,m as h,Ot as p,mt as r,$t as s}; +//# sourceMappingURL=p-6c241004.js.map \ No newline at end of file diff --git a/assets/javascripts/web-components/p-6c241004.js.map b/assets/javascripts/web-components/p-6c241004.js.map new file mode 100644 index 000000000..c80b01897 --- /dev/null +++ b/assets/javascripts/web-components/p-6c241004.js.map @@ -0,0 +1 @@ +{"version":3,"names":["NAMESPACE","scopeId","contentRef","hostTagName","useNativeShadowDom","checkSlotFallbackVisibility","checkSlotRelocate","isSvgMode","queuePending","getAssetPath","path","assetUrl","URL","plt","$resourcesUrl$","origin","win","location","href","pathname","createTime","fnName","tagName","uniqueTime","key","measureText","HYDRATED_CSS","EMPTY_OBJ","isDef","v","isComplexType","o","queryNonceMetaTagContent","doc","_a","_b","_c","head","querySelector","getAttribute","undefined","h","nodeName","vnodeData","children","child","slotName","simple","lastSimple","vNodeChildren","walk","c","i","length","Array","isArray","String","$text$","push","newVNode","name","classData","className","class","Object","keys","filter","k","join","vdomFnUtils","vnode","$attrs$","$children$","$name$","tag","text","$flags$","$tag$","$elm$","Host","isHost","node","forEach","cb","map","convertToPublic","convertToPrivate","vattrs","vchildren","vkey","$key$","vname","vtag","vtext","assign","parsePropertyValue","propValue","propType","emitEvent","elm","opts","ev","ce","dispatchEvent","rootAppliedStyles","WeakMap","registerStyle","cssText","allowCS","style","styles","get","supportsConstructableStylesheets","CSSStyleSheet","replaceSync","set","addStyle","styleContainerNode","cmpMeta","mode","hostElm","getScopeId","nodeType","appliedStyles","styleElm","Set","has","createElement","innerHTML","nonce","$nonce$","setAttribute","insertBefore","add","adoptedStyleSheets","includes","attachStyles","hostRef","$cmpMeta$","$hostElement$","flags","endAttachStyles","$tagName$","getRootNode","classList","cmp","setAccessor","memberName","oldValue","newValue","isSvg","isProp","isMemberInElement","ln","toLowerCase","oldClasses","parseClassList","newClasses","remove","slice","rel","ael","isComplex","n","e","removeAttribute","parseClassListRegex","value","split","updateElement","oldVnode","newVnode","host","oldVnodeAttrs","newVnodeAttrs","createElm","oldParentVNode","newParentVNode","childIndex","parentElm","childNode","oldVNode","createTextNode","appendChild","putBackInOriginalLocation","recursive","oldSlotChildNodes","childNodes","parentReferenceNode","referenceNode","addVnodes","before","parentVNode","vnodes","startIdx","endIdx","containerElm","parentNode","removeVnodes","index","updateChildren","oldCh","newCh","oldStartIdx","newStartIdx","oldEndIdx","oldStartVnode","oldEndVnode","newEndIdx","newStartVnode","newEndVnode","isSameVnode","patch","nextSibling","leftVNode","rightVNode","oldChildren","newChildren","defaultHolder","textContent","data","updateFallbackSlotVisibility","ilen","j","slotNameAttr","hidden","trim","relocateNodes","relocateSlotContent","hostContentNodes","relocateNodeData","isNodeLocatedInSlot","find","r","$nodeToRelocate$","$slotRefNode$","relocateNode","some","nodeToRelocate","renderVdom","renderFnResults","$vnode$","rootVnode","$attrsToReflect$","propName","attribute","relocateData","orgLocationNode","parentNodeRef","insertBeforeNode","refNode","previousSibling","attachToAncestor","ancestorComponent","$onRenderResolve$","Promise","scheduleUpdate","isInitialLoad","$ancestorComponent$","dispatch","dispatchHooks","writeTask","endSchedule","instance","$lazyInstance$","maybePromise","safeCall","enqueue","updateComponent","fn","then","async","endUpdate","rc","endRender","callRender","childrenPromises","postUpdate","postUpdateComponent","all","render","consoleError","endPostUpdate","addHydratedFlag","$onReadyResolve$","appDidLoad","nextTick","who","documentElement","detail","namespace","method","arg","getValue","ref","getHostRef","$instanceValues$","setValue","newVal","oldVal","$members$","areBothNaN","Number","isNaN","didValueChange","proxyComponent","Cstr","members","entries","prototype","memberFlags","defineProperty","this","configurable","enumerable","attrNameToPropName","Map","attributeChangedCallback","attrName","_oldValue","jmp","hasOwnProperty","observedAttributes","_","m","initializeComponent","hmrVersionId","loadModule","endLoad","isProxied","endNewInstance","endRegisterStyles","schedule","connectedCallback","endConnected","setContentReference","contentRefElm","createComment","firstChild","disconnectedCallback","bootstrapLazy","lazyBundles","options","endBootstrap","cmpTags","exclude","customElements","metaCharset","visibilityStyle","deferredConnectedCallbacks","appLoadFallback","isBootstrapping","resourcesUrl","baseURI","lazyBundle","compactMeta","$listeners$","HostElement","HTMLElement","constructor","self","super","registerHost","clearTimeout","componentOnReady","$onReadyPromise$","$lazyBundleId$","define","setTimeout","Fragment","setNonce","hostRefs","registerInstance","lazyInstance","el","console","error","cmpModules","exportName","replace","bundleId","module","import","importedModule","window","document","raf","requestAnimationFrame","eventName","listener","addEventListener","removeEventListener","CustomEvent","promiseResolve","resolve","queueDomReads","queueDomWrites","queueTask","queue","write","flush","consume","performance","now"],"sources":["@stencil/core/internal/app-data","../../node_modules/@stencil/core/internal/client/index.js?app-data=conditional"],"sourcesContent":["export const NAMESPACE = 'web-components-stencil';\nexport const BUILD = /* web-components-stencil */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, cssVarShim: false, devTools: false, disconnectedCallback: false, dynamicImportShim: false, element: false, event: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: false, propString: true, reflect: true, safari10: false, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, shadowDomShim: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };\nexport const Env = /* web-components-stencil */ {};\n","/**\n * Virtual DOM patching algorithm based on Snabbdom by\n * Simon Friis Vindum (@paldepind)\n * Licensed under the MIT License\n * https://github.com/snabbdom/snabbdom/blob/master/LICENSE\n *\n * Modified for Stencil's renderer and slot projection\n */\nlet scopeId;\nlet contentRef;\nlet hostTagName;\nlet customError;\nlet i = 0;\nlet useNativeShadowDom = false;\nlet checkSlotFallbackVisibility = false;\nlet checkSlotRelocate = false;\nlet isSvgMode = false;\nlet renderingRef = null;\nlet queueCongestion = 0;\nlet queuePending = false;\n/*\n Stencil Client Platform v3.2.2 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nconst Build = {\n isDev: BUILD.isDev ? true : false,\n isBrowser: true,\n isServer: false,\n isTesting: BUILD.isTesting ? true : false,\n};\nconst Context = {};\nconst getAssetPath = (path) => {\n const assetUrl = new URL(path, plt.$resourcesUrl$);\n return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;\n};\nconst setAssetPath = (path) => (plt.$resourcesUrl$ = path);\nconst createTime = (fnName, tagName = '') => {\n if (BUILD.profile && performance.mark) {\n const key = `st:${fnName}:${tagName}:${i++}`;\n // Start\n performance.mark(key);\n // End\n return () => performance.measure(`[Stencil] ${fnName}() <${tagName}>`, key);\n }\n else {\n return () => {\n return;\n };\n }\n};\nconst uniqueTime = (key, measureText) => {\n if (BUILD.profile && performance.mark) {\n if (performance.getEntriesByName(key, 'mark').length === 0) {\n performance.mark(key);\n }\n return () => {\n if (performance.getEntriesByName(measureText, 'measure').length === 0) {\n performance.measure(measureText, key);\n }\n };\n }\n else {\n return () => {\n return;\n };\n }\n};\nconst inspect = (ref) => {\n const hostRef = getHostRef(ref);\n if (!hostRef) {\n return undefined;\n }\n const flags = hostRef.$flags$;\n const hostElement = hostRef.$hostElement$;\n return {\n renderCount: hostRef.$renderCount$,\n flags: {\n hasRendered: !!(flags & 2 /* HOST_FLAGS.hasRendered */),\n hasConnected: !!(flags & 1 /* HOST_FLAGS.hasConnected */),\n isWaitingForChildren: !!(flags & 4 /* HOST_FLAGS.isWaitingForChildren */),\n isConstructingInstance: !!(flags & 8 /* HOST_FLAGS.isConstructingInstance */),\n isQueuedForUpdate: !!(flags & 16 /* HOST_FLAGS.isQueuedForUpdate */),\n hasInitializedComponent: !!(flags & 32 /* HOST_FLAGS.hasInitializedComponent */),\n hasLoadedComponent: !!(flags & 64 /* HOST_FLAGS.hasLoadedComponent */),\n isWatchReady: !!(flags & 128 /* HOST_FLAGS.isWatchReady */),\n isListenReady: !!(flags & 256 /* HOST_FLAGS.isListenReady */),\n needsRerender: !!(flags & 512 /* HOST_FLAGS.needsRerender */),\n },\n instanceValues: hostRef.$instanceValues$,\n ancestorComponent: hostRef.$ancestorComponent$,\n hostElement,\n lazyInstance: hostRef.$lazyInstance$,\n vnode: hostRef.$vnode$,\n modeName: hostRef.$modeName$,\n onReadyPromise: hostRef.$onReadyPromise$,\n onReadyResolve: hostRef.$onReadyResolve$,\n onInstancePromise: hostRef.$onInstancePromise$,\n onInstanceResolve: hostRef.$onInstanceResolve$,\n onRenderResolve: hostRef.$onRenderResolve$,\n queuedListeners: hostRef.$queuedListeners$,\n rmListeners: hostRef.$rmListeners$,\n ['s-id']: hostElement['s-id'],\n ['s-cr']: hostElement['s-cr'],\n ['s-lr']: hostElement['s-lr'],\n ['s-p']: hostElement['s-p'],\n ['s-rc']: hostElement['s-rc'],\n ['s-sc']: hostElement['s-sc'],\n };\n};\nconst installDevTools = () => {\n if (BUILD.devTools) {\n const stencil = (win.stencil = win.stencil || {});\n const originalInspect = stencil.inspect;\n stencil.inspect = (ref) => {\n let result = inspect(ref);\n if (!result && typeof originalInspect === 'function') {\n result = originalInspect(ref);\n }\n return result;\n };\n }\n};\nconst CONTENT_REF_ID = 'r';\nconst ORG_LOCATION_ID = 'o';\nconst SLOT_NODE_ID = 's';\nconst TEXT_NODE_ID = 't';\nconst HYDRATE_ID = 's-id';\nconst HYDRATED_STYLE_ID = 'sty-id';\nconst HYDRATE_CHILD_ID = 'c-id';\nconst HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';\nconst XLINK_NS = 'http://www.w3.org/1999/xlink';\n/**\n * Default style mode id\n */\n/**\n * Reusable empty obj/array\n * Don't add values to these!!\n */\nconst EMPTY_OBJ = {};\n/**\n * Namespaces\n */\nconst SVG_NS = 'http://www.w3.org/2000/svg';\nconst HTML_NS = 'http://www.w3.org/1999/xhtml';\nconst isDef = (v) => v != null;\n/**\n * Check whether a value is a 'complex type', defined here as an object or a\n * function.\n *\n * @param o the value to check\n * @returns whether it's a complex type or not\n */\nconst isComplexType = (o) => {\n // https://jsperf.com/typeof-fn-object/5\n o = typeof o;\n return o === 'object' || o === 'function';\n};\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n/**\n * Production h() function based on Preact by\n * Jason Miller (@developit)\n * Licensed under the MIT License\n * https://github.com/developit/preact/blob/master/LICENSE\n *\n * Modified for Stencil's compiler and vdom\n */\n// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;\n// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;\nconst h = (nodeName, vnodeData, ...children) => {\n let child = null;\n let key = null;\n let slotName = null;\n let simple = false;\n let lastSimple = false;\n const vNodeChildren = [];\n const walk = (c) => {\n for (let i = 0; i < c.length; i++) {\n child = c[i];\n if (Array.isArray(child)) {\n walk(child);\n }\n else if (child != null && typeof child !== 'boolean') {\n if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {\n child = String(child);\n }\n else if (BUILD.isDev && typeof nodeName !== 'function' && child.$flags$ === undefined) {\n consoleDevError(`vNode passed as children has unexpected type.\nMake sure it's using the correct h() function.\nEmpty objects can also be the cause, look for JSX comments that became objects.`);\n }\n if (simple && lastSimple) {\n // If the previous child was simple (string), we merge both\n vNodeChildren[vNodeChildren.length - 1].$text$ += child;\n }\n else {\n // Append a new vNode, if it's text, we create a text vNode\n vNodeChildren.push(simple ? newVNode(null, child) : child);\n }\n lastSimple = simple;\n }\n }\n };\n walk(children);\n if (vnodeData) {\n if (BUILD.isDev && nodeName === 'input') {\n validateInputProperties(vnodeData);\n }\n // normalize class / classname attributes\n if (BUILD.vdomKey && vnodeData.key) {\n key = vnodeData.key;\n }\n if (BUILD.slotRelocation && vnodeData.name) {\n slotName = vnodeData.name;\n }\n if (BUILD.vdomClass) {\n const classData = vnodeData.className || vnodeData.class;\n if (classData) {\n vnodeData.class =\n typeof classData !== 'object'\n ? classData\n : Object.keys(classData)\n .filter((k) => classData[k])\n .join(' ');\n }\n }\n }\n if (BUILD.isDev && vNodeChildren.some(isHost)) {\n consoleDevError(`The must be the single root component. Make sure:\n- You are NOT using hostData() and in the same component.\n- is used once, and it's the single root component of the render() function.`);\n }\n if (BUILD.vdomFunctional && typeof nodeName === 'function') {\n // nodeName is a functional component\n return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);\n }\n const vnode = newVNode(nodeName, null);\n vnode.$attrs$ = vnodeData;\n if (vNodeChildren.length > 0) {\n vnode.$children$ = vNodeChildren;\n }\n if (BUILD.vdomKey) {\n vnode.$key$ = key;\n }\n if (BUILD.slotRelocation) {\n vnode.$name$ = slotName;\n }\n return vnode;\n};\n/**\n * A utility function for creating a virtual DOM node from a tag and some\n * possible text content.\n *\n * @param tag the tag for this element\n * @param text possible text content for the node\n * @returns a newly-minted virtual DOM node\n */\nconst newVNode = (tag, text) => {\n const vnode = {\n $flags$: 0,\n $tag$: tag,\n $text$: text,\n $elm$: null,\n $children$: null,\n };\n if (BUILD.vdomAttribute) {\n vnode.$attrs$ = null;\n }\n if (BUILD.vdomKey) {\n vnode.$key$ = null;\n }\n if (BUILD.slotRelocation) {\n vnode.$name$ = null;\n }\n return vnode;\n};\nconst Host = {};\n/**\n * Check whether a given node is a Host node or not\n *\n * @param node the virtual DOM node to check\n * @returns whether it's a Host node or not\n */\nconst isHost = (node) => node && node.$tag$ === Host;\n/**\n * Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.\n *\n * Note that these functions convert from {@link d.VNode} to\n * {@link d.ChildNode} to give functional component developers a friendly\n * interface.\n */\nconst vdomFnUtils = {\n forEach: (children, cb) => children.map(convertToPublic).forEach(cb),\n map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),\n};\n/**\n * Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a\n * friendlier public interface (hence, 'convertToPublic').\n *\n * @param node the virtual DOM node to convert\n * @returns a converted child node\n */\nconst convertToPublic = (node) => ({\n vattrs: node.$attrs$,\n vchildren: node.$children$,\n vkey: node.$key$,\n vname: node.$name$,\n vtag: node.$tag$,\n vtext: node.$text$,\n});\n/**\n * Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in\n * order to use the resulting object in the virtual DOM. The initial object was\n * likely created as part of presenting a public API, so converting it back\n * involved making it 'private' again (hence, `convertToPrivate`).\n *\n * @param node the child node to convert\n * @returns a converted virtual DOM node\n */\nconst convertToPrivate = (node) => {\n if (typeof node.vtag === 'function') {\n const vnodeData = Object.assign({}, node.vattrs);\n if (node.vkey) {\n vnodeData.key = node.vkey;\n }\n if (node.vname) {\n vnodeData.name = node.vname;\n }\n return h(node.vtag, vnodeData, ...(node.vchildren || []));\n }\n const vnode = newVNode(node.vtag, node.vtext);\n vnode.$attrs$ = node.vattrs;\n vnode.$children$ = node.vchildren;\n vnode.$key$ = node.vkey;\n vnode.$name$ = node.vname;\n return vnode;\n};\n/**\n * Validates the ordering of attributes on an input element\n *\n * @param inputElm the element to validate\n */\nconst validateInputProperties = (inputElm) => {\n const props = Object.keys(inputElm);\n const value = props.indexOf('value');\n if (value === -1) {\n return;\n }\n const typeIndex = props.indexOf('type');\n const minIndex = props.indexOf('min');\n const maxIndex = props.indexOf('max');\n const stepIndex = props.indexOf('step');\n if (value < typeIndex || value < minIndex || value < maxIndex || value < stepIndex) {\n consoleDevWarn(`The \"value\" prop of should be set after \"min\", \"max\", \"type\" and \"step\"`);\n }\n};\nconst initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {\n const endHydrate = createTime('hydrateClient', tagName);\n const shadowRoot = hostElm.shadowRoot;\n const childRenderNodes = [];\n const slotNodes = [];\n const shadowRootNodes = BUILD.shadowDom && shadowRoot ? [] : null;\n const vnode = (hostRef.$vnode$ = newVNode(tagName, null));\n if (!plt.$orgLocNodes$) {\n initializeDocumentHydrate(doc.body, (plt.$orgLocNodes$ = new Map()));\n }\n hostElm[HYDRATE_ID] = hostId;\n hostElm.removeAttribute(HYDRATE_ID);\n clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);\n childRenderNodes.map((c) => {\n const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;\n const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);\n const node = c.$elm$;\n if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {\n orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);\n }\n if (!shadowRoot) {\n node['s-hn'] = tagName;\n if (orgLocationNode) {\n node['s-ol'] = orgLocationNode;\n node['s-ol']['s-nr'] = node;\n }\n }\n plt.$orgLocNodes$.delete(orgLocationId);\n });\n if (BUILD.shadowDom && shadowRoot) {\n shadowRootNodes.map((shadowRootNode) => {\n if (shadowRootNode) {\n shadowRoot.appendChild(shadowRootNode);\n }\n });\n }\n endHydrate();\n};\nconst clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {\n let childNodeType;\n let childIdSplt;\n let childVNode;\n let i;\n if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {\n childNodeType = node.getAttribute(HYDRATE_CHILD_ID);\n if (childNodeType) {\n // got the node data from the element's attribute\n // `${hostId}.${nodeId}.${depth}.${index}`\n childIdSplt = childNodeType.split('.');\n if (childIdSplt[0] === hostId || childIdSplt[0] === '0') {\n childVNode = {\n $flags$: 0,\n $hostId$: childIdSplt[0],\n $nodeId$: childIdSplt[1],\n $depth$: childIdSplt[2],\n $index$: childIdSplt[3],\n $tag$: node.tagName.toLowerCase(),\n $elm$: node,\n $attrs$: null,\n $children$: null,\n $key$: null,\n $name$: null,\n $text$: null,\n };\n childRenderNodes.push(childVNode);\n node.removeAttribute(HYDRATE_CHILD_ID);\n // this is a new child vnode\n // so ensure its parent vnode has the vchildren array\n if (!parentVNode.$children$) {\n parentVNode.$children$ = [];\n }\n // add our child vnode to a specific index of the vnode's children\n parentVNode.$children$[childVNode.$index$] = childVNode;\n // this is now the new parent vnode for all the next child checks\n parentVNode = childVNode;\n if (shadowRootNodes && childVNode.$depth$ === '0') {\n shadowRootNodes[childVNode.$index$] = childVNode.$elm$;\n }\n }\n }\n // recursively drill down, end to start so we can remove nodes\n for (i = node.childNodes.length - 1; i >= 0; i--) {\n clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.childNodes[i], hostId);\n }\n if (node.shadowRoot) {\n // keep drilling down through the shadow root nodes\n for (i = node.shadowRoot.childNodes.length - 1; i >= 0; i--) {\n clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.shadowRoot.childNodes[i], hostId);\n }\n }\n }\n else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {\n // `${COMMENT_TYPE}.${hostId}.${nodeId}.${depth}.${index}`\n childIdSplt = node.nodeValue.split('.');\n if (childIdSplt[1] === hostId || childIdSplt[1] === '0') {\n // comment node for either the host id or a 0 host id\n childNodeType = childIdSplt[0];\n childVNode = {\n $flags$: 0,\n $hostId$: childIdSplt[1],\n $nodeId$: childIdSplt[2],\n $depth$: childIdSplt[3],\n $index$: childIdSplt[4],\n $elm$: node,\n $attrs$: null,\n $children$: null,\n $key$: null,\n $name$: null,\n $tag$: null,\n $text$: null,\n };\n if (childNodeType === TEXT_NODE_ID) {\n childVNode.$elm$ = node.nextSibling;\n if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* NODE_TYPE.TextNode */) {\n childVNode.$text$ = childVNode.$elm$.textContent;\n childRenderNodes.push(childVNode);\n // remove the text comment since it's no longer needed\n node.remove();\n if (!parentVNode.$children$) {\n parentVNode.$children$ = [];\n }\n parentVNode.$children$[childVNode.$index$] = childVNode;\n if (shadowRootNodes && childVNode.$depth$ === '0') {\n shadowRootNodes[childVNode.$index$] = childVNode.$elm$;\n }\n }\n }\n else if (childVNode.$hostId$ === hostId) {\n // this comment node is specifcally for this host id\n if (childNodeType === SLOT_NODE_ID) {\n // `${SLOT_NODE_ID}.${hostId}.${nodeId}.${depth}.${index}.${slotName}`;\n childVNode.$tag$ = 'slot';\n if (childIdSplt[5]) {\n node['s-sn'] = childVNode.$name$ = childIdSplt[5];\n }\n else {\n node['s-sn'] = '';\n }\n node['s-sr'] = true;\n if (BUILD.shadowDom && shadowRootNodes) {\n // browser support shadowRoot and this is a shadow dom component\n // create an actual slot element\n childVNode.$elm$ = doc.createElement(childVNode.$tag$);\n if (childVNode.$name$) {\n // add the slot name attribute\n childVNode.$elm$.setAttribute('name', childVNode.$name$);\n }\n // insert the new slot element before the slot comment\n node.parentNode.insertBefore(childVNode.$elm$, node);\n // remove the slot comment since it's not needed for shadow\n node.remove();\n if (childVNode.$depth$ === '0') {\n shadowRootNodes[childVNode.$index$] = childVNode.$elm$;\n }\n }\n slotNodes.push(childVNode);\n if (!parentVNode.$children$) {\n parentVNode.$children$ = [];\n }\n parentVNode.$children$[childVNode.$index$] = childVNode;\n }\n else if (childNodeType === CONTENT_REF_ID) {\n // `${CONTENT_REF_ID}.${hostId}`;\n if (BUILD.shadowDom && shadowRootNodes) {\n // remove the content ref comment since it's not needed for shadow\n node.remove();\n }\n else if (BUILD.slotRelocation) {\n hostElm['s-cr'] = node;\n node['s-cn'] = true;\n }\n }\n }\n }\n }\n else if (parentVNode && parentVNode.$tag$ === 'style') {\n const vnode = newVNode(null, node.textContent);\n vnode.$elm$ = node;\n vnode.$index$ = '0';\n parentVNode.$children$ = [vnode];\n }\n};\nconst initializeDocumentHydrate = (node, orgLocNodes) => {\n if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {\n let i = 0;\n for (; i < node.childNodes.length; i++) {\n initializeDocumentHydrate(node.childNodes[i], orgLocNodes);\n }\n if (node.shadowRoot) {\n for (i = 0; i < node.shadowRoot.childNodes.length; i++) {\n initializeDocumentHydrate(node.shadowRoot.childNodes[i], orgLocNodes);\n }\n }\n }\n else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {\n const childIdSplt = node.nodeValue.split('.');\n if (childIdSplt[0] === ORG_LOCATION_ID) {\n orgLocNodes.set(childIdSplt[1] + '.' + childIdSplt[2], node);\n node.nodeValue = '';\n // useful to know if the original location is\n // the root light-dom of a shadow dom component\n node['s-en'] = childIdSplt[3];\n }\n }\n};\n// Private\nconst computeMode = (elm) => modeResolutionChain.map((h) => h(elm)).find((m) => !!m);\n// Public\nconst setMode = (handler) => modeResolutionChain.push(handler);\nconst getMode = (ref) => getHostRef(ref).$modeName$;\n/**\n * Parse a new property value for a given property type.\n *\n * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,\n * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:\n * 1. `any`, the type given to `propValue` in the function signature\n * 2. the type stored from `propType`.\n *\n * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.\n *\n * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to\n * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is\n * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.\n * ```tsx\n * \n * ```\n *\n * HTML prop values on the other hand, will always a string\n *\n * @param propValue the new value to coerce to some type\n * @param propType the type of the prop, expressed as a binary number\n * @returns the parsed/coerced value\n */\nconst parsePropertyValue = (propValue, propType) => {\n // ensure this value is of the correct prop type\n if (propValue != null && !isComplexType(propValue)) {\n if (BUILD.propBoolean && propType & 4 /* MEMBER_FLAGS.Boolean */) {\n // per the HTML spec, any string value means it is a boolean true value\n // but we'll cheat here and say that the string \"false\" is the boolean false\n return propValue === 'false' ? false : propValue === '' || !!propValue;\n }\n if (BUILD.propNumber && propType & 2 /* MEMBER_FLAGS.Number */) {\n // force it to be a number\n return parseFloat(propValue);\n }\n if (BUILD.propString && propType & 1 /* MEMBER_FLAGS.String */) {\n // could have been passed as a number or boolean\n // but we still want it as a string\n return String(propValue);\n }\n // redundant return here for better minification\n return propValue;\n }\n // not sure exactly what type we want\n // so no need to change to a different type\n return propValue;\n};\nconst getElement = (ref) => (BUILD.lazyLoad ? getHostRef(ref).$hostElement$ : ref);\nconst createEvent = (ref, name, flags) => {\n const elm = getElement(ref);\n return {\n emit: (detail) => {\n if (BUILD.isDev && !elm.isConnected) {\n consoleDevWarn(`The \"${name}\" event was emitted, but the dispatcher node is no longer connected to the dom.`);\n }\n return emitEvent(elm, name, {\n bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),\n composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),\n cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),\n detail,\n });\n },\n };\n};\n/**\n * Helper function to create & dispatch a custom Event on a provided target\n * @param elm the target of the Event\n * @param name the name to give the custom Event\n * @param opts options for configuring a custom Event\n * @returns the custom Event\n */\nconst emitEvent = (elm, name, opts) => {\n const ev = plt.ce(name, opts);\n elm.dispatchEvent(ev);\n return ev;\n};\nconst rootAppliedStyles = /*@__PURE__*/ new WeakMap();\nconst registerStyle = (scopeId, cssText, allowCS) => {\n let style = styles.get(scopeId);\n if (supportsConstructableStylesheets && allowCS) {\n style = (style || new CSSStyleSheet());\n if (typeof style === 'string') {\n style = cssText;\n }\n else {\n style.replaceSync(cssText);\n }\n }\n else {\n style = cssText;\n }\n styles.set(scopeId, style);\n};\nconst addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {\n var _a;\n let scopeId = getScopeId(cmpMeta, mode);\n const style = styles.get(scopeId);\n if (!BUILD.attachStyles) {\n return scopeId;\n }\n // if an element is NOT connected then getRootNode() will return the wrong root node\n // so the fallback is to always use the document for the root node in those cases\n styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;\n if (style) {\n if (typeof style === 'string') {\n styleContainerNode = styleContainerNode.head || styleContainerNode;\n let appliedStyles = rootAppliedStyles.get(styleContainerNode);\n let styleElm;\n if (!appliedStyles) {\n rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));\n }\n if (!appliedStyles.has(scopeId)) {\n if (BUILD.hydrateClientSide &&\n styleContainerNode.host &&\n (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}=\"${scopeId}\"]`))) {\n // This is only happening on native shadow-dom, do not needs CSS var shim\n styleElm.innerHTML = style;\n }\n else {\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim && plt.$cssShim$) {\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n styleElm = plt.$cssShim$.createHostStyle(hostElm, scopeId, style, \n // TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field\n !!(cmpMeta.$flags$ & 10 /* CMP_FLAGS.needsScopedEncapsulation */));\n const newScopeId = styleElm['s-sc'];\n if (newScopeId) {\n scopeId = newScopeId;\n // we don't want to add this styleID to the appliedStyles Set\n // since the cssVarShim might need to apply several different\n // stylesheets for the same component\n appliedStyles = null;\n }\n }\n else {\n styleElm = doc.createElement('style');\n styleElm.innerHTML = style;\n }\n // Apply CSP nonce to the style tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n styleElm.setAttribute('nonce', nonce);\n }\n if (BUILD.hydrateServerSide || BUILD.hotModuleReplacement) {\n styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId);\n }\n styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));\n }\n if (appliedStyles) {\n appliedStyles.add(scopeId);\n }\n }\n }\n else if (BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {\n styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];\n }\n }\n return scopeId;\n};\nconst attachStyles = (hostRef) => {\n const cmpMeta = hostRef.$cmpMeta$;\n const elm = hostRef.$hostElement$;\n const flags = cmpMeta.$flags$;\n const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);\n const scopeId = addStyle(BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta, hostRef.$modeName$, elm);\n // TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field\n if ((BUILD.shadowDom || BUILD.scoped) && BUILD.cssAnnotations && flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {\n // only required when we're NOT using native shadow dom (slot)\n // or this browser doesn't support native shadow dom\n // and this host element was NOT created with SSR\n // let's pick out the inner content for slot projection\n // create a node to represent where the original\n // content was first placed, which is useful later on\n // DOM WRITE!!\n elm['s-sc'] = scopeId;\n elm.classList.add(scopeId + '-h');\n if (BUILD.scoped && flags & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {\n elm.classList.add(scopeId + '-s');\n }\n }\n endAttachStyles();\n};\nconst getScopeId = (cmp, mode) => 'sc-' + (BUILD.mode && mode && cmp.$flags$ & 32 /* CMP_FLAGS.hasMode */ ? cmp.$tagName$ + '-' + mode : cmp.$tagName$);\nconst convertScopedToShadow = (css) => css.replace(/\\/\\*!@([^\\/]+)\\*\\/[^\\{]+\\{/g, '$1{');\n/**\n * Production setAccessor() function based on Preact by\n * Jason Miller (@developit)\n * Licensed under the MIT License\n * https://github.com/developit/preact/blob/master/LICENSE\n *\n * Modified for Stencil's compiler and vdom\n */\nconst setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {\n if (oldValue !== newValue) {\n let isProp = isMemberInElement(elm, memberName);\n let ln = memberName.toLowerCase();\n if (BUILD.vdomClass && memberName === 'class') {\n const classList = elm.classList;\n const oldClasses = parseClassList(oldValue);\n const newClasses = parseClassList(newValue);\n classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));\n classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));\n }\n else if (BUILD.vdomStyle && memberName === 'style') {\n // update style attribute, css properties and values\n if (BUILD.updatable) {\n for (const prop in oldValue) {\n if (!newValue || newValue[prop] == null) {\n if (!BUILD.hydrateServerSide && prop.includes('-')) {\n elm.style.removeProperty(prop);\n }\n else {\n elm.style[prop] = '';\n }\n }\n }\n }\n for (const prop in newValue) {\n if (!oldValue || newValue[prop] !== oldValue[prop]) {\n if (!BUILD.hydrateServerSide && prop.includes('-')) {\n elm.style.setProperty(prop, newValue[prop]);\n }\n else {\n elm.style[prop] = newValue[prop];\n }\n }\n }\n }\n else if (BUILD.vdomKey && memberName === 'key')\n ;\n else if (BUILD.vdomRef && memberName === 'ref') {\n // minifier will clean this up\n if (newValue) {\n newValue(elm);\n }\n }\n else if (BUILD.vdomListener &&\n (BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) &&\n memberName[0] === 'o' &&\n memberName[1] === 'n') {\n // Event Handlers\n // so if the member name starts with \"on\" and the 3rd characters is\n // a capital letter, and it's not already a member on the element,\n // then we're assuming it's an event listener\n if (memberName[2] === '-') {\n // on- prefixed events\n // allows to be explicit about the dom event to listen without any magic\n // under the hood:\n // // listens for \"click\"\n // // listens for \"Click\"\n // // listens for \"ionChange\"\n // // listens for \"EVENTS\"\n memberName = memberName.slice(3);\n }\n else if (isMemberInElement(win, ln)) {\n // standard event\n // the JSX attribute could have been \"onMouseOver\" and the\n // member name \"onmouseover\" is on the window's prototype\n // so let's add the listener \"mouseover\", which is all lowercased\n memberName = ln.slice(2);\n }\n else {\n // custom event\n // the JSX attribute could have been \"onMyCustomEvent\"\n // so let's trim off the \"on\" prefix and lowercase the first character\n // and add the listener \"myCustomEvent\"\n // except for the first character, we keep the event name case\n memberName = ln[2] + memberName.slice(3);\n }\n if (oldValue) {\n plt.rel(elm, memberName, oldValue, false);\n }\n if (newValue) {\n plt.ael(elm, memberName, newValue, false);\n }\n }\n else if (BUILD.vdomPropOrAttr) {\n // Set property if it exists and it's not a SVG\n const isComplex = isComplexType(newValue);\n if ((isProp || (isComplex && newValue !== null)) && !isSvg) {\n try {\n if (!elm.tagName.includes('-')) {\n const n = newValue == null ? '' : newValue;\n // Workaround for Safari, moving the caret when re-assigning the same valued\n if (memberName === 'list') {\n isProp = false;\n }\n else if (oldValue == null || elm[memberName] != n) {\n elm[memberName] = n;\n }\n }\n else {\n elm[memberName] = newValue;\n }\n }\n catch (e) { }\n }\n /**\n * Need to manually update attribute if:\n * - memberName is not an attribute\n * - if we are rendering the host element in order to reflect attribute\n * - if it's a SVG, since properties might not work in \n * - if the newValue is null/undefined or 'false'.\n */\n let xlink = false;\n if (BUILD.vdomXlink) {\n if (ln !== (ln = ln.replace(/^xlink\\:?/, ''))) {\n memberName = ln;\n xlink = true;\n }\n }\n if (newValue == null || newValue === false) {\n if (newValue !== false || elm.getAttribute(memberName) === '') {\n if (BUILD.vdomXlink && xlink) {\n elm.removeAttributeNS(XLINK_NS, memberName);\n }\n else {\n elm.removeAttribute(memberName);\n }\n }\n }\n else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {\n newValue = newValue === true ? '' : newValue;\n if (BUILD.vdomXlink && xlink) {\n elm.setAttributeNS(XLINK_NS, memberName, newValue);\n }\n else {\n elm.setAttribute(memberName, newValue);\n }\n }\n }\n }\n};\nconst parseClassListRegex = /\\s/;\nconst parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));\nconst updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {\n // if the element passed in is a shadow root, which is a document fragment\n // then we want to be adding attrs/props to the shadow root's \"host\" element\n // if it's not a shadow root, then we add attrs/props to the same element\n const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host\n ? newVnode.$elm$.host\n : newVnode.$elm$;\n const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;\n const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;\n if (BUILD.updatable) {\n // remove attributes no longer present on the vnode by setting them to undefined\n for (memberName in oldVnodeAttrs) {\n if (!(memberName in newVnodeAttrs)) {\n setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);\n }\n }\n }\n // add new & update changed attributes\n for (memberName in newVnodeAttrs) {\n setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);\n }\n};\n/**\n * Create a DOM Node corresponding to one of the children of a given VNode.\n *\n * @param oldParentVNode the parent VNode from the previous render\n * @param newParentVNode the parent VNode from the current render\n * @param childIndex the index of the VNode, in the _new_ parent node's\n * children, for which we will create a new DOM node\n * @param parentElm the parent DOM node which our new node will be a child of\n * @returns the newly created node\n */\nconst createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {\n // tslint:disable-next-line: prefer-const\n const newVNode = newParentVNode.$children$[childIndex];\n let i = 0;\n let elm;\n let childNode;\n let oldVNode;\n if (BUILD.slotRelocation && !useNativeShadowDom) {\n // remember for later we need to check to relocate nodes\n checkSlotRelocate = true;\n if (newVNode.$tag$ === 'slot') {\n if (scopeId) {\n // scoped css needs to add its scoped id to the parent element\n parentElm.classList.add(scopeId + '-s');\n }\n newVNode.$flags$ |= newVNode.$children$\n ? // slot element has fallback content\n 2 /* VNODE_FLAGS.isSlotFallback */\n : // slot element does not have fallback content\n 1 /* VNODE_FLAGS.isSlotReference */;\n }\n }\n if (BUILD.isDev && newVNode.$elm$) {\n consoleDevError(`The JSX ${newVNode.$text$ !== null ? `\"${newVNode.$text$}\" text` : `\"${newVNode.$tag$}\" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`);\n }\n if (BUILD.vdomText && newVNode.$text$ !== null) {\n // create text node\n elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);\n }\n else if (BUILD.slotRelocation && newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {\n // create a slot reference node\n elm = newVNode.$elm$ =\n BUILD.isDebug || BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode) : doc.createTextNode('');\n }\n else {\n if (BUILD.svg && !isSvgMode) {\n isSvgMode = newVNode.$tag$ === 'svg';\n }\n // create element\n elm = newVNode.$elm$ = (BUILD.svg\n ? doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, BUILD.slotRelocation && newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */\n ? 'slot-fb'\n : newVNode.$tag$)\n : doc.createElement(BUILD.slotRelocation && newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */\n ? 'slot-fb'\n : newVNode.$tag$));\n if (BUILD.svg && isSvgMode && newVNode.$tag$ === 'foreignObject') {\n isSvgMode = false;\n }\n // add css classes, attrs, props, listeners, etc.\n if (BUILD.vdomAttribute) {\n updateElement(null, newVNode, isSvgMode);\n }\n if ((BUILD.shadowDom || BUILD.scoped) && isDef(scopeId) && elm['s-si'] !== scopeId) {\n // if there is a scopeId and this is the initial render\n // then let's add the scopeId as a css class\n elm.classList.add((elm['s-si'] = scopeId));\n }\n if (newVNode.$children$) {\n for (i = 0; i < newVNode.$children$.length; ++i) {\n // create the node\n childNode = createElm(oldParentVNode, newVNode, i, elm);\n // return node could have been null\n if (childNode) {\n // append our new node\n elm.appendChild(childNode);\n }\n }\n }\n if (BUILD.svg) {\n if (newVNode.$tag$ === 'svg') {\n // Only reset the SVG context when we're exiting element\n isSvgMode = false;\n }\n else if (elm.tagName === 'foreignObject') {\n // Reenter SVG context when we're exiting element\n isSvgMode = true;\n }\n }\n }\n if (BUILD.slotRelocation) {\n elm['s-hn'] = hostTagName;\n if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {\n // remember the content reference comment\n elm['s-sr'] = true;\n // remember the content reference comment\n elm['s-cr'] = contentRef;\n // remember the slot name, or empty string for default slot\n elm['s-sn'] = newVNode.$name$ || '';\n // check if we've got an old vnode for this slot\n oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];\n if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {\n // we've got an old slot vnode and the wrapper is being replaced\n // so let's move the old slot content back to it's original location\n putBackInOriginalLocation(oldParentVNode.$elm$, false);\n }\n }\n }\n return elm;\n};\nconst putBackInOriginalLocation = (parentElm, recursive) => {\n plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;\n const oldSlotChildNodes = parentElm.childNodes;\n for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {\n const childNode = oldSlotChildNodes[i];\n if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {\n // // this child node in the old element is from another component\n // // remove this node from the old slot's parent\n // childNode.remove();\n // and relocate it back to it's original location\n parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));\n // remove the old original location comment entirely\n // later on the patch function will know what to do\n // and move this to the correct spot in need be\n childNode['s-ol'].remove();\n childNode['s-ol'] = undefined;\n checkSlotRelocate = true;\n }\n if (recursive) {\n putBackInOriginalLocation(childNode, recursive);\n }\n }\n plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;\n};\n/**\n * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and\n * add them to the DOM in the appropriate place.\n *\n * @param parentElm the DOM node which should be used as a parent for the new\n * DOM nodes\n * @param before a child of the `parentElm` which the new children should be\n * inserted before (optional)\n * @param parentVNode the parent virtual DOM node\n * @param vnodes the new child virtual DOM nodes to produce DOM nodes for\n * @param startIdx the index in the child virtual DOM nodes at which to start\n * creating DOM nodes (inclusive)\n * @param endIdx the index in the child virtual DOM nodes at which to stop\n * creating DOM nodes (inclusive)\n */\nconst addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {\n let containerElm = ((BUILD.slotRelocation && parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);\n let childNode;\n if (BUILD.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {\n containerElm = containerElm.shadowRoot;\n }\n for (; startIdx <= endIdx; ++startIdx) {\n if (vnodes[startIdx]) {\n childNode = createElm(null, parentVNode, startIdx, parentElm);\n if (childNode) {\n vnodes[startIdx].$elm$ = childNode;\n containerElm.insertBefore(childNode, BUILD.slotRelocation ? referenceNode(before) : before);\n }\n }\n }\n};\n/**\n * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.\n * This can be used to, for instance, clean up after a list of children which\n * should no longer be shown.\n *\n * This function also handles some of Stencil's slot relocation logic.\n *\n * @param vnodes a list of virtual DOM nodes to remove\n * @param startIdx the index at which to start removing nodes (inclusive)\n * @param endIdx the index at which to stop removing nodes (inclusive)\n */\nconst removeVnodes = (vnodes, startIdx, endIdx) => {\n for (let index = startIdx; index <= endIdx; ++index) {\n const vnode = vnodes[index];\n if (vnode) {\n const elm = vnode.$elm$;\n nullifyVNodeRefs(vnode);\n if (elm) {\n if (BUILD.slotRelocation) {\n // we're removing this element\n // so it's possible we need to show slot fallback content now\n checkSlotFallbackVisibility = true;\n if (elm['s-ol']) {\n // remove the original location comment\n elm['s-ol'].remove();\n }\n else {\n // it's possible that child nodes of the node\n // that's being removed are slot nodes\n putBackInOriginalLocation(elm, true);\n }\n }\n // remove the vnode's element from the dom\n elm.remove();\n }\n }\n }\n};\n/**\n * Reconcile the children of a new VNode with the children of an old VNode by\n * traversing the two collections of children, identifying nodes that are\n * conserved or changed, calling out to `patch` to make any necessary\n * updates to the DOM, and rearranging DOM nodes as needed.\n *\n * The algorithm for reconciling children works by analyzing two 'windows' onto\n * the two arrays of children (`oldCh` and `newCh`). We keep track of the\n * 'windows' by storing start and end indices and references to the\n * corresponding array entries. Initially the two 'windows' are basically equal\n * to the entire array, but we progressively narrow the windows until there are\n * no children left to update by doing the following:\n *\n * 1. Skip any `null` entries at the beginning or end of the two arrays, so\n * that if we have an initial array like the following we'll end up dealing\n * only with a window bounded by the highlighted elements:\n *\n * [null, null, VNode1 , ... , VNode2, null, null]\n * ^^^^^^ ^^^^^^\n *\n * 2. Check to see if the elements at the head and tail positions are equal\n * across the windows. This will basically detect elements which haven't\n * been added, removed, or changed position, i.e. if you had the following\n * VNode elements (represented as HTML):\n *\n * oldVNode: `HEY`\n * newVNode: `THERE`\n *\n * Then when comparing the children of the `` tag we check the equality\n * of the VNodes corresponding to the `` tags and, since they are the\n * same tag in the same position, we'd be able to avoid completely\n * re-rendering the subtree under them with a new DOM element and would just\n * call out to `patch` to handle reconciling their children and so on.\n *\n * 3. Check, for both windows, to see if the element at the beginning of the\n * window corresponds to the element at the end of the other window. This is\n * a heuristic which will let us identify _some_ situations in which\n * elements have changed position, for instance it _should_ detect that the\n * children nodes themselves have not changed but merely moved in the\n * following example:\n *\n * oldVNode: ``\n * newVNode: ``\n *\n * If we find cases like this then we also need to move the concrete DOM\n * elements corresponding to the moved children to write the re-order to the\n * DOM.\n *\n * 4. Finally, if VNodes have the `key` attribute set on them we check for any\n * nodes in the old children which have the same key as the first element in\n * our window on the new children. If we find such a node we handle calling\n * out to `patch`, moving relevant DOM nodes, and so on, in accordance with\n * what we find.\n *\n * Finally, once we've narrowed our 'windows' to the point that either of them\n * collapse (i.e. they have length 0) we then handle any remaining VNode\n * insertion or deletion that needs to happen to get a DOM state that correctly\n * reflects the new child VNodes. If, for instance, after our window on the old\n * children has collapsed we still have more nodes on the new children that\n * we haven't dealt with yet then we need to add them, or if the new children\n * collapse but we still have unhandled _old_ children then we need to make\n * sure the corresponding DOM nodes are removed.\n *\n * @param parentElm the node into which the parent VNode is rendered\n * @param oldCh the old children of the parent node\n * @param newVNode the new VNode which will replace the parent\n * @param newCh the new children of the parent node\n */\nconst updateChildren = (parentElm, oldCh, newVNode, newCh) => {\n let oldStartIdx = 0;\n let newStartIdx = 0;\n let idxInOld = 0;\n let i = 0;\n let oldEndIdx = oldCh.length - 1;\n let oldStartVnode = oldCh[0];\n let oldEndVnode = oldCh[oldEndIdx];\n let newEndIdx = newCh.length - 1;\n let newStartVnode = newCh[0];\n let newEndVnode = newCh[newEndIdx];\n let node;\n let elmToMove;\n while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n if (oldStartVnode == null) {\n // VNode might have been moved left\n oldStartVnode = oldCh[++oldStartIdx];\n }\n else if (oldEndVnode == null) {\n oldEndVnode = oldCh[--oldEndIdx];\n }\n else if (newStartVnode == null) {\n newStartVnode = newCh[++newStartIdx];\n }\n else if (newEndVnode == null) {\n newEndVnode = newCh[--newEndIdx];\n }\n else if (isSameVnode(oldStartVnode, newStartVnode)) {\n // if the start nodes are the same then we should patch the new VNode\n // onto the old one, and increment our `newStartIdx` and `oldStartIdx`\n // indices to reflect that. We don't need to move any DOM Nodes around\n // since things are matched up in order.\n patch(oldStartVnode, newStartVnode);\n oldStartVnode = oldCh[++oldStartIdx];\n newStartVnode = newCh[++newStartIdx];\n }\n else if (isSameVnode(oldEndVnode, newEndVnode)) {\n // likewise, if the end nodes are the same we patch new onto old and\n // decrement our end indices, and also likewise in this case we don't\n // need to move any DOM Nodes.\n patch(oldEndVnode, newEndVnode);\n oldEndVnode = oldCh[--oldEndIdx];\n newEndVnode = newCh[--newEndIdx];\n }\n else if (isSameVnode(oldStartVnode, newEndVnode)) {\n // case: \"Vnode moved right\"\n //\n // We've found that the last node in our window on the new children is\n // the same VNode as the _first_ node in our window on the old children\n // we're dealing with now. Visually, this is the layout of these two\n // nodes:\n //\n // newCh: [..., newStartVnode , ... , newEndVnode , ...]\n // ^^^^^^^^^^^\n // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]\n // ^^^^^^^^^^^^^\n //\n // In this situation we need to patch `newEndVnode` onto `oldStartVnode`\n // and move the DOM element for `oldStartVnode`.\n if (BUILD.slotRelocation && (oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {\n putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);\n }\n patch(oldStartVnode, newEndVnode);\n // We need to move the element for `oldStartVnode` into a position which\n // will be appropriate for `newEndVnode`. For this we can use\n // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a\n // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for\n // `oldStartVnode` between `oldEndVnode` and it's sibling, like so:\n //\n // \n // \n // \n // \n // \n // \n // ```\n // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback\n // will be called with `newValue = \"some-value\"` and will set the shadowed property (this.someAttribute = \"another-value\")\n // to the value that was set inline i.e. \"some-value\" from above example. When\n // the connectedCallback attempts to unshadow it will use \"some-value\" as the initial value rather than \"another-value\"\n //\n // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed\n // by connectedCallback as this attributeChangedCallback will not fire.\n //\n // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties\n //\n // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to\n // properties here given that this goes against best practices outlined here\n // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy\n if (this.hasOwnProperty(propName)) {\n newValue = this[propName];\n delete this[propName];\n }\n else if (prototype.hasOwnProperty(propName) &&\n typeof this[propName] === 'number' &&\n this[propName] == newValue) {\n // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native\n // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in\n // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.\n return;\n }\n this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;\n });\n };\n // create an array of attributes to observe\n // and also create a map of html attribute name to js property name\n Cstr.observedAttributes = members\n .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes\n .map(([propName, m]) => {\n const attrName = m[1] || propName;\n attrNameToPropName.set(attrName, propName);\n if (BUILD.reflect && m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {\n cmpMeta.$attrsToReflect$.push([propName, attrName]);\n }\n return attrName;\n });\n }\n }\n return Cstr;\n};\nconst initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {\n // initializeComponent\n if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {\n // Let the runtime know that the component has been initialized\n hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;\n if (BUILD.lazyLoad || BUILD.hydrateClientSide) {\n // lazy loaded components\n // request the component's implementation to be\n // wired up with the host element\n Cstr = loadModule(cmpMeta, hostRef, hmrVersionId);\n if (Cstr.then) {\n // Await creates a micro-task avoid if possible\n const endLoad = uniqueTime(`st:load:${cmpMeta.$tagName$}:${hostRef.$modeName$}`, `[Stencil] Load module for <${cmpMeta.$tagName$}>`);\n Cstr = await Cstr;\n endLoad();\n }\n if ((BUILD.isDev || BUILD.isDebug) && !Cstr) {\n throw new Error(`Constructor for \"${cmpMeta.$tagName$}#${hostRef.$modeName$}\" was not found`);\n }\n if (BUILD.member && !Cstr.isProxied) {\n // we've never proxied this Constructor before\n // let's add the getters/setters to its prototype before\n // the first time we create an instance of the implementation\n if (BUILD.watchCallback) {\n cmpMeta.$watchers$ = Cstr.watchers;\n }\n proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);\n Cstr.isProxied = true;\n }\n const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);\n // ok, time to construct the instance\n // but let's keep track of when we start and stop\n // so that the getters/setters don't incorrectly step on data\n if (BUILD.member) {\n hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;\n }\n // construct the lazy-loaded component implementation\n // passing the hostRef is very important during\n // construction in order to directly wire together the\n // host element and the lazy-loaded instance\n try {\n new Cstr(hostRef);\n }\n catch (e) {\n consoleError(e);\n }\n if (BUILD.member) {\n hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;\n }\n if (BUILD.watchCallback) {\n hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;\n }\n endNewInstance();\n fireConnectedCallback(hostRef.$lazyInstance$);\n }\n else {\n // sync constructor component\n Cstr = elm.constructor;\n // wait for the CustomElementRegistry to mark the component as ready before setting `isWatchReady`. Otherwise,\n // watchers may fire prematurely if `customElements.get()`/`customElements.whenDefined()` resolves _before_\n // Stencil has completed instantiating the component.\n customElements.whenDefined(cmpMeta.$tagName$).then(() => (hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */));\n }\n if (BUILD.style && Cstr.style) {\n // this component has styles but we haven't registered them yet\n let style = Cstr.style;\n if (BUILD.mode && typeof style !== 'string') {\n style = style[(hostRef.$modeName$ = computeMode(elm))];\n if (BUILD.hydrateServerSide && hostRef.$modeName$) {\n elm.setAttribute('s-mode', hostRef.$modeName$);\n }\n }\n const scopeId = getScopeId(cmpMeta, hostRef.$modeName$);\n if (!styles.has(scopeId)) {\n const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);\n if (!BUILD.hydrateServerSide &&\n BUILD.shadowDom &&\n // TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field\n BUILD.shadowDomShim &&\n cmpMeta.$flags$ & 8 /* CMP_FLAGS.needsShadowDomShim */) {\n style = await import('./shadow-css.js').then((m) => m.scopeCss(style, scopeId, false));\n }\n registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));\n endRegisterStyles();\n }\n }\n }\n // we've successfully created a lazy instance\n const ancestorComponent = hostRef.$ancestorComponent$;\n const schedule = () => scheduleUpdate(hostRef, true);\n if (BUILD.asyncLoading && ancestorComponent && ancestorComponent['s-rc']) {\n // this is the initial load and this component it has an ancestor component\n // but the ancestor component has NOT fired its will update lifecycle yet\n // so let's just cool our jets and wait for the ancestor to continue first\n // this will get fired off when the ancestor component\n // finally gets around to rendering its lazy self\n // fire off the initial update\n ancestorComponent['s-rc'].push(schedule);\n }\n else {\n schedule();\n }\n};\nconst fireConnectedCallback = (instance) => {\n if (BUILD.lazyLoad && BUILD.connectedCallback) {\n safeCall(instance, 'connectedCallback');\n }\n};\nconst connectedCallback = (elm) => {\n if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {\n const hostRef = getHostRef(elm);\n const cmpMeta = hostRef.$cmpMeta$;\n const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);\n if (BUILD.hostListenerTargetParent) {\n // only run if we have listeners being attached to a parent\n addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, true);\n }\n if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {\n // first time this component has connected\n hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;\n let hostId;\n if (BUILD.hydrateClientSide) {\n hostId = elm.getAttribute(HYDRATE_ID);\n if (hostId) {\n if (BUILD.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {\n const scopeId = BUILD.mode\n ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute('s-mode'))\n : addStyle(elm.shadowRoot, cmpMeta);\n elm.classList.remove(scopeId + '-h', scopeId + '-s');\n }\n initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);\n }\n }\n if (BUILD.slotRelocation && !hostId) {\n // initUpdate\n // if the slot polyfill is required we'll need to put some nodes\n // in here to act as original content anchors as we move nodes around\n // host element has been connected to the DOM\n if (BUILD.hydrateServerSide ||\n ((BUILD.slot || BUILD.shadowDom) &&\n // TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field\n cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {\n setContentReference(elm);\n }\n }\n if (BUILD.asyncLoading) {\n // find the first ancestor component (if there is one) and register\n // this component as one of the actively loading child components for its ancestor\n let ancestorComponent = elm;\n while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {\n // climb up the ancestors looking for the first\n // component that hasn't finished its lifecycle update yet\n if ((BUILD.hydrateClientSide &&\n ancestorComponent.nodeType === 1 /* NODE_TYPE.ElementNode */ &&\n ancestorComponent.hasAttribute('s-id') &&\n ancestorComponent['s-p']) ||\n ancestorComponent['s-p']) {\n // we found this components first ancestor component\n // keep a reference to this component's ancestor component\n attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));\n break;\n }\n }\n }\n // Lazy properties\n // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties\n if (BUILD.prop && !BUILD.hydrateServerSide && cmpMeta.$members$) {\n Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {\n if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {\n const value = elm[memberName];\n delete elm[memberName];\n elm[memberName] = value;\n }\n });\n }\n if (BUILD.initializeNextTick) {\n // connectedCallback, taskQueue, initialLoad\n // angular sets attribute AFTER connectCallback\n // https://github.com/angular/angular/issues/18909\n // https://github.com/angular/angular/issues/19940\n nextTick(() => initializeComponent(elm, hostRef, cmpMeta));\n }\n else {\n initializeComponent(elm, hostRef, cmpMeta);\n }\n }\n else {\n // not the first time this has connected\n // reattach any event listeners to the host\n // since they would have been removed when disconnected\n addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, false);\n // fire off connectedCallback() on component instance\n fireConnectedCallback(hostRef.$lazyInstance$);\n }\n endConnected();\n }\n};\nconst setContentReference = (elm) => {\n // only required when we're NOT using native shadow dom (slot)\n // or this browser doesn't support native shadow dom\n // and this host element was NOT created with SSR\n // let's pick out the inner content for slot projection\n // create a node to represent where the original\n // content was first placed, which is useful later on\n const contentRefElm = (elm['s-cr'] = doc.createComment(BUILD.isDebug ? `content-ref (host=${elm.localName})` : ''));\n contentRefElm['s-cn'] = true;\n elm.insertBefore(contentRefElm, elm.firstChild);\n};\nconst disconnectedCallback = (elm) => {\n if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {\n const hostRef = getHostRef(elm);\n const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;\n if (BUILD.hostListener) {\n if (hostRef.$rmListeners$) {\n hostRef.$rmListeners$.map((rmListener) => rmListener());\n hostRef.$rmListeners$ = undefined;\n }\n }\n // clear CSS var-shim tracking\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim && plt.$cssShim$) {\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$.removeHost(elm);\n }\n if (BUILD.lazyLoad && BUILD.disconnectedCallback) {\n safeCall(instance, 'disconnectedCallback');\n }\n if (BUILD.cmpDidUnload) {\n safeCall(instance, 'componentDidUnload');\n }\n }\n};\nconst defineCustomElement = (Cstr, compactMeta) => {\n customElements.define(compactMeta[1], proxyCustomElement(Cstr, compactMeta));\n};\nconst proxyCustomElement = (Cstr, compactMeta) => {\n const cmpMeta = {\n $flags$: compactMeta[0],\n $tagName$: compactMeta[1],\n };\n if (BUILD.member) {\n cmpMeta.$members$ = compactMeta[2];\n }\n if (BUILD.hostListener) {\n cmpMeta.$listeners$ = compactMeta[3];\n }\n if (BUILD.watchCallback) {\n cmpMeta.$watchers$ = Cstr.$watchers$;\n }\n if (BUILD.reflect) {\n cmpMeta.$attrsToReflect$ = [];\n }\n if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {\n // TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field\n cmpMeta.$flags$ |= 8 /* CMP_FLAGS.needsShadowDomShim */;\n }\n const originalConnectedCallback = Cstr.prototype.connectedCallback;\n const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;\n Object.assign(Cstr.prototype, {\n __registerHost() {\n registerHost(this, cmpMeta);\n },\n connectedCallback() {\n connectedCallback(this);\n if (BUILD.connectedCallback && originalConnectedCallback) {\n originalConnectedCallback.call(this);\n }\n },\n disconnectedCallback() {\n disconnectedCallback(this);\n if (BUILD.disconnectedCallback && originalDisconnectedCallback) {\n originalDisconnectedCallback.call(this);\n }\n },\n __attachShadow() {\n if (supportsShadow) {\n if (BUILD.shadowDelegatesFocus) {\n this.attachShadow({\n mode: 'open',\n delegatesFocus: !!(cmpMeta.$flags$ & 16 /* CMP_FLAGS.shadowDelegatesFocus */),\n });\n }\n else {\n this.attachShadow({ mode: 'open' });\n }\n }\n else {\n this.shadowRoot = this;\n }\n },\n });\n Cstr.is = cmpMeta.$tagName$;\n return proxyComponent(Cstr, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */ | 2 /* PROXY_FLAGS.proxyState */);\n};\nconst forceModeUpdate = (elm) => {\n if (BUILD.style && BUILD.mode && !BUILD.lazyLoad) {\n const mode = computeMode(elm);\n const hostRef = getHostRef(elm);\n if (hostRef.$modeName$ !== mode) {\n const cmpMeta = hostRef.$cmpMeta$;\n const oldScopeId = elm['s-sc'];\n const scopeId = getScopeId(cmpMeta, mode);\n const style = elm.constructor.style[mode];\n const flags = cmpMeta.$flags$;\n if (style) {\n if (!styles.has(scopeId)) {\n registerStyle(scopeId, style, !!(flags & 1 /* CMP_FLAGS.shadowDomEncapsulation */));\n }\n hostRef.$modeName$ = mode;\n elm.classList.remove(oldScopeId + '-h', oldScopeId + '-s');\n attachStyles(hostRef);\n forceUpdate(elm);\n }\n }\n }\n};\nconst patchCloneNode = (HostElementPrototype) => {\n const orgCloneNode = HostElementPrototype.cloneNode;\n HostElementPrototype.cloneNode = function (deep) {\n const srcNode = this;\n const isShadowDom = BUILD.shadowDom ? srcNode.shadowRoot && supportsShadow : false;\n const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);\n if (BUILD.slot && !isShadowDom && deep) {\n let i = 0;\n let slotted, nonStencilNode;\n const stencilPrivates = [\n 's-id',\n 's-cr',\n 's-lr',\n 's-rc',\n 's-sc',\n 's-p',\n 's-cn',\n 's-sr',\n 's-sn',\n 's-hn',\n 's-ol',\n 's-nr',\n 's-si',\n ];\n for (; i < srcNode.childNodes.length; i++) {\n slotted = srcNode.childNodes[i]['s-nr'];\n nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i][privateField]);\n if (slotted) {\n if (BUILD.appendChildSlotFix && clonedNode.__appendChild) {\n clonedNode.__appendChild(slotted.cloneNode(true));\n }\n else {\n clonedNode.appendChild(slotted.cloneNode(true));\n }\n }\n if (nonStencilNode) {\n clonedNode.appendChild(srcNode.childNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nconst patchSlotAppendChild = (HostElementPrototype) => {\n HostElementPrototype.__appendChild = HostElementPrototype.appendChild;\n HostElementPrototype.appendChild = function (newChild) {\n const slotName = (newChild['s-sn'] = getSlotName(newChild));\n const slotNode = getHostSlotNode(this.childNodes, slotName);\n if (slotNode) {\n const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);\n const appendAfter = slotChildNodes[slotChildNodes.length - 1];\n return appendAfter.parentNode.insertBefore(newChild, appendAfter.nextSibling);\n }\n return this.__appendChild(newChild);\n };\n};\n/**\n * Patches the text content of an unnamed slotted node inside a scoped component\n * @param hostElementPrototype the `Element` to be patched\n * @param cmpMeta component runtime metadata used to determine if the component should be patched or not\n */\nconst patchTextContent = (hostElementPrototype, cmpMeta) => {\n if (BUILD.scoped && cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {\n const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, 'textContent');\n Object.defineProperty(hostElementPrototype, '__textContent', descriptor);\n Object.defineProperty(hostElementPrototype, 'textContent', {\n get() {\n var _a;\n // get the 'default slot', which would be the first slot in a shadow tree (if we were using one), whose name is\n // the empty string\n const slotNode = getHostSlotNode(this.childNodes, '');\n // when a slot node is found, the textContent _may_ be found in the next sibling (text) node, depending on how\n // nodes were reordered during the vdom render. first try to get the text content from the sibling.\n if (((_a = slotNode === null || slotNode === void 0 ? void 0 : slotNode.nextSibling) === null || _a === void 0 ? void 0 : _a.nodeType) === 3 /* NODE_TYPES.TEXT_NODE */) {\n return slotNode.nextSibling.textContent;\n }\n else if (slotNode) {\n return slotNode.textContent;\n }\n else {\n // fallback to the original implementation\n return this.__textContent;\n }\n },\n set(value) {\n var _a;\n // get the 'default slot', which would be the first slot in a shadow tree (if we were using one), whose name is\n // the empty string\n const slotNode = getHostSlotNode(this.childNodes, '');\n // when a slot node is found, the textContent _may_ need to be placed in the next sibling (text) node,\n // depending on how nodes were reordered during the vdom render. first try to set the text content on the\n // sibling.\n if (((_a = slotNode === null || slotNode === void 0 ? void 0 : slotNode.nextSibling) === null || _a === void 0 ? void 0 : _a.nodeType) === 3 /* NODE_TYPES.TEXT_NODE */) {\n slotNode.nextSibling.textContent = value;\n }\n else if (slotNode) {\n slotNode.textContent = value;\n }\n else {\n // we couldn't find a slot, but that doesn't mean that there isn't one. if this check ran before the DOM\n // loaded, we could have missed it. check for a content reference element on the scoped component and insert\n // it there\n this.__textContent = value;\n const contentRefElm = this['s-cr'];\n if (contentRefElm) {\n this.insertBefore(contentRefElm, this.firstChild);\n }\n }\n },\n });\n }\n};\nconst patchChildSlotNodes = (elm, cmpMeta) => {\n class FakeNodeList extends Array {\n item(n) {\n return this[n];\n }\n }\n // TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field\n if (cmpMeta.$flags$ & 8 /* CMP_FLAGS.needsShadowDomShim */) {\n const childNodesFn = elm.__lookupGetter__('childNodes');\n Object.defineProperty(elm, 'children', {\n get() {\n return this.childNodes.map((n) => n.nodeType === 1);\n },\n });\n Object.defineProperty(elm, 'childElementCount', {\n get() {\n return elm.children.length;\n },\n });\n Object.defineProperty(elm, 'childNodes', {\n get() {\n const childNodes = childNodesFn.call(this);\n if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0 &&\n getHostRef(this).$flags$ & 2 /* HOST_FLAGS.hasRendered */) {\n const result = new FakeNodeList();\n for (let i = 0; i < childNodes.length; i++) {\n const slot = childNodes[i]['s-nr'];\n if (slot) {\n result.push(slot);\n }\n }\n return result;\n }\n return FakeNodeList.from(childNodes);\n },\n });\n }\n};\nconst getSlotName = (node) => node['s-sn'] || (node.nodeType === 1 && node.getAttribute('slot')) || '';\n/**\n * Recursively searches a series of child nodes for a slot with the provided name.\n * @param childNodes the nodes to search for a slot with a specific name.\n * @param slotName the name of the slot to match on.\n * @returns a reference to the slot node that matches the provided name, `null` otherwise\n */\nconst getHostSlotNode = (childNodes, slotName) => {\n let i = 0;\n let childNode;\n for (; i < childNodes.length; i++) {\n childNode = childNodes[i];\n if (childNode['s-sr'] && childNode['s-sn'] === slotName) {\n return childNode;\n }\n childNode = getHostSlotNode(childNode.childNodes, slotName);\n if (childNode) {\n return childNode;\n }\n }\n return null;\n};\nconst getHostSlotChildNodes = (n, slotName) => {\n const childNodes = [n];\n while ((n = n.nextSibling) && n['s-sn'] === slotName) {\n childNodes.push(n);\n }\n return childNodes;\n};\nconst hmrStart = (elm, cmpMeta, hmrVersionId) => {\n // ¯\\_(ツ)_/¯\n const hostRef = getHostRef(elm);\n // reset state flags to only have been connected\n hostRef.$flags$ = 1 /* HOST_FLAGS.hasConnected */;\n // TODO\n // detatch any event listeners that may have been added\n // because we're not passing an exact event name it'll\n // remove all of this element's event, which is good\n // create a callback for when this component finishes hmr\n elm['s-hmr-load'] = () => {\n // finished hmr for this element\n delete elm['s-hmr-load'];\n };\n // re-initialize the component\n initializeComponent(elm, hostRef, cmpMeta, hmrVersionId);\n};\nconst bootstrapLazy = (lazyBundles, options = {}) => {\n var _a;\n if (BUILD.profile && performance.mark) {\n performance.mark('st:app:start');\n }\n installDevTools();\n const endBootstrap = createTime('bootstrapLazy');\n const cmpTags = [];\n const exclude = options.exclude || [];\n const customElements = win.customElements;\n const head = doc.head;\n const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');\n const visibilityStyle = /*@__PURE__*/ doc.createElement('style');\n const deferredConnectedCallbacks = [];\n const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);\n let appLoadFallback;\n let isBootstrapping = true;\n let i = 0;\n Object.assign(plt, options);\n plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;\n if (BUILD.asyncQueue) {\n if (options.syncQueue) {\n plt.$flags$ |= 4 /* PLATFORM_FLAGS.queueSync */;\n }\n }\n if (BUILD.hydrateClientSide) {\n // If the app is already hydrated there is not point to disable the\n // async queue. This will improve the first input delay\n plt.$flags$ |= 2 /* PLATFORM_FLAGS.appLoaded */;\n }\n if (BUILD.hydrateClientSide && BUILD.shadowDom) {\n for (; i < styles.length; i++) {\n registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);\n }\n }\n lazyBundles.map((lazyBundle) => {\n lazyBundle[1].map((compactMeta) => {\n const cmpMeta = {\n $flags$: compactMeta[0],\n $tagName$: compactMeta[1],\n $members$: compactMeta[2],\n $listeners$: compactMeta[3],\n };\n if (BUILD.member) {\n cmpMeta.$members$ = compactMeta[2];\n }\n if (BUILD.hostListener) {\n cmpMeta.$listeners$ = compactMeta[3];\n }\n if (BUILD.reflect) {\n cmpMeta.$attrsToReflect$ = [];\n }\n if (BUILD.watchCallback) {\n cmpMeta.$watchers$ = {};\n }\n if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {\n // TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field\n cmpMeta.$flags$ |= 8 /* CMP_FLAGS.needsShadowDomShim */;\n }\n const tagName = BUILD.transformTagName && options.transformTagName\n ? options.transformTagName(cmpMeta.$tagName$)\n : cmpMeta.$tagName$;\n const HostElement = class extends HTMLElement {\n // StencilLazyHost\n constructor(self) {\n // @ts-ignore\n super(self);\n self = this;\n registerHost(self, cmpMeta);\n if (BUILD.shadowDom && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {\n // this component is using shadow dom\n // and this browser supports shadow dom\n // add the read-only property \"shadowRoot\" to the host element\n // adding the shadow root build conditionals to minimize runtime\n if (supportsShadow) {\n if (BUILD.shadowDelegatesFocus) {\n self.attachShadow({\n mode: 'open',\n delegatesFocus: !!(cmpMeta.$flags$ & 16 /* CMP_FLAGS.shadowDelegatesFocus */),\n });\n }\n else {\n self.attachShadow({ mode: 'open' });\n }\n }\n else if (!BUILD.hydrateServerSide && !('shadowRoot' in self)) {\n self.shadowRoot = self;\n }\n }\n if (BUILD.slotChildNodesFix) {\n patchChildSlotNodes(self, cmpMeta);\n }\n }\n connectedCallback() {\n if (appLoadFallback) {\n clearTimeout(appLoadFallback);\n appLoadFallback = null;\n }\n if (isBootstrapping) {\n // connectedCallback will be processed once all components have been registered\n deferredConnectedCallbacks.push(this);\n }\n else {\n plt.jmp(() => connectedCallback(this));\n }\n }\n disconnectedCallback() {\n plt.jmp(() => disconnectedCallback(this));\n }\n componentOnReady() {\n return getHostRef(this).$onReadyPromise$;\n }\n };\n if (BUILD.cloneNodeFix) {\n patchCloneNode(HostElement.prototype);\n }\n if (BUILD.appendChildSlotFix) {\n patchSlotAppendChild(HostElement.prototype);\n }\n if (BUILD.hotModuleReplacement) {\n HostElement.prototype['s-hmr'] = function (hmrVersionId) {\n hmrStart(this, cmpMeta, hmrVersionId);\n };\n }\n if (BUILD.scopedSlotTextContentFix) {\n patchTextContent(HostElement.prototype, cmpMeta);\n }\n cmpMeta.$lazyBundleId$ = lazyBundle[0];\n if (!exclude.includes(tagName) && !customElements.get(tagName)) {\n cmpTags.push(tagName);\n customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));\n }\n });\n });\n if (BUILD.invisiblePrehydration && (BUILD.hydratedClass || BUILD.hydratedAttribute)) {\n visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;\n visibilityStyle.setAttribute('data-styles', '');\n // Apply CSP nonce to the style tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n visibilityStyle.setAttribute('nonce', nonce);\n }\n head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);\n }\n // Process deferred connectedCallbacks now all components have been registered\n isBootstrapping = false;\n if (deferredConnectedCallbacks.length) {\n deferredConnectedCallbacks.map((host) => host.connectedCallback());\n }\n else {\n if (BUILD.profile) {\n plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30, 'timeout')));\n }\n else {\n plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));\n }\n }\n // Fallback appLoad event\n endBootstrap();\n};\nconst getConnect = (_ref, tagName) => {\n const componentOnReady = () => {\n let elm = doc.querySelector(tagName);\n if (!elm) {\n elm = doc.createElement(tagName);\n doc.body.appendChild(elm);\n }\n return typeof elm.componentOnReady === 'function' ? elm.componentOnReady() : Promise.resolve(elm);\n };\n const create = (...args) => {\n return componentOnReady().then((el) => el.create(...args));\n };\n return {\n create,\n componentOnReady,\n };\n};\nconst getContext = (_elm, context) => {\n if (context in Context) {\n return Context[context];\n }\n else if (context === 'window') {\n return win;\n }\n else if (context === 'document') {\n return doc;\n }\n else if (context === 'isServer' || context === 'isPrerender') {\n return BUILD.hydrateServerSide ? true : false;\n }\n else if (context === 'isClient') {\n return BUILD.hydrateServerSide ? false : true;\n }\n else if (context === 'resourcesUrl' || context === 'publicPath') {\n return getAssetPath('.');\n }\n else if (context === 'queue') {\n return {\n write: writeTask,\n read: readTask,\n tick: {\n then(cb) {\n return nextTick(cb);\n },\n },\n };\n }\n return undefined;\n};\nconst Fragment = (_, children) => children;\nconst addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {\n if (BUILD.hostListener && listeners) {\n // this is called immediately within the element's constructor\n // initialize our event listeners on the host element\n // we do this now so that we can listen to events that may\n // have fired even before the instance is ready\n if (BUILD.hostListenerTargetParent) {\n // this component may have event listeners that should be attached to the parent\n if (attachParentListeners) {\n // this is being ran from within the connectedCallback\n // which is important so that we know the host element actually has a parent element\n // filter out the listeners to only have the ones that ARE being attached to the parent\n listeners = listeners.filter(([flags]) => flags & 32 /* LISTENER_FLAGS.TargetParent */);\n }\n else {\n // this is being ran from within the component constructor\n // everything BUT the parent element listeners should be attached at this time\n // filter out the listeners that are NOT being attached to the parent\n listeners = listeners.filter(([flags]) => !(flags & 32 /* LISTENER_FLAGS.TargetParent */));\n }\n }\n listeners.map(([flags, name, method]) => {\n const target = BUILD.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm;\n const handler = hostListenerProxy(hostRef, method);\n const opts = hostListenerOpts(flags);\n plt.ael(target, name, handler, opts);\n (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));\n });\n }\n};\nconst hostListenerProxy = (hostRef, methodName) => (ev) => {\n try {\n if (BUILD.lazyLoad) {\n if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {\n // instance is ready, let's call it's member method for this event\n hostRef.$lazyInstance$[methodName](ev);\n }\n else {\n (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);\n }\n }\n else {\n hostRef.$hostElement$[methodName](ev);\n }\n }\n catch (e) {\n consoleError(e);\n }\n};\nconst getHostListenerTarget = (elm, flags) => {\n if (BUILD.hostListenerTargetDocument && flags & 4 /* LISTENER_FLAGS.TargetDocument */)\n return doc;\n if (BUILD.hostListenerTargetWindow && flags & 8 /* LISTENER_FLAGS.TargetWindow */)\n return win;\n if (BUILD.hostListenerTargetBody && flags & 16 /* LISTENER_FLAGS.TargetBody */)\n return doc.body;\n if (BUILD.hostListenerTargetParent && flags & 32 /* LISTENER_FLAGS.TargetParent */)\n return elm.parentElement;\n return elm;\n};\n// prettier-ignore\nconst hostListenerOpts = (flags) => supportsListenerOptions\n ? ({\n passive: (flags & 1 /* LISTENER_FLAGS.Passive */) !== 0,\n capture: (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0,\n })\n : (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;\n/**\n * Assigns the given value to the nonce property on the runtime platform object.\n * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.\n * @param nonce The value to be assigned to the platform nonce property.\n * @returns void\n */\nconst setNonce = (nonce) => (plt.$nonce$ = nonce);\nconst setPlatformOptions = (opts) => Object.assign(plt, opts);\nconst insertVdomAnnotations = (doc, staticComponents) => {\n if (doc != null) {\n const docData = {\n hostIds: 0,\n rootLevelIds: 0,\n staticComponents: new Set(staticComponents),\n };\n const orgLocationNodes = [];\n parseVNodeAnnotations(doc, doc.body, docData, orgLocationNodes);\n orgLocationNodes.forEach((orgLocationNode) => {\n if (orgLocationNode != null) {\n const nodeRef = orgLocationNode['s-nr'];\n let hostId = nodeRef['s-host-id'];\n let nodeId = nodeRef['s-node-id'];\n let childId = `${hostId}.${nodeId}`;\n if (hostId == null) {\n hostId = 0;\n docData.rootLevelIds++;\n nodeId = docData.rootLevelIds;\n childId = `${hostId}.${nodeId}`;\n if (nodeRef.nodeType === 1 /* NODE_TYPE.ElementNode */) {\n nodeRef.setAttribute(HYDRATE_CHILD_ID, childId);\n }\n else if (nodeRef.nodeType === 3 /* NODE_TYPE.TextNode */) {\n if (hostId === 0) {\n const textContent = nodeRef.nodeValue.trim();\n if (textContent === '') {\n // useless whitespace node at the document root\n orgLocationNode.remove();\n return;\n }\n }\n const commentBeforeTextNode = doc.createComment(childId);\n commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;\n nodeRef.parentNode.insertBefore(commentBeforeTextNode, nodeRef);\n }\n }\n let orgLocationNodeId = `${ORG_LOCATION_ID}.${childId}`;\n const orgLocationParentNode = orgLocationNode.parentElement;\n if (orgLocationParentNode) {\n if (orgLocationParentNode['s-en'] === '') {\n // ending with a \".\" means that the parent element\n // of this node's original location is a SHADOW dom element\n // and this node is apart of the root level light dom\n orgLocationNodeId += `.`;\n }\n else if (orgLocationParentNode['s-en'] === 'c') {\n // ending with a \".c\" means that the parent element\n // of this node's original location is a SCOPED element\n // and this node is apart of the root level light dom\n orgLocationNodeId += `.c`;\n }\n }\n orgLocationNode.nodeValue = orgLocationNodeId;\n }\n });\n }\n};\nconst parseVNodeAnnotations = (doc, node, docData, orgLocationNodes) => {\n if (node == null) {\n return;\n }\n if (node['s-nr'] != null) {\n orgLocationNodes.push(node);\n }\n if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {\n node.childNodes.forEach((childNode) => {\n const hostRef = getHostRef(childNode);\n if (hostRef != null && !docData.staticComponents.has(childNode.nodeName.toLowerCase())) {\n const cmpData = {\n nodeIds: 0,\n };\n insertVNodeAnnotations(doc, childNode, hostRef.$vnode$, docData, cmpData);\n }\n parseVNodeAnnotations(doc, childNode, docData, orgLocationNodes);\n });\n }\n};\nconst insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) => {\n if (vnode != null) {\n const hostId = ++docData.hostIds;\n hostElm.setAttribute(HYDRATE_ID, hostId);\n if (hostElm['s-cr'] != null) {\n hostElm['s-cr'].nodeValue = `${CONTENT_REF_ID}.${hostId}`;\n }\n if (vnode.$children$ != null) {\n const depth = 0;\n vnode.$children$.forEach((vnodeChild, index) => {\n insertChildVNodeAnnotations(doc, vnodeChild, cmpData, hostId, depth, index);\n });\n }\n if (hostElm && vnode && vnode.$elm$ && !hostElm.hasAttribute('c-id')) {\n const parent = hostElm.parentElement;\n if (parent && parent.childNodes) {\n const parentChildNodes = Array.from(parent.childNodes);\n const comment = parentChildNodes.find((node) => node.nodeType === 8 /* NODE_TYPE.CommentNode */ && node['s-sr']);\n if (comment) {\n const index = parentChildNodes.indexOf(hostElm) - 1;\n vnode.$elm$.setAttribute(HYDRATE_CHILD_ID, `${comment['s-host-id']}.${comment['s-node-id']}.0.${index}`);\n }\n }\n }\n }\n};\nconst insertChildVNodeAnnotations = (doc, vnodeChild, cmpData, hostId, depth, index) => {\n const childElm = vnodeChild.$elm$;\n if (childElm == null) {\n return;\n }\n const nodeId = cmpData.nodeIds++;\n const childId = `${hostId}.${nodeId}.${depth}.${index}`;\n childElm['s-host-id'] = hostId;\n childElm['s-node-id'] = nodeId;\n if (childElm.nodeType === 1 /* NODE_TYPE.ElementNode */) {\n childElm.setAttribute(HYDRATE_CHILD_ID, childId);\n }\n else if (childElm.nodeType === 3 /* NODE_TYPE.TextNode */) {\n const parentNode = childElm.parentNode;\n const nodeName = parentNode.nodeName;\n if (nodeName !== 'STYLE' && nodeName !== 'SCRIPT') {\n const textNodeId = `${TEXT_NODE_ID}.${childId}`;\n const commentBeforeTextNode = doc.createComment(textNodeId);\n parentNode.insertBefore(commentBeforeTextNode, childElm);\n }\n }\n else if (childElm.nodeType === 8 /* NODE_TYPE.CommentNode */) {\n if (childElm['s-sr']) {\n const slotName = childElm['s-sn'] || '';\n const slotNodeId = `${SLOT_NODE_ID}.${childId}.${slotName}`;\n childElm.nodeValue = slotNodeId;\n }\n }\n if (vnodeChild.$children$ != null) {\n const childDepth = depth + 1;\n vnodeChild.$children$.forEach((vnode, index) => {\n insertChildVNodeAnnotations(doc, vnode, cmpData, hostId, childDepth, index);\n });\n }\n};\nconst hostRefs = /*@__PURE__*/ new WeakMap();\nconst getHostRef = (ref) => hostRefs.get(ref);\nconst registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);\nconst registerHost = (elm, cmpMeta) => {\n const hostRef = {\n $flags$: 0,\n $hostElement$: elm,\n $cmpMeta$: cmpMeta,\n $instanceValues$: new Map(),\n };\n if (BUILD.isDev) {\n hostRef.$renderCount$ = 0;\n }\n if (BUILD.method && BUILD.lazyLoad) {\n hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));\n }\n if (BUILD.asyncLoading) {\n hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));\n elm['s-p'] = [];\n elm['s-rc'] = [];\n }\n addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, false);\n return hostRefs.set(elm, hostRef);\n};\nconst isMemberInElement = (elm, memberName) => memberName in elm;\nconst consoleError = (e, el) => (customError || console.error)(e, el);\nconst STENCIL_DEV_MODE = BUILD.isTesting\n ? ['STENCIL:'] // E2E testing\n : [\n '%cstencil',\n 'color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px',\n ];\nconst consoleDevError = (...m) => console.error(...STENCIL_DEV_MODE, ...m);\nconst consoleDevWarn = (...m) => console.warn(...STENCIL_DEV_MODE, ...m);\nconst consoleDevInfo = (...m) => console.info(...STENCIL_DEV_MODE, ...m);\nconst setErrorHandler = (handler) => (customError = handler);\nconst cmpModules = /*@__PURE__*/ new Map();\nconst loadModule = (cmpMeta, hostRef, hmrVersionId) => {\n // loadModuleImport\n const exportName = cmpMeta.$tagName$.replace(/-/g, '_');\n const bundleId = cmpMeta.$lazyBundleId$;\n if (BUILD.isDev && typeof bundleId !== 'string') {\n consoleDevError(`Trying to lazily load component <${cmpMeta.$tagName$}> with style mode \"${hostRef.$modeName$}\", but it does not exist.`);\n return undefined;\n }\n const module = !BUILD.hotModuleReplacement ? cmpModules.get(bundleId) : false;\n if (module) {\n return module[exportName];\n }\n /*!__STENCIL_STATIC_IMPORT_SWITCH__*/\n return import(\n /* @vite-ignore */\n /* webpackInclude: /\\.entry\\.js$/ */\n /* webpackExclude: /\\.system\\.entry\\.js$/ */\n /* webpackMode: \"lazy\" */\n `./${bundleId}.entry.js${BUILD.hotModuleReplacement && hmrVersionId ? '?s-hmr=' + hmrVersionId : ''}`).then((importedModule) => {\n if (!BUILD.hotModuleReplacement) {\n cmpModules.set(bundleId, importedModule);\n }\n return importedModule[exportName];\n }, consoleError);\n};\nconst styles = /*@__PURE__*/ new Map();\nconst modeResolutionChain = [];\nconst win = typeof window !== 'undefined' ? window : {};\n// TODO(STENCIL-659): Remove code implementing the CSS variable shim\nconst CSS = BUILD.cssVarShim ? win.CSS : null;\nconst doc = win.document || { head: {} };\nconst H = (win.HTMLElement || class {\n});\nconst plt = {\n $flags$: 0,\n $resourcesUrl$: '',\n jmp: (h) => h(),\n raf: (h) => requestAnimationFrame(h),\n ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),\n rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),\n ce: (eventName, opts) => new CustomEvent(eventName, opts),\n};\nconst setPlatformHelpers = (helpers) => {\n Object.assign(plt, helpers);\n};\nconst supportsShadow = \n// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field\nBUILD.shadowDomShim && BUILD.shadowDom\n ? /*@__PURE__*/ (() => (doc.head.attachShadow + '').indexOf('[native') > -1)()\n : true;\nconst supportsListenerOptions = /*@__PURE__*/ (() => {\n let supportsListenerOptions = false;\n try {\n doc.addEventListener('e', null, Object.defineProperty({}, 'passive', {\n get() {\n supportsListenerOptions = true;\n },\n }));\n }\n catch (e) { }\n return supportsListenerOptions;\n})();\nconst promiseResolve = (v) => Promise.resolve(v);\nconst supportsConstructableStylesheets = BUILD.constructableCSS\n ? /*@__PURE__*/ (() => {\n try {\n new CSSStyleSheet();\n return typeof new CSSStyleSheet().replaceSync === 'function';\n }\n catch (e) { }\n return false;\n })()\n : false;\nconst queueDomReads = [];\nconst queueDomWrites = [];\nconst queueDomWritesLow = [];\nconst queueTask = (queue, write) => (cb) => {\n queue.push(cb);\n if (!queuePending) {\n queuePending = true;\n if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {\n nextTick(flush);\n }\n else {\n plt.raf(flush);\n }\n }\n};\nconst consume = (queue) => {\n for (let i = 0; i < queue.length; i++) {\n try {\n queue[i](performance.now());\n }\n catch (e) {\n consoleError(e);\n }\n }\n queue.length = 0;\n};\nconst consumeTimeout = (queue, timeout) => {\n let i = 0;\n let ts = 0;\n while (i < queue.length && (ts = performance.now()) < timeout) {\n try {\n queue[i++](ts);\n }\n catch (e) {\n consoleError(e);\n }\n }\n if (i === queue.length) {\n queue.length = 0;\n }\n else if (i !== 0) {\n queue.splice(0, i);\n }\n};\nconst flush = () => {\n if (BUILD.asyncQueue) {\n queueCongestion++;\n }\n // always force a bunch of medium callbacks to run, but still have\n // a throttle on how many can run in a certain time\n // DOM READS!!!\n consume(queueDomReads);\n // DOM WRITES!!!\n if (BUILD.asyncQueue) {\n const timeout = (plt.$flags$ & 6 /* PLATFORM_FLAGS.queueMask */) === 2 /* PLATFORM_FLAGS.appLoaded */\n ? performance.now() + 14 * Math.ceil(queueCongestion * (1.0 / 10.0))\n : Infinity;\n consumeTimeout(queueDomWrites, timeout);\n consumeTimeout(queueDomWritesLow, timeout);\n if (queueDomWrites.length > 0) {\n queueDomWritesLow.push(...queueDomWrites);\n queueDomWrites.length = 0;\n }\n if ((queuePending = queueDomReads.length + queueDomWrites.length + queueDomWritesLow.length > 0)) {\n // still more to do yet, but we've run out of time\n // let's let this thing cool off and try again in the next tick\n plt.raf(flush);\n }\n else {\n queueCongestion = 0;\n }\n }\n else {\n consume(queueDomWrites);\n if ((queuePending = queueDomReads.length > 0)) {\n // still more to do yet, but we've run out of time\n // let's let this thing cool off and try again in the next tick\n plt.raf(flush);\n }\n }\n};\nconst nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);\nconst readTask = /*@__PURE__*/ queueTask(queueDomReads, false);\nconst writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);\nexport { BUILD, Env, NAMESPACE } from '@stencil/core/internal/app-data';\nexport { Build, CSS, Context, Fragment, H, H as HTMLElement, Host, STENCIL_DEV_MODE, addHostEventListeners, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, doc, forceModeUpdate, forceUpdate, getAssetPath, getConnect, getContext, getElement, getHostRef, getMode, getRenderingRef, getValue, h, insertVdomAnnotations, isMemberInElement, loadModule, modeResolutionChain, nextTick, parsePropertyValue, plt, postUpdateComponent, promiseResolve, proxyComponent, proxyCustomElement, readTask, registerHost, registerInstance, renderVdom, setAssetPath, setErrorHandler, setMode, setNonce, setPlatformHelpers, setPlatformOptions, setValue, styles, supportsConstructableStylesheets, supportsListenerOptions, supportsShadow, win, writeTask };\n"],"mappings":"AAAO,MAAMA,EAAY,yBCQzB,IAAIC,EACJ,IAAIC,EACJ,IAAIC,EAGJ,IAAIC,EAAqB,MACzB,IAAIC,EAA8B,MAClC,IAAIC,EAAoB,MACxB,IAAIC,EAAY,MAGhB,IAAIC,EAAe,MAYd,MAACC,EAAgBC,IAClB,MAAMC,EAAW,IAAIC,IAAIF,EAAMG,GAAIC,GACnC,OAAOH,EAASI,SAAWC,GAAIC,SAASF,OAASJ,EAASO,KAAOP,EAASQ,QAAQ,EAGtF,MAAMC,EAAa,CAACC,EAAQC,EAAU,MAQ7B,CACD,MAAO,MAGf,GAEA,MAAMC,EAAa,CAACC,EAAKC,KAWhB,CACD,MAAO,MAGf,GAgEA,MAAMC,EAAe,mDASrB,MAAMC,EAAY,GAMlB,MAAMC,EAASC,GAAMA,GAAK,KAQ1B,MAAMC,EAAiBC,IAEnBA,SAAWA,EACX,OAAOA,IAAM,UAAYA,IAAM,UAAU,EAU7C,SAASC,EAAyBC,GAC9B,IAAIC,EAAIC,EAAIC,EACZ,OAAQA,GAAMD,GAAMD,EAAKD,EAAII,QAAU,MAAQH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MACZ,IACI,IAAIC,cACJ,cAAc,IAAIA,eAAgBC,cAAgB,UAC9D,CACQ,MAAOkD,GAAG,CACV,OAAO,KACV,EAPe,GASpB,MAAMuO,GAAgB,GACtB,MAAMC,GAAiB,GAEvB,MAAMC,GAAY,CAACC,EAAOC,IAAW5T,IACjC2T,EAAMpV,KAAKyB,GACX,IAAK3E,EAAc,CACfA,EAAe,KACf,GAAIuY,GAASlY,GAAI+D,EAAU,EAAkC,CACzDkN,GAASkH,GACrB,KACa,CACDnY,GAAIqX,IAAIc,GACpB,CACA,GAEA,MAAMC,GAAWH,IACb,IAAK,IAAI1V,EAAI,EAAGA,EAAI0V,EAAMzV,OAAQD,IAAK,CACnC,IACI0V,EAAM1V,GAAG8V,YAAYC,MACjC,CACQ,MAAO/O,GACHqH,GAAarH,EACzB,CACA,CACI0O,EAAMzV,OAAS,CAAC,EAoBpB,MAAM2V,GAAQ,KAOVC,GAAQN,IAqBH,CACDM,GAAQL,IACR,GAAKpY,EAAemY,GAActV,OAAS,EAAI,CAG3CxC,GAAIqX,IAAIc,GACpB,CACA,GAEA,MAAMlH,GAA0B3M,GAAOsT,KAAiB3H,KAAK3L,GAE7D,MAAMkL,GAA0BwI,GAAUD,GAAgB,a"} \ No newline at end of file diff --git a/assets/javascripts/web-components/p-f2db04cf.entry.js b/assets/javascripts/web-components/p-f2db04cf.entry.js new file mode 100644 index 000000000..1551ce434 --- /dev/null +++ b/assets/javascripts/web-components/p-f2db04cf.entry.js @@ -0,0 +1,3 @@ +import{r as e,h as t,g as n,F as r}from"./p-6c241004.js";const i=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];const a=["January","February","March","April","May","June","July","August","September","October","November","December"];const s=42;const l=35;const f=28;const c=[0,1,2,3,4,5,6];class o{constructor(e,t){this.daysInCalendar=l;this.notInThisMonthStartCount=0;this.notInThisMonthEndCount=0;this.notInThisMonthCounts=c;this.year=e;this.month=t}getCalendarDays(){const e=this.getCurrentMonthDays();const t=this.notInThisMonthCounts[this.getMonthFirstDay()];const n=l-(e.length+t);this.currentMonthCount=e.length;this.notInThisMonthStartCount=t;this.notInThisMonthEndCount=n;const r=t>0?this.getDaysOfLastMonth(t).map((e=>0)):[];const i=this.getNextMonthDays(n).map((e=>0));return[...r,...e,...i]}getCurrentMonthDays(){return this.getDaysOfMonth(this.month)}getDaysOfLastMonth(e){const t=this.getDaysOfMonth(this.month-1);return t.slice(-e)}getNextMonthDays(e){const{currentMonthCount:t,notInThisMonthStartCount:n}=this;const r=this.getDaysOfMonth(this.month+1);const i=t+n;if(e<=-1){e=s-i;this.daysInCalendar=s}else if(e===7&&i===28){e=f-i;this.daysInCalendar=f}this.notInThisMonthEndCount=e;return r.slice(0,e)}getDaysOfMonth(e){const t=new Date(this.year,e,0).getDate();return Array.from({length:t},((e,t)=>t+1))}getMonthFirstDay(){return new Date(this.year,this.month-1,1).getDay()}getNotInThisMonthStartCount(){return this.notInThisMonthStartCount}getNotInThisMonthEndCount(){return this.notInThisMonthEndCount}static getToday(){const e=new Date;return{date:`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`,month:e.getMonth()+1,day:e.getDate(),year:e.getFullYear()}}}var u;(function(e){e[e["Next"]=0]="Next";e[e["Previous"]=1]="Previous"})(u||(u={})); +/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function d(e){return typeof e==="undefined"||e===null}function h(e){return typeof e==="object"&&e!==null}function w(e){if(Array.isArray(e))return e;else if(d(e))return[];return[e]}function v(e,t){var n,r,i,a;if(t){a=Object.keys(t);for(n=0,r=a.length;nl){a=" ... ";t=r-l+a.length}if(n-r>l){s=" ...";n=r+l-s.length}return{str:a+e.slice(t,n).replace(/\t/g,"→")+s,pos:r-t+a.length}}function M(e,t){return O.repeat(" ",t-e.length)+e}function _(e,t){t=Object.create(t||null);if(!e.buffer)return null;if(!t.maxLength)t.maxLength=79;if(typeof t.indent!=="number")t.indent=1;if(typeof t.linesBefore!=="number")t.linesBefore=3;if(typeof t.linesAfter!=="number")t.linesAfter=2;var n=/\r?\n|\r|\0/g;var r=[0];var i=[];var a;var s=-1;while(a=n.exec(e.buffer)){i.push(a.index);r.push(a.index+a[0].length);if(e.position<=a.index&&s<0){s=r.length-2}}if(s<0)s=r.length-1;var l="",f,c;var o=Math.min(e.line+t.linesAfter,i.length).toString().length;var u=t.maxLength-(t.indent+o+3);for(f=1;f<=t.linesBefore;f++){if(s-f<0)break;c=S(e.buffer,r[s-f],i[s-f],e.position-(r[s]-r[s-f]),u);l=O.repeat(" ",t.indent)+M((e.line-f+1).toString(),o)+" | "+c.str+"\n"+l}c=S(e.buffer,r[s],i[s],e.position,u);l+=O.repeat(" ",t.indent)+M((e.line+1).toString(),o)+" | "+c.str+"\n";l+=O.repeat("-",t.indent+o+3+c.pos)+"^"+"\n";for(f=1;f<=t.linesAfter;f++){if(s+f>=i.length)break;c=S(e.buffer,r[s+f],i[s+f],e.position-(r[s]-r[s+f]),u);l+=O.repeat(" ",t.indent)+M((e.line+f+1).toString(),o)+" | "+c.str+"\n"}return l.replace(/\n$/,"")}var D=_;var E=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"];var C=["scalar","sequence","mapping"];function L(e){var t={};if(e!==null){Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))}))}return t}function T(e,t){t=t||{};Object.keys(t).forEach((function(t){if(E.indexOf(t)===-1){throw new N('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}}));this.options=t;this.tag=e;this.kind=t["kind"]||null;this.resolve=t["resolve"]||function(){return true};this.construct=t["construct"]||function(e){return e};this.instanceOf=t["instanceOf"]||null;this.predicate=t["predicate"]||null;this.represent=t["represent"]||null;this.representName=t["representName"]||null;this.defaultStyle=t["defaultStyle"]||null;this.multi=t["multi"]||false;this.styleAliases=L(t["styleAliases"]||null);if(C.indexOf(this.kind)===-1){throw new N('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}var I=T;function $(e,t){var n=[];e[t].forEach((function(e){var t=n.length;n.forEach((function(n,r){if(n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi){t=r}}));n[t]=e}));return n}function U(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function r(t){if(t.multi){e.multi[t.kind].push(t);e.multi["fallback"].push(t)}else{e[t.kind][t.tag]=e["fallback"][t.tag]=t}}for(t=0,n=arguments.length;t=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}});var se=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function le(e){if(e===null)return false;if(!se.test(e)||e[e.length-1]==="_"){return false}return true}function fe(e){var t,n;t=e.replace(/_/g,"").toLowerCase();n=t[0]==="-"?-1:1;if("+-".indexOf(t[0])>=0){t=t.slice(1)}if(t===".inf"){return n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(t===".nan"){return NaN}return n*parseFloat(t,10)}var ce=/^[-+]?[0-9]+e/;function oe(e,t){var n;if(isNaN(e)){switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(O.isNegativeZero(e)){return"-0.0"}n=e.toString(10);return ce.test(n)?n.replace("e",".e"):n}function ue(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||O.isNegativeZero(e))}var de=new I("tag:yaml.org,2002:float",{kind:"scalar",resolve:le,construct:fe,predicate:ue,represent:oe,defaultStyle:"lowercase"});var he=J.extend({implicit:[P,Q,ae,de]});var we=he;var ve=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var me=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function pe(e){if(e===null)return false;if(ve.exec(e)!==null)return true;if(me.exec(e)!==null)return true;return false}function be(e){var t,n,r,i,a,s,l,f=0,c=null,o,u,d;t=ve.exec(e);if(t===null)t=me.exec(e);if(t===null)throw new Error("Date resolve error");n=+t[1];r=+t[2]-1;i=+t[3];if(!t[4]){return new Date(Date.UTC(n,r,i))}a=+t[4];s=+t[5];l=+t[6];if(t[7]){f=t[7].slice(0,3);while(f.length<3){f+="0"}f=+f}if(t[9]){o=+t[10];u=+(t[11]||0);c=(o*60+u)*6e4;if(t[9]==="-")c=-c}d=new Date(Date.UTC(n,r,i,a,s,l,f));if(c)d.setTime(d.getTime()-c);return d}function ye(e){return e.toISOString()}var ge=new I("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:pe,construct:be,instanceOf:Date,represent:ye});function xe(e){return e==="<<"||e===null}var ke=new I("tag:yaml.org,2002:merge",{kind:"scalar",resolve:xe});var je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function Oe(e){if(e===null)return false;var t,n,r=0,i=e.length,a=je;for(n=0;n64)continue;if(t<0)return false;r+=6}return r%8===0}function Ae(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,a=je,s=0,l=[];for(t=0;t>16&255);l.push(s>>8&255);l.push(s&255)}s=s<<6|a.indexOf(r.charAt(t))}n=i%4*6;if(n===0){l.push(s>>16&255);l.push(s>>8&255);l.push(s&255)}else if(n===18){l.push(s>>10&255);l.push(s>>2&255)}else if(n===12){l.push(s>>4&255)}return new Uint8Array(l)}function Fe(e){var t="",n=0,r,i,a=e.length,s=je;for(r=0;r>18&63];t+=s[n>>12&63];t+=s[n>>6&63];t+=s[n&63]}n=(n<<8)+e[r]}i=a%3;if(i===0){t+=s[n>>18&63];t+=s[n>>12&63];t+=s[n>>6&63];t+=s[n&63]}else if(i===2){t+=s[n>>10&63];t+=s[n>>4&63];t+=s[n<<2&63];t+=s[64]}else if(i===1){t+=s[n>>2&63];t+=s[n<<4&63];t+=s[64];t+=s[64]}return t}function Ne(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Se=new I("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Oe,construct:Ae,predicate:Ne,represent:Fe});var Me=Object.prototype.hasOwnProperty;var _e=Object.prototype.toString;function De(e){if(e===null)return true;var t=[],n,r,i,a,s,l=e;for(n=0,r=l.length;n>10)+55296,(e-65536&1023)+56320)}var dt=new Array(256);var ht=new Array(256);for(var wt=0;wt<256;wt++){dt[wt]=ot(wt)?1:0;ht[wt]=ot(wt)}function vt(e,t){this.input=e;this.filename=t["filename"]||null;this.schema=t["schema"]||ze;this.onWarning=t["onWarning"]||null;this.legacy=t["legacy"]||false;this.json=t["json"]||false;this.listener=t["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=e.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.firstTabInLine=-1;this.documents=[]}function mt(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};n.snippet=D(n);return new N(t,n)}function pt(e,t){throw mt(e,t)}function bt(e,t){if(e.onWarning){e.onWarning.call(null,mt(e,t))}}var yt={YAML:function e(t,n,r){var i,a,s;if(t.version!==null){pt(t,"duplication of %YAML directive")}if(r.length!==1){pt(t,"YAML directive accepts exactly one argument")}i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);if(i===null){pt(t,"ill-formed argument of the YAML directive")}a=parseInt(i[1],10);s=parseInt(i[2],10);if(a!==1){pt(t,"unacceptable YAML version of the document")}t.version=r[0];t.checkLineBreaks=s<2;if(s!==1&&s!==2){bt(t,"unsupported YAML version of the document")}},TAG:function e(t,n,r){var i,a;if(r.length!==2){pt(t,"TAG directive accepts exactly two arguments")}i=r[0];a=r[1];if(!et.test(i)){pt(t,"ill-formed tag handle (first argument) of the TAG directive")}if(He.call(t.tagMap,i)){pt(t,'there is a previously declared suffix for "'+i+'" tag handle')}if(!tt.test(a)){pt(t,"ill-formed tag prefix (second argument) of the TAG directive")}try{a=decodeURIComponent(a)}catch(e){pt(t,"tag prefix is malformed: "+a)}t.tagMap[i]=a}};function gt(e,t,n,r){var i,a,s,l;if(t1){e.result+=O.repeat("\n",t-1)}}function Nt(e,t,n){var r,i,a,s,l,f,c,o,u=e.kind,d=e.result,h;h=e.input.charCodeAt(e.position);if(at(h)||st(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96){return false}if(h===63||h===45){i=e.input.charCodeAt(e.position+1);if(at(i)||n&&st(i)){return false}}e.kind="scalar";e.result="";a=s=e.position;l=false;while(h!==0){if(h===58){i=e.input.charCodeAt(e.position+1);if(at(i)||n&&st(i)){break}}else if(h===35){r=e.input.charCodeAt(e.position-1);if(at(r)){break}}else if(e.position===e.lineStart&&At(e)||n&&st(h)){break}else if(rt(h)){f=e.line;c=e.lineStart;o=e.lineIndent;Ot(e,false,-1);if(e.lineIndent>=t){l=true;h=e.input.charCodeAt(e.position);continue}else{e.position=s;e.line=f;e.lineStart=c;e.lineIndent=o;break}}if(l){gt(e,a,s,false);Ft(e,e.line-f);a=s=e.position;l=false}if(!it(h)){s=e.position+1}h=e.input.charCodeAt(++e.position)}gt(e,a,s,false);if(e.result){return true}e.kind=u;e.result=d;return false}function St(e,t){var n,r,i;n=e.input.charCodeAt(e.position);if(n!==39){return false}e.kind="scalar";e.result="";e.position++;r=i=e.position;while((n=e.input.charCodeAt(e.position))!==0){if(n===39){gt(e,r,e.position,true);n=e.input.charCodeAt(++e.position);if(n===39){r=e.position;e.position++;i=e.position}else{return true}}else if(rt(n)){gt(e,r,i,true);Ft(e,Ot(e,false,t));r=i=e.position}else if(e.position===e.lineStart&&At(e)){pt(e,"unexpected end of the document within a single quoted scalar")}else{e.position++;i=e.position}}pt(e,"unexpected end of the stream within a single quoted scalar")}function Mt(e,t){var n,r,i,a,s,l;l=e.input.charCodeAt(e.position);if(l!==34){return false}e.kind="scalar";e.result="";e.position++;n=r=e.position;while((l=e.input.charCodeAt(e.position))!==0){if(l===34){gt(e,n,e.position,true);e.position++;return true}else if(l===92){gt(e,n,e.position,true);l=e.input.charCodeAt(++e.position);if(rt(l)){Ot(e,false,t)}else if(l<256&&dt[l]){e.result+=ht[l];e.position++}else if((s=ft(l))>0){i=s;a=0;for(;i>0;i--){l=e.input.charCodeAt(++e.position);if((s=lt(l))>=0){a=(a<<4)+s}else{pt(e,"expected hexadecimal character")}}e.result+=ut(a);e.position++}else{pt(e,"unknown escape sequence")}n=r=e.position}else if(rt(l)){gt(e,n,r,true);Ft(e,Ot(e,false,t));n=r=e.position}else if(e.position===e.lineStart&&At(e)){pt(e,"unexpected end of the document within a double quoted scalar")}else{e.position++;r=e.position}}pt(e,"unexpected end of the stream within a double quoted scalar")}function _t(e,t){var n=true,r,i,a,s=e.tag,l,f=e.anchor,c,o,u,d,h,w=Object.create(null),v,m,p,b;b=e.input.charCodeAt(e.position);if(b===91){o=93;h=false;l=[]}else if(b===123){o=125;h=true;l={}}else{return false}if(e.anchor!==null){e.anchorMap[e.anchor]=l}b=e.input.charCodeAt(++e.position);while(b!==0){Ot(e,true,t);b=e.input.charCodeAt(e.position);if(b===o){e.position++;e.tag=s;e.anchor=f;e.kind=h?"mapping":"sequence";e.result=l;return true}else if(!n){pt(e,"missed comma between flow collection entries")}else if(b===44){pt(e,"expected the node content, but found ','")}m=v=p=null;u=d=false;if(b===63){c=e.input.charCodeAt(e.position+1);if(at(c)){u=d=true;e.position++;Ot(e,true,t)}}r=e.line;i=e.lineStart;a=e.position;$t(e,t,Je,false,true);m=e.tag;v=e.result;Ot(e,true,t);b=e.input.charCodeAt(e.position);if((d||e.line===r)&&b===58){u=true;b=e.input.charCodeAt(++e.position);Ot(e,true,t);$t(e,t,Je,false,true);p=e.result}if(h){kt(e,l,w,m,v,p,r,i,a)}else if(u){l.push(kt(e,null,w,m,v,p,r,i,a))}else{l.push(v)}Ot(e,true,t);b=e.input.charCodeAt(e.position);if(b===44){n=true;b=e.input.charCodeAt(++e.position)}else{n=false}}pt(e,"unexpected end of the stream within a flow collection")}function Dt(e,t){var n,r,i=Pe,a=false,s=false,l=t,f=0,c=false,o,u;u=e.input.charCodeAt(e.position);if(u===124){r=false}else if(u===62){r=true}else{return false}e.kind="scalar";e.result="";while(u!==0){u=e.input.charCodeAt(++e.position);if(u===43||u===45){if(Pe===i){i=u===43?Ke:Ze}else{pt(e,"repeat of a chomping mode identifier")}}else if((o=ct(u))>=0){if(o===0){pt(e,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!s){l=t+o-1;s=true}else{pt(e,"repeat of an indentation width identifier")}}else{break}}if(it(u)){do{u=e.input.charCodeAt(++e.position)}while(it(u));if(u===35){do{u=e.input.charCodeAt(++e.position)}while(!rt(u)&&u!==0)}}while(u!==0){jt(e);e.lineIndent=0;u=e.input.charCodeAt(e.position);while((!s||e.lineIndentl){l=e.lineIndent}if(rt(u)){f++;continue}if(e.lineIndentt)&&f!==0){pt(e,"bad indentation of a sequence entry")}else if(e.lineIndentt){if(m){s=e.line;l=e.lineStart;f=e.position}if($t(e,t,We,true,i)){if(m){w=e.result}else{v=e.result}}if(!m){kt(e,u,d,h,w,v,s,l,f);h=w=v=null}Ot(e,true,-1);b=e.input.charCodeAt(e.position)}if((e.line===a||e.lineIndent>t)&&b!==0){pt(e,"bad indentation of a mapping entry")}else if(e.lineIndentt){f=1}else if(e.lineIndent===t){f=0}else if(e.lineIndentt){f=1}else if(e.lineIndent===t){f=0}else if(e.lineIndent tag; it should be "scalar", not "'+e.kind+'"')}for(u=0,d=e.implicitTypes.length;u")}if(e.result!==null&&w.kind!==e.kind){pt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+w.kind+'", not "'+e.kind+'"')}if(!w.resolve(e.result,e.tag)){pt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}else{e.result=w.construct(e.result,e.tag);if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}if(e.listener!==null){e.listener("close",e)}return e.tag!==null||e.anchor!==null||o}function Ut(e){var t=e.position,n,r,i,a=false,s;e.version=null;e.checkLineBreaks=e.legacy;e.tagMap=Object.create(null);e.anchorMap=Object.create(null);while((s=e.input.charCodeAt(e.position))!==0){Ot(e,true,-1);s=e.input.charCodeAt(e.position);if(e.lineIndent>0||s!==37){break}a=true;s=e.input.charCodeAt(++e.position);n=e.position;while(s!==0&&!at(s)){s=e.input.charCodeAt(++e.position)}r=e.input.slice(n,e.position);i=[];if(r.length<1){pt(e,"directive name must not be less than one character in length")}while(s!==0){while(it(s)){s=e.input.charCodeAt(++e.position)}if(s===35){do{s=e.input.charCodeAt(++e.position)}while(s!==0&&!rt(s));break}if(rt(s))break;n=e.position;while(s!==0&&!at(s)){s=e.input.charCodeAt(++e.position)}i.push(e.input.slice(n,e.position))}if(s!==0)jt(e);if(He.call(yt,r)){yt[r](e,r,i)}else{bt(e,'unknown document directive "'+r+'"')}}Ot(e,true,-1);if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45){e.position+=3;Ot(e,true,-1)}else if(a){pt(e,"directives end mark is expected")}$t(e,e.lineIndent-1,We,false,true);Ot(e,true,-1);if(e.checkLineBreaks&&Qe.test(e.input.slice(t,e.position))){bt(e,"non-ASCII line breaks are interpreted as content")}e.documents.push(e.result);if(e.position===e.lineStart&&At(e)){if(e.input.charCodeAt(e.position)===46){e.position+=3;Ot(e,true,-1)}return}if(e.position=55296&&n<=56319&&t+1=56320&&r<=57343){return(n-55296)*1024+r-56320+65536}}return n}function $n(e){var t=/^\n* /;return t.test(e)}var Un=1,qn=2,Yn=3,Rn=4,zn=5;function Hn(e,t,n,r,i,a,s,l){var f;var c=0;var o=null;var u=false;var d=false;var h=r!==-1;var w=-1;var v=Ln(In(e,0))&&Tn(In(e,e.length-1));if(t||s){for(f=0;f=65536?f+=2:f++){c=In(e,f);if(!Dn(c)){return zn}v=v&&Cn(c,o,l);o=c}}else{for(f=0;f=65536?f+=2:f++){c=In(e,f);if(c===Zt){u=true;if(h){d=d||f-w-1>r&&e[w+1]!==" ";w=f}}else if(!Dn(c)){return zn}v=v&&Cn(c,o,l);o=c}d=d||h&&(f-w-1>r&&e[w+1]!==" ")}if(!u&&!d){if(v&&!s&&!i(e)){return Un}return a===An?zn:qn}if(n>9&&$n(e)){return zn}if(!s){return d?Rn:Yn}return a===An?zn:qn}function Jn(e,t,n,r,i){e.dump=function(){if(t.length===0){return e.quotingType===An?'""':"''"}if(!e.noCompatMode){if(gn.indexOf(t)!==-1||xn.test(t)){return e.quotingType===An?'"'+t+'"':"'"+t+"'"}}var a=e.indent*Math.max(1,n);var s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a);var l=r||e.flowLevel>-1&&n>=e.flowLevel;function f(t){return Mn(e,t)}switch(Hn(t,l,e.indent,s,f,e.quotingType,e.forceQuotes&&!r,i)){case Un:return t;case qn:return"'"+t.replace(/'/g,"''")+"'";case Yn:return"|"+Bn(t,e.indent)+Gn(Nn(t,a));case Rn:return">"+Bn(t,e.indent)+Gn(Nn(Wn(t,s),a));case zn:return'"'+Zn(t)+'"';default:throw new N("impossible error: invalid scalar style")}}()}function Bn(e,t){var n=$n(e)?String(t):"";var r=e[e.length-1]==="\n";var i=r&&(e[e.length-2]==="\n"||e==="\n");var a=i?"+":r?"":"-";return n+a+"\n"}function Gn(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}function Wn(e,t){var n=/(\n+)([^\n]*)/g;var r=function(){var r=e.indexOf("\n");r=r!==-1?r:e.length;n.lastIndex=r;return Pn(e.slice(0,r),t)}();var i=e[0]==="\n"||e[0]===" ";var a;var s;while(s=n.exec(e)){var l=s[1],f=s[2];a=f[0]===" ";r+=l+(!i&&!a&&f!==""?"\n":"")+Pn(f,t);i=a}return r}function Pn(e,t){if(e===""||e[0]===" ")return e;var n=/ [^ ]/g;var r;var i=0,a,s=0,l=0;var f="";while(r=n.exec(e)){l=r.index;if(l-i>t){a=s>i?s:l;f+="\n"+e.slice(i,a);i=a+1}s=l}f+="\n";if(e.length-i>t&&s>i){f+=e.slice(i,s)+"\n"+e.slice(s+1)}else{f+=e.slice(i)}return f.slice(1)}function Zn(e){var t="";var n=0;var r;for(var i=0;i=65536?i+=2:i++){n=In(e,i);r=yn[n];if(!r&&Dn(n)){t+=e[i];if(n>=65536)t+=e[i+1]}else{t+=r||jn(n)}}return t}function Kn(e,t,n){var r="",i=e.tag,a,s,l;for(a=0,s=n.length;a1024)o+="? ";o+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!tr(e,t,c,false,false)){continue}o+=e.dump;r+=o}e.tag=i;e.dump="{"+r+"}"}function Xn(e,t,n,r){var i="",a=e.tag,s=Object.keys(n),l,f,c,o,u,d;if(e.sortKeys===true){s.sort()}else if(typeof e.sortKeys==="function"){s.sort(e.sortKeys)}else if(e.sortKeys){throw new N("sortKeys must be a boolean or a function")}for(l=0,f=s.length;l1024;if(u){if(e.dump&&Zt===e.dump.charCodeAt(0)){d+="?"}else{d+="? "}}d+=e.dump;if(u){d+=Sn(e,t)}if(!tr(e,t+1,o,true,u)){continue}if(e.dump&&Zt===e.dump.charCodeAt(0)){d+=":"}else{d+=": "}d+=e.dump;i+=d}e.tag=a;e.dump=i||"{}"}function er(e,t,n){var r,i,a,s,l,f;i=n?e.explicitTypes:e.implicitTypes;for(a=0,s=i.length;a tag resolver accepts not "'+f+'" style')}e.dump=r}return true}}return false}function tr(e,t,n,r,i,a,s){e.tag=null;e.dump=n;if(!er(e,n,false)){er(e,n,true)}var l=Bt.call(e.dump);var f=r;var c;if(r){r=e.flowLevel<0||e.flowLevel>t}var o=l==="[object Object]"||l==="[object Array]",u,d;if(o){u=e.duplicates.indexOf(n);d=u!==-1}if(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0){i=false}if(d&&e.usedDuplicates[u]){e.dump="*ref_"+u}else{if(o&&d&&!e.usedDuplicates[u]){e.usedDuplicates[u]=true}if(l==="[object Object]"){if(r&&Object.keys(e.dump).length!==0){Xn(e,t,e.dump,i);if(d){e.dump="&ref_"+u+e.dump}}else{Qn(e,t,e.dump);if(d){e.dump="&ref_"+u+" "+e.dump}}}else if(l==="[object Array]"){if(r&&e.dump.length!==0){if(e.noArrayIndent&&!s&&t>0){Vn(e,t-1,e.dump,i)}else{Vn(e,t,e.dump,i)}if(d){e.dump="&ref_"+u+e.dump}}else{Kn(e,t,e.dump);if(d){e.dump="&ref_"+u+" "+e.dump}}}else if(l==="[object String]"){if(e.tag!=="?"){Jn(e,e.dump,t,a,f)}}else if(l==="[object Undefined]"){return false}else{if(e.skipInvalid)return false;throw new N("unacceptable kind of an object to dump "+l)}if(e.tag!==null&&e.tag!=="?"){c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21");if(e.tag[0]==="!"){c="!"+c}else if(c.slice(0,18)==="tag:yaml.org,2002:"){c="!!"+c.slice(18)}else{c="!<"+c+">"}e.dump=c+" "+e.dump}}return true}function nr(e,t){var n=[],r=[],i,a;rr(e,n,r);for(i=0,a=r.length;i{if(e===""){return}const t=await fetch(e);if(t.status===200){const e=await t.blob();const n=await e.text();const r=kr.load(n);if(Array.isArray(r)){return r}}};const Or='@charset "UTF-8";button.sc-swift-calendar{border:0;background:none;cursor:pointer}ul.sc-swift-calendar{padding:0}.swift-calendar.sc-swift-calendar{font-family:system-ui, -apple-system, blinkmacsystemfont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Open Sans", "Helvetica Neue", sans-serif;position:relative;min-height:700px;max-height:700px}.swift-calendar.sc-swift-calendar a.sc-swift-calendar{color:#0979c4;text-decoration:none}.swift-calendar.sc-swift-calendar span.sc-swift-calendar{flex-grow:30;width:14.2857142857%;text-align:center;padding:1rem 0}.swift-calendar.sc-swift-calendar .menu.sc-swift-calendar{display:flex;justify-content:space-between;font-weight:700;font-size:1em}.swift-calendar.sc-swift-calendar .menu.sc-swift-calendar button.sc-swift-calendar{flex-grow:30;width:33.3333333333%;cursor:pointer;background:none;border:0;font-size:1em}.swift-calendar.sc-swift-calendar .menu.sc-swift-calendar button.sc-swift-calendar:hover{background:#ffa395}.swift-calendar.sc-swift-calendar .menu.sc-swift-calendar .nav-button.sc-swift-calendar{width:20px}.swift-calendar.sc-swift-calendar .actions.sc-swift-calendar{display:flex;justify-content:center;width:100%;list-style:none}.swift-calendar.sc-swift-calendar .actions.sc-swift-calendar li.sc-swift-calendar{font-size:0.8em}.swift-calendar.sc-swift-calendar .days.sc-swift-calendar{display:flex}.swift-calendar.sc-swift-calendar .day-numbers.sc-swift-calendar{display:flex;flex-wrap:wrap}.swift-calendar.sc-swift-calendar .day-numbers.sc-swift-calendar i.sc-swift-calendar{width:2.4rem;height:2.4rem;font-style:normal;position:relative;display:inline-block;line-height:2.2em}.swift-calendar.sc-swift-calendar .day-numbers.sc-swift-calendar i.active.sc-swift-calendar{background:#eee;font-weight:800;text-decoration:underline}.swift-calendar.sc-swift-calendar .day-numbers.sc-swift-calendar i.selected.sc-swift-calendar{background:#f05138;color:#fff}.swift-calendar.sc-swift-calendar .day-numbers.sc-swift-calendar i.selected.has-event.sc-swift-calendar:before{color:#fff}.swift-calendar.sc-swift-calendar .day-numbers.sc-swift-calendar i.has-events.sc-swift-calendar:before{content:"●";font-size:0.5rem;position:absolute;top:-0.6rem;left:0.1rem;color:#2dc64e}.swift-calendar.sc-swift-calendar .day-numbers.sc-swift-calendar span.sc-swift-calendar{cursor:pointer;position:relative}.swift-calendar.sc-swift-calendar .day-numbers.sc-swift-calendar span.no-pointer.sc-swift-calendar{cursor:default}.swift-calendar.sc-swift-calendar .day-numbers.sc-swift-calendar span.disabled.sc-swift-calendar{color:#ccc;cursor:default}.swift-calendar.sc-swift-calendar .day-numbers.sc-swift-calendar span.sc-swift-calendar:hover:not(.disabled) i.sc-swift-calendar:not(.selected){background:#ffa395}.swift-calendar.sc-swift-calendar .event-list.sc-swift-calendar{display:flex;flex-direction:column;align-items:center;padding-bottom:0.6rem;min-height:600px;max-height:600px;box-sizing:border-box;overflow-y:auto;width:64%;margin:0 auto}@media only screen and (max-width: 800px){.swift-calendar.sc-swift-calendar .event-list.sc-swift-calendar{width:80%}}.swift-calendar.sc-swift-calendar .event-list.sc-swift-calendar::-webkit-scrollbar{appearance:none;width:8px}.swift-calendar.sc-swift-calendar .event-list.sc-swift-calendar::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgba(0, 0, 0, 0.2);box-shadow:0 0 1px rgba(255, 255, 255, 0.5)}.swift-calendar.sc-swift-calendar .event-list.sc-swift-calendar .day-details.sc-swift-calendar{cursor:pointer;padding:2rem;width:82%;margin-bottom:0.4rem;display:flex;align-items:center}.swift-calendar.sc-swift-calendar .event-list.sc-swift-calendar .day-details.sc-swift-calendar .day.sc-swift-calendar{width:20%}.swift-calendar.sc-swift-calendar .event-list.sc-swift-calendar .day-details.sc-swift-calendar .events.sc-swift-calendar{width:80%;text-align:center}.swift-calendar.sc-swift-calendar .event-list.sc-swift-calendar .day-details.sc-swift-calendar .events.sc-swift-calendar .event-name.sc-swift-calendar{padding:0.4rem 0}@media only screen and (max-width: 800px){.swift-calendar.sc-swift-calendar .event-list.sc-swift-calendar .day-details.sc-swift-calendar{flex-direction:column}.swift-calendar.sc-swift-calendar .event-list.sc-swift-calendar .day-details.sc-swift-calendar .day.sc-swift-calendar{width:100%;margin-bottom:1rem;text-align:center}.swift-calendar.sc-swift-calendar .event-list.sc-swift-calendar .day-details.sc-swift-calendar .events.sc-swift-calendar{width:100%}.swift-calendar.sc-swift-calendar .event-list.sc-swift-calendar .day-details.sc-swift-calendar .events.sc-swift-calendar .event-name.sc-swift-calendar{padding:1rem 0;text-align:left}}.swift-calendar.sc-swift-calendar .pre-entry.sc-swift-calendar{display:flex;flex-direction:row;margin:0 0.4rem;justify-content:center}.swift-calendar.sc-swift-calendar .pre-entry.sc-swift-calendar .date.sc-swift-calendar,.swift-calendar.sc-swift-calendar .pre-entry.sc-swift-calendar .download.sc-swift-calendar{font-size:1.4em}.swift-calendar.sc-swift-calendar .entry.sc-swift-calendar{margin:0.4rem;padding:1rem;display:flex;flex-direction:column}.swift-calendar.sc-swift-calendar .entry.sc-swift-calendar .details.sc-swift-calendar{display:flex;flex-direction:row}@media only screen and (max-width: 800px){.swift-calendar.sc-swift-calendar .entry.sc-swift-calendar .details.sc-swift-calendar{flex-direction:column}}.swift-calendar.sc-swift-calendar .entry.sc-swift-calendar .details.sc-swift-calendar .name.sc-swift-calendar{font-size:1.4em}.swift-calendar.sc-swift-calendar .entry.sc-swift-calendar .details.sc-swift-calendar p.sc-swift-calendar{font-size:0.8em}.swift-calendar.sc-swift-calendar .entry.sc-swift-calendar .details.sc-swift-calendar div.sc-swift-calendar{width:40%;padding-top:1rem}.swift-calendar.sc-swift-calendar .entry.sc-swift-calendar .details.sc-swift-calendar div.sc-swift-calendar:first-child{width:60%;padding-top:0}.swift-calendar.sc-swift-calendar .entry.sc-swift-calendar:nth-child(odd),.swift-calendar.sc-swift-calendar .day-details.sc-swift-calendar:nth-child(odd){background-color:#a3a3a3}.swift-calendar.sc-swift-calendar .entry.sc-swift-calendar:nth-child(even),.swift-calendar.sc-swift-calendar .day-details.sc-swift-calendar:nth-child(even){background-color:#dbdbdb}.swift-calendar.theme-light.sc-swift-calendar{color:#000000}.swift-calendar.theme-dark.sc-swift-calendar{background-color:#000000;color:#ffffff}.swift-calendar.theme-dark.sc-swift-calendar a.sc-swift-calendar{color:#0099FF}.swift-calendar.theme-dark.sc-swift-calendar .day-numbers.sc-swift-calendar i.active.sc-swift-calendar{background:#aaa}.swift-calendar.theme-dark.sc-swift-calendar .entry.sc-swift-calendar:nth-child(odd),.swift-calendar.theme-dark.sc-swift-calendar .day-details.sc-swift-calendar:nth-child(odd){background-color:#383838}.swift-calendar.theme-dark.sc-swift-calendar .entry.sc-swift-calendar:nth-child(even),.swift-calendar.theme-dark.sc-swift-calendar .day-details.sc-swift-calendar:nth-child(even){background-color:#2e2e2e}.swift-calendar.theme-dark.sc-swift-calendar .event-list.sc-swift-calendar::-webkit-scrollbar-thumb{background-color:rgba(236, 236, 236, 0.3)}';const Ar=class{constructor(t){e(this,t);this.daySelectedHandler=e=>{this.selectedDate={date:`${this.todayDate.year}-${this.todayDate.month}-${e}`,month:this.todayDate.month,day:e,year:this.todayDate.year}};this.openDayDetails=e=>{const t=this.getEvents(e);this.modalData=Object.assign(Object.assign({},this.modalData),t);this.isModalOpen=true};this.closeDayDetails=()=>{this.isModalOpen=false;this.selectedDate=null};this.getEvents=e=>this.events.find((t=>{const n=t.date.split("-");return parseInt(n[1])===this.todayDate.month&&parseInt(n[2])===e&&parseInt(n[0])===this.todayDate.year}));this.hasEvents=e=>{var t;const n=this.getEvents(e);return((t=n===null||n===void 0?void 0:n.entries)===null||t===void 0?void 0:t.length)>0};this.getDayClasses=(e,t,n)=>{const r=[];if(this.isToday(e,t,n)){r.push("active")}if(this.isSelectedDay(t)){r.push("selected")}if(this.hasEvents(t)){r.push("has-events")}return r.join(" ")};this.theme="auto";this.jsData=undefined;this.pathDataFile=undefined;this.pathIcalFile=undefined;this.todayDate=o.getToday();this.daysInMonth=undefined;this.selectedDate=undefined;this.isModalOpen=false;this.modalData=undefined;this.events=[];this.isEventsView=false;this.today=o.getToday();this.switchMonth=this.switchMonth.bind(this);this.onDayClick=this.onDayClick.bind(this);this.switchView=this.switchView.bind(this)}async componentWillLoad(){let e;if(this.jsData){e=JSON.parse(this.jsData)}else if(this.pathDataFile){e=await jr(this.pathDataFile)}if(e&&e.length>0){this.events=e}this.setupCalendar()}setupCalendar(){const e=this.todayDate;const t=new o(e.year,e.month);this.daysInMonth=t.getCalendarDays()}switchMonth(e){const t=e.currentTarget;const n=t.getAttribute("data-direction")==="1"?u.Previous:u.Next;if(n===u.Previous){if(this.todayDate.month!==1){this.todayDate.month-=1}else{this.todayDate.month=12;this.todayDate.year-=1}}else{if(this.todayDate.month!==12){this.todayDate.month+=1}else{this.todayDate.month=1;this.todayDate.year+=1}}delete this.todayDate.day;this.setupCalendar()}switchView(e){const t=e.currentTarget;this.isEventsView=t.checked}isToday(e,t,n){const{today:r}=this;return r.month===e&&r.day===t&&r.year===n}isSelectedDay(e){const{selectedDate:t,todayDate:n}=this;return t&&Object.keys(t).length>0&&t.month===n.month&&t.day===e&&t.year===n.year}onDayClick(e){const t=e.currentTarget;if(t.classList.contains("day-details")||t.firstElementChild.classList.contains("has-events")){const e=+t.getAttribute("data-day");this.daySelectedHandler(e);this.openDayDetails(e)}}getMenu(e,r){return t("div",{class:"menu"},t("button",{onClick:this.switchMonth,"data-direction":u.Previous},t("img",{class:"nav-button",src:n(`./components/assets/prev-${r}.png`)})),t("span",null,a[e.month-1]," ",e.year),t("button",{onClick:this.switchMonth,"data-direction":u.Next},t("img",{class:"nav-button",src:n(`./components/assets/next-${r}.png`)})))}getActions(){return t("ul",{class:"actions"},t("li",null,t("input",{type:"checkbox",id:"events-view",name:"events-view",checked:this.isEventsView,onChange:this.switchView}),t("label",{htmlFor:"events-view"}," Events view")))}getDays(){return t("div",{class:"days"},i.map((e=>t("span",null,e))))}getDayCells(e){return t("div",{class:"day-numbers"},this.daysInMonth.map((n=>{if(n===0){return t("span",{class:"no-pointer"})}return t("span",{onClick:this.onDayClick,role:"button","data-day":n},t("i",{class:this.getDayClasses(e.month,n,e.year)},n))})))}getShortEventList(e){return t(r,null,this.getEvents(e).entries.map((e=>t("div",{class:"event-name"},e.name))))}getDayWithEventsList(e){return t("div",{class:"event-list"},this.daysInMonth.map((n=>{if(n!==0&&this.hasEvents(n)){return t("div",{class:"day-details",role:"button",onClick:this.onDayClick,"data-day":n},t("div",{class:"day"},`${e.month}/${n}/${e.year}`),t("div",{class:"events"},this.getShortEventList(n)))}})))}getModalContent(){const{date:e,entries:n}=this.modalData;const i=e.split("-");return t(r,null,t("div",{class:"pre-entry"},t("p",{class:"date"},i[1],"/",i[2],"/",i[0]),this.pathIcalFile&&t("p",{class:"download"}," (",t("a",{href:this.pathIcalFile},"download iCal"),")")),n.map((e=>t("div",{class:"entry"},t("div",{class:"details"},t("div",null,t("p",{class:"name"},e.name),t("p",{class:"description"},e.description)),t("div",null,t("p",{class:"location"},e.location),t("p",{class:"url"},t("a",{href:e.url,target:"_blank"},e.url))))))))}render(){const e=this.theme==="auto"?"light":this.theme;return t("div",{class:`swift-calendar theme-${e}`},t("swift-modal",{theme:this.theme,show:this.isModalOpen,close:this.closeDayDetails},this.isModalOpen?this.getModalContent():null),this.getMenu(this.todayDate,e),this.getActions(),this.isEventsView?t(r,null,this.getDayWithEventsList(this.todayDate)):t(r,null,this.getDays(),this.getDayCells(this.todayDate)))}};Ar.style=Or;const Fr='button.sc-swift-modal{border:0;background:none;cursor:pointer}ul.sc-swift-modal{padding:0}.swift-modal.sc-swift-modal{font-family:system-ui, -apple-system, blinkmacsystemfont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Open Sans", "Helvetica Neue", sans-serif;height:100%;width:100%;position:absolute;background-color:rgba(0, 0, 0, 0.5);z-index:9999;display:none}.swift-modal.show.sc-swift-modal{display:flex;align-items:center;justify-content:center}.swift-modal.sc-swift-modal .content.sc-swift-modal{width:64%;height:80%;background-color:#ffffff;padding:1rem}@media only screen and (max-width: 800px){.swift-modal.sc-swift-modal .content.sc-swift-modal{width:80%}}.swift-modal.sc-swift-modal .content.sc-swift-modal .header.sc-swift-modal{display:flex;justify-content:right}.swift-modal.sc-swift-modal .content.sc-swift-modal .body.sc-swift-modal{overflow-y:auto;max-height:88%}.swift-modal.sc-swift-modal .content.sc-swift-modal .body.sc-swift-modal::-webkit-scrollbar{appearance:none;width:8px}.swift-modal.sc-swift-modal .content.sc-swift-modal .body.sc-swift-modal::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgba(0, 0, 0, 0.2);box-shadow:0 0 1px rgba(255, 255, 255, 0.5)}.swift-modal.sc-swift-modal .content.sc-swift-modal .close-button.sc-swift-modal{width:1.8rem}.swift-modal.theme-light.sc-swift-modal{color:#000000}.swift-modal.theme-dark.sc-swift-modal{color:#ffffff}.swift-modal.theme-dark.sc-swift-modal .content.sc-swift-modal{background-color:#222222}.swift-modal.theme-dark.sc-swift-modal .content.sc-swift-modal .body.sc-swift-modal::-webkit-scrollbar-thumb{background-color:rgba(236, 236, 236, 0.3)}';const Nr=class{constructor(t){e(this,t);this.theme="auto";this.show=false;this.close=undefined;this.hide=this.hide.bind(this)}hide(){this.show=false;this.close()}render(){const e=this.theme==="auto"?"light":this.theme;return t("div",{class:this.show?`swift-modal theme-${e} show`:`swift-modal`},t("div",{class:"content"},t("div",{class:"header"},t("button",{onClick:this.hide},t("img",{class:"close-button",src:n(`./components/assets/close-${e}.png`)}))),t("div",{class:"body"},t("slot",null))))}static get assetsDirs(){return["assets"]}};Nr.style=Fr;export{Ar as swift_calendar,Nr as swift_modal}; +//# sourceMappingURL=p-f2db04cf.entry.js.map \ No newline at end of file diff --git a/assets/javascripts/web-components/p-f2db04cf.entry.js.map b/assets/javascripts/web-components/p-f2db04cf.entry.js.map new file mode 100644 index 000000000..81db43209 --- /dev/null +++ b/assets/javascripts/web-components/p-f2db04cf.entry.js.map @@ -0,0 +1 @@ +{"version":3,"names":["days","months","daysInCalendarWithFiveRows","daysInCalendarWithFourRows","daysInCalendarWithThreeRows","notInThisMonthCounts","Calendar","constructor","year","month","this","daysInCalendar","notInThisMonthStartCount","notInThisMonthEndCount","getCalendarDays","thisMonthDays","getCurrentMonthDays","getMonthFirstDay","length","currentMonthCount","fillStart","getDaysOfLastMonth","map","_","fillEnd","getNextMonthDays","getDaysOfMonth","daysOfMonth","slice","endCount","currentMonthWithStartCount","Date","getDate","Array","from","i","getDay","getNotInThisMonthStartCount","getNotInThisMonthEndCount","static","now","date","getFullYear","getMonth","day","Direction","isNothing","subject","isObject","toArray","sequence","isArray","extend","target","source","index","key","sourceKeys","Object","keys","repeat","string","count","result","cycle","isNegativeZero","number","Number","NEGATIVE_INFINITY","isNothing_1","isObject_1","toArray_1","repeat_1","isNegativeZero_1","extend_1","common","formatError","exception","compact","where","message","reason","mark","name","line","column","snippet","YAMLException$1","Error","call","captureStackTrace","stack","prototype","create","toString","getLine","buffer","lineStart","lineEnd","position","maxLineLength","head","tail","maxHalfLength","Math","floor","str","replace","pos","padStart","max","makeSnippet","options","maxLength","indent","linesBefore","linesAfter","re","lineStarts","lineEnds","match","foundLineNo","exec","push","lineNoLength","min","TYPE_CONSTRUCTOR_OPTIONS","YAML_NODE_KINDS","compileStyleAliases","forEach","style","alias","String","Type$1","tag","indexOf","kind","resolve","construct","data","instanceOf","predicate","represent","representName","defaultStyle","multi","styleAliases","type","compileList","schema","currentType","newIndex","previousType","previousIndex","compileMap","scalar","mapping","fallback","collectType","arguments","Schema$1","definition","implicit","explicit","concat","type$1","loadKind","compiledImplicit","compiledExplicit","compiledTypeMap","seq","failsafe","resolveYamlNull","constructYamlNull","isNull","object","_null","canonical","lowercase","uppercase","camelcase","empty","resolveYamlBoolean","constructYamlBoolean","isBoolean","bool","isHexCode","c","isOctCode","isDecCode","resolveYamlInteger","hasDigits","ch","charCodeAt","constructYamlInteger","value","sign","parseInt","isInteger","int","binary","obj","octal","decimal","hexadecimal","toUpperCase","YAML_FLOAT_PATTERN","RegExp","resolveYamlFloat","test","constructYamlFloat","toLowerCase","POSITIVE_INFINITY","NaN","parseFloat","SCIENTIFIC_WITHOUT_DOT","representYamlFloat","res","isNaN","isFloat","float","json","core","YAML_DATE_REGEXP","YAML_TIMESTAMP_REGEXP","resolveYamlTimestamp","constructYamlTimestamp","hour","minute","second","fraction","delta","tz_hour","tz_minute","UTC","setTime","getTime","representYamlTimestamp","toISOString","timestamp","resolveYamlMerge","merge","BASE64_MAP","resolveYamlBinary","code","idx","bitlen","charAt","constructYamlBinary","tailbits","input","bits","Uint8Array","representYamlBinary","isBinary","_hasOwnProperty$3","hasOwnProperty","_toString$2","resolveYamlOmap","objectKeys","pair","pairKey","pairHasKey","constructYamlOmap","omap","_toString$1","resolveYamlPairs","constructYamlPairs","pairs","_hasOwnProperty$2","resolveYamlSet","constructYamlSet","set","_default","_hasOwnProperty$1","CONTEXT_FLOW_IN","CONTEXT_FLOW_OUT","CONTEXT_BLOCK_IN","CONTEXT_BLOCK_OUT","CHOMPING_CLIP","CHOMPING_STRIP","CHOMPING_KEEP","PATTERN_NON_PRINTABLE","PATTERN_NON_ASCII_LINE_BREAKS","PATTERN_FLOW_INDICATORS","PATTERN_TAG_HANDLE","PATTERN_TAG_URI","_class","is_EOL","is_WHITE_SPACE","is_WS_OR_EOL","is_FLOW_INDICATOR","fromHexCode","lc","escapedHexLen","fromDecimalCode","simpleEscapeSequence","charFromCodepoint","fromCharCode","simpleEscapeCheck","simpleEscapeMap","State$1","filename","onWarning","legacy","listener","implicitTypes","typeMap","lineIndent","firstTabInLine","documents","generateError","state","throwError","throwWarning","directiveHandlers","YAML","handleYamlDirective","args","major","minor","version","checkLineBreaks","TAG","handleTagDirective","handle","prefix","tagMap","decodeURIComponent","err","captureSegment","start","end","checkJson","_position","_length","_character","_result","mergeMappings","destination","overridableKeys","quantity","storeMappingPair","keyTag","keyNode","valueNode","startLine","startLineStart","startPos","defineProperty","configurable","enumerable","writable","readLineBreak","skipSeparationSpace","allowComments","checkIndent","lineBreaks","testDocumentSeparator","writeFoldedLines","readPlainScalar","nodeIndent","withinFlowCollection","preceding","following","captureStart","captureEnd","hasPendingContent","_line","_lineStart","_lineIndent","_kind","readSingleQuotedScalar","readDoubleQuotedScalar","hexLength","hexResult","tmp","readFlowCollection","readNext","_pos","_tag","_anchor","anchor","terminator","isPair","isExplicitPair","isMapping","anchorMap","composeNode","readBlockScalar","folding","chomping","didReadContent","detectedIndent","textIndent","emptyLines","atMoreIndented","readBlockSequence","detected","readBlockMapping","flowIndent","allowCompact","_keyLine","_keyLineStart","_keyPos","atExplicitKey","readTagProperty","isVerbatim","isNamed","tagHandle","tagName","readAnchorProperty","readAlias","parentIndent","nodeContext","allowToSeek","allowBlockStyles","allowBlockScalars","allowBlockCollections","indentStatus","atNewLine","hasContent","typeIndex","typeQuantity","typeList","blockIndent","readDocument","documentStart","directiveName","directiveArgs","hasDirectives","loadDocuments","nullpos","loadAll$1","iterator","load$1","undefined","loadAll_1","load_1","loader","loadAll","load","_toString","_hasOwnProperty","CHAR_BOM","CHAR_TAB","CHAR_LINE_FEED","CHAR_CARRIAGE_RETURN","CHAR_SPACE","CHAR_EXCLAMATION","CHAR_DOUBLE_QUOTE","CHAR_SHARP","CHAR_PERCENT","CHAR_AMPERSAND","CHAR_SINGLE_QUOTE","CHAR_ASTERISK","CHAR_COMMA","CHAR_MINUS","CHAR_COLON","CHAR_EQUALS","CHAR_GREATER_THAN","CHAR_QUESTION","CHAR_COMMERCIAL_AT","CHAR_LEFT_SQUARE_BRACKET","CHAR_RIGHT_SQUARE_BRACKET","CHAR_GRAVE_ACCENT","CHAR_LEFT_CURLY_BRACKET","CHAR_VERTICAL_LINE","CHAR_RIGHT_CURLY_BRACKET","ESCAPE_SEQUENCES","DEPRECATED_BOOLEANS_SYNTAX","DEPRECATED_BASE60_SYNTAX","compileStyleMap","encodeHex","character","QUOTING_TYPE_SINGLE","QUOTING_TYPE_DOUBLE","State","noArrayIndent","skipInvalid","flowLevel","styleMap","sortKeys","lineWidth","noRefs","noCompatMode","condenseFlow","quotingType","forceQuotes","replacer","explicitTypes","duplicates","usedDuplicates","indentString","spaces","ind","next","generateNextLine","level","testImplicitResolving","isWhitespace","isPrintable","isNsCharOrWhitespace","isPlainSafe","prev","inblock","cIsNsCharOrWhitespace","cIsNsChar","isPlainSafeFirst","isPlainSafeLast","codePointAt","first","needIndentIndicator","leadingSpaceRe","STYLE_PLAIN","STYLE_SINGLE","STYLE_LITERAL","STYLE_FOLDED","STYLE_DOUBLE","chooseScalarStyle","singleLineOnly","indentPerLevel","testAmbiguousType","char","prevChar","hasLineBreak","hasFoldableLine","shouldTrackWidth","previousLineBreak","plain","writeScalar","iskey","dump","testAmbiguity","blockHeader","dropEndingNewline","foldString","escapeString","indentIndicator","clip","keep","chomp","width","lineRe","nextLF","lastIndex","foldLine","prevMoreIndented","moreIndented","breakRe","curr","escapeSeq","writeFlowSequence","writeNode","writeBlockSequence","writeFlowMapping","objectKeyList","objectKey","objectValue","pairBuffer","writeBlockMapping","explicitPair","sort","detectType","block","isblockseq","tagStr","objectOrArray","duplicateIndex","duplicate","encodeURI","getDuplicateReferences","objects","duplicatesIndexes","inspectNode","dump$1","dump_1","dumper","renamed","to","Type","Schema","FAILSAFE_SCHEMA","JSON_SCHEMA","CORE_SCHEMA","DEFAULT_SCHEMA","YAMLException","types","null","safeLoad","safeLoadAll","safeDump","jsYaml","yamlToJsDataFromWeb","async","fileUrl","response","fetch","status","blob","text","jsData","yaml","swiftCalendarCss","SwiftCalendar","hostRef","daySelectedHandler","selectedDate","todayDate","openDayDetails","events","getEvents","modalData","assign","isModalOpen","closeDayDetails","find","event","dateArray","split","hasEvents","_a","entries","getDayClasses","dayClasses","isToday","isSelectedDay","join","getToday","today","switchMonth","bind","onDayClick","switchView","doc","JSON","parse","pathDataFile","setupCalendar","calendar","daysInMonth","currentTarget","nextOrPrev","getAttribute","Previous","Next","isEventsView","checked","classList","contains","firstElementChild","getMenu","theme","h","class","onClick","src","getAssetPath","getActions","id","onChange","htmlFor","getDays","dayName","getDayCells","role","getShortEventList","Fragment","getDayWithEventsList","getModalContent","pathIcalFile","href","entry","description","location","url","render","show","close","swiftModalCss","SwiftModal","hide"],"sources":["./src/utils/swift-calendar/constants.ts","./src/utils/swift-calendar/index.ts","./src/utils/swift-calendar/types.ts","../../node_modules/js-yaml/dist/js-yaml.mjs","./src/utils/index.ts","./src/components/swift-calendar/swift-calendar.scss?tag=swift-calendar&encapsulation=scoped","./src/components/swift-calendar/swift-calendar.tsx","./src/components/swift-modal/swift-modal.scss?tag=swift-modal&encapsulation=scoped","./src/components/swift-modal/swift-modal.tsx"],"sourcesContent":["export const days = [\n 'Sun',\n 'Mon',\n 'Tue',\n 'Wed',\n 'Thu',\n 'Fri',\n 'Sat',\n];\n\nexport const months = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n];\n\nexport const daysInCalendarWithFiveRows = 42;\n\nexport const daysInCalendarWithFourRows = 35;\n\nexport const daysInCalendarWithThreeRows = 28;\n\nexport const notInThisMonthCounts = [0, 1, 2, 3, 4, 5, 6];\n","import { dateInterface } from '../../utils/swift-calendar/types';\nimport {\n daysInCalendarWithFiveRows,\n daysInCalendarWithFourRows,\n daysInCalendarWithThreeRows,\n notInThisMonthCounts,\n} from '../../utils/swift-calendar/constants';\n\nexport class Calendar {\n readonly year: number;\n readonly month: number;\n\n public daysInCalendar = daysInCalendarWithFourRows;\n\n private notInThisMonthStartCount = 0;\n private notInThisMonthEndCount = 0;\n private currentMonthCount: number;\n private notInThisMonthCounts = notInThisMonthCounts;\n\n constructor(year: number, month: number) {\n this.year = year;\n this.month = month;\n }\n\n public getCalendarDays(): number[] {\n const thisMonthDays = this.getCurrentMonthDays();\n const notInThisMonthStartCount = this.notInThisMonthCounts[this.getMonthFirstDay()];\n const notInThisMonthEndCount = daysInCalendarWithFourRows - (thisMonthDays.length + notInThisMonthStartCount);\n\n this.currentMonthCount = thisMonthDays.length;\n this.notInThisMonthStartCount = notInThisMonthStartCount;\n this.notInThisMonthEndCount = notInThisMonthEndCount;\n\n const fillStart: number[] = notInThisMonthStartCount > 0 ? this.getDaysOfLastMonth(notInThisMonthStartCount).map(_ => 0) : [];\n const fillEnd: number[] = this.getNextMonthDays(notInThisMonthEndCount).map(_ => 0);\n\n return [...fillStart, ...thisMonthDays, ...fillEnd];\n }\n\n private getCurrentMonthDays(): number[] {\n return this.getDaysOfMonth(this.month);\n }\n\n private getDaysOfLastMonth(notInThisMonthStartCount: number): number[] {\n const daysOfMonth = this.getDaysOfMonth(this.month - 1);\n\n return daysOfMonth.slice(-notInThisMonthStartCount);\n }\n\n private getNextMonthDays(endCount: number): number[] {\n const { currentMonthCount, notInThisMonthStartCount } = this;\n const daysOfMonth = this.getDaysOfMonth(this.month + 1);\n const currentMonthWithStartCount = currentMonthCount + notInThisMonthStartCount;\n\n if (endCount <= -1) {\n endCount = daysInCalendarWithFiveRows - currentMonthWithStartCount;\n this.daysInCalendar = daysInCalendarWithFiveRows;\n } else if (endCount === 7 && (currentMonthWithStartCount) === 28) {\n endCount = daysInCalendarWithThreeRows - currentMonthWithStartCount;\n this.daysInCalendar = daysInCalendarWithThreeRows;\n }\n\n this.notInThisMonthEndCount = endCount;\n\n return daysOfMonth.slice(0, endCount);\n }\n\n private getDaysOfMonth(month: number): number[] {\n const daysOfMonth = new Date(this.year, month, 0).getDate();\n\n return Array.from({length: daysOfMonth}, (_, i) => i + 1);\n }\n\n public getMonthFirstDay(): number {\n return new Date(this.year, this.month - 1, 1).getDay();\n }\n\n public getNotInThisMonthStartCount(): number {\n return this.notInThisMonthStartCount;\n }\n\n public getNotInThisMonthEndCount(): number {\n return this.notInThisMonthEndCount;\n }\n\n public static getToday(): dateInterface {\n const now = new Date();\n\n return {\n date: `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}`,\n month: now.getMonth() + 1,\n day: now.getDate(),\n year: now.getFullYear(),\n };\n }\n}\n","export interface dateInterface {\n date: string;\n month: number;\n day: number;\n year: number;\n}\n\nexport interface entryInterface {\n name: string\n description: string\n location: string\n url: string\n}\n\nexport interface eventInterface extends dateInterface {\n entries: entryInterface[]\n}\n\nexport enum Direction {\n Next,\n Previous,\n}\n","\n/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */\nfunction isNothing(subject) {\n return (typeof subject === 'undefined') || (subject === null);\n}\n\n\nfunction isObject(subject) {\n return (typeof subject === 'object') && (subject !== null);\n}\n\n\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) return sequence;\n else if (isNothing(sequence)) return [];\n\n return [ sequence ];\n}\n\n\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n\n if (source) {\n sourceKeys = Object.keys(source);\n\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n\nfunction repeat(string, count) {\n var result = '', cycle;\n\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n\n return result;\n}\n\n\nfunction isNegativeZero(number) {\n return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);\n}\n\n\nvar isNothing_1 = isNothing;\nvar isObject_1 = isObject;\nvar toArray_1 = toArray;\nvar repeat_1 = repeat;\nvar isNegativeZero_1 = isNegativeZero;\nvar extend_1 = extend;\n\nvar common = {\n\tisNothing: isNothing_1,\n\tisObject: isObject_1,\n\ttoArray: toArray_1,\n\trepeat: repeat_1,\n\tisNegativeZero: isNegativeZero_1,\n\textend: extend_1\n};\n\n// YAML error class. http://stackoverflow.com/questions/8458984\n\n\nfunction formatError(exception, compact) {\n var where = '', message = exception.reason || '(unknown reason)';\n\n if (!exception.mark) return message;\n\n if (exception.mark.name) {\n where += 'in \"' + exception.mark.name + '\" ';\n }\n\n where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')';\n\n if (!compact && exception.mark.snippet) {\n where += '\\n\\n' + exception.mark.snippet;\n }\n\n return message + ' ' + where;\n}\n\n\nfunction YAMLException$1(reason, mark) {\n // Super constructor\n Error.call(this);\n\n this.name = 'YAMLException';\n this.reason = reason;\n this.mark = mark;\n this.message = formatError(this, false);\n\n // Include stack trace in error object\n if (Error.captureStackTrace) {\n // Chrome and NodeJS\n Error.captureStackTrace(this, this.constructor);\n } else {\n // FF, IE 10+ and Safari 6+. Fallback for others\n this.stack = (new Error()).stack || '';\n }\n}\n\n\n// Inherit from Error\nYAMLException$1.prototype = Object.create(Error.prototype);\nYAMLException$1.prototype.constructor = YAMLException$1;\n\n\nYAMLException$1.prototype.toString = function toString(compact) {\n return this.name + ': ' + formatError(this, compact);\n};\n\n\nvar exception = YAMLException$1;\n\n// get snippet for a single line, respecting maxLength\nfunction getLine(buffer, lineStart, lineEnd, position, maxLineLength) {\n var head = '';\n var tail = '';\n var maxHalfLength = Math.floor(maxLineLength / 2) - 1;\n\n if (position - lineStart > maxHalfLength) {\n head = ' ... ';\n lineStart = position - maxHalfLength + head.length;\n }\n\n if (lineEnd - position > maxHalfLength) {\n tail = ' ...';\n lineEnd = position + maxHalfLength - tail.length;\n }\n\n return {\n str: head + buffer.slice(lineStart, lineEnd).replace(/\\t/g, '→') + tail,\n pos: position - lineStart + head.length // relative position\n };\n}\n\n\nfunction padStart(string, max) {\n return common.repeat(' ', max - string.length) + string;\n}\n\n\nfunction makeSnippet(mark, options) {\n options = Object.create(options || null);\n\n if (!mark.buffer) return null;\n\n if (!options.maxLength) options.maxLength = 79;\n if (typeof options.indent !== 'number') options.indent = 1;\n if (typeof options.linesBefore !== 'number') options.linesBefore = 3;\n if (typeof options.linesAfter !== 'number') options.linesAfter = 2;\n\n var re = /\\r?\\n|\\r|\\0/g;\n var lineStarts = [ 0 ];\n var lineEnds = [];\n var match;\n var foundLineNo = -1;\n\n while ((match = re.exec(mark.buffer))) {\n lineEnds.push(match.index);\n lineStarts.push(match.index + match[0].length);\n\n if (mark.position <= match.index && foundLineNo < 0) {\n foundLineNo = lineStarts.length - 2;\n }\n }\n\n if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;\n\n var result = '', i, line;\n var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;\n var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);\n\n for (i = 1; i <= options.linesBefore; i++) {\n if (foundLineNo - i < 0) break;\n line = getLine(\n mark.buffer,\n lineStarts[foundLineNo - i],\n lineEnds[foundLineNo - i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),\n maxLineLength\n );\n result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n' + result;\n }\n\n line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);\n result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n';\n result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\\n';\n\n for (i = 1; i <= options.linesAfter; i++) {\n if (foundLineNo + i >= lineEnds.length) break;\n line = getLine(\n mark.buffer,\n lineStarts[foundLineNo + i],\n lineEnds[foundLineNo + i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),\n maxLineLength\n );\n result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n';\n }\n\n return result.replace(/\\n$/, '');\n}\n\n\nvar snippet = makeSnippet;\n\nvar TYPE_CONSTRUCTOR_OPTIONS = [\n 'kind',\n 'multi',\n 'resolve',\n 'construct',\n 'instanceOf',\n 'predicate',\n 'represent',\n 'representName',\n 'defaultStyle',\n 'styleAliases'\n];\n\nvar YAML_NODE_KINDS = [\n 'scalar',\n 'sequence',\n 'mapping'\n];\n\nfunction compileStyleAliases(map) {\n var result = {};\n\n if (map !== null) {\n Object.keys(map).forEach(function (style) {\n map[style].forEach(function (alias) {\n result[String(alias)] = style;\n });\n });\n }\n\n return result;\n}\n\nfunction Type$1(tag, options) {\n options = options || {};\n\n Object.keys(options).forEach(function (name) {\n if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {\n throw new exception('Unknown option \"' + name + '\" is met in definition of \"' + tag + '\" YAML type.');\n }\n });\n\n // TODO: Add tag format check.\n this.options = options; // keep original options in case user wants to extend this type later\n this.tag = tag;\n this.kind = options['kind'] || null;\n this.resolve = options['resolve'] || function () { return true; };\n this.construct = options['construct'] || function (data) { return data; };\n this.instanceOf = options['instanceOf'] || null;\n this.predicate = options['predicate'] || null;\n this.represent = options['represent'] || null;\n this.representName = options['representName'] || null;\n this.defaultStyle = options['defaultStyle'] || null;\n this.multi = options['multi'] || false;\n this.styleAliases = compileStyleAliases(options['styleAliases'] || null);\n\n if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {\n throw new exception('Unknown kind \"' + this.kind + '\" is specified for \"' + tag + '\" YAML type.');\n }\n}\n\nvar type = Type$1;\n\n/*eslint-disable max-len*/\n\n\n\n\n\nfunction compileList(schema, name) {\n var result = [];\n\n schema[name].forEach(function (currentType) {\n var newIndex = result.length;\n\n result.forEach(function (previousType, previousIndex) {\n if (previousType.tag === currentType.tag &&\n previousType.kind === currentType.kind &&\n previousType.multi === currentType.multi) {\n\n newIndex = previousIndex;\n }\n });\n\n result[newIndex] = currentType;\n });\n\n return result;\n}\n\n\nfunction compileMap(/* lists... */) {\n var result = {\n scalar: {},\n sequence: {},\n mapping: {},\n fallback: {},\n multi: {\n scalar: [],\n sequence: [],\n mapping: [],\n fallback: []\n }\n }, index, length;\n\n function collectType(type) {\n if (type.multi) {\n result.multi[type.kind].push(type);\n result.multi['fallback'].push(type);\n } else {\n result[type.kind][type.tag] = result['fallback'][type.tag] = type;\n }\n }\n\n for (index = 0, length = arguments.length; index < length; index += 1) {\n arguments[index].forEach(collectType);\n }\n return result;\n}\n\n\nfunction Schema$1(definition) {\n return this.extend(definition);\n}\n\n\nSchema$1.prototype.extend = function extend(definition) {\n var implicit = [];\n var explicit = [];\n\n if (definition instanceof type) {\n // Schema.extend(type)\n explicit.push(definition);\n\n } else if (Array.isArray(definition)) {\n // Schema.extend([ type1, type2, ... ])\n explicit = explicit.concat(definition);\n\n } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {\n // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] })\n if (definition.implicit) implicit = implicit.concat(definition.implicit);\n if (definition.explicit) explicit = explicit.concat(definition.explicit);\n\n } else {\n throw new exception('Schema.extend argument should be a Type, [ Type ], ' +\n 'or a schema definition ({ implicit: [...], explicit: [...] })');\n }\n\n implicit.forEach(function (type$1) {\n if (!(type$1 instanceof type)) {\n throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n\n if (type$1.loadKind && type$1.loadKind !== 'scalar') {\n throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');\n }\n\n if (type$1.multi) {\n throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.');\n }\n });\n\n explicit.forEach(function (type$1) {\n if (!(type$1 instanceof type)) {\n throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n });\n\n var result = Object.create(Schema$1.prototype);\n\n result.implicit = (this.implicit || []).concat(implicit);\n result.explicit = (this.explicit || []).concat(explicit);\n\n result.compiledImplicit = compileList(result, 'implicit');\n result.compiledExplicit = compileList(result, 'explicit');\n result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);\n\n return result;\n};\n\n\nvar schema = Schema$1;\n\nvar str = new type('tag:yaml.org,2002:str', {\n kind: 'scalar',\n construct: function (data) { return data !== null ? data : ''; }\n});\n\nvar seq = new type('tag:yaml.org,2002:seq', {\n kind: 'sequence',\n construct: function (data) { return data !== null ? data : []; }\n});\n\nvar map = new type('tag:yaml.org,2002:map', {\n kind: 'mapping',\n construct: function (data) { return data !== null ? data : {}; }\n});\n\nvar failsafe = new schema({\n explicit: [\n str,\n seq,\n map\n ]\n});\n\nfunction resolveYamlNull(data) {\n if (data === null) return true;\n\n var max = data.length;\n\n return (max === 1 && data === '~') ||\n (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));\n}\n\nfunction constructYamlNull() {\n return null;\n}\n\nfunction isNull(object) {\n return object === null;\n}\n\nvar _null = new type('tag:yaml.org,2002:null', {\n kind: 'scalar',\n resolve: resolveYamlNull,\n construct: constructYamlNull,\n predicate: isNull,\n represent: {\n canonical: function () { return '~'; },\n lowercase: function () { return 'null'; },\n uppercase: function () { return 'NULL'; },\n camelcase: function () { return 'Null'; },\n empty: function () { return ''; }\n },\n defaultStyle: 'lowercase'\n});\n\nfunction resolveYamlBoolean(data) {\n if (data === null) return false;\n\n var max = data.length;\n\n return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||\n (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));\n}\n\nfunction constructYamlBoolean(data) {\n return data === 'true' ||\n data === 'True' ||\n data === 'TRUE';\n}\n\nfunction isBoolean(object) {\n return Object.prototype.toString.call(object) === '[object Boolean]';\n}\n\nvar bool = new type('tag:yaml.org,2002:bool', {\n kind: 'scalar',\n resolve: resolveYamlBoolean,\n construct: constructYamlBoolean,\n predicate: isBoolean,\n represent: {\n lowercase: function (object) { return object ? 'true' : 'false'; },\n uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },\n camelcase: function (object) { return object ? 'True' : 'False'; }\n },\n defaultStyle: 'lowercase'\n});\n\nfunction isHexCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||\n ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||\n ((0x61/* a */ <= c) && (c <= 0x66/* f */));\n}\n\nfunction isOctCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));\n}\n\nfunction isDecCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));\n}\n\nfunction resolveYamlInteger(data) {\n if (data === null) return false;\n\n var max = data.length,\n index = 0,\n hasDigits = false,\n ch;\n\n if (!max) return false;\n\n ch = data[index];\n\n // sign\n if (ch === '-' || ch === '+') {\n ch = data[++index];\n }\n\n if (ch === '0') {\n // 0\n if (index + 1 === max) return true;\n ch = data[++index];\n\n // base 2, base 8, base 16\n\n if (ch === 'b') {\n // base 2\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (ch !== '0' && ch !== '1') return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'x') {\n // base 16\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isHexCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'o') {\n // base 8\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isOctCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n }\n\n // base 10 (except 0)\n\n // value should not start with `_`;\n if (ch === '_') return false;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isDecCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n\n // Should have digits and should not end with `_`\n if (!hasDigits || ch === '_') return false;\n\n return true;\n}\n\nfunction constructYamlInteger(data) {\n var value = data, sign = 1, ch;\n\n if (value.indexOf('_') !== -1) {\n value = value.replace(/_/g, '');\n }\n\n ch = value[0];\n\n if (ch === '-' || ch === '+') {\n if (ch === '-') sign = -1;\n value = value.slice(1);\n ch = value[0];\n }\n\n if (value === '0') return 0;\n\n if (ch === '0') {\n if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);\n if (value[1] === 'x') return sign * parseInt(value.slice(2), 16);\n if (value[1] === 'o') return sign * parseInt(value.slice(2), 8);\n }\n\n return sign * parseInt(value, 10);\n}\n\nfunction isInteger(object) {\n return (Object.prototype.toString.call(object)) === '[object Number]' &&\n (object % 1 === 0 && !common.isNegativeZero(object));\n}\n\nvar int = new type('tag:yaml.org,2002:int', {\n kind: 'scalar',\n resolve: resolveYamlInteger,\n construct: constructYamlInteger,\n predicate: isInteger,\n represent: {\n binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); },\n octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); },\n decimal: function (obj) { return obj.toString(10); },\n /* eslint-disable max-len */\n hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); }\n },\n defaultStyle: 'decimal',\n styleAliases: {\n binary: [ 2, 'bin' ],\n octal: [ 8, 'oct' ],\n decimal: [ 10, 'dec' ],\n hexadecimal: [ 16, 'hex' ]\n }\n});\n\nvar YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n // special case, seems not from spec\n '|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$');\n\nfunction resolveYamlFloat(data) {\n if (data === null) return false;\n\n if (!YAML_FLOAT_PATTERN.test(data) ||\n // Quick hack to not allow integers end with `_`\n // Probably should update regexp & check speed\n data[data.length - 1] === '_') {\n return false;\n }\n\n return true;\n}\n\nfunction constructYamlFloat(data) {\n var value, sign;\n\n value = data.replace(/_/g, '').toLowerCase();\n sign = value[0] === '-' ? -1 : 1;\n\n if ('+-'.indexOf(value[0]) >= 0) {\n value = value.slice(1);\n }\n\n if (value === '.inf') {\n return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;\n\n } else if (value === '.nan') {\n return NaN;\n }\n return sign * parseFloat(value, 10);\n}\n\n\nvar SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;\n\nfunction representYamlFloat(object, style) {\n var res;\n\n if (isNaN(object)) {\n switch (style) {\n case 'lowercase': return '.nan';\n case 'uppercase': return '.NAN';\n case 'camelcase': return '.NaN';\n }\n } else if (Number.POSITIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '.inf';\n case 'uppercase': return '.INF';\n case 'camelcase': return '.Inf';\n }\n } else if (Number.NEGATIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '-.inf';\n case 'uppercase': return '-.INF';\n case 'camelcase': return '-.Inf';\n }\n } else if (common.isNegativeZero(object)) {\n return '-0.0';\n }\n\n res = object.toString(10);\n\n // JS stringifier can build scientific format without dots: 5e-100,\n // while YAML requres dot: 5.e-100. Fix it with simple hack\n\n return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;\n}\n\nfunction isFloat(object) {\n return (Object.prototype.toString.call(object) === '[object Number]') &&\n (object % 1 !== 0 || common.isNegativeZero(object));\n}\n\nvar float = new type('tag:yaml.org,2002:float', {\n kind: 'scalar',\n resolve: resolveYamlFloat,\n construct: constructYamlFloat,\n predicate: isFloat,\n represent: representYamlFloat,\n defaultStyle: 'lowercase'\n});\n\nvar json = failsafe.extend({\n implicit: [\n _null,\n bool,\n int,\n float\n ]\n});\n\nvar core = json;\n\nvar YAML_DATE_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9])' + // [2] month\n '-([0-9][0-9])$'); // [3] day\n\nvar YAML_TIMESTAMP_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9]?)' + // [2] month\n '-([0-9][0-9]?)' + // [3] day\n '(?:[Tt]|[ \\\\t]+)' + // ...\n '([0-9][0-9]?)' + // [4] hour\n ':([0-9][0-9])' + // [5] minute\n ':([0-9][0-9])' + // [6] second\n '(?:\\\\.([0-9]*))?' + // [7] fraction\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour\n '(?::([0-9][0-9]))?))?$'); // [11] tz_minute\n\nfunction resolveYamlTimestamp(data) {\n if (data === null) return false;\n if (YAML_DATE_REGEXP.exec(data) !== null) return true;\n if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;\n return false;\n}\n\nfunction constructYamlTimestamp(data) {\n var match, year, month, day, hour, minute, second, fraction = 0,\n delta = null, tz_hour, tz_minute, date;\n\n match = YAML_DATE_REGEXP.exec(data);\n if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);\n\n if (match === null) throw new Error('Date resolve error');\n\n // match: [1] year [2] month [3] day\n\n year = +(match[1]);\n month = +(match[2]) - 1; // JS month starts with 0\n day = +(match[3]);\n\n if (!match[4]) { // no hour\n return new Date(Date.UTC(year, month, day));\n }\n\n // match: [4] hour [5] minute [6] second [7] fraction\n\n hour = +(match[4]);\n minute = +(match[5]);\n second = +(match[6]);\n\n if (match[7]) {\n fraction = match[7].slice(0, 3);\n while (fraction.length < 3) { // milli-seconds\n fraction += '0';\n }\n fraction = +fraction;\n }\n\n // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute\n\n if (match[9]) {\n tz_hour = +(match[10]);\n tz_minute = +(match[11] || 0);\n delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds\n if (match[9] === '-') delta = -delta;\n }\n\n date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));\n\n if (delta) date.setTime(date.getTime() - delta);\n\n return date;\n}\n\nfunction representYamlTimestamp(object /*, style*/) {\n return object.toISOString();\n}\n\nvar timestamp = new type('tag:yaml.org,2002:timestamp', {\n kind: 'scalar',\n resolve: resolveYamlTimestamp,\n construct: constructYamlTimestamp,\n instanceOf: Date,\n represent: representYamlTimestamp\n});\n\nfunction resolveYamlMerge(data) {\n return data === '<<' || data === null;\n}\n\nvar merge = new type('tag:yaml.org,2002:merge', {\n kind: 'scalar',\n resolve: resolveYamlMerge\n});\n\n/*eslint-disable no-bitwise*/\n\n\n\n\n\n// [ 64, 65, 66 ] -> [ padding, CR, LF ]\nvar BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r';\n\n\nfunction resolveYamlBinary(data) {\n if (data === null) return false;\n\n var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;\n\n // Convert one by one.\n for (idx = 0; idx < max; idx++) {\n code = map.indexOf(data.charAt(idx));\n\n // Skip CR/LF\n if (code > 64) continue;\n\n // Fail on illegal characters\n if (code < 0) return false;\n\n bitlen += 6;\n }\n\n // If there are any bits left, source was corrupted\n return (bitlen % 8) === 0;\n}\n\nfunction constructYamlBinary(data) {\n var idx, tailbits,\n input = data.replace(/[\\r\\n=]/g, ''), // remove CR/LF & padding to simplify scan\n max = input.length,\n map = BASE64_MAP,\n bits = 0,\n result = [];\n\n // Collect by 6*4 bits (3 bytes)\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 4 === 0) && idx) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n }\n\n bits = (bits << 6) | map.indexOf(input.charAt(idx));\n }\n\n // Dump tail\n\n tailbits = (max % 4) * 6;\n\n if (tailbits === 0) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n } else if (tailbits === 18) {\n result.push((bits >> 10) & 0xFF);\n result.push((bits >> 2) & 0xFF);\n } else if (tailbits === 12) {\n result.push((bits >> 4) & 0xFF);\n }\n\n return new Uint8Array(result);\n}\n\nfunction representYamlBinary(object /*, style*/) {\n var result = '', bits = 0, idx, tail,\n max = object.length,\n map = BASE64_MAP;\n\n // Convert every three bytes to 4 ASCII characters.\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 3 === 0) && idx) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n }\n\n bits = (bits << 8) + object[idx];\n }\n\n // Dump tail\n\n tail = max % 3;\n\n if (tail === 0) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n } else if (tail === 2) {\n result += map[(bits >> 10) & 0x3F];\n result += map[(bits >> 4) & 0x3F];\n result += map[(bits << 2) & 0x3F];\n result += map[64];\n } else if (tail === 1) {\n result += map[(bits >> 2) & 0x3F];\n result += map[(bits << 4) & 0x3F];\n result += map[64];\n result += map[64];\n }\n\n return result;\n}\n\nfunction isBinary(obj) {\n return Object.prototype.toString.call(obj) === '[object Uint8Array]';\n}\n\nvar binary = new type('tag:yaml.org,2002:binary', {\n kind: 'scalar',\n resolve: resolveYamlBinary,\n construct: constructYamlBinary,\n predicate: isBinary,\n represent: representYamlBinary\n});\n\nvar _hasOwnProperty$3 = Object.prototype.hasOwnProperty;\nvar _toString$2 = Object.prototype.toString;\n\nfunction resolveYamlOmap(data) {\n if (data === null) return true;\n\n var objectKeys = [], index, length, pair, pairKey, pairHasKey,\n object = data;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n pairHasKey = false;\n\n if (_toString$2.call(pair) !== '[object Object]') return false;\n\n for (pairKey in pair) {\n if (_hasOwnProperty$3.call(pair, pairKey)) {\n if (!pairHasKey) pairHasKey = true;\n else return false;\n }\n }\n\n if (!pairHasKey) return false;\n\n if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);\n else return false;\n }\n\n return true;\n}\n\nfunction constructYamlOmap(data) {\n return data !== null ? data : [];\n}\n\nvar omap = new type('tag:yaml.org,2002:omap', {\n kind: 'sequence',\n resolve: resolveYamlOmap,\n construct: constructYamlOmap\n});\n\nvar _toString$1 = Object.prototype.toString;\n\nfunction resolveYamlPairs(data) {\n if (data === null) return true;\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n if (_toString$1.call(pair) !== '[object Object]') return false;\n\n keys = Object.keys(pair);\n\n if (keys.length !== 1) return false;\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return true;\n}\n\nfunction constructYamlPairs(data) {\n if (data === null) return [];\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n keys = Object.keys(pair);\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return result;\n}\n\nvar pairs = new type('tag:yaml.org,2002:pairs', {\n kind: 'sequence',\n resolve: resolveYamlPairs,\n construct: constructYamlPairs\n});\n\nvar _hasOwnProperty$2 = Object.prototype.hasOwnProperty;\n\nfunction resolveYamlSet(data) {\n if (data === null) return true;\n\n var key, object = data;\n\n for (key in object) {\n if (_hasOwnProperty$2.call(object, key)) {\n if (object[key] !== null) return false;\n }\n }\n\n return true;\n}\n\nfunction constructYamlSet(data) {\n return data !== null ? data : {};\n}\n\nvar set = new type('tag:yaml.org,2002:set', {\n kind: 'mapping',\n resolve: resolveYamlSet,\n construct: constructYamlSet\n});\n\nvar _default = core.extend({\n implicit: [\n timestamp,\n merge\n ],\n explicit: [\n binary,\n omap,\n pairs,\n set\n ]\n});\n\n/*eslint-disable max-len,no-use-before-define*/\n\n\n\n\n\n\n\nvar _hasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\n\nvar CONTEXT_FLOW_IN = 1;\nvar CONTEXT_FLOW_OUT = 2;\nvar CONTEXT_BLOCK_IN = 3;\nvar CONTEXT_BLOCK_OUT = 4;\n\n\nvar CHOMPING_CLIP = 1;\nvar CHOMPING_STRIP = 2;\nvar CHOMPING_KEEP = 3;\n\n\nvar PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nvar PATTERN_NON_ASCII_LINE_BREAKS = /[\\x85\\u2028\\u2029]/;\nvar PATTERN_FLOW_INDICATORS = /[,\\[\\]\\{\\}]/;\nvar PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\\-]+!)$/i;\nvar PATTERN_TAG_URI = /^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;\n\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\n\nfunction is_EOL(c) {\n return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);\n}\n\nfunction is_WHITE_SPACE(c) {\n return (c === 0x09/* Tab */) || (c === 0x20/* Space */);\n}\n\nfunction is_WS_OR_EOL(c) {\n return (c === 0x09/* Tab */) ||\n (c === 0x20/* Space */) ||\n (c === 0x0A/* LF */) ||\n (c === 0x0D/* CR */);\n}\n\nfunction is_FLOW_INDICATOR(c) {\n return c === 0x2C/* , */ ||\n c === 0x5B/* [ */ ||\n c === 0x5D/* ] */ ||\n c === 0x7B/* { */ ||\n c === 0x7D/* } */;\n}\n\nfunction fromHexCode(c) {\n var lc;\n\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n /*eslint-disable no-bitwise*/\n lc = c | 0x20;\n\n if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {\n return lc - 0x61 + 10;\n }\n\n return -1;\n}\n\nfunction escapedHexLen(c) {\n if (c === 0x78/* x */) { return 2; }\n if (c === 0x75/* u */) { return 4; }\n if (c === 0x55/* U */) { return 8; }\n return 0;\n}\n\nfunction fromDecimalCode(c) {\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n return -1;\n}\n\nfunction simpleEscapeSequence(c) {\n /* eslint-disable indent */\n return (c === 0x30/* 0 */) ? '\\x00' :\n (c === 0x61/* a */) ? '\\x07' :\n (c === 0x62/* b */) ? '\\x08' :\n (c === 0x74/* t */) ? '\\x09' :\n (c === 0x09/* Tab */) ? '\\x09' :\n (c === 0x6E/* n */) ? '\\x0A' :\n (c === 0x76/* v */) ? '\\x0B' :\n (c === 0x66/* f */) ? '\\x0C' :\n (c === 0x72/* r */) ? '\\x0D' :\n (c === 0x65/* e */) ? '\\x1B' :\n (c === 0x20/* Space */) ? ' ' :\n (c === 0x22/* \" */) ? '\\x22' :\n (c === 0x2F/* / */) ? '/' :\n (c === 0x5C/* \\ */) ? '\\x5C' :\n (c === 0x4E/* N */) ? '\\x85' :\n (c === 0x5F/* _ */) ? '\\xA0' :\n (c === 0x4C/* L */) ? '\\u2028' :\n (c === 0x50/* P */) ? '\\u2029' : '';\n}\n\nfunction charFromCodepoint(c) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c);\n }\n // Encode UTF-16 surrogate pair\n // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF\n return String.fromCharCode(\n ((c - 0x010000) >> 10) + 0xD800,\n ((c - 0x010000) & 0x03FF) + 0xDC00\n );\n}\n\nvar simpleEscapeCheck = new Array(256); // integer, for fast access\nvar simpleEscapeMap = new Array(256);\nfor (var i = 0; i < 256; i++) {\n simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;\n simpleEscapeMap[i] = simpleEscapeSequence(i);\n}\n\n\nfunction State$1(input, options) {\n this.input = input;\n\n this.filename = options['filename'] || null;\n this.schema = options['schema'] || _default;\n this.onWarning = options['onWarning'] || null;\n // (Hidden) Remove? makes the loader to expect YAML 1.1 documents\n // if such documents have no explicit %YAML directive\n this.legacy = options['legacy'] || false;\n\n this.json = options['json'] || false;\n this.listener = options['listener'] || null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.typeMap = this.schema.compiledTypeMap;\n\n this.length = input.length;\n this.position = 0;\n this.line = 0;\n this.lineStart = 0;\n this.lineIndent = 0;\n\n // position of first leading tab in the current line,\n // used to make sure there are no tabs in the indentation\n this.firstTabInLine = -1;\n\n this.documents = [];\n\n /*\n this.version;\n this.checkLineBreaks;\n this.tagMap;\n this.anchorMap;\n this.tag;\n this.anchor;\n this.kind;\n this.result;*/\n\n}\n\n\nfunction generateError(state, message) {\n var mark = {\n name: state.filename,\n buffer: state.input.slice(0, -1), // omit trailing \\0\n position: state.position,\n line: state.line,\n column: state.position - state.lineStart\n };\n\n mark.snippet = snippet(mark);\n\n return new exception(message, mark);\n}\n\nfunction throwError(state, message) {\n throw generateError(state, message);\n}\n\nfunction throwWarning(state, message) {\n if (state.onWarning) {\n state.onWarning.call(null, generateError(state, message));\n }\n}\n\n\nvar directiveHandlers = {\n\n YAML: function handleYamlDirective(state, name, args) {\n\n var match, major, minor;\n\n if (state.version !== null) {\n throwError(state, 'duplication of %YAML directive');\n }\n\n if (args.length !== 1) {\n throwError(state, 'YAML directive accepts exactly one argument');\n }\n\n match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0]);\n\n if (match === null) {\n throwError(state, 'ill-formed argument of the YAML directive');\n }\n\n major = parseInt(match[1], 10);\n minor = parseInt(match[2], 10);\n\n if (major !== 1) {\n throwError(state, 'unacceptable YAML version of the document');\n }\n\n state.version = args[0];\n state.checkLineBreaks = (minor < 2);\n\n if (minor !== 1 && minor !== 2) {\n throwWarning(state, 'unsupported YAML version of the document');\n }\n },\n\n TAG: function handleTagDirective(state, name, args) {\n\n var handle, prefix;\n\n if (args.length !== 2) {\n throwError(state, 'TAG directive accepts exactly two arguments');\n }\n\n handle = args[0];\n prefix = args[1];\n\n if (!PATTERN_TAG_HANDLE.test(handle)) {\n throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');\n }\n\n if (_hasOwnProperty$1.call(state.tagMap, handle)) {\n throwError(state, 'there is a previously declared suffix for \"' + handle + '\" tag handle');\n }\n\n if (!PATTERN_TAG_URI.test(prefix)) {\n throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');\n }\n\n try {\n prefix = decodeURIComponent(prefix);\n } catch (err) {\n throwError(state, 'tag prefix is malformed: ' + prefix);\n }\n\n state.tagMap[handle] = prefix;\n }\n};\n\n\nfunction captureSegment(state, start, end, checkJson) {\n var _position, _length, _character, _result;\n\n if (start < end) {\n _result = state.input.slice(start, end);\n\n if (checkJson) {\n for (_position = 0, _length = _result.length; _position < _length; _position += 1) {\n _character = _result.charCodeAt(_position);\n if (!(_character === 0x09 ||\n (0x20 <= _character && _character <= 0x10FFFF))) {\n throwError(state, 'expected valid JSON character');\n }\n }\n } else if (PATTERN_NON_PRINTABLE.test(_result)) {\n throwError(state, 'the stream contains non-printable characters');\n }\n\n state.result += _result;\n }\n}\n\nfunction mergeMappings(state, destination, source, overridableKeys) {\n var sourceKeys, key, index, quantity;\n\n if (!common.isObject(source)) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable');\n }\n\n sourceKeys = Object.keys(source);\n\n for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {\n key = sourceKeys[index];\n\n if (!_hasOwnProperty$1.call(destination, key)) {\n destination[key] = source[key];\n overridableKeys[key] = true;\n }\n }\n}\n\nfunction storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode,\n startLine, startLineStart, startPos) {\n\n var index, quantity;\n\n // The output is a plain object here, so keys can only be strings.\n // We need to convert keyNode to a string, but doing so can hang the process\n // (deeply nested arrays that explode exponentially using aliases).\n if (Array.isArray(keyNode)) {\n keyNode = Array.prototype.slice.call(keyNode);\n\n for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {\n if (Array.isArray(keyNode[index])) {\n throwError(state, 'nested arrays are not supported inside keys');\n }\n\n if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') {\n keyNode[index] = '[object Object]';\n }\n }\n }\n\n // Avoid code execution in load() via toString property\n // (still use its own toString for arrays, timestamps,\n // and whatever user schema extensions happen to have @@toStringTag)\n if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') {\n keyNode = '[object Object]';\n }\n\n\n keyNode = String(keyNode);\n\n if (_result === null) {\n _result = {};\n }\n\n if (keyTag === 'tag:yaml.org,2002:merge') {\n if (Array.isArray(valueNode)) {\n for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {\n mergeMappings(state, _result, valueNode[index], overridableKeys);\n }\n } else {\n mergeMappings(state, _result, valueNode, overridableKeys);\n }\n } else {\n if (!state.json &&\n !_hasOwnProperty$1.call(overridableKeys, keyNode) &&\n _hasOwnProperty$1.call(_result, keyNode)) {\n state.line = startLine || state.line;\n state.lineStart = startLineStart || state.lineStart;\n state.position = startPos || state.position;\n throwError(state, 'duplicated mapping key');\n }\n\n // used for this specific key only because Object.defineProperty is slow\n if (keyNode === '__proto__') {\n Object.defineProperty(_result, keyNode, {\n configurable: true,\n enumerable: true,\n writable: true,\n value: valueNode\n });\n } else {\n _result[keyNode] = valueNode;\n }\n delete overridableKeys[keyNode];\n }\n\n return _result;\n}\n\nfunction readLineBreak(state) {\n var ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x0A/* LF */) {\n state.position++;\n } else if (ch === 0x0D/* CR */) {\n state.position++;\n if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {\n state.position++;\n }\n } else {\n throwError(state, 'a line break is expected');\n }\n\n state.line += 1;\n state.lineStart = state.position;\n state.firstTabInLine = -1;\n}\n\nfunction skipSeparationSpace(state, allowComments, checkIndent) {\n var lineBreaks = 0,\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) {\n state.firstTabInLine = state.position;\n }\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (allowComments && ch === 0x23/* # */) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);\n }\n\n if (is_EOL(ch)) {\n readLineBreak(state);\n\n ch = state.input.charCodeAt(state.position);\n lineBreaks++;\n state.lineIndent = 0;\n\n while (ch === 0x20/* Space */) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n } else {\n break;\n }\n }\n\n if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {\n throwWarning(state, 'deficient indentation');\n }\n\n return lineBreaks;\n}\n\nfunction testDocumentSeparator(state) {\n var _position = state.position,\n ch;\n\n ch = state.input.charCodeAt(_position);\n\n // Condition state.position === state.lineStart is tested\n // in parent on each call, for efficiency. No needs to test here again.\n if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\n ch === state.input.charCodeAt(_position + 1) &&\n ch === state.input.charCodeAt(_position + 2)) {\n\n _position += 3;\n\n ch = state.input.charCodeAt(_position);\n\n if (ch === 0 || is_WS_OR_EOL(ch)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction writeFoldedLines(state, count) {\n if (count === 1) {\n state.result += ' ';\n } else if (count > 1) {\n state.result += common.repeat('\\n', count - 1);\n }\n}\n\n\nfunction readPlainScalar(state, nodeIndent, withinFlowCollection) {\n var preceding,\n following,\n captureStart,\n captureEnd,\n hasPendingContent,\n _line,\n _lineStart,\n _lineIndent,\n _kind = state.kind,\n _result = state.result,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (is_WS_OR_EOL(ch) ||\n is_FLOW_INDICATOR(ch) ||\n ch === 0x23/* # */ ||\n ch === 0x26/* & */ ||\n ch === 0x2A/* * */ ||\n ch === 0x21/* ! */ ||\n ch === 0x7C/* | */ ||\n ch === 0x3E/* > */ ||\n ch === 0x27/* ' */ ||\n ch === 0x22/* \" */ ||\n ch === 0x25/* % */ ||\n ch === 0x40/* @ */ ||\n ch === 0x60/* ` */) {\n return false;\n }\n\n if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n return false;\n }\n }\n\n state.kind = 'scalar';\n state.result = '';\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n\n while (ch !== 0) {\n if (ch === 0x3A/* : */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n break;\n }\n\n } else if (ch === 0x23/* # */) {\n preceding = state.input.charCodeAt(state.position - 1);\n\n if (is_WS_OR_EOL(preceding)) {\n break;\n }\n\n } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||\n withinFlowCollection && is_FLOW_INDICATOR(ch)) {\n break;\n\n } else if (is_EOL(ch)) {\n _line = state.line;\n _lineStart = state.lineStart;\n _lineIndent = state.lineIndent;\n skipSeparationSpace(state, false, -1);\n\n if (state.lineIndent >= nodeIndent) {\n hasPendingContent = true;\n ch = state.input.charCodeAt(state.position);\n continue;\n } else {\n state.position = captureEnd;\n state.line = _line;\n state.lineStart = _lineStart;\n state.lineIndent = _lineIndent;\n break;\n }\n }\n\n if (hasPendingContent) {\n captureSegment(state, captureStart, captureEnd, false);\n writeFoldedLines(state, state.line - _line);\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n }\n\n if (!is_WHITE_SPACE(ch)) {\n captureEnd = state.position + 1;\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, captureEnd, false);\n\n if (state.result) {\n return true;\n }\n\n state.kind = _kind;\n state.result = _result;\n return false;\n}\n\nfunction readSingleQuotedScalar(state, nodeIndent) {\n var ch,\n captureStart, captureEnd;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x27/* ' */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x27/* ' */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x27/* ' */) {\n captureStart = state.position;\n state.position++;\n captureEnd = state.position;\n } else {\n return true;\n }\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a single quoted scalar');\n}\n\nfunction readDoubleQuotedScalar(state, nodeIndent) {\n var captureStart,\n captureEnd,\n hexLength,\n hexResult,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x22/* \" */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x22/* \" */) {\n captureSegment(state, captureStart, state.position, true);\n state.position++;\n return true;\n\n } else if (ch === 0x5C/* \\ */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (is_EOL(ch)) {\n skipSeparationSpace(state, false, nodeIndent);\n\n // TODO: rework to inline fn with no type cast?\n } else if (ch < 256 && simpleEscapeCheck[ch]) {\n state.result += simpleEscapeMap[ch];\n state.position++;\n\n } else if ((tmp = escapedHexLen(ch)) > 0) {\n hexLength = tmp;\n hexResult = 0;\n\n for (; hexLength > 0; hexLength--) {\n ch = state.input.charCodeAt(++state.position);\n\n if ((tmp = fromHexCode(ch)) >= 0) {\n hexResult = (hexResult << 4) + tmp;\n\n } else {\n throwError(state, 'expected hexadecimal character');\n }\n }\n\n state.result += charFromCodepoint(hexResult);\n\n state.position++;\n\n } else {\n throwError(state, 'unknown escape sequence');\n }\n\n captureStart = captureEnd = state.position;\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a double quoted scalar');\n}\n\nfunction readFlowCollection(state, nodeIndent) {\n var readNext = true,\n _line,\n _lineStart,\n _pos,\n _tag = state.tag,\n _result,\n _anchor = state.anchor,\n following,\n terminator,\n isPair,\n isExplicitPair,\n isMapping,\n overridableKeys = Object.create(null),\n keyNode,\n keyTag,\n valueNode,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x5B/* [ */) {\n terminator = 0x5D;/* ] */\n isMapping = false;\n _result = [];\n } else if (ch === 0x7B/* { */) {\n terminator = 0x7D;/* } */\n isMapping = true;\n _result = {};\n } else {\n return false;\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n while (ch !== 0) {\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === terminator) {\n state.position++;\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = isMapping ? 'mapping' : 'sequence';\n state.result = _result;\n return true;\n } else if (!readNext) {\n throwError(state, 'missed comma between flow collection entries');\n } else if (ch === 0x2C/* , */) {\n // \"flow collection entries can never be completely empty\", as per YAML 1.2, section 7.4\n throwError(state, \"expected the node content, but found ','\");\n }\n\n keyTag = keyNode = valueNode = null;\n isPair = isExplicitPair = false;\n\n if (ch === 0x3F/* ? */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following)) {\n isPair = isExplicitPair = true;\n state.position++;\n skipSeparationSpace(state, true, nodeIndent);\n }\n }\n\n _line = state.line; // Save the current line.\n _lineStart = state.lineStart;\n _pos = state.position;\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n keyTag = state.tag;\n keyNode = state.result;\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {\n isPair = true;\n ch = state.input.charCodeAt(++state.position);\n skipSeparationSpace(state, true, nodeIndent);\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n valueNode = state.result;\n }\n\n if (isMapping) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);\n } else if (isPair) {\n _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));\n } else {\n _result.push(keyNode);\n }\n\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x2C/* , */) {\n readNext = true;\n ch = state.input.charCodeAt(++state.position);\n } else {\n readNext = false;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a flow collection');\n}\n\nfunction readBlockScalar(state, nodeIndent) {\n var captureStart,\n folding,\n chomping = CHOMPING_CLIP,\n didReadContent = false,\n detectedIndent = false,\n textIndent = nodeIndent,\n emptyLines = 0,\n atMoreIndented = false,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x7C/* | */) {\n folding = false;\n } else if (ch === 0x3E/* > */) {\n folding = true;\n } else {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n\n while (ch !== 0) {\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {\n if (CHOMPING_CLIP === chomping) {\n chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;\n } else {\n throwError(state, 'repeat of a chomping mode identifier');\n }\n\n } else if ((tmp = fromDecimalCode(ch)) >= 0) {\n if (tmp === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');\n } else if (!detectedIndent) {\n textIndent = nodeIndent + tmp - 1;\n detectedIndent = true;\n } else {\n throwError(state, 'repeat of an indentation width identifier');\n }\n\n } else {\n break;\n }\n }\n\n if (is_WHITE_SPACE(ch)) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (is_WHITE_SPACE(ch));\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (!is_EOL(ch) && (ch !== 0));\n }\n }\n\n while (ch !== 0) {\n readLineBreak(state);\n state.lineIndent = 0;\n\n ch = state.input.charCodeAt(state.position);\n\n while ((!detectedIndent || state.lineIndent < textIndent) &&\n (ch === 0x20/* Space */)) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (!detectedIndent && state.lineIndent > textIndent) {\n textIndent = state.lineIndent;\n }\n\n if (is_EOL(ch)) {\n emptyLines++;\n continue;\n }\n\n // End of the scalar.\n if (state.lineIndent < textIndent) {\n\n // Perform the chomping.\n if (chomping === CHOMPING_KEEP) {\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n } else if (chomping === CHOMPING_CLIP) {\n if (didReadContent) { // i.e. only if the scalar is not empty.\n state.result += '\\n';\n }\n }\n\n // Break this `while` cycle and go to the funciton's epilogue.\n break;\n }\n\n // Folded style: use fancy rules to handle line breaks.\n if (folding) {\n\n // Lines starting with white space characters (more-indented lines) are not folded.\n if (is_WHITE_SPACE(ch)) {\n atMoreIndented = true;\n // except for the first content line (cf. Example 8.1)\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n\n // End of more-indented block.\n } else if (atMoreIndented) {\n atMoreIndented = false;\n state.result += common.repeat('\\n', emptyLines + 1);\n\n // Just one line break - perceive as the same line.\n } else if (emptyLines === 0) {\n if (didReadContent) { // i.e. only if we have already read some scalar content.\n state.result += ' ';\n }\n\n // Several line breaks - perceive as different lines.\n } else {\n state.result += common.repeat('\\n', emptyLines);\n }\n\n // Literal style: just add exact number of line breaks between content lines.\n } else {\n // Keep all line breaks except the header line break.\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n }\n\n didReadContent = true;\n detectedIndent = true;\n emptyLines = 0;\n captureStart = state.position;\n\n while (!is_EOL(ch) && (ch !== 0)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, state.position, false);\n }\n\n return true;\n}\n\nfunction readBlockSequence(state, nodeIndent) {\n var _line,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = [],\n following,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n if (state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n\n if (ch !== 0x2D/* - */) {\n break;\n }\n\n following = state.input.charCodeAt(state.position + 1);\n\n if (!is_WS_OR_EOL(following)) {\n break;\n }\n\n detected = true;\n state.position++;\n\n if (skipSeparationSpace(state, true, -1)) {\n if (state.lineIndent <= nodeIndent) {\n _result.push(null);\n ch = state.input.charCodeAt(state.position);\n continue;\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);\n _result.push(state.result);\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a sequence entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'sequence';\n state.result = _result;\n return true;\n }\n return false;\n}\n\nfunction readBlockMapping(state, nodeIndent, flowIndent) {\n var following,\n allowCompact,\n _line,\n _keyLine,\n _keyLineStart,\n _keyPos,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = {},\n overridableKeys = Object.create(null),\n keyTag = null,\n keyNode = null,\n valueNode = null,\n atExplicitKey = false,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n if (!atExplicitKey && state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n\n following = state.input.charCodeAt(state.position + 1);\n _line = state.line; // Save the current line.\n\n //\n // Explicit notation case. There are two separate blocks:\n // first for the key (denoted by \"?\") and second for the value (denoted by \":\")\n //\n if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {\n\n if (ch === 0x3F/* ? */) {\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = true;\n allowCompact = true;\n\n } else if (atExplicitKey) {\n // i.e. 0x3A/* : */ === character after the explicit key.\n atExplicitKey = false;\n allowCompact = true;\n\n } else {\n throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');\n }\n\n state.position += 1;\n ch = following;\n\n //\n // Implicit notation case. Flow-style node as the key first, then \":\", and the value.\n //\n } else {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n\n if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n // Neither implicit nor explicit notation.\n // Reading is done. Go to the epilogue.\n break;\n }\n\n if (state.line === _line) {\n ch = state.input.charCodeAt(state.position);\n\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x3A/* : */) {\n ch = state.input.charCodeAt(++state.position);\n\n if (!is_WS_OR_EOL(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');\n }\n\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = false;\n allowCompact = false;\n keyTag = state.tag;\n keyNode = state.result;\n\n } else if (detected) {\n throwError(state, 'can not read an implicit mapping pair; a colon is missed');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n }\n\n //\n // Common reading code for both explicit and implicit notations.\n //\n if (state.line === _line || state.lineIndent > nodeIndent) {\n if (atExplicitKey) {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n }\n\n if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {\n if (atExplicitKey) {\n keyNode = state.result;\n } else {\n valueNode = state.result;\n }\n }\n\n if (!atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n }\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a mapping entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n //\n // Epilogue.\n //\n\n // Special case: last mapping's node contains only the key in explicit notation.\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n }\n\n // Expose the resulting mapping.\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'mapping';\n state.result = _result;\n }\n\n return detected;\n}\n\nfunction readTagProperty(state) {\n var _position,\n isVerbatim = false,\n isNamed = false,\n tagHandle,\n tagName,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x21/* ! */) return false;\n\n if (state.tag !== null) {\n throwError(state, 'duplication of a tag property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x3C/* < */) {\n isVerbatim = true;\n ch = state.input.charCodeAt(++state.position);\n\n } else if (ch === 0x21/* ! */) {\n isNamed = true;\n tagHandle = '!!';\n ch = state.input.charCodeAt(++state.position);\n\n } else {\n tagHandle = '!';\n }\n\n _position = state.position;\n\n if (isVerbatim) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && ch !== 0x3E/* > */);\n\n if (state.position < state.length) {\n tagName = state.input.slice(_position, state.position);\n ch = state.input.charCodeAt(++state.position);\n } else {\n throwError(state, 'unexpected end of the stream within a verbatim tag');\n }\n } else {\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n\n if (ch === 0x21/* ! */) {\n if (!isNamed) {\n tagHandle = state.input.slice(_position - 1, state.position + 1);\n\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) {\n throwError(state, 'named tag handle cannot contain such characters');\n }\n\n isNamed = true;\n _position = state.position + 1;\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks');\n }\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n tagName = state.input.slice(_position, state.position);\n\n if (PATTERN_FLOW_INDICATORS.test(tagName)) {\n throwError(state, 'tag suffix cannot contain flow indicator characters');\n }\n }\n\n if (tagName && !PATTERN_TAG_URI.test(tagName)) {\n throwError(state, 'tag name cannot contain such characters: ' + tagName);\n }\n\n try {\n tagName = decodeURIComponent(tagName);\n } catch (err) {\n throwError(state, 'tag name is malformed: ' + tagName);\n }\n\n if (isVerbatim) {\n state.tag = tagName;\n\n } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) {\n state.tag = state.tagMap[tagHandle] + tagName;\n\n } else if (tagHandle === '!') {\n state.tag = '!' + tagName;\n\n } else if (tagHandle === '!!') {\n state.tag = 'tag:yaml.org,2002:' + tagName;\n\n } else {\n throwError(state, 'undeclared tag handle \"' + tagHandle + '\"');\n }\n\n return true;\n}\n\nfunction readAnchorProperty(state) {\n var _position,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x26/* & */) return false;\n\n if (state.anchor !== null) {\n throwError(state, 'duplication of an anchor property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an anchor node must contain at least one character');\n }\n\n state.anchor = state.input.slice(_position, state.position);\n return true;\n}\n\nfunction readAlias(state) {\n var _position, alias,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x2A/* * */) return false;\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an alias node must contain at least one character');\n }\n\n alias = state.input.slice(_position, state.position);\n\n if (!_hasOwnProperty$1.call(state.anchorMap, alias)) {\n throwError(state, 'unidentified alias \"' + alias + '\"');\n }\n\n state.result = state.anchorMap[alias];\n skipSeparationSpace(state, true, -1);\n return true;\n}\n\nfunction composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {\n var allowBlockStyles,\n allowBlockScalars,\n allowBlockCollections,\n indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n }\n }\n\n if (indentStatus === 1) {\n while (readTagProperty(state) || readAnchorProperty(state)) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n allowBlockCollections = allowBlockStyles;\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n } else {\n allowBlockCollections = false;\n }\n }\n }\n\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact;\n }\n\n if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {\n if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {\n flowIndent = parentIndent;\n } else {\n flowIndent = parentIndent + 1;\n }\n\n blockIndent = state.position - state.lineStart;\n\n if (indentStatus === 1) {\n if (allowBlockCollections &&\n (readBlockSequence(state, blockIndent) ||\n readBlockMapping(state, blockIndent, flowIndent)) ||\n readFlowCollection(state, flowIndent)) {\n hasContent = true;\n } else {\n if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||\n readSingleQuotedScalar(state, flowIndent) ||\n readDoubleQuotedScalar(state, flowIndent)) {\n hasContent = true;\n\n } else if (readAlias(state)) {\n hasContent = true;\n\n if (state.tag !== null || state.anchor !== null) {\n throwError(state, 'alias node should not have any properties');\n }\n\n } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {\n hasContent = true;\n\n if (state.tag === null) {\n state.tag = '?';\n }\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else if (indentStatus === 0) {\n // Special case: block sequences are allowed to have same indentation level as the parent.\n // http://www.yaml.org/spec/1.2/spec.html#id2799784\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);\n }\n }\n\n if (state.tag === null) {\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n\n } else if (state.tag === '?') {\n // Implicit resolving is not allowed for non-scalar types, and '?'\n // non-specific tag is only automatically assigned to plain scalars.\n //\n // We only need to check kind conformity in case user explicitly assigns '?'\n // tag, for example like this: \"!> [0]\"\n //\n if (state.result !== null && state.kind !== 'scalar') {\n throwError(state, 'unacceptable node kind for !> tag; it should be \"scalar\", not \"' + state.kind + '\"');\n }\n\n for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {\n type = state.implicitTypes[typeIndex];\n\n if (type.resolve(state.result)) { // `state.result` updated in resolver if matched\n state.result = type.construct(state.result);\n state.tag = type.tag;\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n break;\n }\n }\n } else if (state.tag !== '!') {\n if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) {\n type = state.typeMap[state.kind || 'fallback'][state.tag];\n } else {\n // looking for multi type\n type = null;\n typeList = state.typeMap.multi[state.kind || 'fallback'];\n\n for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {\n if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {\n type = typeList[typeIndex];\n break;\n }\n }\n }\n\n if (!type) {\n throwError(state, 'unknown tag !<' + state.tag + '>');\n }\n\n if (state.result !== null && type.kind !== state.kind) {\n throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be \"' + type.kind + '\", not \"' + state.kind + '\"');\n }\n\n if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched\n throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');\n } else {\n state.result = type.construct(state.result, state.tag);\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n }\n\n if (state.listener !== null) {\n state.listener('close', state);\n }\n return state.tag !== null || state.anchor !== null || hasContent;\n}\n\nfunction readDocument(state) {\n var documentStart = state.position,\n _position,\n directiveName,\n directiveArgs,\n hasDirectives = false,\n ch;\n\n state.version = null;\n state.checkLineBreaks = state.legacy;\n state.tagMap = Object.create(null);\n state.anchorMap = Object.create(null);\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if (state.lineIndent > 0 || ch !== 0x25/* % */) {\n break;\n }\n\n hasDirectives = true;\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveName = state.input.slice(_position, state.position);\n directiveArgs = [];\n\n if (directiveName.length < 1) {\n throwError(state, 'directive name must not be less than one character in length');\n }\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && !is_EOL(ch));\n break;\n }\n\n if (is_EOL(ch)) break;\n\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveArgs.push(state.input.slice(_position, state.position));\n }\n\n if (ch !== 0) readLineBreak(state);\n\n if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) {\n directiveHandlers[directiveName](state, directiveName, directiveArgs);\n } else {\n throwWarning(state, 'unknown document directive \"' + directiveName + '\"');\n }\n }\n\n skipSeparationSpace(state, true, -1);\n\n if (state.lineIndent === 0 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected');\n }\n\n composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);\n skipSeparationSpace(state, true, -1);\n\n if (state.checkLineBreaks &&\n PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {\n throwWarning(state, 'non-ASCII line breaks are interpreted as content');\n }\n\n state.documents.push(state.result);\n\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n\n if (state.input.charCodeAt(state.position) === 0x2E/* . */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n }\n return;\n }\n\n if (state.position < (state.length - 1)) {\n throwError(state, 'end of the stream or a document separator is expected');\n } else {\n return;\n }\n}\n\n\nfunction loadDocuments(input, options) {\n input = String(input);\n options = options || {};\n\n if (input.length !== 0) {\n\n // Add tailing `\\n` if not exists\n if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&\n input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {\n input += '\\n';\n }\n\n // Strip BOM\n if (input.charCodeAt(0) === 0xFEFF) {\n input = input.slice(1);\n }\n }\n\n var state = new State$1(input, options);\n\n var nullpos = input.indexOf('\\0');\n\n if (nullpos !== -1) {\n state.position = nullpos;\n throwError(state, 'null byte is not allowed in input');\n }\n\n // Use 0 as string terminator. That significantly simplifies bounds check.\n state.input += '\\0';\n\n while (state.input.charCodeAt(state.position) === 0x20/* Space */) {\n state.lineIndent += 1;\n state.position += 1;\n }\n\n while (state.position < (state.length - 1)) {\n readDocument(state);\n }\n\n return state.documents;\n}\n\n\nfunction loadAll$1(input, iterator, options) {\n if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') {\n options = iterator;\n iterator = null;\n }\n\n var documents = loadDocuments(input, options);\n\n if (typeof iterator !== 'function') {\n return documents;\n }\n\n for (var index = 0, length = documents.length; index < length; index += 1) {\n iterator(documents[index]);\n }\n}\n\n\nfunction load$1(input, options) {\n var documents = loadDocuments(input, options);\n\n if (documents.length === 0) {\n /*eslint-disable no-undefined*/\n return undefined;\n } else if (documents.length === 1) {\n return documents[0];\n }\n throw new exception('expected a single document in the stream, but found more');\n}\n\n\nvar loadAll_1 = loadAll$1;\nvar load_1 = load$1;\n\nvar loader = {\n\tloadAll: loadAll_1,\n\tload: load_1\n};\n\n/*eslint-disable no-use-before-define*/\n\n\n\n\n\nvar _toString = Object.prototype.toString;\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar CHAR_BOM = 0xFEFF;\nvar CHAR_TAB = 0x09; /* Tab */\nvar CHAR_LINE_FEED = 0x0A; /* LF */\nvar CHAR_CARRIAGE_RETURN = 0x0D; /* CR */\nvar CHAR_SPACE = 0x20; /* Space */\nvar CHAR_EXCLAMATION = 0x21; /* ! */\nvar CHAR_DOUBLE_QUOTE = 0x22; /* \" */\nvar CHAR_SHARP = 0x23; /* # */\nvar CHAR_PERCENT = 0x25; /* % */\nvar CHAR_AMPERSAND = 0x26; /* & */\nvar CHAR_SINGLE_QUOTE = 0x27; /* ' */\nvar CHAR_ASTERISK = 0x2A; /* * */\nvar CHAR_COMMA = 0x2C; /* , */\nvar CHAR_MINUS = 0x2D; /* - */\nvar CHAR_COLON = 0x3A; /* : */\nvar CHAR_EQUALS = 0x3D; /* = */\nvar CHAR_GREATER_THAN = 0x3E; /* > */\nvar CHAR_QUESTION = 0x3F; /* ? */\nvar CHAR_COMMERCIAL_AT = 0x40; /* @ */\nvar CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */\nvar CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */\nvar CHAR_GRAVE_ACCENT = 0x60; /* ` */\nvar CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */\nvar CHAR_VERTICAL_LINE = 0x7C; /* | */\nvar CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */\n\nvar ESCAPE_SEQUENCES = {};\n\nESCAPE_SEQUENCES[0x00] = '\\\\0';\nESCAPE_SEQUENCES[0x07] = '\\\\a';\nESCAPE_SEQUENCES[0x08] = '\\\\b';\nESCAPE_SEQUENCES[0x09] = '\\\\t';\nESCAPE_SEQUENCES[0x0A] = '\\\\n';\nESCAPE_SEQUENCES[0x0B] = '\\\\v';\nESCAPE_SEQUENCES[0x0C] = '\\\\f';\nESCAPE_SEQUENCES[0x0D] = '\\\\r';\nESCAPE_SEQUENCES[0x1B] = '\\\\e';\nESCAPE_SEQUENCES[0x22] = '\\\\\"';\nESCAPE_SEQUENCES[0x5C] = '\\\\\\\\';\nESCAPE_SEQUENCES[0x85] = '\\\\N';\nESCAPE_SEQUENCES[0xA0] = '\\\\_';\nESCAPE_SEQUENCES[0x2028] = '\\\\L';\nESCAPE_SEQUENCES[0x2029] = '\\\\P';\n\nvar DEPRECATED_BOOLEANS_SYNTAX = [\n 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',\n 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'\n];\n\nvar DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;\n\nfunction compileStyleMap(schema, map) {\n var result, keys, index, length, tag, style, type;\n\n if (map === null) return {};\n\n result = {};\n keys = Object.keys(map);\n\n for (index = 0, length = keys.length; index < length; index += 1) {\n tag = keys[index];\n style = String(map[tag]);\n\n if (tag.slice(0, 2) === '!!') {\n tag = 'tag:yaml.org,2002:' + tag.slice(2);\n }\n type = schema.compiledTypeMap['fallback'][tag];\n\n if (type && _hasOwnProperty.call(type.styleAliases, style)) {\n style = type.styleAliases[style];\n }\n\n result[tag] = style;\n }\n\n return result;\n}\n\nfunction encodeHex(character) {\n var string, handle, length;\n\n string = character.toString(16).toUpperCase();\n\n if (character <= 0xFF) {\n handle = 'x';\n length = 2;\n } else if (character <= 0xFFFF) {\n handle = 'u';\n length = 4;\n } else if (character <= 0xFFFFFFFF) {\n handle = 'U';\n length = 8;\n } else {\n throw new exception('code point within a string may not be greater than 0xFFFFFFFF');\n }\n\n return '\\\\' + handle + common.repeat('0', length - string.length) + string;\n}\n\n\nvar QUOTING_TYPE_SINGLE = 1,\n QUOTING_TYPE_DOUBLE = 2;\n\nfunction State(options) {\n this.schema = options['schema'] || _default;\n this.indent = Math.max(1, (options['indent'] || 2));\n this.noArrayIndent = options['noArrayIndent'] || false;\n this.skipInvalid = options['skipInvalid'] || false;\n this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);\n this.styleMap = compileStyleMap(this.schema, options['styles'] || null);\n this.sortKeys = options['sortKeys'] || false;\n this.lineWidth = options['lineWidth'] || 80;\n this.noRefs = options['noRefs'] || false;\n this.noCompatMode = options['noCompatMode'] || false;\n this.condenseFlow = options['condenseFlow'] || false;\n this.quotingType = options['quotingType'] === '\"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;\n this.forceQuotes = options['forceQuotes'] || false;\n this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.explicitTypes = this.schema.compiledExplicit;\n\n this.tag = null;\n this.result = '';\n\n this.duplicates = [];\n this.usedDuplicates = null;\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString(string, spaces) {\n var ind = common.repeat(' ', spaces),\n position = 0,\n next = -1,\n result = '',\n line,\n length = string.length;\n\n while (position < length) {\n next = string.indexOf('\\n', position);\n if (next === -1) {\n line = string.slice(position);\n position = length;\n } else {\n line = string.slice(position, next + 1);\n position = next + 1;\n }\n\n if (line.length && line !== '\\n') result += ind;\n\n result += line;\n }\n\n return result;\n}\n\nfunction generateNextLine(state, level) {\n return '\\n' + common.repeat(' ', state.indent * level);\n}\n\nfunction testImplicitResolving(state, str) {\n var index, length, type;\n\n for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {\n type = state.implicitTypes[index];\n\n if (type.resolve(str)) {\n return true;\n }\n }\n\n return false;\n}\n\n// [33] s-white ::= s-space | s-tab\nfunction isWhitespace(c) {\n return c === CHAR_SPACE || c === CHAR_TAB;\n}\n\n// Returns true if the character can be printed without escaping.\n// From YAML 1.2: \"any allowed characters known to be non-printable\n// should also be escaped. [However,] This isn’t mandatory\"\n// Derived from nb-char - \\t - #x85 - #xA0 - #x2028 - #x2029.\nfunction isPrintable(c) {\n return (0x00020 <= c && c <= 0x00007E)\n || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)\n || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM)\n || (0x10000 <= c && c <= 0x10FFFF);\n}\n\n// [34] ns-char ::= nb-char - s-white\n// [27] nb-char ::= c-printable - b-char - c-byte-order-mark\n// [26] b-char ::= b-line-feed | b-carriage-return\n// Including s-white (for some reason, examples doesn't match specs in this aspect)\n// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark\nfunction isNsCharOrWhitespace(c) {\n return isPrintable(c)\n && c !== CHAR_BOM\n // - b-char\n && c !== CHAR_CARRIAGE_RETURN\n && c !== CHAR_LINE_FEED;\n}\n\n// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out\n// c = flow-in ⇒ ns-plain-safe-in\n// c = block-key ⇒ ns-plain-safe-out\n// c = flow-key ⇒ ns-plain-safe-in\n// [128] ns-plain-safe-out ::= ns-char\n// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator\n// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” )\n// | ( /* An ns-char preceding */ “#” )\n// | ( “:” /* Followed by an ns-plain-safe(c) */ )\nfunction isPlainSafe(c, prev, inblock) {\n var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);\n var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);\n return (\n // ns-plain-safe\n inblock ? // c = flow-in\n cIsNsCharOrWhitespace\n : cIsNsCharOrWhitespace\n // - c-flow-indicator\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n )\n // ns-plain-char\n && c !== CHAR_SHARP // false on '#'\n && !(prev === CHAR_COLON && !cIsNsChar) // false on ': '\n || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#'\n || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]'\n}\n\n// Simplified test for values allowed as the first character in plain style.\nfunction isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part\n return isPrintable(c) && c !== CHAR_BOM\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}\n\n// Simplified test for values allowed as the last character in plain style.\nfunction isPlainSafeLast(c) {\n // just not whitespace or colon, it will be checked to be plain character later\n return !isWhitespace(c) && c !== CHAR_COLON;\n}\n\n// Same as 'string'.codePointAt(pos), but works in older browsers.\nfunction codePointAt(string, pos) {\n var first = string.charCodeAt(pos), second;\n if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) {\n second = string.charCodeAt(pos + 1);\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n }\n }\n return first;\n}\n\n// Determines whether block indentation indicator is required.\nfunction needIndentIndicator(string) {\n var leadingSpaceRe = /^\\n* /;\n return leadingSpaceRe.test(string);\n}\n\nvar STYLE_PLAIN = 1,\n STYLE_SINGLE = 2,\n STYLE_LITERAL = 3,\n STYLE_FOLDED = 4,\n STYLE_DOUBLE = 5;\n\n// Determines which scalar styles are possible and returns the preferred style.\n// lineWidth = -1 => no limit.\n// Pre-conditions: str.length > 0.\n// Post-conditions:\n// STYLE_PLAIN or STYLE_SINGLE => no \\n are in the string.\n// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).\n// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).\nfunction chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth,\n testAmbiguousType, quotingType, forceQuotes, inblock) {\n\n var i;\n var char = 0;\n var prevChar = null;\n var hasLineBreak = false;\n var hasFoldableLine = false; // only checked if shouldTrackWidth\n var shouldTrackWidth = lineWidth !== -1;\n var previousLineBreak = -1; // count the first line correctly\n var plain = isPlainSafeFirst(codePointAt(string, 0))\n && isPlainSafeLast(codePointAt(string, string.length - 1));\n\n if (singleLineOnly || forceQuotes) {\n // Case: no block styles.\n // Check for disallowed characters to rule out plain and single.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n } else {\n // Case: block styles permitted.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (char === CHAR_LINE_FEED) {\n hasLineBreak = true;\n // Check if any line can be folded.\n if (shouldTrackWidth) {\n hasFoldableLine = hasFoldableLine ||\n // Foldable line = too long, and not more-indented.\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' ');\n previousLineBreak = i;\n }\n } else if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n // in case the end is missing a \\n\n hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' '));\n }\n // Although every style can represent \\n without escaping, prefer block styles\n // for multiline, since they're more readable and they don't add empty lines.\n // Also prefer folding a super-long line.\n if (!hasLineBreak && !hasFoldableLine) {\n // Strings interpretable as another type have to be quoted;\n // e.g. the string 'true' vs. the boolean true.\n if (plain && !forceQuotes && !testAmbiguousType(string)) {\n return STYLE_PLAIN;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n }\n // Edge case: block indentation indicator can only have one digit.\n if (indentPerLevel > 9 && needIndentIndicator(string)) {\n return STYLE_DOUBLE;\n }\n // At this point we know block styles are valid.\n // Prefer literal style unless we want to fold.\n if (!forceQuotes) {\n return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n}\n\n// Note: line breaking/folding is implemented for only the folded style.\n// NB. We drop the last trailing newline (if any) of a returned block scalar\n// since the dumper adds its own newline. This always works:\n// • No ending newline => unaffected; already using strip \"-\" chomping.\n// • Ending newline => removed then restored.\n// Importantly, this keeps the \"+\" chomp indicator from gaining an extra line.\nfunction writeScalar(state, string, level, iskey, inblock) {\n state.dump = (function () {\n if (string.length === 0) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? '\"\"' : \"''\";\n }\n if (!state.noCompatMode) {\n if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? ('\"' + string + '\"') : (\"'\" + string + \"'\");\n }\n }\n\n var indent = state.indent * Math.max(1, level); // no 0-indent scalars\n // As indentation gets deeper, let the width decrease monotonically\n // to the lower bound min(state.lineWidth, 40).\n // Note that this implies\n // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.\n // state.lineWidth > 40 + state.indent: width decreases until the lower bound.\n // This behaves better than a constant minimum width which disallows narrower options,\n // or an indent threshold which causes the width to suddenly increase.\n var lineWidth = state.lineWidth === -1\n ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);\n\n // Without knowing if keys are implicit/explicit, assume implicit for safety.\n var singleLineOnly = iskey\n // No block styles in flow mode.\n || (state.flowLevel > -1 && level >= state.flowLevel);\n function testAmbiguity(string) {\n return testImplicitResolving(state, string);\n }\n\n switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth,\n testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) {\n\n case STYLE_PLAIN:\n return string;\n case STYLE_SINGLE:\n return \"'\" + string.replace(/'/g, \"''\") + \"'\";\n case STYLE_LITERAL:\n return '|' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(string, indent));\n case STYLE_FOLDED:\n return '>' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(foldString(string, lineWidth), indent));\n case STYLE_DOUBLE:\n return '\"' + escapeString(string) + '\"';\n default:\n throw new exception('impossible error: invalid scalar style');\n }\n }());\n}\n\n// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.\nfunction blockHeader(string, indentPerLevel) {\n var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';\n\n // note the special case: the string '\\n' counts as a \"trailing\" empty line.\n var clip = string[string.length - 1] === '\\n';\n var keep = clip && (string[string.length - 2] === '\\n' || string === '\\n');\n var chomp = keep ? '+' : (clip ? '' : '-');\n\n return indentIndicator + chomp + '\\n';\n}\n\n// (See the note for writeScalar.)\nfunction dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}\n\n// Note: a long line without a suitable break point will exceed the width limit.\n// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.\nfunction foldString(string, width) {\n // In folded style, $k$ consecutive newlines output as $k+1$ newlines—\n // unless they're before or after a more-indented line, or at the very\n // beginning or end, in which case $k$ maps to $k$.\n // Therefore, parse each chunk as newline(s) followed by a content line.\n var lineRe = /(\\n+)([^\\n]*)/g;\n\n // first line (possibly an empty line)\n var result = (function () {\n var nextLF = string.indexOf('\\n');\n nextLF = nextLF !== -1 ? nextLF : string.length;\n lineRe.lastIndex = nextLF;\n return foldLine(string.slice(0, nextLF), width);\n }());\n // If we haven't reached the first content line yet, don't add an extra \\n.\n var prevMoreIndented = string[0] === '\\n' || string[0] === ' ';\n var moreIndented;\n\n // rest of the lines\n var match;\n while ((match = lineRe.exec(string))) {\n var prefix = match[1], line = match[2];\n moreIndented = (line[0] === ' ');\n result += prefix\n + (!prevMoreIndented && !moreIndented && line !== ''\n ? '\\n' : '')\n + foldLine(line, width);\n prevMoreIndented = moreIndented;\n }\n\n return result;\n}\n\n// Greedy line breaking.\n// Picks the longest line under the limit each time,\n// otherwise settles for the shortest line over the limit.\n// NB. More-indented lines *cannot* be folded, as that would add an extra \\n.\nfunction foldLine(line, width) {\n if (line === '' || line[0] === ' ') return line;\n\n // Since a more-indented line adds a \\n, breaks can't be followed by a space.\n var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.\n var match;\n // start is an inclusive index. end, curr, and next are exclusive.\n var start = 0, end, curr = 0, next = 0;\n var result = '';\n\n // Invariants: 0 <= start <= length-1.\n // 0 <= curr <= next <= max(0, length-2). curr - start <= width.\n // Inside the loop:\n // A match implies length >= 2, so curr and next are <= length-2.\n while ((match = breakRe.exec(line))) {\n next = match.index;\n // maintain invariant: curr - start <= width\n if (next - start > width) {\n end = (curr > start) ? curr : next; // derive end <= length-2\n result += '\\n' + line.slice(start, end);\n // skip the space that was output as \\n\n start = end + 1; // derive start <= length-1\n }\n curr = next;\n }\n\n // By the invariants, start <= length-1, so there is something left over.\n // It is either the whole string or a part starting from non-whitespace.\n result += '\\n';\n // Insert a break if the remainder is too long and there is a break available.\n if (line.length - start > width && curr > start) {\n result += line.slice(start, curr) + '\\n' + line.slice(curr + 1);\n } else {\n result += line.slice(start);\n }\n\n return result.slice(1); // drop extra \\n joiner\n}\n\n// Escapes a double-quoted string.\nfunction escapeString(string) {\n var result = '';\n var char = 0;\n var escapeSeq;\n\n for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n escapeSeq = ESCAPE_SEQUENCES[char];\n\n if (!escapeSeq && isPrintable(char)) {\n result += string[i];\n if (char >= 0x10000) result += string[i + 1];\n } else {\n result += escapeSeq || encodeHex(char);\n }\n }\n\n return result;\n}\n\nfunction writeFlowSequence(state, level, object) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level, value, false, false) ||\n (typeof value === 'undefined' &&\n writeNode(state, level, null, false, false))) {\n\n if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '');\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = '[' + _result + ']';\n}\n\nfunction writeBlockSequence(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level + 1, value, true, true, false, true) ||\n (typeof value === 'undefined' &&\n writeNode(state, level + 1, null, true, true, false, true))) {\n\n if (!compact || _result !== '') {\n _result += generateNextLine(state, level);\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n _result += '-';\n } else {\n _result += '- ';\n }\n\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = _result || '[]'; // Empty sequence if no valid values.\n}\n\nfunction writeFlowMapping(state, level, object) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n pairBuffer;\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n\n pairBuffer = '';\n if (_result !== '') pairBuffer += ', ';\n\n if (state.condenseFlow) pairBuffer += '\"';\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n\n if (!writeNode(state, level, objectKey, false, false)) {\n continue; // Skip this pair because of invalid key;\n }\n\n if (state.dump.length > 1024) pairBuffer += '? ';\n\n pairBuffer += state.dump + (state.condenseFlow ? '\"' : '') + ':' + (state.condenseFlow ? '' : ' ');\n\n if (!writeNode(state, level, objectValue, false, false)) {\n continue; // Skip this pair because of invalid value.\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = '{' + _result + '}';\n}\n\nfunction writeBlockMapping(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n explicitPair,\n pairBuffer;\n\n // Allow sorting keys so that the output file is deterministic\n if (state.sortKeys === true) {\n // Default sorting\n objectKeyList.sort();\n } else if (typeof state.sortKeys === 'function') {\n // Custom sort function\n objectKeyList.sort(state.sortKeys);\n } else if (state.sortKeys) {\n // Something is wrong\n throw new exception('sortKeys must be a boolean or a function');\n }\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n\n if (!compact || _result !== '') {\n pairBuffer += generateNextLine(state, level);\n }\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n\n if (!writeNode(state, level + 1, objectKey, true, true, true)) {\n continue; // Skip this pair because of invalid key.\n }\n\n explicitPair = (state.tag !== null && state.tag !== '?') ||\n (state.dump && state.dump.length > 1024);\n\n if (explicitPair) {\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += '?';\n } else {\n pairBuffer += '? ';\n }\n }\n\n pairBuffer += state.dump;\n\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level);\n }\n\n if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {\n continue; // Skip this pair because of invalid value.\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += ':';\n } else {\n pairBuffer += ': ';\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = _result || '{}'; // Empty mapping if no valid pairs.\n}\n\nfunction detectType(state, object, explicit) {\n var _result, typeList, index, length, type, style;\n\n typeList = explicit ? state.explicitTypes : state.implicitTypes;\n\n for (index = 0, length = typeList.length; index < length; index += 1) {\n type = typeList[index];\n\n if ((type.instanceOf || type.predicate) &&\n (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&\n (!type.predicate || type.predicate(object))) {\n\n if (explicit) {\n if (type.multi && type.representName) {\n state.tag = type.representName(object);\n } else {\n state.tag = type.tag;\n }\n } else {\n state.tag = '?';\n }\n\n if (type.represent) {\n style = state.styleMap[type.tag] || type.defaultStyle;\n\n if (_toString.call(type.represent) === '[object Function]') {\n _result = type.represent(object, style);\n } else if (_hasOwnProperty.call(type.represent, style)) {\n _result = type.represent[style](object, style);\n } else {\n throw new exception('!<' + type.tag + '> tag resolver accepts not \"' + style + '\" style');\n }\n\n state.dump = _result;\n }\n\n return true;\n }\n }\n\n return false;\n}\n\n// Serializes `object` and writes it to global `result`.\n// Returns true on success, or false on invalid object.\n//\nfunction writeNode(state, level, object, block, compact, iskey, isblockseq) {\n state.tag = null;\n state.dump = object;\n\n if (!detectType(state, object, false)) {\n detectType(state, object, true);\n }\n\n var type = _toString.call(state.dump);\n var inblock = block;\n var tagStr;\n\n if (block) {\n block = (state.flowLevel < 0 || state.flowLevel > level);\n }\n\n var objectOrArray = type === '[object Object]' || type === '[object Array]',\n duplicateIndex,\n duplicate;\n\n if (objectOrArray) {\n duplicateIndex = state.duplicates.indexOf(object);\n duplicate = duplicateIndex !== -1;\n }\n\n if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {\n compact = false;\n }\n\n if (duplicate && state.usedDuplicates[duplicateIndex]) {\n state.dump = '*ref_' + duplicateIndex;\n } else {\n if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {\n state.usedDuplicates[duplicateIndex] = true;\n }\n if (type === '[object Object]') {\n if (block && (Object.keys(state.dump).length !== 0)) {\n writeBlockMapping(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowMapping(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object Array]') {\n if (block && (state.dump.length !== 0)) {\n if (state.noArrayIndent && !isblockseq && level > 0) {\n writeBlockSequence(state, level - 1, state.dump, compact);\n } else {\n writeBlockSequence(state, level, state.dump, compact);\n }\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowSequence(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object String]') {\n if (state.tag !== '?') {\n writeScalar(state, state.dump, level, iskey, inblock);\n }\n } else if (type === '[object Undefined]') {\n return false;\n } else {\n if (state.skipInvalid) return false;\n throw new exception('unacceptable kind of an object to dump ' + type);\n }\n\n if (state.tag !== null && state.tag !== '?') {\n // Need to encode all characters except those allowed by the spec:\n //\n // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */\n // [36] ns-hex-digit ::= ns-dec-digit\n // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */\n // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */\n // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-”\n // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#”\n // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,”\n // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]”\n //\n // Also need to encode '!' because it has special meaning (end of tag prefix).\n //\n tagStr = encodeURI(\n state.tag[0] === '!' ? state.tag.slice(1) : state.tag\n ).replace(/!/g, '%21');\n\n if (state.tag[0] === '!') {\n tagStr = '!' + tagStr;\n } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') {\n tagStr = '!!' + tagStr.slice(18);\n } else {\n tagStr = '!<' + tagStr + '>';\n }\n\n state.dump = tagStr + ' ' + state.dump;\n }\n }\n\n return true;\n}\n\nfunction getDuplicateReferences(object, state) {\n var objects = [],\n duplicatesIndexes = [],\n index,\n length;\n\n inspectNode(object, objects, duplicatesIndexes);\n\n for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {\n state.duplicates.push(objects[duplicatesIndexes[index]]);\n }\n state.usedDuplicates = new Array(length);\n}\n\nfunction inspectNode(object, objects, duplicatesIndexes) {\n var objectKeyList,\n index,\n length;\n\n if (object !== null && typeof object === 'object') {\n index = objects.indexOf(object);\n if (index !== -1) {\n if (duplicatesIndexes.indexOf(index) === -1) {\n duplicatesIndexes.push(index);\n }\n } else {\n objects.push(object);\n\n if (Array.isArray(object)) {\n for (index = 0, length = object.length; index < length; index += 1) {\n inspectNode(object[index], objects, duplicatesIndexes);\n }\n } else {\n objectKeyList = Object.keys(object);\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);\n }\n }\n }\n }\n}\n\nfunction dump$1(input, options) {\n options = options || {};\n\n var state = new State(options);\n\n if (!state.noRefs) getDuplicateReferences(input, state);\n\n var value = input;\n\n if (state.replacer) {\n value = state.replacer.call({ '': value }, '', value);\n }\n\n if (writeNode(state, 0, value, true, true)) return state.dump + '\\n';\n\n return '';\n}\n\nvar dump_1 = dump$1;\n\nvar dumper = {\n\tdump: dump_1\n};\n\nfunction renamed(from, to) {\n return function () {\n throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' +\n 'Use yaml.' + to + ' instead, which is now safe by default.');\n };\n}\n\n\nvar Type = type;\nvar Schema = schema;\nvar FAILSAFE_SCHEMA = failsafe;\nvar JSON_SCHEMA = json;\nvar CORE_SCHEMA = core;\nvar DEFAULT_SCHEMA = _default;\nvar load = loader.load;\nvar loadAll = loader.loadAll;\nvar dump = dumper.dump;\nvar YAMLException = exception;\n\n// Re-export all types in case user wants to create custom schema\nvar types = {\n binary: binary,\n float: float,\n map: map,\n null: _null,\n pairs: pairs,\n set: set,\n timestamp: timestamp,\n bool: bool,\n int: int,\n merge: merge,\n omap: omap,\n seq: seq,\n str: str\n};\n\n// Removed functions from JS-YAML 3.0.x\nvar safeLoad = renamed('safeLoad', 'load');\nvar safeLoadAll = renamed('safeLoadAll', 'loadAll');\nvar safeDump = renamed('safeDump', 'dump');\n\nvar jsYaml = {\n\tType: Type,\n\tSchema: Schema,\n\tFAILSAFE_SCHEMA: FAILSAFE_SCHEMA,\n\tJSON_SCHEMA: JSON_SCHEMA,\n\tCORE_SCHEMA: CORE_SCHEMA,\n\tDEFAULT_SCHEMA: DEFAULT_SCHEMA,\n\tload: load,\n\tloadAll: loadAll,\n\tdump: dump,\n\tYAMLException: YAMLException,\n\ttypes: types,\n\tsafeLoad: safeLoad,\n\tsafeLoadAll: safeLoadAll,\n\tsafeDump: safeDump\n};\n\nexport default jsYaml;\nexport { CORE_SCHEMA, DEFAULT_SCHEMA, FAILSAFE_SCHEMA, JSON_SCHEMA, Schema, Type, YAMLException, dump, load, loadAll, safeDump, safeLoad, safeLoadAll, types };\n","import yaml from 'js-yaml';\nimport { eventInterface } from './swift-calendar/types';\n\nexport const yamlToJsDataFromWeb = async (fileUrl: string = '') => {\n if (fileUrl === '') {\n return;\n }\n\n const response = await fetch(fileUrl);\n\n if (response.status === 200) {\n const blob = await response.blob();\n const text = await blob.text();\n const jsData: eventInterface[]|{} = yaml.load(text);\n\n if (Array.isArray(jsData)) {\n return jsData;\n }\n }\n}\n","@import '../../utils/style/base';\n@import './variables';\n@import './style';\n","import { Component, Prop, h, State, Fragment, getAssetPath } from '@stencil/core';\nimport { Calendar } from '../../utils/swift-calendar/';\nimport { dateInterface, Direction, eventInterface } from '../../utils/swift-calendar/types';\nimport { days, months } from '../../utils/swift-calendar/constants';\nimport { yamlToJsDataFromWeb } from '../../utils';\n\n@Component({\n tag: 'swift-calendar',\n styleUrl: 'swift-calendar.scss',\n scoped: true,\n})\nexport class SwiftCalendar {\n @Prop()\n theme?: string = 'auto';\n @Prop()\n jsData?: string;\n @Prop()\n pathDataFile?: string;\n @Prop()\n pathIcalFile?: string;\n\n @State()\n todayDate = Calendar.getToday();\n @State()\n daysInMonth: number[];\n @State()\n selectedDate: dateInterface|null;\n @State()\n isModalOpen = false;\n @State()\n modalData: eventInterface;\n @State()\n events: eventInterface[] = [];\n @State()\n isEventsView = false;\n\n readonly today: dateInterface;\n\n constructor() {\n this.today = Calendar.getToday();\n this.switchMonth = this.switchMonth.bind(this);\n this.onDayClick = this.onDayClick.bind(this);\n this.switchView = this.switchView.bind(this);\n }\n\n async componentWillLoad(): Promise {\n let doc: eventInterface[];\n\n if (this.jsData) {\n doc = JSON.parse(this.jsData);\n } else if (this.pathDataFile) {\n doc = await yamlToJsDataFromWeb(this.pathDataFile);\n }\n\n if (doc && doc.length > 0) {\n this.events = doc;\n }\n\n this.setupCalendar();\n }\n\n setupCalendar(): void {\n const date = this.todayDate;\n const calendar = new Calendar(date.year, date.month);\n\n this.daysInMonth = calendar.getCalendarDays();\n }\n\n daySelectedHandler = (day: any): void => {\n this.selectedDate = {\n date: `${this.todayDate.year}-${this.todayDate.month}-${day}`,\n month: this.todayDate.month,\n day,\n year: this.todayDate.year\n };\n }\n\n openDayDetails = (day: any): void => {\n const events = this.getEvents(day);\n\n this.modalData = {...this.modalData, ...events};\n this.isModalOpen = true;\n }\n\n closeDayDetails = (): any => {\n this.isModalOpen = false;\n this.selectedDate = null;\n }\n\n switchMonth(event: Event): void {\n const target = event.currentTarget as HTMLButtonElement;\n const nextOrPrev: Direction = target.getAttribute('data-direction') === '1'\n ? Direction.Previous\n : Direction.Next\n\n if (nextOrPrev === Direction.Previous) {\n if (this.todayDate.month !== 1) {\n this.todayDate.month -= 1;\n } else {\n this.todayDate.month = 12;\n this.todayDate.year -= 1;\n }\n } else {\n if (this.todayDate.month !== 12) {\n this.todayDate.month += 1;\n } else {\n this.todayDate.month = 1;\n this.todayDate.year += 1;\n }\n }\n\n delete this.todayDate.day;\n this.setupCalendar();\n }\n\n switchView(event: Event): void {\n const target = event.currentTarget as HTMLInputElement;\n\n this.isEventsView = target.checked;\n }\n\n getEvents = (day: number): eventInterface => {\n\n return this.events.find(event => {\n const dateArray: string[] = event.date.split('-');\n\n return parseInt(dateArray[1]) === this.todayDate.month && parseInt(dateArray[2]) === day && parseInt(dateArray[0]) === this.todayDate.year\n });\n }\n\n hasEvents = (day: number): boolean => {\n const events = this.getEvents(day);\n\n return events?.entries?.length > 0;\n }\n\n getDayClasses = (month: number, day: number, year: number): string => {\n const dayClasses = [];\n\n if (this.isToday(month, day, year)) {\n dayClasses.push('active');\n }\n\n if (this.isSelectedDay(day)) {\n dayClasses.push('selected');\n }\n\n if (this.hasEvents(day)) {\n dayClasses.push('has-events');\n }\n\n return dayClasses.join(' ');\n }\n\n isToday(month: number, day: number, year: number): boolean {\n const { today } = this;\n\n return today.month === month && today.day === day && today.year === year\n }\n\n isSelectedDay(day: number): boolean {\n const { selectedDate, todayDate } = this;\n\n return (selectedDate && Object.keys(selectedDate).length > 0)\n && selectedDate.month === todayDate.month\n && selectedDate.day === day\n && selectedDate.year === todayDate.year\n }\n\n onDayClick(event: Event): void {\n const target = event.currentTarget as HTMLButtonElement;\n\n if (target.classList.contains('day-details') || target.firstElementChild.classList.contains('has-events')) {\n const day = +target.getAttribute('data-day');\n\n this.daySelectedHandler(day);\n this.openDayDetails(day);\n }\n }\n\n getMenu(date: dateInterface, theme: string): Element {\n return (\n \n \n \n \n {months[date.month - 1]} {date.year}\n \n \n \n \n )\n }\n\n getActions(): Element {\n return (\n \n \n \n Events view\n \n \n )\n }\n\n getDays(): Element {\n return (\n \n {days.map(dayName => {dayName})}\n \n )\n }\n\n getDayCells(date: dateInterface): Element {\n return (\n \n {this.daysInMonth.map(day => {\n if (day === 0) {\n return (\n \n );\n }\n\n return (\n \n \n {day}\n \n \n );\n })}\n \n )\n }\n\n getShortEventList(day: number): Element {\n return (\n \n {this.getEvents(day).entries.map(event =>\n \n {event.name}\n \n )}\n \n )\n }\n\n getDayWithEventsList(date: dateInterface): Element {\n return (\n \n {this.daysInMonth.map(day => {\n if (day !== 0 && this.hasEvents(day)) {\n return (\n \n \n {`${date.month}/${day}/${date.year}`}\n \n \n {this.getShortEventList(day)}\n \n \n )\n }\n })}\n \n )\n }\n\n getModalContent(): Element {\n const { date, entries } = this.modalData;\n const dateArray = date.split('-');\n\n return (\n \n \n {dateArray[1]}/{dateArray[2]}/{dateArray[0]}\n {this.pathIcalFile &&\n \n (download iCal)\n \n }\n \n {entries.map(entry =>\n \n \n \n {entry.name}\n {entry.description}\n \n \n {entry.location}\n {entry.url}\n \n \n \n )}\n \n )\n }\n\n render(): Element {\n const theme = this.theme === 'auto' ? 'light' : this.theme;\n\n return (\n \n \n {this.isModalOpen\n ? this.getModalContent()\n : null\n }\n \n\n {this.getMenu(this.todayDate, theme)}\n {this.getActions()}\n\n {this.isEventsView\n ?\n \n {this.getDayWithEventsList(this.todayDate)}\n \n :\n \n {this.getDays()}\n {this.getDayCells(this.todayDate)}\n \n }\n \n );\n }\n}\n","@import '../../utils/style/base';\n@import './style';\n","import { Component, Prop, getAssetPath, h } from '@stencil/core';\n\n@Component({\n tag: 'swift-modal',\n styleUrl: 'swift-modal.scss',\n scoped: true,\n assetsDirs: ['assets'],\n})\nexport class SwiftModal {\n @Prop()\n theme?: string = 'auto';\n @Prop({\n mutable: true,\n reflect: true,\n })\n show = false;\n @Prop()\n close: () => void;\n\n constructor() {\n this.hide = this.hide.bind(this);\n }\n\n hide(): void {\n this.show = false;\n this.close();\n }\n\n render() {\n const theme = this.theme === 'auto' ? 'light' : this.theme;\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n );\n }\n}\n"],"mappings":"yDAAO,MAAMA,EAAO,CAClB,MACA,MACA,MACA,MACA,MACA,MACA,OAGK,MAAMC,EAAS,CACpB,UACA,WACA,QACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,YAGK,MAAMC,EAA6B,GAEnC,MAAMC,EAA6B,GAEnC,MAAMC,EAA8B,GAEpC,MAAMC,EAAuB,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,G,MCvB1CC,EAWXC,YAAYC,EAAcC,GAPnBC,KAAAC,eAAiBR,EAEhBO,KAAAE,yBAA2B,EAC3BF,KAAAG,uBAAyB,EAEzBH,KAAAL,qBAAuBA,EAG7BK,KAAKF,KAAOA,EACZE,KAAKD,MAAQA,C,CAGRK,kBACL,MAAMC,EAAgBL,KAAKM,sBAC3B,MAAMJ,EAA2BF,KAAKL,qBAAqBK,KAAKO,oBAChE,MAAMJ,EAAyBV,GAA8BY,EAAcG,OAASN,GAEpFF,KAAKS,kBAAoBJ,EAAcG,OACvCR,KAAKE,yBAA2BA,EAChCF,KAAKG,uBAAyBA,EAE9B,MAAMO,EAAsBR,EAA2B,EAAIF,KAAKW,mBAAmBT,GAA0BU,KAAIC,GAAK,IAAK,GAC3H,MAAMC,EAAoBd,KAAKe,iBAAiBZ,GAAwBS,KAAIC,GAAK,IAEjF,MAAO,IAAIH,KAAcL,KAAkBS,E,CAGrCR,sBACN,OAAON,KAAKgB,eAAehB,KAAKD,M,CAG1BY,mBAAmBT,GACzB,MAAMe,EAAcjB,KAAKgB,eAAehB,KAAKD,MAAQ,GAErD,OAAOkB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\ No newline at end of file diff --git a/assets/javascripts/web-components/web-components-stencil.esm.js b/assets/javascripts/web-components/web-components-stencil.esm.js new file mode 100644 index 000000000..19e6d0da1 --- /dev/null +++ b/assets/javascripts/web-components/web-components-stencil.esm.js @@ -0,0 +1,2 @@ +import{p as a,b as t}from"./p-6c241004.js";export{s as setNonce}from"./p-6c241004.js";const e=()=>{const t=import.meta.url;const e={};if(t!==""){e.resourcesUrl=new URL(".",t).href}return a(e)};e().then((a=>t([["p-f2db04cf",[[2,"swift-calendar",{theme:[1],jsData:[1,"js-data"],pathDataFile:[1,"path-data-file"],pathIcalFile:[1,"path-ical-file"],todayDate:[32],daysInMonth:[32],selectedDate:[32],isModalOpen:[32],modalData:[32],events:[32],isEventsView:[32]}],[6,"swift-modal",{theme:[1],show:[1540],close:[16]}]]]],a))); +//# sourceMappingURL=web-components-stencil.esm.js.map \ No newline at end of file diff --git a/assets/javascripts/web-components/web-components-stencil.esm.js.map b/assets/javascripts/web-components/web-components-stencil.esm.js.map new file mode 100644 index 000000000..ed665ffc0 --- /dev/null +++ b/assets/javascripts/web-components/web-components-stencil.esm.js.map @@ -0,0 +1 @@ +{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","theme","jsData","pathDataFile","pathIcalFile","todayDate","daysInMonth","selectedDate","isModalOpen","modalData","events","isEventsView","show","close"],"sources":["../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.2.2 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"sFAmBA,MAAMA,EAAe,KAkCjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAiB3E,GAAuBF,IAAe,GAAI,CACtCE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IAGrD,CAcI,OAAOC,EAAeJ,EAAK,ECrF/BH,IAAeQ,MAAKC,GAEXC,EAAc,oCAA8B,CAAOC,MAAE,IAAAC,OAAA,cAAAC,aAAA,qBAAAC,aAAA,qBAAAC,UAAA,KAAAC,YAAA,KAAAC,aAAA,KAAAC,YAAA,KAAAC,UAAA,KAAAC,OAAA,KAAAC,aAAA,yBAAAV,MAAA,IAAAW,KAAA,OAAAC,MAAA,UAAAd"} \ No newline at end of file diff --git a/assets/stylesheets/_screen.scss b/assets/stylesheets/_screen.scss index 0bde041e2..64980143d 100644 --- a/assets/stylesheets/_screen.scss +++ b/assets/stylesheets/_screen.scss @@ -978,3 +978,19 @@ article { padding: 10px 10px; text-align: center; } + +.calendar-menu { + list-style: none; + + i { + width: 16px; + height: 16px; + background-repeat: no-repeat; + background-size: 16px; + display: block; + + &.feed { + background-image: url("/assets/images/icon-feed.svg"); + } + } +} diff --git a/calendar/index.html b/calendar/index.html new file mode 100644 index 000000000..6376cfb13 --- /dev/null +++ b/calendar/index.html @@ -0,0 +1,22 @@ +--- +layout: page +title: Calendar +atom: true +--- + + + + + + + + + + + + +
HEY
THERE
` tags and, since they are the\n * same tag in the same position, we'd be able to avoid completely\n * re-rendering the subtree under them with a new DOM element and would just\n * call out to `patch` to handle reconciling their children and so on.\n *\n * 3. Check, for both windows, to see if the element at the beginning of the\n * window corresponds to the element at the end of the other window. This is\n * a heuristic which will let us identify _some_ situations in which\n * elements have changed position, for instance it _should_ detect that the\n * children nodes themselves have not changed but merely moved in the\n * following example:\n *\n * oldVNode: `
{dateArray[1]}/{dateArray[2]}/{dateArray[0]}
\n (download iCal)\n
{entry.name}
{entry.description}
{entry.location}
{entry.url}