From cedcaaeff3e035f0e51399f2cafc142e1137841d Mon Sep 17 00:00:00 2001 From: taiga-family-bot Date: Tue, 27 Feb 2024 13:18:05 +0000 Subject: [PATCH] deploy: c70e4f410b7feea3a19f68d537cfb431d280daf0 --- next/index.html | 2 +- next/index.original.html | 2 +- next/vendor.6a64d259202e5d57.js | 1 - next/vendor.e694f9d84691ac8f.js | 1 + 4 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 next/vendor.6a64d259202e5d57.js create mode 100644 next/vendor.e694f9d84691ac8f.js diff --git a/next/index.html b/next/index.html index 5f4da727fc1b..5aa1b1f41cee 100644 --- a/next/index.html +++ b/next/index.html @@ -49,6 +49,6 @@ taiga
topography
Make it
Customize design the way you like it
topography

Taiga UI ——
powerful set of
open source
components
for Angular

- + \ No newline at end of file diff --git a/next/index.original.html b/next/index.original.html index e4ebecbf6df4..371d38a12c6e 100644 --- a/next/index.original.html +++ b/next/index.original.html @@ -42,6 +42,6 @@ - + \ No newline at end of file diff --git a/next/vendor.6a64d259202e5d57.js b/next/vendor.6a64d259202e5d57.js deleted file mode 100644 index 4f48a792c6c8..000000000000 --- a/next/vendor.6a64d259202e5d57.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkdemo=self.webpackChunkdemo||[]).push([[54736],{25219:(e,t,n)=>{n.d(t,{A_:()=>s,C8:()=>k,CV:()=>C,D2:()=>S,fD:()=>f,gI:()=>r});const r=e=>e.querySelector("input,textarea")||e,s={mask:/^.*$/,preprocessors:[],postprocessors:[],plugins:[],overwriteMode:"shift"};class i{constructor(){this.now=null,this.past=[],this.future=[]}undo(){const e=this.past.pop();e&&this.now&&(this.future.push(this.now),this.updateElement(e,"historyUndo"))}redo(){const e=this.future.pop();e&&this.now&&(this.past.push(this.now),this.updateElement(e,"historyRedo"))}updateHistory(e){if(!this.now)return void(this.now=e);const t=this.now.value!==e.value,n=this.now.selection.some(((t,n)=>t!==e.selection[n]));(t||n)&&(t&&(this.past.push(this.now),this.future=[]),this.now=e)}updateElement(e,t){this.now=e,this.updateElementState(e,{inputType:t,data:null})}}function o(e){return"string"==typeof e}function a(e,t,n,r){let s="";for(let i=t.length;i{const r=t[n];return o(r)?e===r:e.match(r)})):t.test(e)}function u(e,t,n=null){if(l(e.value,t))return e;const{value:r,selection:s}=Array.isArray(t)?function(e,t,n){let r=null,s=null;const i=Array.from(e.value).reduce(((i,l,u)=>{const c=i+a(t,i,l,n),h=t[c.length];return o(h)?c+h:l.match(h)?(null===r&&u>=e.selection[0]&&(r=c.length),null===s&&u>=e.selection[1]&&(s=c.length),c+l):c}),""),u=a(t,i,"",n);return{value:l(i+u,t)?i+u:i,selection:[null!=r?r:i.length,null!=s?s:i.length]}}(e,t,n):function({value:e,selection:t},n){const[r,s]=t;let i=r,o=s;return{value:Array.from(e).reduce(((e,t,a)=>{const l=e+t;return r===a&&(i=e.length),s===a&&(o=e.length),l.match(n)?l:e}),""),selection:[i,o]}}(e,t);return{selection:s,value:Array.isArray(t)?r.slice(0,t.length):r}}function c(e,t){if(!Array.isArray(t))return e;const[n,r]=e.selection,s=[],i=Array.from(e.value).reduce(((e,i,a)=>{const l=t[a];return a===n&&s.push(e.length),a===r&&s.push(e.length),o(l)&&l===i?e:e+i}),"");return s.length<2&&s.push(...new Array(2-s.length).fill(i.length)),{value:i,selection:[s[0],s[1]]}}class h{constructor(e,t){this.initialElementState=e,this.maskOptions=t,this.value="",this.selection=[0,0];const{value:n,selection:r}=u(e,this.getMaskExpression(e));this.value=n,this.selection=r}addCharacters([e,t],n){const{value:r}=this,s=this.getMaskExpression({value:r.slice(0,e)+n+r.slice(t),selection:[e+n.length,e+n.length]}),i={value:r,selection:[e,t]},o=c(i,s),[a,l]=function({value:e,selection:t},n,r){const[s,i]=t;return{value:e,selection:"replace"===("function"==typeof r?r({value:e,selection:t}):r)?[s,s+n.length]:[s,i]}}(o,n,this.maskOptions.overwriteMode).selection,h=o.value.slice(0,a)+n,d=h.length,p=u({value:h+o.value.slice(l),selection:[d,d]},s,i);if(r.slice(0,a)===u({value:h,selection:[d,d]},s,i).value||function(e,...t){return t.every((({value:t,selection:n})=>t===e.value&&n[0]===e.selection[0]&&n[1]===e.selection[1]))}(this,p))throw new Error("Invalid mask value");this.value=p.value,this.selection=p.selection}deleteCharacters([e,t]){if(e===t||!t)return;const{value:n}=this,r=this.getMaskExpression({value:n.slice(0,e)+n.slice(t),selection:[e,e]}),s={value:n,selection:[e,t]},i=c(s,r),[o,a]=i.selection,l=u({value:i.value.slice(0,o)+i.value.slice(a),selection:[o,o]},r,s);this.value=l.value,this.selection=l.selection}getMaskExpression(e){const{mask:t}=this.maskOptions;return"function"==typeof t?t(e):t}}class d{constructor(e){this.element=e,this.listeners=[]}listen(e,t,n){const r=t;this.element.addEventListener(e,r,n),this.listeners.push((()=>this.element.removeEventListener(e,r)))}destroy(){this.listeners.forEach((e=>e()))}}function p(e,t,n){return e.ctrlKey===!!(1&t)&&e.altKey===!!(2&t)&&e.shiftKey===!!(4&t)&&e.metaKey===!!(8&t)&&e.keyCode===n}function f(e,t){var n;const r=e.value;if("string"==typeof t)e.value=t;else{const[r,s]=t.selection;e.value=t.value,e.matches(":focus")&&(null===(n=e.setSelectionRange)||void 0===n||n.call(e,r,s))}e.value!==r&&e.dispatchEvent(new Event("input",{bubbles:!0}))}function m({value:e,selection:t},n){const[r,s]=t;if(r!==s)return[r,s];const i=n?e.slice(r).indexOf("\n")+1||e.length:e.slice(0,s).lastIndexOf("\n")+1;return[n?r:i,n?i:s]}function g({value:e,selection:t},n){const[r,s]=t;return r!==s?[r,s]:(n?[r,s+1]:[r-1,s]).map((t=>Math.min(Math.max(t,0),e.length)))}const y=/\s+$/g,_=/^\s+/g,v=/\s/;function b({value:e,selection:t},n){const[r,s]=t;if(r!==s)return[r,s];if(n){const t=e.slice(r),[n]=t.match(_)||[""],s=t.trimStart().search(v);return[r,-1!==s?r+n.length+s:e.length]}const i=e.slice(0,s),[o]=i.match(y)||[""],a=i.trimEnd().split("").reverse().findIndex((e=>e.match(v)));return[-1!==a?s-o.length-a:0,s]}function w(e=[]){return(t,...n)=>e.reduce(((e,t)=>Object.assign(Object.assign({},e),t(e,...n))),t)}function C(e,t){const n=Object.assign(Object.assign({},s),t),r=w(n.preprocessors),i=w(n.postprocessors),o="string"==typeof e?{value:e,selection:[0,0]}:e,{elementState:a}=r({elementState:o,data:""},"validation"),l=new h(a,n),{value:u,selection:c}=i(l,o);return"string"==typeof e?u:{value:u,selection:c}}function S(e){return(t,n)=>{const r=t.selectionStart||0,s=t.selectionEnd||0;f(t,{value:C(t.value,e||n),selection:[r,s]})}}class k extends i{constructor(e,t){super(),this.element=e,this.maskitoOptions=t,this.isTextArea="TEXTAREA"===this.element.nodeName,this.eventListener=new d(this.element),this.options=Object.assign(Object.assign({},s),this.maskitoOptions),this.preprocessor=w(this.options.preprocessors),this.postprocessor=w(this.options.postprocessors),this.teardowns=this.options.plugins.map((e=>e(this.element,this.options))),this.updateHistory(this.elementState),this.eventListener.listen("keydown",(e=>function(e){return p(e,1,89)||p(e,5,90)||p(e,12,90)}(e)?(e.preventDefault(),this.redo()):function(e){return p(e,1,90)||p(e,8,90)}(e)?(e.preventDefault(),this.undo()):void 0)),this.eventListener.listen("beforeinput",(e=>{const t=e.inputType.includes("Forward");switch(this.updateHistory(this.elementState),e.inputType){case"historyUndo":return e.preventDefault(),this.undo();case"historyRedo":return e.preventDefault(),this.redo();case"deleteByCut":case"deleteContentBackward":case"deleteContentForward":return this.handleDelete({event:e,isForward:t,selection:g(this.elementState,t)});case"deleteWordForward":case"deleteWordBackward":return this.handleDelete({event:e,isForward:t,selection:b(this.elementState,t),force:!0});case"deleteSoftLineBackward":case"deleteSoftLineForward":case"deleteHardLineBackward":case"deleteHardLineForward":return this.handleDelete({event:e,isForward:t,selection:m(this.elementState,t),force:!0});case"insertCompositionText":return;case"insertLineBreak":return this.handleEnter(e);default:return this.handleInsert(e,e.data||"")}})),this.eventListener.listen("input",(({inputType:e})=>{"insertCompositionText"!==e&&(this.ensureValueFitsMask(),this.updateHistory(this.elementState))})),this.eventListener.listen("compositionend",(()=>{this.ensureValueFitsMask(),this.updateHistory(this.elementState)}))}get elementState(){const{value:e,selectionStart:t,selectionEnd:n}=this.element;return{value:e,selection:[t||0,n||0]}}get maxLength(){const{maxLength:e}=this.element;return-1===e?1/0:e}destroy(){this.eventListener.destroy(),this.teardowns.forEach((e=>null==e?void 0:e()))}updateElementState({value:e,selection:t},n={inputType:"insertText",data:null}){const r=this.elementState.value;this.updateValue(e),this.updateSelectionRange(t),r!==e&&this.dispatchInputEvent(n)}updateSelectionRange([e,t]){var n;const{element:r}=this;!r.matches(":focus")||r.selectionStart===e&&r.selectionEnd===t||null===(n=r.setSelectionRange)||void 0===n||n.call(r,e,t)}updateValue(e){this.element.value=e}ensureValueFitsMask(){this.updateElementState(C(this.elementState,this.options))}dispatchInputEvent(e={inputType:"insertText",data:null}){globalThis.InputEvent&&this.element.dispatchEvent(new InputEvent("input",Object.assign(Object.assign({},e),{bubbles:!0,cancelable:!1})))}handleDelete({event:e,selection:t,isForward:n,force:r=!1}){const s={value:this.elementState.value,selection:t},[i,o]=s.selection,{elementState:a}=this.preprocessor({elementState:s,data:""},n?"deleteForward":"deleteBackward"),l=new h(a,this.options),[u,c]=a.selection;l.deleteCharacters([u,c]);const d=this.postprocessor(l,s);if(s.value.slice(0,i)+s.value.slice(o)!==d.value||r){if(e.preventDefault(),function(e,...t){return t.every((({value:t})=>t===e.value))}(s,a,l,d))return this.updateSelectionRange(n?[c,c]:[u,u]);this.updateElementState(d,{inputType:e.inputType,data:null}),this.updateHistory(d)}}handleInsert(e,t){const n=this.elementState,{elementState:r,data:s=t}=this.preprocessor({data:t,elementState:n},"insert"),i=new h(r,this.options);try{i.addCharacters(r.selection,s)}catch(t){return e.preventDefault()}const[o,a]=r.selection,l=n.value.slice(0,o)+t+n.value.slice(a),u=this.postprocessor(i,n);if(u.value.length>this.maxLength)return e.preventDefault();l!==u.value&&(e.preventDefault(),this.updateElementState(u,{data:t,inputType:e.inputType}),this.updateHistory(u))}handleEnter(e){this.isTextArea&&this.handleInsert(e,"\n")}}},72878:(e,t,n)=>{n.d(t,{H$:()=>se,f8:()=>Se,jX:()=>q,n9:()=>W,nQ:()=>$,rC:()=>Ee,tr:()=>G,vZ:()=>le});var r=n(25219);const s=[".",",","б","ю"],i=new Date("0001-01-01"),o=new Date("9999-12-31"),a={hours:23,minutes:59,seconds:59,milliseconds:999},l=" ",u="​",c="–",h="—",d="-",p="−",f="ー",m=[d,c,h,p],g=[","," "],y=[":","."],_={hours:2,minutes:2,seconds:2,milliseconds:3};function v(e,t,n){const r=Math.min(Number(n),Math.max(Number(t),Number(e)));return e instanceof Date?new Date(r):r}function b(e,{day:t,month:n,year:r}={}){const s=new Date(e);return t&&s.setDate(s.getDate()+t),n&&s.setMonth(s.getMonth()+n),r&&s.setFullYear(s.getFullYear()+r),s}const w=e=>{var t,n,r;return{day:(null===(t=e.match(/d/g))||void 0===t?void 0:t.length)||0,month:(null===(n=e.match(/m/g))||void 0===n?void 0:n.length)||0,year:(null===(r=e.match(/y/g))||void 0===r?void 0:r.length)||0}};function C(e){return{day:String(e.getDate()).padStart(2,"0"),month:String(e.getMonth()+1).padStart(2,"0"),year:String(e.getFullYear()).padStart(4,"0"),hours:String(e.getHours()).padStart(2,"0"),minutes:String(e.getMinutes()).padStart(2,"0"),seconds:String(e.getSeconds()).padStart(2,"0"),milliseconds:String(e.getMilliseconds()).padStart(3,"0")}}function S(e,t){return!(e.length!e.match(/^0+$/)))}function k(e,t,n){const r=t.replace(/\W/g,"").length;return e.replace(n,"").match(new RegExp(`(\\D*\\d[^\\d\\s]*){1,${r}}`,"g"))||[]}function E(e,t){const n=t.replace(/[^dmy]/g,""),r=e.replace(/\D+/g,""),s={day:r.slice(n.indexOf("d"),n.lastIndexOf("d")+1),month:r.slice(n.indexOf("m"),n.lastIndexOf("m")+1),year:r.slice(n.indexOf("y"),n.lastIndexOf("y")+1)};return Object.fromEntries(Object.entries(s).filter((([e,t])=>Boolean(t))).sort((([e],[n])=>t.toLowerCase().indexOf(e[0])>t.toLowerCase().indexOf(n[0])?1:-1)))}function x(e,t){var n,r,s,i,o,a,l;const u=2===(null===(n=e.year)||void 0===n?void 0:n.length)?`20${e.year}`:e.year,c=new Date(Number(null!=u?u:"0"),Number(null!==(r=e.month)&&void 0!==r?r:"1")-1,Number(null!==(s=e.day)&&void 0!==s?s:"1"),Number(null!==(i=null==t?void 0:t.hours)&&void 0!==i?i:"0"),Number(null!==(o=null==t?void 0:t.minutes)&&void 0!==o?o:"0"),Number(null!==(a=null==t?void 0:t.seconds)&&void 0!==a?a:"0"),Number(null!==(l=null==t?void 0:t.milliseconds)&&void 0!==l?l:"0"));return c.setFullYear(Number(null!=u?u:"0")),c}const D=", ";function A({day:e,month:t,year:n,hours:r,minutes:s,seconds:i,milliseconds:o},a,l){var u;const c=2===(null===(u=a.match(/y/g))||void 0===u?void 0:u.length)?null==n?void 0:n.slice(-2):n;return(a+(l?D+l:"")).replace(/d+/g,null!=e?e:"").replace(/m+/g,null!=t?t:"").replace(/y+/g,null!=c?c:"").replace(/H+/g,null!=r?r:"").replace(/MSS/g,null!=o?o:"").replace(/M+/g,null!=s?s:"").replace(/S+/g,null!=i?i:"").replace(/^\D+/g,"").replace(/\D+$/g,"")}function T(e,t,n=0){return Number(e.padEnd(t.length,"0"))<=Number(t)?{validatedSegmentValue:e,prefixedZeroesCount:n}:e.endsWith("0")?T(`0${e.slice(0,t.length-1)}`,t,n+1):T(`${e.slice(0,t.length-1)}0`,t,n)}const F={day:31,month:12,year:9999};function O({dateString:e,dateModeTemplate:t,offset:n,selection:[r,s]}){const i=E(e,t),o=Object.entries(i),a={};let l=0;for(const[e,i]of o){const o=A(a,t),u=F[e],c=o.length&&1,h=n+o.length+c+w(t)[e],d=h>=r&&h===s;if(d&&Number(i)>Number(u))return{validatedDateString:"",updatedSelection:[r,s]};if(d&&Number(i)<1)return{validatedDateString:"",updatedSelection:[r,s]};const{validatedSegmentValue:p,prefixedZeroesCount:f}=T(i,`${u}`);l+=f,a[e]=p}const u=A(a,t),c=u.length-e.length;return{validatedDateString:u,updatedSelection:[r+l+c,s+l+c]}}const R=/[\\^$.*+?()[\]{}|]/g,I=new RegExp(R.source);function L(e){return e&&I.test(e)?e.replace(R,"\\$&"):e}function P(e,{prefix:t,postfix:n}){var r,s;const i=new RegExp(`^${L(t)}`),o=new RegExp(`${L(n)}$`),[a=""]=null!==(r=e.match(i))&&void 0!==r?r:[],[l=""]=null!==(s=e.match(o))&&void 0!==s?s:[];return{extractedPrefix:a,extractedPostfix:l,cleanValue:e.replace(i,"").replace(o,"")}}function N(e){return e}function M(e){return!e||"object"==typeof e&&0===Object.keys(e).length}function z(e,t){const n=w(t);return Object.fromEntries(Object.entries(e).map((([e,t])=>{const r=n[e];return[e,t.length===r&&t.match(/^0+$/)?"1".padStart(r,"0"):t]})))}function B({dateModeTemplate:e,min:t=i,max:n=o,rangeSeparator:r="",dateSegmentSeparator:s="."}){return({value:i,selection:o})=>{const a=r&&i.endsWith(r),l=k(i,e,r);let u="";for(const i of l){u+=u?r:"";const o=E(i,e);S(i,e)?u+=A(C(v(x(o),t,n)),e):u+=A(z(o,e),e)+(i.endsWith(s)?s:"")}return{selection:o,value:u+(a?r:"")}}}function V({dateModeTemplate:e,dateSegmentsSeparator:t,rangeSeparator:n=""}){return({elementState:r,data:s})=>{const i=n?new RegExp(`${n}|-`):D,o=s.split(i),a=s.includes(D)?[o[0]]:o;if(a.every((n=>n.trim().split(/\D/).length===e.split(t).length))){const i=a.map((n=>function(e,t,n){const r=e.split(/\D/),s=t.split(n);return r.map(((e,t)=>t===s.length-1?e:e.padStart(s[t].length,"0"))).join(n)}(n,e,t))).join(n);return{elementState:r,data:`${i}${s.includes(D)&&D+o[1]||""}`}}return{elementState:r,data:s}}}function j(e){const t=new RegExp(`${L(e)}$`);return e?({value:n,selection:r},s)=>{if(!n&&!s.value.endsWith(e))return{value:n,selection:r};if(!n.endsWith(e)&&!s.value.endsWith(e))return{selection:r,value:n+e};const i=s.value.replace(t,""),o=s.selection[1]>=i.length,a=function(e,t){let n="";for(let r=0;r{const r=e.length-1-n,s=a[r]===t&&o;return e[r]!==t||s?e.slice(0,r+1)+t+e.slice(r+1):e}),n)}}:N}function q(e){return e?({value:t,selection:n},r)=>{if(t.startsWith(e)||!t&&!r.value.startsWith(e))return{value:t,selection:n};const[s,i]=n,o=Array.from(e).reduce(((e,t,n)=>e[n]===t?e:e.slice(0,n)+t+e.slice(n)),t),a=o.length-t.length;return{selection:[s+a,i+a],value:o}}:N}function H({dateModeTemplate:e,dateSegmentsSeparator:t,rangeSeparator:n=""}){return({elementState:r,data:s})=>{const{value:i,selection:o}=r;if(s===t)return{elementState:r,data:o[0]===i.length?s:""};if(m.includes(s))return{elementState:r,data:n};const a=s.replace(new RegExp(`[^\\d${L(t)}${n}]`,"g"),"");if(!a)return{elementState:r,data:""};const[l,u]=o;let c=u+s.length;const h=i.slice(0,l)+a+i.slice(c),d=k(h,e,n);let p="";const f=Boolean(n)&&h.includes(n);for(const t of d){const{validatedDateString:s,updatedSelection:i}=O({dateString:t,dateModeTemplate:e,offset:p?p.length+n.length:0,selection:[l,c]});if(t&&!s)return{elementState:r,data:""};c=i[1],p+=f&&p?n+s:s}const g=p.slice(l,c);return{elementState:{selection:o,value:p.slice(0,l)+g.split(t).map((e=>"0".repeat(e.length))).join(t)+p.slice(c)},data:g}}}function U(e,t,n){return(r,s)=>{const i=()=>t(r,s);return r.addEventListener(e,i,n),()=>r.removeEventListener(e,i,n)}}function $(e){return t=>{const n=t.ownerDocument;let r=0;const s=()=>r++,i=()=>{r=Math.max(--r,0)},o=()=>{if(!t.matches(":focus"))return;if(r)return n.addEventListener("mouseup",o,{once:!0,passive:!0});const s=t.selectionStart||0,i=t.selectionEnd||0,[a,l]=e(t.value,[s,i]);(a>s||l{n.removeEventListener("selectionchange",o),n.removeEventListener("mousedown",s),n.removeEventListener("mouseup",i)}}}function G({mode:e,separator:t=".",max:n,min:s}){const i=e.split("/").join(t);return Object.assign(Object.assign({},r.A_),{mask:Array.from(i).map((e=>e===t?e:/\d/)),overwriteMode:"replace",preprocessors:[({elementState:e},t)=>{const{value:n,selection:r}=e;if(!n||function(e,[t,n]){return n===e.length}(n,r))return{elementState:e};const[s,i]=r,o=n.slice(s,i).replace(/\d/g,"0"),a=n.slice(0,s)+o+n.slice(i);return"validation"===t||"insert"===t&&s===i?{elementState:{selection:r,value:a}}:{elementState:{selection:"deleteBackward"===t||"insert"===t?[s,s]:[i,i],value:a}}},V({dateModeTemplate:i,dateSegmentsSeparator:t}),H({dateModeTemplate:i,dateSegmentsSeparator:t})],postprocessors:[B({min:s,max:n,dateModeTemplate:i,dateSegmentSeparator:t})]})}function Y({dateModeTemplate:e,rangeSeparator:t,minLength:n,maxLength:r,max:s=o}){return M(n)&&M(r)?N:({value:i,selection:o})=>{const a=k(i,e,t);if(2!==a.length||a.some((t=>!S(t,e))))return{value:i,selection:o};const[l,u]=a.map((t=>x(E(t,e)))),c=b(l,Object.assign(Object.assign({},n),{day:(null==n?void 0:n.day)&&n.day-1})),h=M(r)?s:b(l,Object.assign(Object.assign({},r),{day:(null==r?void 0:r.day)&&r.day-1})),d=v(u,c,s),p=d>h?h:d;return{selection:o,value:a[0]+t+A(C(p),e)}}}function Z({dateModeTemplate:e,rangeSeparator:t}){return({value:n,selection:r})=>{const s=k(n,e,t),i=2===s.length&&s.every((t=>S(t,e))),[o,a]=r,l=o>=n.length,u=0===o&&a>=n.length;if(!l&&!u||!i)return{value:n,selection:r};const[c,h]=s.map((t=>x(E(t,e))));return{selection:r,value:c>h?s.reverse().join(t):n}}}function W({mode:e,min:t,max:n,minLength:s,maxLength:i,dateSeparator:o=".",rangeSeparator:a=`${l}${c}${l}`}){const u=e.split("/").join(o),h=Array.from(u).map((e=>e===o?e:/\d/));return Object.assign(Object.assign({},r.A_),{mask:[...h,...Array.from(a),...h],overwriteMode:"replace",preprocessors:[({elementState:e},t)=>{const{value:n,selection:r}=e;if(!n||function(e,[t,n]){return n===e.length}(n,r))return{elementState:e};const[s,i]=r,o=n.slice(s,i).replace(/\d/g,"0"),a=n.slice(0,s)+o+n.slice(i);return"validation"===t||"insert"===t&&s===i?{elementState:{selection:r,value:a}}:{elementState:{selection:"deleteBackward"===t||"insert"===t?[s,s]:[i,i],value:a}}},V({dateModeTemplate:u,rangeSeparator:a,dateSegmentsSeparator:o}),H({dateModeTemplate:u,rangeSeparator:a,dateSegmentsSeparator:o})],postprocessors:[B({min:t,max:n,dateModeTemplate:u,rangeSeparator:a,dateSegmentSeparator:o}),Y({dateModeTemplate:u,minLength:s,maxLength:i,max:n,rangeSeparator:a}),Z({dateModeTemplate:u,rangeSeparator:a})]})}function Q(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,`${t}`.padEnd(_[e],"0")])))}function K(e){const t=e.replace(/\D+/g,""),n={hours:t.slice(0,2),minutes:t.slice(2,4),seconds:t.slice(4,6),milliseconds:t.slice(6,9)};return Object.fromEntries(Object.entries(n).filter((([e,t])=>Boolean(t))))}function J({hours:e="",minutes:t="",seconds:n="",milliseconds:r=""}){return`${e}${t&&`:${t}`}${n&&`:${n}`}${r&&`.${r}`}`}const X=new RegExp(`[${y.map(L).join("")}]$`);function ee({timeString:e,paddedMaxValues:t,offset:n,selection:[r,s]}){const i=K(e),o=Object.entries(i),a={};let l=0;for(const[e,i]of o){const o=J(a),u=t[e],c=o.length&&1,h=n+o.length+c+_[e];if(h>=r&&h<=s&&Number(i)>Number(u))return{validatedTimeString:"",updatedTimeSelection:[r,s]};const{validatedSegmentValue:d,prefixedZeroesCount:p}=T(i,`${u}`);l+=p,a[e]=d}const[u=""]=e.match(X)||[],c=J(a)+u,h=Math.max(c.length-e.length,0);return{validatedTimeString:c,updatedTimeSelection:[r+l+h,s+l+h]}}function te(e,t){const n=e.includes(D);return[e.slice(0,t.length),e.slice(n?t.length+D.length:t.length)]}function ne({dateModeTemplate:e,timeMode:t,min:n=i,max:r=o}){return({value:s,selection:i})=>{const[o,a]=te(s,e),l=E(o,e),u=K(a);if(!function(e,t,n){return e.length>=t.length+n.length+D.length&&e.split(D)[0].split(/\D/).every((e=>!e.match(/^0+$/)))}(s,e,t)){const a=z(l,e),{year:c,month:h,day:d}=S(o,e)?C(v(x(a),n,r)):a,p=A(Object.assign({year:c,month:h,day:d},u),e,t);return{selection:i,value:p+s.slice(p.length)}}return{selection:i,value:A(C(v(x(l,u),n,r)),e,t)}}}function re({dateModeTemplate:e,dateSegmentsSeparator:t}){const n=new RegExp(`[^\\d${y.map(L).join("")}${L(t)}]+`);return({elementState:r,data:s})=>{const{value:i,selection:o}=r;if(s===t)return{elementState:r,data:o[0]===i.length?s:""};if(g.includes(s))return{elementState:r,data:D};const l=s.replace(n,"");if(!l)return{elementState:r,data:""};const[u,c]=o;let h=c+s.length;const d=i.slice(0,u)+l+i.slice(h),[p,f]=te(d,e);let m="";const y=d.includes(D),{validatedDateString:_,updatedSelection:v}=O({dateString:p,dateModeTemplate:e,offset:0,selection:[u,h]});if(p&&!_)return{elementState:r,data:""};h=v[1],m+=_;const b=Q(a),{validatedTimeString:w,updatedTimeSelection:C}=ee({timeString:f,paddedMaxValues:b,offset:m.length+D.length,selection:[u,h]});if(f&&!w)return{elementState:r,data:""};h=C[1],m+=y?D+w:w;const S=m.slice(u,h);return{elementState:{selection:o,value:m.slice(0,u)+S.split(t).map((e=>"0".repeat(e.length))).join(t)+m.slice(h)},data:S}}}function se({dateMode:e,timeMode:t,dateSeparator:n=".",min:s,max:i}){const o=e.split("/").join(n);return Object.assign(Object.assign({},r.A_),{mask:[...Array.from(o).map((e=>e===n?e:/\d/)),...D.split(""),...Array.from(t).map((e=>y.includes(e)?e:/\d/))],overwriteMode:"replace",preprocessors:[({elementState:e},t)=>{const{value:n,selection:r}=e;if(!n||function(e,[t,n]){return n===e.length}(n,r))return{elementState:e};const[s,i]=r,o=n.slice(s,i).replace(/\d/g,"0"),a=n.slice(0,s)+o+n.slice(i);return"validation"===t||"insert"===t&&s===i?{elementState:{selection:r,value:a}}:{elementState:{selection:"deleteBackward"===t||"insert"===t?[s,s]:[i,i],value:a}}},V({dateModeTemplate:o,dateSegmentsSeparator:n}),re({dateModeTemplate:o,dateSegmentsSeparator:n})],postprocessors:[ne({min:s,max:i,dateModeTemplate:o,timeMode:t})]})}function ie({prefix:e,postfix:t}){return({elementState:n,data:r})=>{const{cleanValue:s}=P(r,{prefix:e,postfix:t});return{elementState:n,data:s}}}function oe({decimalSeparator:e,isNegativeAllowed:t,precision:n,thousandSeparator:r,prefix:s,postfix:i,decimalPseudoSeparators:o=[],pseudoMinuses:a=[]}){const l=ae(s),u="\\d",c=t?`[${p}${a.map((e=>`\\${e}`)).join("")}]?`:"",h=r?`[${u}${L(r).replace(/\s/g,"\\s")}]*`:`[${u}]*`,d=n>0?`([${L(e)}${o.map(L).join("")}]${u}{0,${Number.isFinite(n)?n:""}})?`:"",f=ae(i);return new RegExp(`^${l}${c}${h}${d}${f}$`)}function ae(e){return e?`${e.split("").map((e=>`${L(e)}?`)).join("")}`:""}function le(e,t="."){const n=!!e.match(new RegExp(`^\\D*[${p}\\${d}${c}${h}]`)),r=L(t),s=e.replace(new RegExp(`${r}(?!\\d)`,"g"),"").replace(new RegExp(`[^\\d${r}]`,"g"),"").replace(t,".");return s?Number((n?d:"")+s):NaN}function ue({decimalSeparator:e,precision:t,decimalZeroPadding:n,prefix:r,postfix:s}){return t<=0||!n?N:({value:n,selection:i})=>{const{cleanValue:o,extractedPrefix:a,extractedPostfix:l}=P(n,{prefix:r,postfix:s});if(Number.isNaN(le(o,e)))return{value:n,selection:i};const[u,c=""]=o.split(e);return{value:a+u+e+c.padEnd(t,"0")+l,selection:i}}}function ce(e){return e.replace(/[0-9]/g,(e=>String.fromCharCode(e.charCodeAt(0)-65248)))}function he({decimalSeparator:e,decimalPseudoSeparators:t,pseudoMinuses:n,prefix:s,postfix:i}){let o=!0;const a=oe({decimalSeparator:e,decimalPseudoSeparators:t,pseudoMinuses:n,prefix:"",postfix:"",thousandSeparator:"",precision:1/0,isNegativeAllowed:!0});return({elementState:e,data:t})=>{if(!o)return{elementState:e,data:t};o=!1;const{value:n,selection:l}=e,[u,c]=l,{extractedPrefix:h,cleanValue:d,extractedPostfix:p}=P(n,{prefix:s,postfix:i}),f=(0,r.CV)({selection:[Math.max(u-h.length,0),v(c-h.length,0,d.length)],value:d},{mask:a}),[m,g]=f.selection;return{elementState:{selection:[m+h.length,g+h.length],value:h+f.value+p},data:t}}}function de({min:e,max:t,decimalSeparator:n}){return({value:r,selection:s})=>{const i=le(r,n),o=i>0?Math.min(i,t):Math.max(i,e);if(!Number.isNaN(i)&&o!==i){const e=`${o}`.replace(".",n).replace(d,p);return{value:e,selection:[e.length,e.length]}}return{value:r,selection:s}}}function pe({decimalSeparator:e,thousandSeparator:t,decimalZeroPadding:n}){return({elementState:r,data:s},i)=>{const{value:o,selection:a}=r,[l,u]=a,c=o.slice(l,u),h=n?[e,t]:[t],d=n&&l>o.indexOf(e)&&Boolean(c.match(/^0+$/gi));return"deleteBackward"!==i&&"deleteForward"!==i||!h.includes(c)&&!d?{elementState:r,data:s}:{elementState:{value:o,selection:"deleteForward"===i?[u,u]:[l,l]},data:s}}}function fe({decimalSeparator:e,precision:t,prefix:n,postfix:r}){const s=new RegExp(`^\\D*${L(e)}`);return({elementState:i,data:o})=>{const{value:a,selection:l}=i,{cleanValue:u}=P(a,{prefix:n,postfix:r}),[c]=l;return t<=0||u.includes(e)||!o.match(s)?{elementState:i,data:o}:{elementState:i,data:u.slice(0,c).match(/\d+/)?o:`0${o}`}}}function me({validCharacter:e,pseudoCharacters:t,prefix:n,postfix:r}){const s=new RegExp(`[${t.join("")}]`,"gi");return({elementState:t,data:i})=>{const{value:o,selection:a}=t,{cleanValue:l,extractedPostfix:u,extractedPrefix:c}=P(o,{prefix:n,postfix:r});return{elementState:{selection:a,value:c+l.replace(s,e)+u},data:i.replace(s,e)}}}function ge({decimalSeparator:e,prefix:t,postfix:n}){return({elementState:r,data:s})=>{const{value:i,selection:o}=r,[a,l]=o,{cleanValue:u}=P(i,{prefix:t,postfix:n});return{elementState:r,data:!u.includes(e)||i.slice(a,l+1).includes(e)?s:s.replace(new RegExp(L(e),"gi"),"")}}}function ye({thousandSeparator:e,decimalSeparator:t,prefix:n,postfix:r}){return e?({value:s,selection:i})=>{const{cleanValue:o,extractedPostfix:a,extractedPrefix:l}=P(s,{prefix:n,postfix:r}),[u,c=""]=o.replace(p,"").split(t),[h,d]=i;let[f,m]=i;const g=Array.from(u).reduceRight(((t,n,r)=>{const s=!(!r&&n===e)&&t.length&&(t.length+1)%4==0;return s&&(n===e||((...e)=>e.every((e=>/\s/.test(e))))(n,e))?e+t:n!==e||s?s?(r<=h&&f++,r<=d&&m++,n+e+t):n+t:(r&&r<=h&&f--,r&&r<=d&&m--,t)}),"");return{value:l+(o.includes(p)?p:"")+g+(o.includes(t)?t:"")+c+a,selection:[f,m]}}:N}function _e({precision:e,decimalSeparator:t,prefix:n,postfix:r}){if(e>0)return N;const s=new RegExp(`${L(t)}.*$`,"g");return({elementState:e,data:t})=>{const{value:i,selection:o}=e,{cleanValue:a,extractedPrefix:l,extractedPostfix:u}=P(i,{prefix:n,postfix:r}),[c,h]=o,d=l+a.replace(s,"")+u;return{elementState:{selection:[Math.min(c,d.length),Math.min(h,d.length)],value:d},data:t.replace(s,"")}}}const ve=[0,0];function be({decimalSeparator:e,thousandSeparator:t,prefix:n,postfix:s}){const i=function({decimalSeparator:e,thousandSeparator:t,prefix:n,postfix:r}){const s=e=>{const n=L(t);return e.replace(new RegExp(`^(\\D+)?[0${n}]+(?=0)`),"$1").replace(new RegExp(`^(\\D+)?[0${n}]+(?=[1-9])`),"$1")},i=(e,t)=>{const n=e.slice(0,t),r=e.slice(t).startsWith("0");return n.length-s(n).length+(r?1:0)};return({value:t,selection:o})=>{const[a,l]=o,{cleanValue:u,extractedPrefix:c,extractedPostfix:h}=P(t,{prefix:n,postfix:r}),d=u.includes(e),[p,f=""]=u.split(e),m=s(p);if(p===m)return{value:t,selection:o};const g=a-i(t,a),y=l-i(t,l);return{value:c+m+(d?e:"")+f+h,selection:[Math.max(g,0),Math.max(y,0)]}}}({decimalSeparator:e,thousandSeparator:t,prefix:n,postfix:s});return U("blur",(e=>{const t=i({value:e.value,selection:ve},{value:"",selection:ve}).value;(0,r.fD)(e,t)}),{capture:!0})}function we({min:e,max:t,decimalSeparator:n}){return U("blur",((s,i)=>{const o=le(s.value,n),a=v(o,e,t);Number.isNaN(o)||o===a||(0,r.fD)(s,(0,r.CV)(function(e){const t=String(e),[n,r]=t.split("e-");let s=t;if(r){const[,t]=n.split("."),i=Number(r)+((null==t?void 0:t.length)||0);s=e.toFixed(i)}return s}(a),i))}),{capture:!0})}function Ce({decimalSeparator:e,prefix:t,postfix:n}){return U("blur",(s=>{const{cleanValue:i,extractedPostfix:o,extractedPrefix:a}=P(s.value,{prefix:t,postfix:n}),l=a+i.replace(new RegExp(`^(\\D+)?${L(e)}`),`$10${e}`)+o;(0,r.fD)(s,l)}),{capture:!0})}function Se({max:e=Number.MAX_SAFE_INTEGER,min:t=Number.MIN_SAFE_INTEGER,precision:n=0,thousandSeparator:i=l,decimalSeparator:o=".",decimalPseudoSeparators:a,decimalZeroPadding:m=!1,prefix:g="",postfix:y=""}={}){const _=[d,c,h,f].filter((e=>e!==i&&e!==o)),v=function({decimalSeparator:e,thousandSeparator:t,decimalPseudoSeparators:n=s}){return n.filter((n=>n!==t&&n!==e))}({decimalSeparator:o,thousandSeparator:i,decimalPseudoSeparators:a}),b=g.endsWith(o)&&n>0?`${g}${u}`:g;return Object.assign(Object.assign({},r.A_),{mask:oe({decimalSeparator:o,precision:n,thousandSeparator:i,prefix:b,postfix:y,isNegativeAllowed:t<0}),preprocessors:[({elementState:e,data:t})=>{const{value:n,selection:r}=e;return{elementState:{selection:r,value:ce(n)},data:ce(t)}},he({decimalSeparator:o,decimalPseudoSeparators:v,pseudoMinuses:_,prefix:b,postfix:y}),ie({prefix:b,postfix:y}),me({validCharacter:p,pseudoCharacters:_,prefix:b,postfix:y}),me({validCharacter:o,pseudoCharacters:v,prefix:b,postfix:y}),fe({decimalSeparator:o,precision:n,prefix:b,postfix:y}),pe({decimalSeparator:o,decimalZeroPadding:m,thousandSeparator:i}),_e({precision:n,decimalSeparator:o,prefix:b,postfix:y}),ge({decimalSeparator:o,prefix:b,postfix:y})],postprocessors:[de({decimalSeparator:o,min:t,max:e}),q(b),j(y),ye({decimalSeparator:o,thousandSeparator:i,prefix:b,postfix:y}),ue({decimalSeparator:o,decimalZeroPadding:m,precision:n,prefix:b,postfix:y})],plugins:[be({decimalSeparator:o,thousandSeparator:i,prefix:b,postfix:y}),Ce({decimalSeparator:o,prefix:b,postfix:y}),we({min:t,max:e,decimalSeparator:o})],overwriteMode:m?({value:e,selection:[t]})=>t<=e.indexOf(o)?"shift":"replace":"shift"})}function ke(e){const t=Q(e),n=new RegExp(`[^\\d${y.map(L).join("")}]+`);return({elementState:e,data:r},s)=>{if("deleteBackward"===s||"deleteForward"===s)return{elementState:e,data:r};const{value:i,selection:o}=e;if("validation"===s){const{validatedTimeString:e,updatedTimeSelection:n}=ee({timeString:i,paddedMaxValues:t,offset:0,selection:o});return{elementState:{value:e,selection:n},data:r}}const a=r.replace(n,""),[l,u]=o;let c=u+a.length;const h=i.slice(0,l)+a+i.slice(c),{validatedTimeString:d,updatedTimeSelection:p}=ee({timeString:h,paddedMaxValues:t,offset:0,selection:[l,c]});if(h&&!d)return{elementState:e,data:""};c=p[1];const f=d.slice(l,c);return{elementState:{selection:o,value:d.slice(0,l)+"0".repeat(f.length)+d.slice(c)},data:f}}}function Ee({mode:e,timeSegmentMaxValues:t={}}){const n=Object.assign(Object.assign({},a),t);return Object.assign(Object.assign({},r.A_),{mask:Array.from(e).map((e=>y.includes(e)?e:/\d/)),preprocessors:[({elementState:e},t)=>{const{value:n,selection:r}=e;if(!n||function(e,[t,n]){return n===e.length}(n,r))return{elementState:e};const[s,i]=r,o=n.slice(s,i).replace(/\d/g,"0"),a=n.slice(0,s)+o+n.slice(i);return"validation"===t||"insert"===t&&s===i?{elementState:{selection:r,value:a}}:{elementState:{selection:"deleteBackward"===t||"insert"===t?[s,s]:[i,i],value:a}}},ke(n)],overwriteMode:"replace"})}},62579:(e,t,n)=>{n.d(t,{Ct:()=>g,H3:()=>m,KS:()=>v,L1:()=>p,_k:()=>b,de:()=>_,m9:()=>d,s5:()=>y,ux:()=>f,yZ:()=>w});var r=n(64537),s=n(87241),i=n(14581),o=n(26903),a=n(51927),l=n(27969),u=n(42147),c=n(66466),h=n(88692);const d=new r.OlP("An abstraction over global window object",{factory:()=>{const{defaultView:e}=(0,r.f3M)(h.K0);if(!e)throw new Error("Window is not available");return e}}),p=new r.OlP("Shared Observable based on `window.requestAnimationFrame`",{factory:()=>{const{requestAnimationFrame:e,cancelAnimationFrame:t}=(0,r.f3M)(d);return new s.y((n=>{let r=NaN;const s=t=>{n.next(t),r=e(s)};return r=e(s),()=>{t(r)}})).pipe((0,o.B)())}}),f=(new r.OlP("An abstraction over window.caches object",{factory:()=>(0,r.f3M)(d).caches}),new r.OlP("An abstraction over window.crypto object",{factory:()=>(0,r.f3M)(d).crypto}),new r.OlP("An abstraction over window.CSS object",{factory:()=>(0,r.f3M)(d).CSS||{escape:e=>e,supports:()=>!1}})),m=(new r.OlP("An abstraction over window.history object",{factory:()=>(0,r.f3M)(d).history}),new r.OlP("An abstraction over window.localStorage object",{factory:()=>(0,r.f3M)(d).localStorage})),g=new r.OlP("An abstraction over window.location object",{factory:()=>(0,r.f3M)(d).location}),y=new r.OlP("An abstraction over window.navigator object",{factory:()=>(0,r.f3M)(d).navigator}),_=(new r.OlP("An abstraction over window.navigator.mediaDevices object",{factory:()=>(0,r.f3M)(y).mediaDevices}),new r.OlP("An abstraction over window.navigator.connection object",{factory:()=>(0,r.f3M)(y).connection||null}),new r.OlP("Shared Observable based on `document visibility changed`",{factory:()=>{const e=(0,r.f3M)(h.K0);return(0,i.R)(e,"visibilitychange").pipe((0,a.O)(0),(0,l.U)((()=>"hidden"!==e.visibilityState)),(0,u.x)(),(0,c.d)({refCount:!1,bufferSize:1}))}})),v=new r.OlP("An abstraction over window.performance object",{factory:()=>(0,r.f3M)(d).performance}),b=(new r.OlP("An abstraction over window.screen object",{factory:()=>(0,r.f3M)(d).screen}),new r.OlP("An abstraction over window.sessionStorage object",{factory:()=>(0,r.f3M)(d).sessionStorage})),w=(new r.OlP("An abstraction over SpeechRecognition class",{factory:()=>{const e=(0,r.f3M)(d);return e.speechRecognition||e.webkitSpeechRecognition||null}}),new r.OlP("An abstraction over window.speechSynthesis object",{factory:()=>(0,r.f3M)(d).speechSynthesis}),new r.OlP("An abstraction over window.navigator.userAgent object",{factory:()=>(0,r.f3M)(y).userAgent}))},11693:(e,t,n)=>{n.d(t,{$v:()=>_,AY:()=>g,Q7:()=>y,RL:()=>u,Z7:()=>f,op:()=>h,p3:()=>a,te:()=>b});var r=n(64537),s=n(87241),i=n(26903),o=n(62579);const a=new r.OlP("Root element for IntersectionObserver"),l="0px 0px 0px 0px",u=new r.OlP("rootMargin for IntersectionObserver",{providedIn:"root",factory:()=>l});function c(e){return e||l}const h=new r.OlP("threshold for IntersectionObserver",{providedIn:"root",factory:()=>0});function d(e){return(null==e?void 0:e.split(",").map(parseFloat))||0}const p="undefined"!=typeof IntersectionObserver?IntersectionObserver:class{constructor(){this.root=null,this.rootMargin="",this.thresholds=[]}observe(){}unobserve(){}disconnect(){}takeRecords(){return[]}};let f=(()=>{class e extends p{constructor(e,t,n){super((e=>{this.callbacks.forEach(((t,n)=>{const r=e.filter((({target:e})=>e===n));return r.length&&t(r,this)}))}),{root:e&&e.nativeElement,rootMargin:c(t),threshold:d(n)}),this.callbacks=new Map}observe(e,t=(()=>{})){super.observe(e),this.callbacks.set(e,t)}unobserve(e){super.unobserve(e),this.callbacks.delete(e)}ngOnDestroy(){this.disconnect()}}return e.ɵfac=function(t){return new(t||e)(r.Y36(a,8),r.$8M("waIntersectionRootMargin"),r.$8M("waIntersectionThreshold"))},e.ɵdir=r.lG2({type:e,selectors:[["","waIntersectionObserver",""]],exportAs:["IntersectionObserver"],features:[r.qOj]}),e})(),m=(()=>{class e extends s.y{constructor({nativeElement:e},t){return super((n=>(t.observe(e,(e=>{n.next(e)})),()=>{t.unobserve(e)}))),this.pipe((0,i.B)())}}return e.ɵfac=function(t){return new(t||e)(r.LFG(r.SBq),r.LFG(f))},e.ɵprov=r.Yz7({token:e,factory:e.ɵfac}),e})(),g=(()=>{class e{constructor(e){this.waIntersectionObservee=e}}return e.ɵfac=function(t){return new(t||e)(r.Y36(m))},e.ɵdir=r.lG2({type:e,selectors:[["","waIntersectionObservee",""]],outputs:{waIntersectionObservee:"waIntersectionObservee"},features:[r._Bn([m])]}),e})(),y=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵdir=r.lG2({type:e,selectors:[["","waIntersectionRoot",""]],features:[r._Bn([{provide:a,useExisting:r.SBq}])]}),e})(),_=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=r.oAB({type:e}),e.ɵinj=r.cJS({}),e})();const v=new r.OlP("Intersection Observer API support",{providedIn:"root",factory:()=>!!(0,r.f3M)(o.m9).IntersectionObserver});let b=(()=>{class e extends s.y{constructor({nativeElement:e},t,n,r,s){return super((i=>{if(!t)return void i.error("IntersectionObserver is not supported in your browser");const o=new IntersectionObserver((e=>{i.next(e)}),{root:null==s?void 0:s.nativeElement,rootMargin:n,threshold:r});return o.observe(e),()=>{o.disconnect()}})),this.pipe((0,i.B)())}}return e.ɵfac=function(t){return new(t||e)(r.LFG(r.SBq),r.LFG(v),r.LFG(u),r.LFG(h),r.LFG(a,8))},e.ɵprov=r.Yz7({token:e,factory:e.ɵfac}),e})()},23764:(e,t,n)=>{n.d(t,{IM:()=>c,NI:()=>h,Vi:()=>u,k2:()=>i});var r=n(64537),s=n(87241);const i=new r.OlP("MutationObserver config");function o(e,t){return null!==e.getAttribute(t)||void 0}function a({nativeElement:e}){const t=e.getAttribute("attributeFilter");return{attributeFilter:null==t?void 0:t.split(",").map((e=>e.trim())),attributeOldValue:o(e,"attributeOldValue"),attributes:o(e,"attributes"),characterData:o(e,"characterData"),characterDataOldValue:o(e,"characterDataOldValue"),childList:o(e,"childList"),subtree:o(e,"subtree")}}const l="undefined"!=typeof MutationObserver?MutationObserver:class{observe(){}disconnect(){}takeRecords(){return[]}};let u=(()=>{class e extends l{constructor({nativeElement:e},t,n,s,i,o,a,l,u){super((e=>{this.waMutationObserver.emit(e)})),this.waMutationObserver=new r.vpe,this.observe(e,t)}ngOnDestroy(){this.disconnect()}}return e.ɵfac=function(t){return new(t||e)(r.Y36(r.SBq),r.Y36(i),r.$8M("attributeFilter"),r.$8M("attributeOldValue"),r.$8M("attributes"),r.$8M("characterData"),r.$8M("characterDataOldValue"),r.$8M("childList"),r.$8M("subtree"))},e.ɵdir=r.lG2({type:e,selectors:[["","waMutationObserver",""]],outputs:{waMutationObserver:"waMutationObserver"},exportAs:["MutationObserver"],features:[r._Bn([{provide:i,deps:[r.SBq],useFactory:a}]),r.qOj]}),e})(),c=(()=>{class e extends s.y{constructor({nativeElement:e},t){super((n=>{const r=new MutationObserver((e=>{n.next(e)}));return r.observe(e,t),()=>{r.disconnect()}}))}}return e.ɵfac=function(t){return new(t||e)(r.LFG(r.SBq),r.LFG(i))},e.ɵprov=r.Yz7({token:e,factory:e.ɵfac}),e})(),h=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=r.oAB({type:e}),e.ɵinj=r.cJS({}),e})()},32917:(e,t,n)=>{n.d(t,{P:()=>d,ax:()=>c,xi:()=>p});var r=n(64537),s=n(87241),i=n(26903),o=n(62579);const a="content-box",l=new r.OlP("Box model to observe changes",{providedIn:"root",factory:()=>a}),u=new r.OlP("Resize Observer API support",{providedIn:"root",factory:()=>!!(0,r.f3M)(o.m9).ResizeObserver});let c=(()=>{class e extends s.y{constructor({nativeElement:e},t,n,r){let s;return super((i=>{if(n)return s=new ResizeObserver((e=>{t.run((()=>{i.next(e)}))})),s.observe(e,{box:r}),()=>{s.disconnect()};i.error("ResizeObserver is not supported in your browser")})),this.pipe((0,i.B)())}}return e.ɵfac=function(t){return new(t||e)(r.LFG(r.SBq),r.LFG(r.R0b),r.LFG(u),r.LFG(l))},e.ɵprov=r.Yz7({token:e,factory:e.ɵfac}),e})();function h({nativeElement:e}){return e.getAttribute("waResizeBox")||a}let d=(()=>{class e{constructor(e,t){this.waResizeObserver=e}}return e.ɵfac=function(t){return new(t||e)(r.Y36(c),r.$8M("waResizeBox"))},e.ɵdir=r.lG2({type:e,selectors:[["","waResizeObserver",""]],outputs:{waResizeObserver:"waResizeObserver"},features:[r._Bn([c,{provide:l,deps:[r.SBq],useFactory:h}])]}),e})(),p=(()=>{class e{}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=r.oAB({type:e}),e.ɵinj=r.cJS({}),e})()},5746:(e,t,n)=>{n.d(t,{Z:()=>D});const r="https://stackblitz.com",s=["angular-cli","create-react-app","html","javascript","node","polymer","typescript","vue"],i=["project","search","ports","settings"],o=["light","dark"],a=["editor","preview"],l={clickToLoad:e=>c("ctl",e),devToolsHeight:e=>h("devtoolsheight",e),forceEmbedLayout:e=>c("embed",e),hideDevTools:e=>c("hidedevtools",e),hideExplorer:e=>c("hideExplorer",e),hideNavigation:e=>c("hideNavigation",e),openFile:e=>p("file",e),showSidebar:e=>function(e,t){return"boolean"==typeof t?"showSidebar="+(t?"1":"0"):""}(0,e),sidebarView:e=>d("sidebarView",e,i),startScript:e=>p("startScript",e),terminalHeight:e=>h("terminalHeight",e),theme:e=>d("theme",e,o),view:e=>d("view",e,a),zenMode:e=>c("zenMode",e)};function u(e={}){const t=Object.entries(e).map((([e,t])=>null!=t&&l.hasOwnProperty(e)?l[e](t):"")).filter(Boolean);return t.length?`?${t.join("&")}`:""}function c(e,t){return!0===t?`${e}=1`:""}function h(e,t){if("number"==typeof t&&!Number.isNaN(t)){const n=Math.min(100,Math.max(0,t));return`${e}=${encodeURIComponent(Math.round(n))}`}return""}function d(e,t="",n=[]){return n.includes(t)?`${e}=${encodeURIComponent(t)}`:""}function p(e,t){return(Array.isArray(t)?t:[t]).filter((e=>"string"==typeof e&&""!==e.trim())).map((t=>`${e}=${encodeURIComponent(t)}`)).join("&")}function f(){return Math.random().toString(36).slice(2,6)+Math.random().toString(36).slice(2,6)}function m(e,t){return`${y(t)}${e}${u(t)}`}function g(e,t){const n={forceEmbedLayout:!0};return t&&"object"==typeof t&&Object.assign(n,t),`${y(n)}${e}${u(n)}`}function y(e={}){return("string"==typeof e.origin?e.origin:r).replace(/\/$/,"")}function _(e,t,n){if(!t||!e||!e.parentNode)throw new Error("Invalid Element");e.id&&(t.id=e.id),e.className&&(t.className=e.className),function(e,t={}){const n=Object.hasOwnProperty.call(t,"height")?`${t.height}`:"300",r=Object.hasOwnProperty.call(t,"width")?`${t.width}`:void 0;e.setAttribute("height",n),r?e.setAttribute("width",r):e.setAttribute("style","width:100%;")}(t,n),e.replaceWith(t)}function v(e){if("string"==typeof e){const t=document.getElementById(e);if(!t)throw new Error(`Could not find element with id '${e}'`);return t}if(e instanceof HTMLElement)return e;throw new Error(`Invalid element: ${e}`)}function b(e){return e&&!1===e.newWindow?"_self":"_blank"}class w{constructor(e){this.pending={},this.port=e,this.port.onmessage=this.messageListener.bind(this)}request({type:e,payload:t}){return new Promise(((n,r)=>{const s=f();this.pending[s]={resolve:n,reject:r},this.port.postMessage({type:e,payload:{...t,__reqid:s}})}))}messageListener(e){if("string"!=typeof e.data.payload?.__reqid)return;const{type:t,payload:n}=e.data,{__reqid:r,__success:s,__error:i}=n;this.pending[r]&&(s?this.pending[r].resolve(this.cleanResult(n)):this.pending[r].reject(i?`${t}: ${i}`:t),delete this.pending[r])}cleanResult(e){const t={...e};return delete t.__reqid,delete t.__success,delete t.__error,Object.keys(t).length?t:null}}class C{constructor(e,t){this.editor={openFile:e=>this._rdc.request({type:"SDK_OPEN_FILE",payload:{path:e}}),setCurrentFile:e=>this._rdc.request({type:"SDK_SET_CURRENT_FILE",payload:{path:e}}),setTheme:e=>this._rdc.request({type:"SDK_SET_UI_THEME",payload:{theme:e}}),setView:e=>this._rdc.request({type:"SDK_SET_UI_VIEW",payload:{view:e}}),showSidebar:(e=!0)=>this._rdc.request({type:"SDK_TOGGLE_SIDEBAR",payload:{visible:e}})},this.preview={origin:"",getUrl:()=>this._rdc.request({type:"SDK_GET_PREVIEW_URL",payload:{}}).then((e=>e?.url??null)),setUrl:(e="/")=>{if("string"!=typeof e||!e.startsWith("/"))throw new Error(`Invalid argument: expected a path starting with '/', got '${e}'`);return this._rdc.request({type:"SDK_SET_PREVIEW_URL",payload:{path:e}})}},this._rdc=new w(e),Object.defineProperty(this.preview,"origin",{value:"string"==typeof t.previewOrigin?t.previewOrigin:null,writable:!1})}applyFsDiff(e){const t=e=>null!==e&&"object"==typeof e;if(!t(e)||!t(e.create))throw new Error("Invalid diff object: expected diff.create to be an object.");if(!Array.isArray(e.destroy))throw new Error("Invalid diff object: expected diff.destroy to be an array.");return this._rdc.request({type:"SDK_APPLY_FS_DIFF",payload:e})}getDependencies(){return this._rdc.request({type:"SDK_GET_DEPS_SNAPSHOT",payload:{}})}getFsSnapshot(){return this._rdc.request({type:"SDK_GET_FS_SNAPSHOT",payload:{}})}}const S=[];class k{constructor(e){this.id=f(),this.element=e,this.pending=new Promise(((e,t)=>{const n=({data:t,ports:n})=>{"SDK_INIT_SUCCESS"===t?.action&&t.id===this.id&&(this.vm=new C(n[0],t.payload),e(this.vm),s())},r=()=>{this.element.contentWindow?.postMessage({action:"SDK_INIT",id:this.id},"*")};function s(){window.clearInterval(o),window.removeEventListener("message",n)}window.addEventListener("message",n),r();let i=0;const o=window.setInterval((()=>{if(this.vm)s();else{if(i>=20)return s(),t("Timeout: Unable to establish a connection with the StackBlitz VM"),void S.forEach(((e,t)=>{e.id===this.id&&S.splice(t,1)}));i++,r()}}),500)})),S.push(this)}}function E({template:e,title:t,description:n,dependencies:r,files:i,settings:o}){if(!s.includes(e)){const e=s.map((e=>`'${e}'`)).join(", ");console.warn(`Unsupported project.template: must be one of ${e}`)}const a=[],l=(e,t,n="")=>{a.push(function(e,t){const n=document.createElement("input");return n.type="hidden",n.name=e,n.value=t,n}(e,"string"==typeof t?t:n))};l("project[title]",t),"string"==typeof n&&n.length>0&&l("project[description]",n),l("project[template]",e,"javascript"),r&&("node"===e?console.warn("Invalid project.dependencies: dependencies must be provided as a 'package.json' file when using the 'node' template."):l("project[dependencies]",JSON.stringify(r))),o&&l("project[settings]",JSON.stringify(o)),Object.entries(i).forEach((([e,t])=>{l(`project[files][${function(e){return e.replace(/\[/g,"%5B").replace(/\]/g,"%5D")}(e)}]`,t)}));const u=document.createElement("form");return u.method="POST",u.setAttribute("style","display:none!important;"),u.append(...a),u}function x(e){return e?.contentWindow?((e=>{const t=e instanceof Element?"element":"id";return S.find((n=>n[t]===e))??null})(e)??new k(e)).pending:Promise.reject("Provided element is not an iframe.")}const D={connect:x,embedGithubProject:function(e,t,n){const r=v(e),s=document.createElement("iframe");return s.src=g(`/github/${t}`,n),_(r,s,n),x(s)},embedProject:function(e,t,n){const r=v(e),s=function(e,t){const n=E(e);return n.action=g("/run",t),n.id="sb_run",`\n\n\n\n ${n.outerHTML}\n