snappymail/vendors/knockout/build/output/knockout-latest.js

75 lines
35 KiB
JavaScript

/*!
* Knockout JavaScript library v3.5.1-sm
* (c) The Knockout.js team - http://knockoutjs.com/
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
*/
(T=>{function O(a,c){return null===a||U[typeof a]?a===c:!1}function V(a,c){var d;return()=>{d||(d=setTimeout(()=>{d=0;a()},c))}}function W(a,c){var d;return()=>{clearTimeout(d);d=setTimeout(a,c)}}function X(a,c){null!==c&&c.o&&c.o()}function Y(a,c){var d=this.Zb,g=d[A];g.X||(this.Ta&&this.za[c]?(d.sb(c,a,this.za[c]),this.za[c]=null,--this.Ta):g.u[c]||d.sb(c,a,g.v?{T:a}:d.Qb(a)),a.ja&&a.Vb())}var L=T.document,P={},b="undefined"!==typeof P?P:{};b.m=(a,c)=>{a=a.split(".");for(var d=b,g=
0,k=a.length-1;g<k;g++)d=d[a[g]];d[a[k]]=c};b.fa=(a,c,d)=>{a[c]=d};b.m("version","3.5.1-sm");b.a={extend:(a,c)=>c?Object.assign(a,c):a,L:(a,c)=>a&&Object.entries(a).forEach(d=>c(d[0],d[1])),Xa:a=>[...a.childNodes].forEach(c=>b.removeNode(c)),Jb:a=>{a=[...a];var c=(a[0]&&a[0].ownerDocument||L).createElement("div");a.forEach(d=>c.append(b.ca(d)));return c},ya:(a,c)=>Array.prototype.map.call(a,c?d=>b.ca(d.cloneNode(!0)):d=>d.cloneNode(!0)),ua:(a,c)=>{b.a.Xa(a);c&&a.append(...c)},Aa:(a,c)=>{if(a.length){for(c=
8===c.nodeType&&c.parentNode||c;a.length&&a[0].parentNode!==c;)a.splice(0,1);for(;1<a.length&&a[a.length-1].parentNode!==c;)--a.length;if(1<a.length){c=a[0];var d=a[a.length-1];for(a.length=0;c!==d;)a.push(c),c=c.nextSibling;a.push(d)}}return a},Pb:a=>null==a?"":a.trim?a.trim():a.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,""),Wa:a=>a.ownerDocument.documentElement.contains(1!==a.nodeType?a.parentNode:a),Sb:(a,c)=>{if(!a||!a.nodeType)throw Error("element must be a DOM node when calling triggerEvent");
a.dispatchEvent(new Event(c))},f:a=>b.O(a)?a():a,gb:(a,c)=>a.textContent=b.a.f(c)||""};b.m("utils",b.a);b.m("unwrap",b.a.f);(()=>{let a=0,c="__ko__"+Date.now(),d=new WeakMap;b.a.c={get:(g,k)=>(d.get(g)||{})[k],set:(g,k,t)=>{if(d.has(g))d.get(g)[k]=t;else{let e={};e[k]=t;d.set(g,e)}return t},Za:function(g,k,t){return this.get(g,k)||this.set(g,k,t)},clear:g=>d.delete(g),V:()=>a++ +c}})();b.a.I=(()=>{var a=b.a.c.V(),c={1:1,8:1,9:1},d={1:1,9:1};const g=(e,f)=>{var h=b.a.c.get(e,a);f&&!h&&(h=new Set,b.a.c.set(e,
a,h));return h},k=e=>{var f=g(e);f&&(new Set(f)).forEach(h=>h(e));b.a.c.clear(e);d[e.nodeType]&&t(e.childNodes,!0)},t=(e,f)=>{for(var h=[],r,p=0;p<e.length;p++)if(!f||8===e[p].nodeType)if(k(h[h.length]=r=e[p]),e[p]!==r)for(;p--&&!h.includes(e[p]););};return{ma:(e,f)=>{if("function"!=typeof f)throw Error("Callback must be a function");g(e,1).add(f)},fb:(e,f)=>{var h=g(e);h&&(h.delete(f),h.size||b.a.c.set(e,a,null))},ca:e=>{b.l.N(()=>{c[e.nodeType]&&(k(e),d[e.nodeType]&&t(e.getElementsByTagName("*")))});
return e},removeNode:e=>{b.ca(e);e.parentNode&&e.parentNode.removeChild(e)}}})();b.ca=b.a.I.ca;b.removeNode=b.a.I.removeNode;b.m("utils.domNodeDisposal",b.a.I);b.m("utils.domNodeDisposal.addDisposeCallback",b.a.I.ma);b.Rb=(()=>{function a(){if(g)for(var f=g,h=0,r;t<g;)if(r=d[t++]){if(t>f){if(5E3<=++h){t=g;setTimeout(()=>{throw Error(`'Too much recursion' after processing ${h} task groups.`);},0);break}f=g}try{r()}catch(p){setTimeout(()=>{throw p;},0)}}}function c(){a();t=g=d.length=0}var d=[],g=0,
k=1,t=0,e=(f=>{var h=L.createElement("div");(new MutationObserver(f)).observe(h,{attributes:!0});return()=>h.classList.toggle("foo")})(c);return{Nb:f=>{g||e(c);d[g++]=f;return k++},cancel:f=>{f-=k-g;f>=t&&f<g&&(d[f]=null)}}})();b.Ya={debounce:(a,c)=>a.Ha(d=>W(d,c)),rateLimit:(a,c)=>{if("number"==typeof c)var d=c;else{d=c.timeout;var g=c.method}var k="function"==typeof g?g:V;a.Ha(t=>k(t,d,c))},notify:(a,c)=>{a.ra="always"==c?null:O}};var U={undefined:1,"boolean":1,number:1,string:1};b.m("extenders",
b.Ya);class Z{constructor(a,c,d){this.T=a;this.mb=c;this.oa=d;this.Na=!1;this.C=this.W=null;b.fa(this,"dispose",this.o)}o(){this.Na||(this.C&&b.a.I.fb(this.W,this.C),this.Na=!0,this.oa(),this.T=this.mb=this.oa=this.W=this.C=null)}i(a){this.W=a;b.a.I.ma(a,this.C=this.o.bind(this))}}b.R=function(){Object.setPrototypeOf(this,H);H.Ea(this)};var H={Ea:a=>{a.S=new Map;a.S.set("change",new Set);a.rb=1},subscribe:function(a,c,d){var g=this;d=d||"change";var k=new Z(g,c?a.bind(c):a,()=>{g.S.get(d).delete(k);
g.wa&&g.wa(d)});g.na&&g.na(d);g.S.has(d)||g.S.set(d,new Set);g.S.get(d).add(k);return k},s:function(a,c){c=c||"change";"change"===c&&this.Ka();if(this.sa(c)){c="change"===c&&this.Tb||new Set(this.S.get(c));try{b.l.wb(),c.forEach(d=>{d.Na||d.mb(a)})}finally{b.l.end()}}},Ca:function(){return this.rb},ec:function(a){return this.Ca()!==a},Ka:function(){++this.rb},Ha:function(a){var c=this,d=b.O(c),g,k,t,e,f;c.va||(c.va=c.s,c.s=function(r,p){p&&"change"!==p?"beforeChange"===p?this.ob(r):this.va(r,p):this.pb(r)});
var h=a(()=>{c.ja=!1;d&&e===c&&(e=c.nb?c.nb():c());var r=k||f&&c.Ga(t,e);f=k=g=!1;r&&c.va(t=e)});c.pb=(r,p)=>{p&&c.ja||(f=!p);c.Tb=new Set(c.S.get("change"));c.ja=g=!0;e=r;h()};c.ob=r=>{g||(t=r,c.va(r,"beforeChange"))};c.qb=()=>{f=!0};c.Vb=()=>{c.Ga(t,c.G(!0))&&(k=!0)}},sa:function(a){return(this.S.get(a)||[]).size},Ga:function(a,c){return!this.ra||!this.ra(a,c)},toString:()=>"[object Object]",extend:function(a){var c=this;a&&b.a.L(a,(d,g)=>{d=b.Ya[d];"function"==typeof d&&(c=d(c,g)||c)});return c}};
b.fa(H,"init",H.Ea);b.fa(H,"subscribe",H.subscribe);b.fa(H,"extend",H.extend);Object.setPrototypeOf(H,Function.prototype);b.R.fn=H;b.ic=a=>null!=a&&"function"==typeof a.subscribe&&"function"==typeof a.s;(()=>{var a=[],c,d=0;b.l={wb:g=>{a.push(c);c=g},end:()=>c=a.pop(),Mb:g=>{if(c){if(!b.ic(g))throw Error("Only subscribable things can act as dependencies");c.Xb.call(c.Yb,g,g.Ub||(g.Ub=++d))}},N:(g,k,t)=>{try{return a.push(c),c=void 0,g.apply(k,t||[])}finally{c=a.pop()}},Ba:()=>c&&c.j.Ba(),ab:()=>c&&
c.ab,j:()=>c&&c.j}})();const G=Symbol("_latestValue");b.Z=a=>{function c(){if(0<arguments.length)return c.Ga(c[G],arguments[0])&&(c.kb(),c[G]=arguments[0],c.La()),this;b.l.Mb(c);return c[G]}c[G]=a;Object.defineProperty(c,"length",{get:()=>null==c[G]?void 0:c[G].length});b.R.fn.Ea(c);Object.setPrototypeOf(c,J);return c};var J={toJSON:function(){let a=this[G];return a&&a.toJSON?a.toJSON():a},ra:O,G:function(){return this[G]},La:function(){this.s(this[G],"spectate");this.s(this[G])},kb:function(){this.s(this[G],
"beforeChange")}};Object.setPrototypeOf(J,b.R.fn);var K=b.Z.C="__ko_proto__";J[K]=b.Z;b.O=a=>{if((a="function"==typeof a&&a[K])&&a!==J[K]&&a!==b.j.fn[K])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!a};b.jc=a=>"function"==typeof a&&(a[K]===J[K]||a[K]===b.j.fn[K]&&a.fc);b.m("observable",b.Z);b.m("isObservable",b.O);b.m("observable.fn",J);b.fa(J,"valueHasMutated",J.La);b.ha=a=>{a=a||[];if("object"!=typeof a||!("length"in a))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");
a=b.Z(a);Object.setPrototypeOf(a,b.ha.fn);return a.extend({trackArrayChanges:!0})};b.ha.fn={remove:function(a){for(var c=this.G(),d=!1,g="function"!=typeof a||b.O(a)?e=>e===a:a,k=c.length;k--;){var t=c[k];if(g(t)){if(c[k]!==t)throw Error("Array modified during remove; cannot remove item");d||this.kb();d=!0;c.splice(k,1)}}d&&this.La()}};Object.setPrototypeOf(b.ha.fn,b.Z.fn);Object.getOwnPropertyNames(Array.prototype).forEach(a=>{"function"===typeof Array.prototype[a]&&"constructor"!=a&&("copyWithin fill pop push reverse shift sort splice unshift".split(" ").includes(a)?
b.ha.fn[a]=function(...c){var d=this.G();this.kb();this.yb(d,a,c);c=d[a](...c);this.La();return c===d?this:c}:b.ha.fn[a]=function(...c){return this()[a](...c)})});b.Hb=a=>b.O(a)&&"function"==typeof a.remove&&"function"==typeof a.push;b.m("observableArray",b.ha);b.m("isObservableArray",b.Hb);b.Ya.trackArrayChanges=(a,c)=>{function d(){function q(){if(f){var l=[].concat(a.G()||[]);if(a.sa("arrayChange")){if(!k||1<f)k=b.a.zb(h,l,a.Qa);var n=k}h=l;k=null;f=0;n&&n.length&&a.s(n,"arrayChange")}}g?q():(g=
!0,e=a.subscribe(()=>++f,null,"spectate"),h=[].concat(a.G()||[]),k=null,t=a.subscribe(q))}a.Qa={};c&&"object"==typeof c&&b.a.extend(a.Qa,c);a.Qa.sparse=!0;if(!a.yb){var g=!1,k=null,t,e,f=0,h,r=a.na,p=a.wa;a.na=q=>{r&&r.call(a,q);"arrayChange"===q&&d()};a.wa=q=>{p&&p.call(a,q);"arrayChange"!==q||a.sa("arrayChange")||(t&&t.o(),e&&e.o(),e=t=null,g=!1,h=void 0)};a.yb=(q,l,n)=>{function m(E,C,z){return u[u.length]={status:E,value:C,index:z}}if(g&&!f){var u=[],w=q.length,v=n.length,y=0;switch(l){case "push":y=
w;case "unshift":for(q=0;q<v;q++)m("added",n[q],y+q);break;case "pop":y=w-1;case "shift":w&&m("deleted",q[y],y);break;case "splice":y=Math.min(Math.max(0,0>n[0]?w+n[0]:n[0]),w);w=1===v?w:Math.min(y+(n[1]||0),w);v=y+v-2;l=Math.max(w,v);var x=[],B=[];for(let E=y,C=2;E<l;++E,++C)E<w&&B.push(m("deleted",q[E],E)),E<v&&x.push(m("added",n[C],E));b.a.Eb(B,x);break;default:return}k=u}}}};var A=Symbol("_state");b.j=(a,c)=>{function d(){if(0<arguments.length){if("function"!==typeof g)throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");
g(...arguments);return this}k.X||b.l.Mb(d);(k.U||k.v&&d.ta())&&d.P();return k.J}"object"===typeof a?c=a:(c=c||{},a&&(c.read=a));if("function"!=typeof c.read)throw Error("Pass a function that returns the value of the ko.computed");var g=c.write,k={J:void 0,Y:!0,U:!0,Fa:!1,ib:!1,X:!1,eb:!1,v:!1,Lb:c.read,i:c.disposeWhenNodeIsRemoved||c.i||null,pa:c.disposeWhen||c.pa,Va:null,u:{},H:0,Db:null};d[A]=k;d.fc="function"===typeof g;b.R.fn.Ea(d);Object.setPrototypeOf(d,M);c.pure?(k.eb=!0,k.v=!0,b.a.extend(d,
aa)):c.deferEvaluation&&b.a.extend(d,ba);k.i&&(k.ib=!0,k.i.nodeType||(k.i=null));k.v||c.deferEvaluation||d.P();k.i&&d.ga()&&b.a.I.ma(k.i,k.Va=()=>{d.o()});return d};var M={ra:O,Ba:function(){return this[A].H},cc:function(){var a=[];b.a.L(this[A].u,(c,d)=>a[d.ka]=d.T);return a},$a:function(a){if(!this[A].H)return!1;var c=this.cc();return c.includes(a)||!!c.find(d=>d.$a&&d.$a(a))},sb:function(a,c,d){if(this[A].eb&&c===this)throw Error("A 'pure' computed must not be called recursively");this[A].u[a]=
d;d.ka=this[A].H++;d.la=c.Ca()},ta:function(){var a,c=this[A].u;for(a in c)if(Object.prototype.hasOwnProperty.call(c,a)){var d=c[a];if(this.ia&&d.T.ja||d.T.ec(d.la))return!0}},uc:function(){this.ia&&!this[A].Fa&&this.ia(!1)},ga:function(){var a=this[A];return a.U||0<a.H},vc:function(){this.ja?this[A].U&&(this[A].Y=!0):this.Cb()},Qb:function(a){return a.subscribe(this.Cb,this)},Cb:function(){var a=this,c=a.throttleEvaluation;c&&0<=c?(clearTimeout(this[A].Db),this[A].Db=setTimeout(()=>a.P(!0),c)):a.ia?
a.ia(!0):a.P(!0)},P:function(a){var c=this[A],d=c.pa,g=!1;if(!c.Fa&&!c.X){if(c.i&&!b.a.Wa(c.i)||d&&d()){if(!c.ib){this.o();return}}else c.ib=!1;c.Fa=!0;try{g=this.ac(a)}finally{c.Fa=!1}return g}},ac:function(a){var c=this[A],d=c.eb?void 0:!c.H;var g={Zb:this,za:c.u,Ta:c.H};b.l.wb({Yb:g,Xb:Y,j:this,ab:d});c.u={};c.H=0;a:{try{var k=c.Lb();break a}finally{b.l.end(),g.Ta&&!c.v&&b.a.L(g.za,X),c.Y=c.U=!1}k=void 0}c.H?g=this.Ga(c.J,k):(this.o(),g=!0);g&&(c.v?this.Ka():this.s(c.J,"beforeChange"),c.J=k,this.s(c.J,
"spectate"),!c.v&&a&&this.s(c.J),this.qb&&this.qb());d&&this.s(c.J,"awake");return g},G:function(a){var c=this[A];(c.U&&(a||!c.H)||c.v&&this.ta())&&this.P();return c.J},Ha:function(a){b.R.fn.Ha.call(this,a);this.nb=function(){this[A].v||(this[A].Y?this.P():this[A].U=!1);return this[A].J};this.ia=function(c){this.ob(this[A].J);this[A].U=!0;c&&(this[A].Y=!0);this.pb(this,!c)}},o:function(){var a=this[A];!a.v&&a.u&&b.a.L(a.u,(c,d)=>d.o&&d.o());a.i&&a.Va&&b.a.I.fb(a.i,a.Va);a.u=void 0;a.H=0;a.X=!0;a.Y=
!1;a.U=!1;a.v=!1;a.i=void 0;a.pa=void 0;a.Lb=void 0}},aa={na:function(a){var c=this,d=c[A];if(!d.X&&d.v&&"change"==a){d.v=!1;if(d.Y||c.ta())d.u=null,d.H=0,c.P()&&c.Ka();else{var g=[];b.a.L(d.u,(k,t)=>g[t.ka]=k);g.forEach((k,t)=>{var e=d.u[k],f=c.Qb(e.T);f.ka=t;f.la=e.la;d.u[k]=f});c.ta()&&c.P()&&c.Ka()}d.X||c.s(d.J,"awake")}},wa:function(a){var c=this[A];c.X||"change"!=a||this.sa("change")||(b.a.L(c.u,(d,g)=>{g.o&&(c.u[d]={T:g.T,ka:g.ka,la:g.la},g.o())}),c.v=!0,this.s(void 0,"asleep"))},Ca:function(){var a=
this[A];a.v&&(a.Y||this.ta())&&this.P();return b.R.fn.Ca.call(this)}},ba={na:function(a){"change"!=a&&"beforeChange"!=a||this.G()}};Object.setPrototypeOf(M,b.R.fn);var Q=b.Z.C;M[Q]=b.j;b.m("computed",b.j);b.m("isComputed",a=>"function"==typeof a&&a[Q]===M[Q]);b.m("computed.fn",M);b.fa(M,"dispose",M.o);b.oc=a=>{if("function"===typeof a)return b.j(a,{pure:!0});a={...a,pure:!0};return b.j(a)};(()=>{b.A={M:a=>{switch(a.nodeName){case "OPTION":return!0===a.__ko__hasDomDataOptionValue__?b.a.c.get(a,b.b.options.cb):
a.value;case "SELECT":return 0<=a.selectedIndex?b.A.M(a.options[a.selectedIndex]):void 0;default:return a.value}},Ma:(a,c,d)=>{switch(a.nodeName){case "OPTION":"string"===typeof c?(b.a.c.set(a,b.b.options.cb,void 0),delete a.__ko__hasDomDataOptionValue__,a.value=c):(b.a.c.set(a,b.b.options.cb,c),a.__ko__hasDomDataOptionValue__=!0,a.value="number"===typeof c?c:"");break;case "SELECT":for(var g=-1,k=""===c||null==c,t=0,e=a.options.length,f;t<e;++t)if(f=b.A.M(a.options[t]),f==c||""===f&&k){g=t;break}if(d||
0<=g||k&&1<a.size)a.selectedIndex=g;break;default:a.value=null==c?"":c}}}})();b.F=(()=>{function a(f){f=b.a.Pb(f);123===f.charCodeAt(0)&&(f=f.slice(1,-1));f+="\n,";var h=[],r=f.match(g),p=[],q=0;if(1<r.length){for(var l=0,n;n=r[l++];){var m=n.charCodeAt(0);if(44===m){if(0>=q){h.push(u&&p.length?{key:u,value:p.join("")}:{unknown:u||p.join("")});var u=q=0;p=[];continue}}else if(58===m){if(!q&&!u&&1===p.length){u=p.pop();continue}}else if(47===m&&1<n.length&&(47===n.charCodeAt(1)||42===n.charCodeAt(1)))continue;
else 47===m&&l&&1<n.length?(m=r[l-1].match(k))&&!t[m[0]]&&(f=f.slice(f.indexOf(n)+1),r=f.match(g),l=-1,n="/"):40===m||123===m||91===m?++q:41===m||125===m||93===m?--q:u||p.length||34!==m&&39!==m||(n=n.slice(1,-1));p.push(n)}if(0<q)throw Error("Unbalanced parentheses, braces, or brackets");}return h}var c=["true","false","null","undefined"],d=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,g=/"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|`(?:\\.|[^`])*`|\/\*(?:[^*]|\*+[^*/])*\*+\/|\/\/.*\n|\/(?:\\.|[^/])+\/w*|[^\s:,/][^,"'`{}()/:[\]]*[^\s,"'`{}()/:[\]]|[^\s]/g,
k=/[\])"'A-Za-z0-9_$]+$/,t={"in":1,"return":1,"typeof":1},e=new Set;return{Pa:[],jb:e,mc:a,nc:function(f,h){function r(m,u){if(!n){var w=b.b[m];if(w&&w.preprocess&&!(u=w.preprocess(u,m,r)))return;if(w=e.has(m)){var v=u;c.includes(v)?v=!1:(w=v.match(d),v=null===w?!1:w[1]?"Object("+w[1]+")"+w[2]:v);w=v}w&&q.push("'"+m+"':function(_z){"+v+"=_z}")}l&&(u="function(){return "+u+" }");p.push("'"+m+"':"+u)}h=h||{};var p=[],q=[],l=h.valueAccessors,n=h.bindingParams;("string"===typeof f?a(f):f).forEach(m=>
r(m.key||m.unknown,m.value));q.length&&r("_ko_property_writers","{"+q.join(",")+" }");return p.join(",")},kc:(f,h)=>-1<f.findIndex(r=>r.key==h),lb:(f,h,r,p,q)=>{if(f&&b.O(f))!b.jc(f)||q&&f.G()===p||f(p);else if((f=h.get("_ko_property_writers"))&&f[r])f[r](p)}}})();(()=>{function a(e){return 8==e.nodeType&&g.test(e.nodeValue)}function c(e){return 8==e.nodeType&&k.test(e.nodeValue)}function d(e,f){for(var h=e,r=1,p=[];h=h.nextSibling;){if(c(h)&&(b.a.c.set(h,t,!0),!--r))return p;p.push(h);a(h)&&++r}if(!f)throw Error("Cannot find closing comment tag to match: "+
e.nodeValue);return null}var g=/^\s*ko(?:\s+([\s\S]+))?\s*$/,k=/^\s*\/ko\s*$/,t="__ko_matchedEndComment__";b.h={$:{},childNodes:e=>a(e)?d(e):e.childNodes,qa:e=>{a(e)?(e=d(e))&&[...e].forEach(f=>b.removeNode(f)):b.a.Xa(e)},ua:(e,f)=>{a(e)?(b.h.qa(e),e.after(...f)):b.a.ua(e,f)},prepend:(e,f)=>{a(e)?e.nextSibling.before(f):e.prepend(f)},Gb:(e,f,h)=>{h?h.after(f):b.h.prepend(e,f)},firstChild:e=>{if(a(e))return e=e.nextSibling,!e||c(e)?null:e;let f=e.firstChild;if(f&&c(f))throw Error("Found invalid end comment, as the first child of "+
e);return f},nextSibling:e=>{if(a(e)){var f=d(e,void 0);e=f?(f.length?f[f.length-1]:e).nextSibling:null}if((f=e.nextSibling)&&c(f)){if(c(f)&&!b.a.c.get(f,t))throw Error("Found end comment without a matching opening comment, as child of "+e);return null}return f},dc:a,sc:e=>(e=e.nodeValue.match(g))?e[1]:null}})();(()=>{const a=new Map;b.xb=new class{lc(c){switch(c.nodeType){case 1:return null!=c.getAttribute("data-bind");case 8:return b.h.dc(c);default:return!1}}bc(c,d){a:{switch(c.nodeType){case 1:var g=
c.getAttribute("data-bind");break a;case 8:g=b.h.sc(c);break a}g=null}if(g)try{let t={valueAccessors:!0},e=a.get(g);if(!e){var k="with($context){with($data||{}){return{"+b.F.nc(g,t)+"}}}";e=new Function("$context","$element",k);a.set(g,e)}return e(d,c)}catch(t){throw t.message="Unable to parse bindings.\nBindings value: "+g+"\nMessage: "+t.message,t;}return null}}})();(()=>{function a(l){var n=(l=b.a.c.get(l,p))&&l.D;n&&(l.D=null,n.Kb())}function c(l,n){for(var m,u=b.h.firstChild(n);m=u;)u=b.h.nextSibling(m),
d(l,m);b.g.notify(n,b.g.B)}function d(l,n){var m=l;if(1===n.nodeType||b.xb.lc(n))m=k(n,null,l).bindingContextForDescendants;m&&n.matches&&!n.matches("SCRIPT,TEXTAREA,TEMPLATE")&&c(m,n)}function g(l){var n=[],m={},u=[];b.a.L(l,function y(v){if(!m[v]){var x=b.b[v];x&&(x.after&&(u.push(v),x.after.forEach(B=>{if(l[B]){if(u.includes(B))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+u.join(", "));y(B)}}),u.length--),n.push({key:v,Fb:x}));m[v]=!0}});return n}
function k(l,n,m){var u=b.a.c.Za(l,p,{}),w=u.Wb;if(!n){if(w)throw Error("You cannot apply bindings multiple times to the same element.");u.Wb=!0}w||(u.context=m);u.bb||(u.bb={});if(n&&"function"!==typeof n)var v=n;else{var y=b.j(()=>{if(v=n?n(m,l):b.xb.bc(l,m)){if(m[e])m[e]();if(m[h])m[h]()}return v},{i:l});v&&y.ga()||(y=null)}var x=m,B;if(v){var E=y?z=>()=>y()[z]():z=>v[z],C={get:z=>v[z]&&E(z)(),has:z=>z in v};b.g.B in v&&b.g.subscribe(l,b.g.B,()=>{var z=v[b.g.B]();if(z){var D=b.h.childNodes(l);
D.length&&z(D,b.Bb(D[0]))}});b.g.da in v&&(x=b.g.hb(l,m),b.g.subscribe(l,b.g.da,()=>{var z=v[b.g.da]();z&&b.h.firstChild(l)&&z(l)}));g(v).forEach(z=>{var D=z.Fb.init,F=z.Fb.update,I=z.key;if(8===l.nodeType&&!b.h.$[I])throw Error("The binding '"+I+"' cannot be used with virtual elements");try{"function"==typeof D&&b.l.N(()=>{var N=D(l,E(I),C,x.$data,x);if(N&&N.controlsDescendantBindings){if(void 0!==B)throw Error("Multiple bindings ("+B+" and "+I+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");
B=I}}),"function"==typeof F&&b.j(()=>F(l,E(I),C,x.$data,x),{i:l})}catch(N){throw N.message='Unable to process binding "'+I+": "+v[I]+'"\nMessage: '+N.message,N;}})}u=void 0===B;return{shouldBindDescendants:u,bindingContextForDescendants:u&&x}}function t(l,n){return l&&l instanceof b.ba?l:new b.ba(l,void 0,void 0,n)}var e=Symbol("_subscribable"),f=Symbol("_ancestorBindingInfo"),h=Symbol("_dataDependency");b.b={};var r={};b.ba=class{constructor(l,n,m,u,w){function v(){var D=E?B():B,F=b.a.f(D);n?(b.a.extend(y,
n),f in n&&(y[f]=n[f])):(y.$parents=[],y.$root=F,y.ko=b);y[e]=z;x?F=y.$data:(y.$rawData=D,y.$data=F);m&&(y[m]=F);u&&u(y,n,F);if(n&&n[e]&&!b.l.j().$a(n[e]))n[e]();C&&(y[h]=C);return y.$data}var y=this,x=l===r,B=x?void 0:l,E="function"==typeof B&&!b.O(B),C=w&&w.dataDependency;if(w&&w.exportDependencies)v();else{var z=b.oc(v);z.G();z.ga()?z.ra=null:y[e]=void 0}}["createChildContext"](l,n,m,u){!u&&n&&"object"==typeof n&&(u=n,n=u.as,m=u.extend);return new b.ba(l,this,n,(w,v)=>{w.$parentContext=v;w.$parent=
v.$data;w.$parents=(v.$parents||[]).slice(0);w.$parents.unshift(w.$parent);m&&m(w)},u)}["extend"](l,n){return new b.ba(r,this,null,m=>b.a.extend(m,"function"==typeof l?l(m):l),n)}};var p=b.a.c.V();class q{constructor(l,n,m){this.C=l;this.oa=n;this.xa=new Set;this.B=!1;n.D||b.a.I.ma(l,a);m&&m.D&&(m.D.xa.add(l),this.W=m)}Kb(){this.W&&this.W.D&&this.W.D.$b(this.C)}$b(l){this.xa.delete(l);!this.xa.size&&this.B&&this.Ab()}Ab(){this.B=!0;this.oa.D&&!this.xa.size&&(this.oa.D=null,b.a.I.fb(this.C,a),b.g.notify(this.C,
b.g.da),this.Kb())}}b.g={B:"childrenComplete",da:"descendantsComplete",subscribe:(l,n,m,u,w)=>{var v=b.a.c.Za(l,p,{});v.ea||(v.ea=new b.R);w&&w.notifyImmediately&&v.bb[n]&&b.l.N(m,u,[l]);return v.ea.subscribe(m,u,n)},notify:(l,n)=>{var m=b.a.c.get(l,p);if(m&&(m.bb[n]=!0,m.ea&&m.ea.s(l,n),n==b.g.B))if(m.D)m.D.Ab();else if(void 0===m.D&&m.ea&&m.ea.sa(b.g.da))throw Error("descendantsComplete event not supported for bindings on this node");},hb:(l,n)=>{var m=b.a.c.Za(l,p,{});m.D||(m.D=new q(l,m,n[f]));
return n[f]==m?n:n.extend(u=>{u[f]=m})}};b.rc=l=>(l=b.a.c.get(l,p))&&l.context;b.tb=(l,n,m)=>k(l,n,t(m));b.vb=(l,n)=>{1!==n.nodeType&&8!==n.nodeType||c(t(l),n)};b.ub=function(l,n,m){if(2>arguments.length){if(n=L.body,!n)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?");}else if(!n||1!==n.nodeType&&8!==n.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");d(t(l,m),n)};b.Bb=l=>(l=l&&[1,
8].includes(l.nodeType)&&b.rc(l))?l.$data:void 0;b.m("bindingHandlers",b.b);b.m("applyBindings",b.ub);b.m("applyBindingAccessorsToNode",b.tb);b.m("dataFor",b.Bb)})();(()=>{function a(f,h){var r={},p=t[f]||{},q=p.template;p=p.viewModel;if(q){q.element||c(f,"Unknown template value: "+q);q=q.element;var l=L.getElementById(q);l||c(f,"Cannot find element with ID "+q);l.matches("TEMPLATE")||c(f,"Template Source Element not a <template>");r.template=b.a.ya(l.content.childNodes)}p&&("function"!==typeof p[e]&&
c(f,"Unknown viewModel value: "+p),r[e]=p[e]);r.template&&r[e]?h(r):h(null)}function c(f,h){throw Error(`Component '${f}': ${h}`);}function d(f,h){var r=!1;a(f,p=>{(r=null!=p)&&h(p)});r||h(null)}var g=Object.create(null),k=Object.create(null);b.Ra={get:(f,h)=>{var r=k[f];if(r)b.Rb.Nb(()=>h(r.definition));else{var p=g[f];if(p)p.subscribe(h);else{p=g[f]=new b.R;p.subscribe(h);d(f,l=>{k[f]={definition:l};delete g[f];q?p.s(l):b.Rb.Nb(()=>p.s(l))});var q=!0}}},tc:f=>delete k[f],register:(f,h)=>{if(!h)throw Error("Invalid configuration for "+
f);if(t[f])throw Error("Component "+f+" is already registered");t[f]=h}};var t=Object.create(null),e="createViewModel";b.m("components",b.Ra);b.m("components.register",b.Ra.register)})();(()=>{var a=0;b.b.component={init:(c,d,g,k,t)=>{var e,f,h,r=()=>{var q=e&&e.dispose;"function"===typeof q&&q.call(e);h&&h.o();f=e=h=null},p=[...b.h.childNodes(c)];b.h.qa(c);b.a.I.ma(c,r);b.j(()=>{var q=b.a.f(d());if("string"!==typeof q){var l=b.a.f(q.params);q=b.a.f(q.name)}if(!q)throw Error("No component name specified");
var n=b.g.hb(c,t),m=f=++a;b.Ra.get(q,u=>{if(f===m){r();if(!u)throw Error("Unknown component '"+q+"'");var w=u.template;if(!w)throw Error("Component '"+q+"' has no template");b.h.ua(c,b.a.ya(w));e=u.createViewModel(l,{element:c,templateNodes:p});b.vb(n.createChildContext(e,{extend:v=>{v.$component=e;v.$componentTemplateNodes=p}}),c)}})},{i:c});return{controlsDescendantBindings:!0}}};b.h.$.component=!0})();b.b.attr={update:(a,c)=>{c=b.a.f(c())||{};b.a.L(c,function(d,g){g=b.a.f(g);var k=d.indexOf(":");
k="lookupNamespaceURI"in a&&0<k&&a.lookupNamespaceURI(d.slice(0,k));var t=!1===g||null==g;t?k?a.removeAttributeNS(k,d):a.removeAttribute(d):g=g.toString();t||(k?a.setAttributeNS(k,d,g):a.setAttribute(d,g));"name"===d&&(a.name=t?"":g)})}};var R=(a,c,d)=>{c&&c.split(/\s+/).forEach(g=>a.classList.toggle(g,d))};b.b.css={update:(a,c)=>{c=b.a.f(c());null!==c&&"object"==typeof c?b.a.L(c,(d,g)=>{g=b.a.f(g);R(a,d,!!g)}):(c=b.a.Pb(c),R(a,a.__ko__cssValue,!1),a.__ko__cssValue=c,R(a,c,!0))}};b.b.enable={update:(a,
c)=>{(c=b.a.f(c()))&&a.disabled?a.removeAttribute("disabled"):c||a.disabled||(a.disabled=!0)}};b.b.disable={update:(a,c)=>b.b.enable.update(a,()=>!b.a.f(c()))};b.b.event={init:(a,c,d,g,k)=>{d=c()||{};b.a.L(d,t=>{"string"==typeof t&&a.addEventListener(t,function(e){var f=c()[t];if(f)try{g=k.$data;var h=f.apply(g,[g,...arguments])}finally{!0!==h&&e.preventDefault()}})})}};b.b.foreach={Ib:a=>()=>{var c=a(),d=b.O(c)?c.G():c;if(!d||"number"==typeof d.length)return{foreach:c};b.a.f(c);return{foreach:d.data,
as:d.as,beforeRemove:d.beforeRemove}},init:(a,c)=>b.b.template.init(a,b.b.foreach.Ib(c)),update:(a,c,d,g,k)=>b.b.template.update(a,b.b.foreach.Ib(c),d,g,k)};b.F.Pa.foreach=!1;b.h.$.foreach=!0;b.b.hasfocus={init:(a,c,d)=>{var g=t=>{a.__ko_hasfocusUpdating=!0;t=a.ownerDocument.activeElement===a;var e=c();b.F.lb(e,d,"hasfocus",t,!0);a.__ko_hasfocusLastValue=t;a.__ko_hasfocusUpdating=!1},k=g.bind(null,!0);g=g.bind(null,!1);a.addEventListener("focus",k);a.addEventListener("focusin",k);a.addEventListener("blur",
g);a.addEventListener("focusout",g);a.__ko_hasfocusLastValue=!1},update:(a,c)=>{c=!!b.a.f(c());a.__ko_hasfocusUpdating||a.__ko_hasfocusLastValue===c||(c?a.focus():a.blur())}};b.F.jb.add("hasfocus");b.b.html={init:()=>({controlsDescendantBindings:!0}),update:(a,c)=>{b.a.Xa(a);c=b.a.f(c());if(null!=c){const d=L.createElement("template");d.innerHTML="string"!=typeof c?c.toString():c;a.appendChild(d.content)}}};(function(){function a(c,d,g){b.b[c]={init:(k,t,e,f,h)=>{var r,p={};d&&(p={as:e.get("as"),
exportDependencies:!0});var q=e.has(b.g.da);b.j(()=>{var l=b.a.f(t()),n=!g!==!l,m=!r;q&&(h=b.g.hb(k,h));if(n){p.dataDependency=b.l.j();var u=d?h.createChildContext("function"==typeof l?l:t,p):b.l.Ba()?h.extend(null,p):h}m&&b.l.Ba()&&(r=b.a.ya(b.h.childNodes(k),!0));n?(m||b.h.ua(k,b.a.ya(r)),b.vb(u,k)):(b.h.qa(k),b.g.notify(k,b.g.B))},{i:k});return{controlsDescendantBindings:!0}}};b.F.Pa[c]=!1;b.h.$[c]=!0}a("if");a("ifnot",!1,!0);a("with",!0)})();var S={};b.b.options={init:a=>{if(!a.matches("SELECT"))throw Error("options binding applies only to SELECT elements");
for(;0<a.length;)a.remove(0);return{controlsDescendantBindings:!0}},update:(a,c,d)=>{function g(){return Array.from(a.options).filter(m=>m.selected)}function k(m,u,w){var v=typeof u;return"function"==v?u(m):"string"==v?m[u]:w}function t(m,u){l&&r?b.g.notify(a,b.g.B):p.length&&(m=p.includes(b.A.M(u[0])),u[0].selected=m,l&&!m&&b.l.N(b.a.Sb,null,[a,"change"]))}var e=a.multiple,f=0!=a.length&&e?a.scrollTop:null,h=b.a.f(c()),r=d.get("valueAllowUnset")&&d.has("value");c={};var p=[];r||(e?p=g().map(b.A.M):
0<=a.selectedIndex&&p.push(b.A.M(a.options[a.selectedIndex])));if(h){"undefined"==typeof h.length&&(h=[h]);var q=h.filter(m=>m||null==m);d.has("optionsCaption")&&(h=b.a.f(d.get("optionsCaption")),null!==h&&void 0!==h&&q.unshift(S))}var l=!1;c.beforeRemove=m=>a.removeChild(m);h=t;d.has("optionsAfterRender")&&"function"==typeof d.get("optionsAfterRender")&&(h=(m,u)=>{t(m,u);b.l.N(d.get("optionsAfterRender"),null,[u[0],m!==S?m:void 0])});b.a.Ob(a,q,function(m,u,w){w.length&&(p=!r&&w[0].selected?[b.A.M(w[0])]:
[],l=!0);u=a.ownerDocument.createElement("option");m===S?(b.a.gb(u,d.get("optionsCaption")),b.A.Ma(u,void 0)):(w=k(m,d.get("optionsValue"),m),b.A.Ma(u,b.a.f(w)),m=k(m,d.get("optionsText"),w),b.a.gb(u,m));return[u]},c,h);if(!r){var n;e?n=p.length&&g().length<p.length:n=p.length&&0<=a.selectedIndex?b.A.M(a.options[a.selectedIndex])!==p[0]:p.length||0<=a.selectedIndex;n&&b.l.N(b.a.Sb,null,[a,"change"])}(r||b.l.ab())&&b.g.notify(a,b.g.B);f&&20<Math.abs(f-a.scrollTop)&&(a.scrollTop=f)}};b.b.options.cb=
b.a.c.V();b.b.style={update:(a,c)=>{c=b.a.f(c()||{});b.a.L(c,(d,g)=>{g=b.a.f(g);if(null==g||!1===g)g="";if(/^--/.test(d))a.style.setProperty(d,g);else{d=d.replace(/-(\w)/g,(t,e)=>e.toUpperCase());var k=a.style[d];a.style[d]=g;g===k||a.style[d]!=k||isNaN(g)||(a.style[d]=g+"px")}})}};b.b.submit={init:(a,c,d,g,k)=>{if("function"!=typeof c())throw Error("The value for a submit binding must be a function");a.addEventListener("submit",t=>{var e=c();try{var f=e.call(k.$data,a)}finally{!0!==f&&(t.preventDefault?
t.preventDefault():t.returnValue=!1)}})}};b.b.text={init:()=>({controlsDescendantBindings:!0}),update:(a,c)=>{8===a.nodeType&&(a.text||a.after(a.text=L.createTextNode("")),a=a.text);b.a.gb(a,c())}};b.h.$.text=!0;b.b.textInput={init:(a,c,d)=>{var g=a.value,k,t,e=()=>{clearTimeout(k);t=k=void 0;var h=a.value;g!==h&&(g=h,b.F.lb(c(),d,"textInput",h))},f=()=>{var h=b.a.f(c());null==h&&(h="");void 0!==t&&h===t?setTimeout(f,4):a.value!==h&&(a.value=h,g=a.value)};a.addEventListener("input",e);a.addEventListener("change",
e);a.addEventListener("blur",e);b.j(f,{i:a})}};b.F.jb.add("textInput");b.b.textinput={preprocess:(a,c,d)=>d("textInput",a)};b.b.value={init:(a,c,d)=>{var g=a.matches("SELECT"),k=a.matches("INPUT");if(!k||"checkbox"!=a.type&&"radio"!=a.type){var t=new Set,e=d.get("valueUpdate"),f=null;e&&("string"==typeof e?t.add(e):e.forEach(q=>t.add(q)),t.delete("change"));var h=()=>{f=null;var q=c(),l=b.A.M(a);b.F.lb(q,d,"value",l)};t.forEach(q=>{var l=h;(q||"").startsWith("after")&&(l=()=>{f=b.A.M(a);setTimeout(h,
0)},q=q.slice(5));a.addEventListener(q,l)});var r=k&&"file"==a.type?()=>{var q=b.a.f(c());null==q||""===q?a.value="":b.l.N(h)}:()=>{var q=b.a.f(c()),l=b.A.M(a);if(null!==f&&q===f)setTimeout(r,0);else if(q!==l||void 0===l)g?(l=d.get("valueAllowUnset"),b.A.Ma(a,q,l),l||q===b.A.M(a)||b.l.N(h)):b.A.Ma(a,q)};if(g){var p;b.g.subscribe(a,b.g.B,()=>{p?d.get("valueAllowUnset")?r():h():(a.addEventListener("change",h),p=b.j(r,{i:a}))},null,{notifyImmediately:!0})}else a.addEventListener("change",h),b.j(r,{i:a})}else b.tb(a,
{checkedValue:c})},update:()=>{}};b.F.jb.add("value");b.b.visible={update:(a,c)=>{c=b.a.f(c());var d="none"!=a.style.display;c&&!d?a.style.display="":d&&!c&&(a.style.display="none")}};b.b.hidden={update:(a,c)=>a.hidden=!!b.a.f(c())};(function(a){b.b[a]={init:function(c,d,g,k,t){return b.b.event.init.call(this,c,()=>({[a]:d()}),g,k,t)}}})("click");(()=>{let a=b.a.c.V();class c{constructor(g){this.Ua=g}Ia(...g){let k=this.Ua;if(!g.length)return b.a.c.get(k,a)||(11===this.C?k.content:1===this.C?k:void 0);
b.a.c.set(k,a,g[0])}}class d extends c{constructor(g){super(g);g&&(this.C=g.matches("TEMPLATE")&&g.content?g.content.nodeType:1)}}b.Ja={Ua:d,Oa:c}})();(()=>{function a(e,f){if(e.length){var h=e[0],r=h.parentNode;g(h,e[e.length-1],p=>{1!==p.nodeType&&8!==p.nodeType||b.ub(f,p)});b.a.Aa(e,r)}}function c(e,f,h,r){var p=(e&&(e.nodeType?e:0<e.length?e[0]:null)||h||{}).ownerDocument;if("string"==typeof h){p=p||L;p=p.getElementById(h);if(!p)throw Error("Cannot find template with ID "+h);h=new b.Ja.Ua(p)}else if([1,
8].includes(h.nodeType))h=new b.Ja.Oa(h);else throw Error("Unknown template type: "+h);h=(h=h.Ia?h.Ia():null)?[...h.cloneNode(!0).childNodes]:null;if("number"!=typeof h.length||0<h.length&&"number"!=typeof h[0].nodeType)throw Error("Template engine must return an array of DOM nodes");p=!1;switch(f){case "replaceChildren":b.h.ua(e,h);p=!0;break;case "ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+f);}p&&(a(h,r),"replaceChildren"==f&&b.g.notify(e,b.g.B));return h}function d(e,f,
h){return b.O(e)?e():"function"===typeof e?e(f,h):e}var g=(e,f,h)=>{var r;for(f=b.h.nextSibling(f);e&&(r=e)!==f;)e=b.h.nextSibling(r),h(r,e)};b.pc=function(e,f,h,r){h=h||{};var p=p||"replaceChildren";if(r){var q=r.nodeType?r:0<r.length?r[0]:null;return b.j(()=>{var l=f&&f instanceof b.ba?f:new b.ba(f,null,null,null,{exportDependencies:!0}),n=d(e,l.$data,l);c(r,p,n,l,h)},{pa:()=>!q||!b.a.Wa(q),i:q})}console.log("no targetNodeOrNodeArray")};b.qc=(e,f,h,r,p)=>{function q(v,y){b.l.N(b.a.Ob,null,[r,v,
m,h,u,y]);b.g.notify(r,b.g.B)}var l,n=h.as,m=(v,y)=>{l=p.createChildContext(v,{as:n,extend:x=>{x.$index=y;n&&(x[n+"Index"]=y)}});v=d(e,v,l);return c(r,"ignoreTargetNode",v,l,h)},u=(v,y)=>{a(y,l);l=null};if(!h.beforeRemove&&b.Hb(f)){q(f.G());var w=f.subscribe(v=>{q(f(),v)},null,"arrayChange");w.i(r);return w}return b.j(()=>{var v=b.a.f(f)||[];"undefined"==typeof v.length&&(v=[v]);q(v)},{i:r})};var k=b.a.c.V(),t=b.a.c.V();b.b.template={init:(e,f)=>{f=b.a.f(f());if("string"==typeof f||"name"in f)b.h.qa(e);
else if("nodes"in f){f=f.nodes||[];if(b.O(f))throw Error('The "nodes" option must be a plain, non-observable array.');let h=f[0]&&f[0].parentNode;h&&b.a.c.get(h,t)||(h=b.a.Jb(f),b.a.c.set(h,t,!0));(new b.Ja.Oa(e)).Ia(h)}else if(f=b.h.childNodes(e),0<f.length)f=b.a.Jb(f),(new b.Ja.Oa(e)).Ia(f);else throw Error("Anonymous template defined, but no template content was provided");return{controlsDescendantBindings:!0}},update:(e,f,h,r,p)=>{var q=f();f=b.a.f(q);h=!0;r=null;"string"==typeof f?f={}:(q="name"in
f?f.name:e,"if"in f&&(h=b.a.f(f["if"])),h&&"ifnot"in f&&(h=!b.a.f(f.ifnot)),h&&!q&&(h=!1));"foreach"in f?r=b.qc(q,h&&f.foreach||[],f,e,p):h?(h=p,"data"in f&&(h=p.createChildContext(f.data,{as:f.as,exportDependencies:!0})),r=b.pc(q,h,f,e)):b.h.qa(e);p=r;(f=b.a.c.get(e,k))&&"function"==typeof f.o&&f.o();b.a.c.set(e,k,!p||p.ga&&!p.ga()?void 0:p)}};b.F.Pa.template=e=>{e=b.F.mc(e);return 1==e.length&&e[0].unknown||b.F.kc(e,"name")?null:"This template engine does not support anonymous templates nested within its templates"};
b.h.$.template=!0})();b.a.Eb=(a,c,d)=>{if(a.length&&c.length){var g,k,t,e,f;for(g=k=0;(!d||g<d)&&(e=a[k]);++k){for(t=0;f=c[t];++t)if(e.value===f.value){e.moved=f.index;f.moved=e.index;c.splice(t,1);g=t=0;break}g+=t}}};b.a.zb=(()=>{function a(c,d,g,k,t){var e=Math.min,f=Math.max,h=[],r,p=c.length,q,l=d.length,n=l-p||1,m=p+l+1,u;for(r=0;r<=p;r++){var w=u;h.push(u=[]);var v=e(l,r+n);for(q=f(0,r-1);q<=v;q++)u[q]=q?r?c[r-1]===d[q-1]?w[q-1]:e(w[q]||m,u[q-1]||m)+1:q+1:r+1}e=[];f=[];n=[];r=p;for(q=l;r||q;)l=
h[r][q]-1,q&&l===h[r][q-1]?f.push(e[e.length]={status:g,value:d[--q],index:q}):r&&l===h[r-1][q]?n.push(e[e.length]={status:k,value:c[--r],index:r}):(--q,--r,t.sparse||e.push({status:"retained",value:d[q]}));b.a.Eb(n,f,!t.dontLimitMoves&&10*p);return e.reverse()}return function(c,d,g){g="boolean"===typeof g?{dontLimitMoves:g}:g||{};c=c||[];d=d||[];return c.length<d.length?a(c,d,"added","deleted",g):a(d,c,"deleted","added",g)}})();(()=>{function a(g,k,t,e,f){var h=[],r=b.j(()=>{var p=k(t,f,b.a.Aa(h,
g))||[];if(0<h.length){var q=h.nodeType?[h]:h;if(0<q.length){var l=q[0],n=l.parentNode,m;var u=0;for(m=p.length;u<m;u++)n.insertBefore(p[u],l);u=0;for(m=q.length;u<m;u++)b.removeNode(q[u])}e&&b.l.N(e,null,[t,p,f])}h.length=0;h.push(...p)},{i:g,pa:()=>!!h.find(b.a.Wa)});return{K:h,Sa:r.ga()?r:void 0}}var c=b.a.c.V(),d=b.a.c.V();b.a.Ob=(g,k,t,e,f,h)=>{function r(C){x={aa:C,Da:b.Z(m++)};l.push(x)}function p(C){x=q[C];x.Da(m++);b.a.Aa(x.K,g);l.push(x)}k=k||[];"undefined"==typeof k.length&&(k=[k]);e=e||
{};var q=b.a.c.get(g,c),l=[],n=0,m=0,u=[],w=[],v=[],y=0;if(q){if(!h||q&&q._countWaitingForRemove)h=Array.prototype.map.call(q,C=>C.aa),h=b.a.zb(h,k,{dontLimitMoves:e.dontLimitMoves,sparse:!0});for(let C=0,z,D,F;z=h[C];C++)switch(D=z.moved,F=z.index,z.status){case "deleted":for(;n<F;)p(n++);if(void 0===D){var x=q[n];x.Sa&&(x.Sa.o(),x.Sa=void 0);b.a.Aa(x.K,g).length&&(e.beforeRemove&&(l.push(x),y++,x.aa===d?x=null:v[x.Da.G()]=x),x&&u.push.apply(u,x.K))}n++;break;case "added":for(;m<F;)p(n++);void 0!==
D?(w.push(l.length),p(D)):r(z.value)}for(;m<k.length;)p(n++);l._countWaitingForRemove=y}else k.forEach(r);b.a.c.set(g,c,l);u.forEach(e.beforeRemove?b.ca:b.removeNode);var B,E;y=g.ownerDocument.activeElement;if(w.length)for(;void 0!=(k=w.shift());){x=l[k];for(B=void 0;k;)if((E=l[--k].K)&&E.length){B=E[E.length-1];break}for(n=0;u=x.K[n];B=u,n++)b.h.Gb(g,u,B)}for(k=0;x=l[k];k++){x.K||b.a.extend(x,a(g,t,x.aa,f,x.Da));for(n=0;u=x.K[n];B=u,n++)b.h.Gb(g,u,B);!x.hc&&f&&(f(x.aa,x.K,x.Da),x.hc=!0,B=x.K[x.K.length-
1])}y&&g.ownerDocument.activeElement!=y&&y.focus();(function(C,z){if(C)for(var D=0,F=z.length;D<F;D++)z[D]&&z[D].K.forEach(I=>C(I,D,z[D].aa))})(e.beforeRemove,v);for(k=0;k<v.length;++k)v[k]&&(v[k].aa=d)}})();T.ko=P})(this);