scrivito_ui 1.16.0.rc1 → 1.16.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7670802f526173ba7d2d3c5b8c9bb25c4bdbff105dea9703c4e6530084c151e2
4
- data.tar.gz: fec10473c847deeb454719f0a6f6bba20c0b643af8887c9551b85e7347003c5b
3
+ metadata.gz: f59effe7abf52f84e6781ec7a513339bc427d0e7ad17de399495f280d4b6273b
4
+ data.tar.gz: ed71c5415c2976f9166be8477a55f0a2b5909f1c16bf809fdfb3a7fa1c083d98
5
5
  SHA512:
6
- metadata.gz: 331b25d4323586eb04e7a6c73d73ab751e852ca510a67080d45293a604150a8a76589e637c9342bcd945eb2a1aa58d83582fadebe994127a85cd28f5fccebe01
7
- data.tar.gz: 233d5fb225df42d511a3dead1132008cc459498b41b9477c845844e212c896ba726838255303d8d31adbf68b3e5602c8d1f6c9c244bae0bb17f81f46091a4644
6
+ metadata.gz: fd40c58db6edac9a11a1ba3503c4439effc9baab760b28ac6fa96086df511eab7c3f1b0f1030fe71ca25ad29c97e4a7d099964aa06771904078d2a6e0ead9d35
7
+ data.tar.gz: e4e8b874b1e3948cd72b6ecb871a60883d617c4ac8a4edc9768854ad8323a0abfad83034a70e9caccbb6c62f9878419b3077e2f3c43cc5f792f4585ffc001cfd
@@ -1,4 +1,4 @@
1
- /*! Copyright (c) 2019 Infopark AG (https://scrivito.com) */!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=824)}([function(e,t,n){"use strict";var r=n(2);function i(e){try{return Object(r.isFunction)(e)?function(e){if(function(e){return!!e._scrivitoPrivateSchema}(e)){var t=e._scrivitoPrivateSchema;return"[class "+t.name+"]"}if(function(e){var t=e.prototype;return t&&t.isReactComponent}(e)){var n=e.displayName||e.name;return'[class React.Component "'+n+'"]'}return a(e.toString())}(e):Object(r.isObject)(e)?function(e){var t=e._scrivitoPrivateContent;if(t&&Object(r.isFunction)(t.toPrettyPrint))return t.toPrettyPrint();if(Object(r.isElement)(e))return"[object HTMLElement "+o(e.outerHTML)+"]";return o(e)}(e):o(e)}catch(e){return""}}function o(e){var t=JSON.stringify(e);return t?a(t):t}function a(e){return e.length>100?e.slice(0,100)+"...":e}var s=n(52),c=n(57);c.struct.strict=!0,c.interface.strict=!0,c.fail=function(e){throw new TypeError(e)};var u,l=[];function d(e){u?l.push(e):setTimeout(e,0)}function f(e){d(function(){throw e})}function p(e,t,n){var o=n.docPermalink;return function(){for(var n,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];try{n=function(e,t){var n=t.length,o=e.length;if(o>n)return"Expected "+n+" arguments, got "+o;var a=Object(r.flatten)(t.map(function(t,n){var r=t[0],o=t[1],a=e[n],s=c.validate(a,o);return s.errors.map(function(e){return function(e,t){var n=function(e,t){var n="argument '"+e+"'";if(0===t.path.length)return n;return"key '"+t.path.join("/")+"' in "+n}(e,t);if(void 0===t.actual)return"Missing required "+n+".";if(t.expected===c.Nil)return"Unexpected "+n+".";var r=c.getTypeName(t.expected),o="got "+i(t.actual)+", expected type "+r+".";return"Unexpected value for "+n+": "+o}(r,e)})}));if(a.length>0)return a.join(" ")}(a,t)}catch(e){f(e)}if(n){var l="Visit https://scrivito.com/"+o+" for more information.";throw new s.ArgumentError("Invalid arguments for '"+e+"': "+n+" "+l)}}}var h=function(){function e(){}return e.prototype.current=function(){return this.currentContext},e.prototype.runWith=function(e,t){var n=this.currentContext;try{return this.currentContext=e,t()}finally{this.currentContext=n}},e}(),m=function(){function e(){var e=this;this.promise=new oe(function(t,n){e.resolve=function(n){e.settled=!0,t(n)},e.reject=function(t){e.settled=!0,n(t)}})}return e.prototype.isPending=function(){return!this.settled},e}();function _(e){try{return{errorThrown:!1,result:e()}}catch(e){return{errorThrown:!0,error:e}}}var v=!1;function g(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];window&&window.console&&!v&&(e=window.console).error.apply(e,t)}function y(){var e="1.6.0-rc2-120-g6edf5efa9d80";return e}function b(e,t){void 0===t&&(t=window.document);var n=t.createElement("link");n.rel="stylesheet",n.href=e,k(t.head,n)}function w(e,t){void 0===t&&(t=window.document);var n=t.createElement("script");n.src=e,k(t.head,n)}function k(e,t){e.appendChild(t)}var S=/(_+)(\w)/g,O=/([A-Z])/g,C=/[A-Z]+|\d+/g,M=/^_?(_+[A-Z0-9]|[^_])+$/,x=/[_\s]+/g,E=/[A-Z][a-z]+/g;function T(e){return M.test(e)}function j(e){return e.replace(O,function(e,t){return"_"+t.toLowerCase()})}function D(e){return e.replace(S,function(e,t,n,r){return r?n.toUpperCase()===n?e:""+t.substr(1)+n.toUpperCase():e})}function L(e){var t=D(e);return t.charAt(0).toUpperCase()+t.slice(1)}function P(e){return e.replace(x," ").replace(E,function(e){return" "+e.toLowerCase()}).replace(C,function(e){return" "+e}).trim().replace(/./,function(e){return e.toUpperCase()})}n(113);var I=c.interface({size:c.Number,type:c.String},{name:"Blob",strict:!1}),N=I.extend({name:c.String},{name:"File",strict:!1});function A(e){return"_"===e[0]}function Y(e,t){for(var n=e.iterator(),r=[];r.length!==t;){var i=n.next();if(i.done)return r;r.push(i.value)}return r}function R(){for(var e=Math.floor(Math.random()*Math.pow(16,8)).toString(16);e.length<8;)e="0"+e;return e}function F(){return R()+R()}var H=!1;function W(e,t,n){return H?e:r.throttle(e,t,n)}var B=-9007199254740991,z=9007199254740991,U=/^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/;function q(e){return"string"==typeof e&&e.match(/^-?\d+$/)?X(e):"number"==typeof e?X(e):null}function V(e){return function(e){return $(e)&&Math.floor(e)===e}(e)&&B<=e&&e<=z}function $(e){return"number"==typeof e&&Object(r.isFinite)(e)}function G(e){if("string"!=typeof e)return null;if(!Q(e))throw new s.InternalError('The value is not a valid ISO date time: "'+e+'"');return K(e)}function K(e){if(!e)return null;var t=e.match(U);if(!t)return null;var n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=parseInt(n,10),u=parseInt(r,10),l=parseInt(i,10),d=parseInt(o,10),f=parseInt(a,10),p=parseInt(s,10);return new Date(Date.UTC(c,u-1,l,d,f,p))}function J(e){return""+(""+e.getUTCFullYear()+Z(e.getUTCMonth()+1))+(""+Z(e.getUTCDate())+Z(e.getUTCHours()))+(""+Z(e.getUTCMinutes())+Z(e.getUTCSeconds()))}function Q(e){return"string"==typeof e&&!!e.match(/^\d{14}$/)}function Z(e){return e<10?"0"+e:e}function X(e){var t=parseInt(e.toString(),10);return 0===t?0:V(t)?t:null}function ee(e){return te(1e3*e)}function te(e){return new oe(function(t){setTimeout(t,e)})}function ne(e,t){return re(e)&&re(t)?e.equals(t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&Object(r.every)(Object(r.zip)(e,t),function(e){return ne(e[0],e[1])}):e&&t?e.valueOf()===t.valueOf():e===t}function re(e){return!!e&&"function"==typeof e.equals}function ie(e,t){return e.then(function(e){return t(),e},function(e){throw t(),e})}var oe,ae=n(125);oe="undefined"!=typeof Promise?Promise:ae.a;var se=function(){function e(e,t){var n=(void 0===t?{}:t).batchSize;this.mget=e,this.batchSize=n||100,this.itemsToBatch=[]}return e.prototype.retrieve=function(e){var t=this;0===this.itemsToBatch.length&&d(function(){return t.performRetrieval()});var n=new m;return this.itemsToBatch.push({key:e,deferred:n}),n.promise},e.prototype.reset=function(){this.itemsToBatch=[]},e.prototype.performRetrieval=function(){var e=this,t=this.itemsToBatch.splice(0,this.batchSize);if(0!==t.length){var n=t.map(function(e){return e.key});this.mget(n).then(function(n){t.forEach(function(t,r){var i=t.key,o=t.deferred;if(r<n.length){var a=n[r];o.resolve(a)}else e.retrieve(i).then(o.resolve,o.reject)})},function(e){t.forEach(function(t){return t.deferred.reject(e)})}),this.performRetrieval()}},e}();function ce(e){return(ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ue(e){var t=le(e);return JSON.stringify(t)}function le(e){return Array.isArray(e)?e.map(le):function(e){return"object"===ce(e)&&null!==e}(e)?Object.keys(e).sort().map(function(t){return[t,le(e[t])]}):e}var de=Object.assign||r.extend;function fe(e,t){var n=e.clientX,r=e.clientY,i=t.getBoundingClientRect();return{x:n-i.left,y:r-i.top}}function pe(e){return(pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var he=function(){function e(e){this.subscribeFunction=e}return e.prototype.subscribe=function(e){var t=new me("object"===pe(e)?e:{next:e}),n=this.subscribeFunction(t);return t.setUnsubscribeCallback("object"===pe(n)?function(){return n.unsubscribe()}:n),t},e.prototype.map=function(t){var n=this;return new e(function(e){return n.subscribe({next:function(n){return e.next(t(n))},complete:function(){return e.complete()}})})},e.prototype.filter=function(t){var n=this;return new e(function(e){return n.subscribe({next:function(n){t(n)&&e.next(n)},complete:function(){return e.complete()}})})},e.prototype.toPromise=function(){var e=this;return new oe(function(t){var n;e.subscribe({next:function(e){n=e},complete:function(){t(n)}})})},e.prototype.takeOne=function(){var t=this;return new e(function(e){var n=t.subscribe({next:function(t){n.unsubscribe(),e.next(t),e.complete()},complete:function(){e.complete()}});return n})},e.prototype.takeUntil=function(t){var n=this;return new e(function(e){var r,i;if((i=n.subscribe({next:function(t){e.next(t)},complete:function(){o()}})).isClosed())return function(){};function o(){e.complete(),a()}function a(){i&&i.unsubscribe(),r&&r.unsubscribe()}return r=t.subscribe({next:function(){o()},complete:function(){o()}}),a})},e}(),me=function(){function e(e){this.subscriber=e}return e.prototype.next=function(e){this.subscriber&&this.subscriber.next&&this.subscriber.next(e)},e.prototype.complete=function(){this.subscriber&&this.subscriber.complete&&this.subscriber.complete(),this.subscriber=void 0},e.prototype.unsubscribe=function(){this.subscriber&&(this.unsubscribeCallback&&this.unsubscribeCallback(),this.subscriber=void 0)},e.prototype.isClosed=function(){return!this.subscriber},e.prototype.setUnsubscribeCallback=function(e){this.unsubscribeCallback=e},e}();var _e,ve=(_e=function(e,t){var n,r;return(_e=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}_e(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),ge=function(e){function t(){var t=e.call(this,function(e){if(t.isCompleted)return e.complete(),function(){};var n=(t.subscriberIdCounter++).toString();return t.subscribers[n]=e,function(){delete t.subscribers[n]}})||this;return t.subscribers={},t.subscriberIdCounter=1,t.isCompleted=!1,t}return ve(t,e),t.prototype.next=function(e){var t=this;Object.keys(this.subscribers).forEach(function(n){t.subscribers[n].next(e)})},t.prototype.complete=function(){var e=this;Object.keys(this.subscribers).forEach(function(t){return e.subscribers[t].complete()}),this.subscribers={},this.isCompleted=!0},t.prototype.subscriberCount=function(){return Object.keys(this.subscribers).length},t.prototype.isClosed=function(){return this.isCompleted},t}(he);n.d(t,"p",function(){return p}),n.d(t,"d",function(){return h}),n.d(t,"e",function(){return m}),n.d(t,"a",function(){return s.ArgumentError}),n.d(t,"g",function(){return s.InternalError}),n.d(t,"h",function(){return s.ResourceNotFoundError}),n.d(t,"i",function(){return s.ScrivitoError}),n.d(t,"Q",function(){return f}),n.d(t,"G",function(){return d}),n.d(t,"I",function(){return i}),n.d(t,"O",function(){return c}),n.d(t,"M",function(){return _}),n.d(t,"F",function(){return g}),n.d(t,"x",function(){return y}),n.d(t,"D",function(){return b}),n.d(t,"E",function(){return w}),n.d(t,"o",function(){return D}),n.d(t,"q",function(){return L}),n.d(t,"N",function(){return P}),n.d(t,"R",function(){return j}),n.d(t,"y",function(){return T}),n.d(t,"f",function(){return N}),n.d(t,"c",function(){return I}),n.d(t,"z",function(){return A}),n.d(t,"m",function(){return Y}),n.d(t,"L",function(){return F}),n.d(t,"K",function(){return R}),n.d(t,"P",function(){return W}),n.d(t,"H",function(){return K}),n.d(t,"t",function(){return G}),n.d(t,"u",function(){return q}),n.d(t,"B",function(){return $}),n.d(t,"w",function(){return J}),n.d(t,"A",function(){return Q}),n.d(t,"C",function(){return V}),n.d(t,"S",function(){return ee}),n.d(t,"T",function(){return te}),n.d(t,"v",function(){return ne}),n.d(t,"J",function(){return ie}),n.d(t,"j",function(){return oe}),n.d(t,"b",function(){return se}),n.d(t,"s",function(){return ue}),n.d(t,"n",function(){return de}),n.d(t,"r",function(){return fe}),n.d(t,"k",function(){return he}),n.d(t,"l",function(){return ge})},function(e,t,n){"use strict";e.exports=n(178)},function(e,t,n){(function(e,n){var r;!function(){var i="object"==typeof self&&self.self===self&&self||"object"==typeof e&&e.global===e&&e||this||{},o=i._,a=Array.prototype,s=Object.prototype,c="undefined"!=typeof Symbol?Symbol.prototype:null,u=a.push,l=a.slice,d=s.toString,f=s.hasOwnProperty,p=Array.isArray,h=Object.keys,m=Object.create,_=function(){},v=function(e){return e instanceof v?e:this instanceof v?void(this._wrapped=e):new v(e)};t.nodeType?i._=v:(!n.nodeType&&n.exports&&(t=n.exports=v),t._=v),v.VERSION="1.9.1";var g,y=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}},b=function(e,t,n){return v.iteratee!==g?v.iteratee(e,t):null==e?v.identity:v.isFunction(e)?y(e,t,n):v.isObject(e)&&!v.isArray(e)?v.matcher(e):v.property(e)};v.iteratee=g=function(e,t){return b(e,t,1/0)};var w=function(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+t];switch(t){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r);case 2:return e.call(this,arguments[0],arguments[1],r)}var o=Array(t+1);for(i=0;i<t;i++)o[i]=arguments[i];return o[t]=r,e.apply(this,o)}},k=function(e){if(!v.isObject(e))return{};if(m)return m(e);_.prototype=e;var t=new _;return _.prototype=null,t},S=function(e){return function(t){return null==t?void 0:t[e]}},O=function(e,t){return null!=e&&f.call(e,t)},C=function(e,t){for(var n=t.length,r=0;r<n;r++){if(null==e)return;e=e[t[r]]}return n?e:void 0},M=Math.pow(2,53)-1,x=S("length"),E=function(e){var t=x(e);return"number"==typeof t&&t>=0&&t<=M};v.each=v.forEach=function(e,t,n){var r,i;if(t=y(t,n),E(e))for(r=0,i=e.length;r<i;r++)t(e[r],r,e);else{var o=v.keys(e);for(r=0,i=o.length;r<i;r++)t(e[o[r]],o[r],e)}return e},v.map=v.collect=function(e,t,n){t=b(t,n);for(var r=!E(e)&&v.keys(e),i=(r||e).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=t(e[s],s,e)}return o};var T=function(e){return function(t,n,r,i){var o=arguments.length>=3;return function(t,n,r,i){var o=!E(t)&&v.keys(t),a=(o||t).length,s=e>0?0:a-1;for(i||(r=t[o?o[s]:s],s+=e);s>=0&&s<a;s+=e){var c=o?o[s]:s;r=n(r,t[c],c,t)}return r}(t,y(n,i,4),r,o)}};v.reduce=v.foldl=v.inject=T(1),v.reduceRight=v.foldr=T(-1),v.find=v.detect=function(e,t,n){var r=(E(e)?v.findIndex:v.findKey)(e,t,n);if(void 0!==r&&-1!==r)return e[r]},v.filter=v.select=function(e,t,n){var r=[];return t=b(t,n),v.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},v.reject=function(e,t,n){return v.filter(e,v.negate(b(t)),n)},v.every=v.all=function(e,t,n){t=b(t,n);for(var r=!E(e)&&v.keys(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(!t(e[a],a,e))return!1}return!0},v.some=v.any=function(e,t,n){t=b(t,n);for(var r=!E(e)&&v.keys(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(t(e[a],a,e))return!0}return!1},v.contains=v.includes=v.include=function(e,t,n,r){return E(e)||(e=v.values(e)),("number"!=typeof n||r)&&(n=0),v.indexOf(e,t,n)>=0},v.invoke=w(function(e,t,n){var r,i;return v.isFunction(t)?i=t:v.isArray(t)&&(r=t.slice(0,-1),t=t[t.length-1]),v.map(e,function(e){var o=i;if(!o){if(r&&r.length&&(e=C(e,r)),null==e)return;o=e[t]}return null==o?o:o.apply(e,n)})}),v.pluck=function(e,t){return v.map(e,v.property(t))},v.where=function(e,t){return v.filter(e,v.matcher(t))},v.findWhere=function(e,t){return v.find(e,v.matcher(t))},v.max=function(e,t,n){var r,i,o=-1/0,a=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,c=(e=E(e)?e:v.values(e)).length;s<c;s++)null!=(r=e[s])&&r>o&&(o=r);else t=b(t,n),v.each(e,function(e,n,r){((i=t(e,n,r))>a||i===-1/0&&o===-1/0)&&(o=e,a=i)});return o},v.min=function(e,t,n){var r,i,o=1/0,a=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,c=(e=E(e)?e:v.values(e)).length;s<c;s++)null!=(r=e[s])&&r<o&&(o=r);else t=b(t,n),v.each(e,function(e,n,r){((i=t(e,n,r))<a||i===1/0&&o===1/0)&&(o=e,a=i)});return o},v.shuffle=function(e){return v.sample(e,1/0)},v.sample=function(e,t,n){if(null==t||n)return E(e)||(e=v.values(e)),e[v.random(e.length-1)];var r=E(e)?v.clone(e):v.values(e),i=x(r);t=Math.max(Math.min(t,i),0);for(var o=i-1,a=0;a<t;a++){var s=v.random(a,o),c=r[a];r[a]=r[s],r[s]=c}return r.slice(0,t)},v.sortBy=function(e,t,n){var r=0;return t=b(t,n),v.pluck(v.map(e,function(e,n,i){return{value:e,index:r++,criteria:t(e,n,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index}),"value")};var j=function(e,t){return function(n,r,i){var o=t?[[],[]]:{};return r=b(r,i),v.each(n,function(t,i){var a=r(t,i,n);e(o,t,a)}),o}};v.groupBy=j(function(e,t,n){O(e,n)?e[n].push(t):e[n]=[t]}),v.indexBy=j(function(e,t,n){e[n]=t}),v.countBy=j(function(e,t,n){O(e,n)?e[n]++:e[n]=1});var D=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;v.toArray=function(e){return e?v.isArray(e)?l.call(e):v.isString(e)?e.match(D):E(e)?v.map(e,v.identity):v.values(e):[]},v.size=function(e){return null==e?0:E(e)?e.length:v.keys(e).length},v.partition=j(function(e,t,n){e[n?0:1].push(t)},!0),v.first=v.head=v.take=function(e,t,n){return null==e||e.length<1?null==t?void 0:[]:null==t||n?e[0]:v.initial(e,e.length-t)},v.initial=function(e,t,n){return l.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},v.last=function(e,t,n){return null==e||e.length<1?null==t?void 0:[]:null==t||n?e[e.length-1]:v.rest(e,Math.max(0,e.length-t))},v.rest=v.tail=v.drop=function(e,t,n){return l.call(e,null==t||n?1:t)},v.compact=function(e){return v.filter(e,Boolean)};var L=function(e,t,n,r){for(var i=(r=r||[]).length,o=0,a=x(e);o<a;o++){var s=e[o];if(E(s)&&(v.isArray(s)||v.isArguments(s)))if(t)for(var c=0,u=s.length;c<u;)r[i++]=s[c++];else L(s,t,n,r),i=r.length;else n||(r[i++]=s)}return r};v.flatten=function(e,t){return L(e,t,!1)},v.without=w(function(e,t){return v.difference(e,t)}),v.uniq=v.unique=function(e,t,n,r){v.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=b(n,r));for(var i=[],o=[],a=0,s=x(e);a<s;a++){var c=e[a],u=n?n(c,a,e):c;t&&!n?(a&&o===u||i.push(c),o=u):n?v.contains(o,u)||(o.push(u),i.push(c)):v.contains(i,c)||i.push(c)}return i},v.union=w(function(e){return v.uniq(L(e,!0,!0))}),v.intersection=function(e){for(var t=[],n=arguments.length,r=0,i=x(e);r<i;r++){var o=e[r];if(!v.contains(t,o)){var a;for(a=1;a<n&&v.contains(arguments[a],o);a++);a===n&&t.push(o)}}return t},v.difference=w(function(e,t){return t=L(t,!0,!0),v.filter(e,function(e){return!v.contains(t,e)})}),v.unzip=function(e){for(var t=e&&v.max(e,x).length||0,n=Array(t),r=0;r<t;r++)n[r]=v.pluck(e,r);return n},v.zip=w(v.unzip),v.object=function(e,t){for(var n={},r=0,i=x(e);r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n};var P=function(e){return function(t,n,r){n=b(n,r);for(var i=x(t),o=e>0?0:i-1;o>=0&&o<i;o+=e)if(n(t[o],o,t))return o;return-1}};v.findIndex=P(1),v.findLastIndex=P(-1),v.sortedIndex=function(e,t,n,r){for(var i=(n=b(n,r,1))(t),o=0,a=x(e);o<a;){var s=Math.floor((o+a)/2);n(e[s])<i?o=s+1:a=s}return o};var I=function(e,t,n){return function(r,i,o){var a=0,s=x(r);if("number"==typeof o)e>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=t(l.call(r,a,s),v.isNaN))>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&o<s;o+=e)if(r[o]===i)return o;return-1}};v.indexOf=I(1,v.findIndex,v.sortedIndex),v.lastIndexOf=I(-1,v.findLastIndex),v.range=function(e,t,n){null==t&&(t=e||0,e=0),n||(n=t<e?-1:1);for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),o=0;o<r;o++,e+=n)i[o]=e;return i},v.chunk=function(e,t){if(null==t||t<1)return[];for(var n=[],r=0,i=e.length;r<i;)n.push(l.call(e,r,r+=t));return n};var N=function(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var o=k(e.prototype),a=e.apply(o,i);return v.isObject(a)?a:o};v.bind=w(function(e,t,n){if(!v.isFunction(e))throw new TypeError("Bind must be called on a function");var r=w(function(i){return N(e,r,t,this,n.concat(i))});return r}),v.partial=w(function(e,t){var n=v.partial.placeholder,r=function(){for(var i=0,o=t.length,a=Array(o),s=0;s<o;s++)a[s]=t[s]===n?arguments[i++]:t[s];for(;i<arguments.length;)a.push(arguments[i++]);return N(e,r,this,this,a)};return r}),v.partial.placeholder=v,v.bindAll=w(function(e,t){var n=(t=L(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=v.bind(e[r],e)}}),v.memoize=function(e,t){var n=function(r){var i=n.cache,o=""+(t?t.apply(this,arguments):r);return O(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return n.cache={},n},v.delay=w(function(e,t,n){return setTimeout(function(){return e.apply(null,n)},t)}),v.defer=v.partial(v.delay,v,1),v.throttle=function(e,t,n){var r,i,o,a,s=0;n||(n={});var c=function(){s=!1===n.leading?0:v.now(),r=null,a=e.apply(i,o),r||(i=o=null)},u=function(){var u=v.now();s||!1!==n.leading||(s=u);var l=t-(u-s);return i=this,o=arguments,l<=0||l>t?(r&&(clearTimeout(r),r=null),s=u,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(c,l)),a};return u.cancel=function(){clearTimeout(r),s=0,r=i=o=null},u},v.debounce=function(e,t,n){var r,i,o=function(t,n){r=null,n&&(i=e.apply(t,n))},a=w(function(a){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(o,t),s&&(i=e.apply(this,a))}else r=v.delay(o,t,this,a);return i});return a.cancel=function(){clearTimeout(r),r=null},a},v.wrap=function(e,t){return v.partial(t,e)},v.negate=function(e){return function(){return!e.apply(this,arguments)}},v.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},v.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},v.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},v.once=v.partial(v.before,2),v.restArguments=w;var A=!{toString:null}.propertyIsEnumerable("toString"),Y=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],R=function(e,t){var n=Y.length,r=e.constructor,i=v.isFunction(r)&&r.prototype||s,o="constructor";for(O(e,o)&&!v.contains(t,o)&&t.push(o);n--;)(o=Y[n])in e&&e[o]!==i[o]&&!v.contains(t,o)&&t.push(o)};v.keys=function(e){if(!v.isObject(e))return[];if(h)return h(e);var t=[];for(var n in e)O(e,n)&&t.push(n);return A&&R(e,t),t},v.allKeys=function(e){if(!v.isObject(e))return[];var t=[];for(var n in e)t.push(n);return A&&R(e,t),t},v.values=function(e){for(var t=v.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=e[t[i]];return r},v.mapObject=function(e,t,n){t=b(t,n);for(var r=v.keys(e),i=r.length,o={},a=0;a<i;a++){var s=r[a];o[s]=t(e[s],s,e)}return o},v.pairs=function(e){for(var t=v.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r},v.invert=function(e){for(var t={},n=v.keys(e),r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t},v.functions=v.methods=function(e){var t=[];for(var n in e)v.isFunction(e[n])&&t.push(n);return t.sort()};var F=function(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=e(o),s=a.length,c=0;c<s;c++){var u=a[c];t&&void 0!==n[u]||(n[u]=o[u])}return n}};v.extend=F(v.allKeys),v.extendOwn=v.assign=F(v.keys),v.findKey=function(e,t,n){t=b(t,n);for(var r,i=v.keys(e),o=0,a=i.length;o<a;o++)if(t(e[r=i[o]],r,e))return r};var H,W,B=function(e,t,n){return t in n};v.pick=w(function(e,t){var n={},r=t[0];if(null==e)return n;v.isFunction(r)?(t.length>1&&(r=y(r,t[1])),t=v.allKeys(e)):(r=B,t=L(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i<o;i++){var a=t[i],s=e[a];r(s,a,e)&&(n[a]=s)}return n}),v.omit=w(function(e,t){var n,r=t[0];return v.isFunction(r)?(r=v.negate(r),t.length>1&&(n=t[1])):(t=v.map(L(t,!1,!1),String),r=function(e,n){return!v.contains(t,n)}),v.pick(e,r,n)}),v.defaults=F(v.allKeys,!0),v.create=function(e,t){var n=k(e);return t&&v.extendOwn(n,t),n},v.clone=function(e){return v.isObject(e)?v.isArray(e)?e.slice():v.extend({},e):e},v.tap=function(e,t){return t(e),e},v.isMatch=function(e,t){var n=v.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),o=0;o<r;o++){var a=n[o];if(t[a]!==i[a]||!(a in i))return!1}return!0},H=function(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&W(e,t,n,r)},W=function(e,t,n,r){e instanceof v&&(e=e._wrapped),t instanceof v&&(t=t._wrapped);var i=d.call(e);if(i!==d.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return c.valueOf.call(e)===c.valueOf.call(t)}var o="[object Array]"===i;if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!(v.isFunction(a)&&a instanceof a&&v.isFunction(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}r=r||[];for(var u=(n=n||[]).length;u--;)if(n[u]===e)return r[u]===t;if(n.push(e),r.push(t),o){if((u=e.length)!==t.length)return!1;for(;u--;)if(!H(e[u],t[u],n,r))return!1}else{var l,f=v.keys(e);if(u=f.length,v.keys(t).length!==u)return!1;for(;u--;)if(l=f[u],!O(t,l)||!H(e[l],t[l],n,r))return!1}return n.pop(),r.pop(),!0},v.isEqual=function(e,t){return H(e,t)},v.isEmpty=function(e){return null==e||(E(e)&&(v.isArray(e)||v.isString(e)||v.isArguments(e))?0===e.length:0===v.keys(e).length)},v.isElement=function(e){return!(!e||1!==e.nodeType)},v.isArray=p||function(e){return"[object Array]"===d.call(e)},v.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},v.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(e){v["is"+e]=function(t){return d.call(t)==="[object "+e+"]"}}),v.isArguments(arguments)||(v.isArguments=function(e){return O(e,"callee")});var z=i.document&&i.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof z&&(v.isFunction=function(e){return"function"==typeof e||!1}),v.isFinite=function(e){return!v.isSymbol(e)&&isFinite(e)&&!isNaN(parseFloat(e))},v.isNaN=function(e){return v.isNumber(e)&&isNaN(e)},v.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"===d.call(e)},v.isNull=function(e){return null===e},v.isUndefined=function(e){return void 0===e},v.has=function(e,t){if(!v.isArray(t))return O(e,t);for(var n=t.length,r=0;r<n;r++){var i=t[r];if(null==e||!f.call(e,i))return!1;e=e[i]}return!!n},v.noConflict=function(){return i._=o,this},v.identity=function(e){return e},v.constant=function(e){return function(){return e}},v.noop=function(){},v.property=function(e){return v.isArray(e)?function(t){return C(t,e)}:S(e)},v.propertyOf=function(e){return null==e?function(){}:function(t){return v.isArray(t)?C(e,t):e[t]}},v.matcher=v.matches=function(e){return e=v.extendOwn({},e),function(t){return v.isMatch(t,e)}},v.times=function(e,t,n){var r=Array(Math.max(0,e));t=y(t,n,1);for(var i=0;i<e;i++)r[i]=t(i);return r},v.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},v.now=Date.now||function(){return(new Date).getTime()};var U={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},q=v.invert(U),V=function(e){var t=function(t){return e[t]},n="(?:"+v.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};v.escape=V(U),v.unescape=V(q),v.result=function(e,t,n){v.isArray(t)||(t=[t]);var r=t.length;if(!r)return v.isFunction(n)?n.call(e):n;for(var i=0;i<r;i++){var o=null==e?void 0:e[t[i]];void 0===o&&(o=n,i=r),e=v.isFunction(o)?o.call(e):o}return e};var $=0;v.uniqueId=function(e){var t=++$+"";return e?e+t:t},v.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var G=/(.)^/,K={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},J=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(e){return"\\"+K[e]};v.template=function(e,t,n){!t&&n&&(t=n),t=v.defaults({},t,v.templateSettings);var r,i=RegExp([(t.escape||G).source,(t.interpolate||G).source,(t.evaluate||G).source].join("|")+"|$","g"),o=0,a="__p+='";e.replace(i,function(t,n,r,i,s){return a+=e.slice(o,s).replace(J,Q),o=s+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),t}),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(t.variable||"obj","_",a)}catch(e){throw e.source=a,e}var s=function(e){return r.call(this,e,v)},c=t.variable||"obj";return s.source="function("+c+"){\n"+a+"}",s},v.chain=function(e){var t=v(e);return t._chain=!0,t};var Z=function(e,t){return e._chain?v(t).chain():t};v.mixin=function(e){return v.each(v.functions(e),function(t){var n=v[t]=e[t];v.prototype[t]=function(){var e=[this._wrapped];return u.apply(e,arguments),Z(this,n.apply(v,e))}}),v},v.mixin(v),v.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=a[e];v.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],Z(this,n)}}),v.each(["concat","join","slice"],function(e){var t=a[e];v.prototype[e]=function(){return Z(this,t.apply(this._wrapped,arguments))}}),v.prototype.value=function(){return this._wrapped},v.prototype.valueOf=v.prototype.toJSON=v.prototype.value,v.prototype.toString=function(){return String(this._wrapped)},void 0===(r=function(){return v}.apply(t,[]))||(n.exports=r)}()}).call(this,n(48),n(85)(e))},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"deserialize",function(){return X});var i=n(53),o=n(56),a=n(11);var s=function(){function e(e,t,n){this.container=e,this.attributeName=t,this.typeInfo=n,this.typeOptions=this.typeInfo[1]||{}}return e.prototype.get=function(){return this.container.get(this.attributeName,this.typeInfo)},e.prototype.update=function(e){var t;this.container.update(((t={})[this.attributeName]=[e,this.typeInfo],t))},e.prototype.getContainer=function(){return this.container},e.prototype.obj=function(){return this.container.obj()},e.prototype.name=function(){return this.attributeName},e.prototype.type=function(){return this.typeInfo[0]},e.prototype.workspaceId=function(){return this.obj().workspaceId()},e.prototype.equals=function(t){return n=t,!!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&(this.container.equals(t.getContainer())&&this.attributeName===t.name());var n,r},e.prototype.validClasses=function(){return this.typeOptions.validClasses},e.prototype.getDiff=function(){var e=this.obj();return Object(a.h)(this.workspaceId(),this.attributeName,e.id(),this.container===e?void 0:this.container.id())},e.prototype.toString=function(){var e=this.obj(),t=this.attributeName;return this.container===e?"<BasicField name="+t+" objId="+e.id()+">":"<BasicField name="+t+" objId="+e.id()+" widgetId="+this.container.id()+">"},e.prototype.id=function(){var e=this.obj();return this.container===e?this.attributeName+"|"+e.id():this.attributeName+"|"+e.id()+"|"+this.container.id()},e}(),c=n(0),u=n(13);function l(e){return u.parseQuery(e)}function d(e){return new u(e).query(!0)}var f=n(2),p=n.n(f),h=n(95);var m=function(){function e(e){var t=e.name,n=e.count,r=e.includedObjIds;this._name=t,this._count=n,this._includedObjIds=r}return e.prototype.name=function(){return this._name},e.prototype.count=function(){return this._count},e.prototype.includedObjs=function(){return Object(f.compact)(this._includedObjIds.map(function(e){return Re.get(e)}))},e}();function _(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}var v=["contains","containsPrefix","equals","startsWith","isGreaterThan","isLessThan","linksTo","refersTo"],g=["equals","startsWith","isGreaterThan","isLessThan"],y=["contains","containsPrefix"],b={query:[]},w=function(){function e(e){void 0===e&&(e=b);this._query=[].concat(e.query),this._batchSize=e.batchSize,this._offset=e.offset,this._sortBy=e.sortBy,this._sortDirection=e.sortDirection,this._includeDeleted=e.includeDeleted}return e.prototype.and=function(t,n,r,i){if(_(t,e))this._query=this._query.concat(t._query);else{if(void 0===n)throw new c.a("Missing operator to search with");if(void 0===r)throw new c.a('Missing value to search (specify "null" for missing)');var o=k(t,n,r);i&&(!function(e){if(!Object(f.contains)(y,e))throw new c.a('Boosting operator "'+e+'" is invalid.')}(n),o.boost=function(e){var t={};return Object(f.each)(e,function(e,n){var r=O(n);t[r]=e}),t}(i)),this._query.push(o)}return this},e.prototype.andNot=function(e,t,n){var r=k(e,t,n);return function(e){if(!Object(f.contains)(g,e))throw new c.a('Negating operator "'+e+'" is invalid.')}(t),r.negate=!0,this._query.push(r),this},e.prototype.offset=function(e){return this._offset=e,this},e.prototype.order=function(e,t){return void 0===t&&(t="asc"),this._sortBy=O(e),this._sortDirection=t,this},e.prototype.batchSize=function(e){return this._batchSize=e,this},e.prototype.includeDeleted=function(){return this._includeDeleted=!0,this},e.prototype.count=function(){return this.getObjDataQuery().count()},e.prototype.first=function(){return this.take(1)[0]||null},e.prototype.take=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];x.apply(void 0,[e].concat(t));var r=this._batchSize;try{return this._batchSize=void 0===e?1e3:e,Object(c.m)(this,e)}finally{this._batchSize=r}},e.prototype.iterator=function(){var e=this.getObjDataQuery().iterator();return{next:function(){var t=e.next(),n=t.done,r=t.value;return n?{done:!0}:{done:!1,value:new Re(r)}}}},e.prototype.getObjDataQuery=function(){return Object(a.j)(se(),this.params(),this.getBatchSize())},e.prototype.getBatchSize=function(){return this._batchSize||100},e.prototype.facet=function(e,t){var n;return n=void 0===t?{}:function(e){var t=f.without.apply(void 0,[Object.keys(e)].concat(C));if(t.length)throw new c.a("Invalid facet options: "+Object(c.I)(t)+". Valid options: "+C);return e}(t),new a.a(se(),O(e),n,this._query).result().map(function(e){return new m(e)})},e.prototype.store=function(e,t){Object(a.p)(se(),this.params(),e,t)},e.prototype.params=function(){return Object(f.omit)({query:this._query,offset:this._offset,sortBy:this._sortBy,sortDirection:this._sortDirection,includeDeleted:this._includeDeleted,batchSize:this._batchSize},f.isUndefined)},e}();function k(e,t,n){return{field:function(e){if(Object(f.isArray)(e))return Object(f.map)(e,O);return O(e)}(e),operator:function(e){if(!function(e){return Object(f.contains)(v,e)}(e))throw new c.a('Operator "'+e+'" is invalid.');return Object(c.R)(e)}(t),value:function(e){if(Object(f.isArray)(e))return Object(f.map)(e,S);return S(e)}(n)}}function S(e){return Object(f.isDate)(e)?Object(c.w)(e):_(e,Re)?e.id():e}function O(e){if(!Object(c.y)(e))throw new c.a('Attribute name "'+e+'" is not camel case.');return Object(c.R)(e)}var C=["limit","includeObjs"];var M=c.O.refinement(c.O.Number,function(e){return e>=0},"Number (positive)"),x=Object(c.p)("objSearch.take",[["count",c.O.maybe(M)]],{docPermalink:"js-sdk/ObjSearch-take"});function E(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}var T=c.O.irreducible("Obj",function(e){return I(e,Re)}),j=c.O.irreducible("Widget",function(e){return I(e,ye)}),D=c.O.irreducible("Link",function(e){return I(e,qe)}),L=c.O.irreducible("ObjSearch",function(e){return I(e,w)}),P=c.O.irreducible("Binary",function(e){return E(e,G)});function I(e,t){return!!e&&E(e._scrivitoPrivateContent,t)}var N,A=n(6);function Y(e){N=e}var R=function(){function e(e,t){void 0===t&&(t={});var n=t.filename;if(this.contentType=t.contentType,e.idToCopy)this.idToCopy=e.idToCopy;else{var r=e.source;this.source=r,this.contentType||(this.contentType=r.type),n||(n=r.name)}n&&(this.filename=n.replace(/[^\w\-_\.$]/g,"-"))}return e.prototype.into=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return F.apply(void 0,[e].concat(t)),Object(A.g)("Changing CMS content"),this.intoId(e._scrivitoPrivateContent.id())},e.prototype.intoId=function(e){if(!N)throw new c.g("No binaryHandler defined!");var t;if(this.idToCopy)t=N.copyBinary(this.idToCopy,e,this.filename,this.contentType);else{if(!this.source)throw new c.g("Source is not defined!");t=N.uploadBinary(e,this.source,this.filename,this.contentType)}return t.then(function(e){var t=e.id;return new G(t,!1)})},e}(),F=Object(c.p)("FutureBinary#into",[["target",T]],{docPermalink:"js-sdk/FutureBinary-into"});var H,W=R,B=n(5),z=n(9);!function(e){e.Date="date",e.Number="number",e.String="string",e.Stringlist="stringlist"}(H||(H={}));var U=new B.LoadableCollection({name:"metadata",state:function(){return A.c.subState("metadataCollection")},loader:function(e){return z.e.retrieveBinaryMetadata(e)}}),q=function(){function e(e){this.binaryId=e,e&&(this.loadableData=U.get(e))}return e.store=function(e,t){V(t),U.get(e).set(t)},e.prototype.get=function(e){Object(a.c)("MetadataCollection#get"),function(e){if(!Object(c.y)(e))throw new c.a('Metadata key "'+e+'" is not in camel case.')}(e);var t=this.getData();if(t){var n=Object(c.R)(e);return t.hasOwnProperty(n)?t[n]:null}return null},e.prototype.keys=function(){var e=this.getData();return e?Object(f.map)(Object(f.keys)(e),c.o):[]},e.prototype.contentLength=function(){var e=this.get("contentLength");return"number"!=typeof e?0:e},e.prototype.contentType=function(){var e=this.get("contentType");return"string"!=typeof e?"":e},e.prototype.getData=function(){if(this.loadableData){var e=this.loadableData.get();if(e)return V(e)}},e}();function V(e){for(var t=e.meta_data,n={},r=0,i=Object.keys(t);r<i.length;r++){var o=i[r],a=t[o],s=a[0],u=a[1];if(null==u)throw new c.g('Invalid backend value "null" or "undefined" for metadata "'+o+'"');var l=void 0;if(s===H.Date){if("string"!=typeof u)throw new c.g('Invalid non-string backend value for a date metadata "'+o+'"');l=Object(c.t)(u)}else l=u;n[o]=l}return n}var $=new B.LoadableCollection({name:"binary",state:function(){return A.c.subState("binary")},loader:function(e){var t=e[0],n=e[1];return z.e.retrieveBinaryUrls(t,n)}}),G=function(){function e(e,t,n){void 0===t&&(t=!0),void 0===n&&(n={}),this._id=e,this._isPublic=!!t,this._transformation=n||void 0,this._loadableData=$.get([e,this._transformation])}return e.upload=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(Q.apply(void 0,[e,t].concat(n)),!(c.f.is(e)||t&&t.filename))throw new c.a("Expected a filename to be passed with Blob as the source.");return new W({source:e},t)},e.store=function(t,n,r){var i=n.transformation;$.get([t,i]).set(r);var o=new e(t).raw();return i?o.optimizeFor(i):o},e.storeMetadata=function(e,t){q.store(e,t)},e.prototype.id=function(){return this._id},e.prototype.copy=function(e){return new W({idToCopy:this._id},e)},e.prototype.isPrivate=function(){return!this._isPublic},e.prototype.optimizeFor=function(t){return new e(this._id,this._isPublic,Object(f.extend)({},this._transformation,t))},e.prototype.original=function(){return new e(this._id,this._isPublic,{})},e.prototype.raw=function(){return new e(this._id,this._isPublic,null)},e.prototype.isExplicitlyTransformed=function(){return this.isTransformed()&&!Object(f.isEmpty)(this._transformation)},e.prototype.isRaw=function(){return!this.isTransformed()},e.prototype.url=function(){return Object(a.c)("Binary#url"),this.urlWithoutPlaceholder()||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},e.prototype.urlWithoutPlaceholder=function(){var e=this._loadableData.get();if(e){var t=e[this.accessType()];if(!t)throw new c.g("Missing key "+this.accessType+" in binary data");return t.get.url}},e.prototype.filename=function(){var e=this.url();return!e||e.match(/^data:/)?"":u(e).path().split("/").pop()||""},e.prototype.metadata=function(){return this.assertNotTransformed("Metadata"),new q(this._id)},e.prototype.contentType=function(){return this.assertNotTransformed("Content type"),this.metadata().contentType()},e.prototype.contentLength=function(){return this.assertNotTransformed("Content length"),this.metadata().contentLength()},e.prototype.extname=function(){if(this.raw().filename().indexOf(".")>-1){var e=/[^.\\]*$/.exec(this.raw().filename());if(e)return e[0].toLowerCase()}return""},e.prototype.equals=function(t){return n=t,(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&t.id()===this.id()&&t.isPrivate()===this.isPrivate()&&Object(f.isEqual)(t.definition(),this.definition());var n,r},e.prototype.isImage=function(){var e=this.raw().contentType();return!!e&&"image"===e.split("/")[0]},e.prototype.definition=function(){return this._transformation||null},e.prototype.accessType=function(){return this.isPrivate()?"private_access":"public_access"},e.prototype.assertNotTransformed=function(e){if(this.isTransformed())throw new c.i('"'+e+'" is not available for transformed images. Use "Scrivito.Binary#raw" to access the untransformed version of the image.')},e.prototype.isTransformed=function(){return!!this._transformation},e}(),K=c.O.struct({contentType:c.O.maybe(c.O.String),filename:c.O.maybe(c.O.String)}),J=c.O.refinement(c.O.Object,function(e){return c.c.is(e)||c.f.is(e)},"Blob or File"),Q=Object(c.p)("Binary.upload",[["source",J],["options",c.O.maybe(K)]],{docPermalink:"js-sdk/Binary-static-upload"});function Z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function X(e,t,n,r){var i=Z(t,2),o=i[0],a=i[1];switch(n){case"binary":return function(e,t){if("binary"===e&&t){var n=t.id,r="published"===se();return new G(n,r)}return null}(o,a);case"date":return function(e,t){if("date"!==e)return null;return Object(c.t)(t)}(o,a);case"float":return function(e,t){switch(e){case"string":return t.match(/^-?\d+(\.\d+)?$/)?ee(t):null;case"number":return ee(t);default:return null}}(o,a);case"enum":return function(e,t,n){var r=n.values;if("string"===e&&p.a.contains(r,t))return t;return null}(o,a,r);case"html":return function(e,t){if(p.a.contains(["html","string"],e)&&p.a.isString(t))return t;return""}(o,a);case"integer":return function(e,t){switch(e){case"string":case"number":return Object(c.u)(t);default:return null}}(o,a);case"link":return function(e,t){if("link"!==e||!p.a.isObject(t))return null;return te(t)}(o,a);case"linklist":return function(e,t){if(!p.a.isArray(t))return[];return p.a.compact(t.map(te))}(0,a);case"multienum":return function(e,t,n){var r=n.values;if("stringlist"!==e||!Array.isArray(t))return[];return p.a.intersection(t,r)}(o,a,r);case"reference":return function(e,t,n){if("reference"===e&&t)return ne(t,n);return null}(o,a,e);case"referencelist":return function(e,t,n){if("referencelist"!==e)return[];if(!t)return[];var r=t.map(function(e){return ne(e,n)});return p.a.compact(r)}(o,a,e);case"string":return function(e,t){if(p.a.contains(["html","string"],e)&&p.a.isString(t))return t;return""}(o,a);case"stringlist":return function(e,t){if("stringlist"!==e||!Array.isArray(t))return[];return t}(o,a);case"widgetlist":return function(e,t,n){if("widgetlist"!==e)return[];return p.a.map(t,function(e){return n.widget(e)})}(o,a,e);default:return null}}function ee(e){var t=parseFloat(e);return Object(c.B)(t)?t:null}function te(e){var t=p.a.pick(e,"query","rel","target","title","url");"fragment"in e&&(t.hash=e.fragment),"obj_id"in e&&(t.objId=e.obj_id);var n=new qe(t);return n.isBroken()?null:n}function ne(e,t){var n=Re.getInWorkspace(t.workspaceId(),e);return n||null}var re=function(){function e(){}return e.prototype.get=function(e,t){var n=Object(c.R)(e),i=this.getAttributeData(n);return i&&f.isArray(i)||(i=[]),"string"==typeof t?X(this,i,t):X.apply(r,[this,i].concat(t))},e.prototype.serializeAttributes=function(e){var t=this;return f.mapObject(e,function(e,n){if(function(e){return f.isArray(e)&&"widgetlist"===e[0]}(e)){var r=Object(c.o)(n);return["widgetlist",f.invoke(t.get(r,["widgetlist"]),"serializeAttributes")]}return e})},e.prototype.persistWidgets=function(e,t){f.each(t,function(t){if(function(e){if(!e)return!1;if(!f.isArray(e))return!1;if(e.length<2)return!1;var t=e[1];return f.isArray(t)&&t.length>0&&"widgetlist"===t[0]}(t)){var n=t[0];if(n){var r=f.isArray(n)?n:[n];f.each(r,function(t){t.isPersisted()||t.persistInObj(e)})}}})},e}();function ie(e){return f.mapObject(e,function(e,t){if(Object(c.z)(t))return f.isArray(e)?e:[e];if(!f.isArray(e))throw new c.g("Value for "+t+" should be a tuple: [value, typeInfo]");var n=e[0],r=e[1];return"string"==typeof r?[n,[r]]:[n,r]})}var oe,ae="published";function se(){return oe||ae}function ce(e){oe=e}function ue(){oe=void 0}function le(e){return(le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function fe(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}function pe(e,t){return!t||"object"!==le(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function he(e,t,n){return(he="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=me(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function me(e){return(me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ve(e,t,n){return t&&_e(e.prototype,t),n&&_e(e,n),e}function ge(e,t){return(ge=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ye=function(e){function t(e){var n;return function(e,t){if(!fe(e,t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=pe(this,me(t).call(this)))._attributesToBeSaved=ie(e),function(e){if(!e)throw new c.a('Please provide a widget class as the "_objClass" property.')}(e._objClass),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ge(e,t)}(t,re),ve(t,null,[{key:"build",value:function(e,n){var r=Object.create(t.prototype);return r._obj=n,r._id=e,r}},{key:"newWithSerializedAttributes",value:function(e){var n={},r={};p.a.each(e,function(e,i){if("_obj_class"!==i)if(p.a.isArray(e)&&"widgetlist"===p.a.first(e)){var o=p.a.map(p.a.last(e),function(e){return t.newWithSerializedAttributes(e)}),a=Object(c.o)(i);n[a]=[o,["widgetlist"]]}else r[i]=e;else n._objClass=[e]});var i=new t(n);return i.preserializedAttributes=r,i}}]),ve(t,[{key:"id",value:function(){return this._failIfNotPersisted(),this._id}},{key:"objClass",value:function(){return this.isPersisted()?this.getAttributeData("_obj_class"):this._attributesToBeSaved._objClass[0]}},{key:"obj",value:function(){return this._failIfNotPersisted(),this._obj}},{key:"widget",value:function(e){return this.obj().widget(e)}},{key:"workspaceId",value:function(){return this.obj().workspaceId()}},{key:"modification",value:function(){return Object(a.k)(se(),this.obj().id(),this.id())}},{key:"update",value:function(e){var t=this,n=ie(e);Object(A.r)(function(){t.persistWidgets(t.obj(),n);var e=Ce(n);t._updateSelf(e)})}},{key:"insertBefore",value:function(e){e.obj().insertWidget(this,{before:e})}},{key:"insertAfter",value:function(e){e.obj().insertWidget(this,{after:e})}},{key:"remove",value:function(){this.obj().removeWidget(this)}},{key:"copy",value:function(){return this.isPersisted()?this._copyPersisted():this._copyUnpersisted()}},{key:"persistInObj",value:function(e){this.persistWidgets(e,this._attributesToBeSaved);var t=Ce(this._attributesToBeSaved);p.a.extend(t,this.preserializedAttributes||{}),this._obj=e,this._id=e.generateWidgetId(),this._updateSelf(t),this._executeDidPersistCallback()}},{key:"isPersisted",value:function(){return!!this._obj}},{key:"onDidPersist",value:function(e){if(this.isPersisted())throw new c.i('Cannot call "onDidPersist" of an already persisted widget');this._onDidPersistCallback=e}},{key:"hasOnDidPersistCallback",value:function(){return!!this._onDidPersistCallback}},{key:"finishSaving",value:function(){return this.obj().finishSaving()}},{key:"equals",value:function(e){return!!fe(e,t)&&(this.id()===e.id()&&this.obj().id()===e.obj().id())}},{key:"containingField",value:function(){return this.obj().fieldContainingWidget(this)}},{key:"toPrettyPrint",value:function(){return"[object ".concat(this.objClass(),' id="').concat(this.id(),'" objId="').concat(this.obj().id(),'"]')}},{key:"getAttributeData",value:function(e){return this.obj().getWidgetAttribute(this.id(),e)}},{key:"getData",value:function(){return this.obj().getWidgetData(this.id())}},{key:"serializeAttributes",value:function(){return he(me(t.prototype),"serializeAttributes",this).call(this,this.getData())}},{key:"_failIfNotPersisted",value:function(){if(!this.isPersisted())throw new c.i("Can not access a new widget before it has been saved.")}},{key:"_updateSelf",value:function(e){var t,n,r,i={_widgetPool:[(t={},n=this.id(),r=e,n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t)]};this.obj().update(i)}},{key:"_executeDidPersistCallback",value:function(){this._onDidPersistCallback&&(this._onDidPersistCallback(this),delete this._onDidPersistCallback)}},{key:"_copyPersisted",value:function(){var e=this.serializeAttributes();return t.newWithSerializedAttributes(e)}},{key:"_copyUnpersisted",value:function(){var e=new t(p.a.mapObject(this._attributesToBeSaved,function(e){var t=de(e,2),n=t[0],r=t[1];return r&&"widgetlist"===r[0]?[p.a.invoke(n,"copy"),r]:[n,r]}));return this._onDidPersistCallback&&e.onDidPersist(this._onDidPersistCallback),e}},{key:"attributesToBeSaved",get:function(){return this._attributesToBeSaved}}]),t}();function be(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}function we(e){if(be(e,qe))return!0;if(!f.isObject(e))return!1;var t=f.without(f.keys(e),"hash","obj_id","query","rel","target","title","url");return f.isEmpty(t)}function ke(e){var t,n=be(e,qe)?{rel:(t=e).rel()||void 0,query:t.query(),target:t.target(),title:t.title(),url:t.url(),obj_id:t.objId(),fragment:t.hash()}:function(e){return{obj_id:e.obj_id||null,query:e.query||null,rel:e.rel||void 0,target:e.target||null,title:e.title||null,url:e.url||null,fragment:e.hash||null}}(e);return n.rel||delete n.rel,n}function Se(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}function Oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ce(e){var t={};return p.a.each(e,function(e,n){var r=Oe(e,2),i=r[0],o=r[1],a=function(e){if(!Object(c.y)(e))throw new c.a("Attribute names have to be in camel case.");return Object(c.R)(e)}(n);if(Object(c.z)(a))t[a]=i;else{var s=Oe(o,2),u=s[0],l=s[1];t[a]=[Me(u,n),Ee(xe(u,l,i,n))]}}),t}function Me(e,t){switch(e){case"enum":return"string";case"float":case"integer":return"number";case"multienum":return"stringlist";case"binary":case"date":case"html":case"link":case"linklist":case"reference":case"referencelist":case"string":case"stringlist":case"widgetlist":return e;default:throw new c.a('Attribute "'.concat(t,'" is of unsupported type "').concat(e,'".'))}}function xe(e,t,n,r){if(null===n)return n;switch(e){case"binary":return function(e,t){if(Se(e,G))return{id:e.id()};Te(e,t,"A Binary.")}(n,r);case"date":return function(e,t){if(p.a.isDate(e))return Object(c.w)(e);if(Object(c.A)(e))return e;Te(e,t,"A Date.")}(n,r);case"enum":return function(e,t,n){var r=e.values;if(p.a.contains(r,t))return t;var i='Valid attribute values are contained in its "values" array ['.concat(r,"].");Te(t,n,i)}(t,n,r);case"float":return function(e,t){if(Object(c.B)(e))return e;var n=e;p.a.isNumber(e)&&(n=String(e));Te(n,t,"A Number, that is #isFinite().")}(n,r);case"html":return function(e,t){if(p.a.isString(e))return e;Te(e,t,"A String.")}(n,r);case"integer":return function(e,t){if(Object(c.C)(e))return e;Te(e,t,"A Number, that is #isSafeInteger().")}(n,r);case"link":return function(e,t){if(we(e))return ke(e);Te(e,t,"A Link instance.")}(n,r);case"linklist":return function(e,t){if(p.a.isArray(e)&&p.a.every(e,we))return p.a.map(e,ke);Te(e,t,"An array of Link instances.")}(n,r);case"multienum":return function(e,t,n){var r=e.values,i="An array with values from ".concat(Object(c.I)(r),".");p.a.isArray(t)&&p.a.every(t,p.a.isString)||Te(t,n,i);var o=p.a.difference(t,r);if(o.length){var a="".concat(i," Forbidden values: ").concat(Object(c.I)(o),".");Te(t,n,a)}return t}(t,n,r);case"reference":return function(e,t){if(De(e))return je(e);Te(e,t,"A BasicObj or a String ID.")}(n,r);case"referencelist":return function(e,t){if(function(e){return p.a.isArray(e)&&p.a.every(e,function(e){return De(e)})}(e))return p.a.map(e,je);Te(e,t,"An array with BasicObjs or String IDs.")}(n,r);case"string":return function(e,t){if(Le(e))return e.toString();Te(e,t,"A String.")}(n,r);case"stringlist":return function(e,t){if(p.a.isArray(e)&&p.a.every(e,function(e){return Le(e)}))return p.a.invoke(e,"toString");Te(e,t,"An array of strings.")}(n,r);case"widgetlist":return function e(t,n){if(Se(t,ye))return e([t],n);if(p.a.isArray(t)&&p.a.every(t,function(e){return Se(e,ye)}))return p.a.invoke(t,"id");Te(t,n,"An array of BasicWidget instances.")}(n,r);default:throw new c.g('serializeAttributeValue is not implemented for "'.concat(e,'".'))}}function Ee(e){return(p.a.isString(e)||p.a.isArray(e))&&p.a.isEmpty(e)?null:e}function Te(e,t,n){throw new c.a("Unexpected value ".concat(Object(c.I)(e)," for")+' attribute "'.concat(t,'". Expected: ').concat(n))}function je(e){return Se(e,Re)?e.id():e}function De(e){return p.a.isString(e)||Se(e,Re)}function Le(e){return p.a.isString(e)||p.a.isNumber(e)}function Pe(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}var Ie,Ne,Ae=(Ie=function(e,t){return(Ie=Object.setPrototypeOf||Pe({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}Ie(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Ye=function(e){function t(t){var n=e.call(this)||this;return n.objData=t,n}return Ae(t,e),t.get=function(e){var t=this.getIncludingDeleted(e);return!t||t.isDeleted()?null:t},t.getInWorkspace=function(e,t){var n=this.getIncludingDeletedInWorkspace(e,t);return!n||n.isDeleted()?null:n},t.getIncludingDeleted=function(e){return this.getIncludingDeletedInWorkspace(se(),e)},t.getIncludingDeletedInWorkspace=function(e,n){var r=Object(a.i)(e,n);if(!r)return null;var i=new t(r);return i.isFinallyDeleted()?null:i},t.create=function(e){return this.createInWorkspace(se(),e)},t.createInWorkspace=function(e,t){var n=ie(t);!function(e){if(!e)throw new c.a('Please provide an obj class as the "_objClass" property.')}(n._objClass),n._id||(n._id=[this.generateId()]);var r={_id:n._id,_obj_class:n._objClass};return this.createWithSerializedAttributes(e,f.mapObject(r,function(e){return e[0]}),f.omit(t,"_objClass","_id"))},t.createFromFile=function(e,t){var n=this.create(t);return G.upload(e).intoId(n.id()).then(function(e){return n.update({blob:[e,["binary"]]}),n.finishSaving().then(function(){return n})})},t.addChildWithSerializedAttributes=function(e,n){var r=t.generateId();return this.createWithSerializedAttributes(se(),f.extend({},n,{_id:r,_path:e+"/"+r}))},t.createWithSerializedAttributes=function(e,n,r){if(!r){var i=function(e){var t={},n={};f.each(e,function(e,r){if(a=e,f.isArray(a)&&"widgetlist"===f.first(a)){var i=f.map(e[1],Fe),o=Object(c.o)(r);n[o]=[i,["widgetlist"]]}else t[r]=e;var a}),t._id||(t._id=Ye.generateId());return[t,n]}(n),o=i[0],s=i[1];return this.createWithSerializedAttributes(e,o,s)}var u=Object(a.d)(e,n._id);u.update(n);var l=new t(u);return l.update(r),l},t.generateId=function(){return Object(c.L)()},t.all=function(){return(new w).batchSize(1e3)},t.root=function(){return t.getByPath("/")},t.where=function(e,t,n,r){return(new w).and(e,t,n,r)},t.getByPath=function(e){var t=this.where("_path","equals",e).first();return t||null},t.getByPermalink=function(e){var t=this.where("_permalink","equals",e).first();return t||null},t.getAllByPermalink=function(e){return this.where("_permalink","equals",e).take()},t.generateWidgetId=function(){return Object(c.K)()},t.prototype.id=function(){return this.getAttributeData("_id")},t.prototype.objClass=function(){return this.getAttributeData("_obj_class")},t.prototype.obj=function(){return this},t.prototype.createdAt=function(){return Object(c.H)(this.getAttributeData("_created_at"))},t.prototype.createdBy=function(){return this.getAttributeData("_created_by")||null},t.prototype.lastChanged=function(){var e=this.getAttributeData("_last_changed");return e?Object(c.H)(e):null},t.prototype.lastChangedBy=function(){return this.getAttributeData("_last_changed_by")||null},t.prototype.version=function(){return this.getAttributeData("_version")},t.prototype.workspaceId=function(){return this.objData.workspaceId()},t.prototype.path=function(){return this.getAttributeData("_path")||null},t.prototype.permalink=function(){return this.getAttributeData("_permalink")||null},t.prototype.parentPath=function(){var e=this.path();return e&&"/"!==e?function(e){var t=e.split("/");if(t.pop(),1===t.length)return"/";return t.join("/")}(e):null},t.prototype.parent=function(){var e=this.parentPath();return e?t.getByPath(e):null},t.prototype.hasConflicts=function(){return!!this.getAttributeData("_conflicts")},t.prototype.modification=function(){return this.isFinallyDeleted()||this.getAttributeData("_marked_deleted")?"deleted":this.getAttributeData("_modification")||null},t.prototype.isModified=function(){return!!this.modification()},t.prototype.isNew=function(){return"new"===this.modification()},t.prototype.isEdited=function(){return"edited"===this.modification()},t.prototype.isDeleted=function(){return"deleted"===this.modification()},t.prototype.isFinallyDeleted=function(){return this.objData.isNonExistent()},t.prototype.contentLength=function(){return this.metadata().contentLength()},t.prototype.contentType=function(){return this.metadata().contentType()},t.prototype.contentUrl=function(){var e=this.blob();return e?e.url():""},t.prototype.metadata=function(){var e=this.blob();return e?new q(e.id()):new q},t.prototype.children=function(){var e=this.path();return e?He(e).take():[]},t.prototype.hasChildren=function(){var e=this.path();return!!e&&He(e).batchSize(0).count()>0},t.prototype.orderedChildren=function(){var e=this.children(),t=this.get("childOrder","referencelist");return f.isArray(t)?f.sortBy(e,function(e){var n=f.invoke(t,"id").indexOf(e.id());return-1===n?t.length:n}):e},t.prototype.backlinks=function(){return t.where("*","linksTo",this).take()},t.prototype.ancestors=function(){var e=this.parentPath();return e?function(e){var t=["/"];if("/"===e)return t;var n=e.split("/").slice(1),r="";return n.forEach(function(e){r=r+"/"+e,t.push(r)}),t}(e).map(function(e){return t.getByPath(e)}):[]},t.prototype.isRestricted=function(){var e=this.restriction();return!!e&&e.length>0},t.prototype.restriction=function(){return this.getAttributeData("_restriction")||null},t.prototype.restrict=function(){this.isRestricted()||this.update({_restriction:[["_auth"]]})},t.prototype.unrestrict=function(){this.update({_restriction:null})},t.prototype.update=function(e){var t=this,n=ie(e);Object(A.r)(function(){t.persistWidgets(t,n);var e=Ce(n);t.objData.update(e)}),this.startLinkResolution()},t.prototype.destroy=function(){this.update({_markedDeleted:[!0]})},t.prototype.insertWidget=function(e,t){var n,r=function(e){if(function(e){return!!e.before}(e))return e.before.id();return e.after.id()}(t),i=this._widgetPlacementFor(r);if(i){var o=i.attributeValue,a=i.attributeName,s=i.container,c=i.index,u=t.before?c:c+1,l=o.slice(0,u).concat([e],o.slice(u));s.update(((n={})[a]=[l,["widgetlist"]],n))}},t.prototype.removeWidget=function(e){var t=this.fieldContainingWidget(e);if(t){var n=t.get(),r=f.reject(n,function(t){return t.equals(e)});t.update(r)}},t.prototype.siblingWidget=function(e,t){var n=this._widgetPlacementFor(e.id());if(n)return n.attributeValue[n.index+t]},t.prototype.copyAsync=function(e){return void 0===e&&(e={}),function(e){if(f.difference(f.keys(e),["_path"]).length)throw new c.a('Currently only "_path" copy option is supported.')}(e),this._copyAttributes().then(function(n){var r=f.extend(n,e),i=t.createWithSerializedAttributes(se(),r);return i.objData.finishSaving().then(function(){return i})})},t.prototype.moveToAsync=function(e){return this.moveTo(e),this.finishSaving()},t.prototype.moveTo=function(e){this.update({_path:[e+"/"+this.id()]})},t.prototype.markResolvedAsync=function(){return this.update({_conflicts:[null]}),this.finishSaving()},t.prototype.finishSaving=function(){var e=this;return this.finishLinkResolution().then(function(){return e.objData.finishSaving()})},t.prototype.equals=function(e){return!!Pe(e,t)&&this.id()===e.id()},t.prototype.widget=function(e){return this.getWidgetAttribute(e,"_obj_class")?ye.build(e,this):null},t.prototype.getWidgetAttribute=function(e,t){return this.objData.getWidgetAttribute(e,t)},t.prototype.widgets=function(){var e=this.getData();if(!ze(e))return[];var t=e._widget_pool;if(!t)return[];var n=[];return this.collectWidgets(n,e,t,{}),n},t.prototype.fieldContainingWidget=function(e){var t=e.id(),n=this._widgetPlacementFor(t);if(n){var r=n.container,i=n.attributeName;return new s(r,i,["widgetlist"])}},t.prototype.generateWidgetId=function(){for(var e=0;e<10;e++){var n=t.generateWidgetId();if(!this.widget(n))return n}throw new c.g("Could not generate a new unused widget id.")},t.prototype.serializeAttributes=function(){var t=e.prototype.serializeAttributes.call(this,this.getData());return delete t._conflicts,delete t._modification,delete t._created_at,delete t._created_by,delete t._last_changed,delete t._last_changed_by,t},t.prototype.slug=function(){var e,t=this.get("title","string");return"string"!=typeof(e=t)?"":h(e)},t.prototype.getWidgetData=function(e){return this.objData.getWidget(e)},t.prototype.startLinkResolution=function(){Object(a.l)()||We().startLinkResolutionFor(se(),this.id())},t.prototype.finishLinkResolution=function(){return We().finishLinkResolutionFor(se(),this.id())},t.prototype.toPrettyPrint=function(){return"[object "+this.objClass()+' id="'+this.id()+'"]'},t.prototype.getAttributeData=function(e){return this.objData.getAttribute(e)},t.prototype.getData=function(){return this.objData.get()},t.prototype.blob=function(){return this.get("blob",["binary"])},t.prototype._copyAttributes=function(){var e=t.generateId(),n=this.serializeAttributes(),r=[];return f.each(n,function(t,i){if("_"!==i[0]){if(function(e){return"binary"===e[0]&&!!e[1]}(t)){var o=t[1],a=new W({idToCopy:o.id}).intoId(e).then(function(e){return{name:i,binary:e}});r.push(a)}}else delete n[i]}),n._id=e,n._obj_class=this.objClass(),n._restriction=this.restriction(),this.path()&&(n._path=this.parentPath()+"/"+e),c.j.all(r).then(function(e){return f.each(e,function(e){var t=e.name,r={id:e.binary.id()};n[t]=["binary",r]}),n})},t.prototype.collectWidgets=function(e,t,n,r){var i=this;f.map(t,function(e,t){if(e&&!Object(c.z)(t)){var n=e;return Object(z.h)(n)?n[1]:void 0}}).forEach(function(t){t&&t.forEach(function(t){if(!r[t]){r[t]=!0;var o=i.widget(t);if(o){e.push(o);var a=n[t];i.collectWidgets(e,a,n,r)}}})})},t.prototype._widgetPlacementFor=function(e){var t=this.getData();if(ze(t)){var n=Object(a.f)(t,e);if(n){var r,i=Object(c.o)(n.attributeName),o=n.parentWidgetId;if(o){if(!(r=this.widget(o)))return}else r=this;return{container:r,attributeName:i,attributeValue:r.get(i,["widgetlist"]),index:n.index,parentWidgetId:o}}}},t}(re),Re=Ye;function Fe(e){return ye.newWithSerializedAttributes(e)}function He(e){return Ye.all().and("_parentPath","equals",e)}function We(){if(!Ne)throw new Error("No Link Handler");return Ne}function Be(e){Ne=e}function ze(e){return!!e&&Object(z.f)(e)}var Ue=function(){return(Ue=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},qe=function(){function e(e){this.attributes=Ue({},e)}return e.prototype.title=function(){return this.attributes.title||null},e.prototype.query=function(){return this.attributes.query||null},e.prototype.hash=function(){return this.attributes.hash||null},e.prototype.rel=function(){return this.attributes.rel||null},e.prototype.target=function(){return this.attributes.target||null},e.prototype.url=function(){return this.attributes.url||null},e.prototype.objId=function(){return this.attributes.objId||null},e.prototype.obj=function(){var e=this.objId();return e?Re.get(e):null},e.prototype.queryParameters=function(){return l(this.query()||"")},e.prototype.isExternal=function(){return!!this.url()},e.prototype.isInternal=function(){return!this.isExternal()},e.prototype.equals=function(t){return n=t,!!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&(this.isExternal()?this.hash()===t.hash()&&this.query()===t.query()&&this.rel()===t.rel()&&this.target()===t.target()&&this.title()===t.title()&&this.url()===t.url():this.objId()===t.objId()&&this.title()===t.title());var n,r},e.prototype.copy=function(t){void 0===t&&(t={});var n=Ue({},this.attributes,t);if(t.objId&&t.url)throw new c.a('Link#copy refused: both "objId" and "url" have been specified with truthy values');return t.objId?n.url=null:t.url&&(n.objId=null),new e(n)},e.prototype.isBroken=function(){return!this.isExternal()&&!this.obj()},e.prototype.toPrettyPrint=function(){return this.isInternal()?'[object Link objId="'+this.objId()+'"]':'[object Link url="'+this.url()+'"]'},e}();function Ve(e){var t=e.get(),n=function(e){var t=e.getDiff();if(Object(z.i)(t))return t.content}(e);return n?Object(f.compact)(n.map(function(n){var r,i=n[0],o=n[1];switch(i){case"+":if(r=$e(t,o))return{widget:r,modification:"new"};break;case"=":if(r=$e(t,o))return{widget:r,modification:null};break;case"-":if(r=function(e,t){var n=Re.getInWorkspace("published",e);if(n)return n.widget(t);return null}(e.obj().id(),o))return{widget:r,modification:"deleted"}}})):t.map(function(e){return{widget:e,modification:null}})}function $e(e,t){return Object(f.find)(e,function(e){return e.id()===t})||null}n.d(t,"AnyNormalizedSingleTypeInfo",function(){return i.AnyNormalizedSingleTypeInfo}),n.d(t,"AnyNormalizedTypeInfo",function(){return i.AnyNormalizedTypeInfo}),n.d(t,"AnyNormalizedTypeOptions",function(){return i.AnyNormalizedTypeOptions}),n.d(t,"AnyTypeInfo",function(){return i.AnyTypeInfo}),n.d(t,"AnyTypeOptions",function(){return i.AnyTypeOptions}),n.d(t,"NormalizedTypeInfo",function(){return i.NormalizedTypeInfo}),n.d(t,"AttributeType",function(){return o.AttributeType}),n.d(t,"BasicAttributeDict",function(){return o.BasicAttributeDict}),n.d(t,"BasicAttributeValue",function(){return o.BasicAttributeValue}),n.d(t,"BasicAttributeValueForUpdate",function(){return o.BasicAttributeValueForUpdate}),n.d(t,"SystemAttributeValue",function(){return o.SystemAttributeValue}),n.d(t,"BasicField",function(){return s}),n.d(t,"BasicLink",function(){return qe}),n.d(t,"BasicLinkAttributes",function(){}),n.d(t,"BasicObjFacetValue",function(){return m}),n.d(t,"ObjSearchParams",function(){}),n.d(t,"BasicObjSearch",function(){return w}),n.d(t,"OPERATORS",function(){return v}),n.d(t,"BasicSearchValue",function(){}),n.d(t,"SearchField",function(){}),n.d(t,"SearchOperator",function(){}),n.d(t,"Boost",function(){}),n.d(t,"BasicObj",function(){return Re}),n.d(t,"MaybeBasicObj",function(){}),n.d(t,"setLinkHandler",function(){return Be}),n.d(t,"LinkHandler",function(){}),n.d(t,"BasicWidget",function(){return ye}),n.d(t,"TransformationDefinition",function(){}),n.d(t,"Binary",function(){return G}),n.d(t,"BlobMock",function(){}),n.d(t,"FutureBinary",function(){return W}),n.d(t,"FutureBinaryOptions",function(){}),n.d(t,"IdToCopySource",function(){}),n.d(t,"SourceSource",function(){}),n.d(t,"setBinaryHandler",function(){return Y}),n.d(t,"BinaryHandler",function(){}),n.d(t,"MetadataCollection",function(){return q}),n.d(t,"BinaryMetadataValue",function(){}),n.d(t,"ObjSearchType",function(){return L}),n.d(t,"LinkType",function(){return D}),n.d(t,"ObjType",function(){return T}),n.d(t,"WidgetType",function(){return j}),n.d(t,"BinaryType",function(){return P}),n.d(t,"QueryParameters",function(){}),n.d(t,"parseQuery",function(){return l}),n.d(t,"queryParametersFromUrl",function(){return d}),n.d(t,"currentWorkspaceId",function(){return se}),n.d(t,"resetCurrentWorkspaceId",function(){return ue}),n.d(t,"setCurrentWorkspaceId",function(){return ce}),n.d(t,"getPlacementModificationInfos",function(){return Ve}),n.d(t,"PlacementModification",function(){})},function(e,t,n){e.exports=n(490)()},function(e,t,n){"use strict";n.r(t);var r=n(98),i=n(0),o=new i.d,a=function(){return o.current()};function s(e){var t={subscribes:[],missing:!1,outdated:!1},n=o.runWith(t,e);return new l(t,n)}function c(){throw new i.i("Content not yet loaded. Forgot to use Scrivito.load or Scrivito.connect? See https://scrivito.com/content-not-yet-loaded-error")}function u(){return void 0!==a()}var l=function(){function e(e,t){this.captureList=e,this.result=t}return e.prototype.forwardToCurrent=function(){var e,t,n=a();n?(e=n,t=this.captureList,e.subscribes=e.subscribes.concat(t.subscribes),e.missing=e.missing||t.missing,e.outdated=e.outdated||t.outdated):this.captureList.missing&&c()},e.prototype.isAllDataLoaded=function(){return!this.captureList.missing},e.prototype.isAllDataUpToDate=function(){return!this.captureList.missing&&!this.captureList.outdated},e.prototype.subscribeLoading=function(e){var t=this.captureList.subscribes.map(function(e){return e()});e.unsubscribe(),e.storeUnsubscribe(function(){t.forEach(function(e){return e()})})},e}(),d=function(){function e(){}return e.prototype.storeUnsubscribe=function(e){this.unsubscribeCallback=e},e.prototype.unsubscribe=function(){this.unsubscribeCallback&&this.unsubscribeCallback()},e}();var f=n(6);function p(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.apply(void 0,[e].concat(t));var r=new i.e,o=q(function(){return Object(i.M)(function(){return Object(f.s)({contextName:"Scrivito.load",message:"Use an async callback: Scrivito.load(/* ... */).then(/* ... */)."},e)})},function(e){if(e.allDataUpToDate){o.unsubscribe();var t=e.result;t.errorThrown?r.reject(t.error):r.resolve(t.result)}});return r.promise}var h=Object(i.p)("load",[["loadableFunction",i.O.Function]],{docPermalink:"js-sdk/load"}),m=function(){function e(e){this.container=e}return e.prototype.reader=function(){return this.container.reader().subState("value")},e.prototype.status=function(){return this.getStateKey("status")||"MISSING"},e.prototype.value=function(){return this.getStateKey("value")},e.prototype.error=function(){return this.getStateKey("error")},e.prototype.version=function(){return this.getStateKey("version")},e.prototype.transitionToMissing=function(){this.setState(void 0)},e.prototype.transitionToAvailable=function(e,t){this.setState({status:"AVAILABLE",value:e,version:t})},e.prototype.transitionToError=function(e,t){this.setState({status:"ERROR",error:e,version:t})},e.prototype.setState=function(e){this.container.set(e)},e.prototype.getStateKey=function(e){return this.container.subState(e).get()},e}(),_={},v={};function g(e,t){var n=!0;y(e,1);var r=_[e];r||(_[e]=t);var i=r||t;return i.notifyDataRequired(),function(){n&&(n=!1,y(e,-1)<1&&i.notifyDataNoLongerRequired())}}function y(e,t){var n=(v[e]||0)+t;return v[e]=n,n}function b(e){var t=_[e];t&&t.notifyDataWasSet()}var w,k=(w=function(e,t){var n,r;return(w=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}w(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),S=function(e){function t(){return e.call(this,"Data is not yet loaded.",!1)||this}return k(t,e),t}(i.i),O=function(){function e(e,t){this.loadableValue=e,this.stream=t,this.streamRequired=!1,this.hasBufferedValue=!1,this.isUpdateEnqueued=!1}return e.prototype.notifyDataRequired=function(){this.streamRequired=!0,this.enqueueUpdate()},e.prototype.notifyDataNoLongerRequired=function(){this.streamRequired=!1,this.enqueueUpdate()},e.prototype.notifyDataWasSet=function(){},e.prototype.enqueueUpdate=function(){var e=this;this.isUpdateEnqueued||(Object(i.G)(function(){return e.update()}),this.isUpdateEnqueued=!0)},e.prototype.update=function(){this.isUpdateEnqueued=!1,this.streamRequired?(this.hasBufferedValue&&(this.loadableValue.transitionToAvailable(this.bufferedValue),this.clearBuffer()),this.ensureStreamIsOpen()):this.ensureStreamIsClosed()},e.prototype.ensureStreamIsOpen=function(){var e=this;this.subscription||(this.subscription=this.stream.subscribe(function(t){e.bufferValue(t),e.enqueueUpdate()}))},e.prototype.ensureStreamIsClosed=function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0),this.loadableValue.transitionToMissing(),this.clearBuffer()},e.prototype.bufferValue=function(e){this.bufferedValue=e,this.hasBufferedValue=!0},e.prototype.clearBuffer=function(){this.hasBufferedValue=!1,this.bufferedValue=void 0},e}(),C=0,M=function(){function e(e,t,n){this.value=e,this.loader=t,this.invalidation=n}return e.prototype.notifyDataRequired=function(){this.triggerLoading()},e.prototype.notifyDataNoLongerRequired=function(){},e.prototype.notifyDataWasSet=function(){this.currentLoad=void 0},e.prototype.isMissing=function(){return"MISSING"===this.value.status()},e.prototype.hasBeenInvalidated=function(){return x(this.value,this.invalidation)},e.prototype.currentVersion=function(){return E(this.invalidation)},e.prototype.triggerLoading=function(){var e=this;if(!this.isLoading()&&(this.isMissing()||this.hasBeenInvalidated())){var t=this.currentVersion(),n=C++,r=function(){return e.currentLoad===n},i=function(t){r()&&Object(f.a)(function(){t(),e.notifyDataWasSet(),a()})},o=[],a=function(){return o.forEach(function(e){return e()})};this.loader({push:function(e){return o.push(e)},isReload:function(){return e.hasBeenInvalidated()},wasCancelled:function(){return!r()}}).then(function(n){return i(function(){return e.value.transitionToAvailable(n,t)})},function(n){return i(function(){return e.value.transitionToError(n,t)})}),this.currentLoad=n}},e.prototype.isLoading=function(){return void 0!==this.currentLoad},e}();function x(e,t){return!!t&&("MISSING"!==e.status()&&E(t)!==e.version())}function E(e){if(e){var t=e();if("number"==typeof t&&isNaN(t)){var n="invalidation callback returned unsuitable version "+t;throw new i.g(n)}return t}}var T=function(){function e(e){if(!e.state)throw new i.g("LoadableData needs state");this.value=new m(e.state),this.invalidation=e.invalidation,this.throwNotLoaded=e.throwNotLoaded||!1,this.id=e.state.id(),e.stream?this.loaderProcess=new O(this.value,e.stream):this.loaderProcess=new M(this.value,e.loader,e.invalidation)}return e.prototype.ensureAvailable=function(){var e,t,n=this;if(e=function(){return g(n.id,n.loaderProcess)},(t=a())&&t.subscribes.push(e),this.isAvailable())return this.notifyIfOutdated(),!0;if(this.isError())throw this.notifyIfOutdated(),this.value.error();if(u()||(g(this.id,this.loaderProcess),c()),function(){var e=a();e&&(e.missing=!0)}(),this.throwNotLoaded)throw new S;return!1},e.prototype.get=function(){if(this.ensureAvailable())return D(this.id,this),this.value.value()},e.prototype.reader=function(){return D(this.id,this),this.value.reader()},e.prototype.set=function(e){this.value.transitionToAvailable(e,this.currentVersion()),b(this.id)},e.prototype.setError=function(e){this.transitionToError(e),b(this.id)},e.prototype.reset=function(){this.value.transitionToMissing()},e.prototype.isMissing=function(){return"MISSING"===this.value.status()},e.prototype.isAvailable=function(){return"AVAILABLE"===this.value.status()},e.prototype.isError=function(){return"ERROR"===this.value.status()},e.prototype.numSubscribers=function(){return e=this.id,v[e]||0;var e},e.prototype.transitionToError=function(e,t){void 0===t&&(t=this.currentVersion()),this.value.transitionToError(e,t)},e.prototype.notifyIfOutdated=function(){var e;x(this.value,this.invalidation)&&(e=a())&&(e.outdated=!0)},e.prototype.currentVersion=function(){return E(this.invalidation)},e}(),j=new i.d;function D(e,t){var n=j.current();n&&(n[e]=t)}function L(e){var t,n={};return{result:j.runWith(n,e),usedData:(t=n,Object.keys(t).map(function(e){return t[e]}))}}function P(e,t){var n=s(function(){return I(e,t)});return u()&&n.forwardToCurrent(),n.result}function I(e,t){var n=R(t);return n.allDataLoaded?n.result:e}var N=n(2),A=n.n(N);function Y(e,t){var n=[];if(A.a.each(e,function(e){var r=R(function(){return t(e)});r.success&&n.push(r.result)}),n.length<e.length)throw new S;return n}function R(e){var t=s(function(){return Object(i.M)(e)});t.forwardToCurrent();var n=t.result,r=t.isAllDataLoaded();if(!n.errorThrown)return{success:!0,result:n.result,allDataLoaded:r};if(!r)return{success:!1,allDataLoaded:!1};throw n.error}var F=function(){function e(e){var t=e.name,n=e.state,r=e.loader,o=e.invalidation;this.name=t,this.state=n,this.loader=r,this.invalidation=o,function(e,t){if(H[e])throw new i.g("collection name registered twice: "+e);H[e]=t}(t,this)}return e.prototype.get=function(e,t){var n=this,r=function(e){if("string"==typeof e)return e;return Object(i.s)(e)}(e),o=this.invalidation,a=new T({state:this.state().subState(r),loader:function(r){return n.loader(e,r,t)},invalidation:o?function(){return o(e)}:void 0});return function(e,t){e.affiliation=t}(a,{collectionName:this.name,key:e}),a},e}();var H={};function W(e){Object(f.r)(function(){return e.forEach(B)})}function B(e){var t=e[0],n=e[1],r=e[2];(function(e){var t=H[e];if(!t)throw new i.g("collection with name "+e+" not found");return t})(t).get(n).set(r)}function z(e){return e.map(U)}function U(e){var t=function(e){return e.affiliation}(e);if(!t)throw new i.g("Tried to record a LoadableData without affiliation");return[t.collectionName,t.key,e.get()]}function q(e,t){var n=new d,r=Object(f.k)(function(){return s(function(){return Object(i.M)(e)})},function(e){e.subscribeLoading(n);var r=e.result;if(r.errorThrown){if(!e.isAllDataUpToDate())return;throw r.error}t({result:r.result,allDataLoaded:e.isAllDataLoaded(),allDataUpToDate:e.isAllDataUpToDate()})});return{forceRefresh:function(){return r.forceRefresh()},unsubscribe:function(){r.unsubscribe(),n.unsubscribe()}}}n.d(t,"loadAllUntil",function(){return r.default}),n.d(t,"capture",function(){return s}),n.d(t,"CaptureList",function(){}),n.d(t,"CaptureReport",function(){return l}),n.d(t,"isCurrentlyCapturing",function(){return u}),n.d(t,"LoadingSubscriber",function(){return d}),n.d(t,"load",function(){return p}),n.d(t,"LoadableData",function(){return T}),n.d(t,"reportUsedData",function(){return L}),n.d(t,"LoaderApi",function(){}),n.d(t,"LoaderCallback",function(){}),n.d(t,"LoadableState",function(){}),n.d(t,"loadableWithDefault",function(){return P}),n.d(t,"loadWithDefault",function(){return I}),n.d(t,"mapAndLoadParallel",function(){return Y}),n.d(t,"runAndCatchErrorsWhileLoading",function(){return R}),n.d(t,"RunResult",function(){}),n.d(t,"NotLoadedError",function(){return S}),n.d(t,"DataRecording",function(){}),n.d(t,"loadRecording",function(){return W}),n.d(t,"generateRecording",function(){return z}),n.d(t,"LoadableCollection",function(){return F}),n.d(t,"LoadableCollectionState",function(){}),n.d(t,"observeAndLoad",function(){return q})},function(e,t,n){"use strict";var r=n(0),i=n(2),o=function(){function e(e,t){this.value=e,this.copy=t,this.valueForReading=new r.d}return e.prototype.read=function(e){var t=this.value;return this.valueForReading.runWith(t,function(){return e(t)})},e.prototype.write=function(e){this.valueForReading.current()===this.value&&(this.value=this.copy(this.value)),e(this.value)},e}(),a=function(){function e(e){this.notifySubscribers=e,this.subscribersStore=new o([],function(e){return e.slice()})}return e.prototype.create=function(e,t){return void 0===t&&(t=0),new s(this.subscribersStore,e,t)},e.prototype.count=function(){return this.subscribersStore.read(function(e){return e.length})},e.prototype.reset=function(){this.subscribersStore.write(function(e){e.length=0})},e.prototype.notify=function(){var e=this;this.subscribersStore.read(function(t){return e.notifySubscribers(t)})},e}(),s=function(){function e(e,t,n){void 0===n&&(n=0),this.subscriberStore=e,this.listener=t,this.rank=n,this.active=!1}return e.prototype.subscribeChanges=function(e){var t=this;this.stateReference=e,this.active||(this.subscriberStore.write(function(e){var n=Object(i.sortedIndex)(e,t,"rank");e.splice(n,0,t)}),this.active=!0),this.hasChanges()&&this.listener()},e.prototype.unsubscribe=function(){var e=this;this.active&&(this.subscriberStore.write(function(t){var n=t.indexOf(e);n>=0&&t.splice(n,1)}),this.active=!1)},e.prototype.notify=function(){this.active&&this.listener()},e.prototype.hasChanges=function(){return!!this.stateReference&&this.stateReference.hasChanges()},e}(),c=new a(function(e){e.forEach(function(e){e.hasChanges()&&e.notify()})}),u=new a(function(e){e.forEach(function(e){Object(r.G)(function(){e.hasChanges()&&e.notify()})})}),l=function(){function e(){this.listenersStore=new o([],function(e){return e.slice()})}return e.prototype.subscribe=function(e){var t=this,n=!0,r=function(){n&&e()};return this.listenersStore.write(function(e){return e.push(r)}),function(){n=!1,t.listenersStore.write(function(e){var t=e.indexOf(r);e.splice(t,1)})}},e.prototype.count=function(){return this.listenersStore.read(function(e){return e.length})},e.prototype.clear=function(){this.listenersStore.write(function(e){e.length=0})},e.prototype.notify=function(){this.listenersStore.read(function(e){return e.forEach(function(e){return e()})})},e}();function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e){return null!==e&&"object"===d(e)&&!Array.isArray(e)&&!function(e){var t=Object.getPrototypeOf(e);if(null===t)return!1;return null!==Object.getPrototypeOf(t)}(e)}function p(e,t){return e===t?t:f(t)?function(e,t){var n={},r=!1;void 0===e&&(r=!0);var i=Object.keys(t),o=new Set;e&&Object.keys(e).forEach(function(e){return o.add(e)});o.size!==i.length&&(r=!0);return i.forEach(function(i){o.has(i)||(r=!0);var a=e?e[i]:void 0,s=p(a,t[i]);s!==a&&(r=!0),n[i]=s}),r?Object.freeze(n):e}(f(e)?e:void 0,t):Array.isArray(t)?function(e,t){var n=!1;void 0!==e&&e.length===t.length||(n=!0);var r=t.map(function(t,r){var i=e?e[r]:void 0,o=p(i,t);return o!==i&&(n=!0),o});return n?Object.freeze(r):e}(Array.isArray(e)?e:void 0,t):t}var h,m,_,v,g,y,b,w=(h=function(e,t){var n,r;return(h=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}h(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),k=function(){function e(){}return e.prototype.get=function(){var e=this,t=this.untrackedGet();return this.recordDetector(function(){return t!==e.untrackedGet()}),t},e.prototype.recordDetector=function(e){this.getTree().recordDetector(e)},e.prototype.set=function(e){var t=this.untrackedGet(),n=p(t,e);n!==t&&this.uncheckedSet(n)},e.prototype.clear=function(){this.set(void 0)},e.prototype.subState=function(e){return new M(this,e)},e.prototype.reader=function(){return this},e.prototype.setSubState=function(e,t){var n,i=this.untrackedGet();if(void 0!==i){if(void 0===t){var o=Object.keys(i);if(1===o.length&&o[0]===e)return void this.uncheckedSet(void 0)}if(null===i)throw new r.g;var a=Object(r.n)({},i),s=a;void 0===t?delete s[e]:s[e]=t,this.uncheckedSet(Object.freeze(a))}else{var c=Object.freeze(((n={})[e]=t,n));this.uncheckedSet(c)}},e.prototype.getSubState=function(e){var t=this.untrackedGet();if(null!=t)return t[e]},e}(),S=function(){function e(e){this.detector=e}return e.prototype.hasChanges=function(){return this.detector()},e}(),O=function(e){function t(){var t=e.call(this)||this;return t.listeners=new l,t.detectorRecording=new r.d,t.batchUpdates=new r.d,t.version=0,t.frozenContextContainer=new r.d,t}return w(t,e),t.prototype.untrackedGet=function(){return this.state},t.prototype.withFrozenState=function(e,t){return this.frozenContextContainer.runWith(e,t)},t.prototype.failIfTracking=function(e){if(this.detectorRecording.current())throw new r.g(e)},t.prototype.failIfFrozen=function(e){var t=this.frozenContextContainer.current();if(t){var n=e+" is not permitted inside '"+t.contextName+"'. "+(t.message||"");throw new C(n)}},t.prototype.uncheckedSet=function(e){this.failIfFrozen("Changing state"),this.state=e,this.version++,this.insideBatchUpdate()||this.notifyListeners()},t.prototype.trackStateAccess=function(e){var t=this.trackChanges(e),n=t.detector;return{result:t.result,accessedState:new S(n)}},t.prototype.recordDetector=function(e){var t=this.detectorRecording.current();void 0!==t&&t.push(e)},t.prototype.getTree=function(){return this},t.prototype.id=function(){return""},t.prototype.subscribe=function(e){return this.listeners.subscribe(e)},t.prototype.withBatchedUpdates=function(e){var t=this.state;try{this.batchUpdates.runWith(!0,e)}finally{this.insideBatchUpdate()||t===this.state||this.notifyListeners()}},t.prototype.listenerCount=function(){return this.listeners.count()},t.prototype.clearListeners=function(){this.listeners.clear()},t.prototype.trackChanges=function(e){var t=this,n=this.version,r=this.recordDetectors(e),o=r.result,a=r.detectors;return{result:o,detector:function(){return t.version!==n&&!!Object(i.find)(a,function(e){return e()})}}},t.prototype.recordDetectors=function(e){var t=[],n=this.detectorRecording.runWith(t,e),r=this.detectorRecording.current();return void 0!==r&&r.push.apply(r,t),{result:n,detectors:t}},t.prototype.notifyListeners=function(){var e=this;this.withFrozenState({contextName:"state listeners"},function(){e.listeners.notify()})},t.prototype.insideBatchUpdate=function(){return!!this.batchUpdates.current()},t}(k),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return w(t,e),t}(r.i),M=function(e){function t(t,n){var r=e.call(this)||this;return r.parentState=t,r.key=n,r.tree=t.getTree(),r}return w(t,e),t.prototype.getTree=function(){return this.tree},t.prototype.untrackedGet=function(){return this.parentState.getSubState(this.key)},t.prototype.uncheckedSet=function(e){this.parentState.setSubState(this.key,e)},t.prototype.id=function(){if(void 0===this.cachedId){var e=this.key.replace(/\\/g,"\\\\").replace(/\//g,"\\/");this.cachedId=this.parentState.id()+"/"+e}return this.cachedId},t}(k);function x(e){e?(m=void 0,_=e.stateController(),v=e.createAppState(),b=e.sharedCmsState(),g=v.subState("localCms")):(m=new O,_=m,v=j(),b=m.subState("sharedCms"),g=m.subState("localCms"),y=m.subState("ui")),F()}var E,T=0;function j(){if(!m)throw new r.g;var e=(T++).toString();return m.subState("apps").subState(e)}function D(e){return _.withBatchedUpdates(e)}function L(){return _}function P(e){return _.trackStateAccess(e)}function I(e,t){return _.withFrozenState(e,t)}function N(e){return _.failIfFrozen(e)}function A(e){return _.failIfTracking(e)}function Y(e){return u.create(e)}function R(e,t){return void 0===t&&(t=0),c.create(e,t)}function F(){E=_.subscribe(function(){c.notify(),u.notify()})}function H(){E&&E(),v.clear()}var W=[],B=function(){return 0!==W.length};function z(e){B()||Object(r.G)(function(){return D(function(){return function e(t){W=[];try{t.forEach(function(e){return e()})}finally{B()&&e(W)}}(W)})}),W.push(e)}function U(e,t){var n,i=!0,o=!1,a=Y(s);function s(){if(i){var s=P(function(){return I({contextName:"observe",message:"Extract all side-effects into the listener function"},e)});a.subscribeChanges(s.accessedState);var c=s.result;o&&Object(r.v)(c,n)||(t(c),n=c,o=!0)}}return Object(r.G)(s),{unsubscribe:function(){i=!1,a.unsubscribe()},forceRefresh:function(){Object(r.G)(s)}}}function q(e,t){var n=P(function(){return I({contextName:"observeSync",message:"Use non-sync observe or nextTick"},e)}),i=n.result,o=R(function(){var n=P(e);o.subscribeChanges(n.accessedState);var a=n.result;Object(r.v)(a,i)||(t(a),i=a)});return o.subscribeChanges(n.accessedState),{initialValue:i,unsubscribe:function(){o.unsubscribe()}}}function V(e){return new r.j(function(t){var n=U(e,function(e){null!=e&&(n.unsubscribe(),t(e))})})}n.d(t,"d",function(){return j}),n.d(t,"c",function(){return g}),n.d(t,"m",function(){return b}),n.d(t,"o",function(){return P}),n.d(t,"r",function(){return D}),n.d(t,"s",function(){return I}),n.d(t,"g",function(){return N}),n.d(t,"h",function(){return A}),n.d(t,"i",function(){return L}),n.d(t,"p",function(){return y}),n.d(t,"b",function(){return v}),n.d(t,"j",function(){return x}),n.d(t,"n",function(){return H}),n.d(t,"e",function(){return Y}),n.d(t,"f",function(){return R}),n.d(t,"a",function(){return z}),n.d(t,"k",function(){return U}),n.d(t,"l",function(){return q}),n.d(t,"q",function(){return V})},function(e,t,n){"use strict";var r=n(0),i=n(5),o=n(6),a="GET",s="SEND",c=1;function u(e,t){var n=c++,u={};return Object.keys(e).forEach(function(c){var l=e[c];l===a&&(u[c]=function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];var s=o.b.subState("adapters").subState(n.toString()),u=c,l=s.subState(u).subState(Object(r.s)(e));return new i.LoadableData({state:l,stream:t.stream.apply(t,[u].concat(e))}).get()}),l===s&&(u[c]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.send.apply(t,[c].concat(e))})}),u}function l(e){return{stream:function(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return new r.k(function(r){return Object(i.observeAndLoad)(function(){var r=e();if(r){var i=r[t];return{valueFromClient:i.call.apply(i,[r].concat(n))}}},function(e){e.allDataLoaded&&void 0!==e.result&&r.next(e.result.valueFromClient)}).unsubscribe})},send:function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return new r.j(function(r){Object(o.q)(e).then(function(e){var i=e[t];r(i.call.apply(i,[e].concat(n)))})})}}}function d(e,t){return{stream:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var a=t[e];return new r.k(function(e){return Object(i.observeAndLoad)(function(){return a.call.apply(a,[t].concat(n))},function(t){t.allDataLoaded&&e.next(t.result)}).unsubscribe})},send:function(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=t[e];return new r.j(function(e){Object(r.G)(function(){return e(o.call.apply(o,[t].concat(n)))})})}}}function f(e){return{incomingMessages:new r.k(function(t){function n(e){t.next({data:e.data})}return e.addEventListener("message",n),e.start(),function(){e.removeEventListener("message",n)}}),sendMessage:function(t){e.postMessage(t.data,t.transfer)}}}var p=function(){function e(e){this.muxedStream=e,this.openStreams={}}return e.prototype.streamWithId=function(e){var t=this;return new r.k(function(n){t.ensureSubscribed();var r=t.subjectForStreamId(e).subscribe(n);return function(){r.unsubscribe(),t.removeSubjectIfAbandoned(e)}})},e.prototype.removeSubjectIfAbandoned=function(e){0===this.subjectForStreamId(e).subscriberCount()&&(delete this.openStreams[e],this.unsubscribeIfAbandoned())},e.prototype.subjectForStreamId=function(e){var t=this.openStreams[e];if(t)return t;var n=new r.l;return this.openStreams[e]=n,n},e.prototype.ensureSubscribed=function(){var e=this;this.subscription||(this.subscription=this.muxedStream.subscribe({next:function(t){var n=t.streamId,r=e.openStreams[n];r&&r.next(t.data)},complete:function(){return Object.keys(e.openStreams).forEach(function(t){var n=e.openStreams[t];n&&(n.complete(),delete e.openStreams[t])})}}))},e.prototype.unsubscribeIfAbandoned=function(){0===Object.keys(this.openStreams).length&&this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)},e}();function h(e){return e&&"number"==typeof e.channel&&"string"==typeof e.verb}function m(e){return"string"==typeof e.method&&Array.isArray(e.params)}function _(e){return"CLOSE"===e.verb}function v(e){return"RESPOND"===e.verb}function g(e){return"ERROR"===e.verb}function y(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}var b,w=(b=function(e,t){return(b=Object.setPrototypeOf||y({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function k(e){return new S(e)}var S=function(){function e(e){this.portLink=e,this.channelCounter=1,this.incomingChannels=new p(this.portLink.incomingMessages.map(function(e){return e.data}).filter(h).map(function(e){return{streamId:e.channel,data:e}}))}return e.prototype.stream=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return new r.k(function(r){var i=t.getNextChannelId();t.postMessage({channel:i,verb:"OPEN",method:e,params:n});var o=t.incomingChannels.streamWithId(i).subscribe(function(e){v(e)&&r.next(e.data)});return function(){t.postMessage({channel:i,verb:"CLOSE"}),o.unsubscribe()}})},e.prototype.send=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.getNextChannelId();return this.postMessage({channel:r,verb:"SEND",method:e,params:t}),this.incomingChannels.streamWithId(r).filter(E).takeOne().toPromise().then(function(e){if(!e)throw new C;if(g(e))throw new O;return e.data})},e.prototype.postMessage=function(e){this.portLink.sendMessage({data:e,transfer:M(e)})},e.prototype.getNextChannelId=function(){return this.channelCounter++},e}(),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return w(t,e),t}(r.i),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return w(t,e),t}(r.i);function M(e){if("SEND"===e.verb)return e.params.filter(x)}function x(e){return y(e,MessagePort)}function E(e){return v(e)||g(e)}function T(e,t,n){return e[n.methodName]===t}function j(e,t,n){new D(e,t,n).start()}var D=function(){function e(e,t,n){this.portLink=e,this.adapterConnection=t,this.description=n,this.incomingMessages=e.incomingMessages.map(function(e){return e.data}).filter(h),this.incomingChannels=new p(this.incomingMessages.map(function(e){return{streamId:e.channel,data:e}}))}return e.prototype.start=function(){var e=this;this.incomingMessages.subscribe(function(t){!function(e){return"OPEN"===e.verb&&m(e)}(t)?function(e){return"SEND"===e.verb&&m(e)}(t)&&e.handleSendMessage(t):e.handleOpenStreamMessage(t)})},e.prototype.handleOpenStreamMessage=function(e){var t,n=this,r=L(e);if(T(this.description,a,r)){var i=(t=this.adapterConnection).stream.apply(t,[r.methodName].concat(r.params)),o=e.channel,s=i.subscribe(function(e){n.postMessage({verb:"RESPOND",data:e,channel:o})});this.incomingChannels.streamWithId(o).filter(_).takeOne().toPromise().then(function(){s.unsubscribe()})}},e.prototype.handleSendMessage=function(e){var t,n=this,i=L(e);T(this.description,s,i)&&(t=this.adapterConnection).send.apply(t,[i.methodName].concat(i.params)).then(function(t){return n.postMessage({verb:"RESPOND",data:t,channel:e.channel})},function(t){n.postMessage({verb:"ERROR",channel:e.channel}),Object(r.Q)(t)})},e.prototype.postMessage=function(e){this.portLink.sendMessage({data:e})},e}();function L(e){return{methodName:e.method,params:e.params}}n.d(t,"c",function(){return u}),n.d(t,"f",function(){return l}),n.d(t,"b",function(){return s}),n.d(t,"a",function(){return a}),n.d(t,"d",function(){return d}),n.d(t,"g",function(){return f}),n.d(t,"e",function(){return k}),n.d(t,"h",function(){return j})},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function i(){return t.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function l(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function f(e,t){for(var n in t)d(t,n)&&(e[n]=t[n]);return d(t,"toString")&&(e.toString=t.toString),d(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,n,r){return jt(e,t,n,r,!0).utc()}function h(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function m(e){if(null==e._isValid){var t=h(e),n=r.call(t.parsedDateParts,function(e){return null!=e}),i=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i}return e._isValid}function _(e){var t=p(NaN);return null!=e?f(h(t),e):h(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var v=i.momentProperties=[];function g(e,t){var n,r,i;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=h(t)),s(t._locale)||(e._locale=t._locale),v.length>0)for(n=0;n<v.length;n++)r=v[n],s(i=t[r])||(e[r]=i);return e}var y=!1;function b(e){g(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,i.updateOffset(this),y=!1)}function w(e){return e instanceof b||null!=e&&null!=e._isAMomentObject}function k(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function S(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=k(t)),n}function O(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&S(e[r])!==S(t[r]))&&a++;return a+o}function C(e){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function M(e,t){var n=!0;return f(function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,e),n){for(var r,o=[],a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){for(var s in r+="\n["+a+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[a];o.push(r)}C(e+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)},t)}var x,E={};function T(e,t){null!=i.deprecationHandler&&i.deprecationHandler(e,t),E[e]||(C(t),E[e]=!0)}function j(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function D(e,t){var n,r=f({},e);for(n in t)d(t,n)&&(a(e[n])&&a(t[n])?(r[n]={},f(r[n],e[n]),f(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)d(e,n)&&!d(t,n)&&a(e[n])&&(r[n]=f({},r[n]));return r}function L(e){null!=e&&this.set(e)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,x=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)d(e,t)&&n.push(t);return n};var P={};function I(e,t){var n=e.toLowerCase();P[n]=P[n+"s"]=P[t]=e}function N(e){return"string"==typeof e?P[e]||P[e.toLowerCase()]:void 0}function A(e){var t,n,r={};for(n in e)d(e,n)&&(t=N(n))&&(r[t]=e[n]);return r}var Y={};function R(e,t){Y[e]=t}function F(e,t,n){var r=""+Math.abs(e),i=t-r.length,o=e>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var H=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,W=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,B={},z={};function U(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(z[e]=i),t&&(z[t[0]]=function(){return F(i.apply(this,arguments),t[1],t[2])}),n&&(z[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function q(e,t){return e.isValid()?(t=V(t,e.localeData()),B[t]=B[t]||function(e){var t,n,r,i=e.match(H);for(t=0,n=i.length;t<n;t++)z[i[t]]?i[t]=z[i[t]]:i[t]=(r=i[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,o="";for(r=0;r<n;r++)o+=j(i[r])?i[r].call(t,e):i[r];return o}}(t),B[t](e)):e.localeData().invalidDate()}function V(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(W.lastIndex=0;n>=0&&W.test(e);)e=e.replace(W,r),W.lastIndex=0,n-=1;return e}var $=/\d/,G=/\d\d/,K=/\d{3}/,J=/\d{4}/,Q=/[+-]?\d{6}/,Z=/\d\d?/,X=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,ie=/\d+/,oe=/[+-]?\d+/,ae=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,ce=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ue={};function le(e,t,n){ue[e]=j(t)?t:function(e,r){return e&&n?n:t}}function de(e,t){return d(ue,e)?ue[e](t._strict,t._locale):new RegExp(fe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i})))}function fe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pe={};function he(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),c(t)&&(r=function(e,n){n[t]=S(e)}),n=0;n<e.length;n++)pe[e[n]]=r}function me(e,t){he(e,function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)})}function _e(e,t,n){null!=t&&d(pe,e)&&pe[e](t,n._a,n,e)}var ve=0,ge=1,ye=2,be=3,we=4,ke=5,Se=6,Oe=7,Ce=8;function Me(e){return xe(e)?366:365}function xe(e){return e%4==0&&e%100!=0||e%400==0}U("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),U(0,["YY",2],0,function(){return this.year()%100}),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),I("year","y"),R("year",1),le("Y",oe),le("YY",Z,G),le("YYYY",ne,J),le("YYYYY",re,Q),le("YYYYYY",re,Q),he(["YYYYY","YYYYYY"],ve),he("YYYY",function(e,t){t[ve]=2===e.length?i.parseTwoDigitYear(e):S(e)}),he("YY",function(e,t){t[ve]=i.parseTwoDigitYear(e)}),he("Y",function(e,t){t[ve]=parseInt(e,10)}),i.parseTwoDigitYear=function(e){return S(e)+(S(e)>68?1900:2e3)};var Ee,Te=je("FullYear",!0);function je(e,t){return function(n){return null!=n?(Le(this,e,n),i.updateOffset(this,t),this):De(this,e)}}function De(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Le(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&xe(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Pe(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Pe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?xe(e)?29:28:31-r%7%2}Ee=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},U("M",["MM",2],"Mo",function(){return this.month()+1}),U("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),U("MMMM",0,0,function(e){return this.localeData().months(this,e)}),I("month","M"),R("month",8),le("M",Z),le("MM",Z,G),le("MMM",function(e,t){return t.monthsShortRegex(e)}),le("MMMM",function(e,t){return t.monthsRegex(e)}),he(["M","MM"],function(e,t){t[ge]=S(e)-1}),he(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[ge]=i:h(n).invalidMonth=e});var Ie=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ne="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ae="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ye(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=S(t);else if(!c(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Pe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Re(e){return null!=e?(Ye(this,e),i.updateOffset(this,!0),this):De(this,"Month")}var Fe=ce,He=ce;function We(){function e(e,t){return t.length-e.length}var t,n,r=[],i=[],o=[];for(t=0;t<12;t++)n=p([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(r.sort(e),i.sort(e),o.sort(e),t=0;t<12;t++)r[t]=fe(r[t]),i[t]=fe(i[t]);for(t=0;t<24;t++)o[t]=fe(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Be(e){var t;if(e<100&&e>=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function ze(e,t,n){var r=7+t-n,i=(7+Be(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Ue(e,t,n,r,i){var o,a,s=(7+n-r)%7,c=ze(e,r,i),u=1+7*(t-1)+s+c;return u<=0?a=Me(o=e-1)+u:u>Me(e)?(o=e+1,a=u-Me(e)):(o=e,a=u),{year:o,dayOfYear:a}}function qe(e,t,n){var r,i,o=ze(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?(i=e.year()-1,r=a+Ve(i,t,n)):a>Ve(e.year(),t,n)?(r=a-Ve(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Ve(e,t,n){var r=ze(e,t,n),i=ze(e+1,t,n);return(Me(e)-r+i)/7}function $e(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),I("week","w"),I("isoWeek","W"),R("week",5),R("isoWeek",5),le("w",Z),le("ww",Z,G),le("W",Z),le("WW",Z,G),me(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=S(e)}),U("d",0,"do","day"),U("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),U("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),U("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),I("day","d"),I("weekday","e"),I("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),le("d",Z),le("e",Z),le("E",Z),le("dd",function(e,t){return t.weekdaysMinRegex(e)}),le("ddd",function(e,t){return t.weekdaysShortRegex(e)}),le("dddd",function(e,t){return t.weekdaysRegex(e)}),me(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:h(n).invalidWeekday=e}),me(["d","e","E"],function(e,t,n,r){t[r]=S(e)});var Ge="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ke="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Je="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Qe=ce,Ze=ce,Xe=ce;function et(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],c=[],u=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(r),s.push(i),c.push(o),u.push(r),u.push(i),u.push(o);for(a.sort(e),s.sort(e),c.sort(e),u.sort(e),t=0;t<7;t++)s[t]=fe(s[t]),c[t]=fe(c[t]),u[t]=fe(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function tt(){return this.hours()%12||12}function nt(e,t){U(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function rt(e,t){return t._meridiemParse}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,tt),U("k",["kk",2],0,function(){return this.hours()||24}),U("hmm",0,0,function(){return""+tt.apply(this)+F(this.minutes(),2)}),U("hmmss",0,0,function(){return""+tt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),U("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),U("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),nt("a",!0),nt("A",!1),I("hour","h"),R("hour",13),le("a",rt),le("A",rt),le("H",Z),le("h",Z),le("k",Z),le("HH",Z,G),le("hh",Z,G),le("kk",Z,G),le("hmm",X),le("hmmss",ee),le("Hmm",X),le("Hmmss",ee),he(["H","HH"],be),he(["k","kk"],function(e,t,n){var r=S(e);t[be]=24===r?0:r}),he(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),he(["h","hh"],function(e,t,n){t[be]=S(e),h(n).bigHour=!0}),he("hmm",function(e,t,n){var r=e.length-2;t[be]=S(e.substr(0,r)),t[we]=S(e.substr(r)),h(n).bigHour=!0}),he("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[be]=S(e.substr(0,r)),t[we]=S(e.substr(r,2)),t[ke]=S(e.substr(i)),h(n).bigHour=!0}),he("Hmm",function(e,t,n){var r=e.length-2;t[be]=S(e.substr(0,r)),t[we]=S(e.substr(r))}),he("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[be]=S(e.substr(0,r)),t[we]=S(e.substr(r,2)),t[ke]=S(e.substr(i))});var it,ot=je("Hours",!0),at={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ne,monthsShort:Ae,week:{dow:0,doy:6},weekdays:Ge,weekdaysMin:Je,weekdaysShort:Ke,meridiemParse:/[ap]\.?m?\.?/i},st={},ct={};function ut(e){return e?e.toLowerCase().replace("_","-"):e}function lt(t){var r=null;if(!st[t]&&void 0!==e&&e&&e.exports)try{r=it._abbr,n(492)("./"+t),dt(r)}catch(e){}return st[t]}function dt(e,t){var n;return e&&((n=s(t)?pt(e):ft(e,t))?it=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),it._abbr}function ft(e,t){if(null!==t){var n,r=at;if(t.abbr=e,null!=st[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=st[e]._config;else if(null!=t.parentLocale)if(null!=st[t.parentLocale])r=st[t.parentLocale]._config;else{if(null==(n=lt(t.parentLocale)))return ct[t.parentLocale]||(ct[t.parentLocale]=[]),ct[t.parentLocale].push({name:e,config:t}),null;r=n._config}return st[e]=new L(D(r,t)),ct[e]&&ct[e].forEach(function(e){ft(e.name,e.config)}),dt(e),st[e]}return delete st[e],null}function pt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return it;if(!o(e)){if(t=lt(e))return t;e=[e]}return function(e){for(var t,n,r,i,o=0;o<e.length;){for(i=ut(e[o]).split("-"),t=i.length,n=(n=ut(e[o+1]))?n.split("-"):null;t>0;){if(r=lt(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&O(i,n,!0)>=t-1)break;t--}o++}return it}(e)}function ht(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[ge]<0||n[ge]>11?ge:n[ye]<1||n[ye]>Pe(n[ve],n[ge])?ye:n[be]<0||n[be]>24||24===n[be]&&(0!==n[we]||0!==n[ke]||0!==n[Se])?be:n[we]<0||n[we]>59?we:n[ke]<0||n[ke]>59?ke:n[Se]<0||n[Se]>999?Se:-1,h(e)._overflowDayOfYear&&(t<ve||t>ye)&&(t=ye),h(e)._overflowWeeks&&-1===t&&(t=Oe),h(e)._overflowWeekday&&-1===t&&(t=Ce),h(e).overflow=t),e}function mt(e,t,n){return null!=e?e:null!=t?t:n}function _t(e){var t,n,r,o,a,s=[];if(!e._d){for(r=function(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[ye]&&null==e._a[ge]&&function(e){var t,n,r,i,o,a,s,c;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)o=1,a=4,n=mt(t.GG,e._a[ve],qe(Dt(),1,4).year),r=mt(t.W,1),((i=mt(t.E,1))<1||i>7)&&(c=!0);else{o=e._locale._week.dow,a=e._locale._week.doy;var u=qe(Dt(),o,a);n=mt(t.gg,e._a[ve],u.year),r=mt(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(c=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(c=!0)):i=o}r<1||r>Ve(n,o,a)?h(e)._overflowWeeks=!0:null!=c?h(e)._overflowWeekday=!0:(s=Ue(n,r,i,o,a),e._a[ve]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=mt(e._a[ve],r[ve]),(e._dayOfYear>Me(a)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=Be(a,0,e._dayOfYear),e._a[ge]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[be]&&0===e._a[we]&&0===e._a[ke]&&0===e._a[Se]&&(e._nextDay=!0,e._a[be]=0),e._d=(e._useUTC?Be:function(e,t,n,r,i,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,o,a),s}).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[be]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(h(e).weekdayMismatch=!0)}}var vt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yt=/Z|[+-]\d\d(?::?\d\d)?/,bt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],wt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],kt=/^\/?Date\((\-?\d+)/i;function St(e){var t,n,r,i,o,a,s=e._i,c=vt.exec(s)||gt.exec(s);if(c){for(h(e).iso=!0,t=0,n=bt.length;t<n;t++)if(bt[t][1].exec(c[1])){i=bt[t][0],r=!1!==bt[t][2];break}if(null==i)return void(e._isValid=!1);if(c[3]){for(t=0,n=wt.length;t<n;t++)if(wt[t][1].exec(c[3])){o=(c[2]||" ")+wt[t][0];break}if(null==o)return void(e._isValid=!1)}if(!r&&null!=o)return void(e._isValid=!1);if(c[4]){if(!yt.exec(c[4]))return void(e._isValid=!1);a="Z"}e._f=i+(o||"")+(a||""),Et(e)}else e._isValid=!1}var Ot=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Ct(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var Mt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function xt(e){var t,n,r,i,o,a,s,c=Ot.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(c){var u=(t=c[4],n=c[3],r=c[2],i=c[5],o=c[6],a=c[7],s=[Ct(t),Ae.indexOf(n),parseInt(r,10),parseInt(i,10),parseInt(o,10)],a&&s.push(parseInt(a,10)),s);if(!function(e,t,n){if(e){var r=Ke.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(r!==i)return h(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}(c[1],u,e))return;e._a=u,e._tzm=function(e,t,n){if(e)return Mt[e];if(t)return 0;var r=parseInt(n,10),i=r%100,o=(r-i)/100;return 60*o+i}(c[8],c[9],c[10]),e._d=Be.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function Et(e){if(e._f!==i.ISO_8601)if(e._f!==i.RFC_2822){e._a=[],h(e).empty=!0;var t,n,r,o,a,s=""+e._i,c=s.length,u=0;for(r=V(e._f,e._locale).match(H)||[],t=0;t<r.length;t++)o=r[t],(n=(s.match(de(o,e))||[])[0])&&((a=s.substr(0,s.indexOf(n))).length>0&&h(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),u+=n.length),z[o]?(n?h(e).empty=!1:h(e).unusedTokens.push(o),_e(o,n,e)):e._strict&&!n&&h(e).unusedTokens.push(o);h(e).charsLeftOver=c-u,s.length>0&&h(e).unusedInput.push(s),e._a[be]<=12&&!0===h(e).bigHour&&e._a[be]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[be]=(l=e._locale,d=e._a[be],null==(f=e._meridiem)?d:null!=l.meridiemHour?l.meridiemHour(d,f):null!=l.isPM?((p=l.isPM(f))&&d<12&&(d+=12),p||12!==d||(d=0),d):d),_t(e),ht(e)}else xt(e);else St(e);var l,d,f,p}function Tt(e){var t=e._i,n=e._f;return e._locale=e._locale||pt(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new b(ht(t)):(u(t)?e._d=t:o(n)?function(e){var t,n,r,i,o;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<e._f.length;i++)o=0,t=g({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Et(t),m(t)&&(o+=h(t).charsLeftOver,o+=10*h(t).unusedTokens.length,h(t).score=o,(null==r||o<r)&&(r=o,n=t));f(e,n||t)}(e):n?Et(e):function(e){var t=e._i;s(t)?e._d=new Date(i.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=kt.exec(e._i);null===t?(St(e),!1===e._isValid&&(delete e._isValid,xt(e),!1===e._isValid&&(delete e._isValid,i.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):o(t)?(e._a=l(t.slice(0),function(e){return parseInt(e,10)}),_t(e)):a(t)?function(e){if(!e._d){var t=A(e._i);e._a=l([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),_t(e)}}(e):c(t)?e._d=new Date(t):i.createFromInputFallback(e)}(e),m(e)||(e._d=null),e))}function jt(e,t,n,r,i){var s,c={};return!0!==n&&!1!==n||(r=n,n=void 0),(a(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||o(e)&&0===e.length)&&(e=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=i,c._l=n,c._i=e,c._f=t,c._strict=r,(s=new b(ht(Tt(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Dt(e,t,n,r){return jt(e,t,n,r,!1)}i.createFromInputFallback=M("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),i.ISO_8601=function(){},i.RFC_2822=function(){};var Lt=M("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Dt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()}),Pt=M("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Dt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()});function It(e,t){var n,r;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Dt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Nt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function At(e){var t=A(e),n=t.year||0,r=t.quarter||0,i=t.month||0,o=t.week||t.isoWeek||0,a=t.day||0,s=t.hour||0,c=t.minute||0,u=t.second||0,l=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Ee.call(Nt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<Nt.length;++r)if(e[Nt[r]]){if(n)return!1;parseFloat(e[Nt[r]])!==S(e[Nt[r]])&&(n=!0)}return!0}(t),this._milliseconds=+l+1e3*u+6e4*c+1e3*s*60*60,this._days=+a+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=pt(),this._bubble()}function Yt(e){return e instanceof At}function Rt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,t){U(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+F(~~(e/60),2)+t+F(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),le("Z",se),le("ZZ",se),he(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Wt(se,e)});var Ht=/([\+\-]|\d\d)/gi;function Wt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=n[n.length-1]||[],i=(r+"").match(Ht)||["-",0,0],o=60*i[1]+S(i[2]);return 0===o?0:"+"===i[0]?o:-o}function Bt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(w(e)||u(e)?e.valueOf():Dt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):Dt(e).local()}function zt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Ut(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var qt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Vt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function $t(e,t){var n,r,i,o,a,s,u=e,l=null;return Yt(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:c(e)?(u={},t?u[t]=e:u.milliseconds=e):(l=qt.exec(e))?(n="-"===l[1]?-1:1,u={y:0,d:S(l[ye])*n,h:S(l[be])*n,m:S(l[we])*n,s:S(l[ke])*n,ms:S(Rt(1e3*l[Se]))*n}):(l=Vt.exec(e))?(n="-"===l[1]?-1:1,u={y:Gt(l[2],n),M:Gt(l[3],n),w:Gt(l[4],n),d:Gt(l[5],n),h:Gt(l[6],n),m:Gt(l[7],n),s:Gt(l[8],n)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(o=Dt(u.from),a=Dt(u.to),i=o.isValid()&&a.isValid()?(a=Bt(a,o),o.isBefore(a)?s=Kt(o,a):((s=Kt(a,o)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(u={}).ms=i.milliseconds,u.M=i.months),r=new At(u),Yt(e)&&d(e,"_locale")&&(r._locale=e._locale),r}function Gt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Kt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Jt(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(T(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Qt(this,$t(n="string"==typeof n?+n:n,r),e),this}}function Qt(e,t,n,r){var o=t._milliseconds,a=Rt(t._days),s=Rt(t._months);e.isValid()&&(r=null==r||r,s&&Ye(e,De(e,"Month")+s*n),a&&Le(e,"Date",De(e,"Date")+a*n),o&&e._d.setTime(e._d.valueOf()+o*n),r&&i.updateOffset(e,a||s))}$t.fn=At.prototype,$t.invalid=function(){return $t(NaN)};var Zt=Jt(1,"add"),Xt=Jt(-1,"subtract");function en(e,t){var n,r,i=12*(t.year()-e.year())+(t.month()-e.month()),o=e.clone().add(i,"months");return t-o<0?(n=e.clone().add(i-1,"months"),r=(t-o)/(o-n)):(n=e.clone().add(i+1,"months"),r=(t-o)/(n-o)),-(i+r)||0}function tn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=pt(e))&&(this._locale=t),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var nn=M("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function rn(){return this._locale}var on=1e3,an=60*on,sn=60*an,cn=3506328*sn;function un(e,t){return(e%t+t)%t}function ln(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-cn:new Date(e,t,n).valueOf()}function dn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-cn:Date.UTC(e,t,n)}function fn(e,t){U(0,[e,e.length],0,t)}function pn(e,t,n,r,i){var o;return null==e?qe(this,r,i).year:(o=Ve(e,r,i),t>o&&(t=o),function(e,t,n,r,i){var o=Ue(e,t,n,r,i),a=Be(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,r,i))}U(0,["gg",2],0,function(){return this.weekYear()%100}),U(0,["GG",2],0,function(){return this.isoWeekYear()%100}),fn("gggg","weekYear"),fn("ggggg","weekYear"),fn("GGGG","isoWeekYear"),fn("GGGGG","isoWeekYear"),I("weekYear","gg"),I("isoWeekYear","GG"),R("weekYear",1),R("isoWeekYear",1),le("G",oe),le("g",oe),le("GG",Z,G),le("gg",Z,G),le("GGGG",ne,J),le("gggg",ne,J),le("GGGGG",re,Q),le("ggggg",re,Q),me(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=S(e)}),me(["gg","GG"],function(e,t,n,r){t[r]=i.parseTwoDigitYear(e)}),U("Q",0,"Qo","quarter"),I("quarter","Q"),R("quarter",7),le("Q",$),he("Q",function(e,t){t[ge]=3*(S(e)-1)}),U("D",["DD",2],"Do","date"),I("date","D"),R("date",9),le("D",Z),le("DD",Z,G),le("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),he(["D","DD"],ye),he("Do",function(e,t){t[ye]=S(e.match(Z)[0])});var hn=je("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),I("dayOfYear","DDD"),R("dayOfYear",4),le("DDD",te),le("DDDD",K),he(["DDD","DDDD"],function(e,t,n){n._dayOfYear=S(e)}),U("m",["mm",2],0,"minute"),I("minute","m"),R("minute",14),le("m",Z),le("mm",Z,G),he(["m","mm"],we);var mn=je("Minutes",!1);U("s",["ss",2],0,"second"),I("second","s"),R("second",15),le("s",Z),le("ss",Z,G),he(["s","ss"],ke);var _n,vn=je("Seconds",!1);for(U("S",0,0,function(){return~~(this.millisecond()/100)}),U(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,function(){return 10*this.millisecond()}),U(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),U(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),U(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),U(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),U(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),I("millisecond","ms"),R("millisecond",16),le("S",te,$),le("SS",te,G),le("SSS",te,K),_n="SSSS";_n.length<=9;_n+="S")le(_n,ie);function gn(e,t){t[Se]=S(1e3*("0."+e))}for(_n="S";_n.length<=9;_n+="S")he(_n,gn);var yn=je("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var bn=b.prototype;function wn(e){return e}bn.add=Zt,bn.calendar=function(e,t){var n=e||Dt(),r=Bt(n,this).startOf("day"),o=i.calendarFormat(this,r)||"sameElse",a=t&&(j(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,Dt(n)))},bn.clone=function(){return new b(this)},bn.diff=function(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=Bt(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=N(t)){case"year":o=en(this,r)/12;break;case"month":o=en(this,r);break;case"quarter":o=en(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:k(o)},bn.endOf=function(e){var t;if(void 0===(e=N(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?dn:ln;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=sn-un(t+(this._isUTC?0:this.utcOffset()*an),sn)-1;break;case"minute":t=this._d.valueOf(),t+=an-un(t,an)-1;break;case"second":t=this._d.valueOf(),t+=on-un(t,on)-1}return this._d.setTime(t),i.updateOffset(this,!0),this},bn.format=function(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=q(this,e);return this.localeData().postformat(t)},bn.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Dt(e).isValid())?$t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},bn.fromNow=function(e){return this.from(Dt(),e)},bn.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Dt(e).isValid())?$t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},bn.toNow=function(e){return this.to(Dt(),e)},bn.get=function(e){return j(this[e=N(e)])?this[e]():this},bn.invalidAt=function(){return h(this).overflow},bn.isAfter=function(e,t){var n=w(e)?e:Dt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},bn.isBefore=function(e,t){var n=w(e)?e:Dt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},bn.isBetween=function(e,t,n,r){var i=w(e)?e:Dt(e),o=w(t)?t:Dt(t);return!!(this.isValid()&&i.isValid()&&o.isValid())&&(("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(o,n):!this.isAfter(o,n)))},bn.isSame=function(e,t){var n,r=w(e)?e:Dt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},bn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},bn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},bn.isValid=function(){return m(this)},bn.lang=nn,bn.locale=tn,bn.localeData=rn,bn.max=Pt,bn.min=Lt,bn.parsingFlags=function(){return f({},h(this))},bn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:Y[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=A(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(j(this[e=N(e)]))return this[e](t);return this},bn.startOf=function(e){var t;if(void 0===(e=N(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?dn:ln;switch(e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=un(t+(this._isUTC?0:this.utcOffset()*an),sn);break;case"minute":t=this._d.valueOf(),t-=un(t,an);break;case"second":t=this._d.valueOf(),t-=un(t,on)}return this._d.setTime(t),i.updateOffset(this,!0),this},bn.subtract=Xt,bn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},bn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},bn.toDate=function(){return new Date(this.valueOf())},bn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?q(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):j(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",q(n,"Z")):q(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},bn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},bn.toJSON=function(){return this.isValid()?this.toISOString():null},bn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},bn.unix=function(){return Math.floor(this.valueOf()/1e3)},bn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},bn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},bn.year=Te,bn.isLeapYear=function(){return xe(this.year())},bn.weekYear=function(e){return pn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},bn.isoWeekYear=function(e){return pn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},bn.quarter=bn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},bn.month=Re,bn.daysInMonth=function(){return Pe(this.year(),this.month())},bn.week=bn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},bn.isoWeek=bn.isoWeeks=function(e){var t=qe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},bn.weeksInYear=function(){var e=this.localeData()._week;return Ve(this.year(),e.dow,e.doy)},bn.isoWeeksInYear=function(){return Ve(this.year(),1,4)},bn.date=hn,bn.day=bn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},bn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},bn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},bn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},bn.hour=bn.hours=ot,bn.minute=bn.minutes=mn,bn.second=bn.seconds=vn,bn.millisecond=bn.milliseconds=yn,bn.utcOffset=function(e,t,n){var r,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Wt(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=zt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==e&&(!t||this._changeInProgress?Qt(this,$t(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:zt(this)},bn.utc=function(e){return this.utcOffset(0,e)},bn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(zt(this),"m")),this},bn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Wt(ae,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},bn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Dt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},bn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},bn.isLocal=function(){return!!this.isValid()&&!this._isUTC},bn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},bn.isUtc=Ut,bn.isUTC=Ut,bn.zoneAbbr=function(){return this._isUTC?"UTC":""},bn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},bn.dates=M("dates accessor is deprecated. Use date instead.",hn),bn.months=M("months accessor is deprecated. Use month instead",Re),bn.years=M("years accessor is deprecated. Use year instead",Te),bn.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),bn.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),(e=Tt(e))._a){var t=e._isUTC?p(e._a):Dt(e._a);this._isDSTShifted=this.isValid()&&O(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var kn=L.prototype;function Sn(e,t,n,r){var i=pt(),o=p().set(r,t);return i[n](o,e)}function On(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return Sn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Sn(e,r,n,"month");return i}function Cn(e,t,n,r){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var i,o=pt(),a=e?o._week.dow:0;if(null!=n)return Sn(t,(n+a)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=Sn(t,(i+a)%7,r,"day");return s}kn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return j(r)?r.call(t,n):r},kn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},kn.invalidDate=function(){return this._invalidDate},kn.ordinal=function(e){return this._ordinal.replace("%d",e)},kn.preparse=wn,kn.postformat=wn,kn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return j(i)?i(e,t,n,r):i.replace(/%d/i,e)},kn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return j(n)?n(t):n.replace(/%s/i,t)},kn.set=function(e){var t,n;for(n in e)j(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},kn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ie).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},kn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ie.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},kn.monthsParse=function(e,t,n){var r,i,o;if(this._monthsParseExact)return function(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=p([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Ee.call(this._shortMonthsParse,a))?i:null:-1!==(i=Ee.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Ee.call(this._shortMonthsParse,a))?i:-1!==(i=Ee.call(this._longMonthsParse,a))?i:null:-1!==(i=Ee.call(this._longMonthsParse,a))?i:-1!==(i=Ee.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=p([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},kn.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||We.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=He),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},kn.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||We.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Fe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},kn.week=function(e){return qe(e,this._week.dow,this._week.doy).week},kn.firstDayOfYear=function(){return this._week.doy},kn.firstDayOfWeek=function(){return this._week.dow},kn.weekdays=function(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?$e(n,this._week.dow):e?n[e.day()]:n},kn.weekdaysMin=function(e){return!0===e?$e(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},kn.weekdaysShort=function(e){return!0===e?$e(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},kn.weekdaysParse=function(e,t,n){var r,i,o;if(this._weekdaysParseExact)return function(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ee.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ee.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ee.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Ee.call(this._weekdaysParse,a))?i:-1!==(i=Ee.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ee.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ee.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ee.call(this._weekdaysParse,a))?i:-1!==(i=Ee.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ee.call(this._minWeekdaysParse,a))?i:-1!==(i=Ee.call(this._weekdaysParse,a))?i:-1!==(i=Ee.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=p([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},kn.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Qe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},kn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ze),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},kn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Xe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},kn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},kn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},dt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===S(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),i.lang=M("moment.lang is deprecated. Use moment.locale instead.",dt),i.langData=M("moment.langData is deprecated. Use moment.localeData instead.",pt);var Mn=Math.abs;function xn(e,t,n,r){var i=$t(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function En(e){return e<0?Math.floor(e):Math.ceil(e)}function Tn(e){return 4800*e/146097}function jn(e){return 146097*e/4800}function Dn(e){return function(){return this.as(e)}}var Ln=Dn("ms"),Pn=Dn("s"),In=Dn("m"),Nn=Dn("h"),An=Dn("d"),Yn=Dn("w"),Rn=Dn("M"),Fn=Dn("Q"),Hn=Dn("y");function Wn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Bn=Wn("milliseconds"),zn=Wn("seconds"),Un=Wn("minutes"),qn=Wn("hours"),Vn=Wn("days"),$n=Wn("months"),Gn=Wn("years"),Kn=Math.round,Jn={ss:44,s:45,m:45,h:22,d:26,M:11},Qn=Math.abs;function Zn(e){return(e>0)-(e<0)||+e}function Xn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Qn(this._milliseconds)/1e3,r=Qn(this._days),i=Qn(this._months);e=k(n/60),t=k(e/60),n%=60,e%=60;var o=k(i/12),a=i%=12,s=r,c=t,u=e,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var f=d<0?"-":"",p=Zn(this._months)!==Zn(d)?"-":"",h=Zn(this._days)!==Zn(d)?"-":"",m=Zn(this._milliseconds)!==Zn(d)?"-":"";return f+"P"+(o?p+o+"Y":"")+(a?p+a+"M":"")+(s?h+s+"D":"")+(c||u||l?"T":"")+(c?m+c+"H":"")+(u?m+u+"M":"")+(l?m+l+"S":"")}var er=At.prototype;return er.isValid=function(){return this._isValid},er.abs=function(){var e=this._data;return this._milliseconds=Mn(this._milliseconds),this._days=Mn(this._days),this._months=Mn(this._months),e.milliseconds=Mn(e.milliseconds),e.seconds=Mn(e.seconds),e.minutes=Mn(e.minutes),e.hours=Mn(e.hours),e.months=Mn(e.months),e.years=Mn(e.years),this},er.add=function(e,t){return xn(this,e,t,1)},er.subtract=function(e,t){return xn(this,e,t,-1)},er.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=N(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Tn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(jn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},er.asMilliseconds=Ln,er.asSeconds=Pn,er.asMinutes=In,er.asHours=Nn,er.asDays=An,er.asWeeks=Yn,er.asMonths=Rn,er.asQuarters=Fn,er.asYears=Hn,er.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*S(this._months/12):NaN},er._bubble=function(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,c=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*En(jn(s)+a),a=0,s=0),c.milliseconds=o%1e3,e=k(o/1e3),c.seconds=e%60,t=k(e/60),c.minutes=t%60,n=k(t/60),c.hours=n%24,a+=k(n/24),i=k(Tn(a)),s+=i,a-=En(jn(i)),r=k(s/12),s%=12,c.days=a,c.months=s,c.years=r,this},er.clone=function(){return $t(this)},er.get=function(e){return e=N(e),this.isValid()?this[e+"s"]():NaN},er.milliseconds=Bn,er.seconds=zn,er.minutes=Un,er.hours=qn,er.days=Vn,er.weeks=function(){return k(this.days()/7)},er.months=$n,er.years=Gn,er.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=$t(e).abs(),i=Kn(r.as("s")),o=Kn(r.as("m")),a=Kn(r.as("h")),s=Kn(r.as("d")),c=Kn(r.as("M")),u=Kn(r.as("y")),l=i<=Jn.ss&&["s",i]||i<Jn.s&&["ss",i]||o<=1&&["m"]||o<Jn.m&&["mm",o]||a<=1&&["h"]||a<Jn.h&&["hh",a]||s<=1&&["d"]||s<Jn.d&&["dd",s]||c<=1&&["M"]||c<Jn.M&&["MM",c]||u<=1&&["y"]||["yy",u];return l[2]=t,l[3]=+e>0,l[4]=n,function(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}.apply(null,l)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},er.toISOString=Xn,er.toString=Xn,er.toJSON=Xn,er.locale=tn,er.localeData=rn,er.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Xn),er.lang=nn,U("X",0,0,"unix"),U("x",0,0,"valueOf"),le("x",oe),le("X",/[+-]?\d+(\.\d{1,3})?/),he("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),he("x",function(e,t,n){n._d=new Date(S(e))}),i.version="2.24.0",t=Dt,i.fn=bn,i.min=function(){return It("isBefore",[].slice.call(arguments,0))},i.max=function(){return It("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=p,i.unix=function(e){return Dt(1e3*e)},i.months=function(e,t){return On(e,t,"months")},i.isDate=u,i.locale=dt,i.invalid=_,i.duration=$t,i.isMoment=w,i.weekdays=function(e,t,n){return Cn(e,t,n,"weekdays")},i.parseZone=function(){return Dt.apply(null,arguments).parseZone()},i.localeData=pt,i.isDuration=Yt,i.monthsShort=function(e,t){return On(e,t,"monthsShort")},i.weekdaysMin=function(e,t,n){return Cn(e,t,n,"weekdaysMin")},i.defineLocale=ft,i.updateLocale=function(e,t){if(null!=t){var n,r,i=at;null!=(r=lt(e))&&(i=r._config),t=D(i,t),(n=new L(t)).parentLocale=st[e],st[e]=n,dt(e)}else null!=st[e]&&(null!=st[e].parentLocale?st[e]=st[e].parentLocale:null!=st[e]&&delete st[e]);return st[e]},i.locales=function(){return x(st)},i.weekdaysShort=function(e,t,n){return Cn(e,t,n,"weekdaysShort")},i.normalizeUnits=N,i.relativeTimeRounding=function(e){return void 0===e?Kn:"function"==typeof e&&(Kn=e,!0)},i.relativeTimeThreshold=function(e,t){return void 0!==Jn[e]&&(void 0===t?Jn[e]:(Jn[e]=t,"s"===e&&(Jn.ss=t-1),!0))},i.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=bn,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}).call(this,n(85)(e))},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"ERROR_CODE_CLIENT_VERIFICATION_REQUIRED",function(){return T}),n.d(r,"perform",function(){return j}),n.d(r,"reset",function(){return D}),n.d(r,"currentState",function(){return P});var i,o="&scrivito.authFailedCount=";function a(){i=0}var s={init:function(e){a();var t=e.location,n=t.hash,r=n.indexOf(o);if(!(r<0)){var s=n.substr(r+o.length,3),c=n.substring(0,r);"#"===c&&(c="");var u=t.href.toString().replace(n,c);i=parseInt(s,10)||0,e.history.replaceState({},"",u)}},augmentedRedirectUrl:function(e){var t=e.toString();return e.hash||(t+="#"),""+t+o+(i+1)},reset:a,currentFailureCount:function(){return i}},c=n(0),u=n(2),l=n(13);var d,f,p=(d=function(e,t){var n,r;return(d=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.httpCode=n,i.backendCode=r,i}return p(t,e),t.for=function(e,n,r){return"binary.unprocessable.image.transform.source.too_large"===r?new y(e,n,r):r&&-1!==r.indexOf("binary.unprocessable.image.transform.source.")?new b(e,n,r):new t(e,n,r)},t}(c.i),m=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return p(t,e),t}(h),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t}(c.i),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t}(c.i),g=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r)||this;return o.details=i||{},o}return p(t,e),t}(h),y=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return p(t,e),t}(h),b=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return p(t,e),t}(h),w=!1,k=0;function S(){return k>0}function O(e,t,n){var r=n.params,i=n.authorization,o=n.forceVerification;return w?c.j.resolve(new XMLHttpRequest):(k+=1,new c.j(function(n,a){var s=function(e,t,n,r){var i=new XMLHttpRequest;function o(e){!function(e,t){k-=1,t(e)}(new v(e),r)}return i.open("POST"===e?"POST":"PUT",t),i.timeout=15e3,i.withCredentials=!0,i.onload=function(){return function(e,t,n){k-=1;var r=e.status;if(!r||!Object(u.isNumber)(r)){var i="Unexpected response status: "+r+"; body: "+(0===r?e.statusText:e.responseText);n(new v(i))}t(e)}(i,n,r)},i.onerror=function(){return o("XMLHttpRequest Error")},i.ontimeout=function(){return o("XMLHttpRequest Timeout")},i.onabort=function(){return o("XMLHttpRequest Aborted")},i}(e,t,n,a);i&&s.setRequestHeader("Authorization",i),s.setRequestHeader("Scrivito-Client","jssdk/"+Object(c.x)()),o&&s.setRequestHeader("Scrivito-Force-Verification","true"),s.setRequestHeader("Content-type","application/json; charset=utf-8"),s.send(JSON.stringify(r))}))}function C(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}f={},window._scrivitoRegisterVerificator=function(e,t){f[e].resolve(t)};var M,x,E=function(){var e=function(t,n){return(e=Object.setPrototypeOf||C({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T="client_verification_required";!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}E(t,e)}(g);function j(e){return e(L()).catch(function t(n){if(!function(e){return C(e,g)&&e.backendCode===T}(n))throw n;return function(e){if(!M){var t=e.verificator,n=e.data,r=(i=t.id,o=t.url,a=f[i],a||(a=new c.e,f[i]=a,Object(c.E)(o)),a.promise).then(function(e){return new c.j(function(t){e(n,function(e){t((x=e).authorization)})})});M={challenge:{verificator:t,data:n},promise:Object(c.J)(r,function(){M=void 0})}}var i,o,a;return M.promise}(n.details).then(e).catch(t)})}function D(){M=void 0,x=void 0}function L(){if(x){if(!(x.expiresAfter<new Date))return x.authorization;x=void 0}}function P(){var e=L();if(e)return"Authorization: "+e;if(M){var t=M.challenge;return"Pending computation: "+t.verificator.id+" with "+t.data}return null}var I,N,A=n(14);function Y(e){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var R=function(){function e(){this.initDeferred=new c.e,this.authHeaderValueProvider=r}return e.prototype.init=function(e,t,n){t&&(this.tenant=t,this.endpoint=e,this.url=l(e+"/tenants/"+t+"/perform").scheme("https").toString(),this.initDeferred.resolve(void 0)),n&&(this.authHeaderValueProvider=n)},e.prototype.get=function(e,t){return this.perform("GET",e,t)},e.prototype.put=function(e,t){return this.perform("PUT",e,t)},e.prototype.post=function(e,t){return this.perform("POST",e,t)},e.prototype.delete=function(e,t){return this.perform("DELETE",e,t)},e.prototype.requestBuiltInUserSession=function(e){var t=this;return this.ensureInitialized().then(function(){return t.ajax("PUT","sessions/"+e)}).then(function(e){return s.reset(),e})},e.prototype.requestVisitorSession=function(e,t){var n=this;return this.ensureInitialized().then(function(){return n.ajax("PUT","sessions/"+e,void 0,"id_token "+t)})},e.prototype.enableForceVerification=function(){this.forceVerification=!0},e.prototype.currentPublicAuthorizationState=function(){return this.authHeaderValueProvider?this.authHeaderValueProvider.currentState?"[API] "+this.authHeaderValueProvider.currentState():"[API]: authorization provider without currentState()":"[API]: no authorization provider"},e.prototype.ensureInitialized=function(){return this.initDeferred.promise},e.prototype.perform=function(e,t,n){var r=this;return this.ensureInitialized().then(function(){return r.send(e,t,n).then(function(e){return function(e){return!!e&&!!e.task&&1===Object(u.size)(e)}(e)?r.handleTask(e.task):e})})},e.prototype.send=function(e,t,n){var r=this;return this.authHeaderValueProvider.perform(function(i){return r.ajax(e,t,n,i)})},e.prototype.ajax=function(e,t,n,r){var i=this.url,o=this.forceVerification,a={params:{path:t,verb:e,params:n||{}},authorization:r,forceVerification:o};function s(){return function e(t,n){void 0===n&&(n=0);if(N)return new c.j(function(e){return e(t())});return t().then(function(r){if(429!==r.status)return r;if(I&&n>19)throw new Error("Maximum number of rate limit retries reached");var i=Number(r.getResponseHeader("Retry-After"))||0,o=Math.max(1e3*i,F(n));return Object(c.T)(o).then(function(){return e(t,n+1)})})}(function(){return O(e,i,a)}).then(H)}return"POST"===e?s():function e(t,n){void 0===n&&(n=0);if(N)return new c.j(function(e){return e(t())});return t().catch(function(r){if(o=r,null!=(a=v)&&"undefined"!=typeof Symbol&&a[Symbol.hasInstance]?a[Symbol.hasInstance](o):o instanceof a){if(I&&n>5)throw r;var i=F(n);return Object(c.T)(i).then(function(){return e(t,n+1)})}var o,a;throw r})}(s)},e.prototype.handleTask=function(e){var t=this;switch(e.status){case"success":return e.result;case"error":throw h.for(e.message,412,e.code);case"open":return Object(c.S)(2).then(function(){return t.get("tasks/"+e.id).then(function(e){return t.handleTask(e)})});default:throw new v("Invalid task response (unknown status)")}},e}();function F(e){return 500*Math.pow(2,Math.min(e,16))}function H(e){var t,n=e.status;try{t=JSON.parse(e.responseText)}catch(t){throw new v(e.responseText)}if(n>=200&&n<300)return t;if("auth_missing"===t.code){var r=t.details;if(r&&W(r)){var i=r.visit;if("string"==typeof i){var o=function(e){var t=s.augmentedRedirectUrl(Object(A.f)());return e.replace("retry=RETRY","retry="+s.currentFailureCount()).replace(/\$RETURN_TO/,encodeURIComponent(t))}(i);throw Object(A.i)(o),new _("Insufficient authorization - please visit "+o)}}}throw function(e,t,n){if(401===e){var r=z(t);return new g(r.error,e,r.code,r.details)}if(403===e){var r=z(t),i=r.code;if(!i||!B(i))throw new v("Authentication failure response no string value for code");return new m(r.error,e,i)}if(t.error&&"4"===e.toString()[0]){var r=z(t);return h.for(r.error,e,r.code)}if(500===e)return B(t.error)?new v(t.error):new v(n);return new v(n)}(n,t,e.responseText)}function W(e){return"object"===Y(e)&&!Array.isArray(e)}function B(e){return"string"==typeof e}function z(e){var t=e.error;if("string"!=typeof t)throw new v("Malformed error response (key error is not a string)");var n=e.code;if(void 0!==n&&!B(n))throw new v("Malformed error response (optional key code is not a string)");var r=e.details;if(void 0!==r&&!W(r))throw new v("Malformed error response (optional key details is not an object");return{code:n,error:t,details:r}}var U=new R;var q=new c.b(function(e){return U.get("blobs/mget",{blobs:e}).then(function(t){return t.results.map(function(t,n){return function(e,t){var n=t.public_access.get;if(!n.url)throw new c.g('Missing public access URL for binary "'+e+'"');var r={public_access:{get:{url:n.url}}},i=t.private_access;if(i){var o=i.get;o.url&&(r.private_access={get:{url:o.url}})}return r}(e[n].id,t)})})});var V={};function $(e,t){return function(e){var t=V[e];t||(t=function(e){return new c.b(function(t){return U.get("workspaces/"+e+"/objs/mget",{ids:t,include_deleted:!0}).then(function(e){return e.results})},{batchSize:17})}(e),V[e]=t);return t}(e).retrieve(t).then(function(e){return e||{_deleted:t}})}var G=function(){return(G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function K(e,t){var n=G({consistent:!0},t);return U.get("workspaces/"+e+"/objs/search",n).then(function(e){var t=function(e){var t={results:e.results,total:e.total},n=e.continuation;void 0!==n&&(t.continuation=n);var r=e.objs;void 0!==r&&(t.objs=r);return t}(e);return{results:t.results.map(function(e){return e.id}),continuation:t.continuation,total:t.total,objs:t.objs}})}function J(e){return!!e&&"widgetlist_diff"===e.format}var Q={retrieveObj:function(e,t){return $(e,t)},retrieveObjQuery:function(e,t){return K(e,t)},retrieveFacetQuery:function(e,t){return function(e,t){return U.get("workspaces/"+e+"/objs/search",t).then(function(e){return{facets:e.facets.map(function(e){return e.map(function(e){return{total:e.total,value:e.value,results:e.results}})})}})}(e,t)},retrieveBinaryMetadata:function(e){return function(e){return U.get("blobs/"+encodeURIComponent(e||"")+"/meta_data")}(e)},retrieveBinaryUrls:function(e,t){return function(e,t){var n={id:e};return t&&(n.transformation=t),q.retrieve(n)}(e,t)},retrieveObjFieldDiffs:function(e,t){return function(e,t){return U.get("workspaces/"+e+"/objs/"+t+"/diff").then(function(e){return e})}(e,t)}};function Z(e){Q=e}function X(e){return!e._deleted}function ee(e){return"widgetlist"===e[0]}n.d(t,"a",function(){return s}),n.d(t,"d",function(){return U}),n.d(t,"e",function(){return Q}),n.d(t,"j",function(){return Z}),n.d(t,"b",function(){return _}),n.d(t,"c",function(){return g}),n.d(t,"g",function(){return S}),n.d(t,"f",function(){return X}),n.d(t,"h",function(){return ee}),n.d(t,"i",function(){return J})},function(e,t,n){"use strict";var r=n(2),i=n(3),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},s=function(){function e(e,t){var n={};t._scrivitoPrivateSchema&&r.extend(n,t._scrivitoPrivateSchema.attributes),e.attributes&&r.each(e.attributes,function(e,t){n[t]=function(e){if("string"==typeof e)return[e];return[e[0],u(e[1])]}(e)});var i=e.onlyInside;this.definition=o({},e,i?{attributes:n,onlyInside:r.isArray(i)?i:[i]}:{attributes:n})}return e.forInstance=function(e){return this.forClass(e.constructor)},e.forClass=function(e){return e._scrivitoPrivateSchema},e.basicFieldFor=function(t,n){var r=e.forInstance(t);if(r){var o=r.attributes[n];if(o)return new i.BasicField(t._scrivitoPrivateContent,n,o)}},Object.defineProperty(e.prototype,"attributes",{get:function(){return this.definition.attributes},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.definition.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onlyInside",{get:function(){return this.definition.onlyInside},enumerable:!0,configurable:!0}),e.prototype.isBinary=function(){var e=this.definition.attributes.blob;return!!e&&"binary"===e[0]},e}();function c(e){return!(!e||!e._scrivitoPrivateSchema)}function u(e){if(!("only"in e))return e;var t=e.only,n=a(e,["only"]);return o({},n,{validClasses:"string"==typeof t?[t]:t})}var l=n(0);function d(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}function f(e,t){if(Object(r.isArray)(t))return Object(r.map)(t,function(t){return f(e,t)});if(d(t,i.BasicObj))return p(t,e.objClassFor(t.objClass()));if(d(t,i.BasicWidget)){var n=t.objClass();return p(t,e.widgetClassFor(n))}if(d(t,i.BasicLink)){var o=Object.create(e.defaultClassForLinks.prototype);return o._scrivitoPrivateContent=t,o}return t}function p(e,t){var n=Object.create(t.prototype);return n._scrivitoPrivateContent=e,n}function h(e){return Object(r.isArray)(e)?Object(r.map)(e,h):e&&e._scrivitoPrivateContent?e._scrivitoPrivateContent:e}function m(e,t,n){return Object(r.mapObject)(e,function(e,r){if(Object(l.z)(r))return[e];var i=t.attributes[r];if(!i)throw new l.a('Attribute "'.concat(r,'" is not defined for CMS object ')+'class "'.concat(n,'".'));return[h(e),i]})}function _(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var g=function(){function e(t){_(this,e),this._registry=t}var t,n,r;return t=e,(n=[{key:"getObj",value:function(e,t){var n=i.BasicObj.get(t);return this._checkObjClassAndWrapInAppClass(e,n)}},{key:"getObjIncludingDeleted",value:function(e,t){var n=i.BasicObj.getIncludingDeleted(t);return this._checkObjClassAndWrapInAppClass(e,n)}},{key:"read",value:function(e,t){var n=s.basicFieldFor(e,t);if(!n)return null;var r=n.get();return f(this._registry,r)}},{key:"update",value:function(e,t){var n,r=this._registry.objClassNameFor(e.constructor);if(!r)throw n=e.constructor===this._registry.defaultClassForObjs?"Obj":"Widget",new l.a('Updating is not supported on the base class "'.concat(n,'".'));if(t.constructor!==Object)throw new l.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");var i=m(t,s.forInstance(e),r);e._scrivitoPrivateContent.update(i)}},{key:"wrapInAppClass",value:function(e){return f(this._registry,e)}},{key:"_checkObjClassAndWrapInAppClass",value:function(e,t){if(!t)return null;var n=this._registry.objClassNameFor(e);if(n&&n!==t.objClass())throw new l.h('Obj with id "'.concat(t.id(),'" is not of type "').concat(n,'".'));return this.wrapInAppClass(t)}}])&&v(t.prototype,n),r&&v(t,r),e}();function y(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e){return function(){function t(){y(this,t)}var n,r,i;return n=t,(r=[{key:"id",value:function(){return this._scrivitoPrivateContent.id()}},{key:"objClass",value:function(){return this._scrivitoPrivateContent.objClass()}},{key:"finishSaving",value:function(){return this._scrivitoPrivateContent.finishSaving()}},{key:"get",value:function(t){if(!Object(l.y)(t))throw new l.a("Attribute names have to be in camel case.");if(Object(l.z)(t))throw new l.a('Attribute name "'.concat(t,'" is not a valid custom attribute name.'));return e.read(this,t)}},{key:"update",value:function(t){e.update(this,t)}}])&&b(n.prototype,r),i&&b(n,i),t}()}function k(e,t,n,r){var i={};return Object.keys(n.definition.attributes).forEach(function(n){if(!Object.prototype.hasOwnProperty.call(e,n)){var o=t.initialContentFor(r,n);void 0!==o&&(i[n]=o)}}),i}function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function M(e,t){return!t||"object"!==S(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e){var t=new g(e);function n(t,n){var r=new e.ObjSearch;return t&&r.and("_objClass","equals",t),n&&r._scrivitoPrivateContent.batchSize(n),r}function o(t){return f(e,t)}return function(a){function c(){return O(this,c),M(this,x(c).apply(this,arguments))}var u,d,f;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(c,w(t)),u=c,f=[{key:"get",value:function(e){return t.getObj(this,e)}},{key:"getIncludingDeleted",value:function(e){return t.getObjIncludingDeleted(this,e)}},{key:"getByPath",value:function(e){return o(i.BasicObj.getByPath(e))}},{key:"getByPermalink",value:function(e){return o(i.BasicObj.getByPermalink(e))}},{key:"all",value:function(){return n(e.objClassNameFor(this),1e3)}},{key:"root",value:function(){return o(i.BasicObj.root())}},{key:"where",value:function(t,r,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return n(e.objClassNameFor(this)).and(t,r,i,o)}},{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};j(e,this._appClassName());var t=this._prepareAttributesForCreate(e);return o(i.BasicObj.create(t))}},{key:"createFromFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e){if(!l.f.is(e)){if(l.c.is(e))throw new l.a('Creating CMS objects from file is only available with instances of "File", but an instance of "Blob" is given');throw new l.a('Creating CMS objects from file is only available with instances of "File"')}}(e),function(e,t,n){if(j(e,t),Object.prototype.hasOwnProperty.call(e,"blob"))throw new l.a('Setting attribute "blob" is not allowed when creating CMS objects from file, because the file will be assigned to that attribute');if(!n.isBinary())throw new l.a('Creating CMS objects from file is only available for classes with a binary attribute "blob"')}(t,this._appClassName(),this._schema());var n=this._prepareAttributesForCreate(t);return i.BasicObj.createFromFile(e,n).then(function(e){return o(e)})}},{key:"_prepareAttributesForCreate",value:function(t){var n=this._schema(),i=this._appClassName(),o=k(t,e,n,i),a={_objClass:i};return m(Object(r.extend)({},t,o,a),n,i)}},{key:"_appClassName",value:function(){return e.objClassNameFor(this)}},{key:"_schema",value:function(){return s.forClass(this)}}],(d=[{key:"lastChanged",value:function(){return this._scrivitoPrivateContent.lastChanged()}},{key:"path",value:function(){return this._scrivitoPrivateContent.path()}},{key:"parent",value:function(){return o(this._scrivitoPrivateContent.parent())}},{key:"ancestors",value:function(){return o(this._scrivitoPrivateContent.ancestors())}},{key:"backlinks",value:function(){return o(this._scrivitoPrivateContent.backlinks())}},{key:"children",value:function(){return o(this._scrivitoPrivateContent.children())}},{key:"orderedChildren",value:function(){return o(this._scrivitoPrivateContent.orderedChildren())}},{key:"permalink",value:function(){return this._scrivitoPrivateContent.permalink()}},{key:"slug",value:function(){return this._scrivitoPrivateContent.slug()}},{key:"isBinary",value:function(){var e=s.forInstance(this);return!!e&&e.isBinary()}},{key:"isRestricted",value:function(){return this._scrivitoPrivateContent.isRestricted()}},{key:"contentLength",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentLength():0}},{key:"contentType",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentType():""}},{key:"contentUrl",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentUrl():""}},{key:"metadata",value:function(){return this.isBinary()?this._scrivitoPrivateContent.metadata():new i.MetadataCollection}},{key:"restrict",value:function(){this._scrivitoPrivateContent.restrict()}},{key:"unrestrict",value:function(){this._scrivitoPrivateContent.unrestrict()}},{key:"widget",value:function(e){return o(this._scrivitoPrivateContent.widget(e))}},{key:"widgets",value:function(){return o(this._scrivitoPrivateContent.widgets())}},{key:"destroy",value:function(){this._scrivitoPrivateContent.destroy()}}])&&C(u.prototype,d),f&&C(u,f),c}()}function j(e,t){if(!t)throw new l.a("Creating CMS objects is not supported for the class Obj or abstract classes.");if(e.constructor!==Object)throw new l.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(e._objClass)throw new l.a('Invalid attribute "_objClass". '+'"'.concat(e._objClass,'.create" will automatically set the CMS object class ')+"correctly.")}var D=function(){function e(e,t){this._registry=e,this._basicObjFacetValue=t}return e.prototype.name=function(){return this._basicObjFacetValue.name()},e.prototype.count=function(){return this._basicObjFacetValue.count()},e.prototype.includedObjs=function(){var e=this._basicObjFacetValue.includedObjs();return f(this._registry,e)},e}();function L(e){var t=function(){function t(){this._scrivitoPrivateContent=new i.BasicObjSearch}return t.prototype.and=function(e,n,r,i){if(c=e,null!=(u=t)&&"undefined"!=typeof Symbol&&u[Symbol.hasInstance]?u[Symbol.hasInstance](c):c instanceof u){var o=e;this._scrivitoPrivateContent.and(o._scrivitoPrivateContent)}else{if(void 0===n)throw new l.a("Missing operator to search with");if(void 0===r)throw new l.a('Missing value to search (specify "null" for missing)');var a=P(r),s=e;this._scrivitoPrivateContent.and(s,n,a,i)}var c,u;return this},t.prototype.andNot=function(e,t,n){var r=P(n);return this._scrivitoPrivateContent.andNot(e,t,r),this},t.prototype.facet=function(t,n){return this._scrivitoPrivateContent.facet(t,n).map(function(t){return new D(e,t)})},t.prototype.first=function(){var t=this._scrivitoPrivateContent.first();return t?f(e,t):null},t.prototype.take=function(t){return this._scrivitoPrivateContent.take(t).map(function(t){return f(e,t)})},t.prototype.toArray=function(){return this._scrivitoPrivateContent.take().map(function(t){return f(e,t)})},t.prototype.offset=function(e){return this._scrivitoPrivateContent.offset(e),this},t.prototype.order=function(e,t){return this._scrivitoPrivateContent.order(e,t),this},t.prototype.count=function(){return this._scrivitoPrivateContent.count()},t}();if("function"==typeof Symbol){var n=Symbol.iterator;if(n)t.prototype[n]=function(){var t=this._scrivitoPrivateContent.iterator();return{next:function(){var n=t.next();return n.done?{done:n.done}:{done:n.done,value:f(e,n.value)}}}}}return t}function P(e){return r.isArray(e)?e.map(function(e){return h(e)}):h(e)}function I(e){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function N(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Y(e){return(Y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function F(e,t){return(F=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function H(e){var t=new g(e);return function(n){function o(){var t,n,r,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};N(this,o),n=this,t=!(r=Y(o).call(this))||"object"!==I(r)&&"function"!=typeof r?R(n):r;var c=s.forInstance(R(t)),u=e.objClassNameFor(t.constructor),l=t._prepareAttributesForConstructor(a,c,u),d=new i.BasicWidget(l);return d.onDidPersist(function(t){var n=f(e,t),r=k(l,e,c,u);n.update(r)}),t._scrivitoPrivateContent=d,t}var a,c,u;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&F(e,t)}(o,w(t)),a=o,(c=[{key:"obj",value:function(){var t=this._scrivitoPrivateContent.obj();return f(e,t)}},{key:"copy",value:function(){var t=e.widgetClassFor(this.objClass());return p(this._scrivitoPrivateContent.copy(),t)}},{key:"destroy",value:function(){this._scrivitoPrivateContent.remove()}},{key:"_prepareAttributesForConstructor",value:function(e,t,n){!function(e,t){if(!e)throw new l.a("Creating widgets is not supported for the class Widget or abstract classes.");if(t.constructor!==Object)throw new l.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(t._objClass)throw new l.a('Invalid attribute "_objClass". '+'"new '.concat(t._objClass,'" will automatically set the CMS object class correctly.'))}(n,e);var i={_objClass:n};return m(Object(r.extend)({},e,i),t,n)}}])&&A(a.prototype,c),u&&A(a,u),o}()}var W=["hash","obj","query","rel","target","title","url"];function B(e){return function(e){var t=r.without.apply(r,[r.keys(e)].concat(W));if(!r.isEmpty(t))throw new l.a("Unexpected attributes "+Object(l.I)(t)+". Available attributes: "+Object(l.I)(W))}(e),r.has(e,"obj")?r.extend({},e,{objId:z(e.obj)}):e}function z(e){return e?h(e).id():null}n(117);var U=function(){function e(){var e;this.mapping={},this.defaultClassForObjs=T(this),this.defaultClassForWidgets=H(this),this.defaultClassForLinks=(e=this,function(){function t(e){var t=B(e);this._scrivitoPrivateContent=new i.BasicLink(t)}return t.prototype.title=function(){return this._scrivitoPrivateContent.title()},t.prototype.query=function(){return this._scrivitoPrivateContent.query()},t.prototype.hash=function(){return this._scrivitoPrivateContent.hash()},t.prototype.rel=function(){return this._scrivitoPrivateContent.rel()},t.prototype.target=function(){return this._scrivitoPrivateContent.target()},t.prototype.url=function(){return this._scrivitoPrivateContent.url()},t.prototype.obj=function(){var t=this._scrivitoPrivateContent.obj();return t?f(e,t):null},t.prototype.queryParameters=function(){return this._scrivitoPrivateContent.queryParameters()},t.prototype.copy=function(t){var n=this._scrivitoPrivateContent.copy(B(t)),r=Object.create(e.defaultClassForLinks.prototype);return r._scrivitoPrivateContent=n,r},t.prototype.isExternal=function(){return this._scrivitoPrivateContent.isExternal()},t.prototype.isInternal=function(){return this._scrivitoPrivateContent.isInternal()},t}()),this.ObjSearch=L(this)}return e.prototype.register=function(e,t){this.mapping[e]=t},e.prototype.getClass=function(e){return this.mapping[e]||null},e.prototype.allObjClasses=function(){var e=this;return r.pick(this.mapping,function(t){return e.defaultClassForObjs.isPrototypeOf(t)})},e.prototype.allWidgetClasses=function(){var e=this;return r.pick(this.mapping,function(t){return e.defaultClassForWidgets.isPrototypeOf(t)})},e.prototype.objClassFor=function(e){return this.appClassFor(e,this.defaultClassForObjs)},e.prototype.widgetClassFor=function(e){return this.appClassFor(e,this.defaultClassForWidgets)},e.prototype.objClassNameFor=function(e){return r.findKey(this.mapping,function(t){return t===e})},e.prototype.setInitialContentFor=function(e){this.initialContentForFunction=e},e.prototype.initialContentFor=function(e,t){if(this.initialContentForFunction)return this.initialContentForFunction(e,t)},e.prototype.appClassFor=function(e,t){var n=this.getClass(e);return n&&t.isPrototypeOf(n)?n:t},e}();function q(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}var V,$=(V=function(e,t){return(V=Object.setPrototypeOf||q({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}V(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function G(e,t){if(t.extend&&!Z(t.extend,e.defaultClassForObjs))throw new l.a('Invalid value for "extend": not a Scrivito Obj class');var n=t.extend||e.defaultClassForObjs,r=new s(t,n);return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $(t,e),Object.defineProperty(t,"_scrivitoPrivateSchema",{get:function(){return r},enumerable:!0,configurable:!0}),t}(n)}function K(e,t){if(t.extend&&!Z(t.extend,e.defaultClassForWidgets))throw new l.a('Invalid value for "extend": not a Scrivito Widget class');var n=t.extend||e.defaultClassForWidgets,r=new s(t,n);return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $(t,e),Object.defineProperty(t,"_scrivitoPrivateSchema",{get:function(){return r},enumerable:!0,configurable:!0}),t}(n)}function J(e,t,n){var i=function(e,t,n){if(c(n))return n;var i=Object(r.extend)({},n,{name:t});return G(e,i)}(e,t,n);return e.register(t,i),i}function Q(e,t,n){var i=function(e,t,n){if(c(n))return n;var i=Object(r.extend)({},n,{name:t});return K(e,i)}(e,t,n);return e.register(t,i),i}function Z(e,t){return!!e&&(e===t||q(e.prototype,t))}var X=l.O.refinement(l.O.Function,c,"ObjClass"),ee=l.O.interface({attributes:l.O.maybe(l.O.dict(l.O.refinement(l.O.String,function(e){return/^[a-z](_+[A-Z0-9]|[A-Za-z0-9])*$/.test(e)},"String (alphanumeric, starting with a lower-case character)"),l.O.union([l.O.enums.of(["binary","date","float","html","integer","link","linklist","reference","referencelist","string","stringlist","widgetlist"]),l.O.tuple([l.O.enums.of(["enum","multienum"]),l.O.interface({values:l.O.list(l.O.String)})]),l.O.tuple([l.O.enums.of(["reference","referencelist"]),l.O.interface({only:l.O.union([l.O.String,l.O.list(l.O.String)])})]),l.O.tuple([l.O.enums.of(["widgetlist"]),l.O.interface({only:l.O.union([l.O.String,l.O.list(l.O.String)])})])]),"Attributes Specification")),extend:l.O.maybe(X)}),te=l.O.refinement(l.O.Function,c,"WidgetClass"),ne=l.O.interface({attributes:ee.meta.props.attributes,extend:l.O.maybe(te),onlyInside:l.O.maybe(l.O.union([l.O.String,l.O.Array]))}),re=Object(l.p)("createObjClass",[["options",ee]],{docPermalink:"js-sdk/createObjClass"}),ie=Object(l.p)("createWidgetClass",[["options",ne]],{docPermalink:"js-sdk/createWidgetClass"}),oe=l.O.union([ee,X]),ae=Object(l.p)("provideObjClass",[["name",l.O.String],["objClassOrDefinition",oe]],{docPermalink:"js-sdk/provideObjClass"}),se=l.O.union([ne,te]),ce=Object(l.p)("provideWidgetClass",[["name",l.O.String],["widgetClassOrDefinition",se]],{docPermalink:"js-sdk/provideWidgetClass"});var ue=function(){function e(){this._registry=new U,this.appModelAccessor=new g(this._registry)}return e.init=function(t){var n=new e;return t.Obj=n.Obj,t.Widget=n.Widget,t.Link=n.Link,t.ObjSearch=n.ObjSearch,t.appModelAccessor=n.appModelAccessor,t.provideObjClass=function(e,t){return n.provideObjClass(e,t)},t.provideWidgetClass=function(e,t){return n.provideWidgetClass(e,t)},t.createObjClass=function(e){return n.createObjClass(e)},t.createWidgetClass=function(e){return n.createWidgetClass(e)},t.getClass=function(e){return n.getClass(e)},t.allObjClasses=function(){return n.allObjClasses()},t.allWidgetClasses=function(){return n.allWidgetClasses()},t._privateRealm=n,n},Object.defineProperty(e.prototype,"Obj",{get:function(){return this._registry.defaultClassForObjs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Widget",{get:function(){return this._registry.defaultClassForWidgets},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Link",{get:function(){return this._registry.defaultClassForLinks},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ObjSearch",{get:function(){return this._registry.ObjSearch},enumerable:!0,configurable:!0}),e.prototype.provideObjClass=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return ae.apply(void 0,[e,t].concat(n)),J(this._registry,e,t)},e.prototype.provideWidgetClass=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return ce.apply(void 0,[e,t].concat(n)),Q(this._registry,e,t)},e.prototype.createObjClass=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return re.apply(void 0,[e].concat(t)),G(this._registry,e)},e.prototype.createWidgetClass=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return ie.apply(void 0,[e].concat(t)),K(this._registry,e)},e.prototype.getClass=function(e){return this._registry.getClass(e)},e.prototype.allObjClasses=function(){return this._registry.allObjClasses()},e.prototype.allWidgetClasses=function(){return this._registry.allWidgetClasses()},e.prototype.setInitialContentFor=function(e){this._registry.setInitialContentFor(e)},e}();n.d(t,"f",function(){return f}),n.d(t,"e",function(){return h}),n.d(t,"d",function(){return m}),n.d(t,"a",function(){return D}),n.d(t,"b",function(){return s});t.c=ue},function(e,t,n){"use strict";var r;function i(e){return r?r.getContentStateId(e):""}function o(e){r=e}var a=n(2),s=n.n(a),c=n(5),u=n(6),l=n(0);var d,f=(d=function(e,t){var n,r;return(d=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=!1;function h(){return p}function m(){p=!0}function _(e){if(p)throw new v(e)}var v=function(e){function t(t){return e.call(this,t+" is not supported when using the in-memory tenant")||this}return f(t,e),t}(l.i),g=n(9),y=new c.LoadableCollection({name:"facetquery",state:function(){return u.c.subState("facetQuery")},loader:function(e){var t=e[0],n=e[1];return g.e.retrieveFacetQuery(t,n)},invalidation:function(e){var t=e[0];e[1];return Object(c.loadableWithDefault)(void 0,function(){return i(t)})||""}}),b=function(){function e(e,t,n,r){this._requestParams=w(t,n,r),this._loadableData=y.get([e,this._requestParams])}return e.store=function(e,t,n,r,i){var o=w(t,n,r);y.get([e,o]).set(i)},e.prototype.result=function(){_("Search API");var e=this._loadableData.get();return e?e.facets[0].map(function(e){return{name:e.value,count:e.total,includedObjIds:e.results.map(function(e){return e.id})}}):[]},e}();function w(e,t,n){var r={facets:[{attribute:e,limit:t.limit||10,include_objs:t.includeObjs||0}],size:0};return Object(a.isEmpty)(n)||(r.query=n),r}function k(e,t){var n=S(e,t);return n||(a.find(e._widget_pool,function(e,r){if(e&&(n=S(e,t)))return n.parentWidgetId=r,!0}),n)}function S(e,t){var n;return a.find(e,function(e,r){if(e&&!Object(l.z)(r)){var i=e;if(Object(g.h)(i)){var o=i[1];if(o){var a=o.indexOf(t);return-1!==a?(n={attributeName:r,index:a},!0):void 0}}}}),n}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function C(e,t){if(!e)return t;if(!t)return null;var n={};return x(e,t,function(r,i,o){"_widget_pool"===r?n._widget_pool=function(e,t){if(!t||s.a.isEmpty(t))return e;var n={};return x(e,t,function(e,r,i){Object.prototype.hasOwnProperty.call(t,e)?i&&!r?n[e]=i:i&&(n[e]=C(r,i)):n[e]=r}),n}(i||{},o):Object.prototype.hasOwnProperty.call(t,r)?o&&(n[r]=o):n[r]=e[r]}),n}function M(e,t){if(!e)return t;if(!t)return null;var n={};return x(e,t,function(e,t,r){if("_widget_pool"===e){var i=function(e,t){if(e===t)return;if(!e)return t;var n={};return x(e,t||{},function(e,t,r){var i=T(t,r,function(){var e=M(t,r);if(!s.a.isEmpty(e))return e});void 0!==i&&(n[e]=i)}),n}(t,r);s.a.isEmpty(i)||(n._widget_pool=i)}else{var o=T(t,r,function(){if(!s.a.isEqual(t,r))return r});void 0!==o&&(n[e]=o)}}),n}function x(e,t,n){s.a.union(s.a.keys(e),s.a.keys(t)).forEach(function(r){return n(r,E(e[r]),E(t[r]))})}function E(e){if(s.a.isArray(e)){var t=O(e,2),n=t[0],r=t[1];return"binary"===n&&r?[n,s.a.omit(r,"url")]:e}return e}function T(e,t,n){return!e&&t?t:e&&!t?null:e&&t?n():void 0}function j(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var L=function(){function e(t,n){var r=this;j(this,e),this._workspaceId=t,this._objId=n,this._replicationActive=!1,this._scheduledReplication=!1,this._currentRequestDeferred=null,this._nextRequestDeferred=null,this._performThrottledReplication=Object(l.P)(function(){return r._performReplication()},1e3)}var t,n,r;return t=e,(n=[{key:"start",value:function(){var e=this;g.e.retrieveObj(this._workspaceId,this._objId).then(function(t){Object(u.a)(function(){e.notifyBackendState(t)})})}},{key:"notifyLocalState",value:function(e){if(!A.isDisabled()){if(void 0===this._backendState)throw new l.g("Can not set local state before backend state.");if(this._backendState&&this._backendState._deleted)throw new l.g("Can not update a fully deleted obj.");this._localState=e,this._startReplication()}}},{key:"notifyBackendState",value:function(e){if(void 0===this._backendState)return this._backendState=e,void this._updateLocalState(e);if(N(e,this._bufferedBackendState||this._backendState)>0)if(this._replicationActive)this._bufferedBackendState=e;else{if(e._deleted)this._updateLocalState(null);else{var t=P(this._backendState,e);this._updateLocalState(I(this.localState,t))}this._backendState=e}}},{key:"finishSaving",value:function(){var e;if(this._nextRequestDeferred)e=this._nextRequestDeferred.promise;else{if(!this._currentRequestDeferred)return l.j.resolve();e=this._currentRequestDeferred.promise}return e.catch(function(){return l.j.reject()})}},{key:"_startReplication",value:function(){var e=this;s.a.isEmpty(P(this._backendState,this._localState))?this._nextRequestDeferred&&(this._nextRequestDeferred.resolve(),this._nextRequestDeferred=null):this._replicationActive?this._nextRequestDeferred||(this._nextRequestDeferred=new l.e):this._scheduledReplication||(this._scheduledReplication=!0,this._initDeferredForRequest(),A.writeStarted(this._currentRequestDeferred.promise),Object(l.G)(function(){return e._performThrottledReplication()}))}},{key:"_performReplication",value:function(){var e=this,t=this._localState,n=P(this._backendState,this._localState);this._scheduledReplication=!1,this._replicationActive=!0,this._replicatePatchToBackend(n).then(function(n){e._handleBackendUpdate(t,n),e._currentRequestDeferred.resolve(e._objId),e._currentRequestDeferred=null,e._replicationActive=!1,e._startReplication()},function(t){e._currentRequestDeferred.reject(t),e._currentRequestDeferred=null,e._replicationActive=!1})}},{key:"_replicatePatchToBackend",value:function(e){if(s.a.isEmpty(e))return l.j.resolve(this._backendState);var t="workspaces/".concat(this._workspaceId,"/objs/").concat(this._objId);return g.d.put(t,{obj:e})}},{key:"_initDeferredForRequest",value:function(){if(this._nextRequestDeferred){var e=this._nextRequestDeferred;this._nextRequestDeferred=null,this._currentRequestDeferred=e}else this._currentRequestDeferred=new l.e}},{key:"_handleBackendUpdate",value:function(e,t){var n=P(e,this._localState);this._backendState=function(e,t){if(N(e,t)>0)return e;return t}(t,this._bufferedBackendState),this._bufferedBackendState=void 0,this._updateLocalState(I(this._backendState,n))}},{key:"_updateLocalState",value:function(e){this._localState=e,B(this._workspaceId,this._objId,this._localState)}},{key:"isNotStoredInBackend",value:function(){return null===this._backendState}},{key:"isRequestInFlight",value:function(){return this._replicationActive}},{key:"backendState",get:function(){return this._backendState}},{key:"localState",get:function(){return this._localState}}])&&D(t.prototype,n),r&&D(t,r),e}();function P(e,t){return M(e,t)}function I(e,t){return C(e,t)}function N(e,t){return e?t?function(e,t){if(e>t)return 1;if(t>e)return-1;return 0}(e._version,t._version):1:-1}var A=new(function(){function e(){this.replicationCache={},this.disabled=!1,this.writeWriteCallbacks={},this.subscriptionToken=0}return e.prototype.get=function(e,t){return this.replicationCache[e]||(this.replicationCache[e]={}),this.replicationCache[e][t]||(this.replicationCache[e][t]=new L(e,t)),this.replicationCache[e][t]},e.prototype.subscribeWrites=function(e){return this.subscriptionToken+=1,this.writeWriteCallbacks[this.subscriptionToken]=e,this.subscriptionToken},e.prototype.unsubscribeWrites=function(e){delete this.writeWriteCallbacks[e]},e.prototype.isDisabled=function(){return this.disabled},e.prototype.writeStarted=function(e){Object(a.each)(this.writeWriteCallbacks,function(t){t(e)})},e.prototype.disableReplication=function(){this.disabled=!0},e.prototype.enableReplication=function(){this.disabled=!1},e.prototype.clearWriteCallbacks=function(){this.writeWriteCallbacks={}},e.prototype.clearCache=function(){this.replicationCache={}},e}());function Y(e){A=e}function R(){return u.m.subState("objData")}var F=new c.LoadableCollection({name:"objdata",state:R,loader:function(e){var t=e[0],n=e[1];return A.get(t,n).start(),new l.j(function(){})}});var H=function(){function e(e,t){this._workspaceId=e,this._id=t,this._loadableData=F.get([e,t])}return e.prototype.get=function(){return Object(u.h)("for performance reasons, avoid this method when rendering"),this._loadableData.get()},e.prototype.getWidget=function(e){return Object(u.h)("for performance reasons, avoid this method when rendering"),this.getWidgetState(e).get()},e.prototype.getWidgetWithBadPerformance=function(e){return this.getWidgetState(e).get()},e.prototype.getAttribute=function(e){if("_widget_pool"===e)throw new l.g("_widget_pool is not an attribute, use getWidget or getWidgetAttribute");return this.getSubReader(e).get()},e.prototype.getWidgetAttribute=function(e,t){return this.getWidgetState(e).subState(t).get()},e.prototype.isNonExistent=function(){return!!this.getSubReader("_deleted").get()||!this.getSubReader("_id").get()},e.prototype.set=function(e){Object(u.g)("Changing CMS content"),this._loadableData.set(e)},e.prototype.setError=function(e){this._loadableData.setError(e)},e.prototype.ensureAvailable=function(){return this._loadableData.ensureAvailable()},e.prototype.isAvailable=function(){return this._loadableData.isAvailable()},e.prototype.update=function(e){var t=C(this.get(),e);this.set(t),this._replication().notifyLocalState(t)},e.prototype.finishSaving=function(){return this._replication().finishSaving()},e.prototype.workspaceId=function(){return this._workspaceId},e.prototype.equals=function(t){return n=t,!!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&(this.workspaceId()===t.workspaceId()&&this._id===t._id);var n,r},e.prototype._replication=function(){return A.get(this._workspaceId,this._id)},e.prototype.getWidgetState=function(e){return this.getSubReader("_widget_pool").subState(e)},e.prototype.getSubReader=function(e){return this._loadableData.reader().subState(e)},e}();function W(e,t){var n=U(e,t);return n.set(null),A.get(e,t).notifyBackendState(null),n}function B(e,t,n){U(e,t).set(n)}function z(e,t){var n=U(e,t);if(n.ensureAvailable())return n}function U(e,t){return new H(e,t)}var q=function(){return(q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},V={results:[],total:0},$=new c.LoadableCollection({name:"objquery",state:function(){return ce()},loader:function(e,t,n){var r=e[0],i=e[1],o=e[2],a=t.push,s=t.isReload,u=t.wasCancelled;return function(e,t,n,r){if(r>0){var i=new G(e,t,n,r-1);return Object(c.load)(function(){return i.continuationForNextBatch()})}return l.j.resolve()}(r,i,n,o).then(function(e){if(u())throw new Error;var t={size:n,continuation:e,include_objs:!s()},o=q({},i,t);return g.e.retrieveObjQuery(r,o).then(function(e){var t=e.objs;return t&&a(function(){return t.forEach(function(e){e._id&&A.get(r,e._id).notifyBackendState(e)})}),function(e,t){t.forEach(function(t){return function(e,t){Object(c.load)(function(){return z(e,t)})}(e,t)})}(r,e.results),{results:e.results,total:e.total,continuation:e.continuation}})})},invalidation:function(e){var t=e[0];e[1],e[2];return Object(c.loadableWithDefault)(void 0,function(){return i(t)})||""}}),G=function(){function e(e,t,n,r){void 0===r&&(r=0),this._workspaceId=e,this._params=t,this._batchSize=n,this._index=r}return e.store=function(e,t,n,r){void 0===r&&(r=n.length),$.get([e,J(t),0]).set({results:n,total:r})},e.firstBatchFor=function(t,n,r){return new e(t,J(n),r)},e.countFor=function(e,t){return this.firstBatchFor(e,t,0).count()},e.prototype.objIds=function(){return this._response().results},e.prototype.count=function(){return this._response().total||0},e.prototype.nextBatch=function(){if(this.continuationForNextBatch())return new e(this._workspaceId,this._params,this._batchSize,this._index+1)},Object.defineProperty(e.prototype,"index",{get:function(){return this._index},enumerable:!0,configurable:!0}),e.prototype.continuationForNextBatch=function(){return this._response().continuation},e.prototype._response=function(){return this._data().get()||V},e.prototype._data=function(){return $.get([this._workspaceId,this._params,this._index],this._batchSize)},e}(),K=G;function J(e){var t=Object(a.omit)({query:e.query,offset:e.offset,sort_by:e.sortBy,sort_order:e.sortDirection},a.isUndefined);return e.includeDeleted&&(t.options={include_deleted:!0}),t}function Q(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function Z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function X(e,t,n){return t&&Z(e.prototype,t),n&&Z(e,n),e}var ee=function(){function e(t,n,r){Q(this,e),this._workspaceId=t,this._params=n,this._batchSize=r}return X(e,null,[{key:"store",value:function(e,t,n,r){K.store(e,t,n,r)}},{key:"count",value:function(e,t){return K.countFor(e,t)}}]),X(e,[{key:"iterator",value:function(){var e={},t=K.firstBatchFor(this._workspaceId,this._params,this._batchSize),n=0;return{next:function r(){if(!t)return{done:!0};var i=t.objIds();if(n<i.length){var o=i[n];return n++,e[o]?r():(e[o]=!0,{value:o,done:!1})}return t=t.nextBatch(),n=0,r()}}}}]),e}();function te(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function re(e,t,n){return t&&ne(e.prototype,t),n&&ne(e,n),e}var ie=function(){function e(t,n,r){te(this,e),this._workspaceId=t,this._params=n,this._batchSize=r}return re(e,[{key:"count",value:function(){return ee.count(this._workspaceId,this._params)}},{key:"iterator",value:function(){return new oe(this._workspaceId,this._params,this._batchSize)}}]),e}(),oe=function(){function e(t,n,r){te(this,e),this._workspaceId=t,this._iterator=new ee(t,n,r).iterator()}return re(e,[{key:"next",value:function(){if(!this._iterator)return{done:!0};var e=this._iterator.next().value;if(!e)return{done:!0};var t=z(this._workspaceId,e);return void 0===t?(this._iterator=void 0,{done:!0}):t.isNonExistent()?this.next():{value:t,done:!1}}}]),e}();function ae(e,t,n,r){ee.store(e,t,n,r)}function se(e,t,n){return _("Search API"),new ie(e,t,n)}function ce(){return u.c.subState("objQuery")}var ue=new c.LoadableCollection({name:"objFieldDiffs",state:function(){return u.c.subState("objFieldDiffs")},loader:function(e){var t=e[0],n=e[1];return g.e.retrieveObjFieldDiffs(t,n)},invalidation:function(e){return function(e,t){var n=z(e,t);if(n)return n.getAttribute("_version")||"";return""}(e[0],e[1])}});function le(e,t,n,r){if("published"===e)return null;var i=function(e,t){return de(e,t).get()||{}}(e,n);return r?function(e,t,n){var r=n._widget_pool;if(r){var i=r[t];if(i)return fe(e,i)}return null}(t,r,i):fe(t,i)}function de(e,t){return ue.get([e,t])}function fe(e,t){var n=t[Object(l.R)(e)];return n?n[1]:null}function pe(e,t,n){var r=z("published",t),i=z(e,t);return r&&i?r.isNonExistent()&&i.isNonExistent()?null:r.isNonExistent()&&!i.isNonExistent()?"new":!r.isNonExistent()&&i.isNonExistent()?"deleted":function(e,t,n){var r=e.getWidgetWithBadPerformance(n),i=t.getWidgetWithBadPerformance(n);return r?i?function(e,t){var n=M(e,t);return Object(a.some)(Object.keys(n),function(e){return!Object(l.z)(e)||"_obj_class"===e})}(r,i)?"edited":null:"deleted":i?"new":null}(r,i,n):null}n.d(t,"g",function(){return i}),n.d(t,"o",function(){return o}),n.d(t,"a",function(){return b}),n.d(t,"f",function(){return k}),n.d(t,"b",function(){return"inMemory"}),n.d(t,"q",function(){return m}),n.d(t,"c",function(){return _}),n.d(t,"l",function(){return h}),n.d(t,"i",function(){return z}),n.d(t,"d",function(){return W}),n.d(t,"e",function(){return M}),n.d(t,"j",function(){return se}),n.d(t,"p",function(){return ae}),n.d(t,"m",function(){return A}),n.d(t,"n",function(){return Y}),n.d(t,"h",function(){return le}),n.d(t,"k",function(){return pe})},function(e,t,n){"use strict";var r;function i(e){r=e}n.d(t,"b",function(){return r}),n.d(t,"a",function(){return i})},function(e,t,n){var r,i,o;
1
+ /*! Copyright (c) 2019 Infopark AG (https://scrivito.com) */!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=824)}([function(e,t,n){"use strict";var r=n(2);function i(e){try{return Object(r.isFunction)(e)?function(e){if(function(e){return!!e._scrivitoPrivateSchema}(e)){var t=e._scrivitoPrivateSchema;return"[class "+t.name+"]"}if(function(e){var t=e.prototype;return t&&t.isReactComponent}(e)){var n=e.displayName||e.name;return'[class React.Component "'+n+'"]'}return a(e.toString())}(e):Object(r.isObject)(e)?function(e){var t=e._scrivitoPrivateContent;if(t&&Object(r.isFunction)(t.toPrettyPrint))return t.toPrettyPrint();if(Object(r.isElement)(e))return"[object HTMLElement "+o(e.outerHTML)+"]";return o(e)}(e):o(e)}catch(e){return""}}function o(e){var t=JSON.stringify(e);return t?a(t):t}function a(e){return e.length>100?e.slice(0,100)+"...":e}var s=n(52),c=n(57);c.struct.strict=!0,c.interface.strict=!0,c.fail=function(e){throw new TypeError(e)};var u,l=[];function d(e){u?l.push(e):setTimeout(e,0)}function f(e){d(function(){throw e})}function p(e,t,n){var o=n.docPermalink;return function(){for(var n,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];try{n=function(e,t){var n=t.length,o=e.length;if(o>n)return"Expected "+n+" arguments, got "+o;var a=Object(r.flatten)(t.map(function(t,n){var r=t[0],o=t[1],a=e[n],s=c.validate(a,o);return s.errors.map(function(e){return function(e,t){var n=function(e,t){var n="argument '"+e+"'";if(0===t.path.length)return n;return"key '"+t.path.join("/")+"' in "+n}(e,t);if(void 0===t.actual)return"Missing required "+n+".";if(t.expected===c.Nil)return"Unexpected "+n+".";var r=c.getTypeName(t.expected),o="got "+i(t.actual)+", expected type "+r+".";return"Unexpected value for "+n+": "+o}(r,e)})}));if(a.length>0)return a.join(" ")}(a,t)}catch(e){f(e)}if(n){var l="Visit https://scrivito.com/"+o+" for more information.";throw new s.ArgumentError("Invalid arguments for '"+e+"': "+n+" "+l)}}}var h=function(){function e(){}return e.prototype.current=function(){return this.currentContext},e.prototype.runWith=function(e,t){var n=this.currentContext;try{return this.currentContext=e,t()}finally{this.currentContext=n}},e}(),m=function(){function e(){var e=this;this.promise=new oe(function(t,n){e.resolve=function(n){e.settled=!0,t(n)},e.reject=function(t){e.settled=!0,n(t)}})}return e.prototype.isPending=function(){return!this.settled},e}();function _(e){try{return{errorThrown:!1,result:e()}}catch(e){return{errorThrown:!0,error:e}}}var v=!1;function g(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];window&&window.console&&!v&&(e=window.console).error.apply(e,t)}function y(){var e="1.6.0-rc1-122-g5bcb2871bd68";return e}function b(e,t){void 0===t&&(t=window.document);var n=t.createElement("link");n.rel="stylesheet",n.href=e,k(t.head,n)}function w(e,t){void 0===t&&(t=window.document);var n=t.createElement("script");n.src=e,k(t.head,n)}function k(e,t){e.appendChild(t)}var S=/(_+)(\w)/g,O=/([A-Z])/g,C=/[A-Z]+|\d+/g,M=/^_?(_+[A-Z0-9]|[^_])+$/,x=/[_\s]+/g,E=/[A-Z][a-z]+/g;function T(e){return M.test(e)}function j(e){return e.replace(O,function(e,t){return"_"+t.toLowerCase()})}function D(e){return e.replace(S,function(e,t,n,r){return r?n.toUpperCase()===n?e:""+t.substr(1)+n.toUpperCase():e})}function L(e){var t=D(e);return t.charAt(0).toUpperCase()+t.slice(1)}function P(e){return e.replace(x," ").replace(E,function(e){return" "+e.toLowerCase()}).replace(C,function(e){return" "+e}).trim().replace(/./,function(e){return e.toUpperCase()})}n(113);var I=c.interface({size:c.Number,type:c.String},{name:"Blob",strict:!1}),N=I.extend({name:c.String},{name:"File",strict:!1});function A(e){return"_"===e[0]}function Y(e,t){for(var n=e.iterator(),r=[];r.length!==t;){var i=n.next();if(i.done)return r;r.push(i.value)}return r}function R(){for(var e=Math.floor(Math.random()*Math.pow(16,8)).toString(16);e.length<8;)e="0"+e;return e}function F(){return R()+R()}var H=!1;function W(e,t,n){return H?e:r.throttle(e,t,n)}var B=-9007199254740991,z=9007199254740991,U=/^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/;function q(e){return"string"==typeof e&&e.match(/^-?\d+$/)?X(e):"number"==typeof e?X(e):null}function V(e){return function(e){return $(e)&&Math.floor(e)===e}(e)&&B<=e&&e<=z}function $(e){return"number"==typeof e&&Object(r.isFinite)(e)}function G(e){if("string"!=typeof e)return null;if(!Q(e))throw new s.InternalError('The value is not a valid ISO date time: "'+e+'"');return K(e)}function K(e){if(!e)return null;var t=e.match(U);if(!t)return null;var n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],c=parseInt(n,10),u=parseInt(r,10),l=parseInt(i,10),d=parseInt(o,10),f=parseInt(a,10),p=parseInt(s,10);return new Date(Date.UTC(c,u-1,l,d,f,p))}function J(e){return""+(""+e.getUTCFullYear()+Z(e.getUTCMonth()+1))+(""+Z(e.getUTCDate())+Z(e.getUTCHours()))+(""+Z(e.getUTCMinutes())+Z(e.getUTCSeconds()))}function Q(e){return"string"==typeof e&&!!e.match(/^\d{14}$/)}function Z(e){return e<10?"0"+e:e}function X(e){var t=parseInt(e.toString(),10);return 0===t?0:V(t)?t:null}function ee(e){return te(1e3*e)}function te(e){return new oe(function(t){setTimeout(t,e)})}function ne(e,t){return re(e)&&re(t)?e.equals(t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&Object(r.every)(Object(r.zip)(e,t),function(e){return ne(e[0],e[1])}):e&&t?e.valueOf()===t.valueOf():e===t}function re(e){return!!e&&"function"==typeof e.equals}function ie(e,t){return e.then(function(e){return t(),e},function(e){throw t(),e})}var oe,ae=n(125);oe="undefined"!=typeof Promise?Promise:ae.a;var se=function(){function e(e,t){var n=(void 0===t?{}:t).batchSize;this.mget=e,this.batchSize=n||100,this.itemsToBatch=[]}return e.prototype.retrieve=function(e){var t=this;0===this.itemsToBatch.length&&d(function(){return t.performRetrieval()});var n=new m;return this.itemsToBatch.push({key:e,deferred:n}),n.promise},e.prototype.reset=function(){this.itemsToBatch=[]},e.prototype.performRetrieval=function(){var e=this,t=this.itemsToBatch.splice(0,this.batchSize);if(0!==t.length){var n=t.map(function(e){return e.key});this.mget(n).then(function(n){t.forEach(function(t,r){var i=t.key,o=t.deferred;if(r<n.length){var a=n[r];o.resolve(a)}else e.retrieve(i).then(o.resolve,o.reject)})},function(e){t.forEach(function(t){return t.deferred.reject(e)})}),this.performRetrieval()}},e}();function ce(e){return(ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ue(e){var t=le(e);return JSON.stringify(t)}function le(e){return Array.isArray(e)?e.map(le):function(e){return"object"===ce(e)&&null!==e}(e)?Object.keys(e).sort().map(function(t){return[t,le(e[t])]}):e}var de=Object.assign||r.extend;function fe(e,t){var n=e.clientX,r=e.clientY,i=t.getBoundingClientRect();return{x:n-i.left,y:r-i.top}}function pe(e){return(pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var he=function(){function e(e){this.subscribeFunction=e}return e.prototype.subscribe=function(e){var t=new me("object"===pe(e)?e:{next:e}),n=this.subscribeFunction(t);return t.setUnsubscribeCallback("object"===pe(n)?function(){return n.unsubscribe()}:n),t},e.prototype.map=function(t){var n=this;return new e(function(e){return n.subscribe({next:function(n){return e.next(t(n))},complete:function(){return e.complete()}})})},e.prototype.filter=function(t){var n=this;return new e(function(e){return n.subscribe({next:function(n){t(n)&&e.next(n)},complete:function(){return e.complete()}})})},e.prototype.toPromise=function(){var e=this;return new oe(function(t){var n;e.subscribe({next:function(e){n=e},complete:function(){t(n)}})})},e.prototype.takeOne=function(){var t=this;return new e(function(e){var n=t.subscribe({next:function(t){n.unsubscribe(),e.next(t),e.complete()},complete:function(){e.complete()}});return n})},e.prototype.takeUntil=function(t){var n=this;return new e(function(e){var r,i;if((i=n.subscribe({next:function(t){e.next(t)},complete:function(){o()}})).isClosed())return function(){};function o(){e.complete(),a()}function a(){i&&i.unsubscribe(),r&&r.unsubscribe()}return r=t.subscribe({next:function(){o()},complete:function(){o()}}),a})},e}(),me=function(){function e(e){this.subscriber=e}return e.prototype.next=function(e){this.subscriber&&this.subscriber.next&&this.subscriber.next(e)},e.prototype.complete=function(){this.subscriber&&this.subscriber.complete&&this.subscriber.complete(),this.subscriber=void 0},e.prototype.unsubscribe=function(){this.subscriber&&(this.unsubscribeCallback&&this.unsubscribeCallback(),this.subscriber=void 0)},e.prototype.isClosed=function(){return!this.subscriber},e.prototype.setUnsubscribeCallback=function(e){this.unsubscribeCallback=e},e}();var _e,ve=(_e=function(e,t){var n,r;return(_e=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}_e(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),ge=function(e){function t(){var t=e.call(this,function(e){if(t.isCompleted)return e.complete(),function(){};var n=(t.subscriberIdCounter++).toString();return t.subscribers[n]=e,function(){delete t.subscribers[n]}})||this;return t.subscribers={},t.subscriberIdCounter=1,t.isCompleted=!1,t}return ve(t,e),t.prototype.next=function(e){var t=this;Object.keys(this.subscribers).forEach(function(n){t.subscribers[n].next(e)})},t.prototype.complete=function(){var e=this;Object.keys(this.subscribers).forEach(function(t){return e.subscribers[t].complete()}),this.subscribers={},this.isCompleted=!0},t.prototype.subscriberCount=function(){return Object.keys(this.subscribers).length},t.prototype.isClosed=function(){return this.isCompleted},t}(he);n.d(t,"p",function(){return p}),n.d(t,"d",function(){return h}),n.d(t,"e",function(){return m}),n.d(t,"a",function(){return s.ArgumentError}),n.d(t,"g",function(){return s.InternalError}),n.d(t,"h",function(){return s.ResourceNotFoundError}),n.d(t,"i",function(){return s.ScrivitoError}),n.d(t,"Q",function(){return f}),n.d(t,"G",function(){return d}),n.d(t,"I",function(){return i}),n.d(t,"O",function(){return c}),n.d(t,"M",function(){return _}),n.d(t,"F",function(){return g}),n.d(t,"x",function(){return y}),n.d(t,"D",function(){return b}),n.d(t,"E",function(){return w}),n.d(t,"o",function(){return D}),n.d(t,"q",function(){return L}),n.d(t,"N",function(){return P}),n.d(t,"R",function(){return j}),n.d(t,"y",function(){return T}),n.d(t,"f",function(){return N}),n.d(t,"c",function(){return I}),n.d(t,"z",function(){return A}),n.d(t,"m",function(){return Y}),n.d(t,"L",function(){return F}),n.d(t,"K",function(){return R}),n.d(t,"P",function(){return W}),n.d(t,"H",function(){return K}),n.d(t,"t",function(){return G}),n.d(t,"u",function(){return q}),n.d(t,"B",function(){return $}),n.d(t,"w",function(){return J}),n.d(t,"A",function(){return Q}),n.d(t,"C",function(){return V}),n.d(t,"S",function(){return ee}),n.d(t,"T",function(){return te}),n.d(t,"v",function(){return ne}),n.d(t,"J",function(){return ie}),n.d(t,"j",function(){return oe}),n.d(t,"b",function(){return se}),n.d(t,"s",function(){return ue}),n.d(t,"n",function(){return de}),n.d(t,"r",function(){return fe}),n.d(t,"k",function(){return he}),n.d(t,"l",function(){return ge})},function(e,t,n){"use strict";e.exports=n(178)},function(e,t,n){(function(e,n){var r;!function(){var i="object"==typeof self&&self.self===self&&self||"object"==typeof e&&e.global===e&&e||this||{},o=i._,a=Array.prototype,s=Object.prototype,c="undefined"!=typeof Symbol?Symbol.prototype:null,u=a.push,l=a.slice,d=s.toString,f=s.hasOwnProperty,p=Array.isArray,h=Object.keys,m=Object.create,_=function(){},v=function(e){return e instanceof v?e:this instanceof v?void(this._wrapped=e):new v(e)};t.nodeType?i._=v:(!n.nodeType&&n.exports&&(t=n.exports=v),t._=v),v.VERSION="1.9.1";var g,y=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}},b=function(e,t,n){return v.iteratee!==g?v.iteratee(e,t):null==e?v.identity:v.isFunction(e)?y(e,t,n):v.isObject(e)&&!v.isArray(e)?v.matcher(e):v.property(e)};v.iteratee=g=function(e,t){return b(e,t,1/0)};var w=function(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+t];switch(t){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r);case 2:return e.call(this,arguments[0],arguments[1],r)}var o=Array(t+1);for(i=0;i<t;i++)o[i]=arguments[i];return o[t]=r,e.apply(this,o)}},k=function(e){if(!v.isObject(e))return{};if(m)return m(e);_.prototype=e;var t=new _;return _.prototype=null,t},S=function(e){return function(t){return null==t?void 0:t[e]}},O=function(e,t){return null!=e&&f.call(e,t)},C=function(e,t){for(var n=t.length,r=0;r<n;r++){if(null==e)return;e=e[t[r]]}return n?e:void 0},M=Math.pow(2,53)-1,x=S("length"),E=function(e){var t=x(e);return"number"==typeof t&&t>=0&&t<=M};v.each=v.forEach=function(e,t,n){var r,i;if(t=y(t,n),E(e))for(r=0,i=e.length;r<i;r++)t(e[r],r,e);else{var o=v.keys(e);for(r=0,i=o.length;r<i;r++)t(e[o[r]],o[r],e)}return e},v.map=v.collect=function(e,t,n){t=b(t,n);for(var r=!E(e)&&v.keys(e),i=(r||e).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=t(e[s],s,e)}return o};var T=function(e){return function(t,n,r,i){var o=arguments.length>=3;return function(t,n,r,i){var o=!E(t)&&v.keys(t),a=(o||t).length,s=e>0?0:a-1;for(i||(r=t[o?o[s]:s],s+=e);s>=0&&s<a;s+=e){var c=o?o[s]:s;r=n(r,t[c],c,t)}return r}(t,y(n,i,4),r,o)}};v.reduce=v.foldl=v.inject=T(1),v.reduceRight=v.foldr=T(-1),v.find=v.detect=function(e,t,n){var r=(E(e)?v.findIndex:v.findKey)(e,t,n);if(void 0!==r&&-1!==r)return e[r]},v.filter=v.select=function(e,t,n){var r=[];return t=b(t,n),v.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},v.reject=function(e,t,n){return v.filter(e,v.negate(b(t)),n)},v.every=v.all=function(e,t,n){t=b(t,n);for(var r=!E(e)&&v.keys(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(!t(e[a],a,e))return!1}return!0},v.some=v.any=function(e,t,n){t=b(t,n);for(var r=!E(e)&&v.keys(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(t(e[a],a,e))return!0}return!1},v.contains=v.includes=v.include=function(e,t,n,r){return E(e)||(e=v.values(e)),("number"!=typeof n||r)&&(n=0),v.indexOf(e,t,n)>=0},v.invoke=w(function(e,t,n){var r,i;return v.isFunction(t)?i=t:v.isArray(t)&&(r=t.slice(0,-1),t=t[t.length-1]),v.map(e,function(e){var o=i;if(!o){if(r&&r.length&&(e=C(e,r)),null==e)return;o=e[t]}return null==o?o:o.apply(e,n)})}),v.pluck=function(e,t){return v.map(e,v.property(t))},v.where=function(e,t){return v.filter(e,v.matcher(t))},v.findWhere=function(e,t){return v.find(e,v.matcher(t))},v.max=function(e,t,n){var r,i,o=-1/0,a=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,c=(e=E(e)?e:v.values(e)).length;s<c;s++)null!=(r=e[s])&&r>o&&(o=r);else t=b(t,n),v.each(e,function(e,n,r){((i=t(e,n,r))>a||i===-1/0&&o===-1/0)&&(o=e,a=i)});return o},v.min=function(e,t,n){var r,i,o=1/0,a=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,c=(e=E(e)?e:v.values(e)).length;s<c;s++)null!=(r=e[s])&&r<o&&(o=r);else t=b(t,n),v.each(e,function(e,n,r){((i=t(e,n,r))<a||i===1/0&&o===1/0)&&(o=e,a=i)});return o},v.shuffle=function(e){return v.sample(e,1/0)},v.sample=function(e,t,n){if(null==t||n)return E(e)||(e=v.values(e)),e[v.random(e.length-1)];var r=E(e)?v.clone(e):v.values(e),i=x(r);t=Math.max(Math.min(t,i),0);for(var o=i-1,a=0;a<t;a++){var s=v.random(a,o),c=r[a];r[a]=r[s],r[s]=c}return r.slice(0,t)},v.sortBy=function(e,t,n){var r=0;return t=b(t,n),v.pluck(v.map(e,function(e,n,i){return{value:e,index:r++,criteria:t(e,n,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index}),"value")};var j=function(e,t){return function(n,r,i){var o=t?[[],[]]:{};return r=b(r,i),v.each(n,function(t,i){var a=r(t,i,n);e(o,t,a)}),o}};v.groupBy=j(function(e,t,n){O(e,n)?e[n].push(t):e[n]=[t]}),v.indexBy=j(function(e,t,n){e[n]=t}),v.countBy=j(function(e,t,n){O(e,n)?e[n]++:e[n]=1});var D=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;v.toArray=function(e){return e?v.isArray(e)?l.call(e):v.isString(e)?e.match(D):E(e)?v.map(e,v.identity):v.values(e):[]},v.size=function(e){return null==e?0:E(e)?e.length:v.keys(e).length},v.partition=j(function(e,t,n){e[n?0:1].push(t)},!0),v.first=v.head=v.take=function(e,t,n){return null==e||e.length<1?null==t?void 0:[]:null==t||n?e[0]:v.initial(e,e.length-t)},v.initial=function(e,t,n){return l.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},v.last=function(e,t,n){return null==e||e.length<1?null==t?void 0:[]:null==t||n?e[e.length-1]:v.rest(e,Math.max(0,e.length-t))},v.rest=v.tail=v.drop=function(e,t,n){return l.call(e,null==t||n?1:t)},v.compact=function(e){return v.filter(e,Boolean)};var L=function(e,t,n,r){for(var i=(r=r||[]).length,o=0,a=x(e);o<a;o++){var s=e[o];if(E(s)&&(v.isArray(s)||v.isArguments(s)))if(t)for(var c=0,u=s.length;c<u;)r[i++]=s[c++];else L(s,t,n,r),i=r.length;else n||(r[i++]=s)}return r};v.flatten=function(e,t){return L(e,t,!1)},v.without=w(function(e,t){return v.difference(e,t)}),v.uniq=v.unique=function(e,t,n,r){v.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=b(n,r));for(var i=[],o=[],a=0,s=x(e);a<s;a++){var c=e[a],u=n?n(c,a,e):c;t&&!n?(a&&o===u||i.push(c),o=u):n?v.contains(o,u)||(o.push(u),i.push(c)):v.contains(i,c)||i.push(c)}return i},v.union=w(function(e){return v.uniq(L(e,!0,!0))}),v.intersection=function(e){for(var t=[],n=arguments.length,r=0,i=x(e);r<i;r++){var o=e[r];if(!v.contains(t,o)){var a;for(a=1;a<n&&v.contains(arguments[a],o);a++);a===n&&t.push(o)}}return t},v.difference=w(function(e,t){return t=L(t,!0,!0),v.filter(e,function(e){return!v.contains(t,e)})}),v.unzip=function(e){for(var t=e&&v.max(e,x).length||0,n=Array(t),r=0;r<t;r++)n[r]=v.pluck(e,r);return n},v.zip=w(v.unzip),v.object=function(e,t){for(var n={},r=0,i=x(e);r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n};var P=function(e){return function(t,n,r){n=b(n,r);for(var i=x(t),o=e>0?0:i-1;o>=0&&o<i;o+=e)if(n(t[o],o,t))return o;return-1}};v.findIndex=P(1),v.findLastIndex=P(-1),v.sortedIndex=function(e,t,n,r){for(var i=(n=b(n,r,1))(t),o=0,a=x(e);o<a;){var s=Math.floor((o+a)/2);n(e[s])<i?o=s+1:a=s}return o};var I=function(e,t,n){return function(r,i,o){var a=0,s=x(r);if("number"==typeof o)e>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=t(l.call(r,a,s),v.isNaN))>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&o<s;o+=e)if(r[o]===i)return o;return-1}};v.indexOf=I(1,v.findIndex,v.sortedIndex),v.lastIndexOf=I(-1,v.findLastIndex),v.range=function(e,t,n){null==t&&(t=e||0,e=0),n||(n=t<e?-1:1);for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),o=0;o<r;o++,e+=n)i[o]=e;return i},v.chunk=function(e,t){if(null==t||t<1)return[];for(var n=[],r=0,i=e.length;r<i;)n.push(l.call(e,r,r+=t));return n};var N=function(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var o=k(e.prototype),a=e.apply(o,i);return v.isObject(a)?a:o};v.bind=w(function(e,t,n){if(!v.isFunction(e))throw new TypeError("Bind must be called on a function");var r=w(function(i){return N(e,r,t,this,n.concat(i))});return r}),v.partial=w(function(e,t){var n=v.partial.placeholder,r=function(){for(var i=0,o=t.length,a=Array(o),s=0;s<o;s++)a[s]=t[s]===n?arguments[i++]:t[s];for(;i<arguments.length;)a.push(arguments[i++]);return N(e,r,this,this,a)};return r}),v.partial.placeholder=v,v.bindAll=w(function(e,t){var n=(t=L(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=v.bind(e[r],e)}}),v.memoize=function(e,t){var n=function(r){var i=n.cache,o=""+(t?t.apply(this,arguments):r);return O(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return n.cache={},n},v.delay=w(function(e,t,n){return setTimeout(function(){return e.apply(null,n)},t)}),v.defer=v.partial(v.delay,v,1),v.throttle=function(e,t,n){var r,i,o,a,s=0;n||(n={});var c=function(){s=!1===n.leading?0:v.now(),r=null,a=e.apply(i,o),r||(i=o=null)},u=function(){var u=v.now();s||!1!==n.leading||(s=u);var l=t-(u-s);return i=this,o=arguments,l<=0||l>t?(r&&(clearTimeout(r),r=null),s=u,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(c,l)),a};return u.cancel=function(){clearTimeout(r),s=0,r=i=o=null},u},v.debounce=function(e,t,n){var r,i,o=function(t,n){r=null,n&&(i=e.apply(t,n))},a=w(function(a){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(o,t),s&&(i=e.apply(this,a))}else r=v.delay(o,t,this,a);return i});return a.cancel=function(){clearTimeout(r),r=null},a},v.wrap=function(e,t){return v.partial(t,e)},v.negate=function(e){return function(){return!e.apply(this,arguments)}},v.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},v.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},v.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},v.once=v.partial(v.before,2),v.restArguments=w;var A=!{toString:null}.propertyIsEnumerable("toString"),Y=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],R=function(e,t){var n=Y.length,r=e.constructor,i=v.isFunction(r)&&r.prototype||s,o="constructor";for(O(e,o)&&!v.contains(t,o)&&t.push(o);n--;)(o=Y[n])in e&&e[o]!==i[o]&&!v.contains(t,o)&&t.push(o)};v.keys=function(e){if(!v.isObject(e))return[];if(h)return h(e);var t=[];for(var n in e)O(e,n)&&t.push(n);return A&&R(e,t),t},v.allKeys=function(e){if(!v.isObject(e))return[];var t=[];for(var n in e)t.push(n);return A&&R(e,t),t},v.values=function(e){for(var t=v.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=e[t[i]];return r},v.mapObject=function(e,t,n){t=b(t,n);for(var r=v.keys(e),i=r.length,o={},a=0;a<i;a++){var s=r[a];o[s]=t(e[s],s,e)}return o},v.pairs=function(e){for(var t=v.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r},v.invert=function(e){for(var t={},n=v.keys(e),r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t},v.functions=v.methods=function(e){var t=[];for(var n in e)v.isFunction(e[n])&&t.push(n);return t.sort()};var F=function(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=e(o),s=a.length,c=0;c<s;c++){var u=a[c];t&&void 0!==n[u]||(n[u]=o[u])}return n}};v.extend=F(v.allKeys),v.extendOwn=v.assign=F(v.keys),v.findKey=function(e,t,n){t=b(t,n);for(var r,i=v.keys(e),o=0,a=i.length;o<a;o++)if(t(e[r=i[o]],r,e))return r};var H,W,B=function(e,t,n){return t in n};v.pick=w(function(e,t){var n={},r=t[0];if(null==e)return n;v.isFunction(r)?(t.length>1&&(r=y(r,t[1])),t=v.allKeys(e)):(r=B,t=L(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i<o;i++){var a=t[i],s=e[a];r(s,a,e)&&(n[a]=s)}return n}),v.omit=w(function(e,t){var n,r=t[0];return v.isFunction(r)?(r=v.negate(r),t.length>1&&(n=t[1])):(t=v.map(L(t,!1,!1),String),r=function(e,n){return!v.contains(t,n)}),v.pick(e,r,n)}),v.defaults=F(v.allKeys,!0),v.create=function(e,t){var n=k(e);return t&&v.extendOwn(n,t),n},v.clone=function(e){return v.isObject(e)?v.isArray(e)?e.slice():v.extend({},e):e},v.tap=function(e,t){return t(e),e},v.isMatch=function(e,t){var n=v.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),o=0;o<r;o++){var a=n[o];if(t[a]!==i[a]||!(a in i))return!1}return!0},H=function(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&W(e,t,n,r)},W=function(e,t,n,r){e instanceof v&&(e=e._wrapped),t instanceof v&&(t=t._wrapped);var i=d.call(e);if(i!==d.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return c.valueOf.call(e)===c.valueOf.call(t)}var o="[object Array]"===i;if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!(v.isFunction(a)&&a instanceof a&&v.isFunction(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}r=r||[];for(var u=(n=n||[]).length;u--;)if(n[u]===e)return r[u]===t;if(n.push(e),r.push(t),o){if((u=e.length)!==t.length)return!1;for(;u--;)if(!H(e[u],t[u],n,r))return!1}else{var l,f=v.keys(e);if(u=f.length,v.keys(t).length!==u)return!1;for(;u--;)if(l=f[u],!O(t,l)||!H(e[l],t[l],n,r))return!1}return n.pop(),r.pop(),!0},v.isEqual=function(e,t){return H(e,t)},v.isEmpty=function(e){return null==e||(E(e)&&(v.isArray(e)||v.isString(e)||v.isArguments(e))?0===e.length:0===v.keys(e).length)},v.isElement=function(e){return!(!e||1!==e.nodeType)},v.isArray=p||function(e){return"[object Array]"===d.call(e)},v.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},v.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(e){v["is"+e]=function(t){return d.call(t)==="[object "+e+"]"}}),v.isArguments(arguments)||(v.isArguments=function(e){return O(e,"callee")});var z=i.document&&i.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof z&&(v.isFunction=function(e){return"function"==typeof e||!1}),v.isFinite=function(e){return!v.isSymbol(e)&&isFinite(e)&&!isNaN(parseFloat(e))},v.isNaN=function(e){return v.isNumber(e)&&isNaN(e)},v.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"===d.call(e)},v.isNull=function(e){return null===e},v.isUndefined=function(e){return void 0===e},v.has=function(e,t){if(!v.isArray(t))return O(e,t);for(var n=t.length,r=0;r<n;r++){var i=t[r];if(null==e||!f.call(e,i))return!1;e=e[i]}return!!n},v.noConflict=function(){return i._=o,this},v.identity=function(e){return e},v.constant=function(e){return function(){return e}},v.noop=function(){},v.property=function(e){return v.isArray(e)?function(t){return C(t,e)}:S(e)},v.propertyOf=function(e){return null==e?function(){}:function(t){return v.isArray(t)?C(e,t):e[t]}},v.matcher=v.matches=function(e){return e=v.extendOwn({},e),function(t){return v.isMatch(t,e)}},v.times=function(e,t,n){var r=Array(Math.max(0,e));t=y(t,n,1);for(var i=0;i<e;i++)r[i]=t(i);return r},v.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},v.now=Date.now||function(){return(new Date).getTime()};var U={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},q=v.invert(U),V=function(e){var t=function(t){return e[t]},n="(?:"+v.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};v.escape=V(U),v.unescape=V(q),v.result=function(e,t,n){v.isArray(t)||(t=[t]);var r=t.length;if(!r)return v.isFunction(n)?n.call(e):n;for(var i=0;i<r;i++){var o=null==e?void 0:e[t[i]];void 0===o&&(o=n,i=r),e=v.isFunction(o)?o.call(e):o}return e};var $=0;v.uniqueId=function(e){var t=++$+"";return e?e+t:t},v.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var G=/(.)^/,K={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},J=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(e){return"\\"+K[e]};v.template=function(e,t,n){!t&&n&&(t=n),t=v.defaults({},t,v.templateSettings);var r,i=RegExp([(t.escape||G).source,(t.interpolate||G).source,(t.evaluate||G).source].join("|")+"|$","g"),o=0,a="__p+='";e.replace(i,function(t,n,r,i,s){return a+=e.slice(o,s).replace(J,Q),o=s+t.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),t}),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(t.variable||"obj","_",a)}catch(e){throw e.source=a,e}var s=function(e){return r.call(this,e,v)},c=t.variable||"obj";return s.source="function("+c+"){\n"+a+"}",s},v.chain=function(e){var t=v(e);return t._chain=!0,t};var Z=function(e,t){return e._chain?v(t).chain():t};v.mixin=function(e){return v.each(v.functions(e),function(t){var n=v[t]=e[t];v.prototype[t]=function(){var e=[this._wrapped];return u.apply(e,arguments),Z(this,n.apply(v,e))}}),v},v.mixin(v),v.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=a[e];v.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],Z(this,n)}}),v.each(["concat","join","slice"],function(e){var t=a[e];v.prototype[e]=function(){return Z(this,t.apply(this._wrapped,arguments))}}),v.prototype.value=function(){return this._wrapped},v.prototype.valueOf=v.prototype.toJSON=v.prototype.value,v.prototype.toString=function(){return String(this._wrapped)},void 0===(r=function(){return v}.apply(t,[]))||(n.exports=r)}()}).call(this,n(48),n(85)(e))},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"deserialize",function(){return X});var i=n(53),o=n(56),a=n(11);var s=function(){function e(e,t,n){this.container=e,this.attributeName=t,this.typeInfo=n,this.typeOptions=this.typeInfo[1]||{}}return e.prototype.get=function(){return this.container.get(this.attributeName,this.typeInfo)},e.prototype.update=function(e){var t;this.container.update(((t={})[this.attributeName]=[e,this.typeInfo],t))},e.prototype.getContainer=function(){return this.container},e.prototype.obj=function(){return this.container.obj()},e.prototype.name=function(){return this.attributeName},e.prototype.type=function(){return this.typeInfo[0]},e.prototype.workspaceId=function(){return this.obj().workspaceId()},e.prototype.equals=function(t){return n=t,!!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&(this.container.equals(t.getContainer())&&this.attributeName===t.name());var n,r},e.prototype.validClasses=function(){return this.typeOptions.validClasses},e.prototype.getDiff=function(){var e=this.obj();return Object(a.h)(this.workspaceId(),this.attributeName,e.id(),this.container===e?void 0:this.container.id())},e.prototype.toString=function(){var e=this.obj(),t=this.attributeName;return this.container===e?"<BasicField name="+t+" objId="+e.id()+">":"<BasicField name="+t+" objId="+e.id()+" widgetId="+this.container.id()+">"},e.prototype.id=function(){var e=this.obj();return this.container===e?this.attributeName+"|"+e.id():this.attributeName+"|"+e.id()+"|"+this.container.id()},e}(),c=n(0),u=n(13);function l(e){return u.parseQuery(e)}function d(e){return new u(e).query(!0)}var f=n(2),p=n.n(f),h=n(95);var m=function(){function e(e){var t=e.name,n=e.count,r=e.includedObjIds;this._name=t,this._count=n,this._includedObjIds=r}return e.prototype.name=function(){return this._name},e.prototype.count=function(){return this._count},e.prototype.includedObjs=function(){return Object(f.compact)(this._includedObjIds.map(function(e){return Re.get(e)}))},e}();function _(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}var v=["contains","containsPrefix","equals","startsWith","isGreaterThan","isLessThan","linksTo","refersTo"],g=["equals","startsWith","isGreaterThan","isLessThan"],y=["contains","containsPrefix"],b={query:[]},w=function(){function e(e){void 0===e&&(e=b);this._query=[].concat(e.query),this._batchSize=e.batchSize,this._offset=e.offset,this._sortBy=e.sortBy,this._sortDirection=e.sortDirection,this._includeDeleted=e.includeDeleted}return e.prototype.and=function(t,n,r,i){if(_(t,e))this._query=this._query.concat(t._query);else{if(void 0===n)throw new c.a("Missing operator to search with");if(void 0===r)throw new c.a('Missing value to search (specify "null" for missing)');var o=k(t,n,r);i&&(!function(e){if(!Object(f.contains)(y,e))throw new c.a('Boosting operator "'+e+'" is invalid.')}(n),o.boost=function(e){var t={};return Object(f.each)(e,function(e,n){var r=O(n);t[r]=e}),t}(i)),this._query.push(o)}return this},e.prototype.andNot=function(e,t,n){var r=k(e,t,n);return function(e){if(!Object(f.contains)(g,e))throw new c.a('Negating operator "'+e+'" is invalid.')}(t),r.negate=!0,this._query.push(r),this},e.prototype.offset=function(e){return this._offset=e,this},e.prototype.order=function(e,t){return void 0===t&&(t="asc"),this._sortBy=O(e),this._sortDirection=t,this},e.prototype.batchSize=function(e){return this._batchSize=e,this},e.prototype.includeDeleted=function(){return this._includeDeleted=!0,this},e.prototype.count=function(){return this.getObjDataQuery().count()},e.prototype.first=function(){return this.take(1)[0]||null},e.prototype.take=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];x.apply(void 0,[e].concat(t));var r=this._batchSize;try{return this._batchSize=void 0===e?1e3:e,Object(c.m)(this,e)}finally{this._batchSize=r}},e.prototype.iterator=function(){var e=this.getObjDataQuery().iterator();return{next:function(){var t=e.next(),n=t.done,r=t.value;return n?{done:!0}:{done:!1,value:new Re(r)}}}},e.prototype.getObjDataQuery=function(){return Object(a.j)(se(),this.params(),this.getBatchSize())},e.prototype.getBatchSize=function(){return this._batchSize||100},e.prototype.facet=function(e,t){var n;return n=void 0===t?{}:function(e){var t=f.without.apply(void 0,[Object.keys(e)].concat(C));if(t.length)throw new c.a("Invalid facet options: "+Object(c.I)(t)+". Valid options: "+C);return e}(t),new a.a(se(),O(e),n,this._query).result().map(function(e){return new m(e)})},e.prototype.store=function(e,t){Object(a.p)(se(),this.params(),e,t)},e.prototype.params=function(){return Object(f.omit)({query:this._query,offset:this._offset,sortBy:this._sortBy,sortDirection:this._sortDirection,includeDeleted:this._includeDeleted,batchSize:this._batchSize},f.isUndefined)},e}();function k(e,t,n){return{field:function(e){if(Object(f.isArray)(e))return Object(f.map)(e,O);return O(e)}(e),operator:function(e){if(!function(e){return Object(f.contains)(v,e)}(e))throw new c.a('Operator "'+e+'" is invalid.');return Object(c.R)(e)}(t),value:function(e){if(Object(f.isArray)(e))return Object(f.map)(e,S);return S(e)}(n)}}function S(e){return Object(f.isDate)(e)?Object(c.w)(e):_(e,Re)?e.id():e}function O(e){if(!Object(c.y)(e))throw new c.a('Attribute name "'+e+'" is not camel case.');return Object(c.R)(e)}var C=["limit","includeObjs"];var M=c.O.refinement(c.O.Number,function(e){return e>=0},"Number (positive)"),x=Object(c.p)("objSearch.take",[["count",c.O.maybe(M)]],{docPermalink:"js-sdk/ObjSearch-take"});function E(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}var T=c.O.irreducible("Obj",function(e){return I(e,Re)}),j=c.O.irreducible("Widget",function(e){return I(e,ye)}),D=c.O.irreducible("Link",function(e){return I(e,qe)}),L=c.O.irreducible("ObjSearch",function(e){return I(e,w)}),P=c.O.irreducible("Binary",function(e){return E(e,G)});function I(e,t){return!!e&&E(e._scrivitoPrivateContent,t)}var N,A=n(6);function Y(e){N=e}var R=function(){function e(e,t){void 0===t&&(t={});var n=t.filename;if(this.contentType=t.contentType,e.idToCopy)this.idToCopy=e.idToCopy;else{var r=e.source;this.source=r,this.contentType||(this.contentType=r.type),n||(n=r.name)}n&&(this.filename=n.replace(/[^\w\-_\.$]/g,"-"))}return e.prototype.into=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return F.apply(void 0,[e].concat(t)),Object(A.g)("Changing CMS content"),this.intoId(e._scrivitoPrivateContent.id())},e.prototype.intoId=function(e){if(!N)throw new c.g("No binaryHandler defined!");var t;if(this.idToCopy)t=N.copyBinary(this.idToCopy,e,this.filename,this.contentType);else{if(!this.source)throw new c.g("Source is not defined!");t=N.uploadBinary(e,this.source,this.filename,this.contentType)}return t.then(function(e){var t=e.id;return new G(t,!1)})},e}(),F=Object(c.p)("FutureBinary#into",[["target",T]],{docPermalink:"js-sdk/FutureBinary-into"});var H,W=R,B=n(5),z=n(9);!function(e){e.Date="date",e.Number="number",e.String="string",e.Stringlist="stringlist"}(H||(H={}));var U=new B.LoadableCollection({name:"metadata",state:function(){return A.c.subState("metadataCollection")},loader:function(e){return z.e.retrieveBinaryMetadata(e)}}),q=function(){function e(e){this.binaryId=e,e&&(this.loadableData=U.get(e))}return e.store=function(e,t){V(t),U.get(e).set(t)},e.prototype.get=function(e){Object(a.c)("MetadataCollection#get"),function(e){if(!Object(c.y)(e))throw new c.a('Metadata key "'+e+'" is not in camel case.')}(e);var t=this.getData();if(t){var n=Object(c.R)(e);return t.hasOwnProperty(n)?t[n]:null}return null},e.prototype.keys=function(){var e=this.getData();return e?Object(f.map)(Object(f.keys)(e),c.o):[]},e.prototype.contentLength=function(){var e=this.get("contentLength");return"number"!=typeof e?0:e},e.prototype.contentType=function(){var e=this.get("contentType");return"string"!=typeof e?"":e},e.prototype.getData=function(){if(this.loadableData){var e=this.loadableData.get();if(e)return V(e)}},e}();function V(e){for(var t=e.meta_data,n={},r=0,i=Object.keys(t);r<i.length;r++){var o=i[r],a=t[o],s=a[0],u=a[1];if(null==u)throw new c.g('Invalid backend value "null" or "undefined" for metadata "'+o+'"');var l=void 0;if(s===H.Date){if("string"!=typeof u)throw new c.g('Invalid non-string backend value for a date metadata "'+o+'"');l=Object(c.t)(u)}else l=u;n[o]=l}return n}var $=new B.LoadableCollection({name:"binary",state:function(){return A.c.subState("binary")},loader:function(e){var t=e[0],n=e[1];return z.e.retrieveBinaryUrls(t,n)}}),G=function(){function e(e,t,n){void 0===t&&(t=!0),void 0===n&&(n={}),this._id=e,this._isPublic=!!t,this._transformation=n||void 0,this._loadableData=$.get([e,this._transformation])}return e.upload=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(Q.apply(void 0,[e,t].concat(n)),!(c.f.is(e)||t&&t.filename))throw new c.a("Expected a filename to be passed with Blob as the source.");return new W({source:e},t)},e.store=function(t,n,r){var i=n.transformation;$.get([t,i]).set(r);var o=new e(t).raw();return i?o.optimizeFor(i):o},e.storeMetadata=function(e,t){q.store(e,t)},e.prototype.id=function(){return this._id},e.prototype.copy=function(e){return new W({idToCopy:this._id},e)},e.prototype.isPrivate=function(){return!this._isPublic},e.prototype.optimizeFor=function(t){return new e(this._id,this._isPublic,Object(f.extend)({},this._transformation,t))},e.prototype.original=function(){return new e(this._id,this._isPublic,{})},e.prototype.raw=function(){return new e(this._id,this._isPublic,null)},e.prototype.isExplicitlyTransformed=function(){return this.isTransformed()&&!Object(f.isEmpty)(this._transformation)},e.prototype.isRaw=function(){return!this.isTransformed()},e.prototype.url=function(){return Object(a.c)("Binary#url"),this.urlWithoutPlaceholder()||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},e.prototype.urlWithoutPlaceholder=function(){var e=this._loadableData.get();if(e){var t=e[this.accessType()];if(!t)throw new c.g("Missing key "+this.accessType+" in binary data");return t.get.url}},e.prototype.filename=function(){var e=this.url();return!e||e.match(/^data:/)?"":u(e).path().split("/").pop()||""},e.prototype.metadata=function(){return this.assertNotTransformed("Metadata"),new q(this._id)},e.prototype.contentType=function(){return this.assertNotTransformed("Content type"),this.metadata().contentType()},e.prototype.contentLength=function(){return this.assertNotTransformed("Content length"),this.metadata().contentLength()},e.prototype.extname=function(){if(this.raw().filename().indexOf(".")>-1){var e=/[^.\\]*$/.exec(this.raw().filename());if(e)return e[0].toLowerCase()}return""},e.prototype.equals=function(t){return n=t,(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&t.id()===this.id()&&t.isPrivate()===this.isPrivate()&&Object(f.isEqual)(t.definition(),this.definition());var n,r},e.prototype.isImage=function(){var e=this.raw().contentType();return!!e&&"image"===e.split("/")[0]},e.prototype.definition=function(){return this._transformation||null},e.prototype.accessType=function(){return this.isPrivate()?"private_access":"public_access"},e.prototype.assertNotTransformed=function(e){if(this.isTransformed())throw new c.i('"'+e+'" is not available for transformed images. Use "Scrivito.Binary#raw" to access the untransformed version of the image.')},e.prototype.isTransformed=function(){return!!this._transformation},e}(),K=c.O.struct({contentType:c.O.maybe(c.O.String),filename:c.O.maybe(c.O.String)}),J=c.O.refinement(c.O.Object,function(e){return c.c.is(e)||c.f.is(e)},"Blob or File"),Q=Object(c.p)("Binary.upload",[["source",J],["options",c.O.maybe(K)]],{docPermalink:"js-sdk/Binary-static-upload"});function Z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function X(e,t,n,r){var i=Z(t,2),o=i[0],a=i[1];switch(n){case"binary":return function(e,t){if("binary"===e&&t){var n=t.id,r="published"===se();return new G(n,r)}return null}(o,a);case"date":return function(e,t){if("date"!==e)return null;return Object(c.t)(t)}(o,a);case"float":return function(e,t){switch(e){case"string":return t.match(/^-?\d+(\.\d+)?$/)?ee(t):null;case"number":return ee(t);default:return null}}(o,a);case"enum":return function(e,t,n){var r=n.values;if("string"===e&&p.a.contains(r,t))return t;return null}(o,a,r);case"html":return function(e,t){if(p.a.contains(["html","string"],e)&&p.a.isString(t))return t;return""}(o,a);case"integer":return function(e,t){switch(e){case"string":case"number":return Object(c.u)(t);default:return null}}(o,a);case"link":return function(e,t){if("link"!==e||!p.a.isObject(t))return null;return te(t)}(o,a);case"linklist":return function(e,t){if(!p.a.isArray(t))return[];return p.a.compact(t.map(te))}(0,a);case"multienum":return function(e,t,n){var r=n.values;if("stringlist"!==e||!Array.isArray(t))return[];return p.a.intersection(t,r)}(o,a,r);case"reference":return function(e,t,n){if("reference"===e&&t)return ne(t,n);return null}(o,a,e);case"referencelist":return function(e,t,n){if("referencelist"!==e)return[];if(!t)return[];var r=t.map(function(e){return ne(e,n)});return p.a.compact(r)}(o,a,e);case"string":return function(e,t){if(p.a.contains(["html","string"],e)&&p.a.isString(t))return t;return""}(o,a);case"stringlist":return function(e,t){if("stringlist"!==e||!Array.isArray(t))return[];return t}(o,a);case"widgetlist":return function(e,t,n){if("widgetlist"!==e)return[];return p.a.map(t,function(e){return n.widget(e)})}(o,a,e);default:return null}}function ee(e){var t=parseFloat(e);return Object(c.B)(t)?t:null}function te(e){var t=p.a.pick(e,"query","rel","target","title","url");"fragment"in e&&(t.hash=e.fragment),"obj_id"in e&&(t.objId=e.obj_id);var n=new qe(t);return n.isBroken()?null:n}function ne(e,t){var n=Re.getInWorkspace(t.workspaceId(),e);return n||null}var re=function(){function e(){}return e.prototype.get=function(e,t){var n=Object(c.R)(e),i=this.getAttributeData(n);return i&&f.isArray(i)||(i=[]),"string"==typeof t?X(this,i,t):X.apply(r,[this,i].concat(t))},e.prototype.serializeAttributes=function(e){var t=this;return f.mapObject(e,function(e,n){if(function(e){return f.isArray(e)&&"widgetlist"===e[0]}(e)){var r=Object(c.o)(n);return["widgetlist",f.invoke(t.get(r,["widgetlist"]),"serializeAttributes")]}return e})},e.prototype.persistWidgets=function(e,t){f.each(t,function(t){if(function(e){if(!e)return!1;if(!f.isArray(e))return!1;if(e.length<2)return!1;var t=e[1];return f.isArray(t)&&t.length>0&&"widgetlist"===t[0]}(t)){var n=t[0];if(n){var r=f.isArray(n)?n:[n];f.each(r,function(t){t.isPersisted()||t.persistInObj(e)})}}})},e}();function ie(e){return f.mapObject(e,function(e,t){if(Object(c.z)(t))return f.isArray(e)?e:[e];if(!f.isArray(e))throw new c.g("Value for "+t+" should be a tuple: [value, typeInfo]");var n=e[0],r=e[1];return"string"==typeof r?[n,[r]]:[n,r]})}var oe,ae="published";function se(){return oe||ae}function ce(e){oe=e}function ue(){oe=void 0}function le(e){return(le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function fe(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}function pe(e,t){return!t||"object"!==le(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function he(e,t,n){return(he="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=me(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function me(e){return(me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ve(e,t,n){return t&&_e(e.prototype,t),n&&_e(e,n),e}function ge(e,t){return(ge=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ye=function(e){function t(e){var n;return function(e,t){if(!fe(e,t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=pe(this,me(t).call(this)))._attributesToBeSaved=ie(e),function(e){if(!e)throw new c.a('Please provide a widget class as the "_objClass" property.')}(e._objClass),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ge(e,t)}(t,re),ve(t,null,[{key:"build",value:function(e,n){var r=Object.create(t.prototype);return r._obj=n,r._id=e,r}},{key:"newWithSerializedAttributes",value:function(e){var n={},r={};p.a.each(e,function(e,i){if("_obj_class"!==i)if(p.a.isArray(e)&&"widgetlist"===p.a.first(e)){var o=p.a.map(p.a.last(e),function(e){return t.newWithSerializedAttributes(e)}),a=Object(c.o)(i);n[a]=[o,["widgetlist"]]}else r[i]=e;else n._objClass=[e]});var i=new t(n);return i.preserializedAttributes=r,i}}]),ve(t,[{key:"id",value:function(){return this._failIfNotPersisted(),this._id}},{key:"objClass",value:function(){return this.isPersisted()?this.getAttributeData("_obj_class"):this._attributesToBeSaved._objClass[0]}},{key:"obj",value:function(){return this._failIfNotPersisted(),this._obj}},{key:"widget",value:function(e){return this.obj().widget(e)}},{key:"workspaceId",value:function(){return this.obj().workspaceId()}},{key:"modification",value:function(){return Object(a.k)(se(),this.obj().id(),this.id())}},{key:"update",value:function(e){var t=this,n=ie(e);Object(A.r)(function(){t.persistWidgets(t.obj(),n);var e=Ce(n);t._updateSelf(e)})}},{key:"insertBefore",value:function(e){e.obj().insertWidget(this,{before:e})}},{key:"insertAfter",value:function(e){e.obj().insertWidget(this,{after:e})}},{key:"remove",value:function(){this.obj().removeWidget(this)}},{key:"copy",value:function(){return this.isPersisted()?this._copyPersisted():this._copyUnpersisted()}},{key:"persistInObj",value:function(e){this.persistWidgets(e,this._attributesToBeSaved);var t=Ce(this._attributesToBeSaved);p.a.extend(t,this.preserializedAttributes||{}),this._obj=e,this._id=e.generateWidgetId(),this._updateSelf(t),this._executeDidPersistCallback()}},{key:"isPersisted",value:function(){return!!this._obj}},{key:"onDidPersist",value:function(e){if(this.isPersisted())throw new c.i('Cannot call "onDidPersist" of an already persisted widget');this._onDidPersistCallback=e}},{key:"hasOnDidPersistCallback",value:function(){return!!this._onDidPersistCallback}},{key:"finishSaving",value:function(){return this.obj().finishSaving()}},{key:"equals",value:function(e){return!!fe(e,t)&&(this.id()===e.id()&&this.obj().id()===e.obj().id())}},{key:"containingField",value:function(){return this.obj().fieldContainingWidget(this)}},{key:"toPrettyPrint",value:function(){return"[object ".concat(this.objClass(),' id="').concat(this.id(),'" objId="').concat(this.obj().id(),'"]')}},{key:"getAttributeData",value:function(e){return this.obj().getWidgetAttribute(this.id(),e)}},{key:"getData",value:function(){return this.obj().getWidgetData(this.id())}},{key:"serializeAttributes",value:function(){return he(me(t.prototype),"serializeAttributes",this).call(this,this.getData())}},{key:"_failIfNotPersisted",value:function(){if(!this.isPersisted())throw new c.i("Can not access a new widget before it has been saved.")}},{key:"_updateSelf",value:function(e){var t,n,r,i={_widgetPool:[(t={},n=this.id(),r=e,n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t)]};this.obj().update(i)}},{key:"_executeDidPersistCallback",value:function(){this._onDidPersistCallback&&(this._onDidPersistCallback(this),delete this._onDidPersistCallback)}},{key:"_copyPersisted",value:function(){var e=this.serializeAttributes();return t.newWithSerializedAttributes(e)}},{key:"_copyUnpersisted",value:function(){var e=new t(p.a.mapObject(this._attributesToBeSaved,function(e){var t=de(e,2),n=t[0],r=t[1];return r&&"widgetlist"===r[0]?[p.a.invoke(n,"copy"),r]:[n,r]}));return this._onDidPersistCallback&&e.onDidPersist(this._onDidPersistCallback),e}},{key:"attributesToBeSaved",get:function(){return this._attributesToBeSaved}}]),t}();function be(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}function we(e){if(be(e,qe))return!0;if(!f.isObject(e))return!1;var t=f.without(f.keys(e),"hash","obj_id","query","rel","target","title","url");return f.isEmpty(t)}function ke(e){var t,n=be(e,qe)?{rel:(t=e).rel()||void 0,query:t.query(),target:t.target(),title:t.title(),url:t.url(),obj_id:t.objId(),fragment:t.hash()}:function(e){return{obj_id:e.obj_id||null,query:e.query||null,rel:e.rel||void 0,target:e.target||null,title:e.title||null,url:e.url||null,fragment:e.hash||null}}(e);return n.rel||delete n.rel,n}function Se(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}function Oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ce(e){var t={};return p.a.each(e,function(e,n){var r=Oe(e,2),i=r[0],o=r[1],a=function(e){if(!Object(c.y)(e))throw new c.a("Attribute names have to be in camel case.");return Object(c.R)(e)}(n);if(Object(c.z)(a))t[a]=i;else{var s=Oe(o,2),u=s[0],l=s[1];t[a]=[Me(u,n),Ee(xe(u,l,i,n))]}}),t}function Me(e,t){switch(e){case"enum":return"string";case"float":case"integer":return"number";case"multienum":return"stringlist";case"binary":case"date":case"html":case"link":case"linklist":case"reference":case"referencelist":case"string":case"stringlist":case"widgetlist":return e;default:throw new c.a('Attribute "'.concat(t,'" is of unsupported type "').concat(e,'".'))}}function xe(e,t,n,r){if(null===n)return n;switch(e){case"binary":return function(e,t){if(Se(e,G))return{id:e.id()};Te(e,t,"A Binary.")}(n,r);case"date":return function(e,t){if(p.a.isDate(e))return Object(c.w)(e);if(Object(c.A)(e))return e;Te(e,t,"A Date.")}(n,r);case"enum":return function(e,t,n){var r=e.values;if(p.a.contains(r,t))return t;var i='Valid attribute values are contained in its "values" array ['.concat(r,"].");Te(t,n,i)}(t,n,r);case"float":return function(e,t){if(Object(c.B)(e))return e;var n=e;p.a.isNumber(e)&&(n=String(e));Te(n,t,"A Number, that is #isFinite().")}(n,r);case"html":return function(e,t){if(p.a.isString(e))return e;Te(e,t,"A String.")}(n,r);case"integer":return function(e,t){if(Object(c.C)(e))return e;Te(e,t,"A Number, that is #isSafeInteger().")}(n,r);case"link":return function(e,t){if(we(e))return ke(e);Te(e,t,"A Link instance.")}(n,r);case"linklist":return function(e,t){if(p.a.isArray(e)&&p.a.every(e,we))return p.a.map(e,ke);Te(e,t,"An array of Link instances.")}(n,r);case"multienum":return function(e,t,n){var r=e.values,i="An array with values from ".concat(Object(c.I)(r),".");p.a.isArray(t)&&p.a.every(t,p.a.isString)||Te(t,n,i);var o=p.a.difference(t,r);if(o.length){var a="".concat(i," Forbidden values: ").concat(Object(c.I)(o),".");Te(t,n,a)}return t}(t,n,r);case"reference":return function(e,t){if(De(e))return je(e);Te(e,t,"A BasicObj or a String ID.")}(n,r);case"referencelist":return function(e,t){if(function(e){return p.a.isArray(e)&&p.a.every(e,function(e){return De(e)})}(e))return p.a.map(e,je);Te(e,t,"An array with BasicObjs or String IDs.")}(n,r);case"string":return function(e,t){if(Le(e))return e.toString();Te(e,t,"A String.")}(n,r);case"stringlist":return function(e,t){if(p.a.isArray(e)&&p.a.every(e,function(e){return Le(e)}))return p.a.invoke(e,"toString");Te(e,t,"An array of strings.")}(n,r);case"widgetlist":return function e(t,n){if(Se(t,ye))return e([t],n);if(p.a.isArray(t)&&p.a.every(t,function(e){return Se(e,ye)}))return p.a.invoke(t,"id");Te(t,n,"An array of BasicWidget instances.")}(n,r);default:throw new c.g('serializeAttributeValue is not implemented for "'.concat(e,'".'))}}function Ee(e){return(p.a.isString(e)||p.a.isArray(e))&&p.a.isEmpty(e)?null:e}function Te(e,t,n){throw new c.a("Unexpected value ".concat(Object(c.I)(e)," for")+' attribute "'.concat(t,'". Expected: ').concat(n))}function je(e){return Se(e,Re)?e.id():e}function De(e){return p.a.isString(e)||Se(e,Re)}function Le(e){return p.a.isString(e)||p.a.isNumber(e)}function Pe(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}var Ie,Ne,Ae=(Ie=function(e,t){return(Ie=Object.setPrototypeOf||Pe({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}Ie(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Ye=function(e){function t(t){var n=e.call(this)||this;return n.objData=t,n}return Ae(t,e),t.get=function(e){var t=this.getIncludingDeleted(e);return!t||t.isDeleted()?null:t},t.getInWorkspace=function(e,t){var n=this.getIncludingDeletedInWorkspace(e,t);return!n||n.isDeleted()?null:n},t.getIncludingDeleted=function(e){return this.getIncludingDeletedInWorkspace(se(),e)},t.getIncludingDeletedInWorkspace=function(e,n){var r=Object(a.i)(e,n);if(!r)return null;var i=new t(r);return i.isFinallyDeleted()?null:i},t.create=function(e){return this.createInWorkspace(se(),e)},t.createInWorkspace=function(e,t){var n=ie(t);!function(e){if(!e)throw new c.a('Please provide an obj class as the "_objClass" property.')}(n._objClass),n._id||(n._id=[this.generateId()]);var r={_id:n._id,_obj_class:n._objClass};return this.createWithSerializedAttributes(e,f.mapObject(r,function(e){return e[0]}),f.omit(t,"_objClass","_id"))},t.createFromFile=function(e,t){var n=this.create(t);return G.upload(e).intoId(n.id()).then(function(e){return n.update({blob:[e,["binary"]]}),n.finishSaving().then(function(){return n})})},t.addChildWithSerializedAttributes=function(e,n){var r=t.generateId();return this.createWithSerializedAttributes(se(),f.extend({},n,{_id:r,_path:e+"/"+r}))},t.createWithSerializedAttributes=function(e,n,r){if(!r){var i=function(e){var t={},n={};f.each(e,function(e,r){if(a=e,f.isArray(a)&&"widgetlist"===f.first(a)){var i=f.map(e[1],Fe),o=Object(c.o)(r);n[o]=[i,["widgetlist"]]}else t[r]=e;var a}),t._id||(t._id=Ye.generateId());return[t,n]}(n),o=i[0],s=i[1];return this.createWithSerializedAttributes(e,o,s)}var u=Object(a.d)(e,n._id);u.update(n);var l=new t(u);return l.update(r),l},t.generateId=function(){return Object(c.L)()},t.all=function(){return(new w).batchSize(1e3)},t.root=function(){return t.getByPath("/")},t.where=function(e,t,n,r){return(new w).and(e,t,n,r)},t.getByPath=function(e){var t=this.where("_path","equals",e).first();return t||null},t.getByPermalink=function(e){var t=this.where("_permalink","equals",e).first();return t||null},t.getAllByPermalink=function(e){return this.where("_permalink","equals",e).take()},t.generateWidgetId=function(){return Object(c.K)()},t.prototype.id=function(){return this.getAttributeData("_id")},t.prototype.objClass=function(){return this.getAttributeData("_obj_class")},t.prototype.obj=function(){return this},t.prototype.createdAt=function(){return Object(c.H)(this.getAttributeData("_created_at"))},t.prototype.createdBy=function(){return this.getAttributeData("_created_by")||null},t.prototype.lastChanged=function(){var e=this.getAttributeData("_last_changed");return e?Object(c.H)(e):null},t.prototype.lastChangedBy=function(){return this.getAttributeData("_last_changed_by")||null},t.prototype.version=function(){return this.getAttributeData("_version")},t.prototype.workspaceId=function(){return this.objData.workspaceId()},t.prototype.path=function(){return this.getAttributeData("_path")||null},t.prototype.permalink=function(){return this.getAttributeData("_permalink")||null},t.prototype.parentPath=function(){var e=this.path();return e&&"/"!==e?function(e){var t=e.split("/");if(t.pop(),1===t.length)return"/";return t.join("/")}(e):null},t.prototype.parent=function(){var e=this.parentPath();return e?t.getByPath(e):null},t.prototype.hasConflicts=function(){return!!this.getAttributeData("_conflicts")},t.prototype.modification=function(){return this.isFinallyDeleted()||this.getAttributeData("_marked_deleted")?"deleted":this.getAttributeData("_modification")||null},t.prototype.isModified=function(){return!!this.modification()},t.prototype.isNew=function(){return"new"===this.modification()},t.prototype.isEdited=function(){return"edited"===this.modification()},t.prototype.isDeleted=function(){return"deleted"===this.modification()},t.prototype.isFinallyDeleted=function(){return this.objData.isNonExistent()},t.prototype.contentLength=function(){return this.metadata().contentLength()},t.prototype.contentType=function(){return this.metadata().contentType()},t.prototype.contentUrl=function(){var e=this.blob();return e?e.url():""},t.prototype.metadata=function(){var e=this.blob();return e?new q(e.id()):new q},t.prototype.children=function(){var e=this.path();return e?He(e).take():[]},t.prototype.hasChildren=function(){var e=this.path();return!!e&&He(e).batchSize(0).count()>0},t.prototype.orderedChildren=function(){var e=this.children(),t=this.get("childOrder","referencelist");return f.isArray(t)?f.sortBy(e,function(e){var n=f.invoke(t,"id").indexOf(e.id());return-1===n?t.length:n}):e},t.prototype.backlinks=function(){return t.where("*","linksTo",this).take()},t.prototype.ancestors=function(){var e=this.parentPath();return e?function(e){var t=["/"];if("/"===e)return t;var n=e.split("/").slice(1),r="";return n.forEach(function(e){r=r+"/"+e,t.push(r)}),t}(e).map(function(e){return t.getByPath(e)}):[]},t.prototype.isRestricted=function(){var e=this.restriction();return!!e&&e.length>0},t.prototype.restriction=function(){return this.getAttributeData("_restriction")||null},t.prototype.restrict=function(){this.isRestricted()||this.update({_restriction:[["_auth"]]})},t.prototype.unrestrict=function(){this.update({_restriction:null})},t.prototype.update=function(e){var t=this,n=ie(e);Object(A.r)(function(){t.persistWidgets(t,n);var e=Ce(n);t.objData.update(e)}),this.startLinkResolution()},t.prototype.destroy=function(){this.update({_markedDeleted:[!0]})},t.prototype.insertWidget=function(e,t){var n,r=function(e){if(function(e){return!!e.before}(e))return e.before.id();return e.after.id()}(t),i=this._widgetPlacementFor(r);if(i){var o=i.attributeValue,a=i.attributeName,s=i.container,c=i.index,u=t.before?c:c+1,l=o.slice(0,u).concat([e],o.slice(u));s.update(((n={})[a]=[l,["widgetlist"]],n))}},t.prototype.removeWidget=function(e){var t=this.fieldContainingWidget(e);if(t){var n=t.get(),r=f.reject(n,function(t){return t.equals(e)});t.update(r)}},t.prototype.siblingWidget=function(e,t){var n=this._widgetPlacementFor(e.id());if(n)return n.attributeValue[n.index+t]},t.prototype.copyAsync=function(e){return void 0===e&&(e={}),function(e){if(f.difference(f.keys(e),["_path"]).length)throw new c.a('Currently only "_path" copy option is supported.')}(e),this._copyAttributes().then(function(n){var r=f.extend(n,e),i=t.createWithSerializedAttributes(se(),r);return i.objData.finishSaving().then(function(){return i})})},t.prototype.moveToAsync=function(e){return this.moveTo(e),this.finishSaving()},t.prototype.moveTo=function(e){this.update({_path:[e+"/"+this.id()]})},t.prototype.markResolvedAsync=function(){return this.update({_conflicts:[null]}),this.finishSaving()},t.prototype.finishSaving=function(){var e=this;return this.finishLinkResolution().then(function(){return e.objData.finishSaving()})},t.prototype.equals=function(e){return!!Pe(e,t)&&this.id()===e.id()},t.prototype.widget=function(e){return this.getWidgetAttribute(e,"_obj_class")?ye.build(e,this):null},t.prototype.getWidgetAttribute=function(e,t){return this.objData.getWidgetAttribute(e,t)},t.prototype.widgets=function(){var e=this.getData();if(!ze(e))return[];var t=e._widget_pool;if(!t)return[];var n=[];return this.collectWidgets(n,e,t,{}),n},t.prototype.fieldContainingWidget=function(e){var t=e.id(),n=this._widgetPlacementFor(t);if(n){var r=n.container,i=n.attributeName;return new s(r,i,["widgetlist"])}},t.prototype.generateWidgetId=function(){for(var e=0;e<10;e++){var n=t.generateWidgetId();if(!this.widget(n))return n}throw new c.g("Could not generate a new unused widget id.")},t.prototype.serializeAttributes=function(){var t=e.prototype.serializeAttributes.call(this,this.getData());return delete t._conflicts,delete t._modification,delete t._created_at,delete t._created_by,delete t._last_changed,delete t._last_changed_by,t},t.prototype.slug=function(){var e,t=this.get("title","string");return"string"!=typeof(e=t)?"":h(e)},t.prototype.getWidgetData=function(e){return this.objData.getWidget(e)},t.prototype.startLinkResolution=function(){Object(a.l)()||We().startLinkResolutionFor(se(),this.id())},t.prototype.finishLinkResolution=function(){return We().finishLinkResolutionFor(se(),this.id())},t.prototype.toPrettyPrint=function(){return"[object "+this.objClass()+' id="'+this.id()+'"]'},t.prototype.getAttributeData=function(e){return this.objData.getAttribute(e)},t.prototype.getData=function(){return this.objData.get()},t.prototype.blob=function(){return this.get("blob",["binary"])},t.prototype._copyAttributes=function(){var e=t.generateId(),n=this.serializeAttributes(),r=[];return f.each(n,function(t,i){if("_"!==i[0]){if(function(e){return"binary"===e[0]&&!!e[1]}(t)){var o=t[1],a=new W({idToCopy:o.id}).intoId(e).then(function(e){return{name:i,binary:e}});r.push(a)}}else delete n[i]}),n._id=e,n._obj_class=this.objClass(),n._restriction=this.restriction(),this.path()&&(n._path=this.parentPath()+"/"+e),c.j.all(r).then(function(e){return f.each(e,function(e){var t=e.name,r={id:e.binary.id()};n[t]=["binary",r]}),n})},t.prototype.collectWidgets=function(e,t,n,r){var i=this;f.map(t,function(e,t){if(e&&!Object(c.z)(t)){var n=e;return Object(z.h)(n)?n[1]:void 0}}).forEach(function(t){t&&t.forEach(function(t){if(!r[t]){r[t]=!0;var o=i.widget(t);if(o){e.push(o);var a=n[t];i.collectWidgets(e,a,n,r)}}})})},t.prototype._widgetPlacementFor=function(e){var t=this.getData();if(ze(t)){var n=Object(a.f)(t,e);if(n){var r,i=Object(c.o)(n.attributeName),o=n.parentWidgetId;if(o){if(!(r=this.widget(o)))return}else r=this;return{container:r,attributeName:i,attributeValue:r.get(i,["widgetlist"]),index:n.index,parentWidgetId:o}}}},t}(re),Re=Ye;function Fe(e){return ye.newWithSerializedAttributes(e)}function He(e){return Ye.all().and("_parentPath","equals",e)}function We(){if(!Ne)throw new Error("No Link Handler");return Ne}function Be(e){Ne=e}function ze(e){return!!e&&Object(z.f)(e)}var Ue=function(){return(Ue=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},qe=function(){function e(e){this.attributes=Ue({},e)}return e.prototype.title=function(){return this.attributes.title||null},e.prototype.query=function(){return this.attributes.query||null},e.prototype.hash=function(){return this.attributes.hash||null},e.prototype.rel=function(){return this.attributes.rel||null},e.prototype.target=function(){return this.attributes.target||null},e.prototype.url=function(){return this.attributes.url||null},e.prototype.objId=function(){return this.attributes.objId||null},e.prototype.obj=function(){var e=this.objId();return e?Re.get(e):null},e.prototype.queryParameters=function(){return l(this.query()||"")},e.prototype.isExternal=function(){return!!this.url()},e.prototype.isInternal=function(){return!this.isExternal()},e.prototype.equals=function(t){return n=t,!!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&(this.isExternal()?this.hash()===t.hash()&&this.query()===t.query()&&this.rel()===t.rel()&&this.target()===t.target()&&this.title()===t.title()&&this.url()===t.url():this.objId()===t.objId()&&this.title()===t.title());var n,r},e.prototype.copy=function(t){void 0===t&&(t={});var n=Ue({},this.attributes,t);if(t.objId&&t.url)throw new c.a('Link#copy refused: both "objId" and "url" have been specified with truthy values');return t.objId?n.url=null:t.url&&(n.objId=null),new e(n)},e.prototype.isBroken=function(){return!this.isExternal()&&!this.obj()},e.prototype.toPrettyPrint=function(){return this.isInternal()?'[object Link objId="'+this.objId()+'"]':'[object Link url="'+this.url()+'"]'},e}();function Ve(e){var t=e.get(),n=function(e){var t=e.getDiff();if(Object(z.i)(t))return t.content}(e);return n?Object(f.compact)(n.map(function(n){var r,i=n[0],o=n[1];switch(i){case"+":if(r=$e(t,o))return{widget:r,modification:"new"};break;case"=":if(r=$e(t,o))return{widget:r,modification:null};break;case"-":if(r=function(e,t){var n=Re.getInWorkspace("published",e);if(n)return n.widget(t);return null}(e.obj().id(),o))return{widget:r,modification:"deleted"}}})):t.map(function(e){return{widget:e,modification:null}})}function $e(e,t){return Object(f.find)(e,function(e){return e.id()===t})||null}n.d(t,"AnyNormalizedSingleTypeInfo",function(){return i.AnyNormalizedSingleTypeInfo}),n.d(t,"AnyNormalizedTypeInfo",function(){return i.AnyNormalizedTypeInfo}),n.d(t,"AnyNormalizedTypeOptions",function(){return i.AnyNormalizedTypeOptions}),n.d(t,"AnyTypeInfo",function(){return i.AnyTypeInfo}),n.d(t,"AnyTypeOptions",function(){return i.AnyTypeOptions}),n.d(t,"NormalizedTypeInfo",function(){return i.NormalizedTypeInfo}),n.d(t,"AttributeType",function(){return o.AttributeType}),n.d(t,"BasicAttributeDict",function(){return o.BasicAttributeDict}),n.d(t,"BasicAttributeValue",function(){return o.BasicAttributeValue}),n.d(t,"BasicAttributeValueForUpdate",function(){return o.BasicAttributeValueForUpdate}),n.d(t,"SystemAttributeValue",function(){return o.SystemAttributeValue}),n.d(t,"BasicField",function(){return s}),n.d(t,"BasicLink",function(){return qe}),n.d(t,"BasicLinkAttributes",function(){}),n.d(t,"BasicObjFacetValue",function(){return m}),n.d(t,"ObjSearchParams",function(){}),n.d(t,"BasicObjSearch",function(){return w}),n.d(t,"OPERATORS",function(){return v}),n.d(t,"BasicSearchValue",function(){}),n.d(t,"SearchField",function(){}),n.d(t,"SearchOperator",function(){}),n.d(t,"Boost",function(){}),n.d(t,"BasicObj",function(){return Re}),n.d(t,"MaybeBasicObj",function(){}),n.d(t,"setLinkHandler",function(){return Be}),n.d(t,"LinkHandler",function(){}),n.d(t,"BasicWidget",function(){return ye}),n.d(t,"TransformationDefinition",function(){}),n.d(t,"Binary",function(){return G}),n.d(t,"BlobMock",function(){}),n.d(t,"FutureBinary",function(){return W}),n.d(t,"FutureBinaryOptions",function(){}),n.d(t,"IdToCopySource",function(){}),n.d(t,"SourceSource",function(){}),n.d(t,"setBinaryHandler",function(){return Y}),n.d(t,"BinaryHandler",function(){}),n.d(t,"MetadataCollection",function(){return q}),n.d(t,"BinaryMetadataValue",function(){}),n.d(t,"ObjSearchType",function(){return L}),n.d(t,"LinkType",function(){return D}),n.d(t,"ObjType",function(){return T}),n.d(t,"WidgetType",function(){return j}),n.d(t,"BinaryType",function(){return P}),n.d(t,"QueryParameters",function(){}),n.d(t,"parseQuery",function(){return l}),n.d(t,"queryParametersFromUrl",function(){return d}),n.d(t,"currentWorkspaceId",function(){return se}),n.d(t,"resetCurrentWorkspaceId",function(){return ue}),n.d(t,"setCurrentWorkspaceId",function(){return ce}),n.d(t,"getPlacementModificationInfos",function(){return Ve}),n.d(t,"PlacementModification",function(){})},function(e,t,n){e.exports=n(490)()},function(e,t,n){"use strict";n.r(t);var r=n(98),i=n(0),o=new i.d,a=function(){return o.current()};function s(e){var t={subscribes:[],missing:!1,outdated:!1},n=o.runWith(t,e);return new l(t,n)}function c(){throw new i.i("Content not yet loaded. Forgot to use Scrivito.load or Scrivito.connect? See https://scrivito.com/content-not-yet-loaded-error")}function u(){return void 0!==a()}var l=function(){function e(e,t){this.captureList=e,this.result=t}return e.prototype.forwardToCurrent=function(){var e,t,n=a();n?(e=n,t=this.captureList,e.subscribes=e.subscribes.concat(t.subscribes),e.missing=e.missing||t.missing,e.outdated=e.outdated||t.outdated):this.captureList.missing&&c()},e.prototype.isAllDataLoaded=function(){return!this.captureList.missing},e.prototype.isAllDataUpToDate=function(){return!this.captureList.missing&&!this.captureList.outdated},e.prototype.subscribeLoading=function(e){var t=this.captureList.subscribes.map(function(e){return e()});e.unsubscribe(),e.storeUnsubscribe(function(){t.forEach(function(e){return e()})})},e}(),d=function(){function e(){}return e.prototype.storeUnsubscribe=function(e){this.unsubscribeCallback=e},e.prototype.unsubscribe=function(){this.unsubscribeCallback&&this.unsubscribeCallback()},e}();var f=n(6);function p(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.apply(void 0,[e].concat(t));var r=new i.e,o=q(function(){return Object(i.M)(function(){return Object(f.s)({contextName:"Scrivito.load",message:"Use an async callback: Scrivito.load(/* ... */).then(/* ... */)."},e)})},function(e){if(e.allDataUpToDate){o.unsubscribe();var t=e.result;t.errorThrown?r.reject(t.error):r.resolve(t.result)}});return r.promise}var h=Object(i.p)("load",[["loadableFunction",i.O.Function]],{docPermalink:"js-sdk/load"}),m=function(){function e(e){this.container=e}return e.prototype.reader=function(){return this.container.reader().subState("value")},e.prototype.status=function(){return this.getStateKey("status")||"MISSING"},e.prototype.value=function(){return this.getStateKey("value")},e.prototype.error=function(){return this.getStateKey("error")},e.prototype.version=function(){return this.getStateKey("version")},e.prototype.transitionToMissing=function(){this.setState(void 0)},e.prototype.transitionToAvailable=function(e,t){this.setState({status:"AVAILABLE",value:e,version:t})},e.prototype.transitionToError=function(e,t){this.setState({status:"ERROR",error:e,version:t})},e.prototype.setState=function(e){this.container.set(e)},e.prototype.getStateKey=function(e){return this.container.subState(e).get()},e}(),_={},v={};function g(e,t){var n=!0;y(e,1);var r=_[e];r||(_[e]=t);var i=r||t;return i.notifyDataRequired(),function(){n&&(n=!1,y(e,-1)<1&&i.notifyDataNoLongerRequired())}}function y(e,t){var n=(v[e]||0)+t;return v[e]=n,n}function b(e){var t=_[e];t&&t.notifyDataWasSet()}var w,k=(w=function(e,t){var n,r;return(w=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}w(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),S=function(e){function t(){return e.call(this,"Data is not yet loaded.",!1)||this}return k(t,e),t}(i.i),O=function(){function e(e,t){this.loadableValue=e,this.stream=t,this.streamRequired=!1,this.hasBufferedValue=!1,this.isUpdateEnqueued=!1}return e.prototype.notifyDataRequired=function(){this.streamRequired=!0,this.enqueueUpdate()},e.prototype.notifyDataNoLongerRequired=function(){this.streamRequired=!1,this.enqueueUpdate()},e.prototype.notifyDataWasSet=function(){},e.prototype.enqueueUpdate=function(){var e=this;this.isUpdateEnqueued||(Object(i.G)(function(){return e.update()}),this.isUpdateEnqueued=!0)},e.prototype.update=function(){this.isUpdateEnqueued=!1,this.streamRequired?(this.hasBufferedValue&&(this.loadableValue.transitionToAvailable(this.bufferedValue),this.clearBuffer()),this.ensureStreamIsOpen()):this.ensureStreamIsClosed()},e.prototype.ensureStreamIsOpen=function(){var e=this;this.subscription||(this.subscription=this.stream.subscribe(function(t){e.bufferValue(t),e.enqueueUpdate()}))},e.prototype.ensureStreamIsClosed=function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0),this.loadableValue.transitionToMissing(),this.clearBuffer()},e.prototype.bufferValue=function(e){this.bufferedValue=e,this.hasBufferedValue=!0},e.prototype.clearBuffer=function(){this.hasBufferedValue=!1,this.bufferedValue=void 0},e}(),C=0,M=function(){function e(e,t,n){this.value=e,this.loader=t,this.invalidation=n}return e.prototype.notifyDataRequired=function(){this.triggerLoading()},e.prototype.notifyDataNoLongerRequired=function(){},e.prototype.notifyDataWasSet=function(){this.currentLoad=void 0},e.prototype.isMissing=function(){return"MISSING"===this.value.status()},e.prototype.hasBeenInvalidated=function(){return x(this.value,this.invalidation)},e.prototype.currentVersion=function(){return E(this.invalidation)},e.prototype.triggerLoading=function(){var e=this;if(!this.isLoading()&&(this.isMissing()||this.hasBeenInvalidated())){var t=this.currentVersion(),n=C++,r=function(){return e.currentLoad===n},i=function(t){r()&&Object(f.a)(function(){t(),e.notifyDataWasSet(),a()})},o=[],a=function(){return o.forEach(function(e){return e()})};this.loader({push:function(e){return o.push(e)},isReload:function(){return e.hasBeenInvalidated()},wasCancelled:function(){return!r()}}).then(function(n){return i(function(){return e.value.transitionToAvailable(n,t)})},function(n){return i(function(){return e.value.transitionToError(n,t)})}),this.currentLoad=n}},e.prototype.isLoading=function(){return void 0!==this.currentLoad},e}();function x(e,t){return!!t&&("MISSING"!==e.status()&&E(t)!==e.version())}function E(e){if(e){var t=e();if("number"==typeof t&&isNaN(t)){var n="invalidation callback returned unsuitable version "+t;throw new i.g(n)}return t}}var T=function(){function e(e){if(!e.state)throw new i.g("LoadableData needs state");this.value=new m(e.state),this.invalidation=e.invalidation,this.throwNotLoaded=e.throwNotLoaded||!1,this.id=e.state.id(),e.stream?this.loaderProcess=new O(this.value,e.stream):this.loaderProcess=new M(this.value,e.loader,e.invalidation)}return e.prototype.ensureAvailable=function(){var e,t,n=this;if(e=function(){return g(n.id,n.loaderProcess)},(t=a())&&t.subscribes.push(e),this.isAvailable())return this.notifyIfOutdated(),!0;if(this.isError())throw this.notifyIfOutdated(),this.value.error();if(u()||(g(this.id,this.loaderProcess),c()),function(){var e=a();e&&(e.missing=!0)}(),this.throwNotLoaded)throw new S;return!1},e.prototype.get=function(){if(this.ensureAvailable())return D(this.id,this),this.value.value()},e.prototype.reader=function(){return D(this.id,this),this.value.reader()},e.prototype.set=function(e){this.value.transitionToAvailable(e,this.currentVersion()),b(this.id)},e.prototype.setError=function(e){this.transitionToError(e),b(this.id)},e.prototype.reset=function(){this.value.transitionToMissing()},e.prototype.isMissing=function(){return"MISSING"===this.value.status()},e.prototype.isAvailable=function(){return"AVAILABLE"===this.value.status()},e.prototype.isError=function(){return"ERROR"===this.value.status()},e.prototype.numSubscribers=function(){return e=this.id,v[e]||0;var e},e.prototype.transitionToError=function(e,t){void 0===t&&(t=this.currentVersion()),this.value.transitionToError(e,t)},e.prototype.notifyIfOutdated=function(){var e;x(this.value,this.invalidation)&&(e=a())&&(e.outdated=!0)},e.prototype.currentVersion=function(){return E(this.invalidation)},e}(),j=new i.d;function D(e,t){var n=j.current();n&&(n[e]=t)}function L(e){var t,n={};return{result:j.runWith(n,e),usedData:(t=n,Object.keys(t).map(function(e){return t[e]}))}}function P(e,t){var n=s(function(){return I(e,t)});return u()&&n.forwardToCurrent(),n.result}function I(e,t){var n=R(t);return n.allDataLoaded?n.result:e}var N=n(2),A=n.n(N);function Y(e,t){var n=[];if(A.a.each(e,function(e){var r=R(function(){return t(e)});r.success&&n.push(r.result)}),n.length<e.length)throw new S;return n}function R(e){var t=s(function(){return Object(i.M)(e)});t.forwardToCurrent();var n=t.result,r=t.isAllDataLoaded();if(!n.errorThrown)return{success:!0,result:n.result,allDataLoaded:r};if(!r)return{success:!1,allDataLoaded:!1};throw n.error}var F=function(){function e(e){var t=e.name,n=e.state,r=e.loader,o=e.invalidation;this.name=t,this.state=n,this.loader=r,this.invalidation=o,function(e,t){if(H[e])throw new i.g("collection name registered twice: "+e);H[e]=t}(t,this)}return e.prototype.get=function(e,t){var n=this,r=function(e){if("string"==typeof e)return e;return Object(i.s)(e)}(e),o=this.invalidation,a=new T({state:this.state().subState(r),loader:function(r){return n.loader(e,r,t)},invalidation:o?function(){return o(e)}:void 0});return function(e,t){e.affiliation=t}(a,{collectionName:this.name,key:e}),a},e}();var H={};function W(e){Object(f.r)(function(){return e.forEach(B)})}function B(e){var t=e[0],n=e[1],r=e[2];(function(e){var t=H[e];if(!t)throw new i.g("collection with name "+e+" not found");return t})(t).get(n).set(r)}function z(e){return e.map(U)}function U(e){var t=function(e){return e.affiliation}(e);if(!t)throw new i.g("Tried to record a LoadableData without affiliation");return[t.collectionName,t.key,e.get()]}function q(e,t){var n=new d,r=Object(f.k)(function(){return s(function(){return Object(i.M)(e)})},function(e){e.subscribeLoading(n);var r=e.result;if(r.errorThrown){if(!e.isAllDataUpToDate())return;throw r.error}t({result:r.result,allDataLoaded:e.isAllDataLoaded(),allDataUpToDate:e.isAllDataUpToDate()})});return{forceRefresh:function(){return r.forceRefresh()},unsubscribe:function(){r.unsubscribe(),n.unsubscribe()}}}n.d(t,"loadAllUntil",function(){return r.default}),n.d(t,"capture",function(){return s}),n.d(t,"CaptureList",function(){}),n.d(t,"CaptureReport",function(){return l}),n.d(t,"isCurrentlyCapturing",function(){return u}),n.d(t,"LoadingSubscriber",function(){return d}),n.d(t,"load",function(){return p}),n.d(t,"LoadableData",function(){return T}),n.d(t,"reportUsedData",function(){return L}),n.d(t,"LoaderApi",function(){}),n.d(t,"LoaderCallback",function(){}),n.d(t,"LoadableState",function(){}),n.d(t,"loadableWithDefault",function(){return P}),n.d(t,"loadWithDefault",function(){return I}),n.d(t,"mapAndLoadParallel",function(){return Y}),n.d(t,"runAndCatchErrorsWhileLoading",function(){return R}),n.d(t,"RunResult",function(){}),n.d(t,"NotLoadedError",function(){return S}),n.d(t,"DataRecording",function(){}),n.d(t,"loadRecording",function(){return W}),n.d(t,"generateRecording",function(){return z}),n.d(t,"LoadableCollection",function(){return F}),n.d(t,"LoadableCollectionState",function(){}),n.d(t,"observeAndLoad",function(){return q})},function(e,t,n){"use strict";var r=n(0),i=n(2),o=function(){function e(e,t){this.value=e,this.copy=t,this.valueForReading=new r.d}return e.prototype.read=function(e){var t=this.value;return this.valueForReading.runWith(t,function(){return e(t)})},e.prototype.write=function(e){this.valueForReading.current()===this.value&&(this.value=this.copy(this.value)),e(this.value)},e}(),a=function(){function e(e){this.notifySubscribers=e,this.subscribersStore=new o([],function(e){return e.slice()})}return e.prototype.create=function(e,t){return void 0===t&&(t=0),new s(this.subscribersStore,e,t)},e.prototype.count=function(){return this.subscribersStore.read(function(e){return e.length})},e.prototype.reset=function(){this.subscribersStore.write(function(e){e.length=0})},e.prototype.notify=function(){var e=this;this.subscribersStore.read(function(t){return e.notifySubscribers(t)})},e}(),s=function(){function e(e,t,n){void 0===n&&(n=0),this.subscriberStore=e,this.listener=t,this.rank=n,this.active=!1}return e.prototype.subscribeChanges=function(e){var t=this;this.stateReference=e,this.active||(this.subscriberStore.write(function(e){var n=Object(i.sortedIndex)(e,t,"rank");e.splice(n,0,t)}),this.active=!0),this.hasChanges()&&this.listener()},e.prototype.unsubscribe=function(){var e=this;this.active&&(this.subscriberStore.write(function(t){var n=t.indexOf(e);n>=0&&t.splice(n,1)}),this.active=!1)},e.prototype.notify=function(){this.active&&this.listener()},e.prototype.hasChanges=function(){return!!this.stateReference&&this.stateReference.hasChanges()},e}(),c=new a(function(e){e.forEach(function(e){e.hasChanges()&&e.notify()})}),u=new a(function(e){e.forEach(function(e){Object(r.G)(function(){e.hasChanges()&&e.notify()})})}),l=function(){function e(){this.listenersStore=new o([],function(e){return e.slice()})}return e.prototype.subscribe=function(e){var t=this,n=!0,r=function(){n&&e()};return this.listenersStore.write(function(e){return e.push(r)}),function(){n=!1,t.listenersStore.write(function(e){var t=e.indexOf(r);e.splice(t,1)})}},e.prototype.count=function(){return this.listenersStore.read(function(e){return e.length})},e.prototype.clear=function(){this.listenersStore.write(function(e){e.length=0})},e.prototype.notify=function(){this.listenersStore.read(function(e){return e.forEach(function(e){return e()})})},e}();function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e){return null!==e&&"object"===d(e)&&!Array.isArray(e)&&!function(e){var t=Object.getPrototypeOf(e);if(null===t)return!1;return null!==Object.getPrototypeOf(t)}(e)}function p(e,t){return e===t?t:f(t)?function(e,t){var n={},r=!1;void 0===e&&(r=!0);var i=Object.keys(t),o=new Set;e&&Object.keys(e).forEach(function(e){return o.add(e)});o.size!==i.length&&(r=!0);return i.forEach(function(i){o.has(i)||(r=!0);var a=e?e[i]:void 0,s=p(a,t[i]);s!==a&&(r=!0),n[i]=s}),r?Object.freeze(n):e}(f(e)?e:void 0,t):Array.isArray(t)?function(e,t){var n=!1;void 0!==e&&e.length===t.length||(n=!0);var r=t.map(function(t,r){var i=e?e[r]:void 0,o=p(i,t);return o!==i&&(n=!0),o});return n?Object.freeze(r):e}(Array.isArray(e)?e:void 0,t):t}var h,m,_,v,g,y,b,w=(h=function(e,t){var n,r;return(h=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}h(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),k=function(){function e(){}return e.prototype.get=function(){var e=this,t=this.untrackedGet();return this.recordDetector(function(){return t!==e.untrackedGet()}),t},e.prototype.recordDetector=function(e){this.getTree().recordDetector(e)},e.prototype.set=function(e){var t=this.untrackedGet(),n=p(t,e);n!==t&&this.uncheckedSet(n)},e.prototype.clear=function(){this.set(void 0)},e.prototype.subState=function(e){return new M(this,e)},e.prototype.reader=function(){return this},e.prototype.setSubState=function(e,t){var n,i=this.untrackedGet();if(void 0!==i){if(void 0===t){var o=Object.keys(i);if(1===o.length&&o[0]===e)return void this.uncheckedSet(void 0)}if(null===i)throw new r.g;var a=Object(r.n)({},i),s=a;void 0===t?delete s[e]:s[e]=t,this.uncheckedSet(Object.freeze(a))}else{var c=Object.freeze(((n={})[e]=t,n));this.uncheckedSet(c)}},e.prototype.getSubState=function(e){var t=this.untrackedGet();if(null!=t)return t[e]},e}(),S=function(){function e(e){this.detector=e}return e.prototype.hasChanges=function(){return this.detector()},e}(),O=function(e){function t(){var t=e.call(this)||this;return t.listeners=new l,t.detectorRecording=new r.d,t.batchUpdates=new r.d,t.version=0,t.frozenContextContainer=new r.d,t}return w(t,e),t.prototype.untrackedGet=function(){return this.state},t.prototype.withFrozenState=function(e,t){return this.frozenContextContainer.runWith(e,t)},t.prototype.failIfTracking=function(e){if(this.detectorRecording.current())throw new r.g(e)},t.prototype.failIfFrozen=function(e){var t=this.frozenContextContainer.current();if(t){var n=e+" is not permitted inside '"+t.contextName+"'. "+(t.message||"");throw new C(n)}},t.prototype.uncheckedSet=function(e){this.failIfFrozen("Changing state"),this.state=e,this.version++,this.insideBatchUpdate()||this.notifyListeners()},t.prototype.trackStateAccess=function(e){var t=this.trackChanges(e),n=t.detector;return{result:t.result,accessedState:new S(n)}},t.prototype.recordDetector=function(e){var t=this.detectorRecording.current();void 0!==t&&t.push(e)},t.prototype.getTree=function(){return this},t.prototype.id=function(){return""},t.prototype.subscribe=function(e){return this.listeners.subscribe(e)},t.prototype.withBatchedUpdates=function(e){var t=this.state;try{this.batchUpdates.runWith(!0,e)}finally{this.insideBatchUpdate()||t===this.state||this.notifyListeners()}},t.prototype.listenerCount=function(){return this.listeners.count()},t.prototype.clearListeners=function(){this.listeners.clear()},t.prototype.trackChanges=function(e){var t=this,n=this.version,r=this.recordDetectors(e),o=r.result,a=r.detectors;return{result:o,detector:function(){return t.version!==n&&!!Object(i.find)(a,function(e){return e()})}}},t.prototype.recordDetectors=function(e){var t=[],n=this.detectorRecording.runWith(t,e),r=this.detectorRecording.current();return void 0!==r&&r.push.apply(r,t),{result:n,detectors:t}},t.prototype.notifyListeners=function(){var e=this;this.withFrozenState({contextName:"state listeners"},function(){e.listeners.notify()})},t.prototype.insideBatchUpdate=function(){return!!this.batchUpdates.current()},t}(k),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return w(t,e),t}(r.i),M=function(e){function t(t,n){var r=e.call(this)||this;return r.parentState=t,r.key=n,r.tree=t.getTree(),r}return w(t,e),t.prototype.getTree=function(){return this.tree},t.prototype.untrackedGet=function(){return this.parentState.getSubState(this.key)},t.prototype.uncheckedSet=function(e){this.parentState.setSubState(this.key,e)},t.prototype.id=function(){if(void 0===this.cachedId){var e=this.key.replace(/\\/g,"\\\\").replace(/\//g,"\\/");this.cachedId=this.parentState.id()+"/"+e}return this.cachedId},t}(k);function x(e){e?(m=void 0,_=e.stateController(),v=e.createAppState(),b=e.sharedCmsState(),g=v.subState("localCms")):(m=new O,_=m,v=j(),b=m.subState("sharedCms"),g=m.subState("localCms"),y=m.subState("ui")),F()}var E,T=0;function j(){if(!m)throw new r.g;var e=(T++).toString();return m.subState("apps").subState(e)}function D(e){return _.withBatchedUpdates(e)}function L(){return _}function P(e){return _.trackStateAccess(e)}function I(e,t){return _.withFrozenState(e,t)}function N(e){return _.failIfFrozen(e)}function A(e){return _.failIfTracking(e)}function Y(e){return u.create(e)}function R(e,t){return void 0===t&&(t=0),c.create(e,t)}function F(){E=_.subscribe(function(){c.notify(),u.notify()})}function H(){E&&E(),v.clear()}var W=[],B=function(){return 0!==W.length};function z(e){B()||Object(r.G)(function(){return D(function(){return function e(t){W=[];try{t.forEach(function(e){return e()})}finally{B()&&e(W)}}(W)})}),W.push(e)}function U(e,t){var n,i=!0,o=!1,a=Y(s);function s(){if(i){var s=P(function(){return I({contextName:"observe",message:"Extract all side-effects into the listener function"},e)});a.subscribeChanges(s.accessedState);var c=s.result;o&&Object(r.v)(c,n)||(t(c),n=c,o=!0)}}return Object(r.G)(s),{unsubscribe:function(){i=!1,a.unsubscribe()},forceRefresh:function(){Object(r.G)(s)}}}function q(e,t){var n=P(function(){return I({contextName:"observeSync",message:"Use non-sync observe or nextTick"},e)}),i=n.result,o=R(function(){var n=P(e);o.subscribeChanges(n.accessedState);var a=n.result;Object(r.v)(a,i)||(t(a),i=a)});return o.subscribeChanges(n.accessedState),{initialValue:i,unsubscribe:function(){o.unsubscribe()}}}function V(e){return new r.j(function(t){var n=U(e,function(e){null!=e&&(n.unsubscribe(),t(e))})})}n.d(t,"d",function(){return j}),n.d(t,"c",function(){return g}),n.d(t,"m",function(){return b}),n.d(t,"o",function(){return P}),n.d(t,"r",function(){return D}),n.d(t,"s",function(){return I}),n.d(t,"g",function(){return N}),n.d(t,"h",function(){return A}),n.d(t,"i",function(){return L}),n.d(t,"p",function(){return y}),n.d(t,"b",function(){return v}),n.d(t,"j",function(){return x}),n.d(t,"n",function(){return H}),n.d(t,"e",function(){return Y}),n.d(t,"f",function(){return R}),n.d(t,"a",function(){return z}),n.d(t,"k",function(){return U}),n.d(t,"l",function(){return q}),n.d(t,"q",function(){return V})},function(e,t,n){"use strict";var r=n(0),i=n(5),o=n(6),a="GET",s="SEND",c=1;function u(e,t){var n=c++,u={};return Object.keys(e).forEach(function(c){var l=e[c];l===a&&(u[c]=function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];var s=o.b.subState("adapters").subState(n.toString()),u=c,l=s.subState(u).subState(Object(r.s)(e));return new i.LoadableData({state:l,stream:t.stream.apply(t,[u].concat(e))}).get()}),l===s&&(u[c]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.send.apply(t,[c].concat(e))})}),u}function l(e){return{stream:function(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return new r.k(function(r){return Object(i.observeAndLoad)(function(){var r=e();if(r){var i=r[t];return{valueFromClient:i.call.apply(i,[r].concat(n))}}},function(e){e.allDataLoaded&&void 0!==e.result&&r.next(e.result.valueFromClient)}).unsubscribe})},send:function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return new r.j(function(r){Object(o.q)(e).then(function(e){var i=e[t];r(i.call.apply(i,[e].concat(n)))})})}}}function d(e,t){return{stream:function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var a=t[e];return new r.k(function(e){return Object(i.observeAndLoad)(function(){return a.call.apply(a,[t].concat(n))},function(t){t.allDataLoaded&&e.next(t.result)}).unsubscribe})},send:function(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=t[e];return new r.j(function(e){Object(r.G)(function(){return e(o.call.apply(o,[t].concat(n)))})})}}}function f(e){return{incomingMessages:new r.k(function(t){function n(e){t.next({data:e.data})}return e.addEventListener("message",n),e.start(),function(){e.removeEventListener("message",n)}}),sendMessage:function(t){e.postMessage(t.data,t.transfer)}}}var p=function(){function e(e){this.muxedStream=e,this.openStreams={}}return e.prototype.streamWithId=function(e){var t=this;return new r.k(function(n){t.ensureSubscribed();var r=t.subjectForStreamId(e).subscribe(n);return function(){r.unsubscribe(),t.removeSubjectIfAbandoned(e)}})},e.prototype.removeSubjectIfAbandoned=function(e){0===this.subjectForStreamId(e).subscriberCount()&&(delete this.openStreams[e],this.unsubscribeIfAbandoned())},e.prototype.subjectForStreamId=function(e){var t=this.openStreams[e];if(t)return t;var n=new r.l;return this.openStreams[e]=n,n},e.prototype.ensureSubscribed=function(){var e=this;this.subscription||(this.subscription=this.muxedStream.subscribe({next:function(t){var n=t.streamId,r=e.openStreams[n];r&&r.next(t.data)},complete:function(){return Object.keys(e.openStreams).forEach(function(t){var n=e.openStreams[t];n&&(n.complete(),delete e.openStreams[t])})}}))},e.prototype.unsubscribeIfAbandoned=function(){0===Object.keys(this.openStreams).length&&this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)},e}();function h(e){return e&&"number"==typeof e.channel&&"string"==typeof e.verb}function m(e){return"string"==typeof e.method&&Array.isArray(e.params)}function _(e){return"CLOSE"===e.verb}function v(e){return"RESPOND"===e.verb}function g(e){return"ERROR"===e.verb}function y(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}var b,w=(b=function(e,t){return(b=Object.setPrototypeOf||y({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function k(e){return new S(e)}var S=function(){function e(e){this.portLink=e,this.channelCounter=1,this.incomingChannels=new p(this.portLink.incomingMessages.map(function(e){return e.data}).filter(h).map(function(e){return{streamId:e.channel,data:e}}))}return e.prototype.stream=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return new r.k(function(r){var i=t.getNextChannelId();t.postMessage({channel:i,verb:"OPEN",method:e,params:n});var o=t.incomingChannels.streamWithId(i).subscribe(function(e){v(e)&&r.next(e.data)});return function(){t.postMessage({channel:i,verb:"CLOSE"}),o.unsubscribe()}})},e.prototype.send=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.getNextChannelId();return this.postMessage({channel:r,verb:"SEND",method:e,params:t}),this.incomingChannels.streamWithId(r).filter(E).takeOne().toPromise().then(function(e){if(!e)throw new C;if(g(e))throw new O;return e.data})},e.prototype.postMessage=function(e){this.portLink.sendMessage({data:e,transfer:M(e)})},e.prototype.getNextChannelId=function(){return this.channelCounter++},e}(),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return w(t,e),t}(r.i),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return w(t,e),t}(r.i);function M(e){if("SEND"===e.verb)return e.params.filter(x)}function x(e){return y(e,MessagePort)}function E(e){return v(e)||g(e)}function T(e,t,n){return e[n.methodName]===t}function j(e,t,n){new D(e,t,n).start()}var D=function(){function e(e,t,n){this.portLink=e,this.adapterConnection=t,this.description=n,this.incomingMessages=e.incomingMessages.map(function(e){return e.data}).filter(h),this.incomingChannels=new p(this.incomingMessages.map(function(e){return{streamId:e.channel,data:e}}))}return e.prototype.start=function(){var e=this;this.incomingMessages.subscribe(function(t){!function(e){return"OPEN"===e.verb&&m(e)}(t)?function(e){return"SEND"===e.verb&&m(e)}(t)&&e.handleSendMessage(t):e.handleOpenStreamMessage(t)})},e.prototype.handleOpenStreamMessage=function(e){var t,n=this,r=L(e);if(T(this.description,a,r)){var i=(t=this.adapterConnection).stream.apply(t,[r.methodName].concat(r.params)),o=e.channel,s=i.subscribe(function(e){n.postMessage({verb:"RESPOND",data:e,channel:o})});this.incomingChannels.streamWithId(o).filter(_).takeOne().toPromise().then(function(){s.unsubscribe()})}},e.prototype.handleSendMessage=function(e){var t,n=this,i=L(e);T(this.description,s,i)&&(t=this.adapterConnection).send.apply(t,[i.methodName].concat(i.params)).then(function(t){return n.postMessage({verb:"RESPOND",data:t,channel:e.channel})},function(t){n.postMessage({verb:"ERROR",channel:e.channel}),Object(r.Q)(t)})},e.prototype.postMessage=function(e){this.portLink.sendMessage({data:e})},e}();function L(e){return{methodName:e.method,params:e.params}}n.d(t,"c",function(){return u}),n.d(t,"f",function(){return l}),n.d(t,"b",function(){return s}),n.d(t,"a",function(){return a}),n.d(t,"d",function(){return d}),n.d(t,"g",function(){return f}),n.d(t,"e",function(){return k}),n.d(t,"h",function(){return j})},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function i(){return t.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function l(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function f(e,t){for(var n in t)d(t,n)&&(e[n]=t[n]);return d(t,"toString")&&(e.toString=t.toString),d(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,n,r){return jt(e,t,n,r,!0).utc()}function h(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function m(e){if(null==e._isValid){var t=h(e),n=r.call(t.parsedDateParts,function(e){return null!=e}),i=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i}return e._isValid}function _(e){var t=p(NaN);return null!=e?f(h(t),e):h(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var v=i.momentProperties=[];function g(e,t){var n,r,i;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=h(t)),s(t._locale)||(e._locale=t._locale),v.length>0)for(n=0;n<v.length;n++)r=v[n],s(i=t[r])||(e[r]=i);return e}var y=!1;function b(e){g(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,i.updateOffset(this),y=!1)}function w(e){return e instanceof b||null!=e&&null!=e._isAMomentObject}function k(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function S(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=k(t)),n}function O(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&S(e[r])!==S(t[r]))&&a++;return a+o}function C(e){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function M(e,t){var n=!0;return f(function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,e),n){for(var r,o=[],a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){for(var s in r+="\n["+a+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[a];o.push(r)}C(e+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)},t)}var x,E={};function T(e,t){null!=i.deprecationHandler&&i.deprecationHandler(e,t),E[e]||(C(t),E[e]=!0)}function j(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function D(e,t){var n,r=f({},e);for(n in t)d(t,n)&&(a(e[n])&&a(t[n])?(r[n]={},f(r[n],e[n]),f(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)d(e,n)&&!d(t,n)&&a(e[n])&&(r[n]=f({},r[n]));return r}function L(e){null!=e&&this.set(e)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,x=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)d(e,t)&&n.push(t);return n};var P={};function I(e,t){var n=e.toLowerCase();P[n]=P[n+"s"]=P[t]=e}function N(e){return"string"==typeof e?P[e]||P[e.toLowerCase()]:void 0}function A(e){var t,n,r={};for(n in e)d(e,n)&&(t=N(n))&&(r[t]=e[n]);return r}var Y={};function R(e,t){Y[e]=t}function F(e,t,n){var r=""+Math.abs(e),i=t-r.length,o=e>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var H=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,W=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,B={},z={};function U(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(z[e]=i),t&&(z[t[0]]=function(){return F(i.apply(this,arguments),t[1],t[2])}),n&&(z[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function q(e,t){return e.isValid()?(t=V(t,e.localeData()),B[t]=B[t]||function(e){var t,n,r,i=e.match(H);for(t=0,n=i.length;t<n;t++)z[i[t]]?i[t]=z[i[t]]:i[t]=(r=i[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,o="";for(r=0;r<n;r++)o+=j(i[r])?i[r].call(t,e):i[r];return o}}(t),B[t](e)):e.localeData().invalidDate()}function V(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(W.lastIndex=0;n>=0&&W.test(e);)e=e.replace(W,r),W.lastIndex=0,n-=1;return e}var $=/\d/,G=/\d\d/,K=/\d{3}/,J=/\d{4}/,Q=/[+-]?\d{6}/,Z=/\d\d?/,X=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,ie=/\d+/,oe=/[+-]?\d+/,ae=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,ce=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ue={};function le(e,t,n){ue[e]=j(t)?t:function(e,r){return e&&n?n:t}}function de(e,t){return d(ue,e)?ue[e](t._strict,t._locale):new RegExp(fe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i})))}function fe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pe={};function he(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),c(t)&&(r=function(e,n){n[t]=S(e)}),n=0;n<e.length;n++)pe[e[n]]=r}function me(e,t){he(e,function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)})}function _e(e,t,n){null!=t&&d(pe,e)&&pe[e](t,n._a,n,e)}var ve=0,ge=1,ye=2,be=3,we=4,ke=5,Se=6,Oe=7,Ce=8;function Me(e){return xe(e)?366:365}function xe(e){return e%4==0&&e%100!=0||e%400==0}U("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),U(0,["YY",2],0,function(){return this.year()%100}),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),I("year","y"),R("year",1),le("Y",oe),le("YY",Z,G),le("YYYY",ne,J),le("YYYYY",re,Q),le("YYYYYY",re,Q),he(["YYYYY","YYYYYY"],ve),he("YYYY",function(e,t){t[ve]=2===e.length?i.parseTwoDigitYear(e):S(e)}),he("YY",function(e,t){t[ve]=i.parseTwoDigitYear(e)}),he("Y",function(e,t){t[ve]=parseInt(e,10)}),i.parseTwoDigitYear=function(e){return S(e)+(S(e)>68?1900:2e3)};var Ee,Te=je("FullYear",!0);function je(e,t){return function(n){return null!=n?(Le(this,e,n),i.updateOffset(this,t),this):De(this,e)}}function De(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Le(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&xe(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Pe(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Pe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?xe(e)?29:28:31-r%7%2}Ee=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},U("M",["MM",2],"Mo",function(){return this.month()+1}),U("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),U("MMMM",0,0,function(e){return this.localeData().months(this,e)}),I("month","M"),R("month",8),le("M",Z),le("MM",Z,G),le("MMM",function(e,t){return t.monthsShortRegex(e)}),le("MMMM",function(e,t){return t.monthsRegex(e)}),he(["M","MM"],function(e,t){t[ge]=S(e)-1}),he(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[ge]=i:h(n).invalidMonth=e});var Ie=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ne="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ae="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ye(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=S(t);else if(!c(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Pe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Re(e){return null!=e?(Ye(this,e),i.updateOffset(this,!0),this):De(this,"Month")}var Fe=ce,He=ce;function We(){function e(e,t){return t.length-e.length}var t,n,r=[],i=[],o=[];for(t=0;t<12;t++)n=p([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(r.sort(e),i.sort(e),o.sort(e),t=0;t<12;t++)r[t]=fe(r[t]),i[t]=fe(i[t]);for(t=0;t<24;t++)o[t]=fe(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Be(e){var t;if(e<100&&e>=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function ze(e,t,n){var r=7+t-n,i=(7+Be(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Ue(e,t,n,r,i){var o,a,s=(7+n-r)%7,c=ze(e,r,i),u=1+7*(t-1)+s+c;return u<=0?a=Me(o=e-1)+u:u>Me(e)?(o=e+1,a=u-Me(e)):(o=e,a=u),{year:o,dayOfYear:a}}function qe(e,t,n){var r,i,o=ze(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?(i=e.year()-1,r=a+Ve(i,t,n)):a>Ve(e.year(),t,n)?(r=a-Ve(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Ve(e,t,n){var r=ze(e,t,n),i=ze(e+1,t,n);return(Me(e)-r+i)/7}function $e(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),I("week","w"),I("isoWeek","W"),R("week",5),R("isoWeek",5),le("w",Z),le("ww",Z,G),le("W",Z),le("WW",Z,G),me(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=S(e)}),U("d",0,"do","day"),U("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),U("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),U("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),I("day","d"),I("weekday","e"),I("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),le("d",Z),le("e",Z),le("E",Z),le("dd",function(e,t){return t.weekdaysMinRegex(e)}),le("ddd",function(e,t){return t.weekdaysShortRegex(e)}),le("dddd",function(e,t){return t.weekdaysRegex(e)}),me(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:h(n).invalidWeekday=e}),me(["d","e","E"],function(e,t,n,r){t[r]=S(e)});var Ge="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ke="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Je="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Qe=ce,Ze=ce,Xe=ce;function et(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],c=[],u=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(r),s.push(i),c.push(o),u.push(r),u.push(i),u.push(o);for(a.sort(e),s.sort(e),c.sort(e),u.sort(e),t=0;t<7;t++)s[t]=fe(s[t]),c[t]=fe(c[t]),u[t]=fe(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function tt(){return this.hours()%12||12}function nt(e,t){U(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function rt(e,t){return t._meridiemParse}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,tt),U("k",["kk",2],0,function(){return this.hours()||24}),U("hmm",0,0,function(){return""+tt.apply(this)+F(this.minutes(),2)}),U("hmmss",0,0,function(){return""+tt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),U("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),U("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),nt("a",!0),nt("A",!1),I("hour","h"),R("hour",13),le("a",rt),le("A",rt),le("H",Z),le("h",Z),le("k",Z),le("HH",Z,G),le("hh",Z,G),le("kk",Z,G),le("hmm",X),le("hmmss",ee),le("Hmm",X),le("Hmmss",ee),he(["H","HH"],be),he(["k","kk"],function(e,t,n){var r=S(e);t[be]=24===r?0:r}),he(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),he(["h","hh"],function(e,t,n){t[be]=S(e),h(n).bigHour=!0}),he("hmm",function(e,t,n){var r=e.length-2;t[be]=S(e.substr(0,r)),t[we]=S(e.substr(r)),h(n).bigHour=!0}),he("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[be]=S(e.substr(0,r)),t[we]=S(e.substr(r,2)),t[ke]=S(e.substr(i)),h(n).bigHour=!0}),he("Hmm",function(e,t,n){var r=e.length-2;t[be]=S(e.substr(0,r)),t[we]=S(e.substr(r))}),he("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[be]=S(e.substr(0,r)),t[we]=S(e.substr(r,2)),t[ke]=S(e.substr(i))});var it,ot=je("Hours",!0),at={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ne,monthsShort:Ae,week:{dow:0,doy:6},weekdays:Ge,weekdaysMin:Je,weekdaysShort:Ke,meridiemParse:/[ap]\.?m?\.?/i},st={},ct={};function ut(e){return e?e.toLowerCase().replace("_","-"):e}function lt(t){var r=null;if(!st[t]&&void 0!==e&&e&&e.exports)try{r=it._abbr,n(492)("./"+t),dt(r)}catch(e){}return st[t]}function dt(e,t){var n;return e&&((n=s(t)?pt(e):ft(e,t))?it=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),it._abbr}function ft(e,t){if(null!==t){var n,r=at;if(t.abbr=e,null!=st[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=st[e]._config;else if(null!=t.parentLocale)if(null!=st[t.parentLocale])r=st[t.parentLocale]._config;else{if(null==(n=lt(t.parentLocale)))return ct[t.parentLocale]||(ct[t.parentLocale]=[]),ct[t.parentLocale].push({name:e,config:t}),null;r=n._config}return st[e]=new L(D(r,t)),ct[e]&&ct[e].forEach(function(e){ft(e.name,e.config)}),dt(e),st[e]}return delete st[e],null}function pt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return it;if(!o(e)){if(t=lt(e))return t;e=[e]}return function(e){for(var t,n,r,i,o=0;o<e.length;){for(i=ut(e[o]).split("-"),t=i.length,n=(n=ut(e[o+1]))?n.split("-"):null;t>0;){if(r=lt(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&O(i,n,!0)>=t-1)break;t--}o++}return it}(e)}function ht(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[ge]<0||n[ge]>11?ge:n[ye]<1||n[ye]>Pe(n[ve],n[ge])?ye:n[be]<0||n[be]>24||24===n[be]&&(0!==n[we]||0!==n[ke]||0!==n[Se])?be:n[we]<0||n[we]>59?we:n[ke]<0||n[ke]>59?ke:n[Se]<0||n[Se]>999?Se:-1,h(e)._overflowDayOfYear&&(t<ve||t>ye)&&(t=ye),h(e)._overflowWeeks&&-1===t&&(t=Oe),h(e)._overflowWeekday&&-1===t&&(t=Ce),h(e).overflow=t),e}function mt(e,t,n){return null!=e?e:null!=t?t:n}function _t(e){var t,n,r,o,a,s=[];if(!e._d){for(r=function(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[ye]&&null==e._a[ge]&&function(e){var t,n,r,i,o,a,s,c;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)o=1,a=4,n=mt(t.GG,e._a[ve],qe(Dt(),1,4).year),r=mt(t.W,1),((i=mt(t.E,1))<1||i>7)&&(c=!0);else{o=e._locale._week.dow,a=e._locale._week.doy;var u=qe(Dt(),o,a);n=mt(t.gg,e._a[ve],u.year),r=mt(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(c=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(c=!0)):i=o}r<1||r>Ve(n,o,a)?h(e)._overflowWeeks=!0:null!=c?h(e)._overflowWeekday=!0:(s=Ue(n,r,i,o,a),e._a[ve]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=mt(e._a[ve],r[ve]),(e._dayOfYear>Me(a)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=Be(a,0,e._dayOfYear),e._a[ge]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[be]&&0===e._a[we]&&0===e._a[ke]&&0===e._a[Se]&&(e._nextDay=!0,e._a[be]=0),e._d=(e._useUTC?Be:function(e,t,n,r,i,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,o,a),s}).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[be]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(h(e).weekdayMismatch=!0)}}var vt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yt=/Z|[+-]\d\d(?::?\d\d)?/,bt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],wt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],kt=/^\/?Date\((\-?\d+)/i;function St(e){var t,n,r,i,o,a,s=e._i,c=vt.exec(s)||gt.exec(s);if(c){for(h(e).iso=!0,t=0,n=bt.length;t<n;t++)if(bt[t][1].exec(c[1])){i=bt[t][0],r=!1!==bt[t][2];break}if(null==i)return void(e._isValid=!1);if(c[3]){for(t=0,n=wt.length;t<n;t++)if(wt[t][1].exec(c[3])){o=(c[2]||" ")+wt[t][0];break}if(null==o)return void(e._isValid=!1)}if(!r&&null!=o)return void(e._isValid=!1);if(c[4]){if(!yt.exec(c[4]))return void(e._isValid=!1);a="Z"}e._f=i+(o||"")+(a||""),Et(e)}else e._isValid=!1}var Ot=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Ct(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var Mt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function xt(e){var t,n,r,i,o,a,s,c=Ot.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(c){var u=(t=c[4],n=c[3],r=c[2],i=c[5],o=c[6],a=c[7],s=[Ct(t),Ae.indexOf(n),parseInt(r,10),parseInt(i,10),parseInt(o,10)],a&&s.push(parseInt(a,10)),s);if(!function(e,t,n){if(e){var r=Ke.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(r!==i)return h(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}(c[1],u,e))return;e._a=u,e._tzm=function(e,t,n){if(e)return Mt[e];if(t)return 0;var r=parseInt(n,10),i=r%100,o=(r-i)/100;return 60*o+i}(c[8],c[9],c[10]),e._d=Be.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function Et(e){if(e._f!==i.ISO_8601)if(e._f!==i.RFC_2822){e._a=[],h(e).empty=!0;var t,n,r,o,a,s=""+e._i,c=s.length,u=0;for(r=V(e._f,e._locale).match(H)||[],t=0;t<r.length;t++)o=r[t],(n=(s.match(de(o,e))||[])[0])&&((a=s.substr(0,s.indexOf(n))).length>0&&h(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),u+=n.length),z[o]?(n?h(e).empty=!1:h(e).unusedTokens.push(o),_e(o,n,e)):e._strict&&!n&&h(e).unusedTokens.push(o);h(e).charsLeftOver=c-u,s.length>0&&h(e).unusedInput.push(s),e._a[be]<=12&&!0===h(e).bigHour&&e._a[be]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[be]=(l=e._locale,d=e._a[be],null==(f=e._meridiem)?d:null!=l.meridiemHour?l.meridiemHour(d,f):null!=l.isPM?((p=l.isPM(f))&&d<12&&(d+=12),p||12!==d||(d=0),d):d),_t(e),ht(e)}else xt(e);else St(e);var l,d,f,p}function Tt(e){var t=e._i,n=e._f;return e._locale=e._locale||pt(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new b(ht(t)):(u(t)?e._d=t:o(n)?function(e){var t,n,r,i,o;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<e._f.length;i++)o=0,t=g({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Et(t),m(t)&&(o+=h(t).charsLeftOver,o+=10*h(t).unusedTokens.length,h(t).score=o,(null==r||o<r)&&(r=o,n=t));f(e,n||t)}(e):n?Et(e):function(e){var t=e._i;s(t)?e._d=new Date(i.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=kt.exec(e._i);null===t?(St(e),!1===e._isValid&&(delete e._isValid,xt(e),!1===e._isValid&&(delete e._isValid,i.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):o(t)?(e._a=l(t.slice(0),function(e){return parseInt(e,10)}),_t(e)):a(t)?function(e){if(!e._d){var t=A(e._i);e._a=l([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),_t(e)}}(e):c(t)?e._d=new Date(t):i.createFromInputFallback(e)}(e),m(e)||(e._d=null),e))}function jt(e,t,n,r,i){var s,c={};return!0!==n&&!1!==n||(r=n,n=void 0),(a(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||o(e)&&0===e.length)&&(e=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=i,c._l=n,c._i=e,c._f=t,c._strict=r,(s=new b(ht(Tt(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Dt(e,t,n,r){return jt(e,t,n,r,!1)}i.createFromInputFallback=M("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),i.ISO_8601=function(){},i.RFC_2822=function(){};var Lt=M("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Dt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()}),Pt=M("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Dt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()});function It(e,t){var n,r;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Dt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Nt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function At(e){var t=A(e),n=t.year||0,r=t.quarter||0,i=t.month||0,o=t.week||t.isoWeek||0,a=t.day||0,s=t.hour||0,c=t.minute||0,u=t.second||0,l=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Ee.call(Nt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<Nt.length;++r)if(e[Nt[r]]){if(n)return!1;parseFloat(e[Nt[r]])!==S(e[Nt[r]])&&(n=!0)}return!0}(t),this._milliseconds=+l+1e3*u+6e4*c+1e3*s*60*60,this._days=+a+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=pt(),this._bubble()}function Yt(e){return e instanceof At}function Rt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,t){U(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+F(~~(e/60),2)+t+F(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),le("Z",se),le("ZZ",se),he(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Wt(se,e)});var Ht=/([\+\-]|\d\d)/gi;function Wt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=n[n.length-1]||[],i=(r+"").match(Ht)||["-",0,0],o=60*i[1]+S(i[2]);return 0===o?0:"+"===i[0]?o:-o}function Bt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(w(e)||u(e)?e.valueOf():Dt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):Dt(e).local()}function zt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Ut(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var qt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Vt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function $t(e,t){var n,r,i,o,a,s,u=e,l=null;return Yt(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:c(e)?(u={},t?u[t]=e:u.milliseconds=e):(l=qt.exec(e))?(n="-"===l[1]?-1:1,u={y:0,d:S(l[ye])*n,h:S(l[be])*n,m:S(l[we])*n,s:S(l[ke])*n,ms:S(Rt(1e3*l[Se]))*n}):(l=Vt.exec(e))?(n="-"===l[1]?-1:1,u={y:Gt(l[2],n),M:Gt(l[3],n),w:Gt(l[4],n),d:Gt(l[5],n),h:Gt(l[6],n),m:Gt(l[7],n),s:Gt(l[8],n)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(o=Dt(u.from),a=Dt(u.to),i=o.isValid()&&a.isValid()?(a=Bt(a,o),o.isBefore(a)?s=Kt(o,a):((s=Kt(a,o)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(u={}).ms=i.milliseconds,u.M=i.months),r=new At(u),Yt(e)&&d(e,"_locale")&&(r._locale=e._locale),r}function Gt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Kt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Jt(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(T(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Qt(this,$t(n="string"==typeof n?+n:n,r),e),this}}function Qt(e,t,n,r){var o=t._milliseconds,a=Rt(t._days),s=Rt(t._months);e.isValid()&&(r=null==r||r,s&&Ye(e,De(e,"Month")+s*n),a&&Le(e,"Date",De(e,"Date")+a*n),o&&e._d.setTime(e._d.valueOf()+o*n),r&&i.updateOffset(e,a||s))}$t.fn=At.prototype,$t.invalid=function(){return $t(NaN)};var Zt=Jt(1,"add"),Xt=Jt(-1,"subtract");function en(e,t){var n,r,i=12*(t.year()-e.year())+(t.month()-e.month()),o=e.clone().add(i,"months");return t-o<0?(n=e.clone().add(i-1,"months"),r=(t-o)/(o-n)):(n=e.clone().add(i+1,"months"),r=(t-o)/(n-o)),-(i+r)||0}function tn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=pt(e))&&(this._locale=t),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var nn=M("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function rn(){return this._locale}var on=1e3,an=60*on,sn=60*an,cn=3506328*sn;function un(e,t){return(e%t+t)%t}function ln(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-cn:new Date(e,t,n).valueOf()}function dn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-cn:Date.UTC(e,t,n)}function fn(e,t){U(0,[e,e.length],0,t)}function pn(e,t,n,r,i){var o;return null==e?qe(this,r,i).year:(o=Ve(e,r,i),t>o&&(t=o),function(e,t,n,r,i){var o=Ue(e,t,n,r,i),a=Be(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,r,i))}U(0,["gg",2],0,function(){return this.weekYear()%100}),U(0,["GG",2],0,function(){return this.isoWeekYear()%100}),fn("gggg","weekYear"),fn("ggggg","weekYear"),fn("GGGG","isoWeekYear"),fn("GGGGG","isoWeekYear"),I("weekYear","gg"),I("isoWeekYear","GG"),R("weekYear",1),R("isoWeekYear",1),le("G",oe),le("g",oe),le("GG",Z,G),le("gg",Z,G),le("GGGG",ne,J),le("gggg",ne,J),le("GGGGG",re,Q),le("ggggg",re,Q),me(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=S(e)}),me(["gg","GG"],function(e,t,n,r){t[r]=i.parseTwoDigitYear(e)}),U("Q",0,"Qo","quarter"),I("quarter","Q"),R("quarter",7),le("Q",$),he("Q",function(e,t){t[ge]=3*(S(e)-1)}),U("D",["DD",2],"Do","date"),I("date","D"),R("date",9),le("D",Z),le("DD",Z,G),le("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),he(["D","DD"],ye),he("Do",function(e,t){t[ye]=S(e.match(Z)[0])});var hn=je("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),I("dayOfYear","DDD"),R("dayOfYear",4),le("DDD",te),le("DDDD",K),he(["DDD","DDDD"],function(e,t,n){n._dayOfYear=S(e)}),U("m",["mm",2],0,"minute"),I("minute","m"),R("minute",14),le("m",Z),le("mm",Z,G),he(["m","mm"],we);var mn=je("Minutes",!1);U("s",["ss",2],0,"second"),I("second","s"),R("second",15),le("s",Z),le("ss",Z,G),he(["s","ss"],ke);var _n,vn=je("Seconds",!1);for(U("S",0,0,function(){return~~(this.millisecond()/100)}),U(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,function(){return 10*this.millisecond()}),U(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),U(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),U(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),U(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),U(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),I("millisecond","ms"),R("millisecond",16),le("S",te,$),le("SS",te,G),le("SSS",te,K),_n="SSSS";_n.length<=9;_n+="S")le(_n,ie);function gn(e,t){t[Se]=S(1e3*("0."+e))}for(_n="S";_n.length<=9;_n+="S")he(_n,gn);var yn=je("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var bn=b.prototype;function wn(e){return e}bn.add=Zt,bn.calendar=function(e,t){var n=e||Dt(),r=Bt(n,this).startOf("day"),o=i.calendarFormat(this,r)||"sameElse",a=t&&(j(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,Dt(n)))},bn.clone=function(){return new b(this)},bn.diff=function(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=Bt(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=N(t)){case"year":o=en(this,r)/12;break;case"month":o=en(this,r);break;case"quarter":o=en(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:k(o)},bn.endOf=function(e){var t;if(void 0===(e=N(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?dn:ln;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=sn-un(t+(this._isUTC?0:this.utcOffset()*an),sn)-1;break;case"minute":t=this._d.valueOf(),t+=an-un(t,an)-1;break;case"second":t=this._d.valueOf(),t+=on-un(t,on)-1}return this._d.setTime(t),i.updateOffset(this,!0),this},bn.format=function(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=q(this,e);return this.localeData().postformat(t)},bn.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Dt(e).isValid())?$t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},bn.fromNow=function(e){return this.from(Dt(),e)},bn.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Dt(e).isValid())?$t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},bn.toNow=function(e){return this.to(Dt(),e)},bn.get=function(e){return j(this[e=N(e)])?this[e]():this},bn.invalidAt=function(){return h(this).overflow},bn.isAfter=function(e,t){var n=w(e)?e:Dt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},bn.isBefore=function(e,t){var n=w(e)?e:Dt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},bn.isBetween=function(e,t,n,r){var i=w(e)?e:Dt(e),o=w(t)?t:Dt(t);return!!(this.isValid()&&i.isValid()&&o.isValid())&&(("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(o,n):!this.isAfter(o,n)))},bn.isSame=function(e,t){var n,r=w(e)?e:Dt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=N(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},bn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},bn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},bn.isValid=function(){return m(this)},bn.lang=nn,bn.locale=tn,bn.localeData=rn,bn.max=Pt,bn.min=Lt,bn.parsingFlags=function(){return f({},h(this))},bn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:Y[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=A(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(j(this[e=N(e)]))return this[e](t);return this},bn.startOf=function(e){var t;if(void 0===(e=N(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?dn:ln;switch(e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=un(t+(this._isUTC?0:this.utcOffset()*an),sn);break;case"minute":t=this._d.valueOf(),t-=un(t,an);break;case"second":t=this._d.valueOf(),t-=un(t,on)}return this._d.setTime(t),i.updateOffset(this,!0),this},bn.subtract=Xt,bn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},bn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},bn.toDate=function(){return new Date(this.valueOf())},bn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?q(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):j(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",q(n,"Z")):q(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},bn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},bn.toJSON=function(){return this.isValid()?this.toISOString():null},bn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},bn.unix=function(){return Math.floor(this.valueOf()/1e3)},bn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},bn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},bn.year=Te,bn.isLeapYear=function(){return xe(this.year())},bn.weekYear=function(e){return pn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},bn.isoWeekYear=function(e){return pn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},bn.quarter=bn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},bn.month=Re,bn.daysInMonth=function(){return Pe(this.year(),this.month())},bn.week=bn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},bn.isoWeek=bn.isoWeeks=function(e){var t=qe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},bn.weeksInYear=function(){var e=this.localeData()._week;return Ve(this.year(),e.dow,e.doy)},bn.isoWeeksInYear=function(){return Ve(this.year(),1,4)},bn.date=hn,bn.day=bn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},bn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},bn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},bn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},bn.hour=bn.hours=ot,bn.minute=bn.minutes=mn,bn.second=bn.seconds=vn,bn.millisecond=bn.milliseconds=yn,bn.utcOffset=function(e,t,n){var r,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Wt(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=zt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==e&&(!t||this._changeInProgress?Qt(this,$t(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:zt(this)},bn.utc=function(e){return this.utcOffset(0,e)},bn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(zt(this),"m")),this},bn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Wt(ae,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},bn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Dt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},bn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},bn.isLocal=function(){return!!this.isValid()&&!this._isUTC},bn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},bn.isUtc=Ut,bn.isUTC=Ut,bn.zoneAbbr=function(){return this._isUTC?"UTC":""},bn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},bn.dates=M("dates accessor is deprecated. Use date instead.",hn),bn.months=M("months accessor is deprecated. Use month instead",Re),bn.years=M("years accessor is deprecated. Use year instead",Te),bn.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),bn.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),(e=Tt(e))._a){var t=e._isUTC?p(e._a):Dt(e._a);this._isDSTShifted=this.isValid()&&O(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var kn=L.prototype;function Sn(e,t,n,r){var i=pt(),o=p().set(r,t);return i[n](o,e)}function On(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return Sn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Sn(e,r,n,"month");return i}function Cn(e,t,n,r){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var i,o=pt(),a=e?o._week.dow:0;if(null!=n)return Sn(t,(n+a)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=Sn(t,(i+a)%7,r,"day");return s}kn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return j(r)?r.call(t,n):r},kn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},kn.invalidDate=function(){return this._invalidDate},kn.ordinal=function(e){return this._ordinal.replace("%d",e)},kn.preparse=wn,kn.postformat=wn,kn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return j(i)?i(e,t,n,r):i.replace(/%d/i,e)},kn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return j(n)?n(t):n.replace(/%s/i,t)},kn.set=function(e){var t,n;for(n in e)j(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},kn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ie).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},kn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ie.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},kn.monthsParse=function(e,t,n){var r,i,o;if(this._monthsParseExact)return function(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=p([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Ee.call(this._shortMonthsParse,a))?i:null:-1!==(i=Ee.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Ee.call(this._shortMonthsParse,a))?i:-1!==(i=Ee.call(this._longMonthsParse,a))?i:null:-1!==(i=Ee.call(this._longMonthsParse,a))?i:-1!==(i=Ee.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=p([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},kn.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||We.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=He),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},kn.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||We.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Fe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},kn.week=function(e){return qe(e,this._week.dow,this._week.doy).week},kn.firstDayOfYear=function(){return this._week.doy},kn.firstDayOfWeek=function(){return this._week.dow},kn.weekdays=function(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?$e(n,this._week.dow):e?n[e.day()]:n},kn.weekdaysMin=function(e){return!0===e?$e(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},kn.weekdaysShort=function(e){return!0===e?$e(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},kn.weekdaysParse=function(e,t,n){var r,i,o;if(this._weekdaysParseExact)return function(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ee.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ee.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ee.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Ee.call(this._weekdaysParse,a))?i:-1!==(i=Ee.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ee.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ee.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ee.call(this._weekdaysParse,a))?i:-1!==(i=Ee.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ee.call(this._minWeekdaysParse,a))?i:-1!==(i=Ee.call(this._weekdaysParse,a))?i:-1!==(i=Ee.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=p([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},kn.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Qe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},kn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ze),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},kn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Xe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},kn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},kn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},dt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===S(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),i.lang=M("moment.lang is deprecated. Use moment.locale instead.",dt),i.langData=M("moment.langData is deprecated. Use moment.localeData instead.",pt);var Mn=Math.abs;function xn(e,t,n,r){var i=$t(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function En(e){return e<0?Math.floor(e):Math.ceil(e)}function Tn(e){return 4800*e/146097}function jn(e){return 146097*e/4800}function Dn(e){return function(){return this.as(e)}}var Ln=Dn("ms"),Pn=Dn("s"),In=Dn("m"),Nn=Dn("h"),An=Dn("d"),Yn=Dn("w"),Rn=Dn("M"),Fn=Dn("Q"),Hn=Dn("y");function Wn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Bn=Wn("milliseconds"),zn=Wn("seconds"),Un=Wn("minutes"),qn=Wn("hours"),Vn=Wn("days"),$n=Wn("months"),Gn=Wn("years"),Kn=Math.round,Jn={ss:44,s:45,m:45,h:22,d:26,M:11},Qn=Math.abs;function Zn(e){return(e>0)-(e<0)||+e}function Xn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Qn(this._milliseconds)/1e3,r=Qn(this._days),i=Qn(this._months);e=k(n/60),t=k(e/60),n%=60,e%=60;var o=k(i/12),a=i%=12,s=r,c=t,u=e,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var f=d<0?"-":"",p=Zn(this._months)!==Zn(d)?"-":"",h=Zn(this._days)!==Zn(d)?"-":"",m=Zn(this._milliseconds)!==Zn(d)?"-":"";return f+"P"+(o?p+o+"Y":"")+(a?p+a+"M":"")+(s?h+s+"D":"")+(c||u||l?"T":"")+(c?m+c+"H":"")+(u?m+u+"M":"")+(l?m+l+"S":"")}var er=At.prototype;return er.isValid=function(){return this._isValid},er.abs=function(){var e=this._data;return this._milliseconds=Mn(this._milliseconds),this._days=Mn(this._days),this._months=Mn(this._months),e.milliseconds=Mn(e.milliseconds),e.seconds=Mn(e.seconds),e.minutes=Mn(e.minutes),e.hours=Mn(e.hours),e.months=Mn(e.months),e.years=Mn(e.years),this},er.add=function(e,t){return xn(this,e,t,1)},er.subtract=function(e,t){return xn(this,e,t,-1)},er.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=N(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Tn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(jn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},er.asMilliseconds=Ln,er.asSeconds=Pn,er.asMinutes=In,er.asHours=Nn,er.asDays=An,er.asWeeks=Yn,er.asMonths=Rn,er.asQuarters=Fn,er.asYears=Hn,er.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*S(this._months/12):NaN},er._bubble=function(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,c=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*En(jn(s)+a),a=0,s=0),c.milliseconds=o%1e3,e=k(o/1e3),c.seconds=e%60,t=k(e/60),c.minutes=t%60,n=k(t/60),c.hours=n%24,a+=k(n/24),i=k(Tn(a)),s+=i,a-=En(jn(i)),r=k(s/12),s%=12,c.days=a,c.months=s,c.years=r,this},er.clone=function(){return $t(this)},er.get=function(e){return e=N(e),this.isValid()?this[e+"s"]():NaN},er.milliseconds=Bn,er.seconds=zn,er.minutes=Un,er.hours=qn,er.days=Vn,er.weeks=function(){return k(this.days()/7)},er.months=$n,er.years=Gn,er.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=$t(e).abs(),i=Kn(r.as("s")),o=Kn(r.as("m")),a=Kn(r.as("h")),s=Kn(r.as("d")),c=Kn(r.as("M")),u=Kn(r.as("y")),l=i<=Jn.ss&&["s",i]||i<Jn.s&&["ss",i]||o<=1&&["m"]||o<Jn.m&&["mm",o]||a<=1&&["h"]||a<Jn.h&&["hh",a]||s<=1&&["d"]||s<Jn.d&&["dd",s]||c<=1&&["M"]||c<Jn.M&&["MM",c]||u<=1&&["y"]||["yy",u];return l[2]=t,l[3]=+e>0,l[4]=n,function(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}.apply(null,l)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},er.toISOString=Xn,er.toString=Xn,er.toJSON=Xn,er.locale=tn,er.localeData=rn,er.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Xn),er.lang=nn,U("X",0,0,"unix"),U("x",0,0,"valueOf"),le("x",oe),le("X",/[+-]?\d+(\.\d{1,3})?/),he("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),he("x",function(e,t,n){n._d=new Date(S(e))}),i.version="2.24.0",t=Dt,i.fn=bn,i.min=function(){return It("isBefore",[].slice.call(arguments,0))},i.max=function(){return It("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=p,i.unix=function(e){return Dt(1e3*e)},i.months=function(e,t){return On(e,t,"months")},i.isDate=u,i.locale=dt,i.invalid=_,i.duration=$t,i.isMoment=w,i.weekdays=function(e,t,n){return Cn(e,t,n,"weekdays")},i.parseZone=function(){return Dt.apply(null,arguments).parseZone()},i.localeData=pt,i.isDuration=Yt,i.monthsShort=function(e,t){return On(e,t,"monthsShort")},i.weekdaysMin=function(e,t,n){return Cn(e,t,n,"weekdaysMin")},i.defineLocale=ft,i.updateLocale=function(e,t){if(null!=t){var n,r,i=at;null!=(r=lt(e))&&(i=r._config),t=D(i,t),(n=new L(t)).parentLocale=st[e],st[e]=n,dt(e)}else null!=st[e]&&(null!=st[e].parentLocale?st[e]=st[e].parentLocale:null!=st[e]&&delete st[e]);return st[e]},i.locales=function(){return x(st)},i.weekdaysShort=function(e,t,n){return Cn(e,t,n,"weekdaysShort")},i.normalizeUnits=N,i.relativeTimeRounding=function(e){return void 0===e?Kn:"function"==typeof e&&(Kn=e,!0)},i.relativeTimeThreshold=function(e,t){return void 0!==Jn[e]&&(void 0===t?Jn[e]:(Jn[e]=t,"s"===e&&(Jn.ss=t-1),!0))},i.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=bn,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}).call(this,n(85)(e))},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"ERROR_CODE_CLIENT_VERIFICATION_REQUIRED",function(){return T}),n.d(r,"perform",function(){return j}),n.d(r,"reset",function(){return D}),n.d(r,"currentState",function(){return P});var i,o="&scrivito.authFailedCount=";function a(){i=0}var s={init:function(e){a();var t=e.location,n=t.hash,r=n.indexOf(o);if(!(r<0)){var s=n.substr(r+o.length,3),c=n.substring(0,r);"#"===c&&(c="");var u=t.href.toString().replace(n,c);i=parseInt(s,10)||0,e.history.replaceState({},"",u)}},augmentedRedirectUrl:function(e){var t=e.toString();return e.hash||(t+="#"),""+t+o+(i+1)},reset:a,currentFailureCount:function(){return i}},c=n(0),u=n(2),l=n(13);var d,f,p=(d=function(e,t){var n,r;return(d=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.httpCode=n,i.backendCode=r,i}return p(t,e),t.for=function(e,n,r){return"binary.unprocessable.image.transform.source.too_large"===r?new y(e,n,r):r&&-1!==r.indexOf("binary.unprocessable.image.transform.source.")?new b(e,n,r):new t(e,n,r)},t}(c.i),m=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return p(t,e),t}(h),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t}(c.i),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t}(c.i),g=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r)||this;return o.details=i||{},o}return p(t,e),t}(h),y=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return p(t,e),t}(h),b=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return p(t,e),t}(h),w=!1,k=0;function S(){return k>0}function O(e,t,n){var r=n.params,i=n.authorization,o=n.forceVerification;return w?c.j.resolve(new XMLHttpRequest):(k+=1,new c.j(function(n,a){var s=function(e,t,n,r){var i=new XMLHttpRequest;function o(e){!function(e,t){k-=1,t(e)}(new v(e),r)}return i.open("POST"===e?"POST":"PUT",t),i.timeout=15e3,i.withCredentials=!0,i.onload=function(){return function(e,t,n){k-=1;var r=e.status;if(!r||!Object(u.isNumber)(r)){var i="Unexpected response status: "+r+"; body: "+(0===r?e.statusText:e.responseText);n(new v(i))}t(e)}(i,n,r)},i.onerror=function(){return o("XMLHttpRequest Error")},i.ontimeout=function(){return o("XMLHttpRequest Timeout")},i.onabort=function(){return o("XMLHttpRequest Aborted")},i}(e,t,n,a);i&&s.setRequestHeader("Authorization",i),s.setRequestHeader("Scrivito-Client","jssdk/"+Object(c.x)()),o&&s.setRequestHeader("Scrivito-Force-Verification","true"),s.setRequestHeader("Content-type","application/json; charset=utf-8"),s.send(JSON.stringify(r))}))}function C(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}f={},window._scrivitoRegisterVerificator=function(e,t){f[e].resolve(t)};var M,x,E=function(){var e=function(t,n){return(e=Object.setPrototypeOf||C({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T="client_verification_required";!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}E(t,e)}(g);function j(e){return e(L()).catch(function t(n){if(!function(e){return C(e,g)&&e.backendCode===T}(n))throw n;return function(e){if(!M){var t=e.verificator,n=e.data,r=(i=t.id,o=t.url,a=f[i],a||(a=new c.e,f[i]=a,Object(c.E)(o)),a.promise).then(function(e){return new c.j(function(t){e(n,function(e){t((x=e).authorization)})})});M={challenge:{verificator:t,data:n},promise:Object(c.J)(r,function(){M=void 0})}}var i,o,a;return M.promise}(n.details).then(e).catch(t)})}function D(){M=void 0,x=void 0}function L(){if(x){if(!(x.expiresAfter<new Date))return x.authorization;x=void 0}}function P(){var e=L();if(e)return"Authorization: "+e;if(M){var t=M.challenge;return"Pending computation: "+t.verificator.id+" with "+t.data}return null}var I,N,A=n(14);function Y(e){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var R=function(){function e(){this.initDeferred=new c.e,this.authHeaderValueProvider=r}return e.prototype.init=function(e,t,n){t&&(this.tenant=t,this.endpoint=e,this.url=l(e+"/tenants/"+t+"/perform").scheme("https").toString(),this.initDeferred.resolve(void 0)),n&&(this.authHeaderValueProvider=n)},e.prototype.get=function(e,t){return this.perform("GET",e,t)},e.prototype.put=function(e,t){return this.perform("PUT",e,t)},e.prototype.post=function(e,t){return this.perform("POST",e,t)},e.prototype.delete=function(e,t){return this.perform("DELETE",e,t)},e.prototype.requestBuiltInUserSession=function(e){var t=this;return this.ensureInitialized().then(function(){return t.ajax("PUT","sessions/"+e)}).then(function(e){return s.reset(),e})},e.prototype.requestVisitorSession=function(e,t){var n=this;return this.ensureInitialized().then(function(){return n.ajax("PUT","sessions/"+e,void 0,"id_token "+t)})},e.prototype.enableForceVerification=function(){this.forceVerification=!0},e.prototype.currentPublicAuthorizationState=function(){return this.authHeaderValueProvider?this.authHeaderValueProvider.currentState?"[API] "+this.authHeaderValueProvider.currentState():"[API]: authorization provider without currentState()":"[API]: no authorization provider"},e.prototype.ensureInitialized=function(){return this.initDeferred.promise},e.prototype.perform=function(e,t,n){var r=this;return this.ensureInitialized().then(function(){return r.send(e,t,n).then(function(e){return function(e){return!!e&&!!e.task&&1===Object(u.size)(e)}(e)?r.handleTask(e.task):e})})},e.prototype.send=function(e,t,n){var r=this;return this.authHeaderValueProvider.perform(function(i){return r.ajax(e,t,n,i)})},e.prototype.ajax=function(e,t,n,r){var i=this.url,o=this.forceVerification,a={params:{path:t,verb:e,params:n||{}},authorization:r,forceVerification:o};function s(){return function e(t,n){void 0===n&&(n=0);if(N)return new c.j(function(e){return e(t())});return t().then(function(r){if(429!==r.status)return r;if(I&&n>19)throw new Error("Maximum number of rate limit retries reached");var i=Number(r.getResponseHeader("Retry-After"))||0,o=Math.max(1e3*i,F(n));return Object(c.T)(o).then(function(){return e(t,n+1)})})}(function(){return O(e,i,a)}).then(H)}return"POST"===e?s():function e(t,n){void 0===n&&(n=0);if(N)return new c.j(function(e){return e(t())});return t().catch(function(r){if(o=r,null!=(a=v)&&"undefined"!=typeof Symbol&&a[Symbol.hasInstance]?a[Symbol.hasInstance](o):o instanceof a){if(I&&n>5)throw r;var i=F(n);return Object(c.T)(i).then(function(){return e(t,n+1)})}var o,a;throw r})}(s)},e.prototype.handleTask=function(e){var t=this;switch(e.status){case"success":return e.result;case"error":throw h.for(e.message,412,e.code);case"open":return Object(c.S)(2).then(function(){return t.get("tasks/"+e.id).then(function(e){return t.handleTask(e)})});default:throw new v("Invalid task response (unknown status)")}},e}();function F(e){return 500*Math.pow(2,Math.min(e,16))}function H(e){var t,n=e.status;try{t=JSON.parse(e.responseText)}catch(t){throw new v(e.responseText)}if(n>=200&&n<300)return t;if("auth_missing"===t.code){var r=t.details;if(r&&W(r)){var i=r.visit;if("string"==typeof i){var o=function(e){var t=s.augmentedRedirectUrl(Object(A.f)());return e.replace("retry=RETRY","retry="+s.currentFailureCount()).replace(/\$RETURN_TO/,encodeURIComponent(t))}(i);throw Object(A.i)(o),new _("Insufficient authorization - please visit "+o)}}}throw function(e,t,n){if(401===e){var r=z(t);return new g(r.error,e,r.code,r.details)}if(403===e){var r=z(t),i=r.code;if(!i||!B(i))throw new v("Authentication failure response no string value for code");return new m(r.error,e,i)}if(t.error&&"4"===e.toString()[0]){var r=z(t);return h.for(r.error,e,r.code)}if(500===e)return B(t.error)?new v(t.error):new v(n);return new v(n)}(n,t,e.responseText)}function W(e){return"object"===Y(e)&&!Array.isArray(e)}function B(e){return"string"==typeof e}function z(e){var t=e.error;if("string"!=typeof t)throw new v("Malformed error response (key error is not a string)");var n=e.code;if(void 0!==n&&!B(n))throw new v("Malformed error response (optional key code is not a string)");var r=e.details;if(void 0!==r&&!W(r))throw new v("Malformed error response (optional key details is not an object");return{code:n,error:t,details:r}}var U=new R;var q=new c.b(function(e){return U.get("blobs/mget",{blobs:e}).then(function(t){return t.results.map(function(t,n){return function(e,t){var n=t.public_access.get;if(!n.url)throw new c.g('Missing public access URL for binary "'+e+'"');var r={public_access:{get:{url:n.url}}},i=t.private_access;if(i){var o=i.get;o.url&&(r.private_access={get:{url:o.url}})}return r}(e[n].id,t)})})});var V={};function $(e,t){return function(e){var t=V[e];t||(t=function(e){return new c.b(function(t){return U.get("workspaces/"+e+"/objs/mget",{ids:t,include_deleted:!0}).then(function(e){return e.results})},{batchSize:17})}(e),V[e]=t);return t}(e).retrieve(t).then(function(e){return e||{_deleted:t}})}var G=function(){return(G=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function K(e,t){var n=G({consistent:!0},t);return U.get("workspaces/"+e+"/objs/search",n).then(function(e){var t=function(e){var t={results:e.results,total:e.total},n=e.continuation;void 0!==n&&(t.continuation=n);var r=e.objs;void 0!==r&&(t.objs=r);return t}(e);return{results:t.results.map(function(e){return e.id}),continuation:t.continuation,total:t.total,objs:t.objs}})}function J(e){return!!e&&"widgetlist_diff"===e.format}var Q={retrieveObj:function(e,t){return $(e,t)},retrieveObjQuery:function(e,t){return K(e,t)},retrieveFacetQuery:function(e,t){return function(e,t){return U.get("workspaces/"+e+"/objs/search",t).then(function(e){return{facets:e.facets.map(function(e){return e.map(function(e){return{total:e.total,value:e.value,results:e.results}})})}})}(e,t)},retrieveBinaryMetadata:function(e){return function(e){return U.get("blobs/"+encodeURIComponent(e||"")+"/meta_data")}(e)},retrieveBinaryUrls:function(e,t){return function(e,t){var n={id:e};return t&&(n.transformation=t),q.retrieve(n)}(e,t)},retrieveObjFieldDiffs:function(e,t){return function(e,t){return U.get("workspaces/"+e+"/objs/"+t+"/diff").then(function(e){return e})}(e,t)}};function Z(e){Q=e}function X(e){return!e._deleted}function ee(e){return"widgetlist"===e[0]}n.d(t,"a",function(){return s}),n.d(t,"d",function(){return U}),n.d(t,"e",function(){return Q}),n.d(t,"j",function(){return Z}),n.d(t,"b",function(){return _}),n.d(t,"c",function(){return g}),n.d(t,"g",function(){return S}),n.d(t,"f",function(){return X}),n.d(t,"h",function(){return ee}),n.d(t,"i",function(){return J})},function(e,t,n){"use strict";var r=n(2),i=n(3),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},s=function(){function e(e,t){var n={};t._scrivitoPrivateSchema&&r.extend(n,t._scrivitoPrivateSchema.attributes),e.attributes&&r.each(e.attributes,function(e,t){n[t]=function(e){if("string"==typeof e)return[e];return[e[0],u(e[1])]}(e)});var i=e.onlyInside;this.definition=o({},e,i?{attributes:n,onlyInside:r.isArray(i)?i:[i]}:{attributes:n})}return e.forInstance=function(e){return this.forClass(e.constructor)},e.forClass=function(e){return e._scrivitoPrivateSchema},e.basicFieldFor=function(t,n){var r=e.forInstance(t);if(r){var o=r.attributes[n];if(o)return new i.BasicField(t._scrivitoPrivateContent,n,o)}},Object.defineProperty(e.prototype,"attributes",{get:function(){return this.definition.attributes},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.definition.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onlyInside",{get:function(){return this.definition.onlyInside},enumerable:!0,configurable:!0}),e.prototype.isBinary=function(){var e=this.definition.attributes.blob;return!!e&&"binary"===e[0]},e}();function c(e){return!(!e||!e._scrivitoPrivateSchema)}function u(e){if(!("only"in e))return e;var t=e.only,n=a(e,["only"]);return o({},n,{validClasses:"string"==typeof t?[t]:t})}var l=n(0);function d(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}function f(e,t){if(Object(r.isArray)(t))return Object(r.map)(t,function(t){return f(e,t)});if(d(t,i.BasicObj))return p(t,e.objClassFor(t.objClass()));if(d(t,i.BasicWidget)){var n=t.objClass();return p(t,e.widgetClassFor(n))}if(d(t,i.BasicLink)){var o=Object.create(e.defaultClassForLinks.prototype);return o._scrivitoPrivateContent=t,o}return t}function p(e,t){var n=Object.create(t.prototype);return n._scrivitoPrivateContent=e,n}function h(e){return Object(r.isArray)(e)?Object(r.map)(e,h):e&&e._scrivitoPrivateContent?e._scrivitoPrivateContent:e}function m(e,t,n){return Object(r.mapObject)(e,function(e,r){if(Object(l.z)(r))return[e];var i=t.attributes[r];if(!i)throw new l.a('Attribute "'.concat(r,'" is not defined for CMS object ')+'class "'.concat(n,'".'));return[h(e),i]})}function _(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var g=function(){function e(t){_(this,e),this._registry=t}var t,n,r;return t=e,(n=[{key:"getObj",value:function(e,t){var n=i.BasicObj.get(t);return this._checkObjClassAndWrapInAppClass(e,n)}},{key:"getObjIncludingDeleted",value:function(e,t){var n=i.BasicObj.getIncludingDeleted(t);return this._checkObjClassAndWrapInAppClass(e,n)}},{key:"read",value:function(e,t){var n=s.basicFieldFor(e,t);if(!n)return null;var r=n.get();return f(this._registry,r)}},{key:"update",value:function(e,t){var n,r=this._registry.objClassNameFor(e.constructor);if(!r)throw n=e.constructor===this._registry.defaultClassForObjs?"Obj":"Widget",new l.a('Updating is not supported on the base class "'.concat(n,'".'));if(t.constructor!==Object)throw new l.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");var i=m(t,s.forInstance(e),r);e._scrivitoPrivateContent.update(i)}},{key:"wrapInAppClass",value:function(e){return f(this._registry,e)}},{key:"_checkObjClassAndWrapInAppClass",value:function(e,t){if(!t)return null;var n=this._registry.objClassNameFor(e);if(n&&n!==t.objClass())throw new l.h('Obj with id "'.concat(t.id(),'" is not of type "').concat(n,'".'));return this.wrapInAppClass(t)}}])&&v(t.prototype,n),r&&v(t,r),e}();function y(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e){return function(){function t(){y(this,t)}var n,r,i;return n=t,(r=[{key:"id",value:function(){return this._scrivitoPrivateContent.id()}},{key:"objClass",value:function(){return this._scrivitoPrivateContent.objClass()}},{key:"finishSaving",value:function(){return this._scrivitoPrivateContent.finishSaving()}},{key:"get",value:function(t){if(!Object(l.y)(t))throw new l.a("Attribute names have to be in camel case.");if(Object(l.z)(t))throw new l.a('Attribute name "'.concat(t,'" is not a valid custom attribute name.'));return e.read(this,t)}},{key:"update",value:function(t){e.update(this,t)}}])&&b(n.prototype,r),i&&b(n,i),t}()}function k(e,t,n,r){var i={};return Object.keys(n.definition.attributes).forEach(function(n){if(!Object.prototype.hasOwnProperty.call(e,n)){var o=t.initialContentFor(r,n);void 0!==o&&(i[n]=o)}}),i}function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function M(e,t){return!t||"object"!==S(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(e){var t=new g(e);function n(t,n){var r=new e.ObjSearch;return t&&r.and("_objClass","equals",t),n&&r._scrivitoPrivateContent.batchSize(n),r}function o(t){return f(e,t)}return function(a){function c(){return O(this,c),M(this,x(c).apply(this,arguments))}var u,d,f;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(c,w(t)),u=c,f=[{key:"get",value:function(e){return t.getObj(this,e)}},{key:"getIncludingDeleted",value:function(e){return t.getObjIncludingDeleted(this,e)}},{key:"getByPath",value:function(e){return o(i.BasicObj.getByPath(e))}},{key:"getByPermalink",value:function(e){return o(i.BasicObj.getByPermalink(e))}},{key:"all",value:function(){return n(e.objClassNameFor(this),1e3)}},{key:"root",value:function(){return o(i.BasicObj.root())}},{key:"where",value:function(t,r,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return n(e.objClassNameFor(this)).and(t,r,i,o)}},{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};j(e,this._appClassName());var t=this._prepareAttributesForCreate(e);return o(i.BasicObj.create(t))}},{key:"createFromFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e){if(!l.f.is(e)){if(l.c.is(e))throw new l.a('Creating CMS objects from file is only available with instances of "File", but an instance of "Blob" is given');throw new l.a('Creating CMS objects from file is only available with instances of "File"')}}(e),function(e,t,n){if(j(e,t),Object.prototype.hasOwnProperty.call(e,"blob"))throw new l.a('Setting attribute "blob" is not allowed when creating CMS objects from file, because the file will be assigned to that attribute');if(!n.isBinary())throw new l.a('Creating CMS objects from file is only available for classes with a binary attribute "blob"')}(t,this._appClassName(),this._schema());var n=this._prepareAttributesForCreate(t);return i.BasicObj.createFromFile(e,n).then(function(e){return o(e)})}},{key:"_prepareAttributesForCreate",value:function(t){var n=this._schema(),i=this._appClassName(),o=k(t,e,n,i),a={_objClass:i};return m(Object(r.extend)({},t,o,a),n,i)}},{key:"_appClassName",value:function(){return e.objClassNameFor(this)}},{key:"_schema",value:function(){return s.forClass(this)}}],(d=[{key:"lastChanged",value:function(){return this._scrivitoPrivateContent.lastChanged()}},{key:"path",value:function(){return this._scrivitoPrivateContent.path()}},{key:"parent",value:function(){return o(this._scrivitoPrivateContent.parent())}},{key:"ancestors",value:function(){return o(this._scrivitoPrivateContent.ancestors())}},{key:"backlinks",value:function(){return o(this._scrivitoPrivateContent.backlinks())}},{key:"children",value:function(){return o(this._scrivitoPrivateContent.children())}},{key:"orderedChildren",value:function(){return o(this._scrivitoPrivateContent.orderedChildren())}},{key:"permalink",value:function(){return this._scrivitoPrivateContent.permalink()}},{key:"slug",value:function(){return this._scrivitoPrivateContent.slug()}},{key:"isBinary",value:function(){var e=s.forInstance(this);return!!e&&e.isBinary()}},{key:"isRestricted",value:function(){return this._scrivitoPrivateContent.isRestricted()}},{key:"contentLength",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentLength():0}},{key:"contentType",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentType():""}},{key:"contentUrl",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentUrl():""}},{key:"metadata",value:function(){return this.isBinary()?this._scrivitoPrivateContent.metadata():new i.MetadataCollection}},{key:"restrict",value:function(){this._scrivitoPrivateContent.restrict()}},{key:"unrestrict",value:function(){this._scrivitoPrivateContent.unrestrict()}},{key:"widget",value:function(e){return o(this._scrivitoPrivateContent.widget(e))}},{key:"widgets",value:function(){return o(this._scrivitoPrivateContent.widgets())}},{key:"destroy",value:function(){this._scrivitoPrivateContent.destroy()}}])&&C(u.prototype,d),f&&C(u,f),c}()}function j(e,t){if(!t)throw new l.a("Creating CMS objects is not supported for the class Obj or abstract classes.");if(e.constructor!==Object)throw new l.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(e._objClass)throw new l.a('Invalid attribute "_objClass". '+'"'.concat(e._objClass,'.create" will automatically set the CMS object class ')+"correctly.")}var D=function(){function e(e,t){this._registry=e,this._basicObjFacetValue=t}return e.prototype.name=function(){return this._basicObjFacetValue.name()},e.prototype.count=function(){return this._basicObjFacetValue.count()},e.prototype.includedObjs=function(){var e=this._basicObjFacetValue.includedObjs();return f(this._registry,e)},e}();function L(e){var t=function(){function t(){this._scrivitoPrivateContent=new i.BasicObjSearch}return t.prototype.and=function(e,n,r,i){if(c=e,null!=(u=t)&&"undefined"!=typeof Symbol&&u[Symbol.hasInstance]?u[Symbol.hasInstance](c):c instanceof u){var o=e;this._scrivitoPrivateContent.and(o._scrivitoPrivateContent)}else{if(void 0===n)throw new l.a("Missing operator to search with");if(void 0===r)throw new l.a('Missing value to search (specify "null" for missing)');var a=P(r),s=e;this._scrivitoPrivateContent.and(s,n,a,i)}var c,u;return this},t.prototype.andNot=function(e,t,n){var r=P(n);return this._scrivitoPrivateContent.andNot(e,t,r),this},t.prototype.facet=function(t,n){return this._scrivitoPrivateContent.facet(t,n).map(function(t){return new D(e,t)})},t.prototype.first=function(){var t=this._scrivitoPrivateContent.first();return t?f(e,t):null},t.prototype.take=function(t){return this._scrivitoPrivateContent.take(t).map(function(t){return f(e,t)})},t.prototype.toArray=function(){return this._scrivitoPrivateContent.take().map(function(t){return f(e,t)})},t.prototype.offset=function(e){return this._scrivitoPrivateContent.offset(e),this},t.prototype.order=function(e,t){return this._scrivitoPrivateContent.order(e,t),this},t.prototype.count=function(){return this._scrivitoPrivateContent.count()},t}();if("function"==typeof Symbol){var n=Symbol.iterator;if(n)t.prototype[n]=function(){var t=this._scrivitoPrivateContent.iterator();return{next:function(){var n=t.next();return n.done?{done:n.done}:{done:n.done,value:f(e,n.value)}}}}}return t}function P(e){return r.isArray(e)?e.map(function(e){return h(e)}):h(e)}function I(e){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function N(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Y(e){return(Y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function F(e,t){return(F=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function H(e){var t=new g(e);return function(n){function o(){var t,n,r,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};N(this,o),n=this,t=!(r=Y(o).call(this))||"object"!==I(r)&&"function"!=typeof r?R(n):r;var c=s.forInstance(R(t)),u=e.objClassNameFor(t.constructor),l=t._prepareAttributesForConstructor(a,c,u),d=new i.BasicWidget(l);return d.onDidPersist(function(t){var n=f(e,t),r=k(l,e,c,u);n.update(r)}),t._scrivitoPrivateContent=d,t}var a,c,u;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&F(e,t)}(o,w(t)),a=o,(c=[{key:"obj",value:function(){var t=this._scrivitoPrivateContent.obj();return f(e,t)}},{key:"copy",value:function(){var t=e.widgetClassFor(this.objClass());return p(this._scrivitoPrivateContent.copy(),t)}},{key:"destroy",value:function(){this._scrivitoPrivateContent.remove()}},{key:"_prepareAttributesForConstructor",value:function(e,t,n){!function(e,t){if(!e)throw new l.a("Creating widgets is not supported for the class Widget or abstract classes.");if(t.constructor!==Object)throw new l.a("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(t._objClass)throw new l.a('Invalid attribute "_objClass". '+'"new '.concat(t._objClass,'" will automatically set the CMS object class correctly.'))}(n,e);var i={_objClass:n};return m(Object(r.extend)({},e,i),t,n)}}])&&A(a.prototype,c),u&&A(a,u),o}()}var W=["hash","obj","query","rel","target","title","url"];function B(e){return function(e){var t=r.without.apply(r,[r.keys(e)].concat(W));if(!r.isEmpty(t))throw new l.a("Unexpected attributes "+Object(l.I)(t)+". Available attributes: "+Object(l.I)(W))}(e),r.has(e,"obj")?r.extend({},e,{objId:z(e.obj)}):e}function z(e){return e?h(e).id():null}n(117);var U=function(){function e(){var e;this.mapping={},this.defaultClassForObjs=T(this),this.defaultClassForWidgets=H(this),this.defaultClassForLinks=(e=this,function(){function t(e){var t=B(e);this._scrivitoPrivateContent=new i.BasicLink(t)}return t.prototype.title=function(){return this._scrivitoPrivateContent.title()},t.prototype.query=function(){return this._scrivitoPrivateContent.query()},t.prototype.hash=function(){return this._scrivitoPrivateContent.hash()},t.prototype.rel=function(){return this._scrivitoPrivateContent.rel()},t.prototype.target=function(){return this._scrivitoPrivateContent.target()},t.prototype.url=function(){return this._scrivitoPrivateContent.url()},t.prototype.obj=function(){var t=this._scrivitoPrivateContent.obj();return t?f(e,t):null},t.prototype.queryParameters=function(){return this._scrivitoPrivateContent.queryParameters()},t.prototype.copy=function(t){var n=this._scrivitoPrivateContent.copy(B(t)),r=Object.create(e.defaultClassForLinks.prototype);return r._scrivitoPrivateContent=n,r},t.prototype.isExternal=function(){return this._scrivitoPrivateContent.isExternal()},t.prototype.isInternal=function(){return this._scrivitoPrivateContent.isInternal()},t}()),this.ObjSearch=L(this)}return e.prototype.register=function(e,t){this.mapping[e]=t},e.prototype.getClass=function(e){return this.mapping[e]||null},e.prototype.allObjClasses=function(){var e=this;return r.pick(this.mapping,function(t){return e.defaultClassForObjs.isPrototypeOf(t)})},e.prototype.allWidgetClasses=function(){var e=this;return r.pick(this.mapping,function(t){return e.defaultClassForWidgets.isPrototypeOf(t)})},e.prototype.objClassFor=function(e){return this.appClassFor(e,this.defaultClassForObjs)},e.prototype.widgetClassFor=function(e){return this.appClassFor(e,this.defaultClassForWidgets)},e.prototype.objClassNameFor=function(e){return r.findKey(this.mapping,function(t){return t===e})},e.prototype.setInitialContentFor=function(e){this.initialContentForFunction=e},e.prototype.initialContentFor=function(e,t){if(this.initialContentForFunction)return this.initialContentForFunction(e,t)},e.prototype.appClassFor=function(e,t){var n=this.getClass(e);return n&&t.isPrototypeOf(n)?n:t},e}();function q(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}var V,$=(V=function(e,t){return(V=Object.setPrototypeOf||q({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}V(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function G(e,t){if(t.extend&&!Z(t.extend,e.defaultClassForObjs))throw new l.a('Invalid value for "extend": not a Scrivito Obj class');var n=t.extend||e.defaultClassForObjs,r=new s(t,n);return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $(t,e),Object.defineProperty(t,"_scrivitoPrivateSchema",{get:function(){return r},enumerable:!0,configurable:!0}),t}(n)}function K(e,t){if(t.extend&&!Z(t.extend,e.defaultClassForWidgets))throw new l.a('Invalid value for "extend": not a Scrivito Widget class');var n=t.extend||e.defaultClassForWidgets,r=new s(t,n);return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $(t,e),Object.defineProperty(t,"_scrivitoPrivateSchema",{get:function(){return r},enumerable:!0,configurable:!0}),t}(n)}function J(e,t,n){var i=function(e,t,n){if(c(n))return n;var i=Object(r.extend)({},n,{name:t});return G(e,i)}(e,t,n);return e.register(t,i),i}function Q(e,t,n){var i=function(e,t,n){if(c(n))return n;var i=Object(r.extend)({},n,{name:t});return K(e,i)}(e,t,n);return e.register(t,i),i}function Z(e,t){return!!e&&(e===t||q(e.prototype,t))}var X=l.O.refinement(l.O.Function,c,"ObjClass"),ee=l.O.interface({attributes:l.O.maybe(l.O.dict(l.O.refinement(l.O.String,function(e){return/^[a-z](_+[A-Z0-9]|[A-Za-z0-9])*$/.test(e)},"String (alphanumeric, starting with a lower-case character)"),l.O.union([l.O.enums.of(["binary","date","float","html","integer","link","linklist","reference","referencelist","string","stringlist","widgetlist"]),l.O.tuple([l.O.enums.of(["enum","multienum"]),l.O.interface({values:l.O.list(l.O.String)})]),l.O.tuple([l.O.enums.of(["reference","referencelist"]),l.O.interface({only:l.O.union([l.O.String,l.O.list(l.O.String)])})]),l.O.tuple([l.O.enums.of(["widgetlist"]),l.O.interface({only:l.O.union([l.O.String,l.O.list(l.O.String)])})])]),"Attributes Specification")),extend:l.O.maybe(X)}),te=l.O.refinement(l.O.Function,c,"WidgetClass"),ne=l.O.interface({attributes:ee.meta.props.attributes,extend:l.O.maybe(te),onlyInside:l.O.maybe(l.O.union([l.O.String,l.O.Array]))}),re=Object(l.p)("createObjClass",[["options",ee]],{docPermalink:"js-sdk/createObjClass"}),ie=Object(l.p)("createWidgetClass",[["options",ne]],{docPermalink:"js-sdk/createWidgetClass"}),oe=l.O.union([ee,X]),ae=Object(l.p)("provideObjClass",[["name",l.O.String],["objClassOrDefinition",oe]],{docPermalink:"js-sdk/provideObjClass"}),se=l.O.union([ne,te]),ce=Object(l.p)("provideWidgetClass",[["name",l.O.String],["widgetClassOrDefinition",se]],{docPermalink:"js-sdk/provideWidgetClass"});var ue=function(){function e(){this._registry=new U,this.appModelAccessor=new g(this._registry)}return e.init=function(t){var n=new e;return t.Obj=n.Obj,t.Widget=n.Widget,t.Link=n.Link,t.ObjSearch=n.ObjSearch,t.appModelAccessor=n.appModelAccessor,t.provideObjClass=function(e,t){return n.provideObjClass(e,t)},t.provideWidgetClass=function(e,t){return n.provideWidgetClass(e,t)},t.createObjClass=function(e){return n.createObjClass(e)},t.createWidgetClass=function(e){return n.createWidgetClass(e)},t.getClass=function(e){return n.getClass(e)},t.allObjClasses=function(){return n.allObjClasses()},t.allWidgetClasses=function(){return n.allWidgetClasses()},t._privateRealm=n,n},Object.defineProperty(e.prototype,"Obj",{get:function(){return this._registry.defaultClassForObjs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Widget",{get:function(){return this._registry.defaultClassForWidgets},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Link",{get:function(){return this._registry.defaultClassForLinks},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ObjSearch",{get:function(){return this._registry.ObjSearch},enumerable:!0,configurable:!0}),e.prototype.provideObjClass=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return ae.apply(void 0,[e,t].concat(n)),J(this._registry,e,t)},e.prototype.provideWidgetClass=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return ce.apply(void 0,[e,t].concat(n)),Q(this._registry,e,t)},e.prototype.createObjClass=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return re.apply(void 0,[e].concat(t)),G(this._registry,e)},e.prototype.createWidgetClass=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return ie.apply(void 0,[e].concat(t)),K(this._registry,e)},e.prototype.getClass=function(e){return this._registry.getClass(e)},e.prototype.allObjClasses=function(){return this._registry.allObjClasses()},e.prototype.allWidgetClasses=function(){return this._registry.allWidgetClasses()},e.prototype.setInitialContentFor=function(e){this._registry.setInitialContentFor(e)},e}();n.d(t,"f",function(){return f}),n.d(t,"e",function(){return h}),n.d(t,"d",function(){return m}),n.d(t,"a",function(){return D}),n.d(t,"b",function(){return s});t.c=ue},function(e,t,n){"use strict";var r;function i(e){return r?r.getContentStateId(e):""}function o(e){r=e}var a=n(2),s=n.n(a),c=n(5),u=n(6),l=n(0);var d,f=(d=function(e,t){var n,r;return(d=Object.setPrototypeOf||(n={__proto__:[]},(null!=(r=Array)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&function(e,t){e.__proto__=t})||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=!1;function h(){return p}function m(){p=!0}function _(e){if(p)throw new v(e)}var v=function(e){function t(t){return e.call(this,t+" is not supported when using the in-memory tenant")||this}return f(t,e),t}(l.i),g=n(9),y=new c.LoadableCollection({name:"facetquery",state:function(){return u.c.subState("facetQuery")},loader:function(e){var t=e[0],n=e[1];return g.e.retrieveFacetQuery(t,n)},invalidation:function(e){var t=e[0];e[1];return Object(c.loadableWithDefault)(void 0,function(){return i(t)})||""}}),b=function(){function e(e,t,n,r){this._requestParams=w(t,n,r),this._loadableData=y.get([e,this._requestParams])}return e.store=function(e,t,n,r,i){var o=w(t,n,r);y.get([e,o]).set(i)},e.prototype.result=function(){_("Search API");var e=this._loadableData.get();return e?e.facets[0].map(function(e){return{name:e.value,count:e.total,includedObjIds:e.results.map(function(e){return e.id})}}):[]},e}();function w(e,t,n){var r={facets:[{attribute:e,limit:t.limit||10,include_objs:t.includeObjs||0}],size:0};return Object(a.isEmpty)(n)||(r.query=n),r}function k(e,t){var n=S(e,t);return n||(a.find(e._widget_pool,function(e,r){if(e&&(n=S(e,t)))return n.parentWidgetId=r,!0}),n)}function S(e,t){var n;return a.find(e,function(e,r){if(e&&!Object(l.z)(r)){var i=e;if(Object(g.h)(i)){var o=i[1];if(o){var a=o.indexOf(t);return-1!==a?(n={attributeName:r,index:a},!0):void 0}}}}),n}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function C(e,t){if(!e)return t;if(!t)return null;var n={};return x(e,t,function(r,i,o){"_widget_pool"===r?n._widget_pool=function(e,t){if(!t||s.a.isEmpty(t))return e;var n={};return x(e,t,function(e,r,i){Object.prototype.hasOwnProperty.call(t,e)?i&&!r?n[e]=i:i&&(n[e]=C(r,i)):n[e]=r}),n}(i||{},o):Object.prototype.hasOwnProperty.call(t,r)?o&&(n[r]=o):n[r]=e[r]}),n}function M(e,t){if(!e)return t;if(!t)return null;var n={};return x(e,t,function(e,t,r){if("_widget_pool"===e){var i=function(e,t){if(e===t)return;if(!e)return t;var n={};return x(e,t||{},function(e,t,r){var i=T(t,r,function(){var e=M(t,r);if(!s.a.isEmpty(e))return e});void 0!==i&&(n[e]=i)}),n}(t,r);s.a.isEmpty(i)||(n._widget_pool=i)}else{var o=T(t,r,function(){if(!s.a.isEqual(t,r))return r});void 0!==o&&(n[e]=o)}}),n}function x(e,t,n){s.a.union(s.a.keys(e),s.a.keys(t)).forEach(function(r){return n(r,E(e[r]),E(t[r]))})}function E(e){if(s.a.isArray(e)){var t=O(e,2),n=t[0],r=t[1];return"binary"===n&&r?[n,s.a.omit(r,"url")]:e}return e}function T(e,t,n){return!e&&t?t:e&&!t?null:e&&t?n():void 0}function j(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var L=function(){function e(t,n){var r=this;j(this,e),this._workspaceId=t,this._objId=n,this._replicationActive=!1,this._scheduledReplication=!1,this._currentRequestDeferred=null,this._nextRequestDeferred=null,this._performThrottledReplication=Object(l.P)(function(){return r._performReplication()},1e3)}var t,n,r;return t=e,(n=[{key:"start",value:function(){var e=this;g.e.retrieveObj(this._workspaceId,this._objId).then(function(t){Object(u.a)(function(){e.notifyBackendState(t)})})}},{key:"notifyLocalState",value:function(e){if(!A.isDisabled()){if(void 0===this._backendState)throw new l.g("Can not set local state before backend state.");if(this._backendState&&this._backendState._deleted)throw new l.g("Can not update a fully deleted obj.");this._localState=e,this._startReplication()}}},{key:"notifyBackendState",value:function(e){if(void 0===this._backendState)return this._backendState=e,void this._updateLocalState(e);if(N(e,this._bufferedBackendState||this._backendState)>0)if(this._replicationActive)this._bufferedBackendState=e;else{if(e._deleted)this._updateLocalState(null);else{var t=P(this._backendState,e);this._updateLocalState(I(this.localState,t))}this._backendState=e}}},{key:"finishSaving",value:function(){var e;if(this._nextRequestDeferred)e=this._nextRequestDeferred.promise;else{if(!this._currentRequestDeferred)return l.j.resolve();e=this._currentRequestDeferred.promise}return e.catch(function(){return l.j.reject()})}},{key:"_startReplication",value:function(){var e=this;s.a.isEmpty(P(this._backendState,this._localState))?this._nextRequestDeferred&&(this._nextRequestDeferred.resolve(),this._nextRequestDeferred=null):this._replicationActive?this._nextRequestDeferred||(this._nextRequestDeferred=new l.e):this._scheduledReplication||(this._scheduledReplication=!0,this._initDeferredForRequest(),A.writeStarted(this._currentRequestDeferred.promise),Object(l.G)(function(){return e._performThrottledReplication()}))}},{key:"_performReplication",value:function(){var e=this,t=this._localState,n=P(this._backendState,this._localState);this._scheduledReplication=!1,this._replicationActive=!0,this._replicatePatchToBackend(n).then(function(n){e._handleBackendUpdate(t,n),e._currentRequestDeferred.resolve(e._objId),e._currentRequestDeferred=null,e._replicationActive=!1,e._startReplication()},function(t){e._currentRequestDeferred.reject(t),e._currentRequestDeferred=null,e._replicationActive=!1})}},{key:"_replicatePatchToBackend",value:function(e){if(s.a.isEmpty(e))return l.j.resolve(this._backendState);var t="workspaces/".concat(this._workspaceId,"/objs/").concat(this._objId);return g.d.put(t,{obj:e})}},{key:"_initDeferredForRequest",value:function(){if(this._nextRequestDeferred){var e=this._nextRequestDeferred;this._nextRequestDeferred=null,this._currentRequestDeferred=e}else this._currentRequestDeferred=new l.e}},{key:"_handleBackendUpdate",value:function(e,t){var n=P(e,this._localState);this._backendState=function(e,t){if(N(e,t)>0)return e;return t}(t,this._bufferedBackendState),this._bufferedBackendState=void 0,this._updateLocalState(I(this._backendState,n))}},{key:"_updateLocalState",value:function(e){this._localState=e,B(this._workspaceId,this._objId,this._localState)}},{key:"isNotStoredInBackend",value:function(){return null===this._backendState}},{key:"isRequestInFlight",value:function(){return this._replicationActive}},{key:"backendState",get:function(){return this._backendState}},{key:"localState",get:function(){return this._localState}}])&&D(t.prototype,n),r&&D(t,r),e}();function P(e,t){return M(e,t)}function I(e,t){return C(e,t)}function N(e,t){return e?t?function(e,t){if(e>t)return 1;if(t>e)return-1;return 0}(e._version,t._version):1:-1}var A=new(function(){function e(){this.replicationCache={},this.disabled=!1,this.writeWriteCallbacks={},this.subscriptionToken=0}return e.prototype.get=function(e,t){return this.replicationCache[e]||(this.replicationCache[e]={}),this.replicationCache[e][t]||(this.replicationCache[e][t]=new L(e,t)),this.replicationCache[e][t]},e.prototype.subscribeWrites=function(e){return this.subscriptionToken+=1,this.writeWriteCallbacks[this.subscriptionToken]=e,this.subscriptionToken},e.prototype.unsubscribeWrites=function(e){delete this.writeWriteCallbacks[e]},e.prototype.isDisabled=function(){return this.disabled},e.prototype.writeStarted=function(e){Object(a.each)(this.writeWriteCallbacks,function(t){t(e)})},e.prototype.disableReplication=function(){this.disabled=!0},e.prototype.enableReplication=function(){this.disabled=!1},e.prototype.clearWriteCallbacks=function(){this.writeWriteCallbacks={}},e.prototype.clearCache=function(){this.replicationCache={}},e}());function Y(e){A=e}function R(){return u.m.subState("objData")}var F=new c.LoadableCollection({name:"objdata",state:R,loader:function(e){var t=e[0],n=e[1];return A.get(t,n).start(),new l.j(function(){})}});var H=function(){function e(e,t){this._workspaceId=e,this._id=t,this._loadableData=F.get([e,t])}return e.prototype.get=function(){return Object(u.h)("for performance reasons, avoid this method when rendering"),this._loadableData.get()},e.prototype.getWidget=function(e){return Object(u.h)("for performance reasons, avoid this method when rendering"),this.getWidgetState(e).get()},e.prototype.getWidgetWithBadPerformance=function(e){return this.getWidgetState(e).get()},e.prototype.getAttribute=function(e){if("_widget_pool"===e)throw new l.g("_widget_pool is not an attribute, use getWidget or getWidgetAttribute");return this.getSubReader(e).get()},e.prototype.getWidgetAttribute=function(e,t){return this.getWidgetState(e).subState(t).get()},e.prototype.isNonExistent=function(){return!!this.getSubReader("_deleted").get()||!this.getSubReader("_id").get()},e.prototype.set=function(e){Object(u.g)("Changing CMS content"),this._loadableData.set(e)},e.prototype.setError=function(e){this._loadableData.setError(e)},e.prototype.ensureAvailable=function(){return this._loadableData.ensureAvailable()},e.prototype.isAvailable=function(){return this._loadableData.isAvailable()},e.prototype.update=function(e){var t=C(this.get(),e);this.set(t),this._replication().notifyLocalState(t)},e.prototype.finishSaving=function(){return this._replication().finishSaving()},e.prototype.workspaceId=function(){return this._workspaceId},e.prototype.equals=function(t){return n=t,!!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)&&(this.workspaceId()===t.workspaceId()&&this._id===t._id);var n,r},e.prototype._replication=function(){return A.get(this._workspaceId,this._id)},e.prototype.getWidgetState=function(e){return this.getSubReader("_widget_pool").subState(e)},e.prototype.getSubReader=function(e){return this._loadableData.reader().subState(e)},e}();function W(e,t){var n=U(e,t);return n.set(null),A.get(e,t).notifyBackendState(null),n}function B(e,t,n){U(e,t).set(n)}function z(e,t){var n=U(e,t);if(n.ensureAvailable())return n}function U(e,t){return new H(e,t)}var q=function(){return(q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},V={results:[],total:0},$=new c.LoadableCollection({name:"objquery",state:function(){return ce()},loader:function(e,t,n){var r=e[0],i=e[1],o=e[2],a=t.push,s=t.isReload,u=t.wasCancelled;return function(e,t,n,r){if(r>0){var i=new G(e,t,n,r-1);return Object(c.load)(function(){return i.continuationForNextBatch()})}return l.j.resolve()}(r,i,n,o).then(function(e){if(u())throw new Error;var t={size:n,continuation:e,include_objs:!s()},o=q({},i,t);return g.e.retrieveObjQuery(r,o).then(function(e){var t=e.objs;return t&&a(function(){return t.forEach(function(e){e._id&&A.get(r,e._id).notifyBackendState(e)})}),function(e,t){t.forEach(function(t){return function(e,t){Object(c.load)(function(){return z(e,t)})}(e,t)})}(r,e.results),{results:e.results,total:e.total,continuation:e.continuation}})})},invalidation:function(e){var t=e[0];e[1],e[2];return Object(c.loadableWithDefault)(void 0,function(){return i(t)})||""}}),G=function(){function e(e,t,n,r){void 0===r&&(r=0),this._workspaceId=e,this._params=t,this._batchSize=n,this._index=r}return e.store=function(e,t,n,r){void 0===r&&(r=n.length),$.get([e,J(t),0]).set({results:n,total:r})},e.firstBatchFor=function(t,n,r){return new e(t,J(n),r)},e.countFor=function(e,t){return this.firstBatchFor(e,t,0).count()},e.prototype.objIds=function(){return this._response().results},e.prototype.count=function(){return this._response().total||0},e.prototype.nextBatch=function(){if(this.continuationForNextBatch())return new e(this._workspaceId,this._params,this._batchSize,this._index+1)},Object.defineProperty(e.prototype,"index",{get:function(){return this._index},enumerable:!0,configurable:!0}),e.prototype.continuationForNextBatch=function(){return this._response().continuation},e.prototype._response=function(){return this._data().get()||V},e.prototype._data=function(){return $.get([this._workspaceId,this._params,this._index],this._batchSize)},e}(),K=G;function J(e){var t=Object(a.omit)({query:e.query,offset:e.offset,sort_by:e.sortBy,sort_order:e.sortDirection},a.isUndefined);return e.includeDeleted&&(t.options={include_deleted:!0}),t}function Q(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function Z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function X(e,t,n){return t&&Z(e.prototype,t),n&&Z(e,n),e}var ee=function(){function e(t,n,r){Q(this,e),this._workspaceId=t,this._params=n,this._batchSize=r}return X(e,null,[{key:"store",value:function(e,t,n,r){K.store(e,t,n,r)}},{key:"count",value:function(e,t){return K.countFor(e,t)}}]),X(e,[{key:"iterator",value:function(){var e={},t=K.firstBatchFor(this._workspaceId,this._params,this._batchSize),n=0;return{next:function r(){if(!t)return{done:!0};var i=t.objIds();if(n<i.length){var o=i[n];return n++,e[o]?r():(e[o]=!0,{value:o,done:!1})}return t=t.nextBatch(),n=0,r()}}}}]),e}();function te(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function re(e,t,n){return t&&ne(e.prototype,t),n&&ne(e,n),e}var ie=function(){function e(t,n,r){te(this,e),this._workspaceId=t,this._params=n,this._batchSize=r}return re(e,[{key:"count",value:function(){return ee.count(this._workspaceId,this._params)}},{key:"iterator",value:function(){return new oe(this._workspaceId,this._params,this._batchSize)}}]),e}(),oe=function(){function e(t,n,r){te(this,e),this._workspaceId=t,this._iterator=new ee(t,n,r).iterator()}return re(e,[{key:"next",value:function(){if(!this._iterator)return{done:!0};var e=this._iterator.next().value;if(!e)return{done:!0};var t=z(this._workspaceId,e);return void 0===t?(this._iterator=void 0,{done:!0}):t.isNonExistent()?this.next():{value:t,done:!1}}}]),e}();function ae(e,t,n,r){ee.store(e,t,n,r)}function se(e,t,n){return _("Search API"),new ie(e,t,n)}function ce(){return u.c.subState("objQuery")}var ue=new c.LoadableCollection({name:"objFieldDiffs",state:function(){return u.c.subState("objFieldDiffs")},loader:function(e){var t=e[0],n=e[1];return g.e.retrieveObjFieldDiffs(t,n)},invalidation:function(e){return function(e,t){var n=z(e,t);if(n)return n.getAttribute("_version")||"";return""}(e[0],e[1])}});function le(e,t,n,r){if("published"===e)return null;var i=function(e,t){return de(e,t).get()||{}}(e,n);return r?function(e,t,n){var r=n._widget_pool;if(r){var i=r[t];if(i)return fe(e,i)}return null}(t,r,i):fe(t,i)}function de(e,t){return ue.get([e,t])}function fe(e,t){var n=t[Object(l.R)(e)];return n?n[1]:null}function pe(e,t,n){var r=z("published",t),i=z(e,t);return r&&i?r.isNonExistent()&&i.isNonExistent()?null:r.isNonExistent()&&!i.isNonExistent()?"new":!r.isNonExistent()&&i.isNonExistent()?"deleted":function(e,t,n){var r=e.getWidgetWithBadPerformance(n),i=t.getWidgetWithBadPerformance(n);return r?i?function(e,t){var n=M(e,t);return Object(a.some)(Object.keys(n),function(e){return!Object(l.z)(e)||"_obj_class"===e})}(r,i)?"edited":null:"deleted":i?"new":null}(r,i,n):null}n.d(t,"g",function(){return i}),n.d(t,"o",function(){return o}),n.d(t,"a",function(){return b}),n.d(t,"f",function(){return k}),n.d(t,"b",function(){return"inMemory"}),n.d(t,"q",function(){return m}),n.d(t,"c",function(){return _}),n.d(t,"l",function(){return h}),n.d(t,"i",function(){return z}),n.d(t,"d",function(){return W}),n.d(t,"e",function(){return M}),n.d(t,"j",function(){return se}),n.d(t,"p",function(){return ae}),n.d(t,"m",function(){return A}),n.d(t,"n",function(){return Y}),n.d(t,"h",function(){return le}),n.d(t,"k",function(){return pe})},function(e,t,n){"use strict";var r;function i(e){r=e}n.d(t,"b",function(){return r}),n.d(t,"a",function(){return i})},function(e,t,n){var r,i,o;
2
2
  /*!
3
3
  * URI.js - Mutating URLs
4
4
  *
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.0.rc1
4
+ version: 1.16.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-10 00:00:00.000000000 Z
11
+ date: 2019-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties