!function(e,t){"undefined"==typeof process&&(e.process={argv:[],cwd:function(){return""},browser:!0,env:{NODE_ENV:"development"},version:"",platform:e.navigator&&e.navigator.userAgent&&/Windows/.test(e.navigator.userAgent)?"win":""})}("object"==typeof self&&self.Object==Object?self:"object"==typeof process&&"[object process]"===Object.prototype.toString.call(process)?global:window),function(u,l,t){var f=l.define,d=function(e){var t,n=e.split("."),r=l;for(t=0;t<n.length&&r;t++)r=r[n[t]];return r},p=l.define&&l.define.modules||l._define&&l._define.modules||{},h=l.define=function(e,t,n){var r;"function"==typeof t&&(n=t,t=[]);var a,i,o=[];for(a=0;a<t.length;a++)o.push(u[t[a]]?d(u[t[a]]):p[t[a]]||d(t[a]));"require"===(i=t)[0]&&"exports"===i[1]&&"module"===i[2]||!t.length&&n.length?(r={exports:{}},o[0]=function(e){return u[e]?d(u[e]):p[e]},o[1]=r.exports,o[2]=r):o[0]||"exports"!==t[0]?o[0]||"module"!==t[0]||(o[0]={id:e}):(r={exports:{}},o[0]=r.exports,"module"===t[1]&&(o[1]=r)),l.define=f;var s=n?n.apply(null,o):void 0;l.define=h,s=r&&r.exports?r.exports:s,p[e]=s;var c=u[e];c&&!d(c)&&(function(e){if(!e||!e.__esModule)return!1;var t={__esModule:!0,default:!0};for(var n in e)if(!t[n])return!1;return!0}(s)&&(s=s.default),function(e,t){var n,r,a,i=e.split("."),o=l;for(n=0;n<i.length-1;n++)(a=o[r=i[n]])||(a=o[r]={}),o=a;o[r=i[i.length-1]]=t}(c,s))};l.define.orig=f,l.define.modules=p,l.define.amd=!0,h("@loader",[],function(){var e=function(){};return{get:function(){return{prepareGlobal:e,retrieveGlobal:e}},global:l,__exec:function(e){t(e.source,l)}}})}({jquery:"jQuery","can-namespace":"can",kefir:"Kefir","validate.js":"validate",react:"React"},"object"==typeof self&&self.Object==Object?self:"object"==typeof process&&"[object process]"===Object.prototype.toString.call(process)?global:window,function(__$source__,__$global__){eval("(function() { "+__$source__+" \n }).call(__$global__);")}),define("can-namespace",function(e,t,n){n.exports={}}),define("can-symbol",["require","exports","module","can-namespace"],function(u,e,t){!function(e,t,n,r){"use strict";var a,i=u("can-namespace");if("undefined"!=typeof Symbol&&"function"==typeof Symbol.for&&"symbol"==typeof Symbol("a symbol for testing symbols"))a=Symbol;else{var o=0,s={},c={};(a=function(e){var t="@@symbol"+o+++e,n={};return Object.defineProperties(n,{toString:{value:function(){return t}}}),n}).for=function(e){var t=s[e];return t||(t=s[e]=a(e),c[t]=e),t},a.keyFor=function(e){return c[e]},["hasInstance","isConcatSpreadable","iterator","match","prototype","replace","search","species","split","toPrimitive","toStringTag","unscopables"].forEach(function(e){a[e]=a("Symbol."+e)})}["isMapLike","isListLike","isValueLike","isFunctionLike","getOwnKeys","getOwnKeyDescriptor","proto","getOwnEnumerableKeys","hasOwnKey","hasKey","size","getName","getIdentity","assignDeep","updateDeep","getValue","setValue","getKeyValue","setKeyValue","updateValues","addValue","removeValues","apply","new","onValue","offValue","onKeyValue","offKeyValue","getKeyDependencies","getValueDependencies","keyHasDependencies","valueHasDependencies","onKeys","onKeysAdded","onKeysRemoved","onPatches"].forEach(function(e){a.for("can."+e)}),r.exports=i.Symbol=a}(0,0,0,t)}),define("can-reflect/reflections/helpers",["require","exports","module","can-symbol"],function(e,t,n){"use strict";var a=e("can-symbol");n.exports={makeGetFirstSymbolValue:function(e){var n=e.map(function(e){return a.for(e)}),r=n.length;return function(e){for(var t=-1;++t<r;)if(void 0!==e[n[t]])return e[n[t]]}},hasLength:function(e){var t=typeof e;if("string"===t||Array.isArray(e))return!0;var n=e&&"boolean"!==t&&"number"!==t&&"length"in e&&e.length;return"function"!=typeof e&&(0===n||"number"==typeof n&&0<n&&n-1 in e)}}}),define("can-reflect/reflections/type/type",["require","exports","module","can-symbol","can-reflect/reflections/helpers"],function(e,t,n){"use strict";var o=e("can-symbol"),r=e("can-reflect/reflections/helpers"),s=Object.getOwnPropertyNames(function(){}.prototype),c=Object.getPrototypeOf(function(){}.prototype);var a=r.makeGetFirstSymbolValue(["can.new","can.apply"]);function i(e){var t=typeof e;return null==e||"function"!==t&&"object"!==t}var u=Object.prototype.hasOwnProperty,l=Function.prototype.toString,f=l.call(Object);function d(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(t===Object.prototype||null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)===f}var p,h=o.for("can.onValue"),v=o.for("can.onKeyValue"),y=o.for("can.onPatches");if("undefined"!=typeof Symbol&&"function"==typeof Symbol.for&&"symbol"==typeof Symbol("a symbol for testing symbols"))p=function(e){return"symbol"==typeof e};else{var g="@@symbol";p=function(e){return"object"==typeof e&&!Array.isArray(e)&&e.toString().substr(0,g.length)===g}}n.exports={isConstructorLike:function(e){var t=e[o.for("can.new")];if(void 0!==t)return t;if("function"!=typeof e)return!1;var n=e.prototype;if(!n)return!1;if(c!==Object.getPrototypeOf(n))return!0;var r=Object.getOwnPropertyNames(n);if(r.length!==s.length)return!0;for(var a=0,i=r.length;a<i;a++)if(r[a]!==s[a])return!0;return!1},isFunctionLike:function(e){var t,n=!!e&&e[o.for("can.isFunctionLike")];return void 0!==n?n:void 0!==(t=a(e))?!!t:"function"==typeof e},isListLike:function(e){var t;if("string"==typeof e)return!0;if(i(e))return!1;if(void 0!==(t=e[o.for("can.isListLike")]))return t;var n=e[o.iterator];return void 0!==n?!!n:!!Array.isArray(e)||r.hasLength(e)},isMapLike:function(e){if(i(e))return!1;var t=e[o.for("can.isMapLike")];if(void 0!==t)return!!t;var n=e[o.for("can.getKeyValue")];return void 0===n||!!n},isObservableLike:function(e){return!i(e)&&Boolean(e[h]||e[v]||e[y])},isPrimitive:i,isBuiltIn:function(e){return!!(i(e)||Array.isArray(e)||d(e)||"[object Object]"!==Object.prototype.toString.call(e)&&-1!==Object.prototype.toString.call(e).indexOf("[object "))},isValueLike:function(e){var t;if(i(e))return!0;if(void 0!==(t=e[o.for("can.isValueLike")]))return t;var n=e[o.for("can.getValue")];return void 0!==n?!!n:void 0},isSymbolLike:p,isMoreListLikeThanMapLike:function(e){if(Array.isArray(e))return!0;if(e instanceof Array)return!0;if(null==e)return!1;var t=e[o.for("can.isMoreListLikeThanMapLike")];if(void 0!==t)return t;var n=this.isListLike(e),r=this.isMapLike(e);return!(!n||r)||!(!n&&r)&&void 0},isIteratorLike:function(e){return e&&"object"==typeof e&&"function"==typeof e.next&&0===e.next.length},isPromise:function(e){return e instanceof Promise||"[object Promise]"===Object.prototype.toString.call(e)},isPlainObject:d}}),define("can-reflect/reflections/call/call",["require","exports","module","can-symbol","can-reflect/reflections/type/type"],function(e,t,n){"use strict";var i=e("can-symbol"),o=e("can-reflect/reflections/type/type");n.exports={call:function(e,t){var n=[].slice.call(arguments,2),r=e[i.for("can.apply")];return r?r.call(e,t,n):e.apply(t,n)},apply:function(e,t,n){var r=e[i.for("can.apply")];return r?r.call(e,t,n):e.apply(t,n)},new:function(e){var t=[].slice.call(arguments,1),n=e[i.for("can.new")];if(n)return n.apply(e,t);var r=Object.create(e.prototype),a=e.apply(r,t);return o.isPrimitive(a)?r:a}}}),define("can-reflect/reflections/get-set/get-set",["require","exports","module","can-symbol","can-reflect/reflections/type/type"],function(e,t,n){"use strict";var s=e("can-symbol"),a=e("can-reflect/reflections/type/type"),i=s.for("can.setKeyValue"),r=s.for("can.getKeyValue"),o=s.for("can.getValue"),c=s.for("can.setValue"),u={setKeyValue:function(e,t,n){if(a.isSymbolLike(t))"symbol"==typeof t?e[t]=n:Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:n,writable:!0});else{var r=e[i];if(void 0!==r)return r.call(e,t,n);e[t]=n}},getKeyValue:function(e,t){var n=e[r];return n?n.call(e,t):e[t]},deleteKeyValue:function(e,t){var n=e[s.for("can.deleteKeyValue")];if(n)return n.call(e,t);delete e[t]},getValue:function(e){if(a.isPrimitive(e))return e;var t=e[o];return t?t.call(e):e},setValue:function(e,t){var n=e&&e[c];if(n)return n.call(e,t);throw new Error("can-reflect.setValue - Can not set value.")},splice:function(e,t,n,r){var a;if("number"!=typeof n){var i=e[s.for("can.updateValues")];if(i)return i.call(e,t,n,r);a=n.length}else a=n;arguments.length<=3&&(r=[]);var o=e[s.for("can.splice")];return o?o.call(e,t,a,r):[].splice.apply(e,[t,a].concat(r))},addValues:function(e,t,n){var r=e[s.for("can.addValues")];return r?r.call(e,t,n):Array.isArray(e)&&void 0===n?e.push.apply(e,t):u.splice(e,n,[],t)},removeValues:function(n,e,t){var r=n[s.for("can.removeValues")];return r?r.call(n,e,t):Array.isArray(n)&&void 0===t?void e.forEach(function(e){var t=n.indexOf(e);0<=t&&n.splice(t,1)}):u.splice(n,t,e,[])}};u.get=u.getKeyValue,u.set=u.setKeyValue,u.delete=u.deleteKeyValue,n.exports=u}),define("can-reflect/reflections/observe/observe",["require","exports","module","can-symbol"],function(e,t,n){"use strict";var s=e("can-symbol"),i=[].slice;function r(i,o){return function(e,t,n,r){var a=e[s.for(i)];return void 0!==a?a.call(e,t,n,r):this[o].apply(this,arguments)}}function a(r,a){return function(e){var t=e[s.for(r)];if(void 0===t)throw new Error(a);var n=i.call(arguments,1);return t.apply(e,n)}}n.exports={onKeyValue:r("can.onKeyValue","onEvent"),offKeyValue:r("can.offKeyValue","offEvent"),onKeys:a("can.onKeys","can-reflect: can not observe an onKeys event"),onKeysAdded:a("can.onKeysAdded","can-reflect: can not observe an onKeysAdded event"),onKeysRemoved:a("can.onKeysRemoved","can-reflect: can not unobserve an onKeysRemoved event"),getKeyDependencies:a("can.getKeyDependencies","can-reflect: can not determine dependencies"),getWhatIChange:a("can.getWhatIChange","can-reflect: can not determine dependencies"),getChangesDependencyRecord:function(e){var t=e[s.for("can.getChangesDependencyRecord")];if("function"==typeof t)return t()},keyHasDependencies:a("can.keyHasDependencies","can-reflect: can not determine if this has key dependencies"),onValue:a("can.onValue","can-reflect: can not observe value change"),offValue:a("can.offValue","can-reflect: can not unobserve value change"),getValueDependencies:a("can.getValueDependencies","can-reflect: can not determine dependencies"),valueHasDependencies:a("can.valueHasDependencies","can-reflect: can not determine if value has dependencies"),onPatches:a("can.onPatches","can-reflect: can not observe patches on object"),offPatches:a("can.offPatches","can-reflect: can not unobserve patches on object"),onInstancePatches:a("can.onInstancePatches","can-reflect: can not observe onInstancePatches on Type"),offInstancePatches:a("can.offInstancePatches","can-reflect: can not unobserve onInstancePatches on Type"),onInstanceBoundChange:a("can.onInstanceBoundChange","can-reflect: can not observe bound state change in instances."),offInstanceBoundChange:a("can.offInstanceBoundChange","can-reflect: can not unobserve bound state change"),isBound:a("can.isBound","can-reflect: cannot determine if object is bound"),onEvent:function(e,t,n,r){if(e){var a=e[s.for("can.onEvent")];if(void 0!==a)return a.call(e,t,n,r);e.addEventListener&&e.addEventListener(t,n,r)}},offEvent:function(e,t,n,r){if(e){var a=e[s.for("can.offEvent")];if(void 0!==a)return a.call(e,t,n,r);e.removeEventListener&&e.removeEventListener(t,n,r)}},setPriority:function(e,t){if(e){var n=e[s.for("can.setPriority")];if(void 0!==n)return n.call(e,t),!0}return!1},getPriority:function(e){if(e){var t=e[s.for("can.getPriority")];if(void 0!==t)return t.call(e)}}}}),define("can-reflect/reflections/shape/shape",["require","exports","module","can-symbol","can-reflect/reflections/get-set/get-set","can-reflect/reflections/type/type","can-reflect/reflections/helpers"],function(e,t,n){"use strict";var r,s=e("can-symbol"),f=e("can-reflect/reflections/get-set/get-set"),d=e("can-reflect/reflections/type/type"),a=e("can-reflect/reflections/helpers"),i=!0;try{Object.getPrototypeOf(1)}catch(e){i=!1}if("function"==typeof Map)r=Map;else{(r=function(){this.contents=[]}).prototype={_getIndex:function(e){for(var t;-1!==(t=this.contents.indexOf(e,t))&&t%2!=0;);return t},has:function(e){return-1!==this._getIndex(e)},get:function(e){var t=this._getIndex(e);if(-1!==t)return this.contents[t+1]},set:function(e,t){var n=this._getIndex(e);-1!==n?this.contents[n+1]=t:(this.contents.push(e),this.contents.push(t))},delete:function(e){var t=this._getIndex(e);-1!==t&&this.contents.splice(t,2)}}}var c,o,u,l=Object.prototype.hasOwnProperty,p=function(t){return function(){var e=[this];return e.push.apply(e,arguments),t.apply(null,e)}},h=s.for("can.getKeyValue"),v=p(f.getKeyValue),y=s.for("can.setKeyValue"),g=p(f.setKeyValue),m=s.for("can.size"),b=a.makeGetFirstSymbolValue(["can.updateDeep","can.assignDeep","can.setKeyValue"]),w=function(e){return d.isPlainObject(e)||Array.isArray(e)||!!b(e)};function x(e){return!!d.isPrimitive(e)||!b(e)&&(d.isBuiltIn(e)&&!d.isPlainObject(e)&&!Array.isArray(e))}try{Object.keys(1),o=Object.keys}catch(e){o=function(e){return d.isPrimitive(e)?[]:Object.keys(e)}}function _(c,u){var n=null;function l(e){var t;this.first=!n,this.first&&(n={unwrap:new(t=e||r),serialize:new t,isSerializing:{unwrap:new t,serialize:new t},circularReferenceIsSerializing:{unwrap:new t,serialize:new t}}),this.map=n,this.result=null}return l.prototype.end=function(){return this.first&&(n=null),this.result},function(e,t){if(x(e))return e;var n=new l(t);if(d.isValueLike(e))n.result=this[c](f.getValue(e));else{var r=d.isIteratorLike(e)||d.isMoreListLikeThanMapLike(e);if(n.result=r?[]:{},n.map[c].has(e))return n.map.isSerializing[c].has(e)&&n.map.circularReferenceIsSerializing[c].set(e,!0),n.map[c].get(e);n.map[c].set(e,n.result);for(var a=0,i=u.length;a<i;a++){var o=e[u[a]];if(o){n.map.isSerializing[c].set(e,!0);var s=n.result;if(n.result=o.call(e,s),n.map.isSerializing[c].delete(e),n.result!==s){if(n.map.circularReferenceIsSerializing[c].has(e))throw n.end(),new Error("Cannot serialize cirular reference!");n.map[c].set(e,n.result)}return n.end()}}"function"==typeof obj?(n.map[c].set(e,e),n.result=e):r?this.eachIndex(e,function(e,t){n.result[t]=this[c](e)},this):this.eachKey(e,function(e,t){n.result[t]=this[c](e)},this)}return n.end()}}u="undefined"!=typeof Map?function(e){var t=new Map;return c.eachIndex(e,function(e){t.set(e,!0)}),t}:function(e){var n={};return e.forEach(function(e){n[e]=!0}),{get:function(e){return n[e]},set:function(e,t){n[e]=t},keys:function(){return e}}};var k=function(e){var t=e[s.for("can.hasOwnKey")];if(t)return t.bind(e);var n=u(c.getOwnEnumerableKeys(e));return function(e){return n.get(e)}};function O(e,t){var n=e[e.length-1];if(n&&n.deleteCount===n.insert.length&&t.index-n.index===n.deleteCount)return n.insert.push.apply(n.insert,t.insert),void(n.deleteCount+=t.deleteCount);e.push(t)}function E(r,e,a){var i=this.toArray(e),o=[],s=-1;this.eachIndex(r,function(e,t){if((s=t)>=i.length)return a||O(o,{index:t,deleteCount:r.length-t+1,insert:[]}),!1;var n=i[t];d.isPrimitive(e)||d.isPrimitive(n)||!1===w(e)?O(o,{index:t,deleteCount:1,insert:[n]}):!0===a?this.assignDeep(e,n):this.updateDeep(e,n)},this),i.length>s&&O(o,{index:s+1,deleteCount:0,insert:i.slice(s+1)});for(var t=0,n=o.length;t<n;t++){var c=o[t];f.splice(r,c.index,c.deleteCount,c.insert)}return r}(c={each:function(e,t,n){return d.isIteratorLike(e)||d.isMoreListLikeThanMapLike(e)?c.eachIndex(e,t,n):c.eachKey(e,t,n)},eachIndex:function(e,t,n){if(Array.isArray(e))return c.eachListLike(e,t,n);var r,a=e[s.iterator];if(d.isIteratorLike(e)?r=e:a&&(r=a.call(e)),r)for(var i,o=0;!(i=r.next()).done&&!1!==t.call(n||e,i.value,o++,e););else c.eachListLike(e,t,n);return e},eachListLike:function(e,t,n){var r=-1,a=e.length;if(void 0===a){var i=e[m];if(!i)throw new Error("can-reflect: unable to iterate.");a=i.call(e)}for(;++r<a;){var o=e[r];if(!1===t.call(n||o,o,r,e))break}return e},toArray:function(e){var t=[];return c.each(e,function(e){t.push(e)}),t},eachKey:function(n,r,a){if(n){var e=c.getOwnEnumerableKeys(n),i=n[h]||v;return c.eachIndex(e,function(e){var t=i.call(n,e);return r.call(a||n,t,e,n)})}return n},hasOwnKey:function(e,t){var n=e[s.for("can.hasOwnKey")];if(n)return n.call(e,t);var r=e[s.for("can.getOwnKeys")];if(r){var a=!1;return c.eachIndex(r.call(e),function(e){if(e===t)return!(a=!0)}),a}return l.call(e,t)},getOwnEnumerableKeys:function(t){var e=t[s.for("can.getOwnEnumerableKeys")];if(e)return e.call(t);if(t[s.for("can.getOwnKeys")]&&t[s.for("can.getOwnKeyDescriptor")]){var n=[];return c.eachIndex(c.getOwnKeys(t),function(e){c.getOwnKeyDescriptor(t,e).enumerable&&n.push(e)},this),n}return o(t)},getOwnKeys:function(e){var t=e[s.for("can.getOwnKeys")];return t?t.call(e):Object.getOwnPropertyNames(e)},getOwnKeyDescriptor:function(e,t){var n=e[s.for("can.getOwnKeyDescriptor")];return n?n.call(e,t):Object.getOwnPropertyDescriptor(e,t)},unwrap:_("unwrap",[s.for("can.unwrap")]),serialize:_("serialize",[s.for("can.serialize"),s.for("can.unwrap")]),assignMap:function(n,e){var r=k(n),a=n[h]||v,i=n[y]||g;return c.eachKey(e,function(e,t){r(t)&&a.call(n,t)===e||i.call(n,t,e)}),n},assignList:function(e,t){var n=c.toArray(t);return f.splice(e,0,n,n),e},assign:function(e,t){return d.isIteratorLike(t)||d.isMoreListLikeThanMapLike(t)?c.assignList(e,t):c.assignMap(e,t),e},assignDeepMap:function(r,e){var a=k(r),i=r[h]||v,o=r[y]||g;return c.eachKey(e,function(e,t){if(a(t)){var n=i.call(r,t);e===n||(d.isPrimitive(n)||d.isPrimitive(e)||!1===w(n)?o.call(r,t,e):c.assignDeep(n,e))}else f.setKeyValue(r,t,e)},this),r},assignDeepList:function(e,t){return E.call(this,e,t,!0)},assignDeep:function(e,t){var n=e[s.for("can.assignDeep")];return n?n.call(e,t):d.isMoreListLikeThanMapLike(t)?c.assignDeepList(e,t):c.assignDeepMap(e,t),e},updateMap:function(r,a){var i=u(c.getOwnEnumerableKeys(a)),o=a[h]||v,s=r[y]||g;return c.eachKey(r,function(e,t){if(i.get(t)){i.set(t,!1);var n=o.call(a,t);n!==e&&s.call(r,t,n)}else f.deleteKeyValue(r,t)},this),c.eachIndex(i.keys(),function(e){i.get(e)&&s.call(r,e,o.call(a,e))}),r},updateList:function(e,t){var n=c.toArray(t);return f.splice(e,0,e,n),e},update:function(e,t){return d.isIteratorLike(t)||d.isMoreListLikeThanMapLike(t)?c.updateList(e,t):c.updateMap(e,t),e},updateDeepMap:function(r,a){var i=u(c.getOwnEnumerableKeys(a)),o=a[h]||v,s=r[y]||g;return c.eachKey(r,function(e,t){if(i.get(t)){i.set(t,!1);var n=o.call(a,t);d.isPrimitive(e)||d.isPrimitive(n)||!1===w(e)?s.call(r,t,n):c.updateDeep(e,n)}else f.deleteKeyValue(r,t)},this),c.eachIndex(i.keys(),function(e){i.get(e)&&s.call(r,e,o.call(a,e))}),r},updateDeepList:function(e,t){return E.call(this,e,t)},updateDeep:function(e,t){var n=e[s.for("can.updateDeep")];return n?n.call(e,t):d.isMoreListLikeThanMapLike(t)?c.updateDeepList(e,t):c.updateDeepMap(e,t),e},hasKey:function(e,t){if(null==e)return!1;var n;if(d.isPrimitive(e))return!!l.call(e,t)||(void 0!==(n=i?Object.getPrototypeOf(e):e.__proto__)?t in n:void 0!==e[t]);var r=e[s.for("can.hasKey")];return r?r.call(e,t):c.hasOwnKey(e,t)||t in e},getAllEnumerableKeys:function(){},getAllKeys:function(){},assignSymbols:function(r,e){return c.eachKey(e,function(e,t){var n=d.isSymbolLike(s[t])?s[t]:s.for(t);f.setKeyValue(r,n,e)}),r},isSerialized:x,size:function(e){if(null==e)return 0;var t=e[m],n=0;return t?t.call(e):a.hasLength(e)?e.length:d.isListLike(e)?(c.eachIndex(e,function(){n++}),n):e?c.getOwnEnumerableKeys(e).length:void 0},defineInstanceKey:function(e,t,n){var r=e[s.for("can.defineInstanceKey")];if(r)return r.call(e,t,n);var a=e.prototype;(r=a[s.for("can.defineInstanceKey")])?r.call(a,t,n):Object.defineProperty(a,t,c.assign({configurable:!0,enumerable:!d.isSymbolLike(t),writable:!0},n))}}).isSerializable=c.isSerialized,c.keys=c.getOwnEnumerableKeys,n.exports=c}),define("can-reflect/reflections/shape/schema/schema",["require","exports","module","can-symbol","can-reflect/reflections/type/type","can-reflect/reflections/get-set/get-set","can-reflect/reflections/shape/shape"],function(e,t,n){"use strict";var r=e("can-symbol"),s=e("can-reflect/reflections/type/type"),a=e("can-reflect/reflections/get-set/get-set"),i=e("can-reflect/reflections/shape/shape"),o=r.for("can.getSchema"),c=r.for("can.isMember"),u=r.for("can.new");function l(e,t){return e.localeCompare(t)}var f={getSchema:function(e){if(void 0!==e){var t=e[o];return void 0===t&&(t=(e=e.constructor)&&e[o]),void 0!==t?t.call(e):void 0}},getIdentity:function(t,e){if(void 0===(e=e||f.getSchema(t)))throw new Error("can-reflect.getIdentity - Unable to find a schema for the given value.");var n=e.identity;if(n&&0!==n.length){if(1===n.length)return a.getKeyValue(t,n[0]);var r={};return n.forEach(function(e){r[e]=a.getKeyValue(t,e)}),JSON.stringify(f.cloneKeySort(r))}throw new Error("can-reflect.getIdentity - Provided schema lacks an identity property.")},cloneKeySort:function(e){return function t(n){return s.isPrimitive(n)?n:s.isListLike(n)?(r=[],i.eachKey(n,function(e){r.push(t(e))}),r):s.isMapLike(n)?(r={},i.getOwnKeys(n).sort(l).forEach(function(e){r[e]=t(a.getKeyValue(n,e))}),r):n;var r}(e)},convert:function(e,t){if((n=t)===Number||n===String||n===Boolean)return t(e);var n,r=t[c],a=!1,i=typeof t,o=t[u];if(void 0!==r?a=r.call(t,e):"function"===i&&s.isConstructorLike(t)&&(a=e instanceof t),a)return e;if(void 0!==o)return o.call(t,e);if("function"===i)return s.isConstructorLike(t)?new t(e):t(e);throw new Error("can-reflect: Can not convert values into type. Type must provide `can.new` symbol.")}};n.exports=f}),define("can-reflect/reflections/get-name/get-name",["require","exports","module","can-symbol","can-reflect/reflections/type/type"],function(e,t,n){"use strict";var r=e("can-symbol"),i=e("can-reflect/reflections/type/type"),o=r.for("can.getName");var s=0;n.exports={setName:function(e,t){if("function"!=typeof t){var n=t;t=function(){return n}}Object.defineProperty(e,o,{value:t})},getName:function e(t){var n=typeof t;if(null===t||"object"!==n&&"function"!==n)return""+t;var r=t[o];if(r)return r.call(t);if("function"===n)return"name"in t||(t.name="functionIE"+s++),t.name;if(t.constructor&&t!==t.constructor){var a=e(t.constructor);if(a){if(i.isValueLike(t))return a+"<>";if(i.isMoreListLikeThanMapLike(t))return a+"[]";if(i.isMapLike(t))return a+"{}"}}}}}),define("can-reflect/types/map",["require","exports","module","can-reflect/reflections/shape/shape","can-symbol"],function(e,t,n){"use strict";var r=e("can-reflect/reflections/shape/shape"),a=e("can-symbol");"undefined"!=typeof Map&&(r.assignSymbols(Map.prototype,{"can.getOwnEnumerableKeys":Map.prototype.keys,"can.setKeyValue":Map.prototype.set,"can.getKeyValue":Map.prototype.get,"can.deleteKeyValue":Map.prototype.delete,"can.hasOwnKey":Map.prototype.has}),"function"!=typeof Map.prototype.keys&&(Map.prototype.keys=Map.prototype[a.for("can.getOwnEnumerableKeys")]=function(){var n=[],e=0;return this.forEach(function(e,t){n.push(t)}),{next:function(){return{value:n[e],done:e++===n.length}}}})),"undefined"!=typeof WeakMap&&r.assignSymbols(WeakMap.prototype,{"can.getOwnEnumerableKeys":function(){throw new Error("can-reflect: WeakMaps do not have enumerable keys.")},"can.setKeyValue":WeakMap.prototype.set,"can.getKeyValue":WeakMap.prototype.get,"can.deleteKeyValue":WeakMap.prototype.delete,"can.hasOwnKey":WeakMap.prototype.has})}),define("can-reflect/types/set",["require","exports","module","can-reflect/reflections/shape/shape","can-symbol"],function(e,t,n){"use strict";var r=e("can-reflect/reflections/shape/shape"),a=e("can-symbol");"undefined"!=typeof Set&&(r.assignSymbols(Set.prototype,{"can.isMoreListLikeThanMapLike":!0,"can.updateValues":function(e,t,n){t!==n&&r.each(t,function(e){this.delete(e)},this),r.each(n,function(e){this.add(e)},this)},"can.size":function(){return this.size}}),"function"!=typeof Set.prototype[a.iterator]&&(Set.prototype[a.iterator]=function(){var t=[],e=0;return this.forEach(function(e){t.push(e)}),{next:function(){return{value:t[e],done:e++===t.length}}}})),"undefined"!=typeof WeakSet&&r.assignSymbols(WeakSet.prototype,{"can.isListLike":!0,"can.isMoreListLikeThanMapLike":!0,"can.updateValues":function(e,t,n){t!==n&&r.each(t,function(e){this.delete(e)},this),r.each(n,function(e){this.add(e)},this)},"can.size":function(){throw new Error("can-reflect: WeakSets do not have enumerable keys.")}})}),define("can-reflect",["require","exports","module","can-reflect/reflections/call/call","can-reflect/reflections/get-set/get-set","can-reflect/reflections/observe/observe","can-reflect/reflections/shape/shape","can-reflect/reflections/shape/schema/schema","can-reflect/reflections/type/type","can-reflect/reflections/get-name/get-name","can-namespace","can-reflect/types/map","can-reflect/types/set"],function(e,t,n){"use strict";var r=e("can-reflect/reflections/call/call"),a=e("can-reflect/reflections/get-set/get-set"),i=e("can-reflect/reflections/observe/observe"),o=e("can-reflect/reflections/shape/shape"),s=e("can-reflect/reflections/shape/schema/schema"),c=e("can-reflect/reflections/type/type"),u=e("can-reflect/reflections/get-name/get-name"),l=e("can-namespace"),f={};[r,a,i,o,c,u,s].forEach(function(e){for(var t in e)f[t]=e[t]}),e("can-reflect/types/map"),e("can-reflect/types/set"),n.exports=l.Reflect=f}),define("can-globals/can-globals-proto",["require","exports","module","can-reflect"],function(s,e,t){!function(e,t,n,r){"use strict";var a=s("can-reflect");function i(e){var t=this.eventHandlers[e];if(t)for(var n=t.slice(),r=this.getKeyValue(e),a=0;a<n.length;a++)n[a](r)}function o(){this.eventHandlers={},this.properties={}}o.prototype.define=function(e,t,n){return void 0===n&&(n=!0),this.properties[e]||(this.properties[e]={default:t,value:t,enableCache:n}),this},o.prototype.getKeyValue=function(e){var t=this.properties[e];if(t)return"function"==typeof t.value?t.cachedValue?t.cachedValue:t.enableCache?(t.cachedValue=t.value(),t.cachedValue):t.value():t.value},o.prototype.makeExport=function(t){return function(e){return 0===arguments.length?this.getKeyValue(t):null!=e?("function"==typeof e?this.setKeyValue(t,function(){return e}):this.setKeyValue(t,e),e):void this.deleteKeyValue(t)}.bind(this)},o.prototype.offKeyValue=function(e,t){if(this.properties[e]){var n=this.eventHandlers[e];if(n){var r=n.indexOf(t);n.splice(r,1)}}return this},o.prototype.onKeyValue=function(e,t){return this.properties[e]&&(this.eventHandlers[e]||(this.eventHandlers[e]=[]),this.eventHandlers[e].push(t)),this},o.prototype.deleteKeyValue=function(e){var t=this.properties[e];return void 0!==t&&(t.value=t.default,t.cachedValue=void 0,i.call(this,e)),this},o.prototype.setKeyValue=function(e,t){if(!this.properties[e])return this.define(e,t);var n=this.properties[e];return n.value=t,n.cachedValue=void 0,i.call(this,e),this},o.prototype.reset=function(){for(var e in this.properties)this.properties.hasOwnProperty(e)&&(this.properties[e].value=this.properties[e].default,this.properties[e].cachedValue=void 0,i.call(this,e));return this},a.assignSymbols(o.prototype,{"can.getKeyValue":o.prototype.getKeyValue,"can.setKeyValue":o.prototype.setKeyValue,"can.deleteKeyValue":o.prototype.deleteKeyValue,"can.onKeyValue":o.prototype.onKeyValue,"can.offKeyValue":o.prototype.offKeyValue}),r.exports=o}(0,0,0,t)}),define("can-globals/can-globals-instance",["require","exports","module","can-namespace","can-globals/can-globals-proto"],function(e,t,n){!function(e,t,n,r){"use strict";var a=t("can-namespace"),i=new(t("can-globals/can-globals-proto"));if(a.globals)throw new Error("You can't have two versions of can-globals, check your dependencies");r.exports=a.globals=i}(0,e,0,n)}),define("can-globals/global/global",["require","exports","module","can-globals/can-globals-instance"],function(i,e,t){!function(e,t,n,r){"use strict";var a=i("can-globals/can-globals-instance");a.define("global",function(){return"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:"object"==typeof process&&"[object process]"==={}.toString.call(process)?e:window}),r.exports=a.makeExport("global")}(function(){return this}(),0,0,t)}),define("can-globals/document/document",["require","exports","module","can-globals/global/global","can-globals/can-globals-instance"],function(e,t,n){!function(e,t,n,r){"use strict";t("can-globals/global/global");var a=t("can-globals/can-globals-instance");a.define("document",function(){return a.getKeyValue("global").document}),r.exports=a.makeExport("document")}(0,e,0,n)}),define("can-globals/location/location",["require","exports","module","can-globals/global/global","can-globals/can-globals-instance"],function(e,t,n){!function(e,t,n,r){"use strict";t("can-globals/global/global");var a=t("can-globals/can-globals-instance");a.define("location",function(){return a.getKeyValue("global").location}),r.exports=a.makeExport("location")}(0,e,0,n)}),define("can-globals/mutation-observer/mutation-observer",["require","exports","module","can-globals/global/global","can-globals/can-globals-instance"],function(e,t,n){!function(e,t,n,r){"use strict";t("can-globals/global/global");var a=t("can-globals/can-globals-instance");a.define("MutationObserver",function(){var e=a.getKeyValue("global");return e.MutationObserver||e.WebKitMutationObserver||e.MozMutationObserver}),r.exports=a.makeExport("MutationObserver")}(0,e,0,n)}),define("can-globals/is-node/is-node",["require","exports","module","can-globals/can-globals-instance"],function(i,e,t){!function(e,t,n,r){"use strict";var a=i("can-globals/can-globals-instance");a.define("isNode",function(){return"object"==typeof process&&"[object process]"==={}.toString.call(process)}),r.exports=a.makeExport("isNode")}(0,0,0,t)}),define("can-globals/is-browser-window/is-browser-window",["require","exports","module","can-globals/can-globals-instance","can-globals/is-node/is-node"],function(e,t,n){!function(e,t,n,r){"use strict";var a=t("can-globals/can-globals-instance");t("can-globals/is-node/is-node"),a.define("isBrowserWindow",function(){var e=a.getKeyValue("isNode");return"undefined"!=typeof window&&"undefined"!=typeof document&&!1===e}),r.exports=a.makeExport("isBrowserWindow")}(0,e,0,n)}),define("can-globals/custom-elements/custom-elements",["require","exports","module","can-globals/global/global","can-globals/can-globals-instance"],function(e,t,n){!function(e,t,n,r){"use strict";t("can-globals/global/global");var a=t("can-globals/can-globals-instance");a.define("customElements",function(){return a.getKeyValue("global").customElements}),r.exports=a.makeExport("customElements")}(0,e,0,n)}),define("can-globals",["require","exports","module","can-globals/can-globals-instance","can-globals/global/global","can-globals/document/document","can-globals/location/location","can-globals/mutation-observer/mutation-observer","can-globals/is-browser-window/is-browser-window","can-globals/is-node/is-node","can-globals/custom-elements/custom-elements"],function(e,t,n){!function(e,t,n,r){"use strict";var a=t("can-globals/can-globals-instance");t("can-globals/global/global"),t("can-globals/document/document"),t("can-globals/location/location"),t("can-globals/mutation-observer/mutation-observer"),t("can-globals/is-browser-window/is-browser-window"),t("can-globals/is-node/is-node"),t("can-globals/custom-elements/custom-elements"),r.exports=a}(0,e,0,n)}),define("can-debug/src/proxy-namespace",function(e,t,i){!function(e,t,n,r){"use strict";var a=!1;i.exports=function(e){return new Proxy(e,{get:function(e,t){return a||(console.warn("Warning: use of 'can' global should be for debugging purposes only."),a=!0),e[t]}})}}()}),define("can-debug/src/temporarily-bind",["require","exports","module","can-symbol","can-reflect"],function(e,t,n){"use strict";var r=e("can-symbol"),l=e("can-reflect"),f=r.for("can.onValue"),d=r.for("can.offValue"),p=r.for("can.onKeyValue"),h=r.for("can.offKeyValue"),v=function(){};function y(e){return"function"==typeof e}n.exports=function(u){return function(e,t){var n,r,a,i,o,s,c;return 2===arguments.length?(o=t,s=u,y((i=e)[p])&&l.onKeyValue(i,o,v),c=s(i,o),y(i[h])&&l.offKeyValue(i,o,v),c):(r=u,y((n=e)[f])&&l.onValue(n,v),a=r(n),y(n[d])&&l.offValue(n,v),a)}}}),define("can-assign",["require","exports","module","can-namespace"],function(e,t,n){var r=e("can-namespace");n.exports=r.assign=function(e,t){for(var n in t){var r=Object.getOwnPropertyDescriptor(e,n);r&&!1===r.writable||(e[n]=t[n])}return e}}),define("can-debug/src/graph/graph",["require","exports","module","can-assign"],function(e,t,n){"use strict";var o=e("can-assign");function i(){this.nodes=[],this.arrows=new Map,this.arrowsMeta=new Map}function r(e,t,n,r){var a=e.arrowsMeta.get(t);if(a){var i=a.get(n);i||(i={}),a.set(n,o(i,r))}else(a=new Map).set(n,r),e.arrowsMeta.set(t,a)}i.prototype.addNode=function(e){this.nodes.push(e),this.arrows.set(e,new Set)},i.prototype.addArrow=function(e,t,n){this.arrows.get(e).add(t),n&&r(this,e,t,n)},i.prototype.hasArrow=function(e,t){return this.getNeighbors(e).has(t)},i.prototype.getArrowMeta=function(e,t){return this.arrowsMeta.get(e)&&this.arrowsMeta.get(e).get(t)},i.prototype.setArrowMeta=function(e,t,n){r(this,e,t,n)},i.prototype.getNeighbors=function(e){return this.arrows.get(e)},i.prototype.findNode=function(e){var t,n,r=null;for(t=0;t<this.nodes.length;t++)if(e(n=this.nodes[t])){r=n;break}return r},i.prototype.bfs=function(e){var t=this.nodes[0],n=[t],r=new Map;for(r.set(t,!0);n.length;)e(t=n.shift()),this.arrows.get(t).forEach(function(e){r.has(e)||(n.push(e),r.set(e,!0))})},i.prototype.dfs=function(e){for(var t=this.nodes[0],n=[t],r=new Map;n.length;)e(t=n.pop()),r.has(t)||(r.set(t,!0),this.arrows.get(t).forEach(function(e){n.push(e)}))},i.prototype.reverse=function(){var r=this,a=new i;return r.nodes.forEach(a.addNode.bind(a)),r.nodes.forEach(function(n){r.getNeighbors(n).forEach(function(e){var t=r.getArrowMeta(n,e);a.addArrow(e,n,t)})}),a},n.exports=i}),define("can-debug/src/get-graph/make-node",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var a=e("can-reflect");n.exports=function(e,t){var n=2===arguments.length,r={obj:e,name:a.getName(e),value:n?a.getKeyValue(e,t):a.getValue(e)};return n&&(r.key=t),r}}),define("can-reflect-dependencies/src/add-mutated-by",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var c=e("can-reflect"),u=function(){return{keyDependencies:new Map,valueDependencies:new Set}};n.exports=function(s){return function(e,t,n){var r=3===arguments.length;if(2===arguments.length&&(n=t,t=void 0),!n.keyDependencies&&!n.valueDependencies){var a=new Set;a.add(n),n={valueDependencies:a}}var i=s.get(e);i||(i={mutateDependenciesForKey:new Map,mutateDependenciesForValue:u()},s.set(e,i)),r&&!i.mutateDependenciesForKey.get(t)&&i.mutateDependenciesForKey.set(t,u());var o=r?i.mutateDependenciesForKey.get(t):i.mutateDependenciesForValue;n.valueDependencies&&c.addValues(o.valueDependencies,n.valueDependencies),n.keyDependencies&&c.each(n.keyDependencies,function(e,t){var n=o.keyDependencies.get(t);n||(n=new Set,o.keyDependencies.set(t,n)),c.addValues(n,e)})}}}),define("can-reflect-dependencies/src/delete-mutated-by",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var c=e("can-reflect");n.exports=function(s){return function(e,t,n){var r=3===arguments.length,a=s.get(e);if(2===arguments.length&&(n=t,t=void 0),!n.keyDependencies&&!n.valueDependencies){var i=new Set;i.add(n),n={valueDependencies:i}}var o=r?a.mutateDependenciesForKey.get(t):a.mutateDependenciesForValue;n.valueDependencies&&c.removeValues(o.valueDependencies,n.valueDependencies),n.keyDependencies&&c.each(n.keyDependencies,function(e,t){var n=o.keyDependencies.get(t);n&&(c.removeValues(n,e),n.size||o.keyDependencies.delete(t))})}}}),define("can-reflect-dependencies/src/is-function",function(e,t,n){"use strict";n.exports=function(e){return"function"==typeof e}}),define("can-reflect-dependencies/src/get-dependency-data-of",["require","exports","module","can-symbol","can-reflect","can-reflect-dependencies/src/is-function","can-assign"],function(e,t,n){"use strict";var r=e("can-symbol"),l=e("can-reflect"),f=e("can-reflect-dependencies/src/is-function"),d=e("can-assign"),a=r.for("can.getWhatIChange"),p=r.for("can.getKeyDependencies"),h=r.for("can.getValueDependencies"),o=function(e,t){if(f(e[a]))return 2===arguments.length?l.getWhatIChange(e,t):l.getWhatIChange(e)},v=function(e){return null==e||!Object.keys(e).length||e.keyDependencies&&!e.keyDependencies.size&&e.valueDependencies&&!e.valueDependencies.size},s=function(e,t,n){var r,a,i,o,s=3===arguments.length,c=s?(r=t,a=n,(o=e.get(r))&&o.mutateDependenciesForKey.has(a)&&(i=o.mutateDependenciesForKey.get(a)),i):function(e,t){var n,r=e.get(t);if(r){var a=r.mutateDependenciesForValue;a.keyDependencies.size&&((n=n||{}).keyDependencies=a.keyDependencies),a.valueDependencies.size&&((n=n||{}).valueDependencies=a.valueDependencies)}return n}(e,t),u=s?function(e,t){if(f(e[p]))return l.getKeyDependencies(e,t)}(t,n):function(e){if(f(e[h]))return l.getValueDependencies(e)}(t);if(!v(c)||!v(u))return d(d({},c?{mutate:c}:null),u?{derive:u}:null)};n.exports=function(i){return function(e,t){var n=2===arguments.length,r=n?s(i,e,t):s(i,e),a=n?o(e,t):o(e);if(r||a)return d(d({},a?{whatIChange:a}:null),r?{whatChangesMe:r}:null)}}}),define("can-reflect-dependencies",["require","exports","module","can-reflect-dependencies/src/add-mutated-by","can-reflect-dependencies/src/delete-mutated-by","can-reflect-dependencies/src/get-dependency-data-of"],function(e,t,n){"use strict";var r=e("can-reflect-dependencies/src/add-mutated-by"),a=e("can-reflect-dependencies/src/delete-mutated-by"),i=e("can-reflect-dependencies/src/get-dependency-data-of"),o=new WeakMap;n.exports={addMutatedBy:r(o),deleteMutatedBy:a(o),getDependencyDataOf:i(o)}}),define("can-debug/src/get-graph/get-graph",["require","exports","module","can-debug/src/graph/graph","can-debug/src/get-graph/make-node","can-reflect","can-reflect-dependencies"],function(e,t,n){"use strict";var a=e("can-debug/src/graph/graph"),p=e("can-debug/src/get-graph/make-node"),h=e("can-reflect"),v=e("can-reflect-dependencies");n.exports=function(e,t){var c=0,u=new a,n=2===arguments.length,l=function(e,t,n,r){switch(e){case"whatIChange":u.addArrow(t,n,r);break;case"whatChangesMe":u.addArrow(n,t,r);break;default:throw new Error("Unknown direction value: ",r.direction)}},f=function(e,n,r){h.eachKey(e.keyDependencies||{},function(e,t){h.each(e,function(e){r(t,n,e)})})},d=function(e,t,n){h.eachIndex(e.valueDependencies||[],function(e){n(e,t)})},r=function n(t,e,r){var a,i=3===arguments.length,o=u.findNode(function(e){return i?e.obj===t&&e.key===r:e.obj===t});if(o)return e.parent&&l(e.direction,e.parent,o,{kind:e.kind,direction:e.direction}),u;c+=1,(o=i?p(t,r):p(t)).order=c,u.addNode(o),e.parent&&l(e.direction,e.parent,o,{kind:e.kind,direction:e.direction});var s=i?v.getDependencyDataOf(t,r):v.getDependencyDataOf(t);return s&&s.whatIChange&&(a={direction:"whatIChange",parent:o},h.eachKey(s.whatIChange,function(e,t){a.kind=t,f(e,a,n),d(e,a,n)})),s&&s.whatChangesMe&&(a={direction:"whatChangesMe",parent:o},h.eachKey(s.whatChangesMe,function(e,t){a.kind=t,f(e,a,n),d(e,a,n)})),u};return n?r(e,{},t):r(e,{})}}),define("can-debug/src/format-graph/format-graph",["require","exports","module","can-reflect","can-assign"],function(e,t,n){"use strict";var r=e("can-reflect"),u=e("can-assign");n.exports=function(o){var s=new Map;o.nodes.forEach(function(e,t){s.set(e,t+1)});var e=o.nodes.map(function(e){return{shape:"box",id:s.get(e),label:r.getName(e.obj)+(e.key?"."+e.key:"")}}),t=new Map,c=[];return o.nodes.forEach(function(e){var i=function(r){if(!t.has(r)){t.set(r,!0);var e=o.arrows.get(r),a=s.get(r);e.forEach(function(e){var t=s.get(e),n=o.arrowsMeta.get(r).get(e);c.push(u({from:a,to:t},{derive:{arrows:"to"},mutate:{arrows:"to",dashes:!0}}[n.kind])),i(e)})}};i(e)}),{nodes:e,edges:c}}}),define("can-debug/src/log-data/log-data",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var i=e("can-reflect");n.exports=function e(t){var n,r=t.node,a=[r.name,"key"in r?"."+r.key:""];console.group(a.join("")),console.log("value  ","string"==typeof(n=r.value)?JSON.stringify(n):n),console.log("object ",r.obj),t.derive.length&&(console.group("DERIVED FROM"),i.eachIndex(t.derive,e),console.groupEnd()),t.mutations.length&&(console.group("MUTATED BY"),i.eachIndex(t.mutations,e),console.groupEnd()),t.twoWay.length&&(console.group("TWO WAY"),i.eachIndex(t.twoWay,e),console.groupEnd()),console.groupEnd()}}),define("can-debug/src/label-cycles/label-cycles",["require","exports","module","can-debug/src/graph/graph"],function(e,t,n){"use strict";var o=e("can-debug/src/graph/graph");n.exports=function(r){var a=new Map,i=new o;r.nodes.forEach(function(e){i.addNode(e)});return function t(n){a.set(n,!0),r.getNeighbors(n).forEach(function(e){a.has(e)?r.hasArrow(n,e)&&i.addArrow(e,n,{kind:"twoWay"}):(i.addArrow(n,e,r.getArrowMeta(n,e)),t(e))})}(r.nodes[0]),i}}),define("can-debug/src/get-data/get-data",["require","exports","module","can-debug/src/label-cycles/label-cycles"],function(e,t,n){"use strict";var a=e("can-debug/src/label-cycles/label-cycles");n.exports=function(e,t){var n,i=new Map,o=a("whatChangesMe"===t?e.reverse():e),r=function n(r){var a={node:r,derive:[],mutations:[],twoWay:[]};return i.set(r,!0),o.getNeighbors(r).forEach(function(e){var t=o.getArrowMeta(r,e);if(!i.has(e))switch(t.kind){case"twoWay":a.twoWay.push(n(e));break;case"derive":a.derive.push(n(e));break;case"mutate":a.mutations.push(n(e));break;default:throw new Error("Unknow meta.kind value: ",t.kind)}}),a}(o.nodes[0]);return(n=r).derive.length||n.mutations.length||n.twoWay.length?r:null}}),define("can-debug/src/what-i-change/what-i-change",["require","exports","module","can-debug/src/log-data/log-data","can-debug/src/get-data/get-data","can-debug/src/get-graph/get-graph"],function(e,t,n){"use strict";var a=e("can-debug/src/log-data/log-data"),i=e("can-debug/src/get-data/get-data"),o=e("can-debug/src/get-graph/get-graph");n.exports=function(e,t){var n=2===arguments.length,r=i(n?o(e,t):o(e),"whatIChange");r&&a(r)}}),define("can-debug/src/what-changes-me/what-changes-me",["require","exports","module","can-debug/src/log-data/log-data","can-debug/src/get-data/get-data","can-debug/src/get-graph/get-graph"],function(e,t,n){"use strict";var a=e("can-debug/src/log-data/log-data"),i=e("can-debug/src/get-data/get-data"),o=e("can-debug/src/get-graph/get-graph");n.exports=function(e,t){var n=2===arguments.length,r=i(n?o(e,t):o(e),"whatChangesMe");r&&a(r)}}),define("can-debug/src/get-what-i-change/get-what-i-change",["require","exports","module","can-debug/src/get-data/get-data","can-debug/src/get-graph/get-graph"],function(e,t,n){"use strict";var r=e("can-debug/src/get-data/get-data"),a=e("can-debug/src/get-graph/get-graph");n.exports=function(e,t){var n=2===arguments.length;return r(n?a(e,t):a(e),"whatIChange")}}),define("can-debug/src/get-what-changes-me/get-what-changes-me",["require","exports","module","can-debug/src/get-data/get-data","can-debug/src/get-graph/get-graph"],function(e,t,n){"use strict";var r=e("can-debug/src/get-data/get-data"),a=e("can-debug/src/get-graph/get-graph");n.exports=function(e,t){var n=2===arguments.length;return r(n?a(e,t):a(e),"whatChangesMe")}}),define("can-log",function(e,t,n){"use strict";t.warnTimeout=5e3,t.logLevel=0,t.warn=function(){this.logLevel<2&&("undefined"!=typeof console&&console.warn?this._logger("warn",Array.prototype.slice.call(arguments)):"undefined"!=typeof console&&console.log&&this._logger("log",Array.prototype.slice.call(arguments)))},t.log=function(){this.logLevel<1&&"undefined"!=typeof console&&console.log&&this._logger("log",Array.prototype.slice.call(arguments))},t.error=function(){this.logLevel<1&&"undefined"!=typeof console&&console.error&&this._logger("error",Array.prototype.slice.call(arguments))},t._logger=function(t,n){try{console[t].apply(console,n)}catch(e){console[t](n)}}}),define("can-log/dev/dev",["require","exports","module","can-log"],function(e,t,n){"use strict";var r=e("can-log");n.exports={warnTimeout:5e3,logLevel:0,stringify:function(e){return JSON.stringify(e,function(e,t){return void 0===t?"/* void(undefined) */":t},"  ").replace(/"\/\* void\(undefined\) \*\/"/g,"undefined")},warn:function(){},log:function(){},error:function(){},_logger:r._logger}}),define("can-queues/queue-state",function(e,t,n){"use strict";n.exports={lastTask:null}}),define("can-queues/queue",["require","exports","module","can-queues/queue-state","can-log/dev/dev","can-assign"],function(e,t,n){"use strict";var r=e("can-queues/queue-state"),a=(e("can-log/dev/dev"),e("can-assign"));function i(){}var o=function(e,t){this.callbacks=a({onFirstTask:i,onComplete:function(){r.lastTask=null}},t||{}),this.name=e,this.index=0,this.tasks=[],this._log=!1};(o.prototype.constructor=o).noop=i,o.prototype.enqueue=function(e,t,n,r){1===this.tasks.push({fn:e,context:t,args:n,meta:r||{}})&&this.callbacks.onFirstTask(this)},o.prototype.flush=function(){for(;this.index<this.tasks.length;){var e=this.tasks[this.index++];e.fn.apply(e.context,e.args)}this.index=0,this.tasks=[],this.callbacks.onComplete(this)},o.prototype.log=function(){this._log=!arguments.length||arguments[0]},n.exports=o}),define("can-queues/priority-queue",["require","exports","module","can-queues/queue"],function(e,t,n){"use strict";var r=e("can-queues/queue"),a=function(){r.apply(this,arguments),this.taskMap=new Map,this.taskContainersByPriority=[],this.curPriorityIndex=1/0,this.curPriorityMax=0,this.isFlushing=!1,this.tasksRemaining=0};((a.prototype=Object.create(r.prototype)).constructor=a).prototype.enqueue=function(e,t,n,r){if(!this.taskMap.has(e)){this.tasksRemaining++;var a=0===this.taskContainersByPriority.length,i={fn:e,context:t,args:n,meta:r||{}};this.getTaskContainerAndUpdateRange(i).tasks.push(i),this.taskMap.set(e,i),a&&this.callbacks.onFirstTask(this)}},a.prototype.getTaskContainerAndUpdateRange=function(e){var t=e.meta.priority||0;t<this.curPriorityIndex&&(this.curPriorityIndex=t),t>this.curPriorityMax&&(this.curPriorityMax=t);var n=this.taskContainersByPriority,r=n[t];return r||(r=n[t]={tasks:[],index:0}),r},a.prototype.flush=function(){if(!this.isFlushing)for(this.isFlushing=!0;;){if(!(this.curPriorityIndex<=this.curPriorityMax))return this.taskMap=new Map,this.curPriorityIndex=1/0,this.curPriorityMax=0,this.taskContainersByPriority=[],this.isFlushing=!1,void this.callbacks.onComplete(this);var e=this.taskContainersByPriority[this.curPriorityIndex];if(e&&e.tasks.length>e.index){var t=e.tasks[e.index++];this.tasksRemaining--,this.taskMap.delete(t.fn),t.fn.apply(t.context,t.args)}else this.curPriorityIndex++}},a.prototype.isEnqueued=function(e){return this.taskMap.has(e)},a.prototype.flushQueuedTask=function(e){var t=this.dequeue(e);t&&t.fn.apply(t.context,t.args)},a.prototype.dequeue=function(e){var t=this.taskMap.get(e);if(t){var n=t.meta.priority||0,r=this.taskContainersByPriority[n],a=r.tasks.indexOf(t,r.index);if(0<=a)return r.tasks.splice(a,1),this.tasksRemaining--,this.taskMap.delete(t.fn),t;console.warn("Task",e,"has already run")}},a.prototype.tasksRemainingCount=function(){return this.tasksRemaining},n.exports=a}),define("can-queues/completion-queue",["require","exports","module","can-queues/queue"],function(e,t,n){"use strict";var r=e("can-queues/queue"),a=function(){r.apply(this,arguments),this.flushCount=0};((a.prototype=Object.create(r.prototype)).constructor=a).prototype.flush=function(){if(0===this.flushCount){for(this.flushCount++;this.index<this.tasks.length;){var e=this.tasks[this.index++];e.fn.apply(e.context,e.args)}this.index=0,this.tasks=[],this.flushCount--,this.callbacks.onComplete(this)}},n.exports=a}),define("can-queues",["require","exports","module","can-log/dev/dev","can-queues/queue","can-queues/priority-queue","can-queues/queue-state","can-queues/completion-queue","can-namespace"],function(e,t,n){"use strict";var r,a,i,o,s,c=e("can-log/dev/dev"),u=e("can-queues/queue"),l=e("can-queues/priority-queue"),f=e("can-queues/queue-state"),d=e("can-queues/completion-queue"),p=e("can-namespace"),h=0,v=!1,y=0,g=["notify","derive","domUI","mutate"];a=new u("NOTIFY",{onComplete:function(){i.flush()},onFirstTask:function(){h?v=!0:a.flush()}}),i=new l("DERIVE",{onComplete:function(){o.flush()},onFirstTask:function(){v=!0}}),o=new d("DOM_UI",{onComplete:function(){s.flush()},onFirstTask:function(){v=!0}}),s=new u("MUTATE",{onComplete:function(){f.lastTask=null,!1},onFirstTask:function(){v=!0}});var m={Queue:u,PriorityQueue:l,CompletionQueue:d,notifyQueue:a,deriveQueue:i,domUIQueue:o,mutateQueue:s,batch:{start:function(){1===++h&&(r={number:++y})},stop:function(){0===--h&&v&&(!(v=!1),a.flush())},isCollecting:function(){return 0<h},number:function(){return y},data:function(){return r}},runAsTask:function(e,t){return e},enqueueByQueue:function(r,a,i,o,s){r&&(m.batch.start(),g.forEach(function(e){var n=m[e+"Queue"],t=r[e];void 0!==t&&t.forEach(function(e){var t=null!=o?o(e,a,i):{};t.reasonLog=s,n.enqueue(e,a,i,t)})}),m.batch.stop())},lastTask:function(){return f.lastTask},stack:function(e){for(var t=e||f.lastTask,n=[];t;)n.unshift(t),t=t.meta.parentTask;return n},logStack:function(e){this.stack(e).forEach(function(e,t){var n=e.meta;0===t&&n&&n.reasonLog&&c.log.apply(c,n.reasonLog);var r=n&&n.log?n.log:[e.fn.name,e];c.log.apply(c,[e.meta.stack.name+" ran task:"].concat(r))})},taskCount:function(){return a.tasks.length+i.tasks.length+o.tasks.length+s.tasks.length},flush:function(){a.flush()},log:function(){a.log.apply(a,arguments),i.log.apply(i,arguments),o.log.apply(o,arguments),s.log.apply(s,arguments)}};if(p.queues)throw new Error("You can't have two versions of can-queues, check your dependencies");n.exports=p.queues=m}),define("can-diff/list/list",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var d=e("can-reflect"),p=[].slice;function h(e,t){return e===t}function v(n){return n.identity&&n.identity.length?function(e,t){return d.getIdentity(e,n)===d.getIdentity(t,n)}:h}function y(e,t,n,r,a){for(var i=n.length-1,o=r.length-1;e<i&&t<o;){if(!a(n[i],r[o],i))return[{type:"splice",index:t,deleteCount:i-e+1,insert:p.call(r,t,o+1)}];i--,o--}return[{type:"splice",index:t,deleteCount:i-e+1,insert:p.call(r,t,o+1)}]}n.exports=function(e,t,n){var r,a,i=0,o=0,s=d.size(e),c=d.size(t),u=[];for(r="function"===typeof n?n:null!=n?"map"===n.type?v(n):null!=(a=n).values?v(d.getSchema(a.values)):h:function(e,t){var n,r=d.getSchema(e);if(null!=r){if(null==r.values)return h;n=d.getSchema(r.values)}return null==n&&0<t&&(n=d.getSchema(d.getKeyValue(e,0))),n?v(n):h}(e,s);i<s&&o<c;){var l=e[i],f=t[o];if(r(l,f,i))i++,o++;else if(o+1<c&&r(l,t[o+1],i))u.push({index:o,deleteCount:0,insert:[t[o]],type:"splice"}),i++,o+=2;else{if(!(i+1<s&&r(e[i+1],f,i+1)))return u.push.apply(u,y(i,o,e,t,r)),u;u.push({index:o,deleteCount:1,insert:[],type:"splice"}),i+=2,o++}}return o===c&&i===s||u.push({type:"splice",index:o,deleteCount:s-i,insert:p.call(t,o)}),u}}),define("can-diff/merge-deep/merge-deep",["require","exports","module","can-reflect","can-diff/list/list"],function(e,t,n){"use strict";var u=e("can-reflect"),c=e("can-diff/list/list");function r(e,t){return t=u.serialize(t),u.isMoreListLikeThanMapLike(e)?f(e,t):l(e,t),e}function l(s,c){u.eachKey(s,function(e,t){if(u.hasKey(c,t)){var n=u.getKeyValue(c,t);if(u.deleteKeyValue(c,t),u.isPrimitive(e))u.setKeyValue(s,t,n);else{var r=Array.isArray(n),a=u.isMoreListLikeThanMapLike(e);if(a&&r)f(e,n);else if(!r&&!a&&u.isMapLike(e)&&u.isPlainObject(n)){var i=u.getSchema(e);if(i&&i.identity&&i.identity.length){var o=u.getIdentity(e,i);if(null!=o&&o===u.getIdentity(n,i))return void l(e,n)}u.setKeyValue(s,t,u.new(e.constructor,n))}else u.setKeyValue(s,t,n)}}else u.deleteKeyValue(s,t)}),u.eachKey(c,function(e,t){u.setKeyValue(s,t,e)})}function f(t,e){var n,r,a,i=u.getSchema(t);i&&(n=i.values),n&&(r=u.getSchema(n)),!r&&0<u.size(t)&&(r=u.getSchema(u.getKeyValue(t,0))),a=r&&r.identity&&r.identity.length?function(e,t){var n=u.getIdentity(e,r)===u.getIdentity(t,r);return n&&l(e,t),n}:function(e,t){var n=e===t;return n&&(u.isPrimitive(e)||l(e,t)),n};var o=c(t,e,a),s=n?u.new.bind(u,n):function(e){return e};if(!o.length)return t;o.forEach(function(e){d(t,e,s)})}function d(e,t,n){var r=n&&t.insert.map(function(e){return n(e)})||t.insert,a=[t.index,t.deleteCount].concat(r);return e.splice.apply(e,a),e}r.applyPatch=d,n.exports=r}),define("can-debug",["require","exports","module","can-namespace","can-globals","can-debug/src/proxy-namespace","can-debug/src/temporarily-bind","can-debug/src/get-graph/get-graph","can-debug/src/format-graph/format-graph","can-debug/src/what-i-change/what-i-change","can-debug/src/what-changes-me/what-changes-me","can-debug/src/get-what-i-change/get-what-i-change","can-debug/src/get-what-changes-me/get-what-changes-me","can-symbol","can-reflect","can-queues","can-diff/merge-deep/merge-deep"],function(e,t,n){!function(r,e,t,n){"use strict";var a=e("can-namespace"),i=e("can-globals"),o=e("can-debug/src/proxy-namespace"),s=e("can-debug/src/temporarily-bind"),c=e("can-debug/src/get-graph/get-graph"),u=e("can-debug/src/format-graph/format-graph"),l=e("can-debug/src/what-i-change/what-i-change"),f=e("can-debug/src/what-changes-me/what-changes-me"),d=e("can-debug/src/get-what-i-change/get-what-i-change"),p=e("can-debug/src/get-what-changes-me/get-what-changes-me"),h=e("can-symbol"),v=e("can-reflect"),y=e("can-queues"),g=e("can-diff/merge-deep/merge-deep"),m=(r=i.getKeyValue("global"),!1);n.exports=function(){return a.debug={getGraph:s(c),formatGraph:s(u),getWhatIChange:s(d),getWhatChangesMe:s(p),logWhatIChange:s(l),logWhatChangesMe:s(f)},function(){if(!m){var t="__CANJS_DEVTOOLS__",n={Symbol:h,Reflect:v,queues:y,getGraph:a.debug.getGraph,formatGraph:a.debug.formatGraph,mergeDeep:g};r[t]?r[t].register(n):Object.defineProperty(r,t,{set:function(e){Object.defineProperty(r,t,{value:e}),e.register(n)},configurable:!0}),m=!0}}(),r.can="undefined"!=typeof Proxy?o(a):a,a.debug}}(function(){return this}(),e,0,n)}),define("can/es/can-debug",["exports","can-debug"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/enable-can-debug",["can/es/can-debug"],function(e){"use strict";var t;(t=e)&&t.__esModule}),define("can-observation-recorder",["require","exports","module","can-namespace","can-symbol"],function(e,t,n){"use strict";var r=e("can-namespace"),a=e("can-symbol"),i=[],o=a.for("can.addParent"),s=a.for("can.getValue"),c={stack:i,start:function(e){var t={keyDependencies:new Map,valueDependencies:new Set,childDependencies:new Set,traps:null,ignore:0,name:e};return i.push(t),t},stop:function(){return i.pop()},add:function(e,t){var n=i[i.length-1];if(n&&0===n.ignore)if(n.traps)n.traps.push([e,t]);else if(void 0===t)n.valueDependencies.add(e);else{var r=n.keyDependencies.get(e);r||(r=new Set,n.keyDependencies.set(e,r)),r.add(t)}},addMany:function(e){var t=i[i.length-1];if(t)if(t.traps)t.traps.push.apply(t.traps,e);else for(var n=0,r=e.length;n<r;n++)this.add(e[n][0],e[n][1])},created:function(e){var t=i[i.length-1];t&&(t.childDependencies.add(e),e[o]&&e[o](t))},ignore:function(n){return function(){if(i.length){var e=i[i.length-1];e.ignore++;var t=n.apply(this,arguments);return e.ignore--,t}return n.apply(this,arguments)}},peekValue:function(e){if(!e||!e[s])return e;if(i.length){var t=i[i.length-1];t.ignore++;var n=e[s]();return t.ignore--,n}return e[s]()},isRecording:function(){var e=i.length,t=e&&i[e-1];return t&&0===t.ignore&&t},makeDependenciesRecord:function(e){return{traps:null,keyDependencies:new Map,valueDependencies:new Set,ignore:0,name:e}},makeDependenciesRecorder:function(){return c.makeDependenciesRecord()},trap:function(){if(i.length){var e=i[i.length-1],t=e.traps,n=e.traps=[];return function(){return e.traps=t,n}}return function(){return[]}},trapsCount:function(){return i.length?i[i.length-1].traps.length:0}};if(r.ObservationRecorder)throw new Error("You can't have two versions of can-observation-recorder, check your dependencies");n.exports=r.ObservationRecorder=c}),define("can-key-tree",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var u=e("can-reflect");function s(e){if(e===Object.prototype)return!0;var t=Object.prototype.toString.call(e),n="[object Object]"!==t,r=-1!==t.indexOf("[object ");return n&&r}function l(n,r,a,i){if(a===r.length){if(!u.isMoreListLikeThanMapLike(n))throw new Error("can-key-tree: Map-type leaf containers are not supported yet.");var e=u.toArray(n);i&&e.forEach(function(e){i.apply(null,r.concat(e))}),u.removeValues(n,e)}else u.each(n,function(e,t){l(e,r.concat(t),a,i),u.deleteKeyValue(n,t)})}var r=function(e,t){var n=e[0];u.isConstructorLike(n)?this.root=new n:this.root=n,this.callbacks=t||{},this.treeStructure=e,this.empty=!0};u.assign(r.prototype,{add:function(e){if(e.length>this.treeStructure.length)throw new Error("can-key-tree: Can not add path deeper than tree.");for(var t=this.root,n=!0===this.empty,r=0;r<e.length-1;r++){var a=e[r],i=u.getKeyValue(t,a);if(!i){var o=this.treeStructure[r+1];i=s(o.prototype)?new o:new o(a),u.setKeyValue(t,a,i)}t=i}if(!u.isMoreListLikeThanMapLike(t))throw new Error("can-key-tree: Map types are not supported yet.");return u.addValues(t,[e[e.length-1]]),n&&(this.empty=!1,this.callbacks.onFirst&&this.callbacks.onFirst.call(this)),this},getNode:function(e){for(var t=this.root,n=0;n<e.length;n++){var r=e[n];if(!(t=u.getKeyValue(t,r)))return}return t},get:function(e){var t=this.getNode(e);if(this.treeStructure.length===e.length)return t;var n=new this.treeStructure[this.treeStructure.length-1];return function t(e,n,r,a){if(e)if(a===r){if(!u.isMoreListLikeThanMapLike(e))throw new Error("can-key-tree: Map-type leaf containers are not supported yet.");u.addValues(n,u.toArray(e))}else u.each(e,function(e){t(e,n,r+1,a)})}(t,n,e.length,this.treeStructure.length-1),n},delete:function(e,t){for(var n=this.root,r=[this.root],a=e[e.length-1],i=0;i<e.length-1;i++){var o=e[i],s=u.getKeyValue(n,o);if(void 0===s)return!1;r.push(s),n=s}if(e.length)if(e.length===this.treeStructure.length){if(!u.isMoreListLikeThanMapLike(n))throw new Error("can-key-tree: Map types are not supported yet.");t&&t.apply(null,e.concat(a)),u.removeValues(n,[a])}else{var c=u.getKeyValue(n,a);if(void 0===c)return!1;l(c,e,this.treeStructure.length-1,t),u.deleteKeyValue(n,a)}else l(n,[],this.treeStructure.length-1,t);for(i=r.length-2;0<=i&&0===u.size(n);i--)n=r[i],u.deleteKeyValue(n,e[i]);return 0===u.size(this.root)&&(this.empty=!0,this.callbacks.onEmpty&&this.callbacks.onEmpty.call(this)),!0},size:function(){return function t(e,n){if(0===n)return u.size(e);if(0===u.size(e))return 0;var r=0;return u.each(e,function(e){r+=t(e,n-1)}),r}(this.root,this.treeStructure.length-1)},isEmpty:function(){return this.empty}}),n.exports=r}),define("can-define-lazy-value",function(e,t,n){"use strict";n.exports=function(t,n,r,a){Object.defineProperty(t,n,{configurable:!0,get:function(){Object.defineProperty(this,n,{value:void 0,writable:!0});var e=r.call(this,t,n);return Object.defineProperty(this,n,{value:e,writable:!!a}),e},set:function(e){return Object.defineProperty(this,n,{value:e,writable:!!a}),e}})}}),define("can-event-queue/dependency-record/merge",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var a=e("can-reflect");n.exports=function(e,t){return function(e,t){var n=t.keyDependencies;if(n){var r=e.keyDependencies;r||(r=new Map,e.keyDependencies=r),a.eachKey(n,function(e,t){var n=r.get(t);n||(n=new Set,r.set(t,n)),a.eachIndex(e,function(e){n.add(e)})})}}(e,t),function(e,t){var n=t.valueDependencies;if(n){var r=e.valueDependencies;r||(r=new Set,e.valueDependencies=r),a.eachIndex(n,function(e){r.add(e)})}}(e,t),e}}),define("can-event-queue/value/value",["require","exports","module","can-queues","can-key-tree","can-reflect","can-define-lazy-value","can-event-queue/dependency-record/merge"],function(e,t,n){"use strict";var r=e("can-queues"),a=e("can-key-tree"),i=e("can-reflect"),o=e("can-define-lazy-value"),s=(e("can-event-queue/dependency-record/merge"),{on:function(e,t){this.handlers.add([t||"mutate",e])},off:function(e,t){void 0===e?void 0===t?this.handlers.delete([]):this.handlers.delete([t]):this.handlers.delete([t||"mutate",e])}}),c={"can.onValue":s.on,"can.offValue":s.off,"can.dispatch":function(e,t){var n;n=[this.handlers.getNode([]),this,[e,t]],r.enqueueByQueue.apply(r,n)},"can.getWhatIChange":function(){},"can.isBound":function(){return!this.handlers.isEmpty()}};function u(){return new a([Object,Array],{onFirst:void 0!==this.onBound&&this.onBound.bind(this),onEmpty:void 0!==this.onUnbound&&this.onUnbound.bind(this)})}var l=function(e){return i.assign(e,s),i.assignSymbols(e,c),o(e,"handlers",u,!0),e};l.addHandlers=function(e,t){return console.warn("can-event-queue/value: Avoid using addHandlers. Add onBound and onUnbound methods instead."),e.handlers=new a([Object,Array],t),e},n.exports=l}),define("can-observation/recorder-dependency-helpers",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var r=e("can-reflect");function a(e){void 0!==this.oldEventSet&&!1!==this.oldEventSet.delete(e)||r.onKeyValue(this.observable,e,this.onDependencyChange,"notify")}function i(e,t){e.forEach(a,{onDependencyChange:this.onDependencyChange,observable:t,oldEventSet:this.oldDependencies.keyDependencies.get(t)})}function o(e){r.offKeyValue(this.observable,e,this.onDependencyChange,"notify")}function s(e,t){e.forEach(o,{onDependencyChange:this.onDependencyChange,observable:t})}function c(e){!1===this.oldDependencies.valueDependencies.delete(e)&&r.onValue(e,this.onDependencyChange,"notify")}function u(e){r.offValue(e,this.onDependencyChange,"notify")}n.exports={updateObservations:function(e){e.newDependencies.keyDependencies.forEach(i,e),e.oldDependencies.keyDependencies.forEach(s,e),e.newDependencies.valueDependencies.forEach(c,e),e.oldDependencies.valueDependencies.forEach(u,e)},stopObserving:function(e,t){e.keyDependencies.forEach(s,{onDependencyChange:t}),e.valueDependencies.forEach(u,{onDependencyChange:t})}}}),define("can-observation/temporarily-bind",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var r,a=e("can-reflect"),i=function(){},o=function(){for(var e=0,t=r.length;e<t;e++)a.offValue(r[e],i);r=null};n.exports=function(e){var t=e.computeInstance||e;a.onValue(t,i),r||(r=[],setTimeout(o,10)),r.push(t)}}),define("can-observation",["require","exports","module","can-namespace","can-reflect","can-queues","can-observation-recorder","can-symbol","can-log/dev/dev","can-event-queue/value/value","can-observation/recorder-dependency-helpers","can-observation/temporarily-bind"],function(e,t,n){!function(e,t,n,r){"use strict";var a=t("can-namespace"),i=t("can-reflect"),o=t("can-queues"),s=t("can-observation-recorder"),c=t("can-symbol"),u=(t("can-log/dev/dev"),t("can-event-queue/value/value")),l=t("can-observation/recorder-dependency-helpers"),f=t("can-observation/temporarily-bind"),d=c.for("can.dispatch"),p=(c.for("can.getChangesDependencyRecord"),c.for("can.getValueDependencies"));function h(e,t,n){this.func=e,this.context=t,this.options=n||{priority:0,isObservable:!0},this.bound=!1,this._value=void 0,this.newDependencies=s.makeDependenciesRecord(),this.oldDependencies=null;var r=this;this.onDependencyChange=function(e){r.dependencyChange(this,e)},this.update=this.update.bind(this)}u(h.prototype),i.assign(h.prototype,{onBound:function(){this.bound=!0,this.oldDependencies=this.newDependencies,s.start(this._name),this._value=this.func.call(this.context),this.newDependencies=s.stop(),l.updateObservations(this)},dependencyChange:function(e,t){if(!0===this.bound){var n;n=[this.update,this,[],{priority:this.options.priority}],o.deriveQueue.enqueue.apply(o.deriveQueue,n)}},update:function(){if(!0===this.bound){var e=this._value;this.oldValue=null,this.onBound(),e!==this._value&&this[d](this._value,e)}},onUnbound:function(){this.bound=!1,l.stopObserving(this.newDependencies,this.onDependencyChange),this.newDependencies=s.makeDependenciesRecord()},get:function(){return this.options.isObservable&&s.isRecording()&&(s.add(this),!1===this.bound&&h.temporarilyBind(this)),!0===this.bound?(0<o.deriveQueue.tasksRemainingCount()&&h.updateChildrenAndSelf(this),this._value):this.func.call(this.context)},hasDependencies:function(){var e=this.newDependencies;return this.bound?0<e.valueDependencies.size+e.keyDependencies.size:void 0},log:function(){}}),Object.defineProperty(h.prototype,"value",{get:function(){return this.get()}});var v={"can.getValue":h.prototype.get,"can.isValueLike":!0,"can.isMapLike":!1,"can.isListLike":!1,"can.valueHasDependencies":h.prototype.hasDependencies,"can.getValueDependencies":function(){if(!0===this.bound){var e=this.newDependencies,t={};return e.keyDependencies.size&&(t.keyDependencies=e.keyDependencies),e.valueDependencies.size&&(t.valueDependencies=e.valueDependencies),t}},"can.getPriority":function(){return this.options.priority},"can.setPriority":function(e){this.options.priority=e}};i.assignSymbols(h.prototype,v),h.updateChildrenAndSelf=function(e){if(void 0!==e.update&&!0===o.deriveQueue.isEnqueued(e.update))return o.deriveQueue.flushQueuedTask(e.update),!0;if(e[p]){var t=!1;return(e[p]().valueDependencies||[]).forEach(function(e){!0===h.updateChildrenAndSelf(e)&&(t=!0)}),t}return!1};var y={addAll:"addMany"};["add","addAll","ignore","trap","trapsCount","isRecording"].forEach(function(t){h[t]=function(){var e=y[t]?y[t]:t;return console.warn("can-observation: Call "+e+"() on can-observation-recorder."),s[e].apply(this,arguments)}}),h.prototype.start=function(){return console.warn("can-observation: Use .on and .off to bind."),this.onBound()},h.prototype.stop=function(){return console.warn("can-observation: Use .on and .off to bind."),this.onUnbound()},h.temporarilyBind=f,r.exports=a.Observation=h}(0,e,0,n)}),define("can-simple-observable/log",["require","exports","module","can-log/dev/dev","can-reflect"],function(e,t,n){"use strict";e("can-log/dev/dev"),e("can-reflect");n.exports=function(){}}),define("can-simple-observable",["require","exports","module","can-simple-observable/log","can-namespace","can-symbol","can-reflect","can-observation-recorder","can-event-queue/value/value"],function(e,t,n){"use strict";var r=e("can-simple-observable/log"),a=e("can-namespace"),i=e("can-symbol"),o=e("can-reflect"),s=e("can-observation-recorder"),c=e("can-event-queue/value/value"),u=i.for("can.dispatch");function l(e){this._value=e}c(l.prototype),o.assignMap(l.prototype,{log:r,get:function(){return s.add(this),this._value},set:function(e){var t=this._value;this._value=e,this[u](e,t)}}),Object.defineProperty(l.prototype,"value",{set:function(e){return this.set(e)},get:function(){return this.get()}});var f={"can.getValue":l.prototype.get,"can.setValue":l.prototype.set,"can.isMapLike":!1,"can.valueHasDependencies":function(){return!0}};o.assignSymbols(l.prototype,f),n.exports=a.SimpleObservable=l}),define("can-simple-observable/settable/settable",["require","exports","module","can-reflect","can-observation-recorder","can-simple-observable","can-observation","can-queues","can-simple-observable/log","can-event-queue/value/value"],function(e,t,n){"use strict";var r=e("can-reflect"),a=e("can-observation-recorder"),i=e("can-simple-observable"),o=e("can-observation"),s=e("can-queues"),c=e("can-simple-observable/log"),u=e("can-event-queue/value/value"),l=a.ignore(r.getValue.bind(r));function f(e,t,n){this.lastSetValue=new i(n),this.handler=this.handler.bind(this),this.observation=new o(function(){return e.call(t,this.lastSetValue.get())},this)}u(f.prototype),r.assignMap(f.prototype,{log:c,constructor:f,handler:function(e){var t=this._value;this._value=e,s.enqueueByQueue(this.handlers.getNode([]),this,[e,t],null,void 0)},onBound:function(){this.bound||(this.bound=!0,this.activate())},activate:function(){r.onValue(this.observation,this.handler,"notify"),this._value=l(this.observation)},onUnbound:function(){this.bound=!1,r.offValue(this.observation,this.handler,"notify")},set:function(e){var t=this.lastSetValue.get();r.isObservableLike(t)&&r.isValueLike(t)&&!r.isObservableLike(e)?r.setValue(t,e):e!==t&&this.lastSetValue.set(e)},get:function(){return a.isRecording()&&(a.add(this),this.bound||this.onBound()),!0===this.bound?this._value:this.observation.get()},hasDependencies:function(){return r.valueHasDependencies(this.observation)},getValueDependencies:function(){return r.getValueDependencies(this.observation)}}),Object.defineProperty(f.prototype,"value",{set:function(e){return this.set(e)},get:function(){return this.get()}}),r.assignSymbols(f.prototype,{"can.getValue":f.prototype.get,"can.setValue":f.prototype.set,"can.isMapLike":!1,"can.getPriority":function(){return r.getPriority(this.observation)},"can.setPriority":function(e){r.setPriority(this.observation,e)},"can.valueHasDependencies":f.prototype.hasDependencies,"can.getValueDependencies":f.prototype.getValueDependencies}),n.exports=f}),define("can-simple-observable/async/async",["require","exports","module","can-simple-observable","can-observation","can-queues","can-simple-observable/settable/settable","can-reflect","can-observation-recorder","can-event-queue/value/value"],function(e,t,n){"use strict";var r=e("can-simple-observable"),a=e("can-observation"),i=e("can-queues"),o=e("can-simple-observable/settable/settable"),s=e("can-reflect"),c=e("can-observation-recorder");e("can-event-queue/value/value");function u(t,n,e){this.resolve=this.resolve.bind(this),this.lastSetValue=new r(e),this.handler=this.handler.bind(this),this.observation=new a(function(){this.resolveCalled=!1,this.inGetter=!0;var e=t.call(n,this.lastSetValue.get(),!0===this.bound?this.resolve:void 0);if(this.inGetter=!1,void 0!==e?this.resolve(e):this.resolveCalled&&this.resolve(this._value),!0!==this.bound)return e},this)}((u.prototype=Object.create(o.prototype)).constructor=u).prototype.handler=function(e){void 0!==e&&o.prototype.handler.apply(this,arguments)};var l=c.ignore(s.getValue.bind(s));u.prototype.activate=function(){s.onValue(this.observation,this.handler,"notify"),this.resolveCalled||(this._value=l(this.observation))},u.prototype.resolve=function(e){this.resolveCalled=!0;var t=this._value;if(this._value=e,!this.inGetter){var n=[this.handlers.getNode([]),this,[e,t],null];i.enqueueByQueue.apply(i,n)}},n.exports=u}),define("can-dom-events/helpers/util",["require","exports","module","can-globals/document/document","can-globals/is-browser-window/is-browser-window"],function(e,t,n){!function(e,t,n,r){"use strict";var a=t("can-globals/document/document"),i=t("can-globals/is-browser-window/is-browser-window");function s(e){return e.ownerDocument||a()}function o(e){if(!e||!e.nodeName)return e===window;var t=e.nodeType;return 1===t||9===t||11===t}var c=!1;!function(){if(i()){var t="fix_synthetic_events_on_disabled_test",n=document.createElement("input");n.disabled=!0;var r=setTimeout(function(){c=!0},50),a=function e(){clearTimeout(r),n.removeEventListener(t,e)};n.addEventListener(t,a);try{var e=document.create("HTMLEvents");e.initEvent(t,!1),n.dispatchEvent(e)}catch(e){a(),c=!0}}}(),r.exports={createEvent:function(e,t,n,r){var a,i=s(e).createEvent("HTMLEvents");if("string"==typeof t)a=t;else for(var o in a=t.type,t)void 0===i[o]&&(i[o]=t[o]);return void 0===n&&(n=!0),i.initEvent(a,n,r),i},addDomContext:function(e,t){return o(e)&&(t=Array.prototype.slice.call(t,0)).unshift(e),t},removeDomContext:function(e,t){return o(e)||(e=(t=Array.prototype.slice.call(t,0)).shift()),{context:e,args:t}},isDomEventTarget:o,getTargetDocument:s,forceEnabledForDispatch:function(e,t){return c&&(n=e,r=t.type,a="inserted"===r||"removed"===r,i=!!n.disabled,a&&i);var n,r,a,i}}}(0,e,0,n)}),define("can-dom-events/helpers/make-event-registry",function(e,t,n){"use strict";function r(){this._registry={}}n.exports=function(){return new r},r.prototype.has=function(e){return!!this._registry[e]},r.prototype.get=function(e){return this._registry[e]},r.prototype.add=function(e,t){if(!e)throw new Error("An EventDefinition must be provided");if("function"!=typeof e.addEventListener)throw new TypeError("EventDefinition addEventListener must be a function");if("function"!=typeof e.removeEventListener)throw new TypeError("EventDefinition removeEventListener must be a function");if("string"!=typeof(t=t||e.defaultEventType))throw new TypeError("Event type must be a string, not "+t);if(this.has(t))throw new Error('Event "'+t+'" is already registered');this._registry[t]=e;var n=this;return function(){n._registry[t]=void 0}}}),define("can-dom-events/helpers/-make-delegate-event-tree",["require","exports","module","can-key-tree","can-reflect"],function(e,t,n){"use strict";var a=e("can-key-tree"),o=e("can-reflect"),i=function(e){return"focus"===e||"blur"===e};n.exports=function(e){var r,t,n=(r=e,t=function(e){this.element=e,this.events={},this.delegated={}},o.assignSymbols(t.prototype,{"can.setKeyValue":function(e,t){var n=this.delegated[e]=function(i){o.each(t,function(e,t){var n=i.target;do{var r=n===document?document.documentElement:n,a=r.matches||r.msMatchesSelector;a&&a.call(r,t)&&e.forEach(function(e){e.call(r,i)}),n=n.parentNode}while(n&&n!==i.currentTarget)})};this.events[e]=t,r.addEventListener(this.element,e,n,i(e))},"can.getKeyValue":function(e){return this.events[e]},"can.deleteKeyValue":function(e){r.removeEventListener(this.element,e,this.delegated[e],i(e)),delete this.delegated[e],delete this.events[e]},"can.getOwnEnumerableKeys":function(){return Object.keys(this.events)}}),t);return new a([Map,n,Object,Array])}}),define("can-dom-events",["require","exports","module","can-namespace","can-dom-events/helpers/util","can-dom-events/helpers/make-event-registry","can-dom-events/helpers/-make-delegate-event-tree"],function(e,t,n){!function(e,t,n,r){"use strict";var a=t("can-namespace"),s=t("can-dom-events/helpers/util"),i=t("can-dom-events/helpers/make-event-registry"),o=t("can-dom-events/helpers/-make-delegate-event-tree"),c={_eventRegistry:i(),addEvent:function(e,t){return this._eventRegistry.add(e,t)},addEventListener:function(e,t){if(c._eventRegistry.has(t))return c._eventRegistry.get(t).addEventListener.apply(c,arguments);var n=Array.prototype.slice.call(arguments,1);return e.addEventListener.apply(e,n)},removeEventListener:function(e,t){if(c._eventRegistry.has(t))return c._eventRegistry.get(t).removeEventListener.apply(c,arguments);var n=Array.prototype.slice.call(arguments,1);return e.removeEventListener.apply(e,n)},addDelegateListener:function(e,t,n,r){c._eventTree.add([e,t,n,r])},removeDelegateListener:function(e,t,n,r){c._eventTree.delete([e,t,n,r])},dispatch:function(e,t,n,r){var a=s.createEvent(e,t,n,r),i=s.forceEnabledForDispatch(e,a);i&&(e.disabled=!1);var o=e.dispatchEvent(a);return i&&(e.disabled=!0),o}};c._eventTree=o(c),r.exports=a.domEvents=c}(0,e,0,n)}),define("can-event-queue/map/map",["require","exports","module","can-log/dev/dev","can-queues","can-reflect","can-symbol","can-key-tree","can-dom-events","can-dom-events/helpers/util","can-event-queue/dependency-record/merge"],function(e,t,n){"use strict";e("can-log/dev/dev");var a,u=e("can-queues"),i=e("can-reflect"),r=e("can-symbol"),o=e("can-key-tree"),s=e("can-dom-events"),c=e("can-dom-events/helpers/util").isDomEventTarget,l=(e("can-event-queue/dependency-record/merge"),r.for("can.meta")),f=r.for("can.dispatchInstanceBoundChange"),d=r.for("can.dispatchInstanceOnPatches"),p=r.for("can.onKeyValue"),h=r.for("can.offKeyValue"),v=r.for("can.onEvent"),y=r.for("can.offEvent"),g=r.for("can.onValue"),m=r.for("can.offValue");function b(t,e){e.handlers||(e.handlers=new o([Object,Object,Object,Array],{onFirst:function(){void 0!==t._eventSetup&&t._eventSetup();var e=t.constructor;void 0!==e[f]&&t instanceof e&&e[f](t,!0)},onEmpty:function(){void 0!==t._eventTeardown&&t._eventTeardown();var e=t.constructor;void 0!==e[f]&&t instanceof e&&e[f](t,!1)}})),e.listenHandlers||(e.listenHandlers=new o([Map,Map,Object,Array]))}var w=function(e){var t=e[l];return t||(t={},i.setKeyValue(e,l,t)),b(e,t),t};function x(e,t,n,r){arguments.length&&i.isPrimitive(e)&&(r=n,n=t,t=e,e=this.context),"function"==typeof t&&(r=n,n=t,t=void 0),"string"==typeof n&&(r=n,n=void 0);var a=[];return e&&(a.push(e),(t||n||r)&&(a.push(t),(r||n)&&(a.push(r||this.defaultQueue),n&&a.push(n)))),a}var _={dispatch:function(e,t){if(!this.__inSetup){"string"==typeof e&&(e={type:e});var n=w(this).handlers,r=void 0!==e.type&&n.getNode([e.type]),a=e.patches&&this.constructor[d],i=void 0!==e.patches&&n.getNode(["can.patches","onKeyValue"]),o=void 0!==e.keyChanged&&n.getNode(["can.keys","onKeyValue"]),s=a||r||i||o;if(s&&u.batch.start(),r&&(r.onKeyValue&&u.enqueueByQueue(r.onKeyValue,this,t,e.makeMeta,e.reasonLog),r.event)){e.batchNum=u.batch.number();var c=[e].concat(t);u.enqueueByQueue(r.event,this,c,e.makeMeta,e.reasonLog)}o&&u.enqueueByQueue(o,this,[e.keyChanged],e.makeMeta,e.reasonLog),i&&u.enqueueByQueue(i,this,[e.patches],e.makeMeta,e.reasonLog),a&&this.constructor[d](this,e.patches),s&&u.batch.stop()}return e},addEventListener:function(e,t,n){return w(this).handlers.add([e,"event",n||"mutate",t]),this},removeEventListener:function(e,t,n){if(void 0===e){var r=w(this).handlers,a=r.getNode([]);Object.keys(a).forEach(function(e){r.delete([e,"event"])})}else t||n?t?w(this).handlers.delete([e,"event",n||"mutate",t]):w(this).handlers.delete([e,"event",n||"mutate"]):w(this).handlers.delete([e,"event"]);return this},one:function(e,t){var n=function(){return a.off.call(this,e,n),t.apply(this,arguments)};return a.on.call(this,e,n),this},listenTo:function(e,t,n,r){return i.isPrimitive(e)&&(r=n,n=t,t=e,e=this),"function"==typeof t&&(r=n,n=t,t=void 0),w(this).listenHandlers.add([e,t,r||"mutate",n]),a.on.call(e,t,n,r||"mutate"),this},stopListening:function(){var e=x.apply({context:this,defaultQueue:"mutate"},arguments);return w(this).listenHandlers.delete(e,function(e,t,n,r){a.off.call(e,t,r,n)}),this},on:function(e,t,n){if(c(this))"string"==typeof t?s.addDelegateListener(this,e,t,n):s.addEventListener(this,e,t,n);else if(this[v])this[v](e,t,n);else if("addEventListener"in this)this.addEventListener(e,t,n);else if(this[p])i.onKeyValue(this,e,t,n);else{if(e||!this[g])throw new Error("can-event-queue: Unable to bind "+e);i.onValue(this,t,n)}return this},off:function(e,t,n){if(c(this))"string"==typeof t?s.removeDelegateListener(this,e,t,n):s.removeEventListener(this,e,t,n);else if(this[y])this[y](e,t,n);else if("removeEventListener"in this)this.removeEventListener(e,t,n);else if(this[h])i.offKeyValue(this,e,t,n);else{if(e||!this[m])throw new Error("can-event-queue: Unable to unbind "+e);i.offValue(this,t,n)}return this}},k={"can.onKeyValue":function(e,t,n){w(this).handlers.add([e,"onKeyValue",n||"mutate",t])},"can.offKeyValue":function(e,t,n){w(this).handlers.delete([e,"onKeyValue",n||"mutate",t])},"can.isBound":function(){return!w(this).handlers.isEmpty()},"can.getWhatIChange":function(e){},"can.onPatches":function(e,t){w(this).handlers.add(["can.patches","onKeyValue",t||"notify",e])},"can.offPatches":function(e,t){w(this).handlers.delete(["can.patches","onKeyValue",t||"notify",e])}};function O(e,t,n){Object.defineProperty(e,t,{enumerable:!1,value:n})}O(a=function(e){return i.assignMap(e,_),i.assignSymbols(e,k)},"addHandlers",b),O(a,"stopListeningArgumentsToKeys",x),_.bind=_.addEventListener,_.unbind=_.removeEventListener,i.assignMap(a,_),i.assignSymbols(a,k),O(a,"start",function(){console.warn("use can-queues.batch.start()"),u.batch.start()}),O(a,"stop",function(){console.warn("use can-queues.batch.stop()"),u.batch.stop()}),O(a,"flush",function(){console.warn("use can-queues.flush()"),u.flush()}),O(a,"afterPreviousEvents",function(e){console.warn("don't use afterPreviousEvents"),u.mutateQueue.enqueue(function(){u.mutateQueue.enqueue(e)}),u.flush()}),O(a,"after",function(e){console.warn("don't use after"),u.mutateQueue.enqueue(e),u.flush()}),n.exports=a}),define("can-simple-observable/resolver/resolver",["require","exports","module","can-reflect","can-symbol","can-observation-recorder","can-observation","can-queues","can-event-queue/map/map","can-simple-observable/settable/settable","can-simple-observable"],function(e,t,n){"use strict";var o=e("can-reflect"),r=e("can-symbol"),a=e("can-observation-recorder"),i=(e("can-observation"),e("can-queues")),s=e("can-event-queue/map/map"),c=e("can-simple-observable/settable/settable"),u=e("can-simple-observable"),l=r.for("can.getChangesDependencyRecord");function f(e,t,n){this.resolver=a.ignore(e),this.context=t,this._valueOptions={resolve:this.resolve.bind(this),listenTo:this.listenTo.bind(this),stopListening:this.stopListening.bind(this),lastSet:new u(n)},this.update=this.update.bind(this),this.contextHandlers=new WeakMap,this.teardown=null,this.binder={}}function d(e,t,n,r){s.off.call(e,t,r,n)}f.prototype=Object.create(c.prototype),o.assignMap(f.prototype,{constructor:f,listenTo:function(e,t,n,r){o.isPrimitive(e)&&(n=t,t=e,e=this.context),"function"==typeof t&&(n=t,t=void 0);var a=this,i=n.bind(this.context);i[l]=function(){var e=new Set;return e.add(a),{valueDependencies:e}},this.contextHandlers.set(n,i),s.listenTo.call(this.binder,e,t,i,r||"notify")},stopListening:function(){var e=this.binder[r.for("can.meta")],t=e&&e.listenHandlers;if(t){var n=s.stopListeningArgumentsToKeys.call({context:this.context,defaultQueue:"notify"});t.delete(n,d)}return this},resolve:function(e){if(this._value=e,this.isBinding)return this.lastValue=this._value,e;if(this._value!==this.lastValue){i.batch.start(),i.deriveQueue.enqueue(this.update,this,[],{}),i.batch.stop()}return e},update:function(){if(this.lastValue!==this._value){var e=this.lastValue;this.lastValue=this._value,i.enqueueByQueue(this.handlers.getNode([]),this,[this._value,e])}},activate:function(){this.isBinding=!0,this.teardown=this.resolver.call(this.context,this._valueOptions),this.isBinding=!1},onUnbound:function(){this.bound=!1,s.stopListening.call(this.binder),null!=this.teardown&&(this.teardown(),this.teardown=null)},set:function(e){this._valueOptions.lastSet.set(e)},get:function(){if(a.isRecording()&&(a.add(this),this.bound||this.onBound()),!0===this.bound)return this._value;var e=function(){};this.on(e);var t=this._value;return this.off(e),t},hasDependencies:function(){var e=!1;if(this.bound){var t=this.binder[r.for("can.meta")];e=!!(t&&t.listenHandlers).size()}return e},getValueDependencies:function(){if(this.bound){var e=this.binder[r.for("can.meta")],t=e&&e.listenHandlers,a=new Map,i=new Set;if(t&&(o.each(t.root,function(e,r){o.each(e,function(e,t){if(void 0===t)i.add(r);else{var n=a.get(r);n||(n=new Set,a.set(r,n)),n.add(t)}})}),i.size||a.size)){var n={};return a.size&&(n.keyDependencies=a),i.size&&(n.valueDependencies=i),n}}}}),o.assignSymbols(f.prototype,{"can.getValue":f.prototype.get,"can.setValue":f.prototype.set,"can.isMapLike":!1,"can.getPriority":function(){return this.priority||0},"can.setPriority":function(e){this.priority=e},"can.valueHasDependencies":f.prototype.hasDependencies,"can.getValueDependencies":f.prototype.getValueDependencies}),n.exports=f}),define("can-event-queue/type/type",["require","exports","module","can-reflect","can-symbol","can-key-tree","can-queues"],function(e,t,n){"use strict";var r=e("can-reflect"),a=e("can-symbol"),i=e("can-key-tree"),o=e("can-queues"),s=a.for("can.meta");function c(e,t){t.lifecycleHandlers||(t.lifecycleHandlers=new i([Object,Array])),t.instancePatchesHandlers||(t.instancePatchesHandlers=new i([Object,Array]))}function u(e){var t=e[s];return t||(t={},r.setKeyValue(e,s,t)),c(0,t),t}var l={};function f(e,t,n){l["can.on"+e]=function(e,t){u(this)[n].add([t||"mutate",e])},l["can.off"+e]=function(e,t){u(this)[n].delete([t||"mutate",e])},l["can."+t]=function(e,t){o.enqueueByQueue(u(this)[n].getNode([]),this,[e,t])}}function d(e){return r.assignSymbols(e,l)}f("InstancePatches","dispatchInstanceOnPatches","instancePatchesHandlers"),f("InstanceBoundChange","dispatchInstanceBoundChange","lifecycleHandlers"),Object.defineProperty(d,"addHandlers",{enumerable:!1,value:c}),n.exports=d}),define("can-string-to-any",function(e,t,n){"use strict";n.exports=function(e){switch(e){case"NaN":case"Infinity":return+e;case"null":return null;case"undefined":return;case"true":case"false":return"true"===e;default:var t=+e;return isNaN(t)?e:t}}}),define("can-data-types/maybe-boolean/maybe-boolean",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var r=e("can-reflect");function a(e){return null==e?e:!("false"===e||"0"===e||!e)}n.exports=r.assignSymbols(a,{"can.new":a,"can.getSchema":function(){return{type:"Or",values:[!0,!1,void 0,null]}},"can.getName":function(){return"MaybeBoolean"},"can.isMember":function(e){return null==e||"boolean"==typeof e}})}),define("can-data-types/maybe-date/maybe-date",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var r=e("can-reflect");function a(e){var t=typeof e;return"string"===t?(e=Date.parse(e),isNaN(e)?null:new Date(e)):"number"===t?new Date(e):e}function i(e){var t=a(this.setValue=e);this.value=null==t?t:t.getTime()}i.prototype.valueOf=function(){return this.value},r.assignSymbols(i.prototype,{"can.serialize":function(){return this.setValue}}),n.exports=r.assignSymbols(a,{"can.new":a,"can.getSchema":function(){return{type:"Or",values:[Date,void 0,null]}},"can.ComparisonSetType":i,"can.getName":function(){return"MaybeDate"},"can.isMember":function(e){return null==e||e instanceof Date}})}),define("can-data-types/maybe-number/maybe-number",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var r=e("can-reflect");function a(e){return null==e?e:+e}n.exports=r.assignSymbols(a,{"can.new":a,"can.getSchema":function(){return{type:"Or",values:[Number,void 0,null]}},"can.getName":function(){return"MaybeNumber"},"can.isMember":function(e){return null==e||"number"==typeof e}})}),define("can-data-types/maybe-string/maybe-string",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var r=e("can-reflect");function a(e){return null==e?e:""+e}n.exports=r.assignSymbols(a,{"can.new":a,"can.getSchema":function(){return{type:"Or",values:[String,void 0,null]}},"can.getName":function(){return"MaybeString"},"can.isMember":function(e){return null==e||"string"==typeof e}})}),define("can-define",["require","exports","module","can-namespace","can-symbol","can-reflect","can-observation","can-observation-recorder","can-simple-observable/async/async","can-simple-observable/settable/settable","can-simple-observable/resolver/resolver","can-event-queue/map/map","can-event-queue/type/type","can-queues","can-assign","can-log/dev/dev","can-string-to-any","can-define-lazy-value","can-data-types/maybe-boolean/maybe-boolean","can-data-types/maybe-date/maybe-date","can-data-types/maybe-number/maybe-number","can-data-types/maybe-string/maybe-string"],function(e,t,n){"use strict";var f,v,y,g,d,c,r=e("can-namespace"),p=e("can-symbol"),h=e("can-reflect"),i=e("can-observation"),m=e("can-observation-recorder"),o=e("can-simple-observable/async/async"),s=e("can-simple-observable/settable/settable"),a=e("can-simple-observable/resolver/resolver"),u=e("can-event-queue/map/map"),l=e("can-event-queue/type/type"),b=e("can-queues"),w=e("can-assign"),x=(e("can-log/dev/dev"),e("can-string-to-any")),_=e("can-define-lazy-value"),k=e("can-data-types/maybe-boolean/maybe-boolean"),O=e("can-data-types/maybe-date/maybe-date"),E=e("can-data-types/maybe-number/maybe-number"),L=e("can-data-types/maybe-string/maybe-string"),q=p.for("can.new"),S=p.for("can.serialize");function M(e){return e&&(!0===e.canDefineType||e[q])}var P=m.ignore(h.getValue.bind(h)),C=Object.defineProperty;function V(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})}function j(e,t,n,r){void 0===t.value||"function"==typeof t.value&&0!==t.value.length||(t.default=t.value,delete t.value),void 0!==t.Value&&(t.Default=t.Value,delete t.Value)}function D(e){return"function"==typeof e.value&&e.value.length}n.exports=v=r.define=function(n,e,t){var r,a,i,o,s=Object.create(t?t.dataInitializers:null),c=Object.create(t?t.computedInitializers:null),u=d(e,t,n);if(u.dataInitializers=s,u.computedInitializers=c,h.eachKey(u.definitions,function(e,t){v.property(n,t,e,s,c,u.defaultDefinition)}),n.hasOwnProperty("_data"))for(r in s)_(n._data,r,s[r].bind(n),!0);else _(n,"_data",function(){var e={};for(var t in s)_(e,t,s[t].bind(this),!0);return e});if(n.hasOwnProperty("_computed"))for(r in c)_(n._computed,r,c[r].bind(n));else _(n,"_computed",function(){var e=Object.create(null);for(var t in c)_(e,t,c[t].bind(this));return e});(a=f,i=Object.getOwnPropertyNames(a),o="getOwnPropertySymbols"in Object?Object.getOwnPropertySymbols(a):[],i.concat(o)).forEach(function(e){Object.defineProperty(n,e,{enumerable:!1,value:f[e],configurable:!0,writable:!0})}),Object.defineProperty(n,"_define",{enumerable:!1,value:u,configurable:!0,writable:!0});var l=p.iterator||p.for("iterator");return n[l]||V(n,l,function(){return new v.Iterator(this)}),u};v.extensions=function(){},v.property=function(e,t,n,r,a,i){var o=v.extensions.apply(this,arguments);o&&(n=g(t,o,i||{},e));var s=n.type;if(s&&function(e){for(var t in e)if("type"!==t)return!1;return!0}(n)&&s===v.types["*"])C(e,t,{get:y.get.data(t),set:y.set.events(t,y.get.data(t),y.set.data(t),y.eventType.data(t)),enumerable:!0,configurable:!0});else{n.type=s;var c,u=n.get||D(n)?"computed":"data",l=y.read[u](t),f=y.get[u](t),d=y.set[u](t),p=function(e){return e};n.Type&&(p=y.set.Type(t,n.Type,p)),s&&(p=y.set.type(t,s,p));var h=y.set.events(t,l,d,y.eventType[u](t));D(n)?a[t]=y.valueResolver(t,n,p):void 0===n.default&&void 0===n.Default||(c=m.ignore(y.get.defaultValue(t,n,p,h))),n.get?a[t]=y.compute(t,n.get,c):c&&(r[t]=c),n.get&&n.set?d=y.set.setter(t,n.set,y.read.lastSet(t),d,!0):n.set?d=y.set.setter(t,n.set,l,h,!1):"data"===u?d=h:n.get&&n.get.length<1&&(d=function(){}),s&&(d=y.set.type(t,s,d)),n.Type&&(d=y.set.Type(t,n.Type,d)),C(e,t,{get:f,set:d,enumerable:"serialize"in n?!!n.serialize:!n.get,configurable:!0})}},v.makeDefineInstanceKey=function(a){a[p.for("can.defineInstanceKey")]=function(e,t){var n=this.prototype._define;"object"==typeof t&&j(0,t);var r=c(e,t,n.defaultDefinition,this);r&&"object"==typeof r?(v.property(a.prototype,e,r,n.dataInitializers,n.computedInitializers,n.defaultDefinition),n.definitions[e]=r):n.methods[e]=r,this.prototype.dispatch({type:"can.keys",target:this.prototype})}},v.Constructor=function(e,t){var n=function(e){Object.defineProperty(this,"__inSetup",{configurable:!0,enumerable:!1,value:!0,writable:!0}),v.setup.call(this,e,t),this.__inSetup=!1},r=v(n.prototype,e);return l(n),v.makeDefineInstanceKey(n,r),n},y={computeObj:function(n,r,e){var a={oldValue:void 0,compute:e,count:0,handler:function(e){var t=a.oldValue;a.oldValue=e,n.dispatch({type:r,target:n},[e,t])}};return a},valueResolver:function(t,n,e){var r=y.get.defaultValue(t,n,e);return function(){var e=r.call(this);return y.computeObj(this,t,new a(n.value,this,e))}},compute:function(n,r,a){return function(){var e,t=a&&a.call(this);return e=0===r.length?new i(r,this):1===r.length?new s(r,this,t):new o(r,this,t),y.computeObj(this,n,e)}},set:{data:function(t){return function(e){this._data[t]=e}},computed:function(t){return function(e){h.setValue(this._computed[t].compute,e)}},events:function(r,a,i,e){return function(e){if(this.__inSetup)i.call(this,e);else{var t,n=a.call(this);if(e!==n)i.call(this,e),t={patches:[{type:"set",key:r,value:e}],type:r,target:this},this.dispatch(t,[e,n])}}},setter:function(e,i,o,s,c){return function(e){var t=this;b.batch.start();var n=!1,r=o.call(this),a=i.call(this,e,function(e){s.call(t,e),n=!0},r);if(n)b.batch.stop();else if(c)if(void 0!==a)r!==a&&s.call(this,a),b.batch.stop();else{if(0===i.length)return s.call(this,e),void b.batch.stop();if(1!==i.length)return void b.batch.stop();b.batch.stop()}else if(void 0!==a)s.call(this,a),b.batch.stop();else{if(0===i.length)return s.call(this,e),void b.batch.stop();if(1!==i.length)return void b.batch.stop();s.call(this,void 0),b.batch.stop()}}},type:function(t,n,r){function e(e){return r.call(this,n.call(this,e,t))}return M(n)?n.canDefineType?e:function(e){return r.call(this,h.convert(e,n))}:"object"==typeof n?y.set.Type(t,n,r):e},Type:function(e,t,n){return Array.isArray(t)&&v.DefineList?t=v.DefineList.extend({"#":t[0]}):"object"==typeof t&&(t=v.DefineMap?v.DefineMap.extend(t):v.Constructor(t)),function(e){return e instanceof t||null==e?n.call(this,e):n.call(this,new t(e))}}},eventType:{data:function(n){return function(e,t){return void 0!==t||this._data.hasOwnProperty(n)?"set":"add"}},computed:function(){return function(){return"set"}}},read:{data:function(e){return function(){return this._data[e]}},computed:function(e){return function(){return h.getValue(this._computed[e].compute)}},lastSet:function(t){return function(){var e=this._computed[t].compute;if(e.lastSetValue)return h.getValue(e.lastSetValue)}}},get:{defaultValue:function(a,i,o,s){return function(){var e=i.default;if(void 0!==e)"function"==typeof e&&(e=e.call(this)),e=o.call(this,e);else{var t=i.Default;t&&(e=o.call(this,new t))}if(i.set){var n,r=!0;return y.set.setter(a,i.set,function(){},function(e){r?n=e:s.call(this,e)},i.get).call(this,e),r=!1,n}return e}},data:function(e){return function(){return this.__inSetup||m.add(this,e),this._data[e]}},computed:function(n){return function(e){var t=this._computed[n].compute;return m.isRecording()&&(m.add(this,n),h.isBound(t)||i.temporarilyBind(t)),P(t)}}}},v.behaviors=["get","set","value","Value","type","Type","serialize"];function I(e,t){var n=e._computed&&e._computed[t];n&&n.compute&&(n.count?n.count++:(n.count=1,h.onValue(n.compute,n.handler,"notify"),n.oldValue=P(n.compute)))}function T(e,t){var n=e._computed&&e._computed[t];n&&(1===n.count?(n.count=0,h.offValue(n.compute,n.handler,"notify")):n.count--)}g=function(e,t,n,r){var a={};if(h.eachKey(t,function(e,t){!function(e,t,n){if("enumerable"===t)e.serialize=!!n;else if("type"===t){var r=n;"string"==typeof r&&("object"!=typeof(r=v.types[r])||M(r)||(w(e,r),r=r[t])),void 0!==r&&(e[t]=r)}else e[t]=n}(a,t,e)}),h.eachKey(n,function(e,t){void 0===a[t]&&"type"!==t&&"Type"!==t&&(a[t]=e)}),t.Type){var i=t.Type,o=i[S];o&&(a.serialize=function(e){return o.call(e)}),i[q]&&(a.type=i,delete a.Type)}if("string"!=typeof t.type){if(!a.type&&!a.Type){var s=h.assignMap({},n);a=h.assignMap(s,a)}0===h.size(a)&&(a.type=v.types["*"])}return j(0,a),a},c=function(e,t,n,r){var a;return"string"==typeof t?a={type:t}:t&&(t[S]||t[q])?a={Type:t}:"function"==typeof t?h.isConstructorLike(t)&&(a={Type:t}):Array.isArray(t)?a={Type:t}:h.isPlainObject(t)&&(a=t),a?g(e,a,n,r):t},d=function(e,t,a){var i,o=Object.create(t?t.definitions:null),s={},n=e["*"];return i=n?(delete e["*"],c("*",n,{})):Object.create(null),function(e,t){for(var n in e)e.hasOwnProperty(n)&&t.call(e,n,Object.getOwnPropertyDescriptor(e,n))}(e,function(e,t){var n;if(n=t.get||t.set?{get:t.get,set:t.set}:t.value,"constructor"!==e){var r=c(e,n,i,a);r&&"object"==typeof r&&0<h.size(r)?o[e]=r:"function"==typeof r&&(s[e]=r)}else s[e]=n}),n&&V(e,"*",n),{definitions:o,methods:s,defaultDefinition:i}},f=u({});var A=p.for("can.meta");w(f,{_eventSetup:function(){},_eventTeardown:function(){},addEventListener:function(e,t,n){return I(this,e),u.addEventListener.apply(this,arguments)},removeEventListener:function(e,t){return T(this,e),u.removeEventListener.apply(this,arguments)}}),f.on=f.bind=f.addEventListener,f.off=f.unbind=f.removeEventListener;var N=p.for("can.onKeyValue"),K=p.for("can.offKeyValue");h.assignSymbols(f,{"can.onKeyValue":function(e){return I(this,e),u[N].apply(this,arguments)},"can.offKeyValue":function(e){return T(this,e),u[K].apply(this,arguments)}}),delete f.one,v.setup=function(e,t){Object.defineProperty(this,"constructor",{value:this.constructor,enumerable:!1,writable:!1}),Object.defineProperty(this,A,{value:Object.create(null),enumerable:!1,writable:!1});var n=this._define.definitions,r=Object.create(null),a=this;h.eachKey(e,function(e,t){void 0!==n[t]?a[t]=e:v.expando(a,t,e)}),0<h.size(r)&&V(this,"_instanceDefinitions",r)};var R=function(e){return e};v.expando=function(e,t,n){if(v._specialKeys[t])return!0;var r=e._define.definitions;if(!r||!r[t]){var a=e._instanceDefinitions;if(!a){if(Object.isSealed(e))return;Object.defineProperty(e,"_instanceDefinitions",{configurable:!0,enumerable:!1,writable:!0,value:{}}),a=e._instanceDefinitions}if(!a[t]){var i=e._define.defaultDefinition||{type:v.types.observable};return v.property(e,t,i,{},{}),i.type?e._data[t]=v.make.set.type(t,i.type,R).call(e,n):e._data[t]=v.types.observable(n),a[t]=i,e.__inSetup||(b.batch.start(),e.dispatch({type:"can.keys",target:e}),void 0!==e._data[t]&&e.dispatch({type:t,target:e,patches:[{type:"add",key:t,value:e._data[t]}]},[e._data[t],void 0]),b.batch.stop()),!0}}},v.replaceWith=_,v.eventsProto=f,v.defineConfigurableAndNotEnumerable=V,v.make=y,v.getDefinitionOrMethod=c,v._specialKeys={_data:!0,_computed:!0};var B={};function H(e){return h.isValueLike(e)&&h.isObservableLike(e)}v.makeSimpleGetterSetter=function(e){if(void 0===B[e]){var t=y.set.events(e,y.get.data(e),y.set.data(e),y.eventType.data(e));B[e]={get:y.get.data(e),set:function(e){return t.call(this,v.types.observable(e))},enumerable:!0,configurable:!0}}return B[e]},v.Iterator=function(e){this.obj=e,this.definitions=Object.keys(e._define.definitions),this.instanceDefinitions=e._instanceDefinitions?Object.keys(e._instanceDefinitions):Object.keys(e),this.hasGet="function"==typeof e.get},v.Iterator.prototype.next=function(){var e;if(this.definitions.length){if(e=this.definitions.shift(),this.obj._define.definitions[e].get)return this.next()}else{if(!this.instanceDefinitions.length)return{value:void 0,done:!0};e=this.instanceDefinitions.shift()}return{value:[e,this.hasGet?this.obj.get(e):this.obj[e]],done:!1}},v.types={date:O,number:E,boolean:k,observable:function(e){return Array.isArray(e)&&v.DefineList?e=new v.DefineList(e):h.isPlainObject(e)&&v.DefineMap&&(e=new v.DefineMap(e)),e},stringOrObservable:function(e){return Array.isArray(e)?new v.DefaultList(e):h.isPlainObject(e)?new v.DefaultMap(e):h.convert(e,v.types.string)},htmlbool:function(e){return""===e||!!x(e)},"*":function(e){return e},any:function(e){return e},string:L,compute:{set:function(e,t,n,r){return H(e)?e:H(r)?(h.setValue(r,e),r):e},get:function(e){return H(e)?h.getValue(e):e}}},v.updateSchemaKeys=function(e,t){for(var n in t){var r=t[n];!1!==r.serialize&&(r.Type?e.keys[n]=r.Type:r.type?e.keys[n]=r.type:e.keys[n]=function(e){return e},!0===t[n].identity&&e.identity.push(n))}return e}}),define("can-string",function(e,t,n){"use strict";var r=/\=\=/,a=/([A-Z]+)([A-Z][a-z])/g,i=/([a-z\d])([A-Z])/g,o=/([a-z\d])([A-Z])/g,s=/"/g,c=/'/g,u=/-+(.)?/g,l=/[a-z][A-Z]/g,f=function(e){return""+(null==e||isNaN(e)&&""+e=="NaN"?"":e)},d={esc:function(e){return f(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(s,"&#34;").replace(c,"&#39;")},capitalize:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},camelize:function(e){return f(e).replace(u,function(e,t){return t?t.toUpperCase():""})},hyphenate:function(e){return f(e).replace(l,function(e){return e.charAt(0)+"-"+e.charAt(1).toLowerCase()})},underscore:function(e){return e.replace(r,"/").replace(a,"$1_$2").replace(i,"$1_$2").replace(o,"_").toLowerCase()},undHash:/_|-/};n.exports=d}),define("can-construct",["require","exports","module","can-reflect","can-log/dev/dev","can-namespace"],function(e,t,n){"use strict";var r,v=e("can-reflect"),a=(e("can-log/dev/dev"),e("can-namespace")),y=0,g=function(){if(arguments.length)return g.extend.apply(g,arguments)};try{Object.getOwnPropertyDescriptor({}),r=!0}catch(e){r=!1}var m=function(e,t,n){Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:!1,value:n})};v.assignMap(g,{constructorExtends:!0,newInstance:function(){var e,t=this.instance();if(t.setup){if(Object.defineProperty(t,"__inSetup",{configurable:!0,enumerable:!1,value:!0,writable:!0}),(e=t.setup.apply(t,arguments))instanceof g.ReturnValue)return e.value;t.__inSetup=!1}return t.init&&t.init.apply(t,e||arguments),t},_inherit:r?function(e,t,n){var r,a,i,o;for(var s in n=n||e,e)a=e,i=s,(r=(o=Object.getOwnPropertyDescriptor(a,i))&&(o.get||o.set)?o:null)?this._defineProperty(n,t,s,r):g._overwrite(n,t,s,e[s])}:function(e,t,n){for(var r in n=n||e,e)g._overwrite(n,t,r,e[r])},_defineProperty:function(e,t,n,r){Object.defineProperty(e,n,r)},_overwrite:function(e,t,n,r){Object.defineProperty(e,n,{value:r,configurable:!0,enumerable:!0,writable:!0})},setup:function(e){var t=v.assignDeepMap({},e.defaults);this.defaults=v.assignDeepMap(t,this.defaults)},instance:function(){y=1;var e=new this;return y=0,e},extend:function(e,t,n){var r=e,a=t,i=n;"string"!=typeof r&&(i=a,a=r,r=null),i||(i=a,a=null),i=i||{};var o,s,c=this,u=this.prototype;function l(){if(!y)return this&&this.constructor===o||!arguments.length||!o.constructorExtends?o.newInstance.apply(o,arguments):o.extend.apply(o,arguments)}for(var f in s=this.instance(),g._inherit(i,u,s),r||(a&&a.shortName?r=a.shortName:this.shortName&&(r=this.shortName)),o="function"==typeof namedCtor?namedCtor(constructorName,l):function(){return l.apply(this,arguments)},c)c.hasOwnProperty(f)&&(o[f]=c[f]);if(g._inherit(a,c,o),v.assignMap(o,{constructor:o,prototype:s}),void 0!==r){if(Object.getOwnPropertyDescriptor){var d=Object.getOwnPropertyDescriptor(o,"name");d&&!d.configurable||Object.defineProperty(o,"name",{writable:!0,value:r,configurable:!0})}o.shortName=r}m(o.prototype,"constructor",o);var p=[c].concat(Array.prototype.slice.call(arguments)),h=o.setup.apply(o,p);return o.init&&o.init.apply(o,h||p),o},ReturnValue:function(e){this.value=e}}),m(g.prototype,"setup",function(){}),m(g.prototype,"init",function(){}),n.exports=a.Construct=g}),define("can-define/ensure-meta",["require","exports","module","can-symbol","can-reflect"],function(e,t,n){"use strict";var r=e("can-symbol"),a=e("can-reflect");n.exports=function(e){var t=r.for("can.meta"),n=e[t];return n||(n={},a.setKeyValue(e,t,n)),n}}),define("can-define/define-helpers/define-helpers",["require","exports","module","can-define","can-reflect","can-queues","can-log/dev/dev","can-define/ensure-meta"],function(e,t,n){"use strict";var r=e("can-define"),s=e("can-reflect"),a=e("can-queues"),c=e("can-log/dev/dev"),u=e("can-define/ensure-meta"),i={defineExpando:r.expando,reflectSerialize:function(r){var a=this._define.definitions,i=this._define.defaultDefinition;return this.forEach(function(e,t){var n=a[t];void 0!==(e=n&&"function"==typeof n.serialize?n.serialize.call(this,e,t):i&&"function"==typeof i.serialize?i.serialize.call(this,e,t):s.serialize(e))&&(r[t]=e)},this),r},reflectUnwrap:function(n){return this.forEach(function(e,t){void 0!==e&&(n[t]=s.unwrap(e))}),n},log:function(r){var a=this,i=function(e){return"string"==typeof e?JSON.stringify(e):e},e=u(a),o=e.allowedLogKeysSet||new Set;e.allowedLogKeysSet=o,r&&o.add(r),e._log=function(e,t){var n=e.type;"can.onPatches"===n||r&&!o.has(n)||"can.keys"===n||r&&!o.has(n)||("add"===n||"remove"===n?c.log(s.getName(a),"\n how   ",i(n),"\n what  ",i(t[0]),"\n index ",i(t[1])):c.log(s.getName(a),"\n key ",i(n),"\n is  ",i(t[0]),"\n was ",i(t[1])))}},deleteKey:function(e){var t=this._instanceDefinitions;if(t&&Object.prototype.hasOwnProperty.call(t,e)&&!Object.isSealed(this)){delete t[e],a.batch.start(),this.dispatch({type:"can.keys",target:this});var n=this._data[e];void 0!==n&&(delete this._data[e],this.dispatch({type:e,target:this,patches:[{type:"delete",key:e}]},[void 0,n])),a.batch.stop()}else this.set(e,void 0);return this}};n.exports=i}),define("can-define/map/map",["require","exports","module","can-construct","can-define","can-define/define-helpers/define-helpers","can-observation-recorder","can-namespace","can-log","can-log/dev/dev","can-reflect","can-symbol","can-queues","can-event-queue/type/type"],function(e,t,n){"use strict";var r=e("can-construct"),i=e("can-define"),a=e("can-define/define-helpers/define-helpers"),o=e("can-observation-recorder"),s=e("can-namespace"),c=e("can-log"),u=(e("can-log/dev/dev"),e("can-reflect")),l=e("can-symbol"),f=e("can-queues"),d=e("can-event-queue/type/type"),p=function(e){var t=[];for(var n in e){var r=e[n];"object"==typeof r&&("serialize"in r?!r.serialize:r.get)||t.push(n)}return t};function h(e){f.batch.start(),u.assignDeepMap(this,e||{}),f.batch.stop()}function v(e){f.batch.start(),u.updateDeepMap(this,e||{}),f.batch.stop()}function y(e,t){a.defineExpando(this,e,t)||(this[e]=t)}function g(e){var t=this[e];return void 0!==t||e in this||Object.isSealed(this)?t:(o.add(this,e),this[e])}var m=l.for("can.getSchema");function b(){var e=this.prototype._define,t=e?e.definitions:{};return i.updateSchemaKeys({type:"map",identity:[],keys:{}},t)}var w,x,_,k=function(e){i.setup.call(this,e||{},this.constructor.seal)},O=r.extend("DefineMap",{setup:function(e){var t,n=this.prototype;if(O){var r=i(n,n,e.prototype._define);for(t in i.makeDefineInstanceKey(this,r),d(this),O.prototype)i.defineConfigurableAndNotEnumerable(n,t,n[t]);n.setup===O.prototype.setup&&i.defineConfigurableAndNotEnumerable(n,"setup",k);var a=Object.getOwnPropertyDescriptor(n,"_computed").get;Object.defineProperty(n,"_computed",{configurable:!0,enumerable:!1,get:function(){if(this!==n)return a.call(this,arguments)}})}else for(t in n)i.defineConfigurableAndNotEnumerable(n,t,n[t]);i.defineConfigurableAndNotEnumerable(n,"constructor",this),this[m]=b}},{setup:function(e,t){this._define||(Object.defineProperty(this,"_define",{enumerable:!1,value:{definitions:{}}}),Object.defineProperty(this,"_data",{enumerable:!1,value:{}})),i.setup.call(this,e||{},!0===t)},get:function(e){return e?g.call(this,e):u.unwrap(this,Map)},set:function(e,t){return"object"==typeof e?!0===t?v.call(this,e):h.call(this,e):y.call(this,e,t),this},assignDeep:function(e){return h.call(this,e),this},updateDeep:function(e){return v.call(this,e),this},assign:function(e){return function(e){f.batch.start(),u.assignMap(this,e||{}),f.batch.stop()}.call(this,e),this},update:function(e){return function(e){f.batch.start(),u.updateMap(this,e||{}),f.batch.stop()}.call(this,e),this},serialize:function(){return u.serialize(this,Map)},deleteKey:a.deleteKey,forEach:(w=function(e,t,n){return u.eachKey(e,t,n)},x=o.ignore(w),function(e,t,n){return!1===n?x(this,e,t):w(this,e,t)}),"*":{type:i.types.observable}}),E={"can.isMapLike":!0,"can.isListLike":!1,"can.isValueLike":!1,"can.getKeyValue":g,"can.setKeyValue":y,"can.deleteKeyValue":a.deleteKey,"can.getOwnKeys":function(){var e=u.getOwnEnumerableKeys(this);if(this._computed)for(var t,n=u.getOwnKeys(this._computed),r=0;r<n.length;r++)t=n[r],e.indexOf(t)<0&&e.push(t);return e},"can.getOwnEnumerableKeys":function(){return o.add(this,"can.keys"),o.add(Object.getPrototypeOf(this),"can.keys"),p(this._define.definitions).concat(p(this._instanceDefinitions))},"can.hasOwnKey":function(e){return Object.hasOwnProperty.call(this._define.definitions,e)||void 0!==this._instanceDefinitions&&Object.hasOwnProperty.call(this._instanceDefinitions,e)},"can.hasKey":function(e){return e in this._define.definitions||void 0!==this._instanceDefinitions&&e in this._instanceDefinitions},"can.assignDeep":h,"can.updateDeep":v,"can.unwrap":a.reflectUnwrap,"can.serialize":a.reflectSerialize,"can.keyHasDependencies":function(e){return!!(this._computed&&this._computed[e]&&this._computed[e].compute)},"can.getKeyDependencies":function(e){var t;return this._computed&&this._computed[e]&&this._computed[e].compute&&((t={}).valueDependencies=new Set,t.valueDependencies.add(this._computed[e].compute)),t}};for(var L in u.assignSymbols(O.prototype,E),u.setKeyValue(O.prototype,l.iterator,function(){return new i.Iterator(this)}),i.eventsProto)O[L]=i.eventsProto[L],Object.defineProperty(O.prototype,L,{enumerable:!1,value:i.eventsProto[L],writable:!0});("getOwnPropertySymbols"in Object?Object.getOwnPropertySymbols(i.eventsProto):(_=i.eventsProto,Object.getOwnPropertyNames(_).filter(function(e){return 0===e.indexOf("@@symbol")}))).forEach(function(e){Object.defineProperty(O.prototype,e,{configurable:!0,enumerable:!1,value:i.eventsProto[e],writable:!0})}),i.DefineMap=O,Object.defineProperty(O.prototype,"toObject",{enumerable:!1,writable:!0,value:function(){return c.warn("Use DefineMap::get instead of DefineMap::toObject"),this.get()}}),n.exports=s.DefineMap=O}),define("can-cid",["require","exports","module","can-namespace"],function(e,t,n){"use strict";var r=e("can-namespace"),a=0,i="can"+new Date,o=function(e,t){var n=e.nodeName?i:"_cid";return e[n]||(a++,e[n]=(t||"")+a),e[n]};if(o.domExpando=i,o.get=function(e){var t=typeof e;return null!==t&&("object"===t||"function"===t)?o(e):t+":"+e},r.cid)throw new Error("You can't have two versions of can-cid, check your dependencies");n.exports=r.cid=o}),define("can-single-reference",["require","exports","module","can-cid"],function(s,e,t){!function(e,t,n,r){"use strict";var a,i=s("can-cid");function o(e,t){return(t?i(e)+":"+t:i(e))||e}a={set:function(e,t,n,r){e[o(t,r)]=n},getAndDelete:function(e,t,n){var r=o(t,n),a=e[r];return delete e[r],a}},r.exports=a}(0,0,0,t)}),define("can-define/list/list",["require","exports","module","can-construct","can-define","can-queues","can-event-queue/type/type","can-observation-recorder","can-log","can-log/dev/dev","can-define/define-helpers/define-helpers","can-assign","can-diff/list/list","can-namespace","can-reflect","can-symbol","can-single-reference"],function(e,t,n){"use strict";var r=e("can-construct"),a=e("can-define"),i=a.make,l=e("can-queues"),o=e("can-event-queue/type/type"),s=e("can-observation-recorder"),c=e("can-log"),u=(e("can-log/dev/dev"),e("can-define/define-helpers/define-helpers")),f=e("can-assign"),d=e("can-diff/list/list"),p=e("can-namespace"),h=e("can-reflect"),v=e("can-symbol"),y=e("can-single-reference"),g=[].splice,m=!1,b=function(e){return e},w="can.patches",x=a.eventsProto[v.for("can.onKeyValue")],_=a.eventsProto[v.for("can.offKeyValue")],k=v.for("can.getSchema");function O(){var e=this.prototype._define.definitions,t={type:"list",keys:{}};return(t=a.updateSchemaKeys(t,e)).keys["#"]&&(t.values=e["#"].Type,delete t.keys["#"]),t}var E=r.extend("DefineList",{setup:function(e){if(E){o(this);var t=this.prototype,n=a(t,t,e.prototype._define);a.makeDefineInstanceKey(this,n);var r=n.definitions["#"]||n.defaultDefinition;r&&(r.Type?this.prototype.__type=i.set.Type("*",r.Type,b):r.type&&(this.prototype.__type=i.set.type("*",r.type,b))),this[k]=O}}},{setup:function(e){this._define||(Object.defineProperty(this,"_define",{enumerable:!1,value:{definitions:{length:{type:"number"},_length:{type:"number"}}}}),Object.defineProperty(this,"_data",{enumerable:!1,value:{}})),a.setup.call(this,{},!1),Object.defineProperty(this,"_length",{enumerable:!1,configurable:!0,writable:!0,value:0}),e&&this.splice.apply(this,[0,0].concat(h.toArray(e)))},__type:a.types.observable,_triggerChange:function(e,t,n,r){var a=+e;if(isNaN(a))this.dispatch({type:""+e,target:this},[n,r]);else{var i,o=this._define.definitions["#"];"add"===t?(o&&"function"==typeof o.added&&s.ignore(o.added).call(this,n,a),i={type:t,patches:[{type:"splice",insert:n,index:a,deleteCount:0}]},this.dispatch(i,[n,a])):"remove"===t?(o&&"function"==typeof o.removed&&s.ignore(o.removed).call(this,r,a),i={type:t,patches:[{type:"splice",index:a,deleteCount:r.length}]},this.dispatch(i,[r,a])):this.dispatch(t,[n,a])}},get:function(e){return arguments.length?(isNaN(e)?s.add(this,e):s.add(this,"length"),this[e]):h.unwrap(this,Map)},set:function(e,t){if("object"!=typeof e)if("number"==typeof(e=isNaN(+e)||e%1?e:+e)){if("number"==typeof e&&e>this._length-1){var n=new Array(e+1-this._length);return n[n.length-1]=t,this.push.apply(this,n),n}this.splice(e,1,t)}else{u.defineExpando(this,e,t)||(this[e]=t)}else h.isListLike(e)?t?this.replace(e):h.assignList(this,e):h.assignMap(this,e);return this},assign:function(e){return h.isListLike(e)?h.assignList(this,e):h.assignMap(this,e),this},update:function(e){return h.isListLike(e)?h.updateList(this,e):h.updateMap(this,e),this},assignDeep:function(e){return h.isListLike(e)?h.assignDeepList(this,e):h.assignDeepMap(this,e),this},updateDeep:function(e){return h.isListLike(e)?h.updateDeepList(this,e):h.updateDeepMap(this,e),this},_items:function(){var t=[];return this._each(function(e){t.push(e)}),t},_each:function(e){for(var t=0,n=this._length;t<n;t++)e(this[t],t)},splice:function(e,t){var n,r,a,i=h.toArray(arguments),o=[],s=2<i.length,c=this._length;for(e=e||0,n=0,r=i.length-2;n<r;n++)i[a=n+2]=this.__type(i[a],a),o.push(i[a]),this[n+e]!==i[a]&&(s=!1);if(s&&this._length<=o.length)return o;void 0===t&&(t=i[1]=this._length-e),m=!0;var u=g.apply(this,i);return m=!1,l.batch.start(),0<t&&this._triggerChange(""+e,"remove",void 0,u),2<i.length&&this._triggerChange(""+e,"add",o,u),this.dispatch("length",[this._length,c]),l.batch.stop(),u},serialize:function(){return h.serialize(this,Map)}});for(var L in a.eventsProto)Object.defineProperty(E.prototype,L,{enumerable:!1,value:a.eventsProto[L],writable:!0});("getOwnPropertySymbols"in Object?Object.getOwnPropertySymbols(a.eventsProto):[v.for("can.onKeyValue"),v.for("can.offKeyValue")]).forEach(function(e){Object.defineProperty(E.prototype,e,{configurable:!0,enumerable:!1,value:a.eventsProto[e],writable:!0})});for(var L in h.eachKey({push:"length",unshift:0},function(i,e){var o=[][e];E.prototype[e]=function(){for(var e,t,n=[],r=i?this._length:0,a=arguments.length;a--;)t=arguments[a],n[a]=this.__type(t,a);return m=!0,e=o.apply(this,n),m=!1,this.comparator&&!n.length||(l.batch.start(),this._triggerChange(""+r,"add",n,void 0),this.dispatch("length",[this._length,r]),l.batch.stop()),e}}),h.eachKey({pop:"length",shift:0},function(i,e){var o=[][e];E.prototype[e]=function(){if(this._length){var e,t,n=(t=arguments)[0]&&Array.isArray(t[0])?t[0]:h.toArray(t),r=i&&this._length?this._length-1:0,a=this._length?this._length:0;return m=!0,e=o.apply(this,n),m=!1,l.batch.start(),this._triggerChange(""+r,"remove",void 0,[e]),this.dispatch("length",[this._length,a]),l.batch.stop(),e}}}),h.eachKey({map:3,filter:3,reduce:4,reduceRight:4,every:3,some:3},function(o,s){E.prototype[s]=function(){var n,t=this,e=[].slice.call(arguments,0),r=e[0],a=e[o-1]||t;"object"==typeof r&&(n=r,r=function(e){for(var t in n)if(e[t]!==n[t])return!1;return!0}),e[0]=function(){var e=[].slice.call(arguments,0);return e[o-3]=t.get(e[o-2]),r.apply(a,e)};var i=Array.prototype[s].apply(this,e);return"map"===s?new E(i):"filter"===s?new t.constructor(i):i}}),f(E.prototype,{indexOf:function(e,t){for(var n=t||0,r=this.length;n<r;n++)if(this.get(n)===e)return n;return-1},lastIndexOf:function(e,t){for(var n=t=void 0===t?this.length-1:t;0<=n;n--)if(this.get(n)===e)return n;return-1},join:function(){return s.add(this,"length"),[].join.apply(this,arguments)},reverse:function(){var e=[].reverse.call(this._items());return this.replace(e)},slice:function(){s.add(this,"length");var e=Array.prototype.slice.apply(this,arguments);return new this.constructor(e)},concat:function(){var t=[];return h.eachIndex(arguments,function(e){h.isListLike(e)?(Array.isArray(e)?e:h.toArray(e)).forEach(function(e){t.push(this.__type(e))},this):t.push(this.__type(e))},this),new this.constructor(Array.prototype.concat.apply(h.toArray(this),t))},forEach:function(e,t){for(var n,r=0,a=this.length;r<a&&(n=this.get(r),!1!==e.call(t||n,n,r,this));r++);return this},replace:function(e){var t=d(this,e);l.batch.start();for(var n=0,r=t.length;n<r;n++)this.splice.apply(this,[t[n].index,t[n].deleteCount].concat(t[n].insert));return l.batch.stop(),this},sort:function(e){var t=Array.prototype.slice.call(this);return Array.prototype.sort.call(t,e),this.splice.apply(this,[0,t.length].concat(t)),this}}),a.eventsProto)E[L]=a.eventsProto[L],Object.defineProperty(E.prototype,L,{enumerable:!1,value:a.eventsProto[L],writable:!0});Object.defineProperty(E.prototype,"length",{get:function(){return this.__inSetup||s.add(this,"length"),this._length},set:function(e){if(m)this._length=e;else if(null!=e&&!isNaN(+e)&&e!==this._length)if(e>this._length-1){var t=new Array(e-this._length);this.push.apply(this,t)}else this.splice(e)},enumerable:!0}),E.prototype.attr=function(e,t){return c.warn("DefineMap::attr shouldn't be called"),0===arguments.length?this.get():e&&"object"==typeof e?this.set.apply(this,arguments):1===arguments.length?this.get(e):this.set(e,t)},E.prototype.item=function(e,t){return 1===arguments.length?this.get(e):this.set(e,t)};var q={"can.isMoreListLikeThanMapLike":!0,"can.isMapLike":!0,"can.isListLike":!0,"can.isValueLike":!(E.prototype.items=function(){return c.warn("DefineList::get should should be used instead of DefineList::items"),this.get()}),"can.getKeyValue":E.prototype.get,"can.setKeyValue":E.prototype.set,"can.onKeyValue":function(e,t,n){var r;return isNaN(e)?x.apply(this,arguments):(r=function(){t(this[e])},y.set(t,this,r,e),x.call(this,"length",r,n))},"can.offKeyValue":function(e,t,n){var r;return isNaN(e)?_.apply(this,arguments):(r=y.getAndDelete(t,this,e),_.call(this,"length",r,n))},"can.deleteKeyValue":function(e){if("number"==typeof(e=isNaN(+e)||e%1?e:+e))this.splice(e,1);else{if("length"===e||"_length"===e)return;this.set(e,void 0)}return this},"can.assignDeep":function(e){l.batch.start(),h.assignList(this,e),l.batch.stop()},"can.updateDeep":function(e){l.batch.start(),this.replace(e),l.batch.stop()},"can.keyHasDependencies":function(e){return!!(this._computed&&this._computed[e]&&this._computed[e].compute)},"can.getKeyDependencies":function(e){var t;return this._computed&&this._computed[e]&&this._computed[e].compute&&((t={}).valueDependencies=new Set,t.valueDependencies.add(this._computed[e].compute)),t},"can.splice":function(e,t,n){this.splice.apply(this,[e,t].concat(n))},"can.onPatches":function(e,t){this[v.for("can.onKeyValue")](w,e,t)},"can.offPatches":function(e,t){this[v.for("can.offKeyValue")](w,e,t)}};h.assignSymbols(E.prototype,q),h.setKeyValue(E.prototype,v.iterator,function(){var e=-1;return"number"!=typeof this.length&&(this.length=0),{next:function(){return{value:this[++e],done:e>=this.length}}.bind(this)}}),a.DefineList=E,n.exports=p.DefineList=E}),define("can/es/can-define",["exports","can-define","can-define/map/map","can-define/list/list"],function(e,t,n,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"define",{enumerable:!0,get:function(){return a(t).default}}),Object.defineProperty(e,"DefineMap",{enumerable:!0,get:function(){return a(n).default}}),Object.defineProperty(e,"DefineList",{enumerable:!0,get:function(){return a(r).default}})}),define("can-key/utils",function(e,t,n){"use strict";var r={isContainer:function(e){var t=typeof e;return e&&("object"===t||"function"===t)},strReplacer:/\{([^\}]+)\}/g,parts:function(e){return Array.isArray(e)?e:void 0!==e?(e+"").replace(/\[/g,".").replace(/]/g,"").split("."):[]}};n.exports=r}),define("can-key/delete/delete",["require","exports","module","can-reflect","can-key/utils"],function(e,t,n){"use strict";var i=e("can-reflect"),o=e("can-key/utils");n.exports=function(e,t){for(var n=o.parts(t),r=e,a=0;a<n.length-1;a++)r&&(r=i.getKeyValue(r,n[a]));r&&i.deleteKeyValue(r,n[n.length-1])}}),define("can-key/get/get",["require","exports","module","can-reflect","can-key/utils"],function(e,t,n){"use strict";var s=e("can-reflect"),c=e("can-key/utils");n.exports=function(e,t){var n,r,a,i=c.parts(t),o=i.length;if(!o)return e;for(n=e,r=0;r<o&&c.isContainer(n)&&null!==n;r++)a=n,n=s.getKeyValue(a,i[r]);return n}}),define("can-key/replace-with/replace-with",["require","exports","module","can-key/utils","can-key/get/get","can-key/delete/delete"],function(e,t,n){"use strict";var o=e("can-key/utils"),s=e("can-key/get/get"),c=e("can-key/delete/delete");n.exports=function(e,r,a,i){return e.replace(o.strReplacer,function(e,t){var n=s(r,t);return i&&c(r,t),a?a(t,n):n})}}),define("can-key/set/set",["require","exports","module","can-reflect","can-symbol","can-key/utils"],function(e,t,n){"use strict";var s=e("can-reflect"),r=e("can-symbol"),c=e("can-key/utils");r.for("can.setValue");n.exports=function(e,t,n){for(var r=c.parts(t),a=e,i=r.length,o=0;o<i-1&&c.isContainer(a);o++)a=s.getKeyValue(a,r[o]);if(!a)throw new TypeError("Cannot set value at key path '"+t+"'");return s.setKeyValue(a,r[o],n),e}}),define("can-key/walk/walk",["require","exports","module","can-reflect","can-key/utils"],function(e,t,n){"use strict";var l=e("can-reflect"),f=e("can-key/utils");n.exports=function(e,t,n){var r,a,i,o,s=f.parts(t),c=s.length;if(c)for(r=e,a=0;a<c;a++){var u=n({parent:i=r,key:o=s[a],value:r=f.isContainer(i)&&l.getKeyValue(i,o)},a);void 0!==u&&(r=u)}}}),define("can-key/transform/transform",["require","exports","module","can-key/walk/walk","can-key/utils","can-reflect"],function(e,t,n){"use strict";var s=e("can-key/walk/walk"),c=e("can-key/utils"),u=e("can-reflect");n.exports=function(e,t){var o=u.serialize(e);return u.eachKey(t,function(e,t){var n=c.parts(t),r=c.parts(e),a=[];s(o,n,function(e){a.push(e)});var i=a[a.length-1].value;void 0!==i&&(s(o,r,function(e,t){if(t<r.length-1&&!e.value)return e.parent[e.key]={};t===r.length-1&&(e.parent[e.key]=i)}),function(e){for(var t=e.length-1;0<=t;t--){var n=e[t];if(delete n.parent[n.key],0!==u.size(n.parent))return}}(a))}),o}}),define("can-key",["require","exports","module","can-key/delete/delete","can-key/get/get","can-key/replace-with/replace-with","can-key/set/set","can-key/transform/transform","can-key/walk/walk","can-namespace"],function(e,t,n){"use strict";var r=e("can-key/delete/delete"),a=e("can-key/get/get"),i=e("can-key/replace-with/replace-with"),o=e("can-key/set/set"),s=e("can-key/transform/transform"),c=e("can-key/walk/walk"),u=e("can-namespace");n.exports=u.key={deleteKey:r,get:a,replaceWith:i,set:o,transform:s,walk:c}}),define("can-simple-observable/key/key",["require","exports","module","can-key","can-key/utils","can-reflect","can-observation"],function(e,t,n){var s=e("can-key"),c=e("can-key/utils"),u=e("can-reflect"),l=e("can-observation");n.exports=function(t,e){var r=c.parts(e),a=r.length-1,n=new l(function(){var n;return s.walk(t,r,function(e,t){t===a&&(n=e.value)}),n}),i=function(e){s.set(t,r,e)};Object.defineProperty(n,"value",{get:n.get,set:i});var o={"can.setValue":i};return u.assignSymbols(n,o)}}),define("can-value",["require","exports","module","can-key","can-reflect","can-simple-observable/key/key","can-namespace","can-observation","can-simple-observable","can-simple-observable/settable/settable"],function(e,t,n){"use strict";var r=e("can-key"),a=e("can-reflect"),i=e("can-simple-observable/key/key"),o=e("can-namespace"),s=e("can-observation"),c=e("can-simple-observable"),u=e("can-simple-observable/settable/settable");n.exports=o.value={bind:function(e,t){return i(e,t)},from:function(e,t){return new s(function(){return r.get(e,t)})},returnedBy:function(e,t,n){return 1===e.length?new u(e,t,n):new s(e,t)},to:function(e,t){var n=i(e,t);return a.assignSymbols(n,{"can.getValue":null})},with:function(e){return new c(e)}}}),define("can/es/can-value",["exports","can-value"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-observation",["exports","can-observation"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-observation-recorder",["exports","can-observation-recorder"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-simple-map",["require","exports","module","can-construct","can-event-queue/map/map","can-queues","can-observation-recorder","can-reflect","can-log/dev/dev","can-symbol"],function(e,t,n){"use strict";var r=e("can-construct"),a=e("can-event-queue/map/map"),s=e("can-queues"),c=e("can-observation-recorder"),u=e("can-reflect"),i=(e("can-log/dev/dev"),e("can-symbol"),r.extend("SimpleMap",{setup:function(e){this._data={},e&&"object"==typeof e&&this.attr(e)},attr:function(e,t){var n=this;if(0===arguments.length){c.add(this,"can.keys");var r={};return u.eachKey(this._data,function(e,t){c.add(this,t),r[t]=e},this),r}if(1<arguments.length){var a=this._data.hasOwnProperty(e),i=this._data[e];if(i!==(this._data[e]=t)){var o={keyChanged:a?void 0:e,type:e};this.dispatch(o,[t,i])}}else{if("object"!=typeof e)return"constructor"!==e?(c.add(this,e),this._data[e]):this.constructor;s.batch.start(),u.eachKey(e,function(e,t){n.attr(t,e)}),s.batch.stop()}},serialize:function(){return u.serialize(this,Map)},get:function(){return this.attr.apply(this,arguments)},set:function(){return this.attr.apply(this,arguments)},log:function(e){}}));a(i.prototype);var o={"can.isMapLike":!0,"can.isListLike":!1,"can.isValueLike":!1,"can.getKeyValue":i.prototype.get,"can.setKeyValue":i.prototype.set,"can.deleteKeyValue":function(e){var t;if(this._data.hasOwnProperty(e)){var n=this._data[e];delete this._data[e],t={keyChanged:e,type:e},this.dispatch(t,[void 0,n])}},"can.getOwnEnumerableKeys":function(){return c.add(this,"can.keys"),Object.keys(this._data)},"can.assignDeep":function(e){s.batch.start(),u.assignMap(this,e),s.batch.stop()},"can.updateDeep":function(e){s.batch.start(),u.updateMap(this,e),s.batch.stop()},"can.keyHasDependencies":function(e){return!1},"can.getKeyDependencies":function(e){},"can.hasOwnKey":function(e){return this._data.hasOwnProperty(e)}};u.assignSymbols(i.prototype,o),n.exports=i}),define("can/es/can-simple-map",["exports","can-simple-map"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-bind",["require","exports","module","can-reflect","can-symbol","can-namespace","can-queues","can-assign"],function(e,t,n){"use strict";var c=e("can-reflect"),r=e("can-symbol"),a=e("can-namespace"),i=e("can-queues"),o=e("can-assign"),u=(r.for("can.getChangesDependencyRecord"),r.for("can.getValue")),s=r.for("can.onValue"),l=r.for("can.onEmit"),f=r.for("can.offEmit"),d=r.for("can.setValue");function p(e,t){c.setValue(t,e)}function h(e,t,n){return e[l](t,n)}function v(e,t,n){return e[f](t,n)}function y(e,t,n,r){var a;e[s]?a=c.offValue:e[l]&&(a=v),a&&a(e,n,r)}function g(e,t,n,r){var a;e[s]?a=c.onValue:e[l]&&(a=h),a&&a(e,n,r)}function m(e,t){this.value=0,this._binding=e,this._type=t}function b(t){void 0===(this._options=t).queue&&(t.queue="domUI"),0<t.cycles==!1&&(t.cycles=0),t.onInitDoNotUpdateChild="boolean"==typeof t.onInitDoNotUpdateChild&&t.onInitDoNotUpdateChild,t.onInitDoNotUpdateParent="boolean"==typeof t.onInitDoNotUpdateParent&&t.onInitDoNotUpdateParent,t.onInitSetUndefinedParentIfChildIsDefined="boolean"!=typeof t.onInitSetUndefinedParentIfChildIsDefined||t.onInitSetUndefinedParentIfChildIsDefined;var n=new m(this,"child"),r=new m(this,"parent"),e=!0;"boolean"==typeof t.childToParent?e=t.childToParent:null==t.child[u]?e=!1:void 0===t.setParent&&null==t.parent[d]&&(e=!1);var a=!0;if("boolean"==typeof t.parentToChild?a=t.parentToChild:null==t.parent[u]?a=!1:void 0===t.setChild&&null==t.child[d]&&(a=!1),!1===e&&!1===a)throw new Error("Neither the child nor parent will be updated; this is a no-way binding");this._childToParent=e,this._parentToChild=a,void 0===t.setChild&&(t.setChild=p),void 0===t.setParent&&(t.setParent=p),void 0!==t.priority&&(c.setPriority(t.child,t.priority),c.setPriority(t.parent,t.priority));var i=2*t.cycles,o=i+("childSticksToParent"===t.sticky?1:0),s=i+("parentSticksToChild"===t.sticky?1:0);this._bindingState={child:!1,parent:!1},this._updateChild=function(e){w.call(this,{bindingState:this._bindingState,newValue:e,debugObservableName:"child",debugPartnerName:"parent",observable:t.child,setValue:t.setChild,semaphore:n,allowedUpdates:o,sticky:"parentSticksToChild"===t.sticky,partner:t.parent,setPartner:t.setParent,partnerSemaphore:r})}.bind(this),this._updateParent=function(e){w.call(this,{bindingState:this._bindingState,newValue:e,debugObservableName:"parent",debugPartnerName:"child",observable:t.parent,setValue:t.setParent,semaphore:r,allowedUpdates:s,sticky:"childSticksToParent"===t.sticky,partner:t.child,setPartner:t.setChild,partnerSemaphore:n})}.bind(this)}function w(e){var t=e.bindingState;if(!1!==t.child||!1!==t.parent){var n=e.semaphore;if(n.value+e.partnerSemaphore.value<=e.allowedUpdates&&(i.batch.start(),n.increment(e),e.setValue(e.newValue,e.observable),i.mutateQueue.enqueue(n.decrement,n,[]),i.batch.stop(),e.sticky)){var r=c.getValue(e.observable);r!==c.getValue(e.partner)&&e.setPartner(r,e.partner)}}}o(m.prototype,{decrement:function(){this.value-=1},increment:function(e){this._incremented=!0,this.value+=1}}),Object.defineProperty(b.prototype,"parentValue",{get:function(){return c.getValue(this._options.parent)}}),o(b.prototype,{start:function(){var e,t,n=this._options;this.startParent(),this.startChild(),!0===this._childToParent&&!0===this._parentToChild?void 0===(t=c.getValue(n.parent))?void 0===(e=c.getValue(n.child))?!1===n.onInitDoNotUpdateChild&&this._updateChild(t):!1===n.onInitDoNotUpdateParent&&!0===n.onInitSetUndefinedParentIfChildIsDefined&&this._updateParent(e):!1===n.onInitDoNotUpdateChild&&this._updateChild(t):!0===this._childToParent?!1===n.onInitDoNotUpdateParent&&(e=c.getValue(n.child),this._updateParent(e)):!0===this._parentToChild&&!1===n.onInitDoNotUpdateChild&&(t=c.getValue(n.parent),this._updateChild(t))},startChild:function(){if(!1===this._bindingState.child&&!0===this._childToParent){var e=this._options;this._bindingState.child=!0,g(e.child,e.parent,this._updateParent,e.queue)}},startParent:function(){if(!1===this._bindingState.parent&&!0===this._parentToChild){var e=this._options;this._bindingState.parent=!0,g(e.parent,e.child,this._updateChild,e.queue)}},stop:function(){var e=this._bindingState,t=this._options;!0===e.parent&&!0===this._parentToChild&&(e.parent=!1,y(t.parent,t.child,this._updateChild,t.queue)),!0===e.child&&!0===this._childToParent&&(e.child=!1,y(t.child,t.parent,this._updateParent,t.queue))}}),n.exports=a.Bind=b}),define("can/es/can-bind",["exports","can-bind"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-event-queue",["exports","can-event-queue/map/map","can-event-queue/value/value"],function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"mapEventBindings",{enumerable:!0,get:function(){return r(t).default}}),Object.defineProperty(e,"valueEventBindings",{enumerable:!0,get:function(){return r(n).default}})}),define("can/es/can-simple-observable",["exports","can-simple-observable"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-reflect-promise",["require","exports","module","can-reflect","can-symbol","can-observation-recorder","can-queues","can-key-tree","can-log/dev/dev"],function(e,t,n){"use strict";var a=e("can-reflect"),r=e("can-symbol"),i=e("can-observation-recorder"),o=e("can-queues"),s=e("can-key-tree"),c=(e("can-log/dev/dev"),r.for("can.getKeyValue")),u=r.for("can.meta"),l={isPending:!0,state:"pending",isResolved:!1,isRejected:!1,value:void 0,reason:void 0};function f(e,t,n){var r=e[u],a=r[t];r[t]=n,o.enqueueByQueue(r.handlers.getNode([t]),e,[n,a],function(){return{}},["Promise",e,"resolved with value",n,"and changed virtual property: "+t])}function d(t){var e=t[u];e||(Object.defineProperty(t,u,{enumerable:!1,configurable:!1,writable:!1,value:Object.create(l)}),(e=t[u]).handlers=new s([Object,Object,Array])),t.then(function(e){o.batch.start(),f(t,"isPending",!1),f(t,"isResolved",!0),f(t,"value",e),f(t,"state","resolved"),o.batch.stop()},function(e){o.batch.start(),f(t,"isPending",!1),f(t,"isRejected",!0),f(t,"reason",e),f(t,"state","rejected"),o.batch.stop()})}n.exports=function t(e){var n,r="getPrototypeOf"in Object?Object.getPrototypeOf(e):e.__proto__;e[c]&&e[u]||(null!==r&&r!==Object.prototype||"function"==typeof(r=e).promise&&(n=r.promise,r.promise=function(){var e=n.call(r);return t(e),e}),a.assignSymbols(r,{"can.getKeyValue":function(e){switch(this[u]||d(this),i.add(this,e),e){case"state":case"isPending":case"isResolved":case"isRejected":case"value":case"reason":return this[u][e];default:return this[e]}},"can.getValue":function(){return this[c]("value")},"can.isValueLike":!1,"can.onKeyValue":function(e,t,n){this[u]||d(this),this[u].handlers.add([e,n||"mutate",t])},"can.offKeyValue":function(e,t,n){this[u]||d(this),this[u].handlers.delete([e,n||"mutate",t])},"can.hasOwnKey":function(e){return this[u]||d(this),e in this[u]}}))}}),define("can-stache-key",["require","exports","module","can-observation-recorder","can-log/dev/dev","can-symbol","can-reflect","can-reflect-promise"],function(e,t,n){"use strict";var p,h=e("can-observation-recorder"),o=e("can-log/dev/dev"),r=e("can-symbol"),s=e("can-reflect"),a=e("can-reflect-promise"),c=r.for("can.getValue"),i=r.for("can.setValue"),u=r.for("can.isValueLike"),l=h.ignore(s.getKeyValue.bind(s)),f=Function.prototype.bind,v=function(e,t,n,r,a,i){for(var o=0,s=p.valueReaders.length;o<s;o++)p.valueReaders[o].test(e,t,n,r)&&(e=p.valueReaders[o].read(e,t,n,r,a,i));return e},y=function(e,t,n,r,a){e.foundObservable&&!t.foundObservable&&h.trapsCount()&&(h.addMany(n()),e.foundObservable(r,a),t.foundObservable=!0)},g=function(e,t,n){return!!(t&&t.length&&s.hasKey(e,t[n].key))};(p={read:function(e,t,n){var r,a={foundObservable:!1};(n=n||{}).foundObservable&&(r=h.trap());var i,o,s=v(e,0,t,n,a),c=t.length,u=0;for(y(n,a,r,e,0);u<c;){i=s;for(var l=0,f=p.propertyReaders.length;l<f;l++){var d=p.propertyReaders[l];if(d.test(s)){s=d.read(s,t[u],u,n,a);break}}if(y(n,a,r,i,u),s=v(s,u+=1,t,n,a,i),y(n,a,r,i,u-1),typeof s,u<t.length&&null==s)return o=g(i,t,u-1),n.earlyExit&&!o&&n.earlyExit(i,u-1,s),{value:void 0,parent:i,parentHasKey:o,foundLastParent:!1}}return o=g(i,t,t.length-1),void 0!==s||o||n.earlyExit&&n.earlyExit(i,u-1),{value:s,parent:i,parentHasKey:o,foundLastParent:!0}},get:function(e,t,n){return p.read(e,p.reads(t),n||{}).value},valueReadersMap:{},valueReaders:[{name:"function",test:function(e){return e&&s.isFunctionLike(e)&&!s.isConstructorLike(e)},read:function(e,t,n,r,a,i){return r.callMethodsOnObservables&&s.isObservableLike(i)&&s.isMapLike(i)?(o.warn("can-stache-key: read() called with `callMethodsOnObservables: true`."),e.apply(i,r.args||[])):!1!==r.proxyMethods?f.call(e,i):e}},{name:"isValueLike",test:function(e,t,n,r){return e&&e[c]&&!1!==e[u]&&(r.foundAt||!((a=n[t-1])&&a.at));var a},read:function(e,t,n,r){return!1===r.readCompute&&t===n.length?e:s.getValue(e)},write:function(e,t){e[i]?e[i](t):e.set?e.set(t):e(t)}}],propertyReadersMap:{},propertyReaders:[{name:"map",test:function(e){return(s.isPromise(e)||"object"==typeof e&&e&&"function"==typeof e.then)&&a(e),s.isObservableLike(e)&&s.isMapLike(e)},read:function(e,t){var n=s.getKeyValue(e,t.key);return void 0!==n?n:e[t.key]},write:s.setKeyValue},{name:"object",test:function(){return!0},read:function(e,t,n,r){if(null!=e)return"object"!=typeof e?e[t.key]:t.key in e?e[t.key]:void 0},write:function(e,t,n){var r=e[t];null!=n&&"object"==typeof n&&s.isMapLike(r)?(o.warn('can-stache-key: Merging data into "'+t+'" because its parent is non-observable'),s.update(r,n)):null!=r&&void 0!==r[i]?s.setValue(r,n):e[t]=n}}],reads:function(e){var t=""+e,n=[],r=0,a=!1;"@"===t.charAt(0)&&(r=1,a=!0);for(var i="",o=r;o<t.length;o++){var s=t.charAt(o);"."===s||"@"===s?i="\\"!==t.charAt(o-1)?(n.push({key:i,at:a}),a="@"===s,""):i.substr(0,i.length-1)+".":i+=s}return n.push({key:i,at:a}),n},write:function(e,t,n,r){var a,i="string"==typeof t?p.reads(t):t;if(r=r||{},1<i.length?(a=i.pop(),e=p.read(e,i,r).value,i.push(a)):a=i[0],e){var o=l(e,a.key);p.valueReadersMap.isValueLike.test(o,i.length-1,i,r)?p.valueReadersMap.isValueLike.write(o,n,r):(p.valueReadersMap.isValueLike.test(e,i.length-1,i,r)&&(e=e[c]()),p.propertyReadersMap.map.test(e)?p.propertyReadersMap.map.write(e,a.key,n,r):p.propertyReadersMap.object.test(e)&&(p.propertyReadersMap.object.write(e,a.key,n,r),r.observation&&r.observation.update()))}}}).propertyReaders.forEach(function(e){p.propertyReadersMap[e.name]=e}),p.valueReaders.forEach(function(e){p.valueReadersMap[e.name]=e}),p.set=p.write,n.exports=p}),define("can-dom-mutate/-util",["require","exports","module","can-globals/document/document"],function(u,e,t){!function(e,t,n,r){"use strict";var i=u("can-globals/document/document");function o(e){return!(!e||11!==e.nodeType)}function a(e){for(var t=[],n=e.firstChild;n;)t.push(n),n=n.nextSibling;return t}function s(){return NodeFilter.FILTER_ACCEPT}var c=s;c.acceptNode=s,r.exports={eliminate:function(e,t){var n=e.indexOf(t);0<=n&&e.splice(n,1)},isInDocument:function(e){var t=i();return t===e||function e(t,n){return t.contains?t.contains(n):t.nodeType===Node.DOCUMENT_NODE&&t.documentElement?e(t.documentElement,n):(n=n.parentNode)===t}(t,e)},getDocument:i,isDocumentElement:function(e){return i().documentElement===e},isFragment:o,getParents:function(e){return o(e)?a(e):[e]},getAllNodes:function(e){return void 0!==i().createTreeWalker?function(e){for(var t,n,r=o(e)?[]:[e],a=!(!(t=e)||1!==t.nodeType)&&i().createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,c,!1);n=a&&a.nextNode();)r.push(n);return r}(e):function(e){var t,n,r=0,a=o(e)?[]:[e];if(null==e.firstChild)return a;for(;!t&&(n=e.firstChild)?(r++,a.push(n)):(n=e.nextSibling)?(t=!1,a.push(n)):(n=e.parentNode,r--,t=!0),e=n,0<r;);return a}(e)},getChildren:a,subscription:function(r){return function(){var t=r.apply(this,arguments),n=!1;return function(){if(n){var e=r.name||r.displayName||"an anonymous function";throw new Error("Disposal function returned by "+e+" called more than once.")}t.apply(this,arguments),n=!0}}},addToSet:function(e,t){for(var n=0,r=e.length;n<r;n++)t.add(e[n])}}}(0,0,0,t)}),define("can-dom-mutate",["require","exports","module","can-globals","can-globals/global/global","can-globals/mutation-observer/mutation-observer","can-namespace","can-globals/document/document","can-reflect","can-dom-mutate/-util"],function(e,t,n){!function(e,t,n,r){"use strict";var s,l,f,c=t("can-globals"),u=t("can-globals/global/global"),d=t("can-globals/mutation-observer/mutation-observer"),a=t("can-namespace"),p=t("can-globals/document/document"),h=t("can-reflect"),v=t("can-dom-mutate/-util"),y=v.eliminate,g=v.subscription,m=v.isDocumentElement,b=v.getAllNodes,i=Array.prototype.slice,o=new WeakMap;function w(e,t){var n=o.get(e);if(n)return n[t]}function x(e,t,n){var r=o.get(e);r||(r={},o.set(e,r)),r[t]=n}function _(e,t){return delete o.get(e)[t]}function k(e){for(var t=[],n=0;n<e.length;n++)t.push({target:e[n]});return t}function O(n){return function(e,t){n(e),t&&t()}}function E(e,t){var n=w(p(),t);if(n)return n.listeners}function L(e,t){var n=w(p(),t);if(n)return n.get(e)}function q(e,t){for(var n=i.call(e,0),r=n.length,a=0;a<r;a++)n[a](t)}function S(o,s){return function(e){for(var t=0;t<e.length;t++){var n=e[t],r=n.target,a=L(r,o);if(a&&q(a,n),s){var i=E(0,s);i&&q(i,n)}}}}var M=0;function P(r,t,a,i){var o=w(r,t);o||x(r,t,o={observingCount:0});var n=function(){o.observer&&(o.observer.disconnect(),o.observer=null);var e=d();if(e){var t=u().Node;if(!!(t&&r instanceof t)){var n=new e(i);n.id=M++,n.observe(r,a),o.observer=n}}};return 0===o.observingCount&&(c.onKeyValue("MutationObserver",n),n()),o.observingCount++,function(){var e=w(r,t);e&&(e.observingCount--,e.observingCount<=0&&(e.observer&&e.observer.disconnect(),_(r,t),c.offKeyValue("MutationObserver",n)))}}function C(e){if("undefined"!=typeof Set){for(var t=e.length,n=new Set,r=new Set,a=0;a<t;a++){for(var i=e[a],o=i.addedNodes.length,s=0;s<o;s++)v.addToSet(b(i.addedNodes[s]),n);for(var c=i.removedNodes.length,u=0;u<c;u++)v.addToSet(b(i.removedNodes[u]),r)}f(k(h.toArray(r))),l(k(h.toArray(n)))}}function V(e){for(var t=e.length,n=0;n<t;n++){var r=e[n];if("attributes"===r.type){var a=r.target,i=r.attributeName,o=r.oldValue;s.dispatchNodeAttributeChange(a,i,o)}}}var j={subtree:!0,childList:!0},D={attributes:!0,attributeOldValue:!0};function I(r,a,i){return g(function(e,t){return 11===e.nodeType?Function.prototype:(n=i?P(e,a,D,V):P(p(),a,j,C),function(e,t,n){var r=p(),a=w(r,t);a||x(r,t,a=new Map);var i=a.get(e);i||(i=[],a.set(e,i)),i.push(n)}(e,r,t),function(){n(),function(e,t,n){var r=p(),a=w(r,t);if(a){var i=a.get(e);i&&(y(i,n),0===i.length&&(a.delete(e),0===a.size&&_(r,t)))}}(e,r,t)});var n})}function T(i,o){return g(function(e,n){if(!m(e))throw new Error("Global mutation listeners must pass a documentElement");var r=p(),t=w(r,i);t||x(r,i,t={listeners:[]});var a=t.listeners;return 0===a.length&&(t.removeListener=o(r,function(){})),a.push(n),function(){var e=w(r,i);if(e){var t=e.listeners;y(t,n),0===t.length&&(e.removeListener(),_(r,i))}}})}var A="domMutation",N=A+"InsertionData",K=A+"RemovalData",R=A+"AttributeChangeData",B=A+"DocumentInsertionData",H=A+"DocumentRemovalData",F=A+"DocumentAttributeChangeData",z=A+"TreeData";l=O(S(N,B)),f=O(S(K,H));var U=O(S(R,F)),G=I(N,z),W=I(K,z),Y=I(R,"domMutationAttributeData",!0),$=T(B,G),Q=T(H,W),J=T(F,Y);s={dispatchNodeInsertion:function(e,t){var n=new Set;v.addToSet(b(e),n);var r=k(h.toArray(n));l(r,t)},dispatchNodeRemoval:function(e,t){var n=new Set;v.addToSet(b(e),n);var r=k(h.toArray(n));f(r,t)},dispatchNodeAttributeChange:function(e,t,n,r){U([{target:e,attributeName:t,oldValue:n}],r)},onNodeInsertion:G,onNodeRemoval:W,onNodeAttributeChange:Y,onRemoval:Q,onInsertion:$,onAttributeChange:J},r.exports=a.domMutate=s}(0,e,0,n)}),define("can-control",["require","exports","module","can-construct","can-namespace","can-assign","can-stache-key","can-reflect","can-observation","can-event-queue/map/map","can-log/dev/dev","can-string","can-key/get/get","can-dom-mutate","can-symbol"],function(e,t,n){"use strict";var r,o,a=e("can-construct"),i=e("can-namespace"),s=e("can-assign"),c=e("can-stache-key"),u=e("can-reflect"),l=e("can-observation"),d=e("can-event-queue/map/map"),f=(e("can-log/dev/dev"),e("can-string")),p=e("can-key/get/get"),h=e("can-dom-mutate"),v=e("can-symbol").for("can.controls"),y=[].slice,g=/\{([^\}]+)\}/g,m=function(e,t,n,r){return r?(c=e,u=r.trim(),l=t,f=n,d.on.call(c,l,u,f),function(){d.off.call(c,l,u,f)}):(a=e,i=t,o=n,d.on.call(a,i,o,s),function(){d.off.call(a,i,o,s)});var a,i,o,s,c,u,l,f},b=a.extend("Control",{setup:function(){if(a.setup.apply(this,arguments),b){var e,t=this;for(e in t.actions={},t.prototype)t._isAction(e)&&(t.actions[e]=t._action(e))}},_shifter:function(t,n){var r="string"==typeof n?t[n]:n;"function"!=typeof r&&(r=t[r]);var a=this;return function(){var e=a.wrapElement(this);return t.called=n,r.apply(t,[e].concat(y.call(arguments,0)))}},_isAction:function(e){var t=this.prototype[e],n=typeof t;return"constructor"!==e&&("function"===n||"string"===n&&"function"==typeof this.prototype[t])&&!!(b.isSpecial(e)||r[e]||/[^\w]/.test(e))},_action:function(r,i,t){var e;if(g.lastIndex=0,i||!g.test(r)){if(e=new l(function(){var a,e=r.replace(g,function(e,t){var n,r;return this._isDelegate(i,t)?(a=this._getDelegate(i,t),""):(t=this._removeDelegateFromKey(t),r=this._lookup(i)[0],void 0===(n=c.read(r,c.reads(t),{readCompute:!1}).value)&&"undefined"!=typeof window&&(n=p(window,t)),r&&(u.isObservableLike(r)&&u.isMapLike(r)||n)?"string"==typeof n?n:(a=n,""):(!0,null))}.bind(this)),t=(e=e.trim()).split(/\s+/g),n=t.pop();return{processor:this.processors[n]||o,parts:[e,t.join(" "),n],delegate:a||void 0}},this),t){var n=function(e){t._bindings.control[r](t.element),t._bindings.control[r]=e.processor(e.delegate||t.element,e.parts[2],e.parts[1],r,t)};u.onValue(e,n,"mutate"),t._bindings.readyComputes[r]={compute:e,handler:n}}return e.get()}},_lookup:function(e){return[e,window]},_removeDelegateFromKey:function(e){return e},_isDelegate:function(e,t){return"element"===t},_getDelegate:function(e,t){},processors:{},defaults:{},convertElement:function(e){return e="string"==typeof e?document.querySelector(e):e,this.wrapElement(e)},wrapElement:function(e){return e},unwrapElement:function(e){return e},isSpecial:function(e){return"inserted"===e||"removed"===e}},{setup:function(e,t){var n,r=this.constructor,a=r.pluginName||r.shortName;if(!e)throw new Error("Creating an instance of a named control without passing an element");if(this.element=r.convertElement(e),a&&"Control"!==a&&this.element.classList&&this.element.classList.add(a),(n=this.element[v])||(n=[],this.element[v]=n),n.push(this),u.isObservableLike(t)&&u.isMapLike(t)){for(var i in r.defaults)t.hasOwnProperty(i)||c.set(t,i,r.defaults[i]);this.options=t}else this.options=s(s({},r.defaults),t);return this.on(),[this.element,this.options]},on:function(e,t,n,r){if(e)return"string"==typeof e&&(r=n,n=t,t=e,e=this.element),void 0===r&&(r=n,n=t,t=null),"string"==typeof r&&(r=b._shifter(this,r)),this._bindings.user.push(m(e,n,r,t)),this._bindings.user.length;this.off();var a,i,o=this.constructor,s=this._bindings,c=o.actions,u=this.constructor.unwrapElement(this.element),l=b._shifter(this,"destroy");for(a in c)c.hasOwnProperty(a)&&(i=c[a]||o._action(a,this.options,this))&&(s.control[a]=i.processor(i.delegate||u,i.parts[2],i.parts[1],a,this));var f=h.onNodeRemoval(u,function(){var e=u.ownerDocument,t=e.contains?e:e.documentElement;t&&!1!==t.contains(u)||l()});return s.user.push(function(){f&&(f(),f=void 0)}),s.user.length},off:function(){var t=this.constructor.unwrapElement(this.element),e=this._bindings;e&&((e.user||[]).forEach(function(e){e(t)}),u.eachKey(e.control||{},function(e){e(t)}),u.eachKey(e.readyComputes||{},function(e){u.offValue(e.compute,e.handler,"mutate")})),this._bindings={user:[],control:{},readyComputes:{}}},destroy:function(){if(null!==this.element){var e,t=this.constructor,n=t.pluginName||t.shortName&&f.underscore(t.shortName);this.off(),n&&"can_control"!==n&&this.element.classList&&this.element.classList.remove(n),(e=this.element[v])&&e.splice(e.indexOf(this),1),this.element=null}}});r=b.processors,o=function(e,t,n,r,a){return m(e,t,b._shifter(a,r),n)},["beforeremove","change","click","contextmenu","dblclick","keydown","keyup","keypress","mousedown","mousemove","mouseout","mouseover","mouseup","reset","resize","scroll","select","submit","focusin","focusout","mouseenter","mouseleave","touchstart","touchmove","touchcancel","touchend","touchleave","inserted","removed","dragstart","dragenter","dragover","dragleave","drag","drop","dragend"].forEach(function(e){r[e]=o}),n.exports=i.Control=b}),define("can-component/control/control",["require","exports","module","can-control","can-reflect"],function(e,t,n){"use strict";var a=e("can-control"),r=e("can-reflect"),i=/\{([^\}]+)\}/g,o=a.extend({_lookup:function(e){return[e.scope,e,window]},_removeDelegateFromKey:function(e){return e.replace(/^(scope|^viewModel)\./,"")},_isDelegate:function(e,t){return"scope"===t||"viewModel"===t},_getDelegate:function(e,t){return e[t]},_action:function(e,t,n){var r;return i.lastIndex=0,r=i.test(e),!n&&r?void 0:a._action.apply(this,arguments)}},{setup:function(e,t){return this.scope=t.scope,this.viewModel=t.viewModel,a.prototype.setup.call(this,e,t)},off:function(){this._bindings&&r.eachKey(this._bindings.readyComputes||{},function(e){r.offValue(e.compute,e.handler)}),a.prototype.off.apply(this,arguments),this._bindings.readyComputes={}},destroy:function(){a.prototype.destroy.apply(this,arguments),"function"==typeof this.options.destroy&&this.options.destroy.apply(this,arguments)}});n.exports=o}),define("can-attribute-encoder",["require","exports","module","can-namespace","can-log/dev/dev"],function(e,t,n){"use strict";var r=e("can-namespace");e("can-log/dev/dev");var a,i=(a={},function(e,t){for(var n=0;n<e.length;n++)t(e[n],n)}("allowReorder,attributeName,attributeType,autoReverse,baseFrequency,baseProfile,calcMode,clipPathUnits,contentScriptType,contentStyleType,diffuseConstant,edgeMode,externalResourcesRequired,filterRes,filterUnits,glyphRef,gradientTransform,gradientUnits,kernelMatrix,kernelUnitLength,keyPoints,keySplines,keyTimes,lengthAdjust,limitingConeAngle,markerHeight,markerUnits,markerWidth,maskContentUnits,maskUnits,patternContentUnits,patternTransform,patternUnits,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,repeatCount,repeatDur,requiredExtensions,requiredFeatures,specularConstant,specularExponent,spreadMethod,startOffset,stdDeviation,stitchTiles,surfaceScale,systemLanguage,tableValues,textLength,viewBox,viewTarget,xChannelSelector,yChannelSelector".split(","),function(e){a[e]=!0}),a);function o(e,t,n){return t+"-"+n.toLowerCase()}function s(e,t){return 0===e.indexOf(t)}function c(e,t){return e.length-e.lastIndexOf(t)===t.length}var u={leftParens:/\(/g,rightParens:/\)/g,leftBrace:/\{/g,rightBrace:/\}/g,camelCase:/([a-z]|[0-9]|^)([A-Z])/g,forwardSlash:/\//g,space:/\s/g,uppercase:/[A-Z]/g,uppercaseDelimiterThenChar:/:u:([a-z])/g,caret:/\^/g,dollar:/\$/g,at:/@/g},l=":u:",f=":s:",d=":f:",p=":lp:",h=":rp:",v=":lb:",y=":rb:",g=":c:",m=":d:",b=":at:",w={encode:function(e){var t=e;return!i[t]&&t.match(u.camelCase)&&(s(t,"on:")||c(t,":to")||c(t,":from")||c(t,":bind")||c(t,":raw")?t=t.replace(u.uppercase,function(e){return l+e.toLowerCase()}):(s(t,"(")||s(t,"{"))&&(t=t.replace(u.camelCase,o))),t=t.replace(u.space,f).replace(u.forwardSlash,d).replace(u.leftParens,p).replace(u.rightParens,h).replace(u.leftBrace,v).replace(u.rightBrace,y).replace(u.caret,g).replace(u.dollar,m).replace(u.at,b)},decode:function(e){var t=e;return!i[t]&&u.uppercaseDelimiterThenChar.test(t)&&(s(t,"on:")||c(t,":to")||c(t,":from")||c(t,":bind")||c(t,":raw"))&&(t=t.replace(u.uppercaseDelimiterThenChar,function(e,t){return t.toUpperCase()})),t=t.replace(p,"(").replace(h,")").replace(v,"{").replace(y,"}").replace(d,"/").replace(f," ").replace(g,"^").replace(m,"$").replace(b,"@")}};if(r.encoder)throw new Error("You can't have two versions of can-attribute-encoder, check your dependencies");n.exports=r.encoder=w}),define("can-view-parser",["require","exports","module","can-namespace","can-log/dev/dev","can-attribute-encoder"],function(e,t,n){"use strict";var r=e("can-namespace"),s=(e("can-log/dev/dev"),e("can-attribute-encoder"));function m(e,t){for(var n=0;n<e.length;n++)t(e[n],n)}function a(e){var t={};return m(e.split(","),function(e){t[e]=!0}),t}var i="A-Za-z0-9",o="-:_"+i,b="{{",w=new RegExp("^<\\/(["+o+"]+)[^>]*>"),x=new RegExp("\\{\\{(![\\s\\S]*?!|[\\s\\S]*?)\\}\\}\\}?","g"),f=/\s/,d=new RegExp("["+i+"]"),p=new RegExp("["+o+"]+s*=s*(\"[^\"]*\"|'[^']*')"),_=a("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed"),k=a("altGlyph,altGlyphDef,altGlyphItem,animateColor,animateMotion,animateTransform,clipPath,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,foreignObject,glyphRef,linearGradient,radialGradient,textPath"),O=a("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),E=a("script"),L="start,end,close,attrStart,attrEnd,attrValue,chars,comment,special,done".split(","),l={"{":"}","(":")"},q=function(){},S=function(e,a,t){if("object"==typeof e)return function(e,t){for(var n=0,r=e.length;n<r;n++){var a=e[n];t[a.tokenType].apply(t,a.args)}return e}(e,a);var r=[];function n(e,t,n,r){t=k[t]?t:t.toLowerCase(),O[t]&&p.last()===t&&i("",t),r=_[t]||!!r,a.start(t,r,f),r||p.push(t),S.parseAttrs(n,a,f),a.end(t,r,f),"html"===t&&(u=!0)}function i(e,t){var n;if(t)for(t=k[t]?t:t.toLowerCase(),n=p.length-1;0<=n&&p[n]!==t;n--);else n=0;if(0<=n){for(var r=p.length-1;n<=r;r--)a.close&&a.close(p[r],f);p.length=n,"body"===t&&(u=!0)}}function o(e,t){a.special&&a.special(t,f)}a=a||{},t&&m(L,function(t){var n=a[t]||q;a[t]=function(){if(!1!==n.apply(this,arguments)){var e=arguments.length;void 0===arguments[e-1]&&(e=arguments.length-1),r.push({tokenType:t,args:[].slice.call(arguments,0,e)})}}});var s,c,u,l,f,d=function(){v&&!u&&a.chars&&a.chars(v,f),u=!1,v=""},p=[],h=e,v="";for(p.last=function(){return this[this.length-1]};e;){if(c=!0,p.last()&&E[p.last()])e=e.replace(new RegExp("([\\s\\S]*?)</"+p.last()+"[^>]*>"),function(e,t){return t=t.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g,"$1$2"),a.chars&&a.chars(t,f),""}),i(0,p.last());else{if(0===e.indexOf("\x3c!--"))0<=(s=e.indexOf("--\x3e"))&&(d(),a.comment&&a.comment(e.substring(4,s),f),e=e.substring(s+3),c=!1);else if(0===e.indexOf("</"))(l=e.match(w))&&(d(),l[0].replace(w,i),e=e.substring(l[0].length),c=!1);else if(0===e.indexOf("<")){var y=S.searchStartTag(e);y&&(d(),n.apply(null,y.match),e=y.html,c=!1)}else 0===e.indexOf(b)&&(l=e.match(x))&&(d(),l[0].replace(x,o),e=e.substring(l[0].length));if(c){0===(s=M(e,b))&&e===h&&(v+=e.charAt(0),e=e.substr(1),s=M(e,b));var g=s<0?e:e.substring(0,s);e=s<0?"":e.substring(s),g&&(v+=g)}}if(e===h)throw new Error("Parse Error: "+e);h=e}return d(),i(),a.done(f),r},h=function(e,t,n,r,a){var i=r.substring("number"==typeof e.nameStart?e.nameStart:t,t),o=s.encode(i);e.attrStart=o,n.attrStart(e.attrStart,a),e.inName=!1},v=function(e,t,n,r,a){if(void 0!==e.valueStart&&e.valueStart<t){var i=r.substring(e.valueStart,t);n.attrValue(i,a)}n.attrEnd(e.attrStart,a),e.attrStart=void 0,e.valueStart=void 0,e.inValue=!1,e.inName=!1,e.lookingForEq=!1,e.inQuote=!1,e.lookingForName=!0},M=function(e,t){for(var n=t.length,r=0,a=e.length;r<a;r++)if("<"===e[r]||e.substr(r,n)===t)return r;return-1};S.parseAttrs=function(e,t,n){if(e){for(var r,a=0,i={inName:!1,nameStart:void 0,inValue:!1,valueStart:void 0,inQuote:!1,attrStart:void 0,lookingForName:!0,lookingForValue:!1,lookingForEq:!1};a<e.length;){r=a;var o=e.charAt(a);if(a++,b===e.substr(r,b.length)){i.inValue&&r>i.valueStart?t.attrValue(e.substring(i.valueStart,r),n):i.inName&&i.nameStart<r?(h(i,r,t,e,n),v(i,r,t,e,n)):i.lookingForValue?i.inValue=!0:i.lookingForEq&&i.attrStart&&v(i,r,t,e,n),x.lastIndex=r;var s=x.exec(e);s&&(t.special(s[1],n),a=r+s[0].length,i.inValue&&(i.valueStart=r+s[0].length))}else if(i.inValue)i.inQuote?o===i.inQuote&&v(i,r,t,e,n):f.test(o)&&v(i,r,t,e,n);else if("="===o&&(i.lookingForEq||i.lookingForName||i.inName))i.attrStart||h(i,r,t,e,n),i.lookingForValue=!0,i.lookingForEq=!1,i.lookingForName=!1;else if(i.inName){var c,u=e[i.nameStart];l[u]===o?(c=l["{"===u?"(":"{"],e[r+1]===c?(h(i,r+2,t,e,n),a++):h(i,r+1,t,e,n),i.lookingForEq=!0):f.test(o)&&"{"!==u&&"("!==u&&(h(i,r,t,e,n),i.lookingForEq=!0)}else i.lookingForName?f.test(o)||(i.attrStart&&v(i,r,t,e,n),i.nameStart=r,i.inName=!0):i.lookingForValue&&(f.test(o)?a===e.length&&v(i,r,t,e,n):(i.lookingForValue=!1,i.inValue=!0,i.valueStart="'"===o||'"'===o?(i.inQuote=o,r+1):r))}i.inName?(h(i,r+1,t,e,n),v(i,r+1,t,e,n)):(i.lookingForEq||i.lookingForValue||i.inValue)&&v(i,r+1,t,e,n),x.lastIndex=0}},S.searchStartTag=function(e){for(var t=e.indexOf(">"),n=p.exec(e.substring(1)),r=1;n&&t>=r+n.index;){for(r+=n.index+n[0].length;t<r;)t+=e.substring(t+1).indexOf(">")+1;n=p.exec(e.substring(r))}if(-1===t||!d.test(e[1]))return null;var a,i,o="",s="",c=e.substring(0,t+1),u="/"===c[c.length-2],l=c.search(f);return i=u?(s="/",c.substring(1,c.length-2).trim()):c.substring(1,c.length-1).trim(),-1===l?a=i:(l--,a=i.substring(0,l),o=i.substring(l)),{match:[c,a,o,s],html:e.substring(c.length)}},n.exports=r.HTMLParser=S}),define("can-dom-mutate/node/node",["require","exports","module","can-globals","can-namespace","can-dom-mutate","can-dom-mutate/-util"],function(e,t,n){!function(e,t,n,r){"use strict";var a=t("can-globals"),i=t("can-namespace"),o=t("can-dom-mutate"),s=t("can-dom-mutate/-util"),c=s.isInDocument,u=s.getParents,l={dispatchNodeInsertion:function(e,t){c(t)&&o.dispatchNodeInsertion(t)},dispatchNodeRemoval:function(e,t){c(e)&&!c(t)&&o.dispatchNodeRemoval(t)}},f={replaceChild:function(e,t){var n=u(e),r=this.replaceChild(e,t);l.dispatchNodeRemoval(this,t);for(var a=0;a<n.length;a++)l.dispatchNodeInsertion(this,n[a]);return r},setAttribute:function(e,t){var n=this.getAttribute(e),r=this.setAttribute(e,t);return n!==this.getAttribute(e)&&o.dispatchNodeAttributeChange(this,e,n),r},removeAttribute:function(e){var t=this.getAttribute(e),n=this.removeAttribute(e);return t&&o.dispatchNodeAttributeChange(this,e,t),n}};[["appendChild","Insertion"],["insertBefore","Insertion"],["removeChild","Removal"]].forEach(function(e){var a=e[0],i="dispatchNode"+e[1];f[a]=function(e){for(var t=u(e),n=this[a].apply(this,arguments),r=0;r<t.length;r++)l[i](this,t[r]);return n}});var d={};["appendChild","insertBefore","removeChild","replaceChild","setAttribute","removeAttribute"].forEach(function(e){d[e]=function(){return this[e].apply(this,arguments)}});var p={};function h(e){var t=e?d:f;for(var n in t)p[n]=t[n]}var v="MutationObserver";h(a.getKeyValue(v)),a.onKeyValue(v,h),r.exports=i.domMutateNode=o.node=p}(0,e,0,n)}),define("can-dom-mutate/node",["require","exports","module","can-namespace","can-dom-mutate/node/node"],function(e,t,n){"use strict";var r=e("can-namespace"),a=e("can-dom-mutate/node/node");n.exports=r.node=a}),define("can-view-nodelist",["require","exports","module","can-namespace","can-dom-mutate/node"],function(e,t,n){"use strict";var r=e("can-namespace"),a=e("can-dom-mutate/node"),o=new Map,s=[].splice,c=[].push,u=function(e){for(var t=0,n=0,r=e.length;n<r;n++){var a=e[n];a.nodeType?t++:t+=u(a)}return t},l={update:function(e,t,n){n||(n=l.unregisterChildren(e));for(var r=[],a=0,i=r.length=t.length;a<i;a++)r[a]=t[a];t=r;var o=e.length;return s.apply(e,[0,o].concat(t)),e.replacements?(l.nestReplacements(e),e.deepChildren=e.newDeepChildren,e.newDeepChildren=[]):l.nestList(e),n},nestReplacements:function(e){for(var t,n=0,r=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var a=l.first(e[n]);t.set(a,e[n])}return t}(e.replacements),a=e.replacements.length;n<e.length&&a;){var i=e[n],o=r.get(i);o&&(r.delete(i),e.splice(n,u(o),o),a--),n++}a&&(t=e,r.forEach(function(e){t.newDeepChildren.push(e)})),e.replacements=[]},nestList:function(e){for(var t=0;t<e.length;){var n=e[t],r=o.get(n);r?r!==e&&e.splice(t,u(r),r):o.set(n,e),t++}},last:function(e){var t=e[e.length-1];return t.nodeType?t:l.last(t)},first:function(e){var t=e[0];return t.nodeType?t:l.first(t)},flatten:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r.nodeType?t.push(r):t.push.apply(t,l.flatten(r))}return t},register:function(e,t,n,r){return e.unregistered=t,e.parentList=n,e.nesting=n&&void 0!==n.nesting?n.nesting+1:0,n?(e.deepChildren=[],e.newDeepChildren=[],e.replacements=[],!0!==n&&(r?n.replacements.push(e):n.newDeepChildren.push(e))):l.nestList(e),e},unregisterChildren:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r.nodeType?(e.replacements||o.delete(r),t.push(r)):c.apply(t,l.unregister(r,!0))}var a=e.deepChildren;if(a)for(var i=0;i<a.length;i++)l.unregister(a[i],!0);return t},unregister:function(e,t){var n=l.unregisterChildren(e,!0);if(e.isUnregistered=!0,e.unregistered){var r=e.unregistered;if(e.replacements=e.unregistered=null,!t){var a=e.parentList&&e.parentList.deepChildren;if(a){var i=a.indexOf(e);-1!==i&&a.splice(i,1)}}r()}return n},after:function(e,t){var n=e[e.length-1];n.nextSibling?a.insertBefore.call(n.parentNode,t,n.nextSibling):a.appendChild.call(n.parentNode,t)},replace:function(e,t){var n,r=e[0].parentNode;"SELECT"===r.nodeName.toUpperCase()&&0<=r.selectedIndex&&(n=r.value),1===e.length?a.replaceChild.call(r,t,e[0]):(l.after(e,t),l.remove(e)),void 0!==n&&(r.value=n)},remove:function(e){for(var t=e[0]&&e[0].parentNode,n=0;n<e.length;n++)a.removeChild.call(t,e[n])},nodeMap:o};n.exports=r.nodeLists=l}),define("can-child-nodes",["require","exports","module","can-namespace"],function(e,t,n){"use strict";var r=e("can-namespace");n.exports=r.childNodes=function(e){var t=e.childNodes;if("length"in t)return t;for(var n=e.firstChild,r=[];n;)r.push(n),n=n.nextSibling;return r}}),define("can-fragment",["require","exports","module","can-globals/document/document","can-namespace","can-reflect","can-child-nodes","can-symbol"],function(e,t,n){!function(e,t,n,r){"use strict";var o=t("can-globals/document/document"),a=t("can-namespace"),i=t("can-reflect"),s=t("can-child-nodes"),c=t("can-symbol"),u=/^\s*<(\w+)[^>]*>/,l={}.toString,f=c.for("can.toDOM");function d(e,t){if(e&&11===e.nodeType)return e;t?t.length&&(t=t[0]):t=o();for(var n=function(e,t,n){void 0===t&&(t=u.test(e)&&RegExp.$1),e&&"[object Function]"===l.call(e.replace)&&(e=e.replace(/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,"<$1></$2>"));var r=n.createElement("div"),a=n.createElement("div");return"tbody"===t||"tfoot"===t||"thead"===t||"colgroup"===t?(a.innerHTML="<table>"+e+"</table>",r=3===a.firstChild.nodeType?a.lastChild:a.firstChild):"col"===t?(a.innerHTML="<table><colgroup>"+e+"</colgroup></table>",r=3===a.firstChild.nodeType?a.lastChild:a.firstChild.firstChild):"tr"===t?(a.innerHTML="<table><tbody>"+e+"</tbody></table>",r=3===a.firstChild.nodeType?a.lastChild:a.firstChild.firstChild):"td"===t||"th"===t?(a.innerHTML="<table><tbody><tr>"+e+"</tr></tbody></table>",r=3===a.firstChild.nodeType?a.lastChild:a.firstChild.firstChild.firstChild):"option"===t?(a.innerHTML="<select>"+e+"</select>",r=3===a.firstChild.nodeType?a.lastChild:a.firstChild):r.innerHTML=""+e,[].slice.call(s(r))}(e,void 0,t),r=(t||document).createDocumentFragment(),a=0,i=n.length;a<i;a++)r.appendChild(n[a]);return r}var p=function(e,t){var n,r=t||o();if(e&&"string"!=typeof e){if("function"==typeof e[f])return p(e[f]());if(11===e.nodeType)return e;if("number"==typeof e.nodeType)return(n=r.createDocumentFragment()).appendChild(e),n;i.isListLike(e)?(n=r.createDocumentFragment(),i.eachIndex(e,function(e){n.appendChild(p(e))})):n=d(""+e,r)}else n=d(null==e?"":""+e,r);return s(n).length||n.appendChild(r.createTextNode("")),n};r.exports=a.fragment=a.frag=p}(0,e,0,n)}),define("can-view-callbacks",["require","exports","module","can-observation-recorder","can-log/dev/dev","can-globals/global/global","can-globals/document/document","can-dom-mutate/node","can-namespace","can-view-nodelist","can-fragment","can-globals","can-symbol","can-reflect"],function(e,t,n){!function(e,t,n,r){"use strict";var u,l=t("can-observation-recorder"),f=(t("can-log/dev/dev"),t("can-globals/global/global")),d=t("can-globals/document/document"),p=t("can-dom-mutate/node"),a=t("can-namespace"),h=t("can-view-nodelist"),v=t("can-fragment"),y=t("can-globals"),i=t("can-symbol"),o=t("can-reflect"),s=i.for("can.callbackMap"),g={},m=new WeakMap,b=function(e){var t=e.tagName&&e.tagName.toLowerCase();g[t]&&q.tagHandler(e,t,{})},w=function(e){var t;if(b(e),e.getElementsByTagName){t=e.getElementsByTagName("*");for(var n,r=0;void 0!==(n=t[r]);r++)w(n)}},x=!1,c=function(e,t){if(!t){var n=_[e];if(!n)for(var r=0,a=k.length;r<a;r++){var i=k[r];if(i.match.test(e))return i.handler}return n}"string"==typeof e?_[e]=t:k.push({match:e,handler:t})},_={},k=[],O=new WeakMap,E=/[-\:]/,L=function(){},q={_tags:g,_attributes:_,_regExpAttributes:k,defaultCallback:L,tag:function(e,t){var n;if(!t)return null===t?delete g[e.toLowerCase()]:n=g[e.toLowerCase()],!n&&E.test(e)&&(n=L),n;var r,a,i=f(),o=E.test(e);g[e.toLowerCase()];if(i.html5&&(i.html5.elements+=" "+e,i.html5.shivDocument()),g[e.toLowerCase()]=t,null!=(a=y.getKeyValue("document"))&&null!=a.documentElement&&"false"!==a.documentElement.getAttribute("data-can-automount")){var s=y.getKeyValue("customElements");if(s){if(r=s.get(e.toLowerCase()),o&&!r){var c=function(){return Reflect.construct(HTMLElement,[],c)};c.prototype=Object.create(HTMLElement.prototype),c.prototype.connectedCallback=function(){q.tagHandler(this,e.toLowerCase(),{})},s.define(e,c)}}else!function(){if(!x){var e=y.getKeyValue("MutationObserver");e&&((u=new e(function(e){for(var t,n,r=0;void 0!==(n=e[r]);r++)if("childList"===n.type){t=n.addedNodes;for(var a,i=0;void 0!==(a=t[i]);i++)w(a)}})).observe(d().documentElement,{childList:!0,subtree:!0}),x=!0)}}(),function(e){for(var t,n=d().getElementsByTagName(e),r=0;void 0!==(t=n[r]);r++)b(t)}(e)}else x&&u.disconnect()},attr:c,attrs:function(e){var t=o.getKeyValue(e,s)||e;O.has(t)||(O.set(t,!0),o.eachKey(t,function(e,t){c(t,e)}))},tagHandler:function(e,t,n){if(!m.has(e)){var r,a=n.scope,i=a&&a.templateContext.tags.get(t)||g[t];if(i?(r=l.ignore(i)(e,n),m.set(e,!0)):r=a,r&&n.subtemplate){a!==r&&(a=a.add(r));var o=h.register([],void 0,n.parentNodeList||!0,!1);o.expression="<"+e.tagName+">";var s=n.subtemplate(a,n.options,o),c="string"==typeof s?v(s):s;p.appendChild.call(e,c)}}}};if(a.view=a.view||{},a.view.callbacks)throw new Error("You can't have two versions of can-view-callbacks, check your dependencies");r.exports=a.view.callbacks=q}(0,e,0,n)}),define("can-view-target",["require","exports","module","can-globals/document/document","can-dom-mutate/node","can-namespace","can-globals/mutation-observer/mutation-observer"],function(e,t,n){!function(e,t,n,r){"use strict";var a,i,s=t("can-globals/document/document"),h=t("can-dom-mutate/node"),o=t("can-namespace"),c=t("can-globals/mutation-observer/mutation-observer"),v=function(e,t,n,r){for(var a=r.createDocumentFragment(),i=0,o=e.length;i<o;i++){var s=e[i];a.appendChild(f(s,t,n.concat(i),r))}return a},y="undefined"!=typeof document&&(a=document.createDocumentFragment(),(i=document.createElement("div")).appendChild(document.createTextNode("")),i.appendChild(document.createTextNode("")),a.appendChild(i),2===a.cloneNode(!0).firstChild.childNodes.length),u="undefined"!=typeof document&&function(){var e=document.createElement("a");e.innerHTML="<xyz></xyz>";var t,n,r=e.cloneNode(!0),a="<xyz></xyz>"===r.innerHTML;return a?((e=document.createDocumentFragment()).appendChild(document.createTextNode("foo-bar")),(t=c())?((n=new t(function(){})).observe(document.documentElement,{childList:!0,subtree:!0}),r=e.cloneNode(!0),n.disconnect()):r=e.cloneNode(!0),1===r.childNodes.length):a}(),g="undefined"!=typeof document&&!!document.createElementNS,l=u?function(e){return e.cloneNode(!0)}:function(e){var t,n=e.ownerDocument;if(1===e.nodeType?t="http://www.w3.org/1999/xhtml"!==e.namespaceURI&&g&&n.createElementNS?n.createElementNS(e.namespaceURI,e.nodeName):n.createElement(e.nodeName):3===e.nodeType?t=n.createTextNode(e.nodeValue):8===e.nodeType?t=n.createComment(e.nodeValue):11===e.nodeType&&(t=n.createDocumentFragment()),e.attributes)for(var r=e.attributes,a=0;a<r.length;a++){var i=r[a];i&&i.specified&&(i.namespaceURI?t.setAttributeNS(i.namespaceURI,i.nodeName||i.name,i.nodeValue||i.value):t.setAttribute(i.nodeName||i.name,i.nodeValue||i.value))}if(e&&e.firstChild)for(var o=e.firstChild;o;)t.appendChild(l(o)),o=o.nextSibling;return t};function f(t,e,n,r){var a,i,o,s,c,u=n,l=typeof t,f=function(){return a||(a={path:n,callbacks:[]},e.push(a),u=[]),a};if("object"===l){if(t.tag){if(i=g&&t.namespace?r.createElementNS(t.namespace,t.tag):r.createElement(t.tag),t.attrs)for(var d in t.attrs){var p=t.attrs[d];"function"==typeof p?f().callbacks.push({callback:p}):null!==p&&"object"==typeof p&&p.namespaceURI?i.setAttributeNS(p.namespaceURI,d,p.value):h.setAttribute.call(i,d,p)}if(t.attributes)for(s=0,c=t.attributes.length;s<c;s++)f().callbacks.push({callback:t.attributes[s]});t.children&&t.children.length&&(o=a?a.paths=[]:e,i.appendChild(v(t.children,o,u,r)))}else if(t.comment&&(i=r.createComment(t.comment),t.callbacks))for(s=0,c=t.attributes.length;s<c;s++)f().callbacks.push({callback:t.callbacks[s]})}else"string"===l?i=r.createTextNode(t):"function"===l&&(y?(i=r.createTextNode(""),f().callbacks.push({callback:t})):(i=r.createComment("~"),f().callbacks.push({callback:function(){var e=r.createTextNode("");return h.replaceChild.call(this.parentNode,e,this),t.apply(e,arguments)}})));return i}function d(e,t,n){for(var r=t.path,a=t.callbacks,i=t.paths,o=e,s=r?r.length:0,c=i?i.length:0,u=0;u<s;u++)o=o.childNodes.item(r[u]);for(u=0;u<c;u++)d(o,i[u],n);n.push({element:o,callbacks:a})}function p(e,t){var o=[],n=v(e,o,[],t||s());return{paths:o,clone:n,hydrate:function(){for(var e=l(this.clone),t=[],n=0,r=t.length=arguments.length;n<r;n++)t[n]=arguments[n];for(var a=[],i=0;i<o.length;i++)d(e,o[i],a);return function(e,t){for(var n,r,a,i=e.length,o=0;o<i;o++){n=(a=e[o]).callbacks.length,r=a.element;for(var s=0;s<n;s++)a.callbacks[s].callback.apply(r,t)}}(a,t),e}}}p.keepsTextNodes=y,p.cloneNode=l,o.view=o.view||{},r.exports=o.view.target=p}(0,e,0,n)}),define("can-view-scope/template-context",["require","exports","module","can-simple-map"],function(e,t,n){"use strict";var r=e("can-simple-map");n.exports=function(e){e=e||{},this.vars=new r(e.vars||{}),this.helpers=new r(e.helpers||{}),this.partials=new r(e.partials||{}),this.tags=new r(e.tags||{})}}),define("can-view-scope/make-compute-like",["require","exports","module","can-single-reference","can-reflect"],function(e,t,n){"use strict";var i=e("can-single-reference"),o=e("can-reflect");n.exports=function(r){var a=function(e){return arguments.length?o.setValue(this,e):o.getValue(this)}.bind(r);return a.on=a.bind=a.addEventListener=function(e,n){var t=function(e,t){n.call(a,{type:"change"},e,t)};i.set(n,this,t),r.on(t)},a.off=a.unbind=a.removeEventListener=function(e,t){r.off(i.getAndDelete(t,this))},o.assignSymbols(a,{"can.getValue":function(){return o.getValue(r)},"can.setValue":function(e){return o.setValue(r,e)},"can.onValue":function(e,t){return o.onValue(r,e,t)},"can.offValue":function(e,t){return o.offValue(r,e,t)},"can.valueHasDependencies":function(){return o.valueHasDependencies(r)},"can.getPriority":function(){return o.getPriority(r)},"can.setPriority":function(e){o.setPriority(r,e)},"can.isValueLike":!0,"can.isFunctionLike":!1}),a.isComputed=!0,a}}),define("can-stache-helpers",["require","exports","module","can-namespace"],function(e,t,n){"use strict";var r=e("can-namespace");if(r.stacheHelpers)throw new Error("You can't have two versions of can-stache-helpers, check your dependencies");n.exports=r.stacheHelpers={}}),define("can-view-scope/scope-key-data",["require","exports","module","can-observation","can-stache-key","can-assign","can-reflect","can-symbol","can-observation-recorder","can-view-scope/make-compute-like","can-reflect-dependencies","can-event-queue/value/value","can-stache-helpers","can-simple-observable","can-log/dev/dev"],function(e,t,n){"use strict";var i=e("can-observation"),r=e("can-stache-key"),o=e("can-assign"),a=e("can-reflect"),s=e("can-symbol"),c=e("can-observation-recorder"),u=e("can-view-scope/make-compute-like"),l=(e("can-reflect-dependencies"),e("can-event-queue/value/value")),f=e("can-stache-helpers"),d=e("can-simple-observable"),p=(e("can-log/dev/dev"),s.for("can.dispatch")),h=c.ignore(function(e){if(e.reads&&1===e.reads.length){var t=e.root;return t&&t[s.for("can.getValue")]&&(t=a.getValue(t)),t&&a.isObservableLike(t)&&a.isMapLike(t)&&"function"!=typeof t[e.reads[0].key]&&t}});var v=function(t,e,n){this.startingScope=t,this.key=e,this.read=this.read.bind(this),this.dispatch=this.dispatch.bind(this),"debugger"===e&&(this.startingScope={_context:f},this.read=function(){var e={scope:t};return(0,f.debugger)(e)});var r=this.observation=new i(this.read,this);this.options=o({observation:this.observation},n),this.fastPath=void 0,this.root=void 0,this.reads=void 0,this.setRoot=void 0,this._thisArg=new d,this.parentHasKey=void 0;var a=new Set;a.add(r),this.dependencies={valueDependencies:a},this._latestValue=void 0};function y(){this._value=this.newVal}function g(){this.value=this.newVal}l(v.prototype),o(v.prototype,{constructor:v,dispatch:function(e){var t=this.value;this._latestValue=this.value=e,this[p].call(this,this.value,t)},onBound:function(){this.bound=!0,a.onValue(this.observation,this.dispatch,"notify");var e=h(this);e&&this.toFastPath(e),this._latestValue=this.value=c.peekValue(this.observation)},onUnbound:function(){this.bound=!1,a.offValue(this.observation,this.dispatch,"notify"),this.toSlowPath()},set:function(e){var t=this.root||this.setRoot;t?this.reads.length?r.write(t,this.reads,e,this.options):a.setValue(t,e):this.startingScope.set(this.key,e,this.options)},get:function(){return c.isRecording()&&(c.add(this),this.bound||i.temporarilyBind(this)),!0===this.bound&&!0===this.fastPath?this._latestValue:c.peekValue(this.observation)},toFastPath:function(r){var a=this,e=this.observation;this.fastPath=!0,e.dependencyChange=function(e,t){if((n=t)&&"number"==typeof n.batchNum&&"string"==typeof n.type)throw"no event objects!";var n;return e===r&&"function"!=typeof t?(a._latestValue=t,this.newVal=t):a.toSlowPath(),i.prototype.dependencyChange.apply(this,arguments)},e.hasOwnProperty("_value")?e.onBound=y:e.onBound=g},toSlowPath:function(){this.observation.dependencyChange=i.prototype.dependencyChange,this.observation.onBound=i.prototype.onBound,this.fastPath=!1},read:function(){var e;return this.root?(e=r.read(this.root,this.reads,this.options),this.thisArg=e.parent):(e=this.startingScope.read(this.key,this.options),this.scope=e.scope,this.reads=e.reads,this.root=e.rootObserve,this.setRoot=e.setRoot,this.thisArg=e.thisArg,this.parentHasKey=e.parentHasKey),e.value},hasDependencies:function(){return this.bound||i.temporarilyBind(this),a.valueHasDependencies(this.observation)}}),Object.defineProperty(v.prototype,"thisArg",{get:function(){return this._thisArg.get()},set:function(e){this._thisArg.set(e)}});var m={"can.getValue":v.prototype.get,"can.setValue":v.prototype.set,"can.valueHasDependencies":v.prototype.hasDependencies,"can.getValueDependencies":function(){return this.dependencies},"can.getPriority":function(){return a.getPriority(this.observation)},"can.setPriority":function(e){a.setPriority(this.observation,e)}};a.assignSymbols(v.prototype,m),Object.defineProperty(v.prototype,"compute",{get:function(){var e=u(this);return Object.defineProperty(this,"compute",{value:e,writable:!1,configurable:!1}),e},configurable:!0}),Object.defineProperty(v.prototype,"initialValue",{get:function(){return this.bound||i.temporarilyBind(this),c.peekValue(this)},set:function(){throw new Error("initialValue should not be set")},configurable:!0}),n.exports=v}),define("can-view-scope/compute_data",["require","exports","module","can-view-scope/scope-key-data"],function(e,t,n){"use strict";var r=e("can-view-scope/scope-key-data");n.exports=function(e,t,n){return new r(e,t,n||{args:[]})}}),define("can-view-scope",["require","exports","module","can-stache-key","can-observation-recorder","can-view-scope/template-context","can-view-scope/compute_data","can-assign","can-namespace","can-reflect","can-log/dev/dev","can-define-lazy-value","can-stache-helpers","can-simple-map"],function(e,t,n){!function(e,t,n,r){"use strict";var c=t("can-stache-key"),m=t("can-observation-recorder"),a=t("can-view-scope/template-context"),i=t("can-view-scope/compute_data"),b=t("can-assign"),o=t("can-namespace"),w=t("can-reflect"),s=t("can-log/dev/dev"),u=t("can-define-lazy-value"),l=t("can-stache-helpers");function f(){return!1}var d=t("can-simple-map").extend("LetContext",{});function p(e,t,n){this._context=e,this._parent=t,this._meta=n||{},this.__cache={}}var h=/(\.\.\/)|(\.\/)|(this[\.@])/g;b(p,{read:c.read,TemplateContext:a,keyInfo:function(e){"./"===e&&(e="this");var i={remainingKey:e};if(i.isScope="scope"===e,i.isScope)return i;var t=e.substr(0,6);return i.isInScope="scope."===t||"scope@"===t,i.isInScope?i.remainingKey=e.substr(6):"scope/"===t?(i.walkScope=!0,i.remainingKey=e.substr(6)):"@scope/"===e.substr(0,7)?(i.walkScope=!0,i.remainingKey=e.substr(7)):(i.parentContextWalkCount=0,i.remainingKey=e.replace(h,function(e,t,n,r,a){return i.isContextBased=!0,void 0!==t&&i.parentContextWalkCount++,""}),".."===i.remainingKey?(i.parentContextWalkCount++,i.remainingKey="this"):"."!==i.remainingKey&&""!==i.remainingKey||(i.remainingKey="this"),"this"===i.remainingKey&&(i.isContextBased=!0)),i},isTemplateContextOrCanNotHaveProperties:function(e){var t=e._context;return t instanceof a||null==t},shouldSkipIfSpecial:function(e){return!0===(!0===e._meta.special)||!!p.isTemplateContextOrCanNotHaveProperties(e)},shouldSkipEverythingButSpecial:function(e){return!1===(!0===e._meta.special)||!!p.isTemplateContextOrCanNotHaveProperties(e)},makeShouldExitOnSecondNormalContext:function(){var r=!1;return function(e){var t=!e.isSpecial(),n=t&&r;return t&&(r=!0),n}},makeShouldExitAfterFirstNormalContext:function(){var t=!1;return function(e){return!!t||(!e.isSpecial()&&(t=!0),!1)}},makeShouldSkipSpecialContexts:function(e){var t=e||0;return function(e){return!(t<0&&e._meta.notContext)&&(!!e.isSpecial()||!(--t<0))}}}),b(p.prototype,{add:function(e,t){return e!==this._context?new this.constructor(e,this,t):this},find:function(e,t){var n=c.reads(e),r={shouldExit:f,shouldSkip:p.shouldSkipIfSpecial,shouldLookForHelper:!0,read:c.read};return this._walk(n,t,r).value},readFromSpecialContext:function(e){return this._walk([{key:e,at:!1}],{special:!0},{shouldExit:f,shouldSkip:p.shouldSkipEverythingButSpecial,shouldLookForHelper:!1,read:c.read})},readFromTemplateContext:function(e,t){var n=c.reads(e);return c.read(this.templateContext,n,t)},read:function(e,t){return t=t||{},this.readKeyInfo(p.keyInfo(e),t||{})},readKeyInfo:function(e,t){var n,r,a={read:t.read||c.read};if(e.isScope)return{value:this};if(e.isInScope)return r=c.reads(e.remainingKey),void 0!==(n=c.read(this,r,t)).value||n.parentHasKey||(n=this.readFromTemplateContext(e.remainingKey,t)),b(n,{thisArg:0<r.length?n.parent:void 0});if(e.isContextBased)return r="this"!==e.remainingKey?c.reads(e.remainingKey):[],a.shouldExit=p.makeShouldExitOnSecondNormalContext(),a.shouldSkip=p.makeShouldSkipSpecialContexts(e.parentContextWalkCount),a.shouldLookForHelper=!0,this._walk(r,t,a);if(e.walkScope)return a.shouldExit=f,a.shouldSkip=p.shouldSkipIfSpecial,a.shouldLookForHelper=!0,r=c.reads(e.remainingKey),this._walk(r,t,a);r=c.reads(e.remainingKey);var i=t&&!0===t.special;return a.shouldExit=p.makeShouldExitOnSecondNormalContext(),a.shouldSkip=i?p.shouldSkipEverythingButSpecial:p.shouldSkipIfSpecial,a.shouldLookForHelper=!i,this._walk(r,t,a)},_walk:function(n,e,t){for(var r,a,i,o,s,c=this,u=[],l=-1,f=b({foundObservable:function(e,t){a=e,i=n.slice(t)},earlyExit:function(e,t){(!0===(!0===c._meta.variable)&&0===t?w.hasKey(e,n[t].key):l<t||t===l&&"object"==typeof e&&w.hasOwnKey(e,n[t].key))&&(s=a,o=i,l=t)}},e),d=m.isRecording(),p=!1;c;)if(!0!==t.shouldSkip(c)){if(!0===t.shouldExit(c))break;p=!0,r=c._context;var h=m.trap(),v=t.read(r,n,f),y=h();if(void 0!==v.value||v.parentHasKey)return!y.length&&d?(a=v.parent,i=n.slice(n.length-1)):m.addMany(y),{scope:c,rootObserve:a,value:v.value,reads:i,thisArg:v.parent,parentHasKey:v.parentHasKey};u.push.apply(u,y),c=c._parent}else c=c._parent;if(t.shouldLookForHelper){var g=this.getHelperOrPartial(n);if(g&&g.value)return{value:g.value}}return m.addMany(u),{setRoot:s,reads:o,value:void 0,noContextAvailable:!p}},getDataForScopeSet:function(e,a){var i,t,n=p.keyInfo(e),r=b({read:function(e,t){if(void 0!==i||e instanceof d||(i=e),1<t.length){var n=t.slice(0,t.length-1),r=c.read(e,n,a).value;return null!=r&&w.hasKey(r,t[t.length-1].key)?{parent:r,parentHasKey:!0,value:void 0}:{}}return 1===t.length?w.hasKey(e,t[0].key)?{parent:e,parentHasKey:!0,value:void 0}:{}:{value:e}}},a),o=this.readKeyInfo(n,r);if("this"===n.remainingKey)return{parent:o.value,how:"setValue"};var s=n.remainingKey.split(".").pop();return o.thisArg?t=o.thisArg:i&&(t=i),void 0===t?{error:"Attempting to set a value at "+e+" where the context is undefined."}:!w.isObservableLike(t)&&w.isObservableLike(t[s])?w.isMapLike(t[s])?{parent:t,key:s,how:"updateDeep",warn:'can-view-scope: Merging data into "'+s+'" because its parent is non-observable'}:w.isValueLike(t[s])?{parent:t,key:s,how:"setValue"}:{parent:t,how:"write",key:s,passOptions:!0}:{parent:t,how:"write",key:s,passOptions:!0}},getHelper:function(e){return console.warn(".getHelper is deprecated, use .getHelperOrPartial"),this.getHelperOrPartial(e)},getHelperOrPartial:function(e){for(var t,n,r=this;r;){if((t=r._context)instanceof a){if(void 0!==(n=c.read(t.helpers,e,{proxyMethods:!1})).value)return n;if(void 0!==(n=c.read(t.partials,e,{proxyMethods:!1})).value)return n}r=r._parent}return c.read(l,e,{proxyMethods:!1})},get:function(e,t){return t=b({isArgument:!0},t),this.read(e,t).value},peek:m.ignore(function(e,t){return this.get(e,t)}),peak:m.ignore(function(e,t){return this.peek(e,t)}),getScope:function(e){for(var t=this;t;){if(e(t))return t;t=t._parent}},getContext:function(e){var t=this.getScope(e);return t&&t._context},getTemplateContext:function(){var t,e=this.getScope(function(e){return(t=e)._context instanceof a});return e||(e=new p(new a),t._parent=e),e},addTemplateContext:function(){return this.add(new a)},addLetContext:function(e){return this.add(new d(e||{}),{variable:!0})},getRoot:function(){for(var e=this,t=this;e._parent;)e=(t=e)._parent;return e._context instanceof a&&(e=t),e._context},getViewModel:function(){var e=this.getScope(function(e){return e._meta.viewModel});return e&&e._context},getTop:function(){var t;return this.getScope(function(e){return e._meta.viewModel&&(t=e),!1}),t&&t._context},getPathsForKey:function(e){},hasKey:function(e){var t,n=c.reads(e);return(t="scope"===n[0].key?c.read(this,n.slice(1),e):c.read(this._context,n,e)).foundLastParent&&t.parentHasKey},set:function(e,t,n){n=n||{};var r=this.getDataForScopeSet(e,n),a=r.parent;switch(r.warn&&s.warn(r.warn),r.how){case"set":a.set(r.key,t,r.passOptions?n:void 0);break;case"write":c.write(a,r.key,t,n);break;case"setValue":w.setValue("key"in r?a[r.key]:a,t);break;case"setKeyValue":w.setKeyValue(a,r.key,t);break;case"updateDeep":w.updateDeep(a[r.key],t)}},attr:m.ignore(function(e,t,n){return s.warn("can-view-scope::attr is deprecated, please use peek, get or set"),n=b({isArgument:!0},n),2===arguments.length?this.set(e,t,n):this.get(e,n)}),computeData:function(e,t){return i(this,e,t)},compute:function(e,t){return this.computeData(e,t).compute},cloneFromRef:function(){for(var t,e=[],n=this;n;){if(n._context instanceof a){t=n._parent;break}e.unshift(n),n=n._parent}return t?(e.forEach(function(e){t=t.add(e._context,e._meta)}),t):this},isSpecial:function(){return this._meta.notContext||this._meta.special||this._context instanceof a||this._meta.variable}}),p.prototype._read=p.prototype._walk,w.assignSymbols(p.prototype,{"can.hasKey":p.prototype.hasKey});["filename","lineNumber"].forEach(function(t){Object.defineProperty(p.prototype,t,{get:function(){return this.readFromTemplateContext(t).value},set:function(e){this.templateContext[t]=e}})}),u(p.prototype,"templateContext",function(){return this.getTemplateContext()._context}),u(p.prototype,"root",function(){return s.warn("`scope.root` is deprecated. Use either `scope.top` or `scope.vm` instead."),this.getRoot()}),u(p.prototype,"vm",function(){return this.getViewModel()}),u(p.prototype,"top",function(){return this.getTop()}),u(p.prototype,"helpers",function(){return l});["index","key","element","event","viewModel","arguments","helperOptions","args"].forEach(function(e){Object.defineProperty(p.prototype,e,{get:function(){return this.readFromSpecialContext(e).value}})}),o.view=o.view||{},r.exports=o.view.Scope=p}(0,e,0,n)}),define("can-stache/src/key-observable",["require","exports","module","can-simple-observable/settable/settable","can-stache-key"],function(e,t,n){"use strict";var r=e("can-simple-observable/settable/settable"),a=e("can-stache-key");function i(e,t){t=""+t,this.key=t,this.root=e,r.call(this,function(){return a.get(this,t)},e)}(i.prototype=Object.create(r.prototype)).set=function(e){a.set(this.root,this.key,e)},n.exports=i}),define("can-stache/src/utils",["require","exports","module","can-view-scope","can-observation-recorder","can-stache-key","can-reflect","can-stache/src/key-observable","can-symbol"],function(e,t,n){"use strict";var s=e("can-view-scope"),c=e("can-observation-recorder"),f=e("can-stache-key"),d=e("can-reflect"),p=e("can-stache/src/key-observable"),r=e("can-symbol").for("can.isView"),o=function(e){return function(){e&&(e.rendered=!0)}};n.exports={last:function(e){return null!=e&&e[e.length-1]},emptyHandler:function(){},jsonParse:function(e){return"'"===e[0]?e.substr(1,e.length-2):"undefined"===e?void 0:JSON.parse(e)},mixins:{last:function(){return this.stack[this.stack.length-1]},add:function(e){this.last().add(e)},subSectionDepth:function(){return this.stack.length-1}},createRenderers:function(e,t,n,r,a,i){e.fn=r?this.makeRendererConvertScopes(r,t,n,i,e.metadata):o(e.metadata),e.inverse=a?this.makeRendererConvertScopes(a,t,n,i,e.metadata):o(e.metadata),e.isSection=!(!r&&!a)},makeRendererConvertScopes:function(r,a,i,e,o){var t=function(e,t,n){return void 0===e||e instanceof s||(e=a?a.add(e):new s(e||{})),o&&(o.rendered=!0),r(e||a,n||i)};return e?t:c.ignore(t)},makeView:function(n){var e=c.ignore(function(e,t){return e instanceof s||(e=new s(e)),n(e,t)});return e[r]=!0,e},getItemsStringContent:function(e,t,n){for(var r="",a=f.get(e,"length"),i=d.isObservableLike(e),o=0;o<a;o++){var s=i?new p(e,o):e[o];r+=n.fn(s)}return r},getItemsFragContent:function(e,t,n){var r,a=[],i=f.get(e,"length"),o=d.isObservableLike(e),s=t.exprData&&t.exprData.hashExprs;0<d.size(s)&&(r={},d.eachKey(s,function(e,t){r[e.key]=t}));for(var c=0;c<i;c++){var u={},l=o?new p(e,c):e[c];0<d.size(r)&&(r.value&&(u[r.value]=l),r.index&&(u[r.index]=c)),a.push(t.fn(n.add(u,{notContext:!0}).add({index:c},{special:!0}).add(l)))}return a}}}),define("can-stache/src/html_section",["require","exports","module","can-view-target","can-stache/src/utils","can-globals/document/document","can-assign"],function(e,t,n){!function(e,t,n,r){"use strict";var a,i=t("can-view-target"),o=t("can-stache/src/utils"),s=t("can-globals/document/document"),c=t("can-assign"),u=o.last,l="undefined"!=typeof document&&(a=s().createElement("div"),function(e){return-1===e.indexOf("&")?e.replace(/\r\n/g,"\n"):(a.innerHTML=e,0===a.childNodes.length?"":a.childNodes.item(0).nodeValue)}),f=function(e){e&&(this.filename=e),this.stack=[new d]};c(f.prototype,o.mixins),c(f.prototype,{startSubSection:function(e){var t=new d(e);return this.stack.push(t),t},endSubSectionAndReturnRenderer:function(){if(this.last().isEmpty())return this.stack.pop(),null;var e=this.endSection();return o.makeView(e.compiled.hydrate.bind(e.compiled))},startSection:function(e){var t=new d(e);this.last().add(t.targetCallback),this.stack.push(t)},endSection:function(){return this.last().compile(),this.stack.pop()},inverse:function(){this.last().inverse()},compile:function(){var e=this.stack.pop().compile();return o.makeView(e.hydrate.bind(e))},push:function(e){this.last().push(e)},pop:function(){return this.last().pop()},removeCurrentNode:function(){this.last().removeCurrentNode()}});var d=function(n){this.data="targetData",this.targetData=[],this.targetStack=[];var r=this;this.targetCallback=function(e,t){n.call(this,e,t,r.compiled.hydrate.bind(r.compiled),r.inverseCompiled&&r.inverseCompiled.hydrate.bind(r.inverseCompiled))}};c(d.prototype,{inverse:function(){this.inverseData=[],this.data="inverseData"},push:function(e){this.add(e),this.targetStack.push(e)},pop:function(){return this.targetStack.pop()},add:function(e){"string"==typeof e&&(e=l(e)),this.targetStack.length?u(this.targetStack).children.push(e):this[this.data].push(e)},compile:function(){return this.compiled=i(this.targetData,s()),this.inverseData&&(this.inverseCompiled=i(this.inverseData,s()),delete this.inverseData),this.targetStack=this.targetData=null,this.compiled},removeCurrentNode:function(){return this.children().pop()},children:function(){return this.targetStack.length?u(this.targetStack).children:this[this.data]},isEmpty:function(){return!this.targetData.length}}),f.HTMLSection=d,r.exports=f}(0,e,0,n)}),define("can-view-live/lib/core",["require","exports","module","can-view-parser","can-dom-mutate","can-view-nodelist","can-fragment","can-child-nodes","can-reflect","can-reflect-dependencies"],function(e,t,n){"use strict";var r=e("can-view-parser"),s=e("can-dom-mutate"),i=e("can-view-nodelist"),o=e("can-fragment"),c=e("can-child-nodes"),a=e("can-reflect");e("can-reflect-dependencies");var u={setup:function(e,t,n){var r,a,i=!1,o=function(){return i||(i=!0,n(a),r&&(r(),r=void 0)),!0};return a={teardownCheck:function(e){return!e&&o()}},r=s.onNodeRemoval(e,function(){(function e(t,n){return t.contains?t.contains(n):t.nodeType===Node.DOCUMENT_NODE&&t.documentElement?e(t.documentElement,n):(n=n.parentNode)===t})(e.ownerDocument,e)||o()}),t(a),a},listen:function(e,t,n,r){return u.setup(e,function(){a.onValue(t,n,r||"notify")},function(e){a.offValue(t,n,r||"notify"),e.nodeList&&i.unregister(e.nodeList)})},getAttributeParts:function(e){var t,n={};return r.parseAttrs(e,{attrStart:function(e){n[e]="",t=e},attrValue:function(e){n[t]+=e},attrEnd:function(){}}),n},isNode:function(e){return e&&e.nodeType},addTextNodeIfNoChildren:function(e){e.firstChild||e.appendChild(e.ownerDocument.createTextNode(""))},replace:function(e,t,n){var r=e.slice(0),a=o(t);return i.register(e,n),i.update(e,c(a)),i.replace(r,a),e},getParentNode:function(e,t){return t&&11===e.parentNode.nodeType?t:e.parentNode},makeString:function(e){return null==e?"":""+e}};n.exports=u}),define("can-dom-data-state",["require","exports","module","can-namespace","can-dom-mutate","can-cid"],function(e,t,n){"use strict";var r=e("can-namespace"),i=e("can-dom-mutate"),o=e("can-cid"),s={},c={},u=function(){var e=o.get(this),t=!1;return e&&s[e]&&(t=!0,delete s[e]),c[e]&&(c[e](),delete c[e]),t},a={_data:s,_removalDisposalMap:c,getCid:function(){return o.get(this)},cid:function(){return o(this)},expando:o.domExpando,get:function(e){var t=o.get(this),n=t&&s[t];return void 0===e?n:n&&n[e]},set:function(e,t){var n=o(this),r=s[n]||(s[n]={});if(void 0!==e&&(r[e]=t,this&&"number"==typeof this.nodeType&&!c[n])){var a=this;c[n]=i.onNodeRemoval(a,function(){var e=a.ownerDocument,t=e.contains?e:e.documentElement;t&&t.contains(a)||setTimeout(function(){u.call(a)},13)})}return r},clean:function(e){var t=o.get(this),n=s[t];n&&n[e]&&delete n[e],function(e){for(var t in e)return!1;return!0}(n)&&u.call(this)},delete:u};if(r.domDataState)throw new Error("You can't have two versions of can-dom-data-state, check your dependencies");n.exports=r.domDataState=a}),define("can-attribute-observable/behaviors",["require","exports","module","can-globals/document/document","can-globals/global/global","can-dom-data-state","can-dom-events","can-dom-mutate","can-dom-mutate/node","can-globals/mutation-observer/mutation-observer","can-diff/list/list","can-queues"],function(e,t,n){!function(e,t,n,r){"use strict";var a,i=t("can-globals/document/document"),f=(e=t("can-globals/global/global")(),t("can-dom-data-state")),d=t("can-dom-events"),o=t("can-dom-mutate"),s=t("can-dom-mutate/node"),c=t("can-globals/mutation-observer/mutation-observer"),u=t("can-diff/list/list"),l=t("can-queues"),p={INPUT:!0,TEXTAREA:!0,SELECT:!0,BUTTON:!0},h=function(e){return"http://www.w3.org/2000/svg"===e.namespaceURI},v=function(){return!0},y=function(t,e){return(e=e||{}).get=function(){return this[t]},e.set=function(e){this[t]!==e&&(this[t]=e)},e},g=function(t){return{isBoolean:!0,set:function(e){t in this?this[t]=e:s.setAttribute.call(this,t,"")},remove:function(){this[t]=!1}}},m=function(e,t){if(!f.get.call(e,"attrMO")){var n=function(){t.call(e)},r=c();if(r){var a=new r(n);a.observe(e,{childList:!0,subtree:!0}),f.set.call(e,"attrMO",a)}else f.set.call(e,"attrMO",!0),f.set.call(e,"canBindingCallback",{onMutation:n})}},b=function(e,t){for(var n=e.firstChild;n;){if("OPTION"===n.nodeName&&t===n.value)return n;if("OPTGROUP"===n.nodeName){var r=b(n,t);if(r)return r}n=n.nextSibling}},w=function(e,t){var n;null!=t&&(n=b(e,t)),n?n.selected=!0:e.selectedIndex=-1},x=function(e,t){for(var n=e.firstChild;n;)"OPTION"===n.nodeName&&t(n),"OPTGROUP"===n.nodeName&&x(n,t),n=n.nextSibling},_=new Map,k=function(e,t){var n=Object.getOwnPropertyDescriptor(e,t);if(n)return n.writable||n.set;var r=Object.getPrototypeOf(e);return!!r&&k(r,t)},O={checked:{get:function(){return this.checked},set:function(e){var t=!!e||""===e||0===arguments.length;(this.checked=t)&&"radio"===this.type&&(this.defaultChecked=!0)},remove:function(){this.checked=!1},test:function(){return"INPUT"===this.nodeName}},class:{get:function(){return h(this)?this.getAttribute("class"):this.className},set:function(e){e=e||"",h(this)?s.setAttribute.call(this,"class",""+e):this.className=e}},disabled:g("disabled"),focused:{get:function(){return this===document.activeElement},set:function(e){var t=E.get(this,"focused"),n=this.ownerDocument.documentElement,r=this;function a(){e?r.focus():r.blur()}if(t!==e)if(n.contains(r))l.enqueueByQueue({mutate:[a]},null,[]);else var i=o.onNodeInsertion(r,function(){i(),a()});return!0},addEventListener:function(e,t,n){return n.call(this,"focus",t),n.call(this,"blur",t),function(e){e.call(this,"focus",t),e.call(this,"blur",t)}},test:function(){return"INPUT"===this.nodeName}},for:y("htmlFor"),innertext:y("innerText"),innerhtml:y("innerHTML"),innerHTML:y("innerHTML",{addEventListener:function(e,n,t){var r=[],a=this;return["change","blur"].forEach(function(e){var t=function(){n.apply(this,arguments)};d.addEventListener(a,e,t),r.push([e,t])}),function(t){r.forEach(function(e){t.call(a,e[0],e[1])})}}}),required:g("required"),readonly:g("readOnly"),selected:{get:function(){return this.selected},set:function(e){e=!!e,f.set.call(this,"lastSetValue",e),this.selected=e},addEventListener:function(n,t,e){var r,a,i,o=this,s=this.parentNode,c=o.selected,u=function(e){var t=o.selected;t!==(c=f.get.call(o,"lastSetValue")||c)&&(c=t,d.dispatch(o,n))},l=(r=s,a=e,(i=f.get.call(r,"attrSetChildOptions"))?Function.prototype:(i=function(){w(r,r.value)},f.set.call(r,"attrSetChildOptions",i),a.call(r,"change",i),function(e){f.clean.call(r,"attrSetChildOptions"),e.call(r,"change",i)}));return d.addEventListener(s,"change",u),e.call(o,n,t),function(e){l(e),d.removeEventListener(s,"change",u),e.call(o,n,t)}},test:function(){return"OPTION"===this.nodeName&&this.parentNode&&"SELECT"===this.parentNode.nodeName}},style:{set:(a=e.document&&i().createElement("div"),a&&a.style&&"cssText"in a.style?function(e){this.style.cssText=e||""}:function(e){s.setAttribute.call(this,"style",e)})},textcontent:y("textContent"),value:{get:function(){var e=this.value;return"SELECT"===this.nodeName&&"selectedIndex"in this&&-1===this.selectedIndex&&(e=void 0),e},set:function(e){var t,n=this.nodeName.toLowerCase();if("input"===n&&(e=null==(t=e)?"":""+t),this.value===e&&"option"!==n||(this.value=e),"input"!==n&&"textarea"!==n||(this.defaultValue=e),"select"===n){if(f.set.call(this,"attrValueLastVal",e),w(this,null===e?e:this.value),!this.ownerDocument.documentElement.contains(this))var r=this,a=o.onNodeInsertion(r,function(){a(),w(r,null===e?e:r.value)});m(this,function(){var e=f.get.call(this,"attrValueLastVal");E.set(this,"value",e),d.dispatch(this,"change")})}},test:function(){return p[this.nodeName]}},values:{get:function(){return t=[],x(this,function(e){e.selected&&t.push(e.value)}),t;var t},set:function(e){var t;t=e=e||[],x(this,function(e){e.selected=-1!==t.indexOf(e.value)}),f.set.call(this,"stickyValues",E.get(this,"values")),m(this,function(){var e=f.get.call(this,"stickyValues");E.set(this,"values",e);var t=f.get.call(this,"stickyValues");u(e.slice().sort(),t.slice().sort()).length&&d.dispatch(this,"values")})},addEventListener:function(t,n,e){var r=function(){d.dispatch(this,"values")};return d.addEventListener(this,"change",r),e.call(this,t,n),function(e){d.removeEventListener(this,"change",r),e.call(this,t,n)}}}},E={rules:_,specialAttributes:O,getRule:function(e,t){var n=O[t];if(n)return n;var r=_.get(e.constructor),a=r&&r[t];if(a)return a;if(!(t in e))return this.attribute(t);var i,o,s,c,u=k(e,t)?this.property(t):this.attribute(t);return i=e,o=t,s=u,(c=_.get(i.prototype))||(c={},_.set(i.constructor,c)),c[o]=s},attribute:function(t){return{get:function(){return this.getAttribute(t)},set:function(e){s.setAttribute.call(this,t,e)}}},property:function(t){return{get:function(){return this[t]},set:function(e){this[t]=e}}},findSpecialListener:function(e){return O[e]&&O[e].addEventListener},setAttrOrProp:function(e,t,n){return this.set(e,t,n)},set:function(e,t,n){var r=this.getRule(e,t),a=r&&r.set;if(a)return a.call(e,n)},get:function(e,t){var n=this.getRule(e,t),r=n&&n.get;if(r)return n.test?n.test.call(e)&&r.call(e):r.call(e)},remove:function(e,t){t=t.toLowerCase();var n,r=O[t],a=r&&r.set,i=r&&r.remove,o=(n=r)&&n.test||v;"function"==typeof i&&o.call(e)?i.call(e):"function"==typeof a&&o.call(e)?a.call(e,void 0):s.removeAttribute.call(e,t)}};r.exports=E}(function(){return this}(),e,0,n)}),define("can-view-live/lib/attr",["require","exports","module","can-view-live/lib/core","can-reflect","can-queues","can-attribute-observable/behaviors"],function(e,t,n){"use strict";var r=e("can-view-live/lib/core"),a=e("can-reflect"),i=e("can-queues"),o=e("can-attribute-observable/behaviors");r.attr=function(t,n,e){r.listen(t,e,function(e){i.domUIQueue.enqueue(o.set,o,[t,n,e])}),o.set(t,n,a.getValue(e))}}),define("can-view-live/lib/attrs",["require","exports","module","can-view-live/lib/core","can-view-callbacks","can-dom-mutate","can-dom-mutate/node","can-reflect","can-reflect-dependencies"],function(e,t,n){"use strict";var u=e("can-view-live/lib/core"),l=e("can-view-callbacks"),f=e("can-dom-mutate"),d=e("can-dom-mutate/node"),p=e("can-reflect");e("can-reflect-dependencies");u.attrs=function(i,t,o,s){if(p.isObservableLike(t)){var n,c={};p.onValue(t,a,"domUI");n=f.onNodeRemoval(i,function(){var e=i.ownerDocument;(e.contains?e:e.documentElement).contains(i)||(p.offValue(t,a,"domUI"),n&&(n(),n=void 0))}),a(p.getValue(t))}else{var e=u.getAttributeParts(t);for(var r in e)d.setAttribute.call(i,r,e[r])}function a(e){var t,n=u.getAttributeParts(e);for(t in n){var r=n[t];if(r!==c[t]){d.setAttribute.call(i,t,r);var a=l.attr(t);a&&a(i,{attributeName:t,scope:o,options:s})}delete c[t]}for(t in c)d.removeAttribute.call(i,t);c=n}}}),define("can-view-live/lib/html",["require","exports","module","can-view-live/lib/core","can-view-nodelist","can-fragment","can-child-nodes","can-reflect","can-symbol","can-queues"],function(e,t,n){"use strict";var l=e("can-view-live/lib/core"),f=e("can-view-nodelist"),d=e("can-fragment"),p=e("can-child-nodes"),h=e("can-reflect"),r=e("can-symbol"),v=e("can-queues"),y=r.for("can.viewInsert");function g(e,t,n){if(!0!==e.nodeList.isUnregistered){var r=h.toArray(p(t));n||f.update(e.nodeList,r,e.oldNodes);var a=e.oldNodes;e.oldNodes=r,f.replace(a,t)}}l.html=function(e,t,n,r){var i,a,o,s,c;void 0!==r&&(Array.isArray(r)?o=r:(o=r.nodeList,c=r));var u={reasonLog:"live.html replace::"+h.getName(t)};n=l.getParentNode(e,n),i=l.listen(n,t,function(e){f.first(s).parentNode&&a(e,!0);var t=f.first(s).parentNode;i.teardownCheck(t)}),s=o||[e],a=function(e,t){e&&"function"==typeof e[y]&&(e=e[y](c));var n="function"==typeof e,r=d(n?"":e);if(l.addTextNodeIfNoChildren(r),!0===t){i.oldNodes=f.unregisterChildren(s,!0);var a=!1;n&&(e(r.firstChild),a=f.first(s)===r.firstChild),v.domUIQueue.enqueue(g,null,[i,r,a],u)}else i.oldNodes=f.update(s,p(r)),n&&e(r.firstChild),f.replace(i.oldNodes,r)},i.nodeList=s,o?o.unregistered=i.teardownCheck:f.register(s,i.teardownCheck),a(h.getValue(t))}}),define("can-view-live/lib/set-observable",["require","exports","module","can-simple-observable","can-reflect"],function(e,t,n){"use strict";var r=e("can-simple-observable"),a=e("can-reflect");function i(e,t){this.setter=t,r.call(this,e)}((i.prototype=Object.create(r.prototype)).constructor=i).prototype.set=function(e){this.setter(e)},a.assignSymbols(i.prototype,{"can.setValue":i.prototype.set}),n.exports=i}),define("can-diff/patcher/patcher",["require","exports","module","can-reflect","can-key-tree","can-symbol","can-diff/list/list","can-queues","can-symbol"],function(e,t,n){"use strict";var r=e("can-reflect"),a=e("can-key-tree"),i=e("can-symbol"),o=e("can-diff/list/list"),s=e("can-queues"),c=(i=e("can-symbol")).for("can.onValue"),u=i.for("can.offValue"),l=i.for("can.onPatches"),f=i.for("can.offPatches"),d=function(e,t){this.handlers=new a([Object,Array],{onFirst:this.setup.bind(this),onEmpty:this.teardown.bind(this)}),this.observableOrList=e,this.isObservableValue=r.isValueLike(this.observableOrList)||r.isObservableLike(this.observableOrList),this.isObservableValue?this.priority=r.getPriority(e):this.priority=t||0,this.onList=this.onList.bind(this),this.onPatchesNotify=this.onPatchesNotify.bind(this),this.onPatchesDerive=this.onPatchesDerive.bind(this),this.patches=[]};d.prototype={constructor:d,setup:function(){this.observableOrList[c]?(r.onValue(this.observableOrList,this.onList,"notify"),this.setupList(r.getValue(this.observableOrList))):this.setupList(this.observableOrList)},teardown:function(){this.observableOrList[u]&&r.offValue(this.observableOrList,this.onList,"notify"),this.currentList&&this.currentList[f]&&this.currentList[f](this.onPatchesNotify,"notify")},setupList:function(e){(this.currentList=e)&&e[l]&&e[l](this.onPatchesNotify,"notify")},onList:function(e){var t=this.currentList||[];e=e||[],t[f]&&t[f](this.onPatchesNotify,"notify");var n=o(t,e);this.currentList=e,this.onPatchesNotify(n),e[l]&&e[l](this.onPatchesNotify,"notify")},onPatchesNotify:function(e){this.patches.push.apply(this.patches,e),s.deriveQueue.enqueue(this.onPatchesDerive,this,[],{priority:this.priority})},onPatchesDerive:function(){var e=this.patches;this.patches=[],s.enqueueByQueue(this.handlers.getNode([]),this.currentList,[e,this.currentList],null,["Apply patches",e])}},r.assignSymbols(d.prototype,{"can.onPatches":function(e,t){this.handlers.add([t||"mutate",e])},"can.offPatches":function(e,t){this.handlers.delete([t||"mutate",e])}}),n.exports=d}),define("can-view-live/lib/list",["require","exports","module","can-view-live/lib/core","can-view-nodelist","can-fragment","can-child-nodes","can-dom-mutate/node","can-reflect","can-symbol","can-reflect-dependencies","can-simple-observable","can-view-live/lib/set-observable","can-diff/patcher/patcher"],function(e,t,n){"use strict";var c=e("can-view-live/lib/core"),p=e("can-view-nodelist"),f=e("can-fragment"),u=e("can-child-nodes"),h=e("can-dom-mutate/node"),v=e("can-reflect"),r=e("can-symbol"),y=(e("can-reflect-dependencies"),e("can-simple-observable")),g=e("can-view-live/lib/set-observable"),l=e("can-diff/patcher/patcher"),m=[].splice,b=function(e,t,n,r,a){var i=[];t&&(p.register(i,null,!0,!0),i.parentList=t,i.expression="#each SUBEXPRESSION");var o=n.apply(r,a.concat([i])),s=f(o),c=v.toArray(u(s));return t?(p.update(i,c),e.push(i)):e.push(p.register(c)),s},w=function(e,t,n){var r=e.splice(t+1,n),a=[];return r.forEach(function(e){var t=p.unregister(e);[].push.apply(a,t)}),a},a=r.for("can.onPatches"),i=r.for("can.offPatches");function d(e,t,n,r,a,i,o){this.patcher=new l(t),a=c.getParentNode(e,a),this.value=t,this.render=n,this.context=r,this.parentNode=a,this.falseyRender=o,this.masterNodeList=i||p.register([e],null,!0),this.placeholder=e,this.indexMap=[],this.isValueLike=v.isValueLike(this.value),this.isObservableLike=v.isObservableLike(this.value),this.onPatches=this.onPatches.bind(this);var s=this.data=c.setup(a,this.setupValueBinding.bind(this),this.teardownValueBinding.bind(this));this.masterNodeList.unregistered=function(){s.teardownCheck()}}a=r.for("can.onPatches"),i=r.for("can.offPatches");d.prototype={setupValueBinding:function(){this.patcher[a](this.onPatches,"domUI"),this.patcher.currentList&&this.patcher.currentList.length?this.onPatches([{insert:this.patcher.currentList,index:0,deleteCount:0}]):this.addFalseyIfEmpty()},teardownValueBinding:function(){this.patcher[i](this.onPatches,"domUI"),this.exit=!0,this.remove({length:this.patcher.currentList?this.patcher.currentList.length:0},0,!0)},onPatches:function(e){if(!this.exit)for(var t=0,n=e.length;t<n;t++){var r=e[t];"move"===r.type?this.move(r.toIndex,r.fromIndex):(r.deleteCount&&this.remove({length:r.deleteCount},r.index,!0),r.insert&&r.insert.length&&this.add(r.insert,r.index))}},add:function(e,i){var o=this.placeholder.ownerDocument.createDocumentFragment(),s=[],c=[],u=this.masterNodeList,l=this.render,f=this.context;e.forEach(function(e,t){var n=new y(t+i),r=new g(e,function(e){v.setKeyValue(this.patcher.currentList,n.get(),e)}.bind(this)),a=b(s,u,l,f,[r,n]);o.appendChild(a),c.push(n)},this);var t=i+1;if(!this.indexMap.length){var n=w(u,0,u.length-1);p.remove(n)}if(u[t]){var r=p.first(u[t]);h.insertBefore.call(r.parentNode,o,r)}else p.after(1===t?[this.placeholder]:[p.last(this.masterNodeList[t-1])],o);m.apply(this.masterNodeList,[t,0].concat(s)),m.apply(this.indexMap,[i,0].concat(c));for(var a=i+c.length,d=this.indexMap.length;a<d;a++)this.indexMap[a].set(a)},remove:function(e,t){t<0&&(t=this.indexMap.length+t);var n=w(this.masterNodeList,t,e.length),r=this.indexMap;r.splice(t,e.length);for(var a=t,i=r.length;a<i;a++)r[a].set(a);this.exit?p.unregister(this.masterNodeList):(this.addFalseyIfEmpty(),p.remove(n))},addFalseyIfEmpty:function(){if(this.falseyRender&&0===this.indexMap.length){var e=[],t=b(e,this.masterNodeList,this.falseyRender,this.currentList,[this.currentList]);p.after([this.masterNodeList[0]],t),this.masterNodeList.push(e[0])}},move:function(e,t){e+=1,t+=1;var n,r=this.masterNodeList,a=this.indexMap,i=r[e],o=f(p.flatten(r[t]));n=t<e?p.last(i).nextSibling:p.first(i),r[0].parentNode.insertBefore(o,n);var s=r[t];[].splice.apply(r,[t,1]),[].splice.apply(r,[e,0,s]),e-=1;var c=a[t-=1];[].splice.apply(a,[t,1]),[].splice.apply(a,[e,0,c]);for(var u=Math.min(t,e),l=a.length;u<l;u++)a[u].set(u)},set:function(e,t){this.remove({length:1},t,!0),this.add([e],t)}},c.list=function(e,t,n,r,a,i,o){var s;e.nodeType!==Node.TEXT_NODE&&(e=(i?(s=document.createTextNode(""),p.replace(i,s),p.update(i,[s])):(s=document.createTextNode(""),e.parentNode.replaceChild(s,e)),s));new d(e,t,n,r,a,i,o)}}),define("can-view-live/lib/text",["require","exports","module","can-view-live/lib/core","can-view-nodelist","can-reflect"],function(e,t,n){"use strict";var s=e("can-view-live/lib/core"),c=e("can-view-nodelist"),u=e("can-reflect");s.text=function(t,e,n,r){var a;t.nodeType!==Node.TEXT_NODE&&(t=(r?(a=document.createTextNode(""),c.replace(r,a),c.update(r,[a])):(a=document.createTextNode(""),t.parentNode.replaceChild(a,t)),a));var i=s.getParentNode(t,n);t.nodeValue=s.makeString(u.getValue(e));var o=s.listen(i,e,function(e){t.nodeValue=s.makeString(e)},"domUI");r||(r=c.register([t],null,!0)),r.unregistered=o.teardownCheck,o.nodeList=r}}),define("can-view-live",["require","exports","module","can-view-live/lib/core","can-view-live/lib/attr","can-view-live/lib/attrs","can-view-live/lib/html","can-view-live/lib/list","can-view-live/lib/text"],function(e,t,n){"use strict";var r=e("can-view-live/lib/core");e("can-view-live/lib/attr"),e("can-view-live/lib/attrs"),e("can-view-live/lib/html"),e("can-view-live/lib/list"),e("can-view-live/lib/text"),n.exports=r}),define("can-stache/src/text_section",["require","exports","module","can-view-live","can-stache/src/utils","can-dom-mutate/node","can-assign","can-reflect","can-observation"],function(e,t,n){"use strict";var i=e("can-view-live"),r=e("can-stache/src/utils"),o=e("can-dom-mutate/node"),a=e("can-assign"),s=e("can-reflect"),c=e("can-observation"),u=function(){},l=function(e){e&&(this.filename=e),this.stack=[new d]};a(l.prototype,r.mixins),a(l.prototype,{startSection:function(e){var t=new d;this.last().add({process:e,truthy:t}),this.stack.push(t)},endSection:function(){this.stack.pop()},inverse:function(){this.stack.pop();var e=new d;this.last().last().falsey=e,this.stack.push(e)},compile:function(r){var a=this.stack[0].compile();return function(e){var t=new c(function(){return a(e)},null,{isObservable:!1});s.onValue(t,u);var n=s.getValue(t);s.valueHasDependencies(t)?(r.textContentOnly?i.text(this,t):r.attr?i.attr(this,r.attr,t):i.attrs(this,t,e),s.offValue(t,u)):r.textContentOnly?this.nodeValue=n:r.attr?o.setAttribute.call(this,r.attr,n):i.attrs(this,n)}}});var f=function(t,n,r){return function(e){return t.call(this,e,n,r)}},d=function(){this.values=[]};a(d.prototype,{add:function(e){this.values.push(e)},last:function(){return this.values[this.values.length-1]},compile:function(){for(var a=this.values,i=a.length,e=0;e<i;e++){var t=this.values[e];"object"==typeof t&&(a[e]=f(t.process,t.truthy&&t.truthy.compile(),t.falsey&&t.falsey.compile()))}return function(e){for(var t,n="",r=0;r<i;r++)n+="string"==typeof(t=a[r])?t:t.call(this,e);return n}}}),n.exports=l}),define("can-stache/expressions/arg",function(e,t,n){"use strict";var r=function(e,t){this.expr=e,this.modifiers=t||{},this.isCompute=!1};r.prototype.value=function(){return this.expr.value.apply(this.expr,arguments)},n.exports=r}),define("can-stache/expressions/literal",function(e,t,n){"use strict";var r=function(e){this._value=e};r.prototype.value=function(){return this._value},n.exports=r}),define("can-simple-observable/setter/setter",["require","exports","module","can-reflect","can-observation","can-simple-observable/settable/settable","can-event-queue/value/value"],function(e,t,n){"use strict";var r=e("can-reflect"),a=e("can-observation"),i=e("can-simple-observable/settable/settable");e("can-event-queue/value/value");function o(e,t){this.setter=t,this.observation=new a(e),this.handler=this.handler.bind(this)}((o.prototype=Object.create(i.prototype)).constructor=o).prototype.set=function(e){this.setter(e)},o.prototype.hasDependencies=function(){return r.valueHasDependencies(this.observation)},r.assignSymbols(o.prototype,{"can.setValue":o.prototype.set,"can.valueHasDependencies":o.prototype.hasDependencies}),n.exports=o}),define("can-stache/src/expression-helpers",["require","exports","module","can-stache/expressions/arg","can-stache/expressions/literal","can-reflect","can-stache-key","can-observation","can-observation-recorder","can-view-scope/make-compute-like","can-simple-observable/setter/setter"],function(e,t,n){"use strict";var r=e("can-stache/expressions/arg"),a=e("can-stache/expressions/literal"),s=e("can-reflect"),c=e("can-stache-key"),u=e("can-observation"),l=e("can-observation-recorder"),i=e("can-view-scope/make-compute-like"),f=e("can-simple-observable/setter/setter");n.exports={getObservableValue_fromDynamicKey_fromObservable:function(e,t,n,r){var a,i=function(){return c.reads((""+s.getValue(e)).replace(/\./g,"\\."))},o=new f(function(){var e=c.read(s.getValue(t),i());return a=e.parentHasKey,e.value},function(e){c.write(s.getValue(t),i(),e)});return u.temporarilyBind(o),o.initialValue=l.peekValue(o),o.parentHasKey=a,o},convertToArgExpression:function(e){return e instanceof r||e instanceof a?e:new r(e)},toComputeOrValue:function(e){return s.isObservableLike(e)?s.isValueLike(e)&&!1===s.valueHasDependencies(e)?s.getValue(e):e.compute?e.compute:i(e):e},toCompute:function(e){return e?e.isComputed?e:e.compute?e.compute:i(e):e}}}),define("can-stache/expressions/hashes",["require","exports","module","can-reflect","can-observation","can-stache/src/expression-helpers"],function(e,t,n){"use strict";var o=e("can-reflect"),s=e("can-observation"),c=e("can-stache/src/expression-helpers"),r=function(e){this.hashExprs=e};r.prototype.value=function(e,t){var n={};for(var r in this.hashExprs){var a=c.convertToArgExpression(this.hashExprs[r]),i=a.value.apply(a,arguments);n[r]={call:!a.modifiers||!a.modifiers.compute,value:i}}return new s(function(){var e={};for(var t in n)e[t]=n[t].call?o.getValue(n[t].value):c.toComputeOrValue(n[t].value);return e})},n.exports=r}),define("can-stache/expressions/bracket",["require","exports","module","can-stache/src/expression-helpers"],function(e,t,n){"use strict";var r=e("can-stache/src/expression-helpers"),a=function(e,t,n){this.root=t,this.key=e};a.prototype.value=function(e,t){var n=this.root?this.root.value(e,t):e.peek("this");return r.getObservableValue_fromDynamicKey_fromObservable(this.key.value(e,t),n,e,t,{})},a.prototype.closingTag=function(){},n.exports=a}),define("can-stache/src/set-identifier",function(e,t,n){"use strict";n.exports=function(e){this.value=e}}),define("can-stache/expressions/call",["require","exports","module","can-stache/expressions/hashes","can-stache/src/set-identifier","can-symbol","can-simple-observable/setter/setter","can-stache/src/expression-helpers","can-reflect","can-assign","can-view-scope","can-observation"],function(e,t,n){"use strict";var u=e("can-stache/expressions/hashes"),s=e("can-stache/src/set-identifier"),r=e("can-symbol"),c=e("can-simple-observable/setter/setter"),l=e("can-stache/src/expression-helpers"),f=e("can-reflect"),d=e("can-assign"),p=(r.for("can-stache.sourceText"),r.for("can.isView")),h=e("can-view-scope"),v=e("can-observation"),a=function(e,t){this.methodExpr=e,this.argExprs=t.map(l.convertToArgExpression)};a.prototype.args=function(e,t){for(var a={},i=[],n="function"==typeof t,r=0,o=this.argExprs.length;r<o;r++){var s=this.argExprs[r];if(s.expr instanceof u&&d(a,s.expr.hashExprs),!n||!t(r)){var c=s.value.apply(s,arguments);i.push({call:!s.modifiers||!s.modifiers.compute,value:c})}}return function(e){var t=[];0<f.size(a)&&(t.hashExprs=a);for(var n=0,r=i.length;n<r;n++)t[n]=e?i[n].value:i[n].call?f.getValue(i[n].value):l.toCompute(i[n].value);return t}},a.prototype.value=function(r,a){var i=this.methodExpr.value(r,{proxyMethods:!1});v.temporarilyBind(i);var e=f.getValue(i),o=this.args(r,e&&e.ignoreArgLookup),t=function(e){var t=f.getValue(i);if("function"==typeof t){f.isObservableLike(t)&&(t=f.getValue(t));var n=o(t.isLiveBound);return t.requiresOptionsArgument&&(n.hashExprs&&a&&a.exprData&&(a.exprData.hashExprs=n.hashExprs),void 0!==a&&n.push(a)),!0===t[p]&&(n[0]instanceof h||(n[0]=r.getTemplateContext().add(n[0])),n.push(a.nodeList)),arguments.length&&n.unshift(new s(e)),t.apply(i.thisArg||r.peek("this"),n)}};return a&&a.doNotWrapInObservation?t():new c(t,t)},a.prototype.closingTag=function(){return this.methodExpr.key},n.exports=a}),define("can-stache/expressions/helper",["require","exports","module","can-stache/expressions/literal","can-stache/expressions/hashes","can-assign","can-log/dev/dev","can-stache/src/expression-helpers","can-reflect"],function(e,t,n){"use strict";var s=e("can-stache/expressions/literal"),c=(e("can-stache/expressions/hashes"),e("can-assign")),i=(e("can-log/dev/dev"),e("can-stache/src/expression-helpers")),r=e("can-reflect"),a=function(e,t,n){this.methodExpr=e,this.argExprs=t,this.hashExprs=n,this.mode=null};a.prototype.args=function(e){for(var t=[],n=0,r=this.argExprs.length;n<r;n++){var a=this.argExprs[n];t.push(i.toComputeOrValue(a.value.apply(a,arguments)))}return t},a.prototype.hash=function(e){var t={};for(var n in this.hashExprs){var r=this.hashExprs[n];t[n]=i.toComputeOrValue(r.value.apply(r,arguments))}return t},a.prototype.value=function(n,r){var e=this.methodExpr instanceof s?""+this.methodExpr._value:this.methodExpr.key,a=this,t=n.computeData(e,{proxyMethods:!1}),i=t&&t.initialValue,o=t&&t.thisArg;return"function"==typeof i&&(t=function(){var e=a.args(n),t=c(c({},r),{hash:a.hash(n),exprData:a});return e.push(t),i.apply(o||n.peek("this"),e)}),t},a.prototype.closingTag=function(){return this.methodExpr.key},"production"!==process.env.NODE_ENV&&r.assignSymbols(a.prototype,{"can.getName":function(){return r.getName(this.constructor)+"{{"+this.sourceText()+"}}"}}),n.exports=a}),define("can-stache/expressions/lookup",["require","exports","module","can-stache/src/expression-helpers","can-reflect","can-symbol","can-assign"],function(e,t,n){"use strict";var r=e("can-stache/src/expression-helpers"),a=e("can-reflect"),i=e("can-symbol").for("can-stache.sourceText"),o=e("can-assign"),s=function(e,t,n){this.key=e,this.rootExpr=t,a.setKeyValue(this,i,n)};s.prototype.value=function(e,t){return this.rootExpr?r.getObservableValue_fromDynamicKey_fromObservable(this.key,this.rootExpr.value(e),e,{},{}):e.computeData(this.key,o({warnOnMissingKey:!0},t))},n.exports=s}),define("can-stache/src/expression",["require","exports","module","can-stache/expressions/arg","can-stache/expressions/literal","can-stache/expressions/hashes","can-stache/expressions/bracket","can-stache/expressions/call","can-stache/expressions/helper","can-stache/expressions/lookup","can-stache/src/set-identifier","can-stache/src/expression-helpers","can-stache/src/utils","can-assign","can-reflect","can-symbol"],function(e,t,n){"use strict";var l=e("can-stache/expressions/arg"),f=e("can-stache/expressions/literal"),d=e("can-stache/expressions/hashes"),p=e("can-stache/expressions/bracket"),h=e("can-stache/expressions/call"),r=e("can-stache/expressions/helper"),a=e("can-stache/expressions/lookup"),i=e("can-stache/src/set-identifier"),o=e("can-stache/src/expression-helpers"),v=e("can-stache/src/utils"),s=e("can-assign"),y=v.last,g=e("can-reflect"),m=e("can-symbol").for("can-stache.sourceText"),b=/[\w\.\\\-_@\/\&%]+/,c=/('.*?'|".*?"|=|[\w\.\\\-_@\/*%\$]+|[\(\)]|,|\~|\[|\]\s*|\s*(?=\[))/g,u=/\]\s+/,w=/^('.*?'|".*?"|-?[0-9]+\.?[0-9]*|true|false|null|undefined)$/,x=/^[\.@]\w/,_=function(e){return t=e,b.test(t)&&x.test(e);var t},k=function(e){return e.children||(e.children=[]),e},O=function(){this.root={children:[],type:"Root"},this.current=this.root,this.stack=[this.root]};s(O.prototype,{top:function(){return y(this.stack)},isRootTop:function(){return this.top()===this.root},popTo:function(e){this.popUntil(e),this.pop()},pop:function(){this.isRootTop()||this.stack.pop()},first:function(e){for(var t=this.stack.length-1;0<t&&-1===e.indexOf(this.stack[t].type);)t--;return this.stack[t]},firstParent:function(e){for(var t=this.stack.length-2;0<t&&-1===e.indexOf(this.stack[t].type);)t--;return this.stack[t]},popUntil:function(e){for(;-1===e.indexOf(this.top().type)&&!this.isRootTop();)this.stack.pop();return this.top()},addTo:function(e,t){var n=this.popUntil(e);k(n).children.push(t)},addToAndPush:function(e,t){this.addTo(e,t),this.stack.push(t)},push:function(e){this.stack.push(e)},topLastChild:function(){return y(this.top().children)},replaceTopLastChild:function(e){var t=k(this.top()).children;return t.pop(),t.push(e),e},replaceTopLastChildAndPush:function(e){this.replaceTopLastChild(e),this.stack.push(e)},replaceTopAndPush:function(e){var t;return(t=(this.top()===this.root||this.stack.pop(),k(this.top()).children)).pop(),t.push(e),this.stack.push(e),e}});var E=function(e){var t=e.lastIndexOf("./"),n=e.lastIndexOf(".");if(t<n)return e.substr(0,n)+"@"+e.substr(n+1);var r=-1===t?0:t+2,a=e.charAt(r);return"."===a||"@"===a?e.substr(0,r)+"@"+e.substr(r+1):e.substr(0,r)+"@"+e.substr(r)},L=function(e){var t=e.top();if(t&&"Lookup"===t.type){var n=e.stack[e.stack.length-2];"Helper"!==n.type&&n&&e.replaceTopAndPush({type:"Helper",method:t})}},q={toComputeOrValue:o.toComputeOrValue,convertKeyToLookup:E,Literal:f,Lookup:a,Arg:l,Hash:function(){},Hashes:d,Call:h,Helper:r,Bracket:p,SetIdentifier:i,tokenize:function(e){var n=[];return(e.trim()+" ").replace(c,function(e,t){u.test(t)?(n.push(t[0]),n.push(t.slice(1))):n.push(t)}),n},lookupRules:{default:function(e,t,n){return"Helper"===e.type?r:a},method:function(e,t,n){return a}},methodRules:{default:function(e){return"Call"===e.type?h:r},call:function(e){return h}},parse:function(e,t){t=t||{};var n=this.ast(e);return t.lookupRule||(t.lookupRule="default"),"string"==typeof t.lookupRule&&(t.lookupRule=q.lookupRules[t.lookupRule]),t.methodRule||(t.methodRule="default"),"string"==typeof t.methodRule&&(t.methodRule=q.methodRules[t.methodRule]),this.hydrateAst(n,t,t.baseMethodType||"Helper")},hydrateAst:function(t,n,r,e){var a;if("Lookup"===t.type)return new(n.lookupRule(t,r,e))(t.key,t.root&&this.hydrateAst(t.root,n,r),t[m]);if("Literal"===t.type)return new f(t.value);if("Arg"===t.type)return new l(this.hydrateAst(t.children[0],n,r,e),{compute:!0});if("Hash"===t.type)throw new Error("");if("Hashes"===t.type)return a={},t.children.forEach(function(e){a[e.prop]=this.hydrateAst(e.children[0],n,r,!0)},this),new d(a);if("Call"!==t.type&&"Helper"!==t.type)return"Bracket"===t.type?new p(this.hydrateAst(t.children[0],n),t.root?this.hydrateAst(t.root,n):void 0,void 0):void 0;a={};var i=[],o=t.children,s=n.methodRule(t);if(o)for(var c=0;c<o.length;c++){var u=o[c];"Hashes"===u.type&&"Helper"===t.type&&s!==h?u.children.forEach(function(e){a[e.prop]=this.hydrateAst(e.children[0],n,t.type,!0)},this):i.push(this.hydrateAst(u,n,t.type,!0))}return new s(this.hydrateAst(t.method,n,t.type),i,a)},ast:function(e){var t=this.tokenize(e);return this.parseAst(t,{index:0})},parseAst:function(e,t){for(var n,r,a,i,o=new O;t.index<e.length;){var s=e[t.index],c=e[t.index+1];if(t.index++,"="===c){(n=o.top())&&"Lookup"===n.type&&("Call"!==(r=o.firstParent(["Call","Helper","Hash"])).type&&"Root"!==r.type||(o.popUntil(["Call"]),n=o.top(),o.replaceTopAndPush({type:"Helper",method:"Root"===n.type?y(n.children):n})));var u={type:"Hash",prop:s};"Hashes"===(r=o.first(["Call","Helper","Hashes","Root"])).type?o.addToAndPush(["Hashes"],u):(o.addToAndPush(["Helper","Call","Root"],{type:"Hashes",children:[u]}),o.push(u)),t.index++}else if(w.test(s))L(o),"Hash"===(r=o.first(["Helper","Call","Hash","Bracket"])).type&&r.children&&0<r.children.length?o.addTo(["Helper","Call","Bracket"],{type:"Literal",value:v.jsonParse(s)}):"Bracket"===r.type&&r.children&&0<r.children.length?o.addTo(["Helper","Call","Hash"],{type:"Literal",value:v.jsonParse(s)}):o.addTo(["Helper","Call","Hash","Bracket"],{type:"Literal",value:v.jsonParse(s)});else if(b.test(s))a=o.topLastChild(),r=o.first(["Helper","Call","Hash","Bracket"]),a&&("Call"===a.type||"Bracket"===a.type)&&_(s)?o.replaceTopLastChildAndPush({type:"Lookup",root:a,key:s.slice(1)}):"Bracket"===r.type?r.children&&0<r.children.length?"Helper"===o.first(["Helper","Call","Hash","Arg"]).type&&"."!==s[0]?o.addToAndPush(["Helper"],{type:"Lookup",key:s}):o.replaceTopAndPush({type:"Lookup",key:s.slice(1),root:r}):o.addToAndPush(["Bracket"],{type:"Lookup",key:s}):(L(o),o.addToAndPush(["Helper","Call","Hash","Arg","Bracket"],{type:"Lookup",key:s}));else if("~"===s)L(o),o.addToAndPush(["Helper","Call","Hash"],{type:"Arg",key:s});else if("("===s){if("Lookup"!==(n=o.top()).type)throw new Error("Unable to understand expression "+e.join(""));o.replaceTopAndPush({type:"Call",method:(i=n,"Lookup"===i.type&&(g.setKeyValue(i,m,i.key),i.key=E(i.key)),i)})}else if(")"===s)o.popTo(["Call"]);else if(","===s){"Call"!==o.first(["Call"]).type?o.popUntil(["Hash"]):o.popUntil(["Call"])}else if("["===s)if(n=o.top(),!(a=o.topLastChild())||"Call"!==a.type&&"Bracket"!==a.type)if("Lookup"===n.type||"Bracket"===n.type){var l={type:"Bracket",root:n};o.replaceTopAndPush(l)}else"Call"===n.type?o.addToAndPush(["Call"],{type:"Bracket"}):" "===n?(o.popUntil(["Lookup","Call"]),L(o),o.addToAndPush(["Helper","Call","Hash"],{type:"Bracket"})):o.replaceTopAndPush({type:"Bracket"});else o.replaceTopLastChildAndPush({type:"Bracket",root:a});else"]"===s?o.pop():" "===s&&o.push(s)}return o.root.children[0]}};n.exports=q}),define("can-stache/src/mustache_core",["require","exports","module","can-view-live","can-view-nodelist","can-observation","can-observation-recorder","can-stache/src/utils","can-stache/src/expression","can-fragment","can-dom-mutate","can-symbol","can-reflect","can-log/dev/dev","can-globals/document/document","can-define-lazy-value"],function(e,t,n){!function(e,t,n,r){"use strict";var v=t("can-view-live"),y=t("can-view-nodelist"),g=t("can-observation"),m=t("can-observation-recorder"),l=t("can-stache/src/utils"),b=t("can-stache/src/expression"),w=t("can-fragment"),x=t("can-dom-mutate"),_=t("can-symbol"),k=t("can-reflect"),f=(t("can-log/dev/dev"),t("can-globals/document/document")),a=t("can-define-lazy-value"),i=_.for("can.toDOM");function d(e,t,n,r){this.metadata={rendered:!1},this.stringOnly=r,this.scope=e,this.nodeList=t,this.exprData=n}a(d.prototype,"context",function(){return this.scope.peek("this")});var o=/(?:(^|\r?\n)(\s*)(\{\{([\s\S]*)\}\}\}?)([^\S\n\r]*)($|\r?\n))|(\{\{([\s\S]*)\}\}\}?)/g,s=/(\s*)(\{\{\{?)(-?)([\s\S]*?)(-?)(\}\}\}?)(\s*)/g,O=function(){},E=_.for("can.viewInsert");function L(e){return null!==e&&"object"==typeof e&&("function"==typeof e[i]||"function"==typeof e[E]||"number"==typeof e.nodeType)}var q={expression:b,makeEvaluator:function(r,e,t,n,a,i,o){if("^"===t){var s=a;a=i,i=s}var c,u=new d(r,e,n,o);if(l.createRenderers(u,r,e,a,i,o),n instanceof b.Call)c=n.value(r,u);else if(n instanceof b.Bracket)c=n.value(r);else if(n instanceof b.Lookup)c=n.value(r);else if(n instanceof b.Literal)c=n.value.bind(n);else if(n instanceof b.Helper&&n.methodExpr instanceof b.Bracket)c=n.methodExpr.value(r,u);else if("function"==typeof(c=n.value(r,u)))return c;return!t||u.metadata.rendered?c:"#"===t||"^"===t?function(){var e,t=k.getValue(c);if(u.metadata.rendered)e=t;else if("string"!=typeof t&&k.isListLike(t)){var n=k.isObservableLike(t)&&k.isListLike(t);e=k.getKeyValue(t,"length")?o?l.getItemsStringContent(t,n,u):w(l.getItemsFragContent(t,u,r)):u.inverse(r)}else e=t?u.fn(t||r):u.inverse(r);return u.metadata.rendered=!1,e}:void 0},makeLiveBindingPartialRenderer:function(e,n){var u,l=(e=e.trim()).split(/\s+/).shift();return l!==e&&(u=q.expression.parse(e)),function(s,e){var c=[this];c.expression=">"+l,y.register(c,null,e||!0,n.directlyNested);var t=new g(function(){var t=l,n=s;if(u&&1===u.argExprs.length){var e=k.getValue(u.argExprs[0].value(s));void 0===e||(n=s.add(e))}var r,a=k.getKeyValue(n.templateContext.partials,t);if(a)r=function(){return a.render?a.render(n,c):a(n)};else{var i=n.read(t,{isArgument:!0}).value;if(null===i||!i&&"*"===t[0])return w("");i&&(t=i),r=function(){if("function"==typeof t)return t(n,{},c);var e=q.getTemplateById(t);return e?e(n,{},c):f().createDocumentFragment()}}var o=m.ignore(r)();return w(o)});k.setPriority(t,c.nesting),v.html(this,t,this.parentNode,c)}},makeStringBranchRenderer:function(i,e,t){var o=q.expression.parse(e),s=i+e,n=function(e,t,n){var r,a=e.__cache[s];return!i&&a||(a=S(e,null,i,o,t,n,!0),i||(e.__cache[s]=a)),null==(r=a[_.for("can.onValue")]?k.getValue(a):a())?"":""+r};return n.exprData=o,n},makeLiveBindingBranchRenderer:function(f,d,p){var h=q.expression.parse(d),e=function(e,t,n,r){var a=p.tag,i=[this];i.expression=d,y.register(i,null,t||!0,p.directlyNested);var o,s=S(e,i,f,h,n,r,a);if(o=s[_.for("can.onValue")]?s:new g(s,null,{isObservable:!1}),!1===k.setPriority(o,i.nesting))throw new Error("can-stache unable to set priority on observable");k.onValue(o,O);var c=k.getValue(o);if("function"!=typeof c||h instanceof b.Lookup){if(k.valueHasDependencies(o))p.attr?v.attr(this,p.attr,o):p.tag?v.attrs(this,o):p.text&&!L(c)?v.text(this,o,this.parentNode,i):v.html(this,o,this.parentNode,{nodeList:i});else if(p.attr)x.setAttribute(this,p.attr,c);else if(p.tag)v.attrs(this,c);else if(p.text&&!L(c))this.nodeValue=v.makeString(c);else if(null!=c)if("function"==typeof c[E]){var u=c[E]({nodeList:i}),l=y.update(i,[u]);y.replace(l,u)}else y.replace([this],w(c,this.ownerDocument))}else m.ignore(c)(this);k.offValue(o,O)};return e.exprData=h,e},splitModeFromExpression:function(e,t){var n=(e=e.trim()).charAt(0);return 0<="#/{&^>!<".indexOf(n)?e=e.substr(1).trim():n=null,"{"===n&&t.node&&(n=null),{mode:n,expression:e}},cleanLineEndings:function(e){return e.replace(o,function(e,t,n,r,a,i,o,s,c,u){i=i||"",t=t||"",n=n||"";var l=p(a||c,{});return s||0<=">{".indexOf(l.mode)?e:0<="^#!/".indexOf(l.mode)?(n=t+n&&" ")+r+(0!==u&&o.length?t+"\n":""):n+r+i+(n.length||0!==u?t+"\n":"")})},cleanWhitespaceControl:function(e){return e.replace(s,function(e,t,n,r,a,i,o,s,c){return"-"===r&&(t=""),"-"===i&&(s=""),t+n+a+o+s})},getTemplateById:function(){}},S=q.makeEvaluator,p=q.splitModeFromExpression;r.exports=q}(0,e,0,n)}),define("can-globals/base-url/base-url",["require","exports","module","can-globals/can-globals-instance","can-globals/global/global","can-globals/document/document"],function(e,t,n){!function(e,t,n,r){"use strict";var a=t("can-globals/can-globals-instance");t("can-globals/global/global"),t("can-globals/document/document"),a.define("base-url",function(){var e=a.getKeyValue("global"),t=a.getKeyValue("document");if(t&&"baseURI"in t)return t.baseURI;if(e.location){var n=e.location.href,r=n.lastIndexOf("/");return-1!==r?n.substr(0,r):n}return"undefined"!=typeof process?process.cwd():void 0}),r.exports=a.makeExport("base-url")}(0,e,0,n)}),define("can-parse-uri",["require","exports","module","can-namespace"],function(e,t,n){"use strict";var r=e("can-namespace");n.exports=r.parseURI=function(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}}),define("can-join-uris",["require","exports","module","can-namespace","can-parse-uri"],function(e,t,n){"use strict";var r=e("can-namespace"),a=e("can-parse-uri");n.exports=r.joinURIs=function(e,t){return t=a(t||""),e=a(e||""),t&&e?(t.protocol||e.protocol)+(t.protocol||t.authority?t.authority:e.authority)+(n=t.protocol||t.authority||"/"===t.pathname.charAt(0)?t.pathname:t.pathname?(e.authority&&!e.pathname?"/":"")+e.pathname.slice(0,e.pathname.lastIndexOf("/")+1)+t.pathname:e.pathname,r=[],n.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?r.pop():r.push(e)}),r.join("").replace(/^\//,"/"===n.charAt(0)?"/":""))+(t.protocol||t.authority||t.pathname?t.search:t.search||e.search)+t.hash:null;var n,r}}),define("can-stache/helpers/-debugger",["require","exports","module","can-log"],function(e,t,n){"use strict";var r=e("can-log");function a(){}var i=a,o=a;function s(e,t){r.warn("Forgotten {{debugger}} helper")}s.requiresOptionsArgument=!0,n.exports={helper:s,evaluateArgs:o,resolveValue:i,__testing:{}}}),define("can-stache/src/truthy-observable",["require","exports","module","can-observation","can-reflect"],function(e,t,n){"use strict";var r=e("can-observation"),a=e("can-reflect");n.exports=function(e){return new r(function(){return!!a.getValue(e)})}}),define("can-stache/helpers/converter",["require","exports","module","can-stache/src/set-identifier","can-reflect"],function(e,t,n){"use strict";var a=e("can-stache/src/set-identifier"),i=e("can-reflect");n.exports=function(r){return r=r||{},function(e,t){var n=i.toArray(arguments);return e instanceof a?"function"==typeof r.set?r.set.apply(this,[e.value].concat(n.slice(1))):t(e.value):"function"==typeof r.get?r.get.apply(this,n):n[0]}}}),define("can-dom-data",["require","exports","module","can-namespace"],function(e,t,n){"use strict";var r=e("can-namespace"),a=new WeakMap,i=function(e){var t=!1;return a.has(e)&&(t=!0,a.delete(e)),t},o={_data:a,get:function(e,t){var n=a.get(e);return void 0===t?n:n&&n[t]},set:function(e,t,n){var r=a.get(e);return void 0===r&&(r={},a.set(e,r)),void 0!==t&&(r[t]=n),r},clean:function(e,t){var n=a.get(e);n&&n[t]&&delete n[t],function(e){for(var t in e)return!1;return!0}(n)&&i(e)},delete:i};if(r.domData)throw new Error("You can't have two versions of can-dom-data, check your dependencies");n.exports=r.domData=o}),define("can-stache/helpers/-for-of",["require","exports","module","can-reflect","can-observation","can-view-live","can-view-nodelist","can-stache/src/expression","can-stache/src/key-observable"],function(e,t,n){var p=e("can-reflect"),h=e("can-observation"),v=e("can-view-live"),y=e("can-view-nodelist"),g=e("can-stache/src/expression"),m=e("can-stache/src/key-observable");var r=function(r){if(1!==r.exprData.argExprs.length)throw new Error("for(of) broken syntax");var a,e,t=r.exprData.argExprs[0].expr;if(t instanceof g.Lookup)e=t.value(r.scope);else if(t instanceof g.Helper){if("of"!==t.argExprs[0].key)throw new Error("for(of) broken syntax");a=t.methodExpr.key,e=t.argExprs[1].value(r.scope)}var n,i,o,s,c,u=e,l=[].slice.call(arguments).pop(),f=(n=u)&&p.isValueLike(n)?(h.temporarilyBind(n),p.getValue(n)):n;if(f&&!p.isListLike(f))return i=f,o=a,s=r,c=[],p.each(i,function(e,t){var n=new m(i,t),r={};void 0!==o&&(r[o]=n),c.push(s.fn(s.scope.add({key:t},{special:!0}).addLetContext(r)))}),s.stringOnly?c.join(""):c;if(l.stringOnly){var d=[];return p.eachIndex(f,function(e,t){var n={};void 0!==a&&(n[a]=e),d.push(r.fn(l.scope.add({index:t},{special:!0}).addLetContext(n)))}),d.join("")}return l.metadata.rendered=!0,function(e){var t=[e];t.expression="live.list",y.register(t,null,l.nodeList,!0),y.update(l.nodeList,[e]);v.list(e,u,function(e,t,n){var r={};return void 0!==a&&(r[a]=e),l.fn(l.scope.add({index:t},{special:!0}).addLetContext(r),l.options,n)},l.context,e.parentNode,t,function(e,t){return l.inverse(l.scope,l.options,t)})}};r.isLiveBound=!0,r.requiresOptionsArgument=!0,r.ignoreArgLookup=function(e){return 0===e},n.exports=r}),define("can-stache/helpers/-let",["require","exports","module","can-reflect"],function(e,t,n){var r=e("can-reflect");function a(e){return!0===e._meta.variable}n.exports=function(e){if(e.isSection)return e.fn(e.scope.addLetContext(e.hash));var t=e.scope.getScope(a);if(!t)throw new Error("There is no variable scope!");return r.assignMap(t._context,e.hash),document.createTextNode("")}}),define("can-stache/helpers/-portal",["require","exports","module","can-reflect","can-view-live","can-view-nodelist","can-observation","can-globals/document/document","can-dom-mutate","can-dom-mutate/node"],function(e,t,n){!function(e,t,n,r){var u=t("can-reflect"),l=t("can-view-live"),f=t("can-view-nodelist"),d=t("can-observation"),p=t("can-globals/document/document"),h=t("can-dom-mutate"),v=t("can-dom-mutate/node");function a(i,o){function n(){return o.fn(o.scope.addLetContext({}),o.options)}var r,a;function s(){r&&(u.offValue(i,c),r=null),a&&(f.remove(a),a=null)}function c(){if(s(),r=u.getValue(i)){var e=p().createTextNode("");v.appendChild.call(r,e),(a=[e]).expression="live.html",f.register(a,null,null,!0);var t=new d(n,null,{isObservable:!1});l.html(e,t,r,a),u.onValue(i,c),h.onNodeRemoval(r,s)}}return c(),function(e){var t=p(),n=t.createComment("portal("+u.getName(i)+")"),r=t.createDocumentFragment();v.appendChild.call(r,n),f.replace([e],r);var a=[n];a.expression="portal",f.register(a,s,o.nodeList,!0),f.update(o.nodeList,[n])}}a.isLiveBound=!0,a.requiresOptionsArgument=!0,r.exports=a}(0,e,0,n)}),define("can-stache/helpers/core",["require","exports","module","can-view-live","can-view-nodelist","can-stache/src/utils","can-globals/base-url/base-url","can-join-uris","can-assign","can-log/dev/dev","can-reflect","can-stache/helpers/-debugger","can-stache/src/key-observable","can-observation","can-stache/src/truthy-observable","can-stache-helpers","can-stache/helpers/converter","can-dom-data","can-dom-data-state","can-stache/helpers/-for-of","can-stache/helpers/-let","can-stache/helpers/-portal"],function(e,t,n){!function(e,t,n,r){"use strict";var c=t("can-view-live"),u=t("can-view-nodelist"),l=t("can-stache/src/utils"),s=t("can-globals/base-url/base-url"),f=t("can-join-uris"),a=t("can-assign"),d=(t("can-log/dev/dev"),t("can-reflect")),i=t("can-stache/helpers/-debugger").helper,p=t("can-stache/src/key-observable"),o=t("can-observation"),h=t("can-stache/src/truthy-observable"),v=t("can-stache-helpers"),y=t("can-stache/helpers/converter"),g=t("can-dom-data"),m=t("can-dom-data-state"),b=t("can-stache/helpers/-for-of"),w=t("can-stache/helpers/-let"),x=t("can-stache/helpers/-portal"),_={},k={},O=new WeakMap,E={looksLikeOptions:function(e){return e&&"function"==typeof e.fn&&"function"==typeof e.inverse},resolve:function(e){return e&&d.isValueLike(e)?d.getValue(e):e},resolveHash:function(e){var t={};for(var n in e)t[n]=E.resolve(e[n]);return t},bindAndRead:function(e){return e&&d.isValueLike(e)?(o.temporarilyBind(e),d.getValue(e)):e},registerHelper:function(e,t){t.requiresOptionsArgument=!0,v[e]=t},registerHelpers:function(e){var t,n;for(t in e)n=e[t],E.registerHelper(t,E.makeSimpleHelper(n))},registerConverter:function(e,t){E.registerHelper(e,y(t))},makeSimpleHelper:function(e){return function(){var t=[];return d.eachIndex(arguments,function(e){t.push(E.resolve(e))}),e.apply(this,t)}},addHelper:function(e,t){return"object"==typeof e?E.registerHelpers(e):E.registerHelper(e,E.makeSimpleHelper(t))},addConverter:function(e,t){if("object"!=typeof e){var n=y(t);n.isLiveBound=!0,E.registerHelper(e,n)}else O.has(e)||(O.set(e,!0),d.eachKey(e,function(e,t){E.addConverter(t,e)}))},addLiveHelper:function(e,t){return t.isLiveBound=!0,E.registerHelper(e,t)},getHelper:function(e,t){var n=t&&t.getHelper(e);return n||(n=v[e]),n},__resetHelpers:function(){for(var e in v)delete v[e];O.delete(k),E.addBuiltInHelpers(),E.addBuiltInConverters()},addBuiltInHelpers:function(){d.each(_,function(e,t){v[t]=e})},addBuiltInConverters:function(){E.addConverter(k)},_makeLogicHelper:function(e,r){return a(function(){var e,t=Array.prototype.slice.call(arguments,0);E.looksLikeOptions(t[t.length-1])&&(e=t.pop());var n=new o(function(){return e?!!r(t):r(t)});return e?n.get()?e.fn():e.inverse():n.get()},{requiresOptionsArgument:!0,isLiveBound:!0})}},L=a(function(e,t){return(e&&d.isValueLike(e)?d.getValue(new h(e)):!!E.resolve(e))?t.fn(t.scope||this):t.inverse(t.scope||this)},{requiresOptionsArgument:!0,isLiveBound:!0}),q=E._makeLogicHelper("eq",function(e){for(var t,n,r=0;r<e.length;r++){if(t="function"==typeof(t=E.resolve(e[r]))?t():t,0<r&&t!==n)return!1;n=t}return!0}),S=E._makeLogicHelper("and",function(e){if(0===e.length)return!1;for(var t,n=0,r=e.length;n<r;n++)if(!(t=E.resolve(e[n])))return t;return t}),M=E._makeLogicHelper("or",function(e){if(0===e.length)return!1;for(var t,n=0,r=e.length;n<r;n++)if(t=E.resolve(e[n]))return t;return t}),P=function(n,e){E.resolve(n);var r=!1,t=function(e,t){if(!r&&E.resolve(n)===E.resolve(e))return r=!0,t.fn(t.scope)},a=function(e){if(!r)return!e||e.scope.peek("this")};a.requiresOptionsArgument=t.requiresOptionsArgument=!0,d.assignSymbols(a,{"can.isValueLike":!0,"can.isFunctionLike":!1,"can.getValue":function(){return this(e)}});var i=e.scope.add({case:t,default:a},{notContext:!0});return e.fn(i,e)},C=function(e){var t=[].slice.call(arguments),n=t.pop(),r=t.map(function(e){var t=E.resolve(e);return"function"==typeof t?t():t}).join(""),a=d.getKeyValue(n.scope.templateContext.helpers,"module"),i=a?a.uri:void 0;if("."===r[0]&&i)return f(i,r);var o="undefined"!=typeof System&&(System.renderingBaseURL||System.baseURL)||s();return"/"!==r[0]&&"/"!==o[o.length-1]&&(o+="/"),f(o,r)},V=function(n){var a,r,i=[].slice.call(arguments).pop(),e=i.exprData.hashExprs,t=E.bindAndRead(n);if(0<d.size(e)&&(a={},d.eachKey(e,function(e,t){a[e.key]=t})),(d.isObservableLike(t)&&d.isListLike(t)||d.isListLike(t)&&d.isValueLike(n))&&!i.stringOnly)return i.metadata.rendered=!0,function(e){var t=[e];t.expression="live.list",u.register(t,null,i.nodeList,!0),u.update(i.nodeList,[e]);c.list(e,n,function(e,t,n){var r={};return 0<d.size(a)&&(a.value&&(r[a.value]=e),a.index&&(r[a.index]=t)),i.fn(i.scope.add(r,{notContext:!0}).add({index:t},{special:!0}).add(e),i.options,n)},i.context,e.parentNode,t,function(e,t){return i.inverse(i.scope.add(e),i.options,t)})};var o,s=E.resolve(n);return s&&d.isListLike(s)?(o=l.getItemsFragContent(s,i,i.scope),i.stringOnly?o.join(""):o):d.isObservableLike(s)&&d.isMapLike(s)||s instanceof Object?(o=[],d.each(s,function(e,t){var n=new p(s,t);r={},0<d.size(a)&&(a.value&&(r[a.value]=n),a.key&&(r[a.key]=t)),o.push(i.fn(i.scope.add(r,{notContext:!0}).add({key:t},{special:!0}).add(n)))}),i.stringOnly?o.join(""):o):void 0};V.isLiveBound=C.requiresOptionsArgument=P.requiresOptionsArgument=!0,V.requiresOptionsArgument=!0,V.ignoreArgLookup=function(e){return 1===e};var j=a(function(e,t){t||(t=e,e=0);var n=t.scope.peek("scope.index");return""+(("function"==typeof n?n():n)+e)},{requiresOptionsArgument:!0}),D=function(e,t){var n=e;return t?(e=E.resolve(e),t.hash&&0<d.size(t.hash)&&(n=t.scope.add(t.hash,{notContext:!0}).add(n))):(t=e,e=!0,n=t.hash),t.fn(n||{})},I=function(e,t){return L.apply(this,[e,a(a({},t),{fn:t.inverse,inverse:t.fn})])};I.requiresOptionsArgument=D.requiresOptionsArgument=!0,I.isLiveBound=!0;var T={get:function(e,t){return E.looksLikeOptions(t)?d.getValue(e)?t.inverse():t.fn():!d.getValue(e)},set:function(e,t){d.setValue(t,!e)}};a(_,{debugger:i,each:V,eachOf:V,index:j,if:L,is:q,eq:q,unless:I,with:D,console:console,data:function(t,e){var n=(E.looksLikeOptions(e)?e.context:e)||this;return function(e){m.set.call(e,t,n)}},domData:function(t,e){var n=(E.looksLikeOptions(e)?e.context:e)||this;return function(e){g.set(e,t,n)}},switch:P,joinBase:C,and:S,or:M,let:w,for:b,portal:x}),a(k,{not:T}),E.addBuiltInHelpers(),E.addBuiltInConverters(),r.exports=E}(0,e,0,n)}),define("can-stache-ast/controls",function(e,t,n){"use strict";var r=/(?:(^|\r?\n)(\s*)(\{\{([\s\S]*)\}\}\}?)([^\S\n\r]*)($|\r?\n))|(\{\{([\s\S]*)\}\}\}?)/g,a=/(\s*)(\{\{\{?)(-?)([\s\S]*?)(-?)(\}\}\}?)(\s*)/g;function i(e,t,n,r,a,i,o,s){return"-"===r&&(t=""),"-"===i&&(s=""),t+n+a+o+s}t.cleanLineEndings=function(e){return e.replace(r,function(e,t,n,r,a,i,o,s,c,u){i=i||"",t=t||"",n=n||"";var l,f,d,p=(f={},d=(l=(l=a||c).trim()).charAt(0),0<="#/{&^>!<".indexOf(d)?l=l.substr(1).trim():d=null,"{"===d&&f.node&&(d=null),{mode:d,expression:l});return s||0<=">{".indexOf(p.mode)?e:0<="^#!/".indexOf(p.mode)?(n=t+n&&" ")+r+(0!==u&&o.length?t+"\n":""):n+r+i+(n.length||0!==u?t+"\n":"")})},t.cleanWhitespaceControl=function(e){return e.replace(a,i)}}),define("can-stache-ast",["require","exports","module","can-stache-ast/controls","can-view-parser"],function(e,t,n){"use strict";var m=e("can-stache-ast/controls"),b=e("can-view-parser");t.parse=function(e,t){1===arguments.length&&(t=arguments[0],e=void 0);var n=t;n=m.cleanWhitespaceControl(n),n=m.cleanLineEndings(n);var r=[],a=[],i=[],o={},s=new Map,c=!1,u=!1,l=!1,f=!1,d=!1,p="",h="",v=null;function y(e){p&&(o[p]=h,p=""),d?a.push(h):r.push(h),i.push({specifier:h,loc:{line:e},attributes:s}),s=new Map}var g=b(n,{filename:e,start:function(e,t){"can-import"===e?(f=t,c=!(d=!1)):"can-dynamic-import"===e?(f=t,c=d=!0):c&&(c=!(d=!0))},attrStart:function(e){v=e,s.set(v,!0),"from"===e?u=!0:"as"!==e&&"export-as"!==e||(l=!0)},attrEnd:function(e){"from"===e?u=!1:"as"!==e&&"export-as"!==e||(l=!1)},attrValue:function(e){c&&s.set(v,e),u&&c?h=e:l&&c&&(p=e)},end:function(e,t,n){"can-import"!==e&&"can-dynamic-import"!==e||!f||y(n)},close:function(e,t,n){"can-import"!==e&&"can-dynamic-import"!==e||y(n)},chars:function(e){0<e.trim().length&&(d=!0)},special:function(){d=!0}},!0);return{intermediate:g,program:g,imports:r,dynamicImports:a,importDeclarations:i,ases:o,exports:o}}}),define("can-import-module",["require","exports","module","can-globals/global/global","can-namespace"],function(e,t,n){!function(e,t,n,r){"use strict";var i=t("can-globals/global/global"),a=t("can-namespace");r.exports=a.import=function(r,a){return new Promise(function(t,n){try{var e=i();"object"==typeof e.System&&"function"==typeof e.System.import?e.System.import(r,{name:a}).then(t,n):e.define&&e.define.amd?e.require([r],function(e){t(e)}):e.require?t(e.require(r)):"undefined"!=typeof stealRequire?steal.import(r,{name:a}).then(t,n):t()}catch(e){n(e)}})}}(0,e,0,n)}),define("can-stache",["require","exports","module","can-view-parser","can-view-callbacks","can-stache/src/html_section","can-stache/src/text_section","can-stache/src/mustache_core","can-stache/helpers/core","can-stache-ast","can-stache/src/utils","can-attribute-encoder","can-log/dev/dev","can-namespace","can-globals/document/document","can-assign","can-import-module","can-reflect","can-view-scope","can-view-scope/template-context","can-observation-recorder","can-symbol","can-view-target","can-view-nodelist"],function(e,t,n){!function(e,t,n,r){"use strict";var a=t("can-view-parser"),v=t("can-view-callbacks"),y=t("can-stache/src/html_section"),g=t("can-stache/src/text_section"),m=t("can-stache/src/mustache_core"),i=t("can-stache/helpers/core"),o=t("can-stache-ast").parse,s=t("can-stache/src/utils"),b=s.makeRendererConvertScopes,w=s.last,c=(t("can-attribute-encoder"),t("can-log/dev/dev"),t("can-namespace")),u=t("can-globals/document/document"),x=t("can-assign"),l=t("can-import-module"),_=t("can-reflect"),k=t("can-view-scope"),O=t("can-view-scope/template-context"),E=t("can-observation-recorder"),f=t("can-symbol");t("can-view-target"),t("can-view-nodelist"),v.tag("content")||v.tag("content",function(e,t){return t.scope});var L=f.for("can.isView"),d="http://www.w3.org/2000/svg",q={svg:d,g:d,defs:d,path:d,filter:d,feMorphology:d,feGaussianBlur:d,feOffset:d,feComposite:d,feColorMatrix:d,use:d},S={xmlns:"http://www.w3.org/2000/xmlns/","xlink:href":"http://www.w3.org/1999/xlink"},M={style:!0,script:!0};function p(i,e){1===arguments.length&&(e=arguments[0],i=void 0);var o={};"string"==typeof e&&(e=m.cleanWhitespaceControl(e),e=m.cleanLineEndings(e));var s=new y(i),c={node:null,attr:null,sectionElementStack:[],text:!1,namespaceStack:[],textContentOnly:null},u=function(e,t,n,r){if(">"===t)e.add(m.makeLiveBindingPartialRenderer(n,f({filename:e.filename,lineNo:r})));else if("/"===t){"<"===e.last().startedWith?(o[n]=e.endSubSectionAndReturnRenderer(),e.removeCurrentNode()):e.endSection(),e instanceof y&&c.sectionElementStack.pop()}else if("else"===t)e.inverse();else{var a=e instanceof y?m.makeLiveBindingBranchRenderer:m.makeStringBranchRenderer;if("{"===t||"&"===t)e.add(a(null,n,f({filename:e.filename,lineNo:r})));else if("#"===t||"^"===t||"<"===t){var i=a(t,n,f({filename:e.filename,lineNo:r}));e.startSection(i),e.last().startedWith=t,e instanceof y&&c.sectionElementStack.push({type:"section"})}else e.add(a(null,n,f({text:!0,filename:e.filename,lineNo:r})))}},l=function(){var e=c.sectionElementStack[c.sectionElementStack.length-1];return!c.sectionElementStack.length||("section"===e.type||"custom"===e.type)},f=function(e){var t={tag:c.node&&c.node.tag,attr:c.attr&&c.attr.name,directlyNested:l(),textContentOnly:!!c.textContentOnly};return e?x(t,e):t},d=function(e,t){e.attributes||(e.attributes=[]),e.attributes.unshift(t)};a(e,{filename:i,start:function(e,t,n){var r=q[e];r&&!t&&c.namespaceStack.push(r),c.node={tag:e,children:[],namespace:r||w(c.namespaceStack)}},end:function(n,e,t){var r=v.tag(n),a=l();e?(s.add(c.node),r&&d(c.node,function(e,t){v.tagHandler(this,n,{scope:e,subtemplate:null,templateType:"stache",parentNodeList:t,directlyNested:a})})):(s.push(c.node),c.sectionElementStack.push({type:r?"custom":null,tag:r?null:n,templates:{},directlyNested:a}),r?s.startSubSection():M[n]&&(c.textContentOnly=new g(i))),c.node=null},close:function(n,e){q[n]&&c.namespaceStack.pop();var r,t=v.tag(n);t&&(r=s.endSubSectionAndReturnRenderer()),M[n]&&(s.last().add(c.textContentOnly.compile(f())),c.textContentOnly=null);var a=s.pop();if(t)if("can-template"===n){var i=c.sectionElementStack[c.sectionElementStack.length-2];r&&(i.templates[a.attrs.name]=b(r)),s.removeCurrentNode()}else{var o=c.sectionElementStack[c.sectionElementStack.length-1];d(a,function(e,t){v.tagHandler(this,n,{scope:e,subtemplate:r?b(r):r,templateType:"stache",parentNodeList:t,templates:o.templates,directlyNested:o.directlyNested})})}c.sectionElementStack.pop()},attrStart:function(e,t){c.node.section?c.node.section.add(e+'="'):c.attr={name:e,value:""}},attrEnd:function(n,e){var t=S[n];if(c.node.section)c.node.section.add('" ');else{c.node.attrs||(c.node.attrs={}),c.attr.section?c.node.attrs[c.attr.name]=c.attr.section.compile(f()):c.node.attrs[c.attr.name]=t?{value:c.attr.value,namespaceURI:S[n]}:c.attr.value;var r=v.attr(n);r&&(c.node.attributes||(c.node.attributes=[]),c.node.attributes.push(function(e,t){r(this,{attributeName:n,scope:e,nodeList:t})})),c.attr=null}},attrValue:function(e,t){var n=c.node.section||c.attr.section;n?n.add(e):c.attr.value+=e},chars:function(e,t){(c.textContentOnly||s).add(e)},special:function(e,t){var n=m.splitModeFromExpression(e,c),r=n.mode,a=n.expression;if("else"!==a){if("!"!==r)if(c.node&&c.node.section)u(c.node.section,r,a,t),0===c.node.section.subSectionDepth()&&(c.node.attributes.push(c.node.section.compile(f())),delete c.node.section);else if(c.attr)c.attr.section||(c.attr.section=new g(i),c.attr.value&&c.attr.section.add(c.attr.value)),u(c.attr.section,r,a,t);else if(c.node)if(c.node.attributes||(c.node.attributes=[]),r){if("#"!==r&&"^"!==r)throw new Error(r+" is currently not supported within a tag.");c.node.section||(c.node.section=new g(i)),u(c.node.section,r,a,t)}else c.node.attributes.push(m.makeLiveBindingBranchRenderer(null,a,f({filename:s.filename,lineNo:t})));else u(c.textContentOnly||s,r,a,t)}else(c.attr&&c.attr.section?c.attr.section:c.node&&c.node.section?c.node.section:c.textContentOnly||s).inverse()},comment:function(e){s.add({comment:e})},done:function(e){}});var p=s.compile(),h=E.ignore(function(e,t,n){void 0===n&&_.isListLike(t)&&(n=t,t=void 0),!t||t.helpers||t.partials||t.tags||(t={helpers:t}),_.eachKey(t&&t.helpers,function(e){e.requiresOptionsArgument=!0});var r=new O(t);if(_.eachKey(o,function(e,t){_.setKeyValue(r.partials,t,e)}),_.setKeyValue(r,"view",h),e instanceof k){var a=new k(r);a._parent=e._parent,e._parent=a}else e=new k(r).add(e);return p(e.addLetContext(),n)});return h[L]=!0,h}x(p,i),p.safeString=function(e){return _.assignSymbols({},{"can.toDOM":function(){return e}})},p.async=function(e){var t=o(e),n=t.imports.map(function(e){return l(e)});return Promise.all(n).then(function(){return p(t.intermediate)})};var h={};p.from=m.getTemplateById=function(e){if(!h[e]){var t=u().getElementById(e);t&&(h[e]=p("#"+e,t.innerHTML))}return h[e]},p.registerPartial=function(e,t){h[e]="string"==typeof t?p(t):t},p.addBindings=v.attrs,r.exports=c.stache=p}(0,e,0,n)}),define("can-view-model",["require","exports","module","can-simple-map","can-namespace","can-globals/document/document","can-reflect","can-symbol"],function(e,t,n){!function(e,t,n,r){"use strict";var a=t("can-simple-map"),i=t("can-namespace"),o=t("can-globals/document/document"),s=t("can-reflect"),c=t("can-symbol").for("can.viewModel");r.exports=i.viewModel=function(e,t,n){if("string"==typeof e?e=o().querySelector(e):s.isListLike(e)&&!e.nodeType&&(e=e[0]),s.isObservableLike(t)&&s.isMapLike(t))e[c]=t;else{var r=e[c];switch(r||(r=new a,e[c]=r),arguments.length){case 0:case 1:return r;case 2:return s.getKeyValue(r,t);default:return s.setKeyValue(r,t,n),e}}}}(0,e,0,n)}),define("can-attribute-observable/event",["require","exports","module","can-reflect","can-dom-events","can-dom-events/helpers/util"],function(e,t,n){"use strict";var r=e("can-reflect"),a=e("can-dom-events"),i=e("can-dom-events/helpers/util").isDomEventTarget,o={on:function(e,t,n){i(this)?a.addEventListener(this,e,t,n):r.onKeyValue(this,e,t,n)},off:function(e,t,n){i(this)?a.removeEventListener(this,e,t,n):r.offKeyValue(this,e,t,n)},one:function(e,t,n){var r=function(){return o.off.call(this,e,r,n),t.apply(this,arguments)};return o.on.call(this,e,r,n),this}};n.exports=o}),define("can-attribute-observable/get-event-name",["require","exports","module","can-attribute-observable/behaviors"],function(e,t,n){"use strict";var a=e("can-attribute-observable/behaviors");n.exports=function(e,t){var n,r="change";return"input"===(n=e).nodeName.toLowerCase()&&"radio"===n.type&&"checked"===t&&(r="can-attribute-observable-radiochange"),a.findSpecialListener(t)&&(r=t),r}}),define("can-event-dom-radiochange",["require","exports","module","can-globals/document/document","can-namespace"],function(e,t,n){!function(e,t,n,r){"use strict";var a=t("can-globals/document/document"),i=t("can-namespace");function u(){return a().documentElement}function l(e){for(;e&&"FORM"!==e.nodeName;)e=e.parentNode;return e}function f(e){return"INPUT"===e.nodeName&&"radio"===e.type}var d={defaultEventType:"radiochange",addEventListener:function(e,t,n){if(!f(e))throw new Error("Listeners for "+t+" must be radio inputs");var o,r,a,i,s=d._eventTypeTrackedRadios;s||(s=d._eventTypeTrackedRadios={},d._rootListener||(d._rootListener=(o=this,r=s,a=u(),i=function(e){var a=e.target;if(f(a))for(var t in r){var i={type:t};r[t].forEach(function(e){var t,n,r;n=e,(r=(t=a).getAttribute("name"))&&r===n.getAttribute("name")&&l(t)===l(n)&&o.dispatch(e,i,!1)})}},o.addEventListener(a,"change",i),i)));var c=d._eventTypeTrackedRadios[t];c||(c=d._eventTypeTrackedRadios[t]=new Set),c.add(e),e.addEventListener(t,n)},removeEventListener:function(e,t,n){e.removeEventListener(t,n);var r=d._eventTypeTrackedRadios;if(r){var a,i,o,s=r[t];if(s)if(s.delete(e),0===s.size){for(var c in delete r[t],r)if(r.hasOwnProperty(c))return;delete d._eventTypeTrackedRadios,a=this,i=d._rootListener,o=u(),a.removeEventListener(o,"change",i),delete d._rootListener}}}};r.exports=i.domEventRadioChange=d}(0,e,0,n)}),define("can-attribute-observable",["require","exports","module","can-queues","can-attribute-observable/event","can-reflect","can-observation","can-attribute-observable/behaviors","can-attribute-observable/get-event-name","can-reflect-dependencies","can-observation-recorder","can-simple-observable/settable/settable","can-assign","can-symbol","can-dom-events","can-event-dom-radiochange"],function(e,t,n){!function(e,t,n,r){"use strict";var a=t("can-queues"),i=t("can-attribute-observable/event"),o=t("can-reflect"),s=t("can-observation"),c=t("can-attribute-observable/behaviors"),u=t("can-attribute-observable/get-event-name"),l=(t("can-reflect-dependencies"),t("can-observation-recorder")),f=t("can-simple-observable/settable/settable"),d=t("can-assign"),p=t("can-symbol"),h=p.for("can.onValue"),v=p.for("can.offValue"),y=p.for("can.onEmit"),g=p.for("can.offEmit"),m=t("can-dom-events"),b=t("can-event-dom-radiochange"),w="can-attribute-observable-radiochange";m.addEvent(b,w);var x=function(e,t){return"select"===e.nodeName.toLowerCase()&&"value"===t&&e.multiple},_=Array.prototype.slice;function k(){var e=_.call(arguments,0);return e.unshift(this),m.addEventListener.apply(null,e)}function O(){var e=_.call(arguments,0);return e.unshift(this),m.removeEventListener.apply(null,e)}function E(e,t,n,r){"string"==typeof n&&(r=n,n=void 0),this.el=e,this.bound=!1,this.prop=x(e,t)?"values":t,this.event=r||u(e,t),this.handler=this.handler.bind(this),void 0!==r&&(this[h]=null,this[v]=null,this[y]=E.prototype.on,this[g]=E.prototype.off)}d(E.prototype=Object.create(f.prototype),{constructor:E,get:function(){l.isRecording()&&(l.add(this),this.bound||s.temporarilyBind(this));var e=c.get(this.el,this.prop);return"function"==typeof e&&(e=e.bind(this.el)),e},set:function(e){return c.setAttrOrProp(this.el,this.prop,e)||(this._value=e),e},handler:function(e,t){var n=this._value,r=[];this._value=c.get(this.el,this.prop),void 0===t&&this._value===n||(r=[this.handlers.getNode([]),this,[e,n]],a.enqueueByQueue.apply(a,r))},onBound:function(){var t=this;t.bound=!0,t._handler=function(e){t.handler(c.get(t.el,t.prop),e)},t.event===w&&i.on.call(t.el,"change",t._handler);var e=c.findSpecialListener(t.prop);e&&(t._specialDisposal=e.call(t.el,t.prop,t._handler,k)),i.on.call(t.el,t.event,t._handler),this._value=c.get(this.el,this.prop)},onUnbound:function(){var e=this;e.bound=!1,e.event===w&&i.off.call(e.el,"change",e._handler),e._specialDisposal&&(e._specialDisposal.call(e.el,O),e._specialDisposal=null),i.off.call(e.el,e.event,e._handler)},valueHasDependencies:function(){return!0},getValueDependencies:function(){var e=new Map,t=new Set;return t.add(this.prop),e.set(this.el,t),{keyDependencies:e}}}),o.assignSymbols(E.prototype,{"can.isMapLike":!1,"can.getValue":E.prototype.get,"can.setValue":E.prototype.set,"can.onValue":E.prototype.on,"can.offValue":E.prototype.off,"can.valueHasDependencies":E.prototype.hasDependencies,"can.getValueDependencies":E.prototype.getValueDependencies}),r.exports=E}(0,e,0,n)}),define("can-stache-bindings",["require","exports","module","can-bind","can-stache/src/expression","can-view-callbacks","can-view-model","can-stache-key","can-observation-recorder","can-simple-observable","can-assign","can-log/dev/dev","can-dom-mutate","can-dom-data-state","can-symbol","can-reflect","can-reflect-dependencies","can-attribute-encoder","can-queues","can-simple-observable/setter/setter","can-attribute-observable","can-view-scope/make-compute-like","can-view-nodelist","can-event-queue/map/map"],function(e,t,n){"use strict";var l=e("can-bind"),y=e("can-stache/src/expression"),r=e("can-view-callbacks"),g=e("can-view-model"),f=e("can-stache-key"),u=e("can-observation-recorder"),d=e("can-simple-observable"),m=e("can-assign"),b=(e("can-log/dev/dev"),e("can-dom-mutate")),p=e("can-dom-data-state"),c=e("can-symbol"),w=e("can-reflect"),h=e("can-reflect-dependencies"),x=e("can-attribute-encoder"),_=e("can-queues"),v=e("can-simple-observable/setter/setter"),k=e("can-attribute-observable"),O=e("can-view-scope/make-compute-like"),E=e("can-view-nodelist"),L=e("can-event-queue/map/map"),a=new Map,q="viewModel",S=function(){throw new Error("can-stache-bindings - you can not have contextual bindings ( this:from='value' ) and key bindings ( prop:from='value' ) on one element.")},M=c.for("can.onKeyValue"),i={viewModel:function(i,o,e,t,n){var s,a=[],c={},u={},l=m({},t),f={isSettingOnViewModel:!1,isSettingViewModel:!1,initialViewModelData:t||{}},d=!1;if(w.eachListLike(i.attributes||[],function(e){var t=T(e,i,{templateType:o.templateType,scope:o.scope,getViewModel:function(){return s},attributeViewModelBindings:l,alreadyUpdatedChild:!0,nodeList:o.parentNodeList,favorViewModel:!0});if(t){var n=t.bindingInfo;if(f=function(e,t){var n=t.parentToChild&&t.child===q;if(!n)return e;var r=t.childName;if(!n||"this"!==r&&"."!==r){if(!e.isSettingViewModel)return{isSettingOnViewModel:!0,initialViewModelData:e.initialViewModelData};S()}else{if(!e.isSettingViewModel&&!e.isSettingOnViewModel)return{isSettingViewModel:!0,initialViewModelData:void 0};S()}}(f,n),d=!0,n.parentToChild){var r=n.stickyParentToChild?O(t.parent):t.canBinding.parentValue;void 0!==r&&(f.isSettingViewModel?f.initialViewModelData=r:f.initialViewModelData[A(n.childName,o.scope)]=r)}a.push(t.canBinding.start.bind(t.canBinding)),c[e.name]=t.canBinding.stop.bind(t.canBinding)}}),!n||d){s=e(f.initialViewModelData,d,f);for(var r=0,p=a.length;r<p;r++)a[r]();var h;return f.isSettingViewModel||(h=b.onNodeAttributeChange(i,function(e){var t=e.attributeName,n=i.getAttribute(t);c[t]&&c[t]();var r=u[t]&&"attribute"===u[t].parent;if(null!==n||r){var a=T({name:t,value:n},i,{templateType:o.templateType,scope:o.scope,getViewModel:function(){return s},attributeViewModelBindings:l,initializeValues:!0,nodeList:o.parentNodeList});a&&(a.canBinding.start(),u[t]=a.bindingInfo,c[t]=a.canBinding.stop.bind(a.canBinding))}})),function(){for(var e in h&&(h(),h=void 0),c)c[e]()}}},data:function(a,i){if(!p.get.call(a,"preventDataBindings")){var e,o,t,n,s=u.ignore(function(){return e||(e=g(a))}),r=T({name:i.attributeName,value:a.getAttribute(i.attributeName),nodeList:i.nodeList},a,{templateType:i.templateType,scope:i.scope,getViewModel:s,syncChildWithParent:!1});r.canBinding.start();var c=function(){o&&(o(),o=void 0),n&&(n(),n=void 0),t&&(t(),t=void 0)};i.nodeList&&E.register([],c,i.nodeList,!1),o=r.canBinding.stop.bind(r.canBinding),t=b.onNodeAttributeChange(a,function(e){var t=e.attributeName,n=a.getAttribute(t);if(t===i.attributeName&&(o&&o(),null!==n)){var r=T({name:t,value:n},a,{templateType:i.templateType,scope:i.scope,getViewModel:s,initializeValues:!0,nodeList:i.nodeList,syncChildWithParent:!1});r&&(r.canBinding.start(),o=r.canBinding.stop.bind(r.canBinding)),o=r.onTeardown}}),n=b.onNodeRemoval(a,function(){var e=a.ownerDocument,t=e.contains?e:e.documentElement;t&&!1!==t.contains(a)||c()})}},event:function(d,p){var e,h,v=x.decode(p.attributeName);if(-1!==v.indexOf(":to:")||-1!==v.indexOf(":from:")||-1!==v.indexOf(":bind:"))return this.data(d,p);if(!C.call(v,"on:"))throw new Error("can-stache-bindings - unsupported event bindings "+v);e=v.substr("on:".length);var t=d[c.for("can.viewModel")],n=p.scope;if(C.call(e,"el:"))e=e.substr("el:".length),h=d;else{C.call(e,"vm:")?(e=e.substr("vm:".length),n=h=t):h=t||d;var r=e.indexOf(":by:");0<=r&&(h=n.get(e.substr(r+":by:".length)),e=e.substr(0,r))}var a,i,o=function(e){var t=d.getAttribute(x.encode(v));if(t){var n,r,a,i=g(d),o=y.parse(t,{lookupRule:function(){return y.Lookup},methodRule:"call"}),s=(n=arguments,r=p,a={element:d,event:e,viewModel:i,arguments:void 0!==h[M]?Array.prototype.slice.call(n,1):n,args:n},r.scope.add(a,{special:!0}));if(o instanceof y.Hashes){var c=o.hashExprs,u=Object.keys(c)[0],l=o.hashExprs[u].value(s),f=w.isObservableLike(l)&&w.isValueLike(l);s.set(u,f?w.getValue(l):l)}else{if(!(o instanceof y.Call))throw new Error("can-stache-bindings: Event bindings must be a call expression. Make sure you have a () in "+p.attributeName+"="+JSON.stringify(t));!function(t,e,n,r,a,i,o){_.batch.start();var s;s=[function(){var e=a.value(r,{doNotWrapInObservation:!0});return"function"==typeof(e=w.isValueLike(e)?w.getValue(e):e)?e(t):e},null,null,{}],_.mutateQueue.enqueue.apply(_.mutateQueue,s),_.batch.stop()}(d,0,0,s,o)}}},s=function(){L.off.call(h,e,o),a&&(a(),a=void 0),i&&(i(),i=void 0)};L.on.call(h,e,o),a=b.onNodeAttributeChange(d,function(e){var t=e.attributeName===v,n=!d.getAttribute(v);t&&n&&s()}),i=b.onNodeRemoval(d,function(){var e=d.ownerDocument,t=e.contains?e:e.documentElement;t&&t.contains(d)||s()})}};a.set(/[\w\.:]+:to$/,i.data),a.set(/[\w\.:]+:from$/,i.data),a.set(/[\w\.:]+:bind$/,i.data),a.set(/[\w\.:]+:raw$/,i.data),a.set(/[\w\.:]+:to:on:[\w\.:]+/,i.data),a.set(/[\w\.:]+:from:on:[\w\.:]+/,i.data),a.set(/[\w\.:]+:bind:on:[\w\.:]+/,i.data),a.set(/on:[\w\.:]+/,i.event);var P={viewModelOrAttribute:function(e,t,n,r,a,i,o){return e[c.for("can.viewModel")]?this.viewModel.apply(this,arguments):this.attribute.apply(this,arguments)},scope:function(e,a,r,t,n,i){if(r){if(n||0<=r.indexOf("(")||0<=r.indexOf("=")){var o=y.parse(r,{baseMethodType:"Call"});return o instanceof y.Hashes?new d(function(){var e=o.hashExprs,t=Object.keys(e)[0],n=o.hashExprs[t].value(a),r=w.isObservableLike(n)&&w.isValueLike(n);a.set(t,r?w.getValue(n):n)}):o.value(a)}var s={};w.assignSymbols(s,{"can.getValue":function(){},"can.valueHasDependencies":function(){return!1},"can.setValue":function(e){var t=y.parse(A(r,a),{baseMethodType:"Call"}).value(a);w.setValue(t,e)},"can.getWhatIChange":function(){var e=a.getDataForScopeSet(A(r,a)),t=new Map,n=new Set;return n.add(e.key),t.set(e.parent,n),{mutate:{keyDependencies:t}}},"can.getName":function(){}});var c=a.getDataForScopeSet(A(r,a));return c.parent&&c.key&&h.addMutatedBy(c.parent,c.key,s),s}return new d},viewModel:function(e,t,n,r,a,i,o){var s=A(n,t),c="."===n||"this"===n,u=c?[]:f.reads(n);return new v(function(){var e=r.getViewModel();return f.read(e,u,{}).value},function(e){var t=r.getViewModel();if(i){var n=w.getKeyValue(t,s);w.isObservableLike(n)?w.setValue(n,e):w.setKeyValue(t,s,new d(w.getValue(i)))}else c?w.setValue(t,e):w.setKeyValue(t,s,e)})},attribute:function(e,t,n,r,a,i,o,s){return"this"===n?w.assignSymbols({},{"can.getValue":function(){return e},"can.valueHasDependencies":function(){return!1},"can.getName":function(){}}):new k(e,n,{},o)}},C=String.prototype.startsWith||function(e){return 0===this.indexOf(e)};var V={to:{childToParent:!0,parentToChild:!1,syncChildWithParent:!1},from:{childToParent:!1,parentToChild:!0,syncChildWithParent:!1},bind:{childToParent:!0,parentToChild:!0,syncChildWithParent:!0},raw:{childToParent:!1,parentToChild:!0,syncChildWithParent:!1}},j=[],D={vm:!0,on:!0};w.each(V,function(e,t){j.push(t),D[t]=!0});var I=function(e,t,n,r,a){var i,o,s,c,u,l,f,d=x.decode(e.name),p=e.value||"",h=(c=d.split(":"),u={tokens:[],special:{}},c.forEach(function(e){D[e]?u.special[e]=u.tokens.push(e)-1:u.tokens.push(e)}),u);if(j.forEach(function(e){if(void 0!==h.special[e]&&0<h.special[e])return o=e,s=h.special[e],!1}),o){var v=function(e){if(void 0!==e.special.on)return e.tokens[e.special.on+1]}(h),y=!v||"bind"===o;return i=m({parent:"scope",child:(l=h.tokens,f=a,0<=l.indexOf("vm")?q:0<=l.indexOf("el")?"attribute":f?q:"viewModelOrAttribute"),childName:h.tokens[s-1],childEvent:v,bindingAttributeName:d,parentName:h.special.raw?'"'+p+'"':p,initializeValues:y},V[o]),"~"===p.trim().charAt(0)&&(i.stickyParentToChild=!0),i}},T=function(e,t,n){var r=I(e,n.attributeViewModelBindings,n.templateType,t.nodeName.toLowerCase(),n.favorViewModel);if(r){var a=P[r.parent](t,n.scope,r.parentName,n,r.parentToChild,void 0,void 0,r),i=P[r.child](t,n.scope,r.childName,n,r.childToParent,r.stickyParentToChild&&a,r.childEvent,r),o=!!r.childToParent,s=!!r.parentToChild,c={child:i,childToParent:o,cycles:!0===o&&!0===s?0:100,onInitDoNotUpdateChild:n.alreadyUpdatedChild||!1===r.initializeValues,onInitDoNotUpdateParent:!1===r.initializeValues,onInitSetUndefinedParentIfChildIsDefined:!0,parent:a,parentToChild:s,priority:n.nodeList?n.nodeList.nesting+1:void 0,queue:"domUI",sticky:r.syncChildWithParent?"childSticksToParent":void 0},u=new l(c);return u.startParent(),{bindingInfo:r,canBinding:u,parent:a}}},A=function(e,t){return e.replace(/@/g,"")},o={behaviors:i,getBindingInfo:I,bindings:a};o[c.for("can.callbackMap")]=a,r.attrs(o),n.exports=o}),define("can-component",["require","exports","module","can-component/control/control","can-namespace","can-bind","can-construct","can-stache","can-stache-bindings","can-view-scope","can-view-callbacks","can-view-nodelist","can-reflect","can-stache-key","can-simple-observable/setter/setter","can-simple-observable","can-simple-map","can-define/map/map","can-log","can-log/dev/dev","can-assign","can-observation-recorder","can-view-model","can-define/list/list","can-dom-data-state","can-child-nodes","can-string","can-dom-events","can-dom-mutate","can-dom-mutate/node","can-symbol","can-globals/document/document"],function(e,t,n){!function(e,t,n,r){"use strict";var a=t("can-component/control/control"),i=t("can-namespace"),_=t("can-bind"),o=t("can-construct"),k=t("can-stache"),O=t("can-stache-bindings"),E=t("can-view-scope"),s=t("can-view-callbacks"),L=t("can-view-nodelist"),q=t("can-reflect"),S=t("can-stache-key"),M=t("can-simple-observable/setter/setter"),c=t("can-simple-observable"),P=t("can-simple-map"),u=t("can-define/map/map"),l=t("can-log"),f=(t("can-log/dev/dev"),t("can-assign")),C=t("can-observation-recorder");t("can-view-model"),t("can-define/list/list");var V=t("can-dom-data-state"),j=t("can-child-nodes"),d=t("can-string"),D=t("can-dom-events"),I=t("can-dom-mutate"),T=t("can-dom-mutate/node"),p=t("can-symbol"),A=t("can-globals/document/document"),N=p("can.createdByCanComponent"),K=p.for("can.getValue"),R=p.for("can.setValue"),h=p.for("can.viewInsert"),B=p.for("can.viewModel");function v(e,t,n){var r;V.set.call(e,"preventDataBindings",!0);var a=O.behaviors.viewModel(e,n,function(e,t,n){return r=n&&!0===n.isSettingOnViewModel?new P(e):new c(e)},void 0,!0);return a?f(f({},t),{teardown:a,scope:t.scope.add(r)}):t}function H(l,f,e,d,p){var h=e.options;return function e(t,n){var r=p(t)||n.subtemplate,a=r!==n.subtemplate;if(r){var i;delete h.tags[l],i=a?d.toLightContent?v(t,{scope:n.scope.cloneFromRef(),options:n.options},n):v(t,f,n):v(t,n,n);var o=L.register([t],function(){i.teardown&&i.teardown()},n.parentNodeList||!0,n.directlyNested);o.expression="<can-slot name='"+t.getAttribute("name")+"'/>";var s=r(i.scope,i.options,o),c=q.toArray(j(s)),u=L.update(o,c);L.replace(u,s),h.tags[l]=e}}}k.addBindings(O);var y=o.extend({setup:function(){if(o.setup.apply(this,arguments),y){var n=this;void 0!==this.prototype.events&&0!==q.size(this.prototype.events)&&(this.Control=a.extend(this.prototype.events));var e=this.prototype.viewModel||this.prototype.scope;if(e&&this.prototype.ViewModel)throw new Error("Cannot provide both a ViewModel and a viewModel property");var t=d.capitalize(d.camelize(this.prototype.tag))+"VM";if(this.prototype.ViewModel?"function"==typeof this.prototype.ViewModel?this.ViewModel=this.prototype.ViewModel:this.ViewModel=u.extend(t,{},this.prototype.ViewModel):e?"function"==typeof e?q.isObservableLike(e.prototype)&&q.isMapLike(e.prototype)?this.ViewModel=e:this.viewModelHandler=e:q.isObservableLike(e)&&q.isMapLike(e)?this.viewModelInstance=e:(l.warn("can-component: "+this.prototype.tag+" is extending the viewModel into a can-simple-map"),this.ViewModel=P.extend(t,{},e)):this.ViewModel=P.extend(t,{},{}),this.prototype.template&&(this.renderer=this.prototype.template),this.prototype.view&&(this.renderer=this.prototype.view),"string"==typeof this.renderer){var r=d.capitalize(d.camelize(this.prototype.tag))+"View";this.renderer=k(r,this.renderer)}s.tag(this.prototype.tag,function(e,t){void 0===e[N]&&new n(e,t)})}}},{setup:function(i,o){this._initialArgs=[i,o];var s=this,n={helpers:{},tags:{}};void 0===o&&(void 0===i?o={}:(o=i,i=void 0)),void 0===i&&((i=A().createElement(this.tag))[N]=!0),this.element=i;var e=o.content;void 0!==e&&("function"==typeof e?o.subtemplate=e:"string"==typeof e&&(o.subtemplate=k(e)));var t=o.scope;void 0!==t&&t instanceof E==!1&&(o.scope=new E(t));var r=o.templates;void 0!==r&&q.eachKey(r,function(e,t){if("string"==typeof e){var n=t+" template";r[t]=k(n,e)}});var c,a,u,l,f,d=[],p=function(){for(var e=0,t=d.length;e<t;e++)d[e]()};V.get.call(i,"preventDataBindings")?c=i[B]:(l=o.setupBindings?o.setupBindings:o.viewModel?(f=o.viewModel,C.ignore(function(e,t,s){var c,u=[],l=[];q.eachKey(f,function(e,t){var n=null!=e&&!!e[K],r=null!=e&&!!e[R];if(!0===n||r){var a=S.reads(t),i=new M(function(){return S.read(c,a).value},function(e){q.setKeyValue(c,t,e)}),o=new _({child:i,parent:e,queue:"domUI"});o.startParent(),!0===n&&(s[t]=o.parentValue),u.push(o.start.bind(o)),l.push(o.stop.bind(o))}else s[t]=e}),c=t(s);for(var n=0,r=u.length;n<r;n++)u[n]();return function(){l.forEach(function(e){e()})}})):function(e,t,n){return O.behaviors.viewModel(e,o,t,n)},u=l(i,function(e){var t=s.constructor.ViewModel,n=s.constructor.viewModelHandler,r=s.constructor.viewModelInstance;if(n){var a=n.call(s,e,o.scope,i);q.isObservableLike(a)&&q.isMapLike(a)?r=a:t=q.isObservableLike(a.prototype)&&q.isMapLike(a.prototype)?a:P.extend(a)}return t&&(r=new s.constructor.ViewModel(e)),c=r},{}));if(this.viewModel=c,i[B]=c,i.viewModel=c,V.set.call(i,"preventDataBindings",!0),void 0!==this.helpers&&q.eachKey(this.helpers,function(e,t){"function"==typeof e&&(n.helpers[t]=e.bind(c))}),this.constructor.Control)this._control=new this.constructor.Control(i,{scope:this.viewModel,viewModel:this.viewModel,destroy:p});else var h=I.onNodeRemoval(i,function(){var e=i.ownerDocument,t=e.contains?e:e.documentElement;t&&t.contains(i)||(h(),p())});var v,y,g,m,b={toLightContent:!0===this.leakScope,intoShadowContent:!0===this.leakScope};!this.constructor.renderer?(y={scope:o.scope.add(this.viewModel,{viewModel:!0}),options:n},v=o.subtemplate||i.ownerDocument.createDocumentFragment.bind(i.ownerDocument)):(g=b.intoShadowContent?{scope:o.scope.add(this.viewModel,{viewModel:!0}),options:n}:{scope:new E(this.viewModel,null,{viewModel:!0}),options:n},n.tags["can-slot"]=H("can-slot",o,g,b,function(e){var t=o.templates;if(t)return t[e.getAttribute("name")]}),n.tags.content=H("content",o,g,b,function(){return o.subtemplate}),v=this.constructor.renderer,y=g);var w=L.register([],function(){s._torndown=!0,D.dispatch(i,"beforeremove",!1),u&&u(),m?m(i):"function"==typeof c.stopListening&&c.stopListening()},o.parentNodeList||!0,!1);if(w.expression="<"+this.tag+">",d.push(function(){L.unregister(w)}),this.nodeList=w,a=v(y.scope,y.options,w),T.appendChild.call(i,a),L.update(w,j(i)),c&&c.connectedCallback)if(A().body.contains(i))m=c.connectedCallback(i);else var x=I.onNodeInsertion(i,function(){x(),m=c.connectedCallback(i)});s._torndown=!1}});y.prototype[h]=function(e){return this._torndown&&this.setup.apply(this,this._initialArgs),e.nodeList.newDeepChildren.push(this.nodeList),this.element},r.exports=i.Component=y}(0,e,0,n)}),define("can/es/can-component",["exports","can-component"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-stache",["exports","can-stache"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-stache-bindings",["exports","can-stache-bindings"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-simple-observable/make-compute/make-compute",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var i=e("can-reflect"),o=new WeakMap;n.exports=function(r){var a=function(e){return arguments.length?i.setValue(this,e):i.getValue(this)}.bind(r);return a.on=a.bind=a.addEventListener=function(e,n){var t=o.get(n);t||(t=function(e,t){n.call(a,{type:"change"},e,t)},o.set(n,t)),i.onValue(r,t)},a.off=a.unbind=a.removeEventListener=function(e,t){i.offValue(r,o.get(t))},i.assignSymbols(a,{"can.getValue":function(){return i.getValue(r)},"can.setValue":function(e){return i.setValue(r,e)},"can.onValue":function(e,t){return i.onValue(r,e,t)},"can.offValue":function(e,t){return i.offValue(r,e,t)},"can.valueHasDependencies":function(){return i.valueHasDependencies(r)},"can.getPriority":function(){return i.getPriority(r)},"can.setPriority":function(e){i.setPriority(r,e)},"can.isValueLike":!0,"can.isFunctionLike":!1}),a.isComputed=!0,a}}),define("can-route/src/string-coercion",["require","exports","module","can-reflect","can-symbol"],function(e,t,n){var a=e("can-reflect"),i=e("can-symbol"),o=function(n){return n&&"object"==typeof n?(n=n&&"object"==typeof n&&"serialize"in n?n.serialize():"function"==typeof n.slice?n.slice():a.assign({},n),a.eachKey(n,function(e,t){n[t]=o(e)})):null!=n&&"function"==typeof n.toString&&(n=n.toString()),n};t.stringCoercingMapDecorator=function(e){var t=i.for("can.route.stringCoercingMapDecorator");if(!e.attr[t]){var r=e.attr;e.attr=function(e,t){var n;return n="string"!=typeof e||void 0!==this.define&&void 0!==this.define[e]&&!this.define[e].serialize?arguments:o(Array.apply(null,arguments)),r.apply(this,n)},a.setKeyValue(e.attr,t,!0)}return e},t.stringify=o}),define("can-route/src/routedata",["require","exports","module","can-define/map/map","can-route/src/string-coercion"],function(e,t,n){var r=e("can-define/map/map"),a=e("can-route/src/string-coercion").stringify;n.exports=r.extend("RouteData",{seal:!1},{"*":{type:a}})}),define("can-route/src/binding-proxy",["require","exports","module","can-reflect","can-symbol","can-simple-observable"],function(e,t,n){"use strict";var a=e("can-reflect"),i=e("can-symbol"),o=new(e("can-simple-observable"))(null);a.setName(o,"route.urlData");var r={defaultBinding:null,urlDataObservable:o,bindings:{},call:function(){var e=a.toArray(arguments),t=e.shift(),n=o.value;if(null===n)throw new Error("there is no current binding!!!");var r=n[0===t.indexOf("can.")?i.for(t):t];return r.apply?r.apply(n,e):r}};n.exports=r}),define("can-route/src/regexps",function(e,t,n){"use strict";n.exports={curlies:/\{\s*([\w.]+)\s*\}/g,colon:/\:([\w.]+)/g}}),define("can-diff/map/map",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var o=e("can-reflect");n.exports=function(n,r){var a,i=[];for(var e in a=o.assignMap({},n),o.eachKey(r,function(e,t){n&&n.hasOwnProperty(t)?r[t]!==n[t]&&i.push({key:t,type:"set",value:e}):i.push({key:t,type:"add",value:e}),delete a[t]}),a)i.push({key:e,type:"delete"});return i}}),define("can-route/src/register",["require","exports","module","can-reflect","can-log/dev/dev","can-route/src/binding-proxy","can-route/src/regexps","can-diff/list/list","can-diff/map/map","can-route/src/routedata"],function(e,t,n){"use strict";var d=e("can-reflect"),p=(e("can-log/dev/dev"),e("can-route/src/binding-proxy")),h=e("can-route/src/regexps"),v=(e("can-diff/list/list"),e("can-diff/map/map"),e("can-route/src/routedata")),y=function(e){return e.replace(/\\/g,"")},g={routes:{},register:function(e,r){var t=p.call("root");t.lastIndexOf("/")===t.length-1&&0===e.indexOf("/")&&(e=e.substr(1)),r=r||{};var n,a,i,o,s=[],c="",u=p.call("querySeparator"),l=p.call("matchSlashes");for(i=(a=h.colon.test(e)?h.colon:h.curlies).lastIndex=0;n=a.exec(e);)s.push(n[1]),c+=y(e.substring(i,a.lastIndex-n[0].length)),c+="([^"+("\\"+(y(e.substr(a.lastIndex,1))||u+(l?"":"|/")))+"]"+(r[n[1]]?"*":"+")+")",i=a.lastIndex;if(c+=e.substr(i).replace("\\",""),this.data instanceof v){var f=this.data;d.eachIndex(s,function(e){var t="string",n=r[e];null!=n&&(t=typeof n),d.defineInstanceKey(f.constructor,e,{type:t})})}return g.routes[e]={test:new RegExp("^"+c+"($|"+(o=u,(o+"").replace(/([.?*+\^$\[\]\\(){}|\-])/g,"\\$1"))+")"),route:e,names:s,defaults:r,length:e.split("/").length}}};n.exports=g}),define("can-deparam",["require","exports","module","can-namespace"],function(e,t,n){"use strict";var r=e("can-namespace"),a=/^\d+$/,p=/([^\[\]]+)|(\[\])/g,i=/([^?#]*)(#.*)?$/,o=/%([^0-9a-f][0-9a-f]|[0-9a-f][^0-9a-f]|[^0-9a-f][^0-9a-f])/i,h=function(t){t=t.replace(/\+/g," ");try{return decodeURIComponent(t)}catch(e){return decodeURIComponent(t.replace(o,function(e,t){return"%25"+t}))}};function v(e){return a.test(e)||"[]"===e}function s(e){return e}n.exports=r.deparam=function(e,l){l=l||s;var f,d={};return e&&i.test(e)&&e.split("&").forEach(function(e){var t=e.split("="),n=h(t.shift()),r=h(t.join("=")),a=d;if(n){for(var i=0,o=(t=n.match(p)).length-1;i<o;i++){var s=t[i],c=t[i+1],u=v(s)&&a instanceof Array;a[s]||(u?a.push(v(c)?[]:{}):a[s]=v(c)?[]:{}),a=u?a[a.length-1]:a[s]}v(f=t.pop())?a.push(l(r)):a[f]=l(r)}}),d}}),define("can-route/src/deparam",["require","exports","module","can-deparam","can-reflect","can-route/src/binding-proxy","can-route/src/register"],function(e,t,n){"use strict";var c=e("can-deparam"),u=e("can-reflect"),l=e("can-route/src/binding-proxy"),a=e("can-route/src/register");function f(e){var t=l.call("root");return t.lastIndexOf("/")===t.length-1&&0===e.indexOf("/")&&(e=e.substr(1)),e}function d(n){n=f(n);var r={length:-1};if(u.eachKey(a.routes,function(e,t){e.test.test(n)&&e.length>r.length&&(r=e)}),-1<r.length)return r}function r(e){var n=d(e),r=l.call("querySeparator"),t=l.call("paramsMatcher");if(e=f(e),n){var a=e.match(n.test),i=a.shift(),o=e.substr(i.length-(a[a.length-1]===r?1:0)),s=o&&t.test(o)?c(o.slice(1)):{};return s=u.assignDeep(u.assignDeep({},n.defaults),s),a.forEach(function(e,t){e&&e!==r&&(s[n.names[t]]=function(t){try{return decodeURIComponent(t)}catch(e){return unescape(t)}}(e))}),s}return e.charAt(0)!==r&&(e=r+e),t.test(e)?c(e.slice(1)):{}}r.getRule=d,n.exports=r}),define("can-param",["require","exports","module","can-namespace"],function(e,t,n){"use strict";var r=e("can-namespace");function s(e,t,n){if(Array.isArray(t))for(var r=0,a=t.length;r<a;++r){var i=t[r];s(e+("object"==typeof i?"["+r+"]":"[]"),i,n)}else if(t&&"object"==typeof t)for(var o in t)s(e+"["+o+"]",t[o],n);else n(e,t)}n.exports=r.param=function(e){var n=[],t=function(e,t){n.push(encodeURIComponent(e)+"="+encodeURIComponent(t))};for(var r in e)s(r,e[r],t);return n.join("&").replace(/%20/g,"+")}}),define("can-route/src/param",["require","exports","module","can-reflect","can-param","can-route/src/register","can-route/src/regexps","can-route/src/binding-proxy"],function(e,t,n){"use strict";var s=e("can-reflect"),o=e("can-param"),c=e("can-route/src/register"),u=e("can-route/src/regexps"),l=e("can-route/src/binding-proxy"),f=function(e,t){var n=0,r=0,a={};for(var i in e.defaults)e.defaults[i]===t[i]&&(a[i]=1,n++);for(;r<e.names.length;r++){if(!t.hasOwnProperty(e.names[r]))return-1;a[e.names[r]]||n++}return n};function r(n,e){var r,a,i=0,o=0;return delete n.route,s.eachKey(n,function(){o++}),s.eachKey(c.routes,function(e,t){if(a=f(e,n),i<a&&(r=e,i=a),o<=a)return!1}),c.routes[e]&&f(c.routes[e],n)===i&&(r=c.routes[e]),r}function a(n,r){var a,e,t,i;return n?(a=s.assignMap({},r),i=u.colon.test(n.route)?u.colon:u.curlies,e=n.route.replace(i,function(e,t){return delete a[t],r[t]===n.defaults[t]?"":encodeURIComponent(r[t])}).replace("\\",""),s.eachKey(n.defaults,function(e,t){a[t]===e&&delete a[t]}),e+((t=o(a))?l.call("querySeparator")+t:"")):0===s.size(r)?"":l.call("querySeparator")+o(r)}function i(e,t){return a(r(e,t),e)}(n.exports=i).paramFromRoute=a,i.getMatchedRoute=r}),define("can-route/src/url-helpers",["require","exports","module","can-route/src/binding-proxy","can-route/src/deparam","can-route/src/param","can-reflect","can-string"],function(e,t,n){"use strict";var r=e("can-route/src/binding-proxy"),a=e("can-route/src/deparam"),i=e("can-route/src/param"),o=e("can-reflect"),s=e("can-string"),c=function(e,t){for(var n in e){var r=e[n],a=t[n];if(r&&a&&"object"==typeof r&&"object"==typeof t)return c(r,a);if(r!=a)return!1}return!0};function u(e,t){if(t){var n=a(r.call("can.getValue"));e=o.assignMap(o.assignMap({},n),e)}return r.call("root")+i(e)}n.exports={url:u,link:function(e,t,n,r){return"<a "+(a=o.assignMap({href:u(t,r)},n),i=[],o.eachKey(a,function(e,t){i.push(("className"===t?"class":t)+'="'+("href"===t?e:s.esc(e))+'"')}),i.join(" "))+">"+e+"</a>";var a,i},isCurrent:function(e,t){if(t){var n=a(r.call("can.getValue"));return c(e,n)}return r.call("can.getValue")===i(e)}}}),define("can-route-hash",["require","exports","module","can-globals/location/location","can-reflect","can-observation-recorder","can-queues","can-key-tree","can-simple-observable","can-dom-events"],function(e,t,n){!function(e,t,n,r){var a=t("can-globals/location/location"),i=t("can-reflect"),o=t("can-observation-recorder"),s=t("can-queues"),c=t("can-key-tree"),u=t("can-simple-observable"),l=t("can-dom-events");function f(){return a().href.split(/#!?/)[1]||""}function d(){var e=this.dispatchHandlers.bind(this),t=this;this._value="",this.handlers=new c([Object,Array],{onFirst:function(){t._value=f(),l.addEventListener(window,"hashchange",e)},onEmpty:function(){l.removeEventListener(window,"hashchange",e)}})}d.prototype=Object.create(u.prototype),d.constructor=d,i.assign(d.prototype,{paramsMatcher:/^(?:&[^=]+=[^&]*)+/,querySeparator:"&",matchSlashes:!1,root:"#!",dispatchHandlers:function(){var e=this._value;this._value=f(),e!==this._value&&s.enqueueByQueue(this.handlers.getNode([]),this,[this._value,e])},get:function(){return o.add(this),f()},set:function(e){var t=a();return(e||t.hash)&&t.hash!=="#"+e&&(t.hash="!"+e),e}}),Object.defineProperty(d.prototype,"value",{get:function(){return i.getValue(this)},set:function(e){i.setValue(this,e)}}),i.assignSymbols(d.prototype,{"can.getValue":d.prototype.get,"can.setValue":d.prototype.set,"can.onValue":d.prototype.on,"can.offValue":d.prototype.off,"can.isMapLike":!1,"can.valueHasDependencies":function(){return!0}}),r.exports=d}(0,e,0,n)}),define("can-globals/is-web-worker/is-web-worker",["require","exports","module","can-globals/can-globals-instance"],function(o,e,t){!function(e,t,n,r){"use strict";var a=o("can-globals/can-globals-instance"),i=Function;a.define("isWebWorker",function(){var e=i("return this")();return"undefined"!=typeof WorkerGlobalScope&&e instanceof WorkerGlobalScope}),r.exports=a.makeExport("isWebWorker")}(0,0,0,t)}),define("can-route",["require","exports","module","can-bind","can-queues","can-observation","can-namespace","can-log/dev/dev","can-reflect","can-symbol","can-simple-observable/make-compute/make-compute","can-route/src/routedata","can-route/src/string-coercion","can-route/src/register","can-route/src/url-helpers","can-route/src/param","can-route/src/deparam","can-route/src/binding-proxy","can-route-hash","can-globals/is-web-worker/is-web-worker","can-globals/is-browser-window/is-browser-window"],function(e,t,n){!function(e,t,n,r){"use strict";var a,i=t("can-bind"),o=t("can-queues"),s=t("can-observation"),c=t("can-namespace"),u=(t("can-log/dev/dev"),t("can-reflect")),l=t("can-symbol"),f=t("can-simple-observable/make-compute/make-compute"),d=t("can-route/src/routedata"),p=t("can-route/src/string-coercion").stringCoercingMapDecorator,h=t("can-route/src/register"),v=t("can-route/src/url-helpers"),y=t("can-route/src/param"),g=t("can-route/src/deparam"),m=t("can-route/src/binding-proxy"),b=t("can-route-hash"),w=t("can-globals/is-web-worker/is-web-worker"),x=t("can-globals/is-browser-window/is-browser-window"),_=new b;function k(e,t){return h.register(e,t),k}m.bindings.hashchange=_,m.defaultBinding="hashchange",m.urlDataObservable.value=_;var O=new s(function(){var e=m.call("can.getValue");return k.rule(e)});function E(e){clearTimeout(a),a=setTimeout(function(){var e=u.serialize(k.data),t=O.get(),n=y.getMatchedRoute(e,t),r=y.paramFromRoute(n,e);m.call("can.setValue",r);var a=k._onStartComplete;a&&(k._onStartComplete=void 0,a())},10)}function L(){var e=m.call("can.getValue");o.batch.start();var t=k.deparam(e);delete t.route,u.update(k.data,t),o.batch.stop()}Object.defineProperty(k,"routes",{get:function(){return h.routes},set:function(e){return h.routes=e}}),Object.defineProperty(k,"defaultBinding",{get:function(){return m.defaultBinding},set:function(e){m.defaultBinding=e;var t=m.bindings[m.defaultBinding];t&&(m.urlDataObservable.value=t)}}),Object.defineProperty(k,"urlData",{get:function(){return m.urlDataObservable.value},set:function(e){k._teardown(),m.urlDataObservable.value=e}}),u.assignMap(k,{param:y,deparam:g,map:function(e){k.data=e},start:function(e){if(!0!==e&&(k._setup(),x()||w())){var t=m.call("can.getValue");o.batch.start();var n=k.deparam(t);delete n.route,u.assign(k.data,n),o.batch.stop(),E()}return k},url:v.url,link:v.link,isCurrent:v.isCurrent,bindings:m.bindings,_setup:function(){if(!k._canBinding){var e={parent:m.urlDataObservable.value,setParent:E,child:k.serializedObservation,setChild:L,onInitDoNotUpdateChild:!0,cycles:1,queue:"notify"};(k._canBinding=new i(e)).start()}},_teardown:function(){k._canBinding&&(k._canBinding.stop(),k._canBinding=null),clearTimeout(a)},stop:function(){return this._teardown(),k},currentRule:f(O),register:h.register,rule:function(e){var t=g.getRule(e);if(t)return t.route}});var q,S=function(e,t){return k.data[e]?k.data[e].apply(k.data,t):k.data.addEventListener.apply(k.data,t)};["addEventListener","removeEventListener","bind","unbind","on","off"].forEach(function(n){k[n]=function(e,t){return"__url"===e?m.call("can.onValue",t):S(n,arguments)}}),["delegate","undelegate","removeAttr","compute","_get","___get","each"].forEach(function(e){k[e]=function(){return S(e,arguments)}});var M,P,C=function(e){return q=e};Object.defineProperty(k,"serializedObservation",{get:function(){return M||(M=new s(function(){return u.serialize(k.data)})),M}}),Object.defineProperty(k,"serializedCompute",{get:function(){return P||(P=f(k.serializedObservation)),P}});var V=l.for("can.viewModel");Object.defineProperty(k,"data",{get:function(){return q||C(new d)},set:function(e){u.isConstructorLike(e)&&(e=new e),e&&void 0!==e[V]&&(e=e[V]),C("attr"in e?p(e):e)}}),k.attr=function(e,t){return console.warn("can-route: can-route.attr is deprecated. Use methods on can-route.data instead."),"attr"in k.data?k.data.attr.apply(k.data,arguments):1<arguments.length?(u.setKeyValue(k.data,e,t),k.data):"object"==typeof e?(u.assignDeep(k.data,e),k.data):1===arguments.length?u.getKeyValue(k.data,e):u.unwrap(k.data)},u.setKeyValue(k,l.for("can.isFunctionLike"),!1),k.matched=k.currentRule,k.current=k.isCurrent,r.exports=c.route=k}(0,e,0,n)}),define("can-stache-route-helpers",["require","exports","module","can-stache/helpers/core","can-route","can-stache/src/expression","can-reflect"],function(e,t,n){"use strict";var a=e("can-stache/helpers/core"),r=e("can-route"),i=e("can-stache/src/expression"),o=e("can-reflect"),s=a.looksLikeOptions,c=function(){var t,n,r;return o.eachIndex(arguments,function(e){"boolean"==typeof e?n=e:e&&"object"==typeof e&&(s(e)?r=e:t=a.resolveHash(e))}),!t&&r&&(t=a.resolveHash(r.hash)),{finalParams:t||{},finalMerge:n,optionsArg:r}};a.registerHelper("routeUrl",function(){var e=c.apply(this,arguments);return r.url(e.finalParams,"boolean"==typeof e.finalMerge?e.finalMerge:void 0)});var u=function(){var e=c.apply(this,arguments),t=r.isCurrent(e.finalParams,"boolean"==typeof e.finalMerge?e.finalMerge:void 0);return!e.optionsArg||e.optionsArg instanceof i.Call?t:t?e.optionsArg.fn():e.optionsArg.inverse()};u.callAsMethod=!0,a.registerHelper("routeCurrent",u)}),define("can/es/can-stache-route-helpers",["exports","can-stache-route-helpers"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-view-callbacks",["exports","can-view-callbacks"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-view-live",["exports","can-view-live"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-view-model",["exports","can-view-model"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-view-nodelist",["exports","can-view-nodelist"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-view-parser",["exports","can-view-parser"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-view-scope",["exports","can-view-scope"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-view-target",["exports","can-view-target"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-key/sub/sub",["require","exports","module","can-key/utils","can-key/get/get","can-reflect","can-key/delete/delete"],function(e,t,n){"use strict";var o=e("can-key/utils"),s=e("can-key/get/get"),c=e("can-reflect"),u=e("can-key/delete/delete");n.exports=function(e,r,a){var i=[];return e=e||"",i.push(e.replace(o.strReplacer,function(e,t){var n=s(r,t);return!0===a&&u(r,t),null==n?(i=null,""):!c.isPrimitive(n)&&i?(i.push(n),""):""+n})),null===i?i:i.length<=1?i[0]:i}}),define("can-query-logic/src/set",["require","exports","module","can-symbol","can-reflect"],function(e,t,n){var p,r=e("can-symbol"),h=e("can-reflect"),a=function(e){return h.assignSymbols(e,{"can.serialize":function(){return this}})};function i(n){return function(e,t){return n.call(this,t,e)}}var s=r.for("can.setComparisons");function o(e,t,n){var r=e[s];e[s]||(r=e[s]=new Map);var a=r.get(e);a||(a=new Map,r.set(e,a));var i=a.get(t);if(i)for(var o in n)i.hasOwnProperty(o)&&console.warn("Overwriting "+e.name+" "+o+" "+t.name+" comparitor"),i[o]=n[o];else a.set(t,n)}function c(){}var u={number:c,string:c,undefined:c,boolean:c},v={};["intersection","difference","union"].forEach(function(a){v[a]=function(e,t,n){if(n===p.UNIVERSAL){if("intersection"===a)return t;if("union"===a)return p.UNIVERSAL;if("difference"===a)return p.EMPTY}if(t===p.UNIVERSAL){if("intersection"===a)return t;if("union"===a)return p.UNIVERSAL}if(e&&e[a]){var r=e[a](t,n);return void 0===r&&!0===e.undefinedIsEmptySet?p.EMPTY:r}throw new Error("Unable to perform "+a+" between "+p.getType(t).name+" and "+p.getType(n).name)}});var l={intersection:function(e,t){return e===t?e:p.EMPTY},difference:function(e,t){return e===t?p.EMPTY:e},union:function(e,t){return e===t?e:p.UNDEFINABLE}};(p={UNIVERSAL:h.assignSymbols({name:"UNIVERSAL"},{"can.serialize":function(){return this},"can.isMember":function(){return!0}}),EMPTY:h.assignSymbols({name:"EMPTY"},{"can.serialize":function(){return this},"can.isMember":function(){return!1}}),UNDEFINABLE:a({name:"UNDEFINABLE"}),UNKNOWABLE:a({name:"UNKNOWABLE"}),Identity:c,isSpecial:function(e){return e===p.UNIVERSAL||e===p.EMPTY||e===p.UNDEFINABLE||e===p.UNKNOWABLE},isDefinedAndHasMembers:function(e){return e!==p.EMPTY&&e!==p.UNDEFINABLE&&e!==p.UNKNOWABLE&&e},getType:function(e){return e===p.UNIVERSAL?p.UNIVERSAL:e===p.EMPTY?p.EMPTY:e===p.UNKNOWABLE?p.UNKNOWABLE:null===e?c:u.hasOwnProperty(typeof e)?u[typeof e]:e.constructor},ownAndMemberValue:function(e,t){if(null==e&&null==t)return{own:t,member:e};var n=null!=e?e.valueOf():e,r=null!=t?t.valueOf():t;return null==e||null==t||null!=n&&n.constructor===r.constructor||(r=new e.constructor(r).valueOf()),{own:n,member:r}},getComparisons:function(e,t){var n=e[s];if(n){var r=n.get(e);if(r)return r.get(t)}},hasComparisons:function(e){return!!e[s]},defineComparison:function(e,t,n){if(o(e,t,n),e!==t){var r={};for(var a in n)"difference"!==a&&(r[a]=i(n[a]));o(t,e,r)}},isSubset:function(e,t){if(e===t)return!0;var n=p.getType(e),r=p.getType(t),a=p.getComparisons(n,r);if(a){var i=v.intersection(a,e,t),o=v.difference(a,e,t);return i===p.UNKNOWABLE||o===p.UNKNOWABLE?void 0:i!==p.EMPTY&&o===p.EMPTY}throw new Error("Unable to perform subset comparison between "+n.name+" and "+r.name)},isProperSubset:function(e,t){return p.isSubset(e,t)&&!p.isEqual(e,t)},isEqual:function(e,t){if(e===p.UNKNOWABLE||t===p.UNKNOWABLE)return p.UNKNOWABLE;var n=p.isSpecial(e),r=p.isSpecial(t);if(n&&r)return n===r;var a=p.getType(e),i=p.getType(t);if(e===t)return!0;var o=p.getComparisons(a,i),s=p.getComparisons(i,a);if(o&&s){var c=v.intersection(o,e,t),u=v.difference(o,e,t);if(c===p.EMPTY||u!==p.EMPTY)return!1;var l=v.intersection(s,t,e),f=v.difference(s,t,e);return l!==p.EMPTY&&f===p.EMPTY}var d=p.ownAndMemberValue(e,t);if(h.isPrimitive(d.own)&&h.isPrimitive(d.member))return d.own===d.member;throw new Error("Unable to perform equal comparison between "+a.name+" and "+i.name)},union:function(e,t){if(e===p.UNIVERSAL||t===p.UNIVERSAL)return p.UNIVERSAL;if(e===p.EMPTY)return t;if(t===p.EMPTY)return e;if(e===p.UNKNOWABLE||t===p.UNKNOWABLE)return p.UNKNOWABLE;var n=p.getType(e),r=p.getType(t),a=p.getComparisons(n,r);return v.union(a,e,t)},intersection:function(e,t){if(e===p.UNIVERSAL)return t;if(t===p.UNIVERSAL)return e;if(e===p.EMPTY||t===p.EMPTY)return p.EMPTY;if(e===p.UNKNOWABLE||t===p.UNKNOWABLE)return p.UNKNOWABLE;var n=p.getType(e),r=p.getType(t),a=p.getComparisons(n,r);if(a)return v.intersection(a,e,t);throw new Error("Unable to perform intersection comparison between "+n.name+" and "+r.name)},difference:function(e,t){if(e===p.EMPTY)return p.EMPTY;if(t===p.EMPTY)return e;if(e===p.UNKNOWABLE||t===p.UNKNOWABLE)return p.UNKNOWABLE;var n=p.getType(e),r=p.getType(t),a=p.getComparisons(n,r);if(a)return v.difference(a,e,t);throw new Error("Unable to perform difference comparison between "+n.name+" and "+r.name)},indexWithEqual:function(e,t){for(var n=0,r=e.length;n<r;n++)if(p.isEqual(e[n],t))return n;return-1}}).defineComparison(c,c,l),p.defineComparison(p.UNIVERSAL,p.UNIVERSAL,l),n.exports=p}),define("can-fixture/data-from-url",function(e,t,n){var o=/\{([^\}]+)\}/g;n.exports=function(e,t){if(!e)return{};var n=[],r=e.replace(".","\\.").replace("?","\\?"),a=new RegExp(r.replace(o,function(e,t){return n.push(t),"([^/]+)"})+"$").exec(t),i={};return a?(a.shift(),n.forEach(function(e){i[e]=a.shift()}),i):null}}),define("can-query-logic/src/array-union-intersection-difference",["require","exports","module","can-query-logic/src/set"],function(e,t,n){var o=e("can-query-logic/src/set");function s(e){return null==e?e:e.valueOf()}n.exports=function(e,t){var n=new Set,r=[],a=[],i=e.slice(0);return e.forEach(function(e){n.add(s(e)),a.push(e)}),t.forEach(function(e){if(n.has(s(e))){r.push(e);var t=o.indexWithEqual(i,e);-1!==t&&i.splice(t,1)}else a.push(e)}),{intersection:r,union:a,difference:i}}}),define("can-query-logic/src/types/comparisons",["require","exports","module","can-query-logic/src/set","can-query-logic/src/array-union-intersection-difference","can-symbol"],function(e,t,n){var o=e("can-query-logic/src/set"),s=e("can-query-logic/src/array-union-intersection-difference"),r=e("can-symbol").for("can.isMember"),a={In:function(e){this.values=e},NotIn:function(e){this.values=e},GreaterThan:function(e){this.value=e},GreaterThanEqual:function(e){this.value=e},LessThan:function(e){this.value=e},LessThanEqual:function(e){this.value=e},And:function(e){this.values=e},Or:function(e){this.values=e}};function i(n){return function(e,t){return null!=e&&null!=t&&n(e,t)}}function c(n){return function(e,t){return e===t||null!=e&&null!=t&&n(e,t)}}function u(e){var t=o.ownAndMemberValue(this.value,e);return this.constructor.test(t.member,t.own)}function l(e){return this.constructor.test(this.values,e)}function f(n){return{test:function(e,t){return!n.test(e,t)}}}function d(r,a,i){return function(e,t){var n=s(e.values,t.values);return n[r].length?new a(n[r]):i||o.EMPTY}}function p(n){return function(e,t){return n(t,e)}}function h(n,r){return function(e,t){return new n(t[r||"value"])}}function v(e,t){return e.value<t.value?t:e}function y(e,t){return e.value>t.value?t:e}function g(n,r){return function(e,t){return n.test(e.value,t.value)?q([e,new r(t.value)]):o.EMPTY}}function m(e,t){var n=g(e,t);return function(e,t){return e.value===t.value?new M.In([e.value]):n(e,t)}}function b(r,a,i){return function(e,t){var n=e.values.filter(function(e){return r.test(t,e)});return n.length?new a(n):i||o.EMPTY}}a.Or.prototype.orValues=function(){return this.values},a.In.test=function(e,n){return e.some(function(e){var t=o.ownAndMemberValue(e,n);return t.own===t.member})},a.NotIn.test=function(e,t){return!a.In.test(e,t)},a.NotIn.testValue=function(e,t){return!a.In.testValue(e,t)},a.GreaterThan.test=i(function(e,t){return t<e}),a.GreaterThanEqual.test=c(function(e,t){return t<=e}),a.LessThan.test=i(function(e,t){return e<t}),a.LessThanEqual.test=c(function(e,t){return e<=t}),[a.GreaterThan,a.GreaterThanEqual,a.LessThan,a.LessThanEqual,a.LessThan].forEach(function(e){e.prototype.isMember=u}),[a.In,a.NotIn].forEach(function(e){e.prototype.isMember=l}),a.And.prototype.isMember=function(t){return this.values.every(function(e){return e.isMember(t)})},a.Or.prototype.isMember=function(t){return this.values.some(function(e){return e.isMember(t)})},Object.keys(a).forEach(function(e){a[e].prototype[r]=a[e].prototype.isMember});var w={test:function(e,t){return e.isMember(t)}};function x(e){return e instanceof M.Or}function _(e){return e instanceof M.And||x(e)}function k(a){return function(e,t){var n,r=e.values.filter(function(e){return a.values.test(t,e)});return n=a.complement?o.difference(o.UNIVERSAL,t):a.with?new a.with(t.value):t,r.length?a.combinedUsing([new a.arePut(r),n]):n}}function O(n,r){return function(e,t){return n.test(e.value,t.value)?r||o.UNIVERSAL:S([e,t])}}function E(n,r){return function(e,t){return n.test(e.value,t.value)?r||o.EMPTY:q([e,t])}}function L(n){return function(e,t){return n.test(e.value,t.value)?o.difference(o.UNIVERSAL,t):e}}function q(e){return a.And?new a.And(e):o.UNDEFINABLE}function S(e){return a.Or?new a.Or(e):o.UNDEFINABLE}var M=a;function P(e,t,n){var r=new n(t.value),a=e.values.filter(function(e){return!r.isMember(e)});return a.length?a.length<e.values.length?S([new M.In(a),r]):S([e,t]):r}var C,V,j={union:k({values:f(w),arePut:M.In,combinedUsing:function(e){return function e(t,n){if(n instanceof M.Or){var r=e(t,n.values[0]);if(!(r instanceof M.Or))return o.union(r,n.values[1]);var a=e(t,n.values[1]);return a instanceof M.Or?S([t,n]):o.union(a,n.values[0])}return n instanceof M.GreaterThan?P(t,n,M.GreaterThanEqual):n instanceof M.LessThan?P(t,n,M.LessThanEqual):S([t,n])}(e[0],e[1])}}),intersection:b(w,M.In,o.EMPTY),difference:b(f(w),M.In,o.EMPTY)},D={difference:p(k({values:w,arePut:M.NotIn,combinedUsing:q}))},I=function(){return{union:b(f(w),M.NotIn,o.UNIVERSAL),intersection:k({values:w,arePut:M.NotIn,combinedUsing:q}),difference:k({values:f(w),arePut:M.NotIn,combinedUsing:q,complement:!0})}},T={difference:p(b(w,M.In,o.EMPTY))},A=function(e,t){var n=o.union(e,t.values[0]),r=o.union(e,t.values[1]);return _(n)||_(r)?new M.Or([e,t]):o.intersection(n,r)},N=function(e,t){var n=t.values[0],r=t.values[1],a=o.intersection(e,n),i=o.intersection(e,r);return a===o.EMPTY||i===o.EMPTY?o.EMPTY:_(a)?_(i)?new M.And([e,t]):new o.intersection(i,n):new o.intersection(a,r)},K=function(e,t){var n=t.values[0],r=t.values[1],a=o.difference(e,n),i=o.difference(e,r);return a===o.EMPTY?i:i===o.EMPTY?a:new M.Or([a,i])},R=function(e,t){var n=e.values[0],r=e.values[1],a=o.difference(n,t),i=o.difference(r,t);return o.intersection(a,i)},B={union:function(e,t){var n=t.values[0],r=t.values[1],a=o.union(e,n);if(!_(a))return o.union(a,r);var i=o.union(e,r);return _(i)?new M.Or([e,t]):o.union(n,i)},intersection:function(e,t){var n=t.values[0],r=t.values[1],a=o.intersection(e,n),i=o.intersection(e,r);return a===o.EMPTY?i:i===o.EMPTY?a:o.union(a,i)},difference:function(e,t){var n=t.values[0],r=t.values[1],a=o.difference(e,n),i=o.difference(e,r);return o.intersection(a,i)}},H={difference:function(e,t){var n=e.values[0],r=e.values[1],a=o.difference(n,t),i=o.difference(r,t);return o.union(a,i)}},F={In_In:{union:d("union",M.In),intersection:d("intersection",M.In),difference:d("difference",M.In)},UNIVERSAL_In:{difference:h(M.NotIn,"values")},In_NotIn:{union:p(d("difference",M.NotIn,o.UNIVERSAL)),intersection:d("difference",M.In),difference:d("intersection",M.In)},NotIn_In:{difference:d("union",M.NotIn)},In_GreaterThan:j,GreaterThan_In:D,In_GreaterThanEqual:j,GreaterThanEqual_In:D,In_LessThan:j,LessThan_In:D,In_LessThanEqual:j,LessThanEqual_In:D,In_And:j,And_In:D,In_Or:j,Or_In:D,NotIn_NotIn:{union:d("intersection",M.NotIn,o.UNIVERSAL),intersection:d("union",M.NotIn),difference:d("difference",M.In)},UNIVERSAL_NotIn:{difference:h(M.In,"values")},NotIn_GreaterThan:I(),GreaterThan_NotIn:T,NotIn_GreaterThanEqual:I(),GreaterThanEqual_NotIn:T,NotIn_LessThan:I(),LessThan_NotIn:T,NotIn_LessThanEqual:I(),LessThanEqual_NotIn:T,NotIn_And:I(),And_NotIn:T,NotIn_Or:I(),Or_NotIn:T,GreaterThan_GreaterThan:{union:y,intersection:v,difference:g(M.LessThan,M.LessThanEqual)},UNIVERSAL_GreaterThan:{difference:h(M.LessThanEqual)},GreaterThan_GreaterThanEqual:{union:y,intersection:v,difference:g(M.LessThan,M.LessThan)},GreaterThanEqual_GreaterThan:{difference:m(M.LessThan,M.LessThanEqual)},GreaterThan_LessThan:{union:(V=O(M.LessThan),function(e,t){return a.In.test([e.value],t.value)?new M.NotIn([e.value]):V(e,t)}),intersection:E(M.GreaterThan),difference:L(M.LessThan)},LessThan_GreaterThan:{difference:L(M.GreaterThan)},GreaterThan_LessThanEqual:{union:O(M.LessThanEqual),intersection:E(M.GreaterThanEqual),difference:L(M.LessThanEqual)},LessThanEqual_GreaterThan:{difference:L(M.GreaterThanEqual)},GreaterThan_And:{union:A,intersection:N,difference:K},And_GreaterThan:{difference:R},GreaterThan_Or:B,Or_GreaterThan:H,GreaterThanEqual_GreaterThanEqual:{union:y,intersection:v,difference:g(M.LessThan,M.LessThan)},UNIVERSAL_GreaterThanEqual:{difference:h(M.LessThan)},GreaterThanEqual_LessThan:{union:O(M.LessThanEqual),intersection:E(M.GreaterThanEqual),difference:L(M.LessThanEqual)},LessThan_GreaterThanEqual:{difference:L(M.GreaterThanEqual)},GreaterThanEqual_LessThanEqual:{union:O(M.LessThanEqual),intersection:(C=E(M.GreaterThan),function(e,t){var n=new M.In([e.value]);return n.isMember(t.value)?n:C(e,t)}),difference:L(M.LessThanEqual)},LessThanEqual_GreaterThanEqual:{difference:L(M.GreaterThanEqual)},GreaterThanEqual_And:{union:A,intersection:N,difference:K},And_GreaterThanEqual:{difference:R},GreaterThanEqual_Or:B,Or_GreaterThanEqual:H,LessThan_LessThan:{union:v,intersection:y,difference:g(M.GreaterThan,M.GreaterThanEqual)},UNIVERSAL_LessThan:{difference:h(M.GreaterThanEqual)},LessThan_LessThanEqual:{union:v,intersection:y,difference:g(M.GreaterThan,M.GreaterThan)},LessThanEqual_LessThan:{difference:m(M.GreaterThanEqual,M.GreaterThanEqual)},LessThan_And:{union:A,intersection:N,difference:K},And_LessThan:{difference:R},LessThan_Or:B,Or_LessThan:H,LessThanEqual_LessThanEqual:{union:v,intersection:y,difference:function(e,t){return e.value>=t.value?q([e,new M.GreaterThan(t.value)]):o.EMPTY}},UNIVERSAL_LessThanEqual:{difference:h(M.GreaterThan)},LessThanEqual_And:{union:A,intersection:N,difference:K},And_LessThanEqual:{difference:R},LessThanEqual_Or:B,Or_LessThanEqual:H,And_And:{union:function(e,t){var n=o.union(e,t.values[0]),r=o.union(e,t.values[1]);return(_(n)||_(r))&&(n=o.union(t,e.values[0]),r=o.union(t,e.values[1])),_(n)||_(r)?new M.Or([e,t]):o.intersection(n,r)},intersection:function(e,t){var n=o.intersection(e.values[0],t.values[0]),r=o.intersection(e.values[1],t.values[1]);return _(n)&&_(r)?(n=o.intersection(e.values[0],t.values[1]),r=o.intersection(e.values[1],t.values[0]),_(n)&&_(r)?new M.And([e,t]):o.intersection(n,r)):o.intersection(n,r)},difference:function(e,t){var n=o.difference(e,t.values[0]),r=o.difference(e,t.values[1]);return o.union(n,r)}},And_Or:{union:function(e,t){var n=o.union(e.values[0],t),r=o.union(e.values[1],t);return _(n)&&_(r)?new M.Or([e,t]):o.intersection(n,r)},intersection:function(e,t){var n=o.intersection(e,t.values[0]),r=o.intersection(e,t.values[1]);return x(n)||x(r)?new M.And([e,t]):o.union(n,r)},difference:function(e,t){var n=o.difference(e,t.values[0]),r=o.difference(e,t.values[1]);return o.intersection(n,r)}},Or_And:{difference:function(e,t){var n=o.difference(e,t.values[0]),r=o.difference(e,t.values[1]);return o.union(n,r)}},UNIVERSAL_And:{difference:function(e,t){var n=o.difference(e,t.values[0]),r=o.difference(e,t.values[1]);return o.union(n,r)}},Or_Or:{union:function(e,t){var n=o.union(e.values[0],t.values[0]),r=o.union(e.values[1],t.values[1]);return _(n)&&_(r)?(n=o.union(e.values[0],t.values[1]),r=o.union(e.values[1],t.values[0]),_(n)&&_(r)?new M.Or([e,t]):o.union(n,r)):o.union(n,r)},intersection:function(e,t){var n=t.values[0],r=t.values[1],a=o.intersection(e,n),i=o.intersection(e,r);return x(a)&&x(i)?(a=o.union(t,e.values[0]),i=o.union(t,e.values[1]),x(a)&&x(i)?new M.Or([e,t]):o.union(a,i)):o.union(a,i)},difference:function(e,t){var n=o.difference(e,t.values[0]),r=o.difference(e,t.values[1]);return o.intersection(n,r)}},UNIVERSAL_Or:{difference:function(e,t){var n=o.difference(e,t.values[0]),r=o.difference(e,t.values[1]);return o.intersection(n,r)}}},z=Object.keys(a);z.forEach(function(e,t){F[e+"_"+e]?o.defineComparison(a[e],a[e],F[e+"_"+e]):console.warn("no "+e+"_"+e),F["UNIVERSAL_"+e]?o.defineComparison(o.UNIVERSAL,a[e],F["UNIVERSAL_"+e]):console.warn("no UNIVERSAL_"+e);for(var n=t+1;n<z.length;n++){var r=z[n];F[e+"_"+r]?o.defineComparison(a[e],a[r],F[e+"_"+r]):console.warn("no "+e+"_"+r),F[r+"_"+e]?o.defineComparison(a[r],a[e],F[r+"_"+e]):console.warn("no "+r+"_"+e)}}),n.exports=a}),define("can-query-logic/src/types/make-real-number-range-inclusive",["require","exports","module","can-query-logic/src/set","can-query-logic/src/types/comparisons"],function(e,t,n){var l=e("can-query-logic/src/set"),f=e("can-query-logic/src/types/comparisons");n.exports=function(n,r){function o(e,t){this.start=0<arguments.length?+e:n,this.end=1<arguments.length?+t:r,this.range=new f.And([new f.GreaterThanEqual(this.start),new f.LessThanEqual(this.end)])}var a=new o(n,r);function s(e){return l.isSubset(a.range,e.range)}function c(e){var t={};if(e.values.forEach(function(e){e instanceof f.GreaterThanEqual&&(t.start=e.value),e instanceof f.GreaterThan&&(t.start=e.value+1),e instanceof f.LessThanEqual&&(t.end=e.value),e instanceof f.LessThan&&(t.end=e.value-1)}),"start"in t&&"end"in t)return new o(t.start,t.end)}function i(e){var t;if(e instanceof f.And&&(t=c(e)),e instanceof f.Or){var n=c(e.values[0]),r=c(e.values[1]);if(!n||!r)return l.UNDEFINABLE;var a=n.range.values,i=r.range.values;if(a[1].value+1===i[0].value)t=new o(a[0].value,i[1].value);else{if(i[1].value+1!==a[0].value)return l.UNDEFINABLE;t=new o(i[0].value,a[1].value)}}return t&&s(t)?l.UNIVERSAL:t}function u(e,t){var n=i(l.difference(e.range,t.range));return n||l.EMPTY}return l.defineComparison(o,o,{union:function(e,t){var n=i(l.union(e.range,t.range));return n||l.EMPTY},intersection:function(e,t){var n=i(l.intersection(e.range,t.range));return n||l.EMPTY},difference:u}),l.defineComparison(l.UNIVERSAL,o,{difference:function(e,t){return s(t)?l.EMPTY:u(a,t)}}),o}}),define("can-query-logic/src/types/types",function(e,t,n){n.exports={}}),define("can-query-logic/src/types/values-or",["require","exports","module","can-query-logic/src/set","can-query-logic/src/types/types"],function(e,t,n){var r=e("can-query-logic/src/set"),a=e("can-query-logic/src/types/types");function i(e){this.values=e}i.prototype.isMember=function(t){return this.values.some(function(e){return e&&e.isMember?e.isMember(t):e===t})},r.defineComparison(r.UNIVERSAL,i,{difference:function(){return r.UNDEFINABLE}}),n.exports=a.ValuesOr=i}),define("can-query-logic/src/types/values-not",["require","exports","module","can-query-logic/src/set","can-query-logic/src/types/types"],function(e,t,n){var r=e("can-query-logic/src/set"),a=e("can-query-logic/src/types/types");function i(e){this.value=e}var o=r.Identity;r.defineComparison(r.UNIVERSAL,o,{difference:function(e,t){return new i(t)}}),r.defineComparison(r.UNIVERSAL,i,{difference:function(e,t){return t.value}}),r.defineComparison(i,i,{}),r.defineComparison(i,o,{union:function(e,t){if(r.isEqual(e.value,t))return r.UNIVERSAL;throw new Error("Not,Identity Union is not filled out")},intersection:function(e,t){return r.isEqual(!e.value,t)?t:r.EMPTY},difference:function(e,t){return r.isEqual(e.value,t)?e:r.UNDEFINABLE}}),r.defineComparison(o,i,{difference:function(e,t){return r.isEqual(e,t.value)?e:r.UNDEFINABLE}}),n.exports=a.Not=i}),define("can-query-logic/src/types/keys-and",["require","exports","module","can-query-logic/src/set","can-assign","can-query-logic/src/array-union-intersection-difference","can-reflect","can-key/get/get","can-symbol","can-reflect","can-query-logic/src/types/types"],function(e,t,n){var m=e("can-query-logic/src/set"),b=e("can-assign"),r=e("can-query-logic/src/array-union-intersection-difference"),u=e("can-reflect"),s=e("can-key/get/get"),a=e("can-symbol"),w=(u=e("can-reflect"),e("can-query-logic/src/types/types"));function x(e){var n=this.values={};u.eachKey(e,function(e,t){u.isPlainObject(e)&&!m.isSpecial(e)?n[t]=new x(e):n[t]=e})}var c=a.for("can.isMember");function l(e){return m.isEqual(e,m.UNIVERSAL)?m.UNIVERSAL:e}x.prototype.isMember=function(r,a,e){var i=!0,o=e?e+".":"";return u.eachKey(this.values,function(e,t){var n=e&&(e[c]||e.isMember);n?n.call(e,s(r,t),a||r,o+t)||(i=!1):e!==s(r,t)&&(i=!1)}),i};var f={};function _(e,t){var n=r(Object.keys(e),Object.keys(t));return{aOnlyKeys:n.difference,aAndBKeys:n.intersection,bOnlyKeys:r(Object.keys(t),Object.keys(e)).difference}}function k(e){return e!==m.EMPTY}function i(e,t){var r=e.values,a=t.values,n=_(r,a),i=n.aOnlyKeys,o=n.aAndBKeys,s=n.bOnlyKeys,c={},u={},l={};o.forEach(function(e){var t=m.difference(r[e],a[e]);if(t===m.EMPTY)c[e]=r[e];else{var n=m.intersection(r[e],a[e]);n!==m.EMPTY?u[e]={difference:t,intersection:n}:l[e]=r[e]}});var f,d=Object.keys(u);if(1===d.length&&((f={})[d[0]]=u[d[0]].difference),Object.keys(l).length)return e;if(0===i.length&&0===s.length)return 1<d.length?m.UNDEFINABLE:1===d.length?(b(c,f),new x(c)):m.EMPTY;if(0<i.length&&0===s.length)return 1<d.length?m.UNDEFINABLE:1===d.length?(b(c,f),i.forEach(function(e){c[e]=r[e]}),new x(c)):m.EMPTY;if(0===i.length&&0<s.length){if(1<d.length)return m.UNDEFINABLE;var p;if(1===d.length){var h=d[0];(p=b({},c))[h]=u[h].difference,c[h]=u[h].intersection}var v=s.map(function(e){var t=b({},c),n=t[e]=m.difference(m.UNIVERSAL,a[e]);return n===m.EMPTY?n:new x(t)}).filter(k);return p&&v.push(new x(p)),1<v.length?new w.ValuesOr(v):1===v.length?v[0]:m.EMPTY}if(0<i.length&&0<s.length){if(d.length)throw new Error("Can't handle any productable keys right now");if(i.forEach(function(e){c[e]=r[e]}),1!==s.length)return m.UNDEFINABLE;var y=s[0],g=b({},c);return g[y]=m.difference(m.UNIVERSAL,a[y]),new x(g)}}m.defineComparison(x,x,{union:function(t,n){var e=_(t.values,n.values),r=[],a={};e.aAndBKeys.forEach(function(e){m.isEqual(t.values[e],n.values[e])?a[e]=t.values[e]:r.push(e)});var i={},o={};if(r.forEach(function(e){i[e]=t.values[e],o[e]=n.values[e]}),!e.aOnlyKeys.length&&!e.bOnlyKeys.length){if(1===r.length){var s=r[0],c=a[s]=m.union(t.values[s],n.values[s]);return 1===u.size(a)&&m.isEqual(c,m.UNIVERSAL)?m.UNIVERSAL:new x(a)}if(0===r.length)return t}if(0===r.length){if(0<e.aOnlyKeys.length&&0===e.bOnlyKeys.length)return l(n);if(0===e.aOnlyKeys.length&&0<e.bOnlyKeys.length)return l(t)}return 0<e.aOnlyKeys.length&&0===e.bOnlyKeys.length&&m.isSubset(new x(i),new x(o))?n:0<e.bOnlyKeys.length&&0===e.aOnlyKeys.length&&m.isSubset(new x(o),new x(i))?t:new w.ValuesOr([t,n])},intersection:function(e,t){var n=e.values,r=t.values,a=!1,i={};return function(e,t,n,r,a){var i,o=b({},n);for(var s in e){if(void 0!==(i=t(s,e[s],s in n?n[s]:f,e,n)))return;delete o[s]}for(s in o)if(void 0!==(i=r(s,f,n[s],e,n)))return}(n,function(e,t,n){i[e]=n===f?t:m.intersection(t,n),i[e]===m.EMPTY&&(a=!0)},r,function(e,t,n){i[e]=n,i[e]===m.EMPTY&&(a=!0)}),a?m.EMPTY:new x(i)},difference:i}),m.defineComparison(m.UNIVERSAL,x,{difference:function(e,t){return i({values:{}},t)}}),n.exports=w.KeysAnd=x}),define("can-query-logic/src/types/and-or-not",["require","exports","module","can-query-logic/src/types/values-or","can-query-logic/src/types/values-not","can-query-logic/src/types/keys-and"],function(e,t,n){var r=e("can-query-logic/src/types/values-or"),a=e("can-query-logic/src/types/values-not"),i=e("can-query-logic/src/types/keys-and");n.exports={KeysAnd:i,ValuesOr:r,ValuesNot:a}}),define("can-query-logic/src/helpers",["require","exports","module","can-reflect"],function(e,t,n){var s=e("can-reflect"),r={undefined:0,null:1,number:3,string:4,object:5,boolean:6},a=function(e){var t=typeof e;return null===e&&(t="null"),r[t]},i={$gt:function(e,t){return a(e)>a(t)},$lt:function(e,t){return a(e)<a(t)}},c={$gt:function(e,t){return null==e||null==t?i.$gt(e,t):t<e},$lt:function(e,t){return null==e||null==t?i.$gt(e,t):e<t}},u={uniqueConcat:function(e,t,n){var r=new Set;return e.concat(t).filter(function(e){var t=n(e);return!r.has(t)&&(r.add(t),!0)})},getIndex:function(e,t,n){if(t&&t.length){if(-1===e(n,t[0]))return 0;if(1===e(n,t[t.length-1]))return t.length;for(var r=0,a=t.length;r<a;){var i=r+a>>>1;-1===e(n,t[i])?a=i:r=i+1}return a}},sortData:function(e){return"-"===e[0]?{prop:e.slice(1),desc:!0}:{prop:e,desc:!1}},defaultCompare:c,typeCompare:i,sorter:function(e,t){var i,o=u.sortData(e);return i=t&&t[o.prop]?t[o.prop]:c,function(e,t){var n,r=s.getKeyValue(e,o.prop),a=s.getKeyValue(t,o.prop);return o.desc&&(n=r,r=a,a=n),i.$lt(r,a)?-1:i.$gt(r,a)?1:0}},valueHydrator:function(e){if(s.isBuiltIn(e))return e;throw new Error("can-query-logic doesn't support comparison operator: "+JSON.stringify(e))}};n.exports=u}),define("can-query-logic/src/types/basic-query",["require","exports","module","can-query-logic/src/set","can-query-logic/src/types/make-real-number-range-inclusive","can-assign","can-reflect","can-query-logic/src/types/and-or-not","can-query-logic/src/helpers","can-define-lazy-value","can-symbol"],function(e,t,n){var l=e("can-query-logic/src/set"),r=e("can-query-logic/src/types/make-real-number-range-inclusive"),a=e("can-assign"),i=e("can-reflect"),o=e("can-query-logic/src/types/and-or-not"),s=e("can-query-logic/src/helpers"),c=e("can-define-lazy-value"),u=(e("can-symbol").for("can.isMember"),o.KeysAnd),f=o.ValuesOr,d=o.ValuesNot,p=r(0,1/0);function h(e,o){var t={};function n(e){this.key=e,this.compare=s.sorter(e,t)}return i.eachKey(e,function(a,i){t[i]={$gt:function(e,t){if(null==e||null==t)return s.typeCompare.$gt(e,t);var n=o({$gt:t},i,a,s.valueHydrator),r=o({$eq:e},i,a,s.valueHydrator);return l.isEqual(l.union(n,r),n)},$lt:function(e,t){if(null==e||null==t)return s.typeCompare.$lt(e,t);var n=o({$lt:t},i,a,s.valueHydrator),r=o({$eq:e},i,a,s.valueHydrator);return l.isEqual(l.union(n,r),n)}}}),l.defineComparison(n,n,{intersection:function(e,t){return e.key===t.key?e:l.EMPTY},difference:function(e,t){return e.key===t.key?l.EMPTY:e},union:function(e,t){return e.key===t.key?e:l.UNDEFINABLE}}),n}var v=h({});function y(e){a(this,e),this.filter||(this.filter=l.UNIVERSAL),this.page||(this.page=new p),this.sort||(this.sort="id"),"string"==typeof this.sort&&(this.sort=new v(this.sort))}y.KeysAnd=u,y.Or=f,y.Not=d,y.RecordRange=p,y.makeSort=h,i.assignMap(y.prototype,{count:function(){return this.page.end-this.page.start+1},sortData:function(e){return e.slice(0).sort(this.sort.compare)},filterMembersAndGetCount:function(e,t){if(t){if(!l.isSubset(this,t))throw new Error("can-query-logic: Unable to get members from a set that is not a superset of the current set.")}else t=new y;var n=e.filter(function(e){return this.filter.isMember(e)},this),r=n.length;r&&this.sort.key!==t.sort.key&&(n=this.sortData(n));var a=l.isEqual(this.page,l.UNIVERSAL);if(l.isEqual(t.page,l.UNIVERSAL))return a?{data:n,count:r}:{data:n.slice(this.page.start,this.page.end+1),count:r};if(this.sort.key===t.sort.key&&l.isEqual(t.filter,this.filter))return{data:n.slice(this.page.start-t.page.start,this.page.end-t.page.start+1),count:r};throw new Error("can-query-logic: Unable to get members from the parent set for this subset.")},filterFrom:function(e,t){return this.filterMembersAndGetCount(e,t).data},merge:function(e,t,n,r){var a=l.union(this,e);if(a!==l.UNDEFINABLE){var i=s.uniqueConcat(t,n,r);return a.sortData(i)}},index:function(e,t){var n=s.sortData(this.sort.key);if(i.hasOwnKey(e,n.prop))return s.getIndex(this.sort.compare,t,e)},isMember:function(e){return this.filter.isMember(e)},removePagination:function(){this.page=new p}});var g=["filter","page","sort"];function m(e,t,n){return!!n[e+"FilterIsSubset"]&&(!!n[t+"PageIsUniversal"]||n[e+"PageIsSubset"]&&n.sortIsEqual)}function b(e,t){this.queryA=e,this.queryB=t}function w(e,t){return new b(e,t)}i.eachKey({pageIsEqual:function(){return l.isEqual(this.queryA.page,this.queryB.page)},aPageIsUniversal:function(){return l.isEqual(this.queryA.page,l.UNIVERSAL)},bPageIsUniversal:function(){return l.isEqual(this.queryB.page,l.UNIVERSAL)},pagesAreUniversal:function(){return this.pageIsEqual&&this.aPageIsUniversal},sortIsEqual:function(){return this.queryA.sort.key===this.queryB.sort.key},aFilterIsSubset:function(){return l.isSubset(this.queryA.filter,this.queryB.filter)},bFilterIsSubset:function(){return l.isSubset(this.queryB.filter,this.queryA.filter)},aPageIsSubset:function(){return l.isSubset(this.queryA.page,this.queryB.page)},bPageIsSubset:function(){return l.isSubset(this.queryB.page,this.queryA.page)},filterIsEqual:function(){return l.isEqual(this.queryA.filter,this.queryB.filter)},aIsSubset:function(){return m("a","b",this)},bIsSubset:function(){return m("b","a",this)}},function(e,t){c(b.prototype,t,e)}),l.defineComparison(y,y,{union:function(e,t){var n=w(e,t),r=l.union(e.filter,t.filter);if(n.pagesAreUniversal)return new y({filter:r,sort:n.sortIsEqual?e.sort.key:void 0});if(n.filterIsEqual)return n.sortIsEqual?new y({filter:e.filter,sort:e.sort.key,page:l.union(e.page,t.page)}):n.aIsSubset?t:n.bIsSubset?e:l.UNDEFINABLE;throw new Error("different filters, non-universal pages")},intersection:function(e,t){var n=w(e,t);if(n.pagesAreUniversal){var r=l.intersection(e.filter,t.filter);return l.isDefinedAndHasMembers(r)?new y({filter:r,sort:n.sortIsEqual?e.sort.key:void 0}):r}return l.intersection(e.filter,t.filter)===l.EMPTY?l.EMPTY:n.filterIsEqual?n.sortIsEqual?new y({filter:e.filter,sort:e.sort.key,page:l.intersection(e.page,t.page)}):n.aIsSubset?e:n.bIsSubset?t:l.UNKNOWABLE:n.aIsSubset?e:n.bIsSubset?t:l.UNDEFINABLE},difference:function(e,t){var n,r,a,i,o=(n=e,r=t,a=[],g.forEach(function(e){l.isEqual(n[e],r[e])||a.push(e)}),a),s=w(e,t);if(1<o.length)return s.aIsSubset?l.EMPTY:s.pagesAreUniversal?new y({filter:l.difference(e.filter,t.filter),sort:e.sort.key}):l.UNDEFINABLE;switch(i=o[0]){case void 0:return l.EMPTY;case"sort":return s.pagesAreUniversal?l.EMPTY:l.UNKNOWABLE;case"page":case"filter":var c=l.difference(e[i],t[i]);if(l.isSpecial(c))return c;var u={filter:e.filter,page:e.page,sort:e.sort.key};return u[i]=c,new y(u)}}}),n.exports=y}),define("can-query-logic/src/serializer",["require","exports","module","can-reflect"],function(e,t,n){var r=e("can-reflect"),a=function(e){var r=this.serializers=new Map;e&&e.forEach(function(e){var t=e[0],n=e[1];r.set(t,n)}),this.serialize=this.serialize.bind(this)};a.prototype.add=function(e){r.assign(this.serializers,e instanceof a?e.serializers:e)},a.prototype.serialize=function(e){if(!e)return e;var t=e.constructor,n=this.serializers.get(t);return n?n(e,this.serialize):r.serialize(e)},n.exports=a}),define("can-query-logic/src/serializers/comparisons",["require","exports","module","can-query-logic/src/types/comparisons","can-query-logic/src/serializer","can-reflect"],function(e,t,n){var a=e("can-query-logic/src/types/comparisons"),r=e("can-query-logic/src/serializer"),i=e("can-reflect");function o(t){return function(e){return new t(e)}}var s={};function c(n,r){s[n]=function(e,t){return r(t?t(e[n]):e[n])},Object.defineProperty(s[n],"name",{value:"hydrate "+n,writable:!0})}function u(r,a){s[r]=function(e,t){var n=e[r];return t&&(n=n.map(function(e){return t(e)})),a(n)},Object.defineProperty(s[r],"name",{value:"hydrate "+r,writable:!0})}c("$eq",function(e){return new a.In([e])}),c("$ne",function(e){return new a.NotIn([e])}),c("$gt",o(a.GreaterThan)),c("$gte",o(a.GreaterThanEqual)),u("$in",o(a.In)),c("$lt",o(a.LessThan)),c("$lte",o(a.LessThanEqual)),u("$nin",o(a.GreaterThan));var l=new r([[a.In,function(e,t){return 1===e.values.length?t(e.values[0]):{$in:e.values.map(t)}}],[a.NotIn,function(e,t){return 1===e.values.length?{$ne:t(e.values[0])}:{$nin:e.values.map(t)}}],[a.GreaterThan,function(e,t){return{$gt:t(e.value)}}],[a.GreaterThanEqual,function(e,t){return{$gte:t(e.value)}}],[a.LessThan,function(e,t){return{$lt:t(e.value)}}],[a.LessThanEqual,function(e,t){return{$lte:t(e.value)}}],[a.And,function(e,t){var n={};return e.values.forEach(function(e){i.assignMap(n,t(e))}),n}]]);n.exports={hydrate:function(n,r){if(r||(r=function(){throw new Error("can-query-logic doesn't recognize operator: "+JSON.stringify(n))}),Array.isArray(n))return new a.In(n.map(function(e){return r(e)}));if(n&&"object"==typeof n){var e=Object.keys(n);if(e.every(function(e){return s[e]})){var t=e.map(function(e){var t={};return t[e]=n[e],(0,s[e])(t,r)});return 1<t.length?new a.And(t):t[0]}return r(n)}return new a.In([r(n)])},serializer:l}}),define("can-query-logic/src/schema-helpers",["require","exports","module","can-reflect","can-query-logic/src/set","can-symbol"],function(e,t,n){var r,a=e("can-reflect"),i=e("can-query-logic/src/set"),o=e("can-symbol");n.exports=r={isRangedType:function(e){return e&&a.isConstructorLike(e)&&!i.hasComparisons(e)&&!e[o.for("can.SetType")]&&e.prototype.valueOf&&e.prototype.valueOf!==Object.prototype.valueOf},categorizeOrValues:function(e){var t={primitives:[],valueOfTypes:[],others:[]};return e.forEach(function(e){a.isPrimitive(e)?t.primitives.push(e):r.isRangedType(e)?t.valueOfTypes.push(e):t.others.push(e)}),t}}}),define("can-query-logic/src/types/make-maybe",["require","exports","module","can-query-logic/src/set","can-query-logic/src/types/comparisons","can-reflect","can-query-logic/src/schema-helpers","can-symbol"],function(e,t,n){var s=e("can-query-logic/src/set"),c=e("can-query-logic/src/types/comparisons"),u=e("can-reflect"),a=e("can-query-logic/src/schema-helpers"),r=e("can-symbol"),i=r.for("can.ComparisonSetType"),l=r.for("can.isMember");function o(e,n){var i=new c.In(e);function o(e){var t=function t(n,e){var r;if(e instanceof c.And)return e.values.map(function(e){return t(n,e)}).reduce(function(e,t){return{range:s.intersection(e.range,t.range),enum:s.intersection(e.enum,t.enum)}},{range:s.UNIVERSAL,enum:n});if(e instanceof c.In){var a=e.values.filter(function(e){return n.isMember(e)});if(a.length){var i=e.values.slice(0);return u.removeValues(i,a),{enum:new c.In(a),range:i.length?new c.In(i):s.EMPTY}}return{enum:s.EMPTY,range:e}}if(e instanceof c.NotIn){r=s.intersection(n,e);var o=e.values.filter(function(e){return!n.isMember(e)});return{range:o.length?new c.NotIn(o):s.UNIVERSAL,enum:r}}return{enum:s.EMPTY,range:e}}(i,e.range);if(this.range=t.range||s.EMPTY,e.enum?t.enum!==s.EMPTY?this.enum=s.union(t.enum,e.enum):this.enum=e.enum:this.enum=t.enum,this.enum===s.EMPTY&&this.range===s.EMPTY)return s.EMPTY}return o.prototype.orValues=function(){var e=[];return this.range!==s.EMPTY&&e.push(this.range),this.enum!==s.EMPTY&&e.push(this.enum),e},o.prototype[l]=function(){var e=this.range[l]||this.range.isMember,t=this.enum[l]||this.enum.isMember;return e.apply(this.range,arguments)||t.apply(this.enum,arguments)},s.defineComparison(o,o,{union:function(e,t){return new o({enum:s.union(e.enum,t.enum),range:s.union(e.range,t.range)})},difference:function(e,t){return new o({enum:s.difference(e.enum,t.enum),range:s.difference(e.range,t.range)})},intersection:function(e,t){return new o({enum:s.intersection(e.enum,t.enum),range:s.intersection(e.range,t.range)})}}),o.inValues=e,s.defineComparison(s.UNIVERSAL,o,{difference:function(e,t){var n;if(t.range===s.UNIVERSAL)return new o({range:t.range,enum:s.difference(i,t.enum)});if(t.enum!==s.EMPTY)return n=s.difference(e,t.range),new o({enum:s.difference(i,t.enum),range:n});var r=s.difference(s.UNIVERSAL,t.range),a=s.difference(i,t.range);return new o({range:r,enum:s.difference(a,r)})}}),n=n||function(e){return e},o.hydrate=function(e,t){return new o({range:t(e,n)})},o}o.canMakeMaybeSetType=function(e){var t=u.getSchema(e);if(t&&"Or"===t.type){var n=a.categorizeOrValues(t.values);return 1===n.valueOfTypes.length&&n.valueOfTypes.length+n.primitives.length===t.values.length}return!1},o.makeMaybeSetTypes=function(t){var n,e=u.getSchema(t),r=a.categorizeOrValues(e.values);return t[i]?n=t[i]:((n=function(e){this.value=u.new(t,e)}).prototype.valueOf=function(){return this.value},u.assignSymbols(n.prototype,{"can.serialize":function(){return this.value}})),{Maybe:o(r.primitives,function(e){return new n(e)}),ComparisonSetType:n}},n.exports=o}),define("can-query-logic/src/types/make-enum",["require","exports","module","can-query-logic/src/set","can-query-logic/src/array-union-intersection-difference","can-query-logic/src/schema-helpers","can-reflect","can-symbol"],function(e,t,n){var o=e("can-query-logic/src/set"),s=e("can-query-logic/src/array-union-intersection-difference"),a=e("can-query-logic/src/schema-helpers"),c=e("can-reflect"),r=e("can-symbol"),i=r.for("can.SetType"),u=r.for("can.isMember"),l=r.for("can.new");function f(n,r){function a(e){var t=Array.isArray(e)?e:[e];this.values=r?t.map(r):t}c.assignSymbols(a.prototype,{"can.serialize":function(){return 1===this.values.length?this.values[0]:this.values}}),a.prototype[u]=function(t){return this.values.some(function(e){return o.isEqual(e,t)})},a.UNIVERSAL=new a(n);var i=function(e,t){var n=s(e.values,t.values);return n.difference.length?new a(n.difference):o.EMPTY};return o.defineComparison(a,a,{union:function(e,t){var n=s(e.values,t.values);return n.union.length?new a(n.union):o.EMPTY},intersection:function(e,t){var n=s(e.values,t.values);return n.intersection.length?new a(n.intersection):o.EMPTY},difference:i}),o.defineComparison(a,o.UNIVERSAL,{difference:function(e){return i(e,{values:n.slice(0)})}}),o.defineComparison(o.UNIVERSAL,a,{difference:function(e,t){return i({values:n.slice(0)},t)}}),a}function d(e,n,t){var r=f(n,t);return e[i]=r,e[u]=function(t){return n.some(function(e){return o.isEqual(e,t)})},r}d.canMakeEnumSetType=function(e){var t=c.getSchema(e);return!(!t||"Or"!==t.type)&&a.categorizeOrValues(t.values).primitives.length===t.values.length},d.makeEnumSetType=function(e){var t=c.getSchema(e),n=a.categorizeOrValues(t.values),r=e[l]?e[l].bind(e):void 0;return f(n.primitives,r)},n.exports=d}),define("can-query-logic/src/serializers/basic-query",["require","exports","module","can-symbol","can-reflect","can-query-logic/src/types/basic-query","can-query-logic/src/set","can-query-logic/src/serializers/comparisons","can-query-logic/src/serializer","can-query-logic/src/types/comparisons","can-query-logic/src/types/make-maybe","can-query-logic/src/types/make-enum","can-log/dev/dev","can-query-logic/src/helpers"],function(e,t,n){var r=e("can-symbol"),c=e("can-reflect"),u=e("can-query-logic/src/types/basic-query"),l=e("can-query-logic/src/set"),o=e("can-query-logic/src/serializers/comparisons"),s=e("can-query-logic/src/serializer"),f=e("can-query-logic/src/types/comparisons"),i=e("can-query-logic/src/types/make-maybe"),d=e("can-query-logic/src/types/make-enum"),p=(e("can-log/dev/dev"),e("can-query-logic/src/helpers")),h=r.for("can.SetType"),v=r.for("can.getSchema"),y=new u({});function g(e,t,n){return e&&"object"==typeof e&&"$or"in e?function(e,t,n){var r=e.map(function(e){return w(e,t,n)}),a=function(e){var t=Object.keys(e[0].values),n={},r=new f.In(t);if(t.map(function(e){n[e]=[]}),!e.every(function(e){return!!l.isEqual(r,new f.In(Object.keys(e.values)))&&(c.eachKey(e.values,function(e,t){n[t].push(e)}),!0)}))return;var a=[];if(t.forEach(function(e){n[e].reduce(function(e,t){return!1!==t&&(void 0===t?e:!!l.isEqual(e,t)&&e)})||a.push(e)}),1!==a.length)return;var i=a[0],o=n[i].reduce(function(e,t){return l.union(e,t)},l.EMPTY),s={};return t.map(function(e){s[e]=n[e][0]}),s[i]=o,new u.KeysAnd(s)}(r);if(a)return a;return new u.Or(r)}(e.$or,t,n):w(e,t,n)}var m=new WeakMap;function b(e,t,n,r){if(n){var a=n[h];return a?a.hydrate?a.hydrate(e,o.hydrate):l.hasComparisons(a)?new a(e):o.hydrate(e,function(e){return new a(e)}):d.canMakeEnumSetType(n)?(m.has(n)||m.set(n,d.makeEnumSetType(n)),new(a=m.get(n))(e)):i.canMakeMaybeSetType(n)?(m.has(n)||m.set(n,i.makeMaybeSetTypes(n)),(a=m.get(n).Maybe).hydrate(e,o.hydrate)):o.hydrate(e,r)}return o.hydrate(e,r)}function w(e,n,r){function a(e){if(e){if(Array.isArray(e))return e.map(r);if(c.isPlainObject(e))return w(e,(t=e.constructor)&&t[v]&&t[v]().keys||{})}var t;return r?r(e):e}n=n||{};var i={};return c.eachKey(e,function(e,t){i[t]=b(e,0,n[t],a)}),new u.KeysAnd(i)}n.exports=function(e){var a=e.identity&&e.identity[0],n=e.keys,t=[[u.Or,function(e,t){return e.values.map(function(e){return t(e)})}],[u.KeysAnd,function(e,n){var r=[],a={};return c.eachKey(e.values,function(e,t){"function"==typeof e.orValues?function n(r,e,a,i){e.orValues().forEach(function(e){if("function"==typeof e.orValues)n(r,e,a,i);else{var t={};t[i]=a(e),r.push(t)}})}(r,e,n,t):a[t]=n(e)}),r.length?1===r.length?r[0]:{$or:r.map(function(e){return c.assign(c.serialize(a),e)})}:a}],[u.RecordRange,function(e){return{start:e.start,end:e.end}}],[u,function(e,t){var n=l.isEqual(e.filter,l.UNIVERSAL)?{}:t(e.filter),r={};return 0!==c.size(n)&&(r.filter=n),l.isEqual(e.page,y.page)||(r.page={start:e.page.start},e.page.end!==y.page.end&&(r.page.end=e.page.end)),e.sort.key!==a&&(r.sort=e.sort.key),r}]],r=u.makeSort(n,b),i=new s(t);return i.add(o.serializer),{hydrate:function(e){var t={filter:g(c.serialize(e.filter),n,p.valueHydrator)};return e.page&&(t.page=new u.RecordRange(e.page.start,e.page.end)),e.sort?t.sort=new r(e.sort):t.sort=new r(a),new u(t)},serializer:i}}}),define("can-query-logic",["require","exports","module","can-query-logic/src/set","can-symbol","can-reflect","can-query-logic/src/serializers/basic-query","can-query-logic/src/types/basic-query","can-query-logic/src/types/comparisons","can-query-logic/src/types/make-enum"],function(e,t,n){var o=e("can-query-logic/src/set"),r=e("can-symbol"),s=e("can-reflect"),c=e("can-query-logic/src/serializers/basic-query"),a=e("can-query-logic/src/types/basic-query"),i=e("can-query-logic/src/types/comparisons"),u=r.for("can.getSchema"),l=r.for("can.new"),f=e("can-query-logic/src/types/make-enum");function d(e,t){e=e||{};var n,r=t&&t.toQuery,a=t&&t.toParams;(n=e[u]?e[u]():e).identity&&n.identity[0]||(n.identity=["id"]);var i,o,s=c(n);i=r?function(e){return s.hydrate(r(e))}:s.hydrate,o=a?function(e){return a(s.serializer.serialize(e))}:s.serializer.serialize,this.hydrate=i,this.serialize=o,this.schema=n}function p(i){return function(e,t){var n=this.hydrate(e),r=this.hydrate(t),a=o[i](n,r);return this.serialize(a)}}function h(a){return function(e,t){var n=this.hydrate(e),r=this.hydrate(t);return o[a](n,r)}}for(var v in s.assignSymbols(d.prototype,{"can.getSchema":function(){return this.schema}}),s.assign(d.prototype,{union:p("union"),difference:p("difference"),intersection:p("intersection"),isEqual:h("isEqual"),isProperSubset:h("isProperSubset"),isSubset:h("isSubset"),isSpecial:o.isSpecial,isDefinedAndHasMembers:o.isDefinedAndHasMembers,count:function(e){var t=this.hydrate(e);return t.page.end-t.page.start+1},identityKeys:function(){return this.schema.identity},filterMembers:function(e,t,n){var r=this.hydrate(e);if(3<=arguments.length){var a=this.hydrate(t);return r.filterFrom(n,a)}return r.filterFrom(t)},filterMembersAndGetCount:function(e,t,n){var r=this.hydrate(e),a=this.hydrate(t);return r.filterMembersAndGetCount(n,a)},unionMembers:function(e,t,n,r){var a=this.hydrate(e),i=this.hydrate(t),o=this.schema;return a.merge(i,n,r,function(e){return s.getIdentity(e,o)})},isMember:function(e,t){return this.hydrate(e).isMember(t)},memberIdentity:function(e){return s.getIdentity(e,this.schema)},index:function(e,t,n){return this.hydrate(e).index(n,t)},insert:function(e,t,n){var r=this.index(e,t,n);void 0===r&&(r=t.length);var a=t.slice(0);return a.splice(r,0,n),a},isPaginated:function(e){var t=this.hydrate(e);return!o.isEqual(t.page,o.UNIVERSAL)},removePagination:function(e){var t=this.hydrate(e);return t.removePagination(),this.serialize(t)}}),o)void 0===d[v]&&(d[v]=o[v]);d.makeEnum=function(e){var t=function(){};return t[l]=function(e){return e},f(t,e),t},d.KeysAnd=a.KeysAnd,d.ValuesOr=a.Or,d.In=i.In,d.NotIn=i.NotIn,d.GreaterThan=i.GreaterThan,d.GreaterThanEqual=i.GreaterThanEqual,d.LessThan=i.LessThan,d.LessThanEqual=i.LessThanEqual,d.ValueAnd=i.And,d.ValueOr=i.Or,n.exports=d}),define("can-fixture/matches",["require","exports","module","can-query-logic/src/set","can-reflect","can-fixture/data-from-url","can-query-logic"],function(e,t,n){var o=e("can-query-logic/src/set"),s=e("can-reflect"),r=e("can-fixture/data-from-url"),c=e("can-query-logic");function u(e){if(e.fixture||e.xhr||e.data){var t=s.serialize(e);return delete t.fixture,delete t.xhr,delete t.data,t}return e}var a={intersection:function(e,t){return e.value===t.value?e:o.EMPTY},difference:function(e,t){return e.value===t.value?o.EMPTY:e},union:function(e,t){return e.value===t.value?e:o.UNDEFINABLE}};function i(r){var e=function(){},t=function(e){this.value=e};return t.prototype.isMember=function(e,t,n){return r(this.value,e,t,n)},s.assignSymbols(e,{"can.SetType":t}),o.defineComparison(t,t,a),o.defineComparison(o.UNIVERSAL,t,{difference:function(){return o.UNDEFINABLE}}),e}function l(e,t){var n=e.data,r=t.data;if(n&&r&&!function n(e,r){if(e===r)return!0;if(Array.isArray(e)&&Array.isArray(r))return e.every(function(e,t){return n(e,r[t])});if(e&&r&&s.isPlainObject(e)&&s.isPlainObject(r)){for(var t in e){if(!r.hasOwnProperty(t))return!1;if(!n(e[t],r[t]))return!1}return!0}return!1}(n,r))return!1;var a=new c.KeysAnd(u(e)),i=new c.KeysAnd(u(t));return o.isEqual(a,i)}var f={};s.eachKey({IsEmptyOrNull:function(e,t){return null==e&&0===s.size(t)||(null==t&&0===s.size(e)||l(e,t))},isEmptyOrSubset:function(e,t){return null==e&&0===s.size(t)||(null==t&&0===s.size(e)||(n=e,r=t,o.isSubset(new c.KeysAnd(n),new c.KeysAnd(r))));var n,r},TemplateUrl:function(e,t){return!!r(e,t)},StringIgnoreCase:function(e,t){return t&&e?e.toLowerCase()===t.toLowerCase():t===e},Ignore:function(){return!0}},function(e,t){f[t]=i(e)});var d={identity:["id"],keys:{url:f.TemplateUrl,fixture:f.Ignore,xhr:f.Ignore,type:f.StringIgnoreCase,method:f.StringIgnoreCase,helpers:f.Ignore,headers:f.IsEmptyOrNull,data:f.IsEmptyOrSubset}},p=new c(d);n.exports={fixture:l,request:function(e,t){return p.isMember({filter:t},e)},matches:function(e,t,n){return n?this.fixture(e,t):this.request(e,t)},makeComparatorType:i}}),define("can-memory-store/make-simple-store",["require","exports","module","can-reflect"],function(e,t,n){var g=e("can-reflect");n.exports=function e(t){t.constructor=e;var n=Object.create(t);return g.assignMap(n,{getRecordFromParams:function(e){var t=g.getIdentity(e,this.queryLogic.schema);return this.getRecord(t)},log:function(){this._log=!0},getSets:function(){return this.getQueries()},getQueries:function(){return Promise.resolve(this.getQueriesSync())},getQueriesSync:function(){return this.getQueryDataSync().map(function(e){return e.query})},getListData:function(e){e=e||{};var t=this.getListDataSync(e);return t?Promise.resolve(t):Promise.reject({title:"no data",status:"404",detail:"No data available for this query.\nAvailable queries: "+JSON.stringify(this.getQueriesSync())})},getPaginatedListDataSync:function(e){var t=this.getAllRecords(),n=this.queryLogic.removePagination(e.query),r=this.queryLogic.filterMembersAndGetCount(n,{},t),a=function(e,t,n){for(var r=g.getSchema(n),a=0;a<e.length;a++)if(t===g.getIdentity(e[a],r))return a;return-1}(r.data,e.startIdentity,this.queryLogic),i=r.data.slice(a,a+this.queryLogic.count(e.query));return{count:r.data.length,data:i}},getListDataSync:function(e){for(var t,n=this.getQueryDataSync(),r=this.queryLogic.isPaginated(e),a=0;a<n.length;a++){var i=n[a].query;this.queryLogic.isSubset(e,i)&&(t=n[a])}var o=this.getAllRecords();if(r&&this.queryLogic.isPaginated(t.query)){var s=this.getPaginatedListDataSync(t);return this.queryLogic.filterMembersAndGetCount(e,t.query,s.data)}var c=this.queryLogic.filterMembersAndGetCount(e,{},o);return c&&c.count?c:t?{count:0,data:[]}:void 0},updateListData:function(e,t){var n=this.getQueryDataSync();t=t||{};var r,a=g.serialize(e),i=(r=a,Array.isArray(r)?r:r.data);this.updateRecordsSync(i);var o=this.queryLogic.isPaginated(t),s=i.length?g.getIdentity(i[0],this.queryLogic.schema):void 0;if(o){for(var c=0;c<n.length;c++){var u=n[c].query,l=this.queryLogic.union(u,t);if(this.queryLogic.isDefinedAndHasMembers(l)){var f=this.getPaginatedListDataSync(n[c]),d=this.queryLogic.unionMembers(u,t,f.data,i);return s=g.getIdentity(d[0],this.queryLogic.schema),n[c]={query:l,startIdentity:s},this.updateQueryDataSync(n),Promise.resolve()}}return n.push({query:t,startIdentity:s}),this.updateQueryDataSync(n),Promise.resolve()}var p=this.getAllRecords(),h=this.queryLogic.filterMembers(t,p);if(h.length){var v=new Map;h.forEach(function(e){v.set(g.getIdentity(e,this.queryLogic.schema),e)},this),i.forEach(function(e){v.delete(g.getIdentity(e,this.queryLogic.schema))},this),this.destroyRecords(g.toArray(v))}var y=this.getQueryDataSync().filter(function(e){return!this.queryLogic.isSubset(e.query,t)},this);return y.filter(function(e){return this.queryLogic.isSubset(t,e.query)},this).length?this.updateQueryDataSync(y):this.updateQueryDataSync(y.concat([{query:t,startIdentity:s}])),Promise.resolve()},getData:function(e){var t=g.getIdentity(e,g.getSchema(this.queryLogic)),n=this.getRecord(t);return n?Promise.resolve(n):Promise.reject({title:"no data",status:"404",detail:"No record with matching identity ("+t+")."})},createData:function(e){return this.updateRecordsSync([e]),Promise.resolve(g.assignMap({},this.getRecordFromParams(e)))},updateData:function(e){if(!this.errorOnMissingRecord||this.getRecordFromParams(e))return this.updateRecordsSync([e]),Promise.resolve(g.assignMap({},this.getRecordFromParams(e)));var t=g.getIdentity(e,this.queryLogic.schema);return Promise.reject({title:"no data",status:"404",detail:"No record with matching identity ("+t+")."})},destroyData:function(e){var t=g.getIdentity(e,this.queryLogic.schema),n=this.getRecordFromParams(e);return this.errorOnMissingRecord&&!n?Promise.reject({title:"no data",status:"404",detail:"No record with matching identity ("+t+")."}):(this.destroyRecords([e]),Promise.resolve(g.assignMap({},n||e)))}})}}),define("can-memory-store",["require","exports","module","can-reflect","can-namespace","can-memory-store/make-simple-store"],function(e,t,n){var r=e("can-reflect"),a=e("can-namespace"),i=e("can-memory-store/make-simple-store");n.exports=a.memoryStore=function e(t){t.constructor=e;var n=Object.create(i(t));return r.assignMap(n,{clear:function(){this._instances={},this._queries=[]},_queryData:[],updateQueryDataSync:function(e){this._queryData=e},getQueryDataSync:function(){return this._queryData},_instances:{},getRecord:function(e){return this._instances[e]},getAllRecords:function(){var e=[];for(var t in this._instances)e.push(this._instances[t]);return e},destroyRecords:function(e){r.eachIndex(e,function(e){var t=r.getIdentity(e,this.queryLogic.schema);delete this._instances[t]},this)},updateRecordsSync:function(e){e.forEach(function(e){var t=r.getIdentity(e,this.queryLogic.schema);this._instances[t]=e},this)}}),n}}),define("can-fixture/store",["require","exports","module","can-query-logic","can-reflect","can-memory-store"],function(e,t,n){var r=e("can-query-logic"),i=e("can-reflect"),s=e("can-memory-store"),a=function(n,r){return function(e,t){this.connection[n](r.call(this,e.data)).then(function(e){t(e)},function(e){t(parseInt(e.status,10),e)})}},c=function(e,r){return function(){var t=[],n=0;return e.forEach(function(e){t.push(i.serialize(e)),n=Math.max(e[r],n)}),{maxId:n,items:t}}},u=function(e,t,n){var r=e.queryLogic.schema,a=r.identity[0],i=r.keys;for(var o in i&&i[a]||console.warn("No type specified for identity key. Going to convert strings to reasonable type."),this.connection=e,this.makeItems=t,this.idProp=n,this.reset(),u.prototype)this[o]=this[o].bind(this)};function o(e){var t=this.connection.queryLogic.schema,n=t.identity[0],r=t.keys;r&&r[n]||((r={})[n]=function(e){return"string"==typeof e?function(e){switch(e){case"NaN":case"Infinity":return+e;case"null":return null;case"undefined":return;case"true":case"false":return"true"===e;default:var t=+e;return isNaN(t)?e:t}}(e):e});var a={};return i.eachKey(e,function(e,t){r[t]?a[t]=i.convert(e,r[t]):a[t]=e}),a}function l(e){return e&&"identityKeys"in e}i.assignMap(u.prototype,{getListData:a("getListData",function(e){return e}),getData:a("getData",o),createData:function(e,t){var n=this.idProp;e.data[n]=++this.maxId,this.connection.createData(o.call(this,e.data)).then(function(e){t(e)},function(e){t(403,e)})},createInstance:function(e){var t=this.idProp;return t in e||(e[t]=++this.maxId),this.connection.createData(e)},updateData:a("updateData",o),updateInstance:function(e){return this.connection.updateData(e)},destroyInstance:function(e){return this.connection.destroyData(e)},destroyData:a("destroyData",o),reset:function(e){e&&(this.makeItems=c(e,this.idProp));var t=this.makeItems();this.maxId=t.maxId,this.connection.updateListData(t.items,{})},get:function(e){var t=this.connection.queryLogic.memberIdentity(e);return this.connection.getRecord(t)},getList:function(e){return this.connection.getListDataSync(e)}}),u.make=function(a,i,e){var t,o;"number"==typeof a?(e?l(e)||(e=new r(e)):e=new r({}),o=e.identityKeys()[0]||"id",t=function(){for(var e=[],t=0,n=0;n<a;n++){var r=i(n,e);r[o]||(r[o]=n),t=Math.max(r[o],t),e.push(r)}return{maxId:t,items:e}}):Array.isArray(a)&&((e=i)?l(e)||(e=new r(e)):e=new r({}),o=e.identityKeys()[0]||"id",t=c(a,o));var n=s({queryLogic:e,errorOnMissingRecord:!0});return new u(n,t,o)},n.exports=u}),define("can-fixture/core",["require","exports","module","can-key/sub/sub","can-reflect","can-fixture/matches","can-log","can-log/dev/dev","can-fixture/data-from-url","can-fixture/store"],function(e,o,t){"use strict";var s=e("can-key/sub/sub"),c=e("can-reflect"),r=e("can-fixture/matches"),w=(e("can-log"),e("can-log/dev/dev")),u=e("can-fixture/data-from-url");e("can-fixture/store");var l=[];o.fixtures=l;var x={item:{GET:"getData",PUT:"updateData",DELETE:"destroyData"},list:{GET:"getListData",POST:"createData"}};function _(e){var t=e.match(/(GET|POST|PUT|DELETE|PATCH) (.+)/i);return t?[t[1],t[2]]:[void 0,e]}function f(e,t){var n={},r=_(e),a=r[0],i=function(e,t){if(!(t=t||function(e){var t=e.match(/\{(.*)\}/);if(t&&2===t.length)return t[1]}(e)))return[void 0,e];var n=new RegExp("\\/\\{"+t+"\\}.*"),r=n.test(e),a=r?e.replace(n,""):e;return[r?e:e.trim()+"/{"+t+"}",a]}(r[1],t.idProp),o=i[0],s=i[1];if(a){var c=['fixture("'+e+'", fixture) must use a store method, not a store directly.'];if(o){var u=x.item[a];if(u){n[a+" "+o]=t[u];var l='Replace with fixture("'+a+" "+o+'", fixture.'+u+") for items.";c.push(l)}}var f=x.list[a];if(f){n[a+" "+s]=t[f];var d='Replace with fixture("'+a+" "+s+'", fixture.'+f+") for lists.";c.push(d)}var p=c.join(" ");w.warn(p)}else{var h=x.item;for(var v in h){var y=h[v];n[v+" "+o]=t[y]}var g=x.list;for(var m in g){var b=g[m];n[m+" "+s]=t[b]}}return n}o.add=function(e,t){if(void 0!==t){if((n=t)&&(n.getData||n.getListData))return e=f(e,t),void o.add(e);var n,r,a,i;"string"==typeof e&&(r=_(e),a=r[0],i=r[1],e=a?{type:a,url:i}:{url:i}),function(e,t,n){var r=o.index(t,!0);if(-1<r&&l.splice(r,1),null!=n){if("object"==typeof n){var a=n;n=function(){return a}}t.fixture=n,l.unshift(t)}}(0,e,t)}else c.eachKey(e,function(e,t){o.add(t,e)})};var d=o.add;d.on=!0,d.delay=10,o.callDynamicFixture=function(t,n,r){t.data=n.data;var a=function(){var e=o.extractResponse.apply(t,arguments);return r.apply(this,e)},e=function(){var e=n.fixture(t,a,t.headers,n);void 0!==e&&a(200,e)};return t.async?setTimeout(e,d.delay):(e(),null)},o.index=function(e,t){for(var n=0;n<l.length;n++)if(r.matches(e,l[n],t))return n;return-1},o.get=function(e){if(d.on){var t=o.index(e,!0);-1===t&&(t=o.index(e,!1));var n=0<=t?c.assignMap({},l[t]):void 0;if(n){var r=n.fixture,a=u(n.url,e.url);if("string"==typeof n.fixture)a&&(r=s(r,a)),n.url=r,n.data=null,n.type="GET",n.error||(n.error=function(e,t,n){throw"fixtures.js Error "+t+" "+n});else if(c.isPlainObject(e.data)||null==e.data){var i=c.assignMap({},e.data||{});n.data=c.assignMap(i,a)}else n.data=e.data}return n}},o.matches=r,o.extractResponse=function(e,t,n,r){return"number"!=typeof e&&(n=t,t=e,e=200),"string"==typeof n&&(r=n,n={}),[e,t,n,r]}}),define("can-fixture/xhr",["require","exports","module","can-fixture/core","can-deparam","can-reflect","can-log"],function(e,t,n){!function(e,t,n,r){"use strict";var o=t("can-fixture/core"),s=t("can-deparam"),c=t("can-reflect"),u=t("can-log"),a=XMLHttpRequest,i=void 0!==e?e:window,l=["type","url","async","response","responseText","responseType","responseXML","responseURL","status","statusText","readyState"],f=["abort","error","load","loadend","loadstart","progress","readystatechange"];function d(e,t){for(var n=e.__events[t]||[],r=0,a=n.length;r<a;r++)n[r].call(e)}function p(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:n})}!function(){var e=new a;for(var t in e)0===t.indexOf("on")?-1===f.indexOf(t.substr(2))&&f.push(t.substr(2)):-1===l.indexOf(t)&&"function"!=typeof e[t]&&l.push(t)}(),i.XMLHttpRequest=function(){var t=this,n=new a;p(this,"_xhr",n),p(this,"_requestHeaders",{}),p(this,"__events",{}),f.forEach(function(e){n["on"+e]=function(){if(d(t,e),t["on"+e])return t["on"+e].apply(t,arguments)}}),this.onload=null},i.XMLHttpRequest._XHR=a,c.assignMap(XMLHttpRequest.prototype,{setRequestHeader:function(e,t){this._requestHeaders[e]=t},open:function(e,t,n){this.type=e,this.url=t,this.async=!1!==n},getAllResponseHeaders:function(){return this._xhr.getAllResponseHeaders.apply(this._xhr,arguments)},addEventListener:function(e,t){(this.__events[e]=this.__events[e]||[]).push(t)},removeEventListener:function(e,t){var n=this.__events[e]=this.__events[e]||[],r=n.indexOf(t);0<=r&&n.splice(r,1)},setDisableHeaderCheck:function(e){this._disableHeaderCheck=!!e},getResponseHeader:function(e){return this._xhr.getResponseHeader(e)},abort:function(){var e=this._xhr;return void 0!==this.timeoutId&&(clearTimeout(this.timeoutId),e.open(this.type,this.url,!1!==this.async),e.send()),e.abort()},send:function(e){var t=this.type.toLowerCase()||"get",n={url:this.url,data:e,headers:this._requestHeaders,type:t,method:t,async:this.async,xhr:this};if((!n.data&&"get"===n.type||"delete"===n.type)&&(n.data=s(n.url.split("?")[1]),n.url=n.url.split("?")[0]),"string"==typeof n.data)try{n.data=JSON.parse(n.data)}catch(e){n.data=s(n.data)}var r=o.get(n),a=this;if(!r||"function"!=typeof r.fixture){var i=function(){return a._xhr.open(a._xhr.type,a._xhr.url,a._xhr.async),a._requestHeaders&&Object.keys(a._requestHeaders).forEach(function(e){a._xhr.setRequestHeader(e,a._requestHeaders[e])}),a._xhr.send(e)};return r&&"number"==typeof r.fixture?(u.log("can-fixture: "+n.url+" => delay "+r.fixture+"ms"),void(this.timeoutId=setTimeout(i,r.fixture))):(r&&(u.log("can-fixture: "+n.url+" => "+r.url),c.assignMap(a,r)),i())}this.timeoutId=o.callDynamicFixture(n,r,function(e,t,r,n){t="string"==typeof t?t:JSON.stringify(t),a._xhr={open:function(){},send:function(){},abort:function(){},getResponseHeader:function(){}},c.assignMap(a,{readyState:4,status:e}),200<=e&&e<300||304===e?c.assignMap(a,{statusText:n||"OK",responseText:t}):c.assignMap(a,{statusText:n||"error",responseText:t}),a.getAllResponseHeaders=function(){var n=[];return c.eachKey(r||{},function(e,t){Array.prototype.push.apply(n,[t,": ",e,"\r\n"])}),n.join("")},a.onreadystatechange&&a.onreadystatechange({target:a}),d(a,"progress"),a.onprogress&&a.onprogress(),d(a,"load"),a.onload&&a.onload(),d(a,"loadend"),a.onloadend&&a.onloadend()})}}),l.forEach(function(t){Object.defineProperty(XMLHttpRequest.prototype,t,{get:function(){return this._xhr[t]},set:function(e){try{this._xhr[t]=e}catch(e){}}})})}(function(){return this}(),e)}),define("can-fixture",["require","exports","module","can-fixture/core","can-fixture/store","can-fixture/xhr","can-reflect","can-namespace"],function(e,t,n){"use strict";var r=e("can-fixture/core"),a=r.add,i=e("can-fixture/store");e("can-fixture/xhr");var o=e("can-reflect"),s=e("can-namespace"),c=function(){};o.assignMap(a,{rand:function e(t,n,r){if("number"==typeof t)return"number"==typeof n?t+Math.floor(Math.random()*(n-t+1)):Math.floor(Math.random()*(t+1));var a=t.slice(0);void 0===n?(n=1,r=a.length):void 0===r&&(r=n);for(var i=[],o=n+Math.round(e(r-n)),s=0;s<o;s++){var c=e(a.length-1),u=a.splice(c,1)[0];i.push(u)}return i},xhr:function(e){return o.assignMap({},{abort:c,getAllResponseHeaders:function(){return""},getResponseHeader:function(){return""},open:c,overrideMimeType:c,readyState:4,responseText:"",responseXML:null,send:c,setRequestHeader:c,status:200,statusText:"OK"},e)},store:i.make,fixtures:r.fixtures}),"undefined"!=typeof window&&"function"!=typeof e.resolve&&(window.fixture=a),n.exports=s.fixture=a}),define("can/es/can-fixture",["exports","can-fixture"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-query-logic",["exports","can-query-logic"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-connect/behavior",function(e,t,n){"use strict";var r={};function a(i,o){"string"!=typeof i&&(o=i,i=void 0);var e=function(e){var t=function(){};Object.defineProperty(t,"name",{value:i,configurable:!0}),t.prototype=e;var n=new t,r="function"==typeof o?o.apply(n,arguments):o;for(var a in r)r.hasOwnProperty(a)?Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(r,a)):n[a]=r[a];return n.__behaviorName=i,n};return i&&(r[e.behaviorName=i]=e),e.isBehavior=!0,e}a.map=r,n.exports=a}),define("can-connect/connect",["require","exports","module","can-reflect","can-connect/behavior"],function(e,t,n){e("can-reflect").assignMap;var r=e("can-connect/behavior"),a=function(e,t){(e=e.map(function(e,t){var n=-1;return"string"==typeof e?(n=a.order.indexOf(e),e=e.map[e]):e.isBehavior?n=a.order.indexOf(e.behaviorName):e=a.behavior(e),{originalIndex:t,sortedIndex:n,behavior:e}})).sort(function(e,t){return~e.sortedIndex&&~t.sortedIndex?e.sortedIndex-t.sortedIndex:e.originalIndex-t.originalIndex}),e=e.map(function(e){return e.behavior});var n=a.base(a.behavior("options",function(){return t})());return e.forEach(function(e){n=e(n)}),n.init&&n.init(),n};a.order=["data/localstorage-cache","data/url","data/parse","cache-requests","data/combine-requests","constructor","constructor/store","can/map","can/ref","fall-through-cache","data/worker","real-time","data/callbacks-cache","data/callbacks","constructor/callbacks-once"],a.behavior=r,n.exports=a}),define("can-connect/base/base",["require","exports","module","can-connect/behavior","can-reflect","can-symbol"],function(e,t,n){"use strict";var r=e("can-connect/behavior"),a=e("can-reflect"),i=e("can-symbol");n.exports=r("base",function(e){var t;return{id:function(e){if(this.queryLogic)return a.getIdentity(e,this.queryLogic.schema);if(this.idProp)return e[this.idProp];throw new Error("can-connect/base/base - Please add a queryLogic option.")},listQuery:function(e){return e[this.listQueryProp]},listQueryProp:i.for("can.listQuery"),init:function(){},get queryLogic(){return t||(e.queryLogic?e.queryLogic:e.algebra?e.algebra:void 0)},set queryLogic(e){t=e}}})}),define("can-connect",["require","exports","module","can-connect/connect","can-connect/base/base","can-namespace"],function(e,t,n){"use strict";var r=e("can-connect/connect"),a=e("can-connect/base/base"),i=e("can-namespace");r.base=a,n.exports=i.connect=r}),define("can-connect/helpers/weak-reference-map",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var r=function(){this.set={}};(0,e("can-reflect").assignMap)(r.prototype,{has:function(e){return!!this.set[e]},addReference:function(e,t,n){if(void 0===e)throw new Error("can-connect: You must provide a key to store a value in a WeakReferenceMap");var r=this.set[e];r||(r=this.set[e]={item:t,referenceCount:0,key:e}),r.referenceCount+=n||1},referenceCount:function(e){var t=this.set[e];if(t)return t.referenceCount},deleteReference:function(e){var t=this.set[e];t&&(t.referenceCount--,0===t.referenceCount&&delete this.set[e])},get:function(e){var t=this.set[e];if(t)return t.item},forEach:function(e){for(var t in this.set)e(this.set[t].item,t)}}),n.exports=r}),define("can-diff/update-deep-except-identity/update-deep-except-identity",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var a=e("can-reflect");n.exports=function(n,r,e){if(e||(e=a.getSchema(n)),!e)throw new Error("can-diff/update-except-id is unable to update without a schema.");e.identity.forEach(function(e){var t=a.getKeyValue(n,e);void 0!==t&&a.setKeyValue(r,e,t)}),a.updateDeep(n,r)}}),define("can-connect/helpers/id-merge",["require","exports","module","can-diff/list/list","can-reflect"],function(e,t,n){"use strict";var a=e("can-diff/list/list"),i=e("can-reflect");n.exports=function(t,e,n,r){a(t,e,function(e,t){return n(e)===n(t)}).forEach(function(e){i.splice(t,e.index,e.deleteCount,e.insert.map(r))})}}),define("can-connect/constructor/constructor",["require","exports","module","can-reflect","can-connect/helpers/weak-reference-map","can-diff/update-deep-except-identity/update-deep-except-identity","can-connect/helpers/id-merge","can-connect/behavior"],function(e,t,n){"use strict";var r=e("can-reflect"),a=r.toArray,i=r.assignMap,o=e("can-connect/helpers/weak-reference-map"),s=e("can-diff/update-deep-except-identity/update-deep-except-identity"),c=e("can-connect/helpers/id-merge"),u=e("can-connect/behavior");function l(e,t){for(var n in e)"data"!==n&&("function"==typeof t.set?t.set(n,e[n]):"function"==typeof t.attr?t.attr(n,e[n]):t[n]=e[n])}n.exports=u("constructor",function(e){return{cidStore:new o,_cid:0,get:function(e){var t=this;return this.getData(e).then(function(e){return t.hydrateInstance(e)})},getList:function(t){t=t||{};var n=this;return this.getListData(t).then(function(e){return n.hydrateList(e,t)})},hydrateList:function(e,t){Array.isArray(e)&&(e={data:e});for(var n=[],r=0;r<e.data.length;r++)n.push(this.hydrateInstance(e.data[r]));if(e.data=n,this.list)return this.list(e,t);var a=e.data.slice(0);return a[this.listQueryProp||"__listQuery"]=t,l(e,a),a},hydrateInstance:function(e){return this.instance?this.instance(e):i({},e)},save:function(t){var e=this.serializeInstance(t),n=this.id(t),r=this;if(void 0!==n)return this.updateData(e).then(function(e){return void 0!==e&&r.updatedInstance(t,e),t});var a=this._cid++;return this.cidStore.addReference(a,t),this.createData(e,a).then(function(e){return void 0!==e&&r.createdInstance(t,e),r.cidStore.deleteReference(a,t),t})},destroy:function(t){var e=this.serializeInstance(t),n=this;return this.destroyData(e).then(function(e){return void 0!==e&&n.destroyedInstance(t,e),t})},createdInstance:function(e,t){i(e,t)},updatedInstance:function(e,t){s(e,t,this.queryLogic.schema)},updatedList:function(e,t,n){for(var r=[],a=0;a<t.data.length;a++)r.push(this.hydrateInstance(t.data[a]));c(e,r,this.id.bind(this),this.hydrateInstance.bind(this)),l(t,e)},destroyedInstance:function(e,t){s(e,t,this.queryLogic.schema)},serializeInstance:function(e){return i({},e)},serializeList:function(e){var t=this;return a(e).map(function(e){return t.serializeInstance(e)})},isNew:function(e){var t=this.id(e);return!(t||0===t)}}})}),define("can-diff/assign-deep-except-identity/assign-deep-except-identity",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var a=e("can-reflect");n.exports=function(n,r,e){if(e||(e=a.getSchema(n)),!e)throw new Error("can-diff/update-except-id is unable to update without a schema.");e.identity.forEach(function(e){var t=a.getKeyValue(n,e);void 0!==t&&a.setKeyValue(r,e,t)}),a.assignDeep(n,r)}}),define("can-validate-interface",function(e,t,n){"use strict";n.exports=function(e){var t=e.reduce(function(e,t){return e.concat(t)},[]);return function(n){var e=t.reduce(function(e,t){return t in n?e:e.concat(t)},[]);return e.length?{message:"missing expected properties",related:e}:void 0}}}),define("can-connect/helpers/validate",["require","exports","module","can-validate-interface"],function(e,t,n){"use strict";var s=e("can-validate-interface");function c(e,t,n){var r='can-connect: Extending behavior "'+(t.behaviorName||"anonymous behavior")+'" found base behavior "'+(e.__behaviorName||"anonymous behavior")+'" was missing required properties: '+JSON.stringify(n.related),a=new Error(r);return Object.setPrototypeOf&&Object.setPrototypeOf(a,Object.getPrototypeOf(this)),a}n.exports=function(n,e){var t,r,a,i,o=(t=n,r=0,a=e,i=function(e,t){throw new c(t,n,e)},function(){var e=s(a)(arguments[r]);return e&&i&&i(e,arguments[r]),t.apply(this,arguments)});return Object.keys(n).forEach(function(e){o[e]=n[e]}),o.__interfaces=e,o},c.prototype=Object.create(Error.prototype,{constructor:{value:Error}}),Object.setPrototypeOf?Object.setPrototypeOf(c,Error):c.__proto__=Error}),define("can-connect/can/map/map",["require","exports","module","can-reflect","can-queues","can-event-queue/map/map","can-observation-recorder","can-symbol","can-query-logic","can-log/dev/dev","can-connect/behavior","can-diff/update-deep-except-identity/update-deep-except-identity","can-diff/assign-deep-except-identity/assign-deep-except-identity","can-diff/merge-deep/merge-deep","can-symbol"],function(e,t,n){"use strict";var i=e("can-reflect"),r=i.each,a=i.isPlainObject,o=e("can-queues"),s=e("can-event-queue/map/map"),c=(e("can-observation-recorder"),e("can-symbol")),u=e("can-query-logic"),l=(e("can-log/dev/dev"),e("can-connect/behavior")),f=e("can-diff/update-deep-except-identity/update-deep-except-identity"),d=e("can-diff/assign-deep-except-identity/assign-deep-except-identity"),p=e("can-diff/merge-deep/merge-deep"),h=(c=e("can-symbol")).for("can.getName");var v=l("can/map",function(a){var e={init:function(){if(!this.Map)throw new Error("can-connect/can/map/map must be configured with a Map type");if(this[h]||(this[h]=function(){return this.name?"Connection{"+this.name+"}":this.Map?"Connection{"+i.getName(this.Map)+"}":"string"==typeof this.url?"Connection{"+this.url+"}":"Connection{}"}),this.List=this.List||this.Map.List,!this.List)throw new Error("can-connect/can/map/map - "+i.getName(this)+" must be configured with a List type.");m(this,this.Map,y),m(this,this.List,g),this.queryLogic||(this.queryLogic=new u(this.Map));var r=this;if(this.Map[c.for("can.onInstanceBoundChange")]){this.Map[c.for("can.onInstanceBoundChange")](function(e,t){var n=t?"addInstanceReference":"deleteInstanceReference";r[n]&&r[n](e)})}else console.warn("can-connect/can/map is unable to listen to onInstanceBoundChange on the Map type");if(this.List[c.for("can.onInstanceBoundChange")]){this.List[c.for("can.onInstanceBoundChange")](function(e,t){var n=t?"addListReference":"deleteListReference";r[n]&&r[n](e)})}else console.warn("can-connect/can/map is unable to listen to onInstanceBoundChange on the List type");this.Map[c.for("can.onInstancePatches")]?this.Map[c.for("can.onInstancePatches")](function(t,e){e.forEach(function(e){"add"!==e.type&&"set"!==e.type||e.key!==r.idProp||!t[c.for("can.isBound")]()||r.addInstanceReference(t)})}):console.warn("can-connect/can/map is unable to listen to onInstancePatches on the Map type"),a.init.apply(this,arguments)},serializeInstance:function(e){return i.serialize(e)},serializeList:function(e){return i.serialize(e)},instance:function(e){return new this.Map(e)},list:function(e,t){var n=new(this.List||this.Map&&this.Map.List)(e.data);return i.eachKey(e,function(e,t){"data"!==t&&i.setKeyValue(n,t,e)}),n[this.listQueryProp]=t,n},updatedList:function(e,t,n){o.batch.start();o.mutateQueue.enqueue(a.updatedList,this,arguments,{}),o.batch.stop()},save:function(e){i.setKeyValue(e,"_saving",!0);var t=function(){i.setKeyValue(e,"_saving",!1)},n=a.save.apply(this,arguments);return n.then(t,t),n},destroy:function(e){i.setKeyValue(e,"_destroying",!0);var t=function(){i.setKeyValue(e,"_destroying",!1)},n=a.destroy.apply(this,arguments);return n.then(t,t),n}};return r(["created","updated","destroyed"],function(n){e[n+"Instance"]=function(e,t){t&&"object"==typeof t&&("destroyed"===n&&0===i.size(t)||(this.constructor.removeAttr?f(e,t,this.queryLogic.schema):this.updateInstanceWithAssignDeep?d(e,t,this.queryLogic.schema):function(n,r,e){if(e||(e=i.getSchema(n)),!e)throw new Error("can-connect/can/map/ is unable to update without a schema.");e.identity.forEach(function(e){var t=i.getKeyValue(n,e);void 0!==t&&i.setKeyValue(r,e,t)}),p(n,r)}(e,t,this.queryLogic.schema))),"created"===n&&this.moveCreatedInstanceToInstanceStore&&this.moveCreatedInstanceToInstanceStore(e),v.callbackInstanceEvents(n,e)}}),e}),y={static:{getList:function(e,t){return function(e){return t.getList(e)}},findAll:function(e,t){return function(e){return t.getList(e)}},get:function(e,t){return function(e){return t.get(e)}},findOne:function(e,t){return function(e){return t.get(e)}}},prototype:{isNew:function(e,t){return function(){return t.isNew(this)}},isSaving:function(e,t){return function(){return!!i.getKeyValue(this,"_saving")}},isDestroying:function(e,t){return function(){return!!i.getKeyValue(this,"_destroying")}},save:function(e,r){return function(e,t){var n=r.save(this);return n.then(e,t),n}},destroy:function(e,r){return function(e,t){var n;return this.isNew()?(n=Promise.resolve(this),r.destroyedInstance(this,{})):n=r.destroy(this),n.then(e,t),n}}},properties:{_saving:{enumerable:!(v.callbackInstanceEvents=function(e,t){var n=t.constructor;o.batch.start(),s.dispatch.call(t,{type:e,target:t}),s.dispatch.call(n,e,[t]),o.batch.stop()}),value:!1,configurable:!0,writable:!0},_destroying:{enumerable:!1,value:!1,configurable:!0,writable:!0}}},g={static:{_bubbleRule:function(r,e){return function(e,t){var n=r(e,t);return n.push("destroyed"),n}}},prototype:{setup:function(t,n){return function(e){a(e)&&!Array.isArray(e)?(this[n.listQueryProp]=e,t.apply(this),this.replace(i.isPromise(e)?e:n.getList(e))):t.apply(this,arguments)}}},properties:{}},m=function(e,t,n){var r;for(r in n.properties)i.defineInstanceKey(t,r,n.properties[r]);for(r in n.prototype)t.prototype[r]=n.prototype[r](t.prototype[r],e);if(n.static)for(r in n.static)t[r]=n.static[r](t[r],e)};n.exports=v}),define("can-connect/helpers/weak-reference-set",["require","exports","module","can-reflect"],function(e,t,n){var r=function(){this.set=[]};(0,e("can-reflect").assignMap)(r.prototype,{has:function(e){return-1!==this._getIndex(e)},addReference:function(e,t){var n=this._getIndex(e),r=this.set[n];r||(r={item:e,referenceCount:0},this.set.push(r)),r.referenceCount+=t||1},deleteReference:function(e){var t=this._getIndex(e),n=this.set[t];n&&(n.referenceCount--,0===n.referenceCount&&this.set.splice(t,1))},delete:function(e){var t=this._getIndex(e);-1!==t&&this.set.splice(t,1)},get:function(e){var t=this.set[this._getIndex(e)];if(t)return t.item},referenceCount:function(e){var t=this.set[this._getIndex(e)];if(t)return t.referenceCount},_getIndex:function(n){var r;return this.set.every(function(e,t){if(e.item===n)return r=t,!1}),void 0!==r?r:-1},forEach:function(e){return this.set.forEach(e)}}),n.exports=r}),define("can-connect/helpers/sorted-set-json",["require","exports","module","can-reflect"],function(e,t,n){var r=e("can-reflect");n.exports=function(e){return null==e?e:JSON.stringify(r.cloneKeySort(e))}}),define("can-connect/constructor/store/store",["require","exports","module","can-connect","can-connect/helpers/weak-reference-map","can-connect/helpers/weak-reference-set","can-connect/helpers/sorted-set-json","can-event-queue/map/map"],function(e,t,n){"use strict";var r=e("can-connect"),a=e("can-connect/helpers/weak-reference-map"),o=e("can-connect/helpers/weak-reference-set"),s=e("can-connect/helpers/sorted-set-json"),i=e("can-event-queue/map/map"),c=0,u=null,l={increment:function(e){c++,clearTimeout(u)},decrement:function(e){0===--c&&(u=setTimeout(function(){l.dispatch("end")},n.exports.requestCleanupDelay)),c<0&&(c=0)},count:function(){return c}};i(l);var f=r.behavior("constructor/store",function(i){return{instanceStore:new a,newInstanceStore:new o,listStore:new a,init:function(){i.init&&i.init.apply(this,arguments),this.hasOwnProperty("_requestInstances")||(this._requestInstances={}),this.hasOwnProperty("_requestLists")||(this._requestLists={}),l.on("end",function(){var e;for(e in this._requestInstances)this.instanceStore.deleteReference(e);for(e in this._requestInstances={},this._requestLists)this.listStore.deleteReference(e),this._requestLists[e].forEach(this.deleteInstanceReference.bind(this));this._requestLists={}}.bind(this))},_finishedRequest:function(){l.decrement(this)},addInstanceReference:function(e,t){var n=t||this.id(e);void 0===n?this.newInstanceStore.addReference(e):this.instanceStore.addReference(n,e)},createdInstance:function(e,t){i.createdInstance.apply(this,arguments),this.moveCreatedInstanceToInstanceStore(e)},moveCreatedInstanceToInstanceStore:function(e){var t=this.id(e);if(this.newInstanceStore.has(e)&&void 0!==t){var n=this.newInstanceStore.referenceCount(e);this.newInstanceStore.delete(e),this.instanceStore.addReference(t,e,n)}},addInstanceMetaData:function(e,t,n){var r=this.instanceStore.set[this.id(e)];r&&(r[t]=n)},getInstanceMetaData:function(e,t){var n=this.instanceStore.set[this.id(e)];if(n)return n[t]},deleteInstanceMetaData:function(e,t){delete this.instanceStore.set[this.id(e)][t]},deleteInstanceReference:function(e){void 0===this.id(e)?this.newInstanceStore.deleteReference(e):this.instanceStore.deleteReference(this.id(e),e)},addListReference:function(e,t){var n=s(t||this.listQuery(e));n&&(this.listStore.addReference(n,e),e.forEach(function(e){this.addInstanceReference(e)}.bind(this)))},deleteListReference:function(e,t){var n=s(t||this.listQuery(e));n&&(this.listStore.deleteReference(n,e),e.forEach(this.deleteInstanceReference.bind(this)))},hydratedInstance:function(e){if(0<l.count()){var t=this.id(e);this._requestInstances[t]||(this.addInstanceReference(e),this._requestInstances[t]=e)}},hydrateInstance:function(e){var t=this.id(e);if((t||0===t)&&this.instanceStore.has(t)){var n=this.instanceStore.get(t);return this.updatedInstance(n,e),n}var r=i.hydrateInstance.call(this,e);return this.hydratedInstance(r),r},hydratedList:function(e,t){if(0<l.count()){var n=s(t||this.listQuery(e));n&&(this._requestLists[n]||(this.addListReference(e,t),this._requestLists[n]=e))}},hydrateList:function(e,t){t=t||this.listQuery(e);var n=s(t);if(n&&this.listStore.has(n)){var r=this.listStore.get(n);return this.updatedList(r,e,t),r}var a=i.hydrateList.call(this,e,t);return this.hydratedList(a,t),a},getList:function(e){var t=this;l.increment(this);var n=i.getList.call(this,e);return n.then(function(e){t._finishedRequest()},function(){t._finishedRequest()}),n},get:function(e){var t=this;l.increment(this);var n=i.get.call(this,e);return n.then(function(e){t._finishedRequest()},function(){t._finishedRequest()}),n},save:function(t){var n=this;l.increment(this);var r=!this.isNew(t);r&&this.addInstanceReference(t);var e=i.save.call(this,t);return e.then(function(e){r&&n.deleteInstanceReference(t),n._finishedRequest()},function(){n._finishedRequest()}),e},destroy:function(e){var t=this;this.addInstanceReference(e),l.increment(this);var n=i.destroy.call(this,e);return n.then(function(e){t._finishedRequest(),t.deleteInstanceReference(e)},function(){t._finishedRequest()}),n},updatedList:function(e,t,n){var r=e.slice(0);t.data||"number"!=typeof t.length||(t={data:t}),i.updatedList?(i.updatedList.call(this,e,t,n),e.forEach(function(e){this.addInstanceReference(e)}.bind(this))):t.data&&t.data.forEach(function(e){this.addInstanceReference(e)}.bind(this)),r.forEach(this.deleteInstanceReference.bind(this))}}});f.requests=l,f.requestCleanupDelay=10,n.exports=f}),define("can-connect/data/callbacks/callbacks",["require","exports","module","can-connect","can-reflect"],function(e,t,n){"use strict";var r=e("can-connect"),a=e("can-reflect").each,o={getListData:"gotListData",createData:"createdData",updateData:"updatedData",destroyData:"destroyedData"},i=r.behavior("data/callbacks",function(i){var t={};return a(o,function(a,e){t[e]=function(t,n){var r=this;return i[e].call(this,t).then(function(e){return r[a]?r[a].call(r,e,t,n):e})}}),t});n.exports=i}),define("can-connect/data/parse/parse",["require","exports","module","can-reflect","can-key/get/get","can-connect/behavior"],function(e,t,n){"use strict";var r=e("can-reflect").each,o=e("can-key/get/get"),a=e("can-connect/behavior");n.exports=a("data/parse",function(i){var e={parseListData:function(e){var t;if(i.parseListData&&(e=i.parseListData.apply(this,arguments)),Array.isArray(e))t={data:e};else{var n=this.parseListProp||"data";if(e.data=o(e,n),t=e,"data"!==n&&delete e[n],!Array.isArray(t.data))throw new Error("Could not get any raw data while converting using .parseListData")}for(var r=[],a=0;a<t.data.length;a++)r.push(this.parseInstanceData(t.data[a]));return t.data=r,t},parseInstanceData:function(e){return i.parseInstanceData&&(e=i.parseInstanceData.apply(this,arguments)||e),this.parseInstanceProp&&o(e,this.parseInstanceProp)||e}};return r(s,function(n,r){e[r]=function(e){var t=this;return i[r].call(this,e).then(function(){return t[n].apply(t,arguments)})}}),e});var s={getListData:"parseListData",getData:"parseInstanceData",createData:"parseInstanceData",updateData:"parseInstanceData",destroyData:"parseInstanceData"}}),define("can-ajax",["require","exports","module","can-globals/global/global","can-reflect","can-namespace","can-parse-uri","can-param"],function(e,t,n){!function(e,t,n,r){"use strict";var a=t("can-globals/global/global"),y=t("can-reflect"),i=t("can-namespace"),g=t("can-parse-uri"),m=t("can-param"),b=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new ActiveXObject("MSXML2.XMLHTTP.3.0")},function(){return new ActiveXObject("MSXML2.XMLHTTP")}],w=null,x=g(a().location.href),_={},k="application/json",O="application/x-www-form-urlencoded",E=function(t,e){try{var n=e.dataType||t.getResponseHeader("Content-Type").split(";")[0];if(!n||!t.responseText&&!t.responseXML)return t;switch(n){case"text/xml":case"xml":return t.responseXML;case"text/json":case"application/json":case"text/javascript":case"application/javascript":case"application/x-javascript":case"json":return t.responseText&&JSON.parse(t.responseText);default:return t.responseText}}catch(e){return t}};r.exports=i.ajax=function(t){var e,n,r,a=function(){if(null!=w)return w();for(var e=0,t=b.length;e<t;e++)try{var n=b[e],r=n();if(null!=r)return w=n,r}catch(e){continue}return function(){}}(),i=0,o={},s=new Promise(function(e,t){o.resolve=e,o.reject=t});if(s.abort=function(){a.abort()},(t=[{userAgent:"XMLHttpRequest",lang:"en",type:"GET",data:null,dataType:"json"},_,t].reduce(function(e,t,n){return y.assignDeep(e,t)})).contentType||(t.contentType="GET"===t.type.toUpperCase()?O:k),null==t.crossDomain)try{r=g(t.url),t.crossDomain=!!(r.protocol&&r.protocol!==x.protocol||r.host&&r.host!==x.host)}catch(e){t.crossDomain=!0}t.timeout&&(e=setTimeout(function(){a.abort(),t.timeoutFn&&t.timeoutFn(t.url)},t.timeout)),a.onreadystatechange=function(){try{4===a.readyState?(e&&clearTimeout(e),a.status<300?t.success&&t.success(E(a,t)):t.error&&t.error(a,a.status,a.statusText),t.complete&&t.complete(a,a.statusText),200<=a.status&&a.status<300?o.resolve(E(a,t)):o.reject(E(a,t))):t.progress&&t.progress(++i)}catch(e){o.reject(e)}};var c=t.url,u=null,l=t.type.toUpperCase(),f=t.contentType===k,d="POST"===l||"PUT"===l;!d&&t.data&&(c+="?"+(f?JSON.stringify(t.data):m(t.data))),a.open(l,c);var p=t.crossDomain&&-1!==["GET","POST","HEAD"].indexOf(l);if(n="undefined"!=typeof FormData&&t.data instanceof FormData,d){u=n?t.data:f&&!p?"object"==typeof t.data?JSON.stringify(t.data):t.data:m(t.data);var h=f&&!p?"application/json":"application/x-www-form-urlencoded";a.setRequestHeader("Content-Type",h)}else a.setRequestHeader("Content-Type",t.contentType);if(p||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.beforeSend&&t.beforeSend.call(t,a,t),t.xhrFields)for(var v in t.xhrFields)a[v]=t.xhrFields[v];return a.send(u),s},r.exports.ajaxSetup=function(e){_=e||{}}}(0,e,0,n)}),define("can-util/js/is-array-like/is-array-like",["require","exports","module","can-namespace"],function(e,t,n){"use strict";var r=e("can-namespace");n.exports=r.isArrayLike=function(e){var t=typeof e;if("string"===t)return!0;if("number"===t)return!1;var n=e&&"boolean"!==t&&"number"!=typeof e&&"length"in e&&e.length;return"function"!=typeof e&&(0===n||"number"==typeof n&&0<n&&n-1 in e)}}),define("can-util/js/is-iterable/is-iterable",["require","exports","module","can-symbol"],function(e,t,n){"use strict";var r=e("can-symbol");n.exports=function(e){return e&&!!e[r.iterator||r.for("iterator")]}}),define("can-util/js/each/each",["require","exports","module","can-util/js/is-array-like/is-array-like","can-util/js/is-iterable/is-iterable","can-symbol","can-namespace"],function(e,t,n){"use strict";var l=e("can-util/js/is-array-like/is-array-like"),f=Object.prototype.hasOwnProperty,d=e("can-util/js/is-iterable/is-iterable"),p=e("can-symbol"),r=e("can-namespace");n.exports=r.each=function(e,t,n){var r,a,i,o=0;if(e)if(l(e))for(a=e.length;o<a&&(i=e[o],!1!==t.call(n||i,i,o,e));o++);else if(d(e))for(var s,c,u=e[p.iterator||p.for("iterator")]();!(s=u.next()).done;)c=s.value,t.call(n||e,Array.isArray(c)?c[1]:c,c[0]);else if("object"==typeof e)for(r in e)if(f.call(e,r)&&!1===t.call(n||e[r],e[r],r,e))break;return e}}),define("can-make-rest",["require","exports","module","can-util/js/each/each"],function(e,t,n){var a=e("can-util/js/each/each"),i={item:{GET:"getData",PUT:"updateData",DELETE:"destroyData"},list:{GET:"getListData",POST:"createData"}};n.exports=function(e,t){var r={};return a(function(e,t){t=t||function(e){var t=e.match(/\{(.*)\}/);if(t&&2===t.length)return t[1]}(e)||"id";var n=new RegExp("\\/\\{"+t+"\\}.*"),r=n.test(e),a=r?e.replace(n,""):e;return{item:r?e:e.trim()+"/{"+t+"}",list:a}}(e,t),function(n,e){a(i[e],function(e,t){r[e]={method:t,url:n}})}),r}}),define("can-connect/helpers/make-promise",["require","exports","module","can-reflect"],function(e,t,n){var r=e("can-reflect");n.exports=function(n){return n&&"function"==typeof n.then&&!r.isPromise(n)?new Promise(function(e,t){n.then(e,t)}):n}}),define("can-connect/data/url/url",["require","exports","module","can-ajax","can-key/replace-with/replace-with","can-reflect","can-log/dev/dev","can-connect/behavior","can-make-rest","can-connect/helpers/make-promise"],function(e,t,n){"use strict";var l=e("can-ajax"),c=e("can-key/replace-with/replace-with"),f=e("can-reflect"),r=(e("can-log/dev/dev"),e("can-connect/behavior")),d=e("can-make-rest"),a=d("/resource/{id}"),p=e("can-connect/helpers/make-promise"),i=r("data/url",function(u){var e={};return f.eachKey(a,function(s,c){e[c]=function(e){var t=h[c];if("object"==typeof this.url){if("function"==typeof this.url[c])return p(this.url[c](e));if(this.url[c]){var n=y(this.url[c],e,s.method,this.ajax||l,v(this.url,s.method),t);return p(n)}}var r="string"==typeof this.url?this.url:this.url.resource;if(r){var a=f.getSchema(this.queryLogic).identity,i=r.replace(/\/+$/,""),o=d(i,a[0])[c];return p(y(o.url,e,o.method,this.ajax||l,v(this.url,o.method),t))}return u[name].call(this,e)}}),e}),h={getListData:{},getData:{},createData:{},updateData:{},destroyData:{includeData:!1}},v=function(e,t){if("object"==typeof e&&e.contentType&&("application/x-www-form-urlencoded"===e.contentType||"application/json"===e.contentType))return e.contentType;return"GET"===t?"application/x-www-form-urlencoded":"application/json"};function u(e,t){return encodeURIComponent(t)}var y=function(e,t,n,r,a,i){var o={};if("string"==typeof e){var s=e.split(/\s+/);o.url=s.pop(),s.length&&(o.type=s.pop())}else f.assignMap(o,e);return o.data="object"!=typeof t||Array.isArray(t)?t:f.assignMap(o.data||{},t),o.url=c(o.url,o.data,u,!0),o.contentType=a,!1===i.includeData&&delete o.data,r(f.assignMap({type:n||"post",dataType:"json"},o))};n.exports=i}),define("can-diff/index-by-identity/index-by-identity",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var o=e("can-reflect");n.exports=function(e,t,n){var r=o.size(e);if(!n&&0<r&&(n=o.getSchema(e[0])),n||(n=o.getSchema(t)),!n)throw new Error("No schema to use to get identity.");for(var a=o.getIdentity(t,n),i=0;i<r;i++){if(a===o.getIdentity(e[i],n))return i}return-1}}),define("can-connect/real-time/real-time",["require","exports","module","can-connect","can-diff/index-by-identity/index-by-identity","can-log/dev/dev","can-symbol","can-reflect"],function(e,t,n){"use strict";var r=e("can-connect"),s=e("can-diff/index-by-identity/index-by-identity"),a=(e("can-log/dev/dev"),e("can-symbol")),i=e("can-reflect"),c=a.for("can.splice");function u(e,t,n,r){-1===n?-1!==r&&i.splice(e,r,0,[t()]):-1===r?i.splice(e,n,1,[]):r!==n&&(n<r?(i.splice(e,r,0,[t()]),i.splice(e,n,1,[])):(i.splice(e,n,1,[]),i.splice(e,r,0,[t()])))}function l(e,t,n,r,a,i){if(-1===n||r!==n+1&&r!==n)if(void 0!==e[c])u(e,function(){return a.hydrateInstance(t)},n,r);else{var o=a.serializeList(e);u(o,function(){return t},n,r),a.updatedList(e,{data:o},i)}}n.exports=r.behavior("real-time",function(n){var o=Promise.resolve();return{createData:function(){var e=n.createData.apply(this,arguments),t=e.catch(function(){return""});return o=Promise.all([o,t]),e},createInstance:function(a){var i=this;return new Promise(function(r,e){o.then(function(){setTimeout(function(){var e,t=i.id(a),n=i.instanceStore.get(t);n?r(i.updateInstance(a)):(n=i.hydrateInstance(a),e=i.serializeInstance(n),i.addInstanceReference(n),Promise.resolve(i.createdData(a,e)).then(function(){i.deleteInstanceReference(n),r(n)}))},1)})})},createdData:function(e,t,n){var r;r=void 0!==n?this.cidStore.get(n):this.instanceStore.get(this.id(e)),this.addInstanceReference(r,this.id(e)),this.createdInstance(r,e),f.call(this,this.serializeInstance(r)),this.deleteInstanceReference(r)},updatedData:function(e,t){var n=this.instanceStore.get(this.id(t));this.updatedInstance(n,e),d.call(this,this.serializeInstance(n))},updateInstance:function(e){var t=this.id(e),n=this.instanceStore.get(t);n||(n=this.hydrateInstance(e)),this.addInstanceReference(n);var r=this.serializeInstance(n),a=this;return Promise.resolve(this.updatedData(e,r)).then(function(){return a.deleteInstanceReference(n),n})},destroyedData:function(e,t){var n=this.id(t||e),r=this.instanceStore.get(n);r||(r=this.hydrateInstance(e));var a=this.serializeInstance(r);this.destroyedInstance(r,e),p.call(this,a)},destroyInstance:function(e){var t=this.id(e),n=this.instanceStore.get(t);n||(n=this.hydrateInstance(e)),this.addInstanceReference(n);var r=this.serializeInstance(n),a=this;return Promise.resolve(this.destroyedData(e,r)).then(function(){return a.deleteInstanceReference(n),n})}}});var f=function(i){var o=this;this.listStore.forEach(function(e,t){var n=JSON.parse(t),r=s(e,i,o.queryLogic.schema);if(o.queryLogic.isMember(n,i)){var a=o.queryLogic.index(n,e,i);l(e,i,r,a,o,n)}})},d=function(i){var o=this;this.listStore.forEach(function(e,t){var n=JSON.parse(t),r=s(e,i,o.queryLogic.schema);if(o.queryLogic.isMember(n,i)){var a=o.queryLogic.index(n,e,i);l(e,i,r,a,o,n)}else-1!==r&&l(e,i,r,-1,o,n)})},p=function(a){var i=this;this.listStore.forEach(function(e,t){var n=JSON.parse(t),r=s(e,a,i.queryLogic.schema);-1!==r&&l(e,a,r,-1,i,n)})}}),define("can-connect/constructor/callbacks-once/callbacks-once",["require","exports","module","can-connect","can-connect/helpers/sorted-set-json"],function(e,t,n){"use strict";var r=e("can-connect"),s=e("can-connect/helpers/sorted-set-json"),a=[].forEach,i=["createdInstance","updatedInstance","destroyedInstance"],o=r.behavior("constructor/callbacks-once",function(o){var e={};return a.call(i,function(i){e[i]=function(e,t){var n=this.getInstanceMetaData(e,"last-data-"+i),r=s(t);if(n!==r){var a=o[i].apply(this,arguments);return this.addInstanceMetaData(e,"last-data-"+i,r),a}}}),e});n.exports=o}),define("can-realtime-rest-model",["require","exports","module","can-connect","can-connect/constructor/constructor","can-connect/can/map/map","can-connect/constructor/store/store","can-connect/data/callbacks/callbacks","can-connect/data/parse/parse","can-connect/data/url/url","can-connect/real-time/real-time","can-connect/constructor/callbacks-once/callbacks-once","can-namespace"],function(e,t,n){var r=e("can-connect"),a=e("can-connect/constructor/constructor"),i=e("can-connect/can/map/map"),o=e("can-connect/constructor/store/store"),s=e("can-connect/data/callbacks/callbacks"),c=e("can-connect/data/parse/parse"),u=e("can-connect/data/url/url"),l=e("can-connect/real-time/real-time"),f=e("can-connect/constructor/callbacks-once/callbacks-once"),d=e("can-namespace");n.exports=d.realtimeRestModel=function(e){return r([a,i,o,s,c,u,l,f],e)}}),define("can/es/can-realtime-rest-model",["exports","can-realtime-rest-model"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-rest-model",["require","exports","module","can-connect/constructor/constructor","can-connect/can/map/map","can-connect/data/parse/parse","can-connect/data/url/url","can-namespace","can-connect/base/base"],function(e,t,n){var r=e("can-connect/constructor/constructor"),a=e("can-connect/can/map/map"),i=e("can-connect/data/parse/parse"),o=e("can-connect/data/url/url"),s=e("can-namespace"),c=e("can-connect/base/base");n.exports=s.restModel=function(e){var t=[c,o,i,r,a].reduce(function(e,t){return t(e)},e);return t.init(),t}}),define("can/es/can-rest-model",["exports","can-rest-model"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-connect/helpers/get-items",function(e,t,n){"use strict";n.exports=function(e){return Array.isArray(e)?e:e.data}}),define("can-connect/cache-requests/cache-requests",["require","exports","module","can-connect","can-connect/helpers/get-items"],function(e,t,n){var r=e("can-connect"),u=e("can-connect/helpers/get-items"),s=Array.prototype.forEach,a=r.behavior("cache-requests",function(c){return{getDiff:function(a,e){var i,o=this;return s.call(e,function(e){var t,n=o.queryLogic.difference(a,e);if(o.queryLogic.isDefinedAndHasMembers(n)){var r=o.queryLogic.intersection(a,e);t={needed:n,cached:!!o.queryLogic.isDefinedAndHasMembers(r)&&r,count:o.queryLogic.count(n)}}else o.queryLogic.isSubset(a,e)&&(t={cached:a,count:0});t&&(!i||t.count<i.count)&&(i=t)}),i?{needed:i.needed,cached:i.cached}:{needed:a}},unionMembers:function(e,t,n,r){return{data:this.queryLogic.unionMembers(t.needed,t.cached,u(n),u(r))}},getListData:function(o){o=o||{};var s=this;return this.cacheConnection.getSets(o).then(function(e){var r=s.getDiff(o,e);if(r.needed){if(r.cached){var t=s.cacheConnection.getListData(r.cached),n=c.getListData(r.needed),a=n.then(function(e){return s.cacheConnection.updateListData(u(e),r.needed).then(function(){return e})}),i=Promise.all([t,n]).then(function(e){var t=e[0],n=e[1];return s.unionMembers(o,r,n,t)});return Promise.all([i,a]).then(function(e){return e[0]})}return c.getListData(r.needed).then(function(e){return s.cacheConnection.updateListData(u(e),r.needed).then(function(){return e})})}return s.cacheConnection.getListData(r.cached)})}}});n.exports=a}),define("can-connect/data/callbacks-cache/callbacks-cache",["require","exports","module","can-connect","can-reflect","can-reflect"],function(e,t,n){"use strict";var r=e("can-connect"),o=e("can-reflect").assignMap,a=e("can-reflect").each,s={createdData:"createData",updatedData:"updateData",destroyedData:"destroyData"},i=r.behavior("data/callbacks-cache",function(i){var e={};return a(s,function(r,a){e[a]=function(e,t,n){return this.cacheConnection[r](o(o({},t),e)),i[a]?i[a].call(this,e,t,n):e}}),e});n.exports=i}),define("can-connect/helpers/deferred",function(e,t,n){"use strict";n.exports=function(){var n={};return n.promise=new Promise(function(e,t){n.resolve=e,n.reject=t}),n}}),define("can-connect/data/combine-requests/combine-requests",["require","exports","module","can-connect","can-connect/helpers/get-items","can-reflect","can-connect/helpers/deferred"],function(e,t,n){var r=e("can-connect"),i=e("can-connect/helpers/get-items"),o=e("can-reflect"),s=e("can-connect/helpers/deferred"),c=[].forEach,a=r.behavior("data/combine-requests",function(a){var n;return{unionPendingRequests:function(e){var n=this;e.sort(function(e,t){return n.queryLogic.isSubset(e.set,t.set)?1:n.queryLogic.isSubset(t.set,e.set)?-1:0});var r,t=[];return u(e,{start:function(e){r={set:e.set,pendingRequests:[e]},t.push(r)},iterate:function(e){var t=n.queryLogic.union(r.set,e.set);if(n.queryLogic.isDefinedAndHasMembers(t))return r.set=t,r.pendingRequests.push(e),!0}}),Promise.resolve(t)},time:1,getListData:function(e){e=e||{};var r=this;n||(n=[],setTimeout(function(){var e=r.unionPendingRequests(n);n=null,e.then(function(e){c.call(e,function(n){var e=o.serialize(n.set);a.getListData(e).then(function(t){1===n.pendingRequests.length?n.pendingRequests[0].deferred.resolve(t):c.call(n.pendingRequests,function(e){e.deferred.resolve({data:r.queryLogic.filterMembers(e.set,n.set,i(t))})})},function(t){1===n.pendingRequests.length?n.pendingRequests[0].deferred.reject(t):c.call(n.pendingRequests,function(e){e.deferred.reject(t)})})})})},this.time||1));var t=s();return n.push({deferred:t,set:e}),t.promise}}});n.exports=a;var u=function(e,t){for(var n=0;n<e.length;){t.start(e[n]);for(var r=n+1;r<e.length;)!0===t.iterate(e[r])?e.splice(r,1):r++;n++}}}),define("can-local-store",["require","exports","module","can-reflect","can-memory-store/make-simple-store","can-namespace"],function(e,t,n){var r=e("can-reflect"),a=e("can-memory-store/make-simple-store"),i=e("can-namespace");n.exports=i.localStore=function e(t){t.constructor=e;var n=Object.create(a(t));return r.assignMap(n,{clear:function(){return localStorage.removeItem(this.name+"/queries"),localStorage.removeItem(this.name+"/records"),this._recordsMap=null,Promise.resolve()},updateQueryDataSync:function(e){localStorage.setItem(this.name+"/queries",JSON.stringify(e))},getQueryDataSync:function(){return JSON.parse(localStorage.getItem(this.name+"/queries"))||[]},getRecord:function(e){return this._recordsMap||this.getAllRecords(),this._recordsMap[e]},getAllRecords:function(){if(!this.cacheLocalStorageReads||!this._recordsMap){var e=JSON.parse(localStorage.getItem(this.name+"/records"))||{};this._recordsMap=e}var t=[];for(var n in this._recordsMap)t.push(this._recordsMap[n]);return t},destroyRecords:function(e){this._recordsMap||this.getAllRecords(),r.eachIndex(e,function(e){var t=r.getIdentity(e,this.queryLogic.schema);delete this._recordsMap[t]},this),localStorage.setItem(this.name+"/records",JSON.stringify(this._recordsMap))},updateRecordsSync:function(e){this._recordsMap||this.getAllRecords(),e.forEach(function(e){var t=r.getIdentity(e,this.queryLogic.schema);this._recordsMap[t]=e},this),localStorage.setItem(this.name+"/records",JSON.stringify(this._recordsMap))}}),n}}),define("can-connect/data/localstorage-cache/localstorage-cache",["require","exports","module","can-local-store"],function(e,t,n){"use strict";n.exports=e("can-local-store")}),define("can-connect/data/memory-cache/memory-cache",["require","exports","module","can-memory-store"],function(e,t,n){"use strict";var r=e("can-memory-store");n.exports=r}),define("can-connect/fall-through-cache/fall-through-cache",["require","exports","module","can-connect","can-connect/helpers/sorted-set-json","can-log"],function(e,t,n){"use strict";var r=e("can-connect"),i=e("can-connect/helpers/sorted-set-json"),o=e("can-log"),a=r.behavior("fall-through-cache",function(a){return{hydrateList:function(e,t){t=t||this.listQuery(e);var n=i(t),r=a.hydrateList.call(this,e,t);return this._getHydrateListCallbacks[n]&&(this._getHydrateListCallbacks[n].shift()(r),this._getHydrateListCallbacks[n].length||delete this._getHydrateListCallbacks[n]),r},_getHydrateListCallbacks:{},_getHydrateList:function(e,t){var n=i(e);this._getHydrateListCallbacks[n]||(this._getHydrateListCallbacks[n]=[]),this._getHydrateListCallbacks[n].push(t)},getListData:function(n){n=n||{};var r=this;return this.cacheConnection.getListData(n).then(function(e){return r._getHydrateList(n,function(t){r.addListReference(t,n),setTimeout(function(){a.getListData.call(r,n).then(function(e){r.cacheConnection.updateListData(e,n),r.updatedList(t,e,n),r.deleteListReference(t,n)},function(e){o.log("REJECTED",e)})},1)}),e},function(){var e=a.getListData.call(r,n);return e.then(function(e){r.cacheConnection.updateListData(e,n)}),e})},hydrateInstance:function(e){var t=this.id(e),n=a.hydrateInstance.apply(this,arguments);return this._getMakeInstanceCallbacks[t]&&(this._getMakeInstanceCallbacks[t].shift()(n),this._getMakeInstanceCallbacks[t].length||delete this._getMakeInstanceCallbacks[t]),n},_getMakeInstanceCallbacks:{},_getMakeInstance:function(e,t){this._getMakeInstanceCallbacks[e]||(this._getMakeInstanceCallbacks[e]=[]),this._getMakeInstanceCallbacks[e].push(t)},getData:function(n){var r=this;return this.cacheConnection.getData(n).then(function(e){return r._getMakeInstance(r.id(e)||r.id(n),function(t){r.addInstanceReference(t),setTimeout(function(){a.getData.call(r,n).then(function(e){r.cacheConnection.updateData(e),r.updatedInstance(t,e),r.deleteInstanceReference(t)},function(e){o.log("REJECTED",e)})},1)}),e},function(){var e=a.getData.call(r,n);return e.then(function(e){r.cacheConnection.updateData(e)}),e})}}});n.exports=a}),define("can-connect/can/ref/ref",["require","exports","module","can-connect","can-connect/helpers/weak-reference-map","can-observation-recorder","can-connect/constructor/store/store","can-define","can-reflect"],function(e,t,n){"use strict";var r=e("can-connect"),o=e("can-connect/helpers/weak-reference-map"),s=e("can-observation-recorder"),c=e("can-connect/constructor/store/store"),u=e("can-define"),l=e("can-reflect");n.exports=r.behavior("can/ref",function(e){return{init:function(){e.init.apply(this,arguments),this.Map.Ref=function(r){var a=l.getSchema(r.queryLogic).identity[0],i=function(e,t){"object"==typeof e&&(e=(t=e)[a]);var n=i.store.get(e);if(n)return t&&!n._value&&(t instanceof r.Map?n._value=t:n._value=r.hydrateInstance(t)),n;this[a]=e,t&&(t instanceof r.Map?this._value=t:this._value=r.hydrateInstance(t)),0<c.requests.count()&&(i._requestInstances[e]||(i.store.addReference(e,this),i._requestInstances[e]=this))};i.store=new o,i._requestInstances={},i.type=function(e){return e&&"object"!=typeof e?new i(e):new i(e[a],e)};var e={promise:{get:function(){if(this._value)return Promise.resolve(this._value);var e={};return e[a]=this[a],r.Map.get(e)}},_state:{get:function(e,t){return t&&this.promise.then(function(){t("resolved")},function(){t("rejected")}),"pending"}},value:{get:function(e,t){if(this._value)return this._value;t&&this.promise.then(function(e){t(e)})}},reason:{get:function(e,t){this._value||this.promise.catch(function(e){t(e)})}}};e[a]={type:"*",set:function(){this._value=void 0}},u(i.prototype,e),i.prototype.unobservedId=s.ignore(function(){return this[a]}),i.prototype.isResolved=function(){return!!this._value||"resolved"===this._state},i.prototype.isRejected=function(){return"rejected"===this._state},i.prototype.isPending=function(){return!this._value&&("resolved"!==this._state||"rejected"!==this._state)},i.prototype.serialize=function(){return this[a]},l.assignSymbols(i.prototype,{"can.serialize":i.prototype.serialize,"can.getName":function(){return l.getName(this.constructor)+"{"+this[a]+"}"}});var t=i.prototype._eventSetup;i.prototype._eventSetup=function(){return i.store.addReference(this.unobservedId(),this),t.apply(this,arguments)};var n=i.prototype._eventTeardown;return i.prototype._eventTeardown=function(){return i.store.deleteReference(this.unobservedId(),this),n.apply(this,arguments)},c.requests.on("end",function(){for(var e in i._requestInstances)i.store.deleteReference(e);i._requestInstances={}}),i}(this)}}})}),define("can-connect/can/super-map/super-map",["require","exports","module","can-connect","can-connect/constructor/constructor","can-connect/can/map/map","can-connect/can/ref/ref","can-connect/constructor/store/store","can-connect/data/callbacks/callbacks","can-connect/data/callbacks-cache/callbacks-cache","can-connect/data/combine-requests/combine-requests","can-connect/data/localstorage-cache/localstorage-cache","can-connect/data/parse/parse","can-connect/data/url/url","can-connect/fall-through-cache/fall-through-cache","can-connect/real-time/real-time","can-connect/constructor/callbacks-once/callbacks-once","can-globals/global/global"],function(e,t,n){!function(e,t,n,r){"use strict";var a=t("can-connect"),i=t("can-connect/constructor/constructor"),o=t("can-connect/can/map/map"),s=t("can-connect/can/ref/ref"),c=t("can-connect/constructor/store/store"),u=t("can-connect/data/callbacks/callbacks"),l=t("can-connect/data/callbacks-cache/callbacks-cache"),f=t("can-connect/data/combine-requests/combine-requests"),d=t("can-connect/data/localstorage-cache/localstorage-cache"),p=t("can-connect/data/parse/parse"),h=t("can-connect/data/url/url"),v=t("can-connect/fall-through-cache/fall-through-cache"),y=t("can-connect/real-time/real-time"),g=t("can-connect/constructor/callbacks-once/callbacks-once"),m=t("can-globals/global/global")().$;a.superMap=function(e){var t=[i,o,s,c,u,f,p,h,y,g];return"undefined"!=typeof localStorage&&(e.cacheConnection||(e.cacheConnection=a([d],{name:e.name+"Cache",idProp:e.idProp,queryLogic:e.queryLogic})),t.push(l,v)),m&&m.ajax&&(e.ajax=m.ajax),a(t,e)},r.exports=a.superMap}(0,e,0,n)}),define("can-connect/can/base-map/base-map",["require","exports","module","can-connect","can-connect/constructor/constructor","can-connect/can/map/map","can-connect/can/ref/ref","can-connect/constructor/store/store","can-connect/data/callbacks/callbacks","can-connect/data/callbacks-cache/callbacks-cache","can-connect/data/parse/parse","can-connect/data/url/url","can-connect/real-time/real-time","can-connect/constructor/callbacks-once/callbacks-once","can-globals/global/global"],function(e,t,n){var r,a,i,o,s,c,u,l,f,d,p,h,v;a=n,i=(r=e)("can-connect"),o=r("can-connect/constructor/constructor"),s=r("can-connect/can/map/map"),c=r("can-connect/can/ref/ref"),u=r("can-connect/constructor/store/store"),l=r("can-connect/data/callbacks/callbacks"),r("can-connect/data/callbacks-cache/callbacks-cache"),f=r("can-connect/data/parse/parse"),d=r("can-connect/data/url/url"),p=r("can-connect/real-time/real-time"),h=r("can-connect/constructor/callbacks-once/callbacks-once"),v=r("can-globals/global/global")().$,i.baseMap=function(e){var t=[o,s,c,u,l,f,d,p,h];return v&&v.ajax&&(e.ajax=v.ajax),i(t,e)},a.exports=i.baseMap}),define("can-connect/all",["require","exports","module","can-connect","can-connect/cache-requests/cache-requests","can-connect/constructor/constructor","can-connect/constructor/callbacks-once/callbacks-once","can-connect/constructor/store/store","can-connect/data/callbacks/callbacks","can-connect/data/callbacks-cache/callbacks-cache","can-connect/data/combine-requests/combine-requests","can-connect/data/localstorage-cache/localstorage-cache","can-connect/data/memory-cache/memory-cache","can-connect/data/parse/parse","can-connect/data/url/url","can-connect/fall-through-cache/fall-through-cache","can-connect/real-time/real-time","can-connect/can/super-map/super-map","can-connect/can/base-map/base-map"],function(e,t,n){"use strict";var r=e("can-connect");r.cacheRequests=e("can-connect/cache-requests/cache-requests"),r.constructor=e("can-connect/constructor/constructor"),r.constructorCallbacksOnce=e("can-connect/constructor/callbacks-once/callbacks-once"),r.constructorStore=e("can-connect/constructor/store/store"),r.dataCallbacks=e("can-connect/data/callbacks/callbacks"),r.dataCallbacksCache=e("can-connect/data/callbacks-cache/callbacks-cache"),r.dataCombineRequests=e("can-connect/data/combine-requests/combine-requests"),r.dataLocalStorageCache=e("can-connect/data/localstorage-cache/localstorage-cache"),r.dataMemoryCache=e("can-connect/data/memory-cache/memory-cache"),r.dataParse=e("can-connect/data/parse/parse"),r.dataUrl=e("can-connect/data/url/url"),r.fallThroughCache=e("can-connect/fall-through-cache/fall-through-cache"),r.realTime=e("can-connect/real-time/real-time"),r.superMap=e("can-connect/can/super-map/super-map"),r.baseMap=e("can-connect/can/base-map/base-map"),n.exports=r}),define("can/es/can-connect",["exports","can-connect/all"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-local-store",["exports","can-local-store"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-memory-store",["exports","can-memory-store"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-route",["exports","can-route"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-route-hash",["exports","can-route-hash"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-route-pushstate",["require","exports","module","can-route","can-route/src/binding-proxy","can-reflect","can-symbol","can-simple-observable","can-observation-recorder","can-globals/is-node/is-node","can-globals/location/location","can-globals/document/document","can-globals/global/global","can-dom-events","can-diff/map/map"],function(e,t,n){!function(e,t,n,r){"use strict";var o=t("can-route"),i=t("can-route/src/binding-proxy"),a=t("can-reflect"),s=t("can-symbol"),c=t("can-simple-observable"),u=t("can-observation-recorder"),l=t("can-globals/is-node/is-node"),f=t("can-globals/location/location"),d=t("can-globals/document/document"),p=t("can-globals/global/global"),h=t("can-dom-events"),v=t("can-diff/map/map"),y=["pushState","replaceState"],g=s.for("can.dispatch");function m(){var e=f(),t=e.protocol+"//"+e.host,n=i.call("root");return 0===n.indexOf(t)?n.substr(t.length):n}function b(){var e=m(),t=f(),n=t.pathname+t.search,r=n.indexOf(e);return n.substr(r+e.length)}function w(){this.replaceStateOnceKeys=[],this.replaceStateKeys=[],this.dispatchHandlers=this.dispatchHandlers.bind(this),this.anchorClickHandler=function(e){w.prototype.anchorClickHandler.call(this,this,e)},this.keepHash=!0}w.prototype=Object.create(c.prototype),w.constructor=w,a.assign(w.prototype,{root:"/",matchSlashes:!1,paramsMatcher:/^\?(?:[^=]+=[^&]*&)*[^=]+=[^&]*/,querySeparator:"?",dispatchHandlers:function(){var e=this._value;this._value=b(),e!==this._value&&this[g](this._value,e)},anchorClickHandler:function(e,t){if(!(t.isDefaultPrevented?t.isDefaultPrevented():!0===t.defaultPrevented)){if("javascript://"===e.href)return;if("_blank"===e.target)return;if(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)return;var n=e.host||window.location.host;if(window.location.host===n){var r=m();if(0===e.pathname.indexOf(r)){var a=e.pathname+e.search,i=a.substr(r.length);if(void 0!==o.rule(i))0<=e.href.indexOf("#")&&(this.keepHash=!0),(a!==window.location.pathname+window.location.search||e.hash===window.location.hash)&&t.preventDefault&&t.preventDefault(),window.history.pushState(null,null,e.href)}}}},onBound:function(){if(!l()){var e=d(),s=p();this._value=b(),h.addDelegateListener(e.documentElement,"click","a",this.anchorClickHandler);var c=this.originalMethods={},u=this.dispatchHandlers;a.eachKey(y,function(o){this.originalMethods[o]=s.history[o],s.history[o]=function(e,t,n){var r=0===n.indexOf("http"),a=f(),i=a.search+a.hash;(!r&&n!==a.pathname+i||r&&n!==a.href+i)&&(c[o].apply(s.history,arguments),u())}},this),h.addEventListener(s,"popstate",this.dispatchHandlers)}},onUnbound:function(){if(!l()){var e=d(),t=p();h.removeDelegateListener(e.documentElement,"click","a",this.anchorClickHandler),a.eachKey(y,function(e){t.history[e]=this.originalMethods[e]},this),h.removeEventListener(t,"popstate",this.dispatchHandlers)}},get:function(){return u.add(this),b()},set:function(e){var t=o.deparam(e),n=o.deparam(b()),r="pushState",a={};this.keepHash&&-1===e.indexOf("#")&&window.location.hash&&(e+=window.location.hash),v(n,t).forEach(function(e){return a[e.key]=!0}),this.replaceStateKeys.length&&this.replaceStateKeys.forEach(function(e){a[e]&&(r="replaceState")}),this.replaceStateOnceKeys.length&&this.replaceStateOnceKeys.forEach(function(e,t,n){a[e]&&(r="replaceState",n.splice(t,1))}),window.history[r](null,null,i.call("root")+e)},replaceStateOn:function(){a.addValues(this.replaceStateKeys,a.toArray(arguments))},replaceStateOnce:function(){a.addValues(this.replaceStateOnceKeys,a.toArray(arguments))},replaceStateOff:function(){a.removeValues(this.replaceStateKeys,a.toArray(arguments)),a.removeValues(this.replaceStateOnceKeys,a.toArray(arguments))}}),a.assignSymbols(w.prototype,{"can.getValue":w.prototype.get,"can.setValue":w.prototype.set}),r.exports=w}(0,e,0,n)}),define("can/es/can-route-pushstate",["exports","can-route-pushstate"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-param",["exports","can-param"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-deparam",["exports","can-deparam"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-assign",["exports","can-assign"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-define-lazy-value",["exports","can-define-lazy-value"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-diff/deep/deep",["require","exports","module","can-diff/map/map","can-diff/list/list","can-reflect"],function(e,t,n){"use strict";var a=e("can-diff/map/map"),i=e("can-diff/list/list"),f=e("can-reflect");function o(e,t,a,i){var n,o,r=f.getSchema(e),s=f.size(e);return null!=r&&null!=r.values&&(n=f.getSchema(r.values)),null==n&&0<s&&(n=f.getSchema(f.getKeyValue(e,0))),n&&(o=function(n){if(n.identity&&n.identity.length)return function(e,t){return f.getIdentity(e,n)===f.getIdentity(t,n)}}(n)),function(e,t,n){if(f.isPrimitive(e))return e===t;if(f.isPrimitive(t))return e===t;if(o&&o(e,t)){var r=d(e,t,a?a+"."+n:""+n);return i.push.apply(i,r),!0}return 0===d(e,t).length}}function d(s,c,u){if(s&&f.isMoreListLikeThanMapLike(s)){var e=[],t=o(s,0,u,e),n=i(s,c,t).map(function(e){return u&&(e.key=u),e});return e.concat(n)}u=u?u+".":"";var r=a(s,c),l=[];return r.forEach(function(e){var t=e.key;e.key=u+e.key;var n,r,a=s&&f.getKeyValue(s,t),i=c&&f.getKeyValue(c,t);if(n=a,r=i,"set"===e.type&&n&&r&&"object"==typeof n&&"object"==typeof r){var o=d(a,i,e.key);l.push.apply(l,o)}else l.push(e)}),l}n.exports=d}),define("can-diff",["require","exports","module","can-diff/deep/deep","can-diff/list/list","can-diff/map/map","can-diff/merge-deep/merge-deep","can-diff/patcher/patcher","can-namespace"],function(e,t,n){"use strict";var r=e("can-diff/deep/deep"),a=e("can-diff/list/list"),i=e("can-diff/map/map"),o=e("can-diff/merge-deep/merge-deep"),s=e("can-diff/patcher/patcher"),c=e("can-namespace"),u={deep:r,list:a,map:i,mergeDeep:o,Patcher:s};n.exports=c.diff=u}),define("can/es/can-diff",["exports","can-diff"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-globals",["exports","can-globals"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-key",["exports","can-key"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-key-tree",["exports","can-key-tree"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-make-map",function(e,t,n){"use strict";n.exports=function(e){var t={};return e.split(",").forEach(function(e){t[e]=!0}),t}}),define("can/es/can-make-map",["exports","can-make-map"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-parse-uri",["exports","can-parse-uri"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-queues",["exports","can-queues"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-string",["exports","can-string"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-string-to-any",["exports","can-string-to-any"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-ajax",["exports","can-ajax"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-attribute-encoder",["exports","can-attribute-encoder"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-child-nodes",["exports","can-child-nodes"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-control",["exports","can-control"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-dom-events",["exports","can-dom-events"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-dom-mutate/events/events",["require","exports","module","can-dom-mutate","can-namespace"],function(e,t,n){"use strict";var r=e("can-dom-mutate"),a=e("can-namespace");function i(e,n,o){var s=new Map;return{_subscriptions:s,defaultEventType:e,addEventListener:function(r,a,e){var i=this.dispatch,t=s.get(r);t||(t={removeListener:null,listeners:new Set},s.set(r,t)),0===t.listeners.size&&(t.removeListener=n(r,function(e){var t={type:a};for(var n in e)t[n]=e[n];i(r,t,!1!==o)})),t.listeners.add(e),r.addEventListener(a,e)},removeEventListener:function(e,t,n){e.removeEventListener(t,n);var r=s.get(e);r&&(r.listeners.delete(n),0===r.listeners.size&&(r.removeListener(),s.delete(e)))}}}n.exports=a.domMutateDomEvents={attributes:i("attributes",r.onNodeAttributeChange),inserted:i("inserted",r.onNodeInsertion,!1),removed:i("removed",r.onNodeRemoval)}}),define("can-dom-mutate/dom-events",["require","exports","module","can-namespace","can-dom-mutate/events/events"],function(e,t,n){"use strict";var r=e("can-namespace"),a=e("can-dom-mutate/events/events");n.exports=r.domMutateDomEvents=a}),define("can/es/can-dom-mutate",["exports","can-dom-mutate","can-dom-mutate/node","can-dom-mutate/dom-events"],function(e,t,n,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return a(t).default}}),Object.defineProperty(e,"domMutateNode",{enumerable:!0,get:function(){return a(n).default}}),Object.defineProperty(e,"domMutateDomEvents",{enumerable:!0,get:function(){return a(r).default}})}),define("can/es/can-fragment",["exports","can-fragment"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-validate-interface",["exports","can-validate-interface"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-data-types",["exports","can-data-types/maybe-boolean/maybe-boolean","can-data-types/maybe-date/maybe-date","can-data-types/maybe-number/maybe-number","can-data-types/maybe-string/maybe-string"],function(e,t,n,r,a){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"MaybeBoolean",{enumerable:!0,get:function(){return i(t).default}}),Object.defineProperty(e,"MaybeDate",{enumerable:!0,get:function(){return i(n).default}}),Object.defineProperty(e,"MaybeNumber",{enumerable:!0,get:function(){return i(r).default}}),Object.defineProperty(e,"MaybeString",{enumerable:!0,get:function(){return i(a).default}})}),define("can/es/can-namespace",["exports","can-namespace"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-reflect",["exports","can-reflect"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-reflect-dependencies",["exports","can-reflect-dependencies"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-reflect-promise",["exports","can-reflect-promise"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/core",["exports","can/es/can-define","can/es/can-value","can/es/can-observation","can/es/can-observation-recorder","can/es/can-simple-map","can/es/can-bind","can/es/can-event-queue","can/es/can-simple-observable","can/es/can-component","can/es/can-stache","can/es/can-stache-bindings","can/es/can-stache-route-helpers","can/es/can-view-callbacks","can/es/can-view-live","can/es/can-view-model","can/es/can-view-nodelist","can/es/can-view-parser","can/es/can-view-scope","can/es/can-view-target","can/es/can-fixture","can/es/can-query-logic","can/es/can-realtime-rest-model","can/es/can-rest-model","can/es/can-connect","can/es/can-local-store","can/es/can-memory-store","can/es/can-route","can/es/can-route-hash","can/es/can-route-pushstate","can/es/can-param","can/es/can-deparam","can/es/can-assign","can/es/can-define-lazy-value","can/es/can-diff","can/es/can-globals","can/es/can-key","can/es/can-key-tree","can/es/can-make-map","can/es/can-parse-uri","can/es/can-queues","can/es/can-string","can/es/can-string-to-any","can/es/can-ajax","can/es/can-attribute-encoder","can/es/can-child-nodes","can/es/can-control","can/es/can-dom-events","can/es/can-dom-mutate","can/es/can-fragment","can/es/can-validate-interface","can-cid","can-construct","can/es/can-data-types","can/es/can-namespace","can/es/can-reflect","can/es/can-reflect-dependencies","can/es/can-reflect-promise"],function(e,t,n,r,a,i,o,s,c,u,l,f,d,p,h,v,y,g,m,b,w,x,_,k,O,E,L,q,S,M,P,C,V,j,D,I,T,A,N,K,R,B,H,F,z,U,G,W,Y,$,Q,J,X,Z,ee,te,ne,re){"use strict";function ae(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"define",{enumerable:!0,get:function(){return t.define}}),Object.defineProperty(e,"DefineMap",{enumerable:!0,get:function(){return t.DefineMap}}),Object.defineProperty(e,"DefineList",{enumerable:!0,get:function(){return t.DefineList}}),Object.defineProperty(e,"value",{enumerable:!0,get:function(){return ae(n).default}}),Object.defineProperty(e,"Observation",{enumerable:!0,get:function(){return ae(r).default}}),Object.defineProperty(e,"ObservationRecorder",{enumerable:!0,get:function(){return ae(a).default}}),Object.defineProperty(e,"SimpleMap",{enumerable:!0,get:function(){return ae(i).default}}),Object.defineProperty(e,"bind",{enumerable:!0,get:function(){return ae(o).default}}),Object.defineProperty(e,"mapEventBindings",{enumerable:!0,get:function(){return s.mapEventBindings}}),Object.defineProperty(e,"valueEventBindings",{enumerable:!0,get:function(){return s.valueEventBindings}}),Object.defineProperty(e,"SimpleObservable",{enumerable:!0,get:function(){return ae(c).default}}),Object.defineProperty(e,"Component",{enumerable:!0,get:function(){return ae(u).default}}),Object.defineProperty(e,"stache",{enumerable:!0,get:function(){return ae(l).default}}),Object.defineProperty(e,"stacheBindings",{enumerable:!0,get:function(){return ae(f).default}}),Object.defineProperty(e,"stacheRouteHelpers",{enumerable:!0,get:function(){return ae(d).default}}),Object.defineProperty(e,"viewCallbacks",{enumerable:!0,get:function(){return ae(p).default}}),Object.defineProperty(e,"viewLive",{enumerable:!0,get:function(){return ae(h).default}}),Object.defineProperty(e,"viewModel",{enumerable:!0,get:function(){return ae(v).default}}),Object.defineProperty(e,"nodeList",{enumerable:!0,get:function(){return ae(y).default}}),Object.defineProperty(e,"viewParser",{enumerable:!0,get:function(){return ae(g).default}}),Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return ae(m).default}}),Object.defineProperty(e,"target",{enumerable:!0,get:function(){return ae(b).default}}),Object.defineProperty(e,"fixture",{enumerable:!0,get:function(){return ae(w).default}}),Object.defineProperty(e,"QueryLogic",{enumerable:!0,get:function(){return ae(x).default}}),Object.defineProperty(e,"realtimeRestModel",{enumerable:!0,get:function(){return ae(_).default}}),Object.defineProperty(e,"restModel",{enumerable:!0,get:function(){return ae(k).default}}),Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return ae(O).default}}),Object.defineProperty(e,"localStore",{enumerable:!0,get:function(){return ae(E).default}}),Object.defineProperty(e,"memoryStore",{enumerable:!0,get:function(){return ae(L).default}}),Object.defineProperty(e,"route",{enumerable:!0,get:function(){return ae(q).default}}),Object.defineProperty(e,"RouteHash",{enumerable:!0,get:function(){return ae(S).default}}),Object.defineProperty(e,"RoutePushstate",{enumerable:!0,get:function(){return ae(M).default}}),Object.defineProperty(e,"param",{enumerable:!0,get:function(){return ae(P).default}}),Object.defineProperty(e,"deparam",{enumerable:!0,get:function(){return ae(C).default}}),Object.defineProperty(e,"assign",{enumerable:!0,get:function(){return ae(V).default}}),Object.defineProperty(e,"defineLazyValue",{enumerable:!0,get:function(){return ae(j).default}}),Object.defineProperty(e,"diff",{enumerable:!0,get:function(){return ae(D).default}}),Object.defineProperty(e,"globals",{enumerable:!0,get:function(){return ae(I).default}}),Object.defineProperty(e,"key",{enumerable:!0,get:function(){return ae(T).default}}),Object.defineProperty(e,"KeyTree",{enumerable:!0,get:function(){return ae(A).default}}),Object.defineProperty(e,"makeMap",{enumerable:!0,get:function(){return ae(N).default}}),Object.defineProperty(e,"parseURI",{enumerable:!0,get:function(){return ae(K).default}}),Object.defineProperty(e,"queues",{enumerable:!0,get:function(){return ae(R).default}}),Object.defineProperty(e,"string",{enumerable:!0,get:function(){return ae(B).default}}),Object.defineProperty(e,"stringToAny",{enumerable:!0,get:function(){return ae(H).default}}),Object.defineProperty(e,"ajax",{enumerable:!0,get:function(){return ae(F).default}}),Object.defineProperty(e,"attributeEncoder",{enumerable:!0,get:function(){return ae(z).default}}),Object.defineProperty(e,"childNodes",{enumerable:!0,get:function(){return ae(U).default}}),Object.defineProperty(e,"Control",{enumerable:!0,get:function(){return ae(G).default}}),Object.defineProperty(e,"domEvents",{enumerable:!0,get:function(){return ae(W).default}}),Object.defineProperty(e,"domMutate",{enumerable:!0,get:function(){return ae(Y).default}}),Object.defineProperty(e,"domMutateNode",{enumerable:!0,get:function(){return Y.domMutateNode}}),Object.defineProperty(e,"domMutateDomEvents",{enumerable:!0,get:function(){return Y.domMutateDomEvents}}),Object.defineProperty(e,"fragment",{enumerable:!0,get:function(){return ae($).default}}),Object.defineProperty(e,"makeInterfaceValidator",{enumerable:!0,get:function(){return ae(Q).default}}),Object.defineProperty(e,"cid",{enumerable:!0,get:function(){return ae(J).default}}),Object.defineProperty(e,"Construct",{enumerable:!0,get:function(){return ae(X).default}}),Object.defineProperty(e,"MaybeBoolean",{enumerable:!0,get:function(){return Z.MaybeBoolean}}),Object.defineProperty(e,"MaybeDate",{enumerable:!0,get:function(){return Z.MaybeDate}}),Object.defineProperty(e,"MaybeNumber",{enumerable:!0,get:function(){return Z.MaybeNumber}}),Object.defineProperty(e,"MaybeString",{enumerable:!0,get:function(){return Z.MaybeString}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return ae(ee).default}}),Object.defineProperty(e,"can",{enumerable:!0,get:function(){return ae(ee).default}}),Object.defineProperty(e,"Reflect",{enumerable:!0,get:function(){return ae(te).default}}),Object.defineProperty(e,"reflectDependencies",{enumerable:!0,get:function(){return ae(ne).default}}),Object.defineProperty(e,"reflectPromise",{enumerable:!0,get:function(){return ae(re).default}})}),define("can-define-backup",["require","exports","module","can-reflect","can-simple-observable","can-diff/deep/deep","can-diff/map/map"],function(e,t,n){"use strict";var i=e("can-reflect"),r=e("can-simple-observable"),o=e("can-diff/deep/deep"),s=e("can-diff/map/map"),a=new WeakMap;function c(e){var t=a.get(e);return t||(t=new r,a.set(e,t)),t}n.exports=function(e){return function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!1,configurable:!0,writable:!0,value:t[n]})}(e.prototype,{backup:function(){var e=c(this);return i.setValue(e,this.serialize()),this},isDirty:function(e){var t=c(this),r=i.getValue(t);if(!r)return!1;var a=this.serialize();return(e?o(a,r):s(a,r).filter(function(e){if("set"!==e.type)return!0;var t=a[e.key],n=r[e.key];return!(t&&n&&"object"==typeof t&&"object"==typeof n)})).length},restore:function(e){var t=c(this),n=i.getValue(t),r=e?n:function(e,t){var n={};for(var r in e)"object"!=typeof e[r]||null===e[r]||e[r]instanceof Date?n[r]=e[r]:n[r]=t[r];return n}(n,this);if(this.isDirty(e))for(var a in r)this[a]=r[a];return this}}),e}}),define("can/es/can-define-backup",["exports","can-define-backup"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-define-stream",["require","exports","module","can-define","can-assign","can-reflect"],function(e,t,n){"use strict";var c=e("can-define"),u=e("can-assign"),r=e("can-reflect");n.exports=function(s){return function(a){["toStream","toStreamFromProperty","toStreamFromEvent"].forEach(function(e){a.prototype[e]=function(){return s[e].apply(s,[this].concat([].slice.call(arguments)))}}),a.prototype.stream=a.prototype.toStream;var e=a.prototype._define.definitions,i=a.prototype._define.dataInitializers,o=a.prototype._define.computedInitializers;r.eachKey(e,function(e,t){var n=e.stream;if(n){var r=u({default:function(){return s.toCompute(n,this)}},c.types.compute);c.property(a.prototype,t,r,i,o)}})}}}),define("can/es/can-define-stream",["exports","can-define-stream"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-kefir",["require","exports","module","kefir","can-symbol","can-reflect","can-event-queue/map/map","can-observation-recorder"],function(e,t,n){!function(e,t,n,r){"use strict";var a=t("kefir"),i=t("can-symbol"),o=t("can-reflect"),s=t("can-event-queue/map/map"),c=t("can-observation-recorder"),u=i.for("can.meta"),l=i.for("can.onKeyValue"),f=i.for("can.offKeyValue"),d={value:{on:"onValue",off:"offValue",handler:"onValueHandler",handlers:"onValueHandlers"},error:{on:"onError",off:"offError",handler:"onErrorHandler",handlers:"onErrorHandlers"}};function p(e){var t=e[u];return t||(t={},o.setKeyValue(e,u,t)),t}a&&(Object.isExtensible&&!Object.isExtensible(a)&&(a=a.Kefir),a.Observable.prototype._eventSetup=function(){var n=this,r=p(n);r.bound=!0,r.onValueHandler=function(e){var t=r.value;(r.value=e)!==t&&s.dispatch.call(n,{type:"value"},[e,t])},r.onErrorHandler=function(e){var t=r.error;r.error=e,s.dispatch.call(n,{type:"error"},[e,t])},n.onValue(r.onValueHandler),n.onError(r.onErrorHandler)},a.Observable.prototype._eventTeardown=function(){var e=p(this);e.bound=!1,this.offValue(e.onValueHandler),this.offError(e.onErrorHandler)},o.assignSymbols(a.Observable.prototype,{"can.onKeyValue":function(){return s[l].apply(this,arguments)},"can.offKeyValue":function(){return s[f].apply(this,arguments)},"can.getKeyValue":function(e){var t=p(this);if(!d[e])return this[e];if(c.add(this,e),t.bound)return t[e];var n=function(e,t){if(e._currentEvent&&e._currentEvent.type===t)return e._currentEvent.value;var n=d[t];if(!n)return e[t];var r,a=function(e){r=e};return e[n.on](a),e[n.off](a),r}(this,e);return t[e]=n},"can.getValueDependencies":function(){var e;if(null!=this._source?e=[this._source]:null!=this._sources&&(e=this._sources),null!=e)return{valueDependencies:new Set(e)}}}),a.emitterProperty=function(){var t,n,r=!1,e=a.stream(function(e){return t=e,r&&t.value(n),function(){t=void 0}}).toProperty(function(){return n});return e.emitter={value:function(e){if(t)return t.emit(e);r=!0,n=e},error:function(e){if(t)return t.error(e);e}},e.emitter.emit=e.emitter.value,o.assignSymbols(e,{"can.setKeyValue":function(e,t){this.emitter[e](t)}}),e}),r.exports=a}(0,e,0,n)}),define("can-compute/proto-compute",["require","exports","module","can-observation","can-observation-recorder","can-event-queue/map/map","can-stache-key","can-key/get/get","can-assign","can-reflect","can-single-reference"],function(e,t,n){"use strict";var i=e("can-observation"),s=e("can-observation-recorder"),o=e("can-event-queue/map/map"),f=e("can-stache-key"),c=e("can-key/get/get"),u=e("can-assign"),d=e("can-reflect"),a=e("can-single-reference"),l=function(e,t,n,r){for(var a=[],i=0,o=arguments.length;i<o;i++)a[i]=arguments[i];var s=typeof a[1];if("function"==typeof a[0])this._setupGetterSetterFn(a[0],a[1],a[2],a[3]);else if(void 0!==a[1])if("string"===s||"number"===s){var c=d.isObservableLike(a[0])&&d.isListLike(a[0]);if(d.isObservableLike(a[0])&&d.isMapLike(a[0])||c){var u=a[0],l=a[1];this._setupGetterSetterFn(function(e){if(!arguments.length)return c&&f.get(u,"length"),f.get(u,""+l);f.set(u,l,e)},a[1],a[2],a[3])}else this._setupProperty(a[0],a[1],a[2])}else"function"===s?this._setupSetter(a[0],a[1],a[2]):a[1]&&a[1].fn?this._setupAsyncCompute(a[0],a[1]):this._setupSettings(a[0],a[1]);else this._setupSimpleValue(a[0]);this._args=a,this._primaryDepth=0,this.isComputed=!0},p=function(e,t,n){var r=new i(t,n,e),a=e.updater.bind(e);return e.observation=r,{_on:function(){d.onValue(r,a,"notify"),r.hasOwnProperty("_value")?e.value=r._value:e.value=r.value},_off:function(){d.offValue(r,a,"notify")},getDepth:function(){return r.getDepth()}}};o(l.prototype),u(l.prototype,{setPrimaryDepth:function(e){this._primaryDepth=e},_setupGetterSetterFn:function(e,t,n){this._set=t?e.bind(t):e,this._get=t?e.bind(t):e,this._canObserve=!1!==n;var r=p(this,e,t||this);u(this,r)},_setupProperty:function(r,a,t){var n,e=this;n=function(){e.updater(e._get(),e.value)},this._get=function(){return c(r,a)},this._set=function(e){var t=a.split("."),n=t.pop();t.length?c(r,t.join("."))[n]=e:r[a]=e},this._on=function(e){o.on.call(r,t||a,n),this.value=this._get()},this._off=function(){return o.off.call(r,t||a,n)}},_setupSetter:function(e,t,n){this.value=e,this._set=t,u(this,n)},_setupSettings:function(e,t){if(this.value=e,this._set=t.set||this._set,this._get=t.get||this._get,!t.__selfUpdater){var n=this,r=this.updater;this.updater=function(){r.call(n,n._get(),n.value)}}this._on=t.on?t.on:this._on,this._off=t.off?t.off:this._off},_setupAsyncCompute:function(e,t){var n,r=this,a=t.fn;if(this.value=e,this._setUpdates=!0,this.lastSetValue=new l(e),this._set=function(e){return e===r.lastSetValue.get()?this.value:r.lastSetValue.set(e)},this._get=function(){return a.call(t.context,r.lastSetValue.get())},0===a.length)n=p(this,a,t.context);else if(1===a.length)n=p(this,function(){return a.call(t.context,r.lastSetValue.get())},t);else{var i=this.updater,o=s.ignore(function(e){i.call(r,e,r.value)});this.updater=function(e){i.call(r,e,r.value)},n=p(this,function(){var e=a.call(t.context,r.lastSetValue.get(),o);return void 0!==e?e:this.value},this)}u(this,n)},_setupSimpleValue:function(e){this.value=e},_eventSetup:s.ignore(function(){this.bound=!0,this._on(this.updater)}),_eventTeardown:function(){this._off(this.updater),this.bound=!1},clone:function(e){return e&&"function"==typeof this._args[0]?this._args[1]=e:e&&(this._args[2]=e),new l(this._args[0],this._args[1],this._args[2],this._args[3])},_on:function(){},_off:function(){},get:function(){return s.isRecording()&&!1!==this._canObserve&&(s.add(this,"change"),this.bound||l.temporarilyBind(this)),this.bound?this.observation?this.observation.get():this.value:this._get()},_get:function(){return this.value},set:function(e){var t=this.value,n=this._set(e,t);return this._setUpdates?this.value:this.hasDependencies?this._get():(this.updater(void 0===n?this._get():n,t),this.value)},_set:function(e){return this.value=e},updater:function(e,t,n){this.value=e;var r,a,i,o,s=this.observation;s&&(s.hasOwnProperty("_value")?s._value=e:s.value=e),r=this,o=n,(a=e)!==(i=t)&&(a==a||i==i)&&r.dispatch({type:"change",batchNum:o},[a,i])},toFunction:function(){return this._computeFn.bind(this)},_computeFn:function(e){return arguments.length?this.set(e):this.get()}}),l.prototype.on=l.prototype.bind=l.prototype.addEventListener,l.prototype.off=l.prototype.unbind=l.prototype.removeEventListener;var r=function(){return this.observation&&this.observation.hasDependencies()};Object.defineProperty(l.prototype,"hasDependencies",{get:r}),l.temporarilyBind=i.temporarilyBind,l.async=function(e,t,n){return new l(e,{fn:t,context:n})},l.truthy=function(t){return new l(function(){var e=t.get();return"function"==typeof e&&(e=e.get()),!!e})},d.assignSymbols(l.prototype,{"can.isValueLike":!0,"can.isMapLike":!1,"can.isListLike":!1,"can.setValue":l.prototype.set,"can.getValue":l.prototype.get,"can.valueHasDependencies":r,"can.onValue":function(r,e){function t(e,t,n){r(t,n)}a.set(r,this,t),this.addEventListener("change",t,e)},"can.offValue":function(e,t){this.removeEventListener("change",a.getAndDelete(e,this),t)},"can.getValueDependencies":function(){var e;return this.observation&&(e={valueDependencies:new Set([this.observation])}),e}}),n.exports=l}),define("can-compute",["require","exports","module","can-compute/proto-compute","can-namespace","can-single-reference","can-reflect/reflections/get-set/get-set","can-symbol"],function(e,t,n){"use strict";var i=e("can-compute/proto-compute"),r=e("can-namespace"),a=e("can-single-reference"),o=e("can-reflect/reflections/get-set/get-set"),s=e("can-symbol"),c=s.for("can.onValue"),u=s.for("can.offValue"),l=s.for("can.getValue"),f=s.for("can.setValue"),d=s.for("can.isValueLike"),p=s.for("can.isMapLike"),h=s.for("can.isListLike"),v=s.for("can.isFunctionLike"),y=s.for("can.valueHasDependencies"),g=s.for("can.getValueDependencies"),m=function(e,t){var n,r=this;return t&&(n=function(){t.apply(r,arguments)},a.set(t,this,n)),r.computeInstance.addEventListener(e,n)},b=function(e,t){var n=[];return void 0!==e&&(n.push(e),void 0!==t&&n.push(a.getAndDelete(t,this))),this.computeInstance.removeEventListener.apply(this.computeInstance,n)},w=function(e,t){return this.computeInstance[c](e,t)},x=function(e,t){return this.computeInstance[u](e,t)},_=function(){return this.computeInstance.get()},k=function(e){return this.computeInstance.set(e)},O=function(){return this.computeInstance.hasDependencies},E=function(){return this.computeInstance[g]()},L=function(t,n,e,r){function a(e){return arguments.length?a.computeInstance.set(e):a.computeInstance.get()}return a.computeInstance=new i(t,n,e,r),a.on=a.bind=a.addEventListener=m,a.off=a.unbind=a.removeEventListener=b,a.isComputed=a.computeInstance.isComputed,a.clone=function(e){return"function"==typeof t&&(n=e),L(t,n,e,r)},o.set(a,c,w),o.set(a,u,x),o.set(a,l,_),o.set(a,f,k),o.set(a,d,!0),o.set(a,p,!1),o.set(a,h,!1),o.set(a,v,!1),o.set(a,y,O),o.set(a,g,E),a};L.truthy=function(e){return L(function(){return!!e()})},L.async=function(e,t,n){return L(e,{fn:t,context:n})},L.temporarilyBind=i.temporarilyBind,n.exports=r.compute=L}),define("can-stream",["require","exports","module","can-assign","can-compute","can-reflect","can-namespace"],function(e,t,n){"use strict";var o=e("can-assign"),u=e("can-compute"),i=e("can-reflect"),r=e("can-namespace"),l=function(t,r){var a,i;return u(void 0,{on:function(n){a=function(e,t){i=o({args:[].slice.call(arguments,1)},e),n()},t.on(r,a)},off:function(e){t.off(r,a),i=void 0},get:function(){return i}})},a=function(r){var a;return((a=function(){if(1===arguments.length)return r.toStream(arguments[0]);if(1<arguments.length){var e=arguments[0],t=arguments[1].trim();if(-1===t.indexOf(" "))return 0===t.indexOf(".")?a.toStreamFromProperty(e,t.slice(1)):a.toStreamFromEvent(e,t);var n=t.split(" ");return a.toStreamFromEvent(e,n[0].slice(1),n[1])}}).toStream=a).toStreamFromProperty=function(e,t){return r.toStream(u(e,t))},a.toStreamFromEvent=function(){var a,e,i,t,n=arguments[0];if(2===arguments.length)return t=l(n,arguments[1]),r.toStream(t);e=arguments[1],a=arguments[2],i=n[e];var o,s,c=u(n,e);return t=u(void 0,{on:function(r){o=function(e,t,n){r(i=t)},s=function(e,t,n){n.off(a,o),t.on(a,o)},c.on("change",s),c().on(a,o)},off:function(){c().off(a,o),c.off("change",s)},get:function(){return i},set:function(e){throw new Error("can-stream: you can't set this type of compute")}}),r.toStream(t)},a.toCompute=function(e,t){var n=i.toArray(arguments);return r.toCompute.apply(this,n)},a};a.toComputeFromEvent=l,n.exports=r.stream=a}),define("can-stream-kefir",["require","exports","module","can-kefir","can-compute","can-stream","can-symbol","can-namespace"],function(e,t,n){"use strict";var u=e("can-kefir"),l=e("can-compute"),r=e("can-stream"),a=e("can-symbol"),i=e("can-namespace"),o=a.for("can.getValueDependencies"),f=a.for("can.getKeyDependencies"),s={toStream:function(r){var e=u.stream(function(n){var e=function(e,t){n.emit(t)};r.on("change",e);var t=r();return void 0!==t&&n.emit(t),function(){r.off("change",e)}});return e[o]=function(){return{valueDependencies:new Set([r])}},e},toCompute:function(e,t){var n,r,a,i,o=u.stream(function(e){n=e,void 0!==i&&n.emit(i)}),s=e.call(t,o),c=l(void 0,{get:function(){return r},set:function(e){return n?n.emit(e):i=e,e},on:function(t){a=function(e){r=e,t()},s.onValue(a)},off:function(){s.offValue(a)}});return c.computeInstance[f]=function(e){if("change"===e)return{valueDependencies:new Set([s])}},c}};i.streamKefir||(n.exports=i.streamKefir=r(s))}),define("can-define-stream-kefir",["require","exports","module","can-namespace","can-define-stream","can-stream-kefir"],function(e,t,n){"use strict";var r=e("can-namespace"),a=e("can-define-stream"),i=e("can-stream-kefir");n.exports=r.defineStreamKefir=a(i)}),define("can/es/can-define-stream-kefir",["exports","can-define-stream-kefir"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-kefir",["exports","can-kefir"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-observe/src/-symbols",["require","exports","module","can-symbol"],function(e,t,n){"use strict";var r=e("can-symbol");n.exports={metaSymbol:r.for("can.meta"),patchesSymbol:"can.patches",keysSymbol:"can.keys"}}),define("can-observe/src/-observable-store",function(e,t,n){"use strict";n.exports={proxiedObjects:new WeakMap,proxies:new WeakSet}}),define("can-observe/src/-helpers",["require","exports","module","can-symbol"],function(require,exports,module){"use strict";var canSymbol=require("can-symbol"),metaSymbol=canSymbol.for("can.meta"),classTest=/^\s*class\s+/,helpers={assignEverything:function(t,n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t},isBuiltInButNotArrayOrPlainObject:function(e){if(Array.isArray(e))return!1;if("function"==typeof e)return 0<e.toString().indexOf("[native code]");var t=Object.prototype.toString.call(e);return"[object Object]"!==t&&-1!==t.indexOf("[object ")},inheritsFromArray:function(e){var t=e;do{if(Array.isArray(t))return!0;t=Object.getPrototypeOf(t)}while(t);return!1},isClass:function(e){return"function"==typeof e&&classTest.test(e.toString())},supportsClass:function(){try{return eval('"use strict"; class A{};'),!0}catch(e){return!1}}(),makeSimpleExtender:function(a){return function(e,t,n){var r=function(){var e=a.apply(this,arguments);return this.init&&(e[metaSymbol].preventSideEffects++,this.init.apply(e,arguments),e[metaSymbol].preventSideEffects--),e};return helpers.assignEverything(r,a),helpers.assignEverything(r,t||{}),r.extend=helpers.makeSimpleExtender(r),r.prototype=Object.create(a.prototype),helpers.assignEverything(r.prototype,n||{}),r.prototype.constructor=r}},assignNonEnumerable:function(e,t,n){return Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}};module.exports=helpers}),define("can-observe/src/-computed-helpers",["require","exports","module","can-observation","can-observation-recorder","can-event-queue/map/map","can-reflect","can-symbol"],function(e,t,n){"use strict";var i=e("can-observation"),r=e("can-observation-recorder"),a=e("can-event-queue/map/map"),o=e("can-reflect"),s=e("can-symbol"),c=s.for("can.meta"),u=s.for("can.computedPropertyDefinitions"),l=s.for("can.onKeyValue"),f=s.for("can.offKeyValue");function d(e,t,n){this.instance=e,this.prop=t,this.observation=n,this.forward=this.forward.bind(this)}function p(e,t){var n=e[c],r=n.target[u];if(void 0!==r){var a=r[t];if(void 0!==a)return void 0===n.computedKeys[t]&&(n.computedKeys[t]=new d(e,t,a(e,t))),n.computedKeys[t]}}d.prototype.bind=function(){this.bindingCount++,1===this.bindingCount&&this.observation.on(this.forward,"notify")},d.prototype.unbind=function(){this.bindingCount--,0===this.bindingCount&&this.observation.off(this.forward,"notify")},d.prototype.forward=function(e,t){a.dispatch.call(this.instance,{type:this.prop,target:this.instance},[e,t])},d.prototype.bindingCount=0;var h=n.exports={get:function(e,t){var n=p(e,t);if(void 0!==n)return r.add(e,t.toString()),0===n.bindingCount&&r.isRecording()&&i.temporarilyBind(n.observation),{value:o.getValue(n.observation)}},set:function(e,t,n){var r=p(e,t);return void 0!==r&&(o.setValue(r.observation,n),!0)},bind:function(e,t){var n=p(e,t);void 0!==n&&n.bind()},unbind:function(e,t){var n=p(e,t);void 0!==n&&n.unbind()},addKeyDependencies:function(e){var r=e[l],a=e[f];o.assignSymbols(e,{"can.onKeyValue":function(e,t,n){return h.bind(this,e),r.apply(this,arguments)},"can.offKeyValue":function(e,t,n){return h.unbind(this,e),a.apply(this,arguments)},"can.getKeyDependencies":function(e){var t=p(this,e);if(void 0!==t)return{valueDependencies:new Set([t.observation])}}})},addMethodsAndSymbols:function(e){e.prototype.addEventListener=function(e,t,n){return h.bind(this,e),a.addEventListener.call(this,e,t,n)},e.prototype.removeEventListener=function(e,t,n){return h.unbind(this,e),a.removeEventListener.call(this,e,t,n)}},ensureDefinition:function(r){if(!r.hasOwnProperty(u)){var e=r[u],a=r[u]=Object.create(e||null);Object.getOwnPropertyNames(r).forEach(function(e){if("constructor"!==e){var t=Object.getOwnPropertyDescriptor(r,e);if(void 0!==t.get){var n=t.get;a[e]=function(e,t){return new i(n,e)}}}})}return r[u]}}}),define("can-observe/src/-make-object",["require","exports","module","can-reflect","can-observation-recorder","can-event-queue/map/map","can-observe/src/-symbols","can-observe/src/-observable-store","can-observe/src/-helpers","can-observe/src/-computed-helpers"],function(e,t,n){"use strict";var r=e("can-reflect"),s=e("can-observation-recorder"),o=e("can-event-queue/map/map"),a=e("can-observe/src/-symbols"),c=e("can-observe/src/-observable-store"),i=e("can-observe/src/-helpers"),u=e("can-observe/src/-computed-helpers"),l=Object.prototype.hasOwnProperty,f=r.isSymbolLike,d=Object.create(null);Object.getOwnPropertySymbols(o).forEach(function(e){i.assignNonEnumerable(d,e,o[e])}),u.addKeyDependencies(d);var p={observable:function(e,t){void 0===t.shouldRecordObservation&&(t.shouldRecordObservation=p.shouldRecordObservationOnOwnAndMissingKeys);var n={target:e,proxyKeys:void 0!==t.proxyKeys?t.proxyKeys:Object.create(p.proxyKeys()),computedKeys:Object.create(null),options:t,preventSideEffects:0};i.assignNonEnumerable(n.proxyKeys,a.metaSymbol,n);var r={get:p.get.bind(n),set:p.set.bind(n),ownKeys:p.ownKeys.bind(n),deleteProperty:p.deleteProperty.bind(n),getOwnPropertyDescriptor:p.getOwnPropertyDescriptor.bind(n),meta:n};return t.getPrototypeOf&&(r.getPrototypeOf=t.getPrototypeOf),n.proxy=new Proxy(e,r),o.addHandlers(n.proxy,n),n.proxy},proxyKeys:function(){return d},get:function(e,t,n){var r=this.proxyKeys[t];if(void 0!==r)return r;if(f(t))return e[t];var a=u.get(n,t);if(void 0!==a)return a.value;var i=p.getKeyInfo(e,t,n,this),o=i.targetValue;return i.valueIsInvariant||(o=p.getValueFromStore(t,o,this)),this.options.shouldRecordObservation(i,this)&&s.add(this.proxy,t.toString()),i.parentObservableGetCalledOn&&s.add(i.parentObservableGetCalledOn,t.toString()),o},set:function(e,t,n,r){return r!==this.proxy?p.setKey(r,t,n,this):(!0===u.set(r,t,n)||(n=p.getValueToSet(t,n,this),p.setValueAndOnChange(t,n,this,function(e,t,n,r,a){var i={type:e,patches:[{key:e,type:r?"set":"add",value:t}],keyChanged:r?void 0:e};o.dispatch.call(n.proxy,i,[t,a])})),!0)},deleteProperty:function(e,t){var n=this.target[t],r=delete this.target[t];if(r&&0===this.preventSideEffects&&void 0!==n){var a={type:t,patches:[{key:t,type:"delete"}],keyChanged:t};o.dispatch.call(this.proxy,a,[void 0,n])}return r},ownKeys:function(e,t){return s.add(this.proxy,a.keysSymbol),Object.getOwnPropertyNames(this.target).concat(Object.getOwnPropertySymbols(this.target)).concat(Object.getOwnPropertySymbols(this.proxyKeys))},getOwnPropertyDescriptor:function(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n&&t in this.proxyKeys?Object.getOwnPropertyDescriptor(this.proxyKeys,t):n},getKeyInfo:function(e,t,n,r){var a=Object.getOwnPropertyDescriptor(e,t),i={key:t,descriptor:a,targetHasOwnKey:Boolean(a),getCalledOnParent:n!==r.proxy,protoHasKey:!1,valueIsInvariant:!1,targetValue:void 0,isAccessor:!1};return!0===i.getCalledOnParent&&(i.parentObservableGetCalledOn=c.proxiedObjects.get(n)),void 0!==a?(i.valueIsInvariant=!1===a.writable,void 0!==a.get?(i.targetValue=a.get.call(i.parentObservableGetCalledOn||n),i.isAccessor=!0):i.targetValue=a.value):(i.targetValue=r.target[t],i.protoHasKey=void 0!==i.targetValue||t in e),i},shouldRecordObservationOnOwnAndMissingKeys:function(e,t){return 0===t.preventSideEffects&&!e.isAccessor&&(e.targetHasOwnKey||!e.protoHasKey&&!Object.isSealed(t.target))},setKey:function(e,t,n){return Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!0,writable:!0}),!0},getValueToSet:function(e,t,n){return!r.isSymbolLike(e)&&n.handlers.getNode([e])?p.getValueFromStore(e,t,n):t},getValueFromStore:function(e,t,n){return r.isPrimitive(t)||r.isObservableLike(t)||c.proxies.has(t)||(c.proxiedObjects.has(t)?t=c.proxiedObjects.get(t):i.isBuiltInButNotArrayOrPlainObject(t)||(t=n.options.observe(t))),t},setValueAndOnChange:function(e,t,n,r){var a,i=l.call(n.target,e),o=Object.getOwnPropertyDescriptor(n.target,e);o&&o.set?o.set.call(n.proxy,t):(a=n.target[e])!==t&&(n.target[e]=t,0===n.preventSideEffects&&r(e,t,n,i,a))}};n.exports=p}),define("can-observe/src/-make-array",["require","exports","module","can-observation-recorder","can-event-queue/map/map","can-reflect","can-observe/src/-make-object","can-observe/src/-symbols","can-observe/src/-observable-store","can-observe/src/-helpers","can-observe/src/-computed-helpers"],function(e,t,n){"use strict";var r=e("can-observation-recorder"),d=e("can-event-queue/map/map"),a=e("can-reflect"),i=e("can-observe/src/-make-object"),c=e("can-observe/src/-symbols"),u=e("can-observe/src/-observable-store"),o=e("can-observe/src/-helpers"),s=e("can-observe/src/-computed-helpers"),p=a.isSymbolLike,h=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};var v={push:function(e,t){return[{index:e.length-t.length,deleteCount:0,insert:t,type:"splice"}]},pop:function(e){return[{index:e.length,deleteCount:1,insert:[],type:"splice"}]},shift:function(){return[{index:0,deleteCount:1,insert:[],type:"splice"}]},unshift:function(e,t){return[{index:0,deleteCount:0,insert:t,type:"splice"}]},splice:function(e,t){return[{index:t[0],deleteCount:t[1],insert:t.slice(2),type:"splice"}]},sort:function(e){return[{index:0,deleteCount:e.length,insert:e,type:"splice"}]},reverse:function(e,t,n){return[{index:0,deleteCount:e.length,insert:e,type:"splice"}]}};a.eachKey(v,function(o,e){var s=Array.prototype[e],t=function(){var e=this[c.metaSymbol],t=0===e.preventSideEffects,n=e.target.length;e.preventSideEffects++;var r=s.apply(e.target,arguments),a=o(e.target,Array.from(arguments),n);if(!0===t){var i={type:"length",patches:a};d.dispatch.call(e.proxy,i,[e.target.length,n])}return e.preventSideEffects--,r};u.proxiedObjects.set(s,t),u.proxies.add(t)}),Object.getOwnPropertyNames(Array.prototype).forEach(function(e){var n=Array.prototype[e];if(!u.proxiedObjects.has(n)&&"constructor"!==e&&"function"==typeof n){var t=function(){r.add(this,c.patchesSymbol);var e=this[c.metaSymbol];e.preventSideEffects++;var t=n.apply(this,arguments);return e.preventSideEffects--,e.options.observe(t)};u.proxiedObjects.set(n,t),u.proxies.add(t)}});var l=o.assignEverything(Object.create(null),i.proxyKeys()),f={observable:function(e,t){void 0===t.shouldRecordObservation&&(t.shouldRecordObservation=i.shouldRecordObservationOnOwnAndMissingKeys);var n={target:e,proxyKeys:void 0!==t.proxyKeys?t.proxyKeys:Object.create(f.proxyKeys()),computedKeys:Object.create(null),options:t,preventSideEffects:0};return(n.proxyKeys[c.metaSymbol]=n).proxy=new Proxy(e,{get:i.get.bind(n),set:f.set.bind(n),ownKeys:i.ownKeys.bind(n),deleteProperty:i.deleteProperty.bind(n),meta:n}),d.addHandlers(n.proxy,n),n.proxy},proxyKeys:function(){return l},set:function(l,e,t,n){if(n!==this.proxy)return i.setKey(n,e,t,this);if(!0===s.set(n,e,t))return!0;t=i.getValueToSet(e,t,this);var f=l.length;return i.setValueAndOnChange(e,t,this,function(e,t,n,r,a){var i,o,s=[{key:e,type:r?"set":"add",value:t}],c=!p(e)&&+e;h(c)&&(!r&&f<c?s.push({index:f,deleteCount:0,insert:l.slice(f),type:"splice"}):s.push.apply(s,v.splice(l,[c,1,t]))),i=t,o=a,"length"===e&&i<o&&s.push({index:t,deleteCount:a-t,insert:[],type:"splice"});var u={type:e,patches:s,keyChanged:r?void 0:e};d.dispatch.call(n.proxy,u,[t,a])}),!0}};n.exports=f}),define("can-observe/src/-make-observe",["require","exports","module","can-reflect","can-observe/src/-observable-store","can-observe/src/-helpers"],function(e,t,n){"use strict";var r=e("can-reflect"),a=e("can-observe/src/-observable-store"),i=e("can-observe/src/-helpers"),o={observe:function(e){if(r.isPrimitive(e))return e;var t=a.proxiedObjects.get(e);return t||(a.proxies.has(e)?e:i.isBuiltInButNotArrayOrPlainObject(e)?e:(t="function"==typeof e?o.function(e):i.inheritsFromArray(e)?o.array(e):o.object(e),a.proxiedObjects.set(e,t),a.proxies.add(t),t))},object:null,array:null,function:null};n.exports=o}),define("can-observe/src/-make-function",["require","exports","module","can-reflect","can-observe/src/-make-object","can-observe/src/-make-observe","can-observe/src/-symbols","can-observe/src/-observable-store","can-event-queue/map/map","can-event-queue/type/type","can-observe/src/-helpers"],function(e,t,n){"use strict";var r=e("can-reflect"),i=e("can-observe/src/-make-object"),o=e("can-observe/src/-make-observe"),s=e("can-observe/src/-symbols"),c=e("can-observe/src/-observable-store"),u=e("can-event-queue/map/map"),l=e("can-event-queue/type/type"),f=e("can-observe/src/-helpers"),a=f.assignEverything(Object.create(null),i.proxyKeys());l(a),r.assignSymbols(a,{"can.defineInstanceKey":function(e,t){this[s.metaSymbol].definitions[e]=t}});var d={observable:function(e,t){void 0===t.shouldRecordObservation&&(t.shouldRecordObservation=i.shouldRecordObservationOnOwnAndMissingKeys);var n=Object.create(d.proxyKeys()),r={target:e,proxyKeys:n,computedKeys:Object.create(null),options:t,definitions:{},isClass:f.isClass(e),preventSideEffects:0};if((n[s.metaSymbol]=r).proxy=new Proxy(e,{get:i.get.bind(r),set:i.set.bind(r),ownKeys:i.ownKeys.bind(r),deleteProperty:i.deleteProperty.bind(r),construct:d.construct.bind(r),apply:d.apply.bind(r),meta:r}),u.addHandlers(r.proxy,r),l.addHandlers(r.proxy,r),c.proxiedObjects.set(e,r.proxy),c.proxies.add(r.proxy),r.target.prototype&&r.target.prototype.constructor===r.target){var a=i.observable(r.target.prototype,{getPrototypeOf:function(){return r.target.prototype},observe:o.observe});c.proxiedObjects.set(r.target.prototype,a),c.proxies.add(a),r.proxy.prototype.constructor=r.proxy}return r.proxy},construct:function(e,t,n){var r,a;if(this.isClass){for(a in r=Reflect.construct(e,t,n),this.definitions)Object.defineProperty(r,a,this.definitions[a]);return this.options.observe(r)}for(a in r=Object.create(this.proxy.prototype),this.definitions)Object.defineProperty(r,a,this.definitions[a]);var i=this.options.observe(r);i[s.metaSymbol].preventSideEffects++;var o=e.apply(i,t);return i[s.metaSymbol].preventSideEffects--,o||i},apply:function(e,t,n){var r=this.target.apply(t,n);return this.options.observe(r)},proxyKeys:function(){return a}};n.exports=d}),define("can-observe/src/-type-helpers",["require","exports","module","can-queues","can-reflect","can-symbol"],function(e,t,n){"use strict";var a=e("can-queues"),r=e("can-reflect"),i=e("can-symbol"),o=i.for("can.meta"),s=i.for("can.typeDefinitions"),c=n.exports={ensureDefinition:function(e){var t=e[s];if(!t){var n=e[s];t=e[s]=Object.create(n||null)}return t},addMethodsAndSymbols:function(e){r.assignSymbols(e,{"can.defineInstanceKey":function(e,t){c.ensureDefinition(this.prototype)[e]=t},"can.dispatchInstanceBoundChange":function(e,t){var n=this[o];if(n){var r=n.lifecycleHandlers;r&&a.enqueueByQueue(r.getNode([]),this,[e,t])}}})},shouldRecordObservationOnAllKeysExceptFunctionsOnProto:function(e,t){return 0===t.preventSideEffects&&!e.isAccessor&&(e.targetHasOwnKey||!e.protoHasKey&&!Object.isSealed(t.target)||e.protoHasKey&&"function"!=typeof targetValue)}}}),define("can-observe/object/object",["require","exports","module","can-reflect","can-symbol","can-observe/src/-make-observe","can-event-queue/map/map","can-event-queue/type/type","can-observe/src/-helpers","can-observe/src/-make-object","can-observe/src/-observable-store","can-observe/src/-computed-helpers","can-observe/src/-type-helpers"],function(e,t,n){"use strict";var o=e("can-reflect"),r=e("can-symbol"),s=e("can-observe/src/-make-observe"),a=e("can-event-queue/map/map"),i=e("can-event-queue/type/type"),c=e("can-observe/src/-helpers"),u=e("can-observe/src/-make-object"),l=e("can-observe/src/-observable-store"),f=r.for("can.typeDefinitions"),d=e("can-observe/src/-computed-helpers"),p=e("can-observe/src/-type-helpers"),h=c.assignEverything({},u.proxyKeys());d.addKeyDependencies(h);var v=function(e){var t=Object.getPrototypeOf(this);d.ensureDefinition(t),p.ensureDefinition(t);var n=t[f]||{};for(var r in n)Object.defineProperty(this,r,n[r]);void 0!==e&&o.assign(this,e);var a=Object.create(h);a.constructor=this.constructor;var i=u.observable(this,{observe:s.observe,proxyKeys:a,shouldRecordObservation:p.shouldRecordObservationOnAllKeysExceptFunctionsOnProto});return l.proxiedObjects.set(this,i),l.proxies.add(i),i};a(v.prototype),i(v),d.addMethodsAndSymbols(v),p.addMethodsAndSymbols(v),v.extend=c.makeSimpleExtender(v),n.exports=v}),define("can-observe/array/array",["require","exports","module","can-symbol","can-observe/src/-make-array","can-observe/src/-make-observe","can-event-queue/map/map","can-event-queue/type/type","can-observe/src/-helpers","can-observe/src/-observable-store","can-observe/src/-computed-helpers","can-observe/src/-type-helpers"],function(e,t,n){"use strict";var r,a=e("can-symbol"),o=e("can-observe/src/-make-array"),s=e("can-observe/src/-make-observe"),i=e("can-event-queue/map/map"),c=e("can-event-queue/type/type"),u=e("can-observe/src/-helpers"),l=e("can-observe/src/-observable-store"),f=e("can-observe/src/-computed-helpers"),d=e("can-observe/src/-type-helpers"),p=a.for("can.typeDefinitions"),h=u.assignEverything({},o.proxyKeys());(r=function(e){var t=Object.getPrototypeOf(this);f.ensureDefinition(t),d.ensureDefinition(t);var n=t[p]||{};for(var r in n)Object.defineProperty(this,r,n[r]);this.push.apply(this,e||[]);var a=Object.create(h);a.constructor=this.constructor;var i=o.observable(this,{observe:s.observe,proxyKeys:a,shouldRecordObservation:d.shouldRecordObservationOnAllKeysExceptFunctionsOnProto});return l.proxiedObjects.set(this,i),l.proxies.add(i),i}).prototype=Object.create(Array.prototype),i(r.prototype),c(r),f.addMethodsAndSymbols(r),d.addMethodsAndSymbols(r),r.extend=u.makeSimpleExtender(r),n.exports=r}),define("can-observe/decorators/decorators",["require","exports","module","can-reflect","can-simple-observable/async/async","can-simple-observable/resolver/resolver","can-observe/src/-computed-helpers"],function(e,t,n){"use strict";var o=e("can-reflect"),s=e("can-simple-observable/async/async"),a=e("can-simple-observable/resolver/resolver"),r=e("can-observe/src/-computed-helpers");function c(e,t,n){r.ensureDefinition(e)[t]=n}function i(t){return function(e){return 3===arguments.length?t({}).apply(null,arguments):t(e)}}n.exports={async:i(function(i){return function(e,t,n){if(void 0!==n.get){var r=n.get;return c(e,t,function(e,t){return new s(function(e,t){if(!t)return i.default;var n=r.call(this,!0);return o.isPromise(n)?(n.then(t),i.default):void 0},e,i.default)})}if(void 0!==n.value){var a=n.value;return c(e,t,function(e,t){return new s(function(e,t){return a.call(this,t)},e,i.default)})}}}),resolver:i(function(e){return function(e,t,n){if(void 0!==n.value){var r=n.value;return c(e,t,function(e,t){return new a(r,e)})}}})}}),define("can-observe",["require","exports","module","can-observe/src/-make-object","can-observe/src/-make-array","can-observe/src/-make-function","can-observe/src/-make-observe","can-observe/object/object","can-observe/array/array","can-observe/src/-computed-helpers","can-observe/decorators/decorators"],function(e,t,n){"use strict";var r=e("can-observe/src/-make-object"),a=e("can-observe/src/-make-array"),i=e("can-observe/src/-make-function"),o=e("can-observe/src/-make-observe"),s=e("can-observe/object/object"),c=e("can-observe/array/array"),u=e("can-observe/src/-computed-helpers"),l=e("can-observe/decorators/decorators");for(var f in o.object=function(e){return r.observable(e,o)},o.array=function(e){return a.observable(e,o)},o.function=function(e){return i.observable(e,o)},o.observe.Object=s,o.observe.Array=c,n.exports=o.observe,n.exports.defineProperty=function(e,t,n){u.ensureDefinition(e)[t]=n},l)n.exports[f]=l[f]}),define("can/es/can-observe",["exports","can-observe"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-stream",["exports","can-stream"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-stream-kefir",["exports","can-stream-kefir"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-map-compat",["require","exports","module","can-key","can-reflect","can-log"],function(e,t,n){var i=e("can-key"),o=e("can-reflect"),s=e("can-log");function r(e,t){var n=e.prototype;if("function"==typeof n.attr)return e;var a=!0===t;return n.attr=function(e,t){a&&s.warn("can-map-compat is intended for migrating away from can-map. Remove all uses of .attr() to remove this warning.");var n=typeof e,r=arguments.length;return 0===r?o.unwrap(this):"string"!==n&&"number"!==n?(!0===t?o.updateDeep(this,e):o.assignDeep(this,e),this):1===r?i.get(this,e):(i.set(this,e,t),this)},n.removeAttr=function(e){var t=o.getKeyValue(this,e);return o.deleteKeyValue(this,e),t},e}(n.exports=function(e){return r(e,!0)}).makeCompat=r}),define("can/es/can-map-compat",["exports","can-map-compat"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-stache-converters",["require","exports","module","can-reflect","can-stache","can-string-to-any","can-log/dev/dev","can-stache-bindings","can-stache-helpers"],function(e,t,n){"use strict";var s=e("can-reflect"),r=e("can-stache"),a=e("can-string-to-any");e("can-log/dev/dev");e("can-stache-bindings");var i=e("can-stache-helpers"),o=!1;r("{{echo(args(1))}}")({echo:function(){},args:function(){o=1<arguments.length}}),r.registerConverter("boolean-to-inList",{get:function(e,t){return!!t&&-1!==t.indexOf(e)},set:function(e,t,n){if(n)if(e)n.push(t);else{var r=n.indexOf(t);-1!==r&&n.splice(r,1)}}});var c={"string-to-any":{get:function(e){return""+s.getValue(e)},set:function(e,t){var n=a(e);s.setValue(t,n)}},"index-to-selected":{get:function(e,t){var n=s.getValue(e);return s.getValue(t).indexOf(n)},set:function(e,t,n){var r=s.getValue(n)[e];s.setValue(t,r)}},"selected-to-index":{get:function(e,t){var n=s.getValue(e);return s.getValue(t)[n]},set:function(e,t,n){var r=s.getValue(n).indexOf(e);s.setValue(t,r)}},"either-or":{get:function(e,t,n){var r=s.getValue(e),a=s.getValue(t),i=s.getValue(n),o=a===r;return o||i===r?o:void 0},set:function(e,t,n,r){var a=e?s.getValue(n):s.getValue(r);s.setValue(t,a)}},equal:{get:function(){var e=s.toArray(arguments);if(o&&e.pop(),1<e.length){var t=s.getValue(e.pop());return e.every(function(e){return s.getValue(e)===t})}},set:function(){var e=s.toArray(arguments);if(o&&e.pop(),2<e.length){var t=e.shift(),n=s.getValue(e.pop());if(t)for(var r=0;r<e.length;r++)s.setValue(e[r],n)}}}};r.addConverter(c),i.not||r.addConverter("not",{get:function(e){return!s.getValue(e)},set:function(e,t){s.setValue(t,!e)}}),n.exports=c}),define("can/es/can-stache-converters",["exports","can-stache-converters"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-view-autorender",["require","exports","module","can-namespace","can-view-model","can-reflect","can-string","can-import-module","can-dom-events"],function(e,t,n){var r=e("can-namespace"),a=e("can-view-model"),o=e("can-reflect"),i=e("can-string").camelize,s=e("can-import-module"),c=e("can-dom-events"),u=/^(dataViewId|class|id|type|src|style)$/i,l=/\s*text\/(stache)\s*/;function f(e,t,n){var r=i(t);if(!u.test(r)){var a=e.getAttribute(t);o.hasKey(n,r)||o.defineInstanceKey(n.constructor,r,typeof a),o.setKeyValue(n,r,a)}}function d(e,t){e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t)}function p(e,t,n){var r=e(t);!function(e,t){for(;e.parentNode;)if((e=e.parentNode).nodeName.toLowerCase()===t.toLowerCase())return!0}(n,"head")?"script"===n.nodeName.toLowerCase()?d(n,r):(d(n,r),n.parentNode.removeChild(n)):document.body.appendChild(r)}function h(t){var n=a(t);return o.each(t.attributes||[],function(e){f(t,e.name,n)}),c.addEventListener(t,"attributes",function(e){f(t,e.attributeName,n)}),n}var v=new Promise(function(e,t){function n(){var i=[];o.each(document.querySelectorAll("[can-autorender]"),function(t,e){t.style.display="none";var n=t.innerHTML||t.text,r=t.getAttribute("type").match(l),a="can-"+(r&&r[1]);i.push(s(a).then(function(e){if(e.async)return e.async(n).then(function(e){p(e,h(t),t)});p(e(n),h(t),t)}))}),Promise.all(i).then(e,t)}"complete"===document.readyState?n():c.addEventListener(window,"load",n)});n.exports=r.autorender=function(e,t){return v.then(e,t)}}),define("can/es/can-view-autorender",["exports","can-view-autorender"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-super-model",["require","exports","module","can-connect","can-connect/constructor/constructor","can-connect/can/map/map","can-connect/can/ref/ref","can-connect/constructor/store/store","can-connect/data/callbacks/callbacks","can-connect/data/callbacks-cache/callbacks-cache","can-connect/data/combine-requests/combine-requests","can-connect/data/localstorage-cache/localstorage-cache","can-connect/data/parse/parse","can-connect/data/url/url","can-connect/fall-through-cache/fall-through-cache","can-connect/real-time/real-time","can-connect/constructor/callbacks-once/callbacks-once","can-namespace","can-reflect","can-query-logic"],function(e,t,n){var r=e("can-connect"),a=e("can-connect/constructor/constructor"),i=e("can-connect/can/map/map"),o=e("can-connect/can/ref/ref"),s=e("can-connect/constructor/store/store"),c=e("can-connect/data/callbacks/callbacks"),u=e("can-connect/data/callbacks-cache/callbacks-cache"),l=e("can-connect/data/combine-requests/combine-requests"),f=e("can-connect/data/localstorage-cache/localstorage-cache"),d=e("can-connect/data/parse/parse"),p=e("can-connect/data/url/url"),h=e("can-connect/fall-through-cache/fall-through-cache"),v=e("can-connect/real-time/real-time"),y=e("can-connect/constructor/callbacks-once/callbacks-once"),g=e("can-namespace"),m=e("can-reflect"),b=e("can-query-logic");n.exports=g.superModel=function(e){(e=m.assignDeep({},e)).name||(e.name=m.getName(e.Map)+".connection"),e.queryLogic||(e.queryLogic=new b(e.Map));var t=[a,i,o,s,c,l,d,p,v,y];return"undefined"!=typeof localStorage&&(e.cacheConnection||(e.cacheConnection=r([f],{name:e.name+".cacheConnection",idProp:e.idProp,queryLogic:e.queryLogic})),t.push(u,h)),r(t,e)}}),define("can/es/can-super-model",["exports","can-super-model"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-connect-feathers/service/service",["require","exports","module","can-connect"],function(e,t,n){"use strict";var r=e("can-connect");function a(e){var t,n=e.algebra&&e.algebra.clauses&&e.algebra.clauses.id;if(n&&(t=Object.keys(n)[0]),!t&&!e.idProp)throw new Error("An idProp was not set in the Model for "+e+". Things may not work as expected.");return t||e.idProp}n.exports=r.behavior("data/feathers-service",function(e){if(!this.feathersService)throw new Error("You must provide a feathersService to the feathers-service behavior: https://canjs.com/doc/can-connect-feathers.html");var r=this.feathersService;return{init:function(){e.init.apply(this,arguments);var t=this;r.on("created",function(e){t.createInstance(e)}),r.on("updated",function(e){t.updateInstance(e)}),r.on("patched",function(e){t.updateInstance(e)}),r.on("removed",function(e){t.destroyInstance(e)})},getListData:function(e){return r.find({query:e})},getData:function(e){var t=null,n=a(this);return"string"==typeof e||"number"==typeof e?(t=e,e={}):e&&void 0!==e[n]&&(t=e[n],delete e[n]),r.get(t,{query:e})},createData:function(e){return r.create(e)},updateData:function(e){var t=a(this);return r.update(e[t],e)},destroyData:function(e){var t=a(this);return r.remove(e[t])}}})}),define("ms",function(e,t,n){var r=864e5;function a(e,t,n,r){var a=1.5*n<=t;return Math.round(e/n)+" "+r+(a?"s":"")}n.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&0<e.length)return function(e){if(100<(e=String(e)).length)return;var t=/^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"weeks":case"week":case"w":return 6048e5*n;case"days":case"day":case"d":return n*r;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*n;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*n;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}(e);if("number"===n&&!1===isNaN(e))return t.long?function(e){var t=Math.abs(e);if(r<=t)return a(e,t,r,"day");if(36e5<=t)return a(e,t,36e5,"hour");if(6e4<=t)return a(e,t,6e4,"minute");if(1e3<=t)return a(e,t,1e3,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(r<=t)return Math.round(e/r)+"d";if(36e5<=t)return Math.round(e/36e5)+"h";if(6e4<=t)return Math.round(e/6e4)+"m";if(1e3<=t)return Math.round(e/1e3)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}),define("debug/src/common",["require","exports","module","ms"],function(e,t,n){"use strict";n.exports=function(t){function n(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return u.colors[Math.abs(t)%u.colors.length]}function u(e){var s;function c(){if(c.enabled){for(var e=arguments.length,a=new Array(e),t=0;t<e;t++)a[t]=arguments[t];var i=c,n=Number(new Date),r=n-(s||n);i.diff=r,i.prev=s,i.curr=n,s=n,a[0]=u.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var o=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(e,t){if("%%"===e)return e;o++;var n=u.formatters[t];if("function"==typeof n){var r=a[o];e=n.call(i,r),a.splice(o,1),o--}return e}),u.formatArgs.call(i,a),(i.log||u.log).apply(i,a)}}return c.namespace=e,c.enabled=u.enabled(e),c.useColors=u.useColors(),c.color=n(e),c.destroy=r,c.extend=a,"function"==typeof u.init&&u.init(c),u.instances.push(c),c}function r(){var e=u.instances.indexOf(this);return-1!==e&&(u.instances.splice(e,1),!0)}function a(e,t){return u(this.namespace+(void 0===t?":":t)+e)}return((u.debug=u).default=u).coerce=function(e){return e instanceof Error?e.stack||e.message:e},u.disable=function(){u.enable("")},u.enable=function(e){var t;u.save(e),u.names=[],u.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length;for(t=0;t<r;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?u.skips.push(new RegExp("^"+e.substr(1)+"$")):u.names.push(new RegExp("^"+e+"$")));for(t=0;t<u.instances.length;t++){var a=u.instances[t];a.enabled=u.enabled(a.namespace)}},u.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=u.skips.length;t<n;t++)if(u.skips[t].test(e))return!1;for(t=0,n=u.names.length;t<n;t++)if(u.names[t].test(e))return!0;return!1},u.humanize=e("ms"),Object.keys(t).forEach(function(e){u[e]=t[e]}),u.instances=[],u.names=[],u.skips=[],u.formatters={},u.selectColor=n,u.enable(u.load()),u}}),define("debug",["require","exports","module","debug/src/common"],function(e,t,n){!function(e,t,n,a){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.log=function(){var e;return"object"===("undefined"==typeof console?"undefined":r(console))&&console.log&&(e=console).log.apply(e,arguments)},n.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+a.exports.humanize(this.diff),!this.useColors)return;var t="color: "+this.color;e.splice(1,0,t,"color: inherit");var n=0,r=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(n++,"%c"===e&&(r=n))}),e.splice(r,0,t)},n.save=function(e){try{e?n.storage.setItem("debug",e):n.storage.removeItem("debug")}catch(e){}},n.load=function(){var e;try{e=n.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},n.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},n.storage=function(){try{return localStorage}catch(e){}}(),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],a.exports=t("debug/src/common")(n),a.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(0,e,t,n)}),define("feathers-errors",["require","exports","module","debug"],function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=e("debug")("feathers-errors");function l(e,t,n,r,a){var i=void 0,o=void 0,s=void 0;(e=e||"Error")instanceof Error?(o=e.message||"Error",e.errors&&(i=e.errors)):"object"===(void 0===e?"undefined":c(e))?(o=e.message||"Error",a=e):o=e,a&&((s=JSON.parse(JSON.stringify(a))).errors?(i=s.errors,delete s.errors):a.errors&&(i=JSON.parse(JSON.stringify(a.errors)))),this.type="FeathersError",this.name=t,this.message=o,this.code=n,this.className=r,this.data=s,this.errors=i||{},u(this.name+"("+this.code+"): "+this.message),u(this.errors),Error.captureStackTrace?Error.captureStackTrace(this,l):this.stack=(new Error).stack}function a(e,t){l.call(this,e,"BadRequest",400,"bad-request",t)}function i(e,t){l.call(this,e,"NotAuthenticated",401,"not-authenticated",t)}function o(e,t){l.call(this,e,"PaymentError",402,"payment-error",t)}function s(e,t){l.call(this,e,"Forbidden",403,"forbidden",t)}function f(e,t){l.call(this,e,"NotFound",404,"not-found",t)}function d(e,t){l.call(this,e,"MethodNotAllowed",405,"method-not-allowed",t)}function p(e,t){l.call(this,e,"NotAcceptable",406,"not-acceptable",t)}function h(e,t){l.call(this,e,"Timeout",408,"timeout",t)}function v(e,t){l.call(this,e,"Conflict",409,"conflict",t)}function y(e,t){l.call(this,e,"LengthRequired",411,"length-required",t)}function g(e,t){l.call(this,e,"Unprocessable",422,"unprocessable",t)}function m(e,t){l.call(this,e,"TooManyRequests",429,"too-many-requests",t)}function b(e,t){l.call(this,e,"GeneralError",500,"general-error",t)}function w(e,t){l.call(this,e,"NotImplemented",501,"not-implemented",t)}function x(e,t){l.call(this,e,"BadGateway",502,"bad-gateway",t)}function _(e,t){l.call(this,e,"Unavailable",503,"unavailable",t)}l.prototype=Object.create(Error.prototype),Object.defineProperty(l.prototype,"toJSON",{value:function(){return{name:this.name,message:this.message,code:this.code,className:this.className,data:this.data,errors:this.errors}}}),a.prototype=l.prototype,i.prototype=l.prototype,o.prototype=l.prototype,s.prototype=l.prototype,f.prototype=l.prototype,d.prototype=l.prototype,p.prototype=l.prototype,h.prototype=l.prototype,v.prototype=l.prototype,y.prototype=l.prototype,g.prototype=l.prototype,m.prototype=l.prototype,b.prototype=l.prototype,w.prototype=l.prototype,x.prototype=l.prototype,_.prototype=l.prototype;var k={FeathersError:l,BadRequest:a,NotAuthenticated:i,PaymentError:o,Forbidden:s,NotFound:f,MethodNotAllowed:d,NotAcceptable:p,Timeout:h,Conflict:v,LengthRequired:y,Unprocessable:g,TooManyRequests:m,GeneralError:b,NotImplemented:w,BadGateway:x,Unavailable:_,400:a,401:i,402:o,403:s,404:f,405:d,406:p,408:h,409:v,411:y,422:g,429:m,500:b,501:w,502:x,503:_};t.default=r({convert:function(e){if(!e)return e;var t=k[e.name],n=t?new t(e.message,e.data):new Error(e.message||e);return"object"===(void 0===e?"undefined":c(e))&&r(n,e),n},types:k,errors:k},k),n.exports=t.default}),define("events",function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function c(e){return"function"==typeof e}function u(e){return"object"==typeof e&&null!==e}function l(e){return void 0===e}((n.exports=r).EventEmitter=r).prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,a,i,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||u(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var s=new Error('Uncaught, unspecified "error" event. ('+t+")");throw s.context=t,s}if(l(n=this._events[e]))return!1;if(c(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(u(n))for(a=Array.prototype.slice.call(arguments,1),r=(o=n.slice()).length,i=0;i<r;i++)o[i].apply(this,a);return!0},r.prototype.on=r.prototype.addListener=function(e,t){var n;if(!c(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,c(t.listener)?t.listener:t),this._events[e]?u(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,u(this._events[e])&&!this._events[e].warned&&(n=l(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&0<n&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.once=function(e,t){if(!c(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,a,i;if(!c(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(n=this._events[e]).length,r=-1,n===t||c(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(u(n)){for(i=a;0<i--;)if(n[i]===t||n[i].listener&&n[i].listener===t){r=i;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(c(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?c(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(c(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}}),define("feathers-authentication-popups",["require","exports","module","events"],function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.authAgent=void 0,t.default=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=t.width||1024,r=t.height||640,a=c(window,n,r),i=a.top,o=a.left,s="width="+n+", height="+r+", top="+i+", left="+o;return window.open(e,"authWindow",s)},t.getCenterCoordinates=c;var r,a=e("events"),i=(r=a)&&r.__esModule?r:{default:r};window.authAgent=new i.default;t.authAgent=window.authAgent;function c(e,t,n){return{left:e.screenX+(e.outerWidth-t)/2,top:e.screenY+(e.outerHeight-n)/2}}}),define("jwt-decode/lib/atob",function(e,t,n){function s(e){this.message=e}(s.prototype=new Error).name="InvalidCharacterError",n.exports="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new s("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,a=0,i=0,o="";r=t.charAt(i++);~r&&(n=a%4?64*n+r:r,a++%4)?o+=String.fromCharCode(255&n>>(-2*a&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return o}}),define("jwt-decode/lib/base64_url_decode",["require","exports","module","jwt-decode/lib/atob"],function(e,t,n){var r=e("jwt-decode/lib/atob");n.exports=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(r(t).replace(/(.)/g,function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(e){return r(t)}}}),define("jwt-decode",["require","exports","module","jwt-decode/lib/base64_url_decode"],function(e,t,n){"use strict";var r=e("jwt-decode/lib/base64_url_decode");function a(e){this.message=e}(a.prototype=new Error).name="InvalidTokenError",n.exports=function(e,t){if("string"!=typeof e)throw new a("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(r(e.split(".")[n]))}catch(e){throw new a("Invalid token specified: "+e.message)}},n.exports.InvalidTokenError=a}),define("can-connect-feathers/utils/utils",["require","exports","module","jwt-decode","can-assign"],function(e,t,n){"use strict";var r=e("jwt-decode"),a=e("can-assign");function i(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var a=n[r];" "===a.charAt(0);)a=a.substring(1,a.length);if(0===a.indexOf(t))return a.substring(t.length,a.length)}return null}function o(e){var t=i(e);return!t&&(window&&window.localStorage||window.sessionStorage)&&(t=window.sessionStorage.getItem(e)||window.localStorage.getItem(e)),t}function s(e){return e&&1e3*e.exp>(new Date).getTime()}n.exports={readCookie:i,getStoredToken:o,hasValidToken:function(e){var t=o(e);if(t)try{return s(r(t))}catch(e){return!1}return!1},payloadIsValid:s,convertLocalAuthData:function(e){var t=a({},e);return t&&"local"===t.strategy&&t.user&&(Object.keys(t.user).forEach(function(e){t[e]=t.user[e]}),delete t.user),t}}}),define("can-connect-feathers/session/storage",function(e,t,n){"use strict";n.exports={data:{},getStore:function(){if(window.doneSsr){var e=window.CanZone||void 0;return void 0===e?this.data:e.current.data}return this.data},setItem:function(e,t){this.getStore()[e]=t},getItem:function(e){return this.getStore()[e]},removeItem:function(e){delete this.getStore()[e]}}}),define("can-connect-feathers/session/session",["require","exports","module","can-connect","feathers-errors","feathers-authentication-popups","jwt-decode","can-connect-feathers/utils/utils","can-connect-feathers/utils/utils","can-connect-feathers/utils/utils","can-observation-recorder","can-connect-feathers/session/storage"],function(e,t,n){"use strict";var r=e("can-connect"),i=e("feathers-errors"),o=e("feathers-authentication-popups").authAgent,s=e("jwt-decode"),c=e("can-connect-feathers/utils/utils").payloadIsValid,u=e("can-connect-feathers/utils/utils").hasValidToken,l=e("can-connect-feathers/utils/utils").convertLocalAuthData,f=e("can-observation-recorder"),d=e("can-connect-feathers/session/storage");n.exports=r.behavior("data/feathers-session",function(e){var t="https://canjs.com/doc/can-connect-feathers.html",r=this.feathersClient;if(!r)throw new Error("You must provide a feathersClient instance to the feathers-session behavior. See "+t);if(!this.Map)throw new Error("You must provide a Map instance to the feathers-session behavior. See "+t);if(!r.passport)throw new Error("You must register the feathers-authentication-client plugin before using the feathers-session behavior. See "+t);var a=r.passport.options,n=this.Map;return Object.defineProperty(n,"current",{get:function(){return f.add(n,"current"),void 0===d.getItem("can-connect-feathers-session")&&(d.removeItem("can-connect-feathers-session"),n.get().then(function(e){d.setItem("can-connect-feathers-session",e),n.dispatch("current",[e])}).catch(function(e){if(d.setItem("can-connect-feathers-session",null),n.dispatch("current",[null]),!e.className||e.className.indexOf("not-authenticated")<0)return Promise.reject(e)})),d.getItem("can-connect-feathers-session")}}),n.on("created",function(e,t){d.setItem("can-connect-feathers-session",t),n.dispatch("current",[t])}),n.on("destroyed",function(){d.removeItem("can-connect-feathers-session"),n.dispatch("current",[void 0,d.getItem("can-connect-feathers-session")])}),{init:function(){e.init.apply(this,arguments);var n=this;o.on("login",function(e){try{var t=s(e);if(!c(t))throw new Error("invalid token")}catch(e){throw new Error("An invalid token was received through the feathers-authentication-popups authAgent")}r.authenticate({strategy:"jwt",accessToken:e}).then(function(e){var t=s(e.accessToken);n.createInstance(t)})})},createData:function(e){var t=l(e);return r.authenticate(t).then(function(e){return e.accessToken&&Object.assign(e,s(e.accessToken)),e})},getData:function(){return new Promise(function(n,e){var t=a.tokenKey||a.cookie;u(t)&&!window.doneSsr?r.authenticate().then(function(e){var t=s(e.accessToken);return n(t)}).catch(e):e(new i.NotAuthenticated("Not Authenticated"))})},destroyData:function(e){return r.logout().then(function(){return e})}}})}),define("can-connect-feathers",["require","exports","module","can-connect-feathers/service/service","can-connect-feathers/session/session"],function(e,t,n){"use strict";n.exports={service:e("can-connect-feathers/service/service"),session:e("can-connect-feathers/session/session")}}),define("can/es/can-connect-feathers",["exports","can-connect-feathers"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-connect-tag",["require","exports","module","can-stache-bindings","can-observation","can-stache/src/expression","can-view-callbacks","can-observation-recorder","can-view-nodelist","can-reflect","can-symbol","can-dom-mutate","can-dom-mutate/node","can-reflect","can-namespace"],function(e,t,n){e("can-stache-bindings");var g=e("can-observation"),m=e("can-stache/src/expression"),r=e("can-view-callbacks"),b=e("can-observation-recorder"),w=e("can-view-nodelist"),x=e("can-reflect"),_=e("can-symbol"),k=e("can-dom-mutate"),O=e("can-dom-mutate/node"),E=e("can-reflect").each,a=e("can-namespace"),L=function(e){return"function"==typeof e?L(e()):e};n.exports=a.connectTag=function(e,y){r.tag(e,function(e,r){var t,n,a,i=e.getAttribute("getList")||e.getAttribute("get-list"),o=e.getAttribute("get"),s=i||o,c=i?"getList":"get",u=m.parse("tmp("+(n=n||"{",a=a||"}",(t=s)[0]===n&&t[t.length-1]===a?t.substr(1,t.length-2):t)+")",{baseMethodType:"Call"}),l=!1,f=b.ignore(function(e,t){if(!l){var n=r.scope.peek("%root")||r.scope.peek("@root");n&&n.pageData&&("get"===c&&(e=y.id(e)),n.pageData(y.name,e,t))}l=!0}),d=new g(function(){var n={};if("object"==typeof u.hash)E(u.hash,function(e,t){e&&e.hasOwnProperty("get")?n[t]=r.scope.read(e.get,{}).value:n[t]=e});else if("function"==typeof u.hash){var e=u.hash(r.scope,r.options,{});E(e(),function(e,t){n[t]=L(e)})}else n=u.argExprs.length?x.getValue(u.argExprs[0].value(r.scope,r.options)):{};var t=y[c](n);return f(n,t),t});e[_.for("can.viewModel")]=d;var p=w.register([],void 0,r.parentNodeList||!0),h=r.subtemplate?r.subtemplate(r.scope.add(d),r.options,p):document.createDocumentFragment();O.appendChild.call(e,h),w.update(p,e.childNodes);var v=k.onNodeRemoval(e,function(){e.ownerDocument.contains(e)||(v(),w.unregister(p))})})}}),define("can/es/can-connect-tag",["exports","can-connect-tag"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-fixture-socket/src/store",["require","exports","module","can-fixture/core"],function(e,t,n){var r=e("can-fixture/core").extractResponse;function a(n){return function(e,t){n({data:e},function(){var e=r.apply(null,arguments);200===e[0]?t(null,e[1]):t(e[1])})}}n.exports={requestHandlerToListener:a,storeToListeners:function(n){return["getListData","getData","updateData","createData","destroyData"].reduce(function(e,t){return e[t]=a(n[t]),e},{})}}}),define("can-fixture-socket/src/feathers-client",["require","exports","module","can-fixture-socket/src/store","can-assign"],function(e,t,n){var f=e("can-fixture-socket/src/store").storeToListeners,d=e("can-assign");function p(r,a,i){return function(e){var n,t=Array.prototype.slice.call(arguments);"function"==typeof t[t.length-1]&&(n=t[t.length-1]),e=a?a(e):e,r(e,function(e,t){e?n&&n(e):(t=i?i(t):t,n&&n(null,t))})}}function h(n){return function(e){var t={};return t[n&&n.id||"id"]=e,t}}function v(e){return{total:e.count,limit:e.limit,skip:e.offset,data:e.data}}n.exports={subscribeFeathersStoreToServer:function(e,t,n,r){var i,o,s,a,c,u,l=f(t);n.on(e+"::find",p(l.getListData,null,v)),n.on(e+"::get",p(l.getData,h(r),null)),n.on(e+"::remove",(i=l.getData,o=l.destroyData,s=r,function(e,t,r){var a=h(s)(e);i(a,function(e,n){e?r(e):o(a,function(e,t){e?r(e):r(null,n)})})})),n.on(e+"::create",(a=l.createData,function(n,e,r){a(n,function(e,t){e?r(e):r(null,d(n,t))})})),n.on(e+"::update",(c=l.updateData,u=r,function(e,n,t,r){var a=h(u)(e);c(d(a,n),function(e,t){e?r(e):r(null,d(a,d(n,t)))})}))}}}),define("can-fixture-socket/src/index",["require","exports","module","can-fixture-socket/src/feathers-client"],function(e,t,n){var r=e("can-fixture-socket/src/feathers-client").subscribeFeathersStoreToServer,a=function(e){this.io=e,this.events={},this.subscribers={},l(e.managers),this.origs=c(e.Manager.prototype,this)};a.prototype.on=function(e,t){var n=this,r={};"string"==typeof e&&(r[e]=t),"object"==typeof e&&(r=e),Object.keys(r).forEach(function(e){s(n.events,e,r[e])})},a.prototype.emit=function(e){var t=Array.prototype.slice.call(arguments,1);o(this.subscribers,e,t)},a.prototype.onFeathersService=function(e,t,n){r(e,t,this,n)},a.prototype.restore=function(){u(this.io.Manager.prototype,this.origs),l(this.io.managers)};var i=function(e){this._server=e,this.io={engine:this}};function o(e,t,n){d(" >>> pub "+t),(e[t]||[]).forEach(function(e){e.apply(null,n)})}function s(e,t,n){d(" <<< sub "+t),e[t]||(e[t]=[]),e[t].push(n)}function c(t,n){var e=["open","socket"].map(function(e){return{name:e,method:t[e]}});return t.open=t.connect=function(){d("MockedManager.prototype.open or connect ... arguments:",arguments),setTimeout(function(){o(n.subscribers,"connect"),o(n.events,"connection")},0)},t.socket=function(){d("MockedManager.prototype.socket ...");var e=new i(n);return e.connected=!0,e.disconnected=!1,e},e}function u(t,e){d("Restore."),e.forEach(function(e){t[e.name]=e.method})}function l(e){for(var t in e)e.hasOwnProperty(t)&&delete e[t]}var f=!(i.prototype={on:function(e,t){d("MockedSocket.on ... "+e),s(this._server.subscribers,e,t)},emit:function(e){var t=Array.prototype.slice.call(arguments,1);d("MockedSocket.emit ..."+e),o(this._server.events,e,t)},once:function(){d("MockedSocket.once ...")},off:function(e,t){var n,r,a;d("MockedSocket.off ... "+e),n=this._server.subscribers,a=t,d(" <<< unsub "+(r=e)),n[r].forEach(function(e,t){e===a&&n[r].splice(t,1)})},open:function(){return this.connect()},connect:function(){this.connected=!0,this.disconnected=!1},close:function(){return this.disconnect()},disconnect:function(){this.connected=!1,this.disconnected=!0}});function d(e,t){f&&console.log.apply(console,arguments)}n.exports={Server:a,mockSocketManager:c,restoreManager:u}}),define("can-fixture-socket",["require","exports","module","can-fixture-socket/src/index","can-fixture-socket/src/store"],function(e,t,n){var r=e("can-fixture-socket/src/index"),a=e("can-fixture-socket/src/store");n.exports={Server:r.Server,requestHandlerToListener:a.requestHandlerToListener,storeToListeners:a.storeToListeners}}),define("can/es/can-fixture-socket",["exports","can-fixture-socket"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-ndjson-stream",["require","exports","module","can-namespace"],function(e,t,n){"use strict";var r=e("can-namespace");n.exports=r.ndjsonStream=function(e){var t,d=!1;return new ReadableStream({start:function(c){var u=e.getReader();t=u;var l=new TextDecoder,f="";u.read().then(function e(t){if(!t.done){for(var n=l.decode(t.value,{stream:!0}),r=(f+=n).split("\n"),a=0;a<r.length-1;++a){var i=r[a].trim();if(0<i.length)try{var o=JSON.parse(i);c.enqueue(o)}catch(e){return c.error(e),d=!0,void u.cancel()}}return f=r[r.length-1],u.read().then(e)}if(!d){if(0!==(f=f.trim()).length)try{var s=JSON.parse(f);c.enqueue(s)}catch(e){return void c.error(e)}c.close()}})},cancel:function(e){console.log("Cancel registered due to ",e),d=!0,t.cancel()}})}}),define("can/es/can-ndjson-stream",["exports","can-ndjson-stream"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-connect-ndjson",["require","exports","module","can-connect","can-connect/helpers/sorted-set-json","can-ndjson-stream","can-reflect","can-namespace"],function(e,t,n){var r,a,i,o,s,c,u,l;a=n,i=(r=e)("can-connect"),o=r("can-connect/helpers/sorted-set-json"),s=r("can-ndjson-stream"),c=r("can-reflect"),u=r("can-namespace"),l=i.behavior("data-ndjson",function(a){try{if(new ReadableStream,"function"!=typeof window.fetch)throw new Error("fetch not supported")}catch(e){return{}}return{hydrateList:function(e,t){t=t||this.listSet(e);var n=o(t),r=a.hydrateList.call(this,e,t);return this._getHydrateListCallbacks[n]&&(this._getHydrateListCallbacks[n].shift()(r),this._getHydrateListCallbacks[n].length||delete this._getHydrateListCallbacks[n]),r},_getHydrateListCallbacks:{},_getHydrateList:function(e,t){var n=o(e);this._getHydrateListCallbacks[n]||(this._getHydrateListCallbacks[n]=[]),this._getHydrateListCallbacks[n].push(t)},getListData:function(e){var t=fetch(this.ndjson||this.url);return this._getHydrateList(e,function(r){function a(e){c.setKeyValue(r,"isStreaming",!1),c.setKeyValue(r,"streamError",e)}t.then(function(e){return c.setKeyValue(r,"isStreaming",!0),s(e.body)}).then(function(e){var n=e.getReader();n.read().then(function e(t){t.done?c.setKeyValue(r,"isStreaming",!1):(r.push(t.value),n.read().then(e,a))},a)})}),t.then(function(){return{data:[]}})}}}),a.exports=u.connectNdjson=l}),define("can/es/can-connect-ndjson",["exports","can-connect-ndjson"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-route-mock",["require","exports","module","can-simple-observable","can-reflect"],function(e,t,n){var r=e("can-simple-observable"),a=e("can-reflect");function i(){this.routeValue=new r("")}a.assignMap(i.prototype,{paramsMatcher:/^(?:&[^=]+=[^&]*)+/,querySeparator:"&",matchSlashes:!1,root:"#!",get:function(){return this.value},set:function(e){return this.value=e},on:function(e){a.onValue(this,e)},off:function(e){a.offValue(this,e)}}),Object.defineProperty(i.prototype,"value",{get:function(){return this.routeValue.get().split(/#!?/)[1]||""},set:function(e){return"#"!==e[0]?this.routeValue.set("#"+(e||"")):this.routeValue.set(e||""),e}}),a.assignSymbols(i.prototype,{"can.onValue":function(e){this.routeValue.on(e)},"can.offValue":function(e){this.routeValue.off(e)},"can.getValue":function(){return this.value},"can.setValue":function(e){this.value=e}}),n.exports=i}),define("can/es/can-route-mock",["exports","can-route-mock"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),function(e,t,n){"use strict";var o=function(e,t,n){n=f.extend({},f.options,n);var r,a,i=f.runValidations(e,t,n);for(r in i)for(a in i[r])if(f.isPromise(i[r][a]))throw new Error("Use validate.async if you want support for promises");return o.processValidationResults(i,n)},f=o;f.extend=function(n){return[].slice.call(arguments,1).forEach(function(e){for(var t in e)n[t]=e[t]}),n},f.extend(o,{version:{major:0,minor:11,patch:1,metadata:null,toString:function(){var e=f.format("%{major}.%{minor}.%{patch}",f.version);return f.isEmpty(f.version.metadata)||(e+="+"+f.version.metadata),e}},Promise:"undefined"!=typeof Promise?Promise:null,EMPTY_STRING_REGEXP:/^\s*$/,runValidations:function(e,t,n){var r,a,i,o,s,c,u,l=[];for(r in(f.isDomElement(e)||f.isJqueryElement(e))&&(e=f.collectFormValues(e)),t)for(a in i=f.getDeepObjectValue(e,r),o=f.result(t[r],i,e,r,n,t)){if(!(s=f.validators[a]))throw u=f.format("Unknown validator %{name}",{name:a}),new Error(u);c=o[a],(c=f.result(c,i,e,r,n,t))&&l.push({attribute:r,value:i,validator:a,globalOptions:n,attributes:e,options:c,error:s.call(s,i,c,r,e,n)})}return l},processValidationResults:function(e,t){e=f.pruneEmptyErrors(e,t),e=f.expandMultipleErrors(e,t),e=f.convertErrorMessages(e,t);var n=t.format||"grouped";if("function"!=typeof f.formatters[n])throw new Error(f.format("Unknown format %{format}",t));return e=f.formatters[n](e),f.isEmpty(e)?void 0:e},async:function(r,a,i){var o=(i=f.extend({},f.async.options,i)).wrapErrors||function(e){return e};!1!==i.cleanAttributes&&(r=f.cleanAttributes(r,a));var s=f.runValidations(r,a,i);return new f.Promise(function(t,n){f.waitForResults(s).then(function(){var e=f.processValidationResults(s,i);e?n(new o(e,i,r,a)):t(r)},function(e){n(e)})})},single:function(e,t,n){return n=f.extend({},f.single.options,n,{format:"flat",fullMessages:!1}),f({single:e},{single:t},n)},waitForResults:function(e){return e.reduce(function(e,t){return f.isPromise(t.error)?e.then(function(){return t.error.then(function(e){t.error=e||null})}):e},new f.Promise(function(e){e()}))},result:function(e){var t=[].slice.call(arguments,1);return"function"==typeof e&&(e=e.apply(null,t)),e},isNumber:function(e){return"number"==typeof e&&!isNaN(e)},isFunction:function(e){return"function"==typeof e},isInteger:function(e){return f.isNumber(e)&&e%1==0},isBoolean:function(e){return"boolean"==typeof e},isObject:function(e){return e===Object(e)},isDate:function(e){return e instanceof Date},isDefined:function(e){return null!=e},isPromise:function(e){return!!e&&f.isFunction(e.then)},isJqueryElement:function(e){return e&&f.isString(e.jquery)},isDomElement:function(e){return!!e&&(!(!e.querySelectorAll||!e.querySelector)&&(!(!f.isObject(document)||e!==document)||("object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)))},isEmpty:function(e){var t;if(!f.isDefined(e))return!0;if(f.isFunction(e))return!1;if(f.isString(e))return f.EMPTY_STRING_REGEXP.test(e);if(f.isArray(e))return 0===e.length;if(f.isDate(e))return!1;if(f.isObject(e)){for(t in e)return!1;return!0}return!1},format:f.extend(function(e,r){return f.isString(e)?e.replace(f.format.FORMAT_REGEXP,function(e,t,n){return"%"===t?"%{"+n+"}":String(r[n])}):e},{FORMAT_REGEXP:/(%?)%\{([^\}]+)\}/g}),prettify:function(e){return f.isNumber(e)?100*e%1==0?""+e:parseFloat(Math.round(100*e)/100).toFixed(2):f.isArray(e)?e.map(function(e){return f.prettify(e)}).join(", "):f.isObject(e)?e.toString():(e=""+e).replace(/([^\s])\.([^\s])/g,"$1 $2").replace(/\\+/g,"").replace(/[_-]/g," ").replace(/([a-z])([A-Z])/g,function(e,t,n){return t+" "+n.toLowerCase()}).toLowerCase()},stringifyValue:function(e){return f.prettify(e)},isString:function(e){return"string"==typeof e},isArray:function(e){return"[object Array]"==={}.toString.call(e)},isHash:function(e){return f.isObject(e)&&!f.isArray(e)&&!f.isFunction(e)},contains:function(e,t){return!!f.isDefined(e)&&(f.isArray(e)?-1!==e.indexOf(t):t in e)},unique:function(e){return f.isArray(e)?e.filter(function(e,t,n){return n.indexOf(e)==t}):e},forEachKeyInKeypath:function(e,t,n){if(f.isString(t)){var r,a="",i=!1;for(r=0;r<t.length;++r)switch(t[r]){case".":i?(i=!1,a+="."):(e=n(e,a,!1),a="");break;case"\\":i?(i=!1,a+="\\"):i=!0;break;default:i=!1,a+=t[r]}return n(e,a,!0)}},getDeepObjectValue:function(e,t){if(f.isObject(e))return f.forEachKeyInKeypath(e,t,function(e,t){if(f.isObject(e))return e[t]})},collectFormValues:function(e,t){var n,r,a,i,o,s,c={};if(f.isJqueryElement(e)&&(e=e[0]),!e)return c;for(t=t||{},i=e.querySelectorAll("input[name], textarea[name]"),n=0;n<i.length;++n)a=i.item(n),f.isDefined(a.getAttribute("data-ignored"))||(s=f.sanitizeFormValue(a.value,t),"number"===a.type?s=s?+s:null:"checkbox"===a.type?a.attributes.value?a.checked||(s=c[a.name]||null):s=a.checked:"radio"===a.type&&(a.checked||(s=c[a.name]||null)),c[a.name]=s);for(i=e.querySelectorAll("select[name]"),n=0;n<i.length;++n){if((a=i.item(n)).multiple)for(r in s=[],a.options)(o=a.options[r]).selected&&s.push(f.sanitizeFormValue(o.value,t));else s=f.sanitizeFormValue(a.options[a.selectedIndex].value,t);c[a.name]=s}return c},sanitizeFormValue:function(e,t){return t.trim&&f.isString(e)&&(e=e.trim()),!1!==t.nullify&&""===e?null:e},capitalize:function(e){return f.isString(e)?e[0].toUpperCase()+e.slice(1):e},pruneEmptyErrors:function(e){return e.filter(function(e){return!f.isEmpty(e.error)})},expandMultipleErrors:function(e){var n=[];return e.forEach(function(t){f.isArray(t.error)?t.error.forEach(function(e){n.push(f.extend({},t,{error:e}))}):n.push(t)}),n},convertErrorMessages:function(e,n){n=n||{};var r=[];return e.forEach(function(e){var t=f.result(e.error,e.value,e.attribute,e.options,e.attributes,e.globalOptions);f.isString(t)?("^"===t[0]?t=t.slice(1):!1!==n.fullMessages&&(t=f.capitalize(f.prettify(e.attribute))+" "+t),t=t.replace(/\\\^/g,"^"),t=f.format(t,{value:f.stringifyValue(e.value)}),r.push(f.extend({},e,{error:t}))):r.push(e)}),r},groupErrorsByAttribute:function(e){var n={};return e.forEach(function(e){var t=n[e.attribute];t?t.push(e):n[e.attribute]=[e]}),n},flattenErrorsToArray:function(e){return e.map(function(e){return e.error}).filter(function(e,t,n){return n.indexOf(e)===t})},cleanAttributes:function(e,t){function r(e,t,n){return f.isObject(e[t])?e[t]:e[t]=!!n||{}}return f.isObject(t)&&f.isObject(e)?function e(t,n){if(!f.isObject(t))return t;var r,a,i=f.extend({},t);for(a in t)r=n[a],f.isObject(r)?i[a]=e(i[a],r):r||delete i[a];return i}(e,t=function(e){var t,n={};for(t in e)e[t]&&f.forEachKeyInKeypath(n,t,r);return n}(t)):{}},exposeModule:function(e,t,n,r,a){n?(r&&r.exports&&(n=r.exports=e),n.validate=e):(t.validate=e).isFunction(a)&&a.amd&&a("validate.js",[],function(){return e})},warn:function(e){"undefined"!=typeof console&&console.warn&&console.warn("[validate.js] "+e)},error:function(e){"undefined"!=typeof console&&console.error&&console.error("[validate.js] "+e)}}),o.validators={presence:function(e,t){if((t=f.extend({},this.options,t)).allowEmpty?!f.isDefined(e):f.isEmpty(e))return t.message||this.message||"can't be blank"},length:function(e,t,n){if(f.isDefined(e)){var r,a=(t=f.extend({},this.options,t)).is,i=t.maximum,o=t.minimum,s=[],c=(e=(t.tokenizer||function(e){return e})(e)).length;return f.isNumber(c)?(f.isNumber(a)&&c!==a&&(r=t.wrongLength||this.wrongLength||"is the wrong length (should be %{count} characters)",s.push(f.format(r,{count:a}))),f.isNumber(o)&&c<o&&(r=t.tooShort||this.tooShort||"is too short (minimum is %{count} characters)",s.push(f.format(r,{count:o}))),f.isNumber(i)&&i<c&&(r=t.tooLong||this.tooLong||"is too long (maximum is %{count} characters)",s.push(f.format(r,{count:i}))),0<s.length?t.message||s:void 0):(f.error(f.format("Attribute %{attr} has a non numeric value for `length`",{attr:n})),t.message||this.notValid||"has an incorrect length")}},numericality:function(e,t){if(f.isDefined(e)){t=f.extend({},this.options,t);var n,r,a=[],i={greaterThan:function(e,t){return t<e},greaterThanOrEqualTo:function(e,t){return t<=e},equalTo:function(e,t){return e===t},lessThan:function(e,t){return e<t},lessThanOrEqualTo:function(e,t){return e<=t},divisibleBy:function(e,t){return e%t==0}};if(f.isString(e)&&t.strict){var o="^(0|[1-9]\\d*)";if(t.onlyInteger||(o+="(\\.\\d+)?"),o+="$",!new RegExp(o).test(e))return t.message||t.notValid||this.notValid||this.message||"must be a valid number"}if(!0!==t.noStrings&&f.isString(e)&&!f.isEmpty(e)&&(e=+e),!f.isNumber(e))return t.message||t.notValid||this.notValid||this.message||"is not a number";if(t.onlyInteger&&!f.isInteger(e))return t.message||t.notInteger||this.notInteger||this.message||"must be an integer";for(n in i)if(r=t[n],f.isNumber(r)&&!i[n](e,r)){var s="not"+f.capitalize(n),c=t[s]||this[s]||this.message||"must be %{type} %{count}";a.push(f.format(c,{count:r,type:f.prettify(n)}))}return t.odd&&e%2!=1&&a.push(t.notOdd||this.notOdd||this.message||"must be odd"),t.even&&e%2!=0&&a.push(t.notEven||this.notEven||this.message||"must be even"),a.length?t.message||a:void 0}},datetime:f.extend(function(e,t){if(!f.isFunction(this.parse)||!f.isFunction(this.format))throw new Error("Both the parse and format functions needs to be set to use the datetime/date validator");if(f.isDefined(e)){var n,r=[],a=(t=f.extend({},this.options,t)).earliest?this.parse(t.earliest,t):NaN,i=t.latest?this.parse(t.latest,t):NaN;return e=this.parse(e,t),isNaN(e)||t.dateOnly&&e%864e5!=0?(n=t.notValid||t.message||this.notValid||"must be a valid date",f.format(n,{value:arguments[0]})):(!isNaN(a)&&e<a&&(n=t.tooEarly||t.message||this.tooEarly||"must be no earlier than %{date}",n=f.format(n,{value:this.format(e,t),date:this.format(a,t)}),r.push(n)),!isNaN(i)&&i<e&&(n=t.tooLate||t.message||this.tooLate||"must be no later than %{date}",n=f.format(n,{date:this.format(i,t),value:this.format(e,t)}),r.push(n)),r.length?f.unique(r):void 0)}},{parse:null,format:null}),date:function(e,t){return t=f.extend({},t,{dateOnly:!0}),f.validators.datetime.call(f.validators.datetime,e,t)},format:function(e,t){(f.isString(t)||t instanceof RegExp)&&(t={pattern:t});var n,r=(t=f.extend({},this.options,t)).message||this.message||"is invalid",a=t.pattern;if(f.isDefined(e))return f.isString(e)?(f.isString(a)&&(a=new RegExp(t.pattern,t.flags)),(n=a.exec(e))&&n[0].length==e.length?void 0:r):r},inclusion:function(e,t){if(f.isDefined(e)&&(f.isArray(t)&&(t={within:t}),t=f.extend({},this.options,t),!f.contains(t.within,e))){var n=t.message||this.message||"^%{value} is not included in the list";return f.format(n,{value:e})}},exclusion:function(e,t){if(f.isDefined(e)&&(f.isArray(t)&&(t={within:t}),t=f.extend({},this.options,t),f.contains(t.within,e))){var n=t.message||this.message||"^%{value} is restricted";return f.format(n,{value:e})}},email:f.extend(function(e,t){var n=(t=f.extend({},this.options,t)).message||this.message||"is not a valid email";if(f.isDefined(e))return f.isString(e)&&this.PATTERN.exec(e)?void 0:n},{PATTERN:/^[a-z0-9\u007F-\uffff!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9\u007F-\uffff!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,}$/i}),equality:function(e,t,n,r){if(f.isDefined(e)){f.isString(t)&&(t={attribute:t});var a=(t=f.extend({},this.options,t)).message||this.message||"is not equal to %{attribute}";if(f.isEmpty(t.attribute)||!f.isString(t.attribute))throw new Error("The attribute must be a non empty string");var i=f.getDeepObjectValue(r,t.attribute);return(t.comparator||function(e,t){return e===t})(e,i,t,n,r)?void 0:f.format(a,{attribute:f.prettify(t.attribute)})}},url:function(e,t){if(f.isDefined(e)){var n=(t=f.extend({},this.options,t)).message||this.message||"is not a valid url",r=t.schemes||this.schemes||["http","https"],a=t.allowLocal||this.allowLocal||!1;if(!f.isString(e))return n;var i="^(?:(?:"+r.join("|")+")://)(?:\\S+(?::\\S*)?@)?(?:",o="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";return a?o+="?":i+="(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})",i+="(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*"+o+")(?::\\d{2,5})?(?:[/?#]\\S*)?$",new RegExp(i,"i").exec(e)?void 0:n}}},o.formatters={detailed:function(e){return e},flat:f.flattenErrorsToArray,grouped:function(e){var t;for(t in e=f.groupErrorsByAttribute(e))e[t]=f.flattenErrorsToArray(e[t]);return e},constraint:function(e){var t;for(t in e=f.groupErrorsByAttribute(e))e[t]=e[t].map(function(e){return e.validator}).sort();return e}},o.exposeModule(o,this,e,t,n)}.call(this,"undefined"!=typeof exports?exports:null,"undefined"!=typeof module?module:null,"undefined"!=typeof define?define:null),define("can-validate-validatejs",["require","exports","module","can-reflect","validate.js"],function(e,t,n){var a=e("can-reflect"),i=e("validate.js"),r=function(t){return function(e){return i.single(e,t)}};r.many=function(r){return function(e){var t,n=i(e,r,{format:"detailed",fullMessages:!1});return n&&(t=[],a.eachIndex(n,function(e){t.push({message:e.options.message||e.error,related:[e.attribute]})})),t}},r.validatejs=i,n.exports=r}),define("can-validate",["require","exports","module","can-reflect"],function(e,t,n){"use strict";var i=e("can-reflect"),r={},o={object:function(e){var n=0<e.length?{}:void 0;return i.eachIndex(e,function(t){i.eachIndex(t.related,function(e){n[e]||(n[e]=[]),n[e].push(t.message)})}),n},flat:function(e){var t=0<e.length?[]:void 0;return i.eachIndex(e,function(e){t.push(e.message)}),t},errors:function(e){return 0<e.length?e:void 0},"errors-object":function(e){var n=0<e.length?{}:void 0;return i.eachIndex(e,function(t){i.eachIndex(t.related,function(e){n[e]||(n[e]=[]),n[e].push(t)})}),n}},s=function(e){var t=[];return"string"==typeof e&&t.push({message:e,related:["*"]}),"object"!=typeof e||Array.isArray(e)||(e.related?Array.isArray(e.related)||(e.related=[e.related]):e.related="*",t.push(e)),Array.isArray(e)&&i.eachIndex(e,function(e){[].push.apply(t,s(e))}),t};r.formatErrors=function(e,t){var n,r,a=(r=[],("string"==typeof(n=e)||"object"==typeof n&&!Array.isArray(n))&&(n=[n]),null!=n&&i.eachIndex(n,function(e){[].push.apply(r,s(e))}),r);return t&&o[t]?o[t](a):a},n.exports=r}),define("can-define-validate-validatejs",["require","exports","module","can-validate-validatejs","can-define","can-assign","can-reflect","can-validate"],function(e,t,n){"use strict";var c=e("can-validate-validatejs"),u=e("can-define"),l=e("can-assign"),f=e("can-reflect"),d=e("can-validate").formatErrors,r=function(e){var t,n,r,a,i,o=(t=e,n={},f.eachKey(t.prototype._define.definitions,function(e,t){e.validate&&0!==f.size(e.validate)&&(n[t]=e.validate)}),n),s=c.many(o);a=function(e){var t=s(e);return d(t,"errors")},i=(r=e).prototype._define,r.prototype.testSet=function(){var e={},t=!1;if(arguments.length){if("object"==typeof arguments[0]&&Boolean(arguments[0])&&(e=arguments[0],t=Boolean(arguments[1])),"string"==typeof arguments[0]&&(e[arguments[0]]=arguments[1]),t)e=new r(e);else{var n=this.serialize();l(n,e),e=n}return a(e)}return this.errors()},r.prototype.errors=function(){var t,e=this._errors;if(arguments.length){var n=d(e,"errors-object");t=[],f.eachIndex(arguments,function(e){[].push.apply(t,n?n[e]:[])}),t=0<t.length?t:void 0}else t=e;return t},u.property(r.prototype,"_errors",{get:function(){return a(this)}},i.dataInitializers,i.computedInitializers)};r.validatejs=c.validatejs,n.exports=r}),define("can/es/can-define-validate-validatejs",["exports","can-define-validate-validatejs"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-validate",["exports","can-validate"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-validate-validatejs",["require","exports","module","can-reflect","validate.js"],function(e,t,n){"use strict";var a=e("can-reflect"),i=e("validate.js"),r=function(t){return function(e){return i.single(e,t)}};r.many=function(r){return function(e){var t,n=i(e,r,{format:"detailed",fullMessages:!1});return n&&(t=[],a.eachIndex(n,function(e){t.push({message:e.options.message||e.error,related:[e.attribute]})})),t}},r.validatejs=i,n.exports=r}),define("can/es/can-validate-validatejs",["exports","can-validate-validatejs"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/es/can-event-dom-radiochange",["exports","can-event-dom-radiochange"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-event-dom-enter",["require","exports","module","can-namespace"],function(e,t,n){"use strict";var r=e("can-namespace");var i={defaultEventType:"enter",addEventListener:function(e,t,a){var n=function(e){if(n="Enter"===(t=e).key,r=13===t.keyCode,n||r)return a.apply(this,arguments);var t,n,r},r=i._eventTypeHandlerMap[t];r||(r=i._eventTypeHandlerMap[t]=new Map),r.set(a,n),this.addEventListener(e,"keyup",n)},removeEventListener:function(e,t,n){var r=i._eventTypeHandlerMap[t];if(r){var a=r.get(n);a&&(r.delete(n),0===r.size&&delete i._eventTypeHandlerMap[t],this.removeEventListener(e,"keyup",a))}},_eventTypeHandlerMap:{}};n.exports=r.domEventEnter=i}),define("can/es/can-event-dom-enter",["exports","can-event-dom-enter"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/ecosystem",["exports","can/es/can-debug","can/es/can-define-backup","can/es/can-define-stream","can/es/can-define-stream-kefir","can/es/can-kefir","can/es/can-observe","can/es/can-stream","can/es/can-stream-kefir","can/es/can-map-compat","can/es/can-stache-converters","can/es/can-view-autorender","can/es/can-super-model","can/es/can-connect-feathers","can/es/can-connect-tag","can/es/can-fixture-socket","can/es/can-ndjson-stream","can/es/can-connect-ndjson","can/es/can-route-mock","can/es/can-define-validate-validatejs","can/es/can-validate","can/es/can-validate-validatejs","can/es/can-event-dom-radiochange","can/es/can-event-dom-enter"],function(e,t,n,r,a,i,o,s,c,u,l,f,d,p,h,v,y,g,m,b,w,x,_,k){"use strict";function O(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"debug",{enumerable:!0,get:function(){return O(t).default}}),Object.defineProperty(e,"defineBackup",{enumerable:!0,get:function(){return O(n).default}}),Object.defineProperty(e,"defineStream",{enumerable:!0,get:function(){return O(r).default}}),Object.defineProperty(e,"defineStreamKefir",{enumerable:!0,get:function(){return O(a).default}}),Object.defineProperty(e,"kefir",{enumerable:!0,get:function(){return O(i).default}}),Object.defineProperty(e,"observe",{enumerable:!0,get:function(){return O(o).default}}),Object.defineProperty(e,"stream",{enumerable:!0,get:function(){return O(s).default}}),Object.defineProperty(e,"streamKefir",{enumerable:!0,get:function(){return O(c).default}}),Object.defineProperty(e,"makeMapCompat",{enumerable:!0,get:function(){return O(u).default}}),Object.defineProperty(e,"stacheConverters",{enumerable:!0,get:function(){return O(l).default}}),Object.defineProperty(e,"viewAutorender",{enumerable:!0,get:function(){return O(f).default}}),Object.defineProperty(e,"superModel",{enumerable:!0,get:function(){return O(d).default}}),Object.defineProperty(e,"connectFeathers",{enumerable:!0,get:function(){return O(p).default}}),Object.defineProperty(e,"connectTag",{enumerable:!0,get:function(){return O(h).default}}),Object.defineProperty(e,"fixtureSocket",{enumerable:!0,get:function(){return O(v).default}}),Object.defineProperty(e,"ndjsonStream",{enumerable:!0,get:function(){return O(y).default}}),Object.defineProperty(e,"connectNDJSON",{enumerable:!0,get:function(){return O(g).default}}),Object.defineProperty(e,"RouteMock",{enumerable:!0,get:function(){return O(m).default}}),Object.defineProperty(e,"defineValidateValidatejs",{enumerable:!0,get:function(){return O(b).default}}),Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return O(w).default}}),Object.defineProperty(e,"validateValidatejs",{enumerable:!0,get:function(){return O(x).default}}),Object.defineProperty(e,"radioChangeEvent",{enumerable:!0,get:function(){return O(_).default}}),Object.defineProperty(e,"enterEvent",{enumerable:!0,get:function(){return O(k).default}})}),define("can/es/can-compute",["exports","can-compute"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-map/bubble",["require","exports","module","can-event-queue/map/map","can-reflect"],function(e,t,n){"use strict";var o=e("can-event-queue/map/map"),s=e("can-reflect"),c={bind:function(e,t){if(!e.__inSetup){var n,r=c.events(e,t),a=r.length;e._bubbleBindings||(e._bubbleBindings={});for(var i=0;i<a;i++)n=r[i],e._bubbleBindings[n]?e._bubbleBindings[n]++:(e._bubbleBindings[n]=1,c.childrenOf(e,n))}},unbind:function(e,t){for(var n,r=c.events(e,t),a=r.length,i=0;i<a;i++)n=r[i],e._bubbleBindings&&e._bubbleBindings[n]--,e._bubbleBindings&&!e._bubbleBindings[n]&&(delete e._bubbleBindings[n],c.teardownChildrenFrom(e,n),0===s.size(e._bubbleBindings)&&delete e._bubbleBindings)},add:function(e,t,n){if(s.isObservableLike(t)&&s.isMapLike(t)&&e._bubbleBindings)for(var r in e._bubbleBindings)e._bubbleBindings[r]&&(c.teardownFromParent(e,t,r),c.toParent(t,e,n,r))},addMany:function(e,t){for(var n=0,r=t.length;n<r;n++)c.add(e,t[n],n)},remove:function(e,t){if(s.isObservableLike(t)&&s.isMapLike(t)&&e._bubbleBindings)for(var n in e._bubbleBindings)e._bubbleBindings[n]&&c.teardownFromParent(e,t,n)},removeMany:function(e,t){for(var n=0,r=t.length;n<r;n++)c.remove(e,t[n])},set:function(e,t,n,r){return s.isObservableLike(n)&&s.isMapLike(n)&&c.add(e,n,t),s.isObservableLike(r)&&s.isMapLike(r)&&c.remove(e,r),n},events:function(e,t){return e.constructor._bubbleRule(t,e)},toParent:function(n,r,a,i){o.listenTo.call(r,n,i,function(){var e=s.toArray(arguments),t=e.shift();e[0]=(s.isObservableLike(r)&&s.isListLike(r)?r.indexOf(n):a)+(e[0]?"."+e[0]:""),t.triggeredNS=t.triggeredNS||{},t.triggeredNS[r._cid]||(t.triggeredNS[r._cid]=!0,o.dispatch.call(r,t,e),"change"===i&&o.dispatch.call(r,e[0],[e[2],e[3]]))})},childrenOf:function(n,r){n._each(function(e,t){e&&e.bind&&c.toParent(e,n,t,r)})},teardownFromParent:function(e,t,n){t&&t.unbind&&o.stopListening.call(e,t,n)},teardownChildrenFrom:function(t,n){t._each(function(e){c.teardownFromParent(t,e,n)})},isBubbling:function(e,t){return e._bubbleBindings&&e._bubbleBindings[t]}};n.exports=c}),define("can-map/map-helpers",["require","exports","module","can-cid","can-assign","can-reflect","can-symbol"],function(e,t,n){"use strict";var s,c=e("can-cid"),r=e("can-assign"),u=e("can-reflect"),a=e("can-symbol"),i=null,o=function(){for(var e in i)i[e].added&&delete i[e].obj._cid;i=null},l={attrParts:function(e,t){return t?[e]:"object"==typeof e?e:(""+e).split(".")},canMakeObserve:function(e){return e&&!u.isPromise(e)&&(Array.isArray(e)||u.isPlainObject(e))},reflectSerialize:function(n){return this.forEach(function(e,t){void 0!==(e=this.___serialize?this.___serialize(t,e):u.serialize(e))&&(n[t]=e)},this),n},reflectUnwrap:function(n){return this.forEach(function(e,t){void 0!==e&&(n[t]=u.unwrap(e))}),n},removeSpecialKeys:function(t){return t&&["_data","constructor","_cid","__bindEvents"].forEach(function(e){delete t[e]}),t},serialize:(s=null,function(a,i,o){var e=c(a),t=!1;return s||(t=!0,s={attr:{},serialize:{}}),s[i][e]=o,a.forEach(function(e,t){var n,r=u.isObservableLike(e)&&s[i][c(e)];void 0!==(n=r||(a["___"+i]?a["___"+i](t,e):l.getValue(a,t,e,i)))&&(o[t]=n)}),t&&(s=null),o}),getValue:function(e,t,n,r){return"attr"===r&&(r=a.for("can.getValue")),u.isObservableLike(n)&&n[r]?n[r]():n},define:null,addComputedAttr:function(n,r,e){n._computedAttrs[r]={compute:e,count:0,handler:function(e,t){n._triggerChange(r,"set",e,t)}}},addToMap:function(e,t){var n;i||(n=o,i={});var r=e._cid,a=c(e);return i[a]||(i[a]={obj:e,instance:t,added:!r}),n},getMapFromObject:function(e){return i&&i[e._cid]&&i[e._cid].instance},twoLevelDeepExtend:function(e,t){for(var n in t)e[n]=e[n]||{},r(e[n],t[n])}};n.exports=l}),define("can-types",["require","exports","module","can-namespace","can-reflect","can-symbol","can-log/dev/dev"],function(e,t,n){"use strict";var r=e("can-namespace"),a=e("can-reflect"),i=e("can-symbol"),o=(e("can-log/dev/dev"),{isMapLike:function(e){return a.isObservableLike(e)&&a.isMapLike(e)},isListLike:function(e){return a.isObservableLike(e)&&a.isListLike(e)},isPromise:function(e){return a.isPromise(e)},isConstructor:function(e){return a.isConstructorLike(e)},isCallableForValue:function(e){return e&&a.isFunctionLike(e)&&!a.isConstructorLike(e)},isCompute:function(e){return e&&e.isComputed},get iterator(){return i.iterator||i.for("iterator")},DefaultMap:null,DefaultList:null,queueTask:function(e){var t=e[2]||[];e[0].apply(e[1],t)},wrapElement:function(e){return e},unwrapElement:function(e){return e}});if(r.types)throw new Error("You can't have two versions of can-types, check your dependencies");n.exports=r.types=o}),define("can-cid/helpers",function(e,t,n){"use strict";n.exports={each:function(e,t,n){for(var r in e)t.call(n,e[r],r);return e}}}),define("can-cid/set/set",["require","exports","module","can-cid","can-cid/helpers"],function(e,t,n){"use strict";var r,a=e("can-cid").get,i=e("can-cid/helpers");"undefined"!=typeof Set?r=Set:((r=function(){this.values={}}).prototype.add=function(e){this.values[a(e)]=e},r.prototype.delete=function(e){var t=a(e)in this.values;return t&&delete this.values[a(e)],t},r.prototype.forEach=function(e,t){i.each(this.values,e,t)},r.prototype.has=function(e){return a(e)in this.values},r.prototype.clear=function(){return this.values={}},Object.defineProperty(r.prototype,"size",{get:function(){var e=0;return i.each(this.values,function(){e++}),e}}));n.exports=r}),define("can-cid/map/map",["require","exports","module","can-cid","can-cid/helpers"],function(e,t,n){"use strict";var r,a=e("can-cid").get,i=e("can-cid/helpers");"undefined"!=typeof Map?r=Map:((r=function(){this.values={}}).prototype.set=function(e,t){this.values[a(e)]={key:e,value:t}},r.prototype.delete=function(e){var t=a(e)in this.values;return t&&delete this.values[a(e)],t},r.prototype.forEach=function(t,n){i.each(this.values,function(e){return t.call(n||this,e.value,e.key,this)},this)},r.prototype.has=function(e){return a(e)in this.values},r.prototype.get=function(e){var t=this.values[a(e)];return t&&t.value},r.prototype.clear=function(){return this.values={}},Object.defineProperty(r.prototype,"size",{get:function(){var e=0;return i.each(this.values,function(){e++}),e}}));n.exports=r}),define("can-map",["require","exports","module","can-map/bubble","can-map/map-helpers","can-event-queue/map/map","can-event-queue/type/type","can-construct","can-observation-recorder","can-stache-key","can-compute","can-single-reference","can-namespace","can-log/dev/dev","can-cid","can-assign","can-types","can-reflect","can-symbol","can-cid/set/set","can-cid/map/map","can-queues"],function(e,t,n){"use strict";var i=e("can-map/bubble"),o=e("can-map/map-helpers"),s=e("can-event-queue/map/map"),r=e("can-event-queue/type/type"),a=e("can-construct"),c=e("can-observation-recorder"),u=e("can-stache-key"),l=e("can-compute"),f=e("can-single-reference"),d=e("can-namespace"),p=(e("can-log/dev/dev"),e("can-cid")),h=e("can-assign"),v=e("can-types"),y=e("can-reflect"),g=e("can-symbol"),m=e("can-cid/set/set"),b=e("can-cid/map/map"),w=e("can-queues"),x={constructor:!0},_={}.hasOwnProperty,k=a.extend({setup:function(e){if(a.setup.apply(this,arguments),this._computedPropertyNames=[],k){for(var t in r(this),this[g.for("can.defineInstanceKey")]=function(e,t){void 0!==t.value&&(this.defaults[e]=t.value),!1===t.enumerable&&(this.enumerable[e]=!1)},this.defaults||(this.defaults={}),this.enumerable||(this.enumerable={}),this.prototype)"define"!==t&&"constructor"!==t&&("function"!=typeof this.prototype[t]||this.prototype[t].prototype instanceof a)?this.defaults[t]=this.prototype[t]:y.isObservableLike(this.prototype[t])&&this._computedPropertyNames.push(t);o.define&&o.define(this,e.prototype.define)}},shortName:"Map",_bubbleRule:function(e){return"change"===e||0<=e.indexOf(".")?["change"]:[]},addEventListener:s.addEventListener,removeEventListener:s.removeEventListener,keys:function(e){return y.getOwnEnumerableKeys(e)}},{setup:function(e){y.isObservableLike(e)&&"function"==typeof e.serialize&&(e=e.serialize()),this._data=Object.create(null),p(this,".map"),this._setupComputedProperties();var t=e&&o.addToMap(e,this),n=this._setupDefaults(e),r=h(y.assignDeep({},n),e);this.attr(r),t&&t()},_setupComputedProperties:function(){this._computedAttrs=Object.create(null);for(var e=this.constructor._computedPropertyNames,t=0,n=e.length;t<n;t++){var r=e[t];o.addComputedAttr(this,r,this[r])}},_setupDefaults:function(){return this.constructor.defaults||{}},attr:function(e,t){var n=typeof e;return void 0===e?this._getAttrs():"string"!==n&&"number"!==n?this._setAttrs(e,t):1===arguments.length?this._get(e):(this._set(e+"",t),this)},_get:function(e){var t=(e+="").indexOf(".");if(0<=t){var n=this.___get(e);if(void 0!==n)return c.add(this,e),n;var r=e.substr(0,t),a=e.substr(t+1),i=this.__get(r);return i&&y.getKeyValue(i,a)}return this.__get(e)},__get:function(e){return x[e]||this._computedAttrs[e]||c.add(this,e),this.___get(e)},___get:function(e){if(void 0===e)return this._data;var t=this._computedAttrs[e];return t?y.getValue(t.compute):_.call(this._data,e)?this._data[e]:void 0},_set:function(e,t,n){var r,a=(e+="").indexOf(".");if(0<=a&&!n){var i=e.substr(0,a),o=e.substr(a+1);r=this.__inSetup?void 0:this.___get(i),y.isMapLike(r)?y.setKeyValue(r,o,t):(r=this.__inSetup?void 0:this.___get(e),this.__convert&&(t=this.__convert(e,t)),this.__set(e,this.__type(t,e),r))}else r=this.__inSetup?void 0:this.___get(e),this.__convert&&(t=this.__convert(e,t)),this.__set(e,this.__type(t,e),r)},__type:function(e,t){if("object"!=typeof e||y.isObservableLike(e)||!o.canMakeObserve(e)||y.isListLike(e))return e;var n=o.getMapFromObject(e);return n||new(this.constructor.Map||k)(e)},__set:function(e,t,n){if(t!==n||!Object.prototype.hasOwnProperty.call(this._data,e)){var r=this._computedAttrs[e],a=r||void 0!==n||_.call(this.___get(),e)?"set":"add";this.___set(e,"object"==typeof t?i.set(this,e,t,n):t),r&&r.count||this._triggerChange(e,a,t,n),"object"==typeof n&&i.teardownFromParent(this,n)}},___set:function(e,t){var n=this._computedAttrs[e];n?y.setValue(n.compute,t):this._data[e]=t,"function"==typeof this.constructor.prototype[e]||n||(this[e]=t)},removeAttr:function(e){return this._remove(e)},_remove:function(e){var t=o.attrParts(e),n=t.shift(),r=this.___get(n);return t.length&&r?y.deleteKeyValue(r,t.join(".")):("string"==typeof e&&~e.indexOf(".")&&(n=e),this.__remove(n,r),r)},__remove:function(e,t){e in this._data&&(this.___remove(e),this._triggerChange(e,"remove",void 0,t))},___remove:function(e){delete this._data[e],e in this.constructor.prototype||delete this[e]},___serialize:function(e,t){return this._legacyAttrBehavior?o.getValue(this,e,t,"serialize"):y.serialize(t,b)},_getAttrs:function(){return this._legacyAttrBehavior?o.serialize(this,"attr",{}):y.unwrap(this,b)},_setAttrs:function(e,t){return this._legacyAttrBehavior?this.__setAttrs(e,t):(!0===t||"true"===t?this[g.for("can.updateDeep")](e):this[g.for("can.assignDeep")](e),this)},__setAttrs:function(n,r){n=h({},n);var e,a,i=this;for(e in w.batch.start(),this._each(function(e,t){"_cid"!==t&&(void 0!==(a=n[t])?(i.__convert&&(a=i.__convert(t,a)),v.isMapLike(e)&&o.canMakeObserve(a)?!0===r?y.updateDeep(e,a):y.assignDeep(e,a):e!==a&&i.__set(t,i.__type(a,t),e),delete n[t]):r&&i.removeAttr(t))}),n)"_cid"!==e&&(a=n[e],this._set(e,a,!0));return w.batch.stop(),this},serialize:function(){return y.serialize(this,b)},_triggerChange:function(e,t,n,r,a){w.batch.start(),i.isBubbling(this,"change")&&s.dispatch.call(this,{type:"change",target:this,batchNum:a},[e,t,n,r]),s.dispatch.call(this,{type:e,target:this,batchNum:a,patches:[{type:"set",key:e,value:n}]},[n,r]),"remove"!==t&&"add"!==t||s.dispatch.call(this,{type:"__keys",target:this,batchNum:a}),w.batch.stop()},compute:function(t){if("function"==typeof this.constructor.prototype[t])return l(this[t],this);var n=u.reads(t),r=n.length-1;return l(function(e){if(!arguments.length)return u.get(this,t);u.write(this,n[r].key,e,{})},this)},forEach:function(e,t){for(var n,r,a=y.getOwnEnumerableKeys(this),i=0,o=a.length;i<o&&(n=a[i],r=this.attr(n),!1!==e.call(t||r,r,n,this));i++);return this},_each:function(e){var t=this.___get();for(var n in t)_.call(t,n)&&e(t[n],n)},dispatch:s.dispatch});s(k.prototype),k.prototype.addEventListener=function(e,t){var n=this._computedAttrs&&this._computedAttrs[e];return n&&n.compute&&(n.count?n.count++:(n.count=1,y.onValue(n.compute,n.handler,"notify"))),i.bind(this,e),s.addEventListener.apply(this,arguments)},k.prototype.removeEventListener=function(e,t){var n=this._computedAttrs&&this._computedAttrs[e];return n&&(1===n.count?(n.count=0,y.offValue(n.compute,n.handler)):n.count--),i.unbind(this,e),s.removeEventListener.apply(this,arguments)},k.prototype.on=k.prototype.bind=k.prototype.addEventListener,k.prototype.off=k.prototype.unbind=k.prototype.removeEventListener,k.on=k.bind=k.addEventListener,k.off=k.unbind=k.removeEventListener,y.assignSymbols(k.prototype,{"can.isMapLike":!0,"can.isListLike":!1,"can.isValueLike":!1,"can.getKeyValue":k.prototype._get,"can.setKeyValue":k.prototype._set,"can.deleteKeyValue":k.prototype._remove,"can.getOwnEnumerableKeys":function(){this.__inSetup||c.add(this,"__keys");var t=this.constructor.enumerable;return t?Object.keys(this._data).filter(function(e){return!1!==t[e]},this):Object.keys(this._data)},"can.assignDeep":function(e){w.batch.start(),y.assignDeepMap(this,o.removeSpecialKeys(y.assignMap({},e))),w.batch.stop()},"can.updateDeep":function(e){w.batch.start(),y.updateDeepMap(this,o.removeSpecialKeys(y.assignMap({},e))),w.batch.stop()},"can.unwrap":o.reflectUnwrap,"can.serialize":o.reflectSerialize,"can.onKeyValue":function(e,r,t){var n=function(e,t,n){r.call(this,t,n)};f.set(r,this,n,e),this.addEventListener(e,n,t)},"can.offKeyValue":function(e,t,n){this.removeEventListener(e,f.getAndDelete(t,this,e),n)},"can.keyHasDependencies":function(e){return!!(this._computedAttrs&&this._computedAttrs[e]&&this._computedAttrs[e].compute)},"can.getKeyDependencies":function(e){var t;return this._computedAttrs&&this._computedAttrs[e]&&this._computedAttrs[e].compute&&((t={}).valueDependencies=new m,t.valueDependencies.add(this._computedAttrs[e].compute)),t}}),v.DefaultMap||(v.DefaultMap=k),n.exports=d.Map=k}),define("can/es/can-map",["exports","can-map"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-list",["require","exports","module","can-namespace","can-map","can-map/bubble","can-map/map-helpers","can-queues","can-event-queue/map/map","can-observation-recorder","can-cid","can-reflect","can-assign","can-types","can-symbol","can-cid/map/map"],function(e,t,n){"use strict";var r,a=e("can-namespace"),o=e("can-map"),u=e("can-map/bubble"),i=e("can-map/map-helpers"),l=e("can-queues"),s=e("can-event-queue/map/map"),c=e("can-observation-recorder"),f=e("can-cid"),d=e("can-reflect"),p=e("can-assign"),h=e("can-types"),v=e("can-symbol"),y=e("can-cid/map/map"),g=[].splice,m=(r={0:"a",length:1},g.call(r,0,1),!r[0]),b=function(e,t,n){!t||!t.serialize||t instanceof e?n.push(t):n.push(new e(t.serialize()))},w=o.extend({Map:o},{setup:function(e,t){var n;this.length=0,f(this,".map"),this._setupComputedProperties(),e=void 0===e?[]:d.toArray(e),d.isPromise(e)?this.replace(e):(n=e.length&&i.addToMap(e,this),this.push.apply(this,e)),n&&n(),p(this,t)},_triggerChange:function(e,t,n,r){l.batch.start();var a,i=+e;~(""+e).indexOf(".")||isNaN(i)?o.prototype._triggerChange.apply(this,arguments):(u.isBubbling(this,"change")&&s.dispatch.call(this,{type:"change",target:this},[e,t,n,r]),"add"===t?(a=[{insert:n,index:i,deleteCount:0,type:"splice"}],s.dispatch.call(this,{type:t,patches:a},[n,i]),s.dispatch.call(this,"length",[this.length])):"remove"===t?(a=[{index:i,deleteCount:r.length,type:"splice"}],s.dispatch.call(this,{type:t,patches:a},[r,i]),s.dispatch.call(this,"length",[this.length])):s.dispatch.call(this,t,[n,i])),l.batch.stop()},___get:function(e){if(e){var t=this._computedAttrs[e];return t&&t.compute?d.getValue(t.compute):this[e]&&this[e].isComputed&&"function"==typeof this.constructor.prototype[e]?d.getValue(this[e]):this[e]}return this},__set:function(e,t,n){if("number"!=typeof(e=isNaN(+e)||e%1?e:+e))return o.prototype.__set.call(this,""+e,t,n);if(e>this.length-1){var r=new Array(e+1-this.length);return r[r.length-1]=t,this.push.apply(this,r),r}return this.splice(e,1,t),this},___set:function(e,t){this[e]=t,+e>=this.length&&(this.length=+e+1)},__remove:function(e,t){isNaN(+e)?(delete this[e],this._triggerChange(e,"remove",void 0,t)):this.splice(e,1)},_each:function(e){for(var t=this.___get(),n=0;n<t.length;n++)e(t[n],n)},serialize:function(){return d.serialize(this,y)},splice:function(e,t){var n,r,a,i=d.toArray(arguments),o=[],s=2<i.length;for(e=e||0,n=0,r=i.length-2;n<r;n++)i[a=n+2]=this.__type(i[a],a),o.push(i[a]),this[n+e]!==i[a]&&(s=!1);if(s&&this.length<=o.length)return o;void 0===t&&(t=i[1]=this.length-e);var c=g.apply(this,i);if(!m)for(n=this.length;n<c.length+this.length;n++)delete this[n];return l.batch.start(),0<t&&(u.removeMany(this,c),this._triggerChange(""+e,"remove",void 0,c)),2<i.length&&(u.addMany(this,o),this._triggerChange(""+e,"add",o,c)),l.batch.stop(),c}});d.eachKey({push:"length",unshift:0},function(i,e){var o=[][e];w.prototype[e]=function(){for(var e,t,n=[],r=i?this.length:0,a=arguments.length;a--;)t=arguments[a],n[a]=u.set(this,a,this.__type(t,a));return e=o.apply(this,n),this.comparator&&!n.length||this._triggerChange(""+r,"add",n,void 0),e}}),d.eachKey({pop:"length",shift:0},function(a,i){w.prototype[i]=function(){if(this.length){var e,t=(e=arguments)[0]&&Array.isArray(e[0])?e[0]:d.toArray(e),n=a&&this.length?this.length-1:0,r=[][i].apply(this,t);return this._triggerChange(""+n,"remove",void 0,[r]),r&&r.removeEventListener&&u.remove(this,r),r}}}),p(w.prototype,{indexOf:function(e,t){c.add(this,"length");for(var n=t||0,r=this.length;n<r;n++)if(this.attr(n)===e)return n;return-1},join:function(){return c.add(this,"length"),[].join.apply(this,arguments)},reverse:function(){var e=[].reverse.call(d.toArray(this));return this.replace(e)},slice:function(){c.add(this,"length");var e=Array.prototype.slice.apply(this,arguments);return new this.constructor(e)},concat:function(){var n=[],r=this.constructor.Map;return d.each(arguments,function(e){if(d.isObservableLike(e)&&d.isListLike(e)||Array.isArray(e)){var t=d.isObservableLike(e)&&d.isListLike(e)?d.toArray(e):e;d.each(t,function(e){b(r,e,n)})}else b(r,e,n)}),new this.constructor(Array.prototype.concat.apply(d.toArray(this),n))},forEach:function(e,t){for(var n,r=0,a=this.attr("length");r<a&&(void 0===(n=this.attr(r))||!1!==e.call(t||n,n,r,this));r++);return this},replace:function(e){if(d.isPromise(e)){this._promise&&(this._promise.__isCurrentPromise=!1);var t=this._promise=e;t.__isCurrentPromise=!0;var n=this;e.then(function(e){t.__isCurrentPromise&&n.replace(e)})}else e=void 0===e?[]:d.toArray(e),this.splice.apply(this,[0,this.length].concat(e));return this},filter:function(r,a){var i=new this.constructor,o=this;return this.forEach(function(e,t,n){r.call(a||o,e,t,o)&&i.push(e)}),i},map:function(a,i){var o=new w,s=this;return this.forEach(function(e,t,n){var r=a.call(i||s,e,t,s);o.push(r)}),o},sort:function(e){var t=Array.prototype.slice.call(this);return Array.prototype.sort.call(t,e),this.splice.apply(this,[0,t.length].concat(t)),this}});var x=o.prototype.__type;o.prototype.__type=function(e,t){if("object"==typeof e&&Array.isArray(e)){var n=i.getMapFromObject(e);return n||new w(e)}return x.apply(this,arguments)};var _=o.setup;o.setup=function(){_.apply(this,arguments),this.prototype instanceof w||(this.List=o.List.extend({Map:this},{}))},h.DefaultList||(h.DefaultList=w),d.assignSymbols(w.prototype,{"can.isMoreListLikeThanMapLike":!0,"can.isListLike":!0,"can.getKeyValue":w.prototype._get,"can.setKeyValue":w.prototype._set,"can.deleteKeyValue":w.prototype._remove,"can.getOwnEnumerableKeys":function(){return Object.keys(this._data||{}).concat(this.map(function(e,t){return t}))},"can.assignDeep":function(e){l.batch.start(),d.assignDeepList(this,e),l.batch.stop()},"can.updateDeep":function(e){l.batch.start(),d.updateDeepList(this,e),l.batch.stop()},"can.unwrap":i.reflectUnwrap,"can.serialize":i.reflectSerialize,"can.onKeysAdded":function(e){this[v.for("can.onKeyValue")]("add",e)},"can.onKeysRemoved":function(e){this[v.for("can.onKeyValue")]("remove",e)},"can.splice":function(e,t,n){this.splice.apply(this,[e,t].concat(n))}}),o.List=w,n.exports=a.List=w}),define("can/es/can-list",["exports","can-list"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-map-define",["require","exports","module","can-log/dev/dev","can-assign","can-event-queue/map/map","can-queues","can-map/map-helpers","can-map","can-compute","can-reflect","can-observation-recorder","can-list"],function(e,t,n){"use strict";e("can-log/dev/dev");var o=e("can-assign"),f=e("can-event-queue/map/map"),d=e("can-queues"),s=e("can-map/map-helpers"),i=e("can-map"),r=e("can-compute"),c=e("can-reflect"),u=e("can-observation-recorder");e("can-list");var l={},p=function(e){return"object"==typeof e&&"serialize"in e},h=function(e){var t=!0;return p(e)&&(t=!!e.serialize),t},v=function(e,t,n){var r,a;if(n){if(r=n[t],a=n["*"],r&&void 0!==r[e])return r[e];if(a&&void 0!==a[e])return a[e]}};s.define=function(t,e){var n=t.prototype.define;if(e){var r={};s.twoLevelDeepExtend(r,e),s.twoLevelDeepExtend(r,n),o(n,r)}for(var a in t.defaultGenerators={},n){var i=n[a].type;"string"==typeof i&&"object"==typeof l.types[i]&&(delete n[a].type,o(n[a],l.types[i])),"value"in n[a]&&("function"==typeof n[a].value?t.defaultGenerators[a]=n[a].value:t.defaults[a]=n[a].value),"function"==typeof n[a].Value&&function(e){t.defaultGenerators[a]=function(){return new e}}(n[a].Value)}};var y=i.prototype._setupDefaults;i.prototype._setupDefaults=function(e){var n=o({},y.call(this)),r={},t=this.constructor,a=this._get;for(var i in this._get=function(e){var t=-1!==e.indexOf(".")?e.substr(0,e.indexOf(".")):e;return t in n&&!(t in r)&&(this.attr(t,n[t]),r[t]=!0),a.apply(this,arguments)},t.defaultGenerators)e&&i in e||(n[i]=t.defaultGenerators[i].call(this));return delete this._get,n};var a=i.prototype,g=a.__set;a.__set=function(t,e,n,r,a){var i=this,o=function(e){return!1!==(a&&a.call(i,e))&&f.dispatch.call(i,"error",[t,e],!0),!1},s=v("set",t,this.define),c=v("get",t,this.define);if(s){d.batch.start();var u=!1,l=s.call(this,e,function(e){c?i[t](e):g.call(i,t,e,n,r,o),u=!0},o,c?this._computedAttrs[t].compute.computeInstance.lastSetValue.get():n);return c?(void 0!==l&&!u&&1<=s.length&&this._computedAttrs[t].compute(l),void d.batch.stop()):void 0===l&&!u&&1<s.length?void d.batch.stop():(u||g.call(i,t,0===s.length&&void 0===l?e:l,n,r,o),d.batch.stop(),this)}return g.call(i,t,e,n,r,o),this},l.types={date:function(e){var t=typeof e;return"string"===t?(e=Date.parse(e),isNaN(e)?null:new Date(e)):"number"===t?new Date(e):e},number:function(e){return null==e?e:+e},boolean:function(e){return null==e?e:!("false"===e||"0"===e||!e)},htmlbool:function(e){return"string"==typeof e||!!e},"*":function(e){return e},string:function(e){return null==e?e:""+e},compute:{set:function(e,t,n,r){return e&&e.isComputed?e:r&&r.isComputed?(r(e),r):e},get:function(e){return e&&e.isComputed?e():e}}};var m=a.__type;a.__type=function(e,t){var n=v("type",t,this.define),r=v("Type",t,this.define),a=e;return"string"==typeof n&&(n=l.types[n]),n||r?(n&&(a=n.call(this,a,t)),!r||null==a||a instanceof r||(a=new r(a)),a):(c.isPlainObject(a)&&a.define&&(a=new(a=i.extend(a))),m.call(this,a,t))};var b=a.__remove;a.__remove=function(e,t){var n,r=v("remove",e,this.define);return r?(d.batch.start(),!1===(n=r.call(this,t))?void d.batch.stop():(n=b.call(this,e,t),d.batch.stop(),n)):b.call(this,e,t)};var w=a._setupComputedProperties;a._setupComputedProperties=function(){for(var e in w.apply(this,arguments),this.define){var t=this.define[e].get;t&&s.addComputedAttr(this,e,r.async(void 0,t,this))}};var x=a.___serialize,_=function(e,t,n){var r="*"!==t&&v("serialize",t,e.define);return void 0===r?x.call(e,t,n):!1!==r?"function"==typeof r?r.call(e,n,t):x.call(e,t,n):void 0};a.___serialize=function(e,t){return _(this,e,t)};var k=a.serialize;a.serialize=function(e){var t,n=k.apply(this,arguments);if(e)return n;for(var r in this.define)r in n||this.define&&(this.define[r]&&this.define[r].serialize||this.define["*"]&&this.define["*"].serialize)&&void 0!==(t=_(this,r,this.attr(r)))&&(n[r]=t);return n},c.assignSymbols(a,{"can.hasKey":function(e){var t=this.define&&e in this.define,n=this._data&&e in this._data;return t||n||e in this},"can.getOwnEnumerableKeys":function(){this.__inSetup||u.add(this,"__keys");var e,t,n=function(e){var t=[],n=e&&e["*"];for(var r in e){var a=e[r],i=h(n);"object"==typeof a&&"serialize"in a?i=!!a.serialize:"object"!=typeof a||p(n)||(i=!a.get),i&&t.push(r)}return t}(this.define),r=Object.keys(this._data),a=h(this.define&&this.define["*"]),i=this.constructor.enumerable;for(r=r.filter(function(e){return i?a&&!1!==i[e]:a}),e=0;e<r.length;e++)t=r[e],!(n.indexOf(t)<0)||this.define&&this.define[t]||n.push(r[e]);return n}}),n.exports=l}),define("can/es/can-map-define",["exports","can-map-define"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can-set-legacy",["require","exports","module","can-query-logic","can-reflect","can-key/transform/transform","can-key/delete/delete","can-key/get/get","can-query-logic/src/helpers","can-query-logic/src/types/make-enum","can-query-logic/src/set"],function(e,t,n){var r,a=e("can-query-logic"),o=e("can-reflect"),i=e("can-key/transform/transform"),s=e("can-key/delete/delete"),c=e("can-key/get/get"),u=e("can-query-logic/src/helpers"),l=e("can-query-logic/src/types/make-enum"),f=e("can-query-logic/src/set"),d=function(){};l(d,[!0,!1],function(e){return"true"===e||"false"!==e&&e});var p={UNIVERSAL:f.UNIVERSAL,EMPTY:f.EMPTY,UNDEFINABLE:f.UNDEFINABLE,UNKNOWABLE:f.UNKNOWABLE,Algebra:function(){var r={schema:[],hydrate:[],serialize:[]};o.eachIndex(arguments,function(e){for(var t in e){if(!r[t])throw new Error("can-query-logic: This type of configuration is not supported. Please use can-query-logic directly.");r[t].push(e[t])}});var e=o.assignSymbols({},{"can.getSchema":function(){var t={kind:"record",identity:[],keys:{}};return r.schema.forEach(function(e){e(t)}),t.identity.length||t.identity.push("id"),t}});return new a(e,{toQuery:function(e){return r.hydrate.reduce(function(e,t){return t(e)},{filter:e})},toParams:function(e){if(f.isSpecial(e))return e;if(Array.isArray(e.filter))return f.UNDEFINABLE;var t=e.filter||{};if(function e(t,n,r,a){if(t&&"object"==typeof t)for(var i in t)if(n[i]){if("function"!=typeof n[i])return!0;r[a]=n[i](t)}else if(e(t[i],n,t,i))return!0;return!1}(t,{$ne:!0,$in:function(e){return e.$in}}))return f.UNDEFINABLE;var n=r.serialize.reduce(function(e,t){return t(e)},e);return t=n.filter||{},delete n.filter,o.assign(n,t)}})},Translate:function(e,r){if("where"!==e)throw new Error("can-query-logic/compat.Translate is only able to translate the where clause");return{hydrate:function(e){var t=o.serialize(e),n=t.filter[r];return delete t.filter[r],n&&o.assign(t.filter,n),t},serialize:function(e){if(e.filter){var t=o.serialize(e),n=e.filter;return t.filter={},t.filter[r]=n,t}return e}}},props:{boolean:function(t){return{schema:function(e){e.keys[t]=d}}},dotNotation:function(){return{}},enum:function(t,e){function n(){}return l(n,e),{schema:function(e){e.keys[t]=n}}},id:function(t){return{schema:function(e){e.identity.push(t)}}},offsetLimit:function(n,r){return n=n||"offset",r=r||"limit",{hydrate:function(e){var t=o.serialize(e);return(n in t.filter||r in t.filter)&&(t.page={}),n in t.filter&&(t.page.start=parseInt(t.filter[n],10),delete t.filter[n]),r in t.filter&&(t.page.end=(t.page.start||0)+parseInt(t.filter[r],10)-1,delete t.filter[r]),t},serialize:function(e){var t=o.serialize(e);return t.page&&(t[n]=t.page.start,t[r]=t.page.end-t.page.start+1,delete t.page),t}}},rangeInclusive:function(e,t){var n={};n["filter."+e]="page.start",n["filter."+t]="page.end";var r={"page.start":e,"page.end":t};return{hydrate:function(e){var t=i(e,n);return t.page&&(t.page.start&&(t.page.start=parseInt(t.page.start,10)),t.page.end&&(t.page.end=parseInt(t.page.end,10))),t},serialize:function(e){return i(e,r)}}},ignore:function(n){return{hydrate:function(e){var t=o.serialize(e);return delete t.filter[n],t}}},sort:function(i,e){if(i||(i="sort"),e)throw new Error("can-query-logic/compat.sort - sortFunc is not supported");return{hydrate:function(e){var t,n=o.serialize(e),r=c(n,"filter."+i);return void 0!==r&&(s(n,"filter."+i),n.sort="desc"===((t=r.split(" "))[1]||"").toLowerCase()?"-"+t[0]:t[0]),n},serialize:function(e){var t,n,r=o.serialize(e),a=r.sort;return void 0!==a&&(delete r.sort,r[i]=(t=a,(n=u.sortData(t)).desc?"-"+n.prop:n.prop)),r}}}}};function h(e){return e?e instanceof a?e:new p.Algebra(e):r}function v(r){p[r]=function(e,t,n){return h(n)[r](e,t)}}v("difference"),v("union"),v("intersection"),v("isSubset"),v("isEqual"),v("isProperSubset"),p.count=function(e,t){return h(t).count(e)},p.comparators=p.props,r=new p.Algebra,n.exports=p}),define("can/es/can-set-legacy",["exports","can-set-legacy"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})}),define("can/legacy",["exports","can/es/can-compute","can/es/can-map","can/es/can-list","can/es/can-map-define","can/es/can-set-legacy"],function(e,t,n,r,a,i){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"compute",{enumerable:!0,get:function(){return o(t).default}}),Object.defineProperty(e,"CanMap",{enumerable:!0,get:function(){return o(n).default}}),Object.defineProperty(e,"CanList",{enumerable:!0,get:function(){return o(r).default}}),Object.defineProperty(e,"canMapDefine",{enumerable:!0,get:function(){return o(a).default}}),Object.defineProperty(e,"set",{enumerable:!0,get:function(){return o(i).default}})}),define("can",["exports","can/core","can/ecosystem","can/legacy"],function(t,n,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}),Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})}),Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})})}),function(e){e._define=e.define,e.define=e.define.orig}("object"==typeof self&&self.Object==Object?self:"object"==typeof process&&"[object process]"===Object.prototype.toString.call(process)?global:window);