/*! Copyright (c) 2018 Infopark AG (https://scrivito.com) */ !function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=582)}([function(e,t,n){var r,i;(function(){function n(e){function t(t,n,r,i,o,a){for(;o>=0&&o0?0:s-1;return arguments.length<3&&(i=n[a?a[u]:u],u+=e),t(n,r,i,a,u,s)}}function o(e){return function(t,n,r){n=E(n,r);for(var i=j(t),o=e>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=t(p.call(r,a,s),C.isNaN),o>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&o=0&&t<=A};C.each=C.forEach=function(e,t,n){t=k(t,n);var r,i;if(O(e))for(r=0,i=e.length;r=0},C.invoke=function(e,t){var n=p.call(arguments,2),r=C.isFunction(t);return C.map(e,function(e){var i=r?t:e[t];return null==i?i:i.apply(e,n)})},C.pluck=function(e,t){return C.map(e,C.property(t))},C.where=function(e,t){return C.filter(e,C.matcher(t))},C.findWhere=function(e,t){return C.find(e,C.matcher(t))},C.max=function(e,t,n){var r,i,o=-1/0,a=-1/0;if(null==t&&null!=e){e=O(e)?e:C.values(e);for(var s=0,u=e.length;so&&(o=r)}else t=E(t,n),C.each(e,function(e,n,r){((i=t(e,n,r))>a||i===-1/0&&o===-1/0)&&(o=e,a=i)});return o},C.min=function(e,t,n){var r,i,o=1/0,a=1/0;if(null==t&&null!=e){e=O(e)?e:C.values(e);for(var s=0,u=e.length;sr||void 0===n)return 1;if(nt?(a&&(clearTimeout(a),a=null),s=c,o=e.apply(r,i),a||(r=i=null)):a||!1===n.trailing||(a=setTimeout(u,l)),o}},C.debounce=function(e,t,n){var r,i,o,a,s,u=function(){var c=C.now()-a;c=0?r=setTimeout(u,t-c):(r=null,n||(s=e.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,t)),c&&(s=e.apply(o,i),o=i=null),s}},C.wrap=function(e,t){return C.partial(t,e)},C.negate=function(e){return function(){return!e.apply(this,arguments)}},C.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},C.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},C.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},C.once=C.partial(C.before,2);var M=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];C.keys=function(e){if(!C.isObject(e))return[];if(y)return y(e);var t=[];for(var n in e)C.has(e,n)&&t.push(n);return M&&s(e,t),t},C.allKeys=function(e){if(!C.isObject(e))return[];var t=[];for(var n in e)t.push(n);return M&&s(e,t),t},C.values=function(e){for(var t=C.keys(e),n=t.length,r=Array(n),i=0;i":">",'"':""","'":"'","`":"`"},R=C.invert(F),B=function(e){var t=function(t){return e[t]},n="(?:"+C.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};C.escape=B(F),C.unescape=B(R),C.result=function(e,t,n){var r=null==e?void 0:e[t];return void 0===r&&(r=n),C.isFunction(r)?r.call(e):r};var z=0;C.uniqueId=function(e){var t=++z+"";return e?e+t:t},C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var W=/(.)^/,q={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},H=/\\|'|\r|\n|\u2028|\u2029/g,U=function(e){return"\\"+q[e]};C.template=function(e,t,n){!t&&n&&(t=n),t=C.defaults({},t,C.templateSettings);var r=RegExp([(t.escape||W).source,(t.interpolate||W).source,(t.evaluate||W).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(r,function(t,n,r,a,s){return o+=e.slice(i,s).replace(H,U),i=s+t.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t}),o+="';\n",t.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(t.variable||"obj","_",o)}catch(e){throw e.source=o,e}var s=function(e){return a.call(this,e,C)};return s.source="function("+(t.variable||"obj")+"){\n"+o+"}",s},C.chain=function(e){var t=C(e);return t._chain=!0,t};var V=function(e,t){return e._chain?C(t).chain():t};C.mixin=function(e){C.each(C.functions(e),function(t){var n=C[t]=e[t];C.prototype[t]=function(){var e=[this._wrapped];return h.apply(e,arguments),V(this,n.apply(C,e))}})},C.mixin(C),C.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=l[e];C.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],V(this,n)}}),C.each(["concat","join","slice"],function(e){var t=l[e];C.prototype[e]=function(){return V(this,t.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(t,r))&&(e.exports=i)}).call(this)},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){var r=this.constructor;void 0===n&&(n=!0);var i=e.call(this,t)||this,o=r.prototype;if(Object.setPrototypeOf?Object.setPrototypeOf(i,o):i.__proto__=o,i._captureStackTrace=n,n)if(Error.captureStackTrace)Error.captureStackTrace(i,i.constructor);else{var a=void 0;try{throw new Error}catch(e){a=e.stack}Object.defineProperty(i,"stack",{value:a})}return i}return r(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return this.constructor.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"captureStackTrace",{get:function(){return!!this._captureStackTrace},enumerable:!0,configurable:!0}),t}(Error);t.ScrivitoError=i;var o=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.httpCode=n,i.backendCode=r,i}return r(t,e),t.for=function(e,n,r){return"binary.unprocessable.image.transform.source.too_large"===r?new m(e,n,r):r&&-1!==r.indexOf("binary.unprocessable.image.transform.source.")?new g(e,n,r):new t(e,n,r)},t}(i);t.ClientError=o;var a=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return r(t,e),t}(o);t.AccessDeniedError=a;var s=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t}(i);t.ArgumentError=s;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(i);t.CommunicationError=u;var c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.httpCode=n,r}return r(t,e),t}(u);t.BackendError=c;var l=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t}(i);t.InternalError=l;var f=function(e){function t(t){var n=this,r=t.status;return n=e.call(this,0===r?t.statusText:t.responseText)||this,n.httpCode=r,n.response=t,n}return r(t,e),t}(u);t.NetworkError=f;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(u);t.RequestFailedError=d;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(i);t.RateLimitExceededError=h;var p=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t}(i);t.ResourceNotFoundError=p;var v=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r)||this;return o.details=i||{},o}return r(t,e),t}(o);t.UnauthorizedError=v;var m=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return r(t,e),t}(o);t.TransformationSourceTooLargeError=m;var g=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return r(t,e),t}(o);t.TransformationSourceInvalidError=g;var y=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t}(l);t.TranslationError=y;var b=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t}(l);t.NavigateToEmptyBinaryError=b;var w=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t}(l);t.CurrentPageNotFoundError=w;var _=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t}(y);t.InterpolationError=_},,function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:[];return"/"===e?["/"].concat(a(t)):d(h(e),[e].concat(a(t)))}function h(e){var t=e.split("/");return t.pop(),1===t.length?"/":t.join("/")}function p(e){var t=["_path"];if(M.default.difference(M.default.keys(e),t).length)throw new I.ArgumentError('Currently only "_path" copy option is supported.')}Object.defineProperty(t,"__esModule",{value:!0});var v=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(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 e(e,t){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:null;return(new O.default).and(e,t,n,r)}},{key:"getByPath",value:function(e){var t=(0,z.firstValueFromIterable)(this.where("_path","equals",e));if(t)return t}},{key:"getByPermalink",value:function(e){var t=this.where("_permalink","equals",e),n=(0,z.firstValueFromIterable)(t);if(n)return n}}]),g(t,[{key:"id",value:function(){return this._current._id}},{key:"objClass",value:function(){return this._current._obj_class}},{key:"obj",value:function(){return this}},{key:"createdAt",value:function(){return(0,C.parseStringToDate)(this._current._created_at)}},{key:"createdBy",value:function(){return this._current._created_by}},{key:"lastChanged",value:function(){return this._current._last_changed?(0,C.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 e=this.parentPath();if(e)return t.getByPath(e)}},{key:"hasConflicts",value:function(){return!!this._current._conflicts}},{key:"modification",value:function(){return this._current._deleted||this._current._marked_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:"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:"children",value:function(){if(this.path()){var e=t.all().and("_parentPath","equals",this.path());return(0,z.arrayFromIterable)(e)}return[]}},{key:"hasChildren",value:function(){return!!this.children().length}},{key:"orderedChildren",value:function(){var e=this.children(),t=this.get("childOrder","referencelist");return M.default.isArray(t)?M.default.sortBy(e,function(e){var n=M.default.invoke(t,"id"),r=n.indexOf(e.id());return-1===r?t.length:r}):e}},{key:"backlinks",value:function(){return(0,z.arrayFromIterable)(t.where("*","linksTo",this))}},{key:"ancestors",value:function(){var e=this.parentPath();return e?d(e).map(function(e){return t.getByPath(e)}):[]}},{key:"update",value:function(e){var t=this,n=scrivito.typeInfo.normalizeAttrs(e);(0,W.withBatchedUpdates)(function(){t._persistWidgets(t,n);var e=S.serialize(n);t.objData.update(e)}),this._linkResolution.start()}},{key:"destroy",value:function(){this.update({_markedDeleted:[!0]})}},{key:"insertWidget",value:function(e,t){var n=t.before,r=t.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)),[e],a(u.slice(d)));l.update(o({},c,[h,"widgetlist"]))}},{key:"removeWidget",value:function(e){var t=this.fieldContainingWidget(e);t.update(M.default.reject(t.get(),function(t){return t.equals(e)}))}},{key:"copyAsync",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return p(e),this._copyAttributes().then(function(n){var r=M.default.extend(n,e),i=t.createWithSerializedAttributes(r);return i.finishSaving().then(function(){return i})})}},{key:"moveToAsync",value:function(e){return this.update({_path:[e+"/"+this.id()]}),this.finishSaving()}},{key:"markResolvedAsync",value:function(){return this.update({_conflicts:[null]}),this.finishSaving()}},{key:"finishSaving",value:function(){var e=this;return this._linkResolution.finishResolving().then(function(){return e.objData.finishSaving()})}},{key:"equals",value:function(e){return e instanceof t&&this.id()===e.id()}},{key:"widget",value:function(e){return this.widgetData(e)?A.default.build(e,this):null}},{key:"widgets",value:function(){var e=this;return M.default.map(M.default.keys(this._widgetPool),function(t){return e.widget(t)})}},{key:"widgetData",value:function(e){return this._widgetPool[e]}},{key:"fieldContainingWidget",value:function(e){var t=this._widgetPlacementFor(e.id()),n=t.container,r=t.attributeName;return n.field(r,"widgetlist")}},{key:"generateWidgetId",value:function(){for(var e=0;e<10;e++){var t=(0,R.randomHex)();if(!this.widget(t))return t}throw new I.InternalError("Could not generate a new unused widget id.")}},{key:"serializeAttributes",value:function(){var e=m(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"serializeAttributes",this).call(this);return delete e._conflicts,delete e._modification,delete e._created_at,delete e._created_by,delete e._last_changed,delete e._last_changed_by,e}},{key:"slug",value:function(){var e=this.get("title","string");return(0,_.default)(e)}},{key:"toPrettyPrint",value:function(){return"[object "+this.objClass()+' id="'+this.id()+'"]'}},{key:"_binaryData",value:function(e){var t=this.get("blob","binary");return t&&t.raw()[e]()}},{key:"_hasParentPath",value:function(){return this.path()&&"/"!==this.path()}},{key:"_copyAttributes",value:function(){var e=t.generateId(),n=this.serializeAttributes(),r=[];return M.default.each(n,function(t,i){if("_"===i[0])return void delete n[i];var o=v(t,2),a=o[0],s=o[1];if("binary"===a&&s){var u=new F.default({idToCopy:s.id}),c=u.intoId(e).then(function(e){return{name:i,binary:e}});r.push(c)}}),n._id=e,n._obj_class=this.objClass(),this.path()&&(n._path=this.parentPath()+"/"+e),scrivito.Promise.all(r).then(function(e){return M.default.each(e,function(e){var t=e.name,r=e.binary;n[t]=["binary",{id:r.id()}]}),n})}},{key:"_widgetPlacementFor",value:function(e){var t=(0,b.default)(this._current,e),n=t.parentWidgetId?this.widget(t.parentWidgetId):this,r=(0,B.camelCase)(t.attributeName),i=n.get(r,"widgetlist");return M.default.extend(t,{container:n,attributeName:r,attributeValue:i})}},{key:"_widgetPool",get:function(){return this._current._widget_pool||{}}},{key:"_systemAttributes",get:function(){return q}},{key:"_current",get:function(){return this.objData.current}},{key:"_linkResolution",get:function(){return scrivito.uiAdapter.linkResolutionFor(this.objData)}}]),t}(N.default);t.default=H},function(e,t,n){function r(e,t){!0!==e&&(i(t)?t=t():o(t)&&(t='Assert failed (turn on "Pause on exceptions" in your Source panel)'),r.fail(t))}var i=n(9),o=n(23),a=n(158),s=n(88);r.fail=a,r.stringify=s,e.exports=r},function(e,t,n){"use strict";function r(e){e?(d=void 0,h=e.stateController(),t.appState=e.createAppState(),t.cmsState=e.cmsState()):(d=new v.default,h=d,t.appState=i(),t.cmsState=d.subState("cms"),t.uiState=d.subState("ui"))}function i(){if(!d)throw new p.InternalError;var e=(m++).toString();return d.subState("apps").subState(e)}function o(e){return h.withBatchedUpdates(e)}function a(e){return h.subscribe(e)}function s(e){return h.trackChanges(e)}function u(e,t){return h.withFrozenState(e,t)}function c(e){return h.failIfFrozen(e)}function l(){if(!d)throw new p.InternalError;return d.listenerCount()}function f(){if(!d)throw new p.InternalError;d.clear()}Object.defineProperty(t,"__esModule",{value:!0});var d,h,p=n(1),v=n(141);t.initializeGlobalState=r;var m=0;t.createAppState=i,t.withBatchedUpdates=o,t.subscribe=a,t.trackChanges=s,t.withFrozenState=u,t.failIfFrozen=c,t.listenerCount=l,t.reset=f},,function(e,t,n){var r=n(10),i=n(45);e.exports=function(e){return r(e)?e.displayName:i(e)}},function(e,t,n){"use strict";function r(e){function t(){var n=o.capture(function(){try{return{errorThrown:!1,run:o.default.run(function(){return l.withFrozenState({contextName:"Scrivito.load",message:"Use an async callback: Scrivito.load(/* ... */).then(/* ... */)."},e)})}}catch(e){return{errorThrown:!0,error:e}}});if(!n.isAllDataUpToDate()){n.loadRequiredData();var r=new i.default,s=a.subscribe(function(){r.resolve(void 0),s()});return r.promise.then(t)}var u=n.result;if(u.errorThrown)throw u.error;var f=u.run;if(!f.success)throw new c.InternalError;return f.result}return f(e),new scrivito.Promise(function(e){return e(t())})}Object.defineProperty(t,"__esModule",{value:!0});var i=n(15),o=n(16),a=n(5),s=n(34),u=n(21),c=n(1),l=n(5),f=s.checkArgumentsFor("load",[["loadableFunction",u.tcomb.Function]],{docPermalink:"js-sdk/load"});t.default=r},function(e,t){e.exports=function(e){return"function"==typeof e}},function(e,t,n){var r=n(9),i=n(25);e.exports=function(e){return r(e)&&i(e.meta)}},,function(e,t){e.exports=React},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new l.ArgumentError("Scrivito.connect expects either a plain function or a subclass of React.Component");return i(a(e)?e:o(e))}function i(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.componentWillMount=function(){var t=this;this._scrivitoUnsubscribeModelState=f.subscribe(function(){t._scrivitoIsStateChangeDetected&&t._scrivitoIsStateChangeDetected()&&t.forceUpdate()}),e.prototype.componentWillMount&&e.prototype.componentWillMount.call(this)},t.prototype.componentWillUnmount=function(){this._scrivitoUnsubscribeModelState&&this._scrivitoUnsubscribeModelState(),e.prototype.componentWillUnmount&&e.prototype.componentWillUnmount.call(this)},t.prototype.render=function(){var t,n=this;return this._scrivitoIsStateChangeDetected=f.trackChanges(function(){var r=c.capture(function(){return c.default.run(function(){return f.withFrozenState({contextName:"React.Component#render",message:"Use one of the React lifecycle hooks."},function(){return e.prototype.render.call(n)})})});r.loadRequiredData();var i=r.result;if(r.isAllDataLoaded()){if(!i.success)throw new h.InternalError;t=i.result}else{var o=i.success?i.result:null;t=n._scrivitoHandleLoading(o)}}),t},t.prototype._scrivitoHandleLoading=function(e){return this._scrivitoRenderWhileLoading?this._scrivitoRenderWhileLoading():e},t}(e);return t.displayName=d.default(e),t}function o(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return s(n,t),n.prototype.render=function(){return e(this.props)},n}(u.Component);return t.displayName=d.default(e),t}function a(e){return"function"==typeof e&&e.prototype&&e.prototype.isReactComponent}var s=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var u=n(12),c=n(16),l=n(1),f=n(5),d=n(105),h=n(1);t.default=r},function(e,t,n){n(4),n(60),n(9),n(46);e.exports=function(e,t){function n(e,t){return e}return n.meta={kind:"irreducible",name:e,predicate:t,identity:!0},n.displayName=e,n.is=t,n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){var e=this;this.promise=new scrivito.Promise(function(t,n){e.resolve=function(n){e.settled=!0,t(n)},e.reject=function(t){e.settled=!0,n(t)}})}return e.prototype.isPending=function(){return!this.settled},e}();t.default=r},function(e,t,n){"use strict";function r(){var e=d.current();e&&(e.allDataLoaded=!1)}function i(e){return f.runWith(!1,e)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=n(86),s=n(151),u=n(66),c=n(86);t.capture=c.capture;var l=0,f=new u.default,d=new u.default,h=function(){function e(e){var t=e.state,n=e.loader,r=e.invalidation,i=e.throwNotLoaded;if(!t)throw new o.InternalError("LoadableData needs state");this.value=new s.default(t),this.loader=n,this.invalidation=r,this.throwNotLoaded=i||!1}return e.throwNotLoaded=function(){throw r(),new scrivito.NotLoadedError(f.current())},e.run=function(e){var t={allDataLoaded:!0};try{return{success:!0,result:d.runWith(t,function(){return i(e)}),allDataLoaded:t.allDataLoaded}}catch(e){if(t.allDataLoaded)throw e;return{success:!1,allDataLoaded:!1}}},e.prototype.get=function(){var t=this;if(this.isAvailable())return this.reloadIfOutdated(),this.value.value();if(this.isError())throw this.reloadIfOutdated(),this.value.error();r(),a.notifyMissingData(function(){return t.progressLoading()}),this.throwNotLoaded&&e.throwNotLoaded()},e.prototype.set=function(e){this.value.transitionToAvailable(e,this.currentVersion())},e.prototype.setError=function(e){this.transitionToError(e)},e.prototype.reset=function(){this.value.transitionToMissing()},e.prototype.isMissing=function(){return"MISSING"===this.value.status()},e.prototype.isLoading=function(){return void 0!==this.value.getLoading()},e.prototype.isAvailable=function(){return"AVAILABLE"===this.value.status()},e.prototype.isError=function(){return"ERROR"===this.value.status()},e.prototype.triggerLoading=function(){var e=this;if(!this.isLoading()){var t=l++,n=function(){return e.value.getLoading()===t},r=function(e){n()&&e()},i=this.currentVersion(),o=[],a=function(e){return o.push(e)},s=function(){return o.forEach(function(e){return e()})};this.loader({push:a,isReload:function(){return e.hasBeenInvalidated()},wasCancelled:function(){return!n()}}).then(function(t){return r(function(){return scrivito.batchedStateUpdater.add(function(){e.value.transitionToAvailable(t,i),s()})})},function(t){return r(function(){return scrivito.batchedStateUpdater.add(function(){e.transitionToError(t,i),s()})})}),this.value.setLoading(t)}},e.prototype.transitionToError=function(e,t){void 0===t&&(t=this.currentVersion()),this.value.transitionToError(e,t)},e.prototype.reloadIfOutdated=function(){var e=this;this.hasBeenInvalidated()&&a.notifyOutdatedData(function(){return e.progressLoading()})},e.prototype.progressLoading=function(){(this.hasBeenInvalidated()||!this.isAvailable()&&!this.isError())&&this.triggerLoading()},e.prototype.hasBeenInvalidated=function(){return!!this.invalidation&&(!this.isMissing()&&this.currentVersion()!==this.value.version())},e.prototype.currentVersion=function(){var e=this.invalidation;if(e){var t=e();if("number"==typeof t&&isNaN(t)){var n="invalidation callback returned unsuitable version "+t;throw new o.InternalError(n)}return t}},e}();t.default=h},,function(e,t,n){var r=n(23),i=n(60);e.exports=function(e){return r(e)||i(e)}},function(e,t,n){"use strict";function r(e){return m.test(e)}function i(e){return h.test(e)}function o(e){return e.replace(f,function(e,t){return"_"+t.toLowerCase()})}function a(e){return e.replace(l,function(e,t,n,r){return r?n.toUpperCase()===n?e:""+t.substr(1)+n.toUpperCase():e})}function s(e){var t=a(e);return t.charAt(0).toUpperCase()+t.slice(1)}function u(e){return e.replace(p," ").replace(v,function(e){return" "+e.toLowerCase()}).replace(d,function(e){return" "+e}).trim().replace(/./,c)}function c(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}Object.defineProperty(t,"__esModule",{value:!0});var l=/(_+)(\w)/g,f=/([A-Z])/g,d=/[A-Z]+|\d+/g,h=/^_?(_+[A-Z0-9]|[^_])+$/,p=/[_\s]+/g,v=/[A-Z][a-z]+/g,m=/^[a-z0-9_:]+$/;t.camelCase=a,t.classify=s,t.isCamelCase=i,t.isUnderscore=r,t.sentenceCase=u,t.underscore=o},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tcomb=void 0;var r=n(156),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(r);i.struct.strict=!0,i.interface.strict=!0,i.fail=function(e){throw new TypeError(e)},t.tcomb=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if((0,c.isArray)(t))return(0,c.map)(t,function(t){return i(e,t)});if(t instanceof h.default)return o(t,e.objClassFor(t.objClass()));if(t instanceof v.default){var n=t.objClass();return o(t,e.widgetClassFor(n))}return t instanceof g.default?e.defaultClassForLinks.build(t.buildAttributes()):t}function o(e,t){var n=Object.create(t.prototype);return n._scrivitoPrivateContent=e,n}function a(e){return(0,c.isArray)(e)?(0,c.map)(e,s):s(e)}function s(e){return e&&e._scrivitoPrivateContent?e._scrivitoPrivateContent:e}function u(e,t,n){return(0,c.mapObject)(e,function(e,r){if((0,f.default)(r))return[e];var i=t.attributes[r];if(!i)throw new y.ArgumentError('Attribute "'+r+'" is not defined for CMS object class "'+n+'".');return[a(e),i]})}Object.defineProperty(t,"__esModule",{value:!0}),t.wrapInAppClass=i,t.buildAppClassInstance=o,t.unwrapAppClassValues=a,t.unwrapAppClassValue=s,t.unwrapAppAttributes=u;var c=n(0),l=n(42),f=r(l),d=n(3),h=r(d),p=n(30),v=r(p),m=n(35),g=r(m),y=n(1)},function(e,t){e.exports=function(e){return null===e||void 0===e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){var n=scrivito.computeCacheKey([e,t]);return g.cmsState.subState("binary").subState(n)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n-1){return/[^.\\]*$/.exec(this.raw().filename())[0].toLowerCase()}}},{key:"equals",value:function(t){return t instanceof e&&t.id()===this.id()&&t.isPrivate()===this.isPrivate()&&(0,f.isEqual)(t.definition(),this.definition())}},{key:"isImage",value:function(){var e=this.raw().contentType();return!!e&&"image"===e.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()||C}},{key:"_loadUrlData",value:function(){var e="blobs/"+encodeURIComponent(this._id),t=void 0;return this._definition&&(e+="/optimize",t={transformation:this._definition}),scrivito.CmsRestApi.get(e,t)}},{key:"_assertNotTransformed",value:function(e){if(this._isTransformed())throw new d.ScrivitoError('"'+e+'" is not available for transformed images. Use "Scrivito.Binary#raw" to access the untransformed version of the image.')}},{key:"_isTransformed",value:function(){return!!this._definition}}],[{key:"upload",value:function(e,t){if(S(e,t),!(b.FileType.is(e)||t&&t.filename))throw new d.ArgumentError("Expected a filename to be passed with Blob as the source.");return new p.default({source:e},t)}},{key:"store",value:function(t,n,r){var i=n.transformation;new l.default({state:o(t,i)}).set(r);var a=new e(t);return i?a.optimizeFor(i):a}},{key:"storeMetadata",value:function(e,t){return m.default.store(e,t)}}]),e}(),E=y.tcomb.struct({contentType:y.tcomb.maybe(y.tcomb.String),filename:y.tcomb.maybe(y.tcomb.String)}),x=y.tcomb.refinement(y.tcomb.Object,function(e){return b.BlobType.is(e)||b.FileType.is(e)},"Blob or File"),S=(0,w.checkArgumentsFor)("Binary.upload",[["source",x],["options",y.tcomb.maybe(E)]],{docPermalink:"js-sdk/Binary-static-upload"});t.default=k},function(e,t,n){var r=n(23),i=n(26);e.exports=function(e){return!r(e)&&"object"==typeof e&&!i(e)}},function(e,t){e.exports=function(e){return Array.isArray?Array.isArray(e):e instanceof Array}},function(e,t,n){var r=(n(4),n(89),n(10));n(7);e.exports=function(e){return!r(e)||e.meta.identity}},function(e,t,n){var r=n(10);n(45),n(4),n(88);e.exports=function(e,t,n){return r(e)?e.meta.identity||"object"!=typeof t||null===t?e(t,n):new e(t,n):t}},function(e,t,n){var r=n(10);e.exports=function(e,t){return r(t)?t.is(e):e instanceof t}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){if(!e)throw new y.ArgumentError('Please provide a widget class as the "_objClass" property.')}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function e(e,t){for(var n=0;n=1,r=arguments.length>=2;if(!(this instanceof i))return n?r?new i(e,t):new i(e):new i;if(void 0===e){if(n)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&n)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}function o(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function a(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function s(e){return"Array"===a(e)}function u(e,t){var n,r,i={};if("RegExp"===a(t))i=null;else if(s(t))for(n=0,r=t.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(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return i.domAttributes[t]}},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(e,t){var n=i.encode(e+"");return void 0===t&&(t=i.escapeQuerySpace),t?n.replace(/%20/g,"+"):n},i.decodeQuery=function(e,t){e+="",void 0===t&&(t=i.escapeQuerySpace);try{return i.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var b,w={encode:"encode",decode:"decode"},_=function(e,t){return function(n){try{return i[t](n+"").replace(i.characters[e][t].expression,function(n){return i.characters[e][t].map[n]})}catch(e){return n}}};for(b in w)i[b+"PathSegment"]=_("pathname",w[b]),i[b+"UrnPathSegment"]=_("urnpath",w[b]);var C=function(e,t,n){return function(r){var o;o=n?function(e){return i[t](i[n](e))}:i[t];for(var a=(r+"").split(e),s=0,u=a.length;s-1&&(t.fragment=e.substring(n+1)||null,e=e.substring(0,n)),n=e.indexOf("?"),n>-1&&(t.query=e.substring(n+1)||null,e=e.substring(0,n)),"//"===e.substring(0,2)?(t.protocol=null,e=e.substring(2),e=i.parseAuthority(e,t)):(n=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,n)||null,t.protocol&&!t.protocol.match(i.protocol_expression)?t.protocol=void 0:"//"===e.substring(n+1,n+3)?(e=e.substring(n+3),e=i.parseAuthority(e,t)):(e=e.substring(n+1),t.urn=!0)),t.path=e,t},i.parseHost=function(e,t){e=e.replace(/\\/g,"/");var n,r,i=e.indexOf("/");if(-1===i&&(i=e.length),"["===e.charAt(0))n=e.indexOf("]"),t.hostname=e.substring(1,n)||null,t.port=e.substring(n+2,i)||null,"/"===t.port&&(t.port=null);else{var o=e.indexOf(":"),a=e.indexOf("/"),s=e.indexOf(":",o+1);-1!==s&&(-1===a||s-1?r:e.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=t(h,l,d,e);void 0!==g?(g=String(g),e=e.slice(0,l)+g+e.slice(d),r.lastIndex=l+g.length):r.lastIndex=d}}return r.lastIndex=0,e},i.ensureValidHostname=function(t){if(t.match(i.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-] and Punycode.js is not available');if(e.toASCII(t).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]')}},i.noConflict=function(e){if(e){var t={URI:this.noConflict()};return r.URITemplate&&"function"==typeof r.URITemplate.noConflict&&(t.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"==typeof r.IPv6.noConflict&&(t.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"==typeof r.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=r.SecondLevelDomains.noConflict()),t}return r.URI===this&&(r.URI=m),this},g.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||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(e,t){var n=this.query(e,t);return"string"==typeof n&&n.length?"?"+n:n},g.hash=function(e,t){var n=this.fragment(e,t);return"string"==typeof n&&n.length?"#"+n:n},g.pathname=function(e,t){if(void 0===e||!0===e){var n=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?i.decodeUrnPath:i.decodePath)(n):n}return this._parts.urn?this._parts.path=e?i.recodeUrnPath(e):"":this._parts.path=e?i.recodePath(e):"/",this.build(!t),this},g.path=g.pathname,g.href=function(e,t){var n;if(void 0===e)return this.toString();this._string="",this._parts=i._parts();var r=e instanceof i,o="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName){e=e[i.getDomAttribute(e)]||"",o=!1}if(!r&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=i.parse(String(e),this._parts);else{if(!r&&!o)throw new TypeError("invalid input");var a=r?e._parts:e;for(n in a)y.call(this._parts,n)&&(this._parts[n]=a[n])}return this.build(!t),this},g.is=function(e){var t=!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),t=r||o,a=!t,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)),e.toLowerCase()){case"relative":return l;case"absolute":return!l;case"domain":case"name":return a;case"sld":return s;case"ip":return t;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(e,t){if(void 0!==e&&e&&(e=e.replace(/:(\/\/)?$/,""),!e.match(i.protocol_expression)))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return k.call(this,e,t)},g.scheme=g.protocol,g.port=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e&&(0===e&&(e=null),e&&(e+="",":"===e.charAt(0)&&(e=e.substring(1)),e.match(/[^0-9]/))))throw new TypeError('Port "'+e+'" contains characters other than [0-9]');return E.call(this,e,t)},g.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var n={};if("/"!==i.parseHost(e,n))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=n.hostname}return x.call(this,e,t)},g.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var n=this.protocol();return this.authority()?(n?n+"://":"")+this.authority():""}var r=i(e);return this.protocol(r.protocol()).authority(r.authority()).build(!t),this},g.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},g.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},g.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var n=i.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==e[e.length-1]&&(e+="@"),i.parseUserinfo(e,this._parts),this.build(!t),this},g.resource=function(e,t){var n;return void 0===e?this.path()+this.search()+this.hash():(n=i.parse(e),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!t),this)},g.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){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 e&&"."!==e.charAt(e.length-1)&&(e+="."),e&&i.ensureValidHostname(e),this._parts.hostname=this._parts.hostname.replace(s,e),this.build(!t),this},g.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){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(t).length-1;return r=this._parts.hostname.lastIndexOf(".",r-1)+1,this._parts.hostname.substring(r)||""}if(!e)throw new TypeError("cannot set domain empty");if(i.ensureValidHostname(e),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var a=new RegExp(o(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(a,e)}return this.build(!t),this},g.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(r+1);return!0!==t&&n&&n.list[i.toLowerCase()]?n.get(this._parts.hostname)||i:i}var a;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');a=new RegExp(o(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(a,e)}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,e)}return this.build(!t),this},g.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){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 e?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")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=i.recodePath(e),this._parts.path=this._parts.path.replace(u,e),this.build(!t),this},g.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),r=this._parts.path.substring(n+1);return e?i.decodePathSegment(r):r}var a=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(a=!0);var s=new RegExp(o(this.filename())+"$");return e=i.recodePath(e),this._parts.path=this._parts.path.replace(s,e),a?this.normalizePath(t):this.build(!t),this},g.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){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:"",e?i.decodePathSegment(r):r)}"."===e.charAt(0)&&(e=e.substring(1));var u,c=this.suffix();if(c)u=e?new RegExp(o(c)+"$"):new RegExp(o("."+c)+"$");else{if(!e)return this;this._parts.path+="."+i.recodePath(e)}return u&&(e=i.recodePath(e),this._parts.path=this._parts.path.replace(u,e)),this.build(!t),this},g.segment=function(e,t,n){var r=this._parts.urn?":":"/",i=this.path(),o="/"===i.substring(0,1),a=i.split(r);if(void 0!==e&&"number"!=typeof e&&(n=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(o&&a.shift(),e<0&&(e=Math.max(a.length+e,0)),void 0===t)return void 0===e?a:a[e];if(null===e||void 0===a[e])if(s(t)){a=[];for(var u=0,c=t.length;un)return"Expected "+n+" arguments, got "+r;var i=c.flatten(t.map(function(t,n){var r=t[0],i=t[1],a=e[n];return s.tcomb.validate(a,i).errors.map(function(e){return o(r,e)})}));return i.length>0?i.join(" "):void 0}function o(e,t){var n=a(e,t);if(void 0===t.actual)return"Missing required "+n+".";if(t.expected===s.tcomb.Nil)return"Unexpected "+n+".";var r=s.tcomb.getTypeName(t.expected);return"Unexpected value for "+n+": got "+u.default(t.actual)+", expected type "+r+"."}function a(e,t){var n="argument '"+e+"'";return 0===t.path.length?n:"key '"+t.path.join("/")+"' in "+n}Object.defineProperty(t,"__esModule",{value:!0});var s=n(21),u=n(37),c=n(0),l=n(1);t.checkArgumentsFor=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){var t=l.default.without.apply(l.default,[l.default.keys(e)].concat(y));if(!l.default.isEmpty(t))throw new g.ArgumentError("Unexpected attributes "+(0,m.default)(t)+". Available attributes: "+(0,m.default)(y))}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n0)throw e[0]}}function a(){l=!0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,t.throwNextTick=i,t.simulateNextTicks=o,t.enableNextTickCapture=a;var s=n(0),u=function(e){return e&&e.__esModule?e:{default:e}}(s),c=[],l=void 0},function(e,t,n){"use strict";function r(e){try{return(0,u.isFunction)(e)?o(e):(0,u.isObject)(e)?i(e):a(e)}catch(e){return""}}function i(e){var t=e._scrivitoPrivateContent;return t&&(0,u.isFunction)(t.toPrettyPrint)?t.toPrettyPrint():(0,u.isElement)(e)?"[object HTMLElement "+a(e.outerHTML)+"]":a(e)}function o(e){var t=e._scrivitoPrivateSchema;if(t)return"[class "+t.name+"]";if(e.prototype&&e.prototype.isReactComponent){return'[class React.Component "'+(e.displayName||e.name)+'"]'}return s(e.toString())}function a(e){var t=JSON.stringify(e);return t?s(t):t}function s(e){return e.length>100?e.slice(0,100)+"...":e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var u=n(0)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n"}},function(e,t,n){var r=n(4),i=n(7);e.exports=function(e,t){r(!(e instanceof t),function(){return"Cannot use the new operator to instantiate the type "+i(t)})}},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this._query=[].concat(t.query||[]),this._batchSize=t.batchSize,this._offset=t.offset,this._sortBy=t.sortBy,this._sortDirection=t.sortDirection,this._includeDeleted=t.includeDeleted}return v(e,[{key:"and",value:function(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(t instanceof e)this._query=[].concat(i(this._query),i(t._query));else{var u=a(t,n,r);o&&(s(n),u.boost=h(o)),this._query.push(u)}return this}},{key:"andNot",value:function(e,t,n){var r=a(e,t,n);return u(t),r.negate=!0,this._query.push(r),this}},{key:"offset",value:function(e){return this._offset=e,this}},{key:"order",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";return this._sortBy=p(e),this._sortDirection=t,this}},{key:"batchSize",value:function(e){return this._batchSize=e,this}},{key:"includeDeleted",value:function(){return this._includeDeleted=!0,this}},{key:"count",value:function(){return this.getObjDataQuery().count()}},{key:"iterator",value:function(){var e=this.getObjDataQuery().iterator();return{next:function(){var t=e.next(),n=t.done,r=t.value;return n?{done:n}:{done:n,value:new g.default(r)}}}}},{key:"getObjDataQuery",value:function(){return w.get(this.params(),this.getBatchSize())}},{key:"getBatchSize",value:function(){return this._batchSize||100}},{key:"facet",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new C.default(p(e),t,this._query).result()}},{key:"store",value:function(e){w.store(this.params(),e)}},{key:"params",value:function(){return(0,k.omit)({query:this._query,offset:this._offset,sortBy:this._sortBy,sortDirection:this._sortDirection,includeDeleted:this._includeDeleted,batchSize:this._batchSize},k.isUndefined)}}]),e}();t.default=j},function(e,t,n){var r,i;/*! * jQuery JavaScript Library v1.11.1 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2014-05-01T17:42Z */ !function(t,n){"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,o){function a(e){var t=e.length,n=se.type(e);return"function"!==n&&!se.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e))}function s(e,t,n){if(se.isFunction(t))return se.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return se.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ve.test(t))return se.filter(t,e,n);t=se.filter(t,e)}return se.grep(e,function(e){return se.inArray(e,t)>=0!==n})}function u(e,t){do{e=e[t]}while(e&&1!==e.nodeType);return e}function c(e){var t=Ce[e]={};return se.each(e.match(_e)||[],function(e,n){t[n]=!0}),t}function l(){ge.addEventListener?(ge.removeEventListener("DOMContentLoaded",f,!1),n.removeEventListener("load",f,!1)):(ge.detachEvent("onreadystatechange",f),n.detachEvent("onload",f))}function f(){(ge.addEventListener||"load"===event.type||"complete"===ge.readyState)&&(l(),se.ready())}function d(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(Te,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Se.test(n)?se.parseJSON(n):n)}catch(e){}se.data(e,t,n)}else n=void 0}return n}function h(e){var t;for(t in e)if(("data"!==t||!se.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function p(e,t,n,r){if(se.acceptData(e)){var i,o,a=se.expando,s=e.nodeType,u=s?se.cache:e,c=s?e[a]:e[a]&&a;if(c&&u[c]&&(r||u[c].data)||void 0!==n||"string"!=typeof t)return c||(c=s?e[a]=X.pop()||se.guid++:a),u[c]||(u[c]=s?{}:{toJSON:se.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[c]=se.extend(u[c],t):u[c].data=se.extend(u[c].data,t)),o=u[c],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[se.camelCase(t)]=n),"string"==typeof t?null==(i=o[t])&&(i=o[se.camelCase(t)]):i=o,i}}function v(e,t,n){if(se.acceptData(e)){var r,i,o=e.nodeType,a=o?se.cache:e,s=o?e[se.expando]:se.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){se.isArray(t)?t=t.concat(se.map(t,se.camelCase)):t in r?t=[t]:(t=se.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!h(r):!se.isEmptyObject(r))return}(n||(delete a[s].data,h(a[s])))&&(o?se.cleanData([e],!0):ae.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}function m(){return!0}function g(){return!1}function y(){try{return ge.activeElement}catch(e){}}function b(e){var t=Re.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function w(e,t){var n,r,i=0,o=typeof e.getElementsByTagName!==xe?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==xe?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||se.nodeName(r,t)?o.push(r):se.merge(o,w(r,t));return void 0===t||t&&se.nodeName(e,t)?se.merge([e],o):o}function _(e){Ne.test(e.type)&&(e.defaultChecked=e.checked)}function C(e,t){return se.nodeName(e,"table")&&se.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function k(e){return e.type=(null!==se.find.attr(e,"type"))+"/"+e.type,e}function E(e){var t=Ge.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function x(e,t){for(var n,r=0;null!=(n=e[r]);r++)se._data(n,"globalEval",!t||se._data(t[r],"globalEval"))}function S(e,t){if(1===t.nodeType&&se.hasData(e)){var n,r,i,o=se._data(e),a=se._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r")).appendTo(t.documentElement),t=(et[0].contentWindow||et[0].contentDocument).document,t.write(),t.close(),n=A(e,t),et.detach()),tt[e]=n),n}function O(e,t){return{get:function(){var n=e();if(null!=n)return n?void delete this.get:(this.get=t).apply(this,arguments)}}}function P(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=pt.length;i--;)if((t=pt[i]+n)in e)return t;return r}function N(e,t){for(var n,r,i,o=[],a=0,s=e.length;a=0&&n=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==se.type(e)||e.nodeType||se.isWindow(e))return!1;try{if(e.constructor&&!oe.call(e,"constructor")&&!oe.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(ae.ownLast)for(t in e)return oe.call(e,t);for(t in e);return void 0===t||oe.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?re[ie.call(e)]||"object":typeof e},globalEval:function(e){e&&se.trim(e)&&(n.execScript||function(e){n.eval.call(n,e)})(e)},camelCase:function(e){return e.replace(ce,"ms-").replace(le,fe)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r=0,i=e.length,o=a(e);if(n){if(o)for(;rw.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[F]=!0,e}function i(e){var t=O.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=e.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||Q)-(~e.sourceIndex||Q);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(e){return e&&typeof e.getElementsByTagName!==V&&e}function c(){}function l(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function h(e,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(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,u=f(function(e){return e===t},a,!0),c=f(function(e){return J.call(t,e)>-1},a,!0),h=[function(e,n,r){return!o&&(r||n!==S)||((t=n).nodeType?u(e,n,r):c(e,n,r))}];s1&&d(h),s>1&&l(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ae,"$1"),n,s0,o=e.length>0,a=function(r,a,s,u,c){var l,f,d,h=0,v="0",m=r&&[],g=[],y=S,b=r||o&&w.find.TAG("*",c),_=B+=null==y?1:Math.random()||.1,C=b.length;for(c&&(S=a!==O&&a);v!==C&&null!=(l=b[v]);v++){if(o&&l){for(f=0;d=e[f++];)if(d(l,a,s)){u.push(l);break}c&&(B=_)}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&&t.uniqueSort(u)}return c&&(B=_,S=y),m};return i?r(a):a}var y,b,w,_,C,k,E,x,S,T,A,j,O,P,N,D,M,I,L,F="sizzle"+-new Date,R=e.document,B=0,z=0,W=n(),q=n(),H=n(),U=function(e,t){return e===t&&(A=!0),0},V="undefined",Q=1<<31,K={}.hasOwnProperty,$=[],G=$.pop,Z=$.push,Y=$.push,X=$.slice,J=$.indexOf||function(e){for(var t=0,n=this.length;t+~]|"+te+")"+te+"*"),ce=new RegExp("="+te+"*([^\\]'\"]*?)"+te+"*\\]","g"),le=new RegExp(oe),fe=new RegExp("^"+re+"$"),de={ID:new RegExp("^#("+ne+")"),CLASS:new RegExp("^\\.("+ne+")"),TAG:new RegExp("^("+ne.replace("w","w*")+")"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+te+"*(even|odd|(([+-]|)(\\d*)n|)"+te+"*(?:([+-]|)"+te+"*(\\d+)|))"+te+"*\\)|)","i"),bool:new RegExp("^(?:"+ee+")$","i"),needsContext:new RegExp("^"+te+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+te+"*((?:-\\d)?\\d*)"+te+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,me=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ge=/[+~]/,ye=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+te+"?|("+te+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{Y.apply($=X.call(R.childNodes),R.childNodes),$[R.childNodes.length].nodeType}catch(e){Y={apply:$.length?function(e,t){Z.apply(e,X.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}b=t.support={},C=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},j=t.setDocument=function(e){var t,n=e?e.ownerDocument||e:R,r=n.defaultView;return n!==O&&9===n.nodeType&&n.documentElement?(O=n,P=n.documentElement,N=!C(n),r&&r!==r.top&&(r.addEventListener?r.addEventListener("unload",function(){j()},!1):r.attachEvent&&r.attachEvent("onunload",function(){j()})),b.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=i(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=ve.test(n.getElementsByClassName)&&i(function(e){return e.innerHTML="
",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),b.getById=i(function(e){return P.appendChild(e).id=F,!n.getElementsByName||!n.getElementsByName(F).length}),b.getById?(w.find.ID=function(e,t){if(typeof t.getElementById!==V&&N){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},w.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete w.find.ID,w.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n=typeof e.getAttributeNode!==V&&e.getAttributeNode("id");return n&&n.value===t}}),w.find.TAG=b.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==V)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(typeof t.getElementsByClassName!==V&&N)return t.getElementsByClassName(e)},M=[],D=[],(b.qsa=ve.test(n.querySelectorAll))&&(i(function(e){e.innerHTML="",e.querySelectorAll("[msallowclip^='']").length&&D.push("[*^$]="+te+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||D.push("\\["+te+"*(?:value|"+ee+")"),e.querySelectorAll(":checked").length||D.push(":checked")}),i(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&D.push("name"+te+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||D.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),D.push(",.*:")})),(b.matchesSelector=ve.test(I=P.matches||P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&i(function(e){b.disconnectedMatch=I.call(e,"div"),I.call(e,"[s!='']:x"),M.push("!=",oe)}),D=D.length&&new RegExp(D.join("|")),M=M.length&&new RegExp(M.join("|")),t=ve.test(P.compareDocumentPosition),L=t||ve.test(P.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return A=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&r||!b.sortDetached&&t.compareDocumentPosition(e)===r?e===n||e.ownerDocument===R&&L(R,e)?-1:t===n||t.ownerDocument===R&&L(R,t)?1:T?J.call(T,e)-J.call(T,t):0:4&r?-1:1)}:function(e,t){if(e===t)return A=!0,0;var r,i=0,o=e.parentNode,s=t.parentNode,u=[e],c=[t];if(!o||!s)return e===n?-1:t===n?1:o?-1:s?1:T?J.call(T,e)-J.call(T,t):0;if(o===s)return a(e,t);for(r=e;r=r.parentNode;)u.unshift(r);for(r=t;r=r.parentNode;)c.unshift(r);for(;u[i]===c[i];)i++;return i?a(u[i],c[i]):u[i]===R?-1:c[i]===R?1:0},n):O},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==O&&j(e),n=n.replace(ce,"='$1']"),b.matchesSelector&&N&&(!M||!M.test(n))&&(!D||!D.test(n)))try{var r=I.call(e,n);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,O,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==O&&j(e),L(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==O&&j(e);var n=w.attrHandle[t.toLowerCase()],r=n&&K.call(w.attrHandle,t.toLowerCase())?n(e,t,!N):void 0;return void 0!==r?r:b.attributes||!N?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!b.detectDuplicates,T=!b.sortStable&&e.slice(0),e.sort(U),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return T=null,e},_=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=_(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=_(t);return n},w=t.selectors={cacheLength:50,createPseudo:r,match:de,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return de.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&le.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+te+")"+e+"("+te+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==V&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);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(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var c,l,f,d,h,p,v=o!==a?"nextSibling":"previousSibling",m=t.parentNode,g=s&&t.nodeName.toLowerCase(),y=!u&&!s;if(m){if(o){for(;v;){for(f=t;f=f[v];)if(s?f.nodeName.toLowerCase()===g:1===f.nodeType)return!1;p=v="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?m.firstChild:m.lastChild],a&&y){for(l=m[F]||(m[F]={}),c=l[e]||[],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===t){l[e]=[B,h,d];break}}else if(y&&(c=(t[F]||(t[F]={}))[e])&&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[F]||(f[F]={}))[e]=[B,d]),f!==t)););return(d-=i)===r||d%r==0&&d/r>=0}}},PSEUDO:function(e,n){var i,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[F]?o(n):o.length>1?(i=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=J.call(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=E(e.replace(ae,"$1"));return i[F]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return function(t){return(t.textContent||t.innerText||_(t)).indexOf(e)>-1}}),lang:r(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do{if(n=N?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===P},focus:function(e){return e===O.activeElement&&(!O.hasFocus||O.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:s(function(){return[0]}),last:s(function(e,t){return[t-1]}),eq:s(function(e,t,n){return[n<0?n+t:n]}),even:s(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:s(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(a=o[0]).type&&b.getById&&9===t.nodeType&&N&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(be,we),t)||[])[0]))return n;f&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=de.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((c=w.find[s])&&(r=c(a.matches[0].replace(be,we),ge.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&l(o)))return Y.apply(n,r),n;break}}return(f||E(e,d))(r,t,!N,n,ge.test(e)&&u(t.parentNode)||t),n},b.sortStable=F.split("").sort(U).join("")===F,b.detectDuplicates=!!A,j(),b.sortDetached=i(function(e){return 1&e.compareDocumentPosition(O.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(ee,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(n);se.find=de,se.expr=de.selectors,se.expr[":"]=se.expr.pseudos,se.unique=de.uniqueSort,se.text=de.getText,se.isXMLDoc=de.isXML,se.contains=de.contains;var he=se.expr.match.needsContext,pe=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ve=/^.[^:#\[\.,]*$/;se.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?se.find.matchesSelector(r,e)?[r]:[]:se.find.matches(e,se.grep(t,function(e){return 1===e.nodeType}))},se.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(se(e).filter(function(){for(t=0;t1?se.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(s(this,e||[],!1))},not:function(e){return this.pushStack(s(this,e||[],!0))},is:function(e){return!!s(this,"string"==typeof e&&he.test(e)?se(e):e||[],!1).length}});var me,ge=n.document,ye=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(se.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(!(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:ye.exec(e))||!n[1]&&t)return!t||t.jquery?(t||me).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof se?t[0]:t,se.merge(this,se.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:ge,!0)),pe.test(n[1])&&se.isPlainObject(t))for(n in t)se.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if((r=ge.getElementById(n[2]))&&r.parentNode){if(r.id!==n[2])return me.find(e);this.length=1,this[0]=r}return this.context=ge,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):se.isFunction(e)?void 0!==me.ready?me.ready(e):e(se):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),se.makeArray(e,this))}).prototype=se.fn,me=se(ge);var be=/^(?:parents|prev(?:Until|All))/,we={children:!0,contents:!0,next:!0,prev:!0};se.extend({dir:function(e,t,n){for(var r=[],i=e[t];i&&9!==i.nodeType&&(void 0===n||1!==i.nodeType||!se(i).is(n));)1===i.nodeType&&r.push(i),i=i[t];return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),se.fn.extend({has:function(e){var t,n=se(e,this),r=n.length;return this.filter(function(){for(t=0;t-1:1===n.nodeType&&se.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?se.unique(o):o)},index:function(e){return e?"string"==typeof e?se.inArray(this[0],se(e)):se.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(se.unique(se.merge(this.get(),se(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),se.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return se.dir(e,"parentNode")},parentsUntil:function(e,t,n){return se.dir(e,"parentNode",n)},next:function(e){return u(e,"nextSibling")},prev:function(e){return u(e,"previousSibling")},nextAll:function(e){return se.dir(e,"nextSibling")},prevAll:function(e){return se.dir(e,"previousSibling")},nextUntil:function(e,t,n){return se.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return se.dir(e,"previousSibling",n)},siblings:function(e){return se.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return se.sibling(e.firstChild)},contents:function(e){return se.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:se.merge([],e.childNodes)}},function(e,t){se.fn[e]=function(n,r){var i=se.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=se.filter(r,i)),this.length>1&&(we[e]||(i=se.unique(i)),be.test(e)&&(i=i.reverse())),this.pushStack(i)}});var _e=/\S+/g,Ce={};se.Callbacks=function(e){e="string"==typeof e?Ce[e]||c(e):se.extend({},e);var t,n,r,i,o,a,s=[],u=!e.once&&[],l=function(c){for(n=e.memory&&c,r=!0,o=a||0,a=0,i=s.length,t=!0;s&&o-1;)s.splice(r,1),t&&(r<=i&&i--,r<=o&&o--)}),this},has:function(e){return e?se.inArray(e,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(e,n){return!s||r&&!u||(n=n||[],n=[e,n.slice?n.slice():n],t?u.push(n):l(n)),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!r}};return f},se.extend({Deferred:function(e){var t=[["resolve","done",se.Callbacks("once memory"),"resolved"],["reject","fail",se.Callbacks("once memory"),"rejected"],["notify","progress",se.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return se.Deferred(function(n){se.each(t,function(t,o){var a=se.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&se.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?se.extend(e,r):r}},i={};return r.pipe=r.then,se.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[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),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=J.call(arguments),a=o.length,s=1!==a||e&&se.isFunction(e.promise)?a:0,u=1===s?e:se.Deferred(),c=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?J.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i0||(ke.resolveWith(ge,[se]),se.fn.triggerHandler&&(se(ge).triggerHandler("ready"),se(ge).off("ready")))}}}),se.ready.promise=function(e){if(!ke)if(ke=se.Deferred(),"complete"===ge.readyState)setTimeout(se.ready);else if(ge.addEventListener)ge.addEventListener("DOMContentLoaded",f,!1),n.addEventListener("load",f,!1);else{ge.attachEvent("onreadystatechange",f),n.attachEvent("onload",f);var t=!1;try{t=null==n.frameElement&&ge.documentElement}catch(e){}t&&t.doScroll&&function e(){if(!se.isReady){try{t.doScroll("left")}catch(t){return setTimeout(e,50)}l(),se.ready()}}()}return ke.promise(e)};var Ee,xe="undefined";for(Ee in se(ae))break;ae.ownLast="0"!==Ee,ae.inlineBlockNeedsLayout=!1,se(function(){var e,t,n,r;(n=ge.getElementsByTagName("body")[0])&&n.style&&(t=ge.createElement("div"),r=ge.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),typeof t.style.zoom!==xe&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",ae.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=ge.createElement("div");if(null==ae.deleteExpando){ae.deleteExpando=!0;try{delete e.test}catch(e){ae.deleteExpando=!1}}e=null}(),se.acceptData=function(e){var t=se.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||!0!==t&&e.getAttribute("classid")===t)};var Se=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Te=/([A-Z])/g;se.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return!!(e=e.nodeType?se.cache[e[se.expando]]:e[se.expando])&&!h(e)},data:function(e,t,n){return p(e,t,n)},removeData:function(e,t){return v(e,t)},_data:function(e,t,n){return p(e,t,n,!0)},_removeData:function(e,t){return v(e,t,!0)}}),se.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=se.data(o),1===o.nodeType&&!se._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=se.camelCase(r.slice(5)),d(o,r,i[r])));se._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){se.data(this,e)}):arguments.length>1?this.each(function(){se.data(this,e,t)}):o?d(o,e,se.data(o,e)):void 0},removeData:function(e){return this.each(function(){se.removeData(this,e)})}}),se.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=se._data(e,t),n&&(!r||se.isArray(n)?r=se._data(e,t,se.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=se.queue(e,t),r=n.length,i=n.shift(),o=se._queueHooks(e,t),a=function(){se.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return se._data(e,n)||se._data(e,n,{empty:se.Callbacks("once memory").add(function(){se._removeData(e,t+"queue"),se._removeData(e,n)})})}}),se.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length
a",ae.leadingWhitespace=3===t.firstChild.nodeType,ae.tbody=!t.getElementsByTagName("tbody").length,ae.htmlSerialize=!!t.getElementsByTagName("link").length,ae.html5Clone="<:nav>"!==ge.createElement("nav").cloneNode(!0).outerHTML,e.type="checkbox",e.checked=!0,n.appendChild(e),ae.appendChecked=e.checked,t.innerHTML="",ae.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,n.appendChild(t),t.innerHTML="",ae.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,ae.noCloneEvent=!0,t.attachEvent&&(t.attachEvent("onclick",function(){ae.noCloneEvent=!1}),t.cloneNode(!0).click()),null==ae.deleteExpando){ae.deleteExpando=!0;try{delete t.test}catch(e){ae.deleteExpando=!1}}}(),function(){var e,t,r=ge.createElement("div");for(e in{submit:!0,change:!0,focusin:!0})t="on"+e,(ae[e+"Bubbles"]=t in n)||(r.setAttribute(t,"t"),ae[e+"Bubbles"]=!1===r.attributes[t].expando);r=null}();var De=/^(?:input|select|textarea)$/i,Me=/^key/,Ie=/^(?:mouse|pointer|contextmenu)|click/,Le=/^(?:focusinfocus|focusoutblur)$/,Fe=/^([^.]*)(?:\.(.+)|)$/;se.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,c,l,f,d,h,p,v,m=se._data(e);if(m){for(n.handler&&(u=n,n=u.handler,i=u.selector),n.guid||(n.guid=se.guid++),(a=m.events)||(a=m.events={}),(l=m.handle)||(l=m.handle=function(e){return typeof se===xe||e&&se.event.triggered===e.type?void 0:se.event.dispatch.apply(l.elem,arguments)},l.elem=e),t=(t||"").match(_e)||[""],s=t.length;s--;)o=Fe.exec(t[s])||[],h=v=o[1],p=(o[2]||"").split(".").sort(),h&&(c=se.event.special[h]||{},h=(i?c.delegateType:c.bindType)||h,c=se.event.special[h]||{},f=se.extend({type:h,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&se.expr.match.needsContext.test(i),namespace:p.join(".")},u),(d=a[h])||(d=a[h]=[],d.delegateCount=0,c.setup&&!1!==c.setup.call(e,r,p,l)||(e.addEventListener?e.addEventListener(h,l,!1):e.attachEvent&&e.attachEvent("on"+h,l))),c.add&&(c.add.call(e,f),f.handler.guid||(f.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,f):d.push(f),se.event.global[h]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,u,c,l,f,d,h,p,v,m=se.hasData(e)&&se._data(e);if(m&&(l=m.events)){for(t=(t||"").match(_e)||[""],c=t.length;c--;)if(s=Fe.exec(t[c])||[],h=v=s[1],p=(s[2]||"").split(".").sort(),h){for(f=se.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(e,a));u&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,p,m.handle)||se.removeEvent(e,h,m.handle),delete l[h])}else for(h in l)se.event.remove(e,h+t[c],n,r,!0);se.isEmptyObject(l)&&(delete m.handle,se._removeData(e,"events"))}},trigger:function(e,t,r,i){var o,a,s,u,c,l,f,d=[r||ge],h=oe.call(e,"type")?e.type:e,p=oe.call(e,"namespace")?e.namespace.split("."):[];if(s=l=r=r||ge,3!==r.nodeType&&8!==r.nodeType&&!Le.test(h+se.event.triggered)&&(h.indexOf(".")>=0&&(p=h.split("."),h=p.shift(),p.sort()),a=h.indexOf(":")<0&&"on"+h,e=e[se.expando]?e:new se.Event(h,"object"==typeof e&&e),e.isTrigger=i?2:3,e.namespace=p.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:se.makeArray(t,[e]),c=se.event.special[h]||{},i||!c.trigger||!1!==c.trigger.apply(r,t))){if(!i&&!c.noBubble&&!se.isWindow(r)){for(u=c.delegateType||h,Le.test(u+h)||(s=s.parentNode);s;s=s.parentNode)d.push(s),l=s;l===(r.ownerDocument||ge)&&d.push(l.defaultView||l.parentWindow||n)}for(f=0;(s=d[f++])&&!e.isPropagationStopped();)e.type=f>1?u:c.bindType||h,o=(se._data(s,"events")||{})[e.type]&&se._data(s,"handle"),o&&o.apply(s,t),(o=a&&s[a])&&o.apply&&se.acceptData(s)&&(e.result=o.apply(s,t),!1===e.result&&e.preventDefault());if(e.type=h,!i&&!e.isDefaultPrevented()&&(!c._default||!1===c._default.apply(d.pop(),t))&&se.acceptData(r)&&a&&r[h]&&!se.isWindow(r)){l=r[a],l&&(r[a]=null),se.event.triggered=h;try{r[h]()}catch(e){}se.event.triggered=void 0,l&&(r[a]=l)}return e.result}},dispatch:function(e){e=se.event.fix(e);var t,n,r,i,o,a=[],s=J.call(arguments),u=(se._data(this,"events")||{})[e.type]||[],c=se.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(a=se.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,o=0;(r=i.handlers[o++])&&!e.isImmediatePropagationStopped();)e.namespace_re&&!e.namespace_re.test(r.namespace)||(e.handleObj=r,e.data=r.data,void 0!==(n=((se.event.special[r.origType]||{}).handle||r.handler).apply(i.elem,s))&&!1===(e.result=n)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(!0!==u.disabled||"click"!==e.type)){for(i=[],o=0;o=0:se.find(n,this,null,[u]).length),i[n]&&i.push(r);i.length&&a.push({elem:u,handlers:i})}return s]","i"),We=/^\s+/,qe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,He=/<([\w:]+)/,Ue=/\s*$/g,Ye={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:ae.htmlSerialize?[0,"",""]:[1,"X
","
"]},Xe=b(ge),Je=Xe.appendChild(ge.createElement("div"));Ye.optgroup=Ye.option,Ye.tbody=Ye.tfoot=Ye.colgroup=Ye.caption=Ye.thead,Ye.th=Ye.td,se.extend({clone:function(e,t,n){var r,i,o,a,s,u=se.contains(e.ownerDocument,e);if(ae.html5Clone||se.isXMLDoc(e)||!ze.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Je.innerHTML=e.outerHTML,Je.removeChild(o=Je.firstChild)),!(ae.noCloneEvent&&ae.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||se.isXMLDoc(e)))for(r=w(o),s=w(e),a=0;null!=(i=s[a]);++a)r[a]&&T(i,r[a]);if(t)if(n)for(s=s||w(e),r=r||w(o),a=0;null!=(i=s[a]);a++)S(i,r[a]);else S(e,o);return r=w(o,"script"),r.length>0&&x(r,!u&&w(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){for(var i,o,a,s,u,c,l,f=e.length,d=b(t),h=[],p=0;p")+l[2],i=l[0];i--;)s=s.lastChild;if(!ae.leadingWhitespace&&We.test(o)&&h.push(t.createTextNode(We.exec(o)[0])),!ae.tbody)for(o="table"!==u||Ue.test(o)?""!==l[1]||Ue.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;i--;)se.nodeName(c=o.childNodes[i],"tbody")&&!c.childNodes.length&&o.removeChild(c);for(se.merge(h,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=d.lastChild}else h.push(t.createTextNode(o));for(s&&d.removeChild(s),ae.appendChecked||se.grep(w(h,"input"),_),p=0;o=h[p++];)if((!r||-1===se.inArray(o,r))&&(a=se.contains(o.ownerDocument,o),s=w(d.appendChild(o),"script"),a&&x(s),n))for(i=0;o=s[i++];)$e.test(o.type||"")&&n.push(o);return s=null,d},cleanData:function(e,t){for(var n,r,i,o,a=0,s=se.expando,u=se.cache,c=ae.deleteExpando,l=se.event.special;null!=(n=e[a]);a++)if((t||se.acceptData(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)l[r]?se.event.remove(n,r):se.removeEvent(n,r,o.handle);u[i]&&(delete u[i],c?delete n[s]:typeof n.removeAttribute!==xe?n.removeAttribute(s):n[s]=null,X.push(i))}}}),se.fn.extend({text:function(e){return Pe(this,function(e){return void 0===e?se.text(this):this.empty().append((this[0]&&this[0].ownerDocument||ge).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){C(this,e).appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=C(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=e?se.filter(e,this):this,i=0;null!=(n=r[i]);i++)t||1!==n.nodeType||se.cleanData(w(n)),n.parentNode&&(t&&se.contains(n.ownerDocument,n)&&x(w(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&se.cleanData(w(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&se.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return se.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Be,""):void 0;if("string"==typeof e&&!Qe.test(e)&&(ae.htmlSerialize||!ze.test(e))&&(ae.leadingWhitespace||!We.test(e))&&!Ye[(He.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(qe,"<$1>");try{for(;n1&&"string"==typeof d&&!ae.checkClone&&Ke.test(d))return this.each(function(n){var r=l.eq(n);h&&(e[0]=d.call(this,n,r.html())),r.domManip(e,t)});if(c&&(s=se.buildFragment(e,this[0].ownerDocument,!1,this),n=s.firstChild,1===s.childNodes.length&&(s=n),n)){for(o=se.map(w(s,"script"),k),i=o.length;u
t
",i=e.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),t.removeChild(r))}var t,r,i,o,a,s,u;t=ge.createElement("div"),t.innerHTML="
a",i=t.getElementsByTagName("a")[0],(r=i&&i.style)&&(r.cssText="float:left;opacity:.5",ae.opacity="0.5"===r.opacity,ae.cssFloat=!!r.cssFloat,t.style.backgroundClip="content-box",t.cloneNode(!0).style.backgroundClip="",ae.clearCloneStyle="content-box"===t.style.backgroundClip,ae.boxSizing=""===r.boxSizing||""===r.MozBoxSizing||""===r.WebkitBoxSizing,se.extend(ae,{reliableHiddenOffsets:function(){return null==s&&e(),s},boxSizingReliable:function(){return null==a&&e(),a},pixelPosition:function(){return null==o&&e(),o},reliableMarginRight:function(){return null==u&&e(),u}}))}(),se.swap=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i};var st=/alpha\([^)]*\)/i,ut=/opacity\s*=\s*([^)]*)/,ct=/^(none|table(?!-c[ea]).+)/,lt=new RegExp("^("+Ae+")(.*)$","i"),ft=new RegExp("^([+-])=("+Ae+")","i"),dt={position:"absolute",visibility:"hidden",display:"block"},ht={letterSpacing:"0",fontWeight:"400"},pt=["Webkit","O","Moz","ms"];se.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=rt(e,"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:ae.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=se.camelCase(t),u=e.style;if(t=se.cssProps[s]||(se.cssProps[s]=P(u,s)),a=se.cssHooks[t]||se.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];if(o=typeof n,"string"===o&&(i=ft.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(se.css(e,t)),o="number"),null!=n&&n===n&&("number"!==o||se.cssNumber[s]||(n+="px"),ae.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{u[t]=n}catch(e){}}},css:function(e,t,n,r){var i,o,a,s=se.camelCase(t);return t=se.cssProps[s]||(se.cssProps[s]=P(e.style,s)),a=se.cssHooks[t]||se.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=rt(e,t,r)),"normal"===o&&t in ht&&(o=ht[t]),""===n||n?(i=parseFloat(o),!0===n||se.isNumeric(i)?i||0:o):o}}),se.each(["height","width"],function(e,t){se.cssHooks[t]={get:function(e,n,r){if(n)return ct.test(se.css(e,"display"))&&0===e.offsetWidth?se.swap(e,dt,function(){return I(e,t,r)}):I(e,t,r)},set:function(e,n,r){var i=r&&nt(e);return D(e,n,r?M(e,t,r,ae.boxSizing&&"border-box"===se.css(e,"boxSizing",!1,i),i):0)}}}),ae.opacity||(se.cssHooks.opacity={get:function(e,t){return ut.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=se.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===se.trim(o.replace(st,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=st.test(o)?o.replace(st,i):o+" "+i)}}),se.cssHooks.marginRight=O(ae.reliableMarginRight,function(e,t){if(t)return se.swap(e,{display:"inline-block"},rt,[e,"marginRight"])}),se.each({margin:"",padding:"",border:"Width"},function(e,t){se.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+je[r]+t]=o[r]||o[r-2]||o[0];return i}},it.test(e)||(se.cssHooks[e+t].set=D)}),se.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,i,o={},a=0;if(se.isArray(t)){for(r=nt(e),i=t.length;a1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Oe(this)?se(this).show():se(this).hide()})}}),se.Tween=L,L.prototype={constructor:L,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(se.cssNumber[n]?"":"px")},cur:function(){var e=L.propHooks[this.prop];return e&&e.get?e.get(this):L.propHooks._default.get(this)},run:function(e){var t,n=L.propHooks[this.prop];return this.options.duration?this.pos=t=se.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):L.propHooks._default.set(this),this}},L.prototype.init.prototype=L.prototype,L.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=se.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){se.fx.step[e.prop]?se.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[se.cssProps[e.prop]]||se.cssHooks[e.prop])?se.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},L.propHooks.scrollTop=L.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},se.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},se.fx=L.prototype.init,se.fx.step={};var vt,mt,gt=/^(?:toggle|show|hide)$/,yt=new RegExp("^(?:([+-])=|)("+Ae+")([a-z%]*)$","i"),bt=/queueHooks$/,wt=[z],_t={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=yt.exec(t),o=i&&i[3]||(se.cssNumber[e]?"":"px"),a=(se.cssNumber[e]||"px"!==o&&+r)&&yt.exec(se.css(n.elem,e)),s=1,u=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do{s=s||".5",a/=s,se.style(n.elem,e,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}]};se.Animation=se.extend(q,{tweener:function(e,t){se.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;r
a",r=t.getElementsByTagName("a")[0],n=ge.createElement("select"),i=n.appendChild(ge.createElement("option")),e=t.getElementsByTagName("input")[0],r.style.cssText="top:1px",ae.getSetAttribute="t"!==t.className,ae.style=/top/.test(r.getAttribute("style")),ae.hrefNormalized="/a"===r.getAttribute("href"),ae.checkOn=!!e.value,ae.optSelected=i.selected,ae.enctype=!!ge.createElement("form").enctype,n.disabled=!0,ae.optDisabled=!i.disabled,e=ge.createElement("input"),e.setAttribute("value",""),ae.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),ae.radioValue="t"===e.value}();var Ct=/\r/g;se.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=se.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,se(this).val()):e,null==i?i="":"number"==typeof i?i+="":se.isArray(i)&&(i=se.map(i,function(e){return null==e?"":e+""})),(t=se.valHooks[this.type]||se.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=se.valHooks[i.type]||se.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Ct,""):null==n?"":n)}}}),se.extend({valHooks:{option:{get:function(e){var t=se.find.attr(e,"value");return null!=t?t:se.trim(se.text(e))}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.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(e){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),se.each(["radio","checkbox"],function(){se.valHooks[this]={set:function(e,t){if(se.isArray(t))return e.checked=se.inArray(se(e).val(),t)>=0}},ae.checkOn||(se.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var kt,Et,xt=se.expr.attrHandle,St=/^(?:checked|selected)$/i,Tt=ae.getSetAttribute,At=ae.input;se.fn.extend({attr:function(e,t){return Pe(this,se.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){se.removeAttr(this,e)})}}),se.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===xe?se.prop(e,t,n):(1===o&&se.isXMLDoc(e)||(t=t.toLowerCase(),r=se.attrHooks[t]||(se.expr.match.bool.test(t)?Et:kt)),void 0===n?r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=se.find.attr(e,t),null==i?void 0:i):null!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):void se.removeAttr(e,t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(_e);if(o&&1===e.nodeType)for(;n=o[i++];)r=se.propFix[n]||n,se.expr.match.bool.test(n)?At&&Tt||!St.test(n)?e[r]=!1:e[se.camelCase("default-"+n)]=e[r]=!1:se.attr(e,n,""),e.removeAttribute(Tt?n:r)},attrHooks:{type:{set:function(e,t){if(!ae.radioValue&&"radio"===t&&se.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),Et={set:function(e,t,n){return!1===t?se.removeAttr(e,n):At&&Tt||!St.test(n)?e.setAttribute(!Tt&&se.propFix[n]||n,n):e[se.camelCase("default-"+n)]=e[n]=!0,n}},se.each(se.expr.match.bool.source.match(/\w+/g),function(e,t){var n=xt[t]||se.find.attr;xt[t]=At&&Tt||!St.test(t)?function(e,t,r){var i,o;return r||(o=xt[t],xt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,xt[t]=o),i}:function(e,t,n){if(!n)return e[se.camelCase("default-"+t)]?t.toLowerCase():null}}),At&&Tt||(se.attrHooks.value={set:function(e,t,n){if(!se.nodeName(e,"input"))return kt&&kt.set(e,t,n);e.defaultValue=t}}),Tt||(kt={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},xt.id=xt.name=xt.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},se.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:kt.set},se.attrHooks.contenteditable={set:function(e,t,n){kt.set(e,""!==t&&t,n)}},se.each(["width","height"],function(e,t){se.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),ae.style||(se.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var jt=/^(?:input|select|textarea|button|object)$/i,Ot=/^(?:a|area)$/i;se.fn.extend({prop:function(e,t){return Pe(this,se.prop,e,t,arguments.length>1)},removeProp:function(e){return e=se.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(e){}})}}),se.extend({propFix:{for:"htmlFor",class:"className"},prop:function(e,t,n){var r,i,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return o=1!==a||!se.isXMLDoc(e),o&&(t=se.propFix[t]||t,i=se.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=se.find.attr(e,"tabindex");return t?parseInt(t,10):jt.test(e.nodeName)||Ot.test(e.nodeName)&&e.href?0:-1}}}}),ae.hrefNormalized||se.each(["href","src"],function(e,t){se.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),ae.optSelected||(se.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),se.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){se.propFix[this.toLowerCase()]=this}),ae.enctype||(se.propFix.enctype="encoding");var Pt=/[\t\r\n\f]/g;se.fn.extend({addClass:function(e){var t,n,r,i,o,a,s=0,u=this.length,c="string"==typeof e&&e;if(se.isFunction(e))return this.each(function(t){se(this).addClass(e.call(this,t,this.className))});if(c)for(t=(e||"").match(_e)||[];s=0;)r=r.replace(" "+i+" "," ");a=e?se.trim(r):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):se.isFunction(e)?this.each(function(n){se(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,r=0,i=se(this),o=e.match(_e)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else n!==xe&&"boolean"!==n||(this.className&&se._data(this,"__className__",this.className),this.className=this.className||!1===e?"":se._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;n=0)return!0;return!1}}),se.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(e,t){se.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),se.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var Nt=se.now(),Dt=/\?/,Mt=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;se.parseJSON=function(e){if(n.JSON&&n.JSON.parse)return n.JSON.parse(e+"");var t,r=null,i=se.trim(e+"");return i&&!se.trim(i.replace(Mt,function(e,n,i,o){return t&&n&&(r=0),0===r?e:(t=i||n,r+=!o-!i,"")}))?Function("return "+i)():se.error("Invalid JSON: "+e)},se.parseXML=function(e){var t,r;if(!e||"string"!=typeof e)return null;try{n.DOMParser?(r=new DOMParser,t=r.parseFromString(e,"text/xml")):(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e))}catch(e){t=void 0}return t&&t.documentElement&&!t.getElementsByTagName("parsererror").length||se.error("Invalid XML: "+e),t};var It,Lt,Ft=/#.*$/,Rt=/([?&])_=[^&]*/,Bt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,zt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Wt=/^(?:GET|HEAD)$/,qt=/^\/\//,Ht=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ut={},Vt={},Qt="*/".concat("*");try{Lt=location.href}catch(e){Lt=ge.createElement("a"),Lt.href="",Lt=Lt.href}It=Ht.exec(Lt.toLowerCase())||[],se.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Lt,type:"GET",isLocal:zt.test(It[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qt,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":se.parseJSON,"text xml":se.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?V(V(e,se.ajaxSettings),t):V(se.ajaxSettings,e)},ajaxPrefilter:H(Ut),ajaxTransport:H(Vt),ajax:function(e,t){function n(e,t,n,r){var i,l,g,y,w,C=t;2!==b&&(b=2,s&&clearTimeout(s),c=void 0,a=r||"",_.readyState=e>0?4:0,i=e>=200&&e<300||304===e,n&&(y=Q(f,_,n)),y=K(f,y,_,i),i?(f.ifModified&&(w=_.getResponseHeader("Last-Modified"),w&&(se.lastModified[o]=w),(w=_.getResponseHeader("etag"))&&(se.etag[o]=w)),204===e||"HEAD"===f.type?C="nocontent":304===e?C="notmodified":(C=y.state,l=y.data,g=y.error,i=!g)):(g=C,!e&&C||(C="error",e<0&&(e=0))),_.status=e,_.statusText=(t||C)+"",i?p.resolveWith(d,[l,C,_]):p.rejectWith(d,[_,C,g]),_.statusCode(m),m=void 0,u&&h.trigger(i?"ajaxSuccess":"ajaxError",[_,f,i?l:g]),v.fireWith(d,[_,C]),u&&(h.trigger("ajaxComplete",[_,f]),--se.active||se.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,a,s,u,c,l,f=se.ajaxSetup({},t),d=f.context||f,h=f.context&&(d.nodeType||d.jquery)?se(d):se.event,p=se.Deferred(),v=se.Callbacks("once memory"),m=f.statusCode||{},g={},y={},b=0,w="canceled",_={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!l)for(l={};t=Bt.exec(a);)l[t[1].toLowerCase()]=t[2];t=l[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=y[n]=y[n]||e,g[e]=t),this},overrideMimeType:function(e){return b||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)m[t]=[m[t],e[t]];else _.always(e[_.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),n(0,t),this}};if(p.promise(_).complete=v.add,_.success=_.done,_.error=_.fail,f.url=((e||f.url||Lt)+"").replace(Ft,"").replace(qt,It[1]+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=se.trim(f.dataType||"*").toLowerCase().match(_e)||[""],null==f.crossDomain&&(r=Ht.exec(f.url.toLowerCase()),f.crossDomain=!(!r||r[1]===It[1]&&r[2]===It[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(It[3]||("http:"===It[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=se.param(f.data,f.traditional)),U(Ut,f,t,_),2===b)return _;u=f.global,u&&0==se.active++&&se.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Wt.test(f.type),o=f.url,f.hasContent||(f.data&&(o=f.url+=(Dt.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(f.url=Rt.test(o)?o.replace(Rt,"$1_="+Nt++):o+(Dt.test(o)?"&":"?")+"_="+Nt++)),f.ifModified&&(se.lastModified[o]&&_.setRequestHeader("If-Modified-Since",se.lastModified[o]),se.etag[o]&&_.setRequestHeader("If-None-Match",se.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&_.setRequestHeader("Content-Type",f.contentType),_.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Qt+"; q=0.01":""):f.accepts["*"]);for(i in f.headers)_.setRequestHeader(i,f.headers[i]);if(f.beforeSend&&(!1===f.beforeSend.call(d,_,f)||2===b))return _.abort();w="abort";for(i in{success:1,error:1,complete:1})_[i](f[i]);if(c=U(Vt,f,t,_)){_.readyState=1,u&&h.trigger("ajaxSend",[_,f]),f.async&&f.timeout>0&&(s=setTimeout(function(){_.abort("timeout")},f.timeout));try{b=1,c.send(g,n)}catch(e){if(!(b<2))throw e;n(-1,e)}}else n(-1,"No Transport");return _},getJSON:function(e,t,n){return se.get(e,t,n,"json")},getScript:function(e,t){return se.get(e,void 0,t,"script")}}),se.each(["get","post"],function(e,t){se[t]=function(e,n,r,i){return se.isFunction(n)&&(i=i||r,r=n,n=void 0),se.ajax({url:e,type:t,dataType:i,data:n,success:r})}}),se.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){se.fn[t]=function(e){return this.on(t,e)}}),se._evalUrl=function(e){return se.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},se.fn.extend({wrapAll:function(e){if(se.isFunction(e))return this.each(function(t){se(this).wrapAll(e.call(this,t))});if(this[0]){var t=se(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return se.isFunction(e)?this.each(function(t){se(this).wrapInner(e.call(this,t))}):this.each(function(){var t=se(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=se.isFunction(e);return this.each(function(n){se(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){se.nodeName(this,"body")||se(this).replaceWith(this.childNodes)}).end()}}),se.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!ae.reliableHiddenOffsets()&&"none"===(e.style&&e.style.display||se.css(e,"display"))},se.expr.filters.visible=function(e){return!se.expr.filters.hidden(e)};var Kt=/%20/g,$t=/\[\]$/,Gt=/\r?\n/g,Zt=/^(?:submit|button|image|reset|file)$/i,Yt=/^(?:input|select|textarea|keygen)/i;se.param=function(e,t){var n,r=[],i=function(e,t){t=se.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=se.ajaxSettings&&se.ajaxSettings.traditional),se.isArray(e)||e.jquery&&!se.isPlainObject(e))se.each(e,function(){i(this.name,this.value)});else for(n in e)$(n,e[n],t,i);return r.join("&").replace(Kt,"+")},se.fn.extend({serialize:function(){return se.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=se.prop(this,"elements");return e?se.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!se(this).is(":disabled")&&Yt.test(this.nodeName)&&!Zt.test(e)&&(this.checked||!Ne.test(e))}).map(function(e,t){var n=se(this).val();return null==n?null:se.isArray(n)?se.map(n,function(e){return{name:t.name,value:e.replace(Gt,"\r\n")}}):{name:t.name,value:n.replace(Gt,"\r\n")}}).get()}}),se.ajaxSettings.xhr=void 0!==n.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&G()||Z()}:G;var Xt=0,Jt={},en=se.ajaxSettings.xhr();n.ActiveXObject&&se(n).on("unload",function(){for(var e in Jt)Jt[e](void 0,!0)}),ae.cors=!!en&&"withCredentials"in en,en=ae.ajax=!!en,en&&se.ajaxTransport(function(e){if(!e.crossDomain||ae.cors){var t;return{send:function(n,r){var i,o=e.xhr(),a=++Xt;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)o[i]=e.xhrFields[i];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.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(e.hasContent&&e.data||null),t=function(n,i){var s,u,c;if(t&&(i||4===o.readyState))if(delete Jt[a],t=void 0,o.onreadystatechange=se.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(e){u=""}s||!e.isLocal||e.crossDomain?1223===s&&(s=204):s=c.text?200:404}c&&r(s,u,c,o.getAllResponseHeaders())},e.async?4===o.readyState?setTimeout(t):o.onreadystatechange=Jt[a]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),se.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return se.globalEval(e),e}}}),se.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),se.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=ge.head||se("head")[0]||ge.documentElement;return{send:function(r,i){t=ge.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var tn=[],nn=/(=)\?(?=&|$)|\?\?/;se.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=tn.pop()||se.expando+"_"+Nt++;return this[e]=!0,e}}),se.ajaxPrefilter("json jsonp",function(e,t,r){var i,o,a,s=!1!==e.jsonp&&(nn.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&nn.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=se.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(nn,"$1"+i):!1!==e.jsonp&&(e.url+=(Dt.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return a||se.error(i+" was not called"),a[0]},e.dataTypes[0]="json",o=n[i],n[i]=function(){a=arguments},r.always(function(){n[i]=o,e[i]&&(e.jsonpCallback=t.jsonpCallback,tn.push(i)),a&&se.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),se.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||ge;var r=pe.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=se.buildFragment([e],t,i),i&&i.length&&se(i).remove(),se.merge([],r.childNodes))};var rn=se.fn.load;se.fn.load=function(e,t,n){if("string"!=typeof e&&rn)return rn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>=0&&(r=se.trim(e.slice(s,e.length)),e=e.slice(0,s)),se.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),a.length>0&&se.ajax({url:e,type:o,dataType:"html",data:t}).done(function(e){i=arguments,a.html(r?se("
").append(se.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){a.each(n,i||[e.responseText,t,e])}),this},se.expr.filters.animated=function(e){return se.grep(se.timers,function(t){return e===t.elem}).length};var on=n.document.documentElement;se.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,c,l=se.css(e,"position"),f=se(e),d={};"static"===l&&(e.style.position="relative"),s=f.offset(),o=se.css(e,"top"),u=se.css(e,"left"),c=("absolute"===l||"fixed"===l)&&se.inArray("auto",[o,u])>-1,c?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),se.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},se.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){se.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return t=o.documentElement,se.contains(t,i)?(typeof i.getBoundingClientRect!==xe&&(r=i.getBoundingClientRect()),n=Y(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===se.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),se.nodeName(e[0],"html")||(n=e.offset()),n.top+=se.css(e[0],"borderTopWidth",!0),n.left+=se.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-se.css(r,"marginTop",!0),left:t.left-n.left-se.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||on;e&&!se.nodeName(e,"html")&&"static"===se.css(e,"position");)e=e.offsetParent;return e||on})}}),se.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);se.fn[e]=function(r){return Pe(this,function(e,r,i){var o=Y(e);if(void 0===i)return o?t in o?o[t]:o.document.documentElement[r]:e[r];o?o.scrollTo(n?se(o).scrollLeft():i,n?i:se(o).scrollTop()):e[r]=i},e,r,arguments.length,null)}}),se.each(["top","left"],function(e,t){se.cssHooks[t]=O(ae.pixelPosition,function(e,n){if(n)return n=rt(e,t),ot.test(n)?se(e).position()[t]+"px":n})}),se.each({Height:"height",Width:"width"},function(e,t){se.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){se.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===i?"margin":"border");return Pe(this,function(t,n,r){var i;return se.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?se.css(t,n,a):se.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),se.fn.size=function(){return this.length},se.fn.andSelf=se.fn.addBack,r=[],void 0!==(i=function(){return se}.apply(t,r))&&(e.exports=i);var an=n.jQuery,sn=n.$;return se.noConflict=function(e){return n.$===se&&(n.$=sn),e&&n.jQuery===se&&(n.jQuery=an),se},typeof o===xe&&(n.jQuery=n.$=se),se})},,function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).devicePixelRatio||1}function i(){return window.location}function o(e){window.location=e}function a(){return window.history}function s(){return window.onpopstate}function u(e){window.onpopstate=e}function c(){return window.screen}function l(){return document}Object.defineProperty(t,"__esModule",{value:!0}),t.devicePixelRatio=r,t.history=a,t.location=i,t.onpopstate=s,t.redirectTo=o,t.screen=c,t.setOnpopstate=u,t.getDocument=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){(0,g.default)(function(){return l(e)})}function o(e){var t=h(e);return t.set(null),scrivito.ObjReplication.get(e).notifyBackendState(null),t}function a(e){var t=e._id;h(t).isAvailable()||u(t,e),scrivito.ObjReplication.get(t).notifyBackendState(e)}function s(e){u(e,{_deleted:!0})}function u(e,t){h(e).set(t)}function c(e,t){h(e).setError(t)}function l(e){var t=h(e);if(void 0!==t.current)return t}function f(){d().clear()}function d(){return y.cmsState.subState("objData")}function h(e){return new v.default(e,d().subState(e))}Object.defineProperty(t,"__esModule",{value:!0}),t.preload=i,t.createObjData=o,t.store=a,t.setNonexistent=s,t.set=u,t.setError=c,t.get=l,t.clearCache=f;var p=n(154),v=r(p),m=n(8),g=r(m),y=n(5)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryType=t.ObjSearchType=t.LinkType=t.WidgetType=t.ObjType=void 0;var i=n(21),o=n(3),a=r(o),s=n(30),u=r(s),c=n(35),l=r(c),f=n(48),d=r(f),h=n(24),p=r(h);t.ObjType=i.tcomb.irreducible("Obj",function(e){return(e&&e._scrivitoPrivateContent)instanceof a.default}),t.WidgetType=i.tcomb.irreducible("Widget",function(e){return(e&&e._scrivitoPrivateContent)instanceof u.default}),t.LinkType=i.tcomb.irreducible("Link",function(e){return(e&&e._scrivitoPrivateContent)instanceof l.default}),t.ObjSearchType=i.tcomb.irreducible("ObjSearch",function(e){return e._scrivitoPrivateContent instanceof d.default}),t.BinaryType=i.tcomb.irreducible("Binary",function(e){return e instanceof p.default})},function(e,t,n){"use strict";function r(){return u}function i(e){u=e}Object.defineProperty(t,"__esModule",{value:!0}),t.setWindowContext=t.getWindowContext=void 0;var o=n(260),a=function(e){return e&&e.__esModule?e:{default:e}}(o),s=n(197),u={};a.default.init(u).setInitialContentFor(s.initialContentFor),t.getWindowContext=r,t.setWindowContext=i},function(e,t,n){"use strict";function r(){return(0,i.getWindowContext)()._privateRealm._registry}Object.defineProperty(t,"__esModule",{value:!0}),t.getWindowRegistry=void 0;var i=n(55);t.getWindowRegistry=r},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){var t=e.routingBasePath;S=!0,x=t||""}function o(){S=!1,x=void 0}function a(e){var t=e.obj,n=e.queryParameters,r=e.hash;return d("generate"),s({path:_.generate(t),queryParameters:n,hash:r})}function s(e){var t=e.path,n=e.queryParameters,r=e.hash;d("generateUrl");var i=(0,y.default)(k.location()).origin(),o=("/"+x+"/"+t).replace(/\/+/g,"/"),a=(0,y.default)(i).pathname(o);return n&&a.query(n),r&&a.hash(r),a.toString()}function u(e){d("recognize");var t=null,n=c(e);return(0,b.isString)(n)&&(t=_.recognize(n)),{path:n,obj:t,queryParameters:v(e),hash:m(e)}}function c(e){return h(e)?p(e):null}function l(e){return h(e)?v(e):null}function f(e){return h(e)?m(e):null}function d(e){if(!S)throw scrivito.logError("Error from Scrivito SDK: No application configured, cannot initialize routing."),new E.InternalError(e+" can't be called before init.")}function h(e){var t=(0,y.default)(k.location()).origin(),n=(0,y.default)(e);return!n.is("absolute")||n.origin()===t}function p(e){var t=(0,y.default)(e).path();return t.substring(0,x.length)!==x?null:t.substring(x.length)}function v(e){return(0,y.default)(e).query(!0)}function m(e){var t=(0,y.default)(e).hash();return""===t?null:t}Object.defineProperty(t,"__esModule",{value:!0}),t.init=i,t.reset=o,t.generate=a,t.generateUrl=s,t.recognize=u,t.recognizePath=c,t.recognizeQueryParameters=l,t.recognizeHash=f;var g=n(33),y=function(e){return e&&e.__esModule?e:{default:e}}(g),b=n(0),w=n(200),_=r(w),C=n(52),k=r(C),E=n(1),x=void 0,S=!1},,,function(e,t){e.exports=function(e){return"string"==typeof e}},function(e,t){e.exports=function(e){return!0===e||!1===e}},function(e,t,n){var r=n(14),i=n(9);e.exports=r("Function",i)},,function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};r(this,e);var i=void 0;if(t.idToCopy)this.idToCopy=t.idToCopy,this.contentType=n.contentType,i=n.filename;else{var o=t.source;this.source=o,this.contentType=n.contentType||o.type,i=n.filename||o.name}i&&(this.filename=i.replace(/[^\w\-_\.$]/g,"-"))}return i(e,[{key:"into",value:function(e){return f(e),(0,c.failIfFrozen)("Changing CMS content"),this.intoId(e.id())}},{key:"intoId",value:function(e){var t=void 0;return t=this.idToCopy?scrivito.BinaryRequest.copy(this.idToCopy,e,this.filename,this.contentType):scrivito.BinaryRequest.upload(e,this.source,this.filename,this.contentType),t.then(function(e){var t=e.id;return new a.default(t,!1)})}}]),e}(),f=(0,s.checkArgumentsFor)("FutureBinary#into",[["target",u.ObjType]],{docPermalink:"js-sdk/FutureBinary-into"});t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){var e=l(),t=e.objId;if((0,E.isNull)(t))return t;if(t)try{return scrivito.loadWithDefault(void 0,function(){var e=(0,N.getWindowContext)().appModelAccessor,n=(0,N.getWindowContext)().Obj,r=e.getObj(n,t);if(r)return r;throw new j.ResourceNotFoundError('Obj with id "'+t+'" not found.')})}catch(e){return void(0,I.default)(function(){return p(L,e)})}}function o(){return l().queryParameters||{}}function a(){return l().error}function s(e){u(e,function(e){var t=e.obj,n=e.queryParameters,r=e.hash;t&&scrivito.BrowserLocation.replaceWith({obj:t,queryParameters:n,hash:r})})}function u(e,t){if(!(0,E.isFunction)(e))throw new j.ArgumentError("Parameter fn needs to be a function.");var n=d();(0,P.default)(e).then(function(e){if(e.obj)return(0,P.default)(function(){return g(e.obj,e.queryParameters,e.hash)}).then(function(e){var r=e.obj,i=e.url,o=e.queryParameters,a=e.hash;t({obj:r,queryParameters:o,hash:a}),i?h(n,function(){return scrivito.changeLocation(i)}):h(n,function(){return v({obj:r,queryParameters:o,hash:a})})});p(n,new j.CurrentPageNotFoundError)}).catch(function(e){e instanceof j.NavigateToEmptyBinaryError||((0,M.throwNextTick)(e),p(n,e))})}function c(){return D.appState.subState("currentPage")}function l(){return c().get()||{}}function f(e){c().set(e)}function d(){return L+=1}function h(e,t){L===e&&t()}function p(e,t){h(e,function(){f({objId:null,error:t}),m(null)})}function v(e){var t=e.obj,n=e.queryParameters,r=e.hash,i=t&&t.id()||null;f({objId:i,queryParameters:n,hash:r}),m(i)}function m(e){scrivito.uiAdapter&&scrivito.uiAdapter.setCurrentPageId(e)}function g(e,t,n){return w(e),null===e?{}:e instanceof k.default?y(e,t,n):e instanceof A.default?b(e,t,n):void 0}function y(e,t,n){if(_(e)){var r=e.get("blob",["binary"]);if(!r)throw new j.NavigateToEmptyBinaryError;return{url:r.url()}}return{obj:e,queryParameters:t,hash:n}}function b(e,t,n){if(e.isExternal())return{url:e.url()};var r={obj:e.obj(),queryParameters:e.queryParameters(),hash:e.hash()};return t&&!(0,E.isEmpty)(t)&&(r.queryParameters=t),n&&(r.hash=n),g(r.obj,r.queryParameters,r.hash)}function w(e){if(!(0,E.isNull)(e)&&!(e instanceof k.default||e instanceof A.default)){if(!e)throw new j.ArgumentError("Missing target.");throw new j.ArgumentError("Target is invalid. Valid targets are instances of Obj or Link.")}}function _(e){var t=(0,N.getWindowContext)().getClass(e.objClass());return!!t&&S.default.forClass(t).isBinary()}Object.defineProperty(t,"__esModule",{value:!0}),t.setCurrentPage=t.replaceCurrentPage=t.currentPageError=t.currentPageParams=t.currentPage=void 0;var C=n(3),k=r(C),E=n(0),x=n(38),S=r(x),T=n(35),A=r(T),j=n(1),O=n(8),P=r(O),N=n(55),D=n(5),M=n(36),I=r(M),L=0;t.currentPage=i,t.currentPageParams=o,t.currentPageError=a,t.replaceCurrentPage=s,t.setCurrentPage=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.prototype.current=function(){return this.currentContext},e.prototype.runWith=function(e,t){var n=this.currentContext;try{return this.currentContext=e,t()}finally{this.currentContext=n}},e}();t.default=r},function(e,t,n){var r=n(14);e.exports=r("Any",function(){return!0})},function(e,t,n){function r(e,t){return"{"+c(e)+" | "+l(t)+"}"}function i(e,t,n){function i(t,n){var r=s(e,t,n);return r}var c=n||r(e,t),l=a(e);return i.meta={kind:"subtype",type:e,predicate:t,name:n,identity:l},i.displayName=c,i.is=function(n){return u(n,e)&&t(n)},i.update=function(e,t){return i(o.update(e,t))},i}var o=n(4),a=(n(18),n(9),n(46),n(27)),s=n(28),u=n(29),c=n(7),l=n(45);i.getDefaultName=r,e.exports=i},function(e,t,n){var r=n(14),i=n(60);e.exports=r("String",i)},function(e,t,n){function r(e,t){return"{[key: "+a(e)+"]: "+a(t)+"}"}function i(e,t,n){function i(n,r){if(d)return n;var i=!0,o={};for(var a in n)if(n.hasOwnProperty(a)){a=c(e,a,null);var s=n[a],u=c(t,s,null);i=i&&s===u,o[a]=u}return i&&(o=n),o}var f=n||r(e,t),d=(a(e),a(t),s(e)&&s(t));return i.meta={kind:"dict",domain:e,codomain:t,name:n,identity:d},i.displayName=f,i.is=function(n){if(!u(n))return!1;for(var r in n)if(n.hasOwnProperty(r)&&(!l(r,e)||!l(n[r],t)))return!1;return!0},i.update=function(e,t){return i(o.update(e,t))},i}var o=n(4),a=(n(18),n(9),n(7)),s=n(27),u=n(25),c=n(28),l=n(29);i.getDefaultName=r,e.exports=i},function(e,t,n){var r=n(23);n(4);e.exports=function(e,t,n){if(r(t))return e;for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}},function(e,t,n){"use strict";function r(e,t){var n=u[e];if(n)return n[t]}function i(e,t){p(e,t),u[e]=t}Object.defineProperty(t,"__esModule",{value:!0});var o=n(21),a=n(34),s=n(54),u={};t.getEditingConfigFor=r;var c=o.tcomb.struct({value:o.tcomb.String,title:o.tcomb.String}),l=o.tcomb.dict(o.tcomb.String,o.tcomb.struct({title:o.tcomb.maybe(o.tcomb.String),description:o.tcomb.maybe(o.tcomb.String),values:o.tcomb.maybe(o.tcomb.list(c))})),f=o.tcomb.list(o.tcomb.struct({title:o.tcomb.String,component:o.tcomb.maybe(o.tcomb.String),properties:o.tcomb.maybe(o.tcomb.list(o.tcomb.String))})),d=o.tcomb.dict(o.tcomb.String,o.tcomb.union([s.LinkType,o.tcomb.Date,o.tcomb.Function,o.tcomb.Nil,o.tcomb.Number,o.tcomb.String,o.tcomb.list(s.LinkType),o.tcomb.list(s.WidgetType),o.tcomb.list(o.tcomb.String)])),h=o.tcomb.struct({attributes:o.tcomb.maybe(l),propertiesGroups:o.tcomb.maybe(f),title:o.tcomb.maybe(o.tcomb.String),description:o.tcomb.maybe(o.tcomb.String),thumbnail:o.tcomb.maybe(o.tcomb.String),titleForContent:o.tcomb.maybe(o.tcomb.Function),descriptionForContent:o.tcomb.maybe(o.tcomb.Function),thumbnailForContent:o.tcomb.maybe(o.tcomb.Function),hideInSelectionDialogs:o.tcomb.maybe(o.tcomb.Boolean),properties:o.tcomb.maybe(o.tcomb.list(o.tcomb.String)),initialContent:o.tcomb.maybe(d)}),p=a.checkArgumentsFor("provideEditingConfig",[["className",o.tcomb.String],["editingConfig",h]],{docPermalink:"js-sdk/provideEditingConfig"});t.provideEditingConfig=i},function(e,t){e.exports=ReactDOM},function(e,t,n){"use strict";function r(e,t){c[e]=t}function i(e){return c[e]||null}function o(e,t){r(s(e),t)}function a(e){return i(s(e))}function s(e){return"appClass-"+e}function u(){c={}}Object.defineProperty(t,"__esModule",{value:!0});var c={};t.clearComponentRegistry=u,t.getComponentForAppClass=a,t.getComponentForId=i,t.registerComponentForAppClass=o,t.registerComponentForId=r},function(e,t,n){"use strict";function r(){return!!scrivito.uiAdapter&&scrivito.uiAdapter.isEditingMode()}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},,function(e,t,n){"use strict";function r(e,t){if(!e)return t;if(!t)return null;var n={};return o(e,t,function(r,i,o){"_widget_pool"===r?n._widget_pool=s(i,o):t.hasOwnProperty(r)?o&&(n[r]=o):n[r]=e[r]}),n}function i(e,t){if(!e)return t;if(!t)return null;var n={};return o(e,t,function(e,t,r){if("_widget_pool"===e){var i=c(t,r);d.default.isEmpty(i)||(n._widget_pool=i)}else{var o=u(t,r,function(){if(!d.default.isEqual(t,r))return r});void 0!==o&&(n[e]=o)}}),n}function o(e,t,n){d.default.union(d.default.keys(e),d.default.keys(t)).forEach(function(r){return n(r,a(e[r]),a(t[r]))})}function a(e){if(d.default.isArray(e)){var t=l(e,2),n=t[0],r=t[1];return"binary"===n&&r?[n,d.default.omit(r,"url")]:e}return e}function s(e,t){if(!t||d.default.isEmpty(t))return e;var n={};return o(e||{},t||{},function(e,i,o){t.hasOwnProperty(e)?o&&!i?n[e]=o:o&&(n[e]=r(i,o)):n[e]=i}),n}function u(e,t,n){return!e&&t?t:e&&!t?null:e&&t?n():void 0}function c(e,t){if(e===t)return{};var n={};return o(e,t,function(e,t,r){var o=u(t,r,function(){var e=i(t,r);if(!d.default.isEmpty(e))return e});void 0!==o&&(n[e]=o)}),n}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.apply=r,t.diff=i;var f=n(0),d=function(e){return e&&e.__esModule?e:{default:e}}(f)},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){v&&h&&(v=!1,h.length?p=h.concat(p):m=-1,p.length&&s())}function s(){if(!v){var e=i(a);v=!0;for(var t=p.length;t;){for(h=p,p=[];++m1)for(var n=1;n1&&(r=n[0]+"@",e=n[1]),e=e.replace(P,"."),r+s(e.split("."),t).join(".")}function c(e){for(var t,n,r=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(e-=65536,t+=I(e>>>10&1023|55296),e=56320|1023&e),t+=I(e)}).join("")}function f(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:_}function d(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function h(e,t,n){var r=0;for(e=n?M(e/x):e>>1,e+=M(e/t);e>D*k>>1;r+=_)e=M(e/D);return M(r+(D+1)*e/(e+E))}function p(e){var t,n,r,i,o,s,u,c,d,p,v=[],m=e.length,g=0,y=T,b=S;for(n=e.lastIndexOf(A),n<0&&(n=0),r=0;r=128&&a("not-basic"),v.push(e.charCodeAt(r));for(i=n>0?n+1:0;i=m&&a("invalid-input"),c=f(e.charCodeAt(i++)),(c>=_||c>M((w-g)/s))&&a("overflow"),g+=c*s,d=u<=b?C:u>=b+k?k:u-b,!(cM(w/p)&&a("overflow"),s*=p;t=v.length+1,b=h(g-o,t,0==o),M(g/t)>w-y&&a("overflow"),y+=M(g/t),g%=t,v.splice(g++,0,y)}return l(v)}function v(e){var t,n,r,i,o,s,u,l,f,p,v,m,g,y,b,E=[];for(e=c(e),m=e.length,t=T,n=0,o=S,s=0;s=t&&vM((w-n)/g)&&a("overflow"),n+=(u-t)*g,t=u,s=0;sw&&a("overflow"),v==t){for(l=n,f=_;p=f<=o?C:f>=o+k?k:f-o,!(l= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=_-C,M=Math.floor,I=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(t,n,t,e))&&(e.exports=i)}()}).call(t,n(78)(e),n(51))},function(e,t,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 e&&e.exports?e.exports=a():(r=a,void 0!==(i="function"==typeof r?r.call(t,n,t,e):r)&&(e.exports=i))}(0,function(e){"use strict";function t(e){var t=e.toLowerCase(),n=t.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=e.length-1)return!1;var r=e.lastIndexOf(".",t-1);if(r<=0||r>=t-1)return!1;var i=n.list[e.slice(t+1)];return!!i&&i.indexOf(" "+e.slice(r+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var r=n.list[e.slice(t+1)];return!!r&&r.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var r=e.lastIndexOf(".",t-1);if(r<=0||r>=t-1)return null;var i=n.list[e.slice(t+1)];return i?i.indexOf(" "+e.slice(r+1,t)+" ")<0?null:e.slice(r+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return n})},function(e,t,n){"use strict";function r(e){var t=[],n=c.runWith(t,e);return new f(t,n)}function i(e){var t=l();if(!t)throw e(),new s.ScrivitoError("Content not yet loaded. Forgot to use Scrivito.load or Scrivito.connect? See https://scrivito.com/content-not-yet-loaded-error");t.push({reason:"missing",loader:e})}function o(e){var t=l();t&&t.push({reason:"outdated",loader:e})}Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=n(1),u=n(66),c=new u.default,l=function(){return c.current()};t.capture=r,t.notifyMissingData=i,t.notifyOutdatedData=o;var f=function(){function e(e,t){this.captureList=e,this.result=t}return e.prototype.isAllDataLoaded=function(){return!a.findWhere(this.captureList,{reason:"missing"})},e.prototype.isAllDataUpToDate=function(){return 0===this.captureList.length},e.prototype.loadRequiredData=function(){if(0===this.captureList.length)return null;this.captureList.forEach(function(e){return e.loader()})},e}();t.CaptureReport=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(15),o=n(36),a=function(){function e(e,t){var n=(void 0===t?{}:t).batchSize;this.mget=e,this.batchSize=n||100,this.deferreds={}}return e.prototype.retrieve=function(e){var t=this;if(r.isEmpty(this.deferreds)&&o.default(function(){return t.performRetrieval()}),!this.deferreds[e]){var n=new i.default;this.deferreds[e]=n}return this.deferreds[e].promise},e.prototype.reset=function(){this.deferreds={}},e.prototype.performRetrieval=function(){var e=this,t=r.keys(this.deferreds).slice(0,this.batchSize);if(0!==t.length){var n={};t.forEach(function(t){n[t]=e.deferreds[t],delete e.deferreds[t]}),this.mget(t).then(function(r){t.forEach(function(t,i){var o=n[t],a=r[i];i"}function i(e,t){function n(t,n){if(f)return t;for(var r=!0,i=[],o=0,a=t.length;o":">"}},{key:"id",value:function(){var e=this._dataForId(),t=e.name,n=e.objId,r=e.widgetId,i=t+"|"+n;return r&&(i+="|"+r),i}},{key:"_assertValidTypes",value:function(e,t){if(!(0,u.include)(e,this.type()))throw new c.InternalError(t)}},{key:"_dataForId",value:function(){var e={name:this.name()},t=this.container();return t instanceof s.default?e.objId=t.id():(e.objId=t.obj().id(),e.widgetId=t.id()),e}},{key:"_sortValuesByLocalization",value:function(e){var t=this;return e?this.typeOptions().valuesLocalization?(0,u.sortBy)(e,function(n){var r=(0,u.findIndex)(t.typeOptions().valuesLocalization,{value:n});return-1===r?e.length:r}):e:[]}}]),e}();t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:window.document,n=t.createElement("link");n.rel="stylesheet",n.href=e,t.head.appendChild(n)}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.document,n=t.createElement("script");n.src=e,t.head.appendChild(n)}Object.defineProperty(t,"__esModule",{value:!0}),t.loadCss=r,t.loadJs=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=o(e,t);if(n)return n;var r=e._widget_pool;return l.default.find(r,function(e,r){if(n=o(e,t))return n.parentWidgetId=r,!0}),n}function o(e,t){var n=void 0;return l.default.find(e,function(e,r){if(!(0,u.default)(r)){var i=a(e,2),o=i[0],s=i[1];if(s&&"widgetlist"===o){var c=s.indexOf(t);if(-1!==c)return n={attributeName:r,index:c},!0}}}),n}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=i;var s=n(42),u=r(s),c=n(0),l=r(c)},function(e,t,n){e.exports=n(187)},,,,,,function(e,t,n){"use strict";function r(){if(window.parent!==window){var e=window.parent.connectAppDocument;return e?e(window.document):void 0}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";n(109),n(140),n(142),n(145),n(146),n(147),n(148),n(149),n(150),n(152),n(153),n(180),n(184),n(185)},function(e,t,n){"use strict";var r=n(36),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=n(5);!function(){function e(e){r()||(0,i.default)(function(){return(0,o.withBatchedUpdates)(function(){return t(n)})}),n.push(e)}function t(e){n=[];try{e.forEach(function(e){return e()})}finally{r()&&t(n)}}var n=[],r=function(){return n.length};scrivito.batchedStateUpdater={add:e}}()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(0),a=n(1),s=n(66),u=0,c=Object.assign||o.extend,l=function(){function e(){}return e.prototype.get=function(){var e=this,t=this.untrackedGet();return this.recordDetector(function(){return t!==e.untrackedGet()}),t},e.prototype.recordDetector=function(e){this.getTree().recordDetector(e)},e.prototype.clear=function(){this.set(void 0)},e.prototype.subState=function(e){return new h(this,e)},e.prototype.setSubState=function(e,t){var n=this.untrackedGet();if(void 0===n){var r=(o={},o[e]=t,o);this.set(r)}else{var i=c({},n);i[e]=t,this.set(i)}var o},e.prototype.getSubState=function(e){var t=this.untrackedGet();if(void 0!==t)return t[e]},e}(),f=function(e){function t(){var t=e.call(this)||this;return t.treeId=(u++).toString(),t.clearListeners(),t.detectorRecording=new s.default,t.batchUpdates=new s.default,t.version=0,t.frozenContextContainer=new s.default,t}return r(t,e),t.prototype.untrackedGet=function(){return this.state},t.prototype.withFrozenState=function(e,t){return this.frozenContextContainer.runWith(e,t)},t.prototype.failIfFrozen=function(e){var t=this.frozenContextContainer.current();if(t){var n=e+" is not permitted inside '"+t.contextName+"'. "+(t.message||"");throw new d(n)}},t.prototype.set=function(e){this.failIfFrozen("Changing state"),this.state=e,this.version++,this.insideBatchUpdate()||this.notifyListeners()},t.prototype.trackChanges=function(e){var t=this,n=this.version,r=this.recordDetectors(e);return function(){return t.version!==n&&!!o.find(r,function(e){return e()})}},t.prototype.recordDetector=function(e){var t=this.detectorRecording.current();void 0!==t&&t.push(e)},t.prototype.getTree=function(){return this},t.prototype.id=function(){return this.treeId},t.prototype.subscribe=function(e){var t=this,n=!0,r=function(){n&&e()};return this.ensureCanMutateListeners(),this.listeners.push(r),function(){n=!1;var e=t.listeners.indexOf(r);t.ensureCanMutateListeners(),t.listeners.splice(e,1)}},t.prototype.withBatchedUpdates=function(e){var t=this.state;try{this.batchUpdates.runWith(!0,e)}finally{this.insideBatchUpdate()||t===this.state||this.notifyListeners()}},t.prototype.listenerCount=function(){return this.listeners.length},t.prototype.clearListeners=function(){this.listeners=[]},t.prototype.recordDetectors=function(e){if(void 0!==this.detectorRecording.current())throw new i.InternalError("no nested detector recording!");var t=[];return this.detectorRecording.runWith(t,e),t},t.prototype.notifyListeners=function(){this.listenersToNotify=this.listeners,this.listenersToNotify.forEach(function(e){return e()})},t.prototype.ensureCanMutateListeners=function(){this.listenersToNotify===this.listeners&&(this.listeners=this.listeners.slice())},t.prototype.insideBatchUpdate=function(){return!!this.batchUpdates.current()},t}(l);t.default=f;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(a.ScrivitoError);t.StateChangePreventedError=d;var h=function(e){function t(t,n){var r=e.call(this)||this;return r.parentState=t,r.key=n,r.tree=t.getTree(),r}return r(t,e),t.prototype.getTree=function(){return this.tree},t.prototype.untrackedGet=function(){return this.parentState.getSubState(this.key)},t.prototype.set=function(e){this.parentState.setSubState(this.key,e)},t.prototype.id=function(){var e=this.key.replace(/\\/g,"\\\\").replace(/\//g,"\\/");return this.parentState.id()+"/"+e},t}(l)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{}}}function b(e){var t=e.method,n=e.path,r=e.requestParams,i=e.timeout,o=e.authorization,a=(0,c.default)(C+"/tenants/"+k+"/perform").scheme("https").toString(),s=y(t,n,r);return scrivito.fetch(t,a,{params:s,timeout:i,authorization:o,forceVerification:S})}function w(e){switch(e.status){case"success":return e.result;case"error":throw d.ClientError.for(e.message,412,e.code);case"open":return scrivito.wait(2).then(function(){return n("GET","tasks/"+e.id).then(function(e){return w(e)})});default:throw new d.ScrivitoError("Invalid task response (unknown status)")}}var _=15e3,C=void 0,k=void 0,E=void 0,x=void 0,S=void 0;scrivito.CmsRestApi={init:function(e,t,n){t&&(C=e,k=t,E&&E.resolve()),x=n||x||m.default},reset:function(){C=void 0,k=void 0,E=void 0,x=void 0,S=void 0},get:function(e,n){return t("GET",e,n)},put:function(e,n){return t("PUT",e,n)},post:function(e,n){return t("POST",e,n)},delete:function(e,n){return t("DELETE",e,n)},requestBuiltInUserSession:function(t){return e().then(function(){var e="sessions/"+t,n=a("PUT",function(t){return r(b({method:"PUT",path:e,timeout:t}))});return n.then(p.default.reset),n})},enableForceVerification:function(){S=!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 T=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_;i(this,e),this.timesOutAt=Date.now()+t}return o(e,[{key:"timedOut",value:function(){return this.remainingTime()<5}},{key:"remainingTime",value:function(){return Math.max(this.timesOutAt-Date.now(),0)}},{key:"cover",value:function(e){return e<=this.timesOutAt-5}}]),e}()}()},function(e,t,n){"use strict";function r(e){return new scrivito.Promise(function(t){return t(e(s()))}).catch(function(t){if(!(t instanceof c.UnauthorizedError))throw t;if(t.backendCode!==d)throw t;return i(t.details.verificator,t.details.data).then(function(t){return e(t.authorization)})})}function i(e,t){return h&&h.pending||(h={promise:f.default.fetch(e.id,e.url).then(function(e){return new scrivito.Promise(function(n){return e(t,n)})}),challenge:{verificator:e,data:t},pending:!0},h.promise.then(o,function(){h.pending=!1})),h.promise}function o(e){h=void 0,p=e}function a(){o()}function s(){if(p)return p.expiresAfter=200&&e.status<300)try{return t(JSON.parse(e.responseText))}catch(e){if(e instanceof SyntaxError)throw new o.RequestFailedError("JSON parse error");throw e}return n(e)}function n(e,t){a-=1,t(e)}var r=!1,a=0;scrivito.isFetchingActive=function(){return a>0},scrivito.disableFetching=function(){r=!0},scrivito.enableFetching=function(){r=!1},scrivito.fetch=function(t,n,o){var s=o.params,u=o.timeout,c=o.authorization,l=o.forceVerification;return r?(new i.default).promise:(a+=1,new scrivito.Promise(function(r,i){var o=e(t,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(e,t,n){"use strict";var r=n(5);!function(){function e(e){var t=e.clientModulesForExport();i.forEach(function(e){scrivito[e]=t[e]})}function t(){var e={};return i.forEach(function(t){e[t]=scrivito[t]}),e}function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.ui;n&&e(n),(0,r.initializeGlobalState)(n)}var i=["BinaryRequest","CmsRestApi","ObjReplication"];scrivito.client.init=n,scrivito.client.modulesForExport=t}()},function(e,t,n){"use strict";var r=n(16),i=function(e){return e&&e.__esModule?e:{default:e}}(r);!function(){function e(e,t){var n=i.default.run(t);return n.allDataLoaded?n.result:e}scrivito.loadableWithDefault=e,scrivito.loadWithDefault=e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i={},o={status:void 0},a=function(){function e(e){if(!e)throw new r.InternalError("LoadableValue needs stateContainer");this.container=e,this.id=e.id()}return e.resetLoadingState=function(){i={}},e.prototype.setLoading=function(e){i[this.id]=e},e.prototype.getLoading=function(){return i[this.id]},e.prototype.status=function(){return this.getState().status||"MISSING"},e.prototype.value=function(){var e=this.getState();if("AVAILABLE"===e.status)return e.value},e.prototype.error=function(){var e=this.getState();if("ERROR"===e.status)return e.error},e.prototype.version=function(){var e=this.getState();if(void 0!==e.status)return e.version},e.prototype.transitionToMissing=function(){this.setState({status:void 0})},e.prototype.transitionToAvailable=function(e,t){this.setState({status:"AVAILABLE",value:e,version:t})},e.prototype.transitionToError=function(e,t){this.setState({status:"ERROR",error:e,version:t})},e.prototype.setState=function(e){delete i[this.id],this.container.set(e)},e.prototype.getState=function(){return this.container.get()||o},e}();t.default=a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(1);!function(){var e=function(e){function t(e){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"Data is not yet loaded.",e))}return o(t,e),t}(a.ScrivitoError);scrivito.NotLoadedError=e}()},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;n0?e:t}function r(e,t){return e?t?i(e._version,t._version):1:-1}function i(e,t){return e>t?1:t>e?-1:0}function s(e){u.default.each(h,function(t){t(e)})}var c={},f=void 0,h={},v=0,y=0;scrivito.ObjReplication=function(){function i(e){var t=this;o(this,i),this._id=e,this._replicationActive=!1,this._scheduledReplication=!1,this._currentRequestDeferred=null,this._nextRequestDeferred=null,this._performThrottledReplication=scrivito.throttle(function(){return t._performReplication()},1e3)}return a(i,null,[{key:"get",value:function(e){return c[e]||(c[e]=new scrivito.ObjReplication(e)),c[e]}},{key:"subscribeWrites",value:function(e){return v+=1,h[v]=e,v}},{key:"unsubscribeWrites",value:function(e){delete h[e]}},{key:"getWorkspaceVersion",value:function(){return y}}]),a(i,[{key:"notifyLocalState",value:function(e){if(!f){if(void 0===this._backendState)throw new g.InternalError("Can not set local state before backend state.");if(this._backendState&&this._backendState._deleted)throw new g.InternalError("Can not update a fully deleted obj.");this._localState=e,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=e(this._backendState,n);this._updateLocalState(t(this.localState,i))}this._updateBackendState(n)}}},{key:"finishSaving",value:function(){var e=void 0;if(this._nextRequestDeferred)e=this._nextRequestDeferred.promise;else{if(!this._currentRequestDeferred)return scrivito.Promise.resolve();e=this._currentRequestDeferred.promise}return e.catch(function(){return scrivito.Promise.reject()})}},{key:"_startReplication",value:function(){var t=this;u.default.isEmpty(e(this._backendState,this._localState))?this._nextRequestDeferred&&(this._nextRequestDeferred.resolve(),this._nextRequestDeferred=null):this._replicationActive?this._nextRequestDeferred||(this._nextRequestDeferred=new p.default):this._scheduledReplication||(this._scheduledReplication=!0,this._initDeferredForRequest(),s(this._currentRequestDeferred.promise),(0,m.default)(function(){return t._performThrottledReplication()}))}},{key:"_performReplication",value:function(){var t=this,n=this._localState,r=e(this._backendState,this._localState);this._scheduledReplication=!1,this._replicationActive=!0,this._replicatePatchToBackend(r).then(function(e){t._handleBackendUpdate(n,e),t._currentRequestDeferred.resolve(t._id),t._currentRequestDeferred=null,t._replicationActive=!1,t._startReplication()},function(e){t._currentRequestDeferred.reject(e),t._currentRequestDeferred=null,t._replicationActive=!1})}},{key:"_replicatePatchToBackend",value:function(e){if(u.default.isEmpty(e))return scrivito.Promise.resolve(this._backendState);var t=scrivito.currentWorkspaceId(),n="workspaces/"+t+"/objs/"+this._id;return scrivito.CmsRestApi.put(n,{obj:e})}},{key:"_initDeferredForRequest",value:function(){if(this._nextRequestDeferred){var e=this._nextRequestDeferred;this._nextRequestDeferred=null,this._currentRequestDeferred=e}else this._currentRequestDeferred=new p.default}},{key:"_handleBackendUpdate",value:function(r,i){var o=e(r,this._localState);this._updateBackendState(n(i,this._bufferedBackendState)),this._bufferedBackendState=void 0,this._updateLocalState(t(this._backendState,o))}},{key:"_updateLocalState",value:function(e){this._localState=e,l.set(this._id,this._localState)}},{key:"_updateBackendState",value:function(e){void 0!==this._backendState&&y++,this._backendState=e}},{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(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(155),i=n(77),o=n(16),a=n(5),s=function(){function e(e,t){var n=this;this._loadableData=new o.default({state:t,loader:function(e){var t=e.push;return r.retrieveObj(n._id).then(function(e){return t(function(){return n._replication().notifyBackendState(e)}),e})}}),this._id=e}return Object.defineProperty(e.prototype,"current",{get:function(){return this._loadableData.get()},enumerable:!0,configurable:!0}),e.prototype.set=function(e){a.failIfFrozen("Changing CMS content"),this._loadableData.set(e)},e.prototype.setError=function(e){this._loadableData.setError(e)},e.prototype.isAvailable=function(){return this._loadableData.isAvailable()},e.prototype.update=function(e){var t=i.apply(this.current,e);this.set(t),this._replication().notifyLocalState(t)},e.prototype.finishSaving=function(){return this._replication().finishSaving()},e.prototype._replication=function(){return scrivito.ObjReplication.get(this._id)},e}();t.default=s},function(e,t,n){"use strict";function r(e){var t=scrivito.currentWorkspaceId();return scrivito.CmsRestApi.get("workspaces/"+t+"/objs/mget",{ids:e,include_deleted:!0}).then(function(e){return e.results})}function i(e){return s.retrieve(e).then(function(t){return t||{_deleted:e}})}function o(){s.reset()}Object.defineProperty(t,"__esModule",{value:!0});var a=n(87),s=new a.default(r,{batchSize:17});t.retrieveObj=i,t.reset=o},function(e,t,n){"use strict";function r(e,t,n){var r=s.getTypeName(t),i=n.length?"/"+n.join("/")+": "+r:r;return"Invalid value "+u(e)+" supplied to "+i}function i(e,t,n,i){return s.Function.is(t.getValidationErrorMessage)?t.getValidationErrorMessage(e,n,i):r(e,t,n)}function o(e,t,n){n=n||{};var r=s.Array.is(n)?n:n.path||[];return new f(a(e,t,r,n))}function a(e,t,n,r){return s.isType(t)?d[t.meta.kind](e,t,n,r):d.es6classes(e,t,n,r)}var s=n(157),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(e,t,n,r){return new l({message:i(e,t,n,r),actual:e,expected:t,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(e){return u(e.message)}).join(", ")+")]"};var d=o.validators={};d.es6classes=function(e,t,n,r){return{value:e,errors:e instanceof t?[]:[l.of(e,t,n,r.context)]}},d.irreducible=d.enums=function(e,t,n,r){return{value:e,errors:t.is(e)?[]:[l.of(e,t,n,r.context)]}},d.list=function(e,t,n,r){if(!s.Array.is(e))return{value:e,errors:[l.of(e,t,n,r.context)]};for(var i={value:[],errors:[]},o=0,u=e.length;oo)return{value:e,errors:[l.of(e,t,n,r.context)]};for(var u={value:[],errors:[]},c=0;c1&&s.errors.push(l.of(e,t,n,r.context)),s},d.interface=function(e,t,n,r){if(!s.Object.is(e))return{value:e,errors:[l.of(e,t,n,r.context)]};var i={value:{},errors:[]},o=t.meta.props;for(var u in o){var c=a(e[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:t.meta.strict)for(var f in e)o.hasOwnProperty(f)||s.Nil.is(e[f])||i.errors.push(l.of(e[f],s.Nil,n.concat(f),r.context));return i},s.mixin(s,{ValidationError:l,ValidationResult:f,validate:o}),e.exports=s},function(e,t,n){/*! @preserve * * tcomb.js - Type checking and DDD for JavaScript * * The MIT License (MIT) * * Copyright (c) 2014-2016 Giulio Canti * */ var r=n(4);r.Any=n(67),r.Array=n(159),r.Boolean=n(89),r.Date=n(160),r.Error=n(161),r.Function=n(62),r.Nil=n(90),r.Number=n(91),r.Integer=n(162),r.IntegerT=r.Integer,r.Object=n(163),r.RegExp=n(164),r.String=n(69),r.Type=n(165),r.TypeT=r.Type,r.Arr=r.Array,r.Bool=r.Boolean,r.Dat=r.Date,r.Err=r.Error,r.Func=r.Function,r.Num=r.Number,r.Obj=r.Object,r.Re=r.RegExp,r.Str=r.String,r.dict=n(70),r.declare=n(166),r.enums=n(167),r.irreducible=n(14),r.list=n(94),r.maybe=n(168),r.refinement=n(68),r.struct=n(170),r.tuple=n(97),r.union=n(174),r.func=n(175),r.intersection=n(176),r.subtype=r.refinement,r.inter=n(177),r.interface=r.inter,r.assert=r,r.update=n(178),r.mixin=n(71),r.isType=n(10),r.is=n(29),r.getTypeName=n(7),r.match=n(179),e.exports=r},function(e,t){e.exports=function(e){throw new TypeError("[tcomb] "+e)}},function(e,t,n){var r=n(14),i=n(26);e.exports=r("Array",i)},function(e,t,n){var r=n(14);e.exports=r("Date",function(e){return e instanceof Date})},function(e,t,n){var r=n(14);e.exports=r("Error",function(e){return e instanceof Error})},function(e,t,n){var r=n(68),i=n(91);e.exports=r(i,function(e){return e%1==0},"Integer")},function(e,t,n){var r=n(14),i=n(25);e.exports=r("Object",i)},function(e,t,n){var r=n(14);e.exports=r("RegExp",function(e){return e instanceof RegExp})},function(e,t,n){var r=n(14),i=n(10);e.exports=r("Type",i)},function(e,t,n){var r=(n(4),n(18),n(10),n(23),n(71)),i=n(7),o=n(93),a=1;e.exports=function(e){function t(e,t){return n(e,t)}var n;return t.define=function(i){return o(i)&&t.hasOwnProperty("dispatch")&&(i.dispatch=t.dispatch),n=i,r(t,n,!0),e&&(n.displayName=t.displayName=e,t.meta.name=e),t.meta.identity=n.meta.identity,t.prototype=n.prototype,t},t.displayName=e||i(t)+"$"+a++,t.meta={identity:!1},t.prototype=null,t}},function(e,t,n){function r(e){return Object.keys(e).map(function(e){return o.stringify(e)}).join(" | ")}function i(e,t){function n(e,t){return e}var i=t||r(e);return n.meta={kind:"enums",map:e,name:t,identity:!0},n.displayName=i,n.is=function(t){return e.hasOwnProperty(t)},n}var o=n(4),a=(n(18),n(46),n(60));n(25);i.of=function(e,t){e=a(e)?e.split(" "):e;var n={};return e.forEach(function(e){n[e]=e}),i(n,t)},i.getDefaultName=r,e.exports=i},function(e,t,n){function r(e){return"?"+f(e)}function i(e,t){function n(t,n){return c.is(t)?t:u(e,t,n)}if(o(e)||e===s||e===c)return e;var i=t||r(e),f=a(e);return n.meta={kind:"maybe",type:e,name:t,identity:f},n.displayName=i,n.is=function(t){return c.is(t)||l(t,e)},n}var o=(n(4),n(18),n(9),n(169)),a=n(27),s=n(67),u=n(28),c=n(90),l=(n(46),n(29)),f=n(7);i.getDefaultName=r,e.exports=i},function(e,t,n){var r=n(10);e.exports=function(e){return r(e)&&"maybe"===e.meta.kind}},function(e,t,n){function r(e){return"Struct"+f(e)}function i(e,t){return d(a,e,t)}function o(e){return u(e)||(e=c(e)?{}:{name:e}),e.hasOwnProperty("strict")||(e.strict=a.strict),e.hasOwnProperty("defaultProps")||(e.defaultProps={}),e}function a(e,t){function n(t,r){if(n.is(t))return t;if(!(this instanceof n))return new n(t,r);for(var i in e)if(e.hasOwnProperty(i)){var o=e[i],a=t[i];void 0===a&&(a=c[i]),this[i]=l(o,a,null)}}t=o(t);var a=t.name,u=t.strict,c=t.defaultProps,f=a||r(e);return n.meta={kind:"struct",props:e,name:a,identity:!1,strict:u,defaultProps:c},n.displayName=f,n.is=function(e){return e instanceof n},n.update=function(e,t){return new n(s.update(e,t))},n.extend=function(e,t){return i([n].concat(e),t)},n}var s=n(4),u=(n(18),n(69),n(62),n(61),n(25)),c=n(23),l=n(28),f=(n(7),n(70),n(95)),d=n(96);a.strict=!1,a.getOptions=o,a.getDefaultName=r,a.extend=i,e.exports=a},function(e,t,n){var r=n(10);e.exports=function(e){return r(e)&&"struct"===e.meta.kind}},function(e,t,n){var r=n(10);e.exports=function(e){return r(e)&&"interface"===e.meta.kind}},function(e,t,n){function r(e){return s(e)&&"subtype"===e.meta.kind}function i(e){return r(e)?[e.meta.predicate].concat(i(e.meta.type)):[]}function o(e){return r(e)?o(e.meta.type):e}function a(e){return{predicates:i(e),unrefinedType:o(e)}}var s=n(10);e.exports=a},function(e,t,n){function r(e){return e.map(a).join(" | ")}function i(e,t){function n(e,t){if(a)return e;var r=n.dispatch(e);return!r&&n.is(e)?e:u(r,e,t)}var i=t||r(e),a=e.every(s);return n.meta={kind:"union",types:e,name:t,identity:a},n.displayName=i,n.is=function(t){return e.some(function(e){return c(t,e)})},n.dispatch=function(t){for(var n=0,r=e.length;n "+d(t)}function i(e){return s.is(e)&&c(e.instrumentation)}function o(e){for(var t=e.length,n=!1,r=t-1;r>=0;r--){var i=e[r];if(!h(i)||"maybe"!==i.meta.kind)return r+1;n=!0}return n?0:t}function a(e,t,n){function s(e,t){return i(e)?e:s.of(e)}e=u(e)?e:[e];var c=n||r(e,t),d=e.length;o(e);return s.meta={kind:"func",domain:e,codomain:t,name:n,identity:!0},s.displayName=c,s.is=function(n){return i(n)&&n.instrumentation.domain.length===d&&n.instrumentation.domain.every(function(t,n){return t===e[n]})&&n.instrumentation.codomain===t},s.of=function(n,r){function i(){var i=Array.prototype.slice.call(arguments),o=i.length;if(r&&o0?t.concat(e):t}function c(e,t){if(e.length>0){t=r(t);for(var n=0,i=e.length;n0?(t=r(t),e.reduce(function(e,t){return e.splice.apply(e,t),e},t)):t}function d(e,t){if(e.from!==e.to){t=r(t);var n=t[e.to];t[e.to]=t[e.from],t[e.from]=n}return t}function h(e,t){return e.length>0?e.concat(t):t}function p(e,t){var n=!1,i=r(t);for(var o in e)e.hasOwnProperty(o)&&(i[o]=e[o],n=n||i[o]!==t[o]);return n?i:t}var v=(n(4),n(25)),m=(n(9),n(26)),g=(n(92),n(98));a.commands={$apply:s,$push:u,$remove:c,$set:l,$splice:f,$swap:d,$unshift:h,$merge:p},e.exports=a},function(e,t,n){var r=n(4),i=n(9),o=n(10),a=n(67);e.exports=function(e){for(var t,n,s,u=1,c=arguments.length;u=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(183),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),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 e)return"";if("string"==typeof t&&(b=t),l=P.en,f=O.en,"object"==typeof t){n=t.maintainCase||!1,S=t.custom&&"object"==typeof t.custom?t.custom:S,i=+t.truncate>1&&t.truncate||!1,o=t.uric||!1,a=t.uricNoSlash||!1,s=t.mark||!1,x=!1!==t.symbols&&!1!==t.lang,b=t.separator||b,o&&(y+=w.join("")),a&&(y+=_.join("")),s&&(y+=C.join("")),l=t.lang&&P[t.lang]&&x?P[t.lang]:x?P.en:{},f=t.lang&&O[t.lang]?O[t.lang]:!1===t.lang||!0===t.lang?{}:O.en,t.titleCase&&"number"==typeof t.titleCase.length&&Array.prototype.toString.call(t.titleCase)?(t.titleCase.forEach(function(e){S[e+""]=e+""}),r=!0):r=!!t.titleCase,t.custom&&"number"==typeof t.custom.length&&Array.prototype.toString.call(t.custom)&&t.custom.forEach(function(e){S[e+""]=e+""}),Object.keys(S).forEach(function(t){var n;n=t.length>1?new RegExp("\\b"+u(t)+"\\b","gi"):new RegExp(u(t),"gi"),e=e.replace(n,S[t])});for(p in S)y+=p}for(y+=b,y=u(y),e=e.replace(/(^\s+|\s+$)/g,""),m=!1,g=!1,h=0,v=e.length;h=0?(E+=p,p=""):!0===g?(p=j[E]+T[p],E=""):p=m&&T[p].match(/[A-Za-z0-9]/)?" "+T[p]:T[p],m=!1,g=!1):p in j?(E+=p,p="",h===v-1&&(p=j[E]),g=!0):!l[p]||o&&-1!==w.join("").indexOf(p)||a&&-1!==_.join("").indexOf(p)?(!0===g?(p=j[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!==e[h+1]&&e[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(e,t,n){var r=t.toUpperCase()+(null!==n?n:"");return Object.keys(S).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(e){return function(t){return a(t,e)}},u=function(e){return e.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},c=function(e,t){for(var n in t)if(t[n]===e)return!0};void 0!==e&&e.exports?(e.exports=a,e.exports.createSlug=s):(r=[],void 0!==(i=function(){return a}.apply(t,r))&&(e.exports=i))}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n,r){var i=C(t,2),f=i[0],v=i[1];switch(n){case"binary":return o(f,v);case"date":return a(f,v);case"float":return l(f,v);case"enum":return u(f,v,r);case"html":return s(f,v);case"integer":return d(f,v);case"link":return h(f,v);case"linklist":return p(f,v);case"multienum":return c(f,v,r);case"reference":return g(f,v);case"referencelist":return y(f,v);case"string":return b(f,v);case"stringlist":return w(f,v);case"widgetlist":return _(f,v,e)}}function o(e,t){if("binary"===e&&t){var n=t.id,r="published"===scrivito.currentWorkspaceId();return new P.default(n,r).optimizeFor({})}return null}function a(e,t){return"date"!==e?null:(0,x.deserializeAsDate)(t)}function s(e,t){return j.default.contains(["html","string"],e)&&j.default.isString(t)?t:""}function u(e,t,n){var r=n.values;return"string"===e&&j.default.contains(r,t)?t:null}function c(e,t,n){var r=n.values;return"stringlist"===e&&Array.isArray(t)?j.default.intersection(t,r):[]}function l(e,t){switch(e){case"string":return t.match(/^-?\d+(\.\d+)?$/)?f(t):null;case"number":return f(t);default:return null}}function f(e){var t=parseFloat(e);return(0,x.isValidFloat)(t)?t:null}function d(e,t){switch(e){case"string":case"number":return(0,x.deserializeAsInteger)(t);default:return null}}function h(e,t){return"link"===e&&j.default.isObject(t)?v(t):null}function p(e,t){return j.default.isArray(t)?j.default.compact(t.map(v)):[]}function v(e){var t=j.default.pick(e,"title","query","fragment","target","url");t.hash=t.fragment,delete t.fragment,t.objId=e.obj_id;var n=T.default.build(t);return n.isBroken()?null:n}function m(e){var t=E.default.get(e);return t||null}function g(e,t){return"reference"===e&&t?m(t):null}function y(e,t){if("referencelist"!==e)return[];if(!t)return[];var n=t.map(m);return j.default.compact(n)}function b(e,t){return j.default.contains(["html","string"],e)&&j.default.isString(t)?t:""}function w(e,t){return"stringlist"===e&&Array.isArray(t)?t:[]}function _(e,t,n){return"widgetlist"!==e?[]:j.default.map(t,function(e){return n.widget(e)})}Object.defineProperty(t,"__esModule",{value:!0});var C=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.deserialize=i;var k=n(3),E=r(k),x=n(43),S=n(35),T=r(S),A=n(0),j=r(A),O=n(24),P=r(O)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){(0,g.each)(e,function(e){return m.preload(e)})}function s(e,t){var n=(0,g.extend)({},e,{index:t}),r=d.computeCacheKey(n);return d.stateContainer().subState(r)}function u(e){return function(){return e+"|"+scrivito.ObjReplication.getWorkspaceVersion()}}function c(e){var t=(0,g.omit)({query:e.query,offset:e.offset,sort_by:e.sortBy,sort_order:e.sortDirection},g.isUndefined);return e.includeDeleted&&(t.options={include_deleted:!0}),t}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:void 0;o(this,e),this._params=t,this._batchSize=n,r?(this._index=r.index+1,this._continuation=r.continuationForNextBatch(),this._previousBatch=r):this._index=0}return l(e,null,[{key:"store",value:function(e,t){var n=s(c(e),0),r=u(void 0);new _.default({state:n,invalidation:r}).set({results:t})}},{key:"firstBatchFor",value:function(t,n){return new e(c(t),n)}},{key:"countFor",value:function(e){return this.firstBatchFor(e,0).count()}}]),l(e,[{key:"objIds",value:function(){return this._response().results}},{key:"count",value:function(){return this._response().total||0}},{key:"nextBatch",value:function(){if(this.continuationForNextBatch())return new e(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(){return new _.default({state:s(this._params,this._index),loader:this._load.bind(this),invalidation:u(this._continuation)})}},{key:"_load",value:function(e){var t=this,n=e.push,r=e.isReload,i=e.wasCancelled;return this._fetchContinuation().then(function(e){if(!i()){var o={size:t._batchSize,continuation:e,include_objs:!r()},s=(0,g.extend)({},t._params,o);return p.retrieve(s).then(function(e){return e.objs&&n(function(){return e.objs.forEach(function(e){return m.store(e)})}),a(e.results),e})}})}},{key:"_fetchContinuation",value:function(){var e=this;return this._previousBatch?(0,b.default)(function(){return e._previousBatch.continuationForNextBatch()}):scrivito.Promise.resolve()}},{key:"index",get:function(){return this._index}}]),e}();t.default=k},function(e,t,n){"use strict";function r(e){var t=scrivito.currentWorkspaceId(),n=o.default.extend({consistent:!0},e);return scrivito.CmsRestApi.get("workspaces/"+t+"/objs/search",n).then(function(e){return e.results=o.default.pluck(e.results,"id"),o.default.pick(e,"results","continuation","total","objs")})}Object.defineProperty(t,"__esModule",{value:!0}),t.retrieve=r;var i=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(i)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return!!e.current._deleted}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n2?r-2:0),u=2;u3&&void 0!==arguments[3]?arguments[3]:null;if(e instanceof t)this._scrivitoPrivateContent.and(e._scrivitoPrivateContent);else{var o=(0,d.unwrapAppClassValues)(r);this._scrivitoPrivateContent.and(e,n,o,i)}return this}},{key:"andNot",value:function(e,t,n){var r=(0,d.unwrapAppClassValues)(n);return this._scrivitoPrivateContent.andNot(e,t,r),this}},{key:"facet",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this._scrivitoPrivateContent.facet(t,n);return p.default.map(r,function(t){return new f.default(e,t)})}},{key:"take",value:function(t){return this._scrivitoPrivateContent.batchSize(t),(0,s.arrayFromIterable)(this._scrivitoPrivateContent,t).map(function(t){return(0,d.wrapInAppClass)(e,t)})}},{key:"offset",value:function(e){return this._scrivitoPrivateContent.offset(e),this}},{key:"order",value:function(e,t){return this._scrivitoPrivateContent.order(e,t),this}},{key:"count",value:function(){return this._scrivitoPrivateContent.count()}}]),t}();if("function"==typeof window.Symbol){var n=window.Symbol.iterator;if(n){t.prototype[n]=function(){var t=this._scrivitoPrivateContent.iterator();return{next:function(){var n=t.next(),r=n.done,i=n.value;return r?{done:r}:{done:r,value:(0,d.wrapInAppClass)(e,i)}}}}}}return t}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:null;return t(e.objClassNameFor(this)).and(n,r,i,o)}},{key:"create",value:function(e){var t=this._prepareAttributesForCreate(e);return n(d.default.create(t))}},{key:"_prepareAttributesForCreate",value:function(t){var n=e.objClassNameFor(this),r=p.default.forClass(this);u(t,n);var i=(0,E.default)(t,e,r,n),o={_objClass:n},a=(0,l.extend)({},t,i,o);return(0,y.unwrapAppAttributes)(a,r,n)}}]),f}((0,C.default)(r))}function u(e,t){if(!t)throw new v.ArgumentError("Creating CMS objects is not supported for the class Obj or abstract classes.");if(e.constructor!==Object)throw new v.ArgumentError("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(e._objClass)throw new v.ArgumentError('Invalid attribute "_objClass". "'+e._objClass+'.create" will automatically set the CMS object class correctly.')}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n=0||e.indexOf("Trident")>=0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=(0,a.default)(e);return(0,l.isConfigured)()?(0,c.default)(function(){return(0,f.recognize)(e)}).then(function(e){return e.path?(0,s.include)(["/",""],e.path)?null:{obj:e.obj,url:t}:null}):scrivito.Promise.resolve(null)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(33),a=r(o),s=n(0),u=n(8),c=r(u),l=n(199),f=n(57);t.default=i},function(e,t,n){"use strict";function r(e){var t=o.default.get(e);return t?(0,a.basicUrlFor)(t):(0,s.generateUrl)({path:e})}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(i),a=n(115),s=n(57);t.default=r},function(e,t,n){"use strict";var r=n(3),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=n(0),a=n(65),s=n(52),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),c=n(57);!function(){function e(e){var t=e.obj,n=e.queryParameters,r=e.hash,i={scrivitoObjId:t.id(),scrivitoQueryParameters:n,scrivitoHash:r},a=(0,c.generate)({obj:t,queryParameters:n,hash:r}),s=u.history();s.state&&s.state.scrivitoObjId===t.id()&&(0,o.isEqual)(s.state.scrivitoQueryParameters,n)&&s.state.scrivitoHash===r||s.pushState(i,"",a)}function t(e){var t=e.obj,n=e.queryParameters,r=e.hash,i={scrivitoObjId:t.id(),scrivitoQueryParameters:n,scrivitoHash:r},o=(0,c.generate)({obj:t,queryParameters:n,hash:r});u.history().replaceState(i,"",o)}function n(){u.setOnpopstate(l)}function r(){var e=u.location().toString();(0,a.replaceCurrentPage)(function(){var t=(0,c.recognize)(e),n=t.obj,r=t.queryParameters,i=t.hash;return n?{obj:n,queryParameters:r,hash:i}:{queryParameters:r,hash:i}})}function s(){r(),n()}function l(e){var t=void 0,n=void 0,o=void 0;e.state&&(t=e.state.scrivitoObjId,n=e.state.scrivitoHash,o=e.state.scrivitoQueryParameters),t?(0,a.replaceCurrentPage)(function(){return{obj:i.default.get(t),queryParameters:o,hash:n}}):r()}scrivito.BrowserLocation={},scrivito.BrowserLocation.init=s,scrivito.BrowserLocation.pushWith=e,scrivito.BrowserLocation.replaceWith=t}()},function(e,t,n){"use strict";!function(){function e(e){scrivito.uiAdapter?scrivito.uiAdapter.navigateToExternalUrl(e):scrivito.setWindowLocation(e)}function t(e){window.location=e}function n(e,t){window.open(e,t)}function r(e){n(e,"_blank")}scrivito.setWindowLocation=t,scrivito.changeLocation=e,scrivito.openLocation=n,scrivito.openInNewWindow=r}()},function(e,t,n){"use strict";n(276),n(277)},function(e,t,n){"use strict";window.scrivito||(window.scrivito={})},function(e,t,n){"use strict";!function(){var e=void 0,t=0,n={},r={subscribe:function(e){var r=e.onFocus,i=e.onBlur,o=t;return n[o]={onFocus:r,onBlur:i},t+=1,o},unsubscribe:function(e){delete n[e]},notifyFocus:function(t){e=t,n[e].onFocus()},notifyBlur:function(t){t===e&&n[t].onBlur()},get handlers(){return n},reset:function(){e=void 0,t=0,n={}}};scrivito.WidgetFocus=r}()},function(e,t,n){"use strict";function r(e){return scrivito.uiAdapter.openContentBrowser((0,a.default)((0,i.extend)({},(0,s.getContentBrowserConfiguration)(),(0,i.pick)(e,"selection","selectionMode"))))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(0),o=n(117),a=function(e){return e&&e.__esModule?e:{default:e}}(o),s=n(116)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){scrivito.registerEditor(a.default),scrivito.registerEditor(u.default),scrivito.registerEditor(l.default)}Object.defineProperty(t,"__esModule",{value:!0}),t.initializeEditors=i;var o=n(280),a=r(o),s=n(284),u=r(s),c=n(285),l=r(c)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n',init:function(){var e;return i.extensions.anchor.prototype.init.apply(this,arguments),this.targetCheckbox=null!=(e=this.getEditorOption("anchor"))?e.targetCheckbox:void 0},handleClick:function(e){var t,n,r,o,a;return e.preventDefault(),e.stopPropagation(),this.isDisplayed()||(o=i.selection.getSelectionRange(this.document),r=i.selection.getSelectedParentElement(o),n=i.util.getClosestTag(r,"a"),t=a=null,n&&(n=this.proxy.edQuery(n),t=n.attr("href")||null,a=n.attr("target")||null),this.showForm({value:t,target:a})),!1},getTemplate:function(){var e;return e="",this.targetCheckbox&&(e="
\n \n
"),("\n\n\n\n"+e).replace(/\n\s*/g,"")},attachFormEvents:function(e){var t;return i.extensions.anchor.prototype.attachFormEvents.call(this,e),e=this.proxy.edQuery(e),t=e.find(".medium-editor-toolbar-input"),e.find(".medium-editor-toolbar-browse").on("click",function(e){return function(){var n,r;return r=(n=e.proxy.idFromPath(t.val()))?[n]:[],scrivito.openContentBrowser({selection:r,selectionMode:"single"}).catch(function(e){throw t.focus(),e}).then(function(n){var r,i;if(r=n.isSelected,i=n.selection,r)return t.focus(),i.length?t.val(e.proxy.pathForId(i[0])):t.val("")}),!1}}(this))},completeFormSave:function(e){return this.base.restoreSelection(),e.value?this.execAction(this.action,e):this.execAction("unlink"),this.base.checkSelection()}}),s=function(){var e,t;return e=["bold","italic","scrivito_anchor","h2","h3","unorderedlist","orderedlist"],("undefined"!=typeof ScrivitoEditors&&null!==ScrivitoEditors&&null!=(t=ScrivitoEditors._config)?t.showHtmlEditorCodeButton:void 0)&&e.splice(2,0,"scrivito_code"),e},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(e){var t,n,r;return t=e.jQueryElement(),n=u(),null!=(r=n.extensions.scrivito_anchor)&&(r.proxy=e),new i(t,n).subscribe("editableInput",function(){return e.save(t.html())})},e.exports=a},function(e,t,n){(function(r){var i;/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */ "classList"in document.createElement("_")||function(e){"use strict";if("Element"in e){var t=e.Element.prototype,n=Object,r=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},i=Array.prototype.indexOf||function(e){for(var t=0,n=this.length;t1?t:this.data.length),n,this.encoding)},o.toString=function(){return"[object Blob]"},o.close=function(){this.size=0,delete this.data},n}(e);e.Blob=function(e,n){var r=n?n.type||"":"",i=new t;if(e)for(var o=0,a=e.length;o-1,isMac:t.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(e){return!!(a.isMac&&e.metaKey||!a.isMac&&e.ctrlKey)},isKey:function(e,t){var n=a.getKeyCode(e);return!1===Array.isArray(t)?n===t:-1!==t.indexOf(n)},getKeyCode:function(e){var t=e.which;return null===t&&(t=null!==e.charCode?e.charCode:e.keyCode),t},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 e=[!0].concat(Array.prototype.slice.call(arguments));return n.apply(this,e)},defaults:function(){var e=[!1].concat(Array.prototype.slice.call(arguments));return n.apply(this,e)},createLink:function(e,t,n,r){var i=e.createElement("a");return a.moveTextRangeIntoElement(t[0],t[t.length-1],i),i.setAttribute("href",n),r&&("_blank"===r&&i.setAttribute("rel","noopener noreferrer"),i.setAttribute("target",r)),i},findOrCreateMatchingTextNodes:function(e,t,n){for(var r=e.createTreeWalker(t,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(e,t,n){return t!==n?e.splitText(t-n):null},splitEndNodeIfNeeded:function(e,t,n,r){var i,o;i=r+e.nodeValue.length+(t?t.nodeValue.length:0)-1,o=n-r-(t?e.nodeValue.length:0),i>=n&&r!==i&&0!==o&&(t||e).splitText(o)},splitByBlockElements:function(t){if(3!==t.nodeType&&1!==t.nodeType)return[];var n=[],r=e.util.blockContainerElementNames.join(",");if(3===t.nodeType||0===t.querySelectorAll(r).length)return[t];for(var i=0;i0)break;r=o.nextNode()}return r},findPreviousSibling:function(e){if(!e||a.isMediumEditorElement(e))return!1;for(var t=e.previousSibling;!t&&!a.isMediumEditorElement(e.parentNode);)e=e.parentNode,t=e.previousSibling;return t},isDescendant:function(e,t,n){if(!e||!t)return!1;if(e===t)return!!n;if(1!==e.nodeType)return!1;if(r||3!==t.nodeType)return e.contains(t);for(var i=t.parentNode;null!==i;){if(i===e)return!0;i=i.parentNode}return!1},isElement:function(e){return!(!e||1!==e.nodeType)},throttle:function(e,t){var n,r,i,o=null,a=0,s=function(){a=Date.now(),o=null,i=e.apply(n,r),o||(n=r=null)};return t||0===t||(t=50),function(){var u=Date.now(),c=t-(u-a);return n=this,r=arguments,c<=0||c>t?(o&&(clearTimeout(o),o=null),a=u,i=e.apply(n,r),o||(n=r=null)):o||(o=setTimeout(s,c)),i}},traverseUp:function(e,t){if(!e)return!1;do{if(1===e.nodeType){if(t(e))return e;if(a.isMediumEditorElement(e))return!1}e=e.parentNode}while(e);return!1},htmlEntities:function(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},insertHTMLCommand:function(t,n){var r,i,o,s,u,c,l,f=!1,d=["insertHTML",!1,n];if(!e.util.isEdge&&t.queryCommandSupported("insertHTML"))try{return t.execCommand.apply(t,d)}catch(e){}if(r=t.getSelection(),r.rangeCount){if(i=r.getRangeAt(0),l=i.commonAncestorContainer,a.isMediumEditorElement(l)&&!l.firstChild)i.selectNode(l.appendChild(t.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=t.createElement("div"),o.innerHTML=n,s=t.createDocumentFragment();o.firstChild;)u=o.firstChild,c=s.appendChild(u);i.insertNode(s),c&&(i=i.cloneRange(),i.setStartAfter(c),i.collapse(!0),e.selection.selectRange(t,i)),f=!0}return t.execCommand.callListeners&&t.execCommand.callListeners(d,f),f},execFormatBlock:function(t,n){var r,i=a.getTopBlockContainer(e.selection.getSelectionStart(t));if("blockquote"===n){if(i&&(r=Array.prototype.slice.call(i.childNodes),r.some(function(e){return a.isBlockContainer(e)})))return t.execCommand("outdent",!1,null);if(a.isIE)return t.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 t.execCommand("outdent",!1,n);if((a.isFF||a.isEdge)&&"p"===n)return r=Array.prototype.slice.call(i.childNodes),r.some(function(e){return!a.isBlockContainer(e)})&&t.execCommand("formatBlock",!1,n),t.execCommand("outdent",!1,n)}return t.execCommand("formatBlock",!1,n)},setTargetBlank:function(e,t){var n,r=t||!1;if("a"===e.nodeName.toLowerCase())e.target="_blank",e.rel="noopener noreferrer";else for(e=e.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(e){for(var t,n;!a.isBlockContainer(e)&&!a.isMediumEditorElement(e);){for(n=e;n=n.previousSibling;)if(t=3===n.nodeType?n.nodeValue:n.textContent,t.length>0)return!1;e=e.parentNode}return!0},isMediumEditorElement:function(e){return e&&e.getAttribute&&!!e.getAttribute("data-medium-editor-element")},getContainerEditorElement:function(e){return a.traverseUp(e,function(e){return a.isMediumEditorElement(e)})},isBlockContainer:function(e){return e&&3!==e.nodeType&&-1!==a.blockContainerElementNames.indexOf(e.nodeName.toLowerCase())},getClosestBlockContainer:function(e){return a.traverseUp(e,function(e){return a.isBlockContainer(e)||a.isMediumEditorElement(e)})},getTopBlockContainer:function(e){var t=!!a.isBlockContainer(e)&&e;return a.traverseUp(e,function(e){return a.isBlockContainer(e)&&(t=e),!(t||!a.isMediumEditorElement(e))&&(t=e,!0)}),t},getFirstSelectableLeafNode:function(e){for(;e&&e.firstChild;)e=e.firstChild;if(e=a.traverseUp(e,function(e){return-1===a.emptyElementNames.indexOf(e.nodeName.toLowerCase())}),"table"===e.nodeName.toLowerCase()){var t=e.querySelector("th, td");t&&(e=t)}return e},getFirstTextNode:function(e){return a.warn("getFirstTextNode is deprecated and will be removed in version 6.0.0"),a._getFirstTextNode(e)},_getFirstTextNode:function(e){if(3===e.nodeType)return e;for(var t=0;t0){var i,o=r.getRangeAt(0),a=o.cloneRange();a.selectNodeContents(e),a.setEnd(o.startContainer,o.startOffset),i=a.toString().length,n={start:i,end:i+o.toString().length},this.doesRangeStartWithImages(o,t)&&(n.startsWithImage=!0);var s=this.getTrailingImageCount(e,n,o.endContainer,o.endOffset);if(s&&(n.trailingImageCount=s),0!==i){var u=this.getIndexRelativeToAdjacentEmptyBlocks(t,e,o.startContainer,o.startOffset);-1!==u&&(n.emptyBlocksIndex=u)}}return n},importSelection:function(e,t,n,r){if(e&&t){var i=n.createRange();i.setStart(t,0),i.collapse(!0);var o,a=t,s=[],u=0,c=!1,l=!1,f=0,d=!1,h=!1,p=null;for((r||e.startsWithImage||void 0!==e.emptyBlocksIndex)&&(h=!0);!d&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||l){if(e.trailingImageCount&&l&&("img"===a.nodeName.toLowerCase()&&f++,f===e.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&&e.start>=u&&e.start<=o&&(h||e.start=u&&e.end<=o&&(e.trailingImageCount?l=!0:(i.setEnd(a,e.end-u),d=!0)),u=o;d||(a=s.pop())}!c&&p&&(i.setStart(p,p.length),i.setEnd(p,p.length)),void 0!==e.emptyBlocksIndex&&(i=this.importSelectionMoveCursorPastBlocks(n,t,e.emptyBlocksIndex,i)),r&&(i=this.importSelectionMoveCursorPastAnchor(e,i)),this.selectRange(n,i)}},importSelectionMoveCursorPastAnchor:function(t,n){var r=function(e){return"a"===e.nodeName.toLowerCase()};if(t.start===t.end&&3===n.startContainer.nodeType&&n.startOffset===n.startContainer.nodeValue.length&&e.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(e.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(!e.util.isElementAtBeginningOfBlock(a))return-1;var s=e.util.findPreviousSibling(a);if(!s)return-1;if(s.nodeValue)return-1}for(var u=e.util.getClosestBlockContainer(i),c=n.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,t,!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(e,t){if(0!==e.startOffset||1!==e.startContainer.nodeType)return!1;if("img"===e.startContainer.nodeName.toLowerCase())return!0;var n=e.startContainer.querySelector("img");if(!n)return!1;for(var r=t.createTreeWalker(e.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(e,t,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=e,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&&t.start>=u&&t.start<=o&&(c=!0),c&&t.end>=u&&t.end<=o&&(l=!0),u=o;f||(a=s.pop())}return d},selectionContainsContent:function(e){var t=e.getSelection();if(!t||t.isCollapsed||!t.rangeCount)return!1;if(""!==t.toString().trim())return!0;var n=this.getSelectedParentElement(t.getRangeAt(0));return!(!n||!("img"===n.nodeName.toLowerCase()||1===n.nodeType&&n.querySelector("img")))},selectionInContentEditableFalse:function(e){var t,n=this.findMatchingSelectionParent(function(e){var n=e&&e.getAttribute("contenteditable");return"true"===n&&(t=!0),"#text"!==e.nodeName&&"false"===n},e);return!t&&n},getSelectionHtml:function(e){var t,n,r,i="",o=e.getSelection();if(o.rangeCount){for(r=e.createElement("div"),t=0,n=o.rangeCount;t-1?[t]:t,Array.prototype.forEach.call(t,function(e){e.addEventListener(n,r,i),this.events.push([e,n,r,i])}.bind(this))},detachDOMEvent:function(t,n,r,i){var o,a,s=this.base.options.contentWindow,u=this.base.options.ownerDocument;null!==t&&(t=e.util.isElement(t)||[s,u].indexOf(t)>-1?[t]:t,Array.prototype.forEach.call(t,function(e){-1!==(o=this.indexOfListener(e,n,r,i))&&(a=this.events.splice(o,1)[0],a[0].removeEventListener(a[1],a[2],a[3]))}.bind(this)))},indexOfListener:function(e,t,n,r){var i,o,a;for(i=0,o=this.events.length;i0&&(r=-1!==i.indexOf(e.nodeName.toLowerCase())),!r&&this.style&&(t=this.style.value.split("|"),n=this.window.getComputedStyle(e,null).getPropertyValue(this.style.prop),t.forEach(function(e){this.knownState||((r=-1!==n.indexOf(e))||"text-decoration"!==this.style.prop)&&(this.knownState=r)},this)),r)}});t.isBuiltInButton=function(t){return"string"==typeof t&&e.extensions.button.prototype.defaults.hasOwnProperty(t)},e.extensions.button=t}(),function(){e.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 t=e.extensions.button.extend({init:function(){e.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 e=this.base.getExtensionByName("toolbar");e&&e.showToolbarDefaultActions()},hideToolbarDefaultActions:function(){var e=this.base.getExtensionByName("toolbar");e&&e.hideToolbarDefaultActions()},setToolbarPosition:function(){var e=this.base.getExtensionByName("toolbar");e&&e.setToolbarPosition()}});e.extensions.form=t}(),function(){var t=e.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(){e.extensions.form.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this))},handleClick:function(t){t.preventDefault(),t.stopPropagation();var n=e.selection.getSelectionRange(this.document);return"a"===n.startContainer.nodeName.toLowerCase()||"a"===n.endContainer.nodeName.toLowerCase()||e.util.getClosestTag(e.selection.getSelectedParentElement(n),"a")?this.execAction("unlink"):(this.isDisplayed()||this.showForm(),!1)},handleKeydown:function(t){e.util.isKey(t,e.util.keyCode.K)&&e.util.isMetaCtrlKey(t)&&!t.shiftKey&&this.handleClick(t)},getForm:function(){return this.form||(this.form=this.createForm()),this.form},getTemplate:function(){var e=[''];return e.push('',"fontawesome"===this.getEditorOption("buttonLabels")?'':this.formSaveLabel,""),e.push('',"fontawesome"===this.getEditorOption("buttonLabels")?'':this.formCloseLabel,""),this.targetCheckbox&&e.push('

','','","
"),this.customClassOption&&e.push('
','',"","
"),e.join("")},isDisplayed:function(){return e.extensions.form.prototype.isDisplayed.apply(this)},hideForm:function(){e.extensions.form.prototype.hideForm.apply(this),this.getInput().value=""},showForm:function(t){var n=this.getInput(),r=this.getAnchorTargetCheckbox(),i=this.getAnchorButtonCheckbox();if(t=t||{value:""},"string"==typeof t&&(t={value:t}),this.base.saveSelection(),this.hideToolbarDefaultActions(),e.extensions.form.prototype.showForm.apply(this),this.setToolbarPosition(),n.value=t.value,n.focus(),r&&(r.checked="_blank"===t.target),i){var o=t.buttonClass?t.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 e=this.getAnchorTargetCheckbox(),t=this.getAnchorButtonCheckbox(),n={value:this.getInput().value.trim()};return this.linkValidation&&(n.value=this.checkLinkFormat(n.value)),n.target="_self",e&&e.checked&&(n.target="_blank"),t&&t.checked&&(n.buttonClass=this.customClassOption),n},doFormSave:function(){var e=this.getFormOpts();this.completeFormSave(e)},completeFormSave:function(e){this.base.restoreSelection(),this.execAction(this.action,e),this.base.checkSelection()},ensureEncodedUri:function(e){return e===decodeURI(e)?encodeURI(e):e},ensureEncodedUriComponent:function(e){return e===decodeURIComponent(e)?encodeURIComponent(e):e},ensureEncodedParam:function(e){var t=e.split("="),n=t[0],r=t[1];return n+(void 0===r?"":"="+this.ensureEncodedUriComponent(r))},ensureEncodedQuery:function(e){return e.split("&").map(this.ensureEncodedParam.bind(this)).join("&")},checkLinkFormat:function(e){var t=/^([a-z]+:)?\/\/|^(mailto|tel|maps):|^\#/i,n=t.test(e),r="",i=/^\+?\s?\(?(?:\d\s?\-?\)?){3,20}$/,o=e.match(/^(.*?)(?:\?(.*?))?(?:#(.*))?$/),a=o[1],s=o[2],u=o[3];if(i.test(e))return"tel:"+e;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(e){var t=e.querySelector(".medium-editor-toolbar-close"),n=e.querySelector(".medium-editor-toolbar-save"),r=e.querySelector(".medium-editor-toolbar-input");this.on(e,"click",this.handleFormClick.bind(this)),this.on(r,"keyup",this.handleTextboxKeyup.bind(this)),this.on(t,"click",this.handleCloseClick.bind(this)),this.on(n,"click",this.handleSaveClick.bind(this),!0)},createForm:function(){var e=this.document,t=e.createElement("div");return t.className="medium-editor-toolbar-form",t.id="medium-editor-toolbar-form-anchor-"+this.getEditorId(),t.innerHTML=this.getTemplate(),this.attachFormEvents(t),t},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(t){if(t.keyCode===e.util.keyCode.ENTER)return t.preventDefault(),void this.doFormSave();t.keyCode===e.util.keyCode.ESCAPE&&(t.preventDefault(),this.doFormCancel())},handleFormClick:function(e){e.stopPropagation()},handleSaveClick:function(e){e.preventDefault(),this.doFormSave()},handleCloseClick:function(e){e.preventDefault(),this.doFormCancel()}});e.extensions.anchor=t}(),function(){var t=e.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 e=this.document.createElement("div");return e.id="medium-editor-anchor-preview-"+this.getEditorId(),e.className="medium-editor-anchor-preview",e.innerHTML=this.getTemplate(),this.on(e,"click",this.handleClick.bind(this)),e},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(e){return!(!this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")&&!e.getAttribute("data-disable-preview"))||(this.previewValueSelector&&(this.anchorPreview.querySelector(this.previewValueSelector).textContent=e.attributes.href.value,this.anchorPreview.querySelector(this.previewValueSelector).href=e.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=e,this.positionPreview(),this.attachPreviewHandlers(),this)},positionPreview:function(e){e=e||this.activeAnchor;var t,n,r,i,o,a=this.window.innerWidth,s=this.anchorPreview.offsetHeight,u=e.getBoundingClientRect(),c=this.diffLeft,l=this.diffTop,f=this.getEditorOption("elementsContainer"),d=["absolute","fixed"].indexOf(window.getComputedStyle(f).getPropertyValue("position"))>-1,h={};t=this.anchorPreview.offsetWidth/2;var p=this.base.getExtensionByName("toolbar");p&&(c=p.diffLeft,l=p.diffTop),n=c-t,d?(i=f.getBoundingClientRect(),["top","left"].forEach(function(e){h[e]=u[e]-i[e]}),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)}});e.extensions.anchorPreview=t}(),function(){function t(t){return!e.util.getClosestTag(t,"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=e.Extension.extend({init:function(){e.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 e=0,t=0;t0&&null!==a;)i=n.currentNode,o=i.nodeValue,o.length>t?(a=i.splitText(o.length-t),t=0):(a=n.previousNode(),t-=o.length);return a},performLinkingWithinElement:function(t){for(var n=this.findLinkableText(t),r=0;r1;)i.appendChild(r.childNodes[1])}});e.extensions.autoLink=s}(),function(){function t(t){var r=e.util.getContainerEditorElement(t);Array.prototype.slice.call(r.parentElement.querySelectorAll("."+n)).forEach(function(e){e.classList.remove(n)})}var n="medium-editor-dragover",r=e.Extension.extend({name:"fileDragging",allowedTypes:["image"],init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(e){e.preventDefault(),e.dataTransfer.dropEffect="copy";var r=e.target.classList?e.target:e.target.parentElement;t(r),"dragover"===e.type&&r.classList.add(n)},handleDrop:function(e){e.preventDefault(),e.stopPropagation(),this.base.selectElement(e.target);var n=this.base.exportSelection();n.start=n.end,this.base.importSelection(n),e.dataTransfer.files&&Array.prototype.slice.call(e.dataTransfer.files).forEach(function(e){this.isAllowedFile(e)&&e.type.match("image")&&this.insertImageFile(e)},this),t(e.target)},isAllowedFile:function(e){return this.allowedTypes.some(function(t){return!!e.type.match(t)})},insertImageFile:function(t){if("function"==typeof FileReader){var n=new FileReader;n.readAsDataURL(t),n.addEventListener("load",function(t){var n=this.document.createElement("img");n.src=t.target.result,e.util.insertHTMLCommand(this.document,n.outerHTML)}.bind(this))}}});e.extensions.fileDragging=r}(),function(){var t=e.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(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.keys={},this.commands.forEach(function(e){var t=e.key.charCodeAt(0);this.keys[t]||(this.keys[t]=[]),this.keys[t].push(e)},this)},handleKeydown:function(t){var n=e.util.getKeyCode(t);if(this.keys[n]){var r=e.util.isMetaCtrlKey(t),i=!!t.shiftKey,o=!!t.altKey;this.keys[n].forEach(function(e){e.meta!==r||e.shift!==i||e.alt!==o&&void 0!==e.alt||(t.preventDefault(),t.stopPropagation(),"function"==typeof e.command?e.command.apply(this):!1!==e.command&&this.execAction(e.command))},this)}}});e.extensions.keyboardCommands=t}(),function(){var t=e.extensions.form.extend({name:"fontname",action:"fontName",aria:"change font name",contentDefault:"±",contentFA:'',fonts:["","Arial","Verdana","Times New Roman"],init:function(){e.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(e){if(e.preventDefault(),e.stopPropagation(),!this.isDisplayed()){var t=this.document.queryCommandValue("fontName")+"";this.showForm(t)}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(e){var t=this.getSelect();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),t.value=e||"",t.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 e,t=this.document,n=t.createElement("div"),r=t.createElement("select"),i=t.createElement("a"),o=t.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(){e.selection.getSelectedElements(this.document).forEach(function(e){"font"===e.nodeName.toLowerCase()&&e.hasAttribute("face")&&e.removeAttribute("face")})},handleFontChange:function(){var e=this.getSelect().value;""===e?this.clearFontName():this.execAction("fontName",{value:e})},handleFormClick:function(e){e.stopPropagation()},handleSaveClick:function(e){e.preventDefault(),this.doFormSave()},handleCloseClick:function(e){e.preventDefault(),this.doFormCancel()}});e.extensions.fontName=t}(),function(){var t=e.extensions.form.extend({name:"fontsize",action:"fontSize",aria:"increase/decrease font size",contentDefault:"±",contentFA:'',init:function(){e.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(e){if(e.preventDefault(),e.stopPropagation(),!this.isDisplayed()){var t=this.document.queryCommandValue("fontSize")+"";this.showForm(t)}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(e){var t=this.getInput();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),t.value=e||"",t.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 e=this.document,t=e.createElement("div"),n=e.createElement("input"),r=e.createElement("a"),i=e.createElement("a");return t.className="medium-editor-toolbar-form",t.id="medium-editor-toolbar-form-fontsize-"+this.getEditorId(),this.on(t,"click",this.handleFormClick.bind(this)),n.setAttribute("type","range"),n.setAttribute("min","1"),n.setAttribute("max","7"),n.className="medium-editor-toolbar-input",t.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")?'':"✓",t.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")?'':"×",t.appendChild(r),this.on(r,"click",this.handleCloseClick.bind(this)),t},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},clearFontSize:function(){e.selection.getSelectedElements(this.document).forEach(function(e){"font"===e.nodeName.toLowerCase()&&e.hasAttribute("size")&&e.removeAttribute("size")})},handleSliderChange:function(){var e=this.getInput().value;"4"===e?this.clearFontSize():this.execAction("fontSize",{value:e})},handleFormClick:function(e){e.stopPropagation()},handleSaveClick:function(e){e.preventDefault(),this.doFormSave()},handleCloseClick:function(e){e.preventDefault(),this.doFormCancel()}});e.extensions.fontSize=t}(),function(){function t(){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(e,t,n){var r=e.clipboardData||t.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"+e.util.htmlEntities(i[o])+"

");else a=e.util.htmlEntities(i[0]);e.util.insertHTMLCommand(this.document,a)},handlePasteBinPaste:function(e){if(e.defaultPrevented)return void this.removePasteBin();var t=n(e,this.window,this.document),r=t["text/html"],o=t["text/plain"],a=i;if(!this.cleanPastedHTML||r)return e.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(t,n){e.util.isKey(t,e.util.keyCode.V)&&e.util.isMetaCtrlKey(t)&&(t.stopImmediatePropagation(),this.removePasteBin(),this.createPasteBin(n))},createPasteBin:function(t){var n,a=e.selection.getSelectionRange(this.document),s=this.window.pageYOffset;i=t,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(),e.selection.selectNode(u,this.document),this.boundHandlePaste||(this.boundHandlePaste=this.handlePasteBinPaste.bind(this)),this.on(u,"paste",this.boundHandlePaste)},removePasteBin:function(){null!==r&&(e.selection.selectRange(this.document,r),r=null),null!==i&&(i=null);var t=this.getPasteBin();t&&t&&(this.off(t,"focus",o),this.off(t,"focusin",o),this.off(t,"focusout",o),this.off(t,"paste",this.boundHandlePaste),t.parentElement.removeChild(t))},getPasteBin:function(){return this.document.getElementById(this.pasteBinId)},getPasteBinHtml:function(){var e=this.getPasteBin();if(!e)return!1;if(e.firstChild&&"mcepastebin"===e.firstChild.id)return!1;var t=e.innerHTML;return!(!t||"%ME_PASTEBIN%"===t)&&t},cleanPaste:function(e){var n,r,i,o,a=/"+e.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=t.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=e.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(t){if(t&&t.target&&e.util.isDescendant(this.getToolbarElement(),t.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(e){e.hasForm&&e.isDisplayed()&&e.hideForm()})},multipleBlockElementsSelected:function(){var t=/<[^\/>][^>]*><\/[^>]+>/gim,n=new RegExp("<("+e.util.blockContainerElementNames.join("|")+")[^>]*>","g"),r=e.selection.getSelectionHtml(this.document).replace(t,""),i=r.match(n);return!!i&&i.length>1},modifySelection:function(){var t=this.window.getSelection(),n=t.getRangeAt(0);if(this.standardizeSelectionStart&&n.startContainer.nodeValue&&n.startOffset===n.startContainer.nodeValue.length){var r=e.util.findAdjacentTextNodeWithContent(e.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=e.selection.select(this.document,r,i,n.endContainer,n.endOffset)}}},checkState:function(){if(!this.base.preventSelectionUpdates){if(!this.base.getFocusedElement()||e.selection.selectionInContentEditableFalse(this.window))return this.hideToolbar();var t=e.selection.getSelectionElement(this.window);return!t||-1===this.getEditorElements().indexOf(t)||t.getAttribute("data-disable-toolbar")?this.hideToolbar():this.updateOnEmptySelection&&this.static?this.showAndUpdateToolbar():!e.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(e){"function"==typeof e.isActive&&"function"==typeof e.setInactive&&e.setInactive()}),this.checkActiveButtons()},checkActiveButtons:function(){var t,n=[],r=null,i=e.selection.getSelectionRange(this.document),o=function(e){"function"==typeof e.checkState?e.checkState(t):"function"==typeof e.isActive&&"function"==typeof e.isAlreadyApplied&&"function"==typeof e.setActive&&!e.isActive()&&e.isAlreadyApplied(t)&&e.setActive()};if(i&&(this.forEachExtension(function(e){if("function"==typeof e.queryCommandState&&null!==(r=e.queryCommandState()))return void(r&&"function"==typeof e.setActive&&e.setActive());n.push(e)}),t=e.selection.getSelectedParentElement(i),this.getEditorElements().some(function(n){return e.util.isDescendant(n,t,!0)})))for(;t&&(n.forEach(o),!e.util.isMediumEditorElement(t));)t=t.parentNode},positionToolbarIfShown:function(){this.isDisplayed()&&this.setToolbarPosition()},setToolbarPosition:function(){var e=this.base.getFocusedElement(),t=this.window.getSelection();if(!e)return this;!this.static&&t.isCollapsed||(this.showToolbar(),this.relativeContainer||(this.static?this.positionStaticToolbar(e):this.positionToolbar(t)),this.trigger("positionedToolbar",{},this.base.getFocusedElement()))},positionStaticToolbar:function(e){this.getToolbarElement().style.left="0";var t,n=this.document.documentElement&&this.document.documentElement.scrollTop||this.document.body.scrollTop,r=this.window.innerWidth,i=this.getToolbarElement(),o=e.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+e.offsetHeight-u-this.stickyTopOffset?(i.style.top=a+e.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":t=o.left;break;case"right":t=o.right-c;break;case"center":t=s-l}t<0?t=0:t+c>r&&(t=r-Math.ceil(c)-1),i.style.left=t+"px"},positionToolbar:function(e){this.getToolbarElement().style.left="0",this.getToolbarElement().style.right="initial";var t=e.getRangeAt(0),n=t.getBoundingClientRect();(!n||0===n.height&&0===n.width&&t.startContainer===t.endContainer)&&(n=1===t.startContainer.nodeType&&t.startContainer.querySelector("img")?t.startContainer.querySelector("img").getBoundingClientRect():t.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(e){p[e]=n[e]-i[e]}),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 e=this.document.getElementById(r);e&&(e.removeAttribute("id"),e.removeAttribute("class"),e.src=n.result)}.bind(this)}}.bind(this))),t.target.classList.remove("medium-editor-dragover")}});e.extensions.imageDragging=t}(),function(){function t(t){var n=e.selection.getSelectionStart(this.options.ownerDocument),r=n.textContent,i=e.selection.getCaretOffsets(n);(void 0===r[i.left-1]||""===r[i.left-1].trim()||void 0!==r[i.left]&&""===r[i.left].trim())&&t.preventDefault()}function n(t,n){if(this.options.disableReturn||n.getAttribute("data-disable-return"))t.preventDefault();else if(this.options.disableDoubleReturn||n.getAttribute("data-disable-double-return")){var r=e.selection.getSelectionStart(this.options.ownerDocument);(r&&""===r.textContent.trim()&&"li"!==r.nodeName.toLowerCase()||r.previousElementSibling&&"br"!==r.previousElementSibling.nodeName.toLowerCase()&&""===r.previousElementSibling.textContent.trim())&&t.preventDefault()}}function r(t){var n=e.selection.getSelectionStart(this.options.ownerDocument);"pre"===(n&&n.nodeName.toLowerCase())&&(t.preventDefault(),e.util.insertHTMLCommand(this.options.ownerDocument," ")),e.util.isListItem(n)&&(t.preventDefault(),t.shiftKey?this.options.ownerDocument.execCommand("outdent",!1,null):this.options.ownerDocument.execCommand("indent",!1,null))}function i(t){var n,r=e.selection.getSelectionStart(this.options.ownerDocument),i=r.nodeName.toLowerCase(),o=/^(\s+|)?$/i,a=/h\d/i;e.util.isKey(t,[e.util.keyCode.BACKSPACE,e.util.keyCode.ENTER])&&r.previousElementSibling&&a.test(i)&&0===e.selection.getCaretOffsets(r).left?e.util.isKey(t,e.util.keyCode.BACKSPACE)&&o.test(r.previousElementSibling.innerHTML)?(r.previousElementSibling.parentNode.removeChild(r.previousElementSibling),t.preventDefault()):!this.options.disableDoubleReturn&&e.util.isKey(t,e.util.keyCode.ENTER)&&(n=this.options.ownerDocument.createElement("p"),n.innerHTML="
",r.previousElementSibling.parentNode.insertBefore(n,r),t.preventDefault()):e.util.isKey(t,e.util.keyCode.DELETE)&&r.nextElementSibling&&r.previousElementSibling&&!a.test(i)&&o.test(r.innerHTML)&&a.test(r.nextElementSibling.nodeName.toLowerCase())?(e.selection.moveCursor(this.options.ownerDocument,r.nextElementSibling),r.previousElementSibling.parentNode.removeChild(r),t.preventDefault()):e.util.isKey(t,e.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),e.selection.moveCursor(this.options.ownerDocument,n),r.parentElement.removeChild(r),t.preventDefault()):e.util.isKey(t,e.util.keyCode.BACKSPACE)&&!1!==e.util.getClosestTag(r,"blockquote")&&0===e.selection.getCaretOffsets(r).left?(t.preventDefault(),e.util.execFormatBlock(this.options.ownerDocument,"p")):e.util.isKey(t,e.util.keyCode.ENTER)&&!1!==e.util.getClosestTag(r,"blockquote")&&0===e.selection.getCaretOffsets(r).right?(n=this.options.ownerDocument.createElement("p"),n.innerHTML="
",r.parentElement.insertBefore(n,r.nextSibling),e.selection.moveCursor(this.options.ownerDocument,n),t.preventDefault()):e.util.isKey(t,e.util.keyCode.BACKSPACE)&&e.util.isMediumEditorElement(r.parentElement)&&!r.previousElementSibling&&r.nextElementSibling&&o.test(r.innerHTML)&&(t.preventDefault(),e.selection.moveCursor(this.options.ownerDocument,r.nextSibling),r.parentElement.removeChild(r))}function o(t){var n,r=e.selection.getSelectionStart(this.options.ownerDocument);r&&(e.util.isMediumEditorElement(r)&&0===r.children.length&&!e.util.isBlockContainer(r)&&this.options.ownerDocument.execCommand("formatBlock",!1,"p"),!e.util.isKey(t,e.util.keyCode.ENTER)||e.util.isListItem(r)||e.util.isBlockContainer(r)||(n=r.nodeName.toLowerCase(),"a"===n?this.options.ownerDocument.execCommand("unlink",!1,null):t.shiftKey||t.ctrlKey||this.options.ownerDocument.execCommand("formatBlock",!1,"p")))}function a(e,t){var n=t.parentNode.querySelector('textarea[medium-editor-textarea-id="'+t.getAttribute("medium-editor-textarea-id")+'"]');n&&(n.value=t.innerHTML.trim())}function s(e){e._mediumEditors||(e._mediumEditors=[null]),this.id||(this.id=e._mediumEditors.length),e._mediumEditors[this.id]=this}function u(e){e._mediumEditors&&e._mediumEditors[this.id]&&(e._mediumEditors[this.id]=null)}function c(t,n,r){var i=[];if(t||(t=[]),"string"==typeof t&&(t=n.querySelectorAll(t)),e.util.isElement(t)&&(t=[t]),r)for(var o=0;o=0&&(r=e.selection.exportSelection(t,this.options.ownerDocument)),null!==r&&0!==n&&(r.editableElementIndex=n),r},saveSelection:function(){this.selectionState=this.exportSelection()},importSelection:function(t,n){if(t){var r=this.elements[t.editableElementIndex||0];e.selection.importSelection(t,r,this.options.ownerDocument,n)}},restoreSelection:function(){this.importSelection(this.selectionState)},createLink:function(t){var n,r=e.selection.getSelectionElement(this.options.contentWindow),i={};if(-1!==this.elements.indexOf(r)){try{if(this.events.disableCustomEvent("editableInput"),t.url&&e.util.deprecated(".url option for createLink",".value","6.0.0"),(n=t.url||t.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=e.util.getClosestBlockContainer(l.startContainer),u=e.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?e.selection.select(this.options.ownerDocument,d.firstChild,0,d.lastChild,3===d.lastChild.nodeType?d.lastChild.nodeValue.length:d.lastChild.childNodes.length):e.selection.select(this.options.ownerDocument,d,0,d,d.childNodes.length);var p=this.exportSelection();c=e.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]),e.util.createLink(this.options.ownerDocument,c,n.trim());var v=(h.firstChild.innerHTML.match(/^\s+/)||[""])[0].length;e.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"===t.target?e.util.setTargetBlank(e.selection.getSelectionStart(this.options.ownerDocument),n):e.util.removeTargetBlank(e.selection.getSelectionStart(this.options.ownerDocument),n),t.buttonClass&&e.util.addClassToAnchors(e.selection.getSelectionStart(this.options.ownerDocument),t.buttonClass)}}if(this.options.targetBlank||"_blank"===t.target||t.buttonClass){i=this.options.ownerDocument.createEvent("HTMLEvents"),i.initEvent("input",!0,!0,this.options.contentWindow);for(var m=0,g=this.elements.length;m1?t[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:"")}}},e.version=e.parseVersionString.call(this,{version:"5.23.2"}.version),e}())}).call(t,n(79))},function(e,t,n){"use strict";function r(e){if(!(void 0!==e.label&&/\S{1}/.test(e.label)&&void 0!==e.start&&/\S{1}/.test(e.start)&&void 0!==e.end&&/\S{1}/.test(e.end)||void 0!==e.label&&/\S{1}/.test(e.label)&&void 0!==e.action&&/\S{1}/.test(e.action)))return void console.error('[Custom-Button] You need to specify "label", "start" and "end" OR "label" and "action"');e.start=void 0===e.start?"":e.start,e.end=void 0===e.end?"":e.end;var t=this;this.options=e,this.button=document.createElement("button"),this.button.className="medium-editor-action",this.button.innerHTML=e.label,this.button.onclick=function(){var n=i(),r=window.getSelection(),o=r.anchorNode.parentElement;void 0===e.start||-1==n.indexOf(e.start)&&-1==n.indexOf(e.end)?(void 0!=e.action&&(n=e.action(n,!0,o)),n=e.start+n+e.end):(void 0!=e.action&&(n=e.action(n,!1,o)),n=String(n).split(e.start).join(""),n=String(n).split(e.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)}t.base.checkContentChanged()}}function i(){var e,t="";if(void 0!==window.getSelection){if(e=window.getSelection(),e.rangeCount){for(var n=document.createElement("div"),r=0,i=e.rangeCount;r-1&&t.indexOf(this.options.end)>-1?this.button.classList.add("medium-editor-button-active"):this.button.classList.remove("medium-editor-button-active")},void 0!==e&&e.exports&&(t=e.exports=r),t.MediumButton=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0)return t.remove(),e.text(n.text())},o=function(e){var t,n,r;return r=e.data("scrivito_editors_siblings_before_edit"),n=e.siblings(),t=!r||n.filter(r).length"),t!==n))return e.html(n)},a=function(e){var t;return t=e.jQueryElement(),t.data("scrivito_editors_prepared_for_editing",!1),t.text(e.content())},n=300,s=function(e){var t;if(t=document.getSelection(),t.anchorNode&&t.focusNode)return e.find(t.anchorNode).addBack(t.anchorNode).length&&e.find(t.focusNode).addBack(t.focusNode).length?void 0:t.selectAllChildren(e[0])},r=function(e){var t;return t=e.jQueryElement(),t.attr("contenteditable",!0).blur(function(){return l(e)}).click(function(){return f(e)}).focus(function(){return d(e)}).keypress(function(t){return p(t,e)}).keyup(function(t){return p(t,e)}),"false"!==t.attr("data-scrivito-editors-autosave")&&t.on("cut input keypress keyup paste",function(){return h(e)}),v(t),t.on("click",function(e){return t.attr("contenteditable",!0),i(t),e.timeStamp-t.data("scrivito_editors_last_click")0){var o=a.tcomb.stringify(r);a.tcomb.fail("Invalid additional prop(s):\n\n"+o+"\n\nsupplied to "+n+".")}})}else s.__generictype__=function(e,t,n){var i=a.tcomb.validate(e,u);i.isValid()||a.tcomb.fail(r(i.errors,"props",n,u))};return o&&(s.__subtype__=function(e,t,r){n.meta.predicate(e)||a.tcomb.fail("Invalid props:\n\n "+a.tcomb.stringify(e)+"\n\nsupplied to "+r+", should be a "+a.tcomb.getTypeName(n)+".")},s.__subtype__.predicate=n.meta.predicate),s}Object.defineProperty(t,"__esModule",{value:!0}),t.propTypes=void 0;var a=n(21);t.propTypes=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n