mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-08 22:18:28 +03:00
drop jQuery support completely from knockoutjs
This commit is contained in:
parent
06abbf0713
commit
1cd07955a2
5 changed files with 110 additions and 140 deletions
|
|
@ -55,7 +55,6 @@ ko.exportSymbol('version', ko.version);
|
|||
// For any options that may affect various areas of Knockout and aren't directly associated with data binding.
|
||||
ko.options = {
|
||||
'deferUpdates': false,
|
||||
'useOnlyNativeEvents': false,
|
||||
'foreachHidesDestroyed': false
|
||||
};
|
||||
|
||||
|
|
@ -308,10 +307,7 @@ ko.utils = (function () {
|
|||
registerEventHandler: function (element, eventType, handler) {
|
||||
var wrappedHandler = ko.utils.catchFunctionErrors(handler);
|
||||
|
||||
if (!ko.options['useOnlyNativeEvents'] && jQuery) {
|
||||
jQuery(element)['on'](eventType, wrappedHandler);
|
||||
} else
|
||||
element.addEventListener(eventType, wrappedHandler, false);
|
||||
element.addEventListener(eventType, wrappedHandler, false);
|
||||
},
|
||||
|
||||
triggerEvent: function (element, eventType) {
|
||||
|
|
@ -450,9 +446,6 @@ ko.utils.domNodeDisposal = new (function () {
|
|||
// Erase the DOM data
|
||||
ko.utils.domData.clear(node);
|
||||
|
||||
// Perform cleanup needed by external libraries (currently only jQuery, but can be extended)
|
||||
ko.utils.domNodeDisposal["cleanExternalData"](node);
|
||||
|
||||
// Clear any immediate-child comment nodes, as these wouldn't have been found by
|
||||
// node.getElementsByTagName("*") in cleanNode() (comment nodes aren't elements)
|
||||
if (cleanableNodeTypesWithDescendants[node.nodeType]) {
|
||||
|
|
@ -508,14 +501,6 @@ ko.utils.domNodeDisposal = new (function () {
|
|||
ko.cleanNode(node);
|
||||
if (node.parentNode)
|
||||
node.parentNode.removeChild(node);
|
||||
},
|
||||
|
||||
'cleanExternalData' : function (node) {
|
||||
// Special support for jQuery here because it's so commonly used.
|
||||
// Many jQuery plugins (including jquery.tmpl) store data using jQuery's equivalent of domData
|
||||
// so notify it to tear down any resources associated with the node & descendants here.
|
||||
if (jQuery && jQuery['cleanData'])
|
||||
jQuery['cleanData']([node]);
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
216
vendors/knockout/build/output/knockout-latest.js
vendored
216
vendors/knockout/build/output/knockout-latest.js
vendored
|
|
@ -6,112 +6,112 @@
|
|||
|
||||
(function() {(function(p){var D=this||(0,eval)("this"),E=D.document,H=D.jQuery;H||"undefined"===typeof jQuery||(H=jQuery);(function(p){"function"===typeof define&&define.amd?define(["exports","require"],p):"object"===typeof exports&&"object"===typeof module?p(module.exports||exports):p(D.ko={})})(function(H,O){function J(a,c){return null===a||typeof a in R?a===c:!1}function S(b,c){var d;return function(){d||(d=a.a.setTimeout(function(){d=p;b()},c))}}function T(b,c){var d;return function(){clearTimeout(d);d=a.a.setTimeout(b,
|
||||
c)}}function U(a,c){c&&"change"!==c?"beforeChange"===c?this.ic(a):this.bb(a,c):this.jc(a)}function V(a,c){null!==c&&c.s&&c.s()}function W(a,c){var d=this.ad,e=d[r];e.pa||(this.Kb&&this.ib[c]?(d.nc(c,a,this.ib[c]),this.ib[c]=null,--this.Kb):e.F[c]||d.nc(c,a,e.G?{$:a}:d.Nc(a)),a.Ca&&a.Sc())}var a="undefined"!==typeof H?H:{};a.b=function(b,c){for(var d=b.split("."),e=a,f=0;f<d.length-1;f++)e=e[d[f]];e[d[d.length-1]]=c};a.I=function(a,c,d){a[c]=d};a.version="3.5.1-pre";a.b("version",a.version);a.options=
|
||||
{deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1};a.a=function(){function b(a,b,c,d){return Array.prototype[a].call(b,c,d)}function c(a,b){b&&Object.entries(b).forEach(function(b){a[b[0]]=b[1]});return a}function d(a,b){a.__proto__=b;return a}var e={__proto__:[]}instanceof Array;return{K:function(a,c,d){b("forEach",a,c,d)},O:function(a,c){return b("indexOf",a,c)},Gb:function(a,b,c){for(var d=0,e=a.length;d<e;d++)if(b.call(c,a[d],d,a))return a[d];return p},Ia:function(b,c){var d=a.a.O(b,
|
||||
c);0<d?b.splice(d,1):0===d&&b.shift()},fb:function(a,c,d){return a?b("filter",a,c,d):[]},Hb:function(a,b){if(b instanceof Array)a.push.apply(a,b);else for(var c=0,d=b.length;c<d;c++)a.push(b[c]);return a},va:e,extend:c,setPrototypeOf:d,wb:e?d:c,N:function(a,b){a&&Object.entries(a).forEach(function(a){b(a[0],a[1])})},za:function(a,b,c){if(!a)return a;var d={};Object.entries(a).forEach(function(e){d[e[0]]=b.call(c,e[1],e[0],a)});return d},Nb:function(b){for(;b.firstChild;)a.removeNode(b.firstChild)},
|
||||
Sb:function(b){var c=a.a.ya(b),d=(c[0]&&c[0].ownerDocument||E).createElement("div");b.forEach(function(b){d.append(a.ma(b))});return d},La:function(c,d){return b("map",c,d?function(b){return a.ma(b.cloneNode(!0))}:function(a){return a.cloneNode(!0)})},sa:function(b,c){a.a.Nb(b);c&&b.append.apply(b,c)},Lc:function(b,c){var d=b.nodeType?[b]:b;if(0<d.length){var e=d[0],h=e.parentNode,m,n;m=0;for(n=c.length;m<n;m++)h.insertBefore(c[m],e);m=0;for(n=d.length;m<n;m++)a.removeNode(d[m])}},Oa:function(a,b){if(a.length){for(b=
|
||||
{deferUpdates:!1,foreachHidesDestroyed:!1};a.a=function(){function b(a,b,c,d){return Array.prototype[a].call(b,c,d)}function c(a,b){b&&Object.entries(b).forEach(function(b){a[b[0]]=b[1]});return a}function d(a,b){a.__proto__=b;return a}var e={__proto__:[]}instanceof Array;return{K:function(a,c,d){b("forEach",a,c,d)},N:function(a,c){return b("indexOf",a,c)},Gb:function(a,b,c){for(var d=0,e=a.length;d<e;d++)if(b.call(c,a[d],d,a))return a[d];return p},Ia:function(b,c){var d=a.a.N(b,c);0<d?b.splice(d,
|
||||
1):0===d&&b.shift()},fb:function(a,c,d){return a?b("filter",a,c,d):[]},Hb:function(a,b){if(b instanceof Array)a.push.apply(a,b);else for(var c=0,d=b.length;c<d;c++)a.push(b[c]);return a},va:e,extend:c,setPrototypeOf:d,wb:e?d:c,M:function(a,b){a&&Object.entries(a).forEach(function(a){b(a[0],a[1])})},za:function(a,b,c){if(!a)return a;var d={};Object.entries(a).forEach(function(e){d[e[0]]=b.call(c,e[1],e[0],a)});return d},Nb:function(b){for(;b.firstChild;)a.removeNode(b.firstChild)},Sb:function(b){var c=
|
||||
a.a.ya(b),d=(c[0]&&c[0].ownerDocument||E).createElement("div");b.forEach(function(b){d.append(a.ma(b))});return d},La:function(c,d){return b("map",c,d?function(b){return a.ma(b.cloneNode(!0))}:function(a){return a.cloneNode(!0)})},sa:function(b,c){a.a.Nb(b);c&&b.append.apply(b,c)},Lc:function(b,c){var d=b.nodeType?[b]:b;if(0<d.length){var e=d[0],h=e.parentNode,m,n;m=0;for(n=c.length;m<n;m++)h.insertBefore(c[m],e);m=0;for(n=d.length;m<n;m++)a.removeNode(d[m])}},Oa:function(a,b){if(a.length){for(b=
|
||||
8===b.nodeType&&b.parentNode||b;a.length&&a[0].parentNode!==b;)a.splice(0,1);for(;1<a.length&&a[a.length-1].parentNode!==b;)a.length--;if(1<a.length){var c=a[0],d=a[a.length-1];for(a.length=0;c!==d;)a.push(c),c=c.nextSibling;a.push(d)}}return a},ac:function(a){return null===a||a===p?"":a.trim?a.trim():a.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Bd:function(a,b){a=a||"";return b.length>a.length?!1:a.substring(0,b.length)===b},fd:function(a,b){return b.contains(1!==a.nodeType?a.parentNode:a)},
|
||||
Mb:function(b){return a.a.fd(b,b.ownerDocument.documentElement)},Vc:function(b){return!!a.a.Gb(b,a.a.Mb)},fa:function(a){return a&&a.tagName&&a.tagName.toLowerCase()},sc:function(b){return a.onError?function(){try{return b.apply(this,arguments)}catch(c){throw a.onError&&a.onError(c),c;}}:b},setTimeout:function(b,c){return setTimeout(a.a.sc(b),c)},xc:function(b){setTimeout(function(){a.onError&&a.onError(b);throw b;},0)},H:function(b,c,d){d=a.a.sc(d);if(!a.options.useOnlyNativeEvents&&jQuery)jQuery(b).on(c,
|
||||
d);else b.addEventListener(c,d,!1)},Ab:function(a,b){if(!a||!a.nodeType)throw Error("element must be a DOM node when calling triggerEvent");a.dispatchEvent(new Event(b))},f:function(b){return a.U(b)?b():b},Wb:function(b){return a.U(b)?b.w():b},zb:function(a,b,c){if(b){var d=c?"add":"remove";b.split(/\s+/).forEach(function(b){a.classList[d](b)})}},xb:function(b,c){var d=a.a.f(c);if(null===d||d===p)d="";var e=a.g.firstChild(b);!e||3!=e.nodeType||a.g.nextSibling(e)?a.g.sa(b,[b.ownerDocument.createTextNode(d)]):
|
||||
e.data=d},ya:function(a){return Array.from(a)}}}();a.b("utils",a.a);a.b("utils.arrayForEach",a.a.K);a.b("utils.arrayFirst",a.a.Gb);a.b("utils.arrayFilter",a.a.fb);a.b("utils.arrayIndexOf",a.a.O);a.b("utils.arrayPushAll",a.a.Hb);a.b("utils.arrayRemoveItem",a.a.Ia);a.b("utils.cloneNodes",a.a.La);a.b("utils.extend",a.a.extend);a.b("utils.objectMap",a.a.za);a.b("utils.peekObservable",a.a.Wb);a.b("utils.registerEventHandler",a.a.H);a.b("utils.stringifyJson",a.a.Gd);a.b("utils.toggleDomNodeCssClass",a.a.zb);
|
||||
a.b("utils.triggerEvent",a.a.Ab);a.b("utils.unwrapObservable",a.a.f);a.b("utils.objectForEach",a.a.N);a.b("utils.setTextContent",a.a.xb);a.b("unwrap",a.a.f);a.a.h=new function(){var a=0,c="__ko__"+Date.now(),d;d=function(a,b){var d=a[c];!d&&b&&(d=a[c]={});return d};return{get:function(a,b){var c=d(a,!1);return c&&c[b]},set:function(a,b,c){(a=d(a,c!==p))&&(a[b]=c)},Ob:function(a,b,c){a=d(a,!0);return a[b]||(a[b]=c)},clear:function(a){return a[c]?(delete a[c],!0):!1},ea:function(){return a++ +c}}};
|
||||
a.b("utils.domData",a.a.h);a.b("utils.domData.clear",a.a.h.clear);a.a.M=new function(){function b(b,c){var d=a.a.h.get(b,e);d===p&&c&&(d=[],a.a.h.set(b,e,d));return d}function c(c){var e=b(c,!1);if(e)for(var e=e.slice(0),h=0;h<e.length;h++)e[h](c);a.a.h.clear(c);a.a.M.cleanExternalData(c);g[c.nodeType]&&d(c.childNodes,!0)}function d(b,d){for(var e=[],f,n=0;n<b.length;n++)if(!d||8===b[n].nodeType)if(c(e[e.length]=f=b[n]),b[n]!==f)for(;n--&&-1==a.a.O(e,b[n]););}var e=a.a.h.ea(),f={1:!0,8:!0,9:!0},g=
|
||||
{1:!0,9:!0};return{Ga:function(a,c){if("function"!=typeof c)throw Error("Callback must be a function");b(a,!0).push(c)},ub:function(c,d){var h=b(c,!1);h&&(a.a.Ia(h,d),0==h.length&&a.a.h.set(c,e,p))},ma:function(b){a.u.C(function(){f[b.nodeType]&&(c(b),g[b.nodeType]&&d(b.getElementsByTagName("*")))});return b},removeNode:function(b){a.ma(b);b.parentNode&&b.parentNode.removeChild(b)},cleanExternalData:function(a){jQuery&&jQuery.cleanData&&jQuery.cleanData([a])}}};a.ma=a.a.M.ma;a.removeNode=a.a.M.removeNode;
|
||||
a.b("cleanNode",a.ma);a.b("removeNode",a.removeNode);a.b("utils.domNodeDisposal",a.a.M);a.b("utils.domNodeDisposal.addDisposeCallback",a.a.M.Ga);a.b("utils.domNodeDisposal.removeDisposeCallback",a.a.M.ub);(function(){var b=[0,"",""],c=[1,"<table>","</table>"],d=[3,"<table><tbody><tr>","</tr></tbody></table>"],e=[1,"<select multiple='multiple'>","</select>"],f={thead:c,tbody:c,tfoot:c,tr:[2,"<table><tbody>","</tbody></table>"],td:d,th:d,option:e,optgroup:e};a.a.Ua=function(c,d){var e=d;e||(e=E);var h=
|
||||
e.parentWindow||e.defaultView||D,m=a.a.ac(c).toLowerCase(),e=e.createElement("div"),n;n=(m=m.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&f[m[1]]||b;m=n[0];n="ignored<div>"+n[1]+c+n[2]+"</div>";for("function"==typeof h.innerShiv?e.append(h.innerShiv(n)):e.innerHTML=n;m--;)e=e.lastChild;return a.a.ya(e.lastChild.childNodes)};a.a.wd=function(b,c){var d=a.a.Ua(b,c);return d.length&&d[0].parentElement||a.a.Sb(d)};a.a.$b=function(b,c){a.a.Nb(b);c=a.a.f(c);if(null!==c&&c!==p){"string"!=typeof c&&
|
||||
(c=c.toString());for(var d=a.a.Ua(c,b.ownerDocument),e=0;e<d.length;e++)b.appendChild(d[e])}}})();a.b("utils.parseHtmlFragment",a.a.Ua);a.b("utils.setHtml",a.a.$b);a.Y=function(){function b(c,e){if(c)if(8==c.nodeType){var f=a.Y.Ic(c.nodeValue);null!=f&&e.push({ed:c,sd:f})}else if(1==c.nodeType)for(var f=0,g=c.childNodes,k=g.length;f<k;f++)b(g[f],e)}var c={};return{Rb:function(a){if("function"!=typeof a)throw Error("You can only pass a function to ko.memoization.memoize()");var b=(4294967296*(1+Math.random())|
|
||||
0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);c[b]=a;return"\x3c!--[ko_memo:"+b+"]--\x3e"},Oc:function(a,b){var f=c[a];if(f===p)throw Error("Couldn't find any memo with ID "+a+". Perhaps it's already been unmemoized.");try{return f.apply(null,b||[]),!0}finally{delete c[a]}},Pc:function(c,e){var f=[];b(c,f);for(var g=0,k=f.length;g<k;g++){var l=f[g].ed,h=[l];e&&a.a.Hb(h,e);a.Y.Oc(f[g].sd,h);l.nodeValue="";l.parentNode&&l.parentNode.removeChild(l)}},Ic:function(a){return(a=
|
||||
a.match(/^\[ko_memo\:(.*?)\]$/))?a[1]:null}}}();a.b("memoization",a.Y);a.b("memoization.memoize",a.Y.Rb);a.b("memoization.unmemoize",a.Y.Oc);a.b("memoization.parseMemoText",a.Y.Ic);a.b("memoization.unmemoizeDomNodeAndDescendants",a.Y.Pc);a.la=function(){function b(){if(e)for(var b=e,c=0,h;g<e;)if(h=d[g++]){if(g>b){if(5E3<=++c){g=e;a.a.xc(Error("'Too much recursion' after processing "+c+" task groups."));break}b=e}try{h()}catch(f){a.a.xc(f)}}}function c(){b();g=e=d.length=0}var d=[],e=0,f=1,g=0;return{scheduler:function(a){var b=
|
||||
E.createElement("div");(new MutationObserver(a)).observe(b,{attributes:!0});return function(){b.classList.toggle("foo")}}(c),vb:function(b){e||a.la.scheduler(c);d[e++]=b;return f++},cancel:function(a){a=a-(f-e);a>=g&&a<e&&(d[a]=null)},resetForTesting:function(){var a=e-g;g=e=d.length=0;return a},zd:b}}();a.b("tasks",a.la);a.b("tasks.schedule",a.la.vb);a.b("tasks.runEarly",a.la.zd);a.Na={throttle:function(b,c){b.throttleEvaluation=c;var d=null;return a.X({read:b,write:function(e){clearTimeout(d);d=
|
||||
a.a.setTimeout(function(){b(e)},c)}})},rateLimit:function(a,c){var d,e,f;"number"==typeof c?d=c:(d=c.timeout,e=c.method);a.Cb=!1;f="function"==typeof e?e:"notifyWhenChangesStop"==e?T:S;a.qb(function(a){return f(a,d,c)})},deferred:function(b,c){if(!0!==c)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");b.Cb||(b.Cb=!0,b.qb(function(c){var e,f=!1;return function(){if(!f){a.la.cancel(e);e=a.la.vb(c);try{f=!0,b.notifySubscribers(p,
|
||||
"dirty")}finally{f=!1}}}}))},notify:function(a,c){a.equalityComparer="always"==c?null:J}};var R={undefined:1,"boolean":1,number:1,string:1};a.b("extenders",a.Na);a.bc=function(b,c,d){this.$=b;this.ec=c;this.fc=d;this.Db=!1;this.ab=this.Eb=null;a.I(this,"dispose",this.s);a.I(this,"disposeWhenNodeIsRemoved",this.j)};a.bc.prototype.s=function(){this.Db||(this.ab&&a.a.M.ub(this.Eb,this.ab),this.Db=!0,this.fc(),this.$=this.ec=this.fc=this.Eb=this.ab=null)};a.bc.prototype.j=function(b){this.Eb=b;a.a.M.Ga(b,
|
||||
this.ab=this.s.bind(this))};a.R=function(){a.a.wb(this,A);A.mb(this)};var A={mb:function(a){a.S={change:[]};a.lc=1},subscribe:function(b,c,d){var e=this;d=d||"change";var f=new a.bc(e,c?b.bind(c):b,function(){a.a.Ia(e.S[d],f);e.cb&&e.cb(d)});e.Ja&&e.Ja(d);e.S[d]||(e.S[d]=[]);e.S[d].push(f);return f},notifySubscribers:function(b,c){c=c||"change";"change"===c&&this.Bb();if(this.Qa(c)){var d="change"===c&&this.Qc||this.S[c].slice(0);try{a.u.pc();for(var e=0,f;f=d[e];++e)f.Db||f.ec(b)}finally{a.u.end()}}},
|
||||
kb:function(){return this.lc},md:function(a){return this.kb()!==a},Bb:function(){++this.lc},qb:function(b){var c=this,d=a.U(c),e,f,g,k,l;c.bb||(c.bb=c.notifySubscribers,c.notifySubscribers=U);var h=b(function(){c.Ca=!1;d&&k===c&&(k=c.gc?c.gc():c());var a=f||l&&c.ob(g,k);l=f=e=!1;a&&c.bb(g=k)});c.jc=function(a,b){b&&c.Ca||(l=!b);c.Qc=c.S.change.slice(0);c.Ca=e=!0;k=a;h()};c.ic=function(a){e||(g=a,c.bb(a,"beforeChange"))};c.kc=function(){l=!0};c.Sc=function(){c.ob(g,c.w(!0))&&(f=!0)}},Qa:function(a){return this.S[a]&&
|
||||
this.S[a].length},kd:function(b){if(b)return this.S[b]&&this.S[b].length||0;var c=0;a.a.N(this.S,function(a,b){"dirty"!==a&&(c+=b.length)});return c},ob:function(a,c){return!this.equalityComparer||!this.equalityComparer(a,c)},toString:function(){return"[object Object]"},extend:function(b){var c=this;b&&a.a.N(b,function(b,e){var f=a.Na[b];"function"==typeof f&&(c=f(c,e)||c)});return c}};a.I(A,"init",A.mb);a.I(A,"subscribe",A.subscribe);a.I(A,"extend",A.extend);a.I(A,"getSubscriptionsCount",A.kd);a.a.va&&
|
||||
a.a.setPrototypeOf(A,Function.prototype);a.R.fn=A;a.Fc=function(a){return null!=a&&"function"==typeof a.subscribe&&"function"==typeof a.notifySubscribers};a.b("subscribable",a.R);a.b("isSubscribable",a.Fc);a.P=a.u=function(){function b(a){d.push(e);e=a}function c(){e=d.pop()}var d=[],e,f=0;return{pc:b,end:c,Xb:function(b){if(e){if(!a.Fc(b))throw Error("Only subscribable things can act as dependencies");e.Zc.call(e.$c,b,b.Rc||(b.Rc=++f))}},C:function(a,d,e){try{return b(),a.apply(d,e||[])}finally{c()}},
|
||||
oa:function(){if(e)return e.o.oa()},Pa:function(){if(e)return e.o.Pa()},Sa:function(){if(e)return e.Sa},o:function(){if(e)return e.o}}}();a.b("computedContext",a.P);a.b("computedContext.getDependenciesCount",a.P.oa);a.b("computedContext.getDependencies",a.P.Pa);a.b("computedContext.isInitial",a.P.Sa);a.b("computedContext.registerDependency",a.P.Xb);a.b("ignoreDependencies",a.Fd=a.u.C);var F=Symbol("_latestValue");a.ra=function(b){function c(){if(0<arguments.length)return c.ob(c[F],arguments[0])&&
|
||||
(c.Ya(),c[F]=arguments[0],c.Xa()),this;a.u.Xb(c);return c[F]}c[F]=b;a.a.va||a.a.extend(c,a.R.fn);a.R.fn.mb(c);a.a.wb(c,B);a.options.deferUpdates&&a.Na.deferred(c,!0);return c};var B={equalityComparer:J,w:function(){return this[F]},Xa:function(){this.notifySubscribers(this[F],"spectate");this.notifySubscribers(this[F])},Ya:function(){this.notifySubscribers(this[F],"beforeChange")}};a.a.va&&a.a.setPrototypeOf(B,a.R.fn);var G=a.ra.Fa="__ko_proto__";B[G]=a.ra;a.U=function(b){if((b="function"==typeof b&&
|
||||
b[G])&&b!==B[G]&&b!==a.o.fn[G])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!b};a.Ta=function(b){return"function"==typeof b&&(b[G]===B[G]||b[G]===a.o.fn[G]&&b.Cc)};a.b("observable",a.ra);a.b("isObservable",a.U);a.b("isWriteableObservable",a.Ta);a.b("isWritableObservable",a.Ta);a.b("observable.fn",B);a.I(B,"peek",B.w);a.I(B,"valueHasMutated",B.Xa);a.I(B,"valueWillMutate",B.Ya);a.Aa=function(b){b=b||[];if("object"!=typeof b||!("length"in
|
||||
b))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");b=a.ra(b);a.a.wb(b,a.Aa.fn);return b.extend({trackArrayChanges:!0})};a.Aa.fn={remove:function(b){for(var c=this.w(),d=[],e="function"!=typeof b||a.U(b)?function(a){return a===b}:b,f=0;f<c.length;f++){var g=c[f];if(e(g)){0===d.length&&this.Ya();if(c[f]!==g)throw Error("Array modified during remove; cannot remove item");d.push(g);c.splice(f,1);f--}}d.length&&this.Xa();return d},removeAll:function(b){if(b===
|
||||
p){var c=this.w(),d=c.slice(0);this.Ya();c.splice(0,c.length);this.Xa();return d}return b?this.remove(function(c){return 0<=a.a.O(b,c)}):[]},indexOf:function(b){return a.a.O(this(),b)}};a.a.va&&a.a.setPrototypeOf(a.Aa.fn,a.ra.fn);a.a.K("pop push reverse shift sort splice unshift".split(" "),function(b){a.Aa.fn[b]=function(){var a=this.w();this.Ya();this.rc(a,b,arguments);var d=a[b].apply(a,arguments);this.Xa();return d===a?this:d}});a.a.K(["slice"],function(b){a.Aa.fn[b]=function(){var a=this();return a[b].apply(a,
|
||||
arguments)}});a.Ec=function(b){return a.U(b)&&"function"==typeof b.remove&&"function"==typeof b.push};a.b("observableArray",a.Aa);a.b("isObservableArray",a.Ec);a.Na.trackArrayChanges=function(b,c){function d(){function c(){if(l){var d=[].concat(b.w()||[]),e;if(b.Qa("arrayChange")){if(!f||1<l)f=a.a.Jb(h,d,b.Ib);e=f}h=d;f=null;l=0;e&&e.length&&b.notifySubscribers(e,"arrayChange")}}e?c():(e=!0,k=b.subscribe(function(){++l},null,"spectate"),h=[].concat(b.w()||[]),f=null,g=b.subscribe(c))}b.Ib={};c&&"object"==
|
||||
typeof c&&a.a.extend(b.Ib,c);b.Ib.sparse=!0;if(!b.rc){var e=!1,f=null,g,k,l=0,h,m=b.Ja,n=b.cb;b.Ja=function(a){m&&m.call(b,a);"arrayChange"===a&&d()};b.cb=function(a){n&&n.call(b,a);"arrayChange"!==a||b.Qa("arrayChange")||(g&&g.s(),k&&k.s(),k=g=null,e=!1,h=p)};b.rc=function(b,c,d){function h(a,b,c){return k[k.length]={status:a,value:b,index:c}}if(e&&!l){var k=[],m=b.length,n=d.length,g=0;switch(c){case "push":g=m;case "unshift":for(c=0;c<n;c++)h("added",d[c],g+c);break;case "pop":g=m-1;case "shift":m&&
|
||||
h("deleted",b[g],g);break;case "splice":c=Math.min(Math.max(0,0>d[0]?m+d[0]:d[0]),m);for(var m=1===n?m:Math.min(c+(d[1]||0),m),n=c+n-2,g=Math.max(m,n),P=[],Q=[],p=2;c<g;++c,++p)c<m&&Q.push(h("deleted",b[c],c)),c<n&&P.push(h("added",d[p],c));a.a.Ac(Q,P);break;default:return}f=k}}}};var r=Symbol("_state");a.o=a.X=function(b,c,d){function e(){if(0<arguments.length){if("function"===typeof f)f.apply(g.jb,arguments);else 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.");
|
||||
return this}g.pa||a.u.Xb(e);(g.ja||g.G&&e.Ra())&&e.da();return g.V}"object"===typeof b?d=b:(d=d||{},b&&(d.read=b));if("function"!=typeof d.read)throw Error("Pass a function that returns the value of the ko.computed");var f=d.write,g={V:p,qa:!0,ja:!0,nb:!1,cc:!1,pa:!1,sb:!1,G:!1,Kc:d.read,jb:c||d.owner,j:d.disposeWhenNodeIsRemoved||d.j||null,Ma:d.disposeWhen||d.Ma,Lb:null,F:{},T:0,zc:null};e[r]=g;e.Cc="function"===typeof f;a.a.va||a.a.extend(e,a.R.fn);a.R.fn.mb(e);a.a.wb(e,y);d.pure?(g.sb=!0,g.G=!0,
|
||||
a.a.extend(e,Y)):d.deferEvaluation&&a.a.extend(e,Z);a.options.deferUpdates&&a.Na.deferred(e,!0);g.j&&(g.cc=!0,g.j.nodeType||(g.j=null));g.G||d.deferEvaluation||e.da();g.j&&e.ia()&&a.a.M.Ga(g.j,g.Lb=function(){e.s()});return e};var y={equalityComparer:J,oa:function(){return this[r].T},Pa:function(){var b=[];a.a.N(this[r].F,function(a,d){b[d.Da]=d.$});return b},Pb:function(b){if(!this[r].T)return!1;var c=this.Pa();return-1!==a.a.O(c,b)?!0:!!a.a.Gb(c,function(a){return a.Pb&&a.Pb(b)})},nc:function(a,
|
||||
c,d){if(this[r].sb&&c===this)throw Error("A 'pure' computed must not be called recursively");this[r].F[a]=d;d.Da=this[r].T++;d.Ea=c.kb()},Ra:function(){var a,c,d=this[r].F;for(a in d)if(Object.prototype.hasOwnProperty.call(d,a)&&(c=d[a],this.Ba&&c.$.Ca||c.$.md(c.Ea)))return!0},rd:function(){this.Ba&&!this[r].nb&&this.Ba(!1)},ia:function(){var a=this[r];return a.ja||0<a.T},yd:function(){this.Ca?this[r].ja&&(this[r].qa=!0):this.yc()},Nc:function(a){if(a.Cb){var c=a.subscribe(this.rd,this,"dirty"),d=
|
||||
a.subscribe(this.yd,this);return{$:a,s:function(){c.s();d.s()}}}return a.subscribe(this.yc,this)},yc:function(){var b=this,c=b.throttleEvaluation;c&&0<=c?(clearTimeout(this[r].zc),this[r].zc=a.a.setTimeout(function(){b.da(!0)},c)):b.Ba?b.Ba(!0):b.da(!0)},da:function(b){var c=this[r],d=c.Ma,e=!1;if(!c.nb&&!c.pa){if(c.j&&!a.a.Mb(c.j)||d&&d()){if(!c.cc){this.s();return}}else c.cc=!1;c.nb=!0;try{e=this.jd(b)}finally{c.nb=!1}return e}},jd:function(b){var c=this[r],d=!1,e=c.sb?p:!c.T,d={ad:this,ib:c.F,
|
||||
Kb:c.T};a.u.pc({$c:d,Zc:W,o:this,Sa:e});c.F={};c.T=0;var f=this.hd(c,d);c.T?d=this.ob(c.V,f):(this.s(),d=!0);d&&(c.G?this.Bb():this.notifySubscribers(c.V,"beforeChange"),c.V=f,this.notifySubscribers(c.V,"spectate"),!c.G&&b&&this.notifySubscribers(c.V),this.kc&&this.kc());e&&this.notifySubscribers(c.V,"awake");return d},hd:function(b,c){try{var d=b.Kc;return b.jb?d.call(b.jb):d()}finally{a.u.end(),c.Kb&&!b.G&&a.a.N(c.ib,V),b.qa=b.ja=!1}},w:function(a){var c=this[r];(c.ja&&(a||!c.T)||c.G&&this.Ra())&&
|
||||
this.da();return c.V},qb:function(b){a.R.fn.qb.call(this,b);this.gc=function(){this[r].G||(this[r].qa?this.da():this[r].ja=!1);return this[r].V};this.Ba=function(a){this.ic(this[r].V);this[r].ja=!0;a&&(this[r].qa=!0);this.jc(this,!a)}},s:function(){var b=this[r];!b.G&&b.F&&a.a.N(b.F,function(a,b){b.s&&b.s()});b.j&&b.Lb&&a.a.M.ub(b.j,b.Lb);b.F=p;b.T=0;b.pa=!0;b.qa=!1;b.ja=!1;b.G=!1;b.j=p;b.Ma=p;b.Kc=p;this.Cc||(b.jb=p)}},Y={Ja:function(b){var c=this,d=c[r];if(!d.pa&&d.G&&"change"==b){d.G=!1;if(d.qa||
|
||||
c.Ra())d.F=null,d.T=0,c.da()&&c.Bb();else{var e=[];a.a.N(d.F,function(a,b){e[b.Da]=a});a.a.K(e,function(a,b){var e=d.F[a],l=c.Nc(e.$);l.Da=b;l.Ea=e.Ea;d.F[a]=l});c.Ra()&&c.da()&&c.Bb()}d.pa||c.notifySubscribers(d.V,"awake")}},cb:function(b){var c=this[r];c.pa||"change"!=b||this.Qa("change")||(a.a.N(c.F,function(a,b){b.s&&(c.F[a]={$:b.$,Da:b.Da,Ea:b.Ea},b.s())}),c.G=!0,this.notifySubscribers(p,"asleep"))},kb:function(){var b=this[r];b.G&&(b.qa||this.Ra())&&this.da();return a.R.fn.kb.call(this)}},Z=
|
||||
{Ja:function(a){"change"!=a&&"beforeChange"!=a||this.w()}};a.a.va&&a.a.setPrototypeOf(y,a.R.fn);var M=a.ra.Fa;y[M]=a.o;a.Dc=function(a){return"function"==typeof a&&a[M]===y[M]};a.od=function(b){return a.Dc(b)&&b[r]&&b[r].sb};a.b("computed",a.o);a.b("dependentObservable",a.o);a.b("isComputed",a.Dc);a.b("isPureComputed",a.od);a.b("computed.fn",y);a.I(y,"peek",y.w);a.I(y,"dispose",y.s);a.I(y,"isActive",y.ia);a.I(y,"getDependenciesCount",y.oa);a.I(y,"getDependencies",y.Pa);a.tb=function(b,c){if("function"===
|
||||
typeof b)return a.o(b,c,{pure:!0});b=a.a.extend({},b);b.pure=!0;return a.o(b,c)};a.b("pureComputed",a.tb);a.Dd=function(b,c,d){function e(c){var e=a.tb(b,d).extend({ka:"always"}),k=e.subscribe(function(a){a&&(k.s(),c(a))});e.notifySubscribers(e.w());return k}return c?e(c.bind(d)):new Promise(e)};a.b("when",a.Dd);(function(){a.v={J:function(b){switch(a.a.fa(b)){case "option":return!0===b.__ko__hasDomDataOptionValue__?a.a.h.get(b,a.c.options.Ub):b.value;case "select":return 0<=b.selectedIndex?a.v.J(b.options[b.selectedIndex]):
|
||||
p;default:return b.value}},Za:function(b,c,d){switch(a.a.fa(b)){case "option":"string"===typeof c?(a.a.h.set(b,a.c.options.Ub,p),delete b.__ko__hasDomDataOptionValue__,b.value=c):(a.a.h.set(b,a.c.options.Ub,c),b.__ko__hasDomDataOptionValue__=!0,b.value="number"===typeof c?c:"");break;case "select":if(""===c||null===c)c=p;for(var e=-1,f=0,g=b.options.length,k;f<g;++f)if(k=a.v.J(b.options[f]),k==c||""===k&&c===p){e=f;break}if(d||0<=e||c===p&&1<b.size)b.selectedIndex=e;break;default:if(null===c||c===
|
||||
p)c="";b.value=c}}}})();a.b("selectExtensions",a.v);a.b("selectExtensions.readValue",a.v.J);a.b("selectExtensions.writeValue",a.v.Za);a.m=function(){function b(b){b=a.a.ac(b);123===b.charCodeAt(0)&&(b=b.slice(1,-1));b+="\n,";var c=[],d=b.match(e),k,w=[],q=0;if(1<d.length){for(var v=0,u;u=d[v];++v){var t=u.charCodeAt(0);if(44===t){if(0>=q){c.push(k&&w.length?{key:k,value:w.join("")}:{unknown:k||w.join("")});k=q=0;w=[];continue}}else if(58===t){if(!q&&!k&&1===w.length){k=w.pop();continue}}else if(47===
|
||||
t&&1<u.length&&(47===u.charCodeAt(1)||42===u.charCodeAt(1)))continue;else 47===t&&v&&1<u.length?(t=d[v-1].match(f))&&!g[t[0]]&&(b=b.substr(b.indexOf(u)+1),d=b.match(e),v=-1,u="/"):40===t||123===t||91===t?++q:41===t||125===t||93===t?--q:k||w.length||34!==t&&39!==t||(u=u.slice(1,-1));w.push(u)}if(0<q)throw Error("Unbalanced parentheses, braces, or brackets");}return c}var c=["true","false","null","undefined"],d=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,e=RegExp("\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|`(?:\\\\.|[^`])*`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*\n|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,\"'`{}()/:[\\]]*[^\\s,\"'`{}()/:[\\]]|[^\\s]",
|
||||
"g"),f=/[\])"'A-Za-z0-9_$]+$/,g={"in":1,"return":1,"typeof":1},k={};return{Ka:[],ta:k,Vb:b,rb:function(e,h){function f(b,e){var h;if(!v){var l=a.getBindingHandler(b);if(l&&l.preprocess&&!(e=l.preprocess(e,b,f)))return;if(l=k[b])h=e,0<=a.a.O(c,h)?h=!1:(l=h.match(d),h=null===l?!1:l[1]?"Object("+l[1]+")"+l[2]:h),l=h;l&&g.push("'"+("string"==typeof k[b]?k[b]:b)+"':function(_z){"+h+"=_z}")}q&&(e="function(){return "+e+" }");n.push("'"+b+"':"+e)}h=h||{};var n=[],g=[],q=h.valueAccessors,v=h.bindingParams,
|
||||
u="string"===typeof e?b(e):e;a.a.K(u,function(a){f(a.key||a.unknown,a.value)});g.length&&f("_ko_property_writers","{"+g.join(",")+" }");return n.join(",")},qd:function(a,b){for(var c=0;c<a.length;c++)if(a[c].key==b)return!0;return!1},$a:function(b,c,d,e,k){if(b&&a.U(b))!a.Ta(b)||k&&b.w()===e||b(e);else if((b=c.get("_ko_property_writers"))&&b[d])b[d](e)}}}();a.b("expressionRewriting",a.m);a.b("expressionRewriting.bindingRewriteValidators",a.m.Ka);a.b("expressionRewriting.parseObjectLiteral",a.m.Vb);
|
||||
a.b("expressionRewriting.preProcessBindings",a.m.rb);a.b("expressionRewriting._twoWayBindings",a.m.ta);a.b("jsonExpressionRewriting",a.m);a.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",a.m.rb);(function(){function b(a){return 8==a.nodeType&&e.test(a.nodeValue)}function c(a){return 8==a.nodeType&&f.test(a.nodeValue)}function d(d,e){for(var h=d,f=1,n=[];h=h.nextSibling;){if(c(h)&&(a.a.h.set(h,g,!0),f--,0===f))return n;n.push(h);b(h)&&f++}if(!e)throw Error("Cannot find closing comment tag to match: "+
|
||||
d.nodeValue);return null}var e=/^\s*ko(?:\s+([\s\S]+))?\s*$/,f=/^\s*\/ko\s*$/,g="__ko_matchedEndComment__";a.g={aa:{},childNodes:function(a){return b(a)?d(a):a.childNodes},wa:function(c){if(b(c)){c=a.g.childNodes(c);for(var d=0,e=c.length;d<e;d++)a.removeNode(c[d])}else a.a.Nb(c)},sa:function(c,d){if(b(c)){a.g.wa(c);for(var e=c.nextSibling,f=0,n=d.length;f<n;f++)e.parentNode.insertBefore(d[f],e)}else a.a.sa(c,d)},Jc:function(a,c){var d;b(a)?(d=a.nextSibling,a=a.parentNode):d=a.firstChild;a.insertBefore(c,
|
||||
d)},Qb:function(c,d,e){e?(e=e.nextSibling,b(c)&&(c=c.parentNode),c.insertBefore(d,e)):a.g.Jc(c,d)},firstChild:function(a){if(b(a))return!a.nextSibling||c(a.nextSibling)?null:a.nextSibling;if(a.firstChild&&c(a.firstChild))throw Error("Found invalid end comment, as the first child of "+a);return a.firstChild},nextSibling:function(e){if(b(e)){var f=d(e,void 0);e=f?0<f.length?f[f.length-1].nextSibling:e.nextSibling:null}if(e.nextSibling&&c(e.nextSibling)){f=e.nextSibling;if(c(f)&&!a.a.h.get(f,g))throw Error("Found end comment without a matching opening comment, as child of "+
|
||||
e);return null}return e.nextSibling},ld:b,Cd:function(a){return(a=a.nodeValue.match(e))?a[1]:null}}})();a.b("virtualElements",a.g);a.b("virtualElements.allowedBindings",a.g.aa);a.b("virtualElements.emptyNode",a.g.wa);a.b("virtualElements.insertAfter",a.g.Qb);a.b("virtualElements.prepend",a.g.Jc);a.b("virtualElements.setDomNodeChildren",a.g.sa);(function(){a.ca=function(){this.Yc={}};a.a.extend(a.ca.prototype,{nodeHasBindings:function(b){switch(b.nodeType){case 1:return null!=b.getAttribute("data-bind")||
|
||||
a.l.getComponentNameForNode(b);case 8:return a.g.ld(b);default:return!1}},getBindings:function(b,c){var d=this.getBindingsString(b,c),d=d?this.parseBindingsString(d,c,b):null;return a.l.mc(d,b,c,!1)},getBindingAccessors:function(b,c){var d=this.getBindingsString(b,c),d=d?this.parseBindingsString(d,c,b,{valueAccessors:!0}):null;return a.l.mc(d,b,c,!0)},getBindingsString:function(b){switch(b.nodeType){case 1:return b.getAttribute("data-bind");case 8:return a.g.Cd(b);default:return null}},parseBindingsString:function(b,
|
||||
c,d,e){try{var f=this.Yc,g=b+(e&&e.valueAccessors||""),k;if(!(k=f[g])){var l,h="with($context){with($data||{}){return{"+a.m.rb(b,e)+"}}}";l=new Function("$context","$element",h);k=f[g]=l}return k(c,d)}catch(m){throw m.message="Unable to parse bindings.\nBindings value: "+b+"\nMessage: "+m.message,m;}}});a.ca.instance=new a.ca})();a.b("bindingProvider",a.ca);(function(){function b(b){var c=(b=a.a.h.get(b,z))&&b.L;c&&(b.L=null,c.Hc())}function c(c,d,e){this.node=c;this.qc=d;this.gb=[];this.D=!1;d.L||
|
||||
a.a.M.Ga(c,b);e&&e.L&&(e.L.gb.push(c),this.Fb=e)}function d(a){return function(){return a}}function e(a){return a()}function f(b){return a.a.za(a.u.C(b),function(a,c){return function(){return b()[c]}})}function g(b,c,e){return"function"===typeof b?f(b.bind(null,c,e)):a.a.za(b,d)}function k(a,b){return f(this.getBindings.bind(this,a,b))}function l(b,c){var d=a.g.firstChild(c);if(d){var e,f=a.ca.instance,m=f.preprocessNode;if(m){for(;e=d;)d=a.g.nextSibling(e),m.call(f,e);d=a.g.firstChild(c)}for(;e=
|
||||
d;)d=a.g.nextSibling(e),h(b,e)}a.i.ka(c,a.i.D)}function h(b,c){var d=b;if(1===c.nodeType||a.ca.instance.nodeHasBindings(c))d=n(c,null,b).bindingContextForDescendants;d&&!t[a.a.fa(c)]&&l(d,c)}function m(b){var c=[],d={},e=[];a.a.N(b,function X(h){if(!d[h]){var f=a.getBindingHandler(h);f&&(f.after&&(e.push(h),a.a.K(f.after,function(c){if(b[c]){if(-1!==a.a.O(e,c))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+e.join(", "));X(c)}}),e.length--),c.push({key:h,
|
||||
Bc:f}));d[h]=!0}});return c}function n(b,c,d){var h=a.a.h.Ob(b,z,{}),f=h.Tc;if(!c){if(f)throw Error("You cannot apply bindings multiple times to the same element.");h.Tc=!0}f||(h.context=d);h.Tb||(h.Tb={});var n;if(c&&"function"!==typeof c)n=c;else{var g=a.ca.instance,w=g.getBindingAccessors||k,l=a.X(function(){if(n=c?c(d,b):w.call(g,b,d)){if(d[q])d[q]();if(d[u])d[u]()}return n},null,{j:b});n&&l.ia()||(l=null)}var t=d,v;if(n){var I=function(){return a.a.za(l?l():n,e)},r=l?function(a){return function(){return e(l()[a])}}:
|
||||
function(a){return n[a]};I.get=function(a){return n[a]&&e(r(a))};I.has=function(a){return a in n};a.i.D in n&&a.i.subscribe(b,a.i.D,function(){var c=(0,n[a.i.D])();if(c){var d=a.g.childNodes(b);d.length&&c(d,a.vc(d[0]))}});a.i.na in n&&(t=a.i.yb(b,d),a.i.subscribe(b,a.i.na,function(){var c=(0,n[a.i.na])();c&&a.g.firstChild(b)&&c(b)}));h=m(n);a.a.K(h,function(c){var d=c.Bc.init,e=c.Bc.update,h=c.key;if(8===b.nodeType&&!a.g.aa[h])throw Error("The binding '"+h+"' cannot be used with virtual elements");
|
||||
try{"function"==typeof d&&a.u.C(function(){var a=d(b,r(h),I,t.$data,t);if(a&&a.controlsDescendantBindings){if(v!==p)throw Error("Multiple bindings ("+v+" and "+h+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");v=h}}),"function"==typeof e&&a.X(function(){e(b,r(h),I,t.$data,t)},null,{j:b})}catch(f){throw f.message='Unable to process binding "'+h+": "+n[h]+'"\nMessage: '+f.message,f;}})}h=v===p;return{shouldBindDescendants:h,
|
||||
bindingContextForDescendants:h&&t}}function w(b,c){return b&&b instanceof a.ba?b:new a.ba(b,p,p,c)}var q=Symbol("_subscribable"),v=Symbol("_ancestorBindingInfo"),u=Symbol("_dataDependency");a.c={};var t={script:!0,textarea:!0,template:!0};a.getBindingHandler=function(b){return a.c[b]};var I={};a.ba=function(b,c,d,e,h){function f(){var b=k?g():g,h=a.a.f(b);c?(a.a.extend(m,c),v in c&&(m[v]=c[v])):(m.$parents=[],m.$root=h,m.ko=a);m[q]=w;n?h=m.$data:(m.$rawData=b,m.$data=h);d&&(m[d]=h);e&&e(m,c,h);if(c&&
|
||||
c[q]&&!a.P.o().Pb(c[q]))c[q]();l&&(m[u]=l);return m.$data}var m=this,n=b===I,g=n?p:b,k="function"==typeof g&&!a.U(g),w,l=h&&h.dataDependency;h&&h.exportDependencies?f():(w=a.tb(f),w.w(),w.ia()?w.equalityComparer=null:m[q]=p)};a.ba.prototype.createChildContext=function(b,c,d,e){!e&&c&&"object"==typeof c&&(e=c,c=e.as,d=e.extend);if(c&&e&&e.noChildContext){var h="function"==typeof b&&!a.U(b);return new a.ba(I,this,null,function(a){d&&d(a);a[c]=h?b():b},e)}return new a.ba(b,this,c,function(a,b){a.$parentContext=
|
||||
b;a.$parent=b.$data;a.$parents=(b.$parents||[]).slice(0);a.$parents.unshift(a.$parent);d&&d(a)},e)};a.ba.prototype.extend=function(b,c){return new a.ba(I,this,null,function(c){a.a.extend(c,"function"==typeof b?b(c):b)},c)};var z=a.a.h.ea();c.prototype.Hc=function(){this.Fb&&this.Fb.L&&this.Fb.L.dd(this.node)};c.prototype.dd=function(b){a.a.Ia(this.gb,b);!this.gb.length&&this.D&&this.uc()};c.prototype.uc=function(){this.D=!0;this.qc.L&&!this.gb.length&&(this.qc.L=null,a.a.M.ub(this.node,b),a.i.ka(this.node,
|
||||
a.i.na),this.Hc())};a.i={D:"childrenComplete",na:"descendantsComplete",subscribe:function(b,c,d,e,h){var f=a.a.h.Ob(b,z,{});f.xa||(f.xa=new a.R);h&&h.notifyImmediately&&f.Tb[c]&&a.u.C(d,e,[b]);return f.xa.subscribe(d,e,c)},ka:function(b,c){var d=a.a.h.get(b,z);if(d&&(d.Tb[c]=!0,d.xa&&d.xa.notifySubscribers(b,c),c==a.i.D))if(d.L)d.L.uc();else if(d.L===p&&d.xa&&d.xa.Qa(a.i.na))throw Error("descendantsComplete event not supported for bindings on this node");},yb:function(b,d){var e=a.a.h.Ob(b,z,{});
|
||||
e.L||(e.L=new c(b,e,d[v]));return d[v]==e?d:d.extend(function(a){a[v]=e})}};a.Ad=function(b){return(b=a.a.h.get(b,z))&&b.context};a.eb=function(a,b,c){return n(a,b,w(c))};a.Wc=function(b,c,d){d=w(d);return a.eb(b,g(c,d,b),d)};a.Ha=function(a,b){1!==b.nodeType&&8!==b.nodeType||l(w(a),b)};a.oc=function(a,b,c){if(2>arguments.length){if(b=E.body,!b)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?");}else if(!b||1!==b.nodeType&&8!==b.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");
|
||||
h(w(a,c),b)};a.bd=function(b){if(b&&(1===b.nodeType||8===b.nodeType))return a.Ad(b)};a.vc=function(b){return(b=a.bd(b))?b.$data:p};a.b("bindingHandlers",a.c);a.b("bindingEvent",a.i);a.b("bindingEvent.subscribe",a.i.subscribe);a.b("bindingEvent.startPossiblyAsyncContentBinding",a.i.yb);a.b("applyBindings",a.oc);a.b("applyBindingsToDescendants",a.Ha);a.b("applyBindingAccessorsToNode",a.eb);a.b("applyBindingsToNode",a.Wc);a.b("dataFor",a.vc)})();(function(b){function c(c,e){var h=Object.prototype.hasOwnProperty.call(f,
|
||||
c)?f[c]:b,m;h?h.subscribe(e):(h=f[c]=new a.R,h.subscribe(e),d(c,function(b,d){var e=!(!d||!d.synchronous);g[c]={definition:b,pd:e};delete f[c];m||e?h.notifySubscribers(b):a.la.vb(function(){h.notifySubscribers(b)})}),m=!0)}function d(a,b){e("getConfig",[a],function(c){c?e("loadComponent",[a,c],function(a){b(a,c)}):b(null,null)})}function e(c,d,h,f){f||(f=a.l.loaders.slice(0));var n=f.shift();if(n){var g=n[c];if(g){var q=!1;if(g.apply(n,d.concat(function(a){q?h(null):null!==a?h(a):e(c,d,h,f)}))!==
|
||||
b&&(q=!0,!n.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");}else e(c,d,h,f)}else h(null)}var f={},g={};a.l={get:function(d,e){var h=Object.prototype.hasOwnProperty.call(g,d)?g[d]:b;h?h.pd?a.u.C(function(){e(h.definition)}):a.la.vb(function(){e(h.definition)}):c(d,e)},tc:function(a){delete g[a]},hc:e};a.l.loaders=[];a.b("components",a.l);a.b("components.get",a.l.get);a.b("components.clearCachedDefinition",
|
||||
a.l.tc)})();(function(){function b(b,c,d,e){function g(){0===--u&&e(k)}var k={},u=2,t=d.template;d=d.viewModel;t?f(c,t,function(c){a.l.hc("loadTemplate",[b,c],function(a){k.template=a;g()})}):g();d?f(c,d,function(c){a.l.hc("loadViewModel",[b,c],function(a){k[l]=a;g()})}):g()}function c(a,b,d){if("function"===typeof b)d(function(a){return new b(a)});else if("function"===typeof b[l])d(b[l]);else if("instance"in b){var e=b.instance;d(function(){return e})}else"viewModel"in b?c(a,b.viewModel,d):a("Unknown viewModel value: "+
|
||||
b)}function d(b){if("template"==a.a.fa(b)&&e(b.content))return a.a.La(b.content.childNodes);throw"Template Source Element not a <template>";}function e(a){return D.DocumentFragment?a instanceof DocumentFragment:a&&11===a.nodeType}function f(a,b,c){"string"===typeof b.require?O||D.require?(O||D.require)([b.require],function(a){a&&"object"===typeof a&&a.Ed&&a["default"]&&(a=a["default"]);c(a)}):a("Uses require, but no AMD loader is present"):c(b)}function g(a){return function(b){throw Error("Component '"+
|
||||
a+"': "+b);}}var k={};a.l.register=function(b,c){if(!c)throw Error("Invalid configuration for "+b);if(a.l.pb(b))throw Error("Component "+b+" is already registered");k[b]=c};a.l.pb=function(a){return Object.prototype.hasOwnProperty.call(k,a)};a.l.unregister=function(b){delete k[b];a.l.tc(b)};a.l.wc={getConfig:function(b,c){c(a.l.pb(b)?k[b]:null)},loadComponent:function(a,c,d){var e=g(a);f(e,c,function(c){b(a,e,c,d)})},loadTemplate:function(b,c,f){b=g(b);if("string"===typeof c)f(a.a.Ua(c));else if(c instanceof
|
||||
Array)f(c);else if(e(c))f(a.a.ya(c.childNodes));else if(c.element)if(c=c.element,D.HTMLElement?c instanceof HTMLElement:c&&c.tagName&&1===c.nodeType)f(d(c));else if("string"===typeof c){var k=E.getElementById(c);k?f(d(k)):b("Cannot find element with ID "+c)}else b("Unknown element type: "+c);else b("Unknown template value: "+c)},loadViewModel:function(a,b,d){c(g(a),b,d)}};var l="createViewModel";a.b("components.register",a.l.register);a.b("components.isRegistered",a.l.pb);a.b("components.unregister",
|
||||
a.l.unregister);a.b("components.defaultLoader",a.l.wc);a.l.loaders.push(a.l.wc)})();(function(){function b(b,e){var f=b.getAttribute("params");if(f){var f=c.parseBindingsString(f,e,b,{valueAccessors:!0,bindingParams:!0}),f=a.a.za(f,function(c){return a.o(c,null,{j:b})}),g=a.a.za(f,function(c){var e=c.w();return c.ia()?a.o({read:function(){return a.a.f(c())},write:a.Ta(e)&&function(a){c()(a)},j:b}):e});Object.prototype.hasOwnProperty.call(g,"$raw")||(g.$raw=f);return g}return{$raw:{}}}a.l.getComponentNameForNode=
|
||||
function(b){var c=a.a.fa(b);if(a.l.pb(c)&&(-1!=c.indexOf("-")||"[object HTMLUnknownElement]"==""+b))return c};a.l.mc=function(c,e,f,g){if(1===e.nodeType){var k=a.l.getComponentNameForNode(e);if(k){c=c||{};if(c.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var l={name:k,params:b(e,f)};c.component=g?function(){return l}:l}}return c};var c=new a.ca})();(function(){function b(b,c,d){c=c.template;if(!c)throw Error("Component '"+b+"' has no template");
|
||||
b=a.a.La(c);a.g.sa(d,b)}function c(a,b,c){var d=a.createViewModel;return d?d.call(a,b,c):b}var d=0;a.c.component={init:function(e,f,g,k,l){function h(){var a=m&&m.dispose;"function"===typeof a&&a.call(m);w&&w.s();n=m=w=null}var m,n,w,q=a.a.ya(a.g.childNodes(e));a.g.wa(e);a.a.M.Ga(e,h);a.o(function(){var g=a.a.f(f()),k,t;"string"===typeof g?k=g:(k=a.a.f(g.name),t=a.a.f(g.params));if(!k)throw Error("No component name specified");var p=a.i.yb(e,l),z=n=++d;a.l.get(k,function(d){if(n===z){h();if(!d)throw Error("Unknown component '"+
|
||||
k+"'");b(k,d,e);var f=c(d,t,{element:e,templateNodes:q});d=p.createChildContext(f,{extend:function(a){a.$component=f;a.$componentTemplateNodes=q}});f&&f.koDescendantsComplete&&(w=a.i.subscribe(e,a.i.na,f.koDescendantsComplete,f));m=f;a.Ha(d,e)}})},null,{j:e});return{controlsDescendantBindings:!0}}};a.g.aa.component=!0})();a.c.attr={update:function(b,c){var d=a.a.f(c())||{};a.a.N(d,function(c,d){d=a.a.f(d);var g=c.indexOf(":"),g="lookupNamespaceURI"in b&&0<g&&b.lookupNamespaceURI(c.substr(0,g)),k=
|
||||
!1===d||null===d||d===p;k?g?b.removeAttributeNS(g,c):b.removeAttribute(c):d=d.toString();k||(g?b.setAttributeNS(g,c,d):b.setAttribute(c,d));"name"===c&&(b.name=k?"":d)})}};(function(){function b(b,d,e){var f=a.a.O(a.a.Wb(b),d);0>f?e&&b.push(d):e||b.splice(f,1)}a.c.checked={after:["value","attr"],init:function(c,d,e){function f(){var f=c.checked,g=k();if(!a.P.Sa()&&(f||!h&&!a.P.oa())){var m=a.u.C(d);if(n){var q=w?m.w():m,r=v;v=g;r!==g?f&&(b(q,g,!0),b(q,r,!1)):b(q,g,f);w&&a.Ta(m)&&m(q)}else l&&(g===
|
||||
p?g=f:f||(g=p)),a.m.$a(m,e,"checked",g,!0)}}function g(){var b=a.a.f(d()),e=k();n?(c.checked=0<=a.a.O(b,e),v=e):c.checked=l&&e===p?!!b:k()===b}var k=a.tb(function(){if(e.has("checkedValue"))return a.a.f(e.get("checkedValue"));if(q)return e.has("value")?a.a.f(e.get("value")):c.value}),l="checkbox"==c.type,h="radio"==c.type;if(l||h){var m=d(),n=l&&a.a.f(m)instanceof Array,w=!(n&&m.push&&m.splice),q=h||n,v=n?k():p;a.o(f,null,{j:c});a.a.H(c,"click",f);a.o(g,null,{j:c});m=p}}};a.m.ta.checked=!0;a.c.checkedValue=
|
||||
{update:function(b,d){b.value=a.a.f(d())}}})();a.c["class"]={update:function(b,c){var d=a.a.ac(a.a.f(c()));a.a.zb(b,b.__ko__cssValue,!1);b.__ko__cssValue=d;a.a.zb(b,d,!0)}};a.c.css={update:function(b,c){var d=a.a.f(c());null!==d&&"object"==typeof d?a.a.N(d,function(c,d){d=a.a.f(d);a.a.zb(b,c,d)}):a.c["class"].update(b,c)}};a.c.enable={update:function(b,c){var d=a.a.f(c());d&&b.disabled?b.removeAttribute("disabled"):d||b.disabled||(b.disabled=!0)}};a.c.disable={update:function(b,c){a.c.enable.update(b,
|
||||
function(){return!a.a.f(c())})}};a.c.event={init:function(b,c,d,e,f){var g=c()||{};a.a.N(g,function(g){"string"==typeof g&&a.a.H(b,g,function(b){var h,m=c()[g];if(m){try{var n=a.a.ya(arguments);e=f.$data;n.unshift(e);h=m.apply(e,n)}finally{!0!==h&&(b.preventDefault?b.preventDefault():b.returnValue=!1)}!1===d.get(g+"Bubble")&&(b.cancelBubble=!0,b.stopPropagation&&b.stopPropagation())}})})}};a.c.foreach={Gc:function(b){return function(){var c=b(),d=a.a.Wb(c);if(!d||"number"==typeof d.length)return{foreach:c,
|
||||
templateEngine:a.Z.Fa};a.a.f(c);return{foreach:d.data,as:d.as,noChildContext:d.noChildContext,includeDestroyed:d.includeDestroyed,afterAdd:d.afterAdd,beforeRemove:d.beforeRemove,afterRender:d.afterRender,beforeMove:d.beforeMove,afterMove:d.afterMove,templateEngine:a.Z.Fa}}},init:function(b,c){return a.c.template.init(b,a.c.foreach.Gc(c))},update:function(b,c,d,e,f){return a.c.template.update(b,a.c.foreach.Gc(c),d,e,f)}};a.m.Ka.foreach=!1;a.g.aa.foreach=!0;a.c.hasfocus={init:function(b,c,d){function e(e){b.__ko_hasfocusUpdating=
|
||||
!0;e=b.ownerDocument.activeElement===b;var f=c();a.m.$a(f,d,"hasfocus",e,!0);b.__ko_hasfocusLastValue=e;b.__ko_hasfocusUpdating=!1}var f=e.bind(null,!0),g=e.bind(null,!1);a.a.H(b,"focus",f);a.a.H(b,"focusin",f);a.a.H(b,"blur",g);a.a.H(b,"focusout",g);b.__ko_hasfocusLastValue=!1},update:function(b,c){var d=!!a.a.f(c());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===d||(d?b.focus():b.blur(),!d&&b.__ko_hasfocusLastValue&&b.ownerDocument.body.focus(),a.u.C(a.a.Ab,null,[b,d?"focusin":"focusout"]))}};
|
||||
a.m.ta.hasfocus=!0;a.c.hasFocus=a.c.hasfocus;a.m.ta.hasFocus="hasfocus";a.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.$b(b,c())}};(function(){function b(b,d,e){a.c[b]={init:function(b,c,k,l,h){var m,n,w={},q,p,u;if(d){l=k.get("as");var t=k.get("noChildContext");u=!(l&&t);w={as:l,noChildContext:t,exportDependencies:u}}p=(q="render"==k.get("completeOn"))||k.has(a.i.na);a.o(function(){var k=a.a.f(c()),l=!e!==!k,t=!n,r;if(u||l!==m){p&&(h=a.i.yb(b,h));if(l){if(!d||
|
||||
u)w.dataDependency=a.P.o();r=d?h.createChildContext("function"==typeof k?k:c,w):a.P.oa()?h.extend(null,w):h}t&&a.P.oa()&&(n=a.a.La(a.g.childNodes(b),!0));l?(t||a.g.sa(b,a.a.La(n)),a.Ha(r,b)):(a.g.wa(b),q||a.i.ka(b,a.i.D));m=l}},null,{j:b});return{controlsDescendantBindings:!0}}};a.m.Ka[b]=!1;a.g.aa[b]=!0}b("if");b("ifnot",!1,!0);b("with",!0)})();a.c.let={init:function(b,c,d,e,f){c=f.extend(c);a.Ha(c,b);return{controlsDescendantBindings:!0}}};a.g.aa.let=!0;var N={};a.c.options={init:function(b){if("select"!==
|
||||
a.a.fa(b))throw Error("options binding applies only to SELECT elements");for(;0<b.length;)b.remove(0);return{controlsDescendantBindings:!0}},update:function(b,c,d){function e(){return a.a.fb(b.options,function(a){return a.selected})}function f(a,b,c){var d=typeof b;return"function"==d?b(a):"string"==d?a[b]:c}function g(c,d){if(v&&m)a.i.ka(b,a.i.D);else if(q.length){var e=0<=a.a.O(q,a.v.J(d[0]));d[0].selected=e;v&&!e&&a.u.C(a.a.Ab,null,[b,"change"])}}var k=b.multiple,l=0!=b.length&&k?b.scrollTop:null,
|
||||
h=a.a.f(c()),m=d.get("valueAllowUnset")&&d.has("value"),n=d.get("optionsIncludeDestroyed");c={};var w,q=[];m||(k?q=e().map(a.v.J):0<=b.selectedIndex&&q.push(a.v.J(b.options[b.selectedIndex])));h&&("undefined"==typeof h.length&&(h=[h]),w=a.a.fb(h,function(b){return n||b===p||null===b||!a.a.f(b._destroy)}),d.has("optionsCaption")&&(h=a.a.f(d.get("optionsCaption")),null!==h&&h!==p&&w.unshift(N)));var v=!1;c.beforeRemove=function(a){b.removeChild(a)};h=g;d.has("optionsAfterRender")&&"function"==typeof d.get("optionsAfterRender")&&
|
||||
(h=function(b,c){g(0,c);a.u.C(d.get("optionsAfterRender"),null,[c[0],b!==N?b:p])});a.a.Zb(b,w,function(c,e,h){h.length&&(q=!m&&h[0].selected?[a.v.J(h[0])]:[],v=!0);e=b.ownerDocument.createElement("option");c===N?(a.a.xb(e,d.get("optionsCaption")),a.v.Za(e,p)):(h=f(c,d.get("optionsValue"),c),a.v.Za(e,a.a.f(h)),c=f(c,d.get("optionsText"),h),a.a.xb(e,c));return[e]},c,h);if(!m){var u;k?u=q.length&&e().length<q.length:u=q.length&&0<=b.selectedIndex?a.v.J(b.options[b.selectedIndex])!==q[0]:q.length||0<=
|
||||
b.selectedIndex;u&&a.u.C(a.a.Ab,null,[b,"change"])}(m||a.P.Sa())&&a.i.ka(b,a.i.D);l&&20<Math.abs(l-b.scrollTop)&&(b.scrollTop=l)}};a.c.options.Ub=a.a.h.ea();a.c.selectedOptions={init:function(b,c,d){function e(){var e=c(),f=[];a.a.K(b.getElementsByTagName("option"),function(b){b.selected&&f.push(a.v.J(b))});a.m.$a(e,d,"selectedOptions",f)}function f(){var d=a.a.f(c()),e=b.scrollTop;d&&"number"==typeof d.length&&a.a.K(b.getElementsByTagName("option"),function(b){b.selected=0<=a.a.O(d,a.v.J(b))});b.scrollTop=
|
||||
e}if("select"!=a.a.fa(b))throw Error("selectedOptions binding applies only to SELECT elements");var g;a.i.subscribe(b,a.i.D,function(){g?e():(a.a.H(b,"change",e),g=a.o(f,null,{j:b}))},null,{notifyImmediately:!0})},update:function(){}};a.m.ta.selectedOptions=!0;a.c.style={update:function(b,c){var d=a.a.f(c()||{});a.a.N(d,function(c,d){d=a.a.f(d);if(null===d||d===p||!1===d)d="";if(/^--/.test(c))b.style.setProperty(c,d);else{c=c.replace(/-(\w)/g,function(a,b){return b.toUpperCase()});var g=b.style[c];
|
||||
b.style[c]=d;d===g||b.style[c]!=g||isNaN(d)||(b.style[c]=d+"px")}})}};a.c.submit={init:function(b,c,d,e,f){if("function"!=typeof c())throw Error("The value for a submit binding must be a function");a.a.H(b,"submit",function(a){var d,e=c();try{d=e.call(f.$data,b)}finally{!0!==d&&(a.preventDefault?a.preventDefault():a.returnValue=!1)}})}};a.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.xb(b,c())}};a.g.aa.text=!0;(function(){a.c.textInput={init:function(b,c,
|
||||
d){function e(){var d=a.a.f(c());if(null===d||d===p)d="";l!==p&&d===l?a.a.setTimeout(e,4):b.value!==d&&(b.value=d,g=b.value)}function f(){clearTimeout(k);l=k=p;var e=b.value;g!==e&&(g=e,a.m.$a(c(),d,"textInput",e))}var g=b.value,k,l;a.a.H(b,"input",f);a.a.H(b,"change",f);a.a.H(b,"blur",f);a.o(e,null,{j:b})}};a.m.ta.textInput=!0;a.c.textinput={preprocess:function(a,c,d){d("textInput",a)}}})();a.c.uniqueName={init:function(b,c){c()&&(b.name="ko_unique_"+ ++a.c.uniqueName.cd)}};a.c.uniqueName.cd=0;a.c.using=
|
||||
{init:function(b,c,d,e,f){var g;d.has("as")&&(g={as:d.get("as"),noChildContext:d.get("noChildContext")});c=f.createChildContext(c,g);a.Ha(c,b);return{controlsDescendantBindings:!0}}};a.g.aa.using=!0;a.c.value={init:function(b,c,d){var e=a.a.fa(b),f="input"==e;if(!f||"checkbox"!=b.type&&"radio"!=b.type){var g=[],k=d.get("valueUpdate"),l=null;k&&("string"==typeof k?g=[k]:g=k?k.filter(function(a,b){return k.indexOf(a)===b}):[],a.a.Ia(g,"change"));var h=function(){l=null;var e=c(),f=a.v.J(b);a.m.$a(e,
|
||||
d,"value",f)};a.a.K(g,function(c){var d=h;a.a.Bd(c,"after")&&(d=function(){l=a.v.J(b);a.a.setTimeout(h,0)},c=c.substring(5));a.a.H(b,c,d)});var m;m=f&&"file"==b.type?function(){var d=a.a.f(c());null===d||d===p||""===d?b.value="":a.u.C(h)}:function(){var f=a.a.f(c()),g=a.v.J(b);if(null!==l&&f===l)a.a.setTimeout(m,0);else if(f!==g||g===p)"select"===e?(g=d.get("valueAllowUnset"),a.v.Za(b,f,g),g||f===a.v.J(b)||a.u.C(h)):a.v.Za(b,f)};if("select"===e){var n;a.i.subscribe(b,a.i.D,function(){n?d.get("valueAllowUnset")?
|
||||
m():h():(a.a.H(b,"change",h),n=a.o(m,null,{j:b}))},null,{notifyImmediately:!0})}else a.a.H(b,"change",h),a.o(m,null,{j:b})}else a.eb(b,{checkedValue:c})},update:function(){}};a.m.ta.value=!0;a.c.visible={update:function(b,c){var d=a.a.f(c()),e="none"!=b.style.display;d&&!e?b.style.display="":!d&&e&&(b.style.display="none")}};a.c.hidden={update:function(b,c){a.c.visible.update(b,function(){return!a.a.f(c())})}};(function(b){a.c[b]={init:function(c,d,e,f,g){return a.c.event.init.call(this,c,function(){var a=
|
||||
{};a[b]=d();return a},e,f,g)}}})("click");a.ga=function(){};a.ga.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource");};a.ga.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock");};a.ga.prototype.makeTemplateSource=function(b,c){if("string"==typeof b){c=c||E;var d=c.getElementById(b);if(!d)throw Error("Cannot find template with ID "+b);return new a.A.B(d)}if(1==b.nodeType||8==b.nodeType)return new a.A.ha(b);throw Error("Unknown template type: "+
|
||||
b);};a.ga.prototype.renderTemplate=function(a,c,d,e){a=this.makeTemplateSource(a,e);return this.renderTemplateSource(a,c,d,e)};a.ga.prototype.isTemplateRewritten=function(a,c){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(a,c).data("isRewritten")};a.ga.prototype.rewriteTemplate=function(a,c,d){a=this.makeTemplateSource(a,d);c=c(a.text());a.text(c);a.data("isRewritten",!0)};a.b("templateEngine",a.ga);a.dc=function(){function b(b,c,d,k){b=a.m.Vb(b);for(var l=a.m.Ka,h=0;h<b.length;h++){var m=
|
||||
b[h].key;if(Object.prototype.hasOwnProperty.call(l,m)){var n=l[m];if("function"===typeof n){if(m=n(b[h].value))throw Error(m);}else if(!n)throw Error("This template engine does not support the '"+m+"' binding within its templates");}}d="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+a.m.rb(b,{valueAccessors:!0})+" } })()},'"+d.toLowerCase()+"')";return k.createJavaScriptEvaluatorBlock(d)+c}var c=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,
|
||||
d=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{gd:function(b,c,d){c.isTemplateRewritten(b,d)||c.rewriteTemplate(b,function(b){return a.dc.ud(b,c)},d)},ud:function(a,f){return a.replace(c,function(a,c,d,e,m){return b(m,c,d,f)}).replace(d,function(a,c){return b(c,"\x3c!-- ko --\x3e","#comment",f)})},Xc:function(b,c){return a.Y.Rb(function(d,k){var l=d.nextSibling;l&&l.nodeName.toLowerCase()===c&&a.eb(l,b,k)})}}}();a.b("__tr_ambtns",a.dc.Xc);(function(){a.A={};a.A.B=function(b){if(this.B=b){var c=
|
||||
a.a.fa(b);this.Va="script"===c?1:"textarea"===c?2:"template"==c&&b.content&&11===b.content.nodeType?3:4}};a.A.B.prototype.text=function(){var b=1===this.Va?"text":2===this.Va?"value":"innerHTML";if(0==arguments.length)return this.B[b];var c=arguments[0];"innerHTML"===b?a.a.$b(this.B,c):this.B[b]=c};var b=a.a.h.ea()+"_";a.A.B.prototype.data=function(c){if(1===arguments.length)return a.a.h.get(this.B,b+c);a.a.h.set(this.B,b+c,arguments[1])};var c=a.a.h.ea();a.A.B.prototype.nodes=function(){var b=this.B;
|
||||
if(0==arguments.length){var e=a.a.h.get(b,c)||{},f=e.hb||(3===this.Va?b.content:4===this.Va?b:p);if(!f||e.Uc){var g=this.text();g&&g!==e.Wa&&(f=a.a.wd(g,b.ownerDocument),a.a.h.set(b,c,{hb:f,Wa:g,Uc:!0}))}return f}e=arguments[0];this.Va!==p&&this.text("");a.a.h.set(b,c,{hb:e})};a.A.ha=function(a){this.B=a};a.A.ha.prototype=new a.A.B;a.A.ha.prototype.constructor=a.A.ha;a.A.ha.prototype.text=function(){if(0==arguments.length){var b=a.a.h.get(this.B,c)||{};b.Wa===p&&b.hb&&(b.Wa=b.hb.innerHTML);return b.Wa}a.a.h.set(this.B,
|
||||
c,{Wa:arguments[0]})};a.b("templateSources",a.A);a.b("templateSources.domElement",a.A.B);a.b("templateSources.anonymousTemplate",a.A.ha)})();(function(){function b(b,c,d){var e;for(c=a.g.nextSibling(c);b&&(e=b)!==c;)b=a.g.nextSibling(e),d(e,b)}function c(c,d){if(c.length){var e=c[0],f=c[c.length-1],g=e.parentNode,k=a.ca.instance,l=k.preprocessNode;if(l){b(e,f,function(a,b){var c=a.previousSibling,d=l.call(k,a);d&&(a===e&&(e=d[0]||b),a===f&&(f=d[d.length-1]||c))});c.length=0;if(!e)return;e===f?c.push(e):
|
||||
(c.push(e,f),a.a.Oa(c,g))}b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.oc(d,b)});b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.Y.Pc(b,[d])});a.a.Oa(c,g)}}function d(a){return a.nodeType?a:0<a.length?a[0]:null}function e(b,e,f,k,l){l=l||{};var p=(b&&d(b)||f||{}).ownerDocument,u=l.templateEngine||g;a.dc.gd(f,u,p);f=u.renderTemplate(f,k,l,p);if("number"!=typeof f.length||0<f.length&&"number"!=typeof f[0].nodeType)throw Error("Template engine must return an array of DOM nodes");p=!1;switch(e){case "replaceChildren":a.g.sa(b,
|
||||
f);p=!0;break;case "replaceNode":a.a.Lc(b,f);p=!0;break;case "ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+e);}p&&(c(f,k),l.afterRender&&a.u.C(l.afterRender,null,[f,k[l.as||"$data"]]),"replaceChildren"==e&&a.i.ka(b,a.i.D));return f}function f(b,c,d){return a.U(b)?b():"function"===typeof b?b(c,d):b}var g;a.Mc=function(b){if(b!=p&&!(b instanceof a.ga))throw Error("templateEngine must inherit from ko.templateEngine");g=b};a.Yb=function(b,c,n,k,l){n=n||{};if((n.templateEngine||g)==
|
||||
p)throw Error("Set a template engine before calling renderTemplate");l=l||"replaceChildren";if(k){var v=d(k);return a.X(function(){var g=c&&c instanceof a.ba?c:new a.ba(c,null,null,null,{exportDependencies:!0}),p=f(b,g.$data,g),g=e(k,l,p,g,n);"replaceNode"==l&&(k=g,v=d(k))},null,{Ma:function(){return!v||!a.a.Mb(v)},j:v&&"replaceNode"==l?v.parentNode:v})}return a.Y.Rb(function(d){a.Yb(b,c,n,d,"replaceNode")})};a.xd=function(b,d,g,k,l){function v(b,c){a.u.C(a.a.Zb,null,[k,b,t,g,u,c]);a.i.ka(k,a.i.D)}
|
||||
function u(a,b){c(b,r);g.afterRender&&g.afterRender(b,a);r=null}function t(a,c){r=l.createChildContext(a,{as:z,noChildContext:g.noChildContext,extend:function(a){a.$index=c;z&&(a[z+"Index"]=c)}});var d=f(b,a,r);return e(k,"ignoreTargetNode",d,r,g)}var r,z=g.as,y=!1===g.includeDestroyed||a.options.foreachHidesDestroyed&&!g.includeDestroyed;if(y||g.beforeRemove||!a.Ec(d))return a.X(function(){var b=a.a.f(d)||[];"undefined"==typeof b.length&&(b=[b]);y&&(b=a.a.fb(b,function(b){return b===p||null===b||
|
||||
!a.a.f(b._destroy)}));v(b)},null,{j:k});v(d.w());var A=d.subscribe(function(a){v(d(),a)},null,"arrayChange");A.j(k);return A};var k=a.a.h.ea(),l=a.a.h.ea();a.c.template={init:function(b,c){var d=a.a.f(c());if("string"==typeof d||"name"in d)a.g.wa(b);else if("nodes"in d){d=d.nodes||[];if(a.U(d))throw Error('The "nodes" option must be a plain, non-observable array.');var e=d[0]&&d[0].parentNode;e&&a.a.h.get(e,l)||(e=a.a.Sb(d),a.a.h.set(e,l,!0));(new a.A.ha(b)).nodes(e)}else if(d=a.g.childNodes(b),0<
|
||||
d.length)e=a.a.Sb(d),(new a.A.ha(b)).nodes(e);else throw Error("Anonymous template defined, but no template content was provided");return{controlsDescendantBindings:!0}},update:function(b,c,d,e,f){var g=c();c=a.a.f(g);d=!0;e=null;"string"==typeof c?c={}:(g="name"in c?c.name:b,"if"in c&&(d=a.a.f(c["if"])),d&&"ifnot"in c&&(d=!a.a.f(c.ifnot)),d&&!g&&(d=!1));"foreach"in c?e=a.xd(g,d&&c.foreach||[],c,b,f):d?(d=f,"data"in c&&(d=f.createChildContext(c.data,{as:c.as,noChildContext:c.noChildContext,exportDependencies:!0})),
|
||||
e=a.Yb(g,d,c,b)):a.g.wa(b);f=e;(c=a.a.h.get(b,k))&&"function"==typeof c.s&&c.s();a.a.h.set(b,k,!f||f.ia&&!f.ia()?p:f)}};a.m.Ka.template=function(b){b=a.m.Vb(b);return 1==b.length&&b[0].unknown||a.m.qd(b,"name")?null:"This template engine does not support anonymous templates nested within its templates"};a.g.aa.template=!0})();a.b("setTemplateEngine",a.Mc);a.b("renderTemplate",a.Yb);a.a.Ac=function(a,c,d){if(a.length&&c.length){var e,f,g,k,l;for(e=f=0;(!d||e<d)&&(k=a[f]);++f){for(g=0;l=c[g];++g)if(k.value===
|
||||
l.value){k.moved=l.index;l.moved=k.index;c.splice(g,1);e=g=0;break}e+=g}}};a.a.Jb=function(){function b(b,d,e,f,g){var k=Math.min,l=Math.max,h=[],m,n=b.length,p,q=d.length,r=q-n||1,u=n+q+1,t,y,z;for(m=0;m<=n;m++)for(y=t,h.push(t=[]),z=k(q,m+r),p=l(0,m-1);p<=z;p++)t[p]=p?m?b[m-1]===d[p-1]?y[p-1]:k(y[p]||u,t[p-1]||u)+1:p+1:m+1;k=[];l=[];r=[];m=n;for(p=q;m||p;)q=h[m][p]-1,p&&q===h[m][p-1]?l.push(k[k.length]={status:e,value:d[--p],index:p}):m&&q===h[m-1][p]?r.push(k[k.length]={status:f,value:b[--m],index:m}):
|
||||
(--p,--m,g.sparse||k.push({status:"retained",value:d[p]}));a.a.Ac(r,l,!g.dontLimitMoves&&10*n);return k.reverse()}return function(a,d,e){e="boolean"===typeof e?{dontLimitMoves:e}:e||{};a=a||[];d=d||[];return a.length<d.length?b(a,d,"added","deleted",e):b(d,a,"deleted","added",e)}}();a.b("utils.compareArrays",a.a.Jb);(function(){function b(b,c,d,k,l){var h=[],m=a.X(function(){var m=c(d,l,a.a.Oa(h,b))||[];0<h.length&&(a.a.Lc(h,m),k&&a.u.C(k,null,[d,m,l]));h.length=0;a.a.Hb(h,m)},null,{j:b,Ma:function(){return!a.a.Vc(h)}});
|
||||
return{W:h,X:m.ia()?m:p}}var c=a.a.h.ea(),d=a.a.h.ea();a.a.Zb=function(e,f,g,k,l,h){function m(b){x={ua:b,lb:a.ra(y++)};u.push(x);v||F.push(x)}function n(b){x=q[b];y!==x.lb.w()&&D.push(x);x.lb(y++);a.a.Oa(x.W,e);u.push(x)}function r(b,c){if(b)for(var d=0,e=c.length;d<e;d++)a.a.K(c[d].W,function(a){b(a,d,c[d].ua)})}f=f||[];"undefined"==typeof f.length&&(f=[f]);k=k||{};var q=a.a.h.get(e,c),v=!q,u=[],t=0,y=0,z=[],A=[],B=[],D=[],F=[],x,G=0;if(v)a.a.K(f,m);else{if(!h||q&&q._countWaitingForRemove){var C=
|
||||
Array.prototype.map.call(q,function(a){return a.ua});h=a.a.Jb(C,f,{dontLimitMoves:k.dontLimitMoves,sparse:!0})}for(var C=0,E,H,J;E=h[C];C++)switch(H=E.moved,J=E.index,E.status){case "deleted":for(;t<J;)n(t++);H===p&&(x=q[t],x.X&&(x.X.s(),x.X=p),a.a.Oa(x.W,e).length&&(k.beforeRemove&&(u.push(x),G++,x.ua===d?x=null:B.push(x)),x&&z.push.apply(z,x.W)));t++;break;case "added":for(;y<J;)n(t++);H!==p?(A.push(u.length),n(H)):m(E.value)}for(;y<f.length;)n(t++);u._countWaitingForRemove=G}a.a.h.set(e,c,u);r(k.beforeMove,
|
||||
D);a.a.K(z,k.beforeRemove?a.ma:a.removeNode);var K,L,z=e.ownerDocument.activeElement;if(A.length)for(;(C=A.shift())!=p;){x=u[C];for(K=p;C;)if((L=u[--C].W)&&L.length){K=L[L.length-1];break}for(f=0;t=x.W[f];K=t,f++)a.g.Qb(e,t,K)}for(C=0;x=u[C];C++){x.W||a.a.extend(x,b(e,g,x.ua,l,x.lb));for(f=0;t=x.W[f];K=t,f++)a.g.Qb(e,t,K);!x.nd&&l&&(l(x.ua,x.W,x.lb),x.nd=!0,K=x.W[x.W.length-1])}z&&e.ownerDocument.activeElement!=z&&z.focus();r(k.beforeRemove,B);for(C=0;C<B.length;++C)B[C].ua=d;r(k.afterMove,D);r(k.afterAdd,
|
||||
F)}})();a.b("utils.setDomNodeChildrenFromArrayMapping",a.a.Zb);a.Z=function(){this.allowTemplateRewriting=!1};a.Z.prototype=new a.ga;a.Z.prototype.constructor=a.Z;a.Z.prototype.renderTemplateSource=function(b,c,d,e){if(c=b.vd?b.vd():null)return a.a.ya(c.cloneNode(!0).childNodes);b=b.text();return a.a.Ua(b,e)};a.Z.Fa=new a.Z;a.Mc(a.Z.Fa);a.b("nativeTemplateEngine",a.Z)})})();})();
|
||||
Mb:function(b){return a.a.fd(b,b.ownerDocument.documentElement)},Vc:function(b){return!!a.a.Gb(b,a.a.Mb)},fa:function(a){return a&&a.tagName&&a.tagName.toLowerCase()},sc:function(b){return a.onError?function(){try{return b.apply(this,arguments)}catch(c){throw a.onError&&a.onError(c),c;}}:b},setTimeout:function(b,c){return setTimeout(a.a.sc(b),c)},xc:function(b){setTimeout(function(){a.onError&&a.onError(b);throw b;},0)},H:function(b,c,d){b.addEventListener(c,a.a.sc(d),!1)},Ab:function(a,b){if(!a||
|
||||
!a.nodeType)throw Error("element must be a DOM node when calling triggerEvent");a.dispatchEvent(new Event(b))},f:function(b){return a.U(b)?b():b},Wb:function(b){return a.U(b)?b.w():b},zb:function(a,b,c){if(b){var d=c?"add":"remove";b.split(/\s+/).forEach(function(b){a.classList[d](b)})}},xb:function(b,c){var d=a.a.f(c);if(null===d||d===p)d="";var e=a.g.firstChild(b);!e||3!=e.nodeType||a.g.nextSibling(e)?a.g.sa(b,[b.ownerDocument.createTextNode(d)]):e.data=d},ya:function(a){return Array.from(a)}}}();
|
||||
a.b("utils",a.a);a.b("utils.arrayForEach",a.a.K);a.b("utils.arrayFirst",a.a.Gb);a.b("utils.arrayFilter",a.a.fb);a.b("utils.arrayIndexOf",a.a.N);a.b("utils.arrayPushAll",a.a.Hb);a.b("utils.arrayRemoveItem",a.a.Ia);a.b("utils.cloneNodes",a.a.La);a.b("utils.extend",a.a.extend);a.b("utils.objectMap",a.a.za);a.b("utils.peekObservable",a.a.Wb);a.b("utils.registerEventHandler",a.a.H);a.b("utils.stringifyJson",a.a.Gd);a.b("utils.toggleDomNodeCssClass",a.a.zb);a.b("utils.triggerEvent",a.a.Ab);a.b("utils.unwrapObservable",
|
||||
a.a.f);a.b("utils.objectForEach",a.a.M);a.b("utils.setTextContent",a.a.xb);a.b("unwrap",a.a.f);a.a.h=new function(){var a=0,c="__ko__"+Date.now(),d;d=function(a,b){var d=a[c];!d&&b&&(d=a[c]={});return d};return{get:function(a,b){var c=d(a,!1);return c&&c[b]},set:function(a,b,c){(a=d(a,c!==p))&&(a[b]=c)},Ob:function(a,b,c){a=d(a,!0);return a[b]||(a[b]=c)},clear:function(a){return a[c]?(delete a[c],!0):!1},ea:function(){return a++ +c}}};a.b("utils.domData",a.a.h);a.b("utils.domData.clear",a.a.h.clear);
|
||||
a.a.P=new function(){function b(b,c){var d=a.a.h.get(b,e);d===p&&c&&(d=[],a.a.h.set(b,e,d));return d}function c(c){var e=b(c,!1);if(e)for(var e=e.slice(0),h=0;h<e.length;h++)e[h](c);a.a.h.clear(c);g[c.nodeType]&&d(c.childNodes,!0)}function d(b,d){for(var e=[],f,n=0;n<b.length;n++)if(!d||8===b[n].nodeType)if(c(e[e.length]=f=b[n]),b[n]!==f)for(;n--&&-1==a.a.N(e,b[n]););}var e=a.a.h.ea(),f={1:!0,8:!0,9:!0},g={1:!0,9:!0};return{Ga:function(a,c){if("function"!=typeof c)throw Error("Callback must be a function");
|
||||
b(a,!0).push(c)},ub:function(c,d){var h=b(c,!1);h&&(a.a.Ia(h,d),0==h.length&&a.a.h.set(c,e,p))},ma:function(b){a.u.C(function(){f[b.nodeType]&&(c(b),g[b.nodeType]&&d(b.getElementsByTagName("*")))});return b},removeNode:function(b){a.ma(b);b.parentNode&&b.parentNode.removeChild(b)}}};a.ma=a.a.P.ma;a.removeNode=a.a.P.removeNode;a.b("cleanNode",a.ma);a.b("removeNode",a.removeNode);a.b("utils.domNodeDisposal",a.a.P);a.b("utils.domNodeDisposal.addDisposeCallback",a.a.P.Ga);a.b("utils.domNodeDisposal.removeDisposeCallback",
|
||||
a.a.P.ub);(function(){var b=[0,"",""],c=[1,"<table>","</table>"],d=[3,"<table><tbody><tr>","</tr></tbody></table>"],e=[1,"<select multiple='multiple'>","</select>"],f={thead:c,tbody:c,tfoot:c,tr:[2,"<table><tbody>","</tbody></table>"],td:d,th:d,option:e,optgroup:e};a.a.Ua=function(c,d){var e=d;e||(e=E);var h=e.parentWindow||e.defaultView||D,m=a.a.ac(c).toLowerCase(),e=e.createElement("div"),n;n=(m=m.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&f[m[1]]||b;m=n[0];n="ignored<div>"+n[1]+c+n[2]+
|
||||
"</div>";for("function"==typeof h.innerShiv?e.append(h.innerShiv(n)):e.innerHTML=n;m--;)e=e.lastChild;return a.a.ya(e.lastChild.childNodes)};a.a.wd=function(b,c){var d=a.a.Ua(b,c);return d.length&&d[0].parentElement||a.a.Sb(d)};a.a.$b=function(b,c){a.a.Nb(b);c=a.a.f(c);if(null!==c&&c!==p){"string"!=typeof c&&(c=c.toString());for(var d=a.a.Ua(c,b.ownerDocument),e=0;e<d.length;e++)b.appendChild(d[e])}}})();a.b("utils.parseHtmlFragment",a.a.Ua);a.b("utils.setHtml",a.a.$b);a.Y=function(){function b(c,
|
||||
e){if(c)if(8==c.nodeType){var f=a.Y.Ic(c.nodeValue);null!=f&&e.push({ed:c,sd:f})}else if(1==c.nodeType)for(var f=0,g=c.childNodes,k=g.length;f<k;f++)b(g[f],e)}var c={};return{Rb:function(a){if("function"!=typeof a)throw Error("You can only pass a function to ko.memoization.memoize()");var b=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);c[b]=a;return"\x3c!--[ko_memo:"+b+"]--\x3e"},Oc:function(a,b){var f=c[a];if(f===p)throw Error("Couldn't find any memo with ID "+
|
||||
a+". Perhaps it's already been unmemoized.");try{return f.apply(null,b||[]),!0}finally{delete c[a]}},Pc:function(c,e){var f=[];b(c,f);for(var g=0,k=f.length;g<k;g++){var l=f[g].ed,h=[l];e&&a.a.Hb(h,e);a.Y.Oc(f[g].sd,h);l.nodeValue="";l.parentNode&&l.parentNode.removeChild(l)}},Ic:function(a){return(a=a.match(/^\[ko_memo\:(.*?)\]$/))?a[1]:null}}}();a.b("memoization",a.Y);a.b("memoization.memoize",a.Y.Rb);a.b("memoization.unmemoize",a.Y.Oc);a.b("memoization.parseMemoText",a.Y.Ic);a.b("memoization.unmemoizeDomNodeAndDescendants",
|
||||
a.Y.Pc);a.la=function(){function b(){if(e)for(var b=e,c=0,h;g<e;)if(h=d[g++]){if(g>b){if(5E3<=++c){g=e;a.a.xc(Error("'Too much recursion' after processing "+c+" task groups."));break}b=e}try{h()}catch(f){a.a.xc(f)}}}function c(){b();g=e=d.length=0}var d=[],e=0,f=1,g=0;return{scheduler:function(a){var b=E.createElement("div");(new MutationObserver(a)).observe(b,{attributes:!0});return function(){b.classList.toggle("foo")}}(c),vb:function(b){e||a.la.scheduler(c);d[e++]=b;return f++},cancel:function(a){a=
|
||||
a-(f-e);a>=g&&a<e&&(d[a]=null)},resetForTesting:function(){var a=e-g;g=e=d.length=0;return a},zd:b}}();a.b("tasks",a.la);a.b("tasks.schedule",a.la.vb);a.b("tasks.runEarly",a.la.zd);a.Na={throttle:function(b,c){b.throttleEvaluation=c;var d=null;return a.X({read:b,write:function(e){clearTimeout(d);d=a.a.setTimeout(function(){b(e)},c)}})},rateLimit:function(a,c){var d,e,f;"number"==typeof c?d=c:(d=c.timeout,e=c.method);a.Cb=!1;f="function"==typeof e?e:"notifyWhenChangesStop"==e?T:S;a.qb(function(a){return f(a,
|
||||
d,c)})},deferred:function(b,c){if(!0!==c)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");b.Cb||(b.Cb=!0,b.qb(function(c){var e,f=!1;return function(){if(!f){a.la.cancel(e);e=a.la.vb(c);try{f=!0,b.notifySubscribers(p,"dirty")}finally{f=!1}}}}))},notify:function(a,c){a.equalityComparer="always"==c?null:J}};var R={undefined:1,"boolean":1,number:1,string:1};a.b("extenders",a.Na);a.bc=function(b,c,d){this.$=b;this.ec=
|
||||
c;this.fc=d;this.Db=!1;this.ab=this.Eb=null;a.I(this,"dispose",this.s);a.I(this,"disposeWhenNodeIsRemoved",this.j)};a.bc.prototype.s=function(){this.Db||(this.ab&&a.a.P.ub(this.Eb,this.ab),this.Db=!0,this.fc(),this.$=this.ec=this.fc=this.Eb=this.ab=null)};a.bc.prototype.j=function(b){this.Eb=b;a.a.P.Ga(b,this.ab=this.s.bind(this))};a.R=function(){a.a.wb(this,A);A.mb(this)};var A={mb:function(a){a.S={change:[]};a.lc=1},subscribe:function(b,c,d){var e=this;d=d||"change";var f=new a.bc(e,c?b.bind(c):
|
||||
b,function(){a.a.Ia(e.S[d],f);e.cb&&e.cb(d)});e.Ja&&e.Ja(d);e.S[d]||(e.S[d]=[]);e.S[d].push(f);return f},notifySubscribers:function(b,c){c=c||"change";"change"===c&&this.Bb();if(this.Qa(c)){var d="change"===c&&this.Qc||this.S[c].slice(0);try{a.u.pc();for(var e=0,f;f=d[e];++e)f.Db||f.ec(b)}finally{a.u.end()}}},kb:function(){return this.lc},md:function(a){return this.kb()!==a},Bb:function(){++this.lc},qb:function(b){var c=this,d=a.U(c),e,f,g,k,l;c.bb||(c.bb=c.notifySubscribers,c.notifySubscribers=U);
|
||||
var h=b(function(){c.Ca=!1;d&&k===c&&(k=c.gc?c.gc():c());var a=f||l&&c.ob(g,k);l=f=e=!1;a&&c.bb(g=k)});c.jc=function(a,b){b&&c.Ca||(l=!b);c.Qc=c.S.change.slice(0);c.Ca=e=!0;k=a;h()};c.ic=function(a){e||(g=a,c.bb(a,"beforeChange"))};c.kc=function(){l=!0};c.Sc=function(){c.ob(g,c.w(!0))&&(f=!0)}},Qa:function(a){return this.S[a]&&this.S[a].length},kd:function(b){if(b)return this.S[b]&&this.S[b].length||0;var c=0;a.a.M(this.S,function(a,b){"dirty"!==a&&(c+=b.length)});return c},ob:function(a,c){return!this.equalityComparer||
|
||||
!this.equalityComparer(a,c)},toString:function(){return"[object Object]"},extend:function(b){var c=this;b&&a.a.M(b,function(b,e){var f=a.Na[b];"function"==typeof f&&(c=f(c,e)||c)});return c}};a.I(A,"init",A.mb);a.I(A,"subscribe",A.subscribe);a.I(A,"extend",A.extend);a.I(A,"getSubscriptionsCount",A.kd);a.a.va&&a.a.setPrototypeOf(A,Function.prototype);a.R.fn=A;a.Fc=function(a){return null!=a&&"function"==typeof a.subscribe&&"function"==typeof a.notifySubscribers};a.b("subscribable",a.R);a.b("isSubscribable",
|
||||
a.Fc);a.O=a.u=function(){function b(a){d.push(e);e=a}function c(){e=d.pop()}var d=[],e,f=0;return{pc:b,end:c,Xb:function(b){if(e){if(!a.Fc(b))throw Error("Only subscribable things can act as dependencies");e.Zc.call(e.$c,b,b.Rc||(b.Rc=++f))}},C:function(a,d,e){try{return b(),a.apply(d,e||[])}finally{c()}},oa:function(){if(e)return e.o.oa()},Pa:function(){if(e)return e.o.Pa()},Sa:function(){if(e)return e.Sa},o:function(){if(e)return e.o}}}();a.b("computedContext",a.O);a.b("computedContext.getDependenciesCount",
|
||||
a.O.oa);a.b("computedContext.getDependencies",a.O.Pa);a.b("computedContext.isInitial",a.O.Sa);a.b("computedContext.registerDependency",a.O.Xb);a.b("ignoreDependencies",a.Fd=a.u.C);var F=Symbol("_latestValue");a.ra=function(b){function c(){if(0<arguments.length)return c.ob(c[F],arguments[0])&&(c.Ya(),c[F]=arguments[0],c.Xa()),this;a.u.Xb(c);return c[F]}c[F]=b;a.a.va||a.a.extend(c,a.R.fn);a.R.fn.mb(c);a.a.wb(c,B);a.options.deferUpdates&&a.Na.deferred(c,!0);return c};var B={equalityComparer:J,w:function(){return this[F]},
|
||||
Xa:function(){this.notifySubscribers(this[F],"spectate");this.notifySubscribers(this[F])},Ya:function(){this.notifySubscribers(this[F],"beforeChange")}};a.a.va&&a.a.setPrototypeOf(B,a.R.fn);var G=a.ra.Fa="__ko_proto__";B[G]=a.ra;a.U=function(b){if((b="function"==typeof b&&b[G])&&b!==B[G]&&b!==a.o.fn[G])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!b};a.Ta=function(b){return"function"==typeof b&&(b[G]===B[G]||b[G]===a.o.fn[G]&&b.Cc)};a.b("observable",
|
||||
a.ra);a.b("isObservable",a.U);a.b("isWriteableObservable",a.Ta);a.b("isWritableObservable",a.Ta);a.b("observable.fn",B);a.I(B,"peek",B.w);a.I(B,"valueHasMutated",B.Xa);a.I(B,"valueWillMutate",B.Ya);a.Aa=function(b){b=b||[];if("object"!=typeof b||!("length"in b))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");b=a.ra(b);a.a.wb(b,a.Aa.fn);return b.extend({trackArrayChanges:!0})};a.Aa.fn={remove:function(b){for(var c=this.w(),d=[],e="function"!=
|
||||
typeof b||a.U(b)?function(a){return a===b}:b,f=0;f<c.length;f++){var g=c[f];if(e(g)){0===d.length&&this.Ya();if(c[f]!==g)throw Error("Array modified during remove; cannot remove item");d.push(g);c.splice(f,1);f--}}d.length&&this.Xa();return d},removeAll:function(b){if(b===p){var c=this.w(),d=c.slice(0);this.Ya();c.splice(0,c.length);this.Xa();return d}return b?this.remove(function(c){return 0<=a.a.N(b,c)}):[]},indexOf:function(b){return a.a.N(this(),b)}};a.a.va&&a.a.setPrototypeOf(a.Aa.fn,a.ra.fn);
|
||||
a.a.K("pop push reverse shift sort splice unshift".split(" "),function(b){a.Aa.fn[b]=function(){var a=this.w();this.Ya();this.rc(a,b,arguments);var d=a[b].apply(a,arguments);this.Xa();return d===a?this:d}});a.a.K(["slice"],function(b){a.Aa.fn[b]=function(){var a=this();return a[b].apply(a,arguments)}});a.Ec=function(b){return a.U(b)&&"function"==typeof b.remove&&"function"==typeof b.push};a.b("observableArray",a.Aa);a.b("isObservableArray",a.Ec);a.Na.trackArrayChanges=function(b,c){function d(){function c(){if(l){var d=
|
||||
[].concat(b.w()||[]),e;if(b.Qa("arrayChange")){if(!f||1<l)f=a.a.Jb(h,d,b.Ib);e=f}h=d;f=null;l=0;e&&e.length&&b.notifySubscribers(e,"arrayChange")}}e?c():(e=!0,k=b.subscribe(function(){++l},null,"spectate"),h=[].concat(b.w()||[]),f=null,g=b.subscribe(c))}b.Ib={};c&&"object"==typeof c&&a.a.extend(b.Ib,c);b.Ib.sparse=!0;if(!b.rc){var e=!1,f=null,g,k,l=0,h,m=b.Ja,n=b.cb;b.Ja=function(a){m&&m.call(b,a);"arrayChange"===a&&d()};b.cb=function(a){n&&n.call(b,a);"arrayChange"!==a||b.Qa("arrayChange")||(g&&
|
||||
g.s(),k&&k.s(),k=g=null,e=!1,h=p)};b.rc=function(b,c,d){function h(a,b,c){return k[k.length]={status:a,value:b,index:c}}if(e&&!l){var k=[],m=b.length,n=d.length,g=0;switch(c){case "push":g=m;case "unshift":for(c=0;c<n;c++)h("added",d[c],g+c);break;case "pop":g=m-1;case "shift":m&&h("deleted",b[g],g);break;case "splice":c=Math.min(Math.max(0,0>d[0]?m+d[0]:d[0]),m);for(var m=1===n?m:Math.min(c+(d[1]||0),m),n=c+n-2,g=Math.max(m,n),P=[],Q=[],p=2;c<g;++c,++p)c<m&&Q.push(h("deleted",b[c],c)),c<n&&P.push(h("added",
|
||||
d[p],c));a.a.Ac(Q,P);break;default:return}f=k}}}};var r=Symbol("_state");a.o=a.X=function(b,c,d){function e(){if(0<arguments.length){if("function"===typeof f)f.apply(g.jb,arguments);else 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.");return this}g.pa||a.u.Xb(e);(g.ja||g.G&&e.Ra())&&e.da();return g.V}"object"===typeof b?d=b:(d=d||{},b&&(d.read=b));if("function"!=typeof d.read)throw Error("Pass a function that returns the value of the ko.computed");
|
||||
var f=d.write,g={V:p,qa:!0,ja:!0,nb:!1,cc:!1,pa:!1,sb:!1,G:!1,Kc:d.read,jb:c||d.owner,j:d.disposeWhenNodeIsRemoved||d.j||null,Ma:d.disposeWhen||d.Ma,Lb:null,F:{},T:0,zc:null};e[r]=g;e.Cc="function"===typeof f;a.a.va||a.a.extend(e,a.R.fn);a.R.fn.mb(e);a.a.wb(e,y);d.pure?(g.sb=!0,g.G=!0,a.a.extend(e,Y)):d.deferEvaluation&&a.a.extend(e,Z);a.options.deferUpdates&&a.Na.deferred(e,!0);g.j&&(g.cc=!0,g.j.nodeType||(g.j=null));g.G||d.deferEvaluation||e.da();g.j&&e.ia()&&a.a.P.Ga(g.j,g.Lb=function(){e.s()});
|
||||
return e};var y={equalityComparer:J,oa:function(){return this[r].T},Pa:function(){var b=[];a.a.M(this[r].F,function(a,d){b[d.Da]=d.$});return b},Pb:function(b){if(!this[r].T)return!1;var c=this.Pa();return-1!==a.a.N(c,b)?!0:!!a.a.Gb(c,function(a){return a.Pb&&a.Pb(b)})},nc:function(a,c,d){if(this[r].sb&&c===this)throw Error("A 'pure' computed must not be called recursively");this[r].F[a]=d;d.Da=this[r].T++;d.Ea=c.kb()},Ra:function(){var a,c,d=this[r].F;for(a in d)if(Object.prototype.hasOwnProperty.call(d,
|
||||
a)&&(c=d[a],this.Ba&&c.$.Ca||c.$.md(c.Ea)))return!0},rd:function(){this.Ba&&!this[r].nb&&this.Ba(!1)},ia:function(){var a=this[r];return a.ja||0<a.T},yd:function(){this.Ca?this[r].ja&&(this[r].qa=!0):this.yc()},Nc:function(a){if(a.Cb){var c=a.subscribe(this.rd,this,"dirty"),d=a.subscribe(this.yd,this);return{$:a,s:function(){c.s();d.s()}}}return a.subscribe(this.yc,this)},yc:function(){var b=this,c=b.throttleEvaluation;c&&0<=c?(clearTimeout(this[r].zc),this[r].zc=a.a.setTimeout(function(){b.da(!0)},
|
||||
c)):b.Ba?b.Ba(!0):b.da(!0)},da:function(b){var c=this[r],d=c.Ma,e=!1;if(!c.nb&&!c.pa){if(c.j&&!a.a.Mb(c.j)||d&&d()){if(!c.cc){this.s();return}}else c.cc=!1;c.nb=!0;try{e=this.jd(b)}finally{c.nb=!1}return e}},jd:function(b){var c=this[r],d=!1,e=c.sb?p:!c.T,d={ad:this,ib:c.F,Kb:c.T};a.u.pc({$c:d,Zc:W,o:this,Sa:e});c.F={};c.T=0;var f=this.hd(c,d);c.T?d=this.ob(c.V,f):(this.s(),d=!0);d&&(c.G?this.Bb():this.notifySubscribers(c.V,"beforeChange"),c.V=f,this.notifySubscribers(c.V,"spectate"),!c.G&&b&&this.notifySubscribers(c.V),
|
||||
this.kc&&this.kc());e&&this.notifySubscribers(c.V,"awake");return d},hd:function(b,c){try{var d=b.Kc;return b.jb?d.call(b.jb):d()}finally{a.u.end(),c.Kb&&!b.G&&a.a.M(c.ib,V),b.qa=b.ja=!1}},w:function(a){var c=this[r];(c.ja&&(a||!c.T)||c.G&&this.Ra())&&this.da();return c.V},qb:function(b){a.R.fn.qb.call(this,b);this.gc=function(){this[r].G||(this[r].qa?this.da():this[r].ja=!1);return this[r].V};this.Ba=function(a){this.ic(this[r].V);this[r].ja=!0;a&&(this[r].qa=!0);this.jc(this,!a)}},s:function(){var b=
|
||||
this[r];!b.G&&b.F&&a.a.M(b.F,function(a,b){b.s&&b.s()});b.j&&b.Lb&&a.a.P.ub(b.j,b.Lb);b.F=p;b.T=0;b.pa=!0;b.qa=!1;b.ja=!1;b.G=!1;b.j=p;b.Ma=p;b.Kc=p;this.Cc||(b.jb=p)}},Y={Ja:function(b){var c=this,d=c[r];if(!d.pa&&d.G&&"change"==b){d.G=!1;if(d.qa||c.Ra())d.F=null,d.T=0,c.da()&&c.Bb();else{var e=[];a.a.M(d.F,function(a,b){e[b.Da]=a});a.a.K(e,function(a,b){var e=d.F[a],l=c.Nc(e.$);l.Da=b;l.Ea=e.Ea;d.F[a]=l});c.Ra()&&c.da()&&c.Bb()}d.pa||c.notifySubscribers(d.V,"awake")}},cb:function(b){var c=this[r];
|
||||
c.pa||"change"!=b||this.Qa("change")||(a.a.M(c.F,function(a,b){b.s&&(c.F[a]={$:b.$,Da:b.Da,Ea:b.Ea},b.s())}),c.G=!0,this.notifySubscribers(p,"asleep"))},kb:function(){var b=this[r];b.G&&(b.qa||this.Ra())&&this.da();return a.R.fn.kb.call(this)}},Z={Ja:function(a){"change"!=a&&"beforeChange"!=a||this.w()}};a.a.va&&a.a.setPrototypeOf(y,a.R.fn);var M=a.ra.Fa;y[M]=a.o;a.Dc=function(a){return"function"==typeof a&&a[M]===y[M]};a.od=function(b){return a.Dc(b)&&b[r]&&b[r].sb};a.b("computed",a.o);a.b("dependentObservable",
|
||||
a.o);a.b("isComputed",a.Dc);a.b("isPureComputed",a.od);a.b("computed.fn",y);a.I(y,"peek",y.w);a.I(y,"dispose",y.s);a.I(y,"isActive",y.ia);a.I(y,"getDependenciesCount",y.oa);a.I(y,"getDependencies",y.Pa);a.tb=function(b,c){if("function"===typeof b)return a.o(b,c,{pure:!0});b=a.a.extend({},b);b.pure=!0;return a.o(b,c)};a.b("pureComputed",a.tb);a.Dd=function(b,c,d){function e(c){var e=a.tb(b,d).extend({ka:"always"}),k=e.subscribe(function(a){a&&(k.s(),c(a))});e.notifySubscribers(e.w());return k}return c?
|
||||
e(c.bind(d)):new Promise(e)};a.b("when",a.Dd);(function(){a.v={J:function(b){switch(a.a.fa(b)){case "option":return!0===b.__ko__hasDomDataOptionValue__?a.a.h.get(b,a.c.options.Ub):b.value;case "select":return 0<=b.selectedIndex?a.v.J(b.options[b.selectedIndex]):p;default:return b.value}},Za:function(b,c,d){switch(a.a.fa(b)){case "option":"string"===typeof c?(a.a.h.set(b,a.c.options.Ub,p),delete b.__ko__hasDomDataOptionValue__,b.value=c):(a.a.h.set(b,a.c.options.Ub,c),b.__ko__hasDomDataOptionValue__=
|
||||
!0,b.value="number"===typeof c?c:"");break;case "select":if(""===c||null===c)c=p;for(var e=-1,f=0,g=b.options.length,k;f<g;++f)if(k=a.v.J(b.options[f]),k==c||""===k&&c===p){e=f;break}if(d||0<=e||c===p&&1<b.size)b.selectedIndex=e;break;default:if(null===c||c===p)c="";b.value=c}}}})();a.b("selectExtensions",a.v);a.b("selectExtensions.readValue",a.v.J);a.b("selectExtensions.writeValue",a.v.Za);a.m=function(){function b(b){b=a.a.ac(b);123===b.charCodeAt(0)&&(b=b.slice(1,-1));b+="\n,";var c=[],d=b.match(e),
|
||||
k,w=[],q=0;if(1<d.length){for(var v=0,u;u=d[v];++v){var t=u.charCodeAt(0);if(44===t){if(0>=q){c.push(k&&w.length?{key:k,value:w.join("")}:{unknown:k||w.join("")});k=q=0;w=[];continue}}else if(58===t){if(!q&&!k&&1===w.length){k=w.pop();continue}}else if(47===t&&1<u.length&&(47===u.charCodeAt(1)||42===u.charCodeAt(1)))continue;else 47===t&&v&&1<u.length?(t=d[v-1].match(f))&&!g[t[0]]&&(b=b.substr(b.indexOf(u)+1),d=b.match(e),v=-1,u="/"):40===t||123===t||91===t?++q:41===t||125===t||93===t?--q:k||w.length||
|
||||
34!==t&&39!==t||(u=u.slice(1,-1));w.push(u)}if(0<q)throw Error("Unbalanced parentheses, braces, or brackets");}return c}var c=["true","false","null","undefined"],d=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,e=RegExp("\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|`(?:\\\\.|[^`])*`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*\n|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,\"'`{}()/:[\\]]*[^\\s,\"'`{}()/:[\\]]|[^\\s]","g"),f=/[\])"'A-Za-z0-9_$]+$/,g={"in":1,"return":1,"typeof":1},k={};return{Ka:[],ta:k,Vb:b,rb:function(e,
|
||||
h){function f(b,e){var h;if(!v){var l=a.getBindingHandler(b);if(l&&l.preprocess&&!(e=l.preprocess(e,b,f)))return;if(l=k[b])h=e,0<=a.a.N(c,h)?h=!1:(l=h.match(d),h=null===l?!1:l[1]?"Object("+l[1]+")"+l[2]:h),l=h;l&&g.push("'"+("string"==typeof k[b]?k[b]:b)+"':function(_z){"+h+"=_z}")}q&&(e="function(){return "+e+" }");n.push("'"+b+"':"+e)}h=h||{};var n=[],g=[],q=h.valueAccessors,v=h.bindingParams,u="string"===typeof e?b(e):e;a.a.K(u,function(a){f(a.key||a.unknown,a.value)});g.length&&f("_ko_property_writers",
|
||||
"{"+g.join(",")+" }");return n.join(",")},qd:function(a,b){for(var c=0;c<a.length;c++)if(a[c].key==b)return!0;return!1},$a:function(b,c,d,e,k){if(b&&a.U(b))!a.Ta(b)||k&&b.w()===e||b(e);else if((b=c.get("_ko_property_writers"))&&b[d])b[d](e)}}}();a.b("expressionRewriting",a.m);a.b("expressionRewriting.bindingRewriteValidators",a.m.Ka);a.b("expressionRewriting.parseObjectLiteral",a.m.Vb);a.b("expressionRewriting.preProcessBindings",a.m.rb);a.b("expressionRewriting._twoWayBindings",a.m.ta);a.b("jsonExpressionRewriting",
|
||||
a.m);a.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",a.m.rb);(function(){function b(a){return 8==a.nodeType&&e.test(a.nodeValue)}function c(a){return 8==a.nodeType&&f.test(a.nodeValue)}function d(d,e){for(var h=d,f=1,n=[];h=h.nextSibling;){if(c(h)&&(a.a.h.set(h,g,!0),f--,0===f))return n;n.push(h);b(h)&&f++}if(!e)throw Error("Cannot find closing comment tag to match: "+d.nodeValue);return null}var e=/^\s*ko(?:\s+([\s\S]+))?\s*$/,f=/^\s*\/ko\s*$/,g="__ko_matchedEndComment__";a.g={aa:{},
|
||||
childNodes:function(a){return b(a)?d(a):a.childNodes},wa:function(c){if(b(c)){c=a.g.childNodes(c);for(var d=0,e=c.length;d<e;d++)a.removeNode(c[d])}else a.a.Nb(c)},sa:function(c,d){if(b(c)){a.g.wa(c);for(var e=c.nextSibling,f=0,n=d.length;f<n;f++)e.parentNode.insertBefore(d[f],e)}else a.a.sa(c,d)},Jc:function(a,c){var d;b(a)?(d=a.nextSibling,a=a.parentNode):d=a.firstChild;a.insertBefore(c,d)},Qb:function(c,d,e){e?(e=e.nextSibling,b(c)&&(c=c.parentNode),c.insertBefore(d,e)):a.g.Jc(c,d)},firstChild:function(a){if(b(a))return!a.nextSibling||
|
||||
c(a.nextSibling)?null:a.nextSibling;if(a.firstChild&&c(a.firstChild))throw Error("Found invalid end comment, as the first child of "+a);return a.firstChild},nextSibling:function(e){if(b(e)){var f=d(e,void 0);e=f?0<f.length?f[f.length-1].nextSibling:e.nextSibling:null}if(e.nextSibling&&c(e.nextSibling)){f=e.nextSibling;if(c(f)&&!a.a.h.get(f,g))throw Error("Found end comment without a matching opening comment, as child of "+e);return null}return e.nextSibling},ld:b,Cd:function(a){return(a=a.nodeValue.match(e))?
|
||||
a[1]:null}}})();a.b("virtualElements",a.g);a.b("virtualElements.allowedBindings",a.g.aa);a.b("virtualElements.emptyNode",a.g.wa);a.b("virtualElements.insertAfter",a.g.Qb);a.b("virtualElements.prepend",a.g.Jc);a.b("virtualElements.setDomNodeChildren",a.g.sa);(function(){a.ca=function(){this.Yc={}};a.a.extend(a.ca.prototype,{nodeHasBindings:function(b){switch(b.nodeType){case 1:return null!=b.getAttribute("data-bind")||a.l.getComponentNameForNode(b);case 8:return a.g.ld(b);default:return!1}},getBindings:function(b,
|
||||
c){var d=this.getBindingsString(b,c),d=d?this.parseBindingsString(d,c,b):null;return a.l.mc(d,b,c,!1)},getBindingAccessors:function(b,c){var d=this.getBindingsString(b,c),d=d?this.parseBindingsString(d,c,b,{valueAccessors:!0}):null;return a.l.mc(d,b,c,!0)},getBindingsString:function(b){switch(b.nodeType){case 1:return b.getAttribute("data-bind");case 8:return a.g.Cd(b);default:return null}},parseBindingsString:function(b,c,d,e){try{var f=this.Yc,g=b+(e&&e.valueAccessors||""),k;if(!(k=f[g])){var l,
|
||||
h="with($context){with($data||{}){return{"+a.m.rb(b,e)+"}}}";l=new Function("$context","$element",h);k=f[g]=l}return k(c,d)}catch(m){throw m.message="Unable to parse bindings.\nBindings value: "+b+"\nMessage: "+m.message,m;}}});a.ca.instance=new a.ca})();a.b("bindingProvider",a.ca);(function(){function b(b){var c=(b=a.a.h.get(b,z))&&b.L;c&&(b.L=null,c.Hc())}function c(c,d,e){this.node=c;this.qc=d;this.gb=[];this.D=!1;d.L||a.a.P.Ga(c,b);e&&e.L&&(e.L.gb.push(c),this.Fb=e)}function d(a){return function(){return a}}
|
||||
function e(a){return a()}function f(b){return a.a.za(a.u.C(b),function(a,c){return function(){return b()[c]}})}function g(b,c,e){return"function"===typeof b?f(b.bind(null,c,e)):a.a.za(b,d)}function k(a,b){return f(this.getBindings.bind(this,a,b))}function l(b,c){var d=a.g.firstChild(c);if(d){var e,f=a.ca.instance,m=f.preprocessNode;if(m){for(;e=d;)d=a.g.nextSibling(e),m.call(f,e);d=a.g.firstChild(c)}for(;e=d;)d=a.g.nextSibling(e),h(b,e)}a.i.ka(c,a.i.D)}function h(b,c){var d=b;if(1===c.nodeType||a.ca.instance.nodeHasBindings(c))d=
|
||||
n(c,null,b).bindingContextForDescendants;d&&!t[a.a.fa(c)]&&l(d,c)}function m(b){var c=[],d={},e=[];a.a.M(b,function X(h){if(!d[h]){var f=a.getBindingHandler(h);f&&(f.after&&(e.push(h),a.a.K(f.after,function(c){if(b[c]){if(-1!==a.a.N(e,c))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+e.join(", "));X(c)}}),e.length--),c.push({key:h,Bc:f}));d[h]=!0}});return c}function n(b,c,d){var h=a.a.h.Ob(b,z,{}),f=h.Tc;if(!c){if(f)throw Error("You cannot apply bindings multiple times to the same element.");
|
||||
h.Tc=!0}f||(h.context=d);h.Tb||(h.Tb={});var n;if(c&&"function"!==typeof c)n=c;else{var g=a.ca.instance,w=g.getBindingAccessors||k,l=a.X(function(){if(n=c?c(d,b):w.call(g,b,d)){if(d[q])d[q]();if(d[u])d[u]()}return n},null,{j:b});n&&l.ia()||(l=null)}var t=d,v;if(n){var I=function(){return a.a.za(l?l():n,e)},r=l?function(a){return function(){return e(l()[a])}}:function(a){return n[a]};I.get=function(a){return n[a]&&e(r(a))};I.has=function(a){return a in n};a.i.D in n&&a.i.subscribe(b,a.i.D,function(){var c=
|
||||
(0,n[a.i.D])();if(c){var d=a.g.childNodes(b);d.length&&c(d,a.vc(d[0]))}});a.i.na in n&&(t=a.i.yb(b,d),a.i.subscribe(b,a.i.na,function(){var c=(0,n[a.i.na])();c&&a.g.firstChild(b)&&c(b)}));h=m(n);a.a.K(h,function(c){var d=c.Bc.init,e=c.Bc.update,h=c.key;if(8===b.nodeType&&!a.g.aa[h])throw Error("The binding '"+h+"' cannot be used with virtual elements");try{"function"==typeof d&&a.u.C(function(){var a=d(b,r(h),I,t.$data,t);if(a&&a.controlsDescendantBindings){if(v!==p)throw Error("Multiple bindings ("+
|
||||
v+" and "+h+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");v=h}}),"function"==typeof e&&a.X(function(){e(b,r(h),I,t.$data,t)},null,{j:b})}catch(f){throw f.message='Unable to process binding "'+h+": "+n[h]+'"\nMessage: '+f.message,f;}})}h=v===p;return{shouldBindDescendants:h,bindingContextForDescendants:h&&t}}function w(b,c){return b&&b instanceof a.ba?b:new a.ba(b,p,p,c)}var q=Symbol("_subscribable"),v=Symbol("_ancestorBindingInfo"),
|
||||
u=Symbol("_dataDependency");a.c={};var t={script:!0,textarea:!0,template:!0};a.getBindingHandler=function(b){return a.c[b]};var I={};a.ba=function(b,c,d,e,h){function f(){var b=k?g():g,h=a.a.f(b);c?(a.a.extend(m,c),v in c&&(m[v]=c[v])):(m.$parents=[],m.$root=h,m.ko=a);m[q]=w;n?h=m.$data:(m.$rawData=b,m.$data=h);d&&(m[d]=h);e&&e(m,c,h);if(c&&c[q]&&!a.O.o().Pb(c[q]))c[q]();l&&(m[u]=l);return m.$data}var m=this,n=b===I,g=n?p:b,k="function"==typeof g&&!a.U(g),w,l=h&&h.dataDependency;h&&h.exportDependencies?
|
||||
f():(w=a.tb(f),w.w(),w.ia()?w.equalityComparer=null:m[q]=p)};a.ba.prototype.createChildContext=function(b,c,d,e){!e&&c&&"object"==typeof c&&(e=c,c=e.as,d=e.extend);if(c&&e&&e.noChildContext){var h="function"==typeof b&&!a.U(b);return new a.ba(I,this,null,function(a){d&&d(a);a[c]=h?b():b},e)}return new a.ba(b,this,c,function(a,b){a.$parentContext=b;a.$parent=b.$data;a.$parents=(b.$parents||[]).slice(0);a.$parents.unshift(a.$parent);d&&d(a)},e)};a.ba.prototype.extend=function(b,c){return new a.ba(I,
|
||||
this,null,function(c){a.a.extend(c,"function"==typeof b?b(c):b)},c)};var z=a.a.h.ea();c.prototype.Hc=function(){this.Fb&&this.Fb.L&&this.Fb.L.dd(this.node)};c.prototype.dd=function(b){a.a.Ia(this.gb,b);!this.gb.length&&this.D&&this.uc()};c.prototype.uc=function(){this.D=!0;this.qc.L&&!this.gb.length&&(this.qc.L=null,a.a.P.ub(this.node,b),a.i.ka(this.node,a.i.na),this.Hc())};a.i={D:"childrenComplete",na:"descendantsComplete",subscribe:function(b,c,d,e,h){var f=a.a.h.Ob(b,z,{});f.xa||(f.xa=new a.R);
|
||||
h&&h.notifyImmediately&&f.Tb[c]&&a.u.C(d,e,[b]);return f.xa.subscribe(d,e,c)},ka:function(b,c){var d=a.a.h.get(b,z);if(d&&(d.Tb[c]=!0,d.xa&&d.xa.notifySubscribers(b,c),c==a.i.D))if(d.L)d.L.uc();else if(d.L===p&&d.xa&&d.xa.Qa(a.i.na))throw Error("descendantsComplete event not supported for bindings on this node");},yb:function(b,d){var e=a.a.h.Ob(b,z,{});e.L||(e.L=new c(b,e,d[v]));return d[v]==e?d:d.extend(function(a){a[v]=e})}};a.Ad=function(b){return(b=a.a.h.get(b,z))&&b.context};a.eb=function(a,
|
||||
b,c){return n(a,b,w(c))};a.Wc=function(b,c,d){d=w(d);return a.eb(b,g(c,d,b),d)};a.Ha=function(a,b){1!==b.nodeType&&8!==b.nodeType||l(w(a),b)};a.oc=function(a,b,c){if(2>arguments.length){if(b=E.body,!b)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?");}else if(!b||1!==b.nodeType&&8!==b.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");h(w(a,c),b)};a.bd=function(b){if(b&&(1===b.nodeType||
|
||||
8===b.nodeType))return a.Ad(b)};a.vc=function(b){return(b=a.bd(b))?b.$data:p};a.b("bindingHandlers",a.c);a.b("bindingEvent",a.i);a.b("bindingEvent.subscribe",a.i.subscribe);a.b("bindingEvent.startPossiblyAsyncContentBinding",a.i.yb);a.b("applyBindings",a.oc);a.b("applyBindingsToDescendants",a.Ha);a.b("applyBindingAccessorsToNode",a.eb);a.b("applyBindingsToNode",a.Wc);a.b("dataFor",a.vc)})();(function(b){function c(c,e){var h=Object.prototype.hasOwnProperty.call(f,c)?f[c]:b,m;h?h.subscribe(e):(h=f[c]=
|
||||
new a.R,h.subscribe(e),d(c,function(b,d){var e=!(!d||!d.synchronous);g[c]={definition:b,pd:e};delete f[c];m||e?h.notifySubscribers(b):a.la.vb(function(){h.notifySubscribers(b)})}),m=!0)}function d(a,b){e("getConfig",[a],function(c){c?e("loadComponent",[a,c],function(a){b(a,c)}):b(null,null)})}function e(c,d,h,f){f||(f=a.l.loaders.slice(0));var n=f.shift();if(n){var g=n[c];if(g){var q=!1;if(g.apply(n,d.concat(function(a){q?h(null):null!==a?h(a):e(c,d,h,f)}))!==b&&(q=!0,!n.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");
|
||||
}else e(c,d,h,f)}else h(null)}var f={},g={};a.l={get:function(d,e){var h=Object.prototype.hasOwnProperty.call(g,d)?g[d]:b;h?h.pd?a.u.C(function(){e(h.definition)}):a.la.vb(function(){e(h.definition)}):c(d,e)},tc:function(a){delete g[a]},hc:e};a.l.loaders=[];a.b("components",a.l);a.b("components.get",a.l.get);a.b("components.clearCachedDefinition",a.l.tc)})();(function(){function b(b,c,d,e){function g(){0===--u&&e(k)}var k={},u=2,t=d.template;d=d.viewModel;t?f(c,t,function(c){a.l.hc("loadTemplate",
|
||||
[b,c],function(a){k.template=a;g()})}):g();d?f(c,d,function(c){a.l.hc("loadViewModel",[b,c],function(a){k[l]=a;g()})}):g()}function c(a,b,d){if("function"===typeof b)d(function(a){return new b(a)});else if("function"===typeof b[l])d(b[l]);else if("instance"in b){var e=b.instance;d(function(){return e})}else"viewModel"in b?c(a,b.viewModel,d):a("Unknown viewModel value: "+b)}function d(b){if("template"==a.a.fa(b)&&e(b.content))return a.a.La(b.content.childNodes);throw"Template Source Element not a <template>";
|
||||
}function e(a){return D.DocumentFragment?a instanceof DocumentFragment:a&&11===a.nodeType}function f(a,b,c){"string"===typeof b.require?O||D.require?(O||D.require)([b.require],function(a){a&&"object"===typeof a&&a.Ed&&a["default"]&&(a=a["default"]);c(a)}):a("Uses require, but no AMD loader is present"):c(b)}function g(a){return function(b){throw Error("Component '"+a+"': "+b);}}var k={};a.l.register=function(b,c){if(!c)throw Error("Invalid configuration for "+b);if(a.l.pb(b))throw Error("Component "+
|
||||
b+" is already registered");k[b]=c};a.l.pb=function(a){return Object.prototype.hasOwnProperty.call(k,a)};a.l.unregister=function(b){delete k[b];a.l.tc(b)};a.l.wc={getConfig:function(b,c){c(a.l.pb(b)?k[b]:null)},loadComponent:function(a,c,d){var e=g(a);f(e,c,function(c){b(a,e,c,d)})},loadTemplate:function(b,c,f){b=g(b);if("string"===typeof c)f(a.a.Ua(c));else if(c instanceof Array)f(c);else if(e(c))f(a.a.ya(c.childNodes));else if(c.element)if(c=c.element,D.HTMLElement?c instanceof HTMLElement:c&&c.tagName&&
|
||||
1===c.nodeType)f(d(c));else if("string"===typeof c){var k=E.getElementById(c);k?f(d(k)):b("Cannot find element with ID "+c)}else b("Unknown element type: "+c);else b("Unknown template value: "+c)},loadViewModel:function(a,b,d){c(g(a),b,d)}};var l="createViewModel";a.b("components.register",a.l.register);a.b("components.isRegistered",a.l.pb);a.b("components.unregister",a.l.unregister);a.b("components.defaultLoader",a.l.wc);a.l.loaders.push(a.l.wc)})();(function(){function b(b,e){var f=b.getAttribute("params");
|
||||
if(f){var f=c.parseBindingsString(f,e,b,{valueAccessors:!0,bindingParams:!0}),f=a.a.za(f,function(c){return a.o(c,null,{j:b})}),g=a.a.za(f,function(c){var e=c.w();return c.ia()?a.o({read:function(){return a.a.f(c())},write:a.Ta(e)&&function(a){c()(a)},j:b}):e});Object.prototype.hasOwnProperty.call(g,"$raw")||(g.$raw=f);return g}return{$raw:{}}}a.l.getComponentNameForNode=function(b){var c=a.a.fa(b);if(a.l.pb(c)&&(-1!=c.indexOf("-")||"[object HTMLUnknownElement]"==""+b))return c};a.l.mc=function(c,
|
||||
e,f,g){if(1===e.nodeType){var k=a.l.getComponentNameForNode(e);if(k){c=c||{};if(c.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var l={name:k,params:b(e,f)};c.component=g?function(){return l}:l}}return c};var c=new a.ca})();(function(){function b(b,c,d){c=c.template;if(!c)throw Error("Component '"+b+"' has no template");b=a.a.La(c);a.g.sa(d,b)}function c(a,b,c){var d=a.createViewModel;return d?d.call(a,b,c):b}var d=0;a.c.component={init:function(e,
|
||||
f,g,k,l){function h(){var a=m&&m.dispose;"function"===typeof a&&a.call(m);w&&w.s();n=m=w=null}var m,n,w,q=a.a.ya(a.g.childNodes(e));a.g.wa(e);a.a.P.Ga(e,h);a.o(function(){var g=a.a.f(f()),k,t;"string"===typeof g?k=g:(k=a.a.f(g.name),t=a.a.f(g.params));if(!k)throw Error("No component name specified");var p=a.i.yb(e,l),z=n=++d;a.l.get(k,function(d){if(n===z){h();if(!d)throw Error("Unknown component '"+k+"'");b(k,d,e);var f=c(d,t,{element:e,templateNodes:q});d=p.createChildContext(f,{extend:function(a){a.$component=
|
||||
f;a.$componentTemplateNodes=q}});f&&f.koDescendantsComplete&&(w=a.i.subscribe(e,a.i.na,f.koDescendantsComplete,f));m=f;a.Ha(d,e)}})},null,{j:e});return{controlsDescendantBindings:!0}}};a.g.aa.component=!0})();a.c.attr={update:function(b,c){var d=a.a.f(c())||{};a.a.M(d,function(c,d){d=a.a.f(d);var g=c.indexOf(":"),g="lookupNamespaceURI"in b&&0<g&&b.lookupNamespaceURI(c.substr(0,g)),k=!1===d||null===d||d===p;k?g?b.removeAttributeNS(g,c):b.removeAttribute(c):d=d.toString();k||(g?b.setAttributeNS(g,c,
|
||||
d):b.setAttribute(c,d));"name"===c&&(b.name=k?"":d)})}};(function(){function b(b,d,e){var f=a.a.N(a.a.Wb(b),d);0>f?e&&b.push(d):e||b.splice(f,1)}a.c.checked={after:["value","attr"],init:function(c,d,e){function f(){var f=c.checked,g=k();if(!a.O.Sa()&&(f||!h&&!a.O.oa())){var m=a.u.C(d);if(n){var q=w?m.w():m,r=v;v=g;r!==g?f&&(b(q,g,!0),b(q,r,!1)):b(q,g,f);w&&a.Ta(m)&&m(q)}else l&&(g===p?g=f:f||(g=p)),a.m.$a(m,e,"checked",g,!0)}}function g(){var b=a.a.f(d()),e=k();n?(c.checked=0<=a.a.N(b,e),v=e):c.checked=
|
||||
l&&e===p?!!b:k()===b}var k=a.tb(function(){if(e.has("checkedValue"))return a.a.f(e.get("checkedValue"));if(q)return e.has("value")?a.a.f(e.get("value")):c.value}),l="checkbox"==c.type,h="radio"==c.type;if(l||h){var m=d(),n=l&&a.a.f(m)instanceof Array,w=!(n&&m.push&&m.splice),q=h||n,v=n?k():p;a.o(f,null,{j:c});a.a.H(c,"click",f);a.o(g,null,{j:c});m=p}}};a.m.ta.checked=!0;a.c.checkedValue={update:function(b,d){b.value=a.a.f(d())}}})();a.c["class"]={update:function(b,c){var d=a.a.ac(a.a.f(c()));a.a.zb(b,
|
||||
b.__ko__cssValue,!1);b.__ko__cssValue=d;a.a.zb(b,d,!0)}};a.c.css={update:function(b,c){var d=a.a.f(c());null!==d&&"object"==typeof d?a.a.M(d,function(c,d){d=a.a.f(d);a.a.zb(b,c,d)}):a.c["class"].update(b,c)}};a.c.enable={update:function(b,c){var d=a.a.f(c());d&&b.disabled?b.removeAttribute("disabled"):d||b.disabled||(b.disabled=!0)}};a.c.disable={update:function(b,c){a.c.enable.update(b,function(){return!a.a.f(c())})}};a.c.event={init:function(b,c,d,e,f){var g=c()||{};a.a.M(g,function(g){"string"==
|
||||
typeof g&&a.a.H(b,g,function(b){var h,m=c()[g];if(m){try{var n=a.a.ya(arguments);e=f.$data;n.unshift(e);h=m.apply(e,n)}finally{!0!==h&&(b.preventDefault?b.preventDefault():b.returnValue=!1)}!1===d.get(g+"Bubble")&&(b.cancelBubble=!0,b.stopPropagation&&b.stopPropagation())}})})}};a.c.foreach={Gc:function(b){return function(){var c=b(),d=a.a.Wb(c);if(!d||"number"==typeof d.length)return{foreach:c,templateEngine:a.Z.Fa};a.a.f(c);return{foreach:d.data,as:d.as,noChildContext:d.noChildContext,includeDestroyed:d.includeDestroyed,
|
||||
afterAdd:d.afterAdd,beforeRemove:d.beforeRemove,afterRender:d.afterRender,beforeMove:d.beforeMove,afterMove:d.afterMove,templateEngine:a.Z.Fa}}},init:function(b,c){return a.c.template.init(b,a.c.foreach.Gc(c))},update:function(b,c,d,e,f){return a.c.template.update(b,a.c.foreach.Gc(c),d,e,f)}};a.m.Ka.foreach=!1;a.g.aa.foreach=!0;a.c.hasfocus={init:function(b,c,d){function e(e){b.__ko_hasfocusUpdating=!0;e=b.ownerDocument.activeElement===b;var f=c();a.m.$a(f,d,"hasfocus",e,!0);b.__ko_hasfocusLastValue=
|
||||
e;b.__ko_hasfocusUpdating=!1}var f=e.bind(null,!0),g=e.bind(null,!1);a.a.H(b,"focus",f);a.a.H(b,"focusin",f);a.a.H(b,"blur",g);a.a.H(b,"focusout",g);b.__ko_hasfocusLastValue=!1},update:function(b,c){var d=!!a.a.f(c());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===d||(d?b.focus():b.blur(),!d&&b.__ko_hasfocusLastValue&&b.ownerDocument.body.focus(),a.u.C(a.a.Ab,null,[b,d?"focusin":"focusout"]))}};a.m.ta.hasfocus=!0;a.c.hasFocus=a.c.hasfocus;a.m.ta.hasFocus="hasfocus";a.c.html={init:function(){return{controlsDescendantBindings:!0}},
|
||||
update:function(b,c){a.a.$b(b,c())}};(function(){function b(b,d,e){a.c[b]={init:function(b,c,k,l,h){var m,n,w={},q,p,u;if(d){l=k.get("as");var t=k.get("noChildContext");u=!(l&&t);w={as:l,noChildContext:t,exportDependencies:u}}p=(q="render"==k.get("completeOn"))||k.has(a.i.na);a.o(function(){var k=a.a.f(c()),l=!e!==!k,t=!n,r;if(u||l!==m){p&&(h=a.i.yb(b,h));if(l){if(!d||u)w.dataDependency=a.O.o();r=d?h.createChildContext("function"==typeof k?k:c,w):a.O.oa()?h.extend(null,w):h}t&&a.O.oa()&&(n=a.a.La(a.g.childNodes(b),
|
||||
!0));l?(t||a.g.sa(b,a.a.La(n)),a.Ha(r,b)):(a.g.wa(b),q||a.i.ka(b,a.i.D));m=l}},null,{j:b});return{controlsDescendantBindings:!0}}};a.m.Ka[b]=!1;a.g.aa[b]=!0}b("if");b("ifnot",!1,!0);b("with",!0)})();a.c.let={init:function(b,c,d,e,f){c=f.extend(c);a.Ha(c,b);return{controlsDescendantBindings:!0}}};a.g.aa.let=!0;var N={};a.c.options={init:function(b){if("select"!==a.a.fa(b))throw Error("options binding applies only to SELECT elements");for(;0<b.length;)b.remove(0);return{controlsDescendantBindings:!0}},
|
||||
update:function(b,c,d){function e(){return a.a.fb(b.options,function(a){return a.selected})}function f(a,b,c){var d=typeof b;return"function"==d?b(a):"string"==d?a[b]:c}function g(c,d){if(v&&m)a.i.ka(b,a.i.D);else if(q.length){var e=0<=a.a.N(q,a.v.J(d[0]));d[0].selected=e;v&&!e&&a.u.C(a.a.Ab,null,[b,"change"])}}var k=b.multiple,l=0!=b.length&&k?b.scrollTop:null,h=a.a.f(c()),m=d.get("valueAllowUnset")&&d.has("value"),n=d.get("optionsIncludeDestroyed");c={};var w,q=[];m||(k?q=e().map(a.v.J):0<=b.selectedIndex&&
|
||||
q.push(a.v.J(b.options[b.selectedIndex])));h&&("undefined"==typeof h.length&&(h=[h]),w=a.a.fb(h,function(b){return n||b===p||null===b||!a.a.f(b._destroy)}),d.has("optionsCaption")&&(h=a.a.f(d.get("optionsCaption")),null!==h&&h!==p&&w.unshift(N)));var v=!1;c.beforeRemove=function(a){b.removeChild(a)};h=g;d.has("optionsAfterRender")&&"function"==typeof d.get("optionsAfterRender")&&(h=function(b,c){g(0,c);a.u.C(d.get("optionsAfterRender"),null,[c[0],b!==N?b:p])});a.a.Zb(b,w,function(c,e,h){h.length&&
|
||||
(q=!m&&h[0].selected?[a.v.J(h[0])]:[],v=!0);e=b.ownerDocument.createElement("option");c===N?(a.a.xb(e,d.get("optionsCaption")),a.v.Za(e,p)):(h=f(c,d.get("optionsValue"),c),a.v.Za(e,a.a.f(h)),c=f(c,d.get("optionsText"),h),a.a.xb(e,c));return[e]},c,h);if(!m){var u;k?u=q.length&&e().length<q.length:u=q.length&&0<=b.selectedIndex?a.v.J(b.options[b.selectedIndex])!==q[0]:q.length||0<=b.selectedIndex;u&&a.u.C(a.a.Ab,null,[b,"change"])}(m||a.O.Sa())&&a.i.ka(b,a.i.D);l&&20<Math.abs(l-b.scrollTop)&&(b.scrollTop=
|
||||
l)}};a.c.options.Ub=a.a.h.ea();a.c.selectedOptions={init:function(b,c,d){function e(){var e=c(),f=[];a.a.K(b.getElementsByTagName("option"),function(b){b.selected&&f.push(a.v.J(b))});a.m.$a(e,d,"selectedOptions",f)}function f(){var d=a.a.f(c()),e=b.scrollTop;d&&"number"==typeof d.length&&a.a.K(b.getElementsByTagName("option"),function(b){b.selected=0<=a.a.N(d,a.v.J(b))});b.scrollTop=e}if("select"!=a.a.fa(b))throw Error("selectedOptions binding applies only to SELECT elements");var g;a.i.subscribe(b,
|
||||
a.i.D,function(){g?e():(a.a.H(b,"change",e),g=a.o(f,null,{j:b}))},null,{notifyImmediately:!0})},update:function(){}};a.m.ta.selectedOptions=!0;a.c.style={update:function(b,c){var d=a.a.f(c()||{});a.a.M(d,function(c,d){d=a.a.f(d);if(null===d||d===p||!1===d)d="";if(/^--/.test(c))b.style.setProperty(c,d);else{c=c.replace(/-(\w)/g,function(a,b){return b.toUpperCase()});var g=b.style[c];b.style[c]=d;d===g||b.style[c]!=g||isNaN(d)||(b.style[c]=d+"px")}})}};a.c.submit={init:function(b,c,d,e,f){if("function"!=
|
||||
typeof c())throw Error("The value for a submit binding must be a function");a.a.H(b,"submit",function(a){var d,e=c();try{d=e.call(f.$data,b)}finally{!0!==d&&(a.preventDefault?a.preventDefault():a.returnValue=!1)}})}};a.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.xb(b,c())}};a.g.aa.text=!0;(function(){a.c.textInput={init:function(b,c,d){function e(){var d=a.a.f(c());if(null===d||d===p)d="";l!==p&&d===l?a.a.setTimeout(e,4):b.value!==d&&(b.value=d,g=b.value)}
|
||||
function f(){clearTimeout(k);l=k=p;var e=b.value;g!==e&&(g=e,a.m.$a(c(),d,"textInput",e))}var g=b.value,k,l;a.a.H(b,"input",f);a.a.H(b,"change",f);a.a.H(b,"blur",f);a.o(e,null,{j:b})}};a.m.ta.textInput=!0;a.c.textinput={preprocess:function(a,c,d){d("textInput",a)}}})();a.c.uniqueName={init:function(b,c){c()&&(b.name="ko_unique_"+ ++a.c.uniqueName.cd)}};a.c.uniqueName.cd=0;a.c.using={init:function(b,c,d,e,f){var g;d.has("as")&&(g={as:d.get("as"),noChildContext:d.get("noChildContext")});c=f.createChildContext(c,
|
||||
g);a.Ha(c,b);return{controlsDescendantBindings:!0}}};a.g.aa.using=!0;a.c.value={init:function(b,c,d){var e=a.a.fa(b),f="input"==e;if(!f||"checkbox"!=b.type&&"radio"!=b.type){var g=[],k=d.get("valueUpdate"),l=null;k&&("string"==typeof k?g=[k]:g=k?k.filter(function(a,b){return k.indexOf(a)===b}):[],a.a.Ia(g,"change"));var h=function(){l=null;var e=c(),f=a.v.J(b);a.m.$a(e,d,"value",f)};a.a.K(g,function(c){var d=h;a.a.Bd(c,"after")&&(d=function(){l=a.v.J(b);a.a.setTimeout(h,0)},c=c.substring(5));a.a.H(b,
|
||||
c,d)});var m;m=f&&"file"==b.type?function(){var d=a.a.f(c());null===d||d===p||""===d?b.value="":a.u.C(h)}:function(){var f=a.a.f(c()),g=a.v.J(b);if(null!==l&&f===l)a.a.setTimeout(m,0);else if(f!==g||g===p)"select"===e?(g=d.get("valueAllowUnset"),a.v.Za(b,f,g),g||f===a.v.J(b)||a.u.C(h)):a.v.Za(b,f)};if("select"===e){var n;a.i.subscribe(b,a.i.D,function(){n?d.get("valueAllowUnset")?m():h():(a.a.H(b,"change",h),n=a.o(m,null,{j:b}))},null,{notifyImmediately:!0})}else a.a.H(b,"change",h),a.o(m,null,{j:b})}else a.eb(b,
|
||||
{checkedValue:c})},update:function(){}};a.m.ta.value=!0;a.c.visible={update:function(b,c){var d=a.a.f(c()),e="none"!=b.style.display;d&&!e?b.style.display="":!d&&e&&(b.style.display="none")}};a.c.hidden={update:function(b,c){a.c.visible.update(b,function(){return!a.a.f(c())})}};(function(b){a.c[b]={init:function(c,d,e,f,g){return a.c.event.init.call(this,c,function(){var a={};a[b]=d();return a},e,f,g)}}})("click");a.ga=function(){};a.ga.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource");
|
||||
};a.ga.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock");};a.ga.prototype.makeTemplateSource=function(b,c){if("string"==typeof b){c=c||E;var d=c.getElementById(b);if(!d)throw Error("Cannot find template with ID "+b);return new a.A.B(d)}if(1==b.nodeType||8==b.nodeType)return new a.A.ha(b);throw Error("Unknown template type: "+b);};a.ga.prototype.renderTemplate=function(a,c,d,e){a=this.makeTemplateSource(a,e);return this.renderTemplateSource(a,
|
||||
c,d,e)};a.ga.prototype.isTemplateRewritten=function(a,c){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(a,c).data("isRewritten")};a.ga.prototype.rewriteTemplate=function(a,c,d){a=this.makeTemplateSource(a,d);c=c(a.text());a.text(c);a.data("isRewritten",!0)};a.b("templateEngine",a.ga);a.dc=function(){function b(b,c,d,k){b=a.m.Vb(b);for(var l=a.m.Ka,h=0;h<b.length;h++){var m=b[h].key;if(Object.prototype.hasOwnProperty.call(l,m)){var n=l[m];if("function"===typeof n){if(m=n(b[h].value))throw Error(m);
|
||||
}else if(!n)throw Error("This template engine does not support the '"+m+"' binding within its templates");}}d="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+a.m.rb(b,{valueAccessors:!0})+" } })()},'"+d.toLowerCase()+"')";return k.createJavaScriptEvaluatorBlock(d)+c}var c=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,d=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{gd:function(b,c,d){c.isTemplateRewritten(b,
|
||||
d)||c.rewriteTemplate(b,function(b){return a.dc.ud(b,c)},d)},ud:function(a,f){return a.replace(c,function(a,c,d,e,m){return b(m,c,d,f)}).replace(d,function(a,c){return b(c,"\x3c!-- ko --\x3e","#comment",f)})},Xc:function(b,c){return a.Y.Rb(function(d,k){var l=d.nextSibling;l&&l.nodeName.toLowerCase()===c&&a.eb(l,b,k)})}}}();a.b("__tr_ambtns",a.dc.Xc);(function(){a.A={};a.A.B=function(b){if(this.B=b){var c=a.a.fa(b);this.Va="script"===c?1:"textarea"===c?2:"template"==c&&b.content&&11===b.content.nodeType?
|
||||
3:4}};a.A.B.prototype.text=function(){var b=1===this.Va?"text":2===this.Va?"value":"innerHTML";if(0==arguments.length)return this.B[b];var c=arguments[0];"innerHTML"===b?a.a.$b(this.B,c):this.B[b]=c};var b=a.a.h.ea()+"_";a.A.B.prototype.data=function(c){if(1===arguments.length)return a.a.h.get(this.B,b+c);a.a.h.set(this.B,b+c,arguments[1])};var c=a.a.h.ea();a.A.B.prototype.nodes=function(){var b=this.B;if(0==arguments.length){var e=a.a.h.get(b,c)||{},f=e.hb||(3===this.Va?b.content:4===this.Va?b:p);
|
||||
if(!f||e.Uc){var g=this.text();g&&g!==e.Wa&&(f=a.a.wd(g,b.ownerDocument),a.a.h.set(b,c,{hb:f,Wa:g,Uc:!0}))}return f}e=arguments[0];this.Va!==p&&this.text("");a.a.h.set(b,c,{hb:e})};a.A.ha=function(a){this.B=a};a.A.ha.prototype=new a.A.B;a.A.ha.prototype.constructor=a.A.ha;a.A.ha.prototype.text=function(){if(0==arguments.length){var b=a.a.h.get(this.B,c)||{};b.Wa===p&&b.hb&&(b.Wa=b.hb.innerHTML);return b.Wa}a.a.h.set(this.B,c,{Wa:arguments[0]})};a.b("templateSources",a.A);a.b("templateSources.domElement",
|
||||
a.A.B);a.b("templateSources.anonymousTemplate",a.A.ha)})();(function(){function b(b,c,d){var e;for(c=a.g.nextSibling(c);b&&(e=b)!==c;)b=a.g.nextSibling(e),d(e,b)}function c(c,d){if(c.length){var e=c[0],f=c[c.length-1],g=e.parentNode,k=a.ca.instance,l=k.preprocessNode;if(l){b(e,f,function(a,b){var c=a.previousSibling,d=l.call(k,a);d&&(a===e&&(e=d[0]||b),a===f&&(f=d[d.length-1]||c))});c.length=0;if(!e)return;e===f?c.push(e):(c.push(e,f),a.a.Oa(c,g))}b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||
|
||||
a.oc(d,b)});b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.Y.Pc(b,[d])});a.a.Oa(c,g)}}function d(a){return a.nodeType?a:0<a.length?a[0]:null}function e(b,e,f,k,l){l=l||{};var p=(b&&d(b)||f||{}).ownerDocument,u=l.templateEngine||g;a.dc.gd(f,u,p);f=u.renderTemplate(f,k,l,p);if("number"!=typeof f.length||0<f.length&&"number"!=typeof f[0].nodeType)throw Error("Template engine must return an array of DOM nodes");p=!1;switch(e){case "replaceChildren":a.g.sa(b,f);p=!0;break;case "replaceNode":a.a.Lc(b,
|
||||
f);p=!0;break;case "ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+e);}p&&(c(f,k),l.afterRender&&a.u.C(l.afterRender,null,[f,k[l.as||"$data"]]),"replaceChildren"==e&&a.i.ka(b,a.i.D));return f}function f(b,c,d){return a.U(b)?b():"function"===typeof b?b(c,d):b}var g;a.Mc=function(b){if(b!=p&&!(b instanceof a.ga))throw Error("templateEngine must inherit from ko.templateEngine");g=b};a.Yb=function(b,c,n,k,l){n=n||{};if((n.templateEngine||g)==p)throw Error("Set a template engine before calling renderTemplate");
|
||||
l=l||"replaceChildren";if(k){var v=d(k);return a.X(function(){var g=c&&c instanceof a.ba?c:new a.ba(c,null,null,null,{exportDependencies:!0}),p=f(b,g.$data,g),g=e(k,l,p,g,n);"replaceNode"==l&&(k=g,v=d(k))},null,{Ma:function(){return!v||!a.a.Mb(v)},j:v&&"replaceNode"==l?v.parentNode:v})}return a.Y.Rb(function(d){a.Yb(b,c,n,d,"replaceNode")})};a.xd=function(b,d,g,k,l){function v(b,c){a.u.C(a.a.Zb,null,[k,b,t,g,u,c]);a.i.ka(k,a.i.D)}function u(a,b){c(b,r);g.afterRender&&g.afterRender(b,a);r=null}function t(a,
|
||||
c){r=l.createChildContext(a,{as:z,noChildContext:g.noChildContext,extend:function(a){a.$index=c;z&&(a[z+"Index"]=c)}});var d=f(b,a,r);return e(k,"ignoreTargetNode",d,r,g)}var r,z=g.as,y=!1===g.includeDestroyed||a.options.foreachHidesDestroyed&&!g.includeDestroyed;if(y||g.beforeRemove||!a.Ec(d))return a.X(function(){var b=a.a.f(d)||[];"undefined"==typeof b.length&&(b=[b]);y&&(b=a.a.fb(b,function(b){return b===p||null===b||!a.a.f(b._destroy)}));v(b)},null,{j:k});v(d.w());var A=d.subscribe(function(a){v(d(),
|
||||
a)},null,"arrayChange");A.j(k);return A};var k=a.a.h.ea(),l=a.a.h.ea();a.c.template={init:function(b,c){var d=a.a.f(c());if("string"==typeof d||"name"in d)a.g.wa(b);else if("nodes"in d){d=d.nodes||[];if(a.U(d))throw Error('The "nodes" option must be a plain, non-observable array.');var e=d[0]&&d[0].parentNode;e&&a.a.h.get(e,l)||(e=a.a.Sb(d),a.a.h.set(e,l,!0));(new a.A.ha(b)).nodes(e)}else if(d=a.g.childNodes(b),0<d.length)e=a.a.Sb(d),(new a.A.ha(b)).nodes(e);else throw Error("Anonymous template defined, but no template content was provided");
|
||||
return{controlsDescendantBindings:!0}},update:function(b,c,d,e,f){var g=c();c=a.a.f(g);d=!0;e=null;"string"==typeof c?c={}:(g="name"in c?c.name:b,"if"in c&&(d=a.a.f(c["if"])),d&&"ifnot"in c&&(d=!a.a.f(c.ifnot)),d&&!g&&(d=!1));"foreach"in c?e=a.xd(g,d&&c.foreach||[],c,b,f):d?(d=f,"data"in c&&(d=f.createChildContext(c.data,{as:c.as,noChildContext:c.noChildContext,exportDependencies:!0})),e=a.Yb(g,d,c,b)):a.g.wa(b);f=e;(c=a.a.h.get(b,k))&&"function"==typeof c.s&&c.s();a.a.h.set(b,k,!f||f.ia&&!f.ia()?
|
||||
p:f)}};a.m.Ka.template=function(b){b=a.m.Vb(b);return 1==b.length&&b[0].unknown||a.m.qd(b,"name")?null:"This template engine does not support anonymous templates nested within its templates"};a.g.aa.template=!0})();a.b("setTemplateEngine",a.Mc);a.b("renderTemplate",a.Yb);a.a.Ac=function(a,c,d){if(a.length&&c.length){var e,f,g,k,l;for(e=f=0;(!d||e<d)&&(k=a[f]);++f){for(g=0;l=c[g];++g)if(k.value===l.value){k.moved=l.index;l.moved=k.index;c.splice(g,1);e=g=0;break}e+=g}}};a.a.Jb=function(){function b(b,
|
||||
d,e,f,g){var k=Math.min,l=Math.max,h=[],m,n=b.length,p,q=d.length,r=q-n||1,u=n+q+1,t,y,z;for(m=0;m<=n;m++)for(y=t,h.push(t=[]),z=k(q,m+r),p=l(0,m-1);p<=z;p++)t[p]=p?m?b[m-1]===d[p-1]?y[p-1]:k(y[p]||u,t[p-1]||u)+1:p+1:m+1;k=[];l=[];r=[];m=n;for(p=q;m||p;)q=h[m][p]-1,p&&q===h[m][p-1]?l.push(k[k.length]={status:e,value:d[--p],index:p}):m&&q===h[m-1][p]?r.push(k[k.length]={status:f,value:b[--m],index:m}):(--p,--m,g.sparse||k.push({status:"retained",value:d[p]}));a.a.Ac(r,l,!g.dontLimitMoves&&10*n);return k.reverse()}
|
||||
return function(a,d,e){e="boolean"===typeof e?{dontLimitMoves:e}:e||{};a=a||[];d=d||[];return a.length<d.length?b(a,d,"added","deleted",e):b(d,a,"deleted","added",e)}}();a.b("utils.compareArrays",a.a.Jb);(function(){function b(b,c,d,k,l){var h=[],m=a.X(function(){var m=c(d,l,a.a.Oa(h,b))||[];0<h.length&&(a.a.Lc(h,m),k&&a.u.C(k,null,[d,m,l]));h.length=0;a.a.Hb(h,m)},null,{j:b,Ma:function(){return!a.a.Vc(h)}});return{W:h,X:m.ia()?m:p}}var c=a.a.h.ea(),d=a.a.h.ea();a.a.Zb=function(e,f,g,k,l,h){function m(b){x=
|
||||
{ua:b,lb:a.ra(y++)};u.push(x);v||F.push(x)}function n(b){x=q[b];y!==x.lb.w()&&D.push(x);x.lb(y++);a.a.Oa(x.W,e);u.push(x)}function r(b,c){if(b)for(var d=0,e=c.length;d<e;d++)a.a.K(c[d].W,function(a){b(a,d,c[d].ua)})}f=f||[];"undefined"==typeof f.length&&(f=[f]);k=k||{};var q=a.a.h.get(e,c),v=!q,u=[],t=0,y=0,z=[],A=[],B=[],D=[],F=[],x,G=0;if(v)a.a.K(f,m);else{if(!h||q&&q._countWaitingForRemove){var C=Array.prototype.map.call(q,function(a){return a.ua});h=a.a.Jb(C,f,{dontLimitMoves:k.dontLimitMoves,
|
||||
sparse:!0})}for(var C=0,E,H,J;E=h[C];C++)switch(H=E.moved,J=E.index,E.status){case "deleted":for(;t<J;)n(t++);H===p&&(x=q[t],x.X&&(x.X.s(),x.X=p),a.a.Oa(x.W,e).length&&(k.beforeRemove&&(u.push(x),G++,x.ua===d?x=null:B.push(x)),x&&z.push.apply(z,x.W)));t++;break;case "added":for(;y<J;)n(t++);H!==p?(A.push(u.length),n(H)):m(E.value)}for(;y<f.length;)n(t++);u._countWaitingForRemove=G}a.a.h.set(e,c,u);r(k.beforeMove,D);a.a.K(z,k.beforeRemove?a.ma:a.removeNode);var K,L,z=e.ownerDocument.activeElement;
|
||||
if(A.length)for(;(C=A.shift())!=p;){x=u[C];for(K=p;C;)if((L=u[--C].W)&&L.length){K=L[L.length-1];break}for(f=0;t=x.W[f];K=t,f++)a.g.Qb(e,t,K)}for(C=0;x=u[C];C++){x.W||a.a.extend(x,b(e,g,x.ua,l,x.lb));for(f=0;t=x.W[f];K=t,f++)a.g.Qb(e,t,K);!x.nd&&l&&(l(x.ua,x.W,x.lb),x.nd=!0,K=x.W[x.W.length-1])}z&&e.ownerDocument.activeElement!=z&&z.focus();r(k.beforeRemove,B);for(C=0;C<B.length;++C)B[C].ua=d;r(k.afterMove,D);r(k.afterAdd,F)}})();a.b("utils.setDomNodeChildrenFromArrayMapping",a.a.Zb);a.Z=function(){this.allowTemplateRewriting=
|
||||
!1};a.Z.prototype=new a.ga;a.Z.prototype.constructor=a.Z;a.Z.prototype.renderTemplateSource=function(b,c,d,e){if(c=b.vd?b.vd():null)return a.a.ya(c.cloneNode(!0).childNodes);b=b.text();return a.a.Ua(b,e)};a.Z.Fa=new a.Z;a.Mc(a.Z.Fa);a.b("nativeTemplateEngine",a.Z)})})();})();
|
||||
|
|
|
|||
1
vendors/knockout/src/options.js
vendored
1
vendors/knockout/src/options.js
vendored
|
|
@ -1,7 +1,6 @@
|
|||
// For any options that may affect various areas of Knockout and aren't directly associated with data binding.
|
||||
ko.options = {
|
||||
'deferUpdates': false,
|
||||
'useOnlyNativeEvents': false,
|
||||
'foreachHidesDestroyed': false
|
||||
};
|
||||
|
||||
|
|
|
|||
11
vendors/knockout/src/utils.domNodeDisposal.js
vendored
11
vendors/knockout/src/utils.domNodeDisposal.js
vendored
|
|
@ -28,9 +28,6 @@ ko.utils.domNodeDisposal = new (function () {
|
|||
// Erase the DOM data
|
||||
ko.utils.domData.clear(node);
|
||||
|
||||
// Perform cleanup needed by external libraries (currently only jQuery, but can be extended)
|
||||
ko.utils.domNodeDisposal["cleanExternalData"](node);
|
||||
|
||||
// Clear any immediate-child comment nodes, as these wouldn't have been found by
|
||||
// node.getElementsByTagName("*") in cleanNode() (comment nodes aren't elements)
|
||||
if (cleanableNodeTypesWithDescendants[node.nodeType]) {
|
||||
|
|
@ -86,14 +83,6 @@ ko.utils.domNodeDisposal = new (function () {
|
|||
ko.cleanNode(node);
|
||||
if (node.parentNode)
|
||||
node.parentNode.removeChild(node);
|
||||
},
|
||||
|
||||
'cleanExternalData' : function (node) {
|
||||
// Special support for jQuery here because it's so commonly used.
|
||||
// Many jQuery plugins (including jquery.tmpl) store data using jQuery's equivalent of domData
|
||||
// so notify it to tear down any resources associated with the node & descendants here.
|
||||
if (jQuery && jQuery['cleanData'])
|
||||
jQuery['cleanData']([node]);
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
5
vendors/knockout/src/utils.js
vendored
5
vendors/knockout/src/utils.js
vendored
|
|
@ -246,10 +246,7 @@ ko.utils = (function () {
|
|||
registerEventHandler: function (element, eventType, handler) {
|
||||
var wrappedHandler = ko.utils.catchFunctionErrors(handler);
|
||||
|
||||
if (!ko.options['useOnlyNativeEvents'] && jQuery) {
|
||||
jQuery(element)['on'](eventType, wrappedHandler);
|
||||
} else
|
||||
element.addEventListener(eventType, wrappedHandler, false);
|
||||
element.addEventListener(eventType, wrappedHandler, false);
|
||||
},
|
||||
|
||||
triggerEvent: function (element, eventType) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue