!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=628)}([function(t,e,n){var r,i;(function(){function n(t){function e(e,n,r,i,o,a){for(;o>=0&&o0?0:s-1;return arguments.length<3&&(i=n[a?a[u]:u],u+=t),e(n,r,i,a,u,s)}}function o(t){return function(e,n,r){n=E(n,r);for(var i=T(e),o=t>0?0:i-1;o>=0&&o0?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 o=n(r,i),r[o]===i?o:-1;if(i!==i)return o=e(p.call(r,a,s),C.isNaN),o>=0?o+a:-1;for(o=t>0?a:s-1;o>=0&&o=0&&e<=S};C.each=C.forEach=function(t,e,n){e=k(e,n);var r,i;if(A(t))for(r=0,i=t.length;r=0},C.invoke=function(t,e){var n=p.call(arguments,2),r=C.isFunction(e);return C.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},C.pluck=function(t,e){return C.map(t,C.property(e))},C.where=function(t,e){return C.filter(t,C.matcher(e))},C.findWhere=function(t,e){return C.find(t,C.matcher(e))},C.max=function(t,e,n){var r,i,o=-1/0,a=-1/0;if(null==e&&null!=t){t=A(t)?t:C.values(t);for(var s=0,u=t.length;so&&(o=r)}else e=E(e,n),C.each(t,function(t,n,r){((i=e(t,n,r))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)});return o},C.min=function(t,e,n){var r,i,o=1/0,a=1/0;if(null==e&&null!=t){t=A(t)?t:C.values(t);for(var s=0,u=t.length;sr||void 0===n)return 1;if(ne?(a&&(clearTimeout(a),a=null),s=c,o=t.apply(r,i),a||(r=i=null)):a||!1===n.trailing||(a=setTimeout(u,l)),o}},C.debounce=function(t,e,n){var r,i,o,a,s,u=function(){var c=C.now()-a;c=0?r=setTimeout(u,e-c):(r=null,n||(s=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,a=C.now();var c=n&&!r;return r||(r=setTimeout(u,e)),c&&(s=t.apply(o,i),o=i=null),s}},C.wrap=function(t,e){return C.partial(e,t)},C.negate=function(t){return function(){return!t.apply(this,arguments)}},C.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},C.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},C.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},C.once=C.partial(C.before,2);var F=!{toString:null}.propertyIsEnumerable("toString"),M=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];C.keys=function(t){if(!C.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)C.has(t,n)&&e.push(n);return F&&s(t,e),e},C.allKeys=function(t){if(!C.isObject(t))return[];var e=[];for(var n in t)e.push(n);return F&&s(t,e),e},C.values=function(t){for(var e=C.keys(t),n=e.length,r=Array(n),i=0;i":">",'"':""","'":"'","`":"`"},I=C.invert(L),B=function(t){var e=function(e){return t[e]},n="(?:"+C.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};C.escape=B(L),C.unescape=B(I),C.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),C.isFunction(r)?r.call(t):r};var z=0;C.uniqueId=function(t){var e=++z+"";return t?t+e:e},C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var H=/(.)^/,q={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},W=/\\|'|\r|\n|\u2028|\u2029/g,U=function(t){return"\\"+q[t]};C.template=function(t,e,n){!e&&n&&(e=n),e=C.defaults({},e,C.templateSettings);var r=RegExp([(e.escape||H).source,(e.interpolate||H).source,(e.evaluate||H).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,a,s){return o+=t.slice(i,s).replace(W,U),i=s+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var s=function(t){return a.call(this,t,C)};return s.source="function("+(e.variable||"obj")+"){\n"+o+"}",s},C.chain=function(t){var e=C(t);return e._chain=!0,e};var V=function(t,e){return t._chain?C(e).chain():e};C.mixin=function(t){C.each(C.functions(t),function(e){var n=C[e]=t[e];C.prototype[e]=function(){var t=[this._wrapped];return h.apply(t,arguments),V(this,n.apply(C,t))}})},C.mixin(C),C.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=l[t];C.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],V(this,n)}}),C.each(["concat","join","slice"],function(t){var e=l[t];C.prototype[t]=function(){return V(this,e.apply(this._wrapped,arguments))}}),C.prototype.value=function(){return this._wrapped},C.prototype.valueOf=C.prototype.toJSON=C.prototype.value,C.prototype.toString=function(){return""+this._wrapped},r=[],void 0!==(i=function(){return C}.apply(e,r))&&(t.exports=i)}).call(this)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(){for(var t=arguments.length,e=Array(t),n=0;n1&&void 0!==arguments[1])||arguments[1];r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(o.message=t,o._captureStackTrace=n,n)if(Error.captureStackTrace)Error.captureStackTrace(o,o.constructor);else{var a=void 0;try{throw new Error}catch(t){a=t.stack}Object.defineProperty(o,"stack",{value:a})}return o}return o(e,t),s(e,[{key:"name",get:function(){return this.constructor.name}},{key:"captureStackTrace",get:function(){return!!this._captureStackTrace}}]),e}(a),c=function(t){function e(t,n,o){r(this,e);var a=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return a.httpCode=n,a.backendCode=o,a}return o(e,t),s(e,null,[{key:"for",value:function(t,n,r){return"binary.unprocessable.image.transform.source.too_large"===r?new b(t,n,r):r&&-1!==r.indexOf("binary.unprocessable.image.transform.source.")?new _(t,n,r):new e(t,n,r)}}]),e}(u),l=function(t){function e(t,n,o){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,o))}return o(e,t),e}(c),f=function(t){function e(t){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return o(e,t),e}(u),d=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o.httpCode=n,o}return o(e,t),e}(u),h=function(t){function e(t,n){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return o(e,t),e}(d),p=function(t){function e(t){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return o(e,t),e}(u),v=function(t){function e(t){r(this,e);var n=t.status,o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,0===n?t.statusText:t.responseText,n));return o.response=t,o}return o(e,t),e}(d),m=function(t){function e(t,n){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return o(e,t),e}(d),g=function(t){function e(t){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return o(e,t),e}(u),y=function(t){function e(t,n,o,a){r(this,e);var s=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,o));return s.details=a||{},s}return o(e,t),e}(c),b=function(t){function e(t,n,o){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,o))}return o(e,t),e}(c),_=function(t){function e(t,n,o){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,o))}return o(e,t),e}(c),w=function(t){function e(t){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return o(e,t),e}(p),C=function(t){function e(t){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return o(e,t),e}(p),k=function(t){function e(t){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return o(e,t),e}(w);e.AccessDeniedError=l,e.ArgumentError=f,e.BackendError=h,e.ClientError=c,e.InternalError=p,e.InterpolationError=k,e.NavigateToEmptyBinaryError=C,e.NetworkError=v,e.RateLimitExceededError=m,e.ResourceNotFoundError=g,e.ScrivitoError=u,e.TransformationSourceInvalidError=_,e.TransformationSourceTooLargeError=b,e.TranslationError=w,e.UnauthorizedError=y},,function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e1&&void 0!==arguments[1]?arguments[1]:[];return"/"===t?["/"].concat(a(e)):d(h(t),[t].concat(a(e)))}function h(t){var e=t.split("/");return e.pop(),1===e.length?"/":e.join("/")}function p(t){var e=["_path"];if(L.default.difference(L.default.keys(t),e).length)throw new I.ArgumentError('Currently only "_path" copy option is supported.')}Object.defineProperty(e,"__esModule",{value:!0});var v=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},g=function(){function t(t,e){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:null;return(new D.default).and(t,e,n,r)}},{key:"getByPath",value:function(t){var e=(0,V.firstValueFromIterable)(this.where("_path","equals",t));if(e)return e}},{key:"getByPermalink",value:function(t){var e=this.where("_permalink","equals",t),n=(0,V.firstValueFromIterable)(e);if(n)return n}}]),g(e,[{key:"id",value:function(){return this._current._id}},{key:"objClass",value:function(){return this._current._obj_class}},{key:"createdAt",value:function(){return x.parseStringToDate(this._current._created_at)}},{key:"createdBy",value:function(){return this._current._created_by}},{key:"lastChanged",value:function(){return this._current._last_changed?x.parseStringToDate(this._current._last_changed):null}},{key:"lastChangedBy",value:function(){return this._current._last_changed_by?this._current._last_changed_by:null}},{key:"version",value:function(){return this._current._version}},{key:"path",value:function(){return this._current._path||null}},{key:"permalink",value:function(){return this._current._permalink||null}},{key:"parentPath",value:function(){if(this.path()&&"/"!==this.path())return h(this.path())}},{key:"parent",value:function(){var t=this.parentPath();if(t)return e.getByPath(t)}},{key:"hasConflicts",value:function(){return!!this._current._conflicts}},{key:"modification",value:function(){return this._current._deleted?"deleted":this._current._modification||null}},{key:"isModified",value:function(){return!!this.modification()}},{key:"isNew",value:function(){return"new"===this.modification()}},{key:"isEdited",value:function(){return"edited"===this.modification()}},{key:"isDeleted",value:function(){return"deleted"===this.modification()}},{key:"isFinallyDeleted",value:function(){return!!this._current._deleted}},{key:"isBinary",value:function(){if(!this._objClass)return!1;var t=this._objClass.attribute("blob");return!!t&&"binary"===t.type}},{key:"isImage",value:function(){if(this.isBinary()){var t=this.get("blob","binary");if(t)return t.isImage()}return!1}},{key:"contentLength",value:function(){return this._binaryData("contentLength")}},{key:"contentType",value:function(){return this._binaryData("contentType")}},{key:"contentUrl",value:function(){return this._binaryData("url")}},{key:"metadata",value:function(){return this._binaryData("metadata")}},{key:"fetchParent",value:function(){scrivito.asyncMethodStub()}},{key:"children",value:function(){if(this.path()){var t=e.all().and("_parentPath","equals",this.path());return(0,V.arrayFromIterable)(t)}return[]}},{key:"hasChildren",value:function(){return!!this.children().length}},{key:"orderedChildren",value:function(){var t=this.children(),e=this.get("childOrder","referencelist");return L.default.isArray(e)?L.default.sortBy(t,function(t){var n=L.default.invoke(e,"id"),r=n.indexOf(t.id());return-1===r?e.length:r}):t}},{key:"backlinks",value:function(){return(0,V.arrayFromIterable)(e.where("*","linksTo",this))}},{key:"ancestors",value:function(){var t=this.parentPath();return t?d(t).map(function(t){return e.getByPath(t)}):[]}},{key:"update",value:function(t){var e=this,n=scrivito.typeInfo.normalizeAttrs(t);(0,Q.withBatchedUpdates)(function(){e._persistWidgets(e,n);var t=T.serialize(n);e.objData.update(t)}),this._linkResolution.start()}},{key:"destroy",value:function(){this.update({_modification:["deleted"]})}},{key:"insertWidget",value:function(t,e){var n=e.before,r=e.after,i=(n||r).id(),s=this._widgetPlacementFor(i),u=s.attributeValue,c=s.attributeName,l=s.container,f=s.index,d=n?f:f+1,h=[].concat(a(u.slice(0,d)),[t],a(u.slice(d)));l.update(o({},c,[h,"widgetlist"]))}},{key:"removeWidget",value:function(t){var e=this.fieldContainingWidget(t);e.update(L.default.reject(e.get(),function(e){return e.equals(t)}))}},{key:"copyAsync",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return p(t),this._copyAttributes().then(function(n){var r=L.default.extend(n,t),i=e.createWithSerializedAttributes(r);return i.finishSaving().then(function(){return i})})}},{key:"moveToAsync",value:function(t){return this.update({_path:[t+"/"+this.id()]}),this.finishSaving()}},{key:"markResolvedAsync",value:function(){return this.update({_conflicts:[null]}),this.finishSaving()}},{key:"finishSaving",value:function(){var t=this,e=this._linkResolution.finishResolving().then(function(){return t.objData.finishSaving()});return new scrivito.PublicPromise(e)}},{key:"equals",value:function(t){return t instanceof e&&this.id()===t.id()}},{key:"widget",value:function(t){return this.widgetData(t)?P.default.build(t,this):null}},{key:"widgets",value:function(){var t=this;return L.default.map(L.default.keys(this._widgetPool),function(e){return t.widget(e)})}},{key:"widgetData",value:function(t){return this._widgetPool[t]}},{key:"fieldContainingWidget",value:function(t){var e=this._widgetPlacementFor(t.id()),n=e.container,r=e.attributeName;return n.field(r,"widgetlist")}},{key:"generateWidgetId",value:function(){for(var t=0;t<10;t++){var e=(0,H.randomHex)();if(!this.widget(e))return e}$.error("Could not generate a new unused widget id.")}},{key:"serializeAttributes",value:function(){var t=m(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"serializeAttributes",this).call(this);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}},{key:"slug",value:function(){var t=this.get("title","string");return(0,k.default)(t)}},{key:"_binaryData",value:function(t){var e=this.get("blob","binary");return e&&e.raw()[t]()}},{key:"_hasParentPath",value:function(){return this.path()&&"/"!==this.path()}},{key:"_copyAttributes",value:function(){var t=e.generateId(),n=this.serializeAttributes(),r=[];return L.default.each(n,function(e,i){if("_"===i[0])return void delete n[i];var o=v(e,2),a=o[0],s=o[1];if("binary"===a&&s){var u=new z.default({idToCopy:s.id}),c=u.into(t).then(function(t){return{name:i,binary:t}});r.push(c)}}),n._id=t,n._obj_class=this.objClass(),this.path()&&(n._path=this.parentPath()+"/"+t),scrivito.PublicPromise.all(r).then(function(t){return L.default.each(t,function(t){var e=t.name,r=t.binary;n[e]=["binary",{id:r.id()}]}),n})}},{key:"_widgetPlacementFor",value:function(t){var e=(0,w.default)(this._current,t),n=e.parentWidgetId?this.widget(e.parentWidgetId):this,r=(0,U.camelCase)(e.attributeName),i=n.get(r,"widgetlist");return L.default.extend(e,{container:n,attributeName:r,attributeValue:i})}},{key:"_widgetPool",get:function(){return this._current._widget_pool||{}}},{key:"_systemAttributes",get:function(){return K}},{key:"_current",get:function(){return this.objData.current}},{key:"_objClass",get:function(){return W.default.find(this.objClass())}},{key:"_linkResolution",get:function(){return scrivito.uiAdapter.linkResolutionFor(this.objData)}}]),e}(M.default);e.default=G,scrivito.provideAsyncClassMethods(G,{get:"fetch",getByPermalink:"fetchByPermalink",getIncludingDeleted:"fetchIncludingDeleted"}),scrivito.provideAsyncInstanceMethods(G,{parent:"fetchParent"})},function(t,e,n){"use strict";function r(t){t?(l=void 0,f=t.stateController(),e.appState=t.createAppState(),e.cmsState=t.cmsState()):(l=new h.default,f=l,e.appState=i(),e.cmsState=l.subState("cms"),e.uiState=l.subState("ui"))}function i(){if(!l)throw new d.InternalError;var t=(p++).toString();return l.subState("apps").subState(t)}function o(t){return f.withBatchedUpdates(t)}function a(t){return f.subscribe(t)}function s(t){return f.trackChanges(t)}function u(){if(!l)throw new d.InternalError;return l.listenerCount()}function c(){if(!l)throw new d.InternalError;l.clear()}Object.defineProperty(e,"__esModule",{value:!0});var l,f,d=n(1),h=n(144);e.initializeGlobalState=r;var p=0;e.createAppState=i,e.withBatchedUpdates=o,e.subscribe=a,e.trackChanges=s,e.listenerCount=u,e.reset=c},function(t,e,n){"use strict";function r(t){var e=c;try{return c=!1,t()}finally{c=e}}Object.defineProperty(e,"__esModule",{value:!0});var i,o=n(1),a=n(142),s=n(143),u=0,c=!0,l=[o.ResourceNotFoundError],f=function(){function t(t){var e=t.state,n=t.loader,r=t.invalidation,i=t.throwNotLoaded;if(!e)throw new o.InternalError("LoadableData needs state");this.value=new s.default(e),this.loader=n,this.invalidation=r,this.throwNotLoaded=i||!1}return t.throwNotLoaded=function(){throw i=!1,new scrivito.NotLoadedError(c)},t.capture=function(t){return a.capture(t)},t.run=function(t){var e=i;i=!0;try{return{success:!0,result:r(t),allDataLoaded:i}}catch(t){if(i)throw t;return{success:!1,allDataLoaded:!1}}finally{i=e}},t.prototype.get=function(){var e=this;if(this.isAvailable())return this.reloadIfOutdated(),this.value.value();if(this.isError())throw this.reloadIfOutdated(),this.hydrateError(this.value.error());i=!1,a.notifyMissingData(function(){return e.progressLoading()}),this.throwNotLoaded&&t.throwNotLoaded()},t.prototype.set=function(t){this.value.transitionToAvailable(t,this.currentVersion())},t.prototype.setError=function(t){this.transitionToError(t)},t.prototype.reset=function(){this.value.transitionToMissing()},t.prototype.isMissing=function(){return"MISSING"===this.value.status()},t.prototype.isLoading=function(){return void 0!==this.value.getLoading()},t.prototype.isAvailable=function(){return"AVAILABLE"===this.value.status()},t.prototype.isError=function(){return"ERROR"===this.value.status()},t.prototype.triggerLoading=function(){var t=this;if(!this.isLoading()){var e=u++,n=function(n){t.value.getLoading()===e&&n()},r=this.currentVersion(),i=[],o=function(t){return i.push(t)},a=function(){return i.forEach(function(t){return t()})};this.loader(o).then(function(e){return n(function(){return scrivito.batchedStateUpdater.add(function(){t.value.transitionToAvailable(e,r),a()})})},function(e){return n(function(){return scrivito.batchedStateUpdater.add(function(){t.transitionToError(e,r),a()})})}),this.value.setLoading(e)}},t.prototype.transitionToError=function(t,e){void 0===e&&(e=this.currentVersion()),this.value.transitionToError(this.dehydrateError(t),e)},t.prototype.dehydrateError=function(t){var e=l.indexOf(t.constructor);return e>=0?{type:"dehydrated",id:e,message:t.message}:{type:"live",error:t}},t.prototype.hydrateError=function(t){if("dehydrated"===t.type){return new(0,l[t.id])(t.message)}var e=t.error;if(e)return e;throw new o.InternalError("could not hydrate error")},t.prototype.reloadIfOutdated=function(){var t=this;this.hasBeenInvalidated()&&a.notifyOutdatedData(function(){return t.progressLoading()})},t.prototype.progressLoading=function(){(this.hasBeenInvalidated()||!this.isAvailable()&&!this.isError())&&this.triggerLoading()},t.prototype.hasBeenInvalidated=function(){return!!this.invalidation&&this.currentVersion()!==this.value.version()},t.prototype.currentVersion=function(){var t=this.invalidation;if(t){var e=t();if("number"==typeof e&&isNaN(e)){var n="invalidation callback returned unsuitable version "+e;throw new o.InternalError(n)}return e}},t}();e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){if("function"!=typeof t)throw new p.ArgumentError("Scrivito.connect expects either a plain function or a subclass of React.Component");return u((0,m.default)(t)?t:c(t))}function u(t){var e=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),l(e,[{key:"componentWillMount",value:function(){var t=this;this._scrivitoUnsubscribeModelState=(0,b.subscribe)(function(){t._scrivitoIsStateChangeDetected&&t._scrivitoIsStateChangeDetected()&&t.forceUpdate()}),f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"componentWillMount",this)&&f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"componentWillMount",this).call(this)}},{key:"componentWillUnmount",value:function(){this._scrivitoUnsubscribeModelState(),f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"componentWillUnmount",this)&&f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"componentWillUnmount",this).call(this)}},{key:"render",value:function(){var t=this,n=void 0;return this._scrivitoIsStateChangeDetected=(0,b.trackChanges)(function(){try{var r=void 0;if(h.default.capture(function(){r=h.default.run(function(){return f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"render",t).call(t)})}).loadRequiredData(),r.allDataLoaded)n=r.result;else{var i=r.success?r.result:null;n=t._scrivitoHandleLoading(i)}}catch(e){n=t._scrivitoHandleError(e)}}),n}},{key:"_scrivitoHandleLoading",value:function(t){return this._scrivitoRenderWhileLoading?this._scrivitoRenderWhileLoading():t}},{key:"_scrivitoHandleError",value:function(t){return scrivito.printError(t),this._scrivitoRenderOnError?this._scrivitoRenderOnError():null}}]),e}(t);return(0,y.default)(e,{from:t}),e}function c(t){var e=function(e){function n(){return i(this,n),o(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return a(n,e),l(n,[{key:"render",value:function(){return t(this.props)}}]),n}(React.Component);return(0,y.default)(e,{from:t}),e}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n100?t.slice(0,100)+"...":t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var l=n(3),f=r(l),d=n(14),h=r(d),p=n(24),v=r(p),m=n(0)},function(t,e,n){n(7),n(75),n(18),n(63);t.exports=function(t,e){function n(t,e){return t}return n.meta={kind:"irreducible",name:t,predicate:e,identity:!0},n.displayName=t,n.is=e,n}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return t.idToCopy=this._id,new p.default(t)}},{key:"isPrivate",value:function(){return!this._isPublic}},{key:"transform",value:function(e){return new t(this._id,this._isPublic,(0,f.extend)({},this._definition,e))}},{key:"original",value:function(){return new t(this._id,this._isPublic,{})}},{key:"raw",value:function(){return new t(this._id,this._isPublic)}},{key:"isTransformed",value:function(){return!!this._definition}},{key:"isExplicitlyTransformed",value:function(){return this.isTransformed()&&!(0,f.isEmpty)(this._definition)}},{key:"isRaw",value:function(){return!this.isTransformed()}},{key:"url",value:function(){return this._urlData()[this._accessType()].get.url}},{key:"filename",value:function(){var t=this.url();return t.match(/^data:/)?"":(0,u.default)(t).path().split("/").pop()}},{key:"metadata",value:function(){return this._assertNotTransformed("Metadata"),new m.default(this._id)}},{key:"contentType",value:function(){return this._assertNotTransformed("Content type"),this.metadata().get("contentType")}},{key:"contentLength",value:function(){return this._assertNotTransformed("Content length"),this.metadata().get("contentLength")||0}},{key:"extname",value:function(){if(this.raw().filename().indexOf(".")>-1){return/[^.\\]*$/.exec(this.raw().filename())[0].toLowerCase()}}},{key:"equals",value:function(e){return e instanceof t&&e.id()===this.id()&&e.isPrivate()===this.isPrivate()&&(0,f.isEqual)(e.definition(),this.definition())}},{key:"isImage",value:function(){var t=this.raw().contentType();return!!t&&"image"===t.split("/")[0]}},{key:"definition",value:function(){return this._definition||null}},{key:"_accessType",value:function(){return this.isPrivate()?"private_access":"public_access"}},{key:"_urlData",value:function(){return this._loadableData.get()||b}},{key:"_loadUrlData",value:function(){var t="blobs/"+encodeURIComponent(this._id),e=void 0;return this._definition&&(t+="/transform",e={transformation:this._definition}),scrivito.CmsRestApi.get(t,e)}},{key:"_assertNotTransformed",value:function(t){if(this.isTransformed())throw new d.ScrivitoError('"'+t+'" is not available for transformed images. Use "Scrivito.Binary#raw" to access the untransformed version of the image.')}}],[{key:"upload",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.source=t,new p.default(e)}},{key:"store",value:function(e,n,r){var i=n.transformation;new l.default({state:o(e,i)}).set(r);var a=new t(e);return i?a.transform(i):a}},{key:"storeMetadata",value:function(t,e){return m.default.store(t,e)}}]),t}();e.default=_},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){return function(e){return!e.isHiddenFromEditors()&&e.isValidContainerClass(t)}}function u(t){var e=t instanceof v.default?"Widget":"Obj";return w.default.findByType(e,t.objClass())}Object.defineProperty(e,"__esModule",{value:!0});var c=function(){function t(t,e){for(var n=0;n0}}]),e}(b.default);e.default=C},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:window).devicePixelRatio||1}function i(){return window.location}function o(t){window.location=t}function a(){return window.history}function s(){return window.onpopstate}function u(t){window.onpopstate=t}function c(){return window.screen}function l(){return document}Object.defineProperty(e,"__esModule",{value:!0}),e.devicePixelRatio=r,e.history=a,e.location=i,e.onpopstate=s,e.redirectTo=o,e.screen=c,e.setOnpopstate=u,e.getDocument=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){if(!u.isBlob(t.source))throw new f.ArgumentError("Expected a Blob or File as the source.");if(t.contentType||(t.contentType=t.source.type),!t.filename){if(!u.isFile(t.source))throw new f.ArgumentError("Expected a filename to be passed with Blob as the source.");t.filename=t.source.name}}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),e.idToCopy?this.idToCopy=e.idToCopy:(o(e),this.source=e.source),e.filename&&(this.filename=e.filename.replace(/[^\w\-_\.$]/g,"-")),this.contentType=e.contentType}return a(t,[{key:"into",value:function(t){var e=void 0;e=l.default.isString(t)?t:t.id();var n=void 0;return n=this.idToCopy?scrivito.BinaryRequest.copy(this.idToCopy,e,this.filename,this.contentType):scrivito.BinaryRequest.upload(e,this.source,this.filename,this.contentType),n.then(function(t){var e=t.id;return new h.default(e,!1)})}}]),t}();e.default=p},function(t,e,n){"use strict";function r(){return o}function i(t){o=t}Object.defineProperty(e,"__esModule",{value:!0});var o=void 0;e.useRailsEngine=r,e.initUseRailsEngine=i},function(t,e,n){var r,i,o;/*! * URI.js - Mutating URLs * * Version: 1.18.7 * * Author: Rodney Rehm * Web: http://medialize.github.io/URI.js/ * * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * */ !function(a,s){"use strict";"object"==typeof t&&t.exports?t.exports=s(n(83),n(84),n(85)):(i=[n(83),n(84),n(85)],r=s,void 0!==(o="function"==typeof r?r.apply(e,i):r)&&(t.exports=o))}(0,function(t,e,n,r){"use strict";function i(t,e){var n=arguments.length>=1,r=arguments.length>=2;if(!(this instanceof i))return n?r?new i(t,e):new i(t):new i;if(void 0===t){if(n)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}if(null===t&&n)throw new TypeError("null is not a valid argument for URI");return this.href(t),void 0!==e?this.absoluteTo(e):this}function o(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function a(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function s(t){return"Array"===a(t)}function u(t,e){var n,r,i={};if("RegExp"===a(e))i=null;else if(s(e))for(n=0,r=e.length;n]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.invalid_hostname_characters=/[^a-zA-Z0-9\.-]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return i.domAttributes[e]}},i.encode=h,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=h,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(t,e){var n=i.encode(t+"");return void 0===e&&(e=i.escapeQuerySpace),e?n.replace(/%20/g,"+"):n},i.decodeQuery=function(t,e){t+="",void 0===e&&(e=i.escapeQuerySpace);try{return i.decode(e?t.replace(/\+/g,"%20"):t)}catch(e){return t}};var b,_={encode:"encode",decode:"decode"},w=function(t,e){return function(n){try{return i[e](n+"").replace(i.characters[t][e].expression,function(n){return i.characters[t][e].map[n]})}catch(t){return n}}};for(b in _)i[b+"PathSegment"]=w("pathname",_[b]),i[b+"UrnPathSegment"]=w("urnpath",_[b]);var C=function(t,e,n){return function(r){var o;o=n?function(t){return i[e](i[n](t))}:i[e];for(var a=(r+"").split(t),s=0,u=a.length;s-1&&(e.fragment=t.substring(n+1)||null,t=t.substring(0,n)),n=t.indexOf("?"),n>-1&&(e.query=t.substring(n+1)||null,t=t.substring(0,n)),"//"===t.substring(0,2)?(e.protocol=null,t=t.substring(2),t=i.parseAuthority(t,e)):(n=t.indexOf(":"))>-1&&(e.protocol=t.substring(0,n)||null,e.protocol&&!e.protocol.match(i.protocol_expression)?e.protocol=void 0:"//"===t.substring(n+1,n+3)?(t=t.substring(n+3),t=i.parseAuthority(t,e)):(t=t.substring(n+1),e.urn=!0)),e.path=t,e},i.parseHost=function(t,e){t=t.replace(/\\/g,"/");var n,r,i=t.indexOf("/");if(-1===i&&(i=t.length),"["===t.charAt(0))n=t.indexOf("]"),e.hostname=t.substring(1,n)||null,e.port=t.substring(n+2,i)||null,"/"===e.port&&(e.port=null);else{var o=t.indexOf(":"),a=t.indexOf("/"),s=t.indexOf(":",o+1);-1!==s&&(-1===a||s-1?r:t.length-1);return o>-1&&(-1===r||o-1?h.slice(0,p)+h.slice(p).replace(a,""):h.replace(a,""),!(h.length<=c[0].length||n.ignore&&n.ignore.test(h))){d=l+h.length;var g=e(h,l,d,t);void 0!==g?(g=String(g),t=t.slice(0,l)+g+t.slice(d),r.lastIndex=l+g.length):r.lastIndex=d}}return r.lastIndex=0,t},i.ensureValidHostname=function(e){if(e.match(i.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-] and Punycode.js is not available');if(t.toASCII(e).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]')}},i.noConflict=function(t){if(t){var e={URI:this.noConflict()};return r.URITemplate&&"function"==typeof r.URITemplate.noConflict&&(e.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"==typeof r.IPv6.noConflict&&(e.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"==typeof r.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=r.SecondLevelDomains.noConflict()),e}return r.URI===this&&(r.URI=m),this},g.build=function(t){return!0===t?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},g.clone=function(){return new i(this)},g.valueOf=g.toString=function(){return this.build(!1)._string},g.protocol=p("protocol"),g.username=p("username"),g.password=p("password"),g.hostname=p("hostname"),g.port=p("port"),g.query=v("query","?"),g.fragment=v("fragment","#"),g.search=function(t,e){var n=this.query(t,e);return"string"==typeof n&&n.length?"?"+n:n},g.hash=function(t,e){var n=this.fragment(t,e);return"string"==typeof n&&n.length?"#"+n:n},g.pathname=function(t,e){if(void 0===t||!0===t){var n=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?i.decodeUrnPath:i.decodePath)(n):n}return this._parts.urn?this._parts.path=t?i.recodeUrnPath(t):"":this._parts.path=t?i.recodePath(t):"/",this.build(!e),this},g.path=g.pathname,g.href=function(t,e){var n;if(void 0===t)return this.toString();this._string="",this._parts=i._parts();var r=t instanceof i,o="object"==typeof t&&(t.hostname||t.path||t.pathname);if(t.nodeName){t=t[i.getDomAttribute(t)]||"",o=!1}if(!r&&o&&void 0!==t.pathname&&(t=t.toString()),"string"==typeof t||t instanceof String)this._parts=i.parse(String(t),this._parts);else{if(!r&&!o)throw new TypeError("invalid input");var a=r?t._parts:t;for(n in a)y.call(this._parts,n)&&(this._parts[n]=a[n])}return this.build(!e),this},g.is=function(t){var e=!1,r=!1,o=!1,a=!1,s=!1,u=!1,c=!1,l=!this._parts.urn;switch(this._parts.hostname&&(l=!1,r=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),e=r||o,a=!e,s=a&&n&&n.has(this._parts.hostname),u=a&&i.idn_expression.test(this._parts.hostname),c=a&&i.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return l;case"absolute":return!l;case"domain":case"name":return a;case"sld":return s;case"ip":return e;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return o;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var k=g.protocol,E=g.port,x=g.hostname;g.protocol=function(t,e){if(void 0!==t&&t&&(t=t.replace(/:(\/\/)?$/,""),!t.match(i.protocol_expression)))throw new TypeError('Protocol "'+t+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return k.call(this,t,e)},g.scheme=g.protocol,g.port=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t&&(0===t&&(t=null),t&&(t+="",":"===t.charAt(0)&&(t=t.substring(1)),t.match(/[^0-9]/))))throw new TypeError('Port "'+t+'" contains characters other than [0-9]');return E.call(this,t,e)},g.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var n={};if("/"!==i.parseHost(t,n))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');t=n.hostname}return x.call(this,t,e)},g.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=this.protocol();return this.authority()?(n?n+"://":"")+this.authority():""}var r=i(t);return this.protocol(r.protocol()).authority(r.authority()).build(!e),this},g.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},g.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},g.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=i.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==t[t.length-1]&&(t+="@"),i.parseUserinfo(t,this._parts),this.build(!e),this},g.resource=function(t,e){var n;return void 0===t?this.path()+this.search()+this.hash():(n=i.parse(t),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!e),this)},g.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var r=this._parts.hostname.length-this.domain().length,a=this._parts.hostname.substring(0,r),s=new RegExp("^"+o(a));return t&&"."!==t.charAt(t.length-1)&&(t+="."),t&&i.ensureValidHostname(t),this._parts.hostname=this._parts.hostname.replace(s,t),this.build(!e),this},g.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&n.length<2)return this._parts.hostname;var r=this._parts.hostname.length-this.tld(e).length-1;return r=this._parts.hostname.lastIndexOf(".",r-1)+1,this._parts.hostname.substring(r)||""}if(!t)throw new TypeError("cannot set domain empty");if(i.ensureValidHostname(t),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var a=new RegExp(o(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(a,t)}return this.build(!e),this},g.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(r+1);return!0!==e&&n&&n.list[i.toLowerCase()]?n.get(this._parts.hostname)||i:i}var a;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(t))throw new TypeError('TLD "'+t+'" contains characters other than [A-Z0-9]');a=new RegExp(o(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(a,t)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");a=new RegExp(o(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(a,t)}return this.build(!e),this},g.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,r=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return t?i.decodePath(r):r}var a=this._parts.path.length-this.filename().length,s=this._parts.path.substring(0,a),u=new RegExp("^"+o(s));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=i.recodePath(t),this._parts.path=this._parts.path.replace(u,t),this.build(!e),this},g.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("string"!=typeof t){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),r=this._parts.path.substring(n+1);return t?i.decodePathSegment(r):r}var a=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\.?\//)&&(a=!0);var s=new RegExp(o(this.filename())+"$");return t=i.recodePath(t),this._parts.path=this._parts.path.replace(s,t),a?this.normalizePath(e):this.build(!e),this},g.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var n,r,a=this.filename(),s=a.lastIndexOf(".");return-1===s?"":(n=a.substring(s+1),r=/^[a-z0-9%]+$/i.test(n)?n:"",t?i.decodePathSegment(r):r)}"."===t.charAt(0)&&(t=t.substring(1));var u,c=this.suffix();if(c)u=t?new RegExp(o(c)+"$"):new RegExp(o("."+c)+"$");else{if(!t)return this;this._parts.path+="."+i.recodePath(t)}return u&&(t=i.recodePath(t),this._parts.path=this._parts.path.replace(u,t)),this.build(!e),this},g.segment=function(t,e,n){var r=this._parts.urn?":":"/",i=this.path(),o="/"===i.substring(0,1),a=i.split(r);if(void 0!==t&&"number"!=typeof t&&(n=e,e=t,t=void 0),void 0!==t&&"number"!=typeof t)throw new Error('Bad segment "'+t+'", must be 0-based integer');if(o&&a.shift(),t<0&&(t=Math.max(a.length+t,0)),void 0===e)return void 0===t?a:a[t];if(null===t||void 0===a[t])if(s(e)){a=[];for(var u=0,c=e.length;u0&&e-1 in t))}function s(t,e,n){if(st.isFunction(e))return st.grep(t,function(t,r){return!!e.call(t,r,t)!==n});if(e.nodeType)return st.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(vt.test(e))return st.filter(e,t,n);e=st.filter(e,t)}return st.grep(t,function(t){return st.inArray(t,e)>=0!==n})}function u(t,e){do{t=t[e]}while(t&&1!==t.nodeType);return t}function c(t){var e=Ct[t]={};return st.each(t.match(wt)||[],function(t,n){e[n]=!0}),e}function l(){gt.addEventListener?(gt.removeEventListener("DOMContentLoaded",f,!1),n.removeEventListener("load",f,!1)):(gt.detachEvent("onreadystatechange",f),n.detachEvent("onload",f))}function f(){(gt.addEventListener||"load"===event.type||"complete"===gt.readyState)&&(l(),st.ready())}function d(t,e,n){if(void 0===n&&1===t.nodeType){var r="data-"+e.replace(Ot,"-$1").toLowerCase();if("string"==typeof(n=t.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:jt.test(n)?st.parseJSON(n):n)}catch(t){}st.data(t,e,n)}else n=void 0}return n}function h(t){var e;for(e in t)if(("data"!==e||!st.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function p(t,e,n,r){if(st.acceptData(t)){var i,o,a=st.expando,s=t.nodeType,u=s?st.cache:t,c=s?t[a]:t[a]&&a;if(c&&u[c]&&(r||u[c].data)||void 0!==n||"string"!=typeof e)return c||(c=s?t[a]=Z.pop()||st.guid++:a),u[c]||(u[c]=s?{}:{toJSON:st.noop}),"object"!=typeof e&&"function"!=typeof e||(r?u[c]=st.extend(u[c],e):u[c].data=st.extend(u[c].data,e)),o=u[c],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[st.camelCase(e)]=n),"string"==typeof e?null==(i=o[e])&&(i=o[st.camelCase(e)]):i=o,i}}function v(t,e,n){if(st.acceptData(t)){var r,i,o=t.nodeType,a=o?st.cache:t,s=o?t[st.expando]:st.expando;if(a[s]){if(e&&(r=n?a[s]:a[s].data)){st.isArray(e)?e=e.concat(st.map(e,st.camelCase)):e in r?e=[e]:(e=st.camelCase(e),e=e in r?[e]:e.split(" ")),i=e.length;for(;i--;)delete r[e[i]];if(n?!h(r):!st.isEmptyObject(r))return}(n||(delete a[s].data,h(a[s])))&&(o?st.cleanData([t],!0):at.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}function m(){return!0}function g(){return!1}function y(){try{return gt.activeElement}catch(t){}}function b(t){var e=It.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}function _(t,e){var n,r,i=0,o=typeof t.getElementsByTagName!==xt?t.getElementsByTagName(e||"*"):typeof t.querySelectorAll!==xt?t.querySelectorAll(e||"*"):void 0;if(!o)for(o=[],n=t.childNodes||t;null!=(r=n[i]);i++)!e||st.nodeName(r,e)?o.push(r):st.merge(o,_(r,e));return void 0===e||e&&st.nodeName(t,e)?st.merge([t],o):o}function w(t){Nt.test(t.type)&&(t.defaultChecked=t.checked)}function C(t,e){return st.nodeName(t,"table")&&st.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function k(t){return t.type=(null!==st.find.attr(t,"type"))+"/"+t.type,t}function E(t){var e=Gt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function x(t,e){for(var n,r=0;null!=(n=t[r]);r++)st._data(n,"globalEval",!e||st._data(e[r],"globalEval"))}function j(t,e){if(1===e.nodeType&&st.hasData(t)){var n,r,i,o=st._data(t),a=st._data(e,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r")).appendTo(e.documentElement),e=(te[0].contentWindow||te[0].contentDocument).document,e.write(),e.close(),n=S(t,e),te.detach()),ee[t]=n),n}function A(t,e){return{get:function(){var n=t();if(null!=n)return n?void delete this.get:(this.get=e).apply(this,arguments)}}}function P(t,e){if(e in t)return e;for(var n=e.charAt(0).toUpperCase()+e.slice(1),r=e,i=pe.length;i--;)if((e=pe[i]+n)in t)return e;return r}function N(t,e){for(var n,r,i,o=[],a=0,s=t.length;a=0&&n=0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},isPlainObject:function(t){var e;if(!t||"object"!==st.type(t)||t.nodeType||st.isWindow(t))return!1;try{if(t.constructor&&!ot.call(t,"constructor")&&!ot.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}if(at.ownLast)for(e in t)return ot.call(t,e);for(e in t);return void 0===e||ot.call(t,e)},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?rt[it.call(t)]||"object":typeof t},globalEval:function(t){t&&st.trim(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(t){return t.replace(ct,"ms-").replace(lt,ft)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,n){var r=0,i=t.length,o=a(t);if(n){if(o)for(;r_.cacheLength&&delete t[e.shift()],t[n+" "]=r}var e=[];return t}function r(t){return t[L]=!0,t}function i(t){var e=A.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var n=t.split("|"),r=t.length;r--;)_.attrHandle[n[r]]=e}function a(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||Q)-(~t.sourceIndex||Q);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function s(t){return r(function(e){return e=+e,r(function(n,r){for(var i,o=t([],n.length,e),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(t){return t&&typeof t.getElementsByTagName!==V&&t}function c(){}function l(t){for(var e=0,n=t.length,r="";e1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function h(t,n,r){for(var i=0,o=n.length;i-1&&(r[c]=!(a[c]=f))}}else b=p(b===a?b.splice(m,b.length):b),o?o(null,a,b,u):Y.apply(a,b)})}function m(t){for(var e,n,r,i=t.length,o=_.relative[t[0].type],a=o||_.relative[" "],s=o?1:0,u=f(function(t){return t===e},a,!0),c=f(function(t){return J.call(e,t)>-1},a,!0),h=[function(t,n,r){return!o&&(r||n!==j)||((e=n).nodeType?u(t,n,r):c(t,n,r))}];s1&&d(h),s>1&&l(t.slice(0,s-1).concat({value:" "===t[s-2].type?"*":""})).replace(at,"$1"),n,s0,o=t.length>0,a=function(r,a,s,u,c){var l,f,d,h=0,v="0",m=r&&[],g=[],y=j,b=r||o&&_.find.TAG("*",c),w=B+=null==y?1:Math.random()||.1,C=b.length;for(c&&(j=a!==A&&a);v!==C&&null!=(l=b[v]);v++){if(o&&l){for(f=0;d=t[f++];)if(d(l,a,s)){u.push(l);break}c&&(B=w)}i&&((l=!d&&l)&&h--,r&&m.push(l))}if(h+=v,i&&v!==h){for(f=0;d=n[f++];)d(m,g,a,s);if(r){if(h>0)for(;v--;)m[v]||g[v]||(g[v]=G.call(u));g=p(g)}Y.apply(u,g),c&&!r&&g.length>0&&h+n.length>1&&e.uniqueSort(u)}return c&&(B=w,j=y),m};return i?r(a):a}var y,b,_,w,C,k,E,x,j,O,S,T,A,P,N,D,F,M,R,L="sizzle"+-new Date,I=t.document,B=0,z=0,H=n(),q=n(),W=n(),U=function(t,e){return t===e&&(S=!0),0},V="undefined",Q=1<<31,$={}.hasOwnProperty,K=[],G=K.pop,X=K.push,Y=K.push,Z=K.slice,J=K.indexOf||function(t){for(var e=0,n=this.length;e+~]|"+et+")"+et+"*"),ct=new RegExp("="+et+"*([^\\]'\"]*?)"+et+"*\\]","g"),lt=new RegExp(ot),ft=new RegExp("^"+rt+"$"),dt={ID:new RegExp("^#("+nt+")"),CLASS:new RegExp("^\\.("+nt+")"),TAG:new RegExp("^("+nt.replace("w","w*")+")"),ATTR:new RegExp("^"+it),PSEUDO:new RegExp("^"+ot),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+et+"*(even|odd|(([+-]|)(\\d*)n|)"+et+"*(?:([+-]|)"+et+"*(\\d+)|))"+et+"*\\)|)","i"),bool:new RegExp("^(?:"+tt+")$","i"),needsContext:new RegExp("^"+et+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+et+"*((?:-\\d)?\\d*)"+et+"*\\)|)(?=[^-]|$)","i")},ht=/^(?:input|select|textarea|button)$/i,pt=/^h\d$/i,vt=/^[^{]+\{\s*\[native \w/,mt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,gt=/[+~]/,yt=/'|\\/g,bt=new RegExp("\\\\([\\da-f]{1,6}"+et+"?|("+et+")|.)","ig"),_t=function(t,e,n){var r="0x"+e-65536;return r!==r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{Y.apply(K=Z.call(I.childNodes),I.childNodes),K[I.childNodes.length].nodeType}catch(t){Y={apply:K.length?function(t,e){X.apply(t,Z.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}b=e.support={},C=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},T=e.setDocument=function(t){var e,n=t?t.ownerDocument||t:I,r=n.defaultView;return n!==A&&9===n.nodeType&&n.documentElement?(A=n,P=n.documentElement,N=!C(n),r&&r!==r.top&&(r.addEventListener?r.addEventListener("unload",function(){T()},!1):r.attachEvent&&r.attachEvent("onunload",function(){T()})),b.attributes=i(function(t){return t.className="i",!t.getAttribute("className")}),b.getElementsByTagName=i(function(t){return t.appendChild(n.createComment("")),!t.getElementsByTagName("*").length}),b.getElementsByClassName=vt.test(n.getElementsByClassName)&&i(function(t){return t.innerHTML="
",t.firstChild.className="i",2===t.getElementsByClassName("i").length}),b.getById=i(function(t){return P.appendChild(t).id=L,!n.getElementsByName||!n.getElementsByName(L).length}),b.getById?(_.find.ID=function(t,e){if(typeof e.getElementById!==V&&N){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},_.filter.ID=function(t){var e=t.replace(bt,_t);return function(t){return t.getAttribute("id")===e}}):(delete _.find.ID,_.filter.ID=function(t){var e=t.replace(bt,_t);return function(t){var n=typeof t.getAttributeNode!==V&&t.getAttributeNode("id");return n&&n.value===e}}),_.find.TAG=b.getElementsByTagName?function(t,e){if(typeof e.getElementsByTagName!==V)return e.getElementsByTagName(t)}:function(t,e){var n,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},_.find.CLASS=b.getElementsByClassName&&function(t,e){if(typeof e.getElementsByClassName!==V&&N)return e.getElementsByClassName(t)},F=[],D=[],(b.qsa=vt.test(n.querySelectorAll))&&(i(function(t){t.innerHTML="",t.querySelectorAll("[msallowclip^='']").length&&D.push("[*^$]="+et+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||D.push("\\["+et+"*(?:value|"+tt+")"),t.querySelectorAll(":checked").length||D.push(":checked")}),i(function(t){var e=n.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&D.push("name"+et+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||D.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),D.push(",.*:")})),(b.matchesSelector=vt.test(M=P.matches||P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&i(function(t){b.disconnectedMatch=M.call(t,"div"),M.call(t,"[s!='']:x"),F.push("!=",ot)}),D=D.length&&new RegExp(D.join("|")),F=F.length&&new RegExp(F.join("|")),e=vt.test(P.compareDocumentPosition),R=e||vt.test(P.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},U=e?function(t,e){if(t===e)return S=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(r=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&r||!b.sortDetached&&e.compareDocumentPosition(t)===r?t===n||t.ownerDocument===I&&R(I,t)?-1:e===n||e.ownerDocument===I&&R(I,e)?1:O?J.call(O,t)-J.call(O,e):0:4&r?-1:1)}:function(t,e){if(t===e)return S=!0,0;var r,i=0,o=t.parentNode,s=e.parentNode,u=[t],c=[e];if(!o||!s)return t===n?-1:e===n?1:o?-1:s?1:O?J.call(O,t)-J.call(O,e):0;if(o===s)return a(t,e);for(r=t;r=r.parentNode;)u.unshift(r);for(r=e;r=r.parentNode;)c.unshift(r);for(;u[i]===c[i];)i++;return i?a(u[i],c[i]):u[i]===I?-1:c[i]===I?1:0},n):A},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==A&&T(t),n=n.replace(ct,"='$1']"),b.matchesSelector&&N&&(!F||!F.test(n))&&(!D||!D.test(n)))try{var r=M.call(t,n);if(r||b.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){}return e(n,A,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==A&&T(t),R(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==A&&T(t);var n=_.attrHandle[e.toLowerCase()],r=n&&$.call(_.attrHandle,e.toLowerCase())?n(t,e,!N):void 0;return void 0!==r?r:b.attributes||!N?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],r=0,i=0;if(S=!b.detectDuplicates,O=!b.sortStable&&t.slice(0),t.sort(U),S){for(;e=t[i++];)e===t[i]&&(r=n.push(i));for(;r--;)t.splice(n[r],1)}return O=null,t},w=e.getText=function(t){var e,n="",r=0,i=t.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=w(t)}else if(3===i||4===i)return t.nodeValue}else for(;e=t[r++];)n+=w(e);return n},_=e.selectors={cacheLength:50,createPseudo:r,match:dt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(bt,_t),t[3]=(t[3]||t[4]||t[5]||"").replace(bt,_t),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return dt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&<.test(n)&&(e=k(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(bt,_t).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=H[t+" "];return e||(e=new RegExp("(^|"+et+")"+t+"("+et+"|$)"))&&H(t,function(t){return e.test("string"==typeof t.className&&t.className||typeof t.getAttribute!==V&&t.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(i){var o=e.attr(i,t);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var c,l,f,d,h,p,v=o!==a?"nextSibling":"previousSibling",m=e.parentNode,g=s&&e.nodeName.toLowerCase(),y=!u&&!s;if(m){if(o){for(;v;){for(f=e;f=f[v];)if(s?f.nodeName.toLowerCase()===g:1===f.nodeType)return!1;p=v="only"===t&&!p&&"nextSibling"}return!0}if(p=[a?m.firstChild:m.lastChild],a&&y){for(l=m[L]||(m[L]={}),c=l[t]||[],h=c[0]===B&&c[1],d=c[0]===B&&c[2],f=h&&m.childNodes[h];f=++h&&f&&f[v]||(d=h=0)||p.pop();)if(1===f.nodeType&&++d&&f===e){l[t]=[B,h,d];break}}else if(y&&(c=(e[L]||(e[L]={}))[t])&&c[0]===B)d=c[1];else for(;(f=++h&&f&&f[v]||(d=h=0)||p.pop())&&((s?f.nodeName.toLowerCase()!==g:1!==f.nodeType)||!++d||(y&&((f[L]||(f[L]={}))[t]=[B,d]),f!==e)););return(d-=i)===r||d%r==0&&d/r>=0}}},PSEUDO:function(t,n){var i,o=_.pseudos[t]||_.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[L]?o(n):o.length>1?(i=[t,t,"",n],_.setFilters.hasOwnProperty(t.toLowerCase())?r(function(t,e){for(var r,i=o(t,n),a=i.length;a--;)r=J.call(t,i[a]),t[r]=!(e[r]=i[a])}):function(t){return o(t,0,i)}):o}},pseudos:{not:r(function(t){var e=[],n=[],i=E(t.replace(at,"$1"));return i[L]?r(function(t,e,n,r){for(var o,a=i(t,null,r,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))}):function(t,r,o){return e[0]=t,i(e,null,o,n),!n.pop()}}),has:r(function(t){return function(n){return e(t,n).length>0}}),contains:r(function(t){return function(e){return(e.textContent||e.innerText||w(e)).indexOf(t)>-1}}),lang:r(function(t){return ft.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(bt,_t).toLowerCase(),function(e){var n;do{if(n=N?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===P},focus:function(t){return t===A.activeElement&&(!A.hasFocus||A.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!_.pseudos.empty(t)},header:function(t){return pt.test(t.nodeName)},input:function(t){return ht.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:s(function(){return[0]}),last:s(function(t,e){return[e-1]}),eq:s(function(t,e,n){return[n<0?n+e:n]}),even:s(function(t,e){for(var n=0;n=0;)t.push(r);return t}),gt:s(function(t,e,n){for(var r=n<0?n+e:n;++r2&&"ID"===(a=o[0]).type&&b.getById&&9===e.nodeType&&N&&_.relative[o[1].type]){if(!(e=(_.find.ID(a.matches[0].replace(bt,_t),e)||[])[0]))return n;f&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(i=dt.needsContext.test(t)?0:o.length;i--&&(a=o[i],!_.relative[s=a.type]);)if((c=_.find[s])&&(r=c(a.matches[0].replace(bt,_t),gt.test(o[0].type)&&u(e.parentNode)||e))){if(o.splice(i,1),!(t=r.length&&l(o)))return Y.apply(n,r),n;break}}return(f||E(t,d))(r,e,!N,n,gt.test(t)&&u(e.parentNode)||e),n},b.sortStable=L.split("").sort(U).join("")===L,b.detectDuplicates=!!S,T(),b.sortDetached=i(function(t){return 1&t.compareDocumentPosition(A.createElement("div"))}),i(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),b.attributes&&i(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),i(function(t){return null==t.getAttribute("disabled")})||o(tt,function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null}),e}(n);st.find=dt,st.expr=dt.selectors,st.expr[":"]=st.expr.pseudos,st.unique=dt.uniqueSort,st.text=dt.getText,st.isXMLDoc=dt.isXML,st.contains=dt.contains;var ht=st.expr.match.needsContext,pt=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,vt=/^.[^:#\[\.,]*$/;st.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?st.find.matchesSelector(r,t)?[r]:[]:st.find.matches(t,st.grep(e,function(t){return 1===t.nodeType}))},st.fn.extend({find:function(t){var e,n=[],r=this,i=r.length;if("string"!=typeof t)return this.pushStack(st(t).filter(function(){for(e=0;e1?st.unique(n):n),n.selector=this.selector?this.selector+" "+t:t,n},filter:function(t){return this.pushStack(s(this,t||[],!1))},not:function(t){return this.pushStack(s(this,t||[],!0))},is:function(t){return!!s(this,"string"==typeof t&&ht.test(t)?st(t):t||[],!1).length}});var mt,gt=n.document,yt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(st.fn.init=function(t,e){var n,r;if(!t)return this;if("string"==typeof t){if(!(n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:yt.exec(t))||!n[1]&&e)return!e||e.jquery?(e||mt).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof st?e[0]:e,st.merge(this,st.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:gt,!0)),pt.test(n[1])&&st.isPlainObject(e))for(n in e)st.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}if((r=gt.getElementById(n[2]))&&r.parentNode){if(r.id!==n[2])return mt.find(t);this.length=1,this[0]=r}return this.context=gt,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):st.isFunction(t)?void 0!==mt.ready?mt.ready(t):t(st):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),st.makeArray(t,this))}).prototype=st.fn,mt=st(gt);var bt=/^(?:parents|prev(?:Until|All))/,_t={children:!0,contents:!0,next:!0,prev:!0};st.extend({dir:function(t,e,n){for(var r=[],i=t[e];i&&9!==i.nodeType&&(void 0===n||1!==i.nodeType||!st(i).is(n));)1===i.nodeType&&r.push(i),i=i[e];return r},sibling:function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}}),st.fn.extend({has:function(t){var e,n=st(t,this),r=n.length;return this.filter(function(){for(e=0;e-1:1===n.nodeType&&st.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?st.unique(o):o)},index:function(t){return t?"string"==typeof t?st.inArray(this[0],st(t)):st.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(st.unique(st.merge(this.get(),st(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),st.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return st.dir(t,"parentNode")},parentsUntil:function(t,e,n){return st.dir(t,"parentNode",n)},next:function(t){return u(t,"nextSibling")},prev:function(t){return u(t,"previousSibling")},nextAll:function(t){return st.dir(t,"nextSibling")},prevAll:function(t){return st.dir(t,"previousSibling")},nextUntil:function(t,e,n){return st.dir(t,"nextSibling",n)},prevUntil:function(t,e,n){return st.dir(t,"previousSibling",n)},siblings:function(t){return st.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return st.sibling(t.firstChild)},contents:function(t){return st.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:st.merge([],t.childNodes)}},function(t,e){st.fn[t]=function(n,r){var i=st.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=st.filter(r,i)),this.length>1&&(_t[t]||(i=st.unique(i)),bt.test(t)&&(i=i.reverse())),this.pushStack(i)}});var wt=/\S+/g,Ct={};st.Callbacks=function(t){t="string"==typeof t?Ct[t]||c(t):st.extend({},t);var e,n,r,i,o,a,s=[],u=!t.once&&[],l=function(c){for(n=t.memory&&c,r=!0,o=a||0,a=0,i=s.length,e=!0;s&&o-1;)s.splice(r,1),e&&(r<=i&&i--,r<=o&&o--)}),this},has:function(t){return t?st.inArray(t,s)>-1:!(!s||!s.length)},empty:function(){return s=[],i=0,this},disable:function(){return s=u=n=void 0,this},disabled:function(){return!s},lock:function(){return u=void 0,n||f.disable(),this},locked:function(){return!u},fireWith:function(t,n){return!s||r&&!u||(n=n||[],n=[t,n.slice?n.slice():n],e?u.push(n):l(n)),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!r}};return f},st.extend({Deferred:function(t){var e=[["resolve","done",st.Callbacks("once memory"),"resolved"],["reject","fail",st.Callbacks("once memory"),"rejected"],["notify","progress",st.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var t=arguments;return st.Deferred(function(n){st.each(e,function(e,o){var a=st.isFunction(t[e])&&t[e];i[o[1]](function(){var t=a&&a.apply(this,arguments);t&&st.isFunction(t.promise)?t.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===r?n.promise():this,a?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?st.extend(t,r):r}},i={};return r.pipe=r.then,st.each(e,function(t,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},e[1^t][2].disable,e[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),t&&t.call(i,i),i},when:function(t){var e,n,r,i=0,o=J.call(arguments),a=o.length,s=1!==a||t&&st.isFunction(t.promise)?a:0,u=1===s?t:st.Deferred(),c=function(t,n,r){return function(i){n[t]=this,r[t]=arguments.length>1?J.call(arguments):i,r===e?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(e=new Array(a),n=new Array(a),r=new Array(a);i0||(kt.resolveWith(gt,[st]),st.fn.triggerHandler&&(st(gt).triggerHandler("ready"),st(gt).off("ready")))}}}),st.ready.promise=function(t){if(!kt)if(kt=st.Deferred(),"complete"===gt.readyState)setTimeout(st.ready);else if(gt.addEventListener)gt.addEventListener("DOMContentLoaded",f,!1),n.addEventListener("load",f,!1);else{gt.attachEvent("onreadystatechange",f),n.attachEvent("onload",f);var e=!1;try{e=null==n.frameElement&>.documentElement}catch(t){}e&&e.doScroll&&function t(){if(!st.isReady){try{e.doScroll("left")}catch(e){return setTimeout(t,50)}l(),st.ready()}}()}return kt.promise(t)};var Et,xt="undefined";for(Et in st(at))break;at.ownLast="0"!==Et,at.inlineBlockNeedsLayout=!1,st(function(){var t,e,n,r;(n=gt.getElementsByTagName("body")[0])&&n.style&&(e=gt.createElement("div"),r=gt.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(e),typeof e.style.zoom!==xt&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",at.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(n.style.zoom=1)),n.removeChild(r))}),function(){var t=gt.createElement("div");if(null==at.deleteExpando){at.deleteExpando=!0;try{delete t.test}catch(t){at.deleteExpando=!1}}t=null}(),st.acceptData=function(t){var e=st.noData[(t.nodeName+" ").toLowerCase()],n=+t.nodeType||1;return(1===n||9===n)&&(!e||!0!==e&&t.getAttribute("classid")===e)};var jt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ot=/([A-Z])/g;st.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return!!(t=t.nodeType?st.cache[t[st.expando]]:t[st.expando])&&!h(t)},data:function(t,e,n){return p(t,e,n)},removeData:function(t,e){return v(t,e)},_data:function(t,e,n){return p(t,e,n,!0)},_removeData:function(t,e){return v(t,e,!0)}}),st.fn.extend({data:function(t,e){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===t){if(this.length&&(i=st.data(o),1===o.nodeType&&!st._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=st.camelCase(r.slice(5)),d(o,r,i[r])));st._data(o,"parsedAttrs",!0)}return i}return"object"==typeof t?this.each(function(){st.data(this,t)}):arguments.length>1?this.each(function(){st.data(this,t,e)}):o?d(o,t,st.data(o,t)):void 0},removeData:function(t){return this.each(function(){st.removeData(this,t)})}}),st.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=st._data(t,e),n&&(!r||st.isArray(n)?r=st._data(t,e,st.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=st.queue(t,e),r=n.length,i=n.shift(),o=st._queueHooks(t,e),a=function(){st.dequeue(t,e)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return st._data(t,n)||st._data(t,n,{empty:st.Callbacks("once memory").add(function(){st._removeData(t,e+"queue"),st._removeData(t,n)})})}}),st.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length
a",at.leadingWhitespace=3===e.firstChild.nodeType,at.tbody=!e.getElementsByTagName("tbody").length,at.htmlSerialize=!!e.getElementsByTagName("link").length,at.html5Clone="<:nav>"!==gt.createElement("nav").cloneNode(!0).outerHTML,t.type="checkbox",t.checked=!0,n.appendChild(t),at.appendChecked=t.checked,e.innerHTML="",at.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,n.appendChild(e),e.innerHTML="",at.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,at.noCloneEvent=!0,e.attachEvent&&(e.attachEvent("onclick",function(){at.noCloneEvent=!1}),e.cloneNode(!0).click()),null==at.deleteExpando){at.deleteExpando=!0;try{delete e.test}catch(t){at.deleteExpando=!1}}}(),function(){var t,e,r=gt.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})e="on"+t,(at[t+"Bubbles"]=e in n)||(r.setAttribute(e,"t"),at[t+"Bubbles"]=!1===r.attributes[e].expando);r=null}();var Dt=/^(?:input|select|textarea)$/i,Ft=/^key/,Mt=/^(?:mouse|pointer|contextmenu)|click/,Rt=/^(?:focusinfocus|focusoutblur)$/,Lt=/^([^.]*)(?:\.(.+)|)$/;st.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,c,l,f,d,h,p,v,m=st._data(t);if(m){for(n.handler&&(u=n,n=u.handler,i=u.selector),n.guid||(n.guid=st.guid++),(a=m.events)||(a=m.events={}),(l=m.handle)||(l=m.handle=function(t){return typeof st===xt||t&&st.event.triggered===t.type?void 0:st.event.dispatch.apply(l.elem,arguments)},l.elem=t),e=(e||"").match(wt)||[""],s=e.length;s--;)o=Lt.exec(e[s])||[],h=v=o[1],p=(o[2]||"").split(".").sort(),h&&(c=st.event.special[h]||{},h=(i?c.delegateType:c.bindType)||h,c=st.event.special[h]||{},f=st.extend({type:h,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&st.expr.match.needsContext.test(i),namespace:p.join(".")},u),(d=a[h])||(d=a[h]=[],d.delegateCount=0,c.setup&&!1!==c.setup.call(t,r,p,l)||(t.addEventListener?t.addEventListener(h,l,!1):t.attachEvent&&t.attachEvent("on"+h,l))),c.add&&(c.add.call(t,f),f.handler.guid||(f.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,f):d.push(f),st.event.global[h]=!0);t=null}},remove:function(t,e,n,r,i){var o,a,s,u,c,l,f,d,h,p,v,m=st.hasData(t)&&st._data(t);if(m&&(l=m.events)){for(e=(e||"").match(wt)||[""],c=e.length;c--;)if(s=Lt.exec(e[c])||[],h=v=s[1],p=(s[2]||"").split(".").sort(),h){for(f=st.event.special[h]||{},h=(r?f.delegateType:f.bindType)||h,d=l[h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=d.length;o--;)a=d[o],!i&&v!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(d.splice(o,1),a.selector&&d.delegateCount--,f.remove&&f.remove.call(t,a));u&&!d.length&&(f.teardown&&!1!==f.teardown.call(t,p,m.handle)||st.removeEvent(t,h,m.handle),delete l[h])}else for(h in l)st.event.remove(t,h+e[c],n,r,!0);st.isEmptyObject(l)&&(delete m.handle,st._removeData(t,"events"))}},trigger:function(t,e,r,i){var o,a,s,u,c,l,f,d=[r||gt],h=ot.call(t,"type")?t.type:t,p=ot.call(t,"namespace")?t.namespace.split("."):[];if(s=l=r=r||gt,3!==r.nodeType&&8!==r.nodeType&&!Rt.test(h+st.event.triggered)&&(h.indexOf(".")>=0&&(p=h.split("."),h=p.shift(),p.sort()),a=h.indexOf(":")<0&&"on"+h,t=t[st.expando]?t:new st.Event(h,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=p.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:st.makeArray(e,[t]),c=st.event.special[h]||{},i||!c.trigger||!1!==c.trigger.apply(r,e))){if(!i&&!c.noBubble&&!st.isWindow(r)){for(u=c.delegateType||h,Rt.test(u+h)||(s=s.parentNode);s;s=s.parentNode)d.push(s),l=s;l===(r.ownerDocument||gt)&&d.push(l.defaultView||l.parentWindow||n)}for(f=0;(s=d[f++])&&!t.isPropagationStopped();)t.type=f>1?u:c.bindType||h,o=(st._data(s,"events")||{})[t.type]&&st._data(s,"handle"),o&&o.apply(s,e),(o=a&&s[a])&&o.apply&&st.acceptData(s)&&(t.result=o.apply(s,e),!1===t.result&&t.preventDefault());if(t.type=h,!i&&!t.isDefaultPrevented()&&(!c._default||!1===c._default.apply(d.pop(),e))&&st.acceptData(r)&&a&&r[h]&&!st.isWindow(r)){l=r[a],l&&(r[a]=null),st.event.triggered=h;try{r[h]()}catch(t){}st.event.triggered=void 0,l&&(r[a]=l)}return t.result}},dispatch:function(t){t=st.event.fix(t);var e,n,r,i,o,a=[],s=J.call(arguments),u=(st._data(this,"events")||{})[t.type]||[],c=st.event.special[t.type]||{};if(s[0]=t,t.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,t)){for(a=st.event.handlers.call(this,t,u),e=0;(i=a[e++])&&!t.isPropagationStopped();)for(t.currentTarget=i.elem,o=0;(r=i.handlers[o++])&&!t.isImmediatePropagationStopped();)t.namespace_re&&!t.namespace_re.test(r.namespace)||(t.handleObj=r,t.data=r.data,void 0!==(n=((st.event.special[r.origType]||{}).handle||r.handler).apply(i.elem,s))&&!1===(t.result=n)&&(t.preventDefault(),t.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,r,i,o,a=[],s=e.delegateCount,u=t.target;if(s&&u.nodeType&&(!t.button||"click"!==t.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(!0!==u.disabled||"click"!==t.type)){for(i=[],o=0;o=0:st.find(n,this,null,[u]).length),i[n]&&i.push(r);i.length&&a.push({elem:u,handlers:i})}return s]","i"),Ht=/^\s+/,qt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Wt=/<([\w:]+)/,Ut=/\s*$/g,Yt={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:at.htmlSerialize?[0,"",""]:[1,"X
","
"]},Zt=b(gt),Jt=Zt.appendChild(gt.createElement("div"));Yt.optgroup=Yt.option,Yt.tbody=Yt.tfoot=Yt.colgroup=Yt.caption=Yt.thead,Yt.th=Yt.td,st.extend({clone:function(t,e,n){var r,i,o,a,s,u=st.contains(t.ownerDocument,t);if(at.html5Clone||st.isXMLDoc(t)||!zt.test("<"+t.nodeName+">")?o=t.cloneNode(!0):(Jt.innerHTML=t.outerHTML,Jt.removeChild(o=Jt.firstChild)),!(at.noCloneEvent&&at.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||st.isXMLDoc(t)))for(r=_(o),s=_(t),a=0;null!=(i=s[a]);++a)r[a]&&O(i,r[a]);if(e)if(n)for(s=s||_(t),r=r||_(o),a=0;null!=(i=s[a]);a++)j(i,r[a]);else j(t,o);return r=_(o,"script"),r.length>0&&x(r,!u&&_(t,"script")),r=s=i=null,o},buildFragment:function(t,e,n,r){for(var i,o,a,s,u,c,l,f=t.length,d=b(e),h=[],p=0;p")+l[2],i=l[0];i--;)s=s.lastChild;if(!at.leadingWhitespace&&Ht.test(o)&&h.push(e.createTextNode(Ht.exec(o)[0])),!at.tbody)for(o="table"!==u||Ut.test(o)?""!==l[1]||Ut.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;i--;)st.nodeName(c=o.childNodes[i],"tbody")&&!c.childNodes.length&&o.removeChild(c);for(st.merge(h,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=d.lastChild}else h.push(e.createTextNode(o));for(s&&d.removeChild(s),at.appendChecked||st.grep(_(h,"input"),w),p=0;o=h[p++];)if((!r||-1===st.inArray(o,r))&&(a=st.contains(o.ownerDocument,o),s=_(d.appendChild(o),"script"),a&&x(s),n))for(i=0;o=s[i++];)Kt.test(o.type||"")&&n.push(o);return s=null,d},cleanData:function(t,e){for(var n,r,i,o,a=0,s=st.expando,u=st.cache,c=at.deleteExpando,l=st.event.special;null!=(n=t[a]);a++)if((e||st.acceptData(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)l[r]?st.event.remove(n,r):st.removeEvent(n,r,o.handle);u[i]&&(delete u[i],c?delete n[s]:typeof n.removeAttribute!==xt?n.removeAttribute(s):n[s]=null,Z.push(i))}}}),st.fn.extend({text:function(t){return Pt(this,function(t){return void 0===t?st.text(this):this.empty().append((this[0]&&this[0].ownerDocument||gt).createTextNode(t))},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){C(this,t).appendChild(t)}})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=C(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var n,r=t?st.filter(t,this):this,i=0;null!=(n=r[i]);i++)e||1!==n.nodeType||st.cleanData(_(n)),n.parentNode&&(e&&st.contains(n.ownerDocument,n)&&x(_(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&st.cleanData(_(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&st.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return st.clone(this,t,e)})},html:function(t){return Pt(this,function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(Bt,""):void 0;if("string"==typeof t&&!Qt.test(t)&&(at.htmlSerialize||!zt.test(t))&&(at.leadingWhitespace||!Ht.test(t))&&!Yt[(Wt.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(qt,"<$1>");try{for(;n1&&"string"==typeof d&&!at.checkClone&&$t.test(d))return this.each(function(n){var r=l.eq(n);h&&(t[0]=d.call(this,n,r.html())),r.domManip(t,e)});if(c&&(s=st.buildFragment(t,this[0].ownerDocument,!1,this),n=s.firstChild,1===s.childNodes.length&&(s=n),n)){for(o=st.map(_(s,"script"),k),i=o.length;u
t
",i=t.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",s=0===i[0].offsetHeight,s&&(i[0].style.display="",i[1].style.display="none",s=0===i[0].offsetHeight),e.removeChild(r))}var e,r,i,o,a,s,u;e=gt.createElement("div"),e.innerHTML="
a",i=e.getElementsByTagName("a")[0],(r=i&&i.style)&&(r.cssText="float:left;opacity:.5",at.opacity="0.5"===r.opacity,at.cssFloat=!!r.cssFloat,e.style.backgroundClip="content-box",e.cloneNode(!0).style.backgroundClip="",at.clearCloneStyle="content-box"===e.style.backgroundClip,at.boxSizing=""===r.boxSizing||""===r.MozBoxSizing||""===r.WebkitBoxSizing,st.extend(at,{reliableHiddenOffsets:function(){return null==s&&t(),s},boxSizingReliable:function(){return null==a&&t(),a},pixelPosition:function(){return null==o&&t(),o},reliableMarginRight:function(){return null==u&&t(),u}}))}(),st.swap=function(t,e,n,r){var i,o,a={};for(o in e)a[o]=t.style[o],t.style[o]=e[o];i=n.apply(t,r||[]);for(o in e)t.style[o]=a[o];return i};var se=/alpha\([^)]*\)/i,ue=/opacity\s*=\s*([^)]*)/,ce=/^(none|table(?!-c[ea]).+)/,le=new RegExp("^("+St+")(.*)$","i"),fe=new RegExp("^([+-])=("+St+")","i"),de={position:"absolute",visibility:"hidden",display:"block"},he={letterSpacing:"0",fontWeight:"400"},pe=["Webkit","O","Moz","ms"];st.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=re(t,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:at.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,a,s=st.camelCase(e),u=t.style;if(e=st.cssProps[s]||(st.cssProps[s]=P(u,s)),a=st.cssHooks[e]||st.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(t,!1,r))?i:u[e];if(o=typeof n,"string"===o&&(i=fe.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(st.css(t,e)),o="number"),null!=n&&n===n&&("number"!==o||st.cssNumber[s]||(n+="px"),at.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(t,n,r)))))try{u[e]=n}catch(t){}}},css:function(t,e,n,r){var i,o,a,s=st.camelCase(e);return e=st.cssProps[s]||(st.cssProps[s]=P(t.style,s)),a=st.cssHooks[e]||st.cssHooks[s],a&&"get"in a&&(o=a.get(t,!0,n)),void 0===o&&(o=re(t,e,r)),"normal"===o&&e in he&&(o=he[e]),""===n||n?(i=parseFloat(o),!0===n||st.isNumeric(i)?i||0:o):o}}),st.each(["height","width"],function(t,e){st.cssHooks[e]={get:function(t,n,r){if(n)return ce.test(st.css(t,"display"))&&0===t.offsetWidth?st.swap(t,de,function(){return M(t,e,r)}):M(t,e,r)},set:function(t,n,r){var i=r&&ne(t);return D(t,n,r?F(t,e,r,at.boxSizing&&"border-box"===st.css(t,"boxSizing",!1,i),i):0)}}}),at.opacity||(st.cssHooks.opacity={get:function(t,e){return ue.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var n=t.style,r=t.currentStyle,i=st.isNumeric(e)?"alpha(opacity="+100*e+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(e>=1||""===e)&&""===st.trim(o.replace(se,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===e||r&&!r.filter)||(n.filter=se.test(o)?o.replace(se,i):o+" "+i)}}),st.cssHooks.marginRight=A(at.reliableMarginRight,function(t,e){if(e)return st.swap(t,{display:"inline-block"},re,[t,"marginRight"])}),st.each({margin:"",padding:"",border:"Width"},function(t,e){st.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+Tt[r]+e]=o[r]||o[r-2]||o[0];return i}},ie.test(t)||(st.cssHooks[t+e].set=D)}),st.fn.extend({css:function(t,e){return Pt(this,function(t,e,n){var r,i,o={},a=0;if(st.isArray(e)){for(r=ne(t),i=e.length;a1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){At(this)?st(this).show():st(this).hide()})}}),st.Tween=R,R.prototype={constructor:R,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||"swing",this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(st.cssNumber[n]?"":"px")},cur:function(){var t=R.propHooks[this.prop];return t&&t.get?t.get(this):R.propHooks._default.get(this)},run:function(t){var e,n=R.propHooks[this.prop];return this.options.duration?this.pos=e=st.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):R.propHooks._default.set(this),this}},R.prototype.init.prototype=R.prototype,R.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=st.css(t.elem,t.prop,""),e&&"auto"!==e?e:0):t.elem[t.prop]},set:function(t){st.fx.step[t.prop]?st.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[st.cssProps[t.prop]]||st.cssHooks[t.prop])?st.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},R.propHooks.scrollTop=R.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},st.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},st.fx=R.prototype.init,st.fx.step={};var ve,me,ge=/^(?:toggle|show|hide)$/,ye=new RegExp("^(?:([+-])=|)("+St+")([a-z%]*)$","i"),be=/queueHooks$/,_e=[z],we={"*":[function(t,e){var n=this.createTween(t,e),r=n.cur(),i=ye.exec(e),o=i&&i[3]||(st.cssNumber[t]?"":"px"),a=(st.cssNumber[t]||"px"!==o&&+r)&&ye.exec(st.css(n.elem,t)),s=1,u=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do{s=s||".5",a/=s,st.style(n.elem,t,a+o)}while(s!==(s=n.cur()/r)&&1!==s&&--u)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};st.Animation=st.extend(q,{tweener:function(t,e){st.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var n,r=0,i=t.length;r
a",r=e.getElementsByTagName("a")[0],n=gt.createElement("select"),i=n.appendChild(gt.createElement("option")),t=e.getElementsByTagName("input")[0],r.style.cssText="top:1px",at.getSetAttribute="t"!==e.className,at.style=/top/.test(r.getAttribute("style")),at.hrefNormalized="/a"===r.getAttribute("href"),at.checkOn=!!t.value,at.optSelected=i.selected,at.enctype=!!gt.createElement("form").enctype,n.disabled=!0,at.optDisabled=!i.disabled,t=gt.createElement("input"),t.setAttribute("value",""),at.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),at.radioValue="t"===t.value}();var Ce=/\r/g;st.fn.extend({val:function(t){var e,n,r,i=this[0];{if(arguments.length)return r=st.isFunction(t),this.each(function(n){var i;1===this.nodeType&&(i=r?t.call(this,n,st(this).val()):t,null==i?i="":"number"==typeof i?i+="":st.isArray(i)&&(i=st.map(i,function(t){return null==t?"":t+""})),(e=st.valHooks[this.type]||st.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))});if(i)return(e=st.valHooks[i.type]||st.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Ce,""):null==n?"":n)}}}),st.extend({valHooks:{option:{get:function(t){var e=st.find.attr(t,"value");return null!=e?e:st.trim(st.text(t))}},select:{get:function(t){for(var e,n,r=t.options,i=t.selectedIndex,o="select-one"===t.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u=0)try{r.selected=n=!0}catch(t){r.scrollHeight}else r.selected=!1;return n||(t.selectedIndex=-1),i}}}}),st.each(["radio","checkbox"],function(){st.valHooks[this]={set:function(t,e){if(st.isArray(e))return t.checked=st.inArray(st(t).val(),e)>=0}},at.checkOn||(st.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var ke,Ee,xe=st.expr.attrHandle,je=/^(?:checked|selected)$/i,Oe=at.getSetAttribute,Se=at.input;st.fn.extend({attr:function(t,e){return Pt(this,st.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){st.removeAttr(this,t)})}}),st.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(t&&3!==o&&8!==o&&2!==o)return typeof t.getAttribute===xt?st.prop(t,e,n):(1===o&&st.isXMLDoc(t)||(e=e.toLowerCase(),r=st.attrHooks[e]||(st.expr.match.bool.test(e)?Ee:ke)),void 0===n?r&&"get"in r&&null!==(i=r.get(t,e))?i:(i=st.find.attr(t,e),null==i?void 0:i):null!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):void st.removeAttr(t,e))},removeAttr:function(t,e){var n,r,i=0,o=e&&e.match(wt);if(o&&1===t.nodeType)for(;n=o[i++];)r=st.propFix[n]||n,st.expr.match.bool.test(n)?Se&&Oe||!je.test(n)?t[r]=!1:t[st.camelCase("default-"+n)]=t[r]=!1:st.attr(t,n,""),t.removeAttribute(Oe?n:r)},attrHooks:{type:{set:function(t,e){if(!at.radioValue&&"radio"===e&&st.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}}}),Ee={set:function(t,e,n){return!1===e?st.removeAttr(t,n):Se&&Oe||!je.test(n)?t.setAttribute(!Oe&&st.propFix[n]||n,n):t[st.camelCase("default-"+n)]=t[n]=!0,n}},st.each(st.expr.match.bool.source.match(/\w+/g),function(t,e){var n=xe[e]||st.find.attr;xe[e]=Se&&Oe||!je.test(e)?function(t,e,r){var i,o;return r||(o=xe[e],xe[e]=i,i=null!=n(t,e,r)?e.toLowerCase():null,xe[e]=o),i}:function(t,e,n){if(!n)return t[st.camelCase("default-"+e)]?e.toLowerCase():null}}),Se&&Oe||(st.attrHooks.value={set:function(t,e,n){if(!st.nodeName(t,"input"))return ke&&ke.set(t,e,n);t.defaultValue=e}}),Oe||(ke={set:function(t,e,n){var r=t.getAttributeNode(n);if(r||t.setAttributeNode(r=t.ownerDocument.createAttribute(n)),r.value=e+="","value"===n||e===t.getAttribute(n))return e}},xe.id=xe.name=xe.coords=function(t,e,n){var r;if(!n)return(r=t.getAttributeNode(e))&&""!==r.value?r.value:null},st.valHooks.button={get:function(t,e){var n=t.getAttributeNode(e);if(n&&n.specified)return n.value},set:ke.set},st.attrHooks.contenteditable={set:function(t,e,n){ke.set(t,""!==e&&e,n)}},st.each(["width","height"],function(t,e){st.attrHooks[e]={set:function(t,n){if(""===n)return t.setAttribute(e,"auto"),n}}})),at.style||(st.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var Te=/^(?:input|select|textarea|button|object)$/i,Ae=/^(?:a|area)$/i;st.fn.extend({prop:function(t,e){return Pt(this,st.prop,t,e,arguments.length>1)},removeProp:function(t){return t=st.propFix[t]||t,this.each(function(){try{this[t]=void 0,delete this[t]}catch(t){}})}}),st.extend({propFix:{for:"htmlFor",class:"className"},prop:function(t,e,n){var r,i,o,a=t.nodeType;if(t&&3!==a&&8!==a&&2!==a)return o=1!==a||!st.isXMLDoc(t),o&&(e=st.propFix[e]||e,i=st.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=st.find.attr(t,"tabindex");return e?parseInt(e,10):Te.test(t.nodeName)||Ae.test(t.nodeName)&&t.href?0:-1}}}}),at.hrefNormalized||st.each(["href","src"],function(t,e){st.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),at.optSelected||(st.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}}),st.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){st.propFix[this.toLowerCase()]=this}),at.enctype||(st.propFix.enctype="encoding");var Pe=/[\t\r\n\f]/g;st.fn.extend({addClass:function(t){var e,n,r,i,o,a,s=0,u=this.length,c="string"==typeof t&&t;if(st.isFunction(t))return this.each(function(e){st(this).addClass(t.call(this,e,this.className))});if(c)for(e=(t||"").match(wt)||[];s=0;)r=r.replace(" "+i+" "," ");a=t?st.trim(r):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):st.isFunction(t)?this.each(function(n){st(this).toggleClass(t.call(this,n,this.className,e),e)}):this.each(function(){if("string"===n)for(var e,r=0,i=st(this),o=t.match(wt)||[];e=o[r++];)i.hasClass(e)?i.removeClass(e):i.addClass(e);else n!==xt&&"boolean"!==n||(this.className&&st._data(this,"__className__",this.className),this.className=this.className||!1===t?"":st._data(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",n=0,r=this.length;n=0)return!0;return!1}}),st.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){st.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),st.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}});var Ne=st.now(),De=/\?/,Fe=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;st.parseJSON=function(t){if(n.JSON&&n.JSON.parse)return n.JSON.parse(t+"");var e,r=null,i=st.trim(t+"");return i&&!st.trim(i.replace(Fe,function(t,n,i,o){return e&&n&&(r=0),0===r?t:(e=i||n,r+=!o-!i,"")}))?Function("return "+i)():st.error("Invalid JSON: "+t)},st.parseXML=function(t){var e,r;if(!t||"string"!=typeof t)return null;try{n.DOMParser?(r=new DOMParser,e=r.parseFromString(t,"text/xml")):(e=new ActiveXObject("Microsoft.XMLDOM"),e.async="false",e.loadXML(t))}catch(t){e=void 0}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length||st.error("Invalid XML: "+t),e};var Me,Re,Le=/#.*$/,Ie=/([?&])_=[^&]*/,Be=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,ze=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,He=/^(?:GET|HEAD)$/,qe=/^\/\//,We=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ue={},Ve={},Qe="*/".concat("*");try{Re=location.href}catch(t){Re=gt.createElement("a"),Re.href="",Re=Re.href}Me=We.exec(Re.toLowerCase())||[],st.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Re,type:"GET",isLocal:ze.test(Me[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qe,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":st.parseJSON,"text xml":st.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?V(V(t,st.ajaxSettings),e):V(st.ajaxSettings,t)},ajaxPrefilter:W(Ue),ajaxTransport:W(Ve),ajax:function(t,e){function n(t,e,n,r){var i,l,g,y,_,C=e;2!==b&&(b=2,s&&clearTimeout(s),c=void 0,a=r||"",w.readyState=t>0?4:0,i=t>=200&&t<300||304===t,n&&(y=Q(f,w,n)),y=$(f,y,w,i),i?(f.ifModified&&(_=w.getResponseHeader("Last-Modified"),_&&(st.lastModified[o]=_),(_=w.getResponseHeader("etag"))&&(st.etag[o]=_)),204===t||"HEAD"===f.type?C="nocontent":304===t?C="notmodified":(C=y.state,l=y.data,g=y.error,i=!g)):(g=C,!t&&C||(C="error",t<0&&(t=0))),w.status=t,w.statusText=(e||C)+"",i?p.resolveWith(d,[l,C,w]):p.rejectWith(d,[w,C,g]),w.statusCode(m),m=void 0,u&&h.trigger(i?"ajaxSuccess":"ajaxError",[w,f,i?l:g]),v.fireWith(d,[w,C]),u&&(h.trigger("ajaxComplete",[w,f]),--st.active||st.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var r,i,o,a,s,u,c,l,f=st.ajaxSetup({},e),d=f.context||f,h=f.context&&(d.nodeType||d.jquery)?st(d):st.event,p=st.Deferred(),v=st.Callbacks("once memory"),m=f.statusCode||{},g={},y={},b=0,_="canceled",w={readyState:0,getResponseHeader:function(t){var e;if(2===b){if(!l)for(l={};e=Be.exec(a);)l[e[1].toLowerCase()]=e[2];e=l[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return b||(t=y[n]=y[n]||t,g[t]=e),this},overrideMimeType:function(t){return b||(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(b<2)for(e in t)m[e]=[m[e],t[e]];else w.always(t[w.status]);return this},abort:function(t){var e=t||_;return c&&c.abort(e),n(0,e),this}};if(p.promise(w).complete=v.add,w.success=w.done,w.error=w.fail,f.url=((t||f.url||Re)+"").replace(Le,"").replace(qe,Me[1]+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=st.trim(f.dataType||"*").toLowerCase().match(wt)||[""],null==f.crossDomain&&(r=We.exec(f.url.toLowerCase()),f.crossDomain=!(!r||r[1]===Me[1]&&r[2]===Me[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(Me[3]||("http:"===Me[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=st.param(f.data,f.traditional)),U(Ue,f,e,w),2===b)return w;u=f.global,u&&0==st.active++&&st.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!He.test(f.type),o=f.url,f.hasContent||(f.data&&(o=f.url+=(De.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(f.url=Ie.test(o)?o.replace(Ie,"$1_="+Ne++):o+(De.test(o)?"&":"?")+"_="+Ne++)),f.ifModified&&(st.lastModified[o]&&w.setRequestHeader("If-Modified-Since",st.lastModified[o]),st.etag[o]&&w.setRequestHeader("If-None-Match",st.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&w.setRequestHeader("Content-Type",f.contentType),w.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Qe+"; q=0.01":""):f.accepts["*"]);for(i in f.headers)w.setRequestHeader(i,f.headers[i]);if(f.beforeSend&&(!1===f.beforeSend.call(d,w,f)||2===b))return w.abort();_="abort";for(i in{success:1,error:1,complete:1})w[i](f[i]);if(c=U(Ve,f,e,w)){w.readyState=1,u&&h.trigger("ajaxSend",[w,f]),f.async&&f.timeout>0&&(s=setTimeout(function(){w.abort("timeout")},f.timeout));try{b=1,c.send(g,n)}catch(t){if(!(b<2))throw t;n(-1,t)}}else n(-1,"No Transport");return w},getJSON:function(t,e,n){return st.get(t,e,n,"json")},getScript:function(t,e){return st.get(t,void 0,e,"script")}}),st.each(["get","post"],function(t,e){st[e]=function(t,n,r,i){return st.isFunction(n)&&(i=i||r,r=n,n=void 0),st.ajax({url:t,type:e,dataType:i,data:n,success:r})}}),st.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){st.fn[e]=function(t){return this.on(e,t)}}),st._evalUrl=function(t){return st.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},st.fn.extend({wrapAll:function(t){if(st.isFunction(t))return this.each(function(e){st(this).wrapAll(t.call(this,e))});if(this[0]){var e=st(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(t){return st.isFunction(t)?this.each(function(e){st(this).wrapInner(t.call(this,e))}):this.each(function(){var e=st(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=st.isFunction(t);return this.each(function(n){st(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){st.nodeName(this,"body")||st(this).replaceWith(this.childNodes)}).end()}}),st.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0||!at.reliableHiddenOffsets()&&"none"===(t.style&&t.style.display||st.css(t,"display"))},st.expr.filters.visible=function(t){return!st.expr.filters.hidden(t)};var $e=/%20/g,Ke=/\[\]$/,Ge=/\r?\n/g,Xe=/^(?:submit|button|image|reset|file)$/i,Ye=/^(?:input|select|textarea|keygen)/i;st.param=function(t,e){var n,r=[],i=function(t,e){e=st.isFunction(e)?e():null==e?"":e,r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=st.ajaxSettings&&st.ajaxSettings.traditional),st.isArray(t)||t.jquery&&!st.isPlainObject(t))st.each(t,function(){i(this.name,this.value)});else for(n in t)K(n,t[n],e,i);return r.join("&").replace($e,"+")},st.fn.extend({serialize:function(){return st.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=st.prop(this,"elements");return t?st.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!st(this).is(":disabled")&&Ye.test(this.nodeName)&&!Xe.test(t)&&(this.checked||!Nt.test(t))}).map(function(t,e){var n=st(this).val();return null==n?null:st.isArray(n)?st.map(n,function(t){return{name:e.name,value:t.replace(Ge,"\r\n")}}):{name:e.name,value:n.replace(Ge,"\r\n")}}).get()}}),st.ajaxSettings.xhr=void 0!==n.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&G()||X()}:G;var Ze=0,Je={},tn=st.ajaxSettings.xhr();n.ActiveXObject&&st(n).on("unload",function(){for(var t in Je)Je[t](void 0,!0)}),at.cors=!!tn&&"withCredentials"in tn,tn=at.ajax=!!tn,tn&&st.ajaxTransport(function(t){if(!t.crossDomain||at.cors){var e;return{send:function(n,r){var i,o=t.xhr(),a=++Ze;if(o.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(i in t.xhrFields)o[i]=t.xhrFields[i];t.mimeType&&o.overrideMimeType&&o.overrideMimeType(t.mimeType),t.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)void 0!==n[i]&&o.setRequestHeader(i,n[i]+"");o.send(t.hasContent&&t.data||null),e=function(n,i){var s,u,c;if(e&&(i||4===o.readyState))if(delete Je[a],e=void 0,o.onreadystatechange=st.noop,i)4!==o.readyState&&o.abort();else{c={},s=o.status,"string"==typeof o.responseText&&(c.text=o.responseText);try{u=o.statusText}catch(t){u=""}s||!t.isLocal||t.crossDomain?1223===s&&(s=204):s=c.text?200:404}c&&r(s,u,c,o.getAllResponseHeaders())},t.async?4===o.readyState?setTimeout(e):o.onreadystatechange=Je[a]=e:e()},abort:function(){e&&e(void 0,!0)}}}}),st.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return st.globalEval(t),t}}}),st.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),st.ajaxTransport("script",function(t){if(t.crossDomain){var e,n=gt.head||st("head")[0]||gt.documentElement;return{send:function(r,i){e=gt.createElement("script"),e.async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,n){(n||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,n||i(200,"success"))},n.insertBefore(e,n.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}});var en=[],nn=/(=)\?(?=&|$)|\?\?/;st.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=en.pop()||st.expando+"_"+Ne++;return this[t]=!0,t}}),st.ajaxPrefilter("json jsonp",function(t,e,r){var i,o,a,s=!1!==t.jsonp&&(nn.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&nn.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=st.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(nn,"$1"+i):!1!==t.jsonp&&(t.url+=(De.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||st.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=n[i],n[i]=function(){a=arguments},r.always(function(){n[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,en.push(i)),a&&st.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),st.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||gt;var r=pt.exec(t),i=!n&&[];return r?[e.createElement(r[1])]:(r=st.buildFragment([t],e,i),i&&i.length&&st(i).remove(),st.merge([],r.childNodes))};var rn=st.fn.load;st.fn.load=function(t,e,n){if("string"!=typeof t&&rn)return rn.apply(this,arguments);var r,i,o,a=this,s=t.indexOf(" ");return s>=0&&(r=st.trim(t.slice(s,t.length)),t=t.slice(0,s)),st.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),a.length>0&&st.ajax({url:t,type:o,dataType:"html",data:e}).done(function(t){i=arguments,a.html(r?st("
").append(st.parseHTML(t)).find(r):t)}).complete(n&&function(t,e){a.each(n,i||[t.responseText,e,t])}),this},st.expr.filters.animated=function(t){return st.grep(st.timers,function(e){return t===e.elem}).length};var on=n.document.documentElement;st.offset={setOffset:function(t,e,n){var r,i,o,a,s,u,c,l=st.css(t,"position"),f=st(t),d={};"static"===l&&(t.style.position="relative"),s=f.offset(),o=st.css(t,"top"),u=st.css(t,"left"),c=("absolute"===l||"fixed"===l)&&st.inArray("auto",[o,u])>-1,c?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),st.isFunction(e)&&(e=e.call(t,n,s)),null!=e.top&&(d.top=e.top-s.top+a),null!=e.left&&(d.left=e.left-s.left+i),"using"in e?e.using.call(t,d):f.css(d)}},st.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){st.offset.setOffset(this,t,e)});var e,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return e=o.documentElement,st.contains(e,i)?(typeof i.getBoundingClientRect!==xt&&(r=i.getBoundingClientRect()),n=Y(o),{top:r.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:r.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):r},position:function(){if(this[0]){var t,e,n={top:0,left:0},r=this[0];return"fixed"===st.css(r,"position")?e=r.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),st.nodeName(t[0],"html")||(n=t.offset()),n.top+=st.css(t[0],"borderTopWidth",!0),n.left+=st.css(t[0],"borderLeftWidth",!0)),{top:e.top-n.top-st.css(r,"marginTop",!0),left:e.left-n.left-st.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||on;t&&!st.nodeName(t,"html")&&"static"===st.css(t,"position");)t=t.offsetParent;return t||on})}}),st.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n=/Y/.test(e);st.fn[t]=function(r){return Pt(this,function(t,r,i){var o=Y(t);if(void 0===i)return o?e in o?o[e]:o.document.documentElement[r]:t[r];o?o.scrollTo(n?st(o).scrollLeft():i,n?i:st(o).scrollTop()):t[r]=i},t,r,arguments.length,null)}}),st.each(["top","left"],function(t,e){st.cssHooks[e]=A(at.pixelPosition,function(t,n){if(n)return n=re(t,e),oe.test(n)?st(t).position()[e]+"px":n})}),st.each({Height:"height",Width:"width"},function(t,e){st.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,r){st.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===i?"margin":"border");return Pt(this,function(e,n,r){var i;return st.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(i=e.documentElement,Math.max(e.body["scroll"+t],i["scroll"+t],e.body["offset"+t],i["offset"+t],i["client"+t])):void 0===r?st.css(e,n,a):st.style(e,n,r,a)},e,o?r:void 0,o,null)}})}),st.fn.size=function(){return this.length},st.fn.andSelf=st.fn.addBack,r=[],void 0!==(i=function(){return st}.apply(e,r))&&(t.exports=i);var an=n.jQuery,sn=n.$;return st.noConflict=function(t){return n.$===st&&(n.$=sn),t&&n.jQuery===st&&(n.jQuery=an),st},typeof o===xt&&(n.jQuery=n.$=st),st})},,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){(0,m.default)(function(){return c(t)})}function o(t){var e=d(t);return e.set(null),scrivito.ObjReplication.get(t).notifyBackendState(null),e}function a(t){var e=t._id;d(e).isAvailable()||s(e,t),scrivito.ObjReplication.get(e).notifyBackendState(t)}function s(t,e){d(t).set(e)}function u(t,e){d(t).setError(e)}function c(t){var e=d(t);if(void 0!==e.current)return e}function l(){f().clear()}function f(){return g.cmsState.subState("objData")}function d(t){return new p.default(t,f().subState(t))}Object.defineProperty(e,"__esModule",{value:!0}),e.preload=i,e.createObjData=o,e.store=a,e.set=s,e.setError=u,e.get=c,e.clearCache=l;var h=n(162),p=r(h),v=n(13),m=r(v),g=n(4)},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function o(t){if(f===clearTimeout)return clearTimeout(t);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){v&&h&&(v=!1,h.length?p=h.concat(p):m=-1,p.length&&s())}function s(){if(!v){var t=i(a);v=!0;for(var e=p.length;e;){for(h=p,p=[];++m1)for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{};a(this,t),this._query=e.query||[],this._batchSize=e.batchSize,this._offset=e.offset,this._sortBy=e.sortBy,this._sortDirection=e.sortDirection,this._includeDeleted=e.includeDeleted}return m(t,[{key:"and",value:function(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(e instanceof t)this._query=[].concat(o(this._query),o(e._query));else{var a=s(e,n,r);i&&(u(n),a.boost=p(i)),this._query.push(a)}return this}},{key:"andNot",value:function(t,e,n){var r=s(t,e,n);return c(e),r.negate=!0,this._query.push(r),this}},{key:"offset",value:function(t){return this._offset=t,this}},{key:"order",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";return this._sortBy=v(t),this._sortDirection=e,this}},{key:"batchSize",value:function(t){return this._batchSize=t,this}},{key:"includeDeleted",value:function(){return this._includeDeleted=!0,this}},{key:"iterator",value:function(){var t=C.get(this.params(),this.getBatchSize()).iterator();return{next:function(){var e=t.next(),n=e.done,r=e.value;return n?{done:n}:{done:n,value:new y.default(r)}}}}},{key:"getBatchSize",value:function(){return this._batchSize||100}},{key:"facet",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new E.default(v(t),e,this._query).result()}},{key:"store",value:function(t){C.store(this.params(),t)}},{key:"params",value:function(){return(0,x.omit)({query:this._query,offset:this._offset,sortBy:this._sortBy,sortDirection:this._sortDirection,includeDeleted:this._includeDeleted,batchSize:this._batchSize},x.isUndefined)}}]),t}();e.default=P},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n"}},function(t,e,n){var r=n(7),i=n(16);t.exports=function(t,e){r(!(t instanceof e),function(){return"Cannot use the new operator to instantiate the type "+i(e)})}},function(t,e,n){"use strict";function r(t,e){l[t]=e}function i(t){return l[t]||null}function o(t,e){r(u(t),e)}function a(t){return i(u(t))}function s(){l={}}function u(t){return"_scrivitoAppClass-"+(0,c.getWindowRegistry)().objClassNameFor(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.reset=e.registerForId=e.registerForAppClass=e.getById=e.getByAppClass=void 0;var c=n(58),l={};e.getByAppClass=a,e.getById=i,e.registerForAppClass=o,e.registerForId=r,e.reset=s},function(t,e,n){"use strict";function r(){return!!scrivito.uiAdapter&&scrivito.uiAdapter.isEditingMode()}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e){t.exports=ReactDOM},,function(t,e,n){"use strict";function r(t,e){if(!t)return e;if(!e)return null;var n={};return o(t,e,function(r,i,o){"_widget_pool"===r?n._widget_pool=s(i,o):e.hasOwnProperty(r)?o&&(n[r]=o):n[r]=t[r]}),n}function i(t,e){if(!t)return e;if(!e)return null;var n={};return o(t,e,function(t,e,r){if("_widget_pool"===t){var i=c(e,r);d.default.isEmpty(i)||(n._widget_pool=i)}else{var o=u(e,r,function(){if(!d.default.isEqual(e,r))return r});void 0!==o&&(n[t]=o)}}),n}function o(t,e,n){d.default.union(d.default.keys(t),d.default.keys(e)).forEach(function(r){return n(r,a(t[r]),a(e[r]))})}function a(t){if(d.default.isArray(t)){var e=l(t,2),n=e[0],r=e[1];return"binary"===n&&r?[n,d.default.omit(r,"url")]:t}return t}function s(t,e){if(!e||d.default.isEmpty(e))return t;var n={};return o(t||{},e||{},function(t,i,o){e.hasOwnProperty(t)?o&&!i?n[t]=o:o&&(n[t]=r(i,o)):n[t]=i}),n}function u(t,e,n){return!t&&e?e:t&&!e?null:t&&e?n():void 0}function c(t,e){if(t===e)return{};var n={};return o(t,e,function(t,e,r){var o=u(e,r,function(){var t=i(e,r);if(!d.default.isEmpty(t))return t});void 0!==o&&(n[t]=o)}),n}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.apply=r,e.diff=i;var f=n(0),d=function(t){return t&&t.__esModule?t:{default:t}}(f)},,function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){var e=t._obj_class,n=N.default.find(e),r=g.default.generateId();if(!n)return scrivito.Promise.reject(new j.ArgumentError('Please provide a valid CMS object class as the "_obj_class" property.'));var i=s(t),o=v(i,2),u=o[0],c=o[1],f=a(n,u),d=l(r,c);return scrivito.Promise.all([f,d]).then(function(t){var e=v(t,2),n=e[0],i=e[1];return g.default.createWithSerializedAttributes(x.default.extend(n,i,{_id:r}))}).then(function(t){return t.finishSaving().then(function(){return t})})}function o(t){return F.default.find(t).fetchDefaults().then(function(t){return w.default.newWithSerializedAttributes(t)})}function a(t,e){return t.usesServerCallbacks()?t.fetchDefaults(u(e),p()):scrivito.Promise.resolve(e)}function s(t){var e={},n={};return x.default.each(t,function(t,r){c(t)?n[r]=t:e[r]=t}),[e,n]}function u(t){return x.default.mapObject(t,function(t){return x.default.isDate(t)?moment.utc(t).toISOString():t})}function c(t){return b.isFile(t)||t instanceof A.default||t instanceof k.default}function l(t,e){var n=x.default.map(e,function(e,n){return b.isFile(e)?f(t,n,e):e instanceof k.default?d(t,n,e):e instanceof A.default?h(t,n,e):void 0});return scrivito.Promise.all(n).then(x.default.object)}function f(t,e,n){return h(t,e,S.default.upload(n))}function d(t,e,n){return h(t,e,n.copy())}function h(t,e,n){return n.into(t).then(function(t){return[e,["binary",{id:t.id()}]]})}function p(){if(scrivito.applicationDocument().hasCurrentPage())return{current_page_id:scrivito.applicationDocument().pageId()}}Object.defineProperty(e,"__esModule",{value:!0});var v=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.createObjFromLegacyAttributes=i,e.newWidget=o;var m=n(3),g=r(m),y=n(72),b=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(y),_=n(14),w=r(_),C=n(123),k=r(C),E=n(0),x=r(E),j=n(1),O=n(30),S=r(O),T=n(47),A=r(T),P=n(26),N=r(P),D=n(31),F=r(D)},function(t,e,n){"use strict";function r(t){return!!t&&a.default.isNumber(t.size)&&a.default.isString(t.type)}function i(t){return r(t)&&a.default.isString(t.name)}Object.defineProperty(e,"__esModule",{value:!0}),e.isBlob=r,e.isFile=i;var o=n(0),a=function(t){return t&&t.__esModule?t:{default:t}}(o)},function(t,e,n){"use strict";function r(t,e){for(var n=t.iterator(),r=[];r.length!==e;){var i=n.next();if(i.done)return r;r.push(i.value)}return r}function i(t){return t.iterator().next().value||null}Object.defineProperty(e,"__esModule",{value:!0}),e.arrayFromIterable=r,e.firstValueFromIterable=i},function(t,e,n){"use strict";function r(t,e){var n=t,r=void 0,a=void 0;(0,o.isFunction)(t)||(n=function(){return t},i(t)),e&&(r=e.params||{},a=e.hash,r=(0,o.extend)((0,o.omit)(e,"hash","params"),r));var s=function(){return{obj:scrivito.unwrapAppClassValues(n()),queryParameters:r,hash:a}},c=function(t){var e=t.obj,n=t.queryParameters,r=t.hash;e&&((0,l.default)(),scrivito.BrowserLocation.pushWith({obj:e,queryParameters:n,hash:r}))};(0,u.setCurrentPage)(s,c)}function i(t){if(!(0,o.isNull)(t)&&!(t instanceof(0,s.getWindowContext)().Obj||t instanceof(0,s.getWindowContext)().Link)){if(!t)throw new a.ArgumentError("Missing target.");throw new a.ArgumentError("Target is invalid. Valid targets are instances of Obj or Link.")}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=n(1),s=n(37),u=n(54),c=n(264),l=function(t){return t&&t.__esModule?t:{default:t}}(c);e.default=r},function(t,e){t.exports=function(t){return"string"==typeof t}},function(t,e){t.exports=function(t){return!0===t||!1===t}},function(t,e,n){var r=n(22),i=n(18);t.exports=r("Function",i)},,,,,,function(t,e,n){(function(t,r){var i;!function(o){function a(t){throw new RangeError(N[t])}function s(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function u(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(P,"."),r+s(t.split("."),e).join(".")}function c(t){for(var e,n,r=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(t-=65536,e+=M(t>>>10&1023|55296),t=56320|1023&t),e+=M(t)}).join("")}function f(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:w}function d(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function h(t,e,n){var r=0;for(t=n?F(t/x):t>>1,t+=F(t/e);t>D*k>>1;r+=w)t=F(t/D);return F(r+(D+1)*t/(t+E))}function p(t){var e,n,r,i,o,s,u,c,d,p,v=[],m=t.length,g=0,y=O,b=j;for(n=t.lastIndexOf(S),n<0&&(n=0),r=0;r=128&&a("not-basic"),v.push(t.charCodeAt(r));for(i=n>0?n+1:0;i=m&&a("invalid-input"),c=f(t.charCodeAt(i++)),(c>=w||c>F((_-g)/s))&&a("overflow"),g+=c*s,d=u<=b?C:u>=b+k?k:u-b,!(cF(_/p)&&a("overflow"),s*=p;e=v.length+1,b=h(g-o,e,0==o),F(g/e)>_-y&&a("overflow"),y+=F(g/e),g%=e,v.splice(g++,0,y)}return l(v)}function v(t){var e,n,r,i,o,s,u,l,f,p,v,m,g,y,b,E=[];for(t=c(t),m=t.length,e=O,n=0,o=j,s=0;s=e&&vF((_-n)/g)&&a("overflow"),n+=(u-e)*g,e=u,s=0;s_&&a("overflow"),v==e){for(l=n,f=w;p=f<=o?C:f>=o+k?k:f-o,!(l= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=w-C,F=Math.floor,M=String.fromCharCode;b={version:"1.3.2",ucs2:{decode:c,encode:l},decode:p,encode:v,toASCII:g,toUnicode:m},void 0!==(i=function(){return b}.call(e,n,e,t))&&(t.exports=i)}()}).call(e,n(70)(t),n(44))},function(t,e,n){var r,i;/*! * URI.js - Mutating URLs * IPv6 Support * * Version: 1.18.7 * * Author: Rodney Rehm * Web: http://medialize.github.io/URI.js/ * * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * */ !function(o,a){"use strict";"object"==typeof t&&t.exports?t.exports=a():(r=a,void 0!==(i="function"==typeof r?r.call(e,n,e,t):r)&&(t.exports=i))}(0,function(t){"use strict";function e(t){var e=t.toLowerCase(),n=e.split(":"),r=n.length,i=8;""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[r-1]&&""===n[r-2]&&n.pop(),r=n.length,-1!==n[r-1].indexOf(".")&&(i=7);var o;for(o=0;o1);u++)a.splice(0,1);n[s]=a.join("")}var c=-1,l=0,f=0,d=-1,h=!1;for(s=0;sl&&(c=d,l=f)):"0"===n[s]&&(h=!0,d=s,f=1);f>l&&(c=d,l=f),l>1&&n.splice(c,l,""),r=n.length;var p="";for(""===n[0]&&(p=":"),s=0;s=t.length-1)return!1;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return!1;var i=n.list[t.slice(e+1)];return!!i&&i.indexOf(" "+t.slice(r+1,e)+" ")>=0},is:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;if(t.lastIndexOf(".",e-1)>=0)return!1;var r=n.list[t.slice(e+1)];return!!r&&r.indexOf(" "+t.slice(0,e)+" ")>=0},get:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return null;var i=n.list[t.slice(e+1)];return i?i.indexOf(" "+t.slice(r+1,e)+" ")<0?null:t.slice(r+1):null},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return n})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){var e={};return q.default.each(t,function(t,n){var r=A(t,2),i=r[0],c=r[1],l=o(n);if(z.default.isSystemAttribute(l))e[l]=i;else{var f=A(c,2),d=f[0],h=f[1];e[l]=[a(d,n),u(s(d,h,i,n))]}}),e}function o(t){if(!(0,Q.isCamelCase)(t))throw new W.ArgumentError("Attribute names have to be in camel case.");return(0,Q.underscore)(t)}function a(t,e){switch(t){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 t;default:throw new W.ArgumentError('Attribute "'+e+'" is of unsupported type "'+t+'".')}}function s(t,e,n,r){if(null===n)return n;switch(t){case"binary":return l(n,r);case"date":return f(n,r);case"enum":return d(e,n,r);case"float":return h(n,r);case"html":return p(n,r);case"integer":return v(n,r);case"link":return m(n,r);case"linklist":return g(n,r);case"multienum":return _(e,n,r);case"reference":return w(n,r);case"referencelist":return C(n,r);case"string":return j(n,r);case"stringlist":return O(n,r);case"widgetlist":return T(n,r);default:throw new W.InternalError('serializeAttributeValue is not implemented for "'+t+'".')}}function u(t){return(q.default.isString(t)||q.default.isArray(t))&&q.default.isEmpty(t)?null:t}function c(t,e,n){throw new W.ArgumentError("Unexpected value "+(0,V.default)(t)+' for attribute "'+e+'". Expected: '+n)}function l(t,e){if(t instanceof K.default)return{id:t.id()};c(t,e,"A Binary.")}function f(t,e){return q.default.isDate(t)?F.formatDateToString(t):F.isValidDateString(t)?t:void c(t,e,"A Date.")}function d(t,e,n){var r=t.values;if(q.default.contains(r,e))return e;c(e,n,'Valid attribute values are contained in its "values" array ['+r+"].")}function h(t,e){if(F.isValidFloat(t))return t;var n=t;q.default.isNumber(t)&&(n=String(t)),c(n,e,"A Number, that is #isFinite().")}function p(t,e){if(q.default.isString(t))return t;c(t,e,"A String.")}function v(t,e){if(F.isValidInteger(t))return t;c(t,e,"A Number, that is #isSafeInteger().")}function m(t,e){if(y(t))return b(t);c(t,e,"A Link instance.")}function g(t,e){if(q.default.isArray(t)&&q.default.every(t,y))return q.default.map(t,b);c(t,e,"An array of Link instances.")}function y(t){if(t instanceof I.default)return!0;if(!q.default.isObject(t))return!1;var e=q.default.without(q.default.keys(t),"hash","obj_id","query","target","title","url");return q.default.isEmpty(e)}function b(t){var e={fragment:"function"==typeof t.hash?t.hash():t.hash,query:"function"==typeof t.query?t.query():t.query,target:"function"==typeof t.target?t.target():t.target,title:"function"==typeof t.title?t.title():t.title,url:"function"==typeof t.url?t.url():t.url};return e.obj_id="function"==typeof t.objId?t.objId():t.obj_id,q.default.mapObject(e,function(t){return t||null})}function _(t,e,n){var r=t.values,i="An array with values from "+(0,V.default)(r)+".";q.default.isArray(e)&&q.default.every(e,q.default.isString)||c(e,n,i);var o=q.default.difference(e,r);if(o.length){c(e,n,i+" Forbidden values: "+(0,V.default)(o)+".")}return e}function w(t,e){if(E(t))return k(t);c(t,e,"A BasicObj or a String ID.")}function C(t,e){if(x(t))return q.default.map(t,k);c(t,e,"An array with BasicObjs or String IDs.")}function k(t){return t instanceof N.default?t.id():t}function E(t){return q.default.isString(t)||t instanceof N.default}function x(t){return q.default.isArray(t)&&q.default.every(t,function(t){return E(t)})}function j(t,e){if(S(t))return t.toString();c(t,e,"A String.")}function O(t,e){if(q.default.isArray(t)&&q.default.every(t,function(t){return S(t)}))return q.default.invoke(t,"toString");c(t,e,"An array of strings.")}function S(t){return q.default.isString(t)||q.default.isNumber(t)}function T(t,e){if(q.default.isArray(t)&&q.default.every(t,function(t){return t instanceof R.default}))return q.default.invoke(t,"id");c(t,e,"An array of BasicWidget instances.")}Object.defineProperty(e,"__esModule",{value:!0});var A=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.serialize=i;var P=n(3),N=r(P),D=n(34),F=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(D),M=n(14),R=r(M),L=n(24),I=r(L),B=n(32),z=r(B),H=n(0),q=r(H),W=n(1),U=n(21),V=r(U),Q=n(15),$=n(30),K=r($)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return p.cmsState.subState("metadataCollection").subState(t)}function o(t){return(0,f.mapObject)(t.meta_data,function(t){var e=s(t,2),n=e[0],r=e[1];switch(n){case"date":return l.deserializeAsDate(r);case"number":return l.deserializeAsInteger(r);default:return r}})}function a(t){if(!(0,v.isCamelCase)(t))throw new m.ArgumentError('Metadata key "'+t+'" is not in camel case.')}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=n.batchSize;i(this,t),this._mget=e,this._batchSize=r||100,this._deferreds={}}return o(t,[{key:"retrieve",value:function(t){var e=this;if(c.default.isEmpty(this._deferreds)&&scrivito.nextTick(function(){return e._performRetrieval()}),!this._deferreds[t]){var n=new s.default;this._deferreds[t]=n}return this._deferreds[t].promise}},{key:"_performRetrieval",value:function(){var t=this,e=c.default.keys(this._deferreds).slice(0,this._batchSize);if(0!==e.length){var n={};c.default.each(e,function(e){n[e]=t._deferreds[e],delete t._deferreds[e]}),this._mget(e).then(function(r){c.default.each(e,function(e,i){var o=n[e],a=r[i];i":">"}},{key:"id",value:function(){var t=this._dataForId(),e=t.name,n=t.objId,r=t.widgetId,i=e+"|"+n;return r&&(i+="|"+r),i}},{key:"_assertValidTypes",value:function(t,e){(0,u.include)(t,this.type())||$.error(e)}},{key:"_dataForId",value:function(){var t={name:this.name()},e=this.container();return e instanceof s.default?t.objId=e.id():(t.objId=e.obj().id(),t.widgetId=e.id()),t}},{key:"_sortValuesByLocalization",value:function(t){var e=this;return t?this.typeOptions().valuesLocalization?(0,u.sortBy)(t,function(n){var r=(0,u.findIndex)(e.typeOptions().valuesLocalization,{value:n});return-1===r?t.length:r}):t:[]}}]),t}();e.default=c},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return new a.default({idToCopy:this._id,filename:t.filename,contentType:t.content_type})}}]),t}();e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){var e=d[t.id()];return e||u.default.pluck(l.default.all(),"name")}function o(){scrivito.editingContext.isViewMode()||scrivito.on("content",function(t){var e=scrivito.WidgetlistFieldElement.all($(t));u.default.each(e,function(t){var e=t.basicField();d[e.id()]=JSON.parse(t.dom_element().attr(f))})})}function a(){d={}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var s=n(0),u=r(s),c=n(31),l=r(c),f="data-scrivito-private-field-widget-allowed-classes",d={};i.init=o,i.clearCache=a},function(t,e,n){t.exports=n(161)},,,,,,,,,,,,function(t,e,n){"use strict";function r(){if(window.parent!==window){var t=window.parent.connectAppDocument;return t?t(window.document):void 0}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e,n){"use strict";n(139),n(140),n(141),n(145),n(146),n(149),n(150),n(151),n(154),n(155),n(176),n(177),n(178),n(179),n(3),n(180),n(181),n(182),n(186),n(187),n(188),n(189)},function(t,e,n){"use strict";window.scrivito||(window.scrivito={}),window.scrivito.client={}},function(t,e,n){"use strict";var r=n(0),i=function(t){return t&&t.__esModule?t:{default:t}}(r);!function(){function t(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=i.default.contains(["PUT","POST","DELETE"],t),o=n&&n.skip_write_monitor;r&&(n.timeout=15e3,o||scrivito.WriteMonitor.startWrite());var s=a(t,e,n);return r&&!o&&scrivito.WriteMonitor.endWriteWhenDone(s),s}function e(t,e,r){return scrivito.ajax(t,e,r).catch(function(t){throw n(t),t})}function n(t){var e=void 0,n=void 0;i.default.isObject(t)?(e=scrivito.t("ajax_error",t.message),n=t.message_for_editor):e=i.default.contains(["abort","parsererror","timeout"],t)?scrivito.t("ajax_error.communication"):scrivito.t("ajax_error",t),scrivito.isDevelopmentMode?scrivito.AlertDialog.open(e):(scrivito.logError(e),scrivito.ErrorDialog.open(n||scrivito.t("ajax_error.message_for_editor"),[t.timestamp,e]))}function r(){s=!0}function o(){s=!1}function a(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(s)return scrivito.Promise.reject("scrivito.ajax is disabled due to scrivito.disableAjax()!");var r=window.location.protocol+"//"+window.location.host+"/__scrivito/";n.data&&(n.data=JSON.stringify(n.data));var o=$.ajax(r+e,i.default.extend({type:t,dataType:"json",contentType:"application/json; charset=utf-8",cache:!1},n));return new scrivito.Promise(function(t,e){o.then(t),o.fail(function(t,n,r){try{return e(JSON.parse(t.responseText))}catch(t){return e(r)}})})}var s=!1;scrivito.ajax=t,scrivito.ajaxWithErrorDialog=e,scrivito.displayAjaxError=n,scrivito.disableAjax=r,scrivito.enableAjax=o}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(0),o=r(i),a=n(1),s=n(13),u=r(s);!function(){function t(t,n){return e(t.prototype,n)}function e(t,e){o.default.each(e,function(e,r){t[e]=n(r)})}function n(t){return function(){for(var e=this,n=arguments.length,r=Array(n),i=0;i2&&void 0!==arguments[2]?arguments[2]:{}}}function b(t){var e=t.method,n=t.path,r=t.requestParams,i=t.timeout,o=t.authorization,a=(0,c.default)(C+"/tenants/"+k+"/perform").scheme("https").toString(),s=y(e,n,r);return scrivito.fetch(e,a,{params:s,timeout:i,authorization:o,forceVerification:j})}function _(t){switch(t.status){case"success":return t.result;case"error":throw d.ClientError.for(t.message,412,t.code);case"open":return scrivito.wait(2).then(function(){return n("GET","tasks/"+t.id).then(function(t){return _(t)})});default:throw new d.ScrivitoError("Invalid task response (unknown status)")}}var w=15e3,C=void 0,k=void 0,E=void 0,x=void 0,j=void 0;scrivito.CmsRestApi={init:function(t,e,n){e&&(C=t,k=e,E&&E.resolve()),x=n||x||m.default},reset:function(){C=void 0,k=void 0,E=void 0,x=void 0,j=void 0},get:function(t,n){return e("GET",t,n)},put:function(t,n){return e("PUT",t,n)},post:function(t,n){return e("POST",t,n)},delete:function(t,n){return e("DELETE",t,n)},requestBuiltInUserSession:function(e){return t().then(function(){var t="sessions/"+e,n=a("PUT",function(e){return r(b({method:"PUT",path:t,timeout:e}))});return n.then(p.default.reset),n})},enableForceVerification:function(){j=!0},currentPublicAuthorizationState:function(){return x?x.currentState?"[API] "+x.currentState():"[API]: authorization provider without currentState()":"[API]: no authorization provider"},get endpoint(){return C},get tenant(){return k}};var O=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w;i(this,t),this.timesOutAt=Date.now()+e}return o(t,[{key:"timedOut",value:function(){return this.remainingTime()<5}},{key:"remainingTime",value:function(){return Math.max(this.timesOutAt-Date.now(),0)}},{key:"cover",value:function(t){return t<=this.timesOutAt-5}}]),t}()}()},function(t,e,n){"use strict";function r(t){return new scrivito.Promise(function(e){return e(t(s()))}).catch(function(e){if(!(e instanceof c.UnauthorizedError))throw e;if(e.backendCode!==d)throw e;return i(e.details.verificator,e.details.data).then(function(e){return t(e.authorization)})})}function i(t,e){return h&&h.isPending()||(h=f.default.fetch(t.id,t.url).then(function(t){return new scrivito.Promise(function(n){return t(e,n)})}),h.then(o),h.challenge={verificator:t,data:e}),h}function o(t){h=void 0,p=t}function a(){o()}function s(){if(p)return p.expiresAfter-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),i=this.extractLocation(n.pop()),o=n.join(" ")||void 0,a=r(["eval",""],i[0])>-1?void 0:i[0];return new t(o,void 0,a,i[1],i[2],e)},this)},parseFFOrSafari:function(r){return e(n(r.stack.split("\n"),function(t){return!t.match(a)},this),function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t(e);var n=e.split("@"),r=this.extractLocation(n.pop()),i=n.join("@")||void 0;return new t(i,void 0,r[0],r[1],r[2],e)},this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var n=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),i=[],o=2,a=r.length;o/,"$2").replace(/\([^\)]*\)/g,"")||void 0;o.match(/\(([^\)]*)\)/)&&(n=o.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var s=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new t(a,s,i[0],i[1],i[2],e)},this)}}})},function(t,e,n){var r,i,o;!function(n,a){"use strict";i=[],r=a,void 0!==(o="function"==typeof r?r.apply(e,i):r)&&(t.exports=o)}(0,function(){"use strict";function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t,e,n,r,i,o){void 0!==t&&this.setFunctionName(t),void 0!==e&&this.setArgs(e),void 0!==n&&this.setFileName(n),void 0!==r&&this.setLineNumber(r),void 0!==i&&this.setColumnNumber(i),void 0!==o&&this.setSource(o)}return e.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(t){this.functionName=String(t)},getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getFileName:function(){return this.fileName},setFileName:function(t){this.fileName=String(t)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(e){if(!t(e))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(e)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(e){if(!t(e))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(e)},getSource:function(){return this.source},setSource:function(t){this.source=String(t)},toString:function(){return(this.getFunctionName()||"{anonymous}")+"("+(this.getArgs()||[]).join(",")+")"+(this.getFileName()?"@"+this.getFileName():"")+(t(this.getLineNumber())?":"+this.getLineNumber():"")+(t(this.getColumnNumber())?":"+this.getColumnNumber():"")}},e})},function(t,e,n){"use strict";var r=n(10),i=function(t){return t&&t.__esModule?t:{default:t}}(r);!function(){function t(t,r,i,o,a){var s=new XMLHttpRequest;return s.open("POST"===t?"POST":"PUT",r),s.timeout=i,s.withCredentials=!0,s.onload=function(){return e(s,o,a)},s.onerror=function(t){return n(t,a)},s}function e(t,e,n){if(o-=1,t.status>=200&&t.status<300)try{return e(JSON.parse(t.responseText))}catch(n){if(n instanceof SyntaxError)return e(t.responseText);throw n}return n(t)}function n(t,e){o-=1,e(new Error("Network Error: "+t))}var r=!1,o=0;scrivito.isFetchingActive=function(){return o>0},scrivito.disableFetching=function(){r=!0},scrivito.fetch=function(e,n,a){var s=a.params,u=a.timeout,c=a.authorization,l=a.forceVerification;return r?(new i.default).promise:(o+=1,new scrivito.Promise(function(r,i){var o=t(e,n,u,r,i);c&&o.setRequestHeader("Authorization",c),l&&o.setRequestHeader("Scrivito-Force-Verification","true"),o.setRequestHeader("Content-type","application/json; charset=utf-8"),o.send(JSON.stringify(s))}))}}()},function(t,e,n){"use strict";var r=n(156),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=n(4);!function(){function t(t){var e=t.clientModulesForExport();r.forEach(function(t){scrivito[t]=e[t]})}function e(){var t={};return r.forEach(function(e){t[e]=scrivito[e]}),t}function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.ui,r=e.realmContext;r&&i.default.init(r),n&&t(n),(0,o.initializeGlobalState)(n)}var r=["BinaryRequest","CmsRestApi","ObjReplication"];scrivito.client.init=n,scrivito.client.modulesForExport=e}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}};if("string"!=typeof t)return"";if("string"==typeof e&&(b=e),l=P.en,f=A.en,"object"==typeof e){n=e.maintainCase||!1,j=e.custom&&"object"==typeof e.custom?e.custom:j,i=+e.truncate>1&&e.truncate||!1,o=e.uric||!1,a=e.uricNoSlash||!1,s=e.mark||!1,x=!1!==e.symbols&&!1!==e.lang,b=e.separator||b,o&&(y+=_.join("")),a&&(y+=w.join("")),s&&(y+=C.join("")),l=e.lang&&P[e.lang]&&x?P[e.lang]:x?P.en:{},f=e.lang&&A[e.lang]?A[e.lang]:!1===e.lang||!0===e.lang?{}:A.en,e.titleCase&&"number"==typeof e.titleCase.length&&Array.prototype.toString.call(e.titleCase)?(e.titleCase.forEach(function(t){j[t+""]=t+""}),r=!0):r=!!e.titleCase,e.custom&&"number"==typeof e.custom.length&&Array.prototype.toString.call(e.custom)&&e.custom.forEach(function(t){j[t+""]=t+""}),Object.keys(j).forEach(function(e){var n;n=e.length>1?new RegExp("\\b"+u(e)+"\\b","gi"):new RegExp(u(e),"gi"),t=t.replace(n,j[e])});for(p in j)y+=p}for(y+=b,y=u(y),t=t.replace(/(^\s+|\s+$)/g,""),m=!1,g=!1,h=0,v=t.length;h=0?(E+=p,p=""):!0===g?(p=T[E]+O[p],E=""):p=m&&O[p].match(/[A-Za-z0-9]/)?" "+O[p]:O[p],m=!1,g=!1):p in T?(E+=p,p="",h===v-1&&(p=T[E]),g=!0):!l[p]||o&&-1!==_.join("").indexOf(p)||a&&-1!==w.join("").indexOf(p)?(!0===g?(p=T[E]+p,E="",g=!1):m&&(/[A-Za-z0-9]/.test(p)||k.substr(-1).match(/A-Za-z0-9]/))&&(p=" "+p),m=!1):(p=m||k.substr(-1).match(/[A-Za-z0-9]/)?b+l[p]:l[p],p+=void 0!==t[h+1]&&t[h+1].match(/[A-Za-z0-9]/)?b:"",m=!0),k+=p.replace(new RegExp("[^\\w\\s"+y+"_-]","g"),b);return r&&(k=k.replace(/(\w)(\S*)/g,function(t,e,n){var r=e.toUpperCase()+(null!==n?n:"");return Object.keys(j).indexOf(r.toLowerCase())<0?r:r.toLowerCase()})),k=k.replace(/\s+/g,b).replace(new RegExp("\\"+b+"+","g"),b).replace(new RegExp("(^\\"+b+"+|\\"+b+"+$)","g"),""),i&&k.length>i&&(d=k.charAt(i)===b,k=k.slice(0,i),d||(k=k.slice(0,k.lastIndexOf(b)))),n||r||(k=k.toLowerCase()),k},s=function(t){return function(e){return a(e,t)}},u=function(t){return t.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},c=function(t,e){for(var n in e)if(e[n]===t)return!0};void 0!==t&&t.exports?(t.exports=a,t.exports.createSlug=s):(r=[],void 0!==(i=function(){return a}.apply(e,r))&&(t.exports=i))}()},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:void 0;o(this,t),this._params=e,this._batchSize=n,r?(this._index=r.index+1,this._continuation=r.continuationForNextBatch(),this._previousBatch=r):this._index=0}return l(t,null,[{key:"store",value:function(t,e){var n=s(c(t),0),r=u(void 0);new w.default({state:n,invalidation:r}).set({results:e})}},{key:"firstBatchFor",value:function(e,n){return new t(c(e),n)}}]),l(t,[{key:"objIds",value:function(){return this._response().results}},{key:"nextBatch",value:function(){if(this.continuationForNextBatch())return new t(this._params,this._batchSize,this)}},{key:"continuationForNextBatch",value:function(){return this._response().continuation}},{key:"_response",value:function(){return this._data().get()||C}},{key:"_data",value:function(){var t=this;return new w.default({state:s(this._params,this._index),loader:function(){return t._load()},invalidation:u(this._continuation)})}},{key:"_load",value:function(){var t=this;return this._fetchContinuation().then(function(e){var n={size:t._batchSize,continuation:e},r=(0,g.extend)({},t._params,n);return p.retrieve(r).then(function(t){return a(t.results),t})})}},{key:"_fetchContinuation",value:function(){var t=this;return this._previousBatch?(0,b.default)(function(){return t._previousBatch.continuationForNextBatch()}):scrivito.Promise.resolve()}},{key:"index",get:function(){return this._index}}]),t}();e.default=k},function(t,e,n){"use strict";function r(t){var e=scrivito.currentWorkspaceId(),n=o.default.extend({consistent:!0},t);return scrivito.CmsRestApi.get("workspaces/"+e+"/objs/search",n).then(function(t){return t.results=o.default.pluck(t.results,"id"),o.default.pick(t,"results","continuation")})}Object.defineProperty(e,"__esModule",{value:!0}),e.retrieve=r;var i=n(0),o=function(t){return t&&t.__esModule?t:{default:t}}(i)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return!!t.current._deleted}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:null,o=scrivito.unwrapAppClassValues(r);return c(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"and",this).call(this,t,e,o,i)}},{key:"andNot",value:function(t,e,r){var i=scrivito.unwrapAppClassValues(r);return c(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"andNot",this).call(this,t,e,i)}},{key:"facet",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=c(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"facet",this).call(this,e,r);return v.default.map(i,function(e){return new h.default(t,e)})}},{key:"take",value:function(t){return(0,m.arrayFromIterable)(this.batchSize(t),t)}}]),n}(f.default);if("function"==typeof window.Symbol){var n=window.Symbol.iterator;if(n){var r=e.prototype;r[n]=r.iterator}}return e}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:null;return e(t.objClassNameFor(this)).and(n,r,i,o)}},{key:"create",value:function(e){var r=d.default.forClass(this),i=t.objClassNameFor(this);if(!i)throw new h.ArgumentError("Creating CMS objects is not supported for the class Obj or abstract classes.");if(e.constructor!==Object)throw new h.ArgumentError("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(e._objClass)throw new h.ArgumentError('Invalid attribute "_objClass". "'+e._objClass+'.create" will automatically set the CMS object class correctly.');e._objClass=i;var o=scrivito.AttributeContentFactory.prepareAttributes(e,r,i);return n(l.default.create(o))}}]),c}(scrivito.AttributeContentFactory(r))}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:[],o=i.default.run(function(){return e.next()});if(!o.allDataLoaded)return{done:!1,objs:r};var a=o.result,s=a.value,u=a.done;return u||0===n?{done:u,objs:r}:t(e,n-1,r.concat([s]))}scrivito.loadAllUntil=t}()},function(t,e,n){"use strict";var r=n(5),i=function(t){return t&&t.__esModule?t:{default:t}}(r);!function(){function t(t,e){var n=i.default.run(e);return n.allDataLoaded?n.result:t}scrivito.loadableWithDefault=t,scrivito.loadWithDefault=t}()},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(1);!function(){var t=function(t){function e(t){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,"Data is not yet loaded.",t))}return o(e,t),e}(a.ScrivitoError);scrivito.NotLoadedError=t}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var n=0;n0)throw n[0]}},enableNextTickCapture:function(){e=!0},disableNextTickCapture:function(){e=!1}})}()},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=function(){function t(t,e){for(var n=0;n0?t:e}function r(t,e){return t?e?i(t._version,e._version):1:-1}function i(t,e){return t>e?1:e>t?-1:0}function s(t){p.default.each(h,function(e){e(t)})}var c={},f=void 0,h={},m=0,g=0;scrivito.ObjReplication=function(){function i(t){var e=this;o(this,i),this._id=t,this._replicationActive=!1,this._scheduledReplication=!1,this._currentRequestDeferred=null,this._nextRequestDeferred=null,this._performThrottledReplication=scrivito.throttle(function(){return e._performReplication()},1e3)}return a(i,null,[{key:"get",value:function(t){return c[t]||(c[t]=new scrivito.ObjReplication(t)),c[t]}},{key:"subscribeWrites",value:function(t){return m+=1,h[m]=t,m}},{key:"unsubscribeWrites",value:function(t){delete h[t]}},{key:"getWorkspaceVersion",value:function(){return g}}]),a(i,[{key:"notifyLocalState",value:function(t){if(!f){if(void 0===this._backendState)throw new v.InternalError("Can not set local state before backend state.");if(this._backendState&&this._backendState._deleted)throw new v.InternalError("Can not update a fully deleted obj.");this._localState=t,this._startReplication()}}},{key:"notifyBackendState",value:function(n){if(void 0===this._backendState)return this._updateBackendState(n),void this._updateLocalState(n);if(r(n,this._bufferedBackendState||this._backendState)>0)if(this._replicationActive)this._bufferedBackendState=n;else{if(n._deleted)this._updateLocalState(null);else{var i=t(this._backendState,n);this._updateLocalState(e(this.localState,i))}this._updateBackendState(n)}}},{key:"finishSaving",value:function(){var t=void 0;if(this._nextRequestDeferred)t=this._nextRequestDeferred.promise;else{if(!this._currentRequestDeferred)return scrivito.Promise.resolve();t=this._currentRequestDeferred.promise}return t.catch(function(){return scrivito.Promise.reject()})}},{key:"_startReplication",value:function(){var e=this;p.default.isEmpty(t(this._backendState,this._localState))?this._nextRequestDeferred&&(this._nextRequestDeferred.resolve(),this._nextRequestDeferred=null):this._replicationActive?this._nextRequestDeferred||(this._nextRequestDeferred=new u.default):this._scheduledReplication||(this._scheduledReplication=!0,this._initDeferredForRequest(),s(this._currentRequestDeferred.promise),scrivito.nextTick(function(){return e._performThrottledReplication()}))}},{key:"_performReplication",value:function(){var e=this,n=this._localState,r=t(this._backendState,this._localState);this._scheduledReplication=!1,this._replicationActive=!0,this._replicatePatchToBackend(r).then(function(t){e._handleBackendUpdate(n,t),e._currentRequestDeferred.resolve(e._id),e._currentRequestDeferred=null,e._replicationActive=!1,e._startReplication()},function(t){e._currentRequestDeferred.reject(t),e._currentRequestDeferred=null,e._replicationActive=!1})}},{key:"_replicatePatchToBackend",value:function(t){if("deleted"===t._modification)return this._deleteObj();if(p.default.isEmpty(t))return scrivito.Promise.resolve(this._backendState);var e=scrivito.currentWorkspaceId(),n="workspaces/"+e+"/objs/"+this._id;return scrivito.CmsRestApi.put(n,{obj:t})}},{key:"_deleteObj",value:function(){var t=scrivito.currentWorkspaceId(),e="workspaces/"+t+"/objs/"+this._id;return scrivito.CmsRestApi.delete(e,{include_deleted:!0})}},{key:"_initDeferredForRequest",value:function(){if(this._nextRequestDeferred){var t=this._nextRequestDeferred;this._nextRequestDeferred=null,this._currentRequestDeferred=t}else this._currentRequestDeferred=new u.default}},{key:"_handleBackendUpdate",value:function(r,i){var o=t(r,this._localState);this._updateBackendState(n(i,this._bufferedBackendState)),this._bufferedBackendState=void 0,this._updateLocalState(e(this._backendState,o))}},{key:"_updateLocalState",value:function(t){this._localState=t,d.set(this._id,this._localState)}},{key:"_updateBackendState",value:function(t){void 0!==this._backendState&&g++,this._backendState=t}},{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}}],[{key:"disableReplication",value:function(){f=!0}},{key:"enableReplication",value:function(){f=!1}},{key:"clearWriteCallbacks",value:function(){h={}}},{key:"clearCache",value:function(){c={}}}]),i}()}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(0),o=r(i),a=n(183),s=r(a);!function(){s.default.noConflict(),s.default.config({warnings:!1,longStackTraces:!1}),o.default.extend(scrivito,{Promise:s.default,promise:{enableDebugMode:function(){s.default.config({warnings:!0,longStackTraces:!0})},wrapInJqueryDeferred:function(t,e){var n=e;return t.then(function(t){return n.resolve(t)},function(t){n.reject(t)}),n},always:function(t,e){return t.then(e,e),t},capturePromises:function(){s.default.setScheduler(function(t){scrivito.nextTick(t)})}}})}()},function(t,e,n){(function(e,n,r){/* @preserve * The MIT License (MIT) * * Copyright (c) 2013-2015 Petka Antonov * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * */ !function(e){t.exports=e()}(function(){var t,i,o;return function t(e,n,r){function i(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof _dereq_&&_dereq_;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return i(n||t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a0;){var e=t.shift();if("function"==typeof e){var n=t.shift(),r=t.shift();e.call(n,r)}else e._settlePromises()}},i.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},i.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},i.prototype._reset=function(){this._isTickUsed=!1},n.exports=i,n.exports.firstLineError=u},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},s=function(t,e){0==(50397184&this._bitField)&&this._resolveCallback(e.target)},u=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var c=n(o),l=new t(e);l._propagateFrom(this,1);var f=this._target();if(l._setBoundTo(c),c instanceof t){var d={promiseRejectionQueued:!1,promise:l,target:f,bindingPromise:c};f._then(e,a,void 0,l,d),c._then(s,u,void 0,l,d),l._setOnCancel(c)}else l._resolveCallback(f);return l},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}e.exports=function(e){function n(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var i="Object "+s.classString(t)+" has no method '"+s.toString(n)+"'";throw new e.TypeError(i)}return r}function r(t){return n(t,this.pop()).apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}var a,s=t("./util"),u=s.canEvaluate;s.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=o;else if(u){var r=a(t);e=null!==r?r:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),a=o.tryCatch,s=o.errorObj,u=e._async;e.prototype.break=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),u.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n=0)return o[t]}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,u=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=u,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,n,r){"use strict";n.exports=function(n,r){function i(t,e){return{promise:e}}function o(){return!1}function a(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+B.toString(t));r._attachCancellationCallback(t)})}catch(t){return t}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?B.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function u(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function f(t,e){if(0!=(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function d(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof n?t.isFulfilled()?t.value():void 0:t}function p(){this._trace=new N(this._peekContext())}function v(t,e){if(z(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=E(t);B.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),B.notEnumerableProp(t,"__stackCleaned__",!0)}}}function m(t,e,n,r,i){if(void 0===t&&null!==e&&X){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&r._bitField))return;n&&(n+=" ");var o="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),u=C(s),c=u.length-1;c>=0;--c){var l=u[c];if(!q.test(l)){var f=l.match(W);f&&(o="at "+f[1]+":"+f[2]+":"+f[3]+" ");break}}if(u.length>0)for(var d=u[0],c=0;c0&&(a="\n"+s[c-1]);break}}var h="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;r._warn(h,!0,e)}}function g(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),y(n)}function y(t,e,r){if(at.warnings){var i,o=new I(t);if(e)r._attachExtraTrace(o);else if(at.longStackTraces&&(i=n._peekContext()))i.attachExtraTrace(o);else{var a=E(o);o.stack=a.message+"\n"+a.stack.join("\n")}et("warning",o)||x(o,"",!0)}}function b(t,e){for(var n=0;n=0;--s)if(r[s]===o){a=s;break}for(var s=a;s>=0;--s){var u=r[s];if(e[i]!==u)break;e.pop(),i--}e=r}}function C(t){for(var e=[],n=0;n0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function E(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?k(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:C(e)}}function x(t,e,n){if("undefined"!=typeof console){var r;if(B.isObject(t)){var i=t.stack;r=e+V(i,t)}else r=e+String(t);"function"==typeof M?M(r,n):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(r)}}function j(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(t){L.throwLater(t)}"unhandledRejection"===t?et(t,n,r)||i||x(n,"Unhandled rejection "):et(t,r)}function O(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():B.toString(t);if(/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+S(e)+">, no stack trace)"}function S(t){return t.length<41?t:t.substr(0,38)+"..."}function T(){return"function"==typeof ot}function A(t){var e=t.match(it);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function P(t,e){if(T()){for(var n,r,i=t.stack.split("\n"),o=e.stack.split("\n"),a=-1,s=-1,u=0;u=s||(rt=function(t){if(H.test(t))return!0;var e=A(t);return!!(e&&e.fileName===n&&a<=e.line&&e.line<=s)})}}function N(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);ot(this,N),e>32&&this.uncycle()}var D,F,M,R=n._getDomain,L=n._async,I=t("./errors").Warning,B=t("./util"),z=B.canAttachTrace,H=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,q=/\((?:timers\.js):\d+:\d+\)/,W=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,U=null,V=null,Q=!1,$=!(0==B.env("BLUEBIRD_DEBUG")),K=!(0==B.env("BLUEBIRD_WARNINGS")||!$&&!B.env("BLUEBIRD_WARNINGS")),G=!(0==B.env("BLUEBIRD_LONG_STACK_TRACES")||!$&&!B.env("BLUEBIRD_LONG_STACK_TRACES")),X=0!=B.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(K||!!B.env("BLUEBIRD_W_FORGOTTEN_RETURN"));n.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},n.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),L.invokeLater(this._notifyUnhandledRejection,this,void 0))},n.prototype._notifyUnhandledRejectionIsHandled=function(){j("rejectionHandled",D,void 0,this)},n.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},n.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},n.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),j("unhandledRejection",F,t,this)}},n.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},n.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},n.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},n.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},n.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},n.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},n.prototype._warn=function(t,e,n){return y(t,e,n||this)},n.onPossiblyUnhandledRejection=function(t){var e=R();F="function"==typeof t?null===e?t:B.domainBind(e,t):void 0},n.onUnhandledRejectionHandled=function(t){var e=R();D="function"==typeof t?null===e?t:B.domainBind(e,t):void 0};var Y=function(){};n.longStackTraces=function(){if(L.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!at.longStackTraces&&T()){var t=n.prototype._captureStackTrace,e=n.prototype._attachExtraTrace;at.longStackTraces=!0,Y=function(){if(L.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");n.prototype._captureStackTrace=t,n.prototype._attachExtraTrace=e,r.deactivateLongStackTraces(),L.enableTrampoline(),at.longStackTraces=!1},n.prototype._captureStackTrace=p,n.prototype._attachExtraTrace=v,r.activateLongStackTraces(),L.disableTrampolineIfNecessary()}},n.hasLongStackTraces=function(){return at.longStackTraces&&T()};var Z=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return B.global.dispatchEvent(t),function(t,e){var n=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!B.global.dispatchEvent(n)}}if("function"==typeof Event){var t=new Event("CustomEvent");return B.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,!B.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),B.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!B.global.dispatchEvent(n)}}catch(t){}return function(){return!1}}(),J=function(){return B.isNode?function(){return e.emit.apply(e,arguments)}:B.global?function(t){var e="on"+t.toLowerCase(),n=B.global[e];return!!n&&(n.apply(B.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),tt={promiseCreated:i,promiseFulfilled:i,promiseRejected:i,promiseResolved:i,promiseCancelled:i,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:i},et=function(t){var e=!1;try{e=J.apply(null,arguments)}catch(t){L.throwLater(t),e=!0}var n=!1;try{n=Z(t,tt[t].apply(null,arguments))}catch(t){L.throwLater(t),n=!0}return n||e};n.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?n.longStackTraces():!t.longStackTraces&&n.hasLongStackTraces()&&Y()),"warnings"in t){var e=t.warnings;at.warnings=!!e,X=at.warnings,B.isObject(e)&&"wForgottenReturn"in e&&(X=!!e.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!at.cancellation){if(L.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");n.prototype._clearCancellationData=l,n.prototype._propagateFrom=f,n.prototype._onCancel=u,n.prototype._setOnCancel=c,n.prototype._attachCancellationCallback=s,n.prototype._execute=a,nt=f,at.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!at.monitoring?(at.monitoring=!0,n.prototype._fireEvent=et):!t.monitoring&&at.monitoring&&(at.monitoring=!1,n.prototype._fireEvent=o)),n},n.prototype._fireEvent=o,n.prototype._execute=function(t,e,n){try{t(e,n)}catch(t){return t}},n.prototype._onCancel=function(){},n.prototype._setOnCancel=function(t){},n.prototype._attachCancellationCallback=function(t){},n.prototype._captureStackTrace=function(){},n.prototype._attachExtraTrace=function(){},n.prototype._clearCancellationData=function(){},n.prototype._propagateFrom=function(t,e){};var nt=d,rt=function(){return!1},it=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;B.inherits(N,Error),r.CapturedTrace=N,N.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;r0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var u=r>0?e[r-1]:this;s=0;--l)e[l]._length=c,c++;return}}}},N.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=E(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(C(i.stack.split("\n"))),i=i._parent;w(r),_(r),B.notEnumerableProp(t,"stack",b(n,r)),B.notEnumerableProp(t,"__stackCleaned__",!0)}};var ot=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():O(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,U=t,V=e;var n=Error.captureStackTrace;return rt=function(t){return H.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return U=/@/,V=e,Q=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(t){i="stack"in t}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(V=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?O(e):e.toString()},null):(U=t,V=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(M=function(t){console.warn(t)},B.isNode&&e.stderr.isTTY?M=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:B.isNode||"string"!=typeof(new Error).stack||(M=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var at={warnings:K,longStackTraces:!1,cancellation:!1,monitoring:!1};return G&&n.longStackTraces(),{longStackTraces:function(){return at.longStackTraces},warnings:function(){return at.warnings},cancellation:function(){return at.cancellation},monitoring:function(){return at.monitoring},propagateFromFunction:function(){return nt},boundValueFunction:function(){return h},checkForgottenReturns:m,setBounds:P,warn:y,deprecated:g,CapturedTrace:N,fireDomEvent:Z,fireGlobalEvent:J}}},{"./errors":12,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){function n(){return o(this)}function r(t,n){return i(t,n,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,r){return i(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},{}],12:[function(t,e,n){"use strict";function r(t,e){function n(r){if(!(this instanceof n))return new n(r);f(this,"message","string"==typeof r?r:e),f(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return l(n,Error),n}function i(t){if(!(this instanceof i))return new i(t);f(this,"name","OperationalError"),f(this,"message",t),this.cause=t,this.isOperational=!0,t instanceof Error?(f(this,"message",t.message),f(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}var o,a,s=t("./es5"),u=s.freeze,c=t("./util"),l=c.inherits,f=c.notEnumerableProp,d=r("Warning","warning"),h=r("CancellationError","cancellation error"),p=r("TimeoutError","timeout error"),v=r("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(t){o=r("TypeError","type error"),a=r("RangeError","range error")}for(var m="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function a(){return u.call(this,this.promise._target()._settledValue())}function s(t){if(!o(this,t))return f.e=t,f}function u(t){var r=this.promise,u=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?u.call(r._boundValue()):u.call(r._boundValue(),t);if(void 0!==c){r._setReturnedNonUndefined();var d=n(c,r);if(d instanceof e){if(null!=this.cancelPromise){if(d._isCancelled()){var h=new l("late cancellation observer");return r._attachExtraTrace(h),f.e=h,f}d.isPending()&&d._attachCancellationCallback(new i(this))}return d._then(a,s,void 0,this,void 0)}}}return r.isRejected()?(o(this),f.e=t,f):(o(this),t)}var c=t("./util"),l=e.CancellationError,f=c.errorObj;return r.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,i){return"function"!=typeof t?this.then():this._then(n,i,void 0,new r(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,u,u)},e.prototype.tap=function(t){return this._passThrough(t,1,u)},r}},{"./util":36}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,a){function s(t,n,r){for(var o=0;o0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,a){function s(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var i=c();this._callback=null===i?e:l.domainBind(i,e),this._preservedValues=r===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],h.invoke(this._asyncInit,this,void 0)}function u(t,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+l.classString(n));var a=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+l.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+l.classString(i.concurrency)));a=i.concurrency}return a="number"==typeof a&&isFinite(a)&&a>=1?a:0,new s(t,n,a,o).promise()}var c=e._getDomain,l=t("./util"),f=l.tryCatch,d=l.errorObj,h=e._async;l.inherits(s,n),s.prototype._asyncInit=function(){this._init$(void 0,-2)},s.prototype._init=function(){},s.prototype._promiseFulfilled=function(t,n){var r=this._values,o=this.length(),s=this._preservedValues,u=this._limit;if(n<0){if(n=-1*n-1,r[n]=t,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return r[n]=t,this._queue.push(n),!1;null!==s&&(s[n]=t);var c=this._promise,l=this._callback,h=c._boundValue();c._pushContext();var p=f(l).call(h,t,n,o),v=c._popContext();if(a.checkForgottenReturns(p,v,null!==s?"Promise.filter":"Promise.map",c),p===d)return this._reject(p.e),!0;var m=i(p,this._promise);if(m instanceof e){m=m._target();var g=m._bitField;if(0==(50397184&g))return u>=1&&this._inFlight++,r[n]=m,m._proxy(this,-1*(n+1)),!1;if(0==(33554432&g))return 0!=(16777216&g)?(this._reject(m._reason()),!0):(this._cancel(),!0);p=m._value()}r[n]=p}return++this._totalResolved>=o&&(null!==s?this._filter(r,s):this._resolve(r),!0)},s.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlight1){o.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],l=arguments[2];u=a.isArray(c)?s(t).apply(l,c):s(t).call(l,c)}else u=s(t)();var f=r._popContext();return o.checkForgottenReturns(u,f,"Promise.try",r),r._resolveFromSyncValue(u),r},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&l.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new c(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=l.keys(t),i=0;i1){var n,r=new Array(e-1),i=0;for(n=0;n0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+p.classString(t);arguments.length>1&&(n+=", "+p.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},o.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},o.prototype.spread=function(t){return"function"!=typeof t?d("expecting a function but got "+p.classString(t)):this.all()._then(t,void 0,void 0,C,void 0)},o.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},o.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new x(this).promise()},o.prototype.error=function(t){return this.caught(p.originatesFromRejection,t)},o.getNewLibraryCopy=n.exports,o.is=function(t){return t instanceof o},o.fromNode=o.fromCallback=function(t){var e=new o(w);e._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=D(t)(P(e,n));return r===N&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},o.all=function(t){return new x(t).promise()},o.cast=function(t){var e=E(t);return e instanceof o||(e=new o(w),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},o.resolve=o.fulfilled=o.cast,o.reject=o.rejected=function(t){var e=new o(w);return e._captureStackTrace(),e._rejectCallback(t,!0),e},o.setScheduler=function(t){if("function"!=typeof t)throw new b("expecting a function but got "+p.classString(t));return g.setScheduler(t)},o.prototype._then=function(t,e,n,r,i){var a=void 0!==i,s=a?i:new o(w),u=this._target(),l=u._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!=(2097152&this._bitField)&&(r=0!=(50397184&l)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var f=c();if(0!=(50397184&l)){var d,h,v=u._settlePromiseCtx;0!=(33554432&l)?(h=u._rejectionHandler0,d=t):0!=(16777216&l)?(h=u._fulfillmentHandler0,d=e,u._unsetRejectionIsUnhandled()):(v=u._settlePromiseLateCancellationObserver,h=new _("late cancellation observer"),u._attachExtraTrace(h),d=e),g.invoke(v,u,{handler:null===f?d:"function"==typeof d&&p.domainBind(f,d),promise:s,receiver:r,value:h})}else u._addCallbacks(t,e,s,r,f);return s},o.prototype._length=function(){return 65535&this._bitField},o.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},o.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},o.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},o.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},o.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},o.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},o.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},o.prototype._isFinal=function(){return(4194304&this._bitField)>0},o.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},o.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},o.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},o.prototype._setAsyncGuaranteed=function(){g.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},o.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==h)return void 0===e&&this._isBound()?this._boundValue():e},o.prototype._promiseAt=function(t){return this[4*t-4+2]},o.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},o.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},o.prototype._boundValue=function(){},o.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(e,n,r,i,null)},o.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=h),this._addCallbacks(n,r,i,o,null)},o.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:p.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:p.domainBind(i,e));else{var a=4*o-4;this[a+2]=n,this[a+3]=r,"function"==typeof t&&(this[a+0]=null===i?t:p.domainBind(i,t)),"function"==typeof e&&(this[a+1]=null===i?e:p.domainBind(i,e))}return this._setLength(o+1),o},o.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},o.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=E(t,this);if(!(n instanceof o))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var i=r._bitField;if(0==(50397184&i)){var a=this._length();a>0&&r._migrateCallback0(this);for(var s=1;s>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():g.settlePromises(this))}},o.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return g.fatalError(t,p.isNode);(65535&e)>0?g.settlePromises(this):this._ensurePossibleRejectionHandled()}},o.prototype._fulfillPromises=function(t,e){for(var n=1;n0){if(0!=(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},o.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},o.defer=o.pending=function(){return S.deprecated("Promise.defer","new Promise"),{promise:new o(w),resolve:a,reject:s}},p.notEnumerableProp(o,"_makeSelfResolutionError",l),t("./method")(o,w,E,d,S),t("./bind")(o,w,E,S),t("./cancel")(o,x,d,S),t("./direct_resolve")(o),t("./synchronous_inspection")(o),t("./join")(o,x,E,w,g,c),o.Promise=o,o.version="3.4.7",t("./map.js")(o,x,d,E,w,S),t("./call_get.js")(o),t("./using.js")(o,d,E,O,w,S),t("./timers.js")(o,w,S),t("./generators.js")(o,d,w,E,r,S),t("./nodeify.js")(o),t("./promisify.js")(o,w),t("./props.js")(o,x,E,d),t("./race.js")(o,w,E,d),t("./reduce.js")(o,x,d,E,w,S),t("./settle.js")(o,x,S),t("./some.js")(o,x,d),t("./filter.js")(o,w),t("./each.js")(o,w),t("./any.js")(o),p.toFastProperties(o),p.toFastProperties(o.prototype),u({a:1}),u({b:2}),u({c:3}),u(1),u(function(){}),u(void 0),u(!1),u(new o(w)),S.setBounds(m.firstLineError,p.lastLineError),o}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function a(t){switch(t){case-2:return[];case-3:return{}}}function s(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var u=t("./util");u.isArray;return u.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function t(n,o){var s=r(this._values,this._promise);if(s instanceof e){s=s._target();var c=s._bitField;if(this._values=s,0==(50397184&c))return this._promise._setAsyncGuaranteed(),s._then(t,this._reject,void 0,this,o);if(0==(33554432&c))return 0!=(16777216&c)?this._reject(s._reason()):this._cancel();s=s._value()}if(null===(s=u.asArray(s))){var l=i("expecting an array or an iterable object but got "+u.classString(s)).reason();return void this._promise._rejectCallback(l,!1)}if(0===s.length)return void(-5===o?this._resolveEmptyArray():this._resolve(a(o)));this._iterate(s)},s.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,a=null,s=0;s=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;n=this._length){var n;if(this._isMap)n=d(this._values);else{n={};for(var r=this.length(),i=0,o=this.length();i>1},e.prototype.props=function(){return a(this)},e.props=function(t){return a(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;o=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},i.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||e<0)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new i(t),o=n.promise();return n.setHowMany(e),n.init(),o}var a=t("./util"),s=t("./errors").RangeError,u=t("./errors").AggregateError,c=a.isArray,l={};a.inherits(i,n),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=c(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new u,e=this.length();e0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new s(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},a=e.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=e.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},t.prototype.isPending=function(){return a.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return s.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(l(t)){if(t instanceof e)return t;var i=o(t);if(i===c){r&&r._pushContext();var u=e.reject(i.e);return r&&r._popContext(),u}if("function"==typeof i){if(a(t)){var u=new e(n);return t._then(u._fulfill,u._reject,void 0,u,null),u}return s(t,i,r)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(t){return c.e=t,c}}function a(t){try{return f.call(t,"_promise0")}catch(t){return!1}}function s(t,r,i){function o(t){s&&(s._resolveCallback(t),s=null)}function a(t){s&&(s._rejectCallback(t,f,!0),s=null)}var s=new e(n),l=s;i&&i._pushContext(),s._captureStackTrace(),i&&i._popContext();var f=!0,d=u.tryCatch(r).call(t,o,a);return f=!1,s&&d===c&&(s._rejectCallback(d.e,!0,!0),s=null),l}var u=t("./util"),c=u.errorObj,l=u.isObject,f={}.hasOwnProperty;return r}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function a(t){throw clearTimeout(this.handle),t}var s=t("./util"),u=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var c=function(t){return l(+this).thenReturn(t)},l=e.delay=function(t,o){var a,s;return void 0!==o?(a=e.resolve(o)._then(c,null,null,t,void 0),r.cancellation()&&o instanceof e&&a._setOnCancel(o)):(a=new e(n),s=setTimeout(function(){a._fulfill()},+t),r.cancellation()&&a._setOnCancel(new i(s)),a._captureStackTrace()),a._setAsyncGuaranteed(),a};e.prototype.delay=function(t){return l(t,this)};var f=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new u("operation timed out"):new u(e),s.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};e.prototype.timeout=function(t,e){t=+t;var n,s,u=new i(setTimeout(function(){n.isPending()&&f(n,e,s)},t));return r.cancellation()?(s=this.then(),n=s._then(o,a,void 0,u,void 0),n._setOnCancel(u)):n=this._then(o,a,void 0,u,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,a){function s(t){setTimeout(function(){throw t},0)}function u(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function c(t,n){function i(){if(a>=c)return l._fulfill();var o=u(t[a++]);if(o instanceof e&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),t.promise)}catch(t){return s(t)}if(o instanceof e)return o._then(i,s,null,null,null)}i()}var a=0,c=t.length,l=new e(o);return i(),l}function l(t,e,n){this._data=t,this._promise=e,this._context=n}function f(t,e,n){this.constructor$(t,e,n)}function d(t){return l.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function h(t){this.length=t,this.promise=null,this[t-1]=null}var p=t("./util"),v=t("./errors").TypeError,m=t("./util").inherits,g=p.errorObj,y=p.tryCatch,b={};l.prototype.data=function(){return this._data},l.prototype.promise=function(){return this._promise},l.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():b},l.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==b?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},l.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},m(f,l),f.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},h.prototype._resultCancelled=function(){for(var t=this.length,n=0;n0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new f(t,this,i());throw new v}}},{"./errors":12,"./util":36}],36:[function(t,r,i){"use strict";function o(){try{var t=P;return P=null,t.apply(this,arguments)}catch(t){return A.e=t,A}}function a(t){return P=t,o}function s(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function u(t){return"function"==typeof t||"object"==typeof t&&null!==t}function c(t){return s(t)?new Error(y(t)):t}function l(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;n1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=M.test(t+"")&&S.names(t).length>0;if(n||r||i)return!0}return!1}catch(t){return!1}}function v(t){function e(){}e.prototype=t;for(var n=8;n--;)new e;return t}function m(t){return R.test(t)}function g(t,e,n){for(var r=new Array(t),i=0;i10||t[0]>0}(),q.isNode&&q.toFastProperties(e);try{throw new Error}catch(t){q.lastLineError=t}r.exports=q},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(e,n(53),n(44),n(184).setImmediate)},function(t,e,n){function r(t,e){this._id=t,this._clearFn=e}var i=Function.prototype.apply;e.setTimeout=function(){return new r(i.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new r(i.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(185),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";function r(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n"}function i(t,e){function n(e,n){if(f)return e;for(var r=!0,i=[],o=0,a=e.length;o scrivito.Obj.findByPath(\'/en\')"');return t}function o(t,e){if(t&&!(0,l.contains)(["path","hash"],t))throw new f.ArgumentError('Expected the configuration option "routingMethod" to be set to "hash" or "path", but saw "'+t+'" instead.');if(e&&!(0,l.isString)(e))throw new f.ArgumentError('Configuration "routingBasePath" needs to be a String.');return{routingMethod:t,routingBasePath:e}}function a(){return d}function s(){d=!1}Object.defineProperty(e,"__esModule",{value:!0}),e.resetIsConfigured=e.isConfigured=e.configure=void 0;var u=n(3),c=function(t){return t&&t.__esModule?t:{default:t}}(u),l=n(0),f=n(1),d=!1;e.configure=r,e.isConfigured=a,e.resetIsConfigured=s},function(t,e,n){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:{},e=t.objId,n=t.query,r=t.fragment,i=(0,d.getWindowContext)().Obj.getIncludingDeleted(e);return scrivito.urlFor(i,{query:n,fragment:r})},getClasses:function(){var e=(0,d.getWindowContext)(),n=[];return u.default.each(e.allObjClasses(),function(e,r){return n.push(t("Obj",r,e))}),u.default.each(e.allWidgetClasses(),function(e,r){return n.push(t("Widget",r,e))}),n},navigateTo:function(t){(0,l.default)(function(){return(0,d.getWindowContext)().Obj.get(t)})},mountComponent:h.mountComponent,resolveUrl:function(t){return(0,v.default)(t).then(function(t){return t&&t.obj?c(t):null})},getDocumentHeight:function(){return(0,m.getDocument)().querySelector("html").getBoundingClientRect().height},transformHTML:function(t){return(0,g.transformHTML)(t)}};scrivito.AppAdapter=y}()},function(t,e,n){"use strict";function r(){window.scrollTo(0,0)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e){t.exports=function(t){throw new TypeError("[tcomb] "+t)}},function(t,e,n){var r=n(22),i=n(39);t.exports=r("Array",i)},function(t,e,n){var r=n(22);t.exports=r("Date",function(t){return t instanceof Date})},function(t,e,n){var r=n(22);t.exports=r("Error",function(t){return t instanceof Error})},function(t,e,n){var r=n(103),i=n(194);t.exports=r(i,function(t){return t%1==0},"Integer")},function(t,e,n){var r=n(22),i=n(38);t.exports=r("Object",i)},function(t,e,n){var r=n(22);t.exports=r("RegExp",function(t){return t instanceof RegExp})},function(t,e,n){var r=n(22),i=n(19);t.exports=r("Type",i)},function(t,e,n){var r=(n(7),n(27),n(19),n(33),n(106)),i=n(16),o=n(196),a=1;t.exports=function(t){function e(t,e){return n(t,e)}var n;return e.define=function(i){return o(i)&&e.hasOwnProperty("dispatch")&&(i.dispatch=e.dispatch),n=i,r(e,n,!0),t&&(n.displayName=e.displayName=t,e.meta.name=t),e.meta.identity=n.meta.identity,e.prototype=n.prototype,e},e.displayName=t||i(e)+"$"+a++,e.meta={identity:!1},e.prototype=null,e}},function(t,e,n){function r(t){return Object.keys(t).map(function(t){return o.stringify(t)}).join(" | ")}function i(t,e){function n(t,e){return t}var i=e||r(t);return n.meta={kind:"enums",map:t,name:e,identity:!0},n.displayName=i,n.is=function(e){return t.hasOwnProperty(e)},n}var o=n(7),a=(n(27),n(63),n(75));n(38);i.of=function(t,e){t=a(t)?t.split(" "):t;var n={};return t.forEach(function(t){n[t]=t}),i(n,e)},i.getDefaultName=r,t.exports=i},function(t,e,n){function r(t){return"?"+f(t)}function i(t,e){function n(e,n){return c.is(e)?e:u(t,e,n)}if(o(t)||t===s||t===c)return t;var i=e||r(t),f=a(t);return n.meta={kind:"maybe",type:t,name:e,identity:f},n.displayName=i,n.is=function(e){return c.is(e)||l(e,t)},n}var o=(n(7),n(27),n(18),n(276)),a=n(40),s=n(102),u=n(41),c=n(193),l=(n(63),n(42)),f=n(16);i.getDefaultName=r,t.exports=i},function(t,e,n){var r=n(19);t.exports=function(t){return r(t)&&"maybe"===t.meta.kind}},function(t,e,n){function r(t){return"Struct"+f(t)}function i(t,e){return d(a,t,e)}function o(t){return u(t)||(t=c(t)?{}:{name:t}),t.hasOwnProperty("strict")||(t.strict=a.strict),t.hasOwnProperty("defaultProps")||(t.defaultProps={}),t}function a(t,e){function n(e,r){if(n.is(e))return e;if(!(this instanceof n))return new n(e,r);for(var i in t)if(t.hasOwnProperty(i)){var o=t[i],a=e[i];void 0===a&&(a=c[i]),this[i]=l(o,a,null)}}e=o(e);var a=e.name,u=e.strict,c=e.defaultProps,f=a||r(t);return n.meta={kind:"struct",props:t,name:a,identity:!1,strict:u,defaultProps:c},n.displayName=f,n.is=function(t){return t instanceof n},n.update=function(t,e){return new n(s.update(t,e))},n.extend=function(t,e){return i([n].concat(t),e)},n}var s=n(7),u=(n(27),n(104),n(77),n(76),n(38)),c=n(33),l=n(41),f=(n(16),n(105),n(198)),d=n(199);a.strict=!1,a.getOptions=o,a.getDefaultName=r,a.extend=i,t.exports=a},function(t,e,n){var r=n(19);t.exports=function(t){return r(t)&&"struct"===t.meta.kind}},function(t,e,n){var r=n(19);t.exports=function(t){return r(t)&&"interface"===t.meta.kind}},function(t,e,n){function r(t){return s(t)&&"subtype"===t.meta.kind}function i(t){return r(t)?[t.meta.predicate].concat(i(t.meta.type)):[]}function o(t){return r(t)?o(t.meta.type):t}function a(t){return{predicates:i(t),unrefinedType:o(t)}}var s=n(19);t.exports=a},function(t,e,n){function r(t){return t.map(a).join(" | ")}function i(t,e){function n(t,e){if(a)return t;var r=n.dispatch(t);return!r&&n.is(t)?t:u(r,t,e)}var i=e||r(t),a=t.every(s);return n.meta={kind:"union",types:t,name:e,identity:a},n.displayName=i,n.is=function(e){return t.some(function(t){return c(e,t)})},n.dispatch=function(e){for(var n=0,r=t.length;n "+d(e)}function i(t){return s.is(t)&&c(t.instrumentation)}function o(t){for(var e=t.length,n=!1,r=e-1;r>=0;r--){var i=t[r];if(!h(i)||"maybe"!==i.meta.kind)return r+1;n=!0}return n?0:e}function a(t,e,n){function s(t,e){return i(t)?t:s.of(t)}t=u(t)?t:[t];var c=n||r(t,e),d=t.length;o(t);return s.meta={kind:"func",domain:t,codomain:e,name:n,identity:!0},s.displayName=c,s.is=function(n){return i(n)&&n.instrumentation.domain.length===d&&n.instrumentation.domain.every(function(e,n){return e===t[n]})&&n.instrumentation.codomain===e},s.of=function(n,r){function i(){var i=Array.prototype.slice.call(arguments),o=i.length;if(r&&o0?e.concat(t):e}function c(t,e){if(t.length>0){e=r(e);for(var n=0,i=t.length;n0?(e=r(e),t.reduce(function(t,e){return t.splice.apply(t,e),t},e)):e}function d(t,e){if(t.from!==t.to){e=r(e);var n=e[t.to];e[t.to]=e[t.from],e[t.from]=n}return e}function h(t,e){return t.length>0?t.concat(e):e}function p(t,e){var n=!1,i=r(e);for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o],n=n||i[o]!==e[o]);return n?i:e}var v=(n(7),n(38)),m=(n(18),n(39)),g=(n(195),n(201));a.commands={$apply:s,$push:u,$remove:c,$set:l,$splice:f,$swap:d,$unshift:h,$merge:p},t.exports=a},function(t,e,n){var r=n(7),i=n(18),o=n(19),a=n(102);t.exports=function(t){for(var e,n,s,u=1,c=arguments.length;un)return"Expected "+n+" arguments, got "+r;var i=c.flatten(e.map(function(e,n){var r=e[0],i=e[1],a=t[n];return s.validate(a,i,{strict:!0}).errors.map(function(t){return o(r,t)})}));return i.length>0?i.join(" "):void 0}function o(t,e){var n=a(t,e);if(void 0===e.actual)return"Missing required "+n+".";if(e.expected===s.Nil)return"Unexpected "+n+".";var r=s.getTypeName(e.expected);return"Unexpected value for "+n+": got "+u.default(e.actual)+", expected type "+r+"."}function a(t,e){var n="argument '"+t+"'";return 0===e.path.length?n:"key '"+e.path.join("/")+"' in "+n}Object.defineProperty(e,"__esModule",{value:!0});var s=n(289),u=n(21),c=n(0),l=n(1);e.checkArgumentsFor=r},function(t,e,n){"use strict";function r(t,e,n){var r=s.getTypeName(e),i=n.length?"/"+n.join("/")+": "+r:r;return"Invalid value "+u(t)+" supplied to "+i}function i(t,e,n,i){return s.Function.is(e.getValidationErrorMessage)?e.getValidationErrorMessage(t,n,i):r(t,e,n)}function o(t,e,n){n=n||{};var r=s.Array.is(n)?n:n.path||[];return new f(a(t,e,r,n))}function a(t,e,n,r){return s.isType(e)?d[e.meta.kind](t,e,n,r):d.es6classes(t,e,n,r)}var s=n(101),u=s.stringify,c={},l=s.struct({message:s.Any,actual:s.Any,expected:s.Any,path:s.list(s.union([s.String,s.Number]))},"ValidationError");l.of=function(t,e,n,r){return new l({message:i(t,e,n,r),actual:t,expected:e,path:n})};var f=s.struct({errors:s.list(l),value:s.Any},"ValidationResult");f.prototype.isValid=function(){return!this.errors.length},f.prototype.firstError=function(){return this.isValid()?null:this.errors[0]},f.prototype.toString=function(){return this.isValid()?"[ValidationResult, true, "+u(this.value)+"]":"[ValidationResult, false, ("+this.errors.map(function(t){return u(t.message)}).join(", ")+")]"};var d=o.validators={};d.es6classes=function(t,e,n,r){return{value:t,errors:t instanceof e?[]:[l.of(t,e,n,r.context)]}},d.irreducible=d.enums=function(t,e,n,r){return{value:t,errors:e.is(t)?[]:[l.of(t,e,n,r.context)]}},d.list=function(t,e,n,r){if(!s.Array.is(t))return{value:t,errors:[l.of(t,e,n,r.context)]};for(var i={value:[],errors:[]},o=0,u=t.length;oo)return{value:t,errors:[l.of(t,e,n,r.context)]};for(var u={value:[],errors:[]},c=0;c1&&s.errors.push(l.of(t,e,n,r.context)),s},d.interface=function(t,e,n,r){if(!s.Object.is(t))return{value:t,errors:[l.of(t,e,n,r.context)]};var i={value:{},errors:[]},o=e.meta.props;for(var u in o){var c=a(t[u],o[u],n.concat(u),r);i.value[u]=c.value,i.errors=i.errors.concat(c.errors)}if(r.hasOwnProperty("strict")?r.strict:e.meta.strict)for(var f in t)o.hasOwnProperty(f)||s.Nil.is(t[f])||i.errors.push(l.of(t[f],s.Nil,n.concat(f),r.context));return i},s.mixin(s,{ValidationError:l,ValidationResult:f,validate:o}),t.exports=s},function(t,e,n){"use strict";function r(t,e){if(!t._scrivitoResizeListeners){t._scrivitoResizeListeners=[],t.style.position="relative";var n=i();n.resizeElement=t,t._scrivitoResizeTrigger=n,(0,u.default)()&&t.appendChild(n),n.data="about:blank",(0,u.default)()||t.appendChild(n)}t._scrivitoResizeListeners.push(e)}function i(){var t=document.createElement("object");return t.type="text/html",t.onload=o,t.style.display="block",t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.height="100%",t.style.width="100%",t.style.overflow="hidden",t.style.pointerEvents="none",t.style.zIndex=-1,t}function o(){this.contentDocument.defaultView._scrivitoResizeTrigger=this.resizeElement,this.contentDocument.defaultView.addEventListener("resize",a)}function a(t){var e=t.target||t.srcElement,n=e._scrivitoResizeTrigger;n._scrivitoResizeListeners.forEach(function(e){return e(n,t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var s=n(291),u=function(t){return t&&t.__esModule?t:{default:t}}(s)},function(t,e,n){"use strict";function r(){var t=window.navigator.userAgent;return t.indexOf("MSIE")>=0||t.indexOf("Trident")>=0}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){var e=(0,a.default)(c.location()),n=(0,a.default)(t);return(0,h.isConfigured)()&&(e.origin()===n.origin()||n.is("relative"))?(0,f.default)(function(){return scrivito.Routing.recognize(t)}).then(function(t){return(0,s.include)(["/",""],t.path)?null:{obj:t.obj,url:n}}).catch(function(t){if(t instanceof d.ResourceNotFoundError)return null;throw t}):scrivito.Promise.resolve(null)}Object.defineProperty(e,"__esModule",{value:!0});var o=n(49),a=r(o),s=n(0),u=n(46),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(u),l=n(13),f=r(l),d=n(1),h=n(203);e.default=i},function(t,e,n){"use strict";function r(t){var e=o.default.get(t);return e?scrivito.basicUrlFor(e):scrivito.Routing.generateUrl({path:t})}Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),o=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=r},function(t,e,n){"use strict";var r=n(3),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=n(0),a=n(54),s=n(46),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s);!function(){function t(t){var e=t.obj,n=t.queryParameters,r=t.hash,i={scrivitoObjId:e.id(),scrivitoQueryParameters:n,scrivitoHash:r},a=scrivito.Routing.generate({obj:e,queryParameters:n,hash:r}),s=u.history();s.state&&s.state.scrivitoObjId===e.id()&&(0,o.isEqual)(s.state.scrivitoQueryParameters,n)&&s.state.scrivitoHash===r||s.pushState(i,"",a)}function e(t){var e=t.obj,n=t.queryParameters,r=t.hash,i={scrivitoObjId:e.id(),scrivitoQueryParameters:n,scrivitoHash:r},o=scrivito.Routing.generate({obj:e,queryParameters:n,hash:r});u.history().replaceState(i,"",o)}function n(){u.setOnpopstate(c)}function r(){var t=u.location().toString();(0,a.replaceCurrentPage)(function(){var e=scrivito.Routing.recognize(t),n=e.obj,r=e.queryParameters,i=e.hash;return n?{obj:n,queryParameters:r,hash:i}:{queryParameters:r,hash:i}})}function s(){r(),n()}function c(t){var e=void 0,n=void 0,o=void 0;t.state&&(e=t.state.scrivitoObjId,n=t.state.scrivitoHash,o=t.state.scrivitoQueryParameters),e?(0,a.replaceCurrentPage)(function(){return{obj:i.default.get(e),queryParameters:o,hash:n}}):r()}scrivito.BrowserLocation={},scrivito.BrowserLocation.init=s,scrivito.BrowserLocation.pushWith=t,scrivito.BrowserLocation.replaceWith=e}()},function(t,e,n){"use strict";!function(){function t(t){scrivito.uiAdapter?scrivito.uiAdapter.navigateToExternalUrl(t):scrivito.setWindowLocation(t)}function e(t){window.location=t}function n(t,e){window.open(t,e)}scrivito.setWindowLocation=e,scrivito.changeLocation=t,scrivito.openLocation=n}()},function(t,e,n){"use strict";var r=n(49),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=n(1),a=n(46),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(a);!function(){function t(t){var e=t.routingMethod,n=t.routingBasePath;b=!0,g="path"===e,y=n||""}function e(){b=!1,g=void 0,y=void 0}function n(t){if(!b)throw scrivito.logError("Error from Scrivito SDK: No application configured, cannot initialize routing."),new o.InternalError(t+" can't be called before init.")}function r(t){var e=t.obj,r=t.queryParameters,i=t.hash;return n("generate"),a({path:scrivito.RoutingPath.generate(e),queryParameters:r,hash:i})}function a(t){var e=t.path,r=t.queryParameters,o=t.hash;n("generateUrl");var a=(0,i.default)(s.location()).origin();if(g){var u=("/"+y+"/"+e).replace(/\/+/g,"/"),c=(0,i.default)(a).pathname(u);return r&&c.query(r),o&&c.hash(o),c.toString()}return(0,i.default)(a).hash(""+m+e).toString()}function u(t){n("recognize");var e=c(t);return{path:e,obj:f(e),queryParameters:v(t),hash:l(t)}}function c(t){return g?d(t):h(t)}function l(t){return g?p(t):null}function f(t){return null!==t?scrivito.RoutingPath.recognize(t):null}function d(t){var e=(0,i.default)(t).path();return e.substring(0,y.length)!==y?null:e.substring(y.length)}function h(t){var e=(0,i.default)(t),n=(0,i.default)(s.location()),r=e.fragment();return e.filename()!==n.filename()?null:""===r?"":r.substring(0,m.length)===m?r.substring(m.length):null}function p(t){var e=(0,i.default)(t).hash();return""===e?null:e}function v(t){return(0,i.default)(t).query(!0)}var m="!",g=void 0,y=void 0,b=!1;scrivito.Routing={},scrivito.Routing.init=t,scrivito.Routing.reset=e,scrivito.Routing.generate=r,scrivito.Routing.recognize=u,scrivito.Routing.generateUrl=a}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(3),o=r(i),a=n(0),s=r(a),u=n(58),c=n(1);!function(){function t(t,e){return t.substring(0,e.length)===e?t.substring(e.length):t}function e(t){if(!l)return!1;var e=scrivito.loadableWithDefault(null,l);return!!e&&e.id()===t.id()}function n(t){if(!(t instanceof o.default))throw new c.ArgumentError("Parameter obj needs to be a BasicObj.")}function r(t){if(!s.default.isString(t))throw new c.ArgumentError("Parameter path needs to be a String.")}function i(t){var e=(0,u.getWindowRegistry)();return scrivito.wrapInAppClass(e,t).slug()}function a(t){var e=s.default.last(t.split("-"));return s.default.last(e.split("/"))}var l=void 0,f={init:function(t){l=t},generate:function(t){if(n(t),e(t))return"/";if(t.permalink())return"/"+t.permalink();var r=i(t);return r?"/"+r+"-"+t.id():"/"+t.id()},recognize:function(e){if(r(e),s.default.include(["/",""],e))return scrivito.unwrapAppClassValues(l());var n=t(e,"/"),i=o.default.getByPermalink(n);return i||o.default.get(a(n))},get homepageCallback(){return l},resetHomepageCallback:function(){l=void 0}};scrivito.RoutingPath=f}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(3),o=r(i),a=n(23),s=r(a),u=n(24),c=r(u),l=n(37),f=n(1),d=n(30),h=r(d);!function(){function t(t){return n(t),t instanceof c.default?a(t):t instanceof h.default?r(t):d(t)?i(t):scrivito.Routing.generate({obj:t})}function e(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.query,i=n.fragment,o=scrivito.unwrapAppClassValues(e),a=r?"?"+r:"",s=i?"#"+i:"";return t(o).concat(a).concat(s)}function n(t){if(!t)throw new f.ArgumentError("Missing target.");if(!(t instanceof c.default||t instanceof o.default||t instanceof h.default))throw new f.ArgumentError("Target is invalid. Valid targets are instances of Obj or Link.")}function r(t){return t.url()}function i(t){var e=t.get("blob",["binary"]);return e?r(e):"#__empty_blob"}function a(e){return e.isExternal()?e.url():t(e.obj())}function u(){return(0,l.getWindowContext)()}function d(t){var e=u().getClass(t.objClass());return!!e&&s.default.forClass(e).isBinary()}scrivito.basicUrlFor=t,scrivito.urlFor=e}()},function(t,e,n){"use strict";n(300),n(301)},function(t,e,n){"use strict";window.scrivito||(window.scrivito={})},function(t,e,n){"use strict";!function(){var t=void 0,e=0,n={},r={subscribe:function(t){var r=t.onFocus,i=t.onBlur,o=e;return n[o]={onFocus:r,onBlur:i},e+=1,o},unsubscribe:function(t){delete n[t]},notifyFocus:function(e){t=e,n[t].onFocus()},notifyBlur:function(e){e===t&&n[e].onBlur()},get handlers(){return n},reset:function(){t=void 0,e=0,n={}}};scrivito.WidgetFocus=r}()},function(t,e,n){"use strict";var r=n(303),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(r);window.Scrivito=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(30);Object.defineProperty(e,"Binary",{enumerable:!0,get:function(){return r(i).default}});var o=n(47);Object.defineProperty(e,"FutureBinary",{enumerable:!0,get:function(){return r(o).default}});var a=n(100);Object.defineProperty(e,"ObjFacetValue",{enumerable:!0,get:function(){return r(a).default}});var s=n(13);Object.defineProperty(e,"load",{enumerable:!0,get:function(){return r(s).default}});var u=n(1);Object.defineProperty(e,"ArgumentError",{enumerable:!0,get:function(){return u.ArgumentError}}),Object.defineProperty(e,"ResourceNotFoundError",{enumerable:!0,get:function(){return u.ResourceNotFoundError}}),Object.defineProperty(e,"ScrivitoError",{enumerable:!0,get:function(){return u.ScrivitoError}}),Object.defineProperty(e,"TransformationSourceInvalidError",{enumerable:!0,get:function(){return u.TransformationSourceInvalidError}}),Object.defineProperty(e,"TransformationSourceTooLargeError",{enumerable:!0,get:function(){return u.TransformationSourceTooLargeError}});var c=n(203);Object.defineProperty(e,"configure",{enumerable:!0,get:function(){return c.configure}});var l=n(54);Object.defineProperty(e,"currentPage",{enumerable:!0,get:function(){return l.currentPage}}),Object.defineProperty(e,"currentPageParams",{enumerable:!0,get:function(){return l.currentPageParams}});var f=n(74);Object.defineProperty(e,"navigateTo",{enumerable:!0,get:function(){return r(f).default}});var d=n(304);Object.defineProperty(e,"openContentBrowser",{enumerable:!0,get:function(){return r(d).default}});var h=n(190);Object.defineProperty(e,"provideEditingConfig",{enumerable:!0,get:function(){return h.provideEditingConfig}});var p=n(204);Object.defineProperty(e,"registerEditor",{enumerable:!0,get:function(){return p.registerEditor}});var v=n(306);Object.defineProperty(e,"isInPlaceEditingActive",{enumerable:!0,get:function(){return r(v).default}});var m=n(307);Object.defineProperty(e,"ChildListTag",{enumerable:!0,get:function(){return r(m).default}});var g=n(209);Object.defineProperty(e,"ContentTag",{enumerable:!0,get:function(){return r(g).default}});var y=n(318);Object.defineProperty(e,"CurrentPage",{enumerable:!0,get:function(){return r(y).default}});var b=n(319);Object.defineProperty(e,"ImageTag",{enumerable:!0,get:function(){return r(b).default}});var _=n(321);Object.defineProperty(e,"InternalErrorPage",{enumerable:!0,get:function(){return r(_).default}});var w=n(207);Object.defineProperty(e,"LinkTag",{enumerable:!0,get:function(){return r(w).default}});var C=n(322);Object.defineProperty(e,"NotFoundErrorPage",{enumerable:!0,get:function(){return r(C).default}});var k=n(6);Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return r(k).default}});var E=n(323);Object.defineProperty(e,"provideComponent",{enumerable:!0,get:function(){return r(E).default}});var x=n(64);Object.defineProperty(e,"registerComponent",{enumerable:!0,get:function(){return x.registerForId}})},function(t,e,n){"use strict";function r(t){return scrivito.uiAdapter.openContentBrowser((0,a.default)(t&&(0,i.pick)(t,"selection","selectionMode")))}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var i=n(0),o=n(305),a=function(t){return t&&t.__esModule?t:{default:t}}(o)},function(t,e,n){"use strict";function r(t){var e=[];return t.forEach(function(t){var n=o(t);void 0!==n&&e.push(n)}),e}function i(t){var e={};return(0,s.each)(t,function(t,n){var r=o(t);void 0!==r&&(e[n]=r)}),e}function o(t){if(!t)return t;switch(void 0===t?"undefined":a(t)){case"string":case"number":case"boolean":return t;case"object":if(t instanceof l.default)return o(t.params());if(t instanceof Date)return;return(0,s.isArray)(t)?r(t):i(t)}}Object.defineProperty(e,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=o;var s=n(0),u=n(34),c=(function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);e.default=t}(u),n(60)),l=function(t){return t&&t.__esModule?t:{default:t}}(c)},function(t,e,n){"use strict";function r(){return"published"!==scrivito.currentWorkspaceId()&&(!!(0,i.isComponentMounted)()||!!scrivito.uiAdapter&&scrivito.uiAdapter.isEditingMode())}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var i=n(202)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e',init:function(){var t;return i.extensions.anchor.prototype.init.apply(this,arguments),this.targetCheckbox=null!=(t=this.getEditorOption("anchor"))?t.targetCheckbox:void 0},handleClick:function(t){var e,n,r,o,a;return t.preventDefault(),t.stopPropagation(),this.isDisplayed()||(o=i.selection.getSelectionRange(this.document),r=i.selection.getSelectedParentElement(o),n=i.util.getClosestTag(r,"a"),e=a=null,n&&(n=this.proxy.edQuery(n),e=n.attr("href")||null,a=n.attr("target")||null),this.showForm({value:e,target:a})),!1},getTemplate:function(){var t;return t="",this.targetCheckbox&&(t="
\n \n
"),("\n\n\n\n"+t).replace(/\n\s*/g,"")},attachFormEvents:function(t){var e;return i.extensions.anchor.prototype.attachFormEvents.call(this,t),t=this.proxy.edQuery(t),e=t.find(".medium-editor-toolbar-input"),t.find(".medium-editor-toolbar-browse").on("click",function(t){return function(){var n,r;return r=(n=t.proxy.idFromPath(e.val()))?[n]:[],Scrivito.openContentBrowser({selection:r,selectionMode:"single"}).catch(function(t){throw e.focus(),t}).then(function(n){return e.focus(),n.length?e.val(t.proxy.pathForId(n[0])):e.val("")}),!1}}(this))},completeFormSave:function(t){return this.base.restoreSelection(),t.value?this.execAction(this.action,t):this.execAction("unlink"),this.base.checkSelection()}}),s=function(){var t,e,n;return t=["bold","italic","scrivito_anchor","h2","h3","unorderedlist","orderedlist"],(null!=(e=Scrivito.Editors)&&null!=(n=e._config)?n.showHtmlEditorCodeButton:void 0)&&t.splice(2,0,"scrivito_code"),t},u=function(){return{anchor:{targetCheckbox:!0},anchorPreview:!1,extensions:{scrivito_anchor:new o,scrivito_code:new r({label:'',start:"",end:""}),imageDragging:{}},placeholder:!1,toolbar:{buttons:s(),standardizeSelectionStart:!0}}},a=function(t){var e,n,r;return e=t.jQueryElement(),n=u(),null!=(r=n.extensions.scrivito_anchor)&&(r.proxy=t),new i(e,n).subscribe("editableInput",function(){return t.save(e.html())})},t.exports=a},function(t,e,n){(function(r){var i;/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */ "classList"in document.createElement("_")||function(t){"use strict";if("Element"in t){var e=t.Element.prototype,n=Object,r=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},i=Array.prototype.indexOf||function(t){for(var e=0,n=this.length;e1?e:this.data.length),n,this.encoding)},o.toString=function(){return"[object Blob]"},o.close=function(){this.size=0,delete this.data},n}(t);t.Blob=function(t,n){var r=n?n.type||"":"",i=new e;if(t)for(var o=0,a=t.length;o-1,isMac:e.navigator.platform.toUpperCase().indexOf("MAC")>=0,keyCode:{BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,DELETE:46,K:75,M:77,V:86},isMetaCtrlKey:function(t){return!!(a.isMac&&t.metaKey||!a.isMac&&t.ctrlKey)},isKey:function(t,e){var n=a.getKeyCode(t);return!1===Array.isArray(e)?n===e:-1!==e.indexOf(n)},getKeyCode:function(t){var e=t.which;return null===e&&(e=null!==t.charCode?t.charCode:t.keyCode),e},blockContainerElementNames:["p","h1","h2","h3","h4","h5","h6","blockquote","pre","ul","li","ol","address","article","aside","audio","canvas","dd","dl","dt","fieldset","figcaption","figure","footer","form","header","hgroup","main","nav","noscript","output","section","video","table","thead","tbody","tfoot","tr","th","td"],emptyElementNames:["br","col","colgroup","hr","img","input","source","wbr"],extend:function(){var t=[!0].concat(Array.prototype.slice.call(arguments));return n.apply(this,t)},defaults:function(){var t=[!1].concat(Array.prototype.slice.call(arguments));return n.apply(this,t)},createLink:function(t,e,n,r){var i=t.createElement("a");return a.moveTextRangeIntoElement(e[0],e[e.length-1],i),i.setAttribute("href",n),r&&("_blank"===r&&i.setAttribute("rel","noopener noreferrer"),i.setAttribute("target",r)),i},findOrCreateMatchingTextNodes:function(t,e,n){for(var r=t.createTreeWalker(e,NodeFilter.SHOW_ALL,null,!1),i=[],o=0,s=!1,u=null,c=null;null!==(u=r.nextNode());)if(!(u.nodeType>3))if(3===u.nodeType){if(!s&&n.startn.end+1)throw new Error("PerformLinking overshot the target!");s&&i.push(c||u),o+=u.nodeValue.length,null!==c&&(o+=c.nodeValue.length,r.nextNode()),c=null}else"img"===u.tagName.toLowerCase()&&(!s&&n.start<=o&&(s=!0),s&&i.push(u));return i},splitStartNodeIfNeeded:function(t,e,n){return e!==n?t.splitText(e-n):null},splitEndNodeIfNeeded:function(t,e,n,r){var i,o;i=r+t.nodeValue.length+(e?e.nodeValue.length:0)-1,o=n-r-(e?t.nodeValue.length:0),i>=n&&r!==i&&0!==o&&(e||t).splitText(o)},splitByBlockElements:function(e){if(3!==e.nodeType&&1!==e.nodeType)return[];var n=[],r=t.util.blockContainerElementNames.join(",");if(3===e.nodeType||0===e.querySelectorAll(r).length)return[e];for(var i=0;i0)break;r=o.nextNode()}return r},findPreviousSibling:function(t){if(!t||a.isMediumEditorElement(t))return!1;for(var e=t.previousSibling;!e&&!a.isMediumEditorElement(t.parentNode);)t=t.parentNode,e=t.previousSibling;return e},isDescendant:function(t,e,n){if(!t||!e)return!1;if(t===e)return!!n;if(1!==t.nodeType)return!1;if(r||3!==e.nodeType)return t.contains(e);for(var i=e.parentNode;null!==i;){if(i===t)return!0;i=i.parentNode}return!1},isElement:function(t){return!(!t||1!==t.nodeType)},throttle:function(t,e){var n,r,i,o=null,a=0,s=function(){a=Date.now(),o=null,i=t.apply(n,r),o||(n=r=null)};return e||0===e||(e=50),function(){var u=Date.now(),c=e-(u-a);return n=this,r=arguments,c<=0||c>e?(o&&(clearTimeout(o),o=null),a=u,i=t.apply(n,r),o||(n=r=null)):o||(o=setTimeout(s,c)),i}},traverseUp:function(t,e){if(!t)return!1;do{if(1===t.nodeType){if(e(t))return t;if(a.isMediumEditorElement(t))return!1}t=t.parentNode}while(t);return!1},htmlEntities:function(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},insertHTMLCommand:function(e,n){var r,i,o,s,u,c,l,f=!1,d=["insertHTML",!1,n];if(!t.util.isEdge&&e.queryCommandSupported("insertHTML"))try{return e.execCommand.apply(e,d)}catch(t){}if(r=e.getSelection(),r.rangeCount){if(i=r.getRangeAt(0),l=i.commonAncestorContainer,a.isMediumEditorElement(l)&&!l.firstChild)i.selectNode(l.appendChild(e.createTextNode("")));else if(3===l.nodeType&&0===i.startOffset&&i.endOffset===l.nodeValue.length||3!==l.nodeType&&l.innerHTML===i.toString()){for(;!a.isMediumEditorElement(l)&&l.parentNode&&1===l.parentNode.childNodes.length&&!a.isMediumEditorElement(l.parentNode);)l=l.parentNode;i.selectNode(l)}for(i.deleteContents(),o=e.createElement("div"),o.innerHTML=n,s=e.createDocumentFragment();o.firstChild;)u=o.firstChild,c=s.appendChild(u);i.insertNode(s),c&&(i=i.cloneRange(),i.setStartAfter(c),i.collapse(!0),t.selection.selectRange(e,i)),f=!0}return e.execCommand.callListeners&&e.execCommand.callListeners(d,f),f},execFormatBlock:function(e,n){var r,i=a.getTopBlockContainer(t.selection.getSelectionStart(e));if("blockquote"===n){if(i&&(r=Array.prototype.slice.call(i.childNodes),r.some(function(t){return a.isBlockContainer(t)})))return e.execCommand("outdent",!1,null);if(a.isIE)return e.execCommand("indent",!1,n)}if(i&&n===i.nodeName.toLowerCase()&&(n="p"),a.isIE&&(n="<"+n+">"),i&&"blockquote"===i.nodeName.toLowerCase()){if(a.isIE&&"

"===n)return e.execCommand("outdent",!1,n);if((a.isFF||a.isEdge)&&"p"===n)return r=Array.prototype.slice.call(i.childNodes),r.some(function(t){return!a.isBlockContainer(t)})&&e.execCommand("formatBlock",!1,n),e.execCommand("outdent",!1,n)}return e.execCommand("formatBlock",!1,n)},setTargetBlank:function(t,e){var n,r=e||!1;if("a"===t.nodeName.toLowerCase())t.target="_blank",t.rel="noopener noreferrer";else for(t=t.getElementsByTagName("a"),n=0;nr?(i=i.parentNode,n-=1):(o=o.parentNode,r-=1);for(;i!==o;)i=i.parentNode,o=o.parentNode;return i},isElementAtBeginningOfBlock:function(t){for(var e,n;!a.isBlockContainer(t)&&!a.isMediumEditorElement(t);){for(n=t;n=n.previousSibling;)if(e=3===n.nodeType?n.nodeValue:n.textContent,e.length>0)return!1;t=t.parentNode}return!0},isMediumEditorElement:function(t){return t&&t.getAttribute&&!!t.getAttribute("data-medium-editor-element")},getContainerEditorElement:function(t){return a.traverseUp(t,function(t){return a.isMediumEditorElement(t)})},isBlockContainer:function(t){return t&&3!==t.nodeType&&-1!==a.blockContainerElementNames.indexOf(t.nodeName.toLowerCase())},getClosestBlockContainer:function(t){return a.traverseUp(t,function(t){return a.isBlockContainer(t)||a.isMediumEditorElement(t)})},getTopBlockContainer:function(t){var e=!!a.isBlockContainer(t)&&t;return a.traverseUp(t,function(t){return a.isBlockContainer(t)&&(e=t),!(e||!a.isMediumEditorElement(t))&&(e=t,!0)}),e},getFirstSelectableLeafNode:function(t){for(;t&&t.firstChild;)t=t.firstChild;if(t=a.traverseUp(t,function(t){return-1===a.emptyElementNames.indexOf(t.nodeName.toLowerCase())}),"table"===t.nodeName.toLowerCase()){var e=t.querySelector("th, td");e&&(t=e)}return t},getFirstTextNode:function(t){return a.warn("getFirstTextNode is deprecated and will be removed in version 6.0.0"),a._getFirstTextNode(t)},_getFirstTextNode:function(t){if(3===t.nodeType)return t;for(var e=0;e0){var i,o=r.getRangeAt(0),a=o.cloneRange();a.selectNodeContents(t),a.setEnd(o.startContainer,o.startOffset),i=a.toString().length,n={start:i,end:i+o.toString().length},this.doesRangeStartWithImages(o,e)&&(n.startsWithImage=!0);var s=this.getTrailingImageCount(t,n,o.endContainer,o.endOffset);if(s&&(n.trailingImageCount=s),0!==i){var u=this.getIndexRelativeToAdjacentEmptyBlocks(e,t,o.startContainer,o.startOffset);-1!==u&&(n.emptyBlocksIndex=u)}}return n},importSelection:function(t,e,n,r){if(t&&e){var i=n.createRange();i.setStart(e,0),i.collapse(!0);var o,a=e,s=[],u=0,c=!1,l=!1,f=0,d=!1,h=!1,p=null;for((r||t.startsWithImage||void 0!==t.emptyBlocksIndex)&&(h=!0);!d&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||l){if(t.trailingImageCount&&l&&("img"===a.nodeName.toLowerCase()&&f++,f===t.trailingImageCount)){for(var v=0;a.parentNode.childNodes[v]!==a;)v++;i.setEnd(a.parentNode,v+1),d=!0}if(!d&&1===a.nodeType)for(var m=a.childNodes.length-1;m>=0;)s.push(a.childNodes[m]),m-=1}else o=u+a.length,!c&&t.start>=u&&t.start<=o&&(h||t.start=u&&t.end<=o&&(t.trailingImageCount?l=!0:(i.setEnd(a,t.end-u),d=!0)),u=o;d||(a=s.pop())}!c&&p&&(i.setStart(p,p.length),i.setEnd(p,p.length)),void 0!==t.emptyBlocksIndex&&(i=this.importSelectionMoveCursorPastBlocks(n,e,t.emptyBlocksIndex,i)),r&&(i=this.importSelectionMoveCursorPastAnchor(t,i)),this.selectRange(n,i)}},importSelectionMoveCursorPastAnchor:function(e,n){var r=function(t){return"a"===t.nodeName.toLowerCase()};if(e.start===e.end&&3===n.startContainer.nodeType&&n.startOffset===n.startContainer.nodeValue.length&&t.util.traverseUp(n.startContainer,r)){for(var i=n.startContainer,o=n.startContainer.parentNode;null!==o&&"a"!==o.nodeName.toLowerCase();)o.childNodes[o.childNodes.length-1]!==i?o=null:(i=o,o=o.parentNode);if(null!==o&&"a"===o.nodeName.toLowerCase()){for(var a=null,s=0;null===a&&s0)break}else a===u.currentNode&&(s=u.currentNode);return s||(s=a),o.setStart(t.util.getFirstSelectableLeafNode(s),0),o},getIndexRelativeToAdjacentEmptyBlocks:function(n,r,i,o){if(i.textContent.length>0&&o>0)return-1;var a=i;if(3!==a.nodeType&&(a=i.childNodes[o]),a){if(!t.util.isElementAtBeginningOfBlock(a))return-1;var s=t.util.findPreviousSibling(a);if(!s)return-1;if(s.nodeValue)return-1}for(var u=t.util.getClosestBlockContainer(i),c=n.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,e,!1),l=0;c.nextNode();){var f=""===c.currentNode.textContent;if((f||l>0)&&(l+=1),c.currentNode===u)return l;f||(l=0)}return l},doesRangeStartWithImages:function(t,e){if(0!==t.startOffset||1!==t.startContainer.nodeType)return!1;if("img"===t.startContainer.nodeName.toLowerCase())return!0;var n=t.startContainer.querySelector("img");if(!n)return!1;for(var r=e.createTreeWalker(t.startContainer,NodeFilter.SHOW_ALL,null,!1);r.nextNode();){var i=r.currentNode;if(i===n)break;if(i.nodeValue)return!1}return!0},getTrailingImageCount:function(t,e,n,r){if(0===r||1!==n.nodeType)return 0;if("img"!==n.nodeName.toLowerCase()&&!n.querySelector("img"))return 0;for(var i=n.childNodes[r-1];i.hasChildNodes();)i=i.lastChild;for(var o,a=t,s=[],u=0,c=!1,l=!1,f=!1,d=0;!f&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||l){if("img"===a.nodeName.toLowerCase()&&d++,a===i)f=!0;else if(1===a.nodeType)for(var h=a.childNodes.length-1;h>=0;)s.push(a.childNodes[h]),h-=1}else d=0,o=u+a.length,!c&&e.start>=u&&e.start<=o&&(c=!0),c&&e.end>=u&&e.end<=o&&(l=!0),u=o;f||(a=s.pop())}return d},selectionContainsContent:function(t){var e=t.getSelection();if(!e||e.isCollapsed||!e.rangeCount)return!1;if(""!==e.toString().trim())return!0;var n=this.getSelectedParentElement(e.getRangeAt(0));return!(!n||!("img"===n.nodeName.toLowerCase()||1===n.nodeType&&n.querySelector("img")))},selectionInContentEditableFalse:function(t){var e,n=this.findMatchingSelectionParent(function(t){var n=t&&t.getAttribute("contenteditable");return"true"===n&&(e=!0),"#text"!==t.nodeName&&"false"===n},t);return!e&&n},getSelectionHtml:function(t){var e,n,r,i="",o=t.getSelection();if(o.rangeCount){for(r=t.createElement("div"),e=0,n=o.rangeCount;e-1?[e]:e,Array.prototype.forEach.call(e,function(t){t.addEventListener(n,r,i),this.events.push([t,n,r,i])}.bind(this))},detachDOMEvent:function(e,n,r,i){var o,a,s=this.base.options.contentWindow,u=this.base.options.ownerDocument;null!==e&&(e=t.util.isElement(e)||[s,u].indexOf(e)>-1?[e]:e,Array.prototype.forEach.call(e,function(t){-1!==(o=this.indexOfListener(t,n,r,i))&&(a=this.events.splice(o,1)[0],a[0].removeEventListener(a[1],a[2],a[3]))}.bind(this)))},indexOfListener:function(t,e,n,r){var i,o,a;for(i=0,o=this.events.length;i0&&(r=-1!==i.indexOf(t.nodeName.toLowerCase())),!r&&this.style&&(e=this.style.value.split("|"),n=this.window.getComputedStyle(t,null).getPropertyValue(this.style.prop),e.forEach(function(t){this.knownState||((r=-1!==n.indexOf(t))||"text-decoration"!==this.style.prop)&&(this.knownState=r)},this)),r)}});e.isBuiltInButton=function(e){return"string"==typeof e&&t.extensions.button.prototype.defaults.hasOwnProperty(e)},t.extensions.button=e}(),function(){t.extensions.button.prototype.defaults={bold:{name:"bold",action:"bold",aria:"bold",tagNames:["b","strong"],style:{prop:"font-weight",value:"700|bold"},useQueryState:!0,contentDefault:"B",contentFA:''},italic:{name:"italic",action:"italic",aria:"italic",tagNames:["i","em"],style:{prop:"font-style",value:"italic"},useQueryState:!0,contentDefault:"I",contentFA:''},underline:{name:"underline",action:"underline",aria:"underline",tagNames:["u"],style:{prop:"text-decoration",value:"underline"},useQueryState:!0,contentDefault:"U",contentFA:''},strikethrough:{name:"strikethrough",action:"strikethrough",aria:"strike through",tagNames:["strike"],style:{prop:"text-decoration",value:"line-through"},useQueryState:!0,contentDefault:"A",contentFA:''},superscript:{name:"superscript",action:"superscript",aria:"superscript",tagNames:["sup"],contentDefault:"x1",contentFA:''},subscript:{name:"subscript",action:"subscript",aria:"subscript",tagNames:["sub"],contentDefault:"x1",contentFA:''},image:{name:"image",action:"image",aria:"image",tagNames:["img"],contentDefault:"image",contentFA:''},html:{name:"html",action:"html",aria:"evaluate html",tagNames:["iframe","object"],contentDefault:"html",contentFA:''},orderedlist:{name:"orderedlist",action:"insertorderedlist",aria:"ordered list",tagNames:["ol"],useQueryState:!0,contentDefault:"1.",contentFA:''},unorderedlist:{name:"unorderedlist",action:"insertunorderedlist",aria:"unordered list",tagNames:["ul"],useQueryState:!0,contentDefault:"",contentFA:''},indent:{name:"indent",action:"indent",aria:"indent",tagNames:[],contentDefault:"",contentFA:''},outdent:{name:"outdent",action:"outdent",aria:"outdent",tagNames:[],contentDefault:"",contentFA:''},justifyCenter:{name:"justifyCenter",action:"justifyCenter",aria:"center justify",tagNames:[],style:{prop:"text-align",value:"center"},contentDefault:"C",contentFA:''},justifyFull:{name:"justifyFull",action:"justifyFull",aria:"full justify",tagNames:[],style:{prop:"text-align",value:"justify"},contentDefault:"J",contentFA:''},justifyLeft:{name:"justifyLeft",action:"justifyLeft",aria:"left justify",tagNames:[],style:{prop:"text-align",value:"left"},contentDefault:"L",contentFA:''},justifyRight:{name:"justifyRight",action:"justifyRight",aria:"right justify",tagNames:[],style:{prop:"text-align",value:"right"},contentDefault:"R",contentFA:''},removeFormat:{name:"removeFormat",aria:"remove formatting",action:"removeFormat",contentDefault:"X",contentFA:''},quote:{name:"quote",action:"append-blockquote",aria:"blockquote",tagNames:["blockquote"],contentDefault:"",contentFA:''},pre:{name:"pre",action:"append-pre",aria:"preformatted text",tagNames:["pre"],contentDefault:"0101",contentFA:''},h1:{name:"h1",action:"append-h1",aria:"header type one",tagNames:["h1"],contentDefault:"H1",contentFA:'1'},h2:{name:"h2",action:"append-h2",aria:"header type two",tagNames:["h2"],contentDefault:"H2",contentFA:'2'},h3:{name:"h3",action:"append-h3",aria:"header type three",tagNames:["h3"],contentDefault:"H3",contentFA:'3'},h4:{name:"h4",action:"append-h4",aria:"header type four",tagNames:["h4"],contentDefault:"H4",contentFA:'4'},h5:{name:"h5",action:"append-h5",aria:"header type five",tagNames:["h5"],contentDefault:"H5",contentFA:'5'},h6:{name:"h6",action:"append-h6",aria:"header type six",tagNames:["h6"],contentDefault:"H6",contentFA:'6'}}}(),function(){var e=t.extensions.button.extend({init:function(){t.extensions.button.prototype.init.apply(this,arguments)},formSaveLabel:"✓",formCloseLabel:"×",activeClass:"medium-editor-toolbar-form-active",hasForm:!0,getForm:function(){},isDisplayed:function(){return!!this.hasForm&&this.getForm().classList.contains(this.activeClass)},showForm:function(){this.hasForm&&this.getForm().classList.add(this.activeClass)},hideForm:function(){this.hasForm&&this.getForm().classList.remove(this.activeClass)},showToolbarDefaultActions:function(){var t=this.base.getExtensionByName("toolbar");t&&t.showToolbarDefaultActions()},hideToolbarDefaultActions:function(){var t=this.base.getExtensionByName("toolbar");t&&t.hideToolbarDefaultActions()},setToolbarPosition:function(){var t=this.base.getExtensionByName("toolbar");t&&t.setToolbarPosition()}});t.extensions.form=e}(),function(){var e=t.extensions.form.extend({customClassOption:null,customClassOptionText:"Button",linkValidation:!1,placeholderText:"Paste or type a link",targetCheckbox:!1,targetCheckboxText:"Open in new window",name:"anchor",action:"createLink",aria:"link",tagNames:["a"],contentDefault:"#",contentFA:'',init:function(){t.extensions.form.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this))},handleClick:function(e){e.preventDefault(),e.stopPropagation();var n=t.selection.getSelectionRange(this.document);return"a"===n.startContainer.nodeName.toLowerCase()||"a"===n.endContainer.nodeName.toLowerCase()||t.util.getClosestTag(t.selection.getSelectedParentElement(n),"a")?this.execAction("unlink"):(this.isDisplayed()||this.showForm(),!1)},handleKeydown:function(e){t.util.isKey(e,t.util.keyCode.K)&&t.util.isMetaCtrlKey(e)&&!e.shiftKey&&this.handleClick(e)},getForm:function(){return this.form||(this.form=this.createForm()),this.form},getTemplate:function(){var t=[''];return t.push('',"fontawesome"===this.getEditorOption("buttonLabels")?'':this.formSaveLabel,""),t.push('',"fontawesome"===this.getEditorOption("buttonLabels")?'':this.formCloseLabel,""),this.targetCheckbox&&t.push('

','','","
"),this.customClassOption&&t.push('
','',"","
"),t.join("")},isDisplayed:function(){return t.extensions.form.prototype.isDisplayed.apply(this)},hideForm:function(){t.extensions.form.prototype.hideForm.apply(this),this.getInput().value=""},showForm:function(e){var n=this.getInput(),r=this.getAnchorTargetCheckbox(),i=this.getAnchorButtonCheckbox();if(e=e||{value:""},"string"==typeof e&&(e={value:e}),this.base.saveSelection(),this.hideToolbarDefaultActions(),t.extensions.form.prototype.showForm.apply(this),this.setToolbarPosition(),n.value=e.value,n.focus(),r&&(r.checked="_blank"===e.target),i){var o=e.buttonClass?e.buttonClass.split(" "):[];i.checked=-1!==o.indexOf(this.customClassOption)}},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},getFormOpts:function(){var t=this.getAnchorTargetCheckbox(),e=this.getAnchorButtonCheckbox(),n={value:this.getInput().value.trim()};return this.linkValidation&&(n.value=this.checkLinkFormat(n.value)),n.target="_self",t&&t.checked&&(n.target="_blank"),e&&e.checked&&(n.buttonClass=this.customClassOption),n},doFormSave:function(){var t=this.getFormOpts();this.completeFormSave(t)},completeFormSave:function(t){this.base.restoreSelection(),this.execAction(this.action,t),this.base.checkSelection()},ensureEncodedUri:function(t){return t===decodeURI(t)?encodeURI(t):t},ensureEncodedUriComponent:function(t){return t===decodeURIComponent(t)?encodeURIComponent(t):t},ensureEncodedParam:function(t){var e=t.split("="),n=e[0],r=e[1];return n+(void 0===r?"":"="+this.ensureEncodedUriComponent(r))},ensureEncodedQuery:function(t){return t.split("&").map(this.ensureEncodedParam.bind(this)).join("&")},checkLinkFormat:function(t){var e=/^([a-z]+:)?\/\/|^(mailto|tel|maps):|^\#/i,n=e.test(t),r="",i=/^\+?\s?\(?(?:\d\s?\-?\)?){3,20}$/,o=t.match(/^(.*?)(?:\?(.*?))?(?:#(.*))?$/),a=o[1],s=o[2],u=o[3];if(i.test(t))return"tel:"+t;if(!n){var c=a.split("/")[0];(c.match(/.+(\.|:).+/)||"localhost"===c)&&(r="http://")}return r+this.ensureEncodedUri(a)+(void 0===s?"":"?"+this.ensureEncodedQuery(s))+(void 0===u?"":"#"+u)},doFormCancel:function(){this.base.restoreSelection(),this.base.checkSelection()},attachFormEvents:function(t){var e=t.querySelector(".medium-editor-toolbar-close"),n=t.querySelector(".medium-editor-toolbar-save"),r=t.querySelector(".medium-editor-toolbar-input");this.on(t,"click",this.handleFormClick.bind(this)),this.on(r,"keyup",this.handleTextboxKeyup.bind(this)),this.on(e,"click",this.handleCloseClick.bind(this)),this.on(n,"click",this.handleSaveClick.bind(this),!0)},createForm:function(){var t=this.document,e=t.createElement("div");return e.className="medium-editor-toolbar-form",e.id="medium-editor-toolbar-form-anchor-"+this.getEditorId(),e.innerHTML=this.getTemplate(),this.attachFormEvents(e),e},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},getAnchorTargetCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-target")},getAnchorButtonCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-button")},handleTextboxKeyup:function(e){if(e.keyCode===t.util.keyCode.ENTER)return e.preventDefault(),void this.doFormSave();e.keyCode===t.util.keyCode.ESCAPE&&(e.preventDefault(),this.doFormCancel())},handleFormClick:function(t){t.stopPropagation()},handleSaveClick:function(t){t.preventDefault(),this.doFormSave()},handleCloseClick:function(t){t.preventDefault(),this.doFormCancel()}});t.extensions.anchor=e}(),function(){var e=t.Extension.extend({name:"anchor-preview",hideDelay:500,previewValueSelector:"a",showWhenToolbarIsVisible:!1,showOnEmptyLinks:!0,init:function(){this.anchorPreview=this.createPreview(),this.getEditorOption("elementsContainer").appendChild(this.anchorPreview),this.attachToEditables()},getInteractionElements:function(){return this.getPreviewElement()},getPreviewElement:function(){return this.anchorPreview},createPreview:function(){var t=this.document.createElement("div");return t.id="medium-editor-anchor-preview-"+this.getEditorId(),t.className="medium-editor-anchor-preview",t.innerHTML=this.getTemplate(),this.on(t,"click",this.handleClick.bind(this)),t},getTemplate:function(){return'
'},destroy:function(){this.anchorPreview&&(this.anchorPreview.parentNode&&this.anchorPreview.parentNode.removeChild(this.anchorPreview),delete this.anchorPreview)},hidePreview:function(){this.anchorPreview&&this.anchorPreview.classList.remove("medium-editor-anchor-preview-active"),this.activeAnchor=null},showPreview:function(t){return!(!this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")&&!t.getAttribute("data-disable-preview"))||(this.previewValueSelector&&(this.anchorPreview.querySelector(this.previewValueSelector).textContent=t.attributes.href.value,this.anchorPreview.querySelector(this.previewValueSelector).href=t.attributes.href.value),this.anchorPreview.classList.add("medium-toolbar-arrow-over"),this.anchorPreview.classList.remove("medium-toolbar-arrow-under"),this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||this.anchorPreview.classList.add("medium-editor-anchor-preview-active"),this.activeAnchor=t,this.positionPreview(),this.attachPreviewHandlers(),this)},positionPreview:function(t){t=t||this.activeAnchor;var e,n,r,i,o,a=this.window.innerWidth,s=this.anchorPreview.offsetHeight,u=t.getBoundingClientRect(),c=this.diffLeft,l=this.diffTop,f=this.getEditorOption("elementsContainer"),d=["absolute","fixed"].indexOf(window.getComputedStyle(f).getPropertyValue("position"))>-1,h={};e=this.anchorPreview.offsetWidth/2;var p=this.base.getExtensionByName("toolbar");p&&(c=p.diffLeft,l=p.diffTop),n=c-e,d?(i=f.getBoundingClientRect(),["top","left"].forEach(function(t){h[t]=u[t]-i[t]}),h.width=u.width,h.height=u.height,u=h,a=i.width,o=f.scrollTop):o=this.window.pageYOffset,r=u.left+u.width/2,o+=s+u.top+u.height-l-this.anchorPreview.offsetHeight,this.anchorPreview.style.top=Math.round(o)+"px",this.anchorPreview.style.right="initial",rthis.hideDelay&&this.detachPreviewHandlers()},detachPreviewHandlers:function(){clearInterval(this.intervalTimer),this.instanceHandlePreviewMouseover&&(this.off(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.activeAnchor&&(this.off(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout))),this.hidePreview(),this.hovering=this.instanceHandlePreviewMouseover=this.instanceHandlePreviewMouseout=null},attachPreviewHandlers:function(){this.lastOver=(new Date).getTime(),this.hovering=!0,this.instanceHandlePreviewMouseover=this.handlePreviewMouseover.bind(this),this.instanceHandlePreviewMouseout=this.handlePreviewMouseout.bind(this),this.intervalTimer=setInterval(this.updatePreview.bind(this),200),this.on(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.on(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout)}});t.extensions.anchorPreview=e}(),function(){function e(e){return!t.util.getClosestTag(e,"a")}var n,r,i,o,a;n=[" ","\t","\n","\r"," "," "," "," "," ","\u2028","\u2029"],r="com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw",i="(((?:(https?://|ftps?://|nntp://)|www\\d{0,3}[.]|[a-z0-9.\\-]+[.]("+r+")\\/)\\S+(?:[^\\s`!\\[\\]{};:'\".,?«»“”‘’])))|(([a-z0-9\\-]+\\.)?[a-z0-9\\-]+\\.("+r+"))",o=new RegExp("^("+r+")$","i"),a=new RegExp(i,"gi");var s=t.Extension.extend({init:function(){t.Extension.prototype.init.apply(this,arguments),this.disableEventHandling=!1,this.subscribe("editableKeypress",this.onKeypress.bind(this)),this.subscribe("editableBlur",this.onBlur.bind(this)),this.document.execCommand("AutoUrlDetect",!1,!1)},isLastInstance:function(){for(var t=0,e=0;e0&&null!==a;)i=n.currentNode,o=i.nodeValue,o.length>e?(a=i.splitText(o.length-e),e=0):(a=n.previousNode(),e-=o.length);return a},performLinkingWithinElement:function(e){for(var n=this.findLinkableText(e),r=0;r1;)i.appendChild(r.childNodes[1])}});t.extensions.autoLink=s}(),function(){function e(e){var r=t.util.getContainerEditorElement(e);Array.prototype.slice.call(r.parentElement.querySelectorAll("."+n)).forEach(function(t){t.classList.remove(n)})}var n="medium-editor-dragover",r=t.Extension.extend({name:"fileDragging",allowedTypes:["image"],init:function(){t.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(t){t.preventDefault(),t.dataTransfer.dropEffect="copy";var r=t.target.classList?t.target:t.target.parentElement;e(r),"dragover"===t.type&&r.classList.add(n)},handleDrop:function(t){t.preventDefault(),t.stopPropagation(),this.base.selectElement(t.target);var n=this.base.exportSelection();n.start=n.end,this.base.importSelection(n),t.dataTransfer.files&&Array.prototype.slice.call(t.dataTransfer.files).forEach(function(t){this.isAllowedFile(t)&&t.type.match("image")&&this.insertImageFile(t)},this),e(t.target)},isAllowedFile:function(t){return this.allowedTypes.some(function(e){return!!t.type.match(e)})},insertImageFile:function(e){if("function"==typeof FileReader){var n=new FileReader;n.readAsDataURL(e),n.addEventListener("load",function(e){var n=this.document.createElement("img");n.src=e.target.result,t.util.insertHTMLCommand(this.document,n.outerHTML)}.bind(this))}}});t.extensions.fileDragging=r}(),function(){var e=t.Extension.extend({name:"keyboard-commands",commands:[{command:"bold",key:"B",meta:!0,shift:!1,alt:!1},{command:"italic",key:"I",meta:!0,shift:!1,alt:!1},{command:"underline",key:"U",meta:!0,shift:!1,alt:!1}],init:function(){t.Extension.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.keys={},this.commands.forEach(function(t){var e=t.key.charCodeAt(0);this.keys[e]||(this.keys[e]=[]),this.keys[e].push(t)},this)},handleKeydown:function(e){var n=t.util.getKeyCode(e);if(this.keys[n]){var r=t.util.isMetaCtrlKey(e),i=!!e.shiftKey,o=!!e.altKey;this.keys[n].forEach(function(t){t.meta!==r||t.shift!==i||t.alt!==o&&void 0!==t.alt||(e.preventDefault(),e.stopPropagation(),"function"==typeof t.command?t.command.apply(this):!1!==t.command&&this.execAction(t.command))},this)}}});t.extensions.keyboardCommands=e}(),function(){var e=t.extensions.form.extend({name:"fontname",action:"fontName",aria:"change font name",contentDefault:"±",contentFA:'',fonts:["","Arial","Verdana","Times New Roman"],init:function(){t.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(t){if(t.preventDefault(),t.stopPropagation(),!this.isDisplayed()){var e=this.document.queryCommandValue("fontName")+"";this.showForm(e)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return"block"===this.getForm().style.display},hideForm:function(){this.getForm().style.display="none",this.getSelect().value=""},showForm:function(t){var e=this.getSelect();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),e.value=t||"",e.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontName(),this.base.checkSelection()},createForm:function(){var t,e=this.document,n=e.createElement("div"),r=e.createElement("select"),i=e.createElement("a"),o=e.createElement("a");n.className="medium-editor-toolbar-form",n.id="medium-editor-toolbar-form-fontname-"+this.getEditorId(),this.on(n,"click",this.handleFormClick.bind(this));for(var a=0;a
':"✓",n.appendChild(o),this.on(o,"click",this.handleSaveClick.bind(this),!0),i.setAttribute("href","#"),i.className="medium-editor-toobar-close",i.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'':"×",n.appendChild(i),this.on(i,"click",this.handleCloseClick.bind(this)),n},getSelect:function(){return this.getForm().querySelector("select.medium-editor-toolbar-select")},clearFontName:function(){t.selection.getSelectedElements(this.document).forEach(function(t){"font"===t.nodeName.toLowerCase()&&t.hasAttribute("face")&&t.removeAttribute("face")})},handleFontChange:function(){var t=this.getSelect().value;""===t?this.clearFontName():this.execAction("fontName",{value:t})},handleFormClick:function(t){t.stopPropagation()},handleSaveClick:function(t){t.preventDefault(),this.doFormSave()},handleCloseClick:function(t){t.preventDefault(),this.doFormCancel()}});t.extensions.fontName=e}(),function(){var e=t.extensions.form.extend({name:"fontsize",action:"fontSize",aria:"increase/decrease font size",contentDefault:"±",contentFA:'',init:function(){t.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(t){if(t.preventDefault(),t.stopPropagation(),!this.isDisplayed()){var e=this.document.queryCommandValue("fontSize")+"";this.showForm(e)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return"block"===this.getForm().style.display},hideForm:function(){this.getForm().style.display="none",this.getInput().value=""},showForm:function(t){var e=this.getInput();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),e.value=t||"",e.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontSize(),this.base.checkSelection()},createForm:function(){var t=this.document,e=t.createElement("div"),n=t.createElement("input"),r=t.createElement("a"),i=t.createElement("a");return e.className="medium-editor-toolbar-form",e.id="medium-editor-toolbar-form-fontsize-"+this.getEditorId(),this.on(e,"click",this.handleFormClick.bind(this)),n.setAttribute("type","range"),n.setAttribute("min","1"),n.setAttribute("max","7"),n.className="medium-editor-toolbar-input",e.appendChild(n),this.on(n,"change",this.handleSliderChange.bind(this)),i.setAttribute("href","#"),i.className="medium-editor-toobar-save",i.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'':"✓",e.appendChild(i),this.on(i,"click",this.handleSaveClick.bind(this),!0),r.setAttribute("href","#"),r.className="medium-editor-toobar-close",r.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'':"×",e.appendChild(r),this.on(r,"click",this.handleCloseClick.bind(this)),e},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},clearFontSize:function(){t.selection.getSelectedElements(this.document).forEach(function(t){"font"===t.nodeName.toLowerCase()&&t.hasAttribute("size")&&t.removeAttribute("size")})},handleSliderChange:function(){var t=this.getInput().value;"4"===t?this.clearFontSize():this.execAction("fontSize",{value:t})},handleFormClick:function(t){t.stopPropagation()},handleSaveClick:function(t){t.preventDefault(),this.doFormSave()},handleCloseClick:function(t){t.preventDefault(),this.doFormCancel()}});t.extensions.fontSize=e}(),function(){function e(){return[[new RegExp(/^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g),""],[new RegExp(/|/g),""],[new RegExp(/
$/i),""],[new RegExp(/<[^>]*docs-internal-guid[^>]*>/gi),""],[new RegExp(/<\/b>(]*>)?$/gi),""],[new RegExp(/\s+<\/span>/g)," "],[new RegExp(/
/g),"
"],[new RegExp(/]*(font-style:italic;font-weight:(bold|700)|font-weight:(bold|700);font-style:italic)[^>]*>/gi),''],[new RegExp(/]*font-style:italic[^>]*>/gi),''],[new RegExp(/]*font-weight:(bold|700)[^>]*>/gi),''],[new RegExp(/<(\/?)(i|b|a)>/gi),"<$1$2>"],[new RegExp(/<a(?:(?!href).)+href=(?:"|”|“|"|“|”)(((?!"|”|“|"|“|”).)*)(?:"|”|“|"|“|”)(?:(?!>).)*>/gi),''],[new RegExp(/<\/p>\n+/gi),"

"],[new RegExp(/\n+

/gi),""],[new RegExp(/(((?!/gi),"$1"]]}function n(t,e,n){var r=t.clipboardData||e.clipboardData||n.dataTransfer,i={};if(!r)return i;if(r.getData){var o=r.getData("Text");o&&o.length>0&&(i["text/plain"]=o)}if(r.types)for(var a=0;a1)for(o=0;o"+t.util.htmlEntities(i[o])+"

");else a=t.util.htmlEntities(i[0]);t.util.insertHTMLCommand(this.document,a)},handlePasteBinPaste:function(t){if(t.defaultPrevented)return void this.removePasteBin();var e=n(t,this.window,this.document),r=e["text/html"],o=e["text/plain"],a=i;if(!this.cleanPastedHTML||r)return t.preventDefault(),this.removePasteBin(),this.doPaste(r,o,a),void this.trigger("editablePaste",{currentTarget:a,target:a},a);setTimeout(function(){this.cleanPastedHTML&&(r=this.getPasteBinHtml()),this.removePasteBin(),this.doPaste(r,o,a),this.trigger("editablePaste",{currentTarget:a,target:a},a)}.bind(this),0)},handleKeydown:function(e,n){t.util.isKey(e,t.util.keyCode.V)&&t.util.isMetaCtrlKey(e)&&(e.stopImmediatePropagation(),this.removePasteBin(),this.createPasteBin(n))},createPasteBin:function(e){var n,a=t.selection.getSelectionRange(this.document),s=this.window.pageYOffset;i=e,a&&(n=a.getClientRects(),n.length?s+=n[0].top:void 0!==a.startContainer.getBoundingClientRect?s+=a.startContainer.getBoundingClientRect().top:s+=a.getBoundingClientRect().top),r=a;var u=this.document.createElement("div");u.id=this.pasteBinId="medium-editor-pastebin-"+ +Date.now(),u.setAttribute("style","border: 1px red solid; position: absolute; top: "+s+"px; width: 10px; height: 10px; overflow: hidden; opacity: 0"),u.setAttribute("contentEditable",!0),u.innerHTML="%ME_PASTEBIN%",this.document.body.appendChild(u),this.on(u,"focus",o),this.on(u,"focusin",o),this.on(u,"focusout",o),u.focus(),t.selection.selectNode(u,this.document),this.boundHandlePaste||(this.boundHandlePaste=this.handlePasteBinPaste.bind(this)),this.on(u,"paste",this.boundHandlePaste)},removePasteBin:function(){null!==r&&(t.selection.selectRange(this.document,r),r=null),null!==i&&(i=null);var e=this.getPasteBin();e&&e&&(this.off(e,"focus",o),this.off(e,"focusin",o),this.off(e,"focusout",o),this.off(e,"paste",this.boundHandlePaste),e.parentElement.removeChild(e))},getPasteBin:function(){return this.document.getElementById(this.pasteBinId)},getPasteBinHtml:function(){var t=this.getPasteBin();if(!t)return!1;if(t.firstChild&&"mcepastebin"===t.firstChild.id)return!1;var e=t.innerHTML;return!(!e||"%ME_PASTEBIN%"===e)&&e},cleanPaste:function(t){var n,r,i,o,a=/"+t.split("

").join("

")+"

",r=i.querySelectorAll("a,p,div,br"),n=0;n"+r.innerHTML+"
":i.innerHTML=r.innerHTML,r.parentNode.replaceChild(i,r);for(o=e.querySelectorAll("span"),n=0;n0&&(r[0].classList.add(this.firstButtonClass),r[r.length-1].classList.add(this.lastButtonClass)),s},destroy:function(){this.toolbar&&(this.toolbar.parentNode&&this.toolbar.parentNode.removeChild(this.toolbar),delete this.toolbar)},getInteractionElements:function(){return this.getToolbarElement()},getToolbarElement:function(){return this.toolbar||(this.toolbar=this.createToolbar()),this.toolbar},getToolbarActionsElement:function(){return this.getToolbarElement().querySelector(".medium-editor-toolbar-actions")},initThrottledMethods:function(){this.throttledPositionToolbar=t.util.throttle(function(){this.base.isActive&&this.positionToolbarIfShown()}.bind(this))},attachEventHandlers:function(){this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableClick",this.handleEditableClick.bind(this)),this.subscribe("editableKeyup",this.handleEditableKeyup.bind(this)),this.on(this.document.documentElement,"mouseup",this.handleDocumentMouseup.bind(this)),this.static&&this.sticky&&this.on(this.window,"scroll",this.handleWindowScroll.bind(this),!0),this.on(this.window,"resize",this.handleWindowResize.bind(this))},handleWindowScroll:function(){this.positionToolbarIfShown()},handleWindowResize:function(){this.throttledPositionToolbar()},handleDocumentMouseup:function(e){if(e&&e.target&&t.util.isDescendant(this.getToolbarElement(),e.target))return!1;this.checkState()},handleEditableClick:function(){setTimeout(function(){this.checkState()}.bind(this),0)},handleEditableKeyup:function(){this.checkState()},handleBlur:function(){clearTimeout(this.hideTimeout),clearTimeout(this.delayShowTimeout),this.hideTimeout=setTimeout(function(){this.hideToolbar()}.bind(this),1)},handleFocus:function(){this.checkState()},isDisplayed:function(){return this.getToolbarElement().classList.contains("medium-editor-toolbar-active")},showToolbar:function(){clearTimeout(this.hideTimeout),this.isDisplayed()||(this.getToolbarElement().classList.add("medium-editor-toolbar-active"),this.trigger("showToolbar",{},this.base.getFocusedElement()))},hideToolbar:function(){this.isDisplayed()&&(this.getToolbarElement().classList.remove("medium-editor-toolbar-active"),this.trigger("hideToolbar",{},this.base.getFocusedElement()))},isToolbarDefaultActionsDisplayed:function(){return"block"===this.getToolbarActionsElement().style.display},hideToolbarDefaultActions:function(){this.isToolbarDefaultActionsDisplayed()&&(this.getToolbarActionsElement().style.display="none")},showToolbarDefaultActions:function(){this.hideExtensionForms(),this.isToolbarDefaultActionsDisplayed()||(this.getToolbarActionsElement().style.display="block"),this.delayShowTimeout=this.base.delay(function(){this.showToolbar()}.bind(this))},hideExtensionForms:function(){this.forEachExtension(function(t){t.hasForm&&t.isDisplayed()&&t.hideForm()})},multipleBlockElementsSelected:function(){var e=/<[^\/>][^>]*><\/[^>]+>/gim,n=new RegExp("<("+t.util.blockContainerElementNames.join("|")+")[^>]*>","g"),r=t.selection.getSelectionHtml(this.document).replace(e,""),i=r.match(n);return!!i&&i.length>1},modifySelection:function(){var e=this.window.getSelection(),n=e.getRangeAt(0);if(this.standardizeSelectionStart&&n.startContainer.nodeValue&&n.startOffset===n.startContainer.nodeValue.length){var r=t.util.findAdjacentTextNodeWithContent(t.selection.getSelectionElement(this.window),n.startContainer,this.document);if(r){for(var i=0;0===r.nodeValue.substr(i,1).trim().length;)i+=1;n=t.selection.select(this.document,r,i,n.endContainer,n.endOffset)}}},checkState:function(){if(!this.base.preventSelectionUpdates){if(!this.base.getFocusedElement()||t.selection.selectionInContentEditableFalse(this.window))return this.hideToolbar();var e=t.selection.getSelectionElement(this.window);return!e||-1===this.getEditorElements().indexOf(e)||e.getAttribute("data-disable-toolbar")?this.hideToolbar():this.updateOnEmptySelection&&this.static?this.showAndUpdateToolbar():!t.selection.selectionContainsContent(this.document)||!1===this.allowMultiParagraphSelection&&this.multipleBlockElementsSelected()?this.hideToolbar():void this.showAndUpdateToolbar()}},showAndUpdateToolbar:function(){this.modifySelection(),this.setToolbarButtonStates(),this.trigger("positionToolbar",{},this.base.getFocusedElement()),this.showToolbarDefaultActions(),this.setToolbarPosition()},setToolbarButtonStates:function(){this.forEachExtension(function(t){"function"==typeof t.isActive&&"function"==typeof t.setInactive&&t.setInactive()}),this.checkActiveButtons()},checkActiveButtons:function(){var e,n=[],r=null,i=t.selection.getSelectionRange(this.document),o=function(t){"function"==typeof t.checkState?t.checkState(e):"function"==typeof t.isActive&&"function"==typeof t.isAlreadyApplied&&"function"==typeof t.setActive&&!t.isActive()&&t.isAlreadyApplied(e)&&t.setActive()};if(i&&(this.forEachExtension(function(t){if("function"==typeof t.queryCommandState&&null!==(r=t.queryCommandState()))return void(r&&"function"==typeof t.setActive&&t.setActive());n.push(t)}),e=t.selection.getSelectedParentElement(i),this.getEditorElements().some(function(n){return t.util.isDescendant(n,e,!0)})))for(;e&&(n.forEach(o),!t.util.isMediumEditorElement(e));)e=e.parentNode},positionToolbarIfShown:function(){this.isDisplayed()&&this.setToolbarPosition()},setToolbarPosition:function(){var t=this.base.getFocusedElement(),e=this.window.getSelection();if(!t)return this;!this.static&&e.isCollapsed||(this.showToolbar(),this.relativeContainer||(this.static?this.positionStaticToolbar(t):this.positionToolbar(e)),this.trigger("positionedToolbar",{},this.base.getFocusedElement()))},positionStaticToolbar:function(t){this.getToolbarElement().style.left="0";var e,n=this.document.documentElement&&this.document.documentElement.scrollTop||this.document.body.scrollTop,r=this.window.innerWidth,i=this.getToolbarElement(),o=t.getBoundingClientRect(),a=o.top+n,s=o.left+o.width/2,u=i.offsetHeight,c=i.offsetWidth,l=c/2;switch(this.sticky?n>a+t.offsetHeight-u-this.stickyTopOffset?(i.style.top=a+t.offsetHeight-u+"px",i.classList.remove("medium-editor-sticky-toolbar")):n>a-u-this.stickyTopOffset?(i.classList.add("medium-editor-sticky-toolbar"),i.style.top=this.stickyTopOffset+"px"):(i.classList.remove("medium-editor-sticky-toolbar"),i.style.top=a-u+"px"):i.style.top=a-u+"px",this.align){case"left":e=o.left;break;case"right":e=o.right-c;break;case"center":e=s-l}e<0?e=0:e+c>r&&(e=r-Math.ceil(c)-1),i.style.left=e+"px"},positionToolbar:function(t){this.getToolbarElement().style.left="0",this.getToolbarElement().style.right="initial";var e=t.getRangeAt(0),n=e.getBoundingClientRect();(!n||0===n.height&&0===n.width&&e.startContainer===e.endContainer)&&(n=1===e.startContainer.nodeType&&e.startContainer.querySelector("img")?e.startContainer.querySelector("img").getBoundingClientRect():e.startContainer.getBoundingClientRect());var r,i,o=this.window.innerWidth,a=this.getToolbarElement(),s=a.offsetHeight,u=a.offsetWidth,c=u/2,l=this.diffLeft-c,f=this.getEditorOption("elementsContainer"),d=["absolute","fixed"].indexOf(window.getComputedStyle(f).getPropertyValue("position"))>-1,h={},p={};d?(i=f.getBoundingClientRect(),["top","left"].forEach(function(t){p[t]=n[t]-i[t]}),p.width=n.width,p.height=n.height,n=p,o=i.width,h.top=f.scrollTop):h.top=this.window.pageYOffset,r=n.left+n.width/2,h.top+=n.top-s,n.top<50?(a.classList.add("medium-toolbar-arrow-over"),a.classList.remove("medium-toolbar-arrow-under"),h.top+=50+n.height-this.diffTop):(a.classList.add("medium-toolbar-arrow-under"),a.classList.remove("medium-toolbar-arrow-over"),h.top+=this.diffTop),r'),n.onload=function(){var t=this.document.getElementById(r);t&&(t.removeAttribute("id"),t.removeAttribute("class"),t.src=n.result)}.bind(this)}}.bind(this))),e.target.classList.remove("medium-editor-dragover")}});t.extensions.imageDragging=e}(),function(){function e(e){var n=t.selection.getSelectionStart(this.options.ownerDocument),r=n.textContent,i=t.selection.getCaretOffsets(n);(void 0===r[i.left-1]||""===r[i.left-1].trim()||void 0!==r[i.left]&&""===r[i.left].trim())&&e.preventDefault()}function n(e,n){if(this.options.disableReturn||n.getAttribute("data-disable-return"))e.preventDefault();else if(this.options.disableDoubleReturn||n.getAttribute("data-disable-double-return")){var r=t.selection.getSelectionStart(this.options.ownerDocument);(r&&""===r.textContent.trim()&&"li"!==r.nodeName.toLowerCase()||r.previousElementSibling&&"br"!==r.previousElementSibling.nodeName.toLowerCase()&&""===r.previousElementSibling.textContent.trim())&&e.preventDefault()}}function r(e){var n=t.selection.getSelectionStart(this.options.ownerDocument);"pre"===(n&&n.nodeName.toLowerCase())&&(e.preventDefault(),t.util.insertHTMLCommand(this.options.ownerDocument," ")),t.util.isListItem(n)&&(e.preventDefault(),e.shiftKey?this.options.ownerDocument.execCommand("outdent",!1,null):this.options.ownerDocument.execCommand("indent",!1,null))}function i(e){var n,r=t.selection.getSelectionStart(this.options.ownerDocument),i=r.nodeName.toLowerCase(),o=/^(\s+|)?$/i,a=/h\d/i;t.util.isKey(e,[t.util.keyCode.BACKSPACE,t.util.keyCode.ENTER])&&r.previousElementSibling&&a.test(i)&&0===t.selection.getCaretOffsets(r).left?t.util.isKey(e,t.util.keyCode.BACKSPACE)&&o.test(r.previousElementSibling.innerHTML)?(r.previousElementSibling.parentNode.removeChild(r.previousElementSibling),e.preventDefault()):!this.options.disableDoubleReturn&&t.util.isKey(e,t.util.keyCode.ENTER)&&(n=this.options.ownerDocument.createElement("p"),n.innerHTML="
",r.previousElementSibling.parentNode.insertBefore(n,r),e.preventDefault()):t.util.isKey(e,t.util.keyCode.DELETE)&&r.nextElementSibling&&r.previousElementSibling&&!a.test(i)&&o.test(r.innerHTML)&&a.test(r.nextElementSibling.nodeName.toLowerCase())?(t.selection.moveCursor(this.options.ownerDocument,r.nextElementSibling),r.previousElementSibling.parentNode.removeChild(r),e.preventDefault()):t.util.isKey(e,t.util.keyCode.BACKSPACE)&&"li"===i&&o.test(r.innerHTML)&&!r.previousElementSibling&&!r.parentElement.previousElementSibling&&r.nextElementSibling&&"li"===r.nextElementSibling.nodeName.toLowerCase()?(n=this.options.ownerDocument.createElement("p"),n.innerHTML="
",r.parentElement.parentElement.insertBefore(n,r.parentElement),t.selection.moveCursor(this.options.ownerDocument,n),r.parentElement.removeChild(r),e.preventDefault()):t.util.isKey(e,t.util.keyCode.BACKSPACE)&&!1!==t.util.getClosestTag(r,"blockquote")&&0===t.selection.getCaretOffsets(r).left?(e.preventDefault(),t.util.execFormatBlock(this.options.ownerDocument,"p")):t.util.isKey(e,t.util.keyCode.ENTER)&&!1!==t.util.getClosestTag(r,"blockquote")&&0===t.selection.getCaretOffsets(r).right?(n=this.options.ownerDocument.createElement("p"),n.innerHTML="
",r.parentElement.insertBefore(n,r.nextSibling),t.selection.moveCursor(this.options.ownerDocument,n),e.preventDefault()):t.util.isKey(e,t.util.keyCode.BACKSPACE)&&t.util.isMediumEditorElement(r.parentElement)&&!r.previousElementSibling&&r.nextElementSibling&&o.test(r.innerHTML)&&(e.preventDefault(),t.selection.moveCursor(this.options.ownerDocument,r.nextSibling),r.parentElement.removeChild(r))}function o(e){var n,r=t.selection.getSelectionStart(this.options.ownerDocument);r&&(t.util.isMediumEditorElement(r)&&0===r.children.length&&!t.util.isBlockContainer(r)&&this.options.ownerDocument.execCommand("formatBlock",!1,"p"),!t.util.isKey(e,t.util.keyCode.ENTER)||t.util.isListItem(r)||t.util.isBlockContainer(r)||(n=r.nodeName.toLowerCase(),"a"===n?this.options.ownerDocument.execCommand("unlink",!1,null):e.shiftKey||e.ctrlKey||this.options.ownerDocument.execCommand("formatBlock",!1,"p")))}function a(t,e){var n=e.parentNode.querySelector('textarea[medium-editor-textarea-id="'+e.getAttribute("medium-editor-textarea-id")+'"]');n&&(n.value=e.innerHTML.trim())}function s(t){t._mediumEditors||(t._mediumEditors=[null]),this.id||(this.id=t._mediumEditors.length),t._mediumEditors[this.id]=this}function u(t){t._mediumEditors&&t._mediumEditors[this.id]&&(t._mediumEditors[this.id]=null)}function c(e,n,r){var i=[];if(e||(e=[]),"string"==typeof e&&(e=n.querySelectorAll(e)),t.util.isElement(e)&&(e=[e]),r)for(var o=0;o=0&&(r=t.selection.exportSelection(e,this.options.ownerDocument)),null!==r&&0!==n&&(r.editableElementIndex=n),r},saveSelection:function(){this.selectionState=this.exportSelection()},importSelection:function(e,n){if(e){var r=this.elements[e.editableElementIndex||0];t.selection.importSelection(e,r,this.options.ownerDocument,n)}},restoreSelection:function(){this.importSelection(this.selectionState)},createLink:function(e){var n,r=t.selection.getSelectionElement(this.options.contentWindow),i={};if(-1!==this.elements.indexOf(r)){try{if(this.events.disableCustomEvent("editableInput"),e.url&&t.util.deprecated(".url option for createLink",".value","6.0.0"),(n=e.url||e.value)&&n.trim().length>0){var o=this.options.contentWindow.getSelection();if(o){var a,s,u,c,l=o.getRangeAt(0),f=l.commonAncestorContainer;if(3===l.endContainer.nodeType&&3!==l.startContainer.nodeType&&0===l.startOffset&&l.startContainer.firstChild===l.endContainer&&(f=l.endContainer),s=t.util.getClosestBlockContainer(l.startContainer),u=t.util.getClosestBlockContainer(l.endContainer),3!==f.nodeType&&0!==f.textContent.length&&s===u){var d=s||r,h=this.options.ownerDocument.createDocumentFragment();this.execAction("unlink"),a=this.exportSelection(),h.appendChild(d.cloneNode(!0)),r===d?t.selection.select(this.options.ownerDocument,d.firstChild,0,d.lastChild,3===d.lastChild.nodeType?d.lastChild.nodeValue.length:d.lastChild.childNodes.length):t.selection.select(this.options.ownerDocument,d,0,d,d.childNodes.length);var p=this.exportSelection();c=t.util.findOrCreateMatchingTextNodes(this.options.ownerDocument,h,{start:a.start-p.start,end:a.end-p.start,editableElementIndex:a.editableElementIndex}),0===c.length&&(h=this.options.ownerDocument.createDocumentFragment(),h.appendChild(f.cloneNode(!0)),c=[h.firstChild.firstChild,h.firstChild.lastChild]),t.util.createLink(this.options.ownerDocument,c,n.trim());var v=(h.firstChild.innerHTML.match(/^\s+/)||[""])[0].length;t.util.insertHTMLCommand(this.options.ownerDocument,h.firstChild.innerHTML.replace(/^\s+/,"")),a.start-=v,a.end-=v,this.importSelection(a)}else this.options.ownerDocument.execCommand("createLink",!1,n);this.options.targetBlank||"_blank"===e.target?t.util.setTargetBlank(t.selection.getSelectionStart(this.options.ownerDocument),n):t.util.removeTargetBlank(t.selection.getSelectionStart(this.options.ownerDocument),n),e.buttonClass&&t.util.addClassToAnchors(t.selection.getSelectionStart(this.options.ownerDocument),e.buttonClass)}}if(this.options.targetBlank||"_blank"===e.target||e.buttonClass){i=this.options.ownerDocument.createEvent("HTMLEvents"),i.initEvent("input",!0,!0,this.options.contentWindow);for(var m=0,g=this.elements.length;m1?e[1]:"";return{major:parseInt(n[0],10),minor:parseInt(n[1],10),revision:parseInt(n[2],10),preRelease:r,toString:function(){return[n[0],n[1],n[2]].join(".")+(r?"-"+r:"")}}},t.version=t.parseVersionString.call(this,{version:"5.23.2"}.version),t}())}).call(e,n(53))},function(t,e,n){"use strict";function r(t){if(!(void 0!==t.label&&/\S{1}/.test(t.label)&&void 0!==t.start&&/\S{1}/.test(t.start)&&void 0!==t.end&&/\S{1}/.test(t.end)||void 0!==t.label&&/\S{1}/.test(t.label)&&void 0!==t.action&&/\S{1}/.test(t.action)))return void console.error('[Custom-Button] You need to specify "label", "start" and "end" OR "label" and "action"');t.start=void 0===t.start?"":t.start,t.end=void 0===t.end?"":t.end;var e=this;this.options=t,this.button=document.createElement("button"),this.button.className="medium-editor-action",this.button.innerHTML=t.label,this.button.onclick=function(){var n=i(),r=window.getSelection(),o=r.anchorNode.parentElement;void 0===t.start||-1==n.indexOf(t.start)&&-1==n.indexOf(t.end)?(void 0!=t.action&&(n=t.action(n,!0,o)),n=t.start+n+t.end):(void 0!=t.action&&(n=t.action(n,!1,o)),n=String(n).split(t.start).join(""),n=String(n).split(t.end).join(""));var a,s;if(r.getRangeAt&&r.rangeCount){if(a=window.getSelection().getRangeAt(0),a.deleteContents(),a.createContextualFragment)s=a.createContextualFragment(n);else{var u=document.createElement("div");for(u.innerHTML=n,s=document.createDocumentFragment();child=u.firstChild;)s.appendChild(child)}var c=s.firstChild,l=s.lastChild;a.insertNode(s),c&&(a.setStartBefore(c),a.setEndAfter(l)),r.removeAllRanges(),r.addRange(a)}e.base.checkContentChanged()}}function i(){var t,e="";if(void 0!==window.getSelection){if(t=window.getSelection(),t.rangeCount){for(var n=document.createElement("div"),r=0,i=t.rangeCount;r-1&&e.indexOf(this.options.end)>-1?this.button.classList.add("medium-editor-button-active"):this.button.classList.remove("medium-editor-button-active")},void 0!==t&&t.exports&&(e=t.exports=r),e.MediumButton=r},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n0)return e.remove(),t.text(n.text())},o=function(t){var e,n,r;return r=t.data("scrivito_editors_siblings_before_edit"),n=t.siblings(),e=!r||n.filter(r).length"),e!==n))return t.html(n)},a=function(t){var e;return e=t.jQueryElement(),e.data("scrivito_editors_prepared_for_editing",!1),e.text(t.content())},n=300,s=function(t){var e;if(e=document.getSelection(),e.anchorNode&&e.focusNode)return t.find(e.anchorNode).addBack(e.anchorNode).length&&t.find(e.focusNode).addBack(e.focusNode).length?void 0:e.selectAllChildren(t[0])},r=function(t){var e;return e=t.jQueryElement(),e.attr("contenteditable",!0).blur(function(){return l(t)}).click(function(){return f(t)}).focus(function(){return d(t)}).keypress(function(e){return p(e,t)}).keyup(function(e){return p(e,t)}),"false"!==e.attr("data-scrivito-editors-autosave")&&e.on("cut input keypress keyup paste",function(){return h(t)}),v(e),e.on("click",function(t){return e.attr("contenteditable",!0),i(e),t.timeStamp-e.data("scrivito_editors_last_click")