e.utils.arrayIndexOf(c,m(a))})},b.mappedIndexOf=function(a){varc=C(b(),m);a=m(a);returne.utils.arrayIndexOf(c,a)},b.mappedGet=function(a){returnb()[b.mappedIndexOf(a)]},b.mappedCreate=function(a){if(-1!==b.mappedIndexOf(a))throwError("There already is an object with the key that you specified.");varc=h()?x(a):a;u()&&(a=v(c,a),e.isWriteableObservable(c)?c(a):c=a);b.push(c);returnc});n=C(e.utils.unwrapObservable(b),m).sort();g=C(c,m);s&&g.sort();s=e.utils.compareArrays(n,g);n={};varJ,A=e.utils.unwrapObservable(c),
f;d++){varl=b[d];if(R(l,a)===c)returnl}throwError("When calling ko.update*, the key '"+c+"' was not found!");}functionC(b,c){returne.utils.arrayMap(e.utils.unwrapObservable(b),function(a){returnc?R(a,c):a})}functionQ(b,c){if("array"===f.getType(b))for(vara=0;a<b.length;a++)c(a);elsefor(ainb)c(a)}functionP(b){varc=f.getType(b);return("object"===c||"array"===c)&&null!==b}functionT(){varb=[],c=[];this.save=function(a,d){varf=e.utils.arrayIndexOf(b,a);0<=f?c[f]=d:(b.push(a),c.push(d))};
function(b){if(0==arguments.length)throwError("When calling ko.fromJS, pass the object you want to convert.");try{B++||(G=[],I=newS);varc,a;2==arguments.length&&(arguments[1][p]?a=arguments[1]:c=arguments[1]);3==arguments.length&&(c=arguments[1],a=arguments[2]);a&&(c=E(c,a[p]));c=z(c);vard=F(a,b,c);a&&(d=a);if(!--B)for(;G.length;){vare=G.pop();e&&(e(),e.__DO.throttleEvaluation=e.throttleEvaluation)}d[p]=E(d[p],c);returnd}catch(f){throwB=0,f;}};f.fromJSON=function(b){varc=e.utils.parseJson(b);
arguments[0]=c;returnf.fromJS.apply(this,arguments)};f.updateFromJS=function(){throwError("ko.mapping.updateFromJS, use ko.mapping.fromJS instead. Please note that the order of parameters is different!");};f.updateFromJSON=function(){throwError("ko.mapping.updateFromJSON, use ko.mapping.fromJSON instead. Please note that the order of parameters is different!");};f.toJS=function(b,c){j||f.resetDefaultOptions();if(0==arguments.length)throwError("When calling ko.mapping.toJS, pass the object you want to convert.");
if("array"!==f.getType(j.ignore))throwError("ko.mapping.defaultOptions().ignore should be an array.");if("array"!==f.getType(j.include))throwError("ko.mapping.defaultOptions().include should be an array.");if("array"!==f.getType(j.copy))throwError("ko.mapping.defaultOptions().copy should be an array.");c=z(c,b[p]);returnf.visitModel(b,function(a){returne.utils.unwrapObservable(a)},c)};f.toJSON=function(b,c){vara=f.toJS(b,c);returne.utils.stringifyJson(a)};f.defaultOptions=function(){if(0<arguments.length)j=