Google
Edit File: simple-liking-151d60b5eb3bdee30ba2-min.js
webpackJsonp([21],{0:function(l,c,a){a(3318);a(1308);a(520);a(587);a(589);a(1302);a(1315);a(1303);a(1304);a(1306);a(588);a(1296);a(1305);a(1307);a(1301);a(1106);a(900);a(1105);a(1318);a(1309);a(1310);a(1311);a(1312);a(1313);a(1314);a(1316)},10:function(l,c,a){c=new (a(360));l.exports=c},15:function(l,c,a){c.__esModule=!0;l=a(17);c.default=(l&&l.__esModule?l:{"default":l}).default||function(a){for(var h=1;h<arguments.length;h++){var c=arguments[h],b;for(b in c)Object.prototype.hasOwnProperty.call(c, b)&&(a[b]=c[b])}return a}},20:function(l,c,a){l.exports={"default":a(352),__esModule:!0}},31:function(l,c,a){(function(a,c){l.exports=c()})(this,function(){function a(d,r){r&&(d.prototype=Object.create(r.prototype));d.prototype.constructor=d}function c(d){return e(d)?d:G(d)}function n(d){return g(d)?d:Q(d)}function b(d){return q(d)?d:F(d)}function k(d){return e(d)&&!m(d)?d:Z(d)}function e(d){return!(!d||!d[Hb])}function g(d){return!(!d||!d[Ib])}function q(d){return!(!d||!d[Jb])}function m(d){return g(d)|| q(d)}function t(d){return!(!d||!d[va])}function f(d){d.value=!1;return d}function s(d){d&&(d.value=!0)}function l(){}function v(d,r){r=r||0;for(var a=Math.max(0,d.length-r),b=Array(a),e=0;e<a;e++)b[e]=d[e+r];return b}function R(d){void 0===d.size&&(d.size=d.__iterate(ea));return d.size}function S(d,r){if("number"!==typeof r){var a=r>>>0;if(""+a!==r||4294967295===a)return NaN;r=a}return 0>r?R(d)+r:r}function ea(){return!0}function na(d,r,a){return(0===d||void 0!==a&&d<=-a)&&(void 0===r||void 0!==a&& r>=a)}function K(d,r,a){return void 0===d?a:0>d?Math.max(0,r+d):void 0===r?d:Math.min(r,d)}function w(d){this.next=d}function y(d,r,a,b){d=0===d?r:1===d?a:[r,a];b?b.value=d:b={value:d,done:!1};return b}function u(){return{value:void 0,done:!0}}function $(d){return d&&"function"===typeof d.next}function aa(d){var r=Fa(d);return r&&r.call(d)}function Fa(d){d=d&&(bb&&d[bb]||d[Kb]);if("function"===typeof d)return d}function G(d){if(null===d||void 0===d)d=Qa();else if(e(d))d=d.toSeq();else{var r=Lb(d)|| "object"===typeof d&&new oa(d);if(!r)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+d);d=r}return d}function Q(d){return null===d||void 0===d?Qa().toKeyedSeq():e(d)?g(d)?d.toSeq():d.fromEntrySeq():Mb(d)}function F(d){return null===d||void 0===d?Qa():!e(d)?cb(d):g(d)?d.entrySeq():d.toIndexedSeq()}function Z(d){return(null===d||void 0===d?Qa():!e(d)?cb(d):g(d)?d.entrySeq():d).toSetSeq()}function ga(d){this._array=d;this.size=d.length}function oa(d){var r=Object.keys(d); this._object=d;this._keys=r;this.size=r.length}function Ga(d){this._iterable=d;this.size=d.length||d.size}function Ha(d){this._iterator=d;this._iteratorCache=[]}function db(d){return!(!d||!d[Nb])}function Qa(){return Ob||(Ob=new ga([]))}function Mb(d){var r=Array.isArray(d)?(new ga(d)).fromEntrySeq():$(d)?(new Ha(d)).fromEntrySeq():Fa(d)?(new Ga(d)).fromEntrySeq():"object"===typeof d?new oa(d):void 0;if(!r)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+ d);return r}function cb(d){var r=Lb(d);if(!r)throw new TypeError("Expected Array or iterable object of values: "+d);return r}function Lb(d){return d&&"number"===typeof d.length?new ga(d):$(d)?new Ha(d):Fa(d)?new Ga(d):void 0}function Pb(d,r,a,b){var e=d._cache;if(e){for(var f=e.length-1,g=0;g<=f;g++){var m=e[a?f-g:g];if(!1===r(m[1],b?m[0]:g,d))return g+1}return g}return d.__iterateUncached(r,a)}function Qb(d,r,a,b){var e=d._cache;if(e){var f=e.length-1,g=0;return new w(function(){var d=e[a?f-g:g]; return g++>f?u():y(r,b?d[0]:g-1,d[1])})}return d.__iteratorUncached(r,a)}function eb(d,r){return r?fb(r,d,"",{"":d}):gb(d)}function fb(d,r,a,b){return Array.isArray(r)?d.call(b,a,F(r).map(function(a,b){return fb(d,a,b,r)})):r&&(r.constructor===Object||void 0===r.constructor)?d.call(b,a,Q(r).map(function(a,b){return fb(d,a,b,r)})):r}function gb(d){return Array.isArray(d)?F(d).map(gb).toList():d&&(d.constructor===Object||void 0===d.constructor)?Q(d).map(gb).toMap():d}function H(d,r){if(d===r||d!==d&& r!==r)return!0;if(!d||!r)return!1;if("function"===typeof d.valueOf&&"function"===typeof r.valueOf){d=d.valueOf();r=r.valueOf();if(d===r||d!==d&&r!==r)return!0;if(!d||!r)return!1}return"function"===typeof d.equals&&"function"===typeof r.equals&&d.equals(r)?!0:!1}function hb(d,r){if(d===r)return!0;if(!e(r)||void 0!==d.size&&void 0!==r.size&&d.size!==r.size||void 0!==d.__hash&&void 0!==r.__hash&&d.__hash!==r.__hash||g(d)!==g(r)||q(d)!==q(r)||t(d)!==t(r))return!1;if(0===d.size&&0===r.size)return!0;var a= !m(d);if(t(d)){var b=d.entries();return r.every(function(d,r){var e=b.next().value;return e&&H(e[1],d)&&(a||H(e[0],r))})&&b.next().done}var f=!1;if(void 0===d.size)if(void 0===r.size)"function"===typeof d.cacheResult&&d.cacheResult();else{var f=!0,s=d;d=r;r=s}var c=!0,s=r.__iterate(function(r,b){if(a?!d.has(r):f?!H(r,d.get(b,z)):!H(d.get(b,z),r))return c=!1});return c&&d.size===s}function N(d,r){if(!(this instanceof N))return new N(d,r);this._value=d;this.size=void 0===r?Infinity:Math.max(0,r);if(0=== this.size){if(ib)return ib;ib=this}}function Ra(d,r){if(!d)throw Error(r);}function O(d,r,a){if(!(this instanceof O))return new O(d,r,a);Ra(0!==a,"Cannot step a Range by 0");d=d||0;void 0===r&&(r=Infinity);a=void 0===a?1:Math.abs(a);r<d&&(a=-a);this._start=d;this._end=r;this._step=a;this.size=Math.max(0,Math.ceil((r-d)/a-1)+1);if(0===this.size){if(jb)return jb;jb=this}}function pa(){throw TypeError("Abstract");}function Ia(){}function wa(){}function Sa(){}function V(d){if(!1===d||(null===d||void 0=== d)||"function"===typeof d.valueOf&&(d=d.valueOf(),!1===d||null===d||void 0===d))return 0;if(!0===d)return 1;var r=typeof d;if("number"===r){r=d|0;for(r!==d&&(r^=4294967295*d);4294967295<d;)d/=4294967295,r^=d;return r>>>1&1073741824|r&3221225471}if("string"===r)return d.length>Ec?(r=kb[d],void 0===r&&(r=lb(d),mb===Fc&&(mb=0,kb={}),mb++,kb[d]=r),d=r):d=lb(d),d;if("function"===typeof d.hashCode)return d.hashCode();if("object"===r)return Gc(d);if("function"===typeof d.toString)return lb(d.toString()); throw Error("Value type "+r+" cannot be hashed.");}function lb(d){for(var r=0,a=0;a<d.length;a++)r=31*r+d.charCodeAt(a)|0;return r>>>1&1073741824|r&3221225471}function Gc(d){var a;if(nb&&(a=ob.get(d),void 0!==a))return a;a=d[sa];if(void 0!==a)return a;if(!Ta){a=d.propertyIsEnumerable&&d.propertyIsEnumerable[sa];if(void 0!==a)return a;a:{if(d&&0<d.nodeType)switch(d.nodeType){case 1:a=d.uniqueID;break a;case 9:a=d.documentElement&&d.documentElement.uniqueID;break a}a=void 0}if(void 0!==a)return a}a= ++pb;pb&1073741824&&(pb=0);if(nb)ob.set(d,a);else{if(void 0!==Rb&&!1===Rb(d))throw Error("Non-extensible objects are not allowed as keys.");if(Ta)Object.defineProperty(d,sa,{enumerable:!1,configurable:!1,writable:!1,value:a});else if(void 0!==d.propertyIsEnumerable&&d.propertyIsEnumerable===d.constructor.prototype.propertyIsEnumerable)d.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},d.propertyIsEnumerable[sa]=a;else if(void 0!==d.nodeType)d[sa]= a;else throw Error("Unable to set a non-enumerable property on object.");}return a}function W(d){Ra(Infinity!==d,"Cannot perform this action with an infinite size.")}function A(d){return null===d||void 0===d?ha():qb(d)&&!t(d)?d:ha().withMutations(function(a){var b=n(d);W(b.size);b.forEach(function(d,b){return a.set(b,d)})})}function qb(d){return!(!d||!d[Sb])}function Ja(d,a){this.ownerID=d;this.entries=a}function xa(d,a,b){this.ownerID=d;this.bitmap=a;this.nodes=b}function Ka(d,a,b){this.ownerID= d;this.count=a;this.nodes=b}function ta(d,a,b){this.ownerID=d;this.keyHash=a;this.entries=b}function ia(d,a,b){this.ownerID=d;this.keyHash=a;this.entry=b}function rb(d,a,b){this._type=a;this._reverse=b;this._stack=d._root&&{node:d._root,index:0,__prev:void 0}}function sb(d,a,b,e){var f=Object.create(x);f.size=d;f._root=a;f.__ownerID=b;f.__hash=e;f.__altered=!1;return f}function ha(){return Tb||(Tb=sb(0))}function Ub(d,a,b){var e;if(d._root){e=f(Hc);var g=f(Vb);a=tb(d._root,d.__ownerID,0,void 0,a, b,e,g);if(!g.value)return d;e=d.size+(e.value?b===z?-1:1:0)}else{if(b===z)return d;e=1;a=new Ja(d.__ownerID,[[a,b]])}return d.__ownerID?(d.size=e,d._root=a,d.__hash=void 0,d.__altered=!0,d):a?sb(e,a):ha()}function tb(d,a,b,e,f,g,m,c){if(!d){if(g===z)return d;s(c);s(m);return new ia(a,e,[f,g])}return d.update(a,b,e,f,g,m,c)}function ub(d,a,b,e,f){if(d.keyHash===e)return new ta(a,e,[d.entry,f]);var g=(0===b?d.keyHash:d.keyHash>>>b)&T,m=(0===b?e:e>>>b)&T,s;d=g===m?[ub(d,a,b+C,e,f)]:(s=new ia(a,e,f), g<m?[d,s]:[s,d]);return new xa(a,1<<g|1<<m,d)}function Ua(d,a,b){for(var f=[],g=0;g<b.length;g++){var m=b[g],s=n(m);e(m)||(s=s.map(function(d){return eb(d)}));f.push(s)}return Wb(d,a,f)}function Xb(d,a,b){return d&&d.mergeDeep&&e(a)?d.mergeDeep(a):H(d,a)?d:a}function Yb(d){return function(a,b,f){if(a&&a.mergeDeepWith&&e(b))return a.mergeDeepWith(d,b);b=d(a,b,f);return H(a,b)?a:b}}function Wb(d,a,b){b=b.filter(function(d){return 0!==d.size});return 0===b.length?d:0===d.size&&!d.__ownerID&&1===b.length? d.constructor(b[0]):d.withMutations(function(d){for(var e=a?function(b,e){d.update(e,z,function(d){return d===z?b:a(d,b,e)})}:function(a,r){d.set(r,a)},f=0;f<b.length;f++)b[f].forEach(e)})}function Zb(d,a,b,e){var f=d===z,g=a.next();if(g.done)return f=f?b:d,e=e(f),e===f?d:e;Ra(f||d&&d.set,"invalid keyPath");var g=g.value,m=f?z:d.get(g,z);e=Zb(m,a,b,e);return e===m?d:e===z?d.remove(g):(f?ha():d).set(g,e)}function $b(d){d-=d>>1&1431655765;d=(d&858993459)+(d>>2&858993459);d=d+(d>>4)&252645135;d+=d>> 8;return d+(d>>16)&127}function D(d){var a=vb();if(null===d||void 0===d)return a;if(ac(d))return d;var e=b(d),f=e.size;if(0===f)return a;W(f);return 0<f&&f<ba?La(0,f,C,null,new qa(e.toArray())):a.withMutations(function(d){d.setSize(f);e.forEach(function(a,r){return d.set(r,a)})})}function ac(d){return!(!d||!d[bc])}function qa(d,a){this.array=d;this.ownerID=a}function cc(d,a){function b(d,e){var c=e===m?s&&s.array:d&&d.array,q=e>f?0:f-e,k=g-e;k>ba&&(k=ba);return function(){if(q===k)return Ma;var d= a?--k:q++;return c&&c[d]}}function e(d,m,s){var c,q=d&&d.array,k=s>f?0:f-s>>m,h=(g-s>>m)+1;h>ba&&(h=ba);return function(){do{if(c){var d=c();if(d!==Ma)return d;c=null}if(k===h)return Ma;d=a?--h:k++;c=0===m-C?b(q&&q[d],s+(d<<m)):e(q&&q[d],m-C,s+(d<<m))}while(1)}}var f=d._origin,g=d._capacity,m=Na(g),s=d._tail;return 0===d._level?b(d._root,0):e(d._root,d._level,0)}function La(d,a,b,e,f,g,m){var s=Object.create(U);s.size=a-d;s._origin=d;s._capacity=a;s._level=b;s._root=e;s._tail=f;s.__ownerID=g;s.__hash= m;s.__altered=!1;return s}function vb(){return dc||(dc=La(0,0,C))}function Ic(d,a,b){a=S(d,a);if(a!==a)return d;if(a>=d.size||0>a)return d.withMutations(function(d){0>a?ra(d,a).set(0,b):ra(d,0,a+1).set(a,b)});a+=d._origin;var e=d._tail,g=d._root,m=f(Vb);a>=Na(d._capacity)?e=wb(e,d.__ownerID,0,a,b,m):g=wb(g,d.__ownerID,d._level,a,b,m);return!m.value?d:d.__ownerID?(d._root=g,d._tail=e,d.__hash=void 0,d.__altered=!0,d):La(d._origin,d._capacity,d._level,g,e)}function wb(d,a,b,e,f,g){var m=e>>>b&T,c=d&& m<d.array.length;if(!c&&void 0===f)return d;if(0<b){c=d&&d.array[m];f=wb(c,a,b-C,e,f,g);if(f===c)return d;d=ya(d,a);d.array[m]=f;return d}if(c&&d.array[m]===f)return d;s(g);d=ya(d,a);void 0===f&&m===d.array.length-1?d.array.pop():d.array[m]=f;return d}function ya(d,a){return a&&d&&a===d.ownerID?d:new qa(d?d.array.slice():[],a)}function ec(d,a){if(a>=Na(d._capacity))return d._tail;if(a<1<<d._level+C){for(var b=d._root,e=d._level;b&&0<e;)b=b.array[a>>>e&T],e-=C;return b}}function ra(d,a,b){void 0!== a&&(a|=0);void 0!==b&&(b|=0);var e=d.__ownerID||new l,f=d._origin,g=d._capacity;a=f+a;b=void 0===b?g:0>b?g+b:f+b;if(a===f&&b===g)return d;if(a>=b)return d.clear();for(var m=d._level,s=d._root,c=0;0>a+c;)s=new qa(s&&s.array.length?[void 0,s]:[],e),m+=C,c+=1<<m;c&&(a+=c,f+=c,b+=c,g+=c);for(var q=Na(g),k=Na(b);k>=1<<m+C;)s=new qa(s&&s.array.length?[s]:[],e),m+=C;var c=d._tail,h=k<q?ec(d,b-1):k>q?new qa([],e):c;if(c&&k>q&&a<g&&c.array.length){for(var n=s=ya(s,e),t=m;t>C;t-=C)var v=q>>>t&T,n=n.array[v]= ya(n.array[v],e);n.array[q>>>C&T]=c}b<g&&(h=h&&h.removeAfter(e,0,b));if(a>=k)a-=k,b-=k,m=C,s=null,h=h&&h.removeBefore(e,0,a);else if(a>f||k<q){for(c=0;s;){g=a>>>m&T;if(g!==k>>>m&T)break;g&&(c+=(1<<m)*g);m-=C;s=s.array[g]}s&&a>f&&(s=s.removeBefore(e,m,a-c));s&&k<q&&(s=s.removeAfter(e,m,k-c));c&&(a-=c,b-=c)}return d.__ownerID?(d.size=b-a,d._origin=a,d._capacity=b,d._level=m,d._root=s,d._tail=h,d.__hash=void 0,d.__altered=!0,d):La(a,b,m,s,h)}function Va(d,a,f){for(var g=[],m=0,s=0;s<f.length;s++){var c= f[s],k=b(c);k.size>m&&(m=k.size);e(c)||(k=k.map(function(d){return eb(d)}));g.push(k)}m>d.size&&(d=d.setSize(m));return Wb(d,a,g)}function Na(d){return d<ba?0:d-1>>>C<<C}function I(d){return null===d||void 0===d?Wa():fc(d)?d:Wa().withMutations(function(a){var b=n(d);W(b.size);b.forEach(function(d,b){return a.set(b,d)})})}function fc(d){return qb(d)&&t(d)}function xb(d,a,b,e){var f=Object.create(I.prototype);f.size=d?d.size:0;f._map=d;f._list=a;f.__ownerID=b;f.__hash=e;return f}function Wa(){return gc|| (gc=xb(ha(),vb()))}function hc(d,a,b){var e=d._map,f=d._list,g=e.get(a),m=void 0!==g;if(b===z){if(!m)return d;f.size>=ba&&f.size>=2*e.size?(a=f.filter(function(d,a){return void 0!==d&&g!==a}),e=a.toKeyedSeq().map(function(d){return d[0]}).flip().toMap(),d.__ownerID&&(e.__ownerID=a.__ownerID=d.__ownerID)):(e=e.remove(a),a=g===f.size-1?f.pop():f.set(g,void 0))}else if(m){if(b===f.get(g)[1])return d;a=f.set(g,[a,b])}else e=e.set(a,f.size),a=f.set(f.size,[a,b]);return d.__ownerID?(d.size=e.size,d._map= e,d._list=a,d.__hash=void 0,d):xb(e,a)}function ca(d,a){this._iter=d;this._useKeys=a;this.size=d.size}function za(d){this._iter=d;this.size=d.size}function Aa(d){this._iter=d;this.size=d.size}function Ba(d){this._iter=d;this.size=d.size}function ic(d){var a=ja(d);a._iter=d;a.size=d.size;a.flip=function(){return d};a.reverse=function(){var a=d.reverse.apply(this);a.flip=function(){return d.reverse()};return a};a.has=function(a){return d.includes(a)};a.includes=function(a){return d.has(a)};a.cacheResult= yb;a.__iterateUncached=function(a,b){var r=this;return d.__iterate(function(d,b){return!1!==a(b,d,r)},b)};a.__iteratorUncached=function(a,b){if(a===ka){var r=d.__iterator(a,b);return new w(function(){var d=r.next();if(!d.done){var a=d.value[0];d.value[0]=d.value[1];d.value[1]=a}return d})}return d.__iterator(a===da?Oa:da,b)};return a}function jc(d,a,b){var e=ja(d);e.size=d.size;e.has=function(a){return d.has(a)};e.get=function(e,f){var g=d.get(e,z);return g===z?f:a.call(b,g,e,d)};e.__iterateUncached= function(e,f){var g=this;return d.__iterate(function(d,f,m){return!1!==e(a.call(b,d,f,m),f,g)},f)};e.__iteratorUncached=function(e,f){var g=d.__iterator(ka,f);return new w(function(){var f=g.next();if(f.done)return f;var m=f.value,s=m[0];return y(e,s,a.call(b,m[1],s,d),f)})};return e}function zb(d,a){var b=ja(d);b._iter=d;b.size=d.size;b.reverse=function(){return d};d.flip&&(b.flip=function(){var a=ic(d);a.reverse=function(){return d.flip()};return a});b.get=function(b,e){return d.get(a?b:-1-b,e)}; b.has=function(b){return d.has(a?b:-1-b)};b.includes=function(a){return d.includes(a)};b.cacheResult=yb;b.__iterate=function(a,b){var r=this;return d.__iterate(function(d,b){return a(d,b,r)},!b)};b.__iterator=function(a,b){return d.__iterator(a,!b)};return b}function kc(d,a,b,e){var f=ja(d);e&&(f.has=function(e){var f=d.get(e,z);return f!==z&&!!a.call(b,f,e,d)},f.get=function(e,f){var g=d.get(e,z);return g!==z&&a.call(b,g,e,d)?g:f});f.__iterateUncached=function(f,g){var m=this,s=0;d.__iterate(function(d, g,c){if(a.call(b,d,g,c))return s++,f(d,e?g:s-1,m)},g);return s};f.__iteratorUncached=function(f,g){var m=d.__iterator(ka,g),s=0;return new w(function(){for(;;){var g=m.next();if(g.done)return g;var c=g.value,k=c[0],c=c[1];if(a.call(b,c,k,d))return y(f,e?k:s++,c,g)}})};return f}function Jc(d,a,b){var e=A().asMutable();d.__iterate(function(f,g){e.update(a.call(b,f,g,d),0,function(d){return d+1})});return e.asImmutable()}function Kc(d,a,e){var f=g(d),m=(t(d)?I():A()).asMutable();d.__iterate(function(b, g){m.update(a.call(e,b,g,d),function(d){return d=d||[],d.push(f?[g,b]:b),d})});var s=g(d)?n:q(d)?b:k;return m.map(function(a){return B(d,s(a))})}function Ab(d,a,b,e){var f=d.size;void 0!==a&&(a|=0);void 0!==b&&(b|=0);if(na(a,b,f))return d;var g=K(a,f,0),f=K(b,f,f);if(g!==g||f!==f)return Ab(d.toSeq().cacheResult(),a,b,e);a=f-g;var m;a===a&&(m=0>a?0:a);a=ja(d);a.size=0===m?m:d.size&&m||void 0;!e&&(db(d)&&0<=m)&&(a.get=function(a,b){a=S(this,a);return 0<=a&&a<m?d.get(a+g,b):b});a.__iterateUncached=function(a, b){var f=this;if(0===m)return 0;if(b)return this.cacheResult().__iterate(a,b);var r=0,s=!0,c=0;d.__iterate(function(d,b){if(!s||!(s=r++<g))return c++,!1!==a(d,e?b:c-1,f)&&c!==m});return c};a.__iteratorUncached=function(a,b){if(0!==m&&b)return this.cacheResult().__iterator(a,b);var f=0!==m&&d.__iterator(a,b),r=0,s=0;return new w(function(){for(;r++<g;)f.next();if(++s>m)return u();var d=f.next();return e||a===da?d:a===Oa?y(a,s-1,void 0,d):y(a,s-1,d.value[1],d)})};return a}function Lc(d,a,b){var e=ja(d); e.__iterateUncached=function(e,f){var g=this;if(f)return this.cacheResult().__iterate(e,f);var m=0;d.__iterate(function(d,f,s){return a.call(b,d,f,s)&&++m&&e(d,f,g)});return m};e.__iteratorUncached=function(e,f){var g=this;if(f)return this.cacheResult().__iterator(e,f);var m=d.__iterator(ka,f),s=!0;return new w(function(){if(!s)return u();var d=m.next();if(d.done)return d;var f=d.value,c=f[0],f=f[1];return!a.call(b,f,c,g)?(s=!1,u()):e===ka?d:y(e,c,f,d)})};return e}function lc(d,a,b,e){var f=ja(d); f.__iterateUncached=function(f,g){var m=this;if(g)return this.cacheResult().__iterate(f,g);var s=!0,c=0;d.__iterate(function(d,g,k){if(!s||!(s=a.call(b,d,g,k)))return c++,f(d,e?g:c-1,m)});return c};f.__iteratorUncached=function(f,g){var m=this;if(g)return this.cacheResult().__iterator(f,g);var s=d.__iterator(ka,g),c=!0,k=0;return new w(function(){var d,g,q;do{d=s.next();if(d.done)return e||f===da?d:f===Oa?y(f,k++,void 0,d):y(f,k++,d.value[1],d);q=d.value;g=q[0];q=q[1];c&&(c=a.call(b,q,g,m))}while(c); return f===ka?d:y(f,g,q,d)})};return f}function Mc(d,a){var b=g(d),f=[d].concat(a).map(function(d){e(d)?b&&(d=n(d)):d=b?Mb(d):cb(Array.isArray(d)?d:[d]);return d}).filter(function(d){return 0!==d.size});if(0===f.length)return d;if(1===f.length){var m=f[0];if(m===d||b&&g(m)||q(d)&&q(m))return m}m=new ga(f);b?m=m.toKeyedSeq():q(d)||(m=m.toSetSeq());m=m.flatten(!0);m.size=f.reduce(function(d,a){if(void 0!==d){var b=a.size;if(void 0!==b)return d+b}},0);return m}function mc(d,a,b){var f=ja(d);f.__iterateUncached= function(f,g){function m(d,k){var q=this;d.__iterate(function(d,g){if((!a||k<a)&&e(d))m(d,k+1);else if(!1===f(d,b?g:s++,q))c=!0;return!c},g)}var s=0,c=!1;m(d,0);return s};f.__iteratorUncached=function(f,g){var m=d.__iterator(f,g),s=[],c=0;return new w(function(){for(;m;){var d=m.next();if(!1!==d.done)m=s.pop();else{var k=d.value;f===ka&&(k=k[1]);if((!a||s.length<a)&&e(k))s.push(m),m=k.__iterator(f,g);else return b?d:y(f,c++,k,d)}}return u()})};return f}function Nc(d,a,f){var e=g(d)?n:q(d)?b:k;return d.toSeq().map(function(b, g){return e(a.call(f,b,g,d))}).flatten(!0)}function Oc(d,a){var b=ja(d);b.size=d.size&&2*d.size-1;b.__iterateUncached=function(b,f){var e=this,g=0;d.__iterate(function(d,f){return(!g||!1!==b(a,g++,e))&&!1!==b(d,g++,e)},f);return g};b.__iteratorUncached=function(b,f){var e=d.__iterator(da,f),g=0,m;return new w(function(){if(!m||g%2)if(m=e.next(),m.done)return m;return g%2?y(b,g++,a):y(b,g++,m.value,m)})};return b}function Ca(d,a,b){a||(a=nc);var f=g(d),e=0,m=d.toSeq().map(function(a,f){return[f,a, e++,b?b(a,f,d):a]}).toArray();m.sort(function(d,b){return a(d[3],b[3])||d[2]-b[2]}).forEach(f?function(d,a){m[a].length=2}:function(d,a){m[a]=d[1]});return f?Q(m):q(d)?F(m):Z(m)}function Xa(d,a,b){a||(a=nc);if(b){var f=d.toSeq().map(function(a,f){return[a,b(a,f,d)]}).reduce(function(d,b){return oc(a,d[1],b[1])?b:d});return f&&f[0]}return d.reduce(function(d,b){return oc(a,d,b)?b:d})}function oc(d,a,b){d=d(b,a);return 0===d&&b!==a&&(void 0===b||null===b||b!==b)||0<d}function Bb(d,a,b){d=ja(d);d.size= (new ga(b)).map(function(d){return d.size}).min();d.__iterate=function(d,a){for(var b=this.__iterator(da,a),f,e=0;!(f=b.next()).done&&!1!==d(f.value,e++,this););return e};d.__iteratorUncached=function(d,f){var e=b.map(function(d){return d=c(d),aa(f?d.reverse():d)}),g=0,m=!1;return new w(function(){var b;m||(b=e.map(function(d){return d.next()}),m=b.some(function(d){return d.done}));return m?u():y(d,g++,a.apply(null,b.map(function(d){return d.value})))})};return d}function B(d,a){return db(d)?a:d.constructor(a)} function pc(d){if(d!==Object(d))throw new TypeError("Expected [K, V] tuple: "+d);}function qc(d){W(d.size);return R(d)}function ja(d){return Object.create((g(d)?Q:q(d)?F:Z).prototype)}function yb(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):G.prototype.cacheResult.call(this)}function nc(d,a){return d>a?1:d<a?-1:0}function rc(d){var a=aa(d);if(!a){if(!(d&&"number"===typeof d.length))throw new TypeError("Expected iterable or array-like: "+d);a=aa(c(d))}return a} function X(d,a){var b,f=function(g){if(g instanceof f)return g;if(!(this instanceof f))return new f(g);if(!b){b=!0;var m=Object.keys(d);try{m.forEach(Pc.bind(void 0,e))}catch(s){}e.size=m.length;e._name=a;e._keys=m;e._defaultValues=d}this._map=A(g)},e=f.prototype=Object.create(L);return e.constructor=f}function Ya(d,a,b){d=Object.create(Object.getPrototypeOf(d));d._map=a;d.__ownerID=b;return d}function Pc(d,a){Object.defineProperty(d,a,{get:function(){return this.get(a)},set:function(d){Ra(this.__ownerID, "Cannot set on an immutable record.");this.set(a,d)}})}function E(d){return null===d||void 0===d?Cb():Db(d)&&!t(d)?d:Cb().withMutations(function(a){var b=k(d);W(b.size);b.forEach(function(d){return a.add(d)})})}function Db(d){return!(!d||!d[sc])}function Eb(d,a){return d.__ownerID?(d.size=a.size,d._map=a,d):a===d._map?d:0===a.size?d.__empty():d.__make(a)}function tc(d,a){var b=Object.create(Y);b.size=d?d.size:0;b._map=d;b.__ownerID=a;return b}function Cb(){return uc||(uc=tc(ha()))}function la(d){return null=== d||void 0===d?Fb():vc(d)?d:Fb().withMutations(function(a){var b=k(d);W(b.size);b.forEach(function(d){return a.add(d)})})}function vc(d){return Db(d)&&t(d)}function wc(d,a){var b=Object.create(Za);b.size=d?d.size:0;b._map=d;b.__ownerID=a;return b}function Fb(){return xc||(xc=wc(Wa()))}function J(d){return null===d||void 0===d?Da||(Da=ua(0)):yc(d)?d:(Da||(Da=ua(0))).unshiftAll(d)}function yc(d){return!(!d||!d[zc])}function ua(d,a,b,f){var e=Object.create(Ea);e.size=d;e._head=a;e.__ownerID=b;e.__hash= f;e.__altered=!1;return e}function ma(d,a){var b=function(b){d.prototype[b]=a[b]};Object.keys(a).forEach(b);Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(a).forEach(b);return d}function Qc(d,a){return a}function Rc(d,a){return[a,d]}function $a(d){return function(){return!d.apply(this,arguments)}}function Ac(d){return function(){return-d.apply(this,arguments)}}function Bc(d){return"string"===typeof d?JSON.stringify(d):d}function Sc(){return v(arguments)}function Cc(d,a){return d<a?1:d> a?-1:0}function Tc(d){if(Infinity===d.size)return 0;var a=t(d),b=g(d),f=a?1:0;d=d.__iterate(b?a?function(d,a){f=31*f+Dc(V(d),V(a))|0}:function(d,a){f=f+Dc(V(d),V(a))|0}:a?function(d){f=31*f+V(d)|0}:function(d){f=f+V(d)|0});return Uc(d,f)}function Uc(d,a){a=Pa(a,3432918353);a=Pa(a<<15|a>>>-15,461845907);a=Pa(a<<13|a>>>-13,5);a=(a+3864292196|0)^d;a=Pa(a^a>>>16,2246822507);a=Pa(a^a>>>13,3266489909);return(a^a>>>16)>>>1&1073741824|(a^a>>>16)&3221225471}function Dc(d,a){return d^a+2654435769+(d<<6)+(d>> 2)|0}var fa=Array.prototype.slice;a(n,c);a(b,c);a(k,c);c.isIterable=e;c.isKeyed=g;c.isIndexed=q;c.isAssociative=m;c.isOrdered=t;c.Keyed=n;c.Indexed=b;c.Set=k;var Hb="@@__IMMUTABLE_ITERABLE__@@",Ib="@@__IMMUTABLE_KEYED__@@",Jb="@@__IMMUTABLE_INDEXED__@@",va="@@__IMMUTABLE_ORDERED__@@",C=5,ba=1<<C,T=ba-1,z={},Hc={value:!1},Vb={value:!1},Oa=0,da=1,ka=2,bb="function"===typeof Symbol&&Symbol.iterator,Kb="@@iterator",Gb=bb||Kb;w.prototype.toString=function(){return"[Iterator]"};w.KEYS=Oa;w.VALUES=da;w.ENTRIES= ka;w.prototype.inspect=w.prototype.toSource=function(){return this.toString()};w.prototype[Gb]=function(){return this};a(G,c);G.of=function(){return G(arguments)};G.prototype.toSeq=function(){return this};G.prototype.toString=function(){return this.__toString("Seq {","}")};G.prototype.cacheResult=function(){!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length);return this};G.prototype.__iterate=function(d,a){return Pb(this,d,a,!0)};G.prototype.__iterator= function(d,a){return Qb(this,d,a,!0)};a(Q,G);Q.prototype.toKeyedSeq=function(){return this};a(F,G);F.of=function(){return F(arguments)};F.prototype.toIndexedSeq=function(){return this};F.prototype.toString=function(){return this.__toString("Seq [","]")};F.prototype.__iterate=function(d,a){return Pb(this,d,a,!1)};F.prototype.__iterator=function(d,a){return Qb(this,d,a,!1)};a(Z,G);Z.of=function(){return Z(arguments)};Z.prototype.toSetSeq=function(){return this};G.isSeq=db;G.Keyed=Q;G.Set=Z;G.Indexed= F;var Nb="@@__IMMUTABLE_SEQ__@@";G.prototype[Nb]=!0;a(ga,F);ga.prototype.get=function(d,a){return this.has(d)?this._array[S(this,d)]:a};ga.prototype.__iterate=function(d,a){for(var b=this._array,f=b.length-1,e=0;e<=f;e++)if(!1===d(b[a?f-e:e],e,this))return e+1;return e};ga.prototype.__iterator=function(d,a){var b=this._array,f=b.length-1,e=0;return new w(function(){return e>f?u():y(d,e,b[a?f-e++:e++])})};a(oa,Q);oa.prototype.get=function(d,a){return void 0!==a&&!this.has(d)?a:this._object[d]};oa.prototype.has= function(d){return this._object.hasOwnProperty(d)};oa.prototype.__iterate=function(d,a){for(var b=this._object,f=this._keys,e=f.length-1,g=0;g<=e;g++){var m=f[a?e-g:g];if(!1===d(b[m],m,this))return g+1}return g};oa.prototype.__iterator=function(d,a){var b=this._object,f=this._keys,e=f.length-1,g=0;return new w(function(){var m=f[a?e-g:g];return g++>e?u():y(d,m,b[m])})};oa.prototype[va]=!0;a(Ga,F);Ga.prototype.__iterateUncached=function(d,a){if(a)return this.cacheResult().__iterate(d,a);var b=aa(this._iterable), f=0;if($(b))for(var e;!(e=b.next()).done&&!1!==d(e.value,f++,this););return f};Ga.prototype.__iteratorUncached=function(d,a){if(a)return this.cacheResult().__iterator(d,a);var b=aa(this._iterable);if(!$(b))return new w(u);var f=0;return new w(function(){var a=b.next();return a.done?a:y(d,f++,a.value)})};a(Ha,F);Ha.prototype.__iterateUncached=function(d,a){if(a)return this.cacheResult().__iterate(d,a);for(var b=this._iterator,f=this._iteratorCache,e=0;e<f.length;)if(!1===d(f[e],e++,this))return e; for(var g;!(g=b.next()).done&&!(g=g.value,f[e]=g,!1===d(g,e++,this)););return e};Ha.prototype.__iteratorUncached=function(d,a){if(a)return this.cacheResult().__iterator(d,a);var b=this._iterator,f=this._iteratorCache,e=0;return new w(function(){if(e>=f.length){var a=b.next();if(a.done)return a;f[e]=a.value}return y(d,e,f[e++])})};var Ob;a(N,F);N.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"};N.prototype.get=function(d,a){return this.has(d)? this._value:a};N.prototype.includes=function(d){return H(this._value,d)};N.prototype.slice=function(d,a){var b=this.size;return na(d,a,b)?this:new N(this._value,K(a,b,b)-K(d,b,0))};N.prototype.reverse=function(){return this};N.prototype.indexOf=function(d){return H(this._value,d)?0:-1};N.prototype.lastIndexOf=function(d){return H(this._value,d)?this.size:-1};N.prototype.__iterate=function(d,a){for(var b=0;b<this.size;b++)if(!1===d(this._value,b,this))return b+1;return b};N.prototype.__iterator=function(d, a){var b=this,f=0;return new w(function(){return f<b.size?y(d,f++,b._value):u()})};N.prototype.equals=function(d){return d instanceof N?H(this._value,d._value):hb(d)};var ib;a(O,F);O.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1<this._step?" by "+this._step:"")+" ]"};O.prototype.get=function(d,a){return this.has(d)?this._start+S(this,d)*this._step:a};O.prototype.includes=function(d){d=(d-this._start)/this._step;return 0<=d&&d<this.size&&d=== Math.floor(d)};O.prototype.slice=function(d,a){if(na(d,a,this.size))return this;d=K(d,this.size,0);a=K(a,this.size,this.size);return a<=d?new O(0,0):new O(this.get(d,this._end),this.get(a,this._end),this._step)};O.prototype.indexOf=function(d){d-=this._start;return 0===d%this._step&&(d/=this._step,0<=d&&d<this.size)?d:-1};O.prototype.lastIndexOf=function(d){return this.indexOf(d)};O.prototype.__iterate=function(d,a){for(var b=this.size-1,f=this._step,e=a?this._start+b*f:this._start,g=0;g<=b;g++){if(!1=== d(e,g,this))return g+1;e+=a?-f:f}return g};O.prototype.__iterator=function(d,a){var b=this.size-1,f=this._step,e=a?this._start+b*f:this._start,g=0;return new w(function(){var m=e;e+=a?-f:f;return g>b?u():y(d,g++,m)})};O.prototype.equals=function(d){return d instanceof O?this._start===d._start&&this._end===d._end&&this._step===d._step:hb(this,d)};var jb;a(pa,c);a(Ia,pa);a(wa,pa);a(Sa,pa);pa.Keyed=Ia;pa.Indexed=wa;pa.Set=Sa;var Pa="function"===typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul: function(d,a){d|=0;a|=0;var b=d&65535,f=a&65535;return b*f+((d>>>16)*f+b*(a>>>16)<<16>>>0)|0},Rb=Object.isExtensible,Ta;try{Object.defineProperty({},"@",{}),Ta=!0}catch(Yc){Ta=!1}var nb="function"===typeof WeakMap,ob;nb&&(ob=new WeakMap);var pb=0,sa="__immutablehash__";"function"===typeof Symbol&&(sa=Symbol(sa));var Ec=16,Fc=255,mb=0,kb={};a(A,Ia);A.prototype.toString=function(){return this.__toString("Map {","}")};A.prototype.get=function(d,a){return this._root?this._root.get(0,void 0,d,a):a};A.prototype.set= function(d,a){return Ub(this,d,a)};A.prototype.setIn=function(d,a){return this.updateIn(d,z,function(){return a})};A.prototype.remove=function(d){return Ub(this,d,z)};A.prototype.deleteIn=function(d){return this.updateIn(d,function(){return z})};A.prototype.update=function(d,a,b){return 1===arguments.length?d(this):this.updateIn([d],a,b)};A.prototype.updateIn=function(d,a,b){b||(b=a,a=void 0);d=Zb(this,rc(d),a,b);return d===z?void 0:d};A.prototype.clear=function(){return 0===this.size?this:this.__ownerID? (this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ha()};A.prototype.merge=function(){return Ua(this,void 0,arguments)};A.prototype.mergeWith=function(d){var a=fa.call(arguments,1);return Ua(this,d,a)};A.prototype.mergeIn=function(d){var a=fa.call(arguments,1);return this.updateIn(d,ha(),function(d){return"function"===typeof d.merge?d.merge.apply(d,a):a[a.length-1]})};A.prototype.mergeDeep=function(){return Ua(this,Xb,arguments)};A.prototype.mergeDeepWith=function(d){var a=fa.call(arguments, 1);return Ua(this,Yb(d),a)};A.prototype.mergeDeepIn=function(d){var a=fa.call(arguments,1);return this.updateIn(d,ha(),function(d){return"function"===typeof d.mergeDeep?d.mergeDeep.apply(d,a):a[a.length-1]})};A.prototype.sort=function(d){return I(Ca(this,d))};A.prototype.sortBy=function(d,a){return I(Ca(this,a,d))};A.prototype.withMutations=function(d){var a=this.asMutable();d(a);return a.wasAltered()?a.__ensureOwner(this.__ownerID):this};A.prototype.asMutable=function(){return this.__ownerID?this: this.__ensureOwner(new l)};A.prototype.asImmutable=function(){return this.__ensureOwner()};A.prototype.wasAltered=function(){return this.__altered};A.prototype.__iterator=function(d,a){return new rb(this,d,a)};A.prototype.__iterate=function(d,a){var b=this,f=0;this._root&&this._root.iterate(function(a){f++;return d(a[1],a[0],b)},a);return f};A.prototype.__ensureOwner=function(d){return d===this.__ownerID?this:!d?(this.__ownerID=d,this.__altered=!1,this):sb(this.size,this._root,d,this.__hash)};A.isMap= qb;var Sb="@@__IMMUTABLE_MAP__@@",x=A.prototype;x[Sb]=!0;x["delete"]=x.remove;x.removeIn=x.deleteIn;Ja.prototype.get=function(d,a,b,f){d=this.entries;a=0;for(var e=d.length;a<e;a++)if(H(b,d[a][0]))return d[a][1];return f};Ja.prototype.update=function(d,a,b,f,e,g,m){b=e===z;a=this.entries;for(var c=0,k=a.length;c<k&&!H(f,a[c][0]);c++);var q=c<k;if(q?a[c][1]===e:b)return this;s(m);(b||!q)&&s(g);if(!(b&&1===a.length)){if(!q&&!b&&a.length>=Vc){d||(d=new l);f=new ia(d,V(f),[f,e]);for(e=0;e<a.length;e++)g= a[e],f=f.update(d,0,void 0,g[0],g[1]);return f}a=(g=d&&d===this.ownerID)?a:v(a);q?b?c===k-1?a.pop():a[c]=a.pop():a[c]=[f,e]:a.push([f,e]);return g?(this.entries=a,this):new Ja(d,a)}};xa.prototype.get=function(d,a,b,f){void 0===a&&(a=V(b));var e=1<<((0===d?a:a>>>d)&T),g=this.bitmap;return 0===(g&e)?f:this.nodes[$b(g&e-1)].get(d+C,a,b,f)};xa.prototype.update=function(d,a,b,f,e,g,m){void 0===b&&(b=V(f));var s=(0===a?b:b>>>a)&T,c=1<<s,k=this.bitmap,q=0!==(k&c);if(!q&&e===z)return this;var h=$b(k&c-1), n=this.nodes,t=q?n[h]:void 0;a=tb(t,d,a+C,b,f,e,g,m);if(a===t)return this;if(!q&&a&&n.length>=Wc){h=k;c=0;q=Array(ba);for(k=0;0!==h;k++,h>>>=1)q[k]=h&1?n[c++]:void 0;q[s]=a;return new Ka(d,c+1,q)}if(q&&!a&&2===n.length&&(n[h^1].constructor===ia||n[h^1].constructor===ta))return n[h^1];if(q&&a&&1===n.length&&(a.constructor===ia||a.constructor===ta))return a;s=d&&d===this.ownerID;c=q?a?k:k^c:k|c;if(q)if(a)n=s?n:v(n),n[h]=a;else if(a=n.length-1,s&&h===a)n.pop();else{q=Array(a);for(t=k=0;t<a;t++)t===h&& (k=1),q[t]=n[t+k];n=q}else if(q=n.length+1,s&&h+1===q)n[h]=a;else{k=Array(q);for(b=t=0;b<q;b++)b===h?(k[b]=a,t=-1):k[b]=n[b+t];n=k}return s?(this.bitmap=c,this.nodes=n,this):new xa(d,c,n)};Ka.prototype.get=function(d,a,b,f){void 0===a&&(a=V(b));var e=this.nodes[(0===d?a:a>>>d)&T];return e?e.get(d+C,a,b,f):f};Ka.prototype.update=function(d,a,b,f,e,g,m){void 0===b&&(b=V(f));var s=(0===a?b:b>>>a)&T,c=this.nodes,k=c[s];if(e===z&&!k)return this;a=tb(k,d,a+C,b,f,e,g,m);if(a===k)return this;b=this.count; if(k){if(!a&&(b--,b<Xc)){a=k=0;b=Array(b);f=0;e=1;for(g=c.length;f<g;f++,e<<=1)m=c[f],void 0!==m&&f!==s&&(k|=e,b[a++]=m);return new xa(d,k,b)}}else b++;c=(k=d&&d===this.ownerID)?c:v(c);c[s]=a;return k?(this.count=b,this.nodes=c,this):new Ka(d,b,c)};ta.prototype.get=function(d,a,b,f){d=this.entries;a=0;for(var e=d.length;a<e;a++)if(H(b,d[a][0]))return d[a][1];return f};ta.prototype.update=function(d,a,b,f,e,g,m){void 0===b&&(b=V(f));var c=e===z;if(b!==this.keyHash){if(c)return this;s(m);s(g);return ub(this, d,a,b,[f,e])}var k=this.entries;a=0;for(b=k.length;a<b&&!H(f,k[a][0]);a++);var q=a<b;if(q?k[a][1]===e:c)return this;s(m);(c||!q)&&s(g);if(c&&2===b)return new ia(d,this.keyHash,k[a^1]);m=(g=d&&d===this.ownerID)?k:v(k);q?c?a===b-1?m.pop():m[a]=m.pop():m[a]=[f,e]:m.push([f,e]);return g?(this.entries=m,this):new ta(d,this.keyHash,m)};ia.prototype.get=function(d,a,b,f){return H(b,this.entry[0])?this.entry[1]:f};ia.prototype.update=function(d,a,b,f,e,g,m){b=e===z;var c=H(f,this.entry[0]);if(c?e===this.entry[1]: b)return this;s(m);if(b)s(g);else{if(c)return d&&d===this.ownerID?(this.entry[1]=e,this):new ia(d,this.keyHash,[f,e]);s(g);return ub(this,d,a,V(f),[f,e])}};Ja.prototype.iterate=ta.prototype.iterate=function(d,a){for(var b=this.entries,f=0,e=b.length-1;f<=e;f++)if(!1===d(b[a?e-f:f]))return!1};xa.prototype.iterate=Ka.prototype.iterate=function(d,a){for(var b=this.nodes,f=0,e=b.length-1;f<=e;f++){var g=b[a?e-f:f];if(g&&!1===g.iterate(d,a))return!1}};ia.prototype.iterate=function(d,a){return d(this.entry)}; a(rb,w);rb.prototype.next=function(){for(var d=this._type,a=this._stack;a;){var b=a.node,f=a.index++,e;if(b.entry){if(0===f)return y(d,b.entry[0],b.entry[1])}else if(b.entries){if(e=b.entries.length-1,f<=e)return y(d,b.entries[this._reverse?e-f:f][0],b.entries[this._reverse?e-f:f][1])}else if(e=b.nodes.length-1,f<=e){if(b=b.nodes[this._reverse?e-f:f]){if(b.entry)return y(d,b.entry[0],b.entry[1]);a=this._stack={node:b,index:0,__prev:a}}continue}a=this._stack=this._stack.__prev}return u()};var Tb,Vc= ba/4,Wc=ba/2,Xc=ba/4;a(D,wa);D.of=function(){return this(arguments)};D.prototype.toString=function(){return this.__toString("List [","]")};D.prototype.get=function(d,a){d=S(this,d);if(0<=d&&d<this.size){d+=this._origin;var b=ec(this,d);return b&&b.array[d&T]}return a};D.prototype.set=function(d,a){return Ic(this,d,a)};D.prototype.remove=function(d){return!this.has(d)?this:0===d?this.shift():d===this.size-1?this.pop():this.splice(d,1)};D.prototype.insert=function(d,a){return this.splice(d,0,a)};D.prototype.clear= function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=C,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):vb()};D.prototype.push=function(){var d=arguments,a=this.size;return this.withMutations(function(b){ra(b,0,a+d.length);for(var f=0;f<d.length;f++)b.set(a+f,d[f])})};D.prototype.pop=function(){return ra(this,0,-1)};D.prototype.unshift=function(){var d=arguments;return this.withMutations(function(a){ra(a,-d.length);for(var b= 0;b<d.length;b++)a.set(b,d[b])})};D.prototype.shift=function(){return ra(this,1)};D.prototype.merge=function(){return Va(this,void 0,arguments)};D.prototype.mergeWith=function(d){var a=fa.call(arguments,1);return Va(this,d,a)};D.prototype.mergeDeep=function(){return Va(this,Xb,arguments)};D.prototype.mergeDeepWith=function(d){var a=fa.call(arguments,1);return Va(this,Yb(d),a)};D.prototype.setSize=function(d){return ra(this,0,d)};D.prototype.slice=function(d,a){var b=this.size;return na(d,a,b)?this: ra(this,K(d,b,0),K(a,b,b))};D.prototype.__iterator=function(d,a){var b=0,f=cc(this,a);return new w(function(){var a=f();return a===Ma?u():y(d,b++,a)})};D.prototype.__iterate=function(d,a){for(var b=0,f=cc(this,a),e;(e=f())!==Ma&&!1!==d(e,b++,this););return b};D.prototype.__ensureOwner=function(d){return d===this.__ownerID?this:!d?(this.__ownerID=d,this):La(this._origin,this._capacity,this._level,this._root,this._tail,d,this.__hash)};D.isList=ac;var bc="@@__IMMUTABLE_LIST__@@",U=D.prototype;U[bc]= !0;U["delete"]=U.remove;U.setIn=x.setIn;U.deleteIn=U.removeIn=x.removeIn;U.update=x.update;U.updateIn=x.updateIn;U.mergeIn=x.mergeIn;U.mergeDeepIn=x.mergeDeepIn;U.withMutations=x.withMutations;U.asMutable=x.asMutable;U.asImmutable=x.asImmutable;U.wasAltered=x.wasAltered;qa.prototype.removeBefore=function(d,a,b){if(b===a?1<<a:0===this.array.length)return this;var f=b>>>a&T;if(f>=this.array.length)return new qa([],d);var e=0===f,g;if(0<a){var m=this.array[f];g=m&&m.removeBefore(d,a-C,b);if(g===m&&e)return this}if(e&& !g)return this;d=ya(this,d);if(!e)for(e=0;e<f;e++)d.array[e]=void 0;g&&(d.array[f]=g);return d};qa.prototype.removeAfter=function(d,a,b){if(b===(a?1<<a:0)||0===this.array.length)return this;var f=b-1>>>a&T;if(f>=this.array.length)return this;var e;if(0<a){var g=this.array[f];e=g&&g.removeAfter(d,a-C,b);if(e===g&&f===this.array.length-1)return this}d=ya(this,d);d.array.splice(f+1);e&&(d.array[f]=e);return d};var Ma={},dc;a(I,A);I.of=function(){return this(arguments)};I.prototype.toString=function(){return this.__toString("OrderedMap {", "}")};I.prototype.get=function(d,a){var b=this._map.get(d);return void 0!==b?this._list.get(b)[1]:a};I.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Wa()};I.prototype.set=function(d,a){return hc(this,d,a)};I.prototype.remove=function(d){return hc(this,d,z)};I.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()};I.prototype.__iterate=function(d,a){var b=this;return this._list.__iterate(function(a){return a&& d(a[1],a[0],b)},a)};I.prototype.__iterator=function(d,a){return this._list.fromEntrySeq().__iterator(d,a)};I.prototype.__ensureOwner=function(d){if(d===this.__ownerID)return this;var a=this._map.__ensureOwner(d),b=this._list.__ensureOwner(d);return!d?(this.__ownerID=d,this._map=a,this._list=b,this):xb(a,b,d,this.__hash)};I.isOrderedMap=fc;I.prototype[va]=!0;I.prototype["delete"]=I.prototype.remove;var gc;a(ca,Q);ca.prototype.get=function(d,a){return this._iter.get(d,a)};ca.prototype.has=function(a){return this._iter.has(a)}; ca.prototype.valueSeq=function(){return this._iter.valueSeq()};ca.prototype.reverse=function(){var a=this,b=zb(this,!0);this._useKeys||(b.valueSeq=function(){return a._iter.toSeq().reverse()});return b};ca.prototype.map=function(a,b){var f=this,e=jc(this,a,b);this._useKeys||(e.valueSeq=function(){return f._iter.toSeq().map(a,b)});return e};ca.prototype.__iterate=function(a,b){var f=this,e;return this._iter.__iterate(this._useKeys?function(b,e){return a(b,e,f)}:(e=b?qc(this):0,function(g){return a(g, b?--e:e++,f)}),b)};ca.prototype.__iterator=function(a,b){if(this._useKeys)return this._iter.__iterator(a,b);var f=this._iter.__iterator(da,b),e=b?qc(this):0;return new w(function(){var g=f.next();return g.done?g:y(a,b?--e:e++,g.value,g)})};ca.prototype[va]=!0;a(za,F);za.prototype.includes=function(a){return this._iter.includes(a)};za.prototype.__iterate=function(a,b){var f=this,e=0;return this._iter.__iterate(function(b){return a(b,e++,f)},b)};za.prototype.__iterator=function(a,b){var f=this._iter.__iterator(da, b),e=0;return new w(function(){var b=f.next();return b.done?b:y(a,e++,b.value,b)})};a(Aa,Z);Aa.prototype.has=function(a){return this._iter.includes(a)};Aa.prototype.__iterate=function(a,b){var f=this;return this._iter.__iterate(function(b){return a(b,b,f)},b)};Aa.prototype.__iterator=function(a,b){var f=this._iter.__iterator(da,b);return new w(function(){var b=f.next();return b.done?b:y(a,b.value,b.value,b)})};a(Ba,Q);Ba.prototype.entrySeq=function(){return this._iter.toSeq()};Ba.prototype.__iterate= function(a,b){var f=this;return this._iter.__iterate(function(b){if(b){pc(b);var g=e(b);return a(g?b.get(1):b[1],g?b.get(0):b[0],f)}},b)};Ba.prototype.__iterator=function(a,b){var f=this._iter.__iterator(da,b);return new w(function(){for(;;){var b=f.next();if(b.done)return b;var g=b.value;if(g){pc(g);var m=e(g);return y(a,m?g.get(0):g[0],m?g.get(1):g[1],b)}}})};za.prototype.cacheResult=ca.prototype.cacheResult=Aa.prototype.cacheResult=Ba.prototype.cacheResult=yb;a(X,Ia);X.prototype.toString=function(){return this.__toString((this._name|| this.constructor.name||"Record")+" {","}")};X.prototype.has=function(a){return this._defaultValues.hasOwnProperty(a)};X.prototype.get=function(a,b){if(!this.has(a))return b;var f=this._defaultValues[a];return this._map?this._map.get(a,f):f};X.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var a=this.constructor;return a._empty||(a._empty=Ya(this,ha()))};X.prototype.set=function(a,b){if(!this.has(a))throw Error('Cannot set unknown key "'+a+'" on '+(this._name|| this.constructor.name||"Record"));var f=this._map&&this._map.set(a,b);return this.__ownerID||f===this._map?this:Ya(this,f)};X.prototype.remove=function(a){if(!this.has(a))return this;a=this._map&&this._map.remove(a);return this.__ownerID||a===this._map?this:Ya(this,a)};X.prototype.wasAltered=function(){return this._map.wasAltered()};X.prototype.__iterator=function(a,b){var f=this;return n(this._defaultValues).map(function(a,d){return f.get(d)}).__iterator(a,b)};X.prototype.__iterate=function(a,b){var f= this;return n(this._defaultValues).map(function(a,d){return f.get(d)}).__iterate(a,b)};X.prototype.__ensureOwner=function(a){if(a===this.__ownerID)return this;var b=this._map&&this._map.__ensureOwner(a);return!a?(this.__ownerID=a,this._map=b,this):Ya(this,b,a)};var L=X.prototype;L["delete"]=L.remove;L.deleteIn=L.removeIn=x.removeIn;L.merge=x.merge;L.mergeWith=x.mergeWith;L.mergeIn=x.mergeIn;L.mergeDeep=x.mergeDeep;L.mergeDeepWith=x.mergeDeepWith;L.mergeDeepIn=x.mergeDeepIn;L.setIn=x.setIn;L.update= x.update;L.updateIn=x.updateIn;L.withMutations=x.withMutations;L.asMutable=x.asMutable;L.asImmutable=x.asImmutable;a(E,Sa);E.of=function(){return this(arguments)};E.fromKeys=function(a){return this(n(a).keySeq())};E.prototype.toString=function(){return this.__toString("Set {","}")};E.prototype.has=function(a){return this._map.has(a)};E.prototype.add=function(a){return Eb(this,this._map.set(a,!0))};E.prototype.remove=function(a){return Eb(this,this._map.remove(a))};E.prototype.clear=function(){return Eb(this, this._map.clear())};E.prototype.union=function(){var a=fa.call(arguments,0),a=a.filter(function(a){return 0!==a.size});return 0===a.length?this:0===this.size&&!this.__ownerID&&1===a.length?this.constructor(a[0]):this.withMutations(function(b){for(var f=0;f<a.length;f++)k(a[f]).forEach(function(a){return b.add(a)})})};E.prototype.intersect=function(){var a=fa.call(arguments,0);if(0===a.length)return this;var a=a.map(function(a){return k(a)}),b=this;return this.withMutations(function(f){b.forEach(function(b){a.every(function(a){return a.includes(b)})|| f.remove(b)})})};E.prototype.subtract=function(){var a=fa.call(arguments,0);if(0===a.length)return this;var a=a.map(function(a){return k(a)}),b=this;return this.withMutations(function(f){b.forEach(function(b){a.some(function(a){return a.includes(b)})&&f.remove(b)})})};E.prototype.merge=function(){return this.union.apply(this,arguments)};E.prototype.mergeWith=function(a){var b=fa.call(arguments,1);return this.union.apply(this,b)};E.prototype.sort=function(a){return la(Ca(this,a))};E.prototype.sortBy= function(a,b){return la(Ca(this,b,a))};E.prototype.wasAltered=function(){return this._map.wasAltered()};E.prototype.__iterate=function(a,b){var f=this;return this._map.__iterate(function(b,e){return a(e,e,f)},b)};E.prototype.__iterator=function(a,b){return this._map.map(function(a,d){return d}).__iterator(a,b)};E.prototype.__ensureOwner=function(a){if(a===this.__ownerID)return this;var b=this._map.__ensureOwner(a);return!a?(this.__ownerID=a,this._map=b,this):this.__make(b,a)};E.isSet=Db;var sc="@@__IMMUTABLE_SET__@@", Y=E.prototype;Y[sc]=!0;Y["delete"]=Y.remove;Y.mergeDeep=Y.merge;Y.mergeDeepWith=Y.mergeWith;Y.withMutations=x.withMutations;Y.asMutable=x.asMutable;Y.asImmutable=x.asImmutable;Y.__empty=Cb;Y.__make=tc;var uc;a(la,E);la.of=function(){return this(arguments)};la.fromKeys=function(a){return this(n(a).keySeq())};la.prototype.toString=function(){return this.__toString("OrderedSet {","}")};la.isOrderedSet=vc;var Za=la.prototype;Za[va]=!0;Za.__empty=Fb;Za.__make=wc;var xc;a(J,wa);J.of=function(){return this(arguments)}; J.prototype.toString=function(){return this.__toString("Stack [","]")};J.prototype.get=function(a,b){var f=this._head;for(a=S(this,a);f&&a--;)f=f.next;return f?f.value:b};J.prototype.peek=function(){return this._head&&this._head.value};J.prototype.push=function(){if(0===arguments.length)return this;for(var a=this.size+arguments.length,b=this._head,f=arguments.length-1;0<=f;f--)b={value:arguments[f],next:b};return this.__ownerID?(this.size=a,this._head=b,this.__hash=void 0,this.__altered=!0,this): ua(a,b)};J.prototype.pushAll=function(a){a=b(a);if(0===a.size)return this;W(a.size);var f=this.size,e=this._head;a.reverse().forEach(function(a){f++;e={value:a,next:e}});return this.__ownerID?(this.size=f,this._head=e,this.__hash=void 0,this.__altered=!0,this):ua(f,e)};J.prototype.pop=function(){return this.slice(1)};J.prototype.unshift=function(){return this.push.apply(this,arguments)};J.prototype.unshiftAll=function(a){return this.pushAll(a)};J.prototype.shift=function(){return this.pop.apply(this, arguments)};J.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this.__hash=this._head=void 0,this.__altered=!0,this):Da||(Da=ua(0))};J.prototype.slice=function(a,b){if(na(a,b,this.size))return this;var f=K(a,this.size,0);if(K(b,this.size,this.size)!==this.size)return wa.prototype.slice.call(this,a,b);for(var e=this.size-f,g=this._head;f--;)g=g.next;return this.__ownerID?(this.size=e,this._head=g,this.__hash=void 0,this.__altered=!0,this):ua(e,g)};J.prototype.__ensureOwner= function(a){return a===this.__ownerID?this:!a?(this.__ownerID=a,this.__altered=!1,this):ua(this.size,this._head,a,this.__hash)};J.prototype.__iterate=function(a,b){if(b)return this.reverse().__iterate(a);for(var f=0,e=this._head;e&&!1!==a(e.value,f++,this);)e=e.next;return f};J.prototype.__iterator=function(a,b){if(b)return this.reverse().__iterator(a);var f=0,e=this._head;return new w(function(){if(e){var b=e.value;e=e.next;return y(a,f++,b)}return u()})};J.isStack=yc;var zc="@@__IMMUTABLE_STACK__@@", Ea=J.prototype;Ea[zc]=!0;Ea.withMutations=x.withMutations;Ea.asMutable=x.asMutable;Ea.asImmutable=x.asImmutable;Ea.wasAltered=x.wasAltered;var Da;c.Iterator=w;ma(c,{toArray:function(){W(this.size);var a=Array(this.size||0);this.valueSeq().__iterate(function(b,f){a[f]=b});return a},toIndexedSeq:function(){return new za(this)},toJS:function(){return this.toSeq().map(function(a){return a&&"function"===typeof a.toJS?a.toJS():a}).__toJS()},toJSON:function(){return this.toSeq().map(function(a){return a&& "function"===typeof a.toJSON?a.toJSON():a}).__toJS()},toKeyedSeq:function(){return new ca(this,!0)},toMap:function(){return A(this.toKeyedSeq())},toObject:function(){W(this.size);var a={};this.__iterate(function(b,f){a[f]=b});return a},toOrderedMap:function(){return I(this.toKeyedSeq())},toOrderedSet:function(){return la(g(this)?this.valueSeq():this)},toSet:function(){return E(g(this)?this.valueSeq():this)},toSetSeq:function(){return new Aa(this)},toSeq:function(){return q(this)?this.toIndexedSeq(): g(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return J(g(this)?this.valueSeq():this)},toList:function(){return D(g(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(a,b){return 0===this.size?a+b:a+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+b},concat:function(){var a=fa.call(arguments,0);return B(this,Mc(this,a))},includes:function(a){return this.some(function(b){return H(b,a)})},entries:function(){return this.__iterator(ka)},every:function(a, b){W(this.size);var f=!0;this.__iterate(function(e,g,m){if(!a.call(b,e,g,m))return f=!1});return f},filter:function(a,b){return B(this,kc(this,a,b,!0))},find:function(a,b,f){return(a=this.findEntry(a,b))?a[1]:f},findEntry:function(a,b){var f;this.__iterate(function(e,g,m){if(a.call(b,e,g,m))return f=[g,e],!1});return f},findLastEntry:function(a,b){return this.toSeq().reverse().findEntry(a,b)},forEach:function(a,b){W(this.size);return this.__iterate(b?a.bind(b):a)},join:function(a){W(this.size);a= void 0!==a?""+a:",";var b="",f=!0;this.__iterate(function(e){f?f=!1:b+=a;b+=null!==e&&void 0!==e?e.toString():""});return b},keys:function(){return this.__iterator(Oa)},map:function(a,b){return B(this,jc(this,a,b))},reduce:function(a,b,f){W(this.size);var e,g;2>arguments.length?g=!0:e=b;this.__iterate(function(b,m,s){g?(g=!1,e=b):e=a.call(f,e,b,m,s)});return e},reduceRight:function(a,b,f){var e=this.toKeyedSeq().reverse();return e.reduce.apply(e,arguments)},reverse:function(){return B(this,zb(this, !0))},slice:function(a,b){return B(this,Ab(this,a,b,!0))},some:function(a,b){return!this.every($a(a),b)},sort:function(a){return B(this,Ca(this,a))},values:function(){return this.__iterator(da)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(a,b){return R(a?this.toSeq().filter(a,b):this)},countBy:function(a,b){return Jc(this,a,b)},equals:function(a){return hb(this,a)},entrySeq:function(){var a= this;if(a._cache)return new ga(a._cache);var b=a.toSeq().map(Rc).toIndexedSeq();b.fromEntrySeq=function(){return a.toSeq()};return b},filterNot:function(a,b){return this.filter($a(a),b)},findLast:function(a,b,f){return this.toKeyedSeq().reverse().find(a,b,f)},first:function(){return this.find(ea)},flatMap:function(a,b){return B(this,Nc(this,a,b))},flatten:function(a){return B(this,mc(this,a,!0))},fromEntrySeq:function(){return new Ba(this)},get:function(a,b){return this.find(function(b,f){return H(f, a)},void 0,b)},getIn:function(a,b){for(var f=this,e=rc(a),g;!(g=e.next()).done;)if(g=g.value,f=f&&f.get?f.get(g,z):z,f===z)return b;return f},groupBy:function(a,b){return Kc(this,a,b)},has:function(a){return this.get(a,z)!==z},hasIn:function(a){return this.getIn(a,z)!==z},isSubset:function(a){a="function"===typeof a.includes?a:c(a);return this.every(function(b){return a.includes(b)})},isSuperset:function(a){a="function"===typeof a.isSubset?a:c(a);return a.isSubset(this)},keySeq:function(){return this.toSeq().map(Qc).toIndexedSeq()}, last:function(){return this.toSeq().reverse().first()},max:function(a){return Xa(this,a)},maxBy:function(a,b){return Xa(this,b,a)},min:function(a){return Xa(this,a?Ac(a):Cc)},minBy:function(a,b){return Xa(this,b?Ac(b):Cc,a)},rest:function(){return this.slice(1)},skip:function(a){return this.slice(Math.max(0,a))},skipLast:function(a){return B(this,this.toSeq().reverse().skip(a).reverse())},skipWhile:function(a,b){return B(this,lc(this,a,b,!0))},skipUntil:function(a,b){return this.skipWhile($a(a),b)}, sortBy:function(a,b){return B(this,Ca(this,b,a))},take:function(a){return this.slice(0,Math.max(0,a))},takeLast:function(a){return B(this,this.toSeq().reverse().take(a).reverse())},takeWhile:function(a,b){return B(this,Lc(this,a,b))},takeUntil:function(a,b){return this.takeWhile($a(a),b)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=Tc(this))}});var P=c.prototype;P[Hb]=!0;P[Gb]=P.values;P.__toJS=P.toArray;P.__toStringMapper=Bc;P.inspect=P.toSource= function(){return this.toString()};P.chain=P.flatMap;P.contains=P.includes;(function(){try{Object.defineProperty(P,"length",{get:function(){if(!c.noLengthWarning){var a;try{throw Error();}catch(d){a=d.stack}if(-1===a.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+a),this.size}}})}catch(a){}})();ma(n,{flip:function(){return B(this,ic(this))}, findKey:function(a,b){var f=this.findEntry(a,b);return f&&f[0]},findLastKey:function(a,b){return this.toSeq().reverse().findKey(a,b)},keyOf:function(a){return this.findKey(function(b){return H(b,a)})},lastKeyOf:function(a){return this.findLastKey(function(b){return H(b,a)})},mapEntries:function(a,b){var f=this,e=0;return B(this,this.toSeq().map(function(g,m){return a.call(b,[m,g],e++,f)}).fromEntrySeq())},mapKeys:function(a,b){var f=this;return B(this,this.toSeq().flip().map(function(e,g){return a.call(b, e,g,f)}).flip())}});var ab=n.prototype;ab[Ib]=!0;ab[Gb]=P.entries;ab.__toJS=P.toObject;ab.__toStringMapper=function(a,b){return JSON.stringify(b)+": "+Bc(a)};ma(b,{toKeyedSeq:function(){return new ca(this,!1)},filter:function(a,b){return B(this,kc(this,a,b,!1))},findIndex:function(a,b){var f=this.findEntry(a,b);return f?f[0]:-1},indexOf:function(a){a=this.toKeyedSeq().keyOf(a);return void 0===a?-1:a},lastIndexOf:function(a){a=this.toKeyedSeq().reverse().keyOf(a);return void 0===a?-1:a},reverse:function(){return B(this, zb(this,!1))},slice:function(a,b){return B(this,Ab(this,a,b,!1))},splice:function(a,b){var f=arguments.length;b=Math.max(b|0,0);if(0===f||2===f&&!b)return this;var e=0>a?this.count():this.size;a=K(a,e,0);e=this.slice(0,a);return B(this,1===f?e:e.concat(v(arguments,2),this.slice(a+b)))},findLastIndex:function(a,b){var f=this.toKeyedSeq().findLastKey(a,b);return void 0===f?-1:f},first:function(){return this.get(0)},flatten:function(a){return B(this,mc(this,a,!1))},get:function(a,b){a=S(this,a);return 0> a||Infinity===this.size||void 0!==this.size&&a>this.size?b:this.find(function(b,f){return f===a},void 0,b)},has:function(a){a=S(this,a);return 0<=a&&(void 0!==this.size?Infinity===this.size||a<this.size:-1!==this.indexOf(a))},interpose:function(a){return B(this,Oc(this,a))},interleave:function(){var a=[this].concat(v(arguments)),b=Bb(this.toSeq(),F.of,a),f=b.flatten(!0);b.size&&(f.size=b.size*a.length);return B(this,f)},last:function(){return this.get(-1)},skipWhile:function(a,b){return B(this,lc(this, a,b,!1))},zip:function(){var a=[this].concat(v(arguments));return B(this,Bb(this,Sc,a))},zipWith:function(a){var b=v(arguments);b[0]=this;return B(this,Bb(this,a,b))}});b.prototype[Jb]=!0;b.prototype[va]=!0;ma(k,{get:function(a,b){return this.has(a)?a:b},includes:function(a){return this.has(a)},keySeq:function(){return this.valueSeq()}});k.prototype.has=P.includes;ma(Q,n.prototype);ma(F,b.prototype);ma(Z,k.prototype);ma(Ia,n.prototype);ma(wa,b.prototype);ma(Sa,k.prototype);return{Iterable:c,Seq:G, Collection:pa,Map:A,OrderedMap:I,List:D,Stack:J,Set:E,OrderedSet:la,Record:X,Range:O,Repeat:N,is:H,fromJS:eb}})},36:function(l,c,a){l.exports={"default":a(351),__esModule:!0}},43:function(l,c,a){function p(a){return a&&a.__esModule?a:{"default":a}}c.__esModule=!0;l=a(372);var h=p(l);l=a(226);var n=p(l);a=a(71);var b=p(a);c.default=function(a,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof e?"undefined":(0,b.default)(e))); a.prototype=(0,n.default)(e&&e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});e&&(h.default?(0,h.default)(a,e):a.__proto__=e)}},44:function(l,c,a){c.__esModule=!0;var p=(l=a(71))&&l.__esModule?l:{"default":l};c.default=function(a,c){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&("object"===("undefined"===typeof c?"undefined":(0,p.default)(c))||"function"===typeof c)?c:a}},45:function(l,c){function a(a,c){c.forEach(function(b){Object.keys(Object(b)).forEach(function(c){a(c, b[c])})})}Object.defineProperty(c,"__esModule",{value:!0});c.isMutableObject=function(a){var c=a.constructor;return!!a&&"[object Object]"===Object.prototype.toString.call(a)&&p(c)&&!Object.isFrozen(a)&&(c instanceof c||"AltStore"===a.type)};c.eachObject=a;c.assign=function(c){for(var n=arguments.length,b=Array(1<n?n-1:0),k=1;k<n;k++)b[k-1]=arguments[k];a(function(a,b){return c[a]=b},b);return c};var p=c.isFunction=function(a){return"function"===typeof a}},49:function(l,c,a){var p=(c=a(3))&&c.__esModule? c:{"default":c},h=(c=a(4))&&c.__esModule?c:{"default":c};a=a(10);c=function(){function a(){(0,p.default)(this,a)}(0,h.default)(a,[{key:"bootstrap",value:function(a){return a}}]);return a}();a=a.createActions(c);window.StaticActions=a;l.exports=a},72:function(l,c,a){Object.defineProperty(c,"__esModule",{value:!0});var p=a(31),h=p&&p.__esModule?p:{"default":p},n=a(220);c["default"]=function(a,c){a.config=(0,n.assign)({setState:function(a,b){return this.state=b},getState:function(a){return a},onSerialize:function(a){return a.toJS()}, onDeserialize:function(a){return h["default"].fromJS(a)}},c);return a};l.exports=c["default"]},82:function(l,c,a){var p=a(54),h=a(24),n=a(147);l.exports=function(a,c){var e=(h.Object||{})[a]||Object[a],g={};g[a]=c(e);p(p.S+p.F*n(function(){e(1)}),"Object",g)}},87:function(l,c,a){c.__esModule=!0;var p=(l=a(349))&&l.__esModule?l:{"default":l};c.default=function(a){if(Array.isArray(a)){for(var c=0,b=Array(a.length);c<a.length;c++)b[c]=a[c];return b}return(0,p.default)(a)}},90:function(l,c,a){function p(a){return a&& a.__esModule?a:{"default":a}}c=a(3);var h=p(c);c=a(4);var n=p(c);c=a(87);var b=p(c),k=a(136),e=a(423);c=a(10);var g=a(420),q=a(503),m=e(q,function(a,f){f.features.forEach(function(f){var e=f.options;a.push(f.cookieKey);e&&a.push.apply(a,(0,b.default)(e.map(function(a){return a.cookieKey})))})},[]);a=function(){function a(){(0,h.default)(this,a);this.bindActions(g);this.exportPublicMethods({isFeatureEnabled:this.isFeatureEnabled});var f=m.filter(function(a){return k.get&&"true"===k.get(a)}),e=[].concat((0, b.default)(f));this.state={enabledFeatures:f,previousEnabledFeatures:e,featureGroups:[].concat((0,b.default)(q)),allFeatures:m}}(0,n.default)(a,[{key:"isFeatureEnabled",value:function(a){return-1!==this.getState().enabledFeatures.indexOf(a)}},{key:"onSetEnabledFeatures",value:function(a){var b=this.state.previousEnabledFeatures,e=b.filter(function(b){return 0>a.indexOf(b)}),g=a.filter(function(a){return 0>b.indexOf(a)});e.forEach(function(a){k.set(a,"",{expires:new Date(0)})});g.forEach(function(a){k.set(a, "true")});this.setState({enabledFeatures:a})}}]);return a}();l.exports=c.createStore(a,"BetaFeaturesStore")},122:function(l,c,a){function p(a,b){var f=b?q:g,e=b?a.prototype:a;return Object.getOwnPropertyNames(e).reduce(function(a,b){if(-1!==f.indexOf(b))return a;a[b]=e[b];return a},{})}function h(a){var b=1>=arguments.length||void 0===arguments[1]?{}:arguments[1];return a===Function.prototype?b:h(Object.getPrototypeOf(a),e.assign(b,p(a,!0)))}function n(a,b,f,e){return{type:b,payload:f,meta:k({dispatchId:a}, e),id:a,action:b,data:f,details:e}}function b(){}var k=Object.assign||function(a){for(var b=1;b<arguments.length;b++){var f=arguments[b],e;for(e in f)Object.prototype.hasOwnProperty.call(f,e)&&(a[e]=f[e])}return a};Object.defineProperty(c,"__esModule",{value:!0});c.getInternalMethods=p;c.getPrototypeChain=h;c.warn=function(a){"undefined"!==typeof console&&console.warn(new ReferenceError(a))};c.uid=function(a,b){for(var f=0,e=b;Object.hasOwnProperty.call(a,e);)e=b+String(++f);return e};c.formatAsConstant= function(a){return a.replace(/[a-z]([A-Z])/g,function(a){return String(a[0])+"_"+String(a[1].toLowerCase())}).toUpperCase()};c.dispatchIdentity=function(a){if(void 0===a)return null;for(var b=arguments.length,f=Array(1<b?b-1:0),e=1;e<b;e++)f[e-1]=arguments[e];return f.length?[a].concat(f):a};c.fsa=n;c.dispatch=function(a,b,f,g){f=b.dispatch(f);if(void 0===f)return null;var c=b.id,k={id:c,namespace:c,name:c};b=function(a){return g.dispatch(c,a,k)};return e.isFunction(f)?f(b,g):g.dispatcher.dispatch(n(a, c,f,k))};var e=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&(b[f]=a[f]);b["default"]=a;return b}(a(45)),g=Object.getOwnPropertyNames(b),q=Object.getOwnPropertyNames(b.prototype)},125:function(l,c,a){var p=a(182),h=a(249),n=a(415);c=a(235);var b=a(245);a=c(function(a,e){return null==a?{}:n(a,p(h(e,1),b))});l.exports=a},133:function(l,c,a){c.__esModule=!0;var p=(l=a(36))&&l.__esModule?l:{"default":l},h=(a=a(391))&&a.__esModule? a:{"default":a};c.default=function b(a,e,g){null===a&&(a=Function.prototype);var c=(0,h.default)(a,e);if(void 0===c)return a=(0,p.default)(a),null===a?void 0:b(a,e,g);if("value"in c)return c.value;e=c.get;return void 0===e?void 0:e.call(g)}},138:function(l,c,a){var p=(c=a(3))&&c.__esModule?c:{"default":c},h=(c=a(4))&&c.__esModule?c:{"default":c};c=a(10);var n=a(72),b=a(49),k=a(522),e=a(569),g=a(404);a=function(){function a(){(0,p.default)(this,a);this.state=new e;this.bindActions(k);this.bindActions(g); this.bindListeners({onStaticBootstrap:b.BOOTSTRAP});this.exportPublicMethods({save:this.save})}(0,h.default)(a,[{key:"onStaticBootstrap",value:function(a){this.setState(new e(a.websiteSettings))}},{key:"onUpdate",value:function(a){this.setState(this.state.merge(a))}},{key:"onUpdateStoreCurrencySuccess",value:function(a){var b=this.state,f=b.get("storeSettings"),f=f.set("selectedCurrency",a);this.setState(b.set("storeSettings",f))}},{key:"save",value:function(a){var b=1<arguments.length&&void 0!== arguments[1]?arguments[1]:{},f=this.getState().mergeDeep(a).toJS();return k.save(f,b)}}]);return a}();l.exports=c.createStore(n(a),"WebsiteSettingsStore")},139:function(l,c){l.exports={FOURSQUARE:1,FACEBOOK:2,FLICKR:3,TWITTER:4,GOOGLE:5,GOOGLE_SPREADSHEET:6,TUMBLR:8,DROPBOX:9,INSTAGRAM:10,YOUTUBE:11,VIMEO:12,MAILCHIMP:13,LINKEDIN:14,STRIPE:15,FIVEHUNDREDPIX:16,SMUGMUG:17,DRIBBBLE:18,PINTEREST:19,EMAIL:20,GOOGLEAUTH2:21,GOOGLEDOCS2:22,GITHUB:23,XERO:24,SOUNDCLOUD:25,SPOTIFY:26,ITUNES:27,GOOGLEPLAY:28, BANDSINTOWN:29,BEHANCE:30,CODEPEN:31,MEDIUM:32,MEETUP:33,RDIO:34,TWITCH:35,VEVO:36,VINE:37,VSCO:38,YELP:39,DROPBOX2:40,HOUZZ:42,REDDIT:43,STUMBLEUPON:44,PAYPAL_SANDBOX_ONBOARDING:45,PAYPAL_LIVE_ONBOARDING:46,PAYPAL_SANDBOX_BILLING:47,PAYPAL_LIVE_BILLING:48,CHOWNOW:49}},182:function(l,c){l.exports=function(a,c){for(var h=-1,n=a?a.length:0,b=Array(n);++h<n;)b[h]=c(a[h],h,a);return b}},184:function(l,c,a){function p(a){return a&&a.__esModule?a:{"default":a}}c=a(20);var h=p(c);c=a(17);var n=p(c);c=a(3); var b=p(c);c=a(4);var k=p(c),e=a(382);c=a(10);var g=a(998),q=a(49),m=a(535),t=a(187),f=a(718);a=a(1247);var s=a.DEFAULT_COLLECTION_CONFIGURATIONS,M=a.DEFAULT_COLLECTION_CONFIGURATION,v=a.DEFAULT_TEMPLATE_PAGE_CONFIGURATION;a=function(){function a(){(0,b.default)(this,a);this.bindListeners({handleLoadTemplate:m.LOAD_TEMPLATE,staticInitialized:q.BOOTSTRAP});this.exportPublicMethods({isTemplateOwner:this.isTemplateOwner,getCollectionConfig:this.getCollectionConfig,getCustomType:this.getCustomType,getPageConfig:this.getPageConfig})} (0,k.default)(a,[{key:"getCollectionConfig",value:function(a){return this.getState().collectionConfigs[a]}},{key:"getCustomType",value:function(a){return this.getState().customTypes[a]}},{key:"getPageConfig",value:function(a){return this.getState().pageConfigs[a]}},{key:"isTemplateOwner",value:function(){var a=this.getState();return a.ownerWebsiteId===a.websiteId}},{key:"staticInitialized",value:function(a){this.setTemplateData(a.template);this.demoCollections=this.processDemoCollections(a.demoCollections); this.websiteId=a.website.id;a.templateInstallation&&(this.installationId=a.templateInstallation.id)}},{key:"handleLoadTemplate",value:function(a){this.waitFor(g.dispatchToken);a.error?this.error=a.response:(this.error=null,this.setTemplateData(a.template),this.demoCollections=this.processDemoCollections(a.demoCollections),this.installationId=a.installation.id)}},{key:"setTemplateData",value:function(a){a&&(this.id=a.id,this.name=a.name,this.updatedOn=a.updatedOn,this.ownerWebsiteId=a.ownerWebsiteId, this.collectionConfigs=this.processCollectionConfigs(a.collectionConfigs),this.pageConfigs=this.processPageConfigs(a.pageConfigs),this.customTypes=this.processCustomTypes(a.customTypes),this.layouts=this.processLayouts(a.layouts),this.navigations=a.navigations)}},{key:"processCollectionConfigs",value:function(a){a.products&&(a.products=(0,n.default)({},s.products,a.products),a.products.acceptTypes&&0===a.products.acceptTypes.length&&(a.products.acceptTypes=s.products.acceptTypes),a.products.ordering= t.USER);a.page&&(a.page=(0,n.default)({},s.page,a.page));a=(0,n.default)({},s,a);a=e(a,function(a){a=(0,n.default)({},M,a);!0===a.index?a.folderBehavior=f.INDEX:!0===a.folder&&(a.folderBehavior=f.NONE);return a});var b=a.folders||a.folder;b&&(b.acceptTypes=this.calculateFolderAcceptTypes(a));return a}},{key:"calculateFolderAcceptTypes",value:function(a){var b=["subscription","gallery-block","template-page"];return(0,h.default)(a).filter(function(f){return a[f].folder?!1:-1===b.indexOf(f)}).concat(["link"])}}, {key:"processPageConfigs",value:function(a){return e(a,function(a){return(0,n.default)({},v,a)})}},{key:"processCustomTypes",value:function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(a,b){a[b.name]=b;return a},{})}},{key:"processDemoCollections",value:function(a){return a||[]}},{key:"processLayouts",value:function(a){return a||{}}}]);return a}();l.exports=c.createStore(a,"TemplateStore")},185:function(l,c,a){l.exports={"default":a(409),__esModule:!0}},186:function(l, c){l.exports=function(){var a=[],c=!1,h={},n=function(b){var k=a.indexOf(b);0>k||(c?h[k]=b:a.splice(k,1))};return{publish:function(){for(var b=arguments.length,k=Array(b),e=0;e<b;e++)k[e]=arguments[e];c=!0;try{a.forEach(function(a,b){return h[b]||a.apply(void 0,k)})}finally{c=!1,Object.keys(h).forEach(function(a){return n(h[a])}),h={}}},subscribe:function(b){a.push(b);return{dispose:function(){return n(b)}}},$subscriptions:a}}},214:function(l,c){l.exports={AUTHENTICATED:0,CONFIG:1,ADMIN:2,CONFIG_CONTENT_MANAGER:11, CONFIG_SETTINGS:12,CONFIG_ACTIVITY:13,CONFIG_COMMERCE:14,CONFIG_NEWSLETTER:15,CONFIG_DAMASK:17,CONFIG_CRM:18,CONFIG_CHANGE_STRUCTURE:1110,CONFIG_TRUSTED_COMMENTER:1111,CONFIG_SETTINGS_GENERAL:1210,CONFIG_SETTINGS_LOCALE:1211,CONFIG_SETTINGS_SOCIAL_ACCOUNT:1212,CONFIG_SETTINGS_FACEBOOK:1213,CONFIG_SETTINGS_SOCIAL_SETTINGS:1214,CONFIG_SETTINGS_MEMBER_ACCOUNTS:1215,CONFIG_SETTINGS_DOMAIN:1216,CONFIG_SETTINGS_TEMPLATE:1217,CONFIG_SETTINGS_IMPORT:1218,CONFIG_SETTINGS_CODEINJECT:1219,CONFIG_SETTINGS_ADVANCED:1220, CONFIG_SETTINGS_DEVELOPER:1221,CONFIG_SETTINGS_SESSIONS:1222,CONFIG_SETTINGS_MOBILE:1223,CONFIG_SETTINGS_BILLING:1224,CONFIG_SETTINGS_SUPPORT:1225,CONFIG_SETTINGS_SITE:1226,CONFIG_SETTINGS_LABS:1227,CONFIG_SETTINGS_ADVERTISING:1228,CONFIG_ACTIVITY_STATS:1310,CONFIG_ACTIVITY_COMMENTS:1311,CONFIG_COMMERCE_ORDERS:1410,CONFIG_COMMERCE_STORE_SETTINGS:1411,CONFIG_COMMERCE_SHIPPING:1412,CONFIG_COMMERCE_COUPONS:1413,CONFIG_COMMERCE_TAXES:1414,CONFIG_COMMERCE_EMAIL_NOTIFICATIONS:1415,CONFIG_COMMERCE_INVENTORY:1416, CONFIG_COMMERCE_DONATIONS:1417,CONFIG_COMMERCE_ACCOUNTING:1418,CONFIG_COMMERCE_DISCOUNTS:1419,CONFIG_NEWSLETTER_READ_SUBSCRIBER:1510,CONFIG_NEWSLETTER_WRITE_SUBSCRIBER:1511,CONFIG_NEWSLETTER_READ_GROUP:1512,CONFIG_NEWSLETTER_WRITE_GROUP:1513,CONFIG_NEWSLETTER_READ_MESSAGE:1514,CONFIG_NEWSLETTER_WRITE_MESSAGE:1515,CONFIG_NEWSLETTER_READ_SETTINGS:1516,CONFIG_NEWSLETTER_WRITE_SETTINGS:1517,CONFIG_ACCEPT_TOS:1610,CONFIG_DOMAINS_REMOVE:1611,CONFIG_DOMAINS_ADD:1612,CONFIG_CRM_COMMERCE_CUSTOMERS:1810,ADMIN_GRANT_ACCESS:2010, ADMIN_BILLING_READ:2011,ADMIN_BILLING_WRITE:2012,ADMIN_READ_CUSTOMER_DATA:2013,ADMIN_WRITE_CUSTOMER_DATA:2014,ADMIN_DEV_SETTINGS:2015,ADMIN_MARKETING_READ:2016,ADMIN_MARKETING_WRITE:2017,ADMIN_LOGINAS:2018,ADMIN_TEMPLATE_SETTINGS:2019,ADMIN_SYSTEM_JSON_VIEW:2020,ADMIN_TAXONOMY:2021,ADMIN_CHANGE_USER_EMAIL:2022,ADMIN_ADD_NOTE:2023,ADMIN_EDIT_OTHER_NOTES:2024,ADMIN_EXTEND_TRIAL:2025,ADMIN_BIZPIPE_STATS_MOBILE_ACCESS:2026,ADMIN_REFERRALS:2027,ADMIN_BILLING_REFUND:2028,ADMIN_BILLING_APPLY_EDU_DISCOUNT:2029, ADMIN_DEACTIVATE_SQUARESPACE_ACCOUNT:2030,ADMIN_BILLING_EXPIRE:2031,ADMIN_CHANGE_MAX_COMPS:2032,ADMIN_CHANGE_GUILDS:2033,ADMIN_DOMAIN_WRITE:2034,ADMIN_GOOGLE_APPS_WRITE:2035,ADMIN_ADD_CONTRIBUTER:2036,ADMIN_CHANGE_WEBSITE_OWNER:2037,ADMIN_REMOVE_CONTRIBUTER:2038,ADMIN_TAXATION_READ:2039,ADMIN_SUSPEND:2040,ADMIN_TAXATION_WRITE:2041,ADMIN_LOGINAS_PUBLIC:2042,ADMIN_MASS_REMOVAL:2043,ADMIN_REMOVE_SITE:2044,ADMIN_TERMINATE_MEMBER_ACCOUNT:2045}},216:function(l,c){l.exports={ADD_PAGES:1,ADD_CONTRIBUTORS:2, ADD_COMMERCE_PRODUCTS:3,DEVELOPER_SDK:4,MOBILE_PORTFOLIO:5,COMMERCE:6,ACCOUNTING:7,SHIPSTATION_INTEGRATION:8,ABANDONED_CART_RECOVERY:9,REAL_TIME_SHIPPING_RATES:10,COMMERCE_TRANSACTION_FEE:11,FREE_GOOGLE_APPS_INBOX:12,GOOGLE_AD_WORDS_CREDIT:13,VAT_COLLECTION_BETA:14,MULTICURRENCY_BETA:15,STRICT_GOOGLE_APPS_FREE_INBOX_POLICY:16,CRM:17}},220:function(l,c){function a(a,c){c.forEach(function(b){Object.keys(Object(b)).forEach(function(c){a(c,b[c])})})}Object.defineProperty(c,"__esModule",{value:!0});c.isPojo= function(a){var c=a.constructor;return!!a&&"object"===typeof a&&"[object Object]"===Object.prototype.toString.call(a)&&p(c)&&(c instanceof c||"AltStore"===a.type)};c.isPromise=function(a){return!!a&&("object"===typeof a||"function"===typeof a)&&"function"===typeof a.then};c.eachObject=a;c.assign=function(c){for(var n=arguments.length,b=Array(1<n?n-1:0),k=1;k<n;k++)b[k-1]=arguments[k];a(function(a,b){return c[a]=b},b);return c};var p=function(a){return"function"===typeof a};c.isFunction=p},224:function(l, c){l.exports={STRIPE:1,PAYPAL:2}},226:function(l,c,a){l.exports={"default":a(350),__esModule:!0}},227:function(l,c,a){function p(a){return a&&a.__esModule?a:{"default":a}}c=a(23);var h=p(c);c=a(71);var n=p(c);c=a(17);var b=p(c);c=a(3);var k=p(c);c=a(4);var e=p(c),g=a(281),q=a(1092),m=a(139),t=a(573),f={useLoginFlag:!1,includeWebsiteList:!1,targetIdentifier:null,authenticationType:null,startSubscription:!1},s={serviceProvider:null,customParameters:null,urlParams:{}},M=function(){var a=(new Date).getTime(); return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(b){var f=(a+16*Math.random())%16|0;a=Math.floor(a/16);return("x"===b?f:f&7|8).toString(16)})},v=function(){function a(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};(0,k.default)(this,a);this.urlParams=(0,b.default)({},f,e);this.urlParams.uuid=M();this.reset();this.boundMessageReceiver=this.receiveMessage.bind(this)}(0,e.default)(a,[{key:"getAuthResponse",value:function(){return{socialConfig:this.socialConfig, websites:this.websites,website:this.website,memberAccount:this.memberAccount}}},{key:"openPopupWindow",value:function(a,b){var f="/auth/ExternalAuthenticationInitiate?"+this.buildQueryParams(a,b);this.oauthWindow=window.open(f,"ConnectWithOAuth","location=0,status=0,scrollbars=1,width=1020,height=520");window.addEventListener("message",this.boundMessageReceiver)}},{key:"reset",value:function(){this.socialConfig=this.memberAccount=this.website=this.websites=null;this.messageReceived=!1}},{key:"buildQueryParams", value:function(a,f){var e=(0,b.default)({},this.urlParams,f);e.serviceProvider=g(a)?m[a.toUpperCase()]:a;a===m.FACEBOOK&&(e.redirArgs=encodeURIComponent("scopeuser_checkins,offline_access,manage_pages,publish_stream"));e.useLoginFlag&&(e.loginFlag=!0,delete e.useLoginFlag);var c=this.getInviteCode();c&&(e.invitation=c);return q.stringify(e,{skipNulls:!0,filter:function(a,b){if(!1!==b)return b}})}},{key:"getInviteCode",value:function(){var a=document.location.search;"?"===a[0]&&(a=a.slice(1));return q.parse(a).invitation}}, {key:"receiveMessage",value:function(a){a=JSON.parse(a.data);if(null!==a&&"object"===("undefined"===typeof a?"undefined":(0,n.default)(a)))this.saveAuthResponse(a),this.messageReceived=!0}},{key:"saveAuthResponse",value:function(a){this.websites=a.websites;this.memberAccount=a.memberAccount;this.website=a.website;this.socialConfig=a.config?a.config:a.socialConfig}},{key:"checkClosedOnInterval",value:function(a,b){this.oauthWindow.closed?(window.removeEventListener("message",this._boundMessageReceiver), setTimeout(function(){var f=this;this.messageReceived?a(this.getAuthResponse()):t.getResult(this.urlParams.uuid).then(function(b){f.saveAuthResponse(b);a(f.getAuthResponse())},b).catch(b)}.bind(this,a,b),20)):setTimeout(this.checkClosedOnInterval.bind(this,a,b),200)}}]);return a}();l.exports={authenticate:function(a){a=(0,b.default)({},s,a);if(null===a.serviceProvider||!["string","number"].includes((0,n.default)(a.serviceProvider)))throw Error("Invalid or nonexistant oauth service provider");var f= new v(a.urlParams);return new h.default(function(b,e){f.openPopupWindow(a.serviceProvider,a.customParameters);f.checkClosedOnInterval(b,e)})}}},233:function(l,c){l.exports={GET:1,POST:2,PUT:3,DELETE:4}},235:function(l,c,a){var p=a(542),h=Math.max;l.exports=function(a,b){b=h(void 0===b?a.length-1:b,0);return function(){for(var c=arguments,e=-1,g=h(c.length-b,0),q=Array(g);++e<g;)q[e]=c[b+e];e=-1;for(g=Array(b+1);++e<b;)g[e]=c[e];g[b]=q;return p(a,this,g)}}},237:function(l,c,a){function p(a){return a&& a.__esModule?a:{"default":a}}c=a(23);var h=p(c);c=a(3);var n=p(c);c=a(4);var b=p(c);c=a(10);var k=a(526);a=function(){function a(){(0,n.default)(this,a);this.generateActions("insert")}(0,b.default)(a,[{key:"read",value:function(a){var b=this,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:!1,c=arguments[2];return function(f){f(a);return k.read(a,e,c).then(function(a){return b.insert(a.data)}).catch(function(a){a=a.data;return h.default.reject(a.message||a)})}}},{key:"readForCollection",value:function(a){var b= this;return function(e){e(a);return k.readForCollection(a).then(function(a){(a=a.data)&&a.results.forEach(function(a){return b.insert(a)});return h.default.resolve(a)}).catch(function(a){a=a.data;return h.default.reject(a.message||a)})}}},{key:"update",value:function(a,b){var e=this;return function(c){if(a.field)return c(a.itemId),k.updateField(a).then(function(a){return e.insert(a.data.item)}).catch(function(a){a=a.data;return h.default.reject(a.message||a)});c(a.id);return k.update(a,b).then(function(a){a= a.data;e.insert(a);return a}).catch(function(a){a=a.data;return h.default.reject(a.message||a)})}}},{key:"updateForCollection",value:function(a,b){var e=this;return k.updateForCollection(a,b).then(function(a){return e.insert(a.data)}).catch(function(a){a=a.data;return h.default.reject(a.message||a)})}},{key:"create",value:function(a,b,e){var c=this;return k.create(a,b,e).then(function(a){a=a.data;c.insert(a);return a}).catch(function(a){a=a.data;return h.default.reject(a.message||a)})}},{key:"createForCollection", value:function(a,b,e){var c=this;return k.createForCollection(a,b,e).then(function(a){a=a.data;c.insert(a);return a}).catch(function(a){a=a.data;return h.default.reject(a.message||a)})}},{key:"delete",value:function(a,b){return function(e){e(a);return k.delete(a,b).catch(function(a){a=a.data;return h.default.reject(a.message||a)})}}},{key:"deleteMany",value:function(a){return function(b){b(a);return k.deleteMany(a)}}}]);return a}();l.exports=c.createActions(a)},240:function(l,c,a){function p(a){return{url:F[a.action].replace("{collectionId}", a.collectionId),isFallback:!0}}function h(a){return{url:G[a.collectionType][a.action].replace("{collectionId}",a.collectionId).replace("{parentId}",a.parentId),isFallback:!1}}function n(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!a.collectionId)return{url:Z[a.action],isFallback:!0};if(a.parentId)return a.collectionType===aa.PRODUCTS?h(a):p(a);var b=Fa[a.collectionOrdering];if(!b)return p(a);b=b[a.recordType];return!b?p(a):{url:b[a.action].replace("{collectionId}",a.collectionId), isFallback:!1}}var b=(c=a(15))&&c.__esModule?c:{"default":c},k,e,g,q,m,t,f,s,M,v,R,S,ea,na,K,w,y,u=a(233),$=a(132);c=a(187);var aa=a(47),Fa=(M={},M[c.CHRONOLOGICAL]=(q={},q[$.TEXT]=(k={},k[u.GET]="/api/content/blogs/{collectionId}/text-posts/{id}",k[u.POST]="/api/content/blogs/{collectionId}/text-posts",k[u.PUT]="/api/content/blogs/{collectionId}/text-posts/{id}",k[u.DELETE]="/api/content/blogs/{collectionId}/text-posts/{id}",k),q[$.IMAGE]=(e={},e[u.GET]="/api/content/blogs/{collectionId}/image-posts/{id}", e[u.POST]="/api/content/blogs/{collectionId}/image-posts",e[u.PUT]="/api/content/blogs/{collectionId}/image-posts/{id}",e[u.DELETE]="/api/content/blogs/{collectionId}/image-posts/{id}",e),q[$.VIDEO]=(g={},g[u.GET]="/api/content/blogs/{collectionId}/video-posts/{id}",g[u.POST]="/api/content/blogs/{collectionId}/video-posts",g[u.PUT]="/api/content/blogs/{collectionId}/video-posts/{id}",g[u.DELETE]="/api/content/blogs/{collectionId}/video-posts/{id}",g),q),M[c.CALENDAR]=(t={},t[$.EVENT]=(m={},m[u.GET]= "/api/content/calendars/{collectionId}/events/{id}",m[u.POST]="/api/content/calendars/{collectionId}/events",m[u.PUT]="/api/content/calendars/{collectionId}/events/{id}",m[u.DELETE]="/api/content/calendars/{collectionId}/events/{id}",m),t),M[c.USER]=(s={},s[$.STORE_ITEM]=(f={},f[u.GET]="/api/content/product-pages/{collectionId}/products/{id}",f[u.POST]="/api/content/product-pages/{collectionId}/products",f[u.PUT]="/api/content/product-pages/{collectionId}/products/{id}",f[u.DELETE]="/api/content/product-pages/{collectionId}/products/{id}", f),s),M),G=(R={},R[aa.PRODUCTS]=(v={},v[u.GET]="/api/content/product-pages/{collectionId}/products/{parentId}/images/{id}",v[u.POST]="/api/content/product-pages/{collectionId}/products/{parentId}/images",v[u.PUT]="/api/content/product-pages/{collectionId}/products/{parentId}/images/{id}",v[u.DELETE]="/api/content/product-pages/{collectionId}/products/{parentId}/images/{id}",v),R),Q=(K={},K[c.CHRONOLOGICAL]=(S={},S[aa.COLLECTION_TYPE_GENERIC]="/api/content/blogs/{collectionId}/posts",S),K[c.CALENDAR]= (ea={},ea[aa.COLLECTION_TYPE_GENERIC]="/api/content/calendars/{collectionId}/events",ea),K[c.USER]=(na={},na[aa.PRODUCTS]="/api/content/product-pages/{collectionId}/products",na),K),F=(w={},w[u.GET]="/api/content-collections/{collectionId}/content-items/{id}",w[u.POST]="/api/content-collections/{collectionId}/content-items",w[u.PUT]="/api/content-collections/{collectionId}/content-items/{id}",w[u.DELETE]="/api/content-collections/{collectionId}/content-items/{id}",w),Z=(y={},y[u.GET]="/api/content-items/{id}", y[u.POST]="/api/content-items",y[u.PUT]="/api/content-items/{id}",y[u.DELETE]="/api/content-items/{id}",y);l.exports={getTemplateForSingleItem:function(){return n(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).url},getTemplateForCollectionItems:function(a,b){if(!a)return"/api/content-collections/{collectionId}/content-items";var f=void 0;Q.hasOwnProperty(a)&&(f=Q[a][b]);return!f?"/api/content-collections/{collectionId}/content-items":f},getMainImageUploadUrl:function(){var a=0<arguments.length&& void 0!==arguments[0]?arguments[0]:{},a=n((0,b.default)({},a,{action:u.DELETE}));return a.isFallback?"/api/commondata/SaveMedia":a.url+"/main-image"},getMainImageDeletionUrl:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},a=n((0,b.default)({},a,{action:u.DELETE}));return a.isFallback?"/api/commondata/ClearEmbeddedAsset":a.url+"/main-image"},getChildImageUploadUrl:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return a.recordType===$.STORE_ITEM? h({collectionType:aa.PRODUCTS,recordType:$.STORE_ITEM,action:u.POST,parentId:a.parentId,collectionId:a.collectionId}).url:"/api/commondata/SaveMedia"}}},243:function(l,c,a){c=a(223);a=a(544)(c);l.exports=a},244:function(l,c,a){c=a(530)(Object.getPrototypeOf,Object);l.exports=c},249:function(l,c,a){function p(a,c,e,g,q){var m=-1,t=a.length;e||(e=n);for(q||(q=[]);++m<t;){var f=a[m];0<c&&e(f)?1<c?p(f,c-1,e,g,q):h(q,f):g||(q[q.length]=f)}return q}var h=a(355),n=a(545);l.exports=p},280:function(l,c,a){var p= a(196),h=Object.prototype.toString;l.exports=function(a){return"number"==typeof a||p(a)&&"[object Number]"==h.call(a)}},281:function(l,c,a){var p=a(56),h=a(196),n=Object.prototype.toString;l.exports=function(a){return"string"==typeof a||!p(a)&&h(a)&&"[object String]"==n.call(a)}},349:function(l,c,a){l.exports={"default":a(408),__esModule:!0}},350:function(l,c,a){a(377);var p=a(24).Object;l.exports=function(a,c){return p.create(a,c)}},351:function(l,c,a){a(378);l.exports=a(24).Object.getPrototypeOf}, 352:function(l,c,a){a(379);l.exports=a(24).Object.keys},353:function(l,c,a){a(380);l.exports=a(24).Object.setPrototypeOf},354:function(l,c){l.exports=function(a,c){for(var h=-1,n=a?a.length:0;++h<n&&!1!==c(a[h],h,a););return a}},355:function(l,c){l.exports=function(a,c){for(var h=-1,n=c.length,b=a.length;++h<n;)a[b+h]=c[h];return a}},359:function(l,c,a){function p(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);b["default"]= a;return b}Object.defineProperty(c,"__esModule",{value:!0});c["default"]=function(a,g,c,m,h){var f=b.uid(a._actionsRegistry,String(g)+"."+String(c));a._actionsRegistry[f]=1;var s={id:f,namespace:g,name:c},p=function(b){return a.dispatch(f,b,s)},v=function(){for(var f=arguments.length,g=Array(f),c=0;c<f;c++)g[c]=arguments[c];g=f=m.apply(h,g);if(void 0!==f&&!(0,k.default)(f))n.isFunction(f)?g=f(p,a):p(f);void 0===f&&b.warn("An action was called but nothing was dispatched");return g};v.defer=function(){for(var a= arguments.length,b=Array(a),f=0;f<a;f++)b[f]=arguments[f];return setTimeout(function(){return v.apply(null,b)})};v.id=f;v.data=s;g=a.actions[g];c=b.uid(g,c);g[c]=v;c=b.formatAsConstant(c);g[c]=f;return v};var h=a(45),n=p(h),h=a(122),b=p(h),k=(a=a(381))&&a.__esModule?a:{"default":a};l.exports=c["default"]},360:function(l,c,a){function p(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var e in a)Object.prototype.hasOwnProperty.call(a,e)&&(b[e]=a[e]);b["default"]=a;return b}function h(a,b){if("function"!== typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function n(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function");}Object.defineProperty(c,"__esModule",{value:!0});var b=a(366),k=a(364),e=p(k),k=a(45),g=p(k),k=a(363),q=p(k),k=a(122),m=p(k), t=(a=a(359))&&a.__esModule?a:{"default":a};a=function(){function a(){var e=0>=arguments.length||void 0===arguments[0]?{}:arguments[0];n(this,a);this.config=e;this.serialize=e.serialize||JSON.stringify;this.deserialize=e.deserialize||JSON.parse;this.dispatcher=e.dispatcher||new b.Dispatcher;this.batchingFunction=e.batchingFunction||function(a){return a()};this.actions={global:{}};this.stores={};this.storeTransforms=e.storeTransforms||[];this.trapAsync=!1;this._actionsRegistry={};this._initSnapshot= {};this._lastSnapshot={}}a.prototype.dispatch=function(){return function(a,b,f){var e=this;this.batchingFunction(function(){var g=Math.random().toString(18).substr(2,16);return a.hasOwnProperty("type")&&a.hasOwnProperty("payload")?e.dispatcher.dispatch(m.fsa(g,a.type,a.payload,{id:a.type,namespace:a.type,name:a.type})):a.id&&a.dispatch?m.dispatch(g,a,b,e):e.dispatcher.dispatch(m.fsa(g,a,b,f))})}}();a.prototype.createUnsavedStore=function(){return function(a){var b=a.displayName||"";q.createStoreConfig(this.config, a);for(var f=q.transformStore(this.storeTransforms,a),e=arguments.length,c=Array(1<e?e-1:0),m=1;m<e;m++)c[m-1]=arguments[m];return g.isFunction(f)?q.createStoreFromClass.apply(q,[this,f,b].concat(c)):q.createStoreFromObject(this,f,b)}}();a.prototype.createStore=function(){return function(a,b){var f=b||a.displayName||a.name||"";q.createStoreConfig(this.config,a);var c=q.transformStore(this.storeTransforms,a);if(this.stores[f]||!f)this.stores[f]?m.warn("A store named "+String(f)+" already exists, double check your store names or pass in your own custom identifier for each store"): m.warn("Store name was not specified"),f=m.uid(this.stores,f);for(var k=arguments.length,h=Array(2<k?k-2:0),n=2;n<k;n++)h[n-2]=arguments[n];c=g.isFunction(c)?q.createStoreFromClass.apply(q,[this,c,f].concat(h)):q.createStoreFromObject(this,c,f);this.stores[f]=c;e.saveInitialSnapshot(this,f);return c}}();a.prototype.generateActions=function(){return function(){for(var a=arguments.length,b=Array(a),f=0;f<a;f++)b[f]=arguments[f];return this.createActions(b.reduce(function(a,b){a[b]=m.dispatchIdentity; return a},{name:"global"}))}}();a.prototype.createAction=function(){return function(a,b,f){return(0,t.default)(this,"global",a,b,f)}}();a.prototype.createActions=function(){return function(a){var b=this,f=1>=arguments.length||void 0===arguments[1]?{}:arguments[1],e={},c=m.uid(this._actionsRegistry,a.displayName||a.name||"Unknown");if(g.isFunction(a)){g.assign(e,m.getPrototypeChain(a));for(var k=function(a){function b(){n(this,b);for(var f=arguments.length,e=Array(f),g=0;g<f;g++)e[g]=arguments[g]; f=a.call.apply(a,[this].concat(e));if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&("object"===typeof f||"function"===typeof f)?f:this}h(b,a);b.prototype.generateActions=function(){return function(){for(var a=arguments.length,b=Array(a),f=0;f<a;f++)b[f]=arguments[f];b.forEach(function(a){e[a]=m.dispatchIdentity})}}();return b}(a),q=arguments.length,p=Array(2<q?q-2:0),l=2;l<q;l++)p[l-2]=arguments[l];g.assign(e,new (Function.prototype.bind.apply(k, [null].concat(p))))}else g.assign(e,a);this.actions[c]=this.actions[c]||{};g.eachObject(function(a,e){if(g.isFunction(e)){f[a]=(0,t.default)(b,c,a,e,f);var k=m.formatAsConstant(a);f[k]=f[a].id}else f[a]=e},[e]);return f}}();a.prototype.takeSnapshot=function(){return function(){for(var a=arguments.length,b=Array(a),f=0;f<a;f++)b[f]=arguments[f];a=e.snapshot(this,b);g.assign(this._lastSnapshot,a);return this.serialize(a)}}();a.prototype.rollback=function(){return function(){e.setAppState(this,this.serialize(this._lastSnapshot), function(a){a.lifecycle("rollback");a.emitChange()})}}();a.prototype.recycle=function(){return function(){for(var a=arguments.length,b=Array(a),f=0;f<a;f++)b[f]=arguments[f];a=b.length?e.filterSnapshots(this,this._initSnapshot,b):this._initSnapshot;e.setAppState(this,this.serialize(a),function(a){a.lifecycle("init");a.emitChange()})}}();a.prototype.flush=function(){return function(){var a=this.serialize(e.snapshot(this));this.recycle();return a}}();a.prototype.bootstrap=function(){return function(a){e.setAppState(this, a,function(a,b){a.lifecycle("bootstrap",b);a.emitChange()})}}();a.prototype.prepare=function(){return function(a,b){var f={};if(!a.displayName)throw new ReferenceError("Store provided does not have a name");f[a.displayName]=b;return this.serialize(f)}}();a.prototype.addActions=function(){return function(a,b){for(var f=arguments.length,e=Array(2<f?f-2:0),g=2;g<f;g++)e[g-2]=arguments[g];this.actions[a]=Array.isArray(b)?this.generateActions.apply(this,b):this.createActions.apply(this,[b].concat(e))}}(); a.prototype.addStore=function(){return function(a,b){for(var f=arguments.length,e=Array(2<f?f-2:0),g=2;g<f;g++)e[g-2]=arguments[g];this.createStore.apply(this,[b,a].concat(e))}}();a.prototype.getActions=function(){return function(a){return this.actions[a]}}();a.prototype.getStore=function(){return function(a){return this.stores[a]}}();a.debug=function(){return function(a,b,f){!f&&"undefined"!==typeof window&&(f=window);"undefined"!==typeof f&&(f["alt.js.org"]=f["alt.js.org"]||[],f["alt.js.org"].push({name:a, alt:b}));return b}}();return a}();c.default=a;l.exports=c["default"]},361:function(l,c,a){Object.defineProperty(c,"__esModule",{value:!0});var p=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);b["default"]=a;return b}(a(45)),h=(a=a(186))&&a.__esModule?a:{"default":a};a=function(){function a(b,c,e,g){var q=this;if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");var m=c.lifecycleEvents;this.transmitter= (0,h.default)();this.lifecycle=function(a,b){m[a]&&m[a].publish(b)};this.state=e;this.alt=b;this.preventDefault=!1;this.displayName=c.displayName;this.boundListeners=c.boundListeners;this.StoreModel=g;this.reduce=c.reduce||function(a){return a};this.subscriptions=[];var t=c.output||function(a){return a};this.emitChange=function(){return q.transmitter.publish(t(q.state))};var f=function(a,b){try{return a()}catch(f){if(c.handlesOwnErrors)return q.lifecycle("error",{error:f,payload:b,state:q.state}), !1;throw f;}};p.assign(this,c.publicMethods);this.dispatchToken=b.dispatcher.register(function(a){q.preventDefault=!1;q.lifecycle("beforeEach",{payload:a,state:q.state});var b=c.actionListeners[a.action];if(b||c.otherwise){var e=void 0,e=b?f(function(){return b.filter(Boolean).every(function(b){return!1!==b.call(c,a.data,a.action)})},a):f(function(){return c.otherwise(a.data,a.action)},a);!1!==e&&!q.preventDefault&&q.emitChange()}c.reduce&&(f(function(){var b=c.reduce(q.state,a);void 0!==b&&(q.state= b)},a),q.preventDefault||q.emitChange());q.lifecycle("afterEach",{payload:a,state:q.state})});this.lifecycle("init")}a.prototype.listen=function(){return function(a){var c=this;if(!p.isFunction(a))throw new TypeError("listen expects a function");var e=this.transmitter.subscribe(a).dispose;this.subscriptions.push({cb:a,dispose:e});return function(){c.lifecycle("unlisten");e()}}}();a.prototype.unlisten=function(){return function(a){this.lifecycle("unlisten");this.subscriptions.filter(function(c){return c.cb=== a}).forEach(function(a){return a.dispose()})}}();a.prototype.getState=function(){return function(){return this.StoreModel.config.getState.call(this,this.state)}}();return a}();c.default=a;l.exports=c["default"]},362:function(l,c,a){Object.defineProperty(c,"__esModule",{value:!0});var p=a(186),h=p&&p.__esModule?p:{"default":p},n=function(a){if(a&&a.__esModule)return a;var c={};if(null!=a)for(var e in a)Object.prototype.hasOwnProperty.call(a,e)&&(c[e]=a[e]);c["default"]=a;return c}(a(45));a={waitFor:function(){return function(){for(var a= arguments.length,c=Array(a),e=0;e<a;e++)c[e]=arguments[e];if(!c.length)throw new ReferenceError("Dispatch tokens not provided");a=c;1===c.length&&(a=Array.isArray(c[0])?c[0]:c);c=a.map(function(a){return a.dispatchToken||a});this.dispatcher.waitFor(c)}}(),exportAsync:function(){return function(a){this.registerAsync(a)}}(),registerAsync:function(){return function(a){var c=this,e=0,g=n.isFunction(a)?a(this.alt):a;a=Object.keys(g).reduce(function(a,b){var h=g[b],f=n.isFunction(h)?h(c):h;["success","error", "loading"].forEach(function(a){if(f[a]&&!f[a].id)throw Error(String(a)+" handler must be an action function");});a[b]=function(){for(var a=arguments.length,b=Array(a),g=0;g<a;g++)b[g]=arguments[g];var a=c.getInstance().getState(),g=f.local&&f.local.apply(f,[a].concat(b)),m=f.shouldFetch?f.shouldFetch.apply(f,[a].concat(b)):null==g,q=f.interceptResponse||function(a){return a},h=function(){return function(a,f){return function(g){var m=function(){return function(){e-=1;a(q(g,a,b));if(f)throw g;return g}}(); return c.alt.trapAsync?function(){return m()}:m()}}}();if(m)return e+=1,f.loading&&f.loading(q(null,f.loading,b)),f.remote.apply(f,[a].concat(b)).then(h(f.success),h(f.error,1));c.emitChange();return g};return a},{});this.exportPublicMethods(a);this.exportPublicMethods({isLoading:function(){return function(){return 0<e}}()})}}(),exportPublicMethods:function(){return function(a){var c=this;n.eachObject(function(a,b){if(!n.isFunction(b))throw new TypeError("exportPublicMethods expects a function"); c.publicMethods[a]=b},[a])}}(),emitChange:function(){return function(){this.getInstance().emitChange()}}(),on:function(){return function(a,c){"error"===a&&(this.handlesOwnErrors=!0);var e=this.lifecycleEvents[a]||(0,h.default)();this.lifecycleEvents[a]=e;return e.subscribe(c.bind(this))}}(),bindAction:function(){return function(a,c){if(!a)throw new ReferenceError("Invalid action reference passed in");if(!n.isFunction(c))throw new TypeError("bindAction expects a function");var e=a.id?a.id:a;this.actionListeners[e]= this.actionListeners[e]||[];this.actionListeners[e].push(c.bind(this));this.boundListeners.push(e)}}(),bindActions:function(){return function(a){var c=this;n.eachObject(function(a,b){var q=a.replace(/./,function(a){return"on"+String(a[0].toUpperCase())});if(c[a]&&c[q])throw new ReferenceError("You have multiple action handlers bound to an action: "+(String(a)+" and "+String(q)));(q=c[a]||c[q])&&c.bindAction(b,q)},[a])}}(),bindListeners:function(){return function(a){var c=this;n.eachObject(function(a, b){var q=c[a];if(!q)throw new ReferenceError(String(a)+" defined but does not exist in "+String(c.displayName));Array.isArray(b)?b.forEach(function(a){c.bindAction(a,q)}):c.bindAction(b,q)},[a])}}()};c.default=a;l.exports=c["default"]},363:function(l,c,a){function p(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&(b[f]=a[f]);b["default"]=a;return b}function h(a,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+ typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function n(a,b,f){if(f){var c=b.StoreModel.config;f=e.isFunction(f)?f(b.state):f;b.state=c.setState.call(a,b.state,f);a.alt.dispatcher.isDispatching()||a.emitChange()}}function b(a,b,f,c){return e.assign(a,q.default,{displayName:f,alt:b,dispatcher:b.dispatcher,preventDefault:function(){return function(){this.getInstance().preventDefault= !0}}(),boundListeners:[],lifecycleEvents:{},actionListeners:{},publicMethods:{},handlesOwnErrors:!1},c)}Object.defineProperty(c,"__esModule",{value:!0});c.createStoreConfig=function(a,b){b.config=e.assign({getState:function(){return function(a){return Array.isArray(a)?a.slice():e.isMutableObject(a)?e.assign({},a):a}}(),setState:function(){return function(a,b){return e.isMutableObject(b)?e.assign(a,b):b}}()},a,b.config)};c.transformStore=function(a,b){return a.reduce(function(a,b){return b(a)},b)}; c.createStoreFromObject=function(a,c,f){var k=void 0,h=b({},a,f,e.assign({getInstance:function(){return function(){return k}}(),setState:function(){return function(a){n(this,k,a)}}()},c));h.bindListeners&&q.default.bindListeners.call(h,h.bindListeners);h.observe&&q.default.bindListeners.call(h,h.observe(a));h.lifecycle&&e.eachObject(function(a,b){q.default.on.call(h,a,b)},[h.lifecycle]);return k=e.assign(new g.default(a,h,void 0!==h.state?h.state:{},c),h.publicMethods,{displayName:f,config:c.config})}; c.createStoreFromClass=function(a,c,f){var q=void 0,p=c.config,l=function(a){function b(){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");for(var f=arguments.length,e=Array(f),c=0;c<f;c++)e[c]=arguments[c];f=a.call.apply(a,[this].concat(e));if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f&&("object"===typeof f||"function"===typeof f)?f:this}h(b,a);return b}(c);b(l.prototype,a,f,{type:"AltStore",getInstance:function(){return function(){return q}}(), setState:function(){return function(a){n(this,q,a)}}()});for(var R=arguments.length,S=Array(3<R?R-3:0),ea=3;ea<R;ea++)S[ea-3]=arguments[ea];l=new (Function.prototype.bind.apply(l,[null].concat(S)));p.bindListeners&&l.bindListeners(p.bindListeners);p.datasource&&l.registerAsync(p.datasource);return q=e.assign(new g.default(a,l,void 0!==l.state?l.state:l,c),k.getInternalMethods(c),p.publicMethods,{displayName:f})};l=a(122);var k=p(l);l=a(45);var e=p(l),g=(l=a(361))&&l.__esModule?l:{"default":l},q=(a= a(362))&&a.__esModule?a:{"default":a}},364:function(l,c,a){Object.defineProperty(c,"__esModule",{value:!0});c.setAppState=function(a,c,b){var k=a.deserialize(c);p.eachObject(function(e,c){var q=a.stores[e];q&&function(){var a=q.StoreModel.config,h=q.state;a.onDeserialize&&(k[e]=a.onDeserialize(c)||c);p.isMutableObject(h)?(p.eachObject(function(a){return delete h[a]},[h]),p.assign(h,k[e])):q.state=k[e];b(q,q.state)}()},[k])};c.snapshot=function(a){var c=1>=arguments.length||void 0===arguments[1]?[]: arguments[1];return(c.length?c:Object.keys(a.stores)).reduce(function(b,c){var e=c.displayName||c,g=a.stores[e],q=g.StoreModel.config;g.lifecycle("snapshot");q=q.onSerialize&&q.onSerialize(g.state);b[e]=q?q:g.getState();return b},{})};c.saveInitialSnapshot=function(a,c){var b=a.deserialize(a.serialize(a.stores[c].state));a._initSnapshot[c]=b;a._lastSnapshot[c]=b};c.filterSnapshots=function(a,c,b){return b.reduce(function(a,b){var g=b.displayName||b;if(!c[g])throw new ReferenceError(String(g)+" is not a valid store"); a[g]=c[g];return a},{})};var p=function(a){if(a&&a.__esModule)return a;var c={};if(null!=a)for(var b in a)Object.prototype.hasOwnProperty.call(a,b)&&(c[b]=a[b]);c["default"]=a;return c}(a(45))},365:function(l,c,a){l.exports=function(a,c,n,b,k,e,g,q){if(!a){if(void 0===c)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var m=[n,b,k,e,g,q],t=0;a=Error("Invariant Violation: "+c.replace(/%s/g,function(){return m[t++]}))}a.framesToPop= 1;throw a;}}},366:function(l,c,a){l.exports.Dispatcher=a(367)},367:function(l,c,a){c.__esModule=!0;var p=a(365);c=function(){function a(){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this._callbacks={};this._isDispatching=!1;this._isHandled={};this._isPending={};this._lastID=1}a.prototype.register=function(a){var b="ID_"+this._lastID++;this._callbacks[b]=a;return b};a.prototype.unregister=function(a){!this._callbacks[a]?p(!1):void 0;delete this._callbacks[a]};a.prototype.waitFor= function(a){!this._isDispatching?p(!1):void 0;for(var b=0;b<a.length;b++){var c=a[b];this._isPending[c]?!this._isHandled[c]?p(!1):void 0:(!this._callbacks[c]?p(!1):void 0,this._invokeCallback(c))}};a.prototype.dispatch=function(a){this._isDispatching?p(!1):void 0;this._startDispatching(a);try{for(var b in this._callbacks)this._isPending[b]||this._invokeCallback(b)}finally{this._stopDispatching()}};a.prototype.isDispatching=function(){return this._isDispatching};a.prototype._invokeCallback=function(a){this._isPending[a]= !0;this._callbacks[a](this._pendingPayload);this._isHandled[a]=!0};a.prototype._startDispatching=function(a){for(var b in this._callbacks)this._isPending[b]=!1,this._isHandled[b]=!1;this._pendingPayload=a;this._isDispatching=!0};a.prototype._stopDispatching=function(){delete this._pendingPayload;this._isDispatching=!1};return a}();l.exports=c},372:function(l,c,a){l.exports={"default":a(353),__esModule:!0}},374:function(l,c,a){var p=a(119),h=a(126),n=function(a,c){h(a);if(!p(c)&&null!==c)throw TypeError(c+ ": can't set as prototype!");};l.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(b,c,e){try{e=a(131)(Function.call,a(229).f(Object.prototype,"__proto__").set,2),e(b,[]),c=!(b instanceof Array)}catch(g){c=!0}return function(a,b){n(a,b);c?a.__proto__=b:e(a,b);return a}}({},!1):void 0),check:n}},377:function(l,c,a){l=a(54);l(l.S,"Object",{create:a(373)})},378:function(l,c,a){var p=a(123),h=a(527);a(82)("getPrototypeOf",function(){return function(a){return h(p(a))}})},379:function(l,c,a){var p= a(123),h=a(142);a(82)("keys",function(){return function(a){return h(p(a))}})},380:function(l,c,a){l=a(54);l(l.S,"Object",{setPrototypeOf:a(374).set})},381:function(l,c){l.exports=function(a){return!!a&&("object"===typeof a||"function"===typeof a)&&"function"===typeof a.then}},384:function(l,c,a){var p=a(91),h=Object.create;l.exports=function(a){return p(a)?h(a):{}}},391:function(l,c,a){l.exports={"default":a(392),__esModule:!0}},392:function(l,c,a){a(393);var p=a(24).Object;l.exports=function(a,c){return p.getOwnPropertyDescriptor(a, c)}},393:function(l,c,a){var p=a(124),h=a(229).f;a(82)("getOwnPropertyDescriptor",function(){return function(a,b){return h(p(a),b)}})},400:function(l,c,a){var p=(c=a(3))&&c.__esModule?c:{"default":c},h=(c=a(4))&&c.__esModule?c:{"default":c},n=a(31).Set,b=a(967),k=a(416);c=a(10);var e=a(72),g=a(214),q=a(49),m=a(56),t=a(280),f=function(a){return m(a)&&a.every(function(a){return t(a)})};a=function(){function a(){(0,p.default)(this,a);this.state=n();this.bindListeners({onStaticBootstrap:q.BOOTSTRAP}); this.exportPublicMethods({hasPermission:this.hasPermission,hasAllPermissions:this.hasAllPermissions,hasAnyPermission:this.hasAnyPermission,isAdmin:this.isAdmin})}(0,h.default)(a,[{key:"onStaticBootstrap",value:function(a){a=a.accessPermissions;return f(a)?(this.setState(n(a)),!0):!1}},{key:"hasPermission",value:function(a){var b=this.getState(),f="string"===typeof a?g[a]:a;if(void 0===f)throw Error(a?"Permission '"+a+"' not found.":"Permission is undefined.");return b.has(f)}},{key:"hasAllPermissions", value:function(a){return b(a,this.hasPermission.bind(this))}},{key:"hasAnyPermission",value:function(a){return k(a,this.hasPermission.bind(this))}},{key:"isAdmin",value:function(){return this.hasPermission(g.ADMIN)}}]);return a}();l.exports=c.createStore(e(a),"AccessPermissionStore")},404:function(l,c,a){function p(a){return a&&a.__esModule?a:{"default":a}}c=a(23);var h=p(c);c=a(3);var n=p(c);c=a(4);var b=p(c);c=a(10);var k=a(224),e=a(566),g=a(571);a=function(){function a(){(0,n.default)(this,a); this.generateActions("disconnectStripeSuccess","disconnectPayPalSuccess","handleFailure","loadSuccess","payPalProcessing","stripeProcessing","payPalBillingAgreementProcessing","setStoreCurrency","setStripeSettings","updateStripeSuccess","updateStoreCurrencySuccess","cancelPayPalBillingAgreement")}(0,b.default)(a,[{key:"load",value:function(){var a=this;return function(b){b();return e.load().then(function(b){return a.loadSuccess(b.data)},a.handleFailure).catch(a.handleError)}}},{key:"connectStripe", value:function(){var a=this;return function(b){a.stripeProcessing();b();return e.connect(k.STRIPE).then(a.load,a.handleFailure).catch(a.handleError)}}},{key:"connectPayPal",value:function(a){var b=this;return function(f){b.disconnectPayPal().then(b.payPalProcessing);f();return e.connect(k.PAYPAL,a).then(b.handlePayPalConnected,b.handleFailure).catch(b.handleError)}}},{key:"handlePayPalConnected",value:function(){var a=this;return function(b){a.load();b()}}},{key:"approvePayPalBillingAgreement",value:function(a){var b= this;return function(f){b.payPalBillingAgreementProcessing();f();return e.approvePayPalBillingAgreement(a).then(b.load,b.handleFailure).catch(b.handleError)}}},{key:"disconnectStripe",value:function(){var a=this;return function(b){a.stripeProcessing();b();return e.disconnect(k.STRIPE).then(a.disconnectStripeSuccess,a.handleFailure).catch(a.handleError)}}},{key:"disconnectPayPal",value:function(){var a=this;return function(b){a.payPalProcessing();b();return e.disconnect(k.PAYPAL).then(a.disconnectPayPalSuccess, a.handleFailure).catch(a.handleError)}}},{key:"setStoreCurrency",value:function(a){return function(b){b(a);return h.default.resolve()}}},{key:"setStripeSettings",value:function(a){return function(b){b(a);return h.default.resolve()}}},{key:"updateStoreCurrency",value:function(a,b){var f=this;return function(c){c();return e.updateStoreCurrency(b).then(function(){g.updateStoreCurrencyClass(a,b);f.updateStoreCurrencySuccess(b)},f.handleFailure).catch(f.handleError)}}},{key:"updateStripeSettings",value:function(a){var b= this;return function(f){f();return e.updateStripeSettings(a).then(b.updateStripeSuccess,b.handleFailure).catch(b.handleError)}}},{key:"handleError",value:function(a){this.handleFailure(a)}}]);return a}();l.exports=c.createActions(a)},408:function(l,c,a){a(181);a(412);l.exports=a(24).Array.from},409:function(l,c,a){a(413);l.exports=a(24).Object.freeze},411:function(l,c,a){var p=a(127),h=a(234);l.exports=function(a,b,c){b in a?p.f(a,b,h(0,c)):a[b]=c}},412:function(l,c,a){var p=a(131);l=a(54);var h= a(123),n=a(555),b=a(554),k=a(375),e=a(411),g=a(376);l(l.S+l.F*!a(556)(function(a){Array.from(a)}),"Array",{from:function(a){var c=h(a),l="function"==typeof this?this:Array,f=arguments.length,s=1<f?arguments[1]:void 0,M=void 0!==s,v=0,R=g(c);M&&(s=p(s,2<f?arguments[2]:void 0,2));if(void 0!=R&&!(l==Array&&b(R))){c=R.call(c);for(l=new l;!(f=c.next()).done;v++)e(l,v,M?n(c,s,[f.value,v],!0):f.value)}else{f=k(c.length);for(l=new l(f);f>v;v++)e(l,v,M?s(c[v],v):c[v])}l.length=v;return l}})},413:function(l, c,a){var p=a(119),h=a(401).onFreeze;a(82)("freeze",function(a){return function(b){return a&&p(b)?a(h(b)):b}})},415:function(l,c,a){var p=a(529);l.exports=function(a,c){a=Object(a);return p(a,c,function(b,c){return c in a})}},416:function(l,c,a){var p=a(725),h=a(120),n=a(543),b=a(56),k=a(402);l.exports=function(a,c,q){var m=b(a)?p:n;q&&k(a,c,q)&&(c=void 0);return m(a,h(c,3))}},419:function(l,c){l.exports={QUEUED:1,PROCESSING:2,READY:3,ERROR:4,DOWNLOAD_ERROR:5,ERROR_TOO_LARGE:6,ERROR_FILE_NOT_FOUND:7, ERROR_UNSUPPORTED_IMAGE_TYPE:8,ERROR_UNSUPPORTED_AUDIO_TYPE:9}},420:function(l,c,a){var p=(c=a(3))&&c.__esModule?c:{"default":c};a=a(10);l.exports=a.createActions(function n(){(0,p.default)(this,n);this.generateActions("setEnabledFeatures")})},422:function(l,c,a){function p(a){return a&&a.__esModule?a:{"default":a}}c=a(193);var h=p(c);c=a(71);var n=p(c);a=a(20);var b=p(a);l.exports=function(a){var e={};(0,b.default)(a).map(function(b){var c=a[b];"object"===("undefined"===typeof c?"undefined":(0,n.default)(c))? e[b]=(0,h.default)(c):void 0!==c&&(e[b]=c)});return e}},423:function(l,c,a){var p=a(354),h=a(384),n=a(223),b=a(120),k=a(244),e=a(56),g=a(516),q=a(91),m=a(585);l.exports=function(a,f,c){var l=e(a)||m(a);f=b(f,4);if(null==c)if(l||q(a)){var v=a.constructor;c=l?e(a)?new v:[]:g(v)?h(k(a)):{}}else c={};(l?p:n)(a,function(a,b,e){return f(c,a,b,e)});return c}},502:function(l,c,a){function p(a){return a&&a.__esModule?a:{"default":a}}c=a(17);var h=p(c);c=a(3);var n=p(c);c=a(4);var b=p(c),k=a(995),e=a(1068); c=a(10);var g=a(592),q=a(535);a=function(){function a(){(0,n.default)(this,a);this.generateActions("loadSuccess","loadFailure")}(0,b.default)(a,[{key:"loadAll",value:function(){var a=this;return function(b){b();return e.loadTemplateInstallations().then(function(b){a.loadSuccess(b.data)},function(b){a.loadFailure(b.error)})}}},{key:"setPreviewInstallation",value:function(a,b,e){return function(c){var m=(0,h.default)({},a,{previewInstallationId:b});k.save(a.id,m).then(function(a){q.loadTemplate.defer(e); c(b);setTimeout(function(){g.setUrl("/");g.refresh()},1E3)},function(a){})}}},{key:"setLiveInstallation",value:function(a,b){return function(c){e.setLiveInstallation(a).then(function(e){q.loadTemplate.defer(b);c(a);setTimeout(g.refresh,1E3)},function(a){})}}},{key:"setHomepageCollectionId",value:function(a){return function(b){return e.setHomepageCollectionId(a).then(function(e){e={homepageCollectionId:a};b(e);return e},function(e){e={homepageCollectionId:a,error:!0};b(e);return e})}}},{key:"updateInstallation", value:function(a){return e.updateInstallation(a).then(this.loadAll)}}]);return a}();l.exports=c.createActions(a)},503:function(l,c){l.exports=[{label:"General",features:[{cookieKey:"referralsBetaEnabled",title:"Referrals Program",description:"Enable the panel for the Referrals program. During the beta, be careful not to enter the contact info of anyone not also beta testing!"},{cookieKey:"twoFactorAuth",title:"Two-factor auth",description:"Enable features related to two-factor auth."},{cookieKey:"singleSignOn", title:"Single sign on",description:"Enable single sign on across websites."},{cookieKey:"existingContentPagePicker",title:"New Page Picker in Content Link Tab",description:'Uses a navigation-based page picker on the "existing content" tab when creating a navbar link.'},{cookieKey:"mobileAdminSiteLink",title:"Admin site link - on mobile",description:"Adds a 'View site' link to the editing state on mobile."},{cookieKey:"imageBlockCards",title:"Image Block 2.0",description:"Adds 5 new layout options for Image Blocks."}, {cookieKey:"addPostStraightToInlineEditing",title:"Add Post \u2192 Inline Editing",description:"Post creation with priority to inline edit."},{cookieKey:"tweakV2ExperimentalFeatures",title:"Tweak 2.0 Experimental Features",description:"Import / export, navigation with tweak enabled, sorting, etc."},{cookieKey:"ssl",title:"SSL",description:"Customer Facing SSL Configuration"},{cookieKey:"indexEditing",title:"Index Editing v2",description:"Visual editor for managing stacked sections"}]},{label:"i18n", features:[{cookieKey:"i18nShowFormattedCurrency",title:"Show Currency Formatting",description:"Display a \ud83d\udcb0 emoji around formatted currencies."},{cookieKey:"i18nShowLocalizedComponents",title:"Show Localized Components",description:"Add a special demarcation for localized components and wrap non-visual content strings with a flag emoji, like: \ud83c\uddfa\ud83c\uddf8 text \ud83c\uddfa\ud83c\uddf8."},{cookieKey:"i18nShowFormattedDates",title:"Show Formatted Dates",description:"Display a \ud83d\udcc6 emoji around formatted dates."}, {cookieKey:"i18nShowFormattedDateTime",title:"Show Formatted DateTimes",description:"Display a \ud83d\udd5b emoji around formatted DateTimes"}]},{label:"Commerce",features:[{cookieKey:"customerAccountsEnabled",title:"Customer Accounts",description:"Enable customer accounts"},{cookieKey:"showLegacyCommercePlanUpdate",title:"Legacy Commerce Plan Notification",description:"Show the legacy commerce plan update notification if you match the plan criteria."}]},{label:"Developers",features:[{cookieKey:"devDropboxSync", title:"Dropbox Sync",description:"Use Dropbox to download your template source code and keep changes in sync."},{cookieKey:"devAutoRefresh",title:"Template Auto-Refresh",description:"Refresh your website whenever a change is detected to the template."}]}]},506:function(l,c,a){function p(a){return a&&a.__esModule?a:{"default":a}}c=a(23);var h=p(c);c=a(3);var n=p(c);c=a(4);var b=p(c);c=a(31);var k=c.Map,e=c.fromJS;c=a(10);var g=a(237);a=a(72);var q=function(){function a(){(0,n.default)(this,a);this.state= k();this.bindActions(g);this.exportPublicMethods({fetch:this.fetch,fetchFromServer:this.fetchFromServer,fetchForCollection:this.fetchForCollection,getForCollection:this.getForCollection})}(0,b.default)(a,[{key:"onInsert",value:function(a){this.setState(this.state.set(a.id,e(a)))}},{key:"onDelete",value:function(a){this.setState(this.state.delete(a))}},{key:"onDeleteMany",value:function(a){this.setState(this.state.filter(function(b,e){return-1===a.indexOf(e)}))}},{key:"fetch",value:function(a){var b= 1<arguments.length&&void 0!==arguments[1]?arguments[1]:!1,e=arguments[2];if(!a)return h.default.resolve();var c=this.getState().get(a);return c?h.default.resolve(c):this.fetchFromServer(a,b,e)}},{key:"fetchFromServer",value:function(a){var b=this;return g.read(a,1<arguments.length&&void 0!==arguments[1]?arguments[1]:!1,arguments[2]).then(function(){return b.getState().get(a)})}},{key:"fetchForCollection",value:function(a){var b=this,e=this.getForCollection(a);return 0<e.size?h.default.resolve(e): g.readForCollection(a).then(function(){return b.getForCollection(a)})}},{key:"getForCollection",value:function(a){return this.getState().filter(function(b){return b.get("collectionId")===a})}}]);return a}();l.exports=c.createStore(a(q),"ContentItemStore")},520:function(l,c){YUI.add("model",function(a,c){function h(){h.superclass.constructor.apply(this,arguments)}var n=YUI.namespace("Env.Model"),b=a.Lang,k=a.Array,e=a.Object,g="error";a.Model=a.extend(h,a.Base,{idAttribute:"id",_allowAdHocAttrs:!0, _isYUIModel:!0,initializer:function(a){this.changed={};this.lastChange={};this.lists=[]},destroy:function(a,b){var e=this;"function"===typeof a&&(b=a,a=null);e.onceAfter("destroy",function(){function f(f){f||k.each(e.lists.concat(),function(b){b.remove(e,a)});b&&b.apply(null,arguments)}a&&(a.remove||a["delete"])?e.sync("delete",a,f):f()});return h.superclass.destroy.call(e)},generateClientId:function(){n.lastId||(n.lastId=0);return this.constructor.NAME+"_"+(n.lastId+=1)},getAsHTML:function(e){e= this.get(e);return a.Escape.html(b.isValue(e)?String(e):"")},getAsURL:function(a){a=this.get(a);return encodeURIComponent(b.isValue(a)?String(a):"")},isModified:function(){return this.isNew()||!e.isEmpty(this.changed)},isNew:function(){return!b.isValue(this.get("id"))},load:function(a,b){var e=this;"function"===typeof a&&(b=a,a={});a||(a={});e.sync("read",a,function(f,c){var k={options:a,response:c},h;f?(k.error=f,k.src="load",e.fire(g,k)):(e._loadEvent||(e._loadEvent=e.publish("load",{preventable:!1})), h=k.parsed=e._parse(c),e.setAttrs(h,a),e.changed={},e.fire("load",k));b&&b.apply(null,arguments)});return e},parse:function(b){if("string"===typeof b)try{return a.JSON.parse(b)}catch(e){return this.fire(g,{error:e,response:b,src:"parse"}),null}return b},save:function(a,b){var e=this;"function"===typeof a&&(b=a,a={});a||(a={});e._validate(e.toJSON(),function(f){f?b&&b.call(null,f):e.sync(e.isNew()?"create":"update",a,function(f,c){var k={options:a,response:c},h;f?(k.error=f,k.src="save",e.fire(g,k)): (e._saveEvent||(e._saveEvent=e.publish("save",{preventable:!1})),c&&(h=k.parsed=e._parse(c),e.setAttrs(h,a)),e.changed={},e.fire("save",k));b&&b.apply(null,arguments)})});return e},set:function(a,b,e){var f={};f[a]=b;return this.setAttrs(f,e)},setAttrs:function(b,c){var g=this.idAttribute,f,k,h,n;c=a.merge(c);n=c._transaction={};"id"!==g&&(b=a.merge(b),e.owns(b,g)?b.id=b[g]:e.owns(b,"id")&&(b[g]=b.id));for(k in b)e.owns(b,k)&&this._setAttr(k,b[k],c);if(!e.isEmpty(n)){g=this.changed;h=this.lastChange= {};for(k in n)e.owns(n,k)&&(f=n[k],g[k]=f.newVal,h[k]={newVal:f.newVal,prevVal:f.prevVal,src:f.src||null});c.silent||(this._changeEvent||(this._changeEvent=this.publish("change",{preventable:!1})),c.changed=h,this.fire("change",c))}return this},sync:function(){var a=k(arguments,0,!0).pop();"function"===typeof a&&a()},toJSON:function(){var a=this.getAttrs();delete a.clientId;delete a.destroyed;delete a.initialized;"id"!==this.idAttribute&&delete a.id;return a},undo:function(a,b){var c=this.lastChange, f=this.idAttribute,g={},h;a||(a=e.keys(c));k.each(a,function(a){e.owns(c,a)&&(a=a===f?"id":a,h=!0,g[a]=c[a].prevVal)});return h?this.setAttrs(g,b):this},validate:function(a,b){b&&b()},addAttr:function(a,e,c){var f=this.idAttribute,g;f&&a===f&&(f=this._isLazyAttr("id")||this._getAttrCfg("id"),g=e.value===e.defaultValue?null:e.value,b.isValue(g)||(g=f.value===f.defaultValue?null:f.value,b.isValue(g)||(g=b.isValue(e.defaultValue)?e.defaultValue:f.defaultValue)),e.value=g,f.value!==g&&(f.value=g,this._isLazyAttr("id")? this._state.add("id","lazy",f):this._state.add("id","value",g)));return h.superclass.addAttr.apply(this,arguments)},_parse:function(a){return this.parse(a)},_validate:function(a,e){function c(k){b.isValue(k)?(f.fire(g,{attributes:a,error:k,src:"validate"}),e(k)):e()}var f=this;1===f.validate.length?c(f.validate(a,c)):f.validate(a,c)},_setAttrVal:function(a,b,e,f,c,g){var k=h.superclass._setAttrVal.apply(this,arguments),n=c&&c._transaction,p=g&&g.initializing;k&&(n&&!p)&&(n[a]={newVal:this.get(a), prevVal:e,src:c.src||null});return k}},{NAME:"model",ATTRS:{clientId:{valueFn:"generateClientId",readOnly:!0},id:{value:null}}})},"3.17.2",{requires:["base-build","escape","json-parse"]})},522:function(l,c,a){var p=(c=a(3))&&c.__esModule?c:{"default":c},h=(c=a(4))&&c.__esModule?c:{"default":c};c=a(10);var n=a(22);a=function(){function a(){(0,p.default)(this,a);this.generateActions("update")}(0,h.default)(a,[{key:"save",value:function(a,b){var c=this;return n.put("/api/settings",a,{params:b}).then(function(a){return c.update(a.data)})}}]); return a}();l.exports=c.createActions(a)},523:function(l,c,a){var p=(c=a(3))&&c.__esModule?c:{"default":c},h=(c=a(4))&&c.__esModule?c:{"default":c},n=a(31),b=a(396),k=a(216);c=a(10);var e=a(72),g=a(1249),q=a(49),m=b(k);a=function(){function a(){(0,p.default)(this,a);this.bindListeners({onStaticBootstrap:q.BOOTSTRAP});this.exportPublicMethods({isFeatureEnabled:this.isFeatureEnabled,getLimit:this.getLimit,getFeatureUpsellInfo:this.getFeatureUpsellInfo})}(0,h.default)(a,[{key:"onStaticBootstrap",value:function(){var a= 0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.setState(n.fromJS({features:a.features,featureSetIdentifier:a.featureSetId}))}},{key:"getLimit",value:function(a){a=m[a];return this.getState().getIn(["features","limits",a])||Number.MAX_VALUE}},{key:"isFeatureEnabled",value:function(a){a=m[a];return this.getState().hasIn(["features","enabledFeatures",a])}},{key:"getFeatureUpsellInfo",value:function(a){var b=this.getState().get("featureSetIdentifier");return g.getIn([a,b])}}]);return a}(); l.exports=c.createStore(e(a),"FeaturesStore")},524:function(l,c,a){var p=(c=a(3))&&c.__esModule?c:{"default":c},h=(c=a(4))&&c.__esModule?c:{"default":c};c=a(10);var n=a(49),b=a(502);a=function(){function a(){(0,p.default)(this,a);this.templateInstallations={};this.bindListeners({handleLoadSuccess:b.LOAD_SUCCESS,handleLoadFailure:b.LOAD_FAILURE,handleStaticInitialized:n.BOOTSTRAP,handlePreviewSet:b.SET_PREVIEW_INSTALLATION,handleTemplateSet:b.SET_LIVE_INSTALLATION,handleHomepageCollectionIdSet:b.SET_HOMEPAGE_COLLECTION_ID}); this.exportPublicMethods({getHomepageCollectionId:this.getHomepageCollectionId})}(0,h.default)(a,[{key:"getHomepageCollectionId",value:function(){return this.getState().activeInstallation?this.getState().activeInstallation.homepageCollectionId:this.getState().homepageCollectionId}},{key:"handleStaticInitialized",value:function(a){var b=a.authenticatedAccountWebsiteSettings;this.previewInstallationId=b?b.previewInstallationId:null;this.homepageCollectionId=a.homepageCollectionId;a.templateInstallation? (this.liveInstallationId=a.templateInstallation.id,this.templateInstallations[this.liveInstallationId]=a.templateInstallation):this.liveInstallationId=null;this.updateInstallationReferences()}},{key:"updateInstallationReferences",value:function(){this.liveInstallation=this.getTemplateInstallation(this.liveInstallationId);this.previewInstallation=null;this.previewInstallationId!==this.liveInstallationId&&(this.previewInstallation=this.getTemplateInstallation(this.previewInstallationId));this.activeInstallation= this.previewInstallation||this.liveInstallation}},{key:"getTemplateInstallation",value:function(a){return!a||!this.templateInstallations[a]?null:this.templateInstallations[a]}},{key:"handleHomepageCollectionIdSet",value:function(a){a.error||(this.homepageCollectionId=a.homepageCollectionId,this.activeInstallation&&(this.activeInstallation.homepageCollectionId=a.homepageCollectionId))}},{key:"handlePreviewSet",value:function(a){this.previewInstallationId=a;this.updateInstallationReferences()}},{key:"handleTemplateSet", value:function(a){this.liveInstallationId=a;this.previewInstallationId=null;this.updateInstallationReferences()}},{key:"handleLoadSuccess",value:function(a){var b={};a.forEach(function(a){this[a.id]=a},b);this.maintainMissingInstallation(b,this.liveInstallationId);this.maintainMissingInstallation(b,this.previewInstallationId);this.templateInstallations=b;this.updateInstallationReferences()}},{key:"maintainMissingInstallation",value:function(a,b){b&&!a[b]&&(a[b]=this.templateInstallations[b])}},{key:"handleLoadFailure", value:function(){console.error("Unable to load installations")}}]);return a}();l.exports=c.createStore(a,"TemplateInstallationsStore")},526:function(l,c,a){function p(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"";return e.getTemplateForSingleItem((0,h.default)({},b,{action:a})).replace("{id}",c)}var h=(c=a(15))&&c.__esModule?c:{"default":c},n=a(148),b=a(22),k=a(422),e=a(240),g=a(233);l.exports={read:function(a){var e= arguments[2];return 1<arguments.length&&void 0!==arguments[1]&&arguments[1]?b.get("/api/rest/global-content-items/"+a):b.get(p(g.GET,e,a))},readForCollection:function(a,c){var g=e.getTemplateForCollectionItems(c).replace("{collectionId}",a);return b.get(g)},update:function(a,e){delete a.author;delete a.pendingPushedServices;delete a.pushedServices;return b.put(p(g.PUT,e,a.id),a)},updateForCollection:function(a,e){delete a.author;delete a.pendingPushedServices;delete a.pushedServices;return b.put(p(g.PUT, e,a.id),a)},create:function(a,e,c){return b.post(p(g.POST,c),a,e)},createForCollection:function(a,e,c){return b.post(p(g.POST,c),a,e)},updateField:function(a){a=k(a);return b.post("/api/commondata/SaveItemField",n.stringify(a))},"delete":function(a,e){return b.delete(p(g.DELETE,e,a))},deleteMany:function(a){a=n.stringify({items:a});return b.post("/api/commondata/RemoveItems",a,{headers:{"Content-Type":"application/x-www-form-urlencoded"}})}}},529:function(l,c){l.exports=function(a,c,h){for(var n= -1,b=c.length,k={};++n<b;){var e=c[n],g=a[e];h(g,e)&&(k[e]=g)}return k}},534:function(l,c,a){function p(a){return a&&a.__esModule?a:{"default":a}}c=a(23);var h=p(c);c=a(3);var n=p(c);c=a(4);var b=p(c),k=a(939);a=a(10);c=function(){function a(){(0,n.default)(this,a);this.generateActions("insert","insertMany","deleteSuccess","deleteFailure")}(0,b.default)(a,[{key:"create",value:function(a){var b=this;return function(e){e(a);return k.create(a).then(function(a){a=a.data;b.insert(a);return a.id})}}},{key:"read", value:function(a){var b=this;return function(e){e(a);return k.read(a).then(function(a){return b.insert(a.data)})}}},{key:"readAll",value:function(){var a=this;return k.readAll().then(function(b){return a.insertMany(b.data)}).catch(function(a){return h.default.reject(a.data.message)})}},{key:"delete",value:function(a){var b=this;return function(e){e(a);return k.delete(a).then(function(e){b.deleteSuccess(a);return e},function(e){e=e.data;b.deleteFailure(a,e);return h.default.reject(e.message)})}}}, {key:"deleteUnusedCollectionPermanently",value:function(a){var b=this;return function(e){e(a);return k.deleteUnusedPageCollectionPermanently(a).then(function(e){b.deleteSuccess(a);return e},function(e){e=e.data;b.deleteFailure(a,e);return h.default.reject(e.message)})}}},{key:"update",value:function(a){var b=this;return a.id&&!a.urlId?k.generateUrl(a).then(function(e){a.urlId=e.data.urlId;return k.create(a).then(function(a){b.insert(a.data);return a.data})}).catch(function(a){return h.default.reject(a.data.message)}): k.create(a).then(function(a){a=a.data;b.insert(a);return a})}}]);return a}();l.exports=a.createActions(c)},535:function(l,c,a){var p=(c=a(3))&&c.__esModule?c:{"default":c},h=(c=a(4))&&c.__esModule?c:{"default":c};c=a(10);var n=a(1067);a=function(){function a(){(0,p.default)(this,a)}(0,h.default)(a,[{key:"loadTemplate",value:function(a){return function(b){n.getTemplate(a).then(function(a){b(a.data)},function(a){b({error:!0,response:a})})}}}]);return a}();l.exports=c.createActions(a)},542:function(l, c){l.exports=function(a,c,h){switch(h.length){case 0:return a.call(c);case 1:return a.call(c,h[0]);case 2:return a.call(c,h[0],h[1]);case 3:return a.call(c,h[0],h[1],h[2])}return a.apply(c,h)}},543:function(l,c,a){var p=a(243);l.exports=function(a,c){var b;p(a,function(a,e,g){b=c(a,e,g);return!b});return!!b}},544:function(l,c,a){var p=a(195);l.exports=function(a,c){return function(b,k){if(null==b)return b;if(!p(b))return a(b,k);for(var e=b.length,g=c?e:-1,q=Object(b);(c?g--:++g<e)&&!1!==k(q[g],g, q););return b}}},545:function(l,c,a){c=a(383);var p=a(515),h=a(56),n=c?c.isConcatSpreadable:void 0;l.exports=function(a){return h(a)||p(a)||!(!n||!a||!a[n])}},566:function(l,c,a){var p=a(22),h=a(139),n=a(224),b=a(227);l.exports={load:function(){return p.get("/api/commerce/settings/payment")},approvePayPalBillingAgreement:function(a){return this.startAuthentication(a?h.PAYPAL_LIVE_BILLING:h.PAYPAL_SANDBOX_BILLING)},connect:function(a,b){var c=null;a===n.STRIPE?c=h.STRIPE:a===n.PAYPAL&&(c=b?h.PAYPAL_LIVE_ONBOARDING: h.PAYPAL_SANDBOX_ONBOARDING);return this.startAuthentication(c)},startAuthentication:function(a){return b.authenticate({serviceProvider:a,urlParams:{authenticationType:"website",startSubscription:!0}})},disconnect:function(a){return p.delete("/api/commerce/settings/payment/"+a)},updateStoreCurrency:function(a){return p.put("/api/commerce/settings/payment/store-currency",a,{headers:{"content-type":"text/plain"}})},updateStripeSettings:function(a){return p.put("/api/commerce/settings/payment/stripe", {applePayEnabled:a.isApplePayEnabled,testMode:a.isTestMode})}}},569:function(l,c,a){function p(a){return a&&a.__esModule?a:{"default":a}}c=a(36);var h=p(c);c=a(3);var n=p(c);c=a(4);var b=p(c);c=a(44);var k=p(c);c=a(133);var e=p(c);c=a(43);var g=p(c);c=a(20);c=p(c);var q=a(31),m=q.Record,t=q.Set,f=q.Map,s=a(125),M=a(570);a={allowSquarespacePromotion:!0,amazonAssociateTag:void 0,announcementBarSettings:f(),assetPurchasesByNonAdminsAllowed:!0,businessHours:f(),collectionTitleFormat:void 0,commentAnonAllowed:void 0, commentApprovalRequired:void 0,commentAvatarsOn:void 0,commentDisableAfterDaysDefault:0,commentEnableByDefault:void 0,commentFlagThreshold:0,commentFlagsAllowed:void 0,commentLikesAllowed:void 0,commentSortType:void 0,commentThreaded:void 0,commentsEnabled:!0,configurationMenuItems:void 0,contactEmail:void 0,contactPhoneNumber:void 0,country:void 0,defaultPostFormat:void 0,disqusShortname:"",homepageTitleFormat:void 0,hours:void 0,id:void 0,interfaceType:void 0,itemTitleFormat:void 0,lastAgreedTermsOfService:void 0, markdownMode:void 0,mobileInfoBarSettings:f(),notFoundPageId:null,ownerId:void 0,pinterestOverlayOptions:f(),simpleLikingEnabled:void 0,socialAccountDisplayOrder:void 0,ssBadgeDevices:void 0,ssBadgePosition:void 0,ssBadgeType:void 0,ssBadgeVisibility:void 0,state:void 0,storeSettings:void 0,subjects:void 0,tutorialsCompleted:t(),type:void 0,contentDescription:f(),goals:f(),useDeviceView:!0,useEscapeKeyToLogin:!0,websiteId:void 0};var v=(0,c.default)(a);l.exports=function(a){function f(){var a=0<arguments.length&& void 0!==arguments[0]?arguments[0]:{};(0,n.default)(this,f);return(0,k.default)(this,(f.__proto__||(0,h.default)(f)).call(this,q.fromJS(M(a))))}(0,g.default)(f,a);(0,b.default)(f,[{key:"merge",value:function(a){a=a instanceof m?a:s(M(a),v);return(0,e.default)(f.prototype.__proto__||(0,h.default)(f.prototype),"merge",this).call(this,a)}},{key:"serializeToModel",value:function(){var a=this.toJS(),b=a.tutorialsCompleted;null===a.notFoundPageId&&(a.notFoundPageId="system-default");b&&(a.tutorialsCompleted= b.reduce(function(a,b){a[b]=!0;return a},{}));return a}}]);return f}(m(a))},570:function(l,c,a){var p=(c=a(20))&&c.__esModule?c:{"default":c},h=(c=a(17))&&c.__esModule?c:{"default":c},n=a(31).Set;l.exports=function(a){var c=a.notFoundPageId,e=a.tutorialsCompleted;a=(0,h.default)({},a);e&&(a.tutorialsCompleted=n((0,p.default)(e)));"system-default"===c&&(a.notFoundPageId=null);return a}},571:function(l,c){l.exports={updateStoreCurrencyClass:function(a,c){var h=document.body.classList;h.remove("native-currency-code-"+ a.toLowerCase());h.add("native-currency-code-"+c.toLowerCase())}}},573:function(l,c,a){var p=a(22);l.exports={getResult:function(a){return p.get("/auth/ExternalAuthenticationGetResult",{params:{uuid:a}})}}},587:function(l,c){YUI.add("squarespace-model-sync-rest",function(a){function c(){this._ioConfigCache={}}c.prototype={sync:function(c,n,b){a.Lang.isValue(n.timeout)||(n.timeout=1E7);a.ModelSync.REST.prototype.sync.apply(this,arguments)},_storeRequest:function(c,n){this._ioConfigCache[c.id]=a.merge(n, {})},_retrieveAndEvict:function(a){var c=this._ioConfigCache[a];this._ioConfigCache[a]=null;return c},_isCrumbFailure:function(a){return a&&a.crumbFail&&a.crumb},_sendSyncIORequest:function(c){var n=a.ModelSync.REST.prototype._sendSyncIORequest.apply(this,arguments);this._storeRequest(n,c);return n},_onSyncIOEnd:function(c,n){this._retrieveAndEvict(c);a.ModelSync.REST.prototype._onSyncIOEnd.apply(this,arguments)},_onSyncIOSuccess:function(c,n,b){var k=this._retrieveAndEvict(c),e={},g=n.responseText; a.Lang.isValue(g)&&g.trim()&&(e=a.JSON.parse(g));this._isCrumbFailure(e)?(e=e.crumb,a.ModelSync.REST.CSRF_TOKEN=e,a.Env.CSRF_TOKEN=e,k.headers["X-CSRF-Token"]=e,this._sendSyncIORequest(k)):a.ModelSync.REST.prototype._onSyncIOSuccess.apply(this,arguments)},_onSyncIOFailure:function(c,n,b){if(c=b.callback){b={};var k=n.responseText;a.Lang.isValue(k)&&k.trim()&&(b=a.JSON.parse(k));c({code:n.status,msg:n.statusText,responseJSON:b},n)}}};a.mix(c,a.ModelSync.REST,!1,null,1);a.namespace("Squarespace.ModelSync").REST= c},"1.0",{requires:["model-sync-rest"]})},588:function(l,c){YUI.add("model-list",function(a,c){function h(){h.superclass.constructor.apply(this,arguments)}var n=a.Attribute.prototype,b=a.Lang,k=a.Array;a.ModelList=a.extend(h,a.Base,{model:a.Model,_isYUIModelList:!0,initializer:function(b){b||(b={});var c=this.model=b.model||this.model;"string"===typeof c&&((this.model=a.Object.getValue(a,c.split(".")))||a.error("ModelList: Model class not found: "+c));this.publish("add",{defaultFn:this._defAddFn}); this.publish("reset",{defaultFn:this._defResetFn});this.publish("remove",{defaultFn:this._defRemoveFn});this.after("*:idChange",this._afterIdChange);this._clear();b.items&&this.add(b.items,{silent:!0})},destructor:function(){this._clear()},add:function(e,c){var h=e._isYUIModelList;return h||b.isArray(e)?k.map(h?e.toArray():e,function(b,e){var f=c||{};"index"in f&&(f=a.merge(f,{index:f.index+e}));return this._add(b,f)},this):this._add(e,c)},create:function(b,c,k){var m=this;"function"===typeof c&& (k=c,c={});c||(c={});b._isYUIModel||(b=new this.model(b));m.fire("create",a.merge(c,{model:b}));return b.save(c,function(a){a||m.add(b,c);k&&k.apply(null,arguments)})},each:function(a,b){var c=this._items.concat(),m,k,f;m=0;for(f=c.length;m<f;m++)k=c[m],a.call(b||k,k,m,this);return this},filter:function(a,b){var c=[],m=this._items,k,f,h;"function"===typeof a&&(b=a,a={});k=0;for(h=m.length;k<h;++k)f=m[k],b.call(this,f,k,this)&&c.push(f);return a.asList?(m=new this.constructor({model:this.model}),c.length&& m.add(c,{silent:!0}),m):c},get:function(a){return this.attrAdded(a)?n.get.apply(this,arguments):this.invoke("get",a)},getAsHTML:function(b){return this.attrAdded(b)?a.Escape.html(n.get.apply(this,arguments)):this.invoke("getAsHTML",b)},getAsURL:function(a){return this.attrAdded(a)?encodeURIComponent(n.get.apply(this,arguments)):this.invoke("getAsURL",a)},getByClientId:function(a){return this._clientIdMap[a]||null},getById:function(a){return this._idMap[a]||null},invoke:function(a){var b=[this._items, a].concat(k(arguments,1,!0));return k.invoke.apply(k,b)},load:function(a,b){var c=this;"function"===typeof a&&(b=a,a={});a||(a={});this.sync("read",a,function(m,k){var f={options:a,response:k},h;m?(f.error=m,f.src="load",c.fire("error",f)):(c._loadEvent||(c._loadEvent=c.publish("load",{preventable:!1})),h=f.parsed=c._parse(k),c.reset(h,a),c.fire("load",f));b&&b.apply(null,arguments)});return this},map:function(a,b){return k.map(this._items,a,b)},parse:function(b){if("string"===typeof b)try{return a.JSON.parse(b)|| []}catch(c){return this.fire("error",{error:c,response:b,src:"parse"}),null}return b||[]},remove:function(a,c){var h=a._isYUIModelList;return h||b.isArray(a)?(a=k.map(h?a.toArray():a,function(a){return b.isNumber(a)?this.item(a):a},this),k.map(a,function(a){return this._remove(a,c)},this)):this._remove(a,c)},reset:function(b,c){b||(b=[]);c||(c={});var h=a.merge({src:"reset"},c);b=b._isYUIModelList?b.toArray():k.map(b,function(a){return a._isYUIModel?a:new this.model(a)},this);h.models=b;c.silent? this._defResetFn(h):(this.comparator&&b.sort(a.bind(this._sort,this)),this.fire("reset",h));return this},some:function(a,b){var c=this._items.concat(),k,h,f;k=0;for(f=c.length;k<f;k++)if(h=c[k],a.call(b||h,h,k,this))return!0;return!1},sort:function(b){if(!this.comparator)return this;var c=this._items.concat();b||(b={});c.sort(a.rbind(this._sort,this,b));c=a.merge(b,{models:c,src:"sort"});b.silent?this._defResetFn(c):this.fire("reset",c);return this},sync:function(){var a=k(arguments,0,!0).pop();"function"=== typeof a&&a()},toArray:function(){return this._items.concat()},toJSON:function(){return this.map(function(a){return a.toJSON()})},_add:function(c,g){var k;g||(g={});c._isYUIModel||(c=new this.model(c));k=c.get("id");if(this._clientIdMap[c.get("clientId")]||b.isValue(k)&&this._idMap[k])this.fire("error",{error:"Model is already in the list.",model:c,src:"add"});else return k=a.merge(g,{index:"index"in g?g.index:this._findIndex(c),model:c}),g.silent?this._defAddFn(k):this.fire("add",k),c},_attachList:function(a){a.lists.push(this); a.addTarget(this)},_clear:function(){k.each(this._items,this._detachList,this);this._clientIdMap={};this._idMap={};this._items=[]},_compare:function(a,b){return a<b?-1:a>b?1:0},_detachList:function(a){var b=k.indexOf(a.lists,this);-1<b&&(a.lists.splice(b,1),a.removeTarget(this))},_findIndex:function(a){var b=this._items,c=b.length,k=0,h,f;if(!this.comparator||!c)return c;for(f=this.comparator(a);k<c;)h=k+c>>1,a=b[h],0>this._compare(this.comparator(a),f)?k=h+1:c=h;return k},_parse:function(a){return this.parse(a)}, _remove:function(c,g){var k;g||(g={});b.isNumber(c)?(k=c,c=this.item(k)):k=this.indexOf(c);if(-1===k||!c)this.fire("error",{error:"Model is not in the list.",index:k,model:c,src:"remove"});else return k=a.merge(g,{index:k,model:c}),g.silent?this._defRemoveFn(k):this.fire("remove",k),c},_sort:function(a,b,c){a=this._compare(this.comparator(a),this.comparator(b));return 0===a?a:c&&c.descending?-a:a},_afterIdChange:function(a){var c=a.newVal,k=a.prevVal;a=a.target;if(b.isValue(k))if(this._idMap[k]=== a)delete this._idMap[k];else return;else if(-1===this.indexOf(a))return;b.isValue(c)&&(this._idMap[c]=a)},_defAddFn:function(a){var c=a.model,k=c.get("id");this._clientIdMap[c.get("clientId")]=c;b.isValue(k)&&(this._idMap[k]=c);this._attachList(c);this._items.splice(a.index,0,c)},_defRemoveFn:function(a){var c=a.model,k=c.get("id");this._detachList(c);delete this._clientIdMap[c.get("clientId")];b.isValue(k)&&delete this._idMap[k];this._items.splice(a.index,1)},_defResetFn:function(a){"sort"===a.src? this._items=a.models.concat():(this._clear(),a.models.length&&this.add(a.models,{silent:!0}))}},{NAME:"modelList"});a.augment(h,a.ArrayList)},"3.17.2",{requires:"array-extras array-invoke arraylist base-build escape json-parse model".split(" ")})},589:function(l,c){YUI.add("model-sync-rest",function(a,c){function h(){}var n=a.Lang;h.CSRF_TOKEN=YUI.Env.CSRF_TOKEN;h.EMULATE_HTTP=!1;h.HTTP_HEADERS={Accept:"application/json","Content-Type":"application/json"};h.HTTP_METHODS={create:"POST",read:"GET", update:"PUT","delete":"DELETE"};h.HTTP_TIMEOUT=3E4;h._NON_ATTRS_CFG=["root","url"];h.prototype={root:"",url:"",initializer:function(a){a||(a={});"root"in a&&(this.root=a.root||"");"url"in a&&(this.url=a.url||"")},getURL:function(b,c){var e=this.root,g=this.url;return this._isYUIModelList?!g?this.model.prototype.root:this._substituteURL(g,a.merge(this.getAttrs(),c)):e&&("create"===b||this.isNew())?e:!g?this._joinURL(this.getAsURL("id")||""):this._substituteURL(g,a.merge(this.getAttrs(),c))},parseIOResponse:function(a){return a.responseText}, serialize:function(b){return a.JSON.stringify(this)},sync:function(b,c,e){c||(c={});var g=this.getURL(b,c),n=h.HTTP_METHODS[b],m=a.merge(h.HTTP_HEADERS,c.headers),l=c.timeout||h.HTTP_TIMEOUT;c=c.csrfToken||h.CSRF_TOKEN;var f;"POST"===n||"PUT"===n?f=this.serialize(b):delete m["Content-Type"];if(h.EMULATE_HTTP&&("PUT"===n||"DELETE"===n))m["X-HTTP-Method-Override"]=n,n="POST";if(c&&("POST"===n||"PUT"===n||"DELETE"===n))m["X-CSRF-Token"]=c;this._sendSyncIORequest({action:b,callback:e,entity:f,headers:m, method:n,timeout:l,url:g})},_joinURL:function(a){var c=this.root;if(!c&&!a)return"";"/"===a.charAt(0)&&(a=a.substring(1));return c&&"/"===c.charAt(c.length-1)?c+a+"/":c+"/"+a},_parse:function(a){"function"===typeof this.parseIOResponse&&(a=this.parseIOResponse(a));return this.parse(a)},_sendSyncIORequest:function(b){return a.io(b.url,{arguments:{action:b.action,callback:b.callback,url:b.url},context:this,data:b.entity,headers:b.headers,method:b.method,timeout:b.timeout,on:{start:this._onSyncIOStart, failure:this._onSyncIOFailure,success:this._onSyncIOSuccess,end:this._onSyncIOEnd}})},_substituteURL:function(b,c){if(!b)return"";var e={};a.Object.each(c,function(a,b){if(n.isString(a)||n.isNumber(a))e[b]=encodeURIComponent(a)});return n.sub(b,e)},_onSyncIOEnd:function(a,c){},_onSyncIOFailure:function(a,c,e){(a=e.callback)&&a({code:c.status,msg:c.statusText},c)},_onSyncIOSuccess:function(a,c,e){(a=e.callback)&&a(null,c)},_onSyncIOStart:function(a,c){}};a.namespace("ModelSync").REST=h},"3.17.2",{requires:["model", "io-base","json-stringify"]})},590:function(l,c){l.exports={ENABLED:1,DISABLED:2}},592:function(l,c,a){var p=(c=a(3))&&c.__esModule?c:{"default":c},h=(c=a(4))&&c.__esModule?c:{"default":c};a=a(10);c=function(){function a(){(0,p.default)(this,a);this.generateActions("refresh","setUrl","removeLoadHandler","disableEditing","enableEditing","lockFrame","unlockFrame")}(0,h.default)(a,[{key:"addLoadHandler",value:function(a,c){return{key:a,callback:c}}}]);return a}();l.exports=a.createActions(c)},714:function(l, c,a){c=(c=a(185))&&c.__esModule?c:{"default":c};l.exports=(0,c.default)({TRIAL_UPGRADE_PLAN:"trial-upgrade",UPGRADE_PLAN:"upgrade"})},715:function(l,c,a){function p(a){return a&&a.__esModule?a:{"default":a}}c=a(23);var h=p(c);c=a(3);var n=p(c);c=a(4);var b=p(c);c=a(31);var k=c.Map,e=c.fromJS;c=a(10);var g=a(534);a=a(72);var q=function(){function a(){(0,n.default)(this,a);this.state=k();this.bindListeners({onInsert:g.insert,onInsertMany:g.insertMany,onDelete:[g.delete,g.deleteUnusedCollectionPermanently]}); this.exportPublicMethods({fetch:this.fetch,fetchFromServer:this.fetchFromServer})}(0,b.default)(a,[{key:"onInsert",value:function(a){this.setState(this.state.set(a.id,e(a)))}},{key:"onInsertMany",value:function(a){var b=this.state;a.forEach(function(a){return b=b.set(a.id,e(a))});this.setState(b)}},{key:"onDelete",value:function(a){this.setState(this.state.delete(a))}},{key:"fetch",value:function(a){var b=this.getState().get(a);return b?h.default.resolve(b):this.fetchFromServer(a)}},{key:"fetchFromServer", value:function(a){var b=this;return g.read(a).then(function(){return b.getState().get(a)})}}]);return a}();l.exports=c.createStore(a(q),"ContentCollectionStore")},748:function(l,c){l.exports={WEBSITE_LEGACY_TRIAL:"website-legacy-trial",WEBSITE_CLASSIC_TRIAL:"website-classic-trial",WEBSITE_CLASSIC_PERSONAL:"website-classic-personal",WEBSITE_CLASSIC_PROFESSIONAL:"website-classic-professional",WEBSITE_CLASSIC_COMPED:"website-classic-comped",WEBSITE_LEGACY_COMPED:"website-legacy-comped",WEBSITE_LEGACY_PROFESSIONAL:"website-legacy-professional", WEBSITE_LEGACY_PERSONAL:"website-legacy-personal",WEBSITE_LEGACY_COMMERCE:"website-legacy-commerce",WEBSITE_COVER_PAGE:"website-starter",WEBSITE_COVER_PAGE_TRIAL:"website-starter-trial",WEBSITE_COMMERCE_TRIAL:"website-commerce-trial",WEBSITE_COMMERCE_BASIC:"website-commerce-basic",WEBSITE_COMMERCE_ADVANCED:"website-commerce-advanced",PARKING_PAGE_REMOVED:"parking-page-removed",WEBSITE_V5_LINKED_LOW:"website-v5-linked-low",WEBSITE_V5_LINKED_HIGH:"website-v5-linked-high",WEBSITE_PARKING_PAGE:"website-parking-page"}}, 900:function(l,c){YUI.add("datatype-date-format",function(a,c){var h=function(a,c,e){"undefined"===typeof e&&(e=10);for(c+="";parseInt(a,10)<e&&1<e;e/=10)a=c+a;return a.toString()},n={formats:{a:function(a,c){return c.a[a.getDay()]},A:function(a,c){return c.A[a.getDay()]},b:function(a,c){return c.b[a.getMonth()]},B:function(a,c){return c.B[a.getMonth()]},C:function(a){return h(parseInt(a.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(a){return h(parseInt(n.formats.G(a)%100, 10),0)},G:function(a){var c=a.getFullYear(),e=parseInt(n.formats.V(a),10);a=parseInt(n.formats.W(a),10);a>e?c++:0===a&&52<=e&&c--;return c},H:["getHours","0"],I:function(a){a=a.getHours()%12;return h(0===a?12:a,0)},j:function(a){var c=new Date(""+a.getFullYear()+"/1/1 GMT");a=new Date(""+a.getFullYear()+"/"+(a.getMonth()+1)+"/"+a.getDate()+" GMT")-c;a=parseInt(a/6E4/60/24,10)+1;return h(a,0,100)},k:["getHours"," "],l:function(a){a=a.getHours()%12;return h(0===a?12:a," ")},m:function(a){return h(a.getMonth()+ 1,0)},M:["getMinutes","0"],p:function(a,c){return c.p[12<=a.getHours()?1:0]},P:function(a,c){return c.P[12<=a.getHours()?1:0]},s:function(a,c){return parseInt(a.getTime()/1E3,10)},S:["getSeconds","0"],u:function(a){a=a.getDay();return 0===a?7:a},U:function(a){var c=parseInt(n.formats.j(a),10);a=6-a.getDay();c=parseInt((c+a)/7,10);return h(c,0)},V:function(a){var c=parseInt(n.formats.W(a),10),e=(new Date(""+a.getFullYear()+"/1/1")).getDay(),c=c+(4<e||1>=e?0:1);53===c&&4>(new Date(""+a.getFullYear()+ "/12/31")).getDay()?c=1:0===c&&(c=n.formats.V(new Date(""+(a.getFullYear()-1)+"/12/31")));return h(c,0)},w:"getDay",W:function(a){var c=parseInt(n.formats.j(a),10);a=7-n.formats.u(a);c=parseInt((c+a)/7,10);return h(c,0,10)},y:function(a){return h(a.getFullYear()%100,0)},Y:"getFullYear",z:function(a){a=a.getTimezoneOffset();var c=h(parseInt(Math.abs(a/60),10),0),e=h(Math.abs(a%60),0);return(0<a?"-":"+")+c+e},Z:function(a){var c=a.toString().replace(/^.*:\d\d( GMT[+-]\d+)? \(?([A-Za-z ]+)\)?\d*$/,"$2").replace(/[a-z ]/g, "");4<c.length&&(c=n.formats.z(a));return c},"%":function(a){return"%"}},aggregates:{c:"locale",D:"%m/%d/%y",F:"%Y-%m-%d",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"},format:function(b,c){c=c||{};if(!a.Lang.isDate(b))return a.Lang.isValue(b)?b:"";var e,g;e=c.format||"%Y-%m-%d";g=a.Intl.get("datatype-date-format");for(var l=function(a,b){var c=n.aggregates[b];return"locale"===c?g[b]:c},m=function(c,f){var e=n.formats[f];switch(a.Lang.type(e)){case "string":return b[e](); case "function":return e.call(b,b,g);case "array":if("string"===a.Lang.type(e[0]))return h(b[e[0]](),e[1]);default:return f}};e.match(/%[cDFhnrRtTxX]/);)e=e.replace(/%([cDFhnrRtTxX])/g,l);e=e.replace(/%([aAbBCdegGHIjklmMpPsSuUVwWyYzZ%])/g,m);l=m=void 0;return e}};a.mix(a.namespace("Date"),n);a.namespace("DataType");a.DataType.Date=a.Date},"3.17.2",{lang:"ar ar-JO ca ca-ES da da-DK de de-AT de-DE el el-GR en en-AU en-CA en-GB en-IE en-IN en-JO en-MY en-NZ en-PH en-SG en-US es es-AR es-BO es-CL es-CO es-EC es-ES es-MX es-PE es-PY es-US es-UY es-VE fi fi-FI fr fr-BE fr-CA fr-FR hi hi-IN hu id id-ID it it-IT ja ja-JP ko ko-KR ms ms-MY nb nb-NO nl nl-BE nl-NL pl pl-PL pt pt-BR ro ro-RO ru ru-RU sv sv-SE th th-TH tr tr-TR vi vi-VN zh-Hans zh-Hans-CN zh-Hant zh-Hant-HK zh-Hant-TW".split(" ")})}, 939:function(l,c,a){var p=a(148),h=a(22),n=a(422),b=a(1265);l.exports={generateUrl:function(a){if(a.id){var c=3>a.title.length?a.typeName+"-"+a.title:a.title,c=b(c);return h.post("/api/content-collections/"+a.id+"/generate-url",{title:a.title,urlId:c})}},create:function(a){a=n(a);a=p.stringify(a);return h.post("/api/commondata/SaveCollection",a,{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}})},read:function(a){return h.get("/api/commondata/GetCollection",{params:{collectionId:a}})}, readAll:function(){return h.get("/api/commondata/GetCollections")},"delete":function(a){return h.post("/api/commondata/RemoveCollection",p.stringify({collectionId:a}))},deleteUnusedPageCollectionPermanently:function(a){return h.post("/api/commondata/unused-start-page-collection",p.stringify({collectionId:a}))}}},967:function(l,c,a){var p=a(1085),h=a(1087),n=a(120),b=a(56),k=a(402);l.exports=function(a,c,l){var m=b(a)?p:h;l&&k(a,c,l)&&(c=void 0);return m(a,n(c,3))}},995:function(l,c,a){var p=(c=a(3))&& c.__esModule?c:{"default":c},h=(c=a(4))&&c.__esModule?c:{"default":c};c=a(10);var n=a(1007);a=function(){function a(){(0,p.default)(this,a);this.generateActions("saveSuccess")}(0,h.default)(a,[{key:"save",value:function(a,b){var c=this;return function(h){h();return n.save(a,b).then(function(a){c.saveSuccess(a)})}}}]);return a}();l.exports=c.createActions(a)},996:function(l,c,a){c=a(10);l.exports=c.generateActions("update")},998:function(l,c,a){function p(a){return a&&a.__esModule?a:{"default":a}} c=a(17);var h=p(c);c=a(3);var n=p(c);c=a(4);var b=p(c);c=a(10);var k=a(49),e=a(535),g=a(534),q=a(996),m=a(715),t=a(125);a=function(){function a(){(0,n.default)(this,a);this.state={};this.bindListeners({onSiteLayoutReset:[k.bootstrap,e.loadTemplate],onSiteLayoutUpdate:q.update,onRemoveCollection:g.deleteSuccess});this.exportPublicMethods({getCollectionLinks:this.getCollectionLinks,getCollectionLink:this.getCollectionLink,filterChildren:this.filterChildren})}(0,b.default)(a,[{key:"onSiteLayoutReset", value:function(a){a=a.siteLayout;if(!a)return!1;var b={};a.forEach(function(a){b[a.identifier]=a});this.setState(b)}},{key:"onSiteLayoutUpdate",value:function(a){var b=this,c,f=a.widgetName;a=a.navigationData.items.map(function(a){return b.formatItemData(f,a)});this.setState((c={},c[f]=(0,h.default)({},this.state[f],{links:a}),c))}},{key:"formatItemData",value:function(a,b){var c=this;if(b.externalLink)return b;var f=m.getState().get(b.collectionId),f=f?f.toJS():this.findNavItem(a,b.collectionId); b.items&&b.items.forEach(function(b){return c.formatItemData(a,b)});return this.composeNavItem(b,f)}},{key:"composeNavItem",value:function(a){var b=t(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},"collectionType enabled passwordProtected title typeName urlId".split(" "));a.items&&(a.children=a.items,delete a.items);return(0,h.default)(a,b)}},{key:"findNavItem",value:function(a,b){for(var c=this.state[a].links;c.length;){var f=c.pop();if(f.collectionId===b)return f;f.children&&(c=c.concat(f.children))}}}, {key:"onRemoveCollection",value:function(a){var b=(0,h.default)({},this.state),c;for(c in b){var f=this.filterChildren(this.state[c].links,a);b[c]=(0,h.default)({},this.state[c],{links:f})}this.setState(b)}},{key:"filterChildren",value:function(a,b){var c=this;a=a.slice();return a.filter(function(a){a.children&&a.children.length&&(a.children=c.filterChildren(a.children,b));return a.collectionId!==b})}},{key:"getCollectionLinks",value:function(){return this.state.reduce(function(a,b){a.push(b.links.filter(function(a){return!!a.collectionId})); return a},[])}},{key:"getCollectionLink",value:function(a){for(var b=[].concat(this.getCollectionLinks()),c=0;c<b.length;c++){if(b[c].collectionId===a)return b[c];b=b.concat(b[c].children)}}}]);return a}();l.exports=c.createStore(a,"SiteNavigationStore")},1007:function(l,c,a){var p=a(22);l.exports={save:function(a,c){return p.put("/api/member-website-settings/"+a,c)},commerceUpsellShown:function(a){return p.post("/api/member-website-settings/"+a+"/commerce-upsell-shown")}}},1067:function(l,c,a){var p= a(22);l.exports={getTemplate:function(a){return p.get("/api/templates/"+a)}}},1068:function(l,c,a){var p=a(22),h=a(148);l.exports={loadTemplateInstallations:function(){return p.get("/api/template-installations")},setLiveInstallation:function(a){return p.post("/api/template/SetTemplate",h.stringify({installationId:a}))},updateInstallation:function(a){return p.put("/api/template-installations/"+a.id,a)},setHomepageCollectionId:function(a){return p.post("/api/template/SetHomepageCollection",h.stringify({collectionId:a}))}}}, 1085:function(l,c){l.exports=function(a,c){for(var h=-1,n=a?a.length:0;++h<n;)if(!c(a[h],h,a))return!1;return!0}},1087:function(l,c,a){var p=a(243);l.exports=function(a,c){var b=!0;p(a,function(a,e,g){return b=!!c(a,e,g)});return b}},1105:function(l,c){YUI.add("datatype-date-math",function(a,c){var h=a.Lang;a.mix(a.namespace("Date"),{isValidDate:function(a){return h.isDate(a)&&isFinite(a)&&"Invalid Date"!=a&&!isNaN(a)&&null!=a?!0:!1},areEqual:function(a,b){return this.isValidDate(a)&&this.isValidDate(b)&& a.getTime()==b.getTime()},isGreater:function(a,b){return this.isValidDate(a)&&this.isValidDate(b)&&a.getTime()>b.getTime()},isGreaterOrEqual:function(a,b){return this.isValidDate(a)&&this.isValidDate(b)&&a.getTime()>=b.getTime()},isInRange:function(a,b,c){return this.isGreaterOrEqual(a,b)&&this.isGreaterOrEqual(c,a)},addDays:function(a,b){return new Date(a.getTime()+864E5*b)},addMonths:function(a,b){var c=a.getFullYear(),e=a.getMonth()+b,c=Math.floor(c+e/12),e=(e%12+12)%12,g=new Date(a.getTime()); g.setFullYear(c);g.setMonth(e);return g},addYears:function(a,b){var c=a.getFullYear()+b,e=new Date(a.getTime());e.setFullYear(c);return e},listOfDatesInMonth:function(a){if(!this.isValidDate(a))return[];var b=this.daysInMonth(a),c=a.getFullYear();a=a.getMonth();for(var e=[],g=1;g<=b;g++)e.push(new Date(c,a,g,12,0,0));return e},daysInMonth:function(a){if(!this.isValidDate(a))return 0;var b=a.getMonth(),c=[31,28,31,30,31,30,31,31,30,31,30,31];if(1!=b)return c[b];a=a.getFullYear();return 0===a%400?29: 0===a%100?28:0===a%4?29:28}});a.namespace("DataType");a.DataType.Date=a.Date},"3.17.2",{requires:["yui-base"]})},1106:function(l,c){YUI.add("datatype-date-parse",function(a,c){a.mix(a.namespace("Date"),{parse:function(c){c=new Date(+c||c);return a.Lang.isDate(c)?c:null}});a.namespace("Parsers").date=a.Date.parse;a.namespace("DataType");a.DataType.Date=a.Date},"3.17.2")},1247:function(l,c,a){c=a(187);var p=a(47);a=a(1258);l.exports={DEFAULT_COLLECTION_CONFIGURATIONS:{page:{collectionType:p.COLLECTION_TYPE_PAGE, typeName:"page",title:"Page",ordering:c.CUSTOM,icon:"page",addText:"Add Block"},"gallery-block":{collectionType:p.GALLERY_BLOCK,typeName:"gallery-block",title:"Gallery Block",ordering:c.USER,acceptTypes:["image","video"]},products:{collectionType:p.PRODUCTS,typeName:"products",title:"Products",pageSize:20,ordering:c.USER,acceptTypes:["store_item"],view:a.PRODUCT_TABLE,icon:"products",addText:"Add Product"},"template-page":{collectionType:p.TEMPLATE_PAGE,title:"Template Page",icon:"projects"},"splash-page":{collectionType:p.SPLASH_PAGE, typeName:"splash-page",title:"Cover Page",ordering:c.CUSTOM,icon:"splash-page"},subscription:{collectionType:p.COLLECTION_TYPE_SUBSCRIPTION,typeName:"subscription",title:"Subscription",ordering:c.CHRONOLOGICAL}},DEFAULT_COLLECTION_CONFIGURATION:{collectionType:p.COLLECTION_TYPE_GENERIC,supported:!0,supportsVideoBackgrounds:!1},DEFAULT_TEMPLATE_PAGE_CONFIGURATION:{icon:"template-page",collectionType:p.TEMPLATE_PAGE,supported:!0,folder:!1,supportsVideoBackgrounds:!1}}},1249:function(l,c,a){c=(c=a(185))&& c.__esModule?c:{"default":c};var p=a(714),h=a(216),n=a(748);a=a(31);a=a.Map().set(h.ABANDONED_CART_RECOVERY,a.Map().set(n.WEBSITE_LEGACY_TRIAL,(0,c.default)({title:"Switch Product Line",message:"Switch to the new Squarespace Commerce product to get Abandoned Checkout. Your current plan doesn't include this feature.",destination:p.TRIAL_UPGRADE_PLAN})).set(n.WEBSITE_LEGACY_BUSINESS,(0,c.default)({title:"Switch Product Line",message:"Switch to the new Squarespace Commerce product to get Abandoned Checkout. Your current plan doesn't include this feature.", destination:p.UPGRADE_PLAN})).set(n.WEBSITE_COMMERCE_TRIAL,(0,c.default)({isSoftWarning:!0,title:"Note",message:"To continue using Abandoned Checkout after your trial, subscribe to the Advanced plan.",destination:p.TRIAL_UPGRADE_PLAN})).set(n.WEBSITE_COMMERCE_BASIC,(0,c.default)({title:"Upgrade Needed",message:"Upgrade to the Advanced plan to get Abandoned Checkout. Your current plan doesn't include this feature.",destination:p.UPGRADE_PLAN}))).set(h.REAL_TIME_SHIPPING_RATES,a.Map().set(n.WEBSITE_LEGACY_TRIAL, (0,c.default)({title:"Switch Product Line",message:"To use Real‑Time Carrier Rates, you must switch to the new Squarespace Commerce product.",destination:p.TRIAL_UPGRADE_PLAN})).set(n.WEBSITE_COMMERCE_TRIAL,(0,c.default)({isSoftWarning:!0,title:"Note",message:"To continue using Real‑Time Carrier Rates after your trial, subscribe to the Advanced plan.",destination:p.TRIAL_UPGRADE_PLAN})).set(n.WEBSITE_COMMERCE_BASIC,(0,c.default)({title:"Upgrade Needed",message:"Upgrade to the Advanced plan to get Real‑Time Carrier Rates. Your current plan doesn't include this feature.", destination:p.UPGRADE_PLAN}))).set(h.SHIPSTATION_INTEGRATION,a.Map().set(n.WEBSITE_LEGACY_TRIAL,(0,c.default)({title:"Switch Product Line",message:"To connect ShipStation, you must switch to the new Squarespace Commerce product.",destination:p.TRIAL_UPGRADE_PLAN}))).set(h.COMMERCE,a.Map().set(n.WEBSITE_LEGACY_TRIAL,(0,c.default)({title:"Cannot Go Live",message:"Subscribe to a paid plan to launch your store and start accepting payments.",destination:p.TRIAL_UPGRADE_PLAN})).set(n.WEBSITE_CLASSIC_TRIAL, (0,c.default)({title:"Cannot Go Live",message:"Subscribe to a paid plan to launch your store and start accepting payments.",destination:p.TRIAL_UPGRADE_PLAN})).set(n.WEBSITE_COMMERCE_TRIAL,(0,c.default)({title:"Cannot Go Live",message:"Subscribe to a paid plan to launch your store and start accepting payments.",destination:p.TRIAL_UPGRADE_PLAN}))).set(h.CRM,a.Map().set(n.WEBSITE_LEGACY_COMMERCE,(0,c.default)({title:"Switch to Squarespace Commerce",message:"Switch to the Squarespace Commerce product to view and manage your customers. Your current plan doesn't include this feature.", destination:p.UPGRADE_PLAN,isSoftWarning:!0})));l.exports=a},1258:function(l,c){l.exports={LIST:"list",GRID:"grid",PRODUCT:"product"}},1265:function(l,c){l.exports=function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"").toLowerCase().replace(/[^a-z0-9_\s]+/g,"").replace(/[\s]+/g,"-")}},1296:function(l,c,a){var p=a(184),h=a(523),n=a(216),b=a(47),k=a(718);YUI.add("squarespace-content-collection-utils",function(a){a.namespace("Squarespace").ContentCollectionUtils={groupCollectionsByTypeName:function(b){for(var c= {},m=0;m<b.length;m++){var h=b[m];if(!h.get("isDemoCollection")){h=h.get("typeName");if(!c[h]){var f=p.getState().collectionConfigs[h];c[h]={title:f?f.title:"Unknown",collections:[]}}c[h].collections.push(b[m])}}return a.Object.values(c)},getIconClassNames:function(a){var c=a.getTemplateConfiguration(),e="";c&&c.get("supported")&&(e=c.get("icon"));""===e&&(c&&c.get("collectionType")===b.TEMPLATE_PAGE)&&(e="template-page");""===e&&(e=a.get("typeName"));return e},filterCollections:function(c,h){var m= ["collectionType","ordering","folder","index"];return a.Squarespace.ContentCollectionCache.filter(function(k){if(a.Lang.isArray(h)&&-1!==h.indexOf(k.get("id"))||k.get("isDemoCollection")&&k.get("type")!==b.TEMPLATE_PAGE)return!1;var f=!0,l=k.getTemplateConfiguration(),n;for(n in c)if(f=c[n],a.Lang.isArray(f)||(f=[f]),f=a.Array.some(f,function(b,c){var f;f=n;f=-1!==m.indexOf(f)?a.Lang.isValue(l)&&l.get(f)===b:k.get(f)===b;return f}),!f)break;return f})},getCollectionFilter:function(a,c){return a=== b.PRODUCTS?{collectionType:a}:{collectionType:a,ordering:c}},isTemplatePage:function(a){return a.get("type")===b.TEMPLATE_PAGE},isIndex:function(a){return(a=a.getTemplateConfiguration())&&a.get("folderBehavior")==k.INDEX?!0:!1},isFolder:function(a){return(a=a.getTemplateConfiguration())&&a.get("folder")},isVanillaFolder:function(a){return this.isFolder(a)&&!this.isIndex(a)},isAdjustablePageSizeCollection:function(c){var h=p.getCollectionConfig(c.get("typeName")),h=h&&h.forcePageSize,m=c.get("type")=== b.COLLECTION_TYPE_GENERIC,k=this._getCollectionOrdering(c)===a.Squarespace.CollectionOrdering.CHRONOLOGICAL;return!h&&!this.isIndex(c)&&!this.isFolder(c)&&m&&k},isBlog:function(b){return!this.isGenericOrProduct(b)||this.isFolder(b)||this.isIndex(b)?!1:this._getCollectionOrdering(b)==a.Squarespace.CollectionOrdering.CHRONOLOGICAL?!0:!1},isGallery:function(b){return!this.isGeneric(b)||this.isFolder(b)||this.isIndex(b)?!1:this._getCollectionOrdering(b)===a.Squarespace.CollectionOrdering.USER},_getCollectionOrdering:function(a){return a.get("ordering")|| a.getTemplateConfiguration().get("ordering")},isPostableByEmailAddress:function(c){var h=c.get("postByEmailAddress"),m=this._getCollectionOrdering(c);return a.Object.isEmpty(h)?!1:!this.isIndex(c)&&!this.isFolder(c)&&c.get("type")===b.COLLECTION_TYPE_GENERIC&&m!==a.Squarespace.CollectionOrdering.CALENDAR&&m!==a.Squarespace.CollectionOrdering.CUSTOM&&m!==a.Squarespace.CollectionOrdering.MUSIC_ALBUM},isSupportedByBookmarklet:function(c){return!this.isIndex(c)&&!this.isFolder(c)&&c.get("type")===b.COLLECTION_TYPE_GENERIC&& this._getCollectionOrdering(c)===a.Squarespace.CollectionOrdering.CHRONOLOGICAL},hasSupportForInjectableCodePerItem:function(c){return!this.isIndex(c)&&!this.isFolder(c)&&c.get("type")===b.COLLECTION_TYPE_GENERIC&&this._getCollectionOrdering(c)===a.Squarespace.CollectionOrdering.CHRONOLOGICAL},hasSupportForSyndication:function(c){return!this.isIndex(c)&&!this.isFolder(c)&&c.get("type")===b.COLLECTION_TYPE_GENERIC&&this._getCollectionOrdering(c)===a.Squarespace.CollectionOrdering.CHRONOLOGICAL},isDemoCollectionId:function(b){var c= p.getState().demoCollections;return!c?!1:!!a.Array.find(c,function(a){return a.collectionId==b})},isGeneric:function(a){a=a.getTemplateConfiguration();return!a?!1:a.get("collectionType")===b.COLLECTION_TYPE_GENERIC},isGenericOrProduct:function(a){a=a.getTemplateConfiguration();return!a?!1:!1===a.get("folder")&&(a.get("collectionType")===b.PRODUCTS||a.get("collectionType")===b.COLLECTION_TYPE_GENERIC)},isProduct:function(a){var c=a.getTemplateConfiguration();return!c||a.get("isDemoCollection")?!1: !1===c.get("folder")&&c.get("collectionType")===b.PRODUCTS},isPage:function(a){a=a.getTemplateConfiguration();return!a?!1:!1===a.get("folder")&&a.get("collectionType")===b.COLLECTION_TYPE_PAGE},isNotCalendar:function(b){return b.getTemplateConfiguration().get("ordering")===a.Squarespace.CollectionOrdering.CALENDAR?!1:!0},usesDisplayIndex:function(b){return[a.Squarespace.CollectionOrdering.MUSIC_ALBUM,a.Squarespace.CollectionOrdering.USER].includes(b)},getIdentifierForCollection:function(c){if(!a.Lang.isValue(c))return null; var h=c.get("typeName");!h&&c.get("type")===b.COLLECTION_TYPE_PAGE&&(c.set("typeName","page"),h="page");var m=c.get("type");if(m===b.COLLECTION_TYPE_GENERIC){var k=c.get("ordering");a.Lang.isValue(k)||(k=p.getCollectionConfig(h),h=p.getPageConfig(h),k=(k||h).ordering);if(a.Squarespace.ContentCollectionUtils.isIndex(c))return"INDEX";if(k===a.Squarespace.CollectionOrdering.USER)return"GALLERY";if(k===a.Squarespace.CollectionOrdering.CHRONOLOGICAL)return"BLOG";if(k===a.Squarespace.CollectionOrdering.CALENDAR)return"CALENDAR"; if(k===a.Squarespace.CollectionOrdering.MUSIC_ALBUM)return"MUSIC_ALBUM";if(k===a.Squarespace.CollectionOrdering.KNOWLEDGE_BASE)return"KNOWLEDGE_BASE"}if(m===b.COLLECTION_TYPE_PAGE)return"PAGE";if(m===b.PRODUCTS)return"PRODUCT";if(m===b.TEMPLATE_PAGE)return"TEMPLATE_PAGE"},alreadyHasTooManyPagesEnabled:function(){return a.Squarespace.ContentCollectionCache.filter(function(a){return!a.get("isDemoCollection")&&!a.get("folder")&&a.get("enabled")}).length>h.getLimit(n.ADD_PAGES)?!0:!1}}},"1.0",{requires:["squarespace-models-content-collection"]})}, 1301:function(l,c,a){var p=a(2);YUI.add("squarespace-mixins-event-list",function(a){a.namespace("Squarespace.Mixins");a.Squarespace.Mixins.EventList=a.Base.create("EventList",a.Base,[],{initializer:function(){a.Do.before(function(c){var b=a.Object.hasKey(c,"upcoming"),k=a.Object.hasKey(c,"past");if(b&&k)return new a.Do.AlterArgs(p("Parsing calendar-specific response"),[[].concat(c.upcoming).concat(c.past)])},this,"parse",this)},getPastEvents:function(){var c=new Date;return this.filter(function(b){b= b.get("structuredContent");if(null===b)return!1;b=a.DataType.Date.parse(b.get("endDate"));return a.DataType.Date.isGreater(c,b)})},getUpcomingEvents:function(){var c=new Date;return this.filter(function(b){b=b.get("structuredContent");if(null===b)return!1;b=a.DataType.Date.parse(b.get("endDate"));return!a.DataType.Date.isGreater(c,b)})}})},"1.0",{requires:["base","datatype-date","event-custom","json"]})},1302:function(l,c){YUI.add("squarespace-models-audio",function(a){a.namespace("Squarespace.Models"); a.Squarespace.Models.Audio=a.Base.create("Audio",a.Squarespace.Models.StructuredContent,[],{},{ATTRS:{_type:{value:"Audio",validator:function(a){return"Audio"===a},readOnly:!0},embed:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},audioAssetUrl:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},artistName:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},lengthInMilliSeconds:{value:null,validator:a.Squarespace.AttrValidators.isNullOrNumber},bitRate:{value:null, validator:a.Squarespace.AttrValidators.isNullOrNumber},sampleRate:{value:null,validator:a.Squarespace.AttrValidators.isNullOrNumber}}})},"1.0",{requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})},1303:function(l,c){YUI.add("squarespace-models-calendar-event",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.CalendarEvent=a.Base.create("CalendarEvent",a.Squarespace.Models.StructuredContent,[],{},{ATTRS:{_type:{value:"CalendarEvent",validator:function(a){return"CalendarEvent"=== a},readOnly:!0},startDate:{valueFn:function(){var a=new Date,c=a.getMinutes();a.setSeconds(0);a.setMilliseconds(0);30<=c?(a.addHours(1),a.setMinutes(0)):a.setMinutes(30);return a.getTime()},validator:a.Squarespace.AttrValidators.isNumber},endDate:{valueFn:function(){var a=new Date(this.get("startDate"));a.addHours(1);return a.getTime()},validator:a.Squarespace.AttrValidators.isNumber}}})},"1.0",{requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})},1304:function(l, c){YUI.add("squarespace-models-check-in",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.CheckIn=a.Base.create("CheckIn",a.Squarespace.Models.StructuredContent,[],{},{ATTRS:{_type:{value:"CheckIn",validator:function(a){return"CheckIn"===a},readOnly:!0},checkinId:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},venueId:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},timeZone:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},venueName:{value:null, validator:a.Squarespace.AttrValidators.isNullOrString},address:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},crossStreet:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},city:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},state:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},country:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},postalCode:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString}, categoryId:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},categoryPluralName:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},categoryShortName:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},categoryIcon:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString}}})},"1.0",{requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})},1305:function(l,c,a){var p=a(47),h=a(718);YUI.add("squarespace-models-collection-configuration", function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.CollectionConfiguration=a.Base.create("CollectionConfiguration",a.Model,[],{initializer:function(b){a.Lang.isBoolean(b.index)&&b.index?this.set("folderBehavior",h.INDEX):a.Lang.isBoolean(b.folder)&&b.folder&&this.set("folderBehavior",h.NONE)}},{ATTRS:{collectionType:{value:p.COLLECTION_TYPE_GENERIC},folder:{value:!1},folderBehavior:{},supported:{value:!0}}})},"1.0",{requires:["base","model"]})},1306:function(l,c,a){a(10);var p=a(524), h=a(502),n=a(184),b=a(534),k=a(715),e=a(47),g=a(222),q=a(419),m=a(187),t=a(22),f=a(148);YUI.add("squarespace-models-content-collection",function(a){a.namespace("Squarespace.Models");var c=a.Squarespace.Models.ContentCollection=a.Base.create("Collection",a.Model,[],{initializer:function(b){this.items=b?new a.Squarespace.Models.ContentItemList({items:b.items||[],parent:this,limit:this.get("itemLimit")}):new a.Squarespace.Models.ContentItemList({parent:this,limit:this.get("itemLimit")});this._itemsEventHandle= this.items.after(["load","add","remove"],this._updateItemCount,this);this._syncFolderChange(this.get("folder"));this.after("folderChange",function(a){this._syncFolderChange(a.newVal)});this._initialAttrs=this.getAttrs();this.unlistenToModelStore=k.listen(this._handleStoreChange.bind(this))},destructor:function(){this.unlistenToModelStore();this._itemsEventHandle.detach();this._itemsEventHandle=null;this.items.destroy();this.items=null},toDebugString:function(){return a.JSON.stringify(this.getAttrs(["navigationTitle", "urlId","id"]))},toJSON:function(){var a=this.constructor.superclass.toJSON.call(this);a.items=this.items.toJSON();return a},parse:function(a){a=c.superclass.parse.apply(this,arguments);a.passwordProtected&&(a.password=g.PASSWORD_MASK);return a},sync:function(a,b,c){switch(a){case "create":this._ensureDemoCloneAndSave(c);break;case "delete":b.isUnusedStarterPage?this._deleteUnusedCollectionPermanently(c):this._delete(c);break;case "read":this._read(b,c);break;case "update":this._ensureDemoCloneAndSave(c)}}, load:function(b,c,f){"function"===typeof b&&(f=c,c=b,b={});if(this._readInProgress)this.onceAfter("load",c,f);else a.Model.prototype.load.call(this,b,c?a.bind(c,f||this):null)},resetToLastRead:function(){return k.fetch(this.get("id")).then(function(b){var c=this.getAttrs();a.Object.keys(c).map(function(a){c[a]=void 0});b=a.merge(c,this._initialAttrs,this.parse(b.toJS()));this.setAttrs(b);this.set("dirty",!1)}.bind(this)).catch(this._errorHandler)},ensureProcessedItems:function(){var b=function(c){this.items.load({fields:["mediaProcessingState"]}, function(){this.items.some(function(a){return a.get("mediaProcessingState")!==q.READY})?a.later(500,this,b,c):c()}.bind(this))}.bind(this);return new a.Promise(function(a){b(a)}.bind(this))},_syncFolderChange:function(a){a&&this.set("dropdown",!0)},_ensureDemoCloneAndSave:function(b){if(this._shouldCloneCollection()){var c=this.toJSON();delete c.id;this.cloneToNewCollection({silent:!0}).then(a.bind(this._save,this,b,c))}else this._save(b)},_handleStoreChange:function(a){if(a=a.get(this.getId()))this.setAttrs(this.parse(a.toJS())), this.set("dirty",!1)},serialize:function(b){b=a.merge(b,this.toJSON());b.collectionId=b.id;delete b.dirty;delete b.body;delete b.tags;delete b.categories;delete b.iTunesImage;delete b.items;a.Lang.isValue(b.mainImage)&&(b.mainImageId=a.instanceOf(b.mainImage,a.Squarespace.Models.ContentItem)?b.mainImage.get("id"):b.mainImage.id);delete b.mainImage;b.metadata&&b.metadata.albumCover&&delete b.metadata.albumCover;b.productQuickViewEnabled&&(b.features.productQuickView.isEnabled=b.productQuickViewEnabled, delete b.productQuickViewEnabled);b.relatedItemsEnabled&&(b.features.relatedItems.isEnabled=b.relatedItemsEnabled,delete b.relatedItemsEnabled);return b},_errorHandler:function(a){console.error(a.stack)},_save:function(a,c){c=this.serialize(c);b.update(c).then(function(b){b.error?a(b,null):(this._initialAttrs=b,a(null,b))}).catch(this._errorHandler)},_delete:function(a){b.delete(this.get("id")).then(function(b){a(null,b)},function(b){a(b,null)}).catch(this._errorHandler)},_deleteUnusedCollectionPermanently:function(a){b.deleteUnusedCollectionPermanently(this.get("id")).then(function(b){a(null, b)},function(b){a(b,null)}).catch(this._errorHandler)},_read:function(b,c){this._readInProgress=!0;var f="fetch";b.forceReload&&(f="fetchFromServer");k[f](this.get("id")).then(function(b){var f=this.parse(b.toJS());a.Squarespace.ContentCollectionUtils.usesDisplayIndex(f.ordering)?this._fetchItemCount(f.id).then(function(a){this._readInProgress=!1;f.itemCount=a;c(null,f)}.bind(this)):(this._readInProgress=!1,c(null,f))}.bind(this),function(a){this._readInProgress=!1;c(a,null)}.bind(this)).catch(this._errorHandler)}, _updateItemCount:function(){a.Squarespace.ContentCollectionUtils.usesDisplayIndex(this.get("ordering"))&&(this.isNew()?this.set("itemCount",0):this._fetchItemCount(this.get("id")).then(function(a){this.set("itemCount",a)}.bind(this)).catch(this._errorHandler))},_fetchItemCount:function(b){return new a.Promise(function(c,f){a.Data.get({url:"/api/content-collections/"+b+"/item-count",success:function(a){c(a)},failure:f},this)})},getTemplateConfiguration:function(){var b;b=this.get("typeName");var c= this.get("type");return(b=c===e.TEMPLATE_PAGE?n.getPageConfig(b):n.getCollectionConfig(b))?new a.Squarespace.Models.CollectionConfiguration(b):new a.Squarespace.Models.CollectionConfiguration({collectionType:c||e.COLLECTION_TYPE_GENERIC,ordering:this.get("ordering"),folder:this.get("folder"),supported:!1})},cloneToNewCollection:function(b){return new a.Promise(a.bind(function(c,f){var e=a.Squarespace.Singletons.TemplateNavigationList.getItemByCollectionId(this.get("id"));this._cloneExampleContent(b).then(a.bind(function(a){e.set("collectionId", a);e.save(c)},this))},this))},_cloneExampleContent:function(b){b=b||{};var c=new a.Promise(a.bind(function(b,c){var e=this.get("id");t.post("/api/commondata/CopyCollection",f.stringify({collectionId:this.get("id")})).then(function(f){f=f.data;this.setAttrs(a.merge({mainImageId:null,mainImage:null},f));var g=f.id;p.getHomepageCollectionId()===e?h.setHomepageCollectionId(g).then(function(a){a.error?c():b(g)}):b(g)}.bind(this))},this));c.then(a.bind(function(){this.fire("clonedExampleContent",{silent:!!b.silent})}, this));return c},_shouldCloneCollection:function(){return this.get("isDemoCollection")&&this.get("type")===e.COLLECTION_TYPE_PAGE},deleteTrashItems:function(b){a.Data.del({url:"/api/recycle-bin/collection/"+this.get("id")+"/items",success:function(a){b(a,null)},failure:function(a){b(null,a)}})},getId:function(){return this.get("id")},_set:function(a,b,c){return this.constructor.superclass._set.call(this,a,b,c)}},{ATTRS:{dirty:{value:!1},body:{value:null},title:{validator:a.Lang.isString},navigationTitle:{validator:a.Lang.isString}, description:{value:{html:"",source:""}},websiteId:{},id:{value:null},enabled:{value:!0,validator:a.Lang.isBoolean},deleted:{value:!1,validator:a.Lang.isBoolean},homepage:{validator:a.Lang.isBoolean},starred:{validator:a.Lang.isBoolean},synchronizing:{validator:a.Lang.isBoolean},updatedOn:{},folder:{value:!1},isDemoCollection:{getter:function(){return a.Squarespace.ContentCollectionUtils.isDemoCollectionId(this.get("id"))}},itemCount:{validator:a.Lang.isNumber},isEmpty:{getter:function(){return 0=== this.items.size()}},tags:{value:[],validator:a.Lang.isArray},categories:{value:[],validator:a.Lang.isArray},pageSize:{validator:a.Lang.isNumber,valueFn:function(){if(this.getTemplateConfiguration().get("ordering")===m.CHRONOLOGICAL)return 20}},itemLimit:{value:20,validator:a.Squarespace.AttrValidators.isNumber},ordering:{validator:function(b){return a.Object.values(m).includes(b)}},type:{validator:function(b){return a.Object.values(e).includes(b)}},typeName:{validator:a.Lang.isString},video:{validator:a.Lang.isObject}, fullUrl:{validator:a.Lang.isString},urlId:{validator:a.Squarespace.AttrValidators.isNullOrString},nextDisplayIndex:{getter:function(){return this.get("itemCount")}},regionName:{value:"default",validator:function(b){return!a.Lang.isString(b)||0===b.length?!1:a.Object.keys(n.getState().layouts).includes(b)}},postByEmailAddress:{getter:function(a){return a?a+"@squarespace.com":""}}}});a.Squarespace.Models.ContentCollectionList=a.Base.create("Collections",a.ModelList,[],{model:a.Squarespace.Models.ContentCollection, sync:function(a,c,f){"read"==a&&b.readAll().then(function(a){f(null,a)},function(a){f(a,null)}).catch(this._errorHandler)},getCollectionById:function(b,c,f){var e=this.getById(b);e?c.call(f,e):(e=new a.Squarespace.Models.ContentCollection({id:b}),e.load({},function(){this.add(e);c.call(f,e)},this))},getCollectionFromData:function(b,c){if(!b)return null;if(!b.id)throw Error("getCollectionFromData needs at least an ID in the data to work.");var f=this.getById(b.id);f?c||f.setAttrs(b):f=this.add(new a.Squarespace.Models.ContentCollection(b)); return f}});a.Squarespace.Utils.isInDamaskFrame()?a.Squarespace.ContentCollectionCache=a.config.win.top.Y.Squarespace.ContentCollectionCache:a.Squarespace.ContentCollectionCache=new a.Squarespace.Models.ContentCollectionList},"2.0",{requires:"base model model-list promise squarespace-content-collection-utils squarespace-models-collection-configuration squarespace-models-content-item squarespace-models-content-item-list squarespace-util squarespace-util-authenticated".split(" ")})},1307:function(l, c,a){var p=a(240);YUI.add("squarespace-models-content-item-list",function(a){a.namespace("Squarespace.Models");var c=a.Squarespace.Models.ContentItemList=a.Base.create("ContentItemList",a.ModelList,[a.Squarespace.Mixins.EventList],{initializer:function(b){this.model=a.Squarespace.Models.ContentItem;b=b||{};(b=b.items)&&this.reset(b)},sync:function(a,c,e){switch(a){case "create":console.error("Squarespace.Models.ContentItemList: Create not implemented.");break;case "delete":console.error("Squarespace.Models.ContentItemList: Create not implemented."); break;case "read":this._read(c,e);break;case "update":console.error("Squarespace.Models.ContentItemList: Create not implemented.")}},load:function(a,k){if(this.get("isChildItemList"))throw Error("Squarespace.Models.ContentItemList: Child items are loaded with their parent item. Loading them manually is not supported");c.superclass.load.call(this,a,k)},removeItems:function(b,c){this.remove(b,{source:"bulk-remove"});var e=a.Array.map(b,function(a){var b=a.get("id");a.destroy();return b},this);a.Data.post({url:"/api/commondata/RemoveItems", data:{items:e},success:function(e){this.get("parent").load();a.Lang.isFunction(c)&&c(null,e);this.fire("bulk-remove",b)},failure:function(b){a.Lang.isFunction(c)&&c(b,null)}},this)},moveItems:function(b,c,e){if(this.get("isChildItemList"))throw Error("Squarespace.Models.ContentItemList: Moving child items is not currently supported.");var g=a.Array.map(b,function(a){return null!==this.getById(a.get("id"))?this.remove(this.getById(a.get("id"))):a},this),l=c.get("id"),m=c.items;m.load(a.bind(function(){m.add(g)}, this));var n=a.Array.map(g,function(a){a.set("collectionId",l);a.get("items").each(function(a){a.set("collectionId",l)});return a.get("id")},this);a.Data.post({url:"/api/commondata/MoveItems",data:{toCollectionId:l,items:n},success:function(f){this.get("parent").load();a.Lang.isFunction(e)&&e(null,f);this.fire("move-items",b,c)},failure:function(b){a.Lang.isFunction(e)&&e(b,null)}},this)},reorderItems:function(b,c,e){var g=this.get("parent"),l={};this.get("isChildItemList")?(l.collectionId=g.get("collectionId"), l.parentId=g.get("id")):l.collectionId=g.get("id");var m=1===b.length,n;m?(b=b[0],n=this.indexOf(this.getById(b.get("id"))),this._reorder([b],c),0!==c&&(l.afterId=this.item(c-1).get("id")),l.itemId=b.get("id")):(this._reorder(b,c),0!==c&&(l.afterId=this.item(c-1).get("id")),b=a.Array.map(b,function(a){return a.get("id")},this),l.itemIds=a.JSON.stringify(b));var f=a.bind(function(b){a.Data.post({url:"/api/commondata/ReorderItems",data:b,success:function(b){m&&(0===n||0===c)&&g.load();a.Lang.isUndefined(b.items)|| a.Array.each(b.items,function(a,b){var c=this.getById(a.id);c&&c.set("displayIndex",a.displayIndex)},this);this.fire("reordered");a.Lang.isFunction(e)&&e(null,b);0<this._reorderQueue.size()&&f(thie._reorderQueue.next())},failure:function(b){a.Lang.isFunction(e)&&e(b,null)}},this)},this);this._reorderQueue||(this._reorderQueue=new a.Queue);this._reorderQueue.add(l);f(this._reorderQueue.next())},_reorder:function(a,c){var e=a.map(function(a){return this.getById(a.get("id"))},this);this.remove(e,{onReorder:!0, source:"reorder"});this.add(e,{onReorder:!0,source:"reorder",index:c})},_read:function(b,c){a.Data.get({url:this._getReadUrl(),data:a.merge({limit:this.get("limit")},b),success:function(a){this.set("pagination",{hasNextPage:a.hasNextPage,hasPreviousPage:a.hasPreviousPage,nextPageStart:a.nextPageStart,previousPageStart:a.previousPageStart});c(null,a.results)},failure:function(a){c(a,null)}},this)},_getReadUrl:function(){var b=this.get("parent"),c=p.getTemplateForCollectionItems(b.get("ordering"),b.get("type")); return a.Lang.sub(c,{collectionId:b.get("id")})}},{ATTRS:{parent:{value:null,validator:function(b){return b instanceof a.Squarespace.Models.ContentCollection||b instanceof a.Squarespace.Models.ContentItem}},isChildItemList:{getter:function(){return this.get("parent")instanceof a.Squarespace.Models.ContentItem}},pagination:{value:null},limit:{value:20,validator:a.Squarespace.AttrValidators.isNumber}}})},"1.0",{requires:"base json model-list squarespace-content-collection-utils squarespace-mixins-event-list squarespace-models-content-collection squarespace-models-content-item squarespace-util".split(" ")})}, 1308:function(l,c,a){var p=a(590),h=a(419),n=a(132),b=a(591),k=a(237),e=a(506),g=a(138);a(233);var q=a(240);YUI.add("squarespace-models-content-item",function(a){a.namespace("Squarespace.Models");var c=a.Squarespace.Models.ContentItem=a.Base.create("Item",a.Model,[],{sync:function(a,b,c){switch(a){case "delete":this._getParentCollection().then(this._getUrlDeterminants.bind(this)).then(this._delete.bind(this,c));break;case "read":this._getParentCollection().then(this._getUrlDeterminants.bind(this)).then(this._read.bind(this, b,c));break;case "update":this._getParentCollection().then(this._getUrlDeterminants.bind(this)).then(this._save.bind(this,c));break;case "create":this._getParentCollection().then(this._getUrlDeterminants.bind(this)).then(this._create.bind(this,b,c))}},_errorHandler:function(a){console.error(a.stack)},_save:function(a,b){var c=this.serialize();c.id||this._create(a);c.collectionId?k.updateForCollection(c,b).then(function(b){a(null,b)},function(b){a(b,null)}).catch(this._errorHandler):k.update(c).then(function(b){a(null, b)},function(b){a(b,null)}).catch(this._errorHandler)},_create:function(a,b,c){var e=this.serialize();e.collectionId?k.createForCollection(e,a,c).then(function(a){b(null,a)},function(a){b(a,null)}).catch(this._errorHandler):k.create(e,a).then(function(a){b(null,a)},function(a){b(a,null)}).catch(this._errorHandler)},_delete:function(a,b){k.delete(this.get("id"),b).then(function(b){a(null,b)},function(b){a(b,null)}).catch(this._errorHandler)},_read:function(a,b,c){if(this.get("isGlobalFakeContentItem"))this._readGlobalFakeContentItem(this.get("id"), a,b);else{this._readInProgress=!0;var g="fetch";a.forceReload&&(g="fetchFromServer");e[g](this.get("id"),!1,c).then(function(a){this._readInProgress=!1;(a=a.toJS?a.toJS():a)&&a.recordType&&this.set("recordType",a.recordType);b(null,a)}.bind(this),function(a){this._readInProgress=!1;b(a,null)}.bind(this)).catch(this._errorHandler)}},_readGlobalFakeContentItem:function(b,c,e){a.Data.get({url:"/api/rest/global-content-items/"+b,success:function(a){e(null,a)},failure:function(a){e(a,null)}},this)},_getUrlDeterminants:function(a){var b= {recordType:this.get("recordType")};a&&(b.collectionOrdering=a.get("ordering"),b.collectionType=a.get("type"),b.collectionId=a.get("id"),b.parentId=this.get("parentId"));return b},resetToLastRead:function(a,b){return e.fetch(this.get("id")).then(function(b){this.setAttrs(b.toJS());a()}.bind(this)).catch(function(a){b();this._errorHandler(a)}.bind(this))},initializer:function(a){this._needsJobListener()&&this._bindJobListener();this._updateNextDisplayIndex();a=this.get("items");a.after(["add","remove"], function(){this._updateNextDisplayIndex()},this);this.items=a},destructor:function(){this._jobListener&&(this._jobListener.detach(),this._jobListener=null)},_getParentCollection:function(){return new a.Promise(function(b,c){var e=this.get("collectionId");e?a.Squarespace.ContentCollectionCache.getCollectionById(e,b):b(null)}.bind(this))},toJSON:function(){var b=c.superclass.toJSON.call(this),e=b.structuredContent;a.Lang.isValue(e)&&(b.structuredContent=e.toJSON());b.items=b.items.toJSON();a.Lang.isObject(b.pushedServices)&& (b.pushedServices=a.Object.keys(b.pushedServices));a.Lang.isObject(b.pendingPushedServices)&&(b.pendingPushedServices=a.Object.keys(b.pendingPushedServices));return b},serialize:function(){var a=this.toJSON();delete a.items;delete a.author;delete a.fullUrl;delete a.assetUrl;delete a.resolved;delete a.postItemInjectCode;delete a.promotedBlock;delete a.promotedBlockType;delete a.nextDisplayIndex;delete a.mediaIsUploading;delete a.hasFileData;delete a.isGlobalFakeContentItem;delete a.childrenGroups; delete a.colorData;delete a.mainImage;delete a.gallery;this._normalizeDates(a);this._attachCommentingToData(a);this._attachWorkflowToData(a);this._updateStructuredContent(a);return a},_updateStructuredContent:function(b){b.structuredContent&&b.startDate&&(b.structuredContent=a.merge(b.structuredContent,{startDate:b.startDate,endDate:b.endDate}))},_getWorkflowStateForString:function(c){return a.Object.getValue({published:b.PUBLISHED,scheduled:b.SCHEDULED,needsreview:b.NEEDS_REVIEW,draft:b.DRAFT},c)}, _attachWorkflowToData:function(b){a.Lang.isValue(b.workflow)&&(b.workflowState=this._getWorkflowStateForString(b.workflow.state),b.publishOn=b.workflow.date,delete b.workflow)},_attachCommentingToData:function(b){a.Lang.isValue(b.commenting)&&(b.commentState=a.Squarespace.CommentStates["allow"===b.commenting.state?"ENABLED":"DISABLED"],b.commentDisableOn=b.commenting.date,delete b.commenting)},_normalizeDates:function(b){a.Array.each("addedOn publishOn updatedOn commentDisableOn startDate endDate".split(" "), function(c,e){a.Lang.isDate(b[c])&&(b[c]=b[c].getTime())},this)},save:function(b,e){this.isNew()||!a.Lang.isObject(b)||!b.fields?c.superclass.save.call(this,b,e):this._saveFields(b.fields,e)},autoSave:function(b,c){a.Lang.isFunction(b)?(c=b,b={}):a.Lang.isValue(b)||(b={});b.headers=a.merge(b.headers,{"X-AutoSave":!0});this.save(b,c)},like:function(b){a.Data.post({url:"/api/content-items/"+this.getId()+"/sentiment/like",success:function(c){a.Lang.isFunction(b)&&b(null,c)},failure:function(c){a.Lang.isFunction(b)&& b(c,null)}},this)},dislike:function(b){a.Data.post({url:"/api/content-items/"+this.getId()+"/sentiment/dislike",success:function(c){a.Lang.isFunction(b)&&b(null,c)},failure:function(c){a.Lang.isFunction(b)&&b(c,null)}},this)},clearFileData:function(b){this.setAttrs({systemDataId:null,systemDataOrigin:null,mediaProcessingState:null,systemDataSourceType:null,systemDataVariants:null,filename:null});this._getParentCollection().then(this._getUrlDeterminants.bind(this)).then(function(b){var c=this.get("id"); b=q.getMainImageDeletionUrl(b).replace("{id}",c);a.Data.del({url:b,data:{itemId:c}})}.bind(this))},clearChildGroup:function(b,c){a.Data.post({url:"/api/commondata/ClearChildGroup",data:{childType:b,itemId:this.get("id")},success:function(b){a.Lang.isFunction(c)&&c(null,b)},failure:function(b){a.Lang.isFunction(c)&&c(b,null)}})},getAssetUrlForFormat:function(b){return a.Lang.sub("{assetUrl}?format={format}",{assetUrl:this.get("assetUrl"),format:b})},getId:function(){return this.get("id")},isLicensedAssetPreview:function(){return a.Lang.isValue(this.get("licensedAssetPreview"))}, isLicensedAsset:function(){return a.Lang.isValue(this.get("licensedAssetId"))},getMainImageUploadUrl:function(a){this._getParentCollection().then(this._getUrlDeterminants.bind(this)).then(function(b){a(q.getMainImageUploadUrl(b).replace("{id}",this.get("id")))}.bind(this))},_needsJobListener:function(){var a=this.get("mediaProcessingState");return a===h.QUEUED||a===h.PROCESSING},_bindJobListener:function(){Static&&Static.JOB_MANAGER&&(this._jobListener=a.config.win.Static.JOB_MANAGER.on("completed", function(b){var c=b.job;b=this.get("id");var e=c.get("data.contentItemId"),c=c.get("data.globalContentItemId");e===b?(this.load({forceReload:!0}),this._jobListener.detach()):a.Lang.isValue(c)&&c===b&&(this._readGlobalFakeContentItem(c,{},function(a,b){a?console.log("error loading model",a):(this.set("assetUrl",b.assetUrl),this.setAttrs(b))}.bind(this)),this._jobListener.detach())},this))},_updateNextDisplayIndex:function(){var a=0;this.get("items").each(function(b){b=b.get("displayIndex");b>=a&&(a= b+1)},this);this._set("nextDisplayIndex",a)},_saveFields:function(b,c){if(1<b.length)throw Error("Saving multiple fields is not currently supported.");var e=b[0],e={field:e,itemId:this.get("id"),value:this.get(e)};k.update(e).then(function(b){a.Lang.isFunction(c)&&c(null,b.item)},function(b){a.Lang.isFunction(c)&&c.call(b,null)}).catch(this._errorHandler)},_getStructuredContentCtor:function(){switch(this.get("recordType")){case n.AUDIO:return a.Squarespace.Models.Audio;case n.EVENT:return a.Squarespace.Models.CalendarEvent; case n.CHECKIN:return a.Squarespace.Models.CheckIn;case n.VIDEO:return a.Squarespace.Models.Embed;case n.KBARTICLE:return a.Squarespace.Models.KBArticle;case n.LINK:return a.Squarespace.Models.Link;case n.QUOTE:return a.Squarespace.Models.Quote;case n.STORE_ITEM:return a.Squarespace.Models.StoreItem;case n.TWEET:return a.Squarespace.Models.Tweet;default:return null}}},{ATTRS:{id:{value:null},collectionId:{value:null},parentId:{value:null},authorId:{valueFn:function(){var b=a.Object.getValue(Static, ["SQUARESPACE_CONTEXT","authenticatedAccount"]);return b?b.id:null}},proxyForId:{value:null},recordType:{validator:a.Squarespace.AttrValidators.isValueIn(n),writeOnce:!0},childType:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},addedOn:{valueFn:function(){return(new Date).getTime()},validator:a.Squarespace.AttrValidators.isNumber,writeOnce:"initOnly"},updatedOn:{value:null,validator:a.Squarespace.AttrValidators.isNullOrNumber},publishOn:{valueFn:function(){return(new Date).getTime()}, validator:a.Squarespace.AttrValidators.isNumber},unsaved:{value:null,validator:a.Squarespace.AttrValidators.isNullOrBoolean},urlId:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},title:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},body:{value:null,setter:function(b){return a.merge(this.get("body"),b)},validator:a.Squarespace.AttrValidators.isNullOrObject},excerpt:{value:{html:"",raw:!1},validator:a.Squarespace.AttrValidators.isNullOrObject},displayIndex:{value:0, validator:a.Squarespace.AttrValidators.isNumber},starred:{value:!1,validator:a.Squarespace.AttrValidators.isBoolean},passthrough:{value:!1,validator:a.Squarespace.AttrValidators.isBoolean},tags:{value:[],validator:a.Squarespace.AttrValidators.isArray},categories:{value:[],validator:a.Squarespace.AttrValidators.isArray},workflowState:{value:b.DRAFT,validator:a.Squarespace.AttrValidators.isValueIn(b)},systemDataId:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},systemDataVariants:{value:null, validator:a.Squarespace.AttrValidators.isNullOrString},systemDataOrigin:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},contentType:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},filename:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},dataSize:{value:null,validator:a.Squarespace.AttrValidators.isNullOrNumber},sourceUrl:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},mediaProcessingState:{value:null,validator:a.Squarespace.AttrValidators.isNullOr(a.Squarespace.AttrValidators.isValueIn(h))}, mediaFocalPoint:{value:{x:0.5,y:0.5},setter:function(b){if(a.Lang.isString(b)){b=b.split(",");var c=parseFloat(b[0]);b=parseFloat(b[1]);return{x:!isNaN(c)&&1>=c?c:0.5,y:!isNaN(b)&&1>=b?b:0.5}}return b}},colorData:{value:null,validator:a.Squarespace.AttrValidators.isNullOrObject},clickthroughUrl:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},location:{value:null,validator:a.Squarespace.AttrValidators.isNullOrObject},customContent:{value:null},likeCount:{value:0,validator:a.Squarespace.AttrValidators.isNumber}, dislikeCount:{value:0,validator:a.Squarespace.AttrValidators.isNumber},commentCount:{value:0,validator:a.Squarespace.AttrValidators.isNumber},publicCommentCount:{value:0,validator:a.Squarespace.AttrValidators.isNumber},commentState:{valueFn:function(){var a=g.getState().toJS(),b=a.commentsEnabled;return a.commentEnableByDefault&&b?p.ENABLED:p.DISABLED},validator:a.Squarespace.AttrValidators.isValueIn(p)},commentDisableOn:{valueFn:function(){var b=a.Object.getValue(Static,["SQUARESPACE_CONTEXT","websiteSettings", "commentDisableAfterDaysDefault"]);return b?a.Date.addDays(new Date,b).getTime():null},validator:a.Squarespace.AttrValidators.isNullOrNumber},pushedServices:{value:{},validator:a.Squarespace.AttrValidators.isObject},shareStates:{value:[]},structuredContent:{valueFn:function(){var b=this._getStructuredContentCtor();return a.Lang.isNull(b)?null:new b},setter:function(b){if(b instanceof a.Squarespace.Models.StructuredContent)return b;var c=this._getStructuredContentCtor();return a.Lang.isNull(c)?null: new c(b)}},items:{valueFn:function(){return new a.Squarespace.Models.ContentItemList({parent:this})},setter:function(b){var c=this.get("items");return a.Lang.isValue(c)?(c.reset(b),c):b instanceof a.Squarespace.Models.ContentItemList?b:new a.Squarespace.Models.ContentItemList({items:b,parent:this})}},childrenGroups:{value:{},validator:a.Squarespace.AttrValidators.isObject},author:{value:null,validator:a.Squarespace.AttrValidators.isNullOrObject},fullUrl:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString}, assetUrl:{value:null,getter:function(b){return a.Squarespace.UrlUtils.isSecure()?a.Squarespace.UrlUtils.securifyURL(b):b},validator:a.Squarespace.AttrValidators.isNulLOrString},resolved:{value:!1,validator:a.Squarespace.AttrValidators.isBoolean},postItemInjectCode:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},promotedBlock:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},promotedBlockType:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},nextDisplayIndex:{value:0, validator:a.Squarespace.AttrValidators.isNumber,readOnly:!0},mediaIsUploading:{value:!1,validator:a.Squarespace.AttrValidators.isBoolean},hasFileData:{value:!1,validator:a.Squarespace.AttrValidators.isBoolean},isGlobalFakeContentItem:{value:!1,validator:a.Squarespace.AttrValidators.isBoolean},licensedAssetPreview:{value:null,validator:a.Squarespace.AttrValidators.isNullOrObject},licensedAssetId:{value:null,validator:a.Lang.isString},isPusher:{value:!0,readOnly:!0,validator:a.Squarespace.AttrValidators.isBoolean}}})}, "1.0",{requires:"base json model squarespace-attr-validators squarespace-model-sync-rest squarespace-models-audio squarespace-models-calendar-event squarespace-models-check-in squarespace-models-content-collection squarespace-models-content-item-list squarespace-models-embed squarespace-models-instagram squarespace-models-kb-article squarespace-models-link squarespace-models-quote squarespace-models-store-item squarespace-models-tweet squarespace-url-utils squarespace-util".split(" ")})},1309:function(l, c){YUI.add("squarespace-models-embed",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.Embed=a.Base.create("Embed",a.Squarespace.Models.StructuredContent,[],{},{ATTRS:{_type:{value:"Embed",validator:function(a){return"Embed"===a},readOnly:!0},embed:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},oembed:{value:null,validator:a.Squarespace.AttrValidators.isNullOrObject},overlay:{value:!0,validator:a.Squarespace.AttrValidators.isBoolean}}})},"1.0",{requires:["base", "squarespace-attr-validators","squarespace-models-structured-content"]})},1310:function(l,c){YUI.add("squarespace-models-instagram",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.Instagram=a.Base.create("Instagram",a.Squarespace.Models.StructuredContent,[],{},{ATTRS:{_type:{value:"Instagram",validator:function(a){return"Instagram"===a},readOnly:!0},instagramId:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},timeZone:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString}, imageLowResolutionUrl:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},imageThumbnailUrl:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},imageStandardUrl:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},width:{value:null,validator:a.Squarespace.AttrValidators.isNullOrNumber},height:{value:null,validator:a.Squarespace.AttrValidators.isNullOrNumber},filter:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},userProfilePictureUrl:{value:null, validator:a.Squarespace.AttrValidators.isNullOrString},userAccountName:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},userDisplayName:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString}}})},"1.0",{requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})},1311:function(l,c){YUI.add("squarespace-models-kb-article",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.KBArticle=a.Base.create("KBArticle",a.Squarespace.Models.StructuredContent, [],{},{ATTRS:{_type:{value:"KBArticle",validator:function(a){return"KBArticle"===a},readOnly:!0},upVotes:{value:0,validator:a.Squarespace.AttrValidators.isNumber},downVotes:{value:0,validator:a.Squarespace.AttrValidators.isNumber}}})},"1.0",{requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})},1312:function(l,c){YUI.add("squarespace-models-link",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.Link=a.Base.create("Link",a.Squarespace.Models.StructuredContent, [],{},{ATTRS:{_type:{value:"Link",validator:function(a){return"Link"===a},readOnly:!0},url:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString}}})},"1.0",{requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})},1313:function(l,c){YUI.add("squarespace-models-quote",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.Quote=a.Base.create("Quote",a.Squarespace.Models.StructuredContent,[],{},{ATTRS:{_type:{value:"Quote",validator:function(a){return"Quote"=== a},readOnly:!0},quote:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString}}})},"1.0",{requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})},1314:function(l,c,a){var p=a(2),h=a(219);YUI.add("squarespace-models-store-item",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.StoreItem=a.Base.create("StoreItem",a.Squarespace.Models.StructuredContent,[],{},{ATTRS:{_type:{value:"StoreItem",validator:function(a){return"StoreItem"===a},readOnly:!0}, productType:{value:h.PHYSICAL,validator:a.Squarespace.AttrValidators.isValueIn(h)},priceCents:{value:0,validator:a.Squarespace.AttrValidators.isNumber},salePriceCents:{value:0,validator:a.Squarespace.AttrValidators.isNumber},onSale:{value:!1,validator:a.Squarespace.AttrValidators.isBoolean},variants:{value:[],validator:a.Squarespace.AttrValidators.isArray},originalVariants:{value:[],validator:a.Squarespace.AttrValidators.isArray},variantOptionOrdering:{value:[],validator:a.Squarespace.AttrValidators.isArray}, additionalFieldsFormId:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},customAddButtonText:{value:p("Add to Cart"),validator:a.Squarespace.AttrValidators.isString},useCustomAddButtonText:{value:!1,validator:a.Squarespace.AttrValidators.isBoolean},additionalFieldsForm:{value:null}}})},"1.0",{requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})},1315:function(l,c){YUI.add("squarespace-models-structured-content",function(a){a.namespace("Squarespace.Models"); a.Squarespace.Models.StructuredContent=a.Base.create("StructuredContent",a.Model,[],{},{ATTRS:{_type:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString,writeOnce:"initOnly"}}})},"1.0",{requires:["base","model","squarespace-attr-validators"]})},1316:function(l,c){YUI.add("squarespace-models-tweet",function(a){a.namespace("Squarespace.Models");a.Squarespace.Models.Tweet=a.Base.create("Tweet",a.Squarespace.Models.StructuredContent,[],{},{ATTRS:{_type:{value:"Tweet",validator:function(a){return"Tweet"=== a},readOnly:!0},tweetId:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},timeZone:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},accountId:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},displayName:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},accountName:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},tweet:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},profileImageUrl:{value:null, validator:a.Squarespace.AttrValidators.isNullOrString},profileImageUrlHttps:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString},userLocation:{value:null,validator:a.Squarespace.AttrValidators.isNullOrString}}})},"1.0",{requires:["base","squarespace-attr-validators","squarespace-models-structured-content"]})},1318:function(l,c,a){var p=a(400),h=a(90);YUI.add("squarespace-util-authenticated",function(a){a.namespace("Squarespace");a.Squarespace.UtilAuthenticated={userHasAccessPermission:function(a){return p.hasPermission(a)}, isSquarespaceAdmin:function(){return p.isAdmin()},isBetaFeatureEnabled:function(a){return h.isFeatureEnabled(a)}}},"1.0",{requires:["squarespace-util"]})},3318:function(l,c,a){var p=a(2);YUI.add("squarespace-simple-liking",function(a){var c=a.config.win.Static;a.Squarespace.SimpleLike={TEXT_LIKE_VERB_NONE:p("No Likes"),TEXT_LIKE_VERB_SINGULAR:"Like",TEXT_LIKE_VERB_PLURAL:"Likes",TEXT_LIKE_ACTIVATED:p("You like this"),TEXT_LIKE_SUGGEST:p("Click to like"),attached:!1,attach:function(){if(!this.attached){this.attached= !0;var b;try{localStorage&&((b=a.JSON.parse(localStorage.getItem("squarespace-likes")))||(b={}),localStorage.setItem("squarespace-likes",a.JSON.stringify(b)))}catch(k){b={}}this.eventHandlers=[];var e=a.delegate("click",function(c){c=c.currentTarget;var e=c.getAttribute("data-item-id");if(e){for(var k=0;5>k;++k)a.Squarespace.SimpleLike.burst(c);if(!c.hasClass("clicked")&&!c.hasClass("float")){k=parseInt(c.getAttribute("data-like-count"),10);c.setAttribute("data-like-count",k+1);a.Squarespace.SimpleLike.renderLikeCount(c); c.addClass("clicked");try{localStorage&&(b[e]=!0,localStorage.setItem("squarespace-likes",a.JSON.stringify(b)))}catch(l){console.warn("Unable to save like to local storage: ",l)}(new a.Squarespace.Models.ContentItem({id:e})).like(function(b,c){c.commited&&console.log("Like was counted!");a.Lang.isValue(b)&&b.crumbFail&&!a.Squarespace.Utils.areCookiesEnabled()&&alert(p("You need to enable cookies to be able to like something."))})}}},"body",".sqs-simple-like");this.eventHandlers.push(e);a.all(".sqs-simple-like").each(function(e){var k= e.getAttribute("data-item-id");k&&(c.SQUARESPACE_CONTEXT.websiteSettings.simpleLikingEnabled||e.remove(),b[k]&&e.addClass("clicked"),a.Squarespace.SimpleLike.renderLikeCount(e))})}},detach:function(){this.attached=!1;this.eventHandlers.forEach(function(a){a.detach()})},renderLikeCount:function(b){var c=b.getAttribute("data-item-id"),e=b.getAttribute("data-like-count");b=b.one(".like-count");c&&b&&(c="",c=0===e?a.Squarespace.SimpleLike.TEXT_LIKE_VERB_NONE:1==e?"1 "+a.Squarespace.SimpleLike.TEXT_LIKE_VERB_SINGULAR: e+" "+a.Squarespace.SimpleLike.TEXT_LIKE_VERB_PLURAL,b.setContent(c))},burst:function(b){var c=b.cloneNode(!0);c.one(".like-count")&&c.one(".like-count").remove();var e=b.one(".like-icon");if(!e||"none"===e.getStyle("display"))e=b;c.setStyles({position:"absolute",left:e.getX()+"px",top:e.getY()+"px"});a.one(a.config.doc.body).append(c);b=new a.Anim({node:c,duration:2,easing:a.Easing.easeOut});b.set("to",{curve:a.Squarespace.SimpleLike.randomCurve(c)});b.on("end",function(){this.get("node").remove()}); b.run();c.removeClass("clicked");c.addClass("float")},randomCurve:function(a){var c=[],e=Math.floor(2*Math.random())?1:-1,g=Math.floor(2*Math.random())?1:-1,h=a.getX();a=a.getY();for(var l=0;3>l;++l)h+=Math.floor(30*Math.random())*e,a+=Math.floor(30*Math.random())*g,c.push([h,a]);return c}};a.config.win.Squarespace.onInitialize(a,function(){c.SQUARESPACE_CONTEXT.websiteSettings.simpleLikingEnabled&&a.Squarespace.SimpleLike.attach()});a.config.win.Squarespace.onDestroy(a,function(){!0===a.Squarespace.SimpleLike.attached&& a.Squarespace.SimpleLike.detach()})},"1.0",{requires:["anim","json","node","squarespace-models-content-item","squarespace-util"]})}});