scrivito_sdk 1.12.0.rc1 → 1.12.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: efd3bed6bd4541b87b1b2f29aca12b7f52b1987f
4
- data.tar.gz: 50ec7bd514f1eb7753fad198e5e94fc76ccb5d24
3
+ metadata.gz: 6301a99f29c467863e9640ce1546d88bccc2ab32
4
+ data.tar.gz: 73cef55e389758683b28a58a9f7207ff52cb979a
5
5
  SHA512:
6
- metadata.gz: b299c648eda1d976a51e0166cc21916af96b70df1e33c8e2109af73ea9e6c047b843d682371fdc8814ce0efa67a5a882fee1148a24c809ad8574ed84fdfda452
7
- data.tar.gz: 3b96d94c18acf4e6c517922f57f64bed70aad55de66d76ed122048983a204f0a790e4a78f05b8e6676d8af8df04586b5d9287f49be1412f61ebdf7307bcba510
6
+ metadata.gz: 6bc4461f381bafd54b324402a62ddf6155c4e658953bbe6c2d583ddc2bb197c9d27a8c8b9979dfbaa1b263625c152fa5b98a60901ce05b825affe3026e8ccd9e
7
+ data.tar.gz: af632dd445db81fc0697c16c731c95fb11a11ae4325d902d9ae7318162b3c49803156564c3116258a8c4f4522bf77506f282a343b471866c146bac6ef4b86d52
data/config/ca-bundle.crt CHANGED
@@ -1,7 +1,7 @@
1
1
  ##
2
2
  ## Bundle of CA Root Certificates
3
3
  ##
4
- ## Certificate data from Mozilla as of: Tue Oct 17 13:39:22 2017 GMT
4
+ ## Certificate data from Mozilla as of: Tue Oct 24 14:40:43 2017 GMT
5
5
  ##
6
6
  ## This is a bundle of X.509 certificates of public Certificate Authorities
7
7
  ## (CA). These were automatically extracted from Mozilla's root certificates
@@ -1 +1 @@
1
- !function(n){function t(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return n[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var e={};t.m=n,t.c=e,t.d=function(n,e,o){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:o})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=619)}({137:function(n,t,e){"use strict";function o(){if(window.parent!==window){var n=window.parent.connectAppDocument;return n?n(window.document):void 0}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o},257:function(n,t,e){"use strict";function o(){window.scrivito||(window.scrivito={}),window.scrivito.on||(window.scrivito.on=function(n,t){"content"===n&&document.addEventListener("DOMContentLoaded",function(){return t(window.document)})}),window.scrivito.in_editable_view||(window.scrivito.in_editable_view=function(){return!1})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o},619:function(n,t,e){"use strict";function o(n){return n&&n.__esModule?n:{default:n}}var i=e(257),r=o(i),u=e(137),c=o(u),d=(0,c.default)();d?d.installRailsApi():(0,r.default)()}});
1
+ !function(n){function t(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return n[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var e={};t.m=n,t.c=e,t.d=function(n,e,o){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:o})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=627)}({137:function(n,t,e){"use strict";function o(){if(window.parent!==window){var n=window.parent.connectAppDocument;return n?n(window.document):void 0}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o},259:function(n,t,e){"use strict";function o(){window.scrivito||(window.scrivito={}),window.scrivito.on||(window.scrivito.on=function(n,t){"content"===n&&document.addEventListener("DOMContentLoaded",function(){return t(window.document)})}),window.scrivito.in_editable_view||(window.scrivito.in_editable_view=function(){return!1})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o},627:function(n,t,e){"use strict";function o(n){return n&&n.__esModule?n:{default:n}}var i=e(259),r=o(i),u=e(137),c=o(u),d=(0,c.default)();d?d.installRailsApi():(0,r.default)()}});
@@ -1,4 +1,4 @@
1
- !function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=620)}([function(t,e,r){var n,i;(function(){function r(t){function e(e,r,n,i,o,a){for(;o>=0&&o<a;o+=t){var u=i?i[o]:o;n=r(n,e[u],u,e)}return n}return function(r,n,i,o){n=j(n,o,4);var a=!x(r)&&k.keys(r),u=(a||r).length,s=t>0?0:u-1;return arguments.length<3&&(i=r[a?a[s]:s],s+=t),e(r,n,i,a,s,u)}}function o(t){return function(e,r,n){r=O(r,n);for(var i=S(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(r(e[o],o,e))return o;return-1}}function a(t,e,r){return function(n,i,o){var a=0,u=S(n);if("number"==typeof o)t>0?a=o>=0?o:Math.max(o+u,a):u=o>=0?Math.min(o+1,u):o+u+1;else if(r&&o&&u)return o=r(n,i),n[o]===i?o:-1;if(i!==i)return o=e(h.call(n,a,u),k.isNaN),o>=0?o+a:-1;for(o=t>0?a:u-1;o>=0&&o<u;o+=t)if(n[o]===i)return o;return-1}}function u(t,e){var r=I.length,n=t.constructor,i=k.isFunction(n)&&n.prototype||f,o="constructor";for(k.has(t,o)&&!k.contains(e,o)&&e.push(o);r--;)(o=I[r])in t&&t[o]!==i[o]&&!k.contains(e,o)&&e.push(o)}var s=this,c=s._,l=Array.prototype,f=Object.prototype,d=Function.prototype,p=l.push,h=l.slice,v=f.toString,y=f.hasOwnProperty,_=Array.isArray,g=Object.keys,m=d.bind,b=Object.create,w=function(){},k=function(t){return t instanceof k?t:this instanceof k?void(this._wrapped=t):new k(t)};void 0!==t&&t.exports&&(e=t.exports=k),e._=k,k.VERSION="1.8.3";var j=function(t,e,r){if(void 0===e)return t;switch(null==r?3:r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)};case 4:return function(r,n,i,o){return t.call(e,r,n,i,o)}}return function(){return t.apply(e,arguments)}},O=function(t,e,r){return null==t?k.identity:k.isFunction(t)?j(t,e,r):k.isObject(t)?k.matcher(t):k.property(t)};k.iteratee=function(t,e){return O(t,e,1/0)};var C=function(t,e){return function(r){var n=arguments.length;if(n<2||null==r)return r;for(var i=1;i<n;i++)for(var o=arguments[i],a=t(o),u=a.length,s=0;s<u;s++){var c=a[s];e&&void 0!==r[c]||(r[c]=o[c])}return r}},P=function(t){if(!k.isObject(t))return{};if(b)return b(t);w.prototype=t;var e=new w;return w.prototype=null,e},E=function(t){return function(e){return null==e?void 0:e[t]}},A=Math.pow(2,53)-1,S=E("length"),x=function(t){var e=S(t);return"number"==typeof e&&e>=0&&e<=A};k.each=k.forEach=function(t,e,r){e=j(e,r);var n,i;if(x(t))for(n=0,i=t.length;n<i;n++)e(t[n],n,t);else{var o=k.keys(t);for(n=0,i=o.length;n<i;n++)e(t[o[n]],o[n],t)}return t},k.map=k.collect=function(t,e,r){e=O(e,r);for(var n=!x(t)&&k.keys(t),i=(n||t).length,o=Array(i),a=0;a<i;a++){var u=n?n[a]:a;o[a]=e(t[u],u,t)}return o},k.reduce=k.foldl=k.inject=r(1),k.reduceRight=k.foldr=r(-1),k.find=k.detect=function(t,e,r){var n;if(void 0!==(n=x(t)?k.findIndex(t,e,r):k.findKey(t,e,r))&&-1!==n)return t[n]},k.filter=k.select=function(t,e,r){var n=[];return e=O(e,r),k.each(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n},k.reject=function(t,e,r){return k.filter(t,k.negate(O(e)),r)},k.every=k.all=function(t,e,r){e=O(e,r);for(var n=!x(t)&&k.keys(t),i=(n||t).length,o=0;o<i;o++){var a=n?n[o]:o;if(!e(t[a],a,t))return!1}return!0},k.some=k.any=function(t,e,r){e=O(e,r);for(var n=!x(t)&&k.keys(t),i=(n||t).length,o=0;o<i;o++){var a=n?n[o]:o;if(e(t[a],a,t))return!0}return!1},k.contains=k.includes=k.include=function(t,e,r,n){return x(t)||(t=k.values(t)),("number"!=typeof r||n)&&(r=0),k.indexOf(t,e,r)>=0},k.invoke=function(t,e){var r=h.call(arguments,2),n=k.isFunction(e);return k.map(t,function(t){var i=n?e:t[e];return null==i?i:i.apply(t,r)})},k.pluck=function(t,e){return k.map(t,k.property(e))},k.where=function(t,e){return k.filter(t,k.matcher(e))},k.findWhere=function(t,e){return k.find(t,k.matcher(e))},k.max=function(t,e,r){var n,i,o=-1/0,a=-1/0;if(null==e&&null!=t){t=x(t)?t:k.values(t);for(var u=0,s=t.length;u<s;u++)(n=t[u])>o&&(o=n)}else e=O(e,r),k.each(t,function(t,r,n){((i=e(t,r,n))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)});return o},k.min=function(t,e,r){var n,i,o=1/0,a=1/0;if(null==e&&null!=t){t=x(t)?t:k.values(t);for(var u=0,s=t.length;u<s;u++)(n=t[u])<o&&(o=n)}else e=O(e,r),k.each(t,function(t,r,n){((i=e(t,r,n))<a||i===1/0&&o===1/0)&&(o=t,a=i)});return o},k.shuffle=function(t){for(var e,r=x(t)?t:k.values(t),n=r.length,i=Array(n),o=0;o<n;o++)e=k.random(0,o),e!==o&&(i[o]=i[e]),i[e]=r[o];return i},k.sample=function(t,e,r){return null==e||r?(x(t)||(t=k.values(t)),t[k.random(t.length-1)]):k.shuffle(t).slice(0,Math.max(0,e))},k.sortBy=function(t,e,r){return e=O(e,r),k.pluck(k.map(t,function(t,r,n){return{value:t,index:r,criteria:e(t,r,n)}}).sort(function(t,e){var r=t.criteria,n=e.criteria;if(r!==n){if(r>n||void 0===r)return 1;if(r<n||void 0===n)return-1}return t.index-e.index}),"value")};var T=function(t){return function(e,r,n){var i={};return r=O(r,n),k.each(e,function(n,o){var a=r(n,o,e);t(i,n,a)}),i}};k.groupBy=T(function(t,e,r){k.has(t,r)?t[r].push(e):t[r]=[e]}),k.indexBy=T(function(t,e,r){t[r]=e}),k.countBy=T(function(t,e,r){k.has(t,r)?t[r]++:t[r]=1}),k.toArray=function(t){return t?k.isArray(t)?h.call(t):x(t)?k.map(t,k.identity):k.values(t):[]},k.size=function(t){return null==t?0:x(t)?t.length:k.keys(t).length},k.partition=function(t,e,r){e=O(e,r);var n=[],i=[];return k.each(t,function(t,r,o){(e(t,r,o)?n:i).push(t)}),[n,i]},k.first=k.head=k.take=function(t,e,r){if(null!=t)return null==e||r?t[0]:k.initial(t,t.length-e)},k.initial=function(t,e,r){return h.call(t,0,Math.max(0,t.length-(null==e||r?1:e)))},k.last=function(t,e,r){if(null!=t)return null==e||r?t[t.length-1]:k.rest(t,Math.max(0,t.length-e))},k.rest=k.tail=k.drop=function(t,e,r){return h.call(t,null==e||r?1:e)},k.compact=function(t){return k.filter(t,k.identity)};var F=function(t,e,r,n){for(var i=[],o=0,a=n||0,u=S(t);a<u;a++){var s=t[a];if(x(s)&&(k.isArray(s)||k.isArguments(s))){e||(s=F(s,e,r));var c=0,l=s.length;for(i.length+=l;c<l;)i[o++]=s[c++]}else r||(i[o++]=s)}return i};k.flatten=function(t,e){return F(t,e,!1)},k.without=function(t){return k.difference(t,h.call(arguments,1))},k.uniq=k.unique=function(t,e,r,n){k.isBoolean(e)||(n=r,r=e,e=!1),null!=r&&(r=O(r,n));for(var i=[],o=[],a=0,u=S(t);a<u;a++){var s=t[a],c=r?r(s,a,t):s;e?(a&&o===c||i.push(s),o=c):r?k.contains(o,c)||(o.push(c),i.push(s)):k.contains(i,s)||i.push(s)}return i},k.union=function(){return k.uniq(F(arguments,!0,!0))},k.intersection=function(t){for(var e=[],r=arguments.length,n=0,i=S(t);n<i;n++){var o=t[n];if(!k.contains(e,o)){for(var a=1;a<r&&k.contains(arguments[a],o);a++);a===r&&e.push(o)}}return e},k.difference=function(t){var e=F(arguments,!0,!0,1);return k.filter(t,function(t){return!k.contains(e,t)})},k.zip=function(){return k.unzip(arguments)},k.unzip=function(t){for(var e=t&&k.max(t,S).length||0,r=Array(e),n=0;n<e;n++)r[n]=k.pluck(t,n);return r},k.object=function(t,e){for(var r={},n=0,i=S(t);n<i;n++)e?r[t[n]]=e[n]:r[t[n][0]]=t[n][1];return r},k.findIndex=o(1),k.findLastIndex=o(-1),k.sortedIndex=function(t,e,r,n){r=O(r,n,1);for(var i=r(e),o=0,a=S(t);o<a;){var u=Math.floor((o+a)/2);r(t[u])<i?o=u+1:a=u}return o},k.indexOf=a(1,k.findIndex,k.sortedIndex),k.lastIndexOf=a(-1,k.findLastIndex),k.range=function(t,e,r){null==e&&(e=t||0,t=0),r=r||1;for(var n=Math.max(Math.ceil((e-t)/r),0),i=Array(n),o=0;o<n;o++,t+=r)i[o]=t;return i};var M=function(t,e,r,n,i){if(!(n instanceof e))return t.apply(r,i);var o=P(t.prototype),a=t.apply(o,i);return k.isObject(a)?a:o};k.bind=function(t,e){if(m&&t.bind===m)return m.apply(t,h.call(arguments,1));if(!k.isFunction(t))throw new TypeError("Bind must be called on a function");var r=h.call(arguments,2),n=function(){return M(t,n,e,this,r.concat(h.call(arguments)))};return n},k.partial=function(t){var e=h.call(arguments,1),r=function(){for(var n=0,i=e.length,o=Array(i),a=0;a<i;a++)o[a]=e[a]===k?arguments[n++]:e[a];for(;n<arguments.length;)o.push(arguments[n++]);return M(t,r,this,this,o)};return r},k.bindAll=function(t){var e,r,n=arguments.length;if(n<=1)throw new Error("bindAll must be passed function names");for(e=1;e<n;e++)r=arguments[e],t[r]=k.bind(t[r],t);return t},k.memoize=function(t,e){var r=function(n){var i=r.cache,o=""+(e?e.apply(this,arguments):n);return k.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return r.cache={},r},k.delay=function(t,e){var r=h.call(arguments,2);return setTimeout(function(){return t.apply(null,r)},e)},k.defer=k.partial(k.delay,k,1),k.throttle=function(t,e,r){var n,i,o,a=null,u=0;r||(r={});var s=function(){u=!1===r.leading?0:k.now(),a=null,o=t.apply(n,i),a||(n=i=null)};return function(){var c=k.now();u||!1!==r.leading||(u=c);var l=e-(c-u);return n=this,i=arguments,l<=0||l>e?(a&&(clearTimeout(a),a=null),u=c,o=t.apply(n,i),a||(n=i=null)):a||!1===r.trailing||(a=setTimeout(s,l)),o}},k.debounce=function(t,e,r){var n,i,o,a,u,s=function(){var c=k.now()-a;c<e&&c>=0?n=setTimeout(s,e-c):(n=null,r||(u=t.apply(o,i),n||(o=i=null)))};return function(){o=this,i=arguments,a=k.now();var c=r&&!n;return n||(n=setTimeout(s,e)),c&&(u=t.apply(o,i),o=i=null),u}},k.wrap=function(t,e){return k.partial(e,t)},k.negate=function(t){return function(){return!t.apply(this,arguments)}},k.compose=function(){var t=arguments,e=t.length-1;return function(){for(var r=e,n=t[e].apply(this,arguments);r--;)n=t[r].call(this,n);return n}},k.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},k.before=function(t,e){var r;return function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=null),r}},k.once=k.partial(k.before,2);var R=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];k.keys=function(t){if(!k.isObject(t))return[];if(g)return g(t);var e=[];for(var r in t)k.has(t,r)&&e.push(r);return R&&u(t,e),e},k.allKeys=function(t){if(!k.isObject(t))return[];var e=[];for(var r in t)e.push(r);return R&&u(t,e),e},k.values=function(t){for(var e=k.keys(t),r=e.length,n=Array(r),i=0;i<r;i++)n[i]=t[e[i]];return n},k.mapObject=function(t,e,r){e=O(e,r);for(var n,i=k.keys(t),o=i.length,a={},u=0;u<o;u++)n=i[u],a[n]=e(t[n],n,t);return a},k.pairs=function(t){for(var e=k.keys(t),r=e.length,n=Array(r),i=0;i<r;i++)n[i]=[e[i],t[e[i]]];return n},k.invert=function(t){for(var e={},r=k.keys(t),n=0,i=r.length;n<i;n++)e[t[r[n]]]=r[n];return e},k.functions=k.methods=function(t){var e=[];for(var r in t)k.isFunction(t[r])&&e.push(r);return e.sort()},k.extend=C(k.allKeys),k.extendOwn=k.assign=C(k.keys),k.findKey=function(t,e,r){e=O(e,r);for(var n,i=k.keys(t),o=0,a=i.length;o<a;o++)if(n=i[o],e(t[n],n,t))return n},k.pick=function(t,e,r){var n,i,o={},a=t;if(null==a)return o;k.isFunction(e)?(i=k.allKeys(a),n=j(e,r)):(i=F(arguments,!1,!1,1),n=function(t,e,r){return e in r},a=Object(a));for(var u=0,s=i.length;u<s;u++){var c=i[u],l=a[c];n(l,c,a)&&(o[c]=l)}return o},k.omit=function(t,e,r){if(k.isFunction(e))e=k.negate(e);else{var n=k.map(F(arguments,!1,!1,1),String);e=function(t,e){return!k.contains(n,e)}}return k.pick(t,e,r)},k.defaults=C(k.allKeys,!0),k.create=function(t,e){var r=P(t);return e&&k.extendOwn(r,e),r},k.clone=function(t){return k.isObject(t)?k.isArray(t)?t.slice():k.extend({},t):t},k.tap=function(t,e){return e(t),t},k.isMatch=function(t,e){var r=k.keys(e),n=r.length;if(null==t)return!n;for(var i=Object(t),o=0;o<n;o++){var a=r[o];if(e[a]!==i[a]||!(a in i))return!1}return!0};var D=function(t,e,r,n){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return t===e;t instanceof k&&(t=t._wrapped),e instanceof k&&(e=e._wrapped);var i=v.call(t);if(i!==v.call(e))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e}var o="[object Array]"===i;if(!o){if("object"!=typeof t||"object"!=typeof e)return!1;var a=t.constructor,u=e.constructor;if(a!==u&&!(k.isFunction(a)&&a instanceof a&&k.isFunction(u)&&u instanceof u)&&"constructor"in t&&"constructor"in e)return!1}r=r||[],n=n||[];for(var s=r.length;s--;)if(r[s]===t)return n[s]===e;if(r.push(t),n.push(e),o){if((s=t.length)!==e.length)return!1;for(;s--;)if(!D(t[s],e[s],r,n))return!1}else{var c,l=k.keys(t);if(s=l.length,k.keys(e).length!==s)return!1;for(;s--;)if(c=l[s],!k.has(e,c)||!D(t[c],e[c],r,n))return!1}return r.pop(),n.pop(),!0};k.isEqual=function(t,e){return D(t,e)},k.isEmpty=function(t){return null==t||(x(t)&&(k.isArray(t)||k.isString(t)||k.isArguments(t))?0===t.length:0===k.keys(t).length)},k.isElement=function(t){return!(!t||1!==t.nodeType)},k.isArray=_||function(t){return"[object Array]"===v.call(t)},k.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},k.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){k["is"+t]=function(e){return v.call(e)==="[object "+t+"]"}}),k.isArguments(arguments)||(k.isArguments=function(t){return k.has(t,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(k.isFunction=function(t){return"function"==typeof t||!1}),k.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},k.isNaN=function(t){return k.isNumber(t)&&t!==+t},k.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===v.call(t)},k.isNull=function(t){return null===t},k.isUndefined=function(t){return void 0===t},k.has=function(t,e){return null!=t&&y.call(t,e)},k.noConflict=function(){return s._=c,this},k.identity=function(t){return t},k.constant=function(t){return function(){return t}},k.noop=function(){},k.property=E,k.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},k.matcher=k.matches=function(t){return t=k.extendOwn({},t),function(e){return k.isMatch(e,t)}},k.times=function(t,e,r){var n=Array(Math.max(0,t));e=j(e,r,1);for(var i=0;i<t;i++)n[i]=e(i);return n},k.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},k.now=Date.now||function(){return(new Date).getTime()};var N={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},z=k.invert(N),L=function(t){var e=function(e){return t[e]},r="(?:"+k.keys(t).join("|")+")",n=RegExp(r),i=RegExp(r,"g");return function(t){return t=null==t?"":""+t,n.test(t)?t.replace(i,e):t}};k.escape=L(N),k.unescape=L(z),k.result=function(t,e,r){var n=null==t?void 0:t[e];return void 0===n&&(n=r),k.isFunction(n)?n.call(t):n};var B=0;k.uniqueId=function(t){var e=++B+"";return t?t+e:e},k.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var U=/(.)^/,W={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},q=/\\|'|\r|\n|\u2028|\u2029/g,V=function(t){return"\\"+W[t]};k.template=function(t,e,r){!e&&r&&(e=r),e=k.defaults({},e,k.templateSettings);var n=RegExp([(e.escape||U).source,(e.interpolate||U).source,(e.evaluate||U).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(n,function(e,r,n,a,u){return o+=t.slice(i,u).replace(q,V),i=u+e.length,r?o+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":n?o+="'+\n((__t=("+n+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var u=function(t){return a.call(this,t,k)};return u.source="function("+(e.variable||"obj")+"){\n"+o+"}",u},k.chain=function(t){var e=k(t);return e._chain=!0,e};var Q=function(t,e){return t._chain?k(e).chain():e};k.mixin=function(t){k.each(k.functions(t),function(e){var r=k[e]=t[e];k.prototype[e]=function(){var t=[this._wrapped];return p.apply(t,arguments),Q(this,r.apply(k,t))}})},k.mixin(k),k.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=l[t];k.prototype[t]=function(){var r=this._wrapped;return e.apply(r,arguments),"shift"!==t&&"splice"!==t||0!==r.length||delete r[0],Q(this,r)}}),k.each(["concat","join","slice"],function(t){var e=l[t];k.prototype[t]=function(){return Q(this,e.apply(this._wrapped,arguments))}}),k.prototype.value=function(){return this._wrapped},k.prototype.valueOf=k.prototype.toJSON=k.prototype.value,k.prototype.toString=function(){return""+this._wrapped},n=[],void 0!==(i=function(){return k}.apply(e,n))&&(t.exports=i)}).call(this)},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];Error.apply(this,e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();a.prototype=Object.create(Error.prototype),Object.setPrototypeOf?Object.setPrototypeOf(a,Error):a.__proto__=Error;var s=function(t){function e(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(o.message=t,o._captureStackTrace=r,r)if(Error.captureStackTrace)Error.captureStackTrace(o,o.constructor);else{var a=void 0;try{throw new Error}catch(t){a=t.stack}Object.defineProperty(o,"stack",{value:a})}return o}return o(e,t),u(e,[{key:"name",get:function(){return this.constructor.name}},{key:"captureStackTrace",get:function(){return!!this._captureStackTrace}}]),e}(a),c=function(t){function e(t,r,o){n(this,e);var a=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return a.httpCode=r,a.backendCode=o,a}return o(e,t),u(e,null,[{key:"for",value:function(t,r,n){return"binary.unprocessable.image.transform.source.too_large"===n?new m(t,r,n):n&&-1!==n.indexOf("binary.unprocessable.image.transform.source.")?new b(t,r,n):new e(t,r,n)}}]),e}(s),l=function(t){function e(t,r,o){return n(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,r,o))}return o(e,t),e}(c),f=function(t){function e(t){return n(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return o(e,t),e}(s),d=function(t){function e(t,r){n(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o.httpCode=r,o}return o(e,t),e}(s),p=function(t){function e(t,r){return n(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,r))}return o(e,t),e}(d),h=function(t){function e(t){return n(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return o(e,t),e}(s),v=function(t){function e(t){n(this,e);var r=t.status,o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,0===r?t.statusText:t.responseText,r));return o.response=t,o}return o(e,t),e}(d),y=function(t){function e(t,r){return n(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,r))}return o(e,t),e}(d),_=function(t){function e(t){return n(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return o(e,t),e}(s),g=function(t){function e(t,r,o,a){n(this,e);var u=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,r,o));return u.details=a||{},u}return o(e,t),e}(c),m=function(t){function e(t,r,o){return n(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,r,o))}return o(e,t),e}(c),b=function(t){function e(t,r,o){return n(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,r,o))}return o(e,t),e}(c),w=function(t){function e(t){return n(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return o(e,t),e}(h),k=function(t){function e(t){return n(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return o(e,t),e}(h),j=function(t){function e(t){return n(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return o(e,t),e}(w);e.AccessDeniedError=l,e.ArgumentError=f,e.BackendError=p,e.ClientError=c,e.InternalError=h,e.InterpolationError=j,e.NavigateToEmptyBinaryError=k,e.NetworkError=v,e.RateLimitExceededError=y,e.ResourceNotFoundError=_,e.ScrivitoError=s,e.TransformationSourceInvalidError=b,e.TransformationSourceTooLargeError=m,e.TranslationError=w,e.UnauthorizedError=g},,function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function l(t){if(!t)throw new z.ArgumentError('Please provide an obj class as the "_objClass" property.')}function f(t){var e={},r={};return N.default.each(t,function(t,n){if(N.default.isArray(t)&&"widgetlist"===N.default.first(t)){var i=N.default.map(N.default.last(t),function(t){return T.default.newWithSerializedAttributes(t)}),o=(0,V.camelCase)(n);r[o]=[i,["widgetlist"]]}else e[n]=t}),e._id||(e._id=Z.generateId()),[e,r]}function d(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return"/"===t?["/"].concat(a(e)):d(p(t),[t].concat(a(e)))}function p(t){var e=t.split("/");return e.pop(),1===e.length?"/":e.join("/")}function h(t){var e=["_path"];if(N.default.difference(N.default.keys(t),e).length)throw new z.ArgumentError('Currently only "_path" copy option is supported.')}Object.defineProperty(e,"__esModule",{value:!0});var v=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),y=function t(e,r,n){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,r);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,r,n)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(n)},_=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),g=r(98),m=i(g),b=r(122),w=i(b),k=r(160),j=i(k),O=r(34),C=n(O),P=r(51),E=n(P),A=r(86),S=n(A),x=r(14),T=i(x),F=r(59),M=i(F),R=r(93),I=i(R),D=r(0),N=i(D),z=r(1),L=r(47),B=i(L),U=r(94),W=r(26),q=i(W),V=r(15),Q=r(73),H=r(4),G={_id:"id",_obj_class:"objClass",_path:"path",_permalink:"permalink",_created_at:"createdAt",_created_by:"createdBy",_last_changed:"lastChanged",_last_changed_by:"lastChangedBy"},Z=function(t){function e(t){u(this,e);var r=s(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.objData=t,r}return c(e,t),_(e,null,[{key:"fetch",value:function(t){scrivito.asyncMethodStub()}},{key:"fetchIncludingDeleted",value:function(t){scrivito.asyncMethodStub()}},{key:"get",value:function(t){var e=this;if(N.default.isArray(t))return(0,m.default)(t,function(t){return e.get(t)});var r=this.getIncludingDeleted(t);if(r&&!r.isDeleted())return r}},{key:"getIncludingDeleted",value:function(t){var r=this;if(N.default.isArray(t))return(0,m.default)(t,function(t){return r.getIncludingDeleted(t)});var n=E.get(t);if(n){var i=new e(n);if(!i.isFinallyDeleted())return i}}},{key:"create",value:function(t){var e=scrivito.typeInfo.normalizeAttrs(t);l(e._objClass),e._id||(e._id=[this.generateId()]);var r={_id:e._id,_obj_class:e._objClass};return this.createWithSerializedAttributes(scrivito.typeInfo.unwrapAttributes(r),N.default.omit(t,"_objClass","_id"))}},{key:"addChildWithSerializedAttributes",value:function(t,r){var n=e.generateId();return this.createWithSerializedAttributes(N.default.extend({},r,{_id:n,_path:t+"/"+n}))}},{key:"createWithSerializedAttributes",value:function(t,r){if(!r)return this.createWithSerializedAttributes.apply(this,a(f(t)));var n=E.createObjData(t._id);n.update(t);var i=new e(n);return i.update(r),i}},{key:"generateId",value:function(){return(0,U.randomId)()}},{key:"all",value:function(){return(new M.default).batchSize(1e3)}},{key:"root",value:function(){return e.getByPath("/")}},{key:"where",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return(new M.default).and(t,e,r,n)}},{key:"getByPath",value:function(t){var e=(0,Q.firstValueFromIterable)(this.where("_path","equals",t));if(e)return e}},{key:"getByPermalink",value:function(t){var e=this.where("_permalink","equals",t),r=(0,Q.firstValueFromIterable)(e);if(r)return r}}]),_(e,[{key:"id",value:function(){return this._current._id}},{key:"objClass",value:function(){return this._current._obj_class}},{key:"createdAt",value:function(){return C.parseStringToDate(this._current._created_at)}},{key:"createdBy",value:function(){return this._current._created_by}},{key:"lastChanged",value:function(){return this._current._last_changed?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 p(this.path())}},{key:"parent",value:function(){var t=this.parentPath();if(t)return e.getByPath(t)}},{key:"hasConflicts",value:function(){return!!this._current._conflicts}},{key:"modification",value:function(){return this._current._deleted?"deleted":this._current._modification||null}},{key:"isModified",value:function(){return!!this.modification()}},{key:"isNew",value:function(){return"new"===this.modification()}},{key:"isEdited",value:function(){return"edited"===this.modification()}},{key:"isDeleted",value:function(){return"deleted"===this.modification()}},{key:"isFinallyDeleted",value:function(){return!!this._current._deleted}},{key:"isBinary",value:function(){if(!this._objClass)return!1;var t=this._objClass.attribute("blob");return!!t&&"binary"===t.type}},{key:"isImage",value:function(){if(this.isBinary()){var t=this.get("blob","binary");if(t)return t.isImage()}return!1}},{key:"contentLength",value:function(){return this._binaryData("contentLength")}},{key:"contentType",value:function(){return this._binaryData("contentType")}},{key:"contentUrl",value:function(){return this._binaryData("url")}},{key:"metadata",value:function(){return this._binaryData("metadata")}},{key:"fetchParent",value:function(){scrivito.asyncMethodStub()}},{key:"children",value:function(){if(this.path()){var t=e.all().and("_parentPath","equals",this.path());return(0,Q.arrayFromIterable)(t)}return[]}},{key:"hasChildren",value:function(){return!!this.children().length}},{key:"orderedChildren",value:function(){var t=this.children(),e=this.get("childOrder","referencelist");return N.default.isArray(e)?N.default.sortBy(t,function(t){var r=N.default.invoke(e,"id"),n=r.indexOf(t.id());return-1===n?e.length:n}):t}},{key:"backlinks",value:function(){return(0,Q.arrayFromIterable)(e.where("*","linksTo",this))}},{key:"ancestors",value:function(){var t=this.parentPath();return t?d(t).map(function(t){return e.getByPath(t)}):[]}},{key:"update",value:function(t){var e=this,r=scrivito.typeInfo.normalizeAttrs(t);(0,H.withBatchedUpdates)(function(){e._persistWidgets(e,r);var t=S.serialize(r);e.objData.update(t)}),this._linkResolution.start()}},{key:"destroy",value:function(){this.update({_modification:["deleted"]})}},{key:"insertWidget",value:function(t,e){var r=e.before,n=e.after,i=(r||n).id(),u=this._widgetPlacementFor(i),s=u.attributeValue,c=u.attributeName,l=u.container,f=u.index,d=r?f:f+1,p=[].concat(a(s.slice(0,d)),[t],a(s.slice(d)));l.update(o({},c,[p,"widgetlist"]))}},{key:"removeWidget",value:function(t){var e=this.fieldContainingWidget(t);e.update(N.default.reject(e.get(),function(e){return e.equals(t)}))}},{key:"copyAsync",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return h(t),this._copyAttributes().then(function(r){var n=N.default.extend(r,t),i=e.createWithSerializedAttributes(n);return i.finishSaving().then(function(){return i})})}},{key:"moveToAsync",value:function(t){return this.update({_path:[t+"/"+this.id()]}),this.finishSaving()}},{key:"markResolvedAsync",value:function(){return this.update({_conflicts:[null]}),this.finishSaving()}},{key:"finishSaving",value:function(){var t=this,e=this._linkResolution.finishResolving().then(function(){return t.objData.finishSaving()});return new scrivito.PublicPromise(e)}},{key:"equals",value:function(t){return t instanceof e&&this.id()===t.id()}},{key:"widget",value:function(t){return this.widgetData(t)?T.default.build(t,this):null}},{key:"widgets",value:function(){var t=this;return N.default.map(N.default.keys(this._widgetPool),function(e){return t.widget(e)})}},{key:"widgetData",value:function(t){return this._widgetPool[t]}},{key:"fieldContainingWidget",value:function(t){var e=this._widgetPlacementFor(t.id()),r=e.container,n=e.attributeName;return r.field(n,"widgetlist")}},{key:"generateWidgetId",value:function(){for(var t=0;t<10;t++){var e=(0,U.randomHex)();if(!this.widget(e))return e}$.error("Could not generate a new unused widget id.")}},{key:"serializeAttributes",value:function(){var t=y(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"serializeAttributes",this).call(this);return delete t._conflicts,delete t._modification,delete t._created_at,delete t._created_by,delete t._last_changed,delete t._last_changed_by,t}},{key:"slug",value:function(){var t=this.get("title","string");return(0,j.default)(t)}},{key:"_binaryData",value:function(t){var e=this.get("blob","binary");return e&&e.raw()[t]()}},{key:"_hasParentPath",value:function(){return this.path()&&"/"!==this.path()}},{key:"_copyAttributes",value:function(){var t=e.generateId(),r=this.serializeAttributes(),n=[];return N.default.each(r,function(e,i){if("_"===i[0])return void delete r[i];var o=v(e,2),a=o[0],u=o[1];if("binary"===a&&u){var s=new B.default({idToCopy:u.id}),c=s.into(t).then(function(t){return{name:i,binary:t}});n.push(c)}}),r._id=t,r._obj_class=this.objClass(),this.path()&&(r._path=this.parentPath()+"/"+t),scrivito.PublicPromise.all(n).then(function(t){return N.default.each(t,function(t){var e=t.name,n=t.binary;r[e]=["binary",{id:n.id()}]}),r})}},{key:"_widgetPlacementFor",value:function(t){var e=(0,w.default)(this._current,t),r=e.parentWidgetId?this.widget(e.parentWidgetId):this,n=(0,V.camelCase)(e.attributeName),i=r.get(n,"widgetlist");return N.default.extend(e,{container:r,attributeName:n,attributeValue:i})}},{key:"_widgetPool",get:function(){return this._current._widget_pool||{}}},{key:"_systemAttributes",get:function(){return G}},{key:"_current",get:function(){return this.objData.current}},{key:"_objClass",get:function(){return q.default.find(this.objClass())}},{key:"_linkResolution",get:function(){return scrivito.uiAdapter.linkResolutionFor(this.objData)}}]),e}(I.default);e.default=Z,scrivito.provideAsyncClassMethods(Z,{get:"fetch",getByPermalink:"fetchByPermalink",getIncludingDeleted:"fetchIncludingDeleted"}),scrivito.provideAsyncInstanceMethods(Z,{parent:"fetchParent"})},function(t,e,r){"use strict";function n(t){t?(l=void 0,f=t.stateController(),e.appState=t.createAppState(),e.cmsState=t.cmsState()):(l=new p.default,f=l,e.appState=i(),e.cmsState=l.subState("cms"),e.uiState=l.subState("ui"))}function i(){if(!l)throw new d.InternalError;var t=(h++).toString();return l.subState("apps").subState(t)}function o(t){return f.withBatchedUpdates(t)}function a(t){return f.subscribe(t)}function u(t){return f.trackChanges(t)}function s(){if(!l)throw new d.InternalError;return l.listenerCount()}function c(){if(!l)throw new d.InternalError;l.clear()}Object.defineProperty(e,"__esModule",{value:!0});var l,f,d=r(1),p=r(144);e.initializeGlobalState=n;var h=0;e.createAppState=i,e.withBatchedUpdates=o,e.subscribe=a,e.trackChanges=u,e.listenerCount=s,e.reset=c},function(t,e,r){"use strict";function n(t){var e=c;try{return c=!1,t()}finally{c=e}}Object.defineProperty(e,"__esModule",{value:!0});var i,o=r(1),a=r(142),u=r(143),s=0,c=!0,l=[o.ResourceNotFoundError],f=function(){function t(t){var e=t.state,r=t.loader,n=t.invalidation,i=t.throwNotLoaded;if(!e)throw new o.InternalError("LoadableData needs state");this.value=new u.default(e),this.loader=r,this.invalidation=n,this.throwNotLoaded=i||!1}return t.throwNotLoaded=function(){throw i=!1,new scrivito.NotLoadedError(c)},t.capture=function(t){return a.capture(t)},t.run=function(t){var e=i;i=!0;try{return{success:!0,result:n(t),allDataLoaded:i}}catch(t){if(i)throw t;return{success:!1,allDataLoaded:!1}}finally{i=e}},t.prototype.get=function(){var e=this;if(this.isAvailable())return this.reloadIfOutdated(),this.value.value();if(this.isError())throw this.reloadIfOutdated(),this.hydrateError(this.value.error());i=!1,a.notifyMissingData(function(){return e.progressLoading()}),this.throwNotLoaded&&t.throwNotLoaded()},t.prototype.set=function(t){this.value.transitionToAvailable(t,this.currentVersion())},t.prototype.setError=function(t){this.transitionToError(t)},t.prototype.reset=function(){this.value.transitionToMissing()},t.prototype.isMissing=function(){return"MISSING"===this.value.status()},t.prototype.isLoading=function(){return void 0!==this.value.getLoading()},t.prototype.isAvailable=function(){return"AVAILABLE"===this.value.status()},t.prototype.isError=function(){return"ERROR"===this.value.status()},t.prototype.triggerLoading=function(){var t=this;if(!this.isLoading()){var e=s++,r=function(r){t.value.getLoading()===e&&r()},n=this.currentVersion(),i=[],o=function(t){return i.push(t)},a=function(){return i.forEach(function(t){return t()})};this.loader(o).then(function(e){return r(function(){return scrivito.batchedStateUpdater.add(function(){t.value.transitionToAvailable(e,n),a()})})},function(e){return r(function(){return scrivito.batchedStateUpdater.add(function(){t.transitionToError(e,n),a()})})}),this.value.setLoading(e)}},t.prototype.transitionToError=function(t,e){void 0===e&&(e=this.currentVersion()),this.value.transitionToError(this.dehydrateError(t),e)},t.prototype.dehydrateError=function(t){var e=l.indexOf(t.constructor);return e>=0?{type:"dehydrated",id:e,message:t.message}:{type:"live",error:t}},t.prototype.hydrateError=function(t){if("dehydrated"===t.type){return new(0,l[t.id])(t.message)}var e=t.error;if(e)return e;throw new o.InternalError("could not hydrate error")},t.prototype.reloadIfOutdated=function(){var t=this;this.hasBeenInvalidated()&&a.notifyOutdatedData(function(){return t.progressLoading()})},t.prototype.progressLoading=function(){(this.hasBeenInvalidated()||!this.isAvailable()&&!this.isError())&&this.triggerLoading()},t.prototype.hasBeenInvalidated=function(){return!!this.invalidation&&this.currentVersion()!==this.value.version()},t.prototype.currentVersion=function(){var t=this.invalidation;if(t){var e=t();if("number"==typeof e&&isNaN(e)){var r="invalidation callback returned unsuitable version "+e;throw new o.InternalError(r)}return e}},t}();e.default=f},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t){if("function"!=typeof t)throw new h.ArgumentError("Scrivito.connect expects either a plain function or a subclass of React.Component");return s((0,y.default)(t)?t:c(t))}function s(t){var e=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),l(e,[{key:"componentWillMount",value:function(){var t=this;this._scrivitoUnsubscribeModelState=(0,m.subscribe)(function(){t._scrivitoIsStateChangeDetected&&t._scrivitoIsStateChangeDetected()&&t.forceUpdate()}),f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"componentWillMount",this)&&f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"componentWillMount",this).call(this)}},{key:"componentWillUnmount",value:function(){this._scrivitoUnsubscribeModelState(),f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"componentWillUnmount",this)&&f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"componentWillUnmount",this).call(this)}},{key:"render",value:function(){var t=this,r=void 0;return this._scrivitoIsStateChangeDetected=(0,m.trackChanges)(function(){try{var n=void 0;if(p.default.capture(function(){n=p.default.run(function(){return f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"render",t).call(t)})}).loadRequiredData(),n.allDataLoaded)r=n.result;else{var i=n.success?n.result:null;r=t._scrivitoHandleLoading(i)}}catch(e){r=t._scrivitoHandleError(e)}}),r}},{key:"_scrivitoHandleLoading",value:function(t){return this._scrivitoRenderWhileLoading?this._scrivitoRenderWhileLoading():t}},{key:"_scrivitoHandleError",value:function(t){return scrivito.printError(t),this._scrivitoRenderOnError?this._scrivitoRenderOnError():null}}]),e}(t);return(0,g.default)(e,{from:t}),e}function c(t){var e=function(e){function r(){return i(this,r),o(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return a(r,e),l(r,[{key:"render",value:function(){return t(this.props)}}]),r}(React.Component);return(0,g.default)(e,{from:t}),e}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),f=function t(e,r,n){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,r);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,r,n)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(n)};e.default=u;var d=r(5),p=n(d),h=r(1),v=r(205),y=n(v),_=r(206),g=n(_),m=r(4)},function(t,e,r){function n(t,e){!0!==t&&(i(e)?e=e():o(e)&&(e='Assert failed (turn on "Pause on exceptions" in your Source panel)'),n.fail(e))}var i=r(18),o=r(33),a=r(263),u=r(191);n.fail=a,n.stringify=u,t.exports=n},,,function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function t(){var e=this;n(this,t),this.promise=new scrivito.Promise(function(t,r){e.resolve=t,e.reject=r})};e.default=i},,,function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t){function e(){var r=void 0,n=void 0,i=s.default.capture(function(){try{r=s.default.run(t)}catch(t){n=t}});if(!i.isAllDataUpToDate()){i.loadRequiredData();var o=new a.default,u=(0,c.subscribe)(function(){o.resolve(),u()});return o.promise.then(e)}if(n)throw n;return r.result}return new scrivito.Promise(function(t){return t(e())})}Object.defineProperty(e,"__esModule",{value:!0});var o=r(10),a=n(o),u=r(5),s=n(u),c=r(4);e.default=i},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){if(!t)throw new _.ArgumentError('Please provide a widget class as the "_objClass" property.')}Object.defineProperty(e,"__esModule",{value:!0});var c=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),l=r(86),f=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(l),d=r(93),p=n(d),h=r(0),v=n(h),y=r(15),_=r(1),g=r(4),m={_id:"id",_obj_class:"objClass"},b=function(t){function e(t){o(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r._attributesToBeSaved=scrivito.typeInfo.normalizeAttrs(t),s(t._objClass),r}return u(e,t),c(e,null,[{key:"build",value:function(t,r){var n=Object.create(e.prototype);return n._obj=r,n._id=t,n}},{key:"newWithSerializedAttributes",value:function(t){var r={},n={};v.default.each(t,function(t,i){if("_obj_class"===i)return void(r._objClass=[t]);if(v.default.isArray(t)&&"widgetlist"===v.default.first(t)){var o=v.default.map(v.default.last(t),function(t){return e.newWithSerializedAttributes(t)}),a=(0,y.camelCase)(i);return void(r[a]=[o,["widgetlist"]])}n[i]=t});var i=new e(r);return i.preserializedAttributes=n,i}}]),c(e,[{key:"id",value:function(){if(this.isPersisted())return this._id;this._throwUnpersistedError()}},{key:"objClass",value:function(){return this._current._obj_class}},{key:"obj",value:function(){if(this.isPersisted())return this._obj;this._throwUnpersistedError()}},{key:"widget",value:function(t){return this.obj().widget(t)}},{key:"update",value:function(t){var e=this,r=scrivito.typeInfo.normalizeAttrs(t);(0,g.withBatchedUpdates)(function(){e._persistWidgets(e.obj(),r);var t=f.serialize(r);e._updateSelf(t)})}},{key:"insertBefore",value:function(t){t.obj().insertWidget(this,{before:t})}},{key:"insertAfter",value:function(t){t.obj().insertWidget(this,{after:t})}},{key:"remove",value:function(){this.obj().removeWidget(this)}},{key:"copy",value:function(){var t=this.serializeAttributes();return e.newWithSerializedAttributes(t)}},{key:"persistInObj",value:function(t){this._persistWidgets(t,this._attributesToBeSaved);var e=f.serialize(this._attributesToBeSaved);v.default.extend(e,this.preserializedAttributes||{}),this._obj=t,this._id=t.generateWidgetId(),this._updateSelf(e)}},{key:"isPersisted",value:function(){return!!this._obj}},{key:"finishSaving",value:function(){return this.obj().finishSaving()}},{key:"equals",value:function(t){return t instanceof e&&(this.id()===t.id()&&this.obj().id()===t.obj().id())}},{key:"containingField",value:function(){return this.obj().fieldContainingWidget(this)}},{key:"_throwUnpersistedError",value:function(){throw new _.ScrivitoError("Can not access a new widget before it has been saved.")}},{key:"_updateSelf",value:function(t){var e={_widgetPool:[i({},this.id(),t)]};this.obj().update(e)}},{key:"attributesToBeSaved",get:function(){return this._attributesToBeSaved}},{key:"_current",get:function(){if(this.isPersisted())return this.obj().widgetData(this.id());throw new _.ScrivitoError("Can not access an unpersisted widget.")}},{key:"_systemAttributes",get:function(){return m}}]),e}(p.default);e.default=b},function(t,e,r){"use strict";function n(t){return y.test(t)}function i(t){return p.test(t)}function o(t){return t.replace(f,function(t,e){return"_"+e.toLowerCase()})}function a(t){return t.replace(l,function(t,e,r,n){return n?r.toUpperCase()===r?t:""+e.substr(1)+r.toUpperCase():t})}function u(t){var e=a(t);return e.charAt(0).toUpperCase()+e.slice(1)}function s(t){return t.replace(h," ").replace(v,function(t){return" "+t.toLowerCase()}).replace(d,function(t){return" "+t}).trim().replace(/./,c)}function c(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}Object.defineProperty(e,"__esModule",{value:!0});var l=/(_+)(\w)/g,f=/([A-Z])/g,d=/[A-Z]+|\d+/g,p=/^_?(_+[A-Z0-9]|[^_])+$/,h=/[_\s]+/g,v=/[A-Z][a-z]+/g,y=/^[a-z0-9_:]+$/;scrivito.attributeInflection={camelCase:a,classify:u,isCamelCase:i,isUnderscore:n,underscore:o},e.camelCase=a,e.classify=u,e.isCamelCase=i,e.isUnderscore=n,e.sentenceCase=s,e.underscore=o},function(t,e,r){var n=r(19),i=r(62);t.exports=function(t){return n(t)?t.displayName:i(t)}},function(t,e){t.exports=React},function(t,e){t.exports=function(t){return"function"==typeof t}},function(t,e,r){var n=r(18),i=r(38);t.exports=function(t){return n(t)&&i(t.meta)}},,function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t){try{return(0,y.isFunction)(t)?a(t):(0,y.isObject)(t)?o(t):s(t)}catch(t){return""}}function o(t){var e=t._scrivitoPrivateContent;return e?u(e):(0,y.isElement)(t)?"[object HTMLElement "+s(t.outerHTML)+"]":t instanceof jQuery?"[object jQuery "+s(t.get(0).outerHTML)+"]":s(t)}function a(t){var e=t._scrivitoPrivateSchema;if(e)return"[class "+e.name+"]";if(t.prototype&&t.prototype.isReactComponent){return'[class React.Component "'+(t.displayName||t.name)+'"]'}return c(t.toString())}function u(t){if(t instanceof f.default)return"[object "+t.objClass()+' id="'+t.id()+'"]';if(t instanceof p.default){var e=t.obj();return"[object "+t.objClass()+' id="'+t.id()+'" objId="'+e.id()+'"]'}return t instanceof v.default?t.isInternal()?'[object Link objId="'+t.objId()+'"]':'[object Link url="'+t.url()+'"]':void 0}function s(t){var e=JSON.stringify(t);return e?c(e):e}function c(t){return t.length>100?t.slice(0,100)+"...":t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var l=r(3),f=n(l),d=r(14),p=n(d),h=r(24),v=n(h),y=r(0)},function(t,e,r){r(7),r(75),r(18),r(63);t.exports=function(t,e){function r(t,e){return t}return r.meta={kind:"irreducible",name:t,predicate:e,identity:!0},r.displayName=t,r.is=e,r}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),a=r(0),u=function(t){return t&&t.__esModule?t:{default:t}}(a),s=function(){function t(e,r){n(this,t),e.attributes=e.attributes||{},r._scrivitoPrivateSchema&&(e.attributes=u.default.extend({},r._scrivitoPrivateSchema.attributes,e.attributes)),this.definition=e}return o(t,null,[{key:"forInstance",value:function(t){return this.forClass(t.constructor)}},{key:"forClass",value:function(t){return t._scrivitoPrivateSchema}},{key:"basicFieldFor",value:function(e,r){var n=t.forInstance(e);if(n){var i=n.attributeDefinition(r);if(i)return e._scrivitoPrivateContent.field(r,i)}}}]),o(t,[{key:"attributeDefinition",value:function(t){var e=this.attributes[t];if(e)return scrivito.typeInfo.normalize(e)}},{key:"isBinary",value:function(){var t=this.attributeDefinition("blob")||[];return"binary"===i(t,1)[0]}},{key:"attributes",get:function(){return this.definition.attributes}},{key:"name",get:function(){return this.definition.name}},{key:"validContainerClasses",get:function(){return this.definition.validContainerClasses}}]),t}();e.default=s},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){var e=l.default.without.apply(l.default,[l.default.keys(t)].concat(y));if(!l.default.isEmpty(e))throw new p.ArgumentError("Unexpected attributes "+(0,v.default)(e)+". Available attributes: "+(0,v.default)(y))}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(3),s=n(u),c=r(0),l=n(c),f=r(49),d=n(f),p=r(1),h=r(21),v=n(h),y=["hash","obj","query","target","title","url"],_=function(){function t(e){i(this,t),o(e),this._hash=e.hash||null,this._query=e.query||null,this._target=e.target||null,this._title=e.title||null,this._url=e.url||null,this._objId=null,e.obj&&(this._objId=e.obj.id())}return a(t,null,[{key:"build",value:function(t){var e=t.objId;delete t.objId;var r=new this(t);return e&&(r._objId=e),r}}]),a(t,[{key:"title",value:function(){return this._title}},{key:"query",value:function(){return this._query}},{key:"hash",value:function(){return this._hash}},{key:"target",value:function(){return this._target}},{key:"url",value:function(){return this._url}},{key:"objId",value:function(){return this._objId}},{key:"obj",value:function(){return this.objId()?s.default.get(this.objId()):null}},{key:"queryParameters",value:function(){return d.default.parseQuery(this.query())}},{key:"fetchObj",value:function(){return this.isExternal()?scrivito.PublicPromise.reject(new p.ScrivitoError("The link is external and does not reference an object.")):s.default.fetch(this.objId())}},{key:"isExternal",value:function(){return!!this.url()}},{key:"isInternal",value:function(){return!this.isExternal()}},{key:"copy",value:function(t){o(t);var e=this.buildAttributes();return l.default.has(t,"obj")&&delete e.objId,l.default.extend(e,t),this.constructor.build(e)}},{key:"buildAttributes",value:function(){return{title:this.title(),query:this.query(),hash:this.hash(),target:this.target(),url:this.url(),objId:this.objId()}}},{key:"isBroken",value:function(){return!this.isExternal()&&!this.obj()}}]),t}();e.default=_},,function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t){var e=t._obj_class,r=t._path,n=t.blob,i={_objClass:[e]};return r&&(i._path=[r]),n&&(i.blob=[n,"binary"]),i}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(3),l=n(c),f=r(71),d=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(f),p=r(0),h=n(p),v=r(1),y=r(21),_=n(y),g=r(88),m=n(g),b=r(159),w=r(48),k=["_path","blob"],j=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),s(e,[{key:"createObjWithDefaults",value:function(t){var e=h.default.without.apply(h.default,[h.default.keys(t)].concat(k));if(t._obj_class=this.name,!h.default.isEmpty(e))throw new v.InternalError("Unexpected attributes "+(0,_.default)(e)+". Available attributes: "+(0,_.default)(k));if(this._classData.usesServerCallbacks)return d.createObjFromLegacyAttributes(t);var r=l.default.create(u(t));return r.finishSaving().then(function(){return r})}},{key:"isBinary",value:function(){var t=this.attribute("blob");return!(!t||"binary"!==t.type)}},{key:"hasChildOrder",value:function(){var t=this.attribute("childOrder");return!(!t||"referencelist"!==t.type)}}],[{key:"type",value:function(){return"Obj"}},{key:"validPageClasses",value:function(t){if((0,w.useRailsEngine)()){return(0,b.validRailsPageClasses)(t).reduce(function(t,r){var n=e.find(r);return n&&t.push(n),t},[])}return e.all().filter(function(t){return!t.isHiddenFromEditors()&&!t.isBinary()})}}]),e}(m.default);e.default=j},function(t,e,r){var n=r(33),i=r(75);t.exports=function(t){return n(t)||i(t)}},,,function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){var r=scrivito.computeCacheKey([t,e]);return _.cmsState.subState("binary").subState(r)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(49),s=n(u),c=r(5),l=n(c),f=r(0),d=r(1),p=r(47),h=n(p),v=r(87),y=n(v),_=r(4),g="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",m={public_access:{get:{url:g}},private_access:{get:{url:g}}},b=function(){function t(e,r,n){var a=this;i(this,t),this._id=e,this._isPublic=r,this._definition=n,this._loadableData=new l.default({state:o(e,n),loader:function(){return a._loadUrlData()}})}return a(t,[{key:"id",value:function(){return this._id}},{key:"copy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.idToCopy=this._id,new h.default(t)}},{key:"isPrivate",value:function(){return!this._isPublic}},{key:"transform",value:function(e){return new t(this._id,this._isPublic,(0,f.extend)({},this._definition,e))}},{key:"original",value:function(){return new t(this._id,this._isPublic,{})}},{key:"raw",value:function(){return new t(this._id,this._isPublic)}},{key:"isTransformed",value:function(){return!!this._definition}},{key:"isExplicitlyTransformed",value:function(){return this.isTransformed()&&!(0,f.isEmpty)(this._definition)}},{key:"isRaw",value:function(){return!this.isTransformed()}},{key:"url",value:function(){return this._urlData()[this._accessType()].get.url}},{key:"filename",value:function(){var t=this.url();return t.match(/^data:/)?"":(0,s.default)(t).path().split("/").pop()}},{key:"metadata",value:function(){return this._assertNotTransformed("Metadata"),new y.default(this._id)}},{key:"contentType",value:function(){return this._assertNotTransformed("Content type"),this.metadata().get("contentType")}},{key:"contentLength",value:function(){return this._assertNotTransformed("Content length"),this.metadata().get("contentLength")||0}},{key:"extname",value:function(){if(this.raw().filename().indexOf(".")>-1){return/[^.\\]*$/.exec(this.raw().filename())[0].toLowerCase()}}},{key:"equals",value:function(e){return e instanceof t&&e.id()===this.id()&&e.isPrivate()===this.isPrivate()&&(0,f.isEqual)(e.definition(),this.definition())}},{key:"isImage",value:function(){var t=this.raw().contentType();return!!t&&"image"===t.split("/")[0]}},{key:"definition",value:function(){return this._definition||null}},{key:"_accessType",value:function(){return this.isPrivate()?"private_access":"public_access"}},{key:"_urlData",value:function(){return this._loadableData.get()||m}},{key:"_loadUrlData",value:function(){var t="blobs/"+encodeURIComponent(this._id),e=void 0;return this._definition&&(t+="/transform",e={transformation:this._definition}),scrivito.CmsRestApi.get(t,e)}},{key:"_assertNotTransformed",value:function(t){if(this.isTransformed())throw new d.ScrivitoError('"'+t+'" is not available for transformed images. Use "Scrivito.Binary#raw" to access the untransformed version of the image.')}}],[{key:"upload",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.source=t,new h.default(e)}},{key:"store",value:function(e,r,n){var i=r.transformation;new l.default({state:o(e,i)}).set(n);var a=new t(e);return i?a.transform(i):a}},{key:"storeMetadata",value:function(t,e){return y.default.store(t,e)}}]),t}();e.default=b},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t){return function(e){return!e.isHiddenFromEditors()&&e.isValidContainerClass(t)}}function s(t){var e=t instanceof v.default?"Widget":"Obj";return w.default.findByType(e,t.objClass())}Object.defineProperty(e,"__esModule",{value:!0});var c=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),l=r(124),f=n(l),d=r(71),p=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(d),h=r(14),v=n(h),y=r(0),_=n(y),g=r(88),m=n(g),b=r(89),w=n(b),k=function(t){function e(t){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.embeds=t.embeds,r._embeddingAttribute=t.embeddingAttribute,r}return a(e,t),c(e,null,[{key:"type",value:function(){return"Widget"}},{key:"validClassNamesForField",value:function(t){return this.validClassesForField(t).map(function(t){return t.name})}},{key:"validClassesForField",value:function(t){var e=t.container(),r=s(e);if(r&&r.usesServerCallbacks()){return(0,f.default)(t).reduce(function(t,e){var r=w.default.findByType("Widget",e);return r&&t.push(r),t},[])}var n=r&&r.attribute(t.name());return(n&&n.only()||w.default.allForType("Widget")).filter(u(e.objClass()))}}]),c(e,[{key:"newWidgetWithDefaults",value:function(){return this._classData.usesServerCallbacks?p.newWidget(this.name):scrivito.Promise.resolve(new v.default({_objClass:[this.name]}))}},{key:"embeddingAttribute",value:function(){if(this.embeds)return this.attribute(this._embeddingAttribute)}},{key:"isValidContainerClass",value:function(t){return!this._classData.validContainerClasses||_.default.contains(this._classData.validContainerClasses,t)}},{key:"hasJsDetailsView",value:function(){return this.localizedAttributes().length>0}}]),e}(m.default);e.default=k},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),a=r(0),u=r(26),s=n(u),c=r(31),l=n(c),f=function(){function t(e){i(this,t),this.name=e.name,this.type=e.type,this._values=e.values,this._valuesLocalization=e.valuesLocalization,this._attributeData=e}return o(t,null,[{key:"isSystemAttribute",value:function(t){return"_"===t[0]}}]),o(t,[{key:"title",value:function(){return this._attributeData.title}},{key:"description",value:function(){return this._attributeData.description}},{key:"typeInfo",value:function(){return"enum"===this.type||"multienum"===this.type?[this.type,{values:this._values,valuesLocalization:this._valuesLocalization}]:[this.type,{}]}},{key:"values",value:function(){return this._assertValidTypes(["enum","multienum"],"Only enum and multienum attributes can have valid values"),this._values||[]}},{key:"validClasses",value:function(){this._assertValidTypes(["reference","referencelist"],"Only reference and referencelist attributes can have valid classes");var t=this._attributeData.validClasses;if(t)return(0,a.map)(t,function(t){return s.default.find(t)})}},{key:"only",value:function(){this._assertValidTypes(["widgetlist"],"Only widgetlist attributes have only()");var t=this._attributeData.only;if(t){var e=(0,a.isArray)(t)?t:[t];return(0,a.compact)((0,a.map)(e,function(t){return l.default.find(t)}))}}},{key:"_assertValidTypes",value:function(t,e){(0,a.include)(t,this.type)||$.error(e)}}]),t}();e.default=f},function(t,e){t.exports=function(t){return null===t||void 0===t}},function(t,e,r){"use strict";function n(t){return v.default.isString(t)?t.match(/^-?\d+$/)?d(t):null:d(t)}function i(t){return f(t)&&_<=t&&t<=g}function o(t){return v.default.isNumber(t)&&v.default.isFinite(t)}function a(t){if(!v.default.isString(t))return null;if(!c(t))throw new y.InternalError('The value is not a valid ISO date time: "'+t+'"');return u(t)}function u(t){if(t){var e=t.match(m),r=p(e,7),n=(r[0],r[1]),i=r[2],o=r[3],a=r[4],u=r[5],s=r[6];return new Date(Date.UTC(n,i-1,o,a,u,s))}}function s(t){return""+t.getUTCFullYear()+l(t.getUTCMonth()+1)+l(t.getUTCDate())+l(t.getUTCHours())+l(t.getUTCMinutes())+l(t.getUTCSeconds())}function c(t){return v.default.isString(t)&&t.match(/^\d{14}$/)}function l(t){return t<10?"0"+t:t}function f(t){return v.default.isNumber(t)&&v.default.isFinite(t)&&Math.floor(t)===t}function d(t){var e=parseInt(t,10);return 0===e?0:i(e)?e:null}Object.defineProperty(e,"__esModule",{value:!0});var p=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.deserializeAsInteger=n,e.isValidInteger=i,e.isValidFloat=o,e.deserializeAsDate=a,e.parseStringToDate=u,e.formatDateToString=s,e.isValidDateString=c;var h=r(0),v=function(t){return t&&t.__esModule?t:{default:t}}(h),y=r(1),_=-9007199254740991,g=9007199254740991,m=/^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/},,,function(t,e,r){"use strict";function n(){return o||window.Scrivito}function i(t){o=t}Object.defineProperty(e,"__esModule",{value:!0});var o=void 0;e.getWindowContext=n,e.setWindowContext=i},function(t,e,r){var n=r(33),i=r(39);t.exports=function(t){return!n(t)&&"object"==typeof t&&!i(t)}},function(t,e){t.exports=function(t){return Array.isArray?Array.isArray(t):t instanceof Array}},function(t,e,r){var n=(r(7),r(192),r(19));r(16);t.exports=function(t){return!n(t)||t.meta.identity}},function(t,e,r){var n=r(19);r(62),r(7),r(191);t.exports=function(t,e,r){return n(t)?t.meta.identity||"object"!=typeof e||null===e?t(e,r):new t(e,r):e}},function(t,e,r){var n=r(19);t.exports=function(t,e){return n(e)?e.is(t):t instanceof e}},,function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},,function(t,e,r){"use strict";function n(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).devicePixelRatio||1}function i(){return window.location}function o(t){window.location=t}function a(){return window.history}function u(){return window.onpopstate}function s(t){window.onpopstate=t}function c(){return window.screen}function l(){return document}Object.defineProperty(e,"__esModule",{value:!0}),e.devicePixelRatio=n,e.history=a,e.location=i,e.onpopstate=u,e.redirectTo=o,e.screen=c,e.setOnpopstate=s,e.getDocument=l},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){if(!s.isBlob(t.source))throw new f.ArgumentError("Expected a Blob or File as the source.");if(t.contentType||(t.contentType=t.source.type),!t.filename){if(!s.isFile(t.source))throw new f.ArgumentError("Expected a filename to be passed with Blob as the source.");t.filename=t.source.name}}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(72),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(u),c=r(0),l=n(c),f=r(1),d=r(30),p=n(d),h=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),e.idToCopy?this.idToCopy=e.idToCopy:(o(e),this.source=e.source),e.filename&&(this.filename=e.filename.replace(/[^\w\-_\.$]/g,"-")),this.contentType=e.contentType}return a(t,[{key:"into",value:function(t){var e=void 0;e=l.default.isString(t)?t:t.id();var r=void 0;return r=this.idToCopy?scrivito.BinaryRequest.copy(this.idToCopy,e,this.filename,this.contentType):scrivito.BinaryRequest.upload(e,this.source,this.filename,this.contentType),r.then(function(t){var e=t.id;return new p.default(e,!1)})}}]),t}();e.default=h},function(t,e,r){"use strict";function n(){return o}function i(t){o=t}Object.defineProperty(e,"__esModule",{value:!0});var o=void 0;e.useRailsEngine=n,e.initUseRailsEngine=i},function(t,e,r){var n,i,o;/*!
1
+ !function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=628)}([function(t,e,n){var r,i;(function(){function n(t){function e(e,n,r,i,o,a){for(;o>=0&&o<a;o+=t){var s=i?i[o]:o;r=n(r,e[s],s,e)}return r}return function(n,r,i,o){r=k(r,o,4);var a=!A(n)&&C.keys(n),s=(a||n).length,u=t>0?0:s-1;return arguments.length<3&&(i=n[a?a[u]:u],u+=t),e(n,r,i,a,u,s)}}function o(t){return function(e,n,r){n=E(n,r);for(var i=T(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}}function a(t,e,n){return function(r,i,o){var a=0,s=T(r);if("number"==typeof o)t>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return o=n(r,i),r[o]===i?o:-1;if(i!==i)return o=e(p.call(r,a,s),C.isNaN),o>=0?o+a:-1;for(o=t>0?a:s-1;o>=0&&o<s;o+=t)if(r[o]===i)return o;return-1}}function s(t,e){var n=M.length,r=t.constructor,i=C.isFunction(r)&&r.prototype||f,o="constructor";for(C.has(t,o)&&!C.contains(e,o)&&e.push(o);n--;)(o=M[n])in t&&t[o]!==i[o]&&!C.contains(e,o)&&e.push(o)}var u=this,c=u._,l=Array.prototype,f=Object.prototype,d=Function.prototype,h=l.push,p=l.slice,v=f.toString,m=f.hasOwnProperty,g=Array.isArray,y=Object.keys,b=d.bind,_=Object.create,w=function(){},C=function(t){return t instanceof C?t:this instanceof C?void(this._wrapped=t):new C(t)};void 0!==t&&t.exports&&(e=t.exports=C),e._=C,C.VERSION="1.8.3";var k=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},E=function(t,e,n){return null==t?C.identity:C.isFunction(t)?k(t,e,n):C.isObject(t)?C.matcher(t):C.property(t)};C.iteratee=function(t,e){return E(t,e,1/0)};var x=function(t,e){return function(n){var r=arguments.length;if(r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=t(o),s=a.length,u=0;u<s;u++){var c=a[u];e&&void 0!==n[c]||(n[c]=o[c])}return n}},j=function(t){if(!C.isObject(t))return{};if(_)return _(t);w.prototype=t;var e=new w;return w.prototype=null,e},O=function(t){return function(e){return null==e?void 0:e[t]}},S=Math.pow(2,53)-1,T=O("length"),A=function(t){var e=T(t);return"number"==typeof e&&e>=0&&e<=S};C.each=C.forEach=function(t,e,n){e=k(e,n);var r,i;if(A(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=C.keys(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t},C.map=C.collect=function(t,e,n){e=E(e,n);for(var r=!A(t)&&C.keys(t),i=(r||t).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=e(t[s],s,t)}return o},C.reduce=C.foldl=C.inject=n(1),C.reduceRight=C.foldr=n(-1),C.find=C.detect=function(t,e,n){var r;if(void 0!==(r=A(t)?C.findIndex(t,e,n):C.findKey(t,e,n))&&-1!==r)return t[r]},C.filter=C.select=function(t,e,n){var r=[];return e=E(e,n),C.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},C.reject=function(t,e,n){return C.filter(t,C.negate(E(e)),n)},C.every=C.all=function(t,e,n){e=E(e,n);for(var r=!A(t)&&C.keys(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(!e(t[a],a,t))return!1}return!0},C.some=C.any=function(t,e,n){e=E(e,n);for(var r=!A(t)&&C.keys(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(e(t[a],a,t))return!0}return!1},C.contains=C.includes=C.include=function(t,e,n,r){return A(t)||(t=C.values(t)),("number"!=typeof n||r)&&(n=0),C.indexOf(t,e,n)>=0},C.invoke=function(t,e){var n=p.call(arguments,2),r=C.isFunction(e);return C.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},C.pluck=function(t,e){return C.map(t,C.property(e))},C.where=function(t,e){return C.filter(t,C.matcher(e))},C.findWhere=function(t,e){return C.find(t,C.matcher(e))},C.max=function(t,e,n){var r,i,o=-1/0,a=-1/0;if(null==e&&null!=t){t=A(t)?t:C.values(t);for(var s=0,u=t.length;s<u;s++)(r=t[s])>o&&(o=r)}else e=E(e,n),C.each(t,function(t,n,r){((i=e(t,n,r))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)});return o},C.min=function(t,e,n){var r,i,o=1/0,a=1/0;if(null==e&&null!=t){t=A(t)?t:C.values(t);for(var s=0,u=t.length;s<u;s++)(r=t[s])<o&&(o=r)}else e=E(e,n),C.each(t,function(t,n,r){((i=e(t,n,r))<a||i===1/0&&o===1/0)&&(o=t,a=i)});return o},C.shuffle=function(t){for(var e,n=A(t)?t:C.values(t),r=n.length,i=Array(r),o=0;o<r;o++)e=C.random(0,o),e!==o&&(i[o]=i[e]),i[e]=n[o];return i},C.sample=function(t,e,n){return null==e||n?(A(t)||(t=C.values(t)),t[C.random(t.length-1)]):C.shuffle(t).slice(0,Math.max(0,e))},C.sortBy=function(t,e,n){return e=E(e,n),C.pluck(C.map(t,function(t,n,r){return{value:t,index:n,criteria:e(t,n,r)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var P=function(t){return function(e,n,r){var i={};return n=E(n,r),C.each(e,function(r,o){var a=n(r,o,e);t(i,r,a)}),i}};C.groupBy=P(function(t,e,n){C.has(t,n)?t[n].push(e):t[n]=[e]}),C.indexBy=P(function(t,e,n){t[n]=e}),C.countBy=P(function(t,e,n){C.has(t,n)?t[n]++:t[n]=1}),C.toArray=function(t){return t?C.isArray(t)?p.call(t):A(t)?C.map(t,C.identity):C.values(t):[]},C.size=function(t){return null==t?0:A(t)?t.length:C.keys(t).length},C.partition=function(t,e,n){e=E(e,n);var r=[],i=[];return C.each(t,function(t,n,o){(e(t,n,o)?r:i).push(t)}),[r,i]},C.first=C.head=C.take=function(t,e,n){if(null!=t)return null==e||n?t[0]:C.initial(t,t.length-e)},C.initial=function(t,e,n){return p.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},C.last=function(t,e,n){if(null!=t)return null==e||n?t[t.length-1]:C.rest(t,Math.max(0,t.length-e))},C.rest=C.tail=C.drop=function(t,e,n){return p.call(t,null==e||n?1:e)},C.compact=function(t){return C.filter(t,C.identity)};var N=function(t,e,n,r){for(var i=[],o=0,a=r||0,s=T(t);a<s;a++){var u=t[a];if(A(u)&&(C.isArray(u)||C.isArguments(u))){e||(u=N(u,e,n));var c=0,l=u.length;for(i.length+=l;c<l;)i[o++]=u[c++]}else n||(i[o++]=u)}return i};C.flatten=function(t,e){return N(t,e,!1)},C.without=function(t){return C.difference(t,p.call(arguments,1))},C.uniq=C.unique=function(t,e,n,r){C.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=E(n,r));for(var i=[],o=[],a=0,s=T(t);a<s;a++){var u=t[a],c=n?n(u,a,t):u;e?(a&&o===c||i.push(u),o=c):n?C.contains(o,c)||(o.push(c),i.push(u)):C.contains(i,u)||i.push(u)}return i},C.union=function(){return C.uniq(N(arguments,!0,!0))},C.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=T(t);r<i;r++){var o=t[r];if(!C.contains(e,o)){for(var a=1;a<n&&C.contains(arguments[a],o);a++);a===n&&e.push(o)}}return e},C.difference=function(t){var e=N(arguments,!0,!0,1);return C.filter(t,function(t){return!C.contains(e,t)})},C.zip=function(){return C.unzip(arguments)},C.unzip=function(t){for(var e=t&&C.max(t,T).length||0,n=Array(e),r=0;r<e;r++)n[r]=C.pluck(t,r);return n},C.object=function(t,e){for(var n={},r=0,i=T(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},C.findIndex=o(1),C.findLastIndex=o(-1),C.sortedIndex=function(t,e,n,r){n=E(n,r,1);for(var i=n(e),o=0,a=T(t);o<a;){var s=Math.floor((o+a)/2);n(t[s])<i?o=s+1:a=s}return o},C.indexOf=a(1,C.findIndex,C.sortedIndex),C.lastIndexOf=a(-1,C.findLastIndex),C.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i};var D=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=j(t.prototype),a=t.apply(o,i);return C.isObject(a)?a:o};C.bind=function(t,e){if(b&&t.bind===b)return b.apply(t,p.call(arguments,1));if(!C.isFunction(t))throw new TypeError("Bind must be called on a function");var n=p.call(arguments,2),r=function(){return D(t,r,e,this,n.concat(p.call(arguments)))};return r},C.partial=function(t){var e=p.call(arguments,1),n=function(){for(var r=0,i=e.length,o=Array(i),a=0;a<i;a++)o[a]=e[a]===C?arguments[r++]:e[a];for(;r<arguments.length;)o.push(arguments[r++]);return D(t,n,this,this,o)};return n},C.bindAll=function(t){var e,n,r=arguments.length;if(r<=1)throw new Error("bindAll must be passed function names");for(e=1;e<r;e++)n=arguments[e],t[n]=C.bind(t[n],t);return t},C.memoize=function(t,e){var n=function(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return C.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},C.delay=function(t,e){var n=p.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},C.defer=C.partial(C.delay,C,1),C.throttle=function(t,e,n){var r,i,o,a=null,s=0;n||(n={});var u=function(){s=!1===n.leading?0:C.now(),a=null,o=t.apply(r,i),a||(r=i=null)};return function(){var c=C.now();s||!1!==n.leading||(s=c);var l=e-(c-s);return r=this,i=arguments,l<=0||l>e?(a&&(clearTimeout(a),a=null),s=c,o=t.apply(r,i),a||(r=i=null)):a||!1===n.trailing||(a=setTimeout(u,l)),o}},C.debounce=function(t,e,n){var r,i,o,a,s,u=function(){var c=C.now()-a;c<e&&c>=0?r=setTimeout(u,e-c):(r=null,n||(s=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,a=C.now();var c=n&&!r;return r||(r=setTimeout(u,e)),c&&(s=t.apply(o,i),o=i=null),s}},C.wrap=function(t,e){return C.partial(e,t)},C.negate=function(t){return function(){return!t.apply(this,arguments)}},C.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},C.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},C.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},C.once=C.partial(C.before,2);var F=!{toString:null}.propertyIsEnumerable("toString"),M=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];C.keys=function(t){if(!C.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)C.has(t,n)&&e.push(n);return F&&s(t,e),e},C.allKeys=function(t){if(!C.isObject(t))return[];var e=[];for(var n in t)e.push(n);return F&&s(t,e),e},C.values=function(t){for(var e=C.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},C.mapObject=function(t,e,n){e=E(e,n);for(var r,i=C.keys(t),o=i.length,a={},s=0;s<o;s++)r=i[s],a[r]=e(t[r],r,t);return a},C.pairs=function(t){for(var e=C.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},C.invert=function(t){for(var e={},n=C.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},C.functions=C.methods=function(t){var e=[];for(var n in t)C.isFunction(t[n])&&e.push(n);return e.sort()},C.extend=x(C.allKeys),C.extendOwn=C.assign=x(C.keys),C.findKey=function(t,e,n){e=E(e,n);for(var r,i=C.keys(t),o=0,a=i.length;o<a;o++)if(r=i[o],e(t[r],r,t))return r},C.pick=function(t,e,n){var r,i,o={},a=t;if(null==a)return o;C.isFunction(e)?(i=C.allKeys(a),r=k(e,n)):(i=N(arguments,!1,!1,1),r=function(t,e,n){return e in n},a=Object(a));for(var s=0,u=i.length;s<u;s++){var c=i[s],l=a[c];r(l,c,a)&&(o[c]=l)}return o},C.omit=function(t,e,n){if(C.isFunction(e))e=C.negate(e);else{var r=C.map(N(arguments,!1,!1,1),String);e=function(t,e){return!C.contains(r,e)}}return C.pick(t,e,n)},C.defaults=x(C.allKeys,!0),C.create=function(t,e){var n=j(t);return e&&C.extendOwn(n,e),n},C.clone=function(t){return C.isObject(t)?C.isArray(t)?t.slice():C.extend({},t):t},C.tap=function(t,e){return e(t),t},C.isMatch=function(t,e){var n=C.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var a=n[o];if(e[a]!==i[a]||!(a in i))return!1}return!0};var R=function(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return t===e;t instanceof C&&(t=t._wrapped),e instanceof C&&(e=e._wrapped);var i=v.call(t);if(i!==v.call(e))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e}var o="[object Array]"===i;if(!o){if("object"!=typeof t||"object"!=typeof e)return!1;var a=t.constructor,s=e.constructor;if(a!==s&&!(C.isFunction(a)&&a instanceof a&&C.isFunction(s)&&s instanceof s)&&"constructor"in t&&"constructor"in e)return!1}n=n||[],r=r||[];for(var u=n.length;u--;)if(n[u]===t)return r[u]===e;if(n.push(t),r.push(e),o){if((u=t.length)!==e.length)return!1;for(;u--;)if(!R(t[u],e[u],n,r))return!1}else{var c,l=C.keys(t);if(u=l.length,C.keys(e).length!==u)return!1;for(;u--;)if(c=l[u],!C.has(e,c)||!R(t[c],e[c],n,r))return!1}return n.pop(),r.pop(),!0};C.isEqual=function(t,e){return R(t,e)},C.isEmpty=function(t){return null==t||(A(t)&&(C.isArray(t)||C.isString(t)||C.isArguments(t))?0===t.length:0===C.keys(t).length)},C.isElement=function(t){return!(!t||1!==t.nodeType)},C.isArray=g||function(t){return"[object Array]"===v.call(t)},C.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},C.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){C["is"+t]=function(e){return v.call(e)==="[object "+t+"]"}}),C.isArguments(arguments)||(C.isArguments=function(t){return C.has(t,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(C.isFunction=function(t){return"function"==typeof t||!1}),C.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},C.isNaN=function(t){return C.isNumber(t)&&t!==+t},C.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===v.call(t)},C.isNull=function(t){return null===t},C.isUndefined=function(t){return void 0===t},C.has=function(t,e){return null!=t&&m.call(t,e)},C.noConflict=function(){return u._=c,this},C.identity=function(t){return t},C.constant=function(t){return function(){return t}},C.noop=function(){},C.property=O,C.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},C.matcher=C.matches=function(t){return t=C.extendOwn({},t),function(e){return C.isMatch(e,t)}},C.times=function(t,e,n){var r=Array(Math.max(0,t));e=k(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},C.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},C.now=Date.now||function(){return(new Date).getTime()};var L={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},I=C.invert(L),B=function(t){var e=function(e){return t[e]},n="(?:"+C.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};C.escape=B(L),C.unescape=B(I),C.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),C.isFunction(r)?r.call(t):r};var z=0;C.uniqueId=function(t){var e=++z+"";return t?t+e:e},C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var H=/(.)^/,q={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},W=/\\|'|\r|\n|\u2028|\u2029/g,U=function(t){return"\\"+q[t]};C.template=function(t,e,n){!e&&n&&(e=n),e=C.defaults({},e,C.templateSettings);var r=RegExp([(e.escape||H).source,(e.interpolate||H).source,(e.evaluate||H).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,a,s){return o+=t.slice(i,s).replace(W,U),i=s+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var s=function(t){return a.call(this,t,C)};return s.source="function("+(e.variable||"obj")+"){\n"+o+"}",s},C.chain=function(t){var e=C(t);return e._chain=!0,e};var V=function(t,e){return t._chain?C(e).chain():e};C.mixin=function(t){C.each(C.functions(t),function(e){var n=C[e]=t[e];C.prototype[e]=function(){var t=[this._wrapped];return h.apply(t,arguments),V(this,n.apply(C,t))}})},C.mixin(C),C.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=l[t];C.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],V(this,n)}}),C.each(["concat","join","slice"],function(t){var e=l[t];C.prototype[t]=function(){return V(this,e.apply(this._wrapped,arguments))}}),C.prototype.value=function(){return this._wrapped},C.prototype.valueOf=C.prototype.toJSON=C.prototype.value,C.prototype.toString=function(){return""+this._wrapped},r=[],void 0!==(i=function(){return C}.apply(e,r))&&(t.exports=i)}).call(this)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];Error.apply(this,e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();a.prototype=Object.create(Error.prototype),Object.setPrototypeOf?Object.setPrototypeOf(a,Error):a.__proto__=Error;var u=function(t){function e(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(o.message=t,o._captureStackTrace=n,n)if(Error.captureStackTrace)Error.captureStackTrace(o,o.constructor);else{var a=void 0;try{throw new Error}catch(t){a=t.stack}Object.defineProperty(o,"stack",{value:a})}return o}return o(e,t),s(e,[{key:"name",get:function(){return this.constructor.name}},{key:"captureStackTrace",get:function(){return!!this._captureStackTrace}}]),e}(a),c=function(t){function e(t,n,o){r(this,e);var a=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return a.httpCode=n,a.backendCode=o,a}return o(e,t),s(e,null,[{key:"for",value:function(t,n,r){return"binary.unprocessable.image.transform.source.too_large"===r?new b(t,n,r):r&&-1!==r.indexOf("binary.unprocessable.image.transform.source.")?new _(t,n,r):new e(t,n,r)}}]),e}(u),l=function(t){function e(t,n,o){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,o))}return o(e,t),e}(c),f=function(t){function e(t){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return o(e,t),e}(u),d=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o.httpCode=n,o}return o(e,t),e}(u),h=function(t){function e(t,n){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return o(e,t),e}(d),p=function(t){function e(t){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return o(e,t),e}(u),v=function(t){function e(t){r(this,e);var n=t.status,o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,0===n?t.statusText:t.responseText,n));return o.response=t,o}return o(e,t),e}(d),m=function(t){function e(t,n){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return o(e,t),e}(d),g=function(t){function e(t){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return o(e,t),e}(u),y=function(t){function e(t,n,o,a){r(this,e);var s=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,o));return s.details=a||{},s}return o(e,t),e}(c),b=function(t){function e(t,n,o){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,o))}return o(e,t),e}(c),_=function(t){function e(t,n,o){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,o))}return o(e,t),e}(c),w=function(t){function e(t){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return o(e,t),e}(p),C=function(t){function e(t){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return o(e,t),e}(p),k=function(t){function e(t){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return o(e,t),e}(w);e.AccessDeniedError=l,e.ArgumentError=f,e.BackendError=h,e.ClientError=c,e.InternalError=p,e.InterpolationError=k,e.NavigateToEmptyBinaryError=C,e.NetworkError=v,e.RateLimitExceededError=m,e.ResourceNotFoundError=g,e.ScrivitoError=u,e.TransformationSourceInvalidError=_,e.TransformationSourceTooLargeError=b,e.TranslationError=w,e.UnauthorizedError=y},,function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function l(t){if(!t)throw new I.ArgumentError('Please provide an obj class as the "_objClass" property.')}function f(t){var e={},n={};return L.default.each(t,function(t,r){if(L.default.isArray(t)&&"widgetlist"===L.default.first(t)){var i=L.default.map(L.default.last(t),function(t){return P.default.newWithSerializedAttributes(t)}),o=(0,U.camelCase)(r);n[o]=[i,["widgetlist"]]}else e[r]=t}),e._id||(e._id=G.generateId()),[e,n]}function d(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return"/"===t?["/"].concat(a(e)):d(h(t),[t].concat(a(e)))}function h(t){var e=t.split("/");return e.pop(),1===e.length?"/":e.join("/")}function p(t){var e=["_path"];if(L.default.difference(L.default.keys(t),e).length)throw new I.ArgumentError('Currently only "_path" copy option is supported.')}Object.defineProperty(e,"__esModule",{value:!0});var v=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},g=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),y=n(98),b=i(y),_=n(122),w=i(_),C=n(160),k=i(C),E=n(34),x=r(E),j=n(52),O=r(j),S=n(86),T=r(S),A=n(14),P=i(A),N=n(60),D=i(N),F=n(93),M=i(F),R=n(0),L=i(R),I=n(1),B=n(47),z=i(B),H=n(94),q=n(26),W=i(q),U=n(15),V=n(73),Q=n(4),K={_id:"id",_obj_class:"objClass",_path:"path",_permalink:"permalink",_created_at:"createdAt",_created_by:"createdBy",_last_changed:"lastChanged",_last_changed_by:"lastChangedBy"},G=function(t){function e(t){s(this,e);var n=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.objData=t,n}return c(e,t),g(e,null,[{key:"fetch",value:function(t){scrivito.asyncMethodStub()}},{key:"fetchIncludingDeleted",value:function(t){scrivito.asyncMethodStub()}},{key:"get",value:function(t){var e=this;if(L.default.isArray(t))return(0,b.default)(t,function(t){return e.get(t)});var n=this.getIncludingDeleted(t);if(n&&!n.isDeleted())return n}},{key:"getIncludingDeleted",value:function(t){var n=this;if(L.default.isArray(t))return(0,b.default)(t,function(t){return n.getIncludingDeleted(t)});var r=O.get(t);if(r){var i=new e(r);if(!i.isFinallyDeleted())return i}}},{key:"create",value:function(t){var e=scrivito.typeInfo.normalizeAttrs(t);l(e._objClass),e._id||(e._id=[this.generateId()]);var n={_id:e._id,_obj_class:e._objClass};return this.createWithSerializedAttributes(scrivito.typeInfo.unwrapAttributes(n),L.default.omit(t,"_objClass","_id"))}},{key:"addChildWithSerializedAttributes",value:function(t,n){var r=e.generateId();return this.createWithSerializedAttributes(L.default.extend({},n,{_id:r,_path:t+"/"+r}))}},{key:"createWithSerializedAttributes",value:function(t,n){if(!n)return this.createWithSerializedAttributes.apply(this,a(f(t)));var r=O.createObjData(t._id);r.update(t);var i=new e(r);return i.update(n),i}},{key:"generateId",value:function(){return(0,H.randomId)()}},{key:"all",value:function(){return(new D.default).batchSize(1e3)}},{key:"root",value:function(){return e.getByPath("/")}},{key:"where",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return(new D.default).and(t,e,n,r)}},{key:"getByPath",value:function(t){var e=(0,V.firstValueFromIterable)(this.where("_path","equals",t));if(e)return e}},{key:"getByPermalink",value:function(t){var e=this.where("_permalink","equals",t),n=(0,V.firstValueFromIterable)(e);if(n)return n}}]),g(e,[{key:"id",value:function(){return this._current._id}},{key:"objClass",value:function(){return this._current._obj_class}},{key:"createdAt",value:function(){return x.parseStringToDate(this._current._created_at)}},{key:"createdBy",value:function(){return this._current._created_by}},{key:"lastChanged",value:function(){return this._current._last_changed?x.parseStringToDate(this._current._last_changed):null}},{key:"lastChangedBy",value:function(){return this._current._last_changed_by?this._current._last_changed_by:null}},{key:"version",value:function(){return this._current._version}},{key:"path",value:function(){return this._current._path||null}},{key:"permalink",value:function(){return this._current._permalink||null}},{key:"parentPath",value:function(){if(this.path()&&"/"!==this.path())return h(this.path())}},{key:"parent",value:function(){var t=this.parentPath();if(t)return e.getByPath(t)}},{key:"hasConflicts",value:function(){return!!this._current._conflicts}},{key:"modification",value:function(){return this._current._deleted?"deleted":this._current._modification||null}},{key:"isModified",value:function(){return!!this.modification()}},{key:"isNew",value:function(){return"new"===this.modification()}},{key:"isEdited",value:function(){return"edited"===this.modification()}},{key:"isDeleted",value:function(){return"deleted"===this.modification()}},{key:"isFinallyDeleted",value:function(){return!!this._current._deleted}},{key:"isBinary",value:function(){if(!this._objClass)return!1;var t=this._objClass.attribute("blob");return!!t&&"binary"===t.type}},{key:"isImage",value:function(){if(this.isBinary()){var t=this.get("blob","binary");if(t)return t.isImage()}return!1}},{key:"contentLength",value:function(){return this._binaryData("contentLength")}},{key:"contentType",value:function(){return this._binaryData("contentType")}},{key:"contentUrl",value:function(){return this._binaryData("url")}},{key:"metadata",value:function(){return this._binaryData("metadata")}},{key:"fetchParent",value:function(){scrivito.asyncMethodStub()}},{key:"children",value:function(){if(this.path()){var t=e.all().and("_parentPath","equals",this.path());return(0,V.arrayFromIterable)(t)}return[]}},{key:"hasChildren",value:function(){return!!this.children().length}},{key:"orderedChildren",value:function(){var t=this.children(),e=this.get("childOrder","referencelist");return L.default.isArray(e)?L.default.sortBy(t,function(t){var n=L.default.invoke(e,"id"),r=n.indexOf(t.id());return-1===r?e.length:r}):t}},{key:"backlinks",value:function(){return(0,V.arrayFromIterable)(e.where("*","linksTo",this))}},{key:"ancestors",value:function(){var t=this.parentPath();return t?d(t).map(function(t){return e.getByPath(t)}):[]}},{key:"update",value:function(t){var e=this,n=scrivito.typeInfo.normalizeAttrs(t);(0,Q.withBatchedUpdates)(function(){e._persistWidgets(e,n);var t=T.serialize(n);e.objData.update(t)}),this._linkResolution.start()}},{key:"destroy",value:function(){this.update({_modification:["deleted"]})}},{key:"insertWidget",value:function(t,e){var n=e.before,r=e.after,i=(n||r).id(),s=this._widgetPlacementFor(i),u=s.attributeValue,c=s.attributeName,l=s.container,f=s.index,d=n?f:f+1,h=[].concat(a(u.slice(0,d)),[t],a(u.slice(d)));l.update(o({},c,[h,"widgetlist"]))}},{key:"removeWidget",value:function(t){var e=this.fieldContainingWidget(t);e.update(L.default.reject(e.get(),function(e){return e.equals(t)}))}},{key:"copyAsync",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return p(t),this._copyAttributes().then(function(n){var r=L.default.extend(n,t),i=e.createWithSerializedAttributes(r);return i.finishSaving().then(function(){return i})})}},{key:"moveToAsync",value:function(t){return this.update({_path:[t+"/"+this.id()]}),this.finishSaving()}},{key:"markResolvedAsync",value:function(){return this.update({_conflicts:[null]}),this.finishSaving()}},{key:"finishSaving",value:function(){var t=this,e=this._linkResolution.finishResolving().then(function(){return t.objData.finishSaving()});return new scrivito.PublicPromise(e)}},{key:"equals",value:function(t){return t instanceof e&&this.id()===t.id()}},{key:"widget",value:function(t){return this.widgetData(t)?P.default.build(t,this):null}},{key:"widgets",value:function(){var t=this;return L.default.map(L.default.keys(this._widgetPool),function(e){return t.widget(e)})}},{key:"widgetData",value:function(t){return this._widgetPool[t]}},{key:"fieldContainingWidget",value:function(t){var e=this._widgetPlacementFor(t.id()),n=e.container,r=e.attributeName;return n.field(r,"widgetlist")}},{key:"generateWidgetId",value:function(){for(var t=0;t<10;t++){var e=(0,H.randomHex)();if(!this.widget(e))return e}$.error("Could not generate a new unused widget id.")}},{key:"serializeAttributes",value:function(){var t=m(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"serializeAttributes",this).call(this);return delete t._conflicts,delete t._modification,delete t._created_at,delete t._created_by,delete t._last_changed,delete t._last_changed_by,t}},{key:"slug",value:function(){var t=this.get("title","string");return(0,k.default)(t)}},{key:"_binaryData",value:function(t){var e=this.get("blob","binary");return e&&e.raw()[t]()}},{key:"_hasParentPath",value:function(){return this.path()&&"/"!==this.path()}},{key:"_copyAttributes",value:function(){var t=e.generateId(),n=this.serializeAttributes(),r=[];return L.default.each(n,function(e,i){if("_"===i[0])return void delete n[i];var o=v(e,2),a=o[0],s=o[1];if("binary"===a&&s){var u=new z.default({idToCopy:s.id}),c=u.into(t).then(function(t){return{name:i,binary:t}});r.push(c)}}),n._id=t,n._obj_class=this.objClass(),this.path()&&(n._path=this.parentPath()+"/"+t),scrivito.PublicPromise.all(r).then(function(t){return L.default.each(t,function(t){var e=t.name,r=t.binary;n[e]=["binary",{id:r.id()}]}),n})}},{key:"_widgetPlacementFor",value:function(t){var e=(0,w.default)(this._current,t),n=e.parentWidgetId?this.widget(e.parentWidgetId):this,r=(0,U.camelCase)(e.attributeName),i=n.get(r,"widgetlist");return L.default.extend(e,{container:n,attributeName:r,attributeValue:i})}},{key:"_widgetPool",get:function(){return this._current._widget_pool||{}}},{key:"_systemAttributes",get:function(){return K}},{key:"_current",get:function(){return this.objData.current}},{key:"_objClass",get:function(){return W.default.find(this.objClass())}},{key:"_linkResolution",get:function(){return scrivito.uiAdapter.linkResolutionFor(this.objData)}}]),e}(M.default);e.default=G,scrivito.provideAsyncClassMethods(G,{get:"fetch",getByPermalink:"fetchByPermalink",getIncludingDeleted:"fetchIncludingDeleted"}),scrivito.provideAsyncInstanceMethods(G,{parent:"fetchParent"})},function(t,e,n){"use strict";function r(t){t?(l=void 0,f=t.stateController(),e.appState=t.createAppState(),e.cmsState=t.cmsState()):(l=new h.default,f=l,e.appState=i(),e.cmsState=l.subState("cms"),e.uiState=l.subState("ui"))}function i(){if(!l)throw new d.InternalError;var t=(p++).toString();return l.subState("apps").subState(t)}function o(t){return f.withBatchedUpdates(t)}function a(t){return f.subscribe(t)}function s(t){return f.trackChanges(t)}function u(){if(!l)throw new d.InternalError;return l.listenerCount()}function c(){if(!l)throw new d.InternalError;l.clear()}Object.defineProperty(e,"__esModule",{value:!0});var l,f,d=n(1),h=n(144);e.initializeGlobalState=r;var p=0;e.createAppState=i,e.withBatchedUpdates=o,e.subscribe=a,e.trackChanges=s,e.listenerCount=u,e.reset=c},function(t,e,n){"use strict";function r(t){var e=c;try{return c=!1,t()}finally{c=e}}Object.defineProperty(e,"__esModule",{value:!0});var i,o=n(1),a=n(142),s=n(143),u=0,c=!0,l=[o.ResourceNotFoundError],f=function(){function t(t){var e=t.state,n=t.loader,r=t.invalidation,i=t.throwNotLoaded;if(!e)throw new o.InternalError("LoadableData needs state");this.value=new s.default(e),this.loader=n,this.invalidation=r,this.throwNotLoaded=i||!1}return t.throwNotLoaded=function(){throw i=!1,new scrivito.NotLoadedError(c)},t.capture=function(t){return a.capture(t)},t.run=function(t){var e=i;i=!0;try{return{success:!0,result:r(t),allDataLoaded:i}}catch(t){if(i)throw t;return{success:!1,allDataLoaded:!1}}finally{i=e}},t.prototype.get=function(){var e=this;if(this.isAvailable())return this.reloadIfOutdated(),this.value.value();if(this.isError())throw this.reloadIfOutdated(),this.hydrateError(this.value.error());i=!1,a.notifyMissingData(function(){return e.progressLoading()}),this.throwNotLoaded&&t.throwNotLoaded()},t.prototype.set=function(t){this.value.transitionToAvailable(t,this.currentVersion())},t.prototype.setError=function(t){this.transitionToError(t)},t.prototype.reset=function(){this.value.transitionToMissing()},t.prototype.isMissing=function(){return"MISSING"===this.value.status()},t.prototype.isLoading=function(){return void 0!==this.value.getLoading()},t.prototype.isAvailable=function(){return"AVAILABLE"===this.value.status()},t.prototype.isError=function(){return"ERROR"===this.value.status()},t.prototype.triggerLoading=function(){var t=this;if(!this.isLoading()){var e=u++,n=function(n){t.value.getLoading()===e&&n()},r=this.currentVersion(),i=[],o=function(t){return i.push(t)},a=function(){return i.forEach(function(t){return t()})};this.loader(o).then(function(e){return n(function(){return scrivito.batchedStateUpdater.add(function(){t.value.transitionToAvailable(e,r),a()})})},function(e){return n(function(){return scrivito.batchedStateUpdater.add(function(){t.transitionToError(e,r),a()})})}),this.value.setLoading(e)}},t.prototype.transitionToError=function(t,e){void 0===e&&(e=this.currentVersion()),this.value.transitionToError(this.dehydrateError(t),e)},t.prototype.dehydrateError=function(t){var e=l.indexOf(t.constructor);return e>=0?{type:"dehydrated",id:e,message:t.message}:{type:"live",error:t}},t.prototype.hydrateError=function(t){if("dehydrated"===t.type){return new(0,l[t.id])(t.message)}var e=t.error;if(e)return e;throw new o.InternalError("could not hydrate error")},t.prototype.reloadIfOutdated=function(){var t=this;this.hasBeenInvalidated()&&a.notifyOutdatedData(function(){return t.progressLoading()})},t.prototype.progressLoading=function(){(this.hasBeenInvalidated()||!this.isAvailable()&&!this.isError())&&this.triggerLoading()},t.prototype.hasBeenInvalidated=function(){return!!this.invalidation&&this.currentVersion()!==this.value.version()},t.prototype.currentVersion=function(){var t=this.invalidation;if(t){var e=t();if("number"==typeof e&&isNaN(e)){var n="invalidation callback returned unsuitable version "+e;throw new o.InternalError(n)}return e}},t}();e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){if("function"!=typeof t)throw new p.ArgumentError("Scrivito.connect expects either a plain function or a subclass of React.Component");return u((0,m.default)(t)?t:c(t))}function u(t){var e=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),l(e,[{key:"componentWillMount",value:function(){var t=this;this._scrivitoUnsubscribeModelState=(0,b.subscribe)(function(){t._scrivitoIsStateChangeDetected&&t._scrivitoIsStateChangeDetected()&&t.forceUpdate()}),f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"componentWillMount",this)&&f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"componentWillMount",this).call(this)}},{key:"componentWillUnmount",value:function(){this._scrivitoUnsubscribeModelState(),f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"componentWillUnmount",this)&&f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"componentWillUnmount",this).call(this)}},{key:"render",value:function(){var t=this,n=void 0;return this._scrivitoIsStateChangeDetected=(0,b.trackChanges)(function(){try{var r=void 0;if(h.default.capture(function(){r=h.default.run(function(){return f(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"render",t).call(t)})}).loadRequiredData(),r.allDataLoaded)n=r.result;else{var i=r.success?r.result:null;n=t._scrivitoHandleLoading(i)}}catch(e){n=t._scrivitoHandleError(e)}}),n}},{key:"_scrivitoHandleLoading",value:function(t){return this._scrivitoRenderWhileLoading?this._scrivitoRenderWhileLoading():t}},{key:"_scrivitoHandleError",value:function(t){return scrivito.printError(t),this._scrivitoRenderOnError?this._scrivitoRenderOnError():null}}]),e}(t);return(0,y.default)(e,{from:t}),e}function c(t){var e=function(e){function n(){return i(this,n),o(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return a(n,e),l(n,[{key:"render",value:function(){return t(this.props)}}]),n}(React.Component);return(0,y.default)(e,{from:t}),e}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)};e.default=s;var d=n(5),h=r(d),p=n(1),v=n(205),m=r(v),g=n(206),y=r(g),b=n(4)},function(t,e,n){function r(t,e){!0!==t&&(i(e)?e=e():o(e)&&(e='Assert failed (turn on "Pause on exceptions" in your Source panel)'),r.fail(e))}var i=n(18),o=n(33),a=n(265),s=n(191);r.fail=a,r.stringify=s,t.exports=r},,,function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function t(){var e=this;r(this,t),this.promise=new scrivito.Promise(function(t,n){e.resolve=t,e.reject=n})};e.default=i},,,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){function e(){var n=void 0,r=void 0,i=u.default.capture(function(){try{n=u.default.run(t)}catch(t){r=t}});if(!i.isAllDataUpToDate()){i.loadRequiredData();var o=new a.default,s=(0,c.subscribe)(function(){o.resolve(),s()});return o.promise.then(e)}if(r)throw r;return n.result}return new scrivito.Promise(function(t){return t(e())})}Object.defineProperty(e,"__esModule",{value:!0});var o=n(10),a=r(o),s=n(5),u=r(s),c=n(4);e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t){if(!t)throw new g.ArgumentError('Please provide a widget class as the "_objClass" property.')}Object.defineProperty(e,"__esModule",{value:!0});var c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(86),f=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(l),d=n(93),h=r(d),p=n(0),v=r(p),m=n(15),g=n(1),y=n(4),b={_id:"id",_obj_class:"objClass"},_=function(t){function e(t){o(this,e);var n=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n._attributesToBeSaved=scrivito.typeInfo.normalizeAttrs(t),u(t._objClass),n}return s(e,t),c(e,null,[{key:"build",value:function(t,n){var r=Object.create(e.prototype);return r._obj=n,r._id=t,r}},{key:"newWithSerializedAttributes",value:function(t){var n={},r={};v.default.each(t,function(t,i){if("_obj_class"===i)return void(n._objClass=[t]);if(v.default.isArray(t)&&"widgetlist"===v.default.first(t)){var o=v.default.map(v.default.last(t),function(t){return e.newWithSerializedAttributes(t)}),a=(0,m.camelCase)(i);return void(n[a]=[o,["widgetlist"]])}r[i]=t});var i=new e(n);return i.preserializedAttributes=r,i}}]),c(e,[{key:"id",value:function(){if(this.isPersisted())return this._id;this._throwUnpersistedError()}},{key:"objClass",value:function(){return this._current._obj_class}},{key:"obj",value:function(){if(this.isPersisted())return this._obj;this._throwUnpersistedError()}},{key:"widget",value:function(t){return this.obj().widget(t)}},{key:"update",value:function(t){var e=this,n=scrivito.typeInfo.normalizeAttrs(t);(0,y.withBatchedUpdates)(function(){e._persistWidgets(e.obj(),n);var t=f.serialize(n);e._updateSelf(t)})}},{key:"insertBefore",value:function(t){t.obj().insertWidget(this,{before:t})}},{key:"insertAfter",value:function(t){t.obj().insertWidget(this,{after:t})}},{key:"remove",value:function(){this.obj().removeWidget(this)}},{key:"copy",value:function(){var t=this.serializeAttributes();return e.newWithSerializedAttributes(t)}},{key:"persistInObj",value:function(t){this._persistWidgets(t,this._attributesToBeSaved);var e=f.serialize(this._attributesToBeSaved);v.default.extend(e,this.preserializedAttributes||{}),this._obj=t,this._id=t.generateWidgetId(),this._updateSelf(e)}},{key:"isPersisted",value:function(){return!!this._obj}},{key:"finishSaving",value:function(){return this.obj().finishSaving()}},{key:"equals",value:function(t){return t instanceof e&&(this.id()===t.id()&&this.obj().id()===t.obj().id())}},{key:"containingField",value:function(){return this.obj().fieldContainingWidget(this)}},{key:"_throwUnpersistedError",value:function(){throw new g.ScrivitoError("Can not access a new widget before it has been saved.")}},{key:"_updateSelf",value:function(t){var e={_widgetPool:[i({},this.id(),t)]};this.obj().update(e)}},{key:"attributesToBeSaved",get:function(){return this._attributesToBeSaved}},{key:"_current",get:function(){if(this.isPersisted())return this.obj().widgetData(this.id());throw new g.ScrivitoError("Can not access an unpersisted widget.")}},{key:"_systemAttributes",get:function(){return b}}]),e}(h.default);e.default=_},function(t,e,n){"use strict";function r(t){return m.test(t)}function i(t){return h.test(t)}function o(t){return t.replace(f,function(t,e){return"_"+e.toLowerCase()})}function a(t){return t.replace(l,function(t,e,n,r){return r?n.toUpperCase()===n?t:""+e.substr(1)+n.toUpperCase():t})}function s(t){var e=a(t);return e.charAt(0).toUpperCase()+e.slice(1)}function u(t){return t.replace(p," ").replace(v,function(t){return" "+t.toLowerCase()}).replace(d,function(t){return" "+t}).trim().replace(/./,c)}function c(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}Object.defineProperty(e,"__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_:]+$/;scrivito.attributeInflection={camelCase:a,classify:s,isCamelCase:i,isUnderscore:r,underscore:o},e.camelCase=a,e.classify=s,e.isCamelCase=i,e.isUnderscore=r,e.sentenceCase=u,e.underscore=o},function(t,e,n){var r=n(19),i=n(62);t.exports=function(t){return r(t)?t.displayName:i(t)}},function(t,e){t.exports=React},function(t,e){t.exports=function(t){return"function"==typeof t}},function(t,e,n){var r=n(18),i=n(38);t.exports=function(t){return r(t)&&i(t.meta)}},,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){try{return(0,m.isFunction)(t)?a(t):(0,m.isObject)(t)?o(t):u(t)}catch(t){return""}}function o(t){var e=t._scrivitoPrivateContent;return e?s(e):(0,m.isElement)(t)?"[object HTMLElement "+u(t.outerHTML)+"]":t instanceof jQuery?"[object jQuery "+u(t.get(0).outerHTML)+"]":u(t)}function a(t){var e=t._scrivitoPrivateSchema;if(e)return"[class "+e.name+"]";if(t.prototype&&t.prototype.isReactComponent){return'[class React.Component "'+(t.displayName||t.name)+'"]'}return c(t.toString())}function s(t){if(t instanceof f.default)return"[object "+t.objClass()+' id="'+t.id()+'"]';if(t instanceof h.default){var e=t.obj();return"[object "+t.objClass()+' id="'+t.id()+'" objId="'+e.id()+'"]'}return t instanceof v.default?t.isInternal()?'[object Link objId="'+t.objId()+'"]':'[object Link url="'+t.url()+'"]':void 0}function u(t){var e=JSON.stringify(t);return e?c(e):e}function c(t){return t.length>100?t.slice(0,100)+"...":t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var l=n(3),f=r(l),d=n(14),h=r(d),p=n(24),v=r(p),m=n(0)},function(t,e,n){n(7),n(75),n(18),n(63);t.exports=function(t,e){function n(t,e){return t}return n.meta={kind:"irreducible",name:t,predicate:e,identity:!0},n.displayName=t,n.is=e,n}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(0),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=function(){function t(e,n){r(this,t),e.attributes=e.attributes||{},n._scrivitoPrivateSchema&&(e.attributes=s.default.extend({},n._scrivitoPrivateSchema.attributes,e.attributes)),this.definition=e}return o(t,null,[{key:"forInstance",value:function(t){return this.forClass(t.constructor)}},{key:"forClass",value:function(t){return t._scrivitoPrivateSchema}},{key:"basicFieldFor",value:function(e,n){var r=t.forInstance(e);if(r){var i=r.attributeDefinition(n);if(i)return e._scrivitoPrivateContent.field(n,i)}}}]),o(t,[{key:"attributeDefinition",value:function(t){var e=this.attributes[t];if(e)return scrivito.typeInfo.normalize(e)}},{key:"isBinary",value:function(){var t=this.attributeDefinition("blob")||[];return"binary"===i(t,1)[0]}},{key:"attributes",get:function(){return this.definition.attributes}},{key:"name",get:function(){return this.definition.name}},{key:"validContainerClasses",get:function(){return this.definition.validContainerClasses}}]),t}();e.default=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){var e=l.default.without.apply(l.default,[l.default.keys(t)].concat(m));if(!l.default.isEmpty(e))throw new h.ArgumentError("Unexpected attributes "+(0,v.default)(e)+". Available attributes: "+(0,v.default)(m))}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(3),u=r(s),c=n(0),l=r(c),f=n(49),d=r(f),h=n(1),p=n(21),v=r(p),m=["hash","obj","query","target","title","url"],g=function(){function t(e){i(this,t),o(e),this._hash=e.hash||null,this._query=e.query||null,this._target=e.target||null,this._title=e.title||null,this._url=e.url||null,this._objId=null,e.obj&&(this._objId=e.obj.id())}return a(t,null,[{key:"build",value:function(t){var e=t.objId;delete t.objId;var n=new this(t);return e&&(n._objId=e),n}}]),a(t,[{key:"title",value:function(){return this._title}},{key:"query",value:function(){return this._query}},{key:"hash",value:function(){return this._hash}},{key:"target",value:function(){return this._target}},{key:"url",value:function(){return this._url}},{key:"objId",value:function(){return this._objId}},{key:"obj",value:function(){return this.objId()?u.default.get(this.objId()):null}},{key:"queryParameters",value:function(){return d.default.parseQuery(this.query())}},{key:"fetchObj",value:function(){return this.isExternal()?scrivito.PublicPromise.reject(new h.ScrivitoError("The link is external and does not reference an object.")):u.default.fetch(this.objId())}},{key:"isExternal",value:function(){return!!this.url()}},{key:"isInternal",value:function(){return!this.isExternal()}},{key:"copy",value:function(t){o(t);var e=this.buildAttributes();return l.default.has(t,"obj")&&delete e.objId,l.default.extend(e,t),this.constructor.build(e)}},{key:"buildAttributes",value:function(){return{title:this.title(),query:this.query(),hash:this.hash(),target:this.target(),url:this.url(),objId:this.objId()}}},{key:"isBroken",value:function(){return!this.isExternal()&&!this.obj()}}]),t}();e.default=g},,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){var e=t._obj_class,n=t._path,r=t.blob,i={_objClass:[e]};return n&&(i._path=[n]),r&&(i.blob=[r,"binary"]),i}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(3),l=r(c),f=n(71),d=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(f),h=n(0),p=r(h),v=n(1),m=n(21),g=r(m),y=n(88),b=r(y),_=n(159),w=n(48),C=["_path","blob"],k=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),u(e,[{key:"createObjWithDefaults",value:function(t){var e=p.default.without.apply(p.default,[p.default.keys(t)].concat(C));if(t._obj_class=this.name,!p.default.isEmpty(e))throw new v.InternalError("Unexpected attributes "+(0,g.default)(e)+". Available attributes: "+(0,g.default)(C));if(this._classData.usesServerCallbacks)return d.createObjFromLegacyAttributes(t);var n=l.default.create(s(t));return n.finishSaving().then(function(){return n})}},{key:"isBinary",value:function(){var t=this.attribute("blob");return!(!t||"binary"!==t.type)}},{key:"hasChildOrder",value:function(){var t=this.attribute("childOrder");return!(!t||"referencelist"!==t.type)}}],[{key:"type",value:function(){return"Obj"}},{key:"validPageClasses",value:function(t){if((0,w.useRailsEngine)()){return(0,_.validRailsPageClasses)(t).reduce(function(t,n){var r=e.find(n);return r&&t.push(r),t},[])}return e.all().filter(function(t){return!t.isHiddenFromEditors()&&!t.isBinary()})}}]),e}(b.default);e.default=k},function(t,e,n){var r=n(33),i=n(75);t.exports=function(t){return r(t)||i(t)}},,,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){var n=scrivito.computeCacheKey([t,e]);return g.cmsState.subState("binary").subState(n)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(49),u=r(s),c=n(5),l=r(c),f=n(0),d=n(1),h=n(47),p=r(h),v=n(87),m=r(v),g=n(4),y="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",b={public_access:{get:{url:y}},private_access:{get:{url:y}}},_=function(){function t(e,n,r){var a=this;i(this,t),this._id=e,this._isPublic=n,this._definition=r,this._loadableData=new l.default({state:o(e,r),loader:function(){return a._loadUrlData()}})}return a(t,[{key:"id",value:function(){return this._id}},{key:"copy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.idToCopy=this._id,new p.default(t)}},{key:"isPrivate",value:function(){return!this._isPublic}},{key:"transform",value:function(e){return new t(this._id,this._isPublic,(0,f.extend)({},this._definition,e))}},{key:"original",value:function(){return new t(this._id,this._isPublic,{})}},{key:"raw",value:function(){return new t(this._id,this._isPublic)}},{key:"isTransformed",value:function(){return!!this._definition}},{key:"isExplicitlyTransformed",value:function(){return this.isTransformed()&&!(0,f.isEmpty)(this._definition)}},{key:"isRaw",value:function(){return!this.isTransformed()}},{key:"url",value:function(){return this._urlData()[this._accessType()].get.url}},{key:"filename",value:function(){var t=this.url();return t.match(/^data:/)?"":(0,u.default)(t).path().split("/").pop()}},{key:"metadata",value:function(){return this._assertNotTransformed("Metadata"),new m.default(this._id)}},{key:"contentType",value:function(){return this._assertNotTransformed("Content type"),this.metadata().get("contentType")}},{key:"contentLength",value:function(){return this._assertNotTransformed("Content length"),this.metadata().get("contentLength")||0}},{key:"extname",value:function(){if(this.raw().filename().indexOf(".")>-1){return/[^.\\]*$/.exec(this.raw().filename())[0].toLowerCase()}}},{key:"equals",value:function(e){return e instanceof t&&e.id()===this.id()&&e.isPrivate()===this.isPrivate()&&(0,f.isEqual)(e.definition(),this.definition())}},{key:"isImage",value:function(){var t=this.raw().contentType();return!!t&&"image"===t.split("/")[0]}},{key:"definition",value:function(){return this._definition||null}},{key:"_accessType",value:function(){return this.isPrivate()?"private_access":"public_access"}},{key:"_urlData",value:function(){return this._loadableData.get()||b}},{key:"_loadUrlData",value:function(){var t="blobs/"+encodeURIComponent(this._id),e=void 0;return this._definition&&(t+="/transform",e={transformation:this._definition}),scrivito.CmsRestApi.get(t,e)}},{key:"_assertNotTransformed",value:function(t){if(this.isTransformed())throw new d.ScrivitoError('"'+t+'" is not available for transformed images. Use "Scrivito.Binary#raw" to access the untransformed version of the image.')}}],[{key:"upload",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.source=t,new p.default(e)}},{key:"store",value:function(e,n,r){var i=n.transformation;new l.default({state:o(e,i)}).set(r);var a=new t(e);return i?a.transform(i):a}},{key:"storeMetadata",value:function(t,e){return m.default.store(t,e)}}]),t}();e.default=_},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){return function(e){return!e.isHiddenFromEditors()&&e.isValidContainerClass(t)}}function u(t){var e=t instanceof v.default?"Widget":"Obj";return w.default.findByType(e,t.objClass())}Object.defineProperty(e,"__esModule",{value:!0});var c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(124),f=r(l),d=n(71),h=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(d),p=n(14),v=r(p),m=n(0),g=r(m),y=n(88),b=r(y),_=n(89),w=r(_),C=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.embeds=t.embeds,n._embeddingAttribute=t.embeddingAttribute,n}return a(e,t),c(e,null,[{key:"type",value:function(){return"Widget"}},{key:"validClassNamesForField",value:function(t){return this.validClassesForField(t).map(function(t){return t.name})}},{key:"validClassesForField",value:function(t){var e=t.container(),n=u(e);if(n&&n.usesServerCallbacks()){return(0,f.default)(t).reduce(function(t,e){var n=w.default.findByType("Widget",e);return n&&t.push(n),t},[])}var r=n&&n.attribute(t.name());return(r&&r.only()||w.default.allForType("Widget")).filter(s(e.objClass()))}}]),c(e,[{key:"newWidgetWithDefaults",value:function(){return this._classData.usesServerCallbacks?h.newWidget(this.name):scrivito.Promise.resolve(new v.default({_objClass:[this.name]}))}},{key:"embeddingAttribute",value:function(){if(this.embeds)return this.attribute(this._embeddingAttribute)}},{key:"isValidContainerClass",value:function(t){return!this._classData.validContainerClasses||g.default.contains(this._classData.validContainerClasses,t)}},{key:"hasJsDetailsView",value:function(){return this.localizedAttributes().length>0}}]),e}(b.default);e.default=C},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(0),s=n(26),u=r(s),c=n(31),l=r(c),f=function(){function t(e){i(this,t),this.name=e.name,this.type=e.type,this._values=e.values,this._valuesLocalization=e.valuesLocalization,this._attributeData=e}return o(t,null,[{key:"isSystemAttribute",value:function(t){return"_"===t[0]}}]),o(t,[{key:"title",value:function(){return this._attributeData.title}},{key:"description",value:function(){return this._attributeData.description}},{key:"typeInfo",value:function(){return"enum"===this.type||"multienum"===this.type?[this.type,{values:this._values,valuesLocalization:this._valuesLocalization}]:[this.type,{}]}},{key:"values",value:function(){return this._assertValidTypes(["enum","multienum"],"Only enum and multienum attributes can have valid values"),this._values||[]}},{key:"validClasses",value:function(){this._assertValidTypes(["reference","referencelist"],"Only reference and referencelist attributes can have valid classes");var t=this._attributeData.validClasses;if(t)return(0,a.map)(t,function(t){return u.default.find(t)})}},{key:"only",value:function(){this._assertValidTypes(["widgetlist"],"Only widgetlist attributes have only()");var t=this._attributeData.only;if(t){var e=(0,a.isArray)(t)?t:[t];return(0,a.compact)((0,a.map)(e,function(t){return l.default.find(t)}))}}},{key:"_assertValidTypes",value:function(t,e){(0,a.include)(t,this.type)||$.error(e)}}]),t}();e.default=f},function(t,e){t.exports=function(t){return null===t||void 0===t}},function(t,e,n){"use strict";function r(t){return v.default.isString(t)?t.match(/^-?\d+$/)?d(t):null:d(t)}function i(t){return f(t)&&g<=t&&t<=y}function o(t){return v.default.isNumber(t)&&v.default.isFinite(t)}function a(t){if(!v.default.isString(t))return null;if(!c(t))throw new m.InternalError('The value is not a valid ISO date time: "'+t+'"');return s(t)}function s(t){if(t){var e=t.match(b),n=h(e,7),r=(n[0],n[1]),i=n[2],o=n[3],a=n[4],s=n[5],u=n[6];return new Date(Date.UTC(r,i-1,o,a,s,u))}}function u(t){return""+t.getUTCFullYear()+l(t.getUTCMonth()+1)+l(t.getUTCDate())+l(t.getUTCHours())+l(t.getUTCMinutes())+l(t.getUTCSeconds())}function c(t){return v.default.isString(t)&&t.match(/^\d{14}$/)}function l(t){return t<10?"0"+t:t}function f(t){return v.default.isNumber(t)&&v.default.isFinite(t)&&Math.floor(t)===t}function d(t){var e=parseInt(t,10);return 0===e?0:i(e)?e:null}Object.defineProperty(e,"__esModule",{value:!0});var h=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.deserializeAsInteger=r,e.isValidInteger=i,e.isValidFloat=o,e.deserializeAsDate=a,e.parseStringToDate=s,e.formatDateToString=u,e.isValidDateString=c;var p=n(0),v=function(t){return t&&t.__esModule?t:{default:t}}(p),m=n(1),g=-9007199254740991,y=9007199254740991,b=/^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/},,,function(t,e,n){"use strict";function r(){return o||window.Scrivito}function i(t){o=t}Object.defineProperty(e,"__esModule",{value:!0});var o=void 0;e.getWindowContext=r,e.setWindowContext=i},function(t,e,n){var r=n(33),i=n(39);t.exports=function(t){return!r(t)&&"object"==typeof t&&!i(t)}},function(t,e){t.exports=function(t){return Array.isArray?Array.isArray(t):t instanceof Array}},function(t,e,n){var r=(n(7),n(192),n(19));n(16);t.exports=function(t){return!r(t)||t.meta.identity}},function(t,e,n){var r=n(19);n(62),n(7),n(191);t.exports=function(t,e,n){return r(t)?t.meta.identity||"object"!=typeof e||null===e?t(e,n):new t(e,n):e}},function(t,e,n){var r=n(19);t.exports=function(t,e){return r(e)?e.is(t):t instanceof e}},,function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},,function(t,e,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(t){window.location=t}function a(){return window.history}function s(){return window.onpopstate}function u(t){window.onpopstate=t}function c(){return window.screen}function l(){return document}Object.defineProperty(e,"__esModule",{value:!0}),e.devicePixelRatio=r,e.history=a,e.location=i,e.onpopstate=s,e.redirectTo=o,e.screen=c,e.setOnpopstate=u,e.getDocument=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){if(!u.isBlob(t.source))throw new f.ArgumentError("Expected a Blob or File as the source.");if(t.contentType||(t.contentType=t.source.type),!t.filename){if(!u.isFile(t.source))throw new f.ArgumentError("Expected a filename to be passed with Blob as the source.");t.filename=t.source.name}}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(72),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),c=n(0),l=r(c),f=n(1),d=n(30),h=r(d),p=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),e.idToCopy?this.idToCopy=e.idToCopy:(o(e),this.source=e.source),e.filename&&(this.filename=e.filename.replace(/[^\w\-_\.$]/g,"-")),this.contentType=e.contentType}return a(t,[{key:"into",value:function(t){var e=void 0;e=l.default.isString(t)?t:t.id();var n=void 0;return n=this.idToCopy?scrivito.BinaryRequest.copy(this.idToCopy,e,this.filename,this.contentType):scrivito.BinaryRequest.upload(e,this.source,this.filename,this.contentType),n.then(function(t){var e=t.id;return new h.default(e,!1)})}}]),t}();e.default=p},function(t,e,n){"use strict";function r(){return o}function i(t){o=t}Object.defineProperty(e,"__esModule",{value:!0});var o=void 0;e.useRailsEngine=r,e.initUseRailsEngine=i},function(t,e,n){var r,i,o;/*!
2
2
  * URI.js - Mutating URLs
3
3
  *
4
4
  * Version: 1.18.7
@@ -10,7 +10,30 @@
10
10
  * MIT License http://www.opensource.org/licenses/mit-license
11
11
  *
12
12
  */
13
- !function(a,u){"use strict";"object"==typeof t&&t.exports?t.exports=u(r(83),r(84),r(85)):(i=[r(83),r(84),r(85)],n=u,void 0!==(o="function"==typeof n?n.apply(e,i):n)&&(t.exports=o))}(0,function(t,e,r,n){"use strict";function i(t,e){var r=arguments.length>=1,n=arguments.length>=2;if(!(this instanceof i))return r?n?new i(t,e):new i(t):new i;if(void 0===t){if(r)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}if(null===t&&r)throw new TypeError("null is not a valid argument for URI");return this.href(t),void 0!==e?this.absoluteTo(e):this}function o(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function a(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function u(t){return"Array"===a(t)}function s(t,e){var r,n,i={};if("RegExp"===a(e))i=null;else if(u(e))for(r=0,n=e.length;r<n;r++)i[e[r]]=!0;else i[e]=!0;for(r=0,n=t.length;r<n;r++){(i&&void 0!==i[t[r]]||!i&&e.test(t[r]))&&(t.splice(r,1),n--,r--)}return t}function c(t,e){var r,n;if(u(e)){for(r=0,n=e.length;r<n;r++)if(!c(t,e[r]))return!1;return!0}var i=a(e);for(r=0,n=t.length;r<n;r++)if("RegExp"===i){if("string"==typeof t[r]&&t[r].match(e))return!0}else if(t[r]===e)return!0;return!1}function l(t,e){if(!u(t)||!u(e))return!1;if(t.length!==e.length)return!1;t.sort(),e.sort();for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0}function f(t){var e=/^\/+|\/+$/g;return t.replace(e,"")}function d(t){return escape(t)}function p(t){return encodeURIComponent(t).replace(/[!'()*]/g,d).replace(/\*/g,"%2A")}function h(t){return function(e,r){return void 0===e?this._parts[t]||"":(this._parts[t]=e||null,this.build(!r),this)}}function v(t,e){return function(r,n){return void 0===r?this._parts[t]||"":(null!==r&&(r+="",r.charAt(0)===e&&(r=r.substring(1))),this._parts[t]=r,this.build(!n),this)}}var y=n&&n.URI;i.version="1.18.7";var _=i.prototype,g=Object.prototype.hasOwnProperty;i._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,duplicateQueryParameters:i.duplicateQueryParameters,escapeQuerySpace:i.escapeQuerySpace}},i.duplicateQueryParameters=!1,i.escapeQuerySpace=!0,i.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,i.idn_expression=/[^a-z0-9\.-]/i,i.punycode_expression=/(xn--)/i,i.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,i.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.invalid_hostname_characters=/[^a-zA-Z0-9\.-]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return i.domAttributes[e]}},i.encode=p,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=p,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(t,e){var r=i.encode(t+"");return void 0===e&&(e=i.escapeQuerySpace),e?r.replace(/%20/g,"+"):r},i.decodeQuery=function(t,e){t+="",void 0===e&&(e=i.escapeQuerySpace);try{return i.decode(e?t.replace(/\+/g,"%20"):t)}catch(e){return t}};var m,b={encode:"encode",decode:"decode"},w=function(t,e){return function(r){try{return i[e](r+"").replace(i.characters[t][e].expression,function(r){return i.characters[t][e].map[r]})}catch(t){return r}}};for(m in b)i[m+"PathSegment"]=w("pathname",b[m]),i[m+"UrnPathSegment"]=w("urnpath",b[m]);var k=function(t,e,r){return function(n){var o;o=r?function(t){return i[e](i[r](t))}:i[e];for(var a=(n+"").split(t),u=0,s=a.length;u<s;u++)a[u]=o(a[u]);return a.join(t)}};i.decodePath=k("/","decodePathSegment"),i.decodeUrnPath=k(":","decodeUrnPathSegment"),i.recodePath=k("/","encodePathSegment","decode"),i.recodeUrnPath=k(":","encodeUrnPathSegment","decode"),i.encodeReserved=w("reserved","encode"),i.parse=function(t,e){var r;return e||(e={}),r=t.indexOf("#"),r>-1&&(e.fragment=t.substring(r+1)||null,t=t.substring(0,r)),r=t.indexOf("?"),r>-1&&(e.query=t.substring(r+1)||null,t=t.substring(0,r)),"//"===t.substring(0,2)?(e.protocol=null,t=t.substring(2),t=i.parseAuthority(t,e)):(r=t.indexOf(":"))>-1&&(e.protocol=t.substring(0,r)||null,e.protocol&&!e.protocol.match(i.protocol_expression)?e.protocol=void 0:"//"===t.substring(r+1,r+3)?(t=t.substring(r+3),t=i.parseAuthority(t,e)):(t=t.substring(r+1),e.urn=!0)),e.path=t,e},i.parseHost=function(t,e){t=t.replace(/\\/g,"/");var r,n,i=t.indexOf("/");if(-1===i&&(i=t.length),"["===t.charAt(0))r=t.indexOf("]"),e.hostname=t.substring(1,r)||null,e.port=t.substring(r+2,i)||null,"/"===e.port&&(e.port=null);else{var o=t.indexOf(":"),a=t.indexOf("/"),u=t.indexOf(":",o+1);-1!==u&&(-1===a||u<a)?(e.hostname=t.substring(0,i)||null,e.port=null):(n=t.substring(0,i).split(":"),e.hostname=n[0]||null,e.port=n[1]||null)}return e.hostname&&"/"!==t.substring(i).charAt(0)&&(i++,t="/"+t),t.substring(i)||"/"},i.parseAuthority=function(t,e){return t=i.parseUserinfo(t,e),i.parseHost(t,e)},i.parseUserinfo=function(t,e){var r,n=t.indexOf("/"),o=t.lastIndexOf("@",n>-1?n:t.length-1);return o>-1&&(-1===n||o<n)?(r=t.substring(0,o).split(":"),e.username=r[0]?i.decode(r[0]):null,r.shift(),e.password=r[0]?i.decode(r.join(":")):null,t=t.substring(o+1)):(e.username=null,e.password=null),t},i.parseQuery=function(t,e){if(!t)return{};if(!(t=t.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var r,n,o,a={},u=t.split("&"),s=u.length,c=0;c<s;c++)r=u[c].split("="),n=i.decodeQuery(r.shift(),e),o=r.length?i.decodeQuery(r.join("="),e):null,g.call(a,n)?("string"!=typeof a[n]&&null!==a[n]||(a[n]=[a[n]]),a[n].push(o)):a[n]=o;return a},i.build=function(t){var e="";return t.protocol&&(e+=t.protocol+":"),t.urn||!e&&!t.hostname||(e+="//"),e+=i.buildAuthority(t)||"","string"==typeof t.path&&("/"!==t.path.charAt(0)&&"string"==typeof t.hostname&&(e+="/"),e+=t.path),"string"==typeof t.query&&t.query&&(e+="?"+t.query),"string"==typeof t.fragment&&t.fragment&&(e+="#"+t.fragment),e},i.buildHost=function(t){var e="";return t.hostname?(i.ip6_expression.test(t.hostname)?e+="["+t.hostname+"]":e+=t.hostname,t.port&&(e+=":"+t.port),e):""},i.buildAuthority=function(t){return i.buildUserinfo(t)+i.buildHost(t)},i.buildUserinfo=function(t){var e="";return t.username&&(e+=i.encode(t.username)),t.password&&(e+=":"+i.encode(t.password)),e&&(e+="@"),e},i.buildQuery=function(t,e,r){var n,o,a,s,c="";for(o in t)if(g.call(t,o)&&o)if(u(t[o]))for(n={},a=0,s=t[o].length;a<s;a++)void 0!==t[o][a]&&void 0===n[t[o][a]+""]&&(c+="&"+i.buildQueryParameter(o,t[o][a],r),!0!==e&&(n[t[o][a]+""]=!0));else void 0!==t[o]&&(c+="&"+i.buildQueryParameter(o,t[o],r));return c.substring(1)},i.buildQueryParameter=function(t,e,r){return i.encodeQuery(t,r)+(null!==e?"="+i.encodeQuery(e,r):"")},i.addQuery=function(t,e,r){if("object"==typeof e)for(var n in e)g.call(e,n)&&i.addQuery(t,n,e[n]);else{if("string"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===t[e])return void(t[e]=r);"string"==typeof t[e]&&(t[e]=[t[e]]),u(r)||(r=[r]),t[e]=(t[e]||[]).concat(r)}},i.removeQuery=function(t,e,r){var n,o,c;if(u(e))for(n=0,o=e.length;n<o;n++)t[e[n]]=void 0;else if("RegExp"===a(e))for(c in t)e.test(c)&&(t[c]=void 0);else if("object"==typeof e)for(c in e)g.call(e,c)&&i.removeQuery(t,c,e[c]);else{if("string"!=typeof e)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==r?"RegExp"===a(r)?!u(t[e])&&r.test(t[e])?t[e]=void 0:t[e]=s(t[e],r):t[e]!==String(r)||u(r)&&1!==r.length?u(t[e])&&(t[e]=s(t[e],r)):t[e]=void 0:t[e]=void 0}},i.hasQuery=function(t,e,r,n){switch(a(e)){case"String":break;case"RegExp":for(var o in t)if(g.call(t,o)&&e.test(o)&&(void 0===r||i.hasQuery(t,o,r)))return!0;return!1;case"Object":for(var s in e)if(g.call(e,s)&&!i.hasQuery(t,s,e[s]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(a(r)){case"Undefined":return e in t;case"Boolean":return r===Boolean(u(t[e])?t[e].length:t[e]);case"Function":return!!r(t[e],e,t);case"Array":if(!u(t[e]))return!1;return(n?c:l)(t[e],r);case"RegExp":return u(t[e])?!!n&&c(t[e],r):Boolean(t[e]&&t[e].match(r));case"Number":r=String(r);case"String":return u(t[e])?!!n&&c(t[e],r):t[e]===r;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},i.joinPaths=function(){for(var t=[],e=[],r=0,n=0;n<arguments.length;n++){var o=new i(arguments[n]);t.push(o);for(var a=o.segment(),u=0;u<a.length;u++)"string"==typeof a[u]&&e.push(a[u]),a[u]&&r++}if(!e.length||!r)return new i("");var s=new i("").segment(e);return""!==t[0].path()&&"/"!==t[0].path().slice(0,1)||s.path("/"+s.path()),s.normalize()},i.commonPath=function(t,e){var r,n=Math.min(t.length,e.length);for(r=0;r<n;r++)if(t.charAt(r)!==e.charAt(r)){r--;break}return r<1?t.charAt(0)===e.charAt(0)&&"/"===t.charAt(0)?"/":"":("/"===t.charAt(r)&&"/"===e.charAt(r)||(r=t.substring(0,r).lastIndexOf("/")),t.substring(0,r+1))},i.withinString=function(t,e,r){r||(r={});var n=r.start||i.findUri.start,o=r.end||i.findUri.end,a=r.trim||i.findUri.trim,u=r.parens||i.findUri.parens,s=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var c=n.exec(t);if(!c)break;var l=c.index;if(r.ignoreHtml){var f=t.slice(Math.max(l-3,0),l);if(f&&s.test(f))continue}for(var d=l+t.slice(l).search(o),p=t.slice(l,d),h=-1;;){var v=u.exec(p);if(!v)break;var y=v.index+v[0].length;h=Math.max(h,y)}if(p=h>-1?p.slice(0,h)+p.slice(h).replace(a,""):p.replace(a,""),!(p.length<=c[0].length||r.ignore&&r.ignore.test(p))){d=l+p.length;var _=e(p,l,d,t);void 0!==_?(_=String(_),t=t.slice(0,l)+_+t.slice(d),n.lastIndex=l+_.length):n.lastIndex=d}}return n.lastIndex=0,t},i.ensureValidHostname=function(e){if(e.match(i.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-] and Punycode.js is not available');if(t.toASCII(e).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]')}},i.noConflict=function(t){if(t){var e={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(e.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(e.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=n.SecondLevelDomains.noConflict()),e}return n.URI===this&&(n.URI=y),this},_.build=function(t){return!0===t?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},_.clone=function(){return new i(this)},_.valueOf=_.toString=function(){return this.build(!1)._string},_.protocol=h("protocol"),_.username=h("username"),_.password=h("password"),_.hostname=h("hostname"),_.port=h("port"),_.query=v("query","?"),_.fragment=v("fragment","#"),_.search=function(t,e){var r=this.query(t,e);return"string"==typeof r&&r.length?"?"+r:r},_.hash=function(t,e){var r=this.fragment(t,e);return"string"==typeof r&&r.length?"#"+r:r},_.pathname=function(t,e){if(void 0===t||!0===t){var r=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?i.decodeUrnPath:i.decodePath)(r):r}return this._parts.urn?this._parts.path=t?i.recodeUrnPath(t):"":this._parts.path=t?i.recodePath(t):"/",this.build(!e),this},_.path=_.pathname,_.href=function(t,e){var r;if(void 0===t)return this.toString();this._string="",this._parts=i._parts();var n=t instanceof i,o="object"==typeof t&&(t.hostname||t.path||t.pathname);if(t.nodeName){t=t[i.getDomAttribute(t)]||"",o=!1}if(!n&&o&&void 0!==t.pathname&&(t=t.toString()),"string"==typeof t||t instanceof String)this._parts=i.parse(String(t),this._parts);else{if(!n&&!o)throw new TypeError("invalid input");var a=n?t._parts:t;for(r in a)g.call(this._parts,r)&&(this._parts[r]=a[r])}return this.build(!e),this},_.is=function(t){var e=!1,n=!1,o=!1,a=!1,u=!1,s=!1,c=!1,l=!this._parts.urn;switch(this._parts.hostname&&(l=!1,n=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),e=n||o,a=!e,u=a&&r&&r.has(this._parts.hostname),s=a&&i.idn_expression.test(this._parts.hostname),c=a&&i.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return l;case"absolute":return!l;case"domain":case"name":return a;case"sld":return u;case"ip":return e;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return o;case"idn":return s;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var j=_.protocol,O=_.port,C=_.hostname;_.protocol=function(t,e){if(void 0!==t&&t&&(t=t.replace(/:(\/\/)?$/,""),!t.match(i.protocol_expression)))throw new TypeError('Protocol "'+t+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return j.call(this,t,e)},_.scheme=_.protocol,_.port=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t&&(0===t&&(t=null),t&&(t+="",":"===t.charAt(0)&&(t=t.substring(1)),t.match(/[^0-9]/))))throw new TypeError('Port "'+t+'" contains characters other than [0-9]');return O.call(this,t,e)},_.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var r={};if("/"!==i.parseHost(t,r))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');t=r.hostname}return C.call(this,t,e)},_.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=i(t);return this.protocol(n.protocol()).authority(n.authority()).build(!e),this},_.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},_.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},_.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var r=i.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==t[t.length-1]&&(t+="@"),i.parseUserinfo(t,this._parts),this.build(!e),this},_.resource=function(t,e){var r;return void 0===t?this.path()+this.search()+this.hash():(r=i.parse(t),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!e),this)},_.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,a=this._parts.hostname.substring(0,n),u=new RegExp("^"+o(a));return t&&"."!==t.charAt(t.length-1)&&(t+="."),t&&i.ensureValidHostname(t),this._parts.hostname=this._parts.hostname.replace(u,t),this.build(!e),this},_.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(e).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!t)throw new TypeError("cannot set domain empty");if(i.ensureValidHostname(t),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var a=new RegExp(o(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(a,t)}return this.build(!e),this},_.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(n+1);return!0!==e&&r&&r.list[i.toLowerCase()]?r.get(this._parts.hostname)||i:i}var a;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(t))throw new TypeError('TLD "'+t+'" contains characters other than [A-Z0-9]');a=new RegExp(o(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(a,t)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");a=new RegExp(o(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(a,t)}return this.build(!e),this},_.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return t?i.decodePath(n):n}var a=this._parts.path.length-this.filename().length,u=this._parts.path.substring(0,a),s=new RegExp("^"+o(u));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=i.recodePath(t),this._parts.path=this._parts.path.replace(s,t),this.build(!e),this},_.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("string"!=typeof t){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return t?i.decodePathSegment(n):n}var a=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\.?\//)&&(a=!0);var u=new RegExp(o(this.filename())+"$");return t=i.recodePath(t),this._parts.path=this._parts.path.replace(u,t),a?this.normalizePath(e):this.build(!e),this},_.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,a=this.filename(),u=a.lastIndexOf(".");return-1===u?"":(r=a.substring(u+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",t?i.decodePathSegment(n):n)}"."===t.charAt(0)&&(t=t.substring(1));var s,c=this.suffix();if(c)s=t?new RegExp(o(c)+"$"):new RegExp(o("."+c)+"$");else{if(!t)return this;this._parts.path+="."+i.recodePath(t)}return s&&(t=i.recodePath(t),this._parts.path=this._parts.path.replace(s,t)),this.build(!e),this},_.segment=function(t,e,r){var n=this._parts.urn?":":"/",i=this.path(),o="/"===i.substring(0,1),a=i.split(n);if(void 0!==t&&"number"!=typeof t&&(r=e,e=t,t=void 0),void 0!==t&&"number"!=typeof t)throw new Error('Bad segment "'+t+'", must be 0-based integer');if(o&&a.shift(),t<0&&(t=Math.max(a.length+t,0)),void 0===e)return void 0===t?a:a[t];if(null===t||void 0===a[t])if(u(e)){a=[];for(var s=0,c=e.length;s<c;s++)(e[s].length||a.length&&a[a.length-1].length)&&(a.length&&!a[a.length-1].length&&a.pop(),a.push(f(e[s])))}else(e||"string"==typeof e)&&(e=f(e),""===a[a.length-1]?a[a.length-1]=e:a.push(e));else e?a[t]=f(e):a.splice(t,1);return o&&a.unshift(""),this.path(a.join(n),r)},_.segmentCoded=function(t,e,r){var n,o,a;if("number"!=typeof t&&(r=e,e=t,t=void 0),void 0===e){if(n=this.segment(t,e,r),u(n))for(o=0,a=n.length;o<a;o++)n[o]=i.decode(n[o]);else n=void 0!==n?i.decode(n):void 0;return n}if(u(e))for(o=0,a=e.length;o<a;o++)e[o]=i.encode(e[o]);else e="string"==typeof e||e instanceof String?i.encode(e):e;return this.segment(t,e,r)};var P=_.query;return _.query=function(t,e){if(!0===t)return i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof t){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=t.call(this,r);return this._parts.query=i.buildQuery(n||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this}return void 0!==t&&"string"!=typeof t?(this._parts.query=i.buildQuery(t,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this):P.call(this,t,e)},_.setQuery=function(t,e,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof t||t instanceof String)n[t]=void 0!==e?e:null;else{if("object"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var o in t)g.call(t,o)&&(n[o]=t[o])}return this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this},_.addQuery=function(t,e,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.addQuery(n,t,void 0===e?null:e),this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this},_.removeQuery=function(t,e,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.removeQuery(n,t,e),this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this},_.hasQuery=function(t,e,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.hasQuery(n,t,e,r)},_.setSearch=_.setQuery,_.addSearch=_.addQuery,_.removeSearch=_.removeQuery,_.hasSearch=_.hasQuery,_.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},_.normalizeProtocol=function(t){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!t)),this},_.normalizeHostname=function(r){return this._parts.hostname&&(this.is("IDN")&&t?this._parts.hostname=t.toASCII(this._parts.hostname):this.is("IPv6")&&e&&(this._parts.hostname=e.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!r)),this},_.normalizePort=function(t){return"string"==typeof this._parts.protocol&&this._parts.port===i.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!t)),this},_.normalizePath=function(t){var e=this._parts.path;if(!e)return this;if(this._parts.urn)return this._parts.path=i.recodeUrnPath(this._parts.path),this.build(!t),this;if("/"===this._parts.path)return this;e=i.recodePath(e);var r,n,o,a="";for("/"!==e.charAt(0)&&(r=!0,e="/"+e),"/.."!==e.slice(-3)&&"/."!==e.slice(-2)||(e+="/"),e=e.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),r&&(a=e.substring(1).match(/^(\.\.\/)+/)||"")&&(a=a[0]);;){if(-1===(n=e.search(/\/\.\.(\/|$)/)))break;0!==n?(o=e.substring(0,n).lastIndexOf("/"),-1===o&&(o=n),e=e.substring(0,o)+e.substring(n+3)):e=e.substring(3)}return r&&this.is("relative")&&(e=a+e.substring(1)),this._parts.path=e,this.build(!t),this},_.normalizePathname=_.normalizePath,_.normalizeQuery=function(t){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(i.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!t)),this},_.normalizeFragment=function(t){return this._parts.fragment||(this._parts.fragment=null,this.build(!t)),this},_.normalizeSearch=_.normalizeQuery,_.normalizeHash=_.normalizeFragment,_.iso8859=function(){var t=i.encode,e=i.decode;i.encode=escape,i.decode=decodeURIComponent;try{this.normalize()}finally{i.encode=t,i.decode=e}return this},_.unicode=function(){var t=i.encode,e=i.decode;i.encode=p,i.decode=unescape;try{this.normalize()}finally{i.encode=t,i.decode=e}return this},_.readable=function(){var e=this.clone();e.username("").password("").normalize();var r="";if(e._parts.protocol&&(r+=e._parts.protocol+"://"),e._parts.hostname&&(e.is("punycode")&&t?(r+=t.toUnicode(e._parts.hostname),e._parts.port&&(r+=":"+e._parts.port)):r+=e.host()),e._parts.hostname&&e._parts.path&&"/"!==e._parts.path.charAt(0)&&(r+="/"),r+=e.path(!0),e._parts.query){for(var n="",o=0,a=e._parts.query.split("&"),u=a.length;o<u;o++){var s=(a[o]||"").split("=");n+="&"+i.decodeQuery(s[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==s[1]&&(n+="="+i.decodeQuery(s[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}r+="?"+n.substring(1)}return r+=i.decodeQuery(e.hash(),!0)},_.absoluteTo=function(t){var e,r,n,o=this.clone(),a=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t instanceof i||(t=new i(t)),o._parts.protocol||(o._parts.protocol=t._parts.protocol),this._parts.hostname)return o;for(r=0;n=a[r];r++)o._parts[n]=t._parts[n];return o._parts.path?(".."===o._parts.path.substring(-2)&&(o._parts.path+="/"),"/"!==o.path().charAt(0)&&(e=t.directory(),e=e||(0===t.path().indexOf("/")?"/":""),o._parts.path=(e?e+"/":"")+o._parts.path,o.normalizePath())):(o._parts.path=t._parts.path,o._parts.query||(o._parts.query=t._parts.query)),o.build(),o},_.relativeTo=function(t){var e,r,n,o,a,u=this.clone().normalize();if(u._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t=new i(t).normalize(),e=u._parts,r=t._parts,o=u.path(),a=t.path(),"/"!==o.charAt(0))throw new Error("URI is already relative");if("/"!==a.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(e.protocol===r.protocol&&(e.protocol=null),e.username!==r.username||e.password!==r.password)return u.build();if(null!==e.protocol||null!==e.username||null!==e.password)return u.build();if(e.hostname!==r.hostname||e.port!==r.port)return u.build();if(e.hostname=null,e.port=null,o===a)return e.path="",u.build();if(!(n=i.commonPath(o,a)))return u.build();var s=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return e.path=s+e.path.substring(n.length)||"./",u.build()},_.equals=function(t){var e,r,n,o=this.clone(),a=new i(t),s={},c={},f={};if(o.normalize(),a.normalize(),o.toString()===a.toString())return!0;if(e=o.query(),r=a.query(),o.query(""),a.query(""),o.toString()!==a.toString())return!1;if(e.length!==r.length)return!1;s=i.parseQuery(e,this._parts.escapeQuerySpace),c=i.parseQuery(r,this._parts.escapeQuerySpace);for(n in s)if(g.call(s,n)){if(u(s[n])){if(!l(s[n],c[n]))return!1}else if(s[n]!==c[n])return!1;f[n]=!0}for(n in c)if(g.call(c,n)&&!f[n])return!1;return!0},_.duplicateQueryParameters=function(t){return this._parts.duplicateQueryParameters=!!t,this},_.escapeQuerySpace=function(t){return this._parts.escapeQuerySpace=!!t,this},i})},,function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t){(0,y.default)(function(){return c(t)})}function o(t){var e=d(t);return e.set(null),scrivito.ObjReplication.get(t).notifyBackendState(null),e}function a(t){var e=t._id;d(e).isAvailable()||u(e,t),scrivito.ObjReplication.get(e).notifyBackendState(t)}function u(t,e){d(t).set(e)}function s(t,e){d(t).setError(e)}function c(t){var e=d(t);if(void 0!==e.current)return e}function l(){f().clear()}function f(){return _.cmsState.subState("objData")}function d(t){return new h.default(t,f().subState(t))}Object.defineProperty(e,"__esModule",{value:!0}),e.preload=i,e.createObjData=o,e.store=a,e.set=u,e.setError=s,e.get=c,e.clearCache=l;var p=r(162),h=n(p),v=r(13),y=n(v),_=r(4)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(){var t=l(),e=t.objId;if((0,O.isNull)(e))return e;if(e)try{return scrivito.loadWithDefault(void 0,function(){var t=(0,F.getWindowContext)().appModelAccessor,r=(0,F.getWindowContext)().Obj,n=t.getObj(r,e);if(n)return n;throw new S.ResourceNotFoundError('Obj with id "'+e+'" not found.')})}catch(t){return void scrivito.nextTick(function(){return h(R,t)})}}function o(){return l().queryParameters||{}}function a(){return l().error}function u(t){s(t,function(t){var e=t.obj,r=t.queryParameters,n=t.hash;e&&scrivito.BrowserLocation.replaceWith({obj:e,queryParameters:r,hash:n})})}function s(t,e){if(!(0,O.isFunction)(t))throw new S.ArgumentError("Parameter fn needs to be a function.");var r=d();(0,T.default)(t).then(function(t){return(0,T.default)(function(){return _(t.obj,t.queryParameters,t.hash)})}).then(function(t){var n=t.obj,i=t.url,o=t.queryParameters,a=t.hash;e({obj:n,queryParameters:o,hash:a}),i?p(r,function(){return scrivito.changeLocation(i)}):p(r,function(){return v({obj:n,queryParameters:o,hash:a})})}).catch(function(t){t instanceof S.NavigateToEmptyBinaryError||h(r,t)})}function c(){return M.appState.subState("currentPage")}function l(){return c().get()||{}}function f(t){c().set(t)}function d(){return R+=1}function p(t,e){R===t&&e()}function h(t,e){p(t,function(){scrivito.logError(e),f({objId:null,error:e}),y(null)})}function v(t){var e=t.obj,r=t.queryParameters,n=t.hash,i=e&&e.id()||null;f({objId:i,queryParameters:r,hash:n}),y(i)}function y(t){scrivito.uiAdapter&&scrivito.uiAdapter.setCurrentPageId(t)}function _(t,e,r){return b(t),null===t?{}:t instanceof j.default?g(t,e,r):t instanceof A.default?m(t,e,r):void 0}function g(t,e,r){if(w(t)){var n=t.get("blob",["binary"]);if(!n)throw new S.NavigateToEmptyBinaryError;return{url:n.url()}}return{obj:t,queryParameters:e,hash:r}}function m(t,e,r){if(t.isExternal())return{url:t.url()};var n={obj:t.obj(),queryParameters:t.queryParameters(),hash:t.hash()};return e&&!(0,O.isEmpty)(e)&&(n.queryParameters=e),r&&(n.hash=r),_(n.obj,n.queryParameters,n.hash)}function b(t){if(!(0,O.isNull)(t)&&!(t instanceof j.default||t instanceof A.default)){if(!t)throw new S.ArgumentError("Missing target.");throw new S.ArgumentError("Target is invalid. Valid targets are instances of Obj or Link.")}}function w(t){var e=(0,F.getWindowContext)().getClass(t.objClass());return!!e&&P.default.forClass(e).isBinary()}Object.defineProperty(e,"__esModule",{value:!0}),e.setCurrentPage=e.replaceCurrentPage=e.currentPageError=e.currentPageParams=e.currentPage=void 0;var k=r(3),j=n(k),O=r(0),C=r(23),P=n(C),E=r(24),A=n(E),S=r(1),x=r(13),T=n(x),F=r(37),M=r(4),R=0;e.currentPage=i,e.currentPageParams=o,e.currentPageError=a,e.replaceCurrentPage=u,e.setCurrentPage=s},,function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===r||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function o(t){if(f===clearTimeout)return clearTimeout(t);if((f===n||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){v&&p&&(v=!1,p.length?h=p.concat(h):y=-1,h.length&&u())}function u(){if(!v){var t=i(a);v=!0;for(var e=h.length;e;){for(p=h,h=[];++y<e;)p&&p[y].run();y=-1,e=h.length}p=null,v=!1,o(t)}}function s(t,e){this.fun=t,this.array=e}function c(){}var l,f,d=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:r}catch(t){l=r}try{f="function"==typeof clearTimeout?clearTimeout:n}catch(t){f=n}}();var p,h=[],v=!1,y=-1;d.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];h.push(new s(t,e)),1!==h.length||v||i(u)},s.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=c,d.addListener=c,d.once=c,d.off=c,d.removeListener=c,d.removeAllListeners=c,d.emit=c,d.binding=function(t){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(t){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},,,function(t,e,r){"use strict";function n(){return(0,i.getWindowContext)()._privateRealm._registry}Object.defineProperty(e,"__esModule",{value:!0}),e.getWindowRegistry=void 0;var i=r(37);e.getWindowRegistry=n},,function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function o(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e,r){return{field:p(t),operator:d(e),value:l(r)}}function s(t){if(!(0,C.contains)(x,t))throw new E.ArgumentError('Boosting operator "'+t+'" is invalid.')}function c(t){if(!(0,C.contains)(S,t))throw new E.ArgumentError('Negating operator "'+t+'" is invalid.')}function l(t){return(0,C.isArray)(t)?(0,C.map)(t,f):f(t)}function f(t){return(0,C.isDate)(t)?b.formatDateToString(t):t instanceof g.default?t.id():t}function d(t){if(!(0,C.contains)(A,t))throw new E.ArgumentError('Operator "'+t+'" is invalid.');return(0,P.underscore)(t)}function p(t){return(0,C.isArray)(t)?(0,C.map)(t,v):v(t)}function h(t){var e={};return(0,C.each)(t,function(t,r){var n=v(r);e[n]=t}),e}function v(t){if(!(0,P.isCamelCase)(t))throw new E.ArgumentError('Attribute name "'+t+'" is not camel case.');return(0,P.underscore)(t)}Object.defineProperty(e,"__esModule",{value:!0});var y=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),_=r(3),g=i(_),m=r(34),b=n(m),w=r(91),k=n(w),j=r(167),O=i(j),C=r(0),P=r(15),E=r(1),A=["contains","containsPrefix","equals","startsWith","isGreaterThan","isLessThan","linksTo","refersTo"],S=["equals","startsWith","isGreaterThan","isLessThan"],x=["contains","containsPrefix"],T=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,t),this._query=e.query||[],this._batchSize=e.batchSize,this._offset=e.offset,this._sortBy=e.sortBy,this._sortDirection=e.sortDirection,this._includeDeleted=e.includeDeleted}return y(t,[{key:"and",value:function(e,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(e instanceof t)this._query=[].concat(o(this._query),o(e._query));else{var a=u(e,r,n);i&&(s(r),a.boost=h(i)),this._query.push(a)}return this}},{key:"andNot",value:function(t,e,r){var n=u(t,e,r);return c(e),n.negate=!0,this._query.push(n),this}},{key:"offset",value:function(t){return this._offset=t,this}},{key:"order",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";return this._sortBy=v(t),this._sortDirection=e,this}},{key:"batchSize",value:function(t){return this._batchSize=t,this}},{key:"includeDeleted",value:function(){return this._includeDeleted=!0,this}},{key:"iterator",value:function(){var t=k.get(this.params(),this.getBatchSize()).iterator();return{next:function(){var e=t.next(),r=e.done,n=e.value;return r?{done:r}:{done:r,value:new g.default(n)}}}}},{key:"getBatchSize",value:function(){return this._batchSize||100}},{key:"facet",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new O.default(v(t),e,this._query).result()}},{key:"store",value:function(t){k.store(this.params(),t)}},{key:"params",value:function(){return(0,C.omit)({query:this._query,offset:this._offset,sortBy:this._sortBy,sortDirection:this._sortDirection,includeDeleted:this._includeDeleted,batchSize:this._batchSize},C.isUndefined)}}]),t}();e.default=T},,function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),a=r(3),u=n(a),s=r(23),c=n(s),l=r(1),f=function(){function t(e){i(this,t),this._registry=e}return o(t,[{key:"getObj",value:function(t,e){var r=u.default.get(e);return this._checkObjClassAndWrapInAppClass(t,r)}},{key:"getObjIncludingDeleted",value:function(t,e){var r=u.default.getIncludingDeleted(e);return this._checkObjClassAndWrapInAppClass(t,r)}},{key:"read",value:function(t,e){var r=c.default.basicFieldFor(t,e);if(r){var n=r.get();return scrivito.wrapInAppClass(this._registry,n)}}},{key:"update",value:function(t,e){var r=this._registry.objClassNameFor(t.constructor);if(!r){var n=void 0;throw n=t.constructor===this._registry.defaultClassForObjs?"Obj":"Widget",new l.ArgumentError('Updating is not supported on the base class "'+n+'".')}if(e.constructor!==Object)throw new l.ArgumentError("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");var i=c.default.forInstance(t),o=scrivito.AttributeContentFactory.prepareAttributes(e,i,r);t._scrivitoPrivateContent.update(o)}},{key:"wrapInAppClass",value:function(t){return scrivito.wrapInAppClass(this._registry,t)}},{key:"_checkObjClassAndWrapInAppClass",value:function(t,e){var r=this._registry.objClassNameFor(t);if(r&&r!==e.objClass())throw new l.ResourceNotFoundError('Obj with id "'+e.id()+'" is not of type "'+r+'".');return this.wrapInAppClass(e)}}]),t}();e.default=f},function(t,e){t.exports=function(t){return t.displayName||t.name||"<function"+t.length+">"}},function(t,e,r){var n=r(7),i=r(16);t.exports=function(t,e){n(!(t instanceof e),function(){return"Cannot use the new operator to instantiate the type "+i(e)})}},function(t,e,r){"use strict";function n(t,e){l[t]=e}function i(t){return l[t]||null}function o(t,e){n(s(t),e)}function a(t){return i(s(t))}function u(){l={}}function s(t){return"_scrivitoAppClass-"+(0,c.getWindowRegistry)().objClassNameFor(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.reset=e.registerForId=e.registerForAppClass=e.getById=e.getByAppClass=void 0;var c=r(57),l={};e.getByAppClass=a,e.getById=i,e.registerForAppClass=o,e.registerForId=n,e.reset=u},function(t,e,r){"use strict";function n(){return!!scrivito.uiAdapter&&scrivito.uiAdapter.isEditingMode()}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n},function(t,e){t.exports=ReactDOM},,function(t,e,r){"use strict";function n(t,e){if(!t)return e;if(!e)return null;var r={};return o(t,e,function(n,i,o){"_widget_pool"===n?r._widget_pool=u(i,o):e.hasOwnProperty(n)?o&&(r[n]=o):r[n]=t[n]}),r}function i(t,e){if(!t)return e;if(!e)return null;var r={};return o(t,e,function(t,e,n){if("_widget_pool"===t){var i=c(e,n);d.default.isEmpty(i)||(r._widget_pool=i)}else{var o=s(e,n,function(){if(!d.default.isEqual(e,n))return n});void 0!==o&&(r[t]=o)}}),r}function o(t,e,r){d.default.union(d.default.keys(t),d.default.keys(e)).forEach(function(n){return r(n,a(t[n]),a(e[n]))})}function a(t){if(d.default.isArray(t)){var e=l(t,2),r=e[0],n=e[1];return"binary"===r&&n?[r,d.default.omit(n,"url")]:t}return t}function u(t,e){if(!e||d.default.isEmpty(e))return t;var r={};return o(t||{},e||{},function(t,i,o){e.hasOwnProperty(t)?o&&!i?r[t]=o:o&&(r[t]=n(i,o)):r[t]=i}),r}function s(t,e,r){return!t&&e?e:t&&!e?null:t&&e?r():void 0}function c(t,e){if(t===e)return{};var r={};return o(t,e,function(t,e,n){var o=s(e,n,function(){var t=i(e,n);if(!d.default.isEmpty(t))return t});void 0!==o&&(r[t]=o)}),r}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.apply=n,e.diff=i;var f=r(0),d=function(t){return t&&t.__esModule?t:{default:t}}(f)},,function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t){var e=t._obj_class,r=F.default.find(e),n=_.default.generateId();if(!r)return scrivito.Promise.reject(new P.ArgumentError('Please provide a valid CMS object class as the "_obj_class" property.'));var i=u(t),o=v(i,2),s=o[0],c=o[1],f=a(r,s),d=l(n,c);return scrivito.Promise.all([f,d]).then(function(t){var e=v(t,2),r=e[0],i=e[1];return _.default.createWithSerializedAttributes(C.default.extend(r,i,{_id:n}))}).then(function(t){return t.finishSaving().then(function(){return t})})}function o(t){return R.default.find(t).fetchDefaults().then(function(t){return w.default.newWithSerializedAttributes(t)})}function a(t,e){return t.usesServerCallbacks()?t.fetchDefaults(s(e),h()):scrivito.Promise.resolve(e)}function u(t){var e={},r={};return C.default.each(t,function(t,n){c(t)?r[n]=t:e[n]=t}),[e,r]}function s(t){return C.default.mapObject(t,function(t){return C.default.isDate(t)?moment.utc(t).toISOString():t})}function c(t){return m.isFile(t)||t instanceof x.default||t instanceof j.default}function l(t,e){var r=C.default.map(e,function(e,r){return m.isFile(e)?f(t,r,e):e instanceof j.default?d(t,r,e):e instanceof x.default?p(t,r,e):void 0});return scrivito.Promise.all(r).then(C.default.object)}function f(t,e,r){return p(t,e,A.default.upload(r))}function d(t,e,r){return p(t,e,r.copy())}function p(t,e,r){return r.into(t).then(function(t){return[e,["binary",{id:t.id()}]]})}function h(){if(scrivito.applicationDocument().hasCurrentPage())return{current_page_id:scrivito.applicationDocument().pageId()}}Object.defineProperty(e,"__esModule",{value:!0});var v=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.createObjFromLegacyAttributes=i,e.newWidget=o;var y=r(3),_=n(y),g=r(72),m=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(g),b=r(14),w=n(b),k=r(123),j=n(k),O=r(0),C=n(O),P=r(1),E=r(30),A=n(E),S=r(47),x=n(S),T=r(26),F=n(T),M=r(31),R=n(M)},function(t,e,r){"use strict";function n(t){return!!t&&a.default.isNumber(t.size)&&a.default.isString(t.type)}function i(t){return n(t)&&a.default.isString(t.name)}Object.defineProperty(e,"__esModule",{value:!0}),e.isBlob=n,e.isFile=i;var o=r(0),a=function(t){return t&&t.__esModule?t:{default:t}}(o)},function(t,e,r){"use strict";function n(t,e){for(var r=t.iterator(),n=[];n.length!==e;){var i=r.next();if(i.done)return n;n.push(i.value)}return n}function i(t){return t.iterator().next().value||null}Object.defineProperty(e,"__esModule",{value:!0}),e.arrayFromIterable=n,e.firstValueFromIterable=i},function(t,e,r){"use strict";function n(t,e){var r=t,n=void 0,a=void 0;(0,o.isFunction)(t)||(r=function(){return t},i(t)),e&&(n=e.params||{},a=e.hash,n=(0,o.extend)((0,o.omit)(e,"hash","params"),n));var u=function(){return{obj:scrivito.unwrapAppClassValues(r()),queryParameters:n,hash:a}},c=function(t){var e=t.obj,r=t.queryParameters,n=t.hash;e&&((0,l.default)(),scrivito.BrowserLocation.pushWith({obj:e,queryParameters:r,hash:n}))};(0,s.setCurrentPage)(u,c)}function i(t){if(!(0,o.isNull)(t)&&!(t instanceof(0,u.getWindowContext)().Obj||t instanceof(0,u.getWindowContext)().Link)){if(!t)throw new a.ArgumentError("Missing target.");throw new a.ArgumentError("Target is invalid. Valid targets are instances of Obj or Link.")}}Object.defineProperty(e,"__esModule",{value:!0});var o=r(0),a=r(1),u=r(37),s=r(52),c=r(262),l=function(t){return t&&t.__esModule?t:{default:t}}(c);e.default=n},function(t,e){t.exports=function(t){return"string"==typeof t}},function(t,e){t.exports=function(t){return!0===t||!1===t}},function(t,e,r){var n=r(22),i=r(18);t.exports=n("Function",i)},,,,,,function(t,e,r){(function(t,n){var i;!function(o){function a(t){throw new RangeError(F[t])}function u(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function s(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),t=t.replace(T,"."),n+u(t.split("."),e).join(".")}function c(t){for(var e,r,n=[],i=0,o=t.length;i<o;)e=t.charCodeAt(i++),e>=55296&&e<=56319&&i<o?(r=t.charCodeAt(i++),56320==(64512&r)?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--)):n.push(e);return n}function l(t){return u(t,function(t){var e="";return t>65535&&(t-=65536,e+=I(t>>>10&1023|55296),t=56320|1023&t),e+=I(t)}).join("")}function f(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:w}function d(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function p(t,e,r){var n=0;for(t=r?R(t/C):t>>1,t+=R(t/e);t>M*j>>1;n+=w)t=R(t/M);return R(n+(M+1)*t/(t+O))}function h(t){var e,r,n,i,o,u,s,c,d,h,v=[],y=t.length,_=0,g=E,m=P;for(r=t.lastIndexOf(A),r<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&a("not-basic"),v.push(t.charCodeAt(n));for(i=r>0?r+1:0;i<y;){for(o=_,u=1,s=w;i>=y&&a("invalid-input"),c=f(t.charCodeAt(i++)),(c>=w||c>R((b-_)/u))&&a("overflow"),_+=c*u,d=s<=m?k:s>=m+j?j:s-m,!(c<d);s+=w)h=w-d,u>R(b/h)&&a("overflow"),u*=h;e=v.length+1,m=p(_-o,e,0==o),R(_/e)>b-g&&a("overflow"),g+=R(_/e),_%=e,v.splice(_++,0,g)}return l(v)}function v(t){var e,r,n,i,o,u,s,l,f,h,v,y,_,g,m,O=[];for(t=c(t),y=t.length,e=E,r=0,o=P,u=0;u<y;++u)(v=t[u])<128&&O.push(I(v));for(n=i=O.length,i&&O.push(A);n<y;){for(s=b,u=0;u<y;++u)(v=t[u])>=e&&v<s&&(s=v);for(_=n+1,s-e>R((b-r)/_)&&a("overflow"),r+=(s-e)*_,e=s,u=0;u<y;++u)if(v=t[u],v<e&&++r>b&&a("overflow"),v==e){for(l=r,f=w;h=f<=o?k:f>=o+j?j:f-o,!(l<h);f+=w)m=l-h,g=w-h,O.push(I(d(h+m%g,0))),l=R(m/g);O.push(I(d(l,0))),o=p(r,_,n==i),r=0,++n}++r,++e}return O.join("")}function y(t){return s(t,function(t){return S.test(t)?h(t.slice(4).toLowerCase()):t})}function _(t){return s(t,function(t){return x.test(t)?"xn--"+v(t):t})}var g=("object"==typeof e&&e&&e.nodeType,"object"==typeof t&&t&&t.nodeType,"object"==typeof n&&n);var m,b=2147483647,w=36,k=1,j=26,O=38,C=700,P=72,E=128,A="-",S=/^xn--/,x=/[^\x20-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,F={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=w-k,R=Math.floor,I=String.fromCharCode;m={version:"1.3.2",ucs2:{decode:c,encode:l},decode:h,encode:v,toASCII:_,toUnicode:y},void 0!==(i=function(){return m}.call(e,r,e,t))&&(t.exports=i)}()}).call(e,r(70)(t),r(44))},function(t,e,r){var n,i;/*!
13
+ !function(a,s){"use strict";"object"==typeof t&&t.exports?t.exports=s(n(83),n(84),n(85)):(i=[n(83),n(84),n(85)],r=s,void 0!==(o="function"==typeof r?r.apply(e,i):r)&&(t.exports=o))}(0,function(t,e,n,r){"use strict";function i(t,e){var n=arguments.length>=1,r=arguments.length>=2;if(!(this instanceof i))return n?r?new i(t,e):new i(t):new i;if(void 0===t){if(n)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}if(null===t&&n)throw new TypeError("null is not a valid argument for URI");return this.href(t),void 0!==e?this.absoluteTo(e):this}function o(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function a(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function s(t){return"Array"===a(t)}function u(t,e){var n,r,i={};if("RegExp"===a(e))i=null;else if(s(e))for(n=0,r=e.length;n<r;n++)i[e[n]]=!0;else i[e]=!0;for(n=0,r=t.length;n<r;n++){(i&&void 0!==i[t[n]]||!i&&e.test(t[n]))&&(t.splice(n,1),r--,n--)}return t}function c(t,e){var n,r;if(s(e)){for(n=0,r=e.length;n<r;n++)if(!c(t,e[n]))return!1;return!0}var i=a(e);for(n=0,r=t.length;n<r;n++)if("RegExp"===i){if("string"==typeof t[n]&&t[n].match(e))return!0}else if(t[n]===e)return!0;return!1}function l(t,e){if(!s(t)||!s(e))return!1;if(t.length!==e.length)return!1;t.sort(),e.sort();for(var n=0,r=t.length;n<r;n++)if(t[n]!==e[n])return!1;return!0}function f(t){var e=/^\/+|\/+$/g;return t.replace(e,"")}function d(t){return escape(t)}function h(t){return encodeURIComponent(t).replace(/[!'()*]/g,d).replace(/\*/g,"%2A")}function p(t){return function(e,n){return void 0===e?this._parts[t]||"":(this._parts[t]=e||null,this.build(!n),this)}}function v(t,e){return function(n,r){return void 0===n?this._parts[t]||"":(null!==n&&(n+="",n.charAt(0)===e&&(n=n.substring(1))),this._parts[t]=n,this.build(!r),this)}}var m=r&&r.URI;i.version="1.18.7";var g=i.prototype,y=Object.prototype.hasOwnProperty;i._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,duplicateQueryParameters:i.duplicateQueryParameters,escapeQuerySpace:i.escapeQuerySpace}},i.duplicateQueryParameters=!1,i.escapeQuerySpace=!0,i.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,i.idn_expression=/[^a-z0-9\.-]/i,i.punycode_expression=/(xn--)/i,i.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,i.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.invalid_hostname_characters=/[^a-zA-Z0-9\.-]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return i.domAttributes[e]}},i.encode=h,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=h,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(t,e){var n=i.encode(t+"");return void 0===e&&(e=i.escapeQuerySpace),e?n.replace(/%20/g,"+"):n},i.decodeQuery=function(t,e){t+="",void 0===e&&(e=i.escapeQuerySpace);try{return i.decode(e?t.replace(/\+/g,"%20"):t)}catch(e){return t}};var b,_={encode:"encode",decode:"decode"},w=function(t,e){return function(n){try{return i[e](n+"").replace(i.characters[t][e].expression,function(n){return i.characters[t][e].map[n]})}catch(t){return n}}};for(b in _)i[b+"PathSegment"]=w("pathname",_[b]),i[b+"UrnPathSegment"]=w("urnpath",_[b]);var C=function(t,e,n){return function(r){var o;o=n?function(t){return i[e](i[n](t))}:i[e];for(var a=(r+"").split(t),s=0,u=a.length;s<u;s++)a[s]=o(a[s]);return a.join(t)}};i.decodePath=C("/","decodePathSegment"),i.decodeUrnPath=C(":","decodeUrnPathSegment"),i.recodePath=C("/","encodePathSegment","decode"),i.recodeUrnPath=C(":","encodeUrnPathSegment","decode"),i.encodeReserved=w("reserved","encode"),i.parse=function(t,e){var n;return e||(e={}),n=t.indexOf("#"),n>-1&&(e.fragment=t.substring(n+1)||null,t=t.substring(0,n)),n=t.indexOf("?"),n>-1&&(e.query=t.substring(n+1)||null,t=t.substring(0,n)),"//"===t.substring(0,2)?(e.protocol=null,t=t.substring(2),t=i.parseAuthority(t,e)):(n=t.indexOf(":"))>-1&&(e.protocol=t.substring(0,n)||null,e.protocol&&!e.protocol.match(i.protocol_expression)?e.protocol=void 0:"//"===t.substring(n+1,n+3)?(t=t.substring(n+3),t=i.parseAuthority(t,e)):(t=t.substring(n+1),e.urn=!0)),e.path=t,e},i.parseHost=function(t,e){t=t.replace(/\\/g,"/");var n,r,i=t.indexOf("/");if(-1===i&&(i=t.length),"["===t.charAt(0))n=t.indexOf("]"),e.hostname=t.substring(1,n)||null,e.port=t.substring(n+2,i)||null,"/"===e.port&&(e.port=null);else{var o=t.indexOf(":"),a=t.indexOf("/"),s=t.indexOf(":",o+1);-1!==s&&(-1===a||s<a)?(e.hostname=t.substring(0,i)||null,e.port=null):(r=t.substring(0,i).split(":"),e.hostname=r[0]||null,e.port=r[1]||null)}return e.hostname&&"/"!==t.substring(i).charAt(0)&&(i++,t="/"+t),t.substring(i)||"/"},i.parseAuthority=function(t,e){return t=i.parseUserinfo(t,e),i.parseHost(t,e)},i.parseUserinfo=function(t,e){var n,r=t.indexOf("/"),o=t.lastIndexOf("@",r>-1?r:t.length-1);return o>-1&&(-1===r||o<r)?(n=t.substring(0,o).split(":"),e.username=n[0]?i.decode(n[0]):null,n.shift(),e.password=n[0]?i.decode(n.join(":")):null,t=t.substring(o+1)):(e.username=null,e.password=null),t},i.parseQuery=function(t,e){if(!t)return{};if(!(t=t.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var n,r,o,a={},s=t.split("&"),u=s.length,c=0;c<u;c++)n=s[c].split("="),r=i.decodeQuery(n.shift(),e),o=n.length?i.decodeQuery(n.join("="),e):null,y.call(a,r)?("string"!=typeof a[r]&&null!==a[r]||(a[r]=[a[r]]),a[r].push(o)):a[r]=o;return a},i.build=function(t){var e="";return t.protocol&&(e+=t.protocol+":"),t.urn||!e&&!t.hostname||(e+="//"),e+=i.buildAuthority(t)||"","string"==typeof t.path&&("/"!==t.path.charAt(0)&&"string"==typeof t.hostname&&(e+="/"),e+=t.path),"string"==typeof t.query&&t.query&&(e+="?"+t.query),"string"==typeof t.fragment&&t.fragment&&(e+="#"+t.fragment),e},i.buildHost=function(t){var e="";return t.hostname?(i.ip6_expression.test(t.hostname)?e+="["+t.hostname+"]":e+=t.hostname,t.port&&(e+=":"+t.port),e):""},i.buildAuthority=function(t){return i.buildUserinfo(t)+i.buildHost(t)},i.buildUserinfo=function(t){var e="";return t.username&&(e+=i.encode(t.username)),t.password&&(e+=":"+i.encode(t.password)),e&&(e+="@"),e},i.buildQuery=function(t,e,n){var r,o,a,u,c="";for(o in t)if(y.call(t,o)&&o)if(s(t[o]))for(r={},a=0,u=t[o].length;a<u;a++)void 0!==t[o][a]&&void 0===r[t[o][a]+""]&&(c+="&"+i.buildQueryParameter(o,t[o][a],n),!0!==e&&(r[t[o][a]+""]=!0));else void 0!==t[o]&&(c+="&"+i.buildQueryParameter(o,t[o],n));return c.substring(1)},i.buildQueryParameter=function(t,e,n){return i.encodeQuery(t,n)+(null!==e?"="+i.encodeQuery(e,n):"")},i.addQuery=function(t,e,n){if("object"==typeof e)for(var r in e)y.call(e,r)&&i.addQuery(t,r,e[r]);else{if("string"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===t[e])return void(t[e]=n);"string"==typeof t[e]&&(t[e]=[t[e]]),s(n)||(n=[n]),t[e]=(t[e]||[]).concat(n)}},i.removeQuery=function(t,e,n){var r,o,c;if(s(e))for(r=0,o=e.length;r<o;r++)t[e[r]]=void 0;else if("RegExp"===a(e))for(c in t)e.test(c)&&(t[c]=void 0);else if("object"==typeof e)for(c in e)y.call(e,c)&&i.removeQuery(t,c,e[c]);else{if("string"!=typeof e)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==n?"RegExp"===a(n)?!s(t[e])&&n.test(t[e])?t[e]=void 0:t[e]=u(t[e],n):t[e]!==String(n)||s(n)&&1!==n.length?s(t[e])&&(t[e]=u(t[e],n)):t[e]=void 0:t[e]=void 0}},i.hasQuery=function(t,e,n,r){switch(a(e)){case"String":break;case"RegExp":for(var o in t)if(y.call(t,o)&&e.test(o)&&(void 0===n||i.hasQuery(t,o,n)))return!0;return!1;case"Object":for(var u in e)if(y.call(e,u)&&!i.hasQuery(t,u,e[u]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(a(n)){case"Undefined":return e in t;case"Boolean":return n===Boolean(s(t[e])?t[e].length:t[e]);case"Function":return!!n(t[e],e,t);case"Array":if(!s(t[e]))return!1;return(r?c:l)(t[e],n);case"RegExp":return s(t[e])?!!r&&c(t[e],n):Boolean(t[e]&&t[e].match(n));case"Number":n=String(n);case"String":return s(t[e])?!!r&&c(t[e],n):t[e]===n;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},i.joinPaths=function(){for(var t=[],e=[],n=0,r=0;r<arguments.length;r++){var o=new i(arguments[r]);t.push(o);for(var a=o.segment(),s=0;s<a.length;s++)"string"==typeof a[s]&&e.push(a[s]),a[s]&&n++}if(!e.length||!n)return new i("");var u=new i("").segment(e);return""!==t[0].path()&&"/"!==t[0].path().slice(0,1)||u.path("/"+u.path()),u.normalize()},i.commonPath=function(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n++)if(t.charAt(n)!==e.charAt(n)){n--;break}return n<1?t.charAt(0)===e.charAt(0)&&"/"===t.charAt(0)?"/":"":("/"===t.charAt(n)&&"/"===e.charAt(n)||(n=t.substring(0,n).lastIndexOf("/")),t.substring(0,n+1))},i.withinString=function(t,e,n){n||(n={});var r=n.start||i.findUri.start,o=n.end||i.findUri.end,a=n.trim||i.findUri.trim,s=n.parens||i.findUri.parens,u=/[a-z0-9-]=["']?$/i;for(r.lastIndex=0;;){var c=r.exec(t);if(!c)break;var l=c.index;if(n.ignoreHtml){var f=t.slice(Math.max(l-3,0),l);if(f&&u.test(f))continue}for(var d=l+t.slice(l).search(o),h=t.slice(l,d),p=-1;;){var v=s.exec(h);if(!v)break;var m=v.index+v[0].length;p=Math.max(p,m)}if(h=p>-1?h.slice(0,p)+h.slice(p).replace(a,""):h.replace(a,""),!(h.length<=c[0].length||n.ignore&&n.ignore.test(h))){d=l+h.length;var g=e(h,l,d,t);void 0!==g?(g=String(g),t=t.slice(0,l)+g+t.slice(d),r.lastIndex=l+g.length):r.lastIndex=d}}return r.lastIndex=0,t},i.ensureValidHostname=function(e){if(e.match(i.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-] and Punycode.js is not available');if(t.toASCII(e).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]')}},i.noConflict=function(t){if(t){var e={URI:this.noConflict()};return r.URITemplate&&"function"==typeof r.URITemplate.noConflict&&(e.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"==typeof r.IPv6.noConflict&&(e.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"==typeof r.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=r.SecondLevelDomains.noConflict()),e}return r.URI===this&&(r.URI=m),this},g.build=function(t){return!0===t?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},g.clone=function(){return new i(this)},g.valueOf=g.toString=function(){return this.build(!1)._string},g.protocol=p("protocol"),g.username=p("username"),g.password=p("password"),g.hostname=p("hostname"),g.port=p("port"),g.query=v("query","?"),g.fragment=v("fragment","#"),g.search=function(t,e){var n=this.query(t,e);return"string"==typeof n&&n.length?"?"+n:n},g.hash=function(t,e){var n=this.fragment(t,e);return"string"==typeof n&&n.length?"#"+n:n},g.pathname=function(t,e){if(void 0===t||!0===t){var n=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?i.decodeUrnPath:i.decodePath)(n):n}return this._parts.urn?this._parts.path=t?i.recodeUrnPath(t):"":this._parts.path=t?i.recodePath(t):"/",this.build(!e),this},g.path=g.pathname,g.href=function(t,e){var n;if(void 0===t)return this.toString();this._string="",this._parts=i._parts();var r=t instanceof i,o="object"==typeof t&&(t.hostname||t.path||t.pathname);if(t.nodeName){t=t[i.getDomAttribute(t)]||"",o=!1}if(!r&&o&&void 0!==t.pathname&&(t=t.toString()),"string"==typeof t||t instanceof String)this._parts=i.parse(String(t),this._parts);else{if(!r&&!o)throw new TypeError("invalid input");var a=r?t._parts:t;for(n in a)y.call(this._parts,n)&&(this._parts[n]=a[n])}return this.build(!e),this},g.is=function(t){var e=!1,r=!1,o=!1,a=!1,s=!1,u=!1,c=!1,l=!this._parts.urn;switch(this._parts.hostname&&(l=!1,r=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),e=r||o,a=!e,s=a&&n&&n.has(this._parts.hostname),u=a&&i.idn_expression.test(this._parts.hostname),c=a&&i.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return l;case"absolute":return!l;case"domain":case"name":return a;case"sld":return s;case"ip":return e;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return o;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var k=g.protocol,E=g.port,x=g.hostname;g.protocol=function(t,e){if(void 0!==t&&t&&(t=t.replace(/:(\/\/)?$/,""),!t.match(i.protocol_expression)))throw new TypeError('Protocol "'+t+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return k.call(this,t,e)},g.scheme=g.protocol,g.port=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t&&(0===t&&(t=null),t&&(t+="",":"===t.charAt(0)&&(t=t.substring(1)),t.match(/[^0-9]/))))throw new TypeError('Port "'+t+'" contains characters other than [0-9]');return E.call(this,t,e)},g.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var n={};if("/"!==i.parseHost(t,n))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');t=n.hostname}return x.call(this,t,e)},g.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=this.protocol();return this.authority()?(n?n+"://":"")+this.authority():""}var r=i(t);return this.protocol(r.protocol()).authority(r.authority()).build(!e),this},g.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},g.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},g.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=i.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==t[t.length-1]&&(t+="@"),i.parseUserinfo(t,this._parts),this.build(!e),this},g.resource=function(t,e){var n;return void 0===t?this.path()+this.search()+this.hash():(n=i.parse(t),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!e),this)},g.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var r=this._parts.hostname.length-this.domain().length,a=this._parts.hostname.substring(0,r),s=new RegExp("^"+o(a));return t&&"."!==t.charAt(t.length-1)&&(t+="."),t&&i.ensureValidHostname(t),this._parts.hostname=this._parts.hostname.replace(s,t),this.build(!e),this},g.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&n.length<2)return this._parts.hostname;var r=this._parts.hostname.length-this.tld(e).length-1;return r=this._parts.hostname.lastIndexOf(".",r-1)+1,this._parts.hostname.substring(r)||""}if(!t)throw new TypeError("cannot set domain empty");if(i.ensureValidHostname(t),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var a=new RegExp(o(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(a,t)}return this.build(!e),this},g.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(r+1);return!0!==e&&n&&n.list[i.toLowerCase()]?n.get(this._parts.hostname)||i:i}var a;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(t))throw new TypeError('TLD "'+t+'" contains characters other than [A-Z0-9]');a=new RegExp(o(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(a,t)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");a=new RegExp(o(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(a,t)}return this.build(!e),this},g.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,r=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return t?i.decodePath(r):r}var a=this._parts.path.length-this.filename().length,s=this._parts.path.substring(0,a),u=new RegExp("^"+o(s));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=i.recodePath(t),this._parts.path=this._parts.path.replace(u,t),this.build(!e),this},g.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("string"!=typeof t){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),r=this._parts.path.substring(n+1);return t?i.decodePathSegment(r):r}var a=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\.?\//)&&(a=!0);var s=new RegExp(o(this.filename())+"$");return t=i.recodePath(t),this._parts.path=this._parts.path.replace(s,t),a?this.normalizePath(e):this.build(!e),this},g.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var n,r,a=this.filename(),s=a.lastIndexOf(".");return-1===s?"":(n=a.substring(s+1),r=/^[a-z0-9%]+$/i.test(n)?n:"",t?i.decodePathSegment(r):r)}"."===t.charAt(0)&&(t=t.substring(1));var u,c=this.suffix();if(c)u=t?new RegExp(o(c)+"$"):new RegExp(o("."+c)+"$");else{if(!t)return this;this._parts.path+="."+i.recodePath(t)}return u&&(t=i.recodePath(t),this._parts.path=this._parts.path.replace(u,t)),this.build(!e),this},g.segment=function(t,e,n){var r=this._parts.urn?":":"/",i=this.path(),o="/"===i.substring(0,1),a=i.split(r);if(void 0!==t&&"number"!=typeof t&&(n=e,e=t,t=void 0),void 0!==t&&"number"!=typeof t)throw new Error('Bad segment "'+t+'", must be 0-based integer');if(o&&a.shift(),t<0&&(t=Math.max(a.length+t,0)),void 0===e)return void 0===t?a:a[t];if(null===t||void 0===a[t])if(s(e)){a=[];for(var u=0,c=e.length;u<c;u++)(e[u].length||a.length&&a[a.length-1].length)&&(a.length&&!a[a.length-1].length&&a.pop(),a.push(f(e[u])))}else(e||"string"==typeof e)&&(e=f(e),""===a[a.length-1]?a[a.length-1]=e:a.push(e));else e?a[t]=f(e):a.splice(t,1);return o&&a.unshift(""),this.path(a.join(r),n)},g.segmentCoded=function(t,e,n){var r,o,a;if("number"!=typeof t&&(n=e,e=t,t=void 0),void 0===e){if(r=this.segment(t,e,n),s(r))for(o=0,a=r.length;o<a;o++)r[o]=i.decode(r[o]);else r=void 0!==r?i.decode(r):void 0;return r}if(s(e))for(o=0,a=e.length;o<a;o++)e[o]=i.encode(e[o]);else e="string"==typeof e||e instanceof String?i.encode(e):e;return this.segment(t,e,n)};var j=g.query;return g.query=function(t,e){if(!0===t)return i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof t){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace),r=t.call(this,n);return this._parts.query=i.buildQuery(r||n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this}return void 0!==t&&"string"!=typeof t?(this._parts.query=i.buildQuery(t,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this):j.call(this,t,e)},g.setQuery=function(t,e,n){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof t||t instanceof String)r[t]=void 0!==e?e:null;else{if("object"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var o in t)y.call(t,o)&&(r[o]=t[o])}return this._parts.query=i.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(n=e),this.build(!n),this},g.addQuery=function(t,e,n){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.addQuery(r,t,void 0===e?null:e),this._parts.query=i.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(n=e),this.build(!n),this},g.removeQuery=function(t,e,n){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.removeQuery(r,t,e),this._parts.query=i.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(n=e),this.build(!n),this},g.hasQuery=function(t,e,n){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.hasQuery(r,t,e,n)},g.setSearch=g.setQuery,g.addSearch=g.addQuery,g.removeSearch=g.removeQuery,g.hasSearch=g.hasQuery,g.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},g.normalizeProtocol=function(t){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!t)),this},g.normalizeHostname=function(n){return this._parts.hostname&&(this.is("IDN")&&t?this._parts.hostname=t.toASCII(this._parts.hostname):this.is("IPv6")&&e&&(this._parts.hostname=e.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!n)),this},g.normalizePort=function(t){return"string"==typeof this._parts.protocol&&this._parts.port===i.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!t)),this},g.normalizePath=function(t){var e=this._parts.path;if(!e)return this;if(this._parts.urn)return this._parts.path=i.recodeUrnPath(this._parts.path),this.build(!t),this;if("/"===this._parts.path)return this;e=i.recodePath(e);var n,r,o,a="";for("/"!==e.charAt(0)&&(n=!0,e="/"+e),"/.."!==e.slice(-3)&&"/."!==e.slice(-2)||(e+="/"),e=e.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),n&&(a=e.substring(1).match(/^(\.\.\/)+/)||"")&&(a=a[0]);;){if(-1===(r=e.search(/\/\.\.(\/|$)/)))break;0!==r?(o=e.substring(0,r).lastIndexOf("/"),-1===o&&(o=r),e=e.substring(0,o)+e.substring(r+3)):e=e.substring(3)}return n&&this.is("relative")&&(e=a+e.substring(1)),this._parts.path=e,this.build(!t),this},g.normalizePathname=g.normalizePath,g.normalizeQuery=function(t){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(i.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!t)),this},g.normalizeFragment=function(t){return this._parts.fragment||(this._parts.fragment=null,this.build(!t)),this},g.normalizeSearch=g.normalizeQuery,g.normalizeHash=g.normalizeFragment,g.iso8859=function(){var t=i.encode,e=i.decode;i.encode=escape,i.decode=decodeURIComponent;try{this.normalize()}finally{i.encode=t,i.decode=e}return this},g.unicode=function(){var t=i.encode,e=i.decode;i.encode=h,i.decode=unescape;try{this.normalize()}finally{i.encode=t,i.decode=e}return this},g.readable=function(){var e=this.clone();e.username("").password("").normalize();var n="";if(e._parts.protocol&&(n+=e._parts.protocol+"://"),e._parts.hostname&&(e.is("punycode")&&t?(n+=t.toUnicode(e._parts.hostname),e._parts.port&&(n+=":"+e._parts.port)):n+=e.host()),e._parts.hostname&&e._parts.path&&"/"!==e._parts.path.charAt(0)&&(n+="/"),n+=e.path(!0),e._parts.query){for(var r="",o=0,a=e._parts.query.split("&"),s=a.length;o<s;o++){var u=(a[o]||"").split("=");r+="&"+i.decodeQuery(u[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==u[1]&&(r+="="+i.decodeQuery(u[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}n+="?"+r.substring(1)}return n+=i.decodeQuery(e.hash(),!0)},g.absoluteTo=function(t){var e,n,r,o=this.clone(),a=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t instanceof i||(t=new i(t)),o._parts.protocol||(o._parts.protocol=t._parts.protocol),this._parts.hostname)return o;for(n=0;r=a[n];n++)o._parts[r]=t._parts[r];return o._parts.path?(".."===o._parts.path.substring(-2)&&(o._parts.path+="/"),"/"!==o.path().charAt(0)&&(e=t.directory(),e=e||(0===t.path().indexOf("/")?"/":""),o._parts.path=(e?e+"/":"")+o._parts.path,o.normalizePath())):(o._parts.path=t._parts.path,o._parts.query||(o._parts.query=t._parts.query)),o.build(),o},g.relativeTo=function(t){var e,n,r,o,a,s=this.clone().normalize();if(s._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t=new i(t).normalize(),e=s._parts,n=t._parts,o=s.path(),a=t.path(),"/"!==o.charAt(0))throw new Error("URI is already relative");if("/"!==a.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(e.protocol===n.protocol&&(e.protocol=null),e.username!==n.username||e.password!==n.password)return s.build();if(null!==e.protocol||null!==e.username||null!==e.password)return s.build();if(e.hostname!==n.hostname||e.port!==n.port)return s.build();if(e.hostname=null,e.port=null,o===a)return e.path="",s.build();if(!(r=i.commonPath(o,a)))return s.build();var u=n.path.substring(r.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return e.path=u+e.path.substring(r.length)||"./",s.build()},g.equals=function(t){var e,n,r,o=this.clone(),a=new i(t),u={},c={},f={};if(o.normalize(),a.normalize(),o.toString()===a.toString())return!0;if(e=o.query(),n=a.query(),o.query(""),a.query(""),o.toString()!==a.toString())return!1;if(e.length!==n.length)return!1;u=i.parseQuery(e,this._parts.escapeQuerySpace),c=i.parseQuery(n,this._parts.escapeQuerySpace);for(r in u)if(y.call(u,r)){if(s(u[r])){if(!l(u[r],c[r]))return!1}else if(u[r]!==c[r])return!1;f[r]=!0}for(r in c)if(y.call(c,r)&&!f[r])return!1;return!0},g.duplicateQueryParameters=function(t){return this._parts.duplicateQueryParameters=!!t,this},g.escapeQuerySpace=function(t){return this._parts.escapeQuerySpace=!!t,this},i})},function(t,e,n){var r,i;/*!
14
+ * jQuery JavaScript Library v1.11.1
15
+ * http://jquery.com/
16
+ *
17
+ * Includes Sizzle.js
18
+ * http://sizzlejs.com/
19
+ *
20
+ * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
21
+ * Released under the MIT license
22
+ * http://jquery.org/license
23
+ *
24
+ * Date: 2014-05-01T17:42Z
25
+ */
26
+ !function(e,n){"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,function(n,o){function a(t){var e=t.length,n=st.type(t);return"function"!==n&&!st.isWindow(t)&&(!(1!==t.nodeType||!e)||("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t))}function s(t,e,n){if(st.isFunction(e))return st.grep(t,function(t,r){return!!e.call(t,r,t)!==n});if(e.nodeType)return st.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(vt.test(e))return st.filter(e,t,n);e=st.filter(e,t)}return st.grep(t,function(t){return st.inArray(t,e)>=0!==n})}function u(t,e){do{t=t[e]}while(t&&1!==t.nodeType);return t}function c(t){var e=Ct[t]={};return st.each(t.match(wt)||[],function(t,n){e[n]=!0}),e}function l(){gt.addEventListener?(gt.removeEventListener("DOMContentLoaded",f,!1),n.removeEventListener("load",f,!1)):(gt.detachEvent("onreadystatechange",f),n.detachEvent("onload",f))}function f(){(gt.addEventListener||"load"===event.type||"complete"===gt.readyState)&&(l(),st.ready())}function d(t,e,n){if(void 0===n&&1===t.nodeType){var r="data-"+e.replace(Ot,"-$1").toLowerCase();if("string"==typeof(n=t.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:jt.test(n)?st.parseJSON(n):n)}catch(t){}st.data(t,e,n)}else n=void 0}return n}function h(t){var e;for(e in t)if(("data"!==e||!st.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function p(t,e,n,r){if(st.acceptData(t)){var i,o,a=st.expando,s=t.nodeType,u=s?st.cache:t,c=s?t[a]:t[a]&&a;if(c&&u[c]&&(r||u[c].data)||void 0!==n||"string"!=typeof e)return c||(c=s?t[a]=Z.pop()||st.guid++:a),u[c]||(u[c]=s?{}:{toJSON:st.noop}),"object"!=typeof e&&"function"!=typeof e||(r?u[c]=st.extend(u[c],e):u[c].data=st.extend(u[c].data,e)),o=u[c],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[st.camelCase(e)]=n),"string"==typeof e?null==(i=o[e])&&(i=o[st.camelCase(e)]):i=o,i}}function v(t,e,n){if(st.acceptData(t)){var r,i,o=t.nodeType,a=o?st.cache:t,s=o?t[st.expando]:st.expando;if(a[s]){if(e&&(r=n?a[s]:a[s].data)){st.isArray(e)?e=e.concat(st.map(e,st.camelCase)):e in r?e=[e]:(e=st.camelCase(e),e=e in r?[e]:e.split(" ")),i=e.length;for(;i--;)delete r[e[i]];if(n?!h(r):!st.isEmptyObject(r))return}(n||(delete a[s].data,h(a[s])))&&(o?st.cleanData([t],!0):at.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}function m(){return!0}function g(){return!1}function y(){try{return gt.activeElement}catch(t){}}function b(t){var e=It.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}function _(t,e){var n,r,i=0,o=typeof t.getElementsByTagName!==xt?t.getElementsByTagName(e||"*"):typeof t.querySelectorAll!==xt?t.querySelectorAll(e||"*"):void 0;if(!o)for(o=[],n=t.childNodes||t;null!=(r=n[i]);i++)!e||st.nodeName(r,e)?o.push(r):st.merge(o,_(r,e));return void 0===e||e&&st.nodeName(t,e)?st.merge([t],o):o}function w(t){Nt.test(t.type)&&(t.defaultChecked=t.checked)}function C(t,e){return st.nodeName(t,"table")&&st.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function k(t){return t.type=(null!==st.find.attr(t,"type"))+"/"+t.type,t}function E(t){var e=Gt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function x(t,e){for(var n,r=0;null!=(n=t[r]);r++)st._data(n,"globalEval",!e||st._data(e[r],"globalEval"))}function j(t,e){if(1===e.nodeType&&st.hasData(t)){var n,r,i,o=st._data(t),a=st._data(e,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r<i;r++)st.event.add(e,n,s[n][r])}a.data&&(a.data=st.extend({},a.data))}}function O(t,e){var n,r,i;if(1===e.nodeType){if(n=e.nodeName.toLowerCase(),!at.noCloneEvent&&e[st.expando]){i=st._data(e);for(r in i.events)st.removeEvent(e,r,i.handle);e.removeAttribute(st.expando)}"script"===n&&e.text!==t.text?(k(e).text=t.text,E(e)):"object"===n?(e.parentNode&&(e.outerHTML=t.outerHTML),at.html5Clone&&t.innerHTML&&!st.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===n&&Nt.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===n?e.defaultSelected=e.selected=t.defaultSelected:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}}function S(t,e){var r,i=st(e.createElement(t)).appendTo(e.body),o=n.getDefaultComputedStyle&&(r=n.getDefaultComputedStyle(i[0]))?r.display:st.css(i[0],"display");return i.detach(),o}function T(t){var e=gt,n=ee[t];return n||(n=S(t,e),"none"!==n&&n||(te=(te||st("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=(te[0].contentWindow||te[0].contentDocument).document,e.write(),e.close(),n=S(t,e),te.detach()),ee[t]=n),n}function A(t,e){return{get:function(){var n=t();if(null!=n)return n?void delete this.get:(this.get=e).apply(this,arguments)}}}function P(t,e){if(e in t)return e;for(var n=e.charAt(0).toUpperCase()+e.slice(1),r=e,i=pe.length;i--;)if((e=pe[i]+n)in t)return e;return r}function N(t,e){for(var n,r,i,o=[],a=0,s=t.length;a<s;a++)r=t[a],r.style&&(o[a]=st._data(r,"olddisplay"),n=r.style.display,e?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&At(r)&&(o[a]=st._data(r,"olddisplay",T(r.nodeName)))):(i=At(r),(n&&"none"!==n||!i)&&st._data(r,"olddisplay",i?n:st.css(r,"display"))));for(a=0;a<s;a++)r=t[a],r.style&&(e&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=e?o[a]||"":"none"));return t}function D(t,e,n){var r=le.exec(e);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):e}function F(t,e,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===e?1:0,a=0;o<4;o+=2)"margin"===n&&(a+=st.css(t,n+Tt[o],!0,i)),r?("content"===n&&(a-=st.css(t,"padding"+Tt[o],!0,i)),"margin"!==n&&(a-=st.css(t,"border"+Tt[o]+"Width",!0,i))):(a+=st.css(t,"padding"+Tt[o],!0,i),"padding"!==n&&(a+=st.css(t,"border"+Tt[o]+"Width",!0,i)));return a}function M(t,e,n){var r=!0,i="width"===e?t.offsetWidth:t.offsetHeight,o=ne(t),a=at.boxSizing&&"border-box"===st.css(t,"boxSizing",!1,o);if(i<=0||null==i){if(i=re(t,e,o),(i<0||null==i)&&(i=t.style[e]),oe.test(i))return i;r=a&&(at.boxSizingReliable()||i===t.style[e]),i=parseFloat(i)||0}return i+F(t,e,n||(a?"border":"content"),r,o)+"px"}function R(t,e,n,r,i){return new R.prototype.init(t,e,n,r,i)}function L(){return setTimeout(function(){ve=void 0}),ve=st.now()}function I(t,e){var n,r={height:t},i=0;for(e=e?1:0;i<4;i+=2-e)n=Tt[i],r["margin"+n]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function B(t,e,n){for(var r,i=(we[e]||[]).concat(we["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,e,t))return r}function z(t,e,n){var r,i,o,a,s,u,c,l=this,f={},d=t.style,h=t.nodeType&&At(t),p=st._data(t,"fxshow");n.queue||(s=st._queueHooks(t,"fx"),null==s.unqueued&&(s.unqueued=0,u=s.empty.fire,s.empty.fire=function(){s.unqueued||u()}),s.unqueued++,l.always(function(){l.always(function(){s.unqueued--,st.queue(t,"fx").length||s.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],c=st.css(t,"display"),"inline"===("none"===c?st._data(t,"olddisplay")||T(t.nodeName):c)&&"none"===st.css(t,"float")&&(at.inlineBlockNeedsLayout&&"inline"!==T(t.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",at.shrinkWrapBlocks()||l.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(r in e)if(i=e[r],ge.exec(i)){if(delete e[r],o=o||"toggle"===i,i===(h?"hide":"show")){if("show"!==i||!p||void 0===p[r])continue;h=!0}f[r]=p&&p[r]||st.style(t,r)}else c=void 0;if(st.isEmptyObject(f))"inline"===("none"===c?T(t.nodeName):c)&&(d.display=c);else{p?"hidden"in p&&(h=p.hidden):p=st._data(t,"fxshow",{}),o&&(p.hidden=!h),h?st(t).show():l.done(function(){st(t).hide()}),l.done(function(){var e;st._removeData(t,"fxshow");for(e in f)st.style(t,e,f[e])});for(r in f)a=B(h?p[r]:0,r,l),r in p||(p[r]=a.start,h&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function H(t,e){var n,r,i,o,a;for(n in t)if(r=st.camelCase(n),i=e[r],o=t[n],st.isArray(o)&&(i=o[1],o=t[n]=o[0]),n!==r&&(t[r]=o,delete t[n]),(a=st.cssHooks[r])&&"expand"in a){o=a.expand(o),delete t[r];for(n in o)n in t||(t[n]=o[n],e[n]=i)}else e[r]=i}function q(t,e,n){var r,i,o=0,a=_e.length,s=st.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var e=ve||L(),n=Math.max(0,c.startTime+c.duration-e),r=n/c.duration||0,o=1-r,a=0,u=c.tweens.length;a<u;a++)c.tweens[a].run(o);return s.notifyWith(t,[c,o,n]),o<1&&u?n:(s.resolveWith(t,[c]),!1)},c=s.promise({elem:t,props:st.extend({},e),opts:st.extend(!0,{specialEasing:{}},n),originalProperties:e,originalOptions:n,startTime:ve||L(),duration:n.duration,tweens:[],createTween:function(e,n){var r=st.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(r),r},stop:function(e){var n=0,r=e?c.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)c.tweens[n].run(1);return e?s.resolveWith(t,[c,e]):s.rejectWith(t,[c,e]),this}}),l=c.props;for(H(l,c.opts.specialEasing);o<a;o++)if(r=_e[o].call(c,t,l,c.opts))return r;return st.map(l,B,c),st.isFunction(c.opts.start)&&c.opts.start.call(t,c),st.fx.timer(st.extend(u,{elem:t,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function W(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(wt)||[];if(st.isFunction(n))for(;r=o[i++];)"+"===r.charAt(0)?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function U(t,e,n,r){function i(s){var u;return o[s]=!0,st.each(t[s]||[],function(t,s){var c=s(e,n,r);return"string"!=typeof c||a||o[c]?a?!(u=c):void 0:(e.dataTypes.unshift(c),i(c),!1)}),u}var o={},a=t===Ve;return i(e.dataTypes[0])||!o["*"]&&i("*")}function V(t,e){var n,r,i=st.ajaxSettings.flatOptions||{};for(r in e)void 0!==e[r]&&((i[r]?t:n||(n={}))[r]=e[r]);return n&&st.extend(!0,t,n),t}function Q(t,e,n){for(var r,i,o,a,s=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(a in s)if(s[a]&&s[a].test(i)){u.unshift(a);break}if(u[0]in n)o=u[0];else{for(a in n){if(!u[0]||t.converters[a+" "+u[0]]){o=a;break}r||(r=a)}o=o||r}if(o)return o!==u[0]&&u.unshift(o),n[o]}function $(t,e,n,r){var i,o,a,s,u,c={},l=t.dataTypes.slice();if(l[1])for(a in t.converters)c[a.toLowerCase()]=t.converters[a];for(o=l.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=l.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=c[u+" "+o]||c["* "+o]))for(i in c)if(s=i.split(" "),s[1]===o&&(a=c[u+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[i]:!0!==c[i]&&(o=s[0],l.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}function K(t,e,n,r){var i;if(st.isArray(e))st.each(e,function(e,i){n||Ke.test(t)?r(t,i):K(t+"["+("object"==typeof i?e:"")+"]",i,n,r)});else if(n||"object"!==st.type(e))r(t,e);else for(i in e)K(t+"["+i+"]",e[i],n,r)}function G(){try{return new n.XMLHttpRequest}catch(t){}}function X(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function Y(t){return st.isWindow(t)?t:9===t.nodeType&&(t.defaultView||t.parentWindow)}var Z=[],J=Z.slice,tt=Z.concat,et=Z.push,nt=Z.indexOf,rt={},it=rt.toString,ot=rt.hasOwnProperty,at={},st=function(t,e){return new st.fn.init(t,e)},ut=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ct=/^-ms-/,lt=/-([\da-z])/gi,ft=function(t,e){return e.toUpperCase()};st.fn=st.prototype={jquery:"1.11.1",constructor:st,selector:"",length:0,toArray:function(){return J.call(this)},get:function(t){return null!=t?t<0?this[t+this.length]:this[t]:J.call(this)},pushStack:function(t){var e=st.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return st.each(this,t,e)},map:function(t){return this.pushStack(st.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(J.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:et,sort:Z.sort,splice:Z.splice},st.extend=st.fn.extend=function(){var t,e,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||st.isFunction(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(i=arguments[s]))for(r in i)t=a[r],n=i[r],a!==n&&(c&&n&&(st.isPlainObject(n)||(e=st.isArray(n)))?(e?(e=!1,o=t&&st.isArray(t)?t:[]):o=t&&st.isPlainObject(t)?t:{},a[r]=st.extend(c,o,n)):void 0!==n&&(a[r]=n));return a},st.extend({expando:"jQuery"+("1.11.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===st.type(t)},isArray:Array.isArray||function(t){return"array"===st.type(t)},isWindow:function(t){return null!=t&&t==t.window},isNumeric:function(t){return!st.isArray(t)&&t-parseFloat(t)>=0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},isPlainObject:function(t){var e;if(!t||"object"!==st.type(t)||t.nodeType||st.isWindow(t))return!1;try{if(t.constructor&&!ot.call(t,"constructor")&&!ot.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}if(at.ownLast)for(e in t)return ot.call(t,e);for(e in t);return void 0===e||ot.call(t,e)},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?rt[it.call(t)]||"object":typeof t},globalEval:function(t){t&&st.trim(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(t){return t.replace(ct,"ms-").replace(lt,ft)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,n){var r=0,i=t.length,o=a(t);if(n){if(o)for(;r<i&&!1!==e.apply(t[r],n);r++);else for(r in t)if(!1===e.apply(t[r],n))break}else if(o)for(;r<i&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},trim:function(t){return null==t?"":(t+"").replace(ut,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(a(Object(t))?st.merge(n,"string"==typeof t?[t]:t):et.call(n,t)),n},inArray:function(t,e,n){var r;if(e){if(nt)return nt.call(e,t,n);for(r=e.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in e&&e[n]===t)return n}return-1},merge:function(t,e){for(var n=+e.length,r=0,i=t.length;r<n;)t[i++]=e[r++];if(n!==n)for(;void 0!==e[r];)t[i++]=e[r++];return t.length=i,t},grep:function(t,e,n){for(var r=[],i=0,o=t.length,a=!n;i<o;i++)!e(t[i],i)!==a&&r.push(t[i]);return r},map:function(t,e,n){var r,i=0,o=t.length,s=a(t),u=[];if(s)for(;i<o;i++)null!=(r=e(t[i],i,n))&&u.push(r);else for(i in t)null!=(r=e(t[i],i,n))&&u.push(r);return tt.apply([],u)},guid:1,proxy:function(t,e){var n,r,i;if("string"==typeof e&&(i=t[e],e=t,t=i),st.isFunction(t))return n=J.call(arguments,2),r=function(){return t.apply(e||this,n.concat(J.call(arguments)))},r.guid=t.guid=t.guid||st.guid++,r},now:function(){return+new Date},support:at}),st.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){rt["[object "+e+"]"]=e.toLowerCase()});var dt=/*!
27
+ * Sizzle CSS Selector Engine v1.10.19
28
+ * http://sizzlejs.com/
29
+ *
30
+ * Copyright 2013 jQuery Foundation, Inc. and other contributors
31
+ * Released under the MIT license
32
+ * http://jquery.org/license
33
+ *
34
+ * Date: 2014-04-18
35
+ */
36
+ function(t){function e(t,e,n,r){var i,o,a,s,c,f,d,h,p,v;if((e?e.ownerDocument||e:I)!==A&&T(e),e=e||A,n=n||[],!t||"string"!=typeof t)return n;if(1!==(s=e.nodeType)&&9!==s)return[];if(N&&!r){if(i=mt.exec(t))if(a=i[1]){if(9===s){if(!(o=e.getElementById(a))||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(e.ownerDocument&&(o=e.ownerDocument.getElementById(a))&&R(e,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Y.apply(n,e.getElementsByTagName(t)),n;if((a=i[3])&&b.getElementsByClassName&&e.getElementsByClassName)return Y.apply(n,e.getElementsByClassName(a)),n}if(b.qsa&&(!D||!D.test(t))){if(h=d=L,p=e,v=9===s&&t,1===s&&"object"!==e.nodeName.toLowerCase()){for(f=k(t),(d=e.getAttribute("id"))?h=d.replace(yt,"\\$&"):e.setAttribute("id",h),h="[id='"+h+"'] ",c=f.length;c--;)f[c]=h+l(f[c]);p=gt.test(t)&&u(e.parentNode)||e,v=f.join(",")}if(v)try{return Y.apply(n,p.querySelectorAll(v)),n}catch(t){}finally{d||e.removeAttribute("id")}}}return x(t.replace(at,"$1"),e,n,r)}function n(){function t(n,r){return e.push(n+" ")>_.cacheLength&&delete t[e.shift()],t[n+" "]=r}var e=[];return t}function r(t){return t[L]=!0,t}function i(t){var e=A.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var n=t.split("|"),r=t.length;r--;)_.attrHandle[n[r]]=e}function a(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||Q)-(~t.sourceIndex||Q);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function s(t){return r(function(e){return e=+e,r(function(n,r){for(var i,o=t([],n.length,e),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(t){return t&&typeof t.getElementsByTagName!==V&&t}function c(){}function l(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function f(t,e,n){var r=e.dir,i=n&&"parentNode"===r,o=z++;return e.first?function(e,n,o){for(;e=e[r];)if(1===e.nodeType||i)return t(e,n,o)}:function(e,n,a){var s,u,c=[B,o];if(a){for(;e=e[r];)if((1===e.nodeType||i)&&t(e,n,a))return!0}else for(;e=e[r];)if(1===e.nodeType||i){if(u=e[L]||(e[L]={}),(s=u[r])&&s[0]===B&&s[1]===o)return c[2]=s[2];if(u[r]=c,c[2]=t(e,n,a))return!0}}}function d(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function h(t,n,r){for(var i=0,o=n.length;i<o;i++)e(t,n[i],r);return r}function p(t,e,n,r,i){for(var o,a=[],s=0,u=t.length,c=null!=e;s<u;s++)(o=t[s])&&(n&&!n(o,r,i)||(a.push(o),c&&e.push(s)));return a}function v(t,e,n,i,o,a){return i&&!i[L]&&(i=v(i)),o&&!o[L]&&(o=v(o,a)),r(function(r,a,s,u){var c,l,f,d=[],v=[],m=a.length,g=r||h(e||"*",s.nodeType?[s]:s,[]),y=!t||!r&&e?g:p(g,d,t,s,u),b=n?o||(r?t:m||i)?[]:a:y;if(n&&n(y,b,s,u),i)for(c=p(b,v),i(c,[],s,u),l=c.length;l--;)(f=c[l])&&(b[v[l]]=!(y[v[l]]=f));if(r){if(o||t){if(o){for(c=[],l=b.length;l--;)(f=b[l])&&c.push(y[l]=f);o(null,b=[],c,u)}for(l=b.length;l--;)(f=b[l])&&(c=o?J.call(r,f):d[l])>-1&&(r[c]=!(a[c]=f))}}else b=p(b===a?b.splice(m,b.length):b),o?o(null,a,b,u):Y.apply(a,b)})}function m(t){for(var e,n,r,i=t.length,o=_.relative[t[0].type],a=o||_.relative[" "],s=o?1:0,u=f(function(t){return t===e},a,!0),c=f(function(t){return J.call(e,t)>-1},a,!0),h=[function(t,n,r){return!o&&(r||n!==j)||((e=n).nodeType?u(t,n,r):c(t,n,r))}];s<i;s++)if(n=_.relative[t[s].type])h=[f(d(h),n)];else{if(n=_.filter[t[s].type].apply(null,t[s].matches),n[L]){for(r=++s;r<i&&!_.relative[t[r].type];r++);return v(s>1&&d(h),s>1&&l(t.slice(0,s-1).concat({value:" "===t[s-2].type?"*":""})).replace(at,"$1"),n,s<r&&m(t.slice(s,r)),r<i&&m(t=t.slice(r)),r<i&&l(t))}h.push(n)}return d(h)}function g(t,n){var i=n.length>0,o=t.length>0,a=function(r,a,s,u,c){var l,f,d,h=0,v="0",m=r&&[],g=[],y=j,b=r||o&&_.find.TAG("*",c),w=B+=null==y?1:Math.random()||.1,C=b.length;for(c&&(j=a!==A&&a);v!==C&&null!=(l=b[v]);v++){if(o&&l){for(f=0;d=t[f++];)if(d(l,a,s)){u.push(l);break}c&&(B=w)}i&&((l=!d&&l)&&h--,r&&m.push(l))}if(h+=v,i&&v!==h){for(f=0;d=n[f++];)d(m,g,a,s);if(r){if(h>0)for(;v--;)m[v]||g[v]||(g[v]=G.call(u));g=p(g)}Y.apply(u,g),c&&!r&&g.length>0&&h+n.length>1&&e.uniqueSort(u)}return c&&(B=w,j=y),m};return i?r(a):a}var y,b,_,w,C,k,E,x,j,O,S,T,A,P,N,D,F,M,R,L="sizzle"+-new Date,I=t.document,B=0,z=0,H=n(),q=n(),W=n(),U=function(t,e){return t===e&&(S=!0),0},V="undefined",Q=1<<31,$={}.hasOwnProperty,K=[],G=K.pop,X=K.push,Y=K.push,Z=K.slice,J=K.indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(this[e]===t)return e;return-1},tt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",et="[\\x20\\t\\r\\n\\f]",nt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",rt=nt.replace("w","w#"),it="\\["+et+"*("+nt+")(?:"+et+"*([*^$|!~]?=)"+et+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+rt+"))|)"+et+"*\\]",ot=":("+nt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+it+")*)|.*)\\)|)",at=new RegExp("^"+et+"+|((?:^|[^\\\\])(?:\\\\.)*)"+et+"+$","g"),st=new RegExp("^"+et+"*,"+et+"*"),ut=new RegExp("^"+et+"*([>+~]|"+et+")"+et+"*"),ct=new RegExp("="+et+"*([^\\]'\"]*?)"+et+"*\\]","g"),lt=new RegExp(ot),ft=new RegExp("^"+rt+"$"),dt={ID:new RegExp("^#("+nt+")"),CLASS:new RegExp("^\\.("+nt+")"),TAG:new RegExp("^("+nt.replace("w","w*")+")"),ATTR:new RegExp("^"+it),PSEUDO:new RegExp("^"+ot),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+et+"*(even|odd|(([+-]|)(\\d*)n|)"+et+"*(?:([+-]|)"+et+"*(\\d+)|))"+et+"*\\)|)","i"),bool:new RegExp("^(?:"+tt+")$","i"),needsContext:new RegExp("^"+et+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+et+"*((?:-\\d)?\\d*)"+et+"*\\)|)(?=[^-]|$)","i")},ht=/^(?:input|select|textarea|button)$/i,pt=/^h\d$/i,vt=/^[^{]+\{\s*\[native \w/,mt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,gt=/[+~]/,yt=/'|\\/g,bt=new RegExp("\\\\([\\da-f]{1,6}"+et+"?|("+et+")|.)","ig"),_t=function(t,e,n){var r="0x"+e-65536;return r!==r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{Y.apply(K=Z.call(I.childNodes),I.childNodes),K[I.childNodes.length].nodeType}catch(t){Y={apply:K.length?function(t,e){X.apply(t,Z.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}b=e.support={},C=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},T=e.setDocument=function(t){var e,n=t?t.ownerDocument||t:I,r=n.defaultView;return n!==A&&9===n.nodeType&&n.documentElement?(A=n,P=n.documentElement,N=!C(n),r&&r!==r.top&&(r.addEventListener?r.addEventListener("unload",function(){T()},!1):r.attachEvent&&r.attachEvent("onunload",function(){T()})),b.attributes=i(function(t){return t.className="i",!t.getAttribute("className")}),b.getElementsByTagName=i(function(t){return t.appendChild(n.createComment("")),!t.getElementsByTagName("*").length}),b.getElementsByClassName=vt.test(n.getElementsByClassName)&&i(function(t){return t.innerHTML="<div class='a'></div><div class='a i'></div>",t.firstChild.className="i",2===t.getElementsByClassName("i").length}),b.getById=i(function(t){return P.appendChild(t).id=L,!n.getElementsByName||!n.getElementsByName(L).length}),b.getById?(_.find.ID=function(t,e){if(typeof e.getElementById!==V&&N){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},_.filter.ID=function(t){var e=t.replace(bt,_t);return function(t){return t.getAttribute("id")===e}}):(delete _.find.ID,_.filter.ID=function(t){var e=t.replace(bt,_t);return function(t){var n=typeof t.getAttributeNode!==V&&t.getAttributeNode("id");return n&&n.value===e}}),_.find.TAG=b.getElementsByTagName?function(t,e){if(typeof e.getElementsByTagName!==V)return e.getElementsByTagName(t)}:function(t,e){var n,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},_.find.CLASS=b.getElementsByClassName&&function(t,e){if(typeof e.getElementsByClassName!==V&&N)return e.getElementsByClassName(t)},F=[],D=[],(b.qsa=vt.test(n.querySelectorAll))&&(i(function(t){t.innerHTML="<select msallowclip=''><option selected=''></option></select>",t.querySelectorAll("[msallowclip^='']").length&&D.push("[*^$]="+et+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||D.push("\\["+et+"*(?:value|"+tt+")"),t.querySelectorAll(":checked").length||D.push(":checked")}),i(function(t){var e=n.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&D.push("name"+et+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||D.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),D.push(",.*:")})),(b.matchesSelector=vt.test(M=P.matches||P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&i(function(t){b.disconnectedMatch=M.call(t,"div"),M.call(t,"[s!='']:x"),F.push("!=",ot)}),D=D.length&&new RegExp(D.join("|")),F=F.length&&new RegExp(F.join("|")),e=vt.test(P.compareDocumentPosition),R=e||vt.test(P.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},U=e?function(t,e){if(t===e)return S=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(r=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&r||!b.sortDetached&&e.compareDocumentPosition(t)===r?t===n||t.ownerDocument===I&&R(I,t)?-1:e===n||e.ownerDocument===I&&R(I,e)?1:O?J.call(O,t)-J.call(O,e):0:4&r?-1:1)}:function(t,e){if(t===e)return S=!0,0;var r,i=0,o=t.parentNode,s=e.parentNode,u=[t],c=[e];if(!o||!s)return t===n?-1:e===n?1:o?-1:s?1:O?J.call(O,t)-J.call(O,e):0;if(o===s)return a(t,e);for(r=t;r=r.parentNode;)u.unshift(r);for(r=e;r=r.parentNode;)c.unshift(r);for(;u[i]===c[i];)i++;return i?a(u[i],c[i]):u[i]===I?-1:c[i]===I?1:0},n):A},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==A&&T(t),n=n.replace(ct,"='$1']"),b.matchesSelector&&N&&(!F||!F.test(n))&&(!D||!D.test(n)))try{var r=M.call(t,n);if(r||b.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){}return e(n,A,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==A&&T(t),R(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==A&&T(t);var n=_.attrHandle[e.toLowerCase()],r=n&&$.call(_.attrHandle,e.toLowerCase())?n(t,e,!N):void 0;return void 0!==r?r:b.attributes||!N?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],r=0,i=0;if(S=!b.detectDuplicates,O=!b.sortStable&&t.slice(0),t.sort(U),S){for(;e=t[i++];)e===t[i]&&(r=n.push(i));for(;r--;)t.splice(n[r],1)}return O=null,t},w=e.getText=function(t){var e,n="",r=0,i=t.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=w(t)}else if(3===i||4===i)return t.nodeValue}else for(;e=t[r++];)n+=w(e);return n},_=e.selectors={cacheLength:50,createPseudo:r,match:dt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(bt,_t),t[3]=(t[3]||t[4]||t[5]||"").replace(bt,_t),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return dt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&lt.test(n)&&(e=k(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(bt,_t).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=H[t+" "];return e||(e=new RegExp("(^|"+et+")"+t+"("+et+"|$)"))&&H(t,function(t){return e.test("string"==typeof t.className&&t.className||typeof t.getAttribute!==V&&t.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(i){var o=e.attr(i,t);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var c,l,f,d,h,p,v=o!==a?"nextSibling":"previousSibling",m=e.parentNode,g=s&&e.nodeName.toLowerCase(),y=!u&&!s;if(m){if(o){for(;v;){for(f=e;f=f[v];)if(s?f.nodeName.toLowerCase()===g:1===f.nodeType)return!1;p=v="only"===t&&!p&&"nextSibling"}return!0}if(p=[a?m.firstChild:m.lastChild],a&&y){for(l=m[L]||(m[L]={}),c=l[t]||[],h=c[0]===B&&c[1],d=c[0]===B&&c[2],f=h&&m.childNodes[h];f=++h&&f&&f[v]||(d=h=0)||p.pop();)if(1===f.nodeType&&++d&&f===e){l[t]=[B,h,d];break}}else if(y&&(c=(e[L]||(e[L]={}))[t])&&c[0]===B)d=c[1];else for(;(f=++h&&f&&f[v]||(d=h=0)||p.pop())&&((s?f.nodeName.toLowerCase()!==g:1!==f.nodeType)||!++d||(y&&((f[L]||(f[L]={}))[t]=[B,d]),f!==e)););return(d-=i)===r||d%r==0&&d/r>=0}}},PSEUDO:function(t,n){var i,o=_.pseudos[t]||_.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[L]?o(n):o.length>1?(i=[t,t,"",n],_.setFilters.hasOwnProperty(t.toLowerCase())?r(function(t,e){for(var r,i=o(t,n),a=i.length;a--;)r=J.call(t,i[a]),t[r]=!(e[r]=i[a])}):function(t){return o(t,0,i)}):o}},pseudos:{not:r(function(t){var e=[],n=[],i=E(t.replace(at,"$1"));return i[L]?r(function(t,e,n,r){for(var o,a=i(t,null,r,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))}):function(t,r,o){return e[0]=t,i(e,null,o,n),!n.pop()}}),has:r(function(t){return function(n){return e(t,n).length>0}}),contains:r(function(t){return function(e){return(e.textContent||e.innerText||w(e)).indexOf(t)>-1}}),lang:r(function(t){return ft.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(bt,_t).toLowerCase(),function(e){var n;do{if(n=N?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===P},focus:function(t){return t===A.activeElement&&(!A.hasFocus||A.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!_.pseudos.empty(t)},header:function(t){return pt.test(t.nodeName)},input:function(t){return ht.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:s(function(){return[0]}),last:s(function(t,e){return[e-1]}),eq:s(function(t,e,n){return[n<0?n+e:n]}),even:s(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:s(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:s(function(t,e,n){for(var r=n<0?n+e:n;--r>=0;)t.push(r);return t}),gt:s(function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t})}},_.pseudos.nth=_.pseudos.eq;for(y in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})_.pseudos[y]=function(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}(y);for(y in{submit:!0,reset:!0})_.pseudos[y]=function(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}(y);return c.prototype=_.filters=_.pseudos,_.setFilters=new c,k=e.tokenize=function(t,n){var r,i,o,a,s,u,c,l=q[t+" "];if(l)return n?0:l.slice(0);for(s=t,u=[],c=_.preFilter;s;){r&&!(i=st.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=ut.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(at," ")}),s=s.slice(r.length));for(a in _.filter)!(i=dt[a].exec(s))||c[a]&&!(i=c[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?e.error(t):q(t,u).slice(0)},E=e.compile=function(t,e){var n,r=[],i=[],o=W[t+" "];if(!o){for(e||(e=k(t)),n=e.length;n--;)o=m(e[n]),o[L]?r.push(o):i.push(o);o=W(t,g(i,r)),o.selector=t}return o},x=e.select=function(t,e,n,r){var i,o,a,s,c,f="function"==typeof t&&t,d=!r&&k(t=f.selector||t);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&b.getById&&9===e.nodeType&&N&&_.relative[o[1].type]){if(!(e=(_.find.ID(a.matches[0].replace(bt,_t),e)||[])[0]))return n;f&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(i=dt.needsContext.test(t)?0:o.length;i--&&(a=o[i],!_.relative[s=a.type]);)if((c=_.find[s])&&(r=c(a.matches[0].replace(bt,_t),gt.test(o[0].type)&&u(e.parentNode)||e))){if(o.splice(i,1),!(t=r.length&&l(o)))return Y.apply(n,r),n;break}}return(f||E(t,d))(r,e,!N,n,gt.test(t)&&u(e.parentNode)||e),n},b.sortStable=L.split("").sort(U).join("")===L,b.detectDuplicates=!!S,T(),b.sortDetached=i(function(t){return 1&t.compareDocumentPosition(A.createElement("div"))}),i(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),b.attributes&&i(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),i(function(t){return null==t.getAttribute("disabled")})||o(tt,function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null}),e}(n);st.find=dt,st.expr=dt.selectors,st.expr[":"]=st.expr.pseudos,st.unique=dt.uniqueSort,st.text=dt.getText,st.isXMLDoc=dt.isXML,st.contains=dt.contains;var ht=st.expr.match.needsContext,pt=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,vt=/^.[^:#\[\.,]*$/;st.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?st.find.matchesSelector(r,t)?[r]:[]:st.find.matches(t,st.grep(e,function(t){return 1===t.nodeType}))},st.fn.extend({find:function(t){var e,n=[],r=this,i=r.length;if("string"!=typeof t)return this.pushStack(st(t).filter(function(){for(e=0;e<i;e++)if(st.contains(r[e],this))return!0}));for(e=0;e<i;e++)st.find(t,r[e],n);return n=this.pushStack(i>1?st.unique(n):n),n.selector=this.selector?this.selector+" "+t:t,n},filter:function(t){return this.pushStack(s(this,t||[],!1))},not:function(t){return this.pushStack(s(this,t||[],!0))},is:function(t){return!!s(this,"string"==typeof t&&ht.test(t)?st(t):t||[],!1).length}});var mt,gt=n.document,yt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(st.fn.init=function(t,e){var n,r;if(!t)return this;if("string"==typeof t){if(!(n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:yt.exec(t))||!n[1]&&e)return!e||e.jquery?(e||mt).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof st?e[0]:e,st.merge(this,st.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:gt,!0)),pt.test(n[1])&&st.isPlainObject(e))for(n in e)st.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}if((r=gt.getElementById(n[2]))&&r.parentNode){if(r.id!==n[2])return mt.find(t);this.length=1,this[0]=r}return this.context=gt,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):st.isFunction(t)?void 0!==mt.ready?mt.ready(t):t(st):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),st.makeArray(t,this))}).prototype=st.fn,mt=st(gt);var bt=/^(?:parents|prev(?:Until|All))/,_t={children:!0,contents:!0,next:!0,prev:!0};st.extend({dir:function(t,e,n){for(var r=[],i=t[e];i&&9!==i.nodeType&&(void 0===n||1!==i.nodeType||!st(i).is(n));)1===i.nodeType&&r.push(i),i=i[e];return r},sibling:function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}}),st.fn.extend({has:function(t){var e,n=st(t,this),r=n.length;return this.filter(function(){for(e=0;e<r;e++)if(st.contains(this,n[e]))return!0})},closest:function(t,e){for(var n,r=0,i=this.length,o=[],a=ht.test(t)||"string"!=typeof t?st(t,e||this.context):0;r<i;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&st.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?st.unique(o):o)},index:function(t){return t?"string"==typeof t?st.inArray(this[0],st(t)):st.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(st.unique(st.merge(this.get(),st(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),st.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return st.dir(t,"parentNode")},parentsUntil:function(t,e,n){return st.dir(t,"parentNode",n)},next:function(t){return u(t,"nextSibling")},prev:function(t){return u(t,"previousSibling")},nextAll:function(t){return st.dir(t,"nextSibling")},prevAll:function(t){return st.dir(t,"previousSibling")},nextUntil:function(t,e,n){return st.dir(t,"nextSibling",n)},prevUntil:function(t,e,n){return st.dir(t,"previousSibling",n)},siblings:function(t){return st.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return st.sibling(t.firstChild)},contents:function(t){return st.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:st.merge([],t.childNodes)}},function(t,e){st.fn[t]=function(n,r){var i=st.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=st.filter(r,i)),this.length>1&&(_t[t]||(i=st.unique(i)),bt.test(t)&&(i=i.reverse())),this.pushStack(i)}});var wt=/\S+/g,Ct={};st.Callbacks=function(t){t="string"==typeof t?Ct[t]||c(t):st.extend({},t);var e,n,r,i,o,a,s=[],u=!t.once&&[],l=function(c){for(n=t.memory&&c,r=!0,o=a||0,a=0,i=s.length,e=!0;s&&o<i;o++)if(!1===s[o].apply(c[0],c[1])&&t.stopOnFalse){n=!1;break}e=!1,s&&(u?u.length&&l(u.shift()):n?s=[]:f.disable())},f={add:function(){if(s){var r=s.length;!function e(n){st.each(n,function(n,r){var i=st.type(r);"function"===i?t.unique&&f.has(r)||s.push(r):r&&r.length&&"string"!==i&&e(r)})}(arguments),e?i=s.length:n&&(a=r,l(n))}return this},remove:function(){return s&&st.each(arguments,function(t,n){for(var r;(r=st.inArray(n,s,r))>-1;)s.splice(r,1),e&&(r<=i&&i--,r<=o&&o--)}),this},has:function(t){return t?st.inArray(t,s)>-1:!(!s||!s.length)},empty:function(){return s=[],i=0,this},disable:function(){return s=u=n=void 0,this},disabled:function(){return!s},lock:function(){return u=void 0,n||f.disable(),this},locked:function(){return!u},fireWith:function(t,n){return!s||r&&!u||(n=n||[],n=[t,n.slice?n.slice():n],e?u.push(n):l(n)),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!r}};return f},st.extend({Deferred:function(t){var e=[["resolve","done",st.Callbacks("once memory"),"resolved"],["reject","fail",st.Callbacks("once memory"),"rejected"],["notify","progress",st.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var t=arguments;return st.Deferred(function(n){st.each(e,function(e,o){var a=st.isFunction(t[e])&&t[e];i[o[1]](function(){var t=a&&a.apply(this,arguments);t&&st.isFunction(t.promise)?t.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===r?n.promise():this,a?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?st.extend(t,r):r}},i={};return r.pipe=r.then,st.each(e,function(t,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},e[1^t][2].disable,e[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),t&&t.call(i,i),i},when:function(t){var e,n,r,i=0,o=J.call(arguments),a=o.length,s=1!==a||t&&st.isFunction(t.promise)?a:0,u=1===s?t:st.Deferred(),c=function(t,n,r){return function(i){n[t]=this,r[t]=arguments.length>1?J.call(arguments):i,r===e?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(e=new Array(a),n=new Array(a),r=new Array(a);i<a;i++)o[i]&&st.isFunction(o[i].promise)?o[i].promise().done(c(i,r,o)).fail(u.reject).progress(c(i,n,e)):--s;return s||u.resolveWith(r,o),u.promise()}});var kt;st.fn.ready=function(t){return st.ready.promise().done(t),this},st.extend({isReady:!1,readyWait:1,holdReady:function(t){t?st.readyWait++:st.ready(!0)},ready:function(t){if(!0===t?!--st.readyWait:!st.isReady){if(!gt.body)return setTimeout(st.ready);st.isReady=!0,!0!==t&&--st.readyWait>0||(kt.resolveWith(gt,[st]),st.fn.triggerHandler&&(st(gt).triggerHandler("ready"),st(gt).off("ready")))}}}),st.ready.promise=function(t){if(!kt)if(kt=st.Deferred(),"complete"===gt.readyState)setTimeout(st.ready);else if(gt.addEventListener)gt.addEventListener("DOMContentLoaded",f,!1),n.addEventListener("load",f,!1);else{gt.attachEvent("onreadystatechange",f),n.attachEvent("onload",f);var e=!1;try{e=null==n.frameElement&&gt.documentElement}catch(t){}e&&e.doScroll&&function t(){if(!st.isReady){try{e.doScroll("left")}catch(e){return setTimeout(t,50)}l(),st.ready()}}()}return kt.promise(t)};var Et,xt="undefined";for(Et in st(at))break;at.ownLast="0"!==Et,at.inlineBlockNeedsLayout=!1,st(function(){var t,e,n,r;(n=gt.getElementsByTagName("body")[0])&&n.style&&(e=gt.createElement("div"),r=gt.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(e),typeof e.style.zoom!==xt&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",at.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(n.style.zoom=1)),n.removeChild(r))}),function(){var t=gt.createElement("div");if(null==at.deleteExpando){at.deleteExpando=!0;try{delete t.test}catch(t){at.deleteExpando=!1}}t=null}(),st.acceptData=function(t){var e=st.noData[(t.nodeName+" ").toLowerCase()],n=+t.nodeType||1;return(1===n||9===n)&&(!e||!0!==e&&t.getAttribute("classid")===e)};var jt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ot=/([A-Z])/g;st.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return!!(t=t.nodeType?st.cache[t[st.expando]]:t[st.expando])&&!h(t)},data:function(t,e,n){return p(t,e,n)},removeData:function(t,e){return v(t,e)},_data:function(t,e,n){return p(t,e,n,!0)},_removeData:function(t,e){return v(t,e,!0)}}),st.fn.extend({data:function(t,e){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===t){if(this.length&&(i=st.data(o),1===o.nodeType&&!st._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=st.camelCase(r.slice(5)),d(o,r,i[r])));st._data(o,"parsedAttrs",!0)}return i}return"object"==typeof t?this.each(function(){st.data(this,t)}):arguments.length>1?this.each(function(){st.data(this,t,e)}):o?d(o,t,st.data(o,t)):void 0},removeData:function(t){return this.each(function(){st.removeData(this,t)})}}),st.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=st._data(t,e),n&&(!r||st.isArray(n)?r=st._data(t,e,st.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=st.queue(t,e),r=n.length,i=n.shift(),o=st._queueHooks(t,e),a=function(){st.dequeue(t,e)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return st._data(t,n)||st._data(t,n,{empty:st.Callbacks("once memory").add(function(){st._removeData(t,e+"queue"),st._removeData(t,n)})})}}),st.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?st.queue(this[0],t):void 0===e?this:this.each(function(){var n=st.queue(this,t,e);st._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&st.dequeue(this,t)})},dequeue:function(t){return this.each(function(){st.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=st.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";a--;)(n=st._data(o[a],t+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(e)}});var St=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Tt=["Top","Right","Bottom","Left"],At=function(t,e){return t=e||t,"none"===st.css(t,"display")||!st.contains(t.ownerDocument,t)},Pt=st.access=function(t,e,n,r,i,o,a){var s=0,u=t.length,c=null==n;if("object"===st.type(n)){i=!0;for(s in n)st.access(t,e,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,st.isFunction(r)||(a=!0),c&&(a?(e.call(t,r),e=null):(c=e,e=function(t,e,n){return c.call(st(t),n)})),e))for(;s<u;s++)e(t[s],n,a?r:r.call(t[s],s,e(t[s],n)));return i?t:c?e.call(t):u?e(t[0],n):o},Nt=/^(?:checkbox|radio)$/i;!function(){var t=gt.createElement("input"),e=gt.createElement("div"),n=gt.createDocumentFragment();if(e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",at.leadingWhitespace=3===e.firstChild.nodeType,at.tbody=!e.getElementsByTagName("tbody").length,at.htmlSerialize=!!e.getElementsByTagName("link").length,at.html5Clone="<:nav></:nav>"!==gt.createElement("nav").cloneNode(!0).outerHTML,t.type="checkbox",t.checked=!0,n.appendChild(t),at.appendChecked=t.checked,e.innerHTML="<textarea>x</textarea>",at.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,n.appendChild(e),e.innerHTML="<input type='radio' checked='checked' name='t'/>",at.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,at.noCloneEvent=!0,e.attachEvent&&(e.attachEvent("onclick",function(){at.noCloneEvent=!1}),e.cloneNode(!0).click()),null==at.deleteExpando){at.deleteExpando=!0;try{delete e.test}catch(t){at.deleteExpando=!1}}}(),function(){var t,e,r=gt.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})e="on"+t,(at[t+"Bubbles"]=e in n)||(r.setAttribute(e,"t"),at[t+"Bubbles"]=!1===r.attributes[e].expando);r=null}();var Dt=/^(?:input|select|textarea)$/i,Ft=/^key/,Mt=/^(?:mouse|pointer|contextmenu)|click/,Rt=/^(?:focusinfocus|focusoutblur)$/,Lt=/^([^.]*)(?:\.(.+)|)$/;st.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,c,l,f,d,h,p,v,m=st._data(t);if(m){for(n.handler&&(u=n,n=u.handler,i=u.selector),n.guid||(n.guid=st.guid++),(a=m.events)||(a=m.events={}),(l=m.handle)||(l=m.handle=function(t){return typeof st===xt||t&&st.event.triggered===t.type?void 0:st.event.dispatch.apply(l.elem,arguments)},l.elem=t),e=(e||"").match(wt)||[""],s=e.length;s--;)o=Lt.exec(e[s])||[],h=v=o[1],p=(o[2]||"").split(".").sort(),h&&(c=st.event.special[h]||{},h=(i?c.delegateType:c.bindType)||h,c=st.event.special[h]||{},f=st.extend({type:h,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&st.expr.match.needsContext.test(i),namespace:p.join(".")},u),(d=a[h])||(d=a[h]=[],d.delegateCount=0,c.setup&&!1!==c.setup.call(t,r,p,l)||(t.addEventListener?t.addEventListener(h,l,!1):t.attachEvent&&t.attachEvent("on"+h,l))),c.add&&(c.add.call(t,f),f.handler.guid||(f.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,f):d.push(f),st.event.global[h]=!0);t=null}},remove:function(t,e,n,r,i){var o,a,s,u,c,l,f,d,h,p,v,m=st.hasData(t)&&st._data(t);if(m&&(l=m.events)){for(e=(e||"").match(wt)||[""],c=e.length;c--;)if(s=Lt.exec(e[c])||[],h=v=s[1],p=(s[2]||"").split(".").sort(),h){for(f=st.event.special[h]||{},h=(r?f.delegateType:f.bindType)||h,d=l[h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=d.length;o--;)a=d[o],!i&&v!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(d.splice(o,1),a.selector&&d.delegateCount--,f.remove&&f.remove.call(t,a));u&&!d.length&&(f.teardown&&!1!==f.teardown.call(t,p,m.handle)||st.removeEvent(t,h,m.handle),delete l[h])}else for(h in l)st.event.remove(t,h+e[c],n,r,!0);st.isEmptyObject(l)&&(delete m.handle,st._removeData(t,"events"))}},trigger:function(t,e,r,i){var o,a,s,u,c,l,f,d=[r||gt],h=ot.call(t,"type")?t.type:t,p=ot.call(t,"namespace")?t.namespace.split("."):[];if(s=l=r=r||gt,3!==r.nodeType&&8!==r.nodeType&&!Rt.test(h+st.event.triggered)&&(h.indexOf(".")>=0&&(p=h.split("."),h=p.shift(),p.sort()),a=h.indexOf(":")<0&&"on"+h,t=t[st.expando]?t:new st.Event(h,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=p.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:st.makeArray(e,[t]),c=st.event.special[h]||{},i||!c.trigger||!1!==c.trigger.apply(r,e))){if(!i&&!c.noBubble&&!st.isWindow(r)){for(u=c.delegateType||h,Rt.test(u+h)||(s=s.parentNode);s;s=s.parentNode)d.push(s),l=s;l===(r.ownerDocument||gt)&&d.push(l.defaultView||l.parentWindow||n)}for(f=0;(s=d[f++])&&!t.isPropagationStopped();)t.type=f>1?u:c.bindType||h,o=(st._data(s,"events")||{})[t.type]&&st._data(s,"handle"),o&&o.apply(s,e),(o=a&&s[a])&&o.apply&&st.acceptData(s)&&(t.result=o.apply(s,e),!1===t.result&&t.preventDefault());if(t.type=h,!i&&!t.isDefaultPrevented()&&(!c._default||!1===c._default.apply(d.pop(),e))&&st.acceptData(r)&&a&&r[h]&&!st.isWindow(r)){l=r[a],l&&(r[a]=null),st.event.triggered=h;try{r[h]()}catch(t){}st.event.triggered=void 0,l&&(r[a]=l)}return t.result}},dispatch:function(t){t=st.event.fix(t);var e,n,r,i,o,a=[],s=J.call(arguments),u=(st._data(this,"events")||{})[t.type]||[],c=st.event.special[t.type]||{};if(s[0]=t,t.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,t)){for(a=st.event.handlers.call(this,t,u),e=0;(i=a[e++])&&!t.isPropagationStopped();)for(t.currentTarget=i.elem,o=0;(r=i.handlers[o++])&&!t.isImmediatePropagationStopped();)t.namespace_re&&!t.namespace_re.test(r.namespace)||(t.handleObj=r,t.data=r.data,void 0!==(n=((st.event.special[r.origType]||{}).handle||r.handler).apply(i.elem,s))&&!1===(t.result=n)&&(t.preventDefault(),t.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,r,i,o,a=[],s=e.delegateCount,u=t.target;if(s&&u.nodeType&&(!t.button||"click"!==t.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(!0!==u.disabled||"click"!==t.type)){for(i=[],o=0;o<s;o++)r=e[o],n=r.selector+" ",void 0===i[n]&&(i[n]=r.needsContext?st(n,this).index(u)>=0:st.find(n,this,null,[u]).length),i[n]&&i.push(r);i.length&&a.push({elem:u,handlers:i})}return s<e.length&&a.push({elem:this,handlers:e.slice(s)}),a},fix:function(t){if(t[st.expando])return t;var e,n,r,i=t.type,o=t,a=this.fixHooks[i];for(a||(this.fixHooks[i]=a=Mt.test(i)?this.mouseHooks:Ft.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,t=new st.Event(o),e=r.length;e--;)n=r[e],t[n]=o[n];return t.target||(t.target=o.srcElement||gt),3===t.target.nodeType&&(t.target=t.target.parentNode),t.metaKey=!!t.metaKey,a.filter?a.filter(t,o):t},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var n,r,i,o=e.button,a=e.fromElement;return null==t.pageX&&null!=e.clientX&&(r=t.target.ownerDocument||gt,i=r.documentElement,n=r.body,t.pageX=e.clientX+(i&&i.scrollLeft||n&&n.scrollLeft||0)-(i&&i.clientLeft||n&&n.clientLeft||0),t.pageY=e.clientY+(i&&i.scrollTop||n&&n.scrollTop||0)-(i&&i.clientTop||n&&n.clientTop||0)),!t.relatedTarget&&a&&(t.relatedTarget=a===t.target?e.toElement:a),t.which||void 0===o||(t.which=1&o?1:2&o?3:4&o?2:0),t}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==y()&&this.focus)try{return this.focus(),!1}catch(t){}},delegateType:"focusin"},blur:{trigger:function(){if(this===y()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(st.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1},_default:function(t){return st.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,n,r){var i=st.extend(new st.Event,n,{type:t,isSimulated:!0,originalEvent:{}});r?st.event.trigger(i,null,e):st.event.dispatch.call(e,i),i.isDefaultPrevented()&&n.preventDefault()}},st.removeEvent=gt.removeEventListener?function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n,!1)}:function(t,e,n){var r="on"+e;t.detachEvent&&(typeof t[r]===xt&&(t[r]=null),t.detachEvent(r,n))},st.Event=function(t,e){if(!(this instanceof st.Event))return new st.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?m:g):this.type=t,e&&st.extend(this,e),this.timeStamp=t&&t.timeStamp||st.now(),this[st.expando]=!0},st.Event.prototype={isDefaultPrevented:g,isPropagationStopped:g,isImmediatePropagationStopped:g,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=m,t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=m,t&&(t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0)},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=m,t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),this.stopPropagation()}},st.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){st.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=this,i=t.relatedTarget,o=t.handleObj;return i&&(i===r||st.contains(r,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}}),at.submitBubbles||(st.event.special.submit={setup:function(){if(st.nodeName(this,"form"))return!1;st.event.add(this,"click._submit keypress._submit",function(t){var e=t.target,n=st.nodeName(e,"input")||st.nodeName(e,"button")?e.form:void 0;n&&!st._data(n,"submitBubbles")&&(st.event.add(n,"submit._submit",function(t){t._submit_bubble=!0}),st._data(n,"submitBubbles",!0))})},postDispatch:function(t){t._submit_bubble&&(delete t._submit_bubble,this.parentNode&&!t.isTrigger&&st.event.simulate("submit",this.parentNode,t,!0))},teardown:function(){if(st.nodeName(this,"form"))return!1;st.event.remove(this,"._submit")}}),at.changeBubbles||(st.event.special.change={setup:function(){if(Dt.test(this.nodeName))return"checkbox"!==this.type&&"radio"!==this.type||(st.event.add(this,"propertychange._change",function(t){"checked"===t.originalEvent.propertyName&&(this._just_changed=!0)}),st.event.add(this,"click._change",function(t){this._just_changed&&!t.isTrigger&&(this._just_changed=!1),st.event.simulate("change",this,t,!0)})),!1;st.event.add(this,"beforeactivate._change",function(t){var e=t.target;Dt.test(e.nodeName)&&!st._data(e,"changeBubbles")&&(st.event.add(e,"change._change",function(t){!this.parentNode||t.isSimulated||t.isTrigger||st.event.simulate("change",this.parentNode,t,!0)}),st._data(e,"changeBubbles",!0))})},handle:function(t){var e=t.target;if(this!==e||t.isSimulated||t.isTrigger||"radio"!==e.type&&"checkbox"!==e.type)return t.handleObj.handler.apply(this,arguments)},teardown:function(){return st.event.remove(this,"._change"),!Dt.test(this.nodeName)}}),at.focusinBubbles||st.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){st.event.simulate(e,t.target,st.event.fix(t),!0)};st.event.special[e]={setup:function(){var r=this.ownerDocument||this,i=st._data(r,e);i||r.addEventListener(t,n,!0),st._data(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=st._data(r,e)-1;i?st._data(r,e,i):(r.removeEventListener(t,n,!0),st._removeData(r,e))}}}),st.fn.extend({on:function(t,e,n,r,i){var o,a;if("object"==typeof t){"string"!=typeof e&&(n=n||e,e=void 0);for(o in t)this.on(o,e,n,t[o],i);return this}if(null==n&&null==r?(r=e,n=e=void 0):null==r&&("string"==typeof e?(r=n,n=void 0):(r=n,n=e,e=void 0)),!1===r)r=g;else if(!r)return this;return 1===i&&(a=r,r=function(t){return st().off(t),a.apply(this,arguments)},r.guid=a.guid||(a.guid=st.guid++)),this.each(function(){st.event.add(this,t,r,n,e)})},one:function(t,e,n,r){return this.on(t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,st(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof t){for(i in t)this.off(i,e,t[i]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=g),this.each(function(){st.event.remove(this,t,n,e)})},trigger:function(t,e){return this.each(function(){st.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return st.event.trigger(t,e,n,!0)}});var It="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Bt=/ jQuery\d+="(?:null|\d+)"/g,zt=new RegExp("<(?:"+It+")[\\s/>]","i"),Ht=/^\s+/,qt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Wt=/<([\w:]+)/,Ut=/<tbody/i,Vt=/<|&#?\w+;/,Qt=/<(?:script|style|link)/i,$t=/checked\s*(?:[^=]|=\s*.checked.)/i,Kt=/^$|\/(?:java|ecma)script/i,Gt=/^true\/(.*)/,Xt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Yt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:at.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Zt=b(gt),Jt=Zt.appendChild(gt.createElement("div"));Yt.optgroup=Yt.option,Yt.tbody=Yt.tfoot=Yt.colgroup=Yt.caption=Yt.thead,Yt.th=Yt.td,st.extend({clone:function(t,e,n){var r,i,o,a,s,u=st.contains(t.ownerDocument,t);if(at.html5Clone||st.isXMLDoc(t)||!zt.test("<"+t.nodeName+">")?o=t.cloneNode(!0):(Jt.innerHTML=t.outerHTML,Jt.removeChild(o=Jt.firstChild)),!(at.noCloneEvent&&at.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||st.isXMLDoc(t)))for(r=_(o),s=_(t),a=0;null!=(i=s[a]);++a)r[a]&&O(i,r[a]);if(e)if(n)for(s=s||_(t),r=r||_(o),a=0;null!=(i=s[a]);a++)j(i,r[a]);else j(t,o);return r=_(o,"script"),r.length>0&&x(r,!u&&_(t,"script")),r=s=i=null,o},buildFragment:function(t,e,n,r){for(var i,o,a,s,u,c,l,f=t.length,d=b(e),h=[],p=0;p<f;p++)if((o=t[p])||0===o)if("object"===st.type(o))st.merge(h,o.nodeType?[o]:o);else if(Vt.test(o)){for(s=s||d.appendChild(e.createElement("div")),u=(Wt.exec(o)||["",""])[1].toLowerCase(),l=Yt[u]||Yt._default,s.innerHTML=l[1]+o.replace(qt,"<$1></$2>")+l[2],i=l[0];i--;)s=s.lastChild;if(!at.leadingWhitespace&&Ht.test(o)&&h.push(e.createTextNode(Ht.exec(o)[0])),!at.tbody)for(o="table"!==u||Ut.test(o)?"<table>"!==l[1]||Ut.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;i--;)st.nodeName(c=o.childNodes[i],"tbody")&&!c.childNodes.length&&o.removeChild(c);for(st.merge(h,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=d.lastChild}else h.push(e.createTextNode(o));for(s&&d.removeChild(s),at.appendChecked||st.grep(_(h,"input"),w),p=0;o=h[p++];)if((!r||-1===st.inArray(o,r))&&(a=st.contains(o.ownerDocument,o),s=_(d.appendChild(o),"script"),a&&x(s),n))for(i=0;o=s[i++];)Kt.test(o.type||"")&&n.push(o);return s=null,d},cleanData:function(t,e){for(var n,r,i,o,a=0,s=st.expando,u=st.cache,c=at.deleteExpando,l=st.event.special;null!=(n=t[a]);a++)if((e||st.acceptData(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)l[r]?st.event.remove(n,r):st.removeEvent(n,r,o.handle);u[i]&&(delete u[i],c?delete n[s]:typeof n.removeAttribute!==xt?n.removeAttribute(s):n[s]=null,Z.push(i))}}}),st.fn.extend({text:function(t){return Pt(this,function(t){return void 0===t?st.text(this):this.empty().append((this[0]&&this[0].ownerDocument||gt).createTextNode(t))},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){C(this,t).appendChild(t)}})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=C(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var n,r=t?st.filter(t,this):this,i=0;null!=(n=r[i]);i++)e||1!==n.nodeType||st.cleanData(_(n)),n.parentNode&&(e&&st.contains(n.ownerDocument,n)&&x(_(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&st.cleanData(_(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&st.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return st.clone(this,t,e)})},html:function(t){return Pt(this,function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(Bt,""):void 0;if("string"==typeof t&&!Qt.test(t)&&(at.htmlSerialize||!zt.test(t))&&(at.leadingWhitespace||!Ht.test(t))&&!Yt[(Wt.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(qt,"<$1></$2>");try{for(;n<r;n++)e=this[n]||{},1===e.nodeType&&(st.cleanData(_(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=arguments[0];return this.domManip(arguments,function(e){t=this.parentNode,st.cleanData(_(this)),t&&t.replaceChild(e,this)}),t&&(t.length||t.nodeType)?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(t,e){t=tt.apply([],t);var n,r,i,o,a,s,u=0,c=this.length,l=this,f=c-1,d=t[0],h=st.isFunction(d);if(h||c>1&&"string"==typeof d&&!at.checkClone&&$t.test(d))return this.each(function(n){var r=l.eq(n);h&&(t[0]=d.call(this,n,r.html())),r.domManip(t,e)});if(c&&(s=st.buildFragment(t,this[0].ownerDocument,!1,this),n=s.firstChild,1===s.childNodes.length&&(s=n),n)){for(o=st.map(_(s,"script"),k),i=o.length;u<c;u++)r=s,u!==f&&(r=st.clone(r,!0,!0),i&&st.merge(o,_(r,"script"))),e.call(this[u],r,u);if(i)for(a=o[o.length-1].ownerDocument,st.map(o,E),u=0;u<i;u++)r=o[u],Kt.test(r.type||"")&&!st._data(r,"globalEval")&&st.contains(a,r)&&(r.src?st._evalUrl&&st._evalUrl(r.src):st.globalEval((r.text||r.textContent||r.innerHTML||"").replace(Xt,"")));s=n=null}return this}}),st.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){st.fn[t]=function(t){for(var n,r=0,i=[],o=st(t),a=o.length-1;r<=a;r++)n=r===a?this:this.clone(!0),st(o[r])[e](n),et.apply(i,n.get());return this.pushStack(i)}});var te,ee={};!function(){var t;at.shrinkWrapBlocks=function(){if(null!=t)return t;t=!1;var e,n,r;return(n=gt.getElementsByTagName("body")[0])&&n.style?(e=gt.createElement("div"),r=gt.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(e),typeof e.style.zoom!==xt&&(e.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",e.appendChild(gt.createElement("div")).style.width="5px",t=3!==e.offsetWidth),n.removeChild(r),t):void 0}}();var ne,re,ie=/^margin/,oe=new RegExp("^("+St+")(?!px)[a-z%]+$","i"),ae=/^(top|right|bottom|left)$/;n.getComputedStyle?(ne=function(t){return t.ownerDocument.defaultView.getComputedStyle(t,null)},re=function(t,e,n){var r,i,o,a,s=t.style;return n=n||ne(t),a=n?n.getPropertyValue(e)||n[e]:void 0,n&&(""!==a||st.contains(t.ownerDocument,t)||(a=st.style(t,e)),oe.test(a)&&ie.test(e)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0===a?a:a+""}):gt.documentElement.currentStyle&&(ne=function(t){return t.currentStyle},re=function(t,e,n){var r,i,o,a,s=t.style;return n=n||ne(t),a=n?n[e]:void 0,null==a&&s&&s[e]&&(a=s[e]),oe.test(a)&&!ae.test(e)&&(r=s.left,i=t.runtimeStyle,o=i&&i.left,o&&(i.left=t.currentStyle.left),s.left="fontSize"===e?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"}),function(){function t(){var t,e,r,i;(e=gt.getElementsByTagName("body")[0])&&e.style&&(t=gt.createElement("div"),r=gt.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",e.appendChild(r).appendChild(t),t.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",o=a=!1,u=!0,n.getComputedStyle&&(o="1%"!==(n.getComputedStyle(t,null)||{}).top,a="4px"===(n.getComputedStyle(t,null)||{width:"4px"}).width,i=t.appendChild(gt.createElement("div")),i.style.cssText=t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",t.style.width="1px",u=!parseFloat((n.getComputedStyle(i,null)||{}).marginRight)),t.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=t.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",s=0===i[0].offsetHeight,s&&(i[0].style.display="",i[1].style.display="none",s=0===i[0].offsetHeight),e.removeChild(r))}var e,r,i,o,a,s,u;e=gt.createElement("div"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",i=e.getElementsByTagName("a")[0],(r=i&&i.style)&&(r.cssText="float:left;opacity:.5",at.opacity="0.5"===r.opacity,at.cssFloat=!!r.cssFloat,e.style.backgroundClip="content-box",e.cloneNode(!0).style.backgroundClip="",at.clearCloneStyle="content-box"===e.style.backgroundClip,at.boxSizing=""===r.boxSizing||""===r.MozBoxSizing||""===r.WebkitBoxSizing,st.extend(at,{reliableHiddenOffsets:function(){return null==s&&t(),s},boxSizingReliable:function(){return null==a&&t(),a},pixelPosition:function(){return null==o&&t(),o},reliableMarginRight:function(){return null==u&&t(),u}}))}(),st.swap=function(t,e,n,r){var i,o,a={};for(o in e)a[o]=t.style[o],t.style[o]=e[o];i=n.apply(t,r||[]);for(o in e)t.style[o]=a[o];return i};var se=/alpha\([^)]*\)/i,ue=/opacity\s*=\s*([^)]*)/,ce=/^(none|table(?!-c[ea]).+)/,le=new RegExp("^("+St+")(.*)$","i"),fe=new RegExp("^([+-])=("+St+")","i"),de={position:"absolute",visibility:"hidden",display:"block"},he={letterSpacing:"0",fontWeight:"400"},pe=["Webkit","O","Moz","ms"];st.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=re(t,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:at.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,a,s=st.camelCase(e),u=t.style;if(e=st.cssProps[s]||(st.cssProps[s]=P(u,s)),a=st.cssHooks[e]||st.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(t,!1,r))?i:u[e];if(o=typeof n,"string"===o&&(i=fe.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(st.css(t,e)),o="number"),null!=n&&n===n&&("number"!==o||st.cssNumber[s]||(n+="px"),at.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(t,n,r)))))try{u[e]=n}catch(t){}}},css:function(t,e,n,r){var i,o,a,s=st.camelCase(e);return e=st.cssProps[s]||(st.cssProps[s]=P(t.style,s)),a=st.cssHooks[e]||st.cssHooks[s],a&&"get"in a&&(o=a.get(t,!0,n)),void 0===o&&(o=re(t,e,r)),"normal"===o&&e in he&&(o=he[e]),""===n||n?(i=parseFloat(o),!0===n||st.isNumeric(i)?i||0:o):o}}),st.each(["height","width"],function(t,e){st.cssHooks[e]={get:function(t,n,r){if(n)return ce.test(st.css(t,"display"))&&0===t.offsetWidth?st.swap(t,de,function(){return M(t,e,r)}):M(t,e,r)},set:function(t,n,r){var i=r&&ne(t);return D(t,n,r?F(t,e,r,at.boxSizing&&"border-box"===st.css(t,"boxSizing",!1,i),i):0)}}}),at.opacity||(st.cssHooks.opacity={get:function(t,e){return ue.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var n=t.style,r=t.currentStyle,i=st.isNumeric(e)?"alpha(opacity="+100*e+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(e>=1||""===e)&&""===st.trim(o.replace(se,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===e||r&&!r.filter)||(n.filter=se.test(o)?o.replace(se,i):o+" "+i)}}),st.cssHooks.marginRight=A(at.reliableMarginRight,function(t,e){if(e)return st.swap(t,{display:"inline-block"},re,[t,"marginRight"])}),st.each({margin:"",padding:"",border:"Width"},function(t,e){st.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+Tt[r]+e]=o[r]||o[r-2]||o[0];return i}},ie.test(t)||(st.cssHooks[t+e].set=D)}),st.fn.extend({css:function(t,e){return Pt(this,function(t,e,n){var r,i,o={},a=0;if(st.isArray(e)){for(r=ne(t),i=e.length;a<i;a++)o[e[a]]=st.css(t,e[a],!1,r);return o}return void 0!==n?st.style(t,e,n):st.css(t,e)},t,e,arguments.length>1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){At(this)?st(this).show():st(this).hide()})}}),st.Tween=R,R.prototype={constructor:R,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||"swing",this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(st.cssNumber[n]?"":"px")},cur:function(){var t=R.propHooks[this.prop];return t&&t.get?t.get(this):R.propHooks._default.get(this)},run:function(t){var e,n=R.propHooks[this.prop];return this.options.duration?this.pos=e=st.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):R.propHooks._default.set(this),this}},R.prototype.init.prototype=R.prototype,R.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=st.css(t.elem,t.prop,""),e&&"auto"!==e?e:0):t.elem[t.prop]},set:function(t){st.fx.step[t.prop]?st.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[st.cssProps[t.prop]]||st.cssHooks[t.prop])?st.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},R.propHooks.scrollTop=R.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},st.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},st.fx=R.prototype.init,st.fx.step={};var ve,me,ge=/^(?:toggle|show|hide)$/,ye=new RegExp("^(?:([+-])=|)("+St+")([a-z%]*)$","i"),be=/queueHooks$/,_e=[z],we={"*":[function(t,e){var n=this.createTween(t,e),r=n.cur(),i=ye.exec(e),o=i&&i[3]||(st.cssNumber[t]?"":"px"),a=(st.cssNumber[t]||"px"!==o&&+r)&&ye.exec(st.css(n.elem,t)),s=1,u=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do{s=s||".5",a/=s,st.style(n.elem,t,a+o)}while(s!==(s=n.cur()/r)&&1!==s&&--u)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};st.Animation=st.extend(q,{tweener:function(t,e){st.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var n,r=0,i=t.length;r<i;r++)n=t[r],we[n]=we[n]||[],we[n].unshift(e)},prefilter:function(t,e){e?_e.unshift(t):_e.push(t)}}),st.speed=function(t,e,n){var r=t&&"object"==typeof t?st.extend({},t):{complete:n||!n&&e||st.isFunction(t)&&t,duration:t,easing:n&&e||e&&!st.isFunction(e)&&e};return r.duration=st.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in st.fx.speeds?st.fx.speeds[r.duration]:st.fx.speeds._default,null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){st.isFunction(r.old)&&r.old.call(this),r.queue&&st.dequeue(this,r.queue)},r},st.fn.extend({fadeTo:function(t,e,n,r){return this.filter(At).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=st.isEmptyObject(t),o=st.speed(e,n,r),a=function(){var e=q(this,st.extend({},t),o);(i||st._data(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&!1!==t&&this.queue(t||"fx",[]),this.each(function(){var e=!0,i=null!=t&&t+"queueHooks",o=st.timers,a=st._data(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&be.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=t&&o[i].queue!==t||(o[i].anim.stop(n),e=!1,o.splice(i,1));!e&&n||st.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,n=st._data(this),r=n[t+"queue"],i=n[t+"queueHooks"],o=st.timers,a=r?r.length:0;for(n.finish=!0,st.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<a;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish})}}),st.each(["toggle","show","hide"],function(t,e){var n=st.fn[e];st.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(I(e,!0),t,r,i)}}),st.each({slideDown:I("show"),slideUp:I("hide"),slideToggle:I("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){st.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}}),st.timers=[],st.fx.tick=function(){var t,e=st.timers,n=0;for(ve=st.now();n<e.length;n++)(t=e[n])()||e[n]!==t||e.splice(n--,1);e.length||st.fx.stop(),ve=void 0},st.fx.timer=function(t){st.timers.push(t),t()?st.fx.start():st.timers.pop()},st.fx.interval=13,st.fx.start=function(){me||(me=setInterval(st.fx.tick,st.fx.interval))},st.fx.stop=function(){clearInterval(me),me=null},st.fx.speeds={slow:600,fast:200,_default:400},st.fn.delay=function(t,e){return t=st.fx?st.fx.speeds[t]||t:t,e=e||"fx",this.queue(e,function(e,n){var r=setTimeout(e,t);n.stop=function(){clearTimeout(r)}})},function(){var t,e,n,r,i;e=gt.createElement("div"),e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",r=e.getElementsByTagName("a")[0],n=gt.createElement("select"),i=n.appendChild(gt.createElement("option")),t=e.getElementsByTagName("input")[0],r.style.cssText="top:1px",at.getSetAttribute="t"!==e.className,at.style=/top/.test(r.getAttribute("style")),at.hrefNormalized="/a"===r.getAttribute("href"),at.checkOn=!!t.value,at.optSelected=i.selected,at.enctype=!!gt.createElement("form").enctype,n.disabled=!0,at.optDisabled=!i.disabled,t=gt.createElement("input"),t.setAttribute("value",""),at.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),at.radioValue="t"===t.value}();var Ce=/\r/g;st.fn.extend({val:function(t){var e,n,r,i=this[0];{if(arguments.length)return r=st.isFunction(t),this.each(function(n){var i;1===this.nodeType&&(i=r?t.call(this,n,st(this).val()):t,null==i?i="":"number"==typeof i?i+="":st.isArray(i)&&(i=st.map(i,function(t){return null==t?"":t+""})),(e=st.valHooks[this.type]||st.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))});if(i)return(e=st.valHooks[i.type]||st.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Ce,""):null==n?"":n)}}}),st.extend({valHooks:{option:{get:function(t){var e=st.find.attr(t,"value");return null!=e?e:st.trim(st.text(t))}},select:{get:function(t){for(var e,n,r=t.options,i=t.selectedIndex,o="select-one"===t.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u<s;u++)if(n=r[u],(n.selected||u===i)&&(at.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!st.nodeName(n.parentNode,"optgroup"))){if(e=st(n).val(),o)return e;a.push(e)}return a},set:function(t,e){for(var n,r,i=t.options,o=st.makeArray(e),a=i.length;a--;)if(r=i[a],st.inArray(st.valHooks.option.get(r),o)>=0)try{r.selected=n=!0}catch(t){r.scrollHeight}else r.selected=!1;return n||(t.selectedIndex=-1),i}}}}),st.each(["radio","checkbox"],function(){st.valHooks[this]={set:function(t,e){if(st.isArray(e))return t.checked=st.inArray(st(t).val(),e)>=0}},at.checkOn||(st.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var ke,Ee,xe=st.expr.attrHandle,je=/^(?:checked|selected)$/i,Oe=at.getSetAttribute,Se=at.input;st.fn.extend({attr:function(t,e){return Pt(this,st.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){st.removeAttr(this,t)})}}),st.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(t&&3!==o&&8!==o&&2!==o)return typeof t.getAttribute===xt?st.prop(t,e,n):(1===o&&st.isXMLDoc(t)||(e=e.toLowerCase(),r=st.attrHooks[e]||(st.expr.match.bool.test(e)?Ee:ke)),void 0===n?r&&"get"in r&&null!==(i=r.get(t,e))?i:(i=st.find.attr(t,e),null==i?void 0:i):null!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):void st.removeAttr(t,e))},removeAttr:function(t,e){var n,r,i=0,o=e&&e.match(wt);if(o&&1===t.nodeType)for(;n=o[i++];)r=st.propFix[n]||n,st.expr.match.bool.test(n)?Se&&Oe||!je.test(n)?t[r]=!1:t[st.camelCase("default-"+n)]=t[r]=!1:st.attr(t,n,""),t.removeAttribute(Oe?n:r)},attrHooks:{type:{set:function(t,e){if(!at.radioValue&&"radio"===e&&st.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}}}),Ee={set:function(t,e,n){return!1===e?st.removeAttr(t,n):Se&&Oe||!je.test(n)?t.setAttribute(!Oe&&st.propFix[n]||n,n):t[st.camelCase("default-"+n)]=t[n]=!0,n}},st.each(st.expr.match.bool.source.match(/\w+/g),function(t,e){var n=xe[e]||st.find.attr;xe[e]=Se&&Oe||!je.test(e)?function(t,e,r){var i,o;return r||(o=xe[e],xe[e]=i,i=null!=n(t,e,r)?e.toLowerCase():null,xe[e]=o),i}:function(t,e,n){if(!n)return t[st.camelCase("default-"+e)]?e.toLowerCase():null}}),Se&&Oe||(st.attrHooks.value={set:function(t,e,n){if(!st.nodeName(t,"input"))return ke&&ke.set(t,e,n);t.defaultValue=e}}),Oe||(ke={set:function(t,e,n){var r=t.getAttributeNode(n);if(r||t.setAttributeNode(r=t.ownerDocument.createAttribute(n)),r.value=e+="","value"===n||e===t.getAttribute(n))return e}},xe.id=xe.name=xe.coords=function(t,e,n){var r;if(!n)return(r=t.getAttributeNode(e))&&""!==r.value?r.value:null},st.valHooks.button={get:function(t,e){var n=t.getAttributeNode(e);if(n&&n.specified)return n.value},set:ke.set},st.attrHooks.contenteditable={set:function(t,e,n){ke.set(t,""!==e&&e,n)}},st.each(["width","height"],function(t,e){st.attrHooks[e]={set:function(t,n){if(""===n)return t.setAttribute(e,"auto"),n}}})),at.style||(st.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var Te=/^(?:input|select|textarea|button|object)$/i,Ae=/^(?:a|area)$/i;st.fn.extend({prop:function(t,e){return Pt(this,st.prop,t,e,arguments.length>1)},removeProp:function(t){return t=st.propFix[t]||t,this.each(function(){try{this[t]=void 0,delete this[t]}catch(t){}})}}),st.extend({propFix:{for:"htmlFor",class:"className"},prop:function(t,e,n){var r,i,o,a=t.nodeType;if(t&&3!==a&&8!==a&&2!==a)return o=1!==a||!st.isXMLDoc(t),o&&(e=st.propFix[e]||e,i=st.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=st.find.attr(t,"tabindex");return e?parseInt(e,10):Te.test(t.nodeName)||Ae.test(t.nodeName)&&t.href?0:-1}}}}),at.hrefNormalized||st.each(["href","src"],function(t,e){st.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),at.optSelected||(st.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}}),st.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){st.propFix[this.toLowerCase()]=this}),at.enctype||(st.propFix.enctype="encoding");var Pe=/[\t\r\n\f]/g;st.fn.extend({addClass:function(t){var e,n,r,i,o,a,s=0,u=this.length,c="string"==typeof t&&t;if(st.isFunction(t))return this.each(function(e){st(this).addClass(t.call(this,e,this.className))});if(c)for(e=(t||"").match(wt)||[];s<u;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Pe," "):" ")){for(o=0;i=e[o++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");a=st.trim(r),n.className!==a&&(n.className=a)}return this},removeClass:function(t){var e,n,r,i,o,a,s=0,u=this.length,c=0===arguments.length||"string"==typeof t&&t;if(st.isFunction(t))return this.each(function(e){st(this).removeClass(t.call(this,e,this.className))});if(c)for(e=(t||"").match(wt)||[];s<u;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Pe," "):"")){for(o=0;i=e[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");a=t?st.trim(r):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):st.isFunction(t)?this.each(function(n){st(this).toggleClass(t.call(this,n,this.className,e),e)}):this.each(function(){if("string"===n)for(var e,r=0,i=st(this),o=t.match(wt)||[];e=o[r++];)i.hasClass(e)?i.removeClass(e):i.addClass(e);else n!==xt&&"boolean"!==n||(this.className&&st._data(this,"__className__",this.className),this.className=this.className||!1===t?"":st._data(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",n=0,r=this.length;n<r;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(Pe," ").indexOf(e)>=0)return!0;return!1}}),st.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){st.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),st.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}});var Ne=st.now(),De=/\?/,Fe=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;st.parseJSON=function(t){if(n.JSON&&n.JSON.parse)return n.JSON.parse(t+"");var e,r=null,i=st.trim(t+"");return i&&!st.trim(i.replace(Fe,function(t,n,i,o){return e&&n&&(r=0),0===r?t:(e=i||n,r+=!o-!i,"")}))?Function("return "+i)():st.error("Invalid JSON: "+t)},st.parseXML=function(t){var e,r;if(!t||"string"!=typeof t)return null;try{n.DOMParser?(r=new DOMParser,e=r.parseFromString(t,"text/xml")):(e=new ActiveXObject("Microsoft.XMLDOM"),e.async="false",e.loadXML(t))}catch(t){e=void 0}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length||st.error("Invalid XML: "+t),e};var Me,Re,Le=/#.*$/,Ie=/([?&])_=[^&]*/,Be=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,ze=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,He=/^(?:GET|HEAD)$/,qe=/^\/\//,We=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ue={},Ve={},Qe="*/".concat("*");try{Re=location.href}catch(t){Re=gt.createElement("a"),Re.href="",Re=Re.href}Me=We.exec(Re.toLowerCase())||[],st.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Re,type:"GET",isLocal:ze.test(Me[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qe,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":st.parseJSON,"text xml":st.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?V(V(t,st.ajaxSettings),e):V(st.ajaxSettings,t)},ajaxPrefilter:W(Ue),ajaxTransport:W(Ve),ajax:function(t,e){function n(t,e,n,r){var i,l,g,y,_,C=e;2!==b&&(b=2,s&&clearTimeout(s),c=void 0,a=r||"",w.readyState=t>0?4:0,i=t>=200&&t<300||304===t,n&&(y=Q(f,w,n)),y=$(f,y,w,i),i?(f.ifModified&&(_=w.getResponseHeader("Last-Modified"),_&&(st.lastModified[o]=_),(_=w.getResponseHeader("etag"))&&(st.etag[o]=_)),204===t||"HEAD"===f.type?C="nocontent":304===t?C="notmodified":(C=y.state,l=y.data,g=y.error,i=!g)):(g=C,!t&&C||(C="error",t<0&&(t=0))),w.status=t,w.statusText=(e||C)+"",i?p.resolveWith(d,[l,C,w]):p.rejectWith(d,[w,C,g]),w.statusCode(m),m=void 0,u&&h.trigger(i?"ajaxSuccess":"ajaxError",[w,f,i?l:g]),v.fireWith(d,[w,C]),u&&(h.trigger("ajaxComplete",[w,f]),--st.active||st.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var r,i,o,a,s,u,c,l,f=st.ajaxSetup({},e),d=f.context||f,h=f.context&&(d.nodeType||d.jquery)?st(d):st.event,p=st.Deferred(),v=st.Callbacks("once memory"),m=f.statusCode||{},g={},y={},b=0,_="canceled",w={readyState:0,getResponseHeader:function(t){var e;if(2===b){if(!l)for(l={};e=Be.exec(a);)l[e[1].toLowerCase()]=e[2];e=l[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return b||(t=y[n]=y[n]||t,g[t]=e),this},overrideMimeType:function(t){return b||(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(b<2)for(e in t)m[e]=[m[e],t[e]];else w.always(t[w.status]);return this},abort:function(t){var e=t||_;return c&&c.abort(e),n(0,e),this}};if(p.promise(w).complete=v.add,w.success=w.done,w.error=w.fail,f.url=((t||f.url||Re)+"").replace(Le,"").replace(qe,Me[1]+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=st.trim(f.dataType||"*").toLowerCase().match(wt)||[""],null==f.crossDomain&&(r=We.exec(f.url.toLowerCase()),f.crossDomain=!(!r||r[1]===Me[1]&&r[2]===Me[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(Me[3]||("http:"===Me[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=st.param(f.data,f.traditional)),U(Ue,f,e,w),2===b)return w;u=f.global,u&&0==st.active++&&st.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!He.test(f.type),o=f.url,f.hasContent||(f.data&&(o=f.url+=(De.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(f.url=Ie.test(o)?o.replace(Ie,"$1_="+Ne++):o+(De.test(o)?"&":"?")+"_="+Ne++)),f.ifModified&&(st.lastModified[o]&&w.setRequestHeader("If-Modified-Since",st.lastModified[o]),st.etag[o]&&w.setRequestHeader("If-None-Match",st.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&w.setRequestHeader("Content-Type",f.contentType),w.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Qe+"; q=0.01":""):f.accepts["*"]);for(i in f.headers)w.setRequestHeader(i,f.headers[i]);if(f.beforeSend&&(!1===f.beforeSend.call(d,w,f)||2===b))return w.abort();_="abort";for(i in{success:1,error:1,complete:1})w[i](f[i]);if(c=U(Ve,f,e,w)){w.readyState=1,u&&h.trigger("ajaxSend",[w,f]),f.async&&f.timeout>0&&(s=setTimeout(function(){w.abort("timeout")},f.timeout));try{b=1,c.send(g,n)}catch(t){if(!(b<2))throw t;n(-1,t)}}else n(-1,"No Transport");return w},getJSON:function(t,e,n){return st.get(t,e,n,"json")},getScript:function(t,e){return st.get(t,void 0,e,"script")}}),st.each(["get","post"],function(t,e){st[e]=function(t,n,r,i){return st.isFunction(n)&&(i=i||r,r=n,n=void 0),st.ajax({url:t,type:e,dataType:i,data:n,success:r})}}),st.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){st.fn[e]=function(t){return this.on(e,t)}}),st._evalUrl=function(t){return st.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},st.fn.extend({wrapAll:function(t){if(st.isFunction(t))return this.each(function(e){st(this).wrapAll(t.call(this,e))});if(this[0]){var e=st(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(t){return st.isFunction(t)?this.each(function(e){st(this).wrapInner(t.call(this,e))}):this.each(function(){var e=st(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=st.isFunction(t);return this.each(function(n){st(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){st.nodeName(this,"body")||st(this).replaceWith(this.childNodes)}).end()}}),st.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0||!at.reliableHiddenOffsets()&&"none"===(t.style&&t.style.display||st.css(t,"display"))},st.expr.filters.visible=function(t){return!st.expr.filters.hidden(t)};var $e=/%20/g,Ke=/\[\]$/,Ge=/\r?\n/g,Xe=/^(?:submit|button|image|reset|file)$/i,Ye=/^(?:input|select|textarea|keygen)/i;st.param=function(t,e){var n,r=[],i=function(t,e){e=st.isFunction(e)?e():null==e?"":e,r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=st.ajaxSettings&&st.ajaxSettings.traditional),st.isArray(t)||t.jquery&&!st.isPlainObject(t))st.each(t,function(){i(this.name,this.value)});else for(n in t)K(n,t[n],e,i);return r.join("&").replace($e,"+")},st.fn.extend({serialize:function(){return st.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=st.prop(this,"elements");return t?st.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!st(this).is(":disabled")&&Ye.test(this.nodeName)&&!Xe.test(t)&&(this.checked||!Nt.test(t))}).map(function(t,e){var n=st(this).val();return null==n?null:st.isArray(n)?st.map(n,function(t){return{name:e.name,value:t.replace(Ge,"\r\n")}}):{name:e.name,value:n.replace(Ge,"\r\n")}}).get()}}),st.ajaxSettings.xhr=void 0!==n.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&G()||X()}:G;var Ze=0,Je={},tn=st.ajaxSettings.xhr();n.ActiveXObject&&st(n).on("unload",function(){for(var t in Je)Je[t](void 0,!0)}),at.cors=!!tn&&"withCredentials"in tn,tn=at.ajax=!!tn,tn&&st.ajaxTransport(function(t){if(!t.crossDomain||at.cors){var e;return{send:function(n,r){var i,o=t.xhr(),a=++Ze;if(o.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(i in t.xhrFields)o[i]=t.xhrFields[i];t.mimeType&&o.overrideMimeType&&o.overrideMimeType(t.mimeType),t.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)void 0!==n[i]&&o.setRequestHeader(i,n[i]+"");o.send(t.hasContent&&t.data||null),e=function(n,i){var s,u,c;if(e&&(i||4===o.readyState))if(delete Je[a],e=void 0,o.onreadystatechange=st.noop,i)4!==o.readyState&&o.abort();else{c={},s=o.status,"string"==typeof o.responseText&&(c.text=o.responseText);try{u=o.statusText}catch(t){u=""}s||!t.isLocal||t.crossDomain?1223===s&&(s=204):s=c.text?200:404}c&&r(s,u,c,o.getAllResponseHeaders())},t.async?4===o.readyState?setTimeout(e):o.onreadystatechange=Je[a]=e:e()},abort:function(){e&&e(void 0,!0)}}}}),st.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return st.globalEval(t),t}}}),st.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),st.ajaxTransport("script",function(t){if(t.crossDomain){var e,n=gt.head||st("head")[0]||gt.documentElement;return{send:function(r,i){e=gt.createElement("script"),e.async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,n){(n||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,n||i(200,"success"))},n.insertBefore(e,n.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}});var en=[],nn=/(=)\?(?=&|$)|\?\?/;st.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=en.pop()||st.expando+"_"+Ne++;return this[t]=!0,t}}),st.ajaxPrefilter("json jsonp",function(t,e,r){var i,o,a,s=!1!==t.jsonp&&(nn.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&nn.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=st.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(nn,"$1"+i):!1!==t.jsonp&&(t.url+=(De.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||st.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=n[i],n[i]=function(){a=arguments},r.always(function(){n[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,en.push(i)),a&&st.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),st.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||gt;var r=pt.exec(t),i=!n&&[];return r?[e.createElement(r[1])]:(r=st.buildFragment([t],e,i),i&&i.length&&st(i).remove(),st.merge([],r.childNodes))};var rn=st.fn.load;st.fn.load=function(t,e,n){if("string"!=typeof t&&rn)return rn.apply(this,arguments);var r,i,o,a=this,s=t.indexOf(" ");return s>=0&&(r=st.trim(t.slice(s,t.length)),t=t.slice(0,s)),st.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),a.length>0&&st.ajax({url:t,type:o,dataType:"html",data:e}).done(function(t){i=arguments,a.html(r?st("<div>").append(st.parseHTML(t)).find(r):t)}).complete(n&&function(t,e){a.each(n,i||[t.responseText,e,t])}),this},st.expr.filters.animated=function(t){return st.grep(st.timers,function(e){return t===e.elem}).length};var on=n.document.documentElement;st.offset={setOffset:function(t,e,n){var r,i,o,a,s,u,c,l=st.css(t,"position"),f=st(t),d={};"static"===l&&(t.style.position="relative"),s=f.offset(),o=st.css(t,"top"),u=st.css(t,"left"),c=("absolute"===l||"fixed"===l)&&st.inArray("auto",[o,u])>-1,c?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),st.isFunction(e)&&(e=e.call(t,n,s)),null!=e.top&&(d.top=e.top-s.top+a),null!=e.left&&(d.left=e.left-s.left+i),"using"in e?e.using.call(t,d):f.css(d)}},st.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){st.offset.setOffset(this,t,e)});var e,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return e=o.documentElement,st.contains(e,i)?(typeof i.getBoundingClientRect!==xt&&(r=i.getBoundingClientRect()),n=Y(o),{top:r.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:r.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):r},position:function(){if(this[0]){var t,e,n={top:0,left:0},r=this[0];return"fixed"===st.css(r,"position")?e=r.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),st.nodeName(t[0],"html")||(n=t.offset()),n.top+=st.css(t[0],"borderTopWidth",!0),n.left+=st.css(t[0],"borderLeftWidth",!0)),{top:e.top-n.top-st.css(r,"marginTop",!0),left:e.left-n.left-st.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||on;t&&!st.nodeName(t,"html")&&"static"===st.css(t,"position");)t=t.offsetParent;return t||on})}}),st.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n=/Y/.test(e);st.fn[t]=function(r){return Pt(this,function(t,r,i){var o=Y(t);if(void 0===i)return o?e in o?o[e]:o.document.documentElement[r]:t[r];o?o.scrollTo(n?st(o).scrollLeft():i,n?i:st(o).scrollTop()):t[r]=i},t,r,arguments.length,null)}}),st.each(["top","left"],function(t,e){st.cssHooks[e]=A(at.pixelPosition,function(t,n){if(n)return n=re(t,e),oe.test(n)?st(t).position()[e]+"px":n})}),st.each({Height:"height",Width:"width"},function(t,e){st.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,r){st.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===i?"margin":"border");return Pt(this,function(e,n,r){var i;return st.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(i=e.documentElement,Math.max(e.body["scroll"+t],i["scroll"+t],e.body["offset"+t],i["offset"+t],i["client"+t])):void 0===r?st.css(e,n,a):st.style(e,n,r,a)},e,o?r:void 0,o,null)}})}),st.fn.size=function(){return this.length},st.fn.andSelf=st.fn.addBack,r=[],void 0!==(i=function(){return st}.apply(e,r))&&(t.exports=i);var an=n.jQuery,sn=n.$;return st.noConflict=function(t){return n.$===st&&(n.$=sn),t&&n.jQuery===st&&(n.jQuery=an),st},typeof o===xt&&(n.jQuery=n.$=st),st})},,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){(0,m.default)(function(){return c(t)})}function o(t){var e=d(t);return e.set(null),scrivito.ObjReplication.get(t).notifyBackendState(null),e}function a(t){var e=t._id;d(e).isAvailable()||s(e,t),scrivito.ObjReplication.get(e).notifyBackendState(t)}function s(t,e){d(t).set(e)}function u(t,e){d(t).setError(e)}function c(t){var e=d(t);if(void 0!==e.current)return e}function l(){f().clear()}function f(){return g.cmsState.subState("objData")}function d(t){return new p.default(t,f().subState(t))}Object.defineProperty(e,"__esModule",{value:!0}),e.preload=i,e.createObjData=o,e.store=a,e.set=s,e.setError=u,e.get=c,e.clearCache=l;var h=n(162),p=r(h),v=n(13),m=r(v),g=n(4)},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function o(t){if(f===clearTimeout)return clearTimeout(t);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){v&&h&&(v=!1,h.length?p=h.concat(p):m=-1,p.length&&s())}function s(){if(!v){var t=i(a);v=!0;for(var e=p.length;e;){for(h=p,p=[];++m<e;)h&&h[m].run();m=-1,e=p.length}h=null,v=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var l,f,d=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(t){l=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(t){f=r}}();var h,p=[],v=!1,m=-1;d.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];p.push(new u(t,e)),1!==p.length||v||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=c,d.addListener=c,d.once=c,d.off=c,d.removeListener=c,d.removeAllListeners=c,d.emit=c,d.binding=function(t){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(t){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(){var t=l(),e=t.objId;if((0,E.isNull)(e))return e;if(e)try{return scrivito.loadWithDefault(void 0,function(){var t=(0,N.getWindowContext)().appModelAccessor,n=(0,N.getWindowContext)().Obj,r=t.getObj(n,e);if(r)return r;throw new T.ResourceNotFoundError('Obj with id "'+e+'" not found.')})}catch(t){return void scrivito.nextTick(function(){return p(F,t)})}}function o(){return l().queryParameters||{}}function a(){return l().error}function s(t){u(t,function(t){var e=t.obj,n=t.queryParameters,r=t.hash;e&&scrivito.BrowserLocation.replaceWith({obj:e,queryParameters:n,hash:r})})}function u(t,e){if(!(0,E.isFunction)(t))throw new T.ArgumentError("Parameter fn needs to be a function.");var n=d();(0,P.default)(t).then(function(t){return(0,P.default)(function(){return g(t.obj,t.queryParameters,t.hash)})}).then(function(t){var r=t.obj,i=t.url,o=t.queryParameters,a=t.hash;e({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})})}).catch(function(t){t instanceof T.NavigateToEmptyBinaryError||p(n,t)})}function c(){return D.appState.subState("currentPage")}function l(){return c().get()||{}}function f(t){c().set(t)}function d(){return F+=1}function h(t,e){F===t&&e()}function p(t,e){h(t,function(){scrivito.logError(e),f({objId:null,error:e}),m(null)})}function v(t){var e=t.obj,n=t.queryParameters,r=t.hash,i=e&&e.id()||null;f({objId:i,queryParameters:n,hash:r}),m(i)}function m(t){scrivito.uiAdapter&&scrivito.uiAdapter.setCurrentPageId(t)}function g(t,e,n){return _(t),null===t?{}:t instanceof k.default?y(t,e,n):t instanceof S.default?b(t,e,n):void 0}function y(t,e,n){if(w(t)){var r=t.get("blob",["binary"]);if(!r)throw new T.NavigateToEmptyBinaryError;return{url:r.url()}}return{obj:t,queryParameters:e,hash:n}}function b(t,e,n){if(t.isExternal())return{url:t.url()};var r={obj:t.obj(),queryParameters:t.queryParameters(),hash:t.hash()};return e&&!(0,E.isEmpty)(e)&&(r.queryParameters=e),n&&(r.hash=n),g(r.obj,r.queryParameters,r.hash)}function _(t){if(!(0,E.isNull)(t)&&!(t instanceof k.default||t instanceof S.default)){if(!t)throw new T.ArgumentError("Missing target.");throw new T.ArgumentError("Target is invalid. Valid targets are instances of Obj or Link.")}}function w(t){var e=(0,N.getWindowContext)().getClass(t.objClass());return!!e&&j.default.forClass(e).isBinary()}Object.defineProperty(e,"__esModule",{value:!0}),e.setCurrentPage=e.replaceCurrentPage=e.currentPageError=e.currentPageParams=e.currentPage=void 0;var C=n(3),k=r(C),E=n(0),x=n(23),j=r(x),O=n(24),S=r(O),T=n(1),A=n(13),P=r(A),N=n(37),D=n(4),F=0;e.currentPage=i,e.currentPageParams=o,e.currentPageError=a,e.replaceCurrentPage=s,e.setCurrentPage=u},,,,function(t,e,n){"use strict";function r(){return(0,i.getWindowContext)()._privateRealm._registry}Object.defineProperty(e,"__esModule",{value:!0}),e.getWindowRegistry=void 0;var i=n(37);e.getWindowRegistry=r},,function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function o(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e,n){return{field:h(t),operator:d(e),value:l(n)}}function u(t){if(!(0,x.contains)(A,t))throw new O.ArgumentError('Boosting operator "'+t+'" is invalid.')}function c(t){if(!(0,x.contains)(T,t))throw new O.ArgumentError('Negating operator "'+t+'" is invalid.')}function l(t){return(0,x.isArray)(t)?(0,x.map)(t,f):f(t)}function f(t){return(0,x.isDate)(t)?_.formatDateToString(t):t instanceof y.default?t.id():t}function d(t){if(!(0,x.contains)(S,t))throw new O.ArgumentError('Operator "'+t+'" is invalid.');return(0,j.underscore)(t)}function h(t){return(0,x.isArray)(t)?(0,x.map)(t,v):v(t)}function p(t){var e={};return(0,x.each)(t,function(t,n){var r=v(n);e[r]=t}),e}function v(t){if(!(0,j.isCamelCase)(t))throw new O.ArgumentError('Attribute name "'+t+'" is not camel case.');return(0,j.underscore)(t)}Object.defineProperty(e,"__esModule",{value:!0});var m=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),g=n(3),y=i(g),b=n(34),_=r(b),w=n(91),C=r(w),k=n(167),E=i(k),x=n(0),j=n(15),O=n(1),S=["contains","containsPrefix","equals","startsWith","isGreaterThan","isLessThan","linksTo","refersTo"],T=["equals","startsWith","isGreaterThan","isLessThan"],A=["contains","containsPrefix"],P=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,t),this._query=e.query||[],this._batchSize=e.batchSize,this._offset=e.offset,this._sortBy=e.sortBy,this._sortDirection=e.sortDirection,this._includeDeleted=e.includeDeleted}return m(t,[{key:"and",value:function(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(e instanceof t)this._query=[].concat(o(this._query),o(e._query));else{var a=s(e,n,r);i&&(u(n),a.boost=p(i)),this._query.push(a)}return this}},{key:"andNot",value:function(t,e,n){var r=s(t,e,n);return c(e),r.negate=!0,this._query.push(r),this}},{key:"offset",value:function(t){return this._offset=t,this}},{key:"order",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";return this._sortBy=v(t),this._sortDirection=e,this}},{key:"batchSize",value:function(t){return this._batchSize=t,this}},{key:"includeDeleted",value:function(){return this._includeDeleted=!0,this}},{key:"iterator",value:function(){var t=C.get(this.params(),this.getBatchSize()).iterator();return{next:function(){var e=t.next(),n=e.done,r=e.value;return n?{done:n}:{done:n,value:new y.default(r)}}}}},{key:"getBatchSize",value:function(){return this._batchSize||100}},{key:"facet",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new E.default(v(t),e,this._query).result()}},{key:"store",value:function(t){C.store(this.params(),t)}},{key:"params",value:function(){return(0,x.omit)({query:this._query,offset:this._offset,sortBy:this._sortBy,sortDirection:this._sortDirection,includeDeleted:this._includeDeleted,batchSize:this._batchSize},x.isUndefined)}}]),t}();e.default=P},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(3),s=r(a),u=n(23),c=r(u),l=n(1),f=function(){function t(e){i(this,t),this._registry=e}return o(t,[{key:"getObj",value:function(t,e){var n=s.default.get(e);return this._checkObjClassAndWrapInAppClass(t,n)}},{key:"getObjIncludingDeleted",value:function(t,e){var n=s.default.getIncludingDeleted(e);return this._checkObjClassAndWrapInAppClass(t,n)}},{key:"read",value:function(t,e){var n=c.default.basicFieldFor(t,e);if(n){var r=n.get();return scrivito.wrapInAppClass(this._registry,r)}}},{key:"update",value:function(t,e){var n=this._registry.objClassNameFor(t.constructor);if(!n){var r=void 0;throw r=t.constructor===this._registry.defaultClassForObjs?"Obj":"Widget",new l.ArgumentError('Updating is not supported on the base class "'+r+'".')}if(e.constructor!==Object)throw new l.ArgumentError("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");var i=c.default.forInstance(t),o=scrivito.AttributeContentFactory.prepareAttributes(e,i,n);t._scrivitoPrivateContent.update(o)}},{key:"wrapInAppClass",value:function(t){return scrivito.wrapInAppClass(this._registry,t)}},{key:"_checkObjClassAndWrapInAppClass",value:function(t,e){var n=this._registry.objClassNameFor(t);if(n&&n!==e.objClass())throw new l.ResourceNotFoundError('Obj with id "'+e.id()+'" is not of type "'+n+'".');return this.wrapInAppClass(e)}}]),t}();e.default=f},function(t,e){t.exports=function(t){return t.displayName||t.name||"<function"+t.length+">"}},function(t,e,n){var r=n(7),i=n(16);t.exports=function(t,e){r(!(t instanceof e),function(){return"Cannot use the new operator to instantiate the type "+i(e)})}},function(t,e,n){"use strict";function r(t,e){l[t]=e}function i(t){return l[t]||null}function o(t,e){r(u(t),e)}function a(t){return i(u(t))}function s(){l={}}function u(t){return"_scrivitoAppClass-"+(0,c.getWindowRegistry)().objClassNameFor(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.reset=e.registerForId=e.registerForAppClass=e.getById=e.getByAppClass=void 0;var c=n(58),l={};e.getByAppClass=a,e.getById=i,e.registerForAppClass=o,e.registerForId=r,e.reset=s},function(t,e,n){"use strict";function r(){return!!scrivito.uiAdapter&&scrivito.uiAdapter.isEditingMode()}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e){t.exports=ReactDOM},,function(t,e,n){"use strict";function r(t,e){if(!t)return e;if(!e)return null;var n={};return o(t,e,function(r,i,o){"_widget_pool"===r?n._widget_pool=s(i,o):e.hasOwnProperty(r)?o&&(n[r]=o):n[r]=t[r]}),n}function i(t,e){if(!t)return e;if(!e)return null;var n={};return o(t,e,function(t,e,r){if("_widget_pool"===t){var i=c(e,r);d.default.isEmpty(i)||(n._widget_pool=i)}else{var o=u(e,r,function(){if(!d.default.isEqual(e,r))return r});void 0!==o&&(n[t]=o)}}),n}function o(t,e,n){d.default.union(d.default.keys(t),d.default.keys(e)).forEach(function(r){return n(r,a(t[r]),a(e[r]))})}function a(t){if(d.default.isArray(t)){var e=l(t,2),n=e[0],r=e[1];return"binary"===n&&r?[n,d.default.omit(r,"url")]:t}return t}function s(t,e){if(!e||d.default.isEmpty(e))return t;var n={};return o(t||{},e||{},function(t,i,o){e.hasOwnProperty(t)?o&&!i?n[t]=o:o&&(n[t]=r(i,o)):n[t]=i}),n}function u(t,e,n){return!t&&e?e:t&&!e?null:t&&e?n():void 0}function c(t,e){if(t===e)return{};var n={};return o(t,e,function(t,e,r){var o=u(e,r,function(){var t=i(e,r);if(!d.default.isEmpty(t))return t});void 0!==o&&(n[t]=o)}),n}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.apply=r,e.diff=i;var f=n(0),d=function(t){return t&&t.__esModule?t:{default:t}}(f)},,function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){var e=t._obj_class,n=N.default.find(e),r=g.default.generateId();if(!n)return scrivito.Promise.reject(new j.ArgumentError('Please provide a valid CMS object class as the "_obj_class" property.'));var i=s(t),o=v(i,2),u=o[0],c=o[1],f=a(n,u),d=l(r,c);return scrivito.Promise.all([f,d]).then(function(t){var e=v(t,2),n=e[0],i=e[1];return g.default.createWithSerializedAttributes(x.default.extend(n,i,{_id:r}))}).then(function(t){return t.finishSaving().then(function(){return t})})}function o(t){return F.default.find(t).fetchDefaults().then(function(t){return w.default.newWithSerializedAttributes(t)})}function a(t,e){return t.usesServerCallbacks()?t.fetchDefaults(u(e),p()):scrivito.Promise.resolve(e)}function s(t){var e={},n={};return x.default.each(t,function(t,r){c(t)?n[r]=t:e[r]=t}),[e,n]}function u(t){return x.default.mapObject(t,function(t){return x.default.isDate(t)?moment.utc(t).toISOString():t})}function c(t){return b.isFile(t)||t instanceof A.default||t instanceof k.default}function l(t,e){var n=x.default.map(e,function(e,n){return b.isFile(e)?f(t,n,e):e instanceof k.default?d(t,n,e):e instanceof A.default?h(t,n,e):void 0});return scrivito.Promise.all(n).then(x.default.object)}function f(t,e,n){return h(t,e,S.default.upload(n))}function d(t,e,n){return h(t,e,n.copy())}function h(t,e,n){return n.into(t).then(function(t){return[e,["binary",{id:t.id()}]]})}function p(){if(scrivito.applicationDocument().hasCurrentPage())return{current_page_id:scrivito.applicationDocument().pageId()}}Object.defineProperty(e,"__esModule",{value:!0});var v=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.createObjFromLegacyAttributes=i,e.newWidget=o;var m=n(3),g=r(m),y=n(72),b=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(y),_=n(14),w=r(_),C=n(123),k=r(C),E=n(0),x=r(E),j=n(1),O=n(30),S=r(O),T=n(47),A=r(T),P=n(26),N=r(P),D=n(31),F=r(D)},function(t,e,n){"use strict";function r(t){return!!t&&a.default.isNumber(t.size)&&a.default.isString(t.type)}function i(t){return r(t)&&a.default.isString(t.name)}Object.defineProperty(e,"__esModule",{value:!0}),e.isBlob=r,e.isFile=i;var o=n(0),a=function(t){return t&&t.__esModule?t:{default:t}}(o)},function(t,e,n){"use strict";function r(t,e){for(var n=t.iterator(),r=[];r.length!==e;){var i=n.next();if(i.done)return r;r.push(i.value)}return r}function i(t){return t.iterator().next().value||null}Object.defineProperty(e,"__esModule",{value:!0}),e.arrayFromIterable=r,e.firstValueFromIterable=i},function(t,e,n){"use strict";function r(t,e){var n=t,r=void 0,a=void 0;(0,o.isFunction)(t)||(n=function(){return t},i(t)),e&&(r=e.params||{},a=e.hash,r=(0,o.extend)((0,o.omit)(e,"hash","params"),r));var s=function(){return{obj:scrivito.unwrapAppClassValues(n()),queryParameters:r,hash:a}},c=function(t){var e=t.obj,n=t.queryParameters,r=t.hash;e&&((0,l.default)(),scrivito.BrowserLocation.pushWith({obj:e,queryParameters:n,hash:r}))};(0,u.setCurrentPage)(s,c)}function i(t){if(!(0,o.isNull)(t)&&!(t instanceof(0,s.getWindowContext)().Obj||t instanceof(0,s.getWindowContext)().Link)){if(!t)throw new a.ArgumentError("Missing target.");throw new a.ArgumentError("Target is invalid. Valid targets are instances of Obj or Link.")}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=n(1),s=n(37),u=n(54),c=n(264),l=function(t){return t&&t.__esModule?t:{default:t}}(c);e.default=r},function(t,e){t.exports=function(t){return"string"==typeof t}},function(t,e){t.exports=function(t){return!0===t||!1===t}},function(t,e,n){var r=n(22),i=n(18);t.exports=r("Function",i)},,,,,,function(t,e,n){(function(t,r){var i;!function(o){function a(t){throw new RangeError(N[t])}function s(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function u(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(P,"."),r+s(t.split("."),e).join(".")}function c(t){for(var e,n,r=[],i=0,o=t.length;i<o;)e=t.charCodeAt(i++),e>=55296&&e<=56319&&i<o?(n=t.charCodeAt(i++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),i--)):r.push(e);return r}function l(t){return s(t,function(t){var e="";return t>65535&&(t-=65536,e+=M(t>>>10&1023|55296),t=56320|1023&t),e+=M(t)}).join("")}function f(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:w}function d(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function h(t,e,n){var r=0;for(t=n?F(t/x):t>>1,t+=F(t/e);t>D*k>>1;r+=w)t=F(t/D);return F(r+(D+1)*t/(t+E))}function p(t){var e,n,r,i,o,s,u,c,d,p,v=[],m=t.length,g=0,y=O,b=j;for(n=t.lastIndexOf(S),n<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&a("not-basic"),v.push(t.charCodeAt(r));for(i=n>0?n+1:0;i<m;){for(o=g,s=1,u=w;i>=m&&a("invalid-input"),c=f(t.charCodeAt(i++)),(c>=w||c>F((_-g)/s))&&a("overflow"),g+=c*s,d=u<=b?C:u>=b+k?k:u-b,!(c<d);u+=w)p=w-d,s>F(_/p)&&a("overflow"),s*=p;e=v.length+1,b=h(g-o,e,0==o),F(g/e)>_-y&&a("overflow"),y+=F(g/e),g%=e,v.splice(g++,0,y)}return l(v)}function v(t){var e,n,r,i,o,s,u,l,f,p,v,m,g,y,b,E=[];for(t=c(t),m=t.length,e=O,n=0,o=j,s=0;s<m;++s)(v=t[s])<128&&E.push(M(v));for(r=i=E.length,i&&E.push(S);r<m;){for(u=_,s=0;s<m;++s)(v=t[s])>=e&&v<u&&(u=v);for(g=r+1,u-e>F((_-n)/g)&&a("overflow"),n+=(u-e)*g,e=u,s=0;s<m;++s)if(v=t[s],v<e&&++n>_&&a("overflow"),v==e){for(l=n,f=w;p=f<=o?C:f>=o+k?k:f-o,!(l<p);f+=w)b=l-p,y=w-p,E.push(M(d(p+b%y,0))),l=F(b/y);E.push(M(d(l,0))),o=h(n,g,r==i),n=0,++r}++n,++e}return E.join("")}function m(t){return u(t,function(t){return T.test(t)?p(t.slice(4).toLowerCase()):t})}function g(t){return u(t,function(t){return A.test(t)?"xn--"+v(t):t})}var y=("object"==typeof e&&e&&e.nodeType,"object"==typeof t&&t&&t.nodeType,"object"==typeof r&&r);var b,_=2147483647,w=36,C=1,k=26,E=38,x=700,j=72,O=128,S="-",T=/^xn--/,A=/[^\x20-\x7E]/,P=/[\x2E\u3002\uFF0E\uFF61]/g,N={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=w-C,F=Math.floor,M=String.fromCharCode;b={version:"1.3.2",ucs2:{decode:c,encode:l},decode:p,encode:v,toASCII:g,toUnicode:m},void 0!==(i=function(){return b}.call(e,n,e,t))&&(t.exports=i)}()}).call(e,n(70)(t),n(44))},function(t,e,n){var r,i;/*!
14
37
  * URI.js - Mutating URLs
15
38
  * IPv6 Support
16
39
  *
@@ -23,7 +46,7 @@
23
46
  * MIT License http://www.opensource.org/licenses/mit-license
24
47
  *
25
48
  */
26
- !function(o,a){"use strict";"object"==typeof t&&t.exports?t.exports=a():(n=a,void 0!==(i="function"==typeof n?n.call(e,r,e,t):n)&&(t.exports=i))}(0,function(t){"use strict";function e(t){var e=t.toLowerCase(),r=e.split(":"),n=r.length,i=8;""===r[0]&&""===r[1]&&""===r[2]?(r.shift(),r.shift()):""===r[0]&&""===r[1]?r.shift():""===r[n-1]&&""===r[n-2]&&r.pop(),n=r.length,-1!==r[n-1].indexOf(".")&&(i=7);var o;for(o=0;o<n&&""!==r[o];o++);if(o<i)for(r.splice(o,1,"0000");r.length<i;)r.splice(o,0,"0000");for(var a,u=0;u<i;u++){a=r[u].split("");for(var s=0;s<3&&("0"===a[0]&&a.length>1);s++)a.splice(0,1);r[u]=a.join("")}var c=-1,l=0,f=0,d=-1,p=!1;for(u=0;u<i;u++)p?"0"===r[u]?f+=1:(p=!1,f>l&&(c=d,l=f)):"0"===r[u]&&(p=!0,d=u,f=1);f>l&&(c=d,l=f),l>1&&r.splice(c,l,""),n=r.length;var h="";for(""===r[0]&&(h=":"),u=0;u<n&&(h+=r[u],u!==n-1);u++)h+=":";return""===r[n-1]&&(h+=":"),h}function r(){return t.IPv6===this&&(t.IPv6=n),this}var n=t&&t.IPv6;return{best:e,noConflict:r}})},function(t,e,r){var n,i;/*!
49
+ !function(o,a){"use strict";"object"==typeof t&&t.exports?t.exports=a():(r=a,void 0!==(i="function"==typeof r?r.call(e,n,e,t):r)&&(t.exports=i))}(0,function(t){"use strict";function e(t){var e=t.toLowerCase(),n=e.split(":"),r=n.length,i=8;""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[r-1]&&""===n[r-2]&&n.pop(),r=n.length,-1!==n[r-1].indexOf(".")&&(i=7);var o;for(o=0;o<r&&""!==n[o];o++);if(o<i)for(n.splice(o,1,"0000");n.length<i;)n.splice(o,0,"0000");for(var a,s=0;s<i;s++){a=n[s].split("");for(var u=0;u<3&&("0"===a[0]&&a.length>1);u++)a.splice(0,1);n[s]=a.join("")}var c=-1,l=0,f=0,d=-1,h=!1;for(s=0;s<i;s++)h?"0"===n[s]?f+=1:(h=!1,f>l&&(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<r&&(p+=n[s],s!==r-1);s++)p+=":";return""===n[r-1]&&(p+=":"),p}function n(){return t.IPv6===this&&(t.IPv6=r),this}var r=t&&t.IPv6;return{best:e,noConflict:n}})},function(t,e,n){var r,i;/*!
27
50
  * URI.js - Mutating URLs
28
51
  * Second Level Domain (SLD) Support
29
52
  *
@@ -36,7 +59,7 @@
36
59
  * MIT License http://www.opensource.org/licenses/mit-license
37
60
  *
38
61
  */
39
- !function(o,a){"use strict";"object"==typeof t&&t.exports?t.exports=a():(n=a,void 0!==(i="function"==typeof n?n.call(e,r,e,t):n)&&(t.exports=i))}(0,function(t){"use strict";var e=t&&t.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch "},has:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;var n=t.lastIndexOf(".",e-1);if(n<=0||n>=e-1)return!1;var i=r.list[t.slice(e+1)];return!!i&&i.indexOf(" "+t.slice(n+1,e)+" ")>=0},is:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;if(t.lastIndexOf(".",e-1)>=0)return!1;var n=r.list[t.slice(e+1)];return!!n&&n.indexOf(" "+t.slice(0,e)+" ")>=0},get:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var n=t.lastIndexOf(".",e-1);if(n<=0||n>=e-1)return null;var i=r.list[t.slice(e+1)];return i?i.indexOf(" "+t.slice(n+1,e)+" ")<0?null:t.slice(n+1):null},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return r})},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t){var e={};return W.default.each(t,function(t,r){var n=x(t,2),i=n[0],c=n[1],l=o(r);if(B.default.isSystemAttribute(l))e[l]=i;else{var f=x(c,2),d=f[0],p=f[1];e[l]=[a(d,r),s(u(d,p,i,r))]}}),e}function o(t){if(!(0,H.isCamelCase)(t))throw new q.ArgumentError("Attribute names have to be in camel case.");return(0,H.underscore)(t)}function a(t,e){switch(t){case"enum":return"string";case"float":case"integer":return"number";case"multienum":return"stringlist";case"binary":case"date":case"html":case"link":case"linklist":case"reference":case"referencelist":case"string":case"stringlist":case"widgetlist":return t;default:throw new q.ArgumentError('Attribute "'+e+'" is of unsupported type "'+t+'".')}}function u(t,e,r,n){if(null===r)return r;switch(t){case"binary":return l(r,n);case"date":return f(r,n);case"enum":return d(e,r,n);case"float":return p(r,n);case"html":return h(r,n);case"integer":return v(r,n);case"link":return y(r,n);case"linklist":return _(r,n);case"multienum":return b(e,r,n);case"reference":return w(r,n);case"referencelist":return k(r,n);case"string":return P(r,n);case"stringlist":return E(r,n);case"widgetlist":return S(r,n);default:throw new q.InternalError('serializeAttributeValue is not implemented for "'+t+'".')}}function s(t){return(W.default.isString(t)||W.default.isArray(t))&&W.default.isEmpty(t)?null:t}function c(t,e,r){throw new q.ArgumentError("Unexpected value "+(0,Q.default)(t)+' for attribute "'+e+'". Expected: '+r)}function l(t,e){if(t instanceof G.default)return{id:t.id()};c(t,e,"A Binary.")}function f(t,e){return W.default.isDate(t)?R.formatDateToString(t):R.isValidDateString(t)?t:void c(t,e,"A Date.")}function d(t,e,r){var n=t.values;if(W.default.contains(n,e))return e;c(e,r,'Valid attribute values are contained in its "values" array ['+n+"].")}function p(t,e){if(R.isValidFloat(t))return t;var r=t;W.default.isNumber(t)&&(r=String(t)),c(r,e,"A Number, that is #isFinite().")}function h(t,e){if(W.default.isString(t))return t;c(t,e,"A String.")}function v(t,e){if(R.isValidInteger(t))return t;c(t,e,"A Number, that is #isSafeInteger().")}function y(t,e){if(g(t))return m(t);c(t,e,"A Link instance.")}function _(t,e){if(W.default.isArray(t)&&W.default.every(t,g))return W.default.map(t,m);c(t,e,"An array of Link instances.")}function g(t){if(t instanceof z.default)return!0;if(!W.default.isObject(t))return!1;var e=W.default.without(W.default.keys(t),"hash","obj_id","query","target","title","url");return W.default.isEmpty(e)}function m(t){var e={fragment:"function"==typeof t.hash?t.hash():t.hash,query:"function"==typeof t.query?t.query():t.query,target:"function"==typeof t.target?t.target():t.target,title:"function"==typeof t.title?t.title():t.title,url:"function"==typeof t.url?t.url():t.url};return e.obj_id="function"==typeof t.objId?t.objId():t.obj_id,W.default.mapObject(e,function(t){return t||null})}function b(t,e,r){var n=t.values,i="An array with values from "+(0,Q.default)(n)+".";W.default.isArray(e)&&W.default.every(e,W.default.isString)||c(e,r,i);var o=W.default.difference(e,n);if(o.length){c(e,r,i+" Forbidden values: "+(0,Q.default)(o)+".")}return e}function w(t,e){if(O(t))return j(t);c(t,e,"A BasicObj or a String ID.")}function k(t,e){if(C(t))return W.default.map(t,j);c(t,e,"An array with BasicObjs or String IDs.")}function j(t){return t instanceof F.default?t.id():t}function O(t){return W.default.isString(t)||t instanceof F.default}function C(t){return W.default.isArray(t)&&W.default.every(t,function(t){return O(t)})}function P(t,e){if(A(t))return t.toString();c(t,e,"A String.")}function E(t,e){if(W.default.isArray(t)&&W.default.every(t,function(t){return A(t)}))return W.default.invoke(t,"toString");c(t,e,"An array of strings.")}function A(t){return W.default.isString(t)||W.default.isNumber(t)}function S(t,e){if(W.default.isArray(t)&&W.default.every(t,function(t){return t instanceof D.default}))return W.default.invoke(t,"id");c(t,e,"An array of BasicWidget instances.")}Object.defineProperty(e,"__esModule",{value:!0});var x=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.serialize=i;var T=r(3),F=n(T),M=r(34),R=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(M),I=r(14),D=n(I),N=r(24),z=n(N),L=r(32),B=n(L),U=r(0),W=n(U),q=r(1),V=r(21),Q=n(V),H=r(15),$=r(30),G=n($)},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return h.cmsState.subState("metadataCollection").subState(t)}function o(t){return(0,f.mapObject)(t.meta_data,function(t){var e=u(t,2),r=e[0],n=e[1];switch(r){case"date":return l.deserializeAsDate(n);case"number":return l.deserializeAsInteger(n);default:return n}})}function a(t){if(!(0,v.isCamelCase)(t))throw new y.ArgumentError('Metadata key "'+t+'" is not in camel case.')}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(34),l=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(c),f=r(0),d=r(5),p=function(t){return t&&t.__esModule?t:{default:t}}(d),h=r(4),v=r(15),y=r(1),_=function(){function t(e){var r=this;n(this,t),this._binaryId=e,e&&(this._loadableData=new p.default({state:i(e),loader:function(){return r._loadData()}}))}return s(t,[{key:"get",value:function(t){a(t);var e=this._getData();if(e)return e[(0,v.underscore)(t)]}},{key:"keys",value:function(){var t=this._getData();return t?(0,f.map)((0,f.keys)(t),v.camelCase):[]}},{key:"_getData",value:function(){if(this._binaryId)return this._loadableData.get()}},{key:"_loadData",value:function(){var t="blobs/"+encodeURIComponent(this._binaryId)+"/meta_data";return scrivito.CmsRestApi.get(t).then(o)}},{key:"binaryId",get:function(){return this._binaryId}}],[{key:"store",value:function(t,e){new p.default({state:i(t)}).set(o(e))}}]),t}();e.default=_},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){if(!(0,c.isString)(t))throw new l.ArgumentError("Expected a string for attribute name, but got "+(0,h.default)(t));if(!t)throw new l.ArgumentError("An empty string is not a valid attribute name")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(32),s=n(u),c=r(0),l=r(1),f=r(89),d=n(f),p=r(21),h=n(p),v=r(158),y=function(){function t(e){i(this,t),this.name=e.name,this._classData=e,this.attributes=(0,c.map)(e.attributes,function(t){return new s.default(t)})}return a(t,null,[{key:"init",value:function(t){var e=this,r=t.map(function(t){return new e(t)});d.default.register(this.type(),r)}},{key:"find",value:function(t){return d.default.findByType(this.type(),t)}},{key:"get",value:function(t){var e=this.find(t);if(e)return e;throw new l.InternalError('Model class "'+t+'" does not exist.')}},{key:"all",value:function(){return d.default.allForType(this.type())}}]),a(t,[{key:"title",value:function(){return this._classData.title}},{key:"description",value:function(){return this._classData.description}},{key:"thumbnail",value:function(){return this._classData.thumbnail}},{key:"hasDetailsView",value:function(){return this.useRailsDetailsTemplate()?!!this._classData.hasServerDetailsTemplate:this.hasJsDetailsView()}},{key:"hasJsDetailsView",value:function(){return!0}},{key:"attribute",value:function(t){return o(t),(0,c.findWhere)(this.attributes,{name:t})}},{key:"localizedAttributes",value:function(){return(0,c.filter)(this.attributes,function(t){return!!t.title()})}},{key:"useRailsDetailsTemplate",value:function(){return this.usesServerCallbacks()}},{key:"useRailsThumbnailHtml",value:function(){return!this._classData.description&&!this._classData.thumbnail&&!!this._classData.usesServerCallbacks}},{key:"railsThumbnailHtml",value:function(){return(0,v.getRailsThumbnail)(this.name)}},{key:"usesServerCallbacks",value:function(){return!!this._classData.usesServerCallbacks}},{key:"isHiddenFromEditors",value:function(){return!!this._classData.hideFromEditor}},{key:"fetchDefaults",value:function(t,e){var r="obj_class/"+this.name+"/defaults",n={};return t&&(n.attributes=t),e&&(n.context=e),(0,c.isEmpty)(n)||(r+="?"+$.param(n)),scrivito.Promise.resolve(scrivito.ajax("GET",r))}}]),t}();e.default=y},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),i=function(t){return t&&t.__esModule?t:{default:t}}(n),o={},a={register:function(t,e){o[t]=e},allForType:function(t){return o[t]},findByType:function(t,e){return i.default.findWhere(this.allForType(t),{name:e})}};e.default=a},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),a=r(10),u=n(a),s=r(0),c=n(s),l=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.batchSize;i(this,t),this._mget=e,this._batchSize=n||100,this._deferreds={}}return o(t,[{key:"retrieve",value:function(t){var e=this;if(c.default.isEmpty(this._deferreds)&&scrivito.nextTick(function(){return e._performRetrieval()}),!this._deferreds[t]){var r=new u.default;this._deferreds[t]=r}return this._deferreds[t].promise}},{key:"_performRetrieval",value:function(){var t=this,e=c.default.keys(this._deferreds).slice(0,this._batchSize);if(0!==e.length){var r={};c.default.each(e,function(e){r[e]=t._deferreds[e],delete t._deferreds[e]}),this._mget(e).then(function(n){c.default.each(e,function(e,i){var o=r[e],a=n[i];i<n.length?o.resolve(a):t.retrieve(e).then(o.resolve,o.reject)})},function(t){c.default.each(r,function(e){return e.reject(t)})}),this._performRetrieval()}}},{key:"reset",value:function(){this._deferreds={}}}]),t}();e.default=l},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){l.default.store(t,e)}function o(t){return scrivito.computeCacheKey(t)}function a(t,e){return new d.default(t,e)}function u(){return p.cmsState.subState("objQuery")}function s(){u().clear()}Object.defineProperty(e,"__esModule",{value:!0}),e.store=i,e.computeCacheKey=o,e.get=a,e.stateContainer=u,e.clearCache=s;var c=r(92),l=n(c),f=r(166),d=n(f),p=r(4)},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(164),a=function(t){return t&&t.__esModule?t:{default:t}}(o),u=function(){function t(e,r){n(this,t),this._params=e,this._batchSize=r}return i(t,null,[{key:"store",value:function(t,e){a.default.store(t,e)}}]),i(t,[{key:"iterator",value:function(){function t(){if(!r)return{done:!0};var i=r.objIds();if(n<i.length){var o=i[n];return n++,e[o]?t():(e[o]=!0,{value:o,done:!1})}return r=r.nextBatch(),n=0,t()}var e={},r=a.default.firstBatchFor(this._params,this._batchSize),n=0;return{next:t}}}]),t}();e.default=u},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(169),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(u),c=r(99),l=n(c),f=r(32),d=n(f),p=r(0),h=n(p),v=r(1),y=r(15),_=function(){function t(){i(this,t)}return a(t,[{key:"get",value:function(t,e){if(!(0,y.isCamelCase)(t))throw new v.ArgumentError("Attribute names have to be in camel case.");var r=(0,y.underscore)(t);{if(!d.default.isSystemAttribute(r)){var n=scrivito.typeInfo.normalize(e),i=o(n,2),a=i[0],u=i[1],c=this._current[r];return c&&h.default.isArray(c)||(c=[]),s.deserialize(this,c,a,u)}if(h.default.has(this._systemAttributes,r)){var l=this._systemAttributes[r];return"function"==typeof this[l]?this[l]():this[l]}}}},{key:"field",value:function(t,e){return new l.default({container:this,attributeName:t,typeInfo:scrivito.typeInfo.normalize(e)})}},{key:"widget",value:function(t){throw new TypeError("Override in subclass.")}},{key:"serializeAttributes",value:function(){var t=this,e={};return h.default.each(this._current,function(r,n){if(h.default.isArray(r)&&"widgetlist"===h.default.first(r)){var i=(0,y.camelCase)(n),o=h.default.invoke(t.get(i,["widgetlist"]),"serializeAttributes");return void(e[n]=["widgetlist",o])}e[n]=r}),e}},{key:"_persistWidgets",value:function(t,e){h.default.each(e,function(e){var r=o(e,2),n=r[0],i=r[1];i&&"widgetlist"===i[0]&&h.default.each(n,function(e){e.isPersisted()||e.persistInObj(t)})})}},{key:"_objClass",get:function(){throw new TypeError("Override in subclass.")}},{key:"_current",get:function(){throw new TypeError("Override in subclass.")}}]),t}();e.default=_},function(t,e,r){"use strict";function n(){for(var t=Math.floor(Math.random()*Math.pow(16,8)).toString(16);t.length<8;)t="0"+t;return t}function i(){return n()+n()}Object.defineProperty(e,"__esModule",{value:!0}),e.randomId=i,e.randomHex=n},,,function(t,e,r){"use strict";function n(t){var e=document.createElement("link");e.rel="stylesheet",e.href=t,document.head.appendChild(e)}function i(t){var e=document.createElement("script");e.src=t,document.head.appendChild(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.loadCss=n,e.loadJs=i},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var r=[];return s.default.each(t,function(t){var n=a.default.run(function(){return e(t)});n.success&&r.push(n.result)}),r.length<t.length&&a.default.throwNotLoaded(),r}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var o=r(5),a=n(o),u=r(0),s=n(u)},function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),a=r(3),u=function(t){return t&&t.__esModule?t:{default:t}}(a),s=r(0),c=function(){function t(e){var r=e.container,n=e.attributeName,o=e.typeInfo;i(this,t),this._container=r,this._attributeName=n,this._typeInfo=o}return o(t,[{key:"get",value:function(){return this._container.get(this.name(),this._typeInfo)}},{key:"update",value:function(t){this._container.update(n({},this.name(),[t,this._typeInfo]))}},{key:"container",value:function(){return this._container}},{key:"name",value:function(){return this._attributeName}},{key:"type",value:function(){return this._typeInfo[0]}},{key:"typeOptions",value:function(){return this._typeInfo[1]||{}}},{key:"equals",value:function(e){return e instanceof t&&(this.container().equals(e.container())&&this.name()===e.name())}},{key:"values",value:function(){return this._assertValidTypes(["enum","multienum"],"Only enum and multienum attributes can have values"),this._sortValuesByLocalization(this.typeOptions().values)}},{key:"titleForValue",value:function(t){this._assertValidTypes(["enum","multienum"],"Only enum and multienum attributes can have localized values");var e=(0,s.findWhere)(this.typeOptions().valuesLocalization,{value:t});return e&&e.title||t}},{key:"toString",value:function(){var t=this._dataForId(),e=t.name,r=t.objId,n=t.widgetId,i="<BasicField name="+e+" objId="+r;return i+=n?" widgetId="+n+">":">"}},{key:"id",value:function(){var t=this._dataForId(),e=t.name,r=t.objId,n=t.widgetId,i=e+"|"+r;return n&&(i+="|"+n),i}},{key:"_assertValidTypes",value:function(t,e){(0,s.include)(t,this.type())||$.error(e)}},{key:"_dataForId",value:function(){var t={name:this.name()},e=this.container();return e instanceof u.default?t.objId=e.id():(t.objId=e.obj().id(),t.widgetId=e.id()),t}},{key:"_sortValuesByLocalization",value:function(t){var e=this;return t?this.typeOptions().valuesLocalization?(0,s.sortBy)(t,function(r){var n=(0,s.findIndex)(e.typeOptions().valuesLocalization,{value:r});return-1===n?t.length:n}):t:[]}}]),t}();e.default=c},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=function(){function t(e,r){n(this,t),this._registry=e,this._basicObjFacetValue=r}return i(t,[{key:"name",value:function(){return this._basicObjFacetValue.name()}},{key:"count",value:function(){return this._basicObjFacetValue.count()}},{key:"includedObjs",value:function(){var t=this._basicObjFacetValue.includedObjs();return scrivito.wrapInAppClass(this._registry,t)}}]),t}();e.default=o},function(t,e,r){/*! @preserve
62
+ !function(o,a){"use strict";"object"==typeof t&&t.exports?t.exports=a():(r=a,void 0!==(i="function"==typeof r?r.call(e,n,e,t):r)&&(t.exports=i))}(0,function(t){"use strict";var e=t&&t.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch "},has:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return!1;var i=n.list[t.slice(e+1)];return!!i&&i.indexOf(" "+t.slice(r+1,e)+" ")>=0},is:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;if(t.lastIndexOf(".",e-1)>=0)return!1;var r=n.list[t.slice(e+1)];return!!r&&r.indexOf(" "+t.slice(0,e)+" ")>=0},get:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return null;var i=n.list[t.slice(e+1)];return i?i.indexOf(" "+t.slice(r+1,e)+" ")<0?null:t.slice(r+1):null},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return n})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){var e={};return q.default.each(t,function(t,n){var r=A(t,2),i=r[0],c=r[1],l=o(n);if(z.default.isSystemAttribute(l))e[l]=i;else{var f=A(c,2),d=f[0],h=f[1];e[l]=[a(d,n),u(s(d,h,i,n))]}}),e}function o(t){if(!(0,Q.isCamelCase)(t))throw new W.ArgumentError("Attribute names have to be in camel case.");return(0,Q.underscore)(t)}function a(t,e){switch(t){case"enum":return"string";case"float":case"integer":return"number";case"multienum":return"stringlist";case"binary":case"date":case"html":case"link":case"linklist":case"reference":case"referencelist":case"string":case"stringlist":case"widgetlist":return t;default:throw new W.ArgumentError('Attribute "'+e+'" is of unsupported type "'+t+'".')}}function s(t,e,n,r){if(null===n)return n;switch(t){case"binary":return l(n,r);case"date":return f(n,r);case"enum":return d(e,n,r);case"float":return h(n,r);case"html":return p(n,r);case"integer":return v(n,r);case"link":return m(n,r);case"linklist":return g(n,r);case"multienum":return _(e,n,r);case"reference":return w(n,r);case"referencelist":return C(n,r);case"string":return j(n,r);case"stringlist":return O(n,r);case"widgetlist":return T(n,r);default:throw new W.InternalError('serializeAttributeValue is not implemented for "'+t+'".')}}function u(t){return(q.default.isString(t)||q.default.isArray(t))&&q.default.isEmpty(t)?null:t}function c(t,e,n){throw new W.ArgumentError("Unexpected value "+(0,V.default)(t)+' for attribute "'+e+'". Expected: '+n)}function l(t,e){if(t instanceof K.default)return{id:t.id()};c(t,e,"A Binary.")}function f(t,e){return q.default.isDate(t)?F.formatDateToString(t):F.isValidDateString(t)?t:void c(t,e,"A Date.")}function d(t,e,n){var r=t.values;if(q.default.contains(r,e))return e;c(e,n,'Valid attribute values are contained in its "values" array ['+r+"].")}function h(t,e){if(F.isValidFloat(t))return t;var n=t;q.default.isNumber(t)&&(n=String(t)),c(n,e,"A Number, that is #isFinite().")}function p(t,e){if(q.default.isString(t))return t;c(t,e,"A String.")}function v(t,e){if(F.isValidInteger(t))return t;c(t,e,"A Number, that is #isSafeInteger().")}function m(t,e){if(y(t))return b(t);c(t,e,"A Link instance.")}function g(t,e){if(q.default.isArray(t)&&q.default.every(t,y))return q.default.map(t,b);c(t,e,"An array of Link instances.")}function y(t){if(t instanceof I.default)return!0;if(!q.default.isObject(t))return!1;var e=q.default.without(q.default.keys(t),"hash","obj_id","query","target","title","url");return q.default.isEmpty(e)}function b(t){var e={fragment:"function"==typeof t.hash?t.hash():t.hash,query:"function"==typeof t.query?t.query():t.query,target:"function"==typeof t.target?t.target():t.target,title:"function"==typeof t.title?t.title():t.title,url:"function"==typeof t.url?t.url():t.url};return e.obj_id="function"==typeof t.objId?t.objId():t.obj_id,q.default.mapObject(e,function(t){return t||null})}function _(t,e,n){var r=t.values,i="An array with values from "+(0,V.default)(r)+".";q.default.isArray(e)&&q.default.every(e,q.default.isString)||c(e,n,i);var o=q.default.difference(e,r);if(o.length){c(e,n,i+" Forbidden values: "+(0,V.default)(o)+".")}return e}function w(t,e){if(E(t))return k(t);c(t,e,"A BasicObj or a String ID.")}function C(t,e){if(x(t))return q.default.map(t,k);c(t,e,"An array with BasicObjs or String IDs.")}function k(t){return t instanceof N.default?t.id():t}function E(t){return q.default.isString(t)||t instanceof N.default}function x(t){return q.default.isArray(t)&&q.default.every(t,function(t){return E(t)})}function j(t,e){if(S(t))return t.toString();c(t,e,"A String.")}function O(t,e){if(q.default.isArray(t)&&q.default.every(t,function(t){return S(t)}))return q.default.invoke(t,"toString");c(t,e,"An array of strings.")}function S(t){return q.default.isString(t)||q.default.isNumber(t)}function T(t,e){if(q.default.isArray(t)&&q.default.every(t,function(t){return t instanceof R.default}))return q.default.invoke(t,"id");c(t,e,"An array of BasicWidget instances.")}Object.defineProperty(e,"__esModule",{value:!0});var A=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.serialize=i;var P=n(3),N=r(P),D=n(34),F=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(D),M=n(14),R=r(M),L=n(24),I=r(L),B=n(32),z=r(B),H=n(0),q=r(H),W=n(1),U=n(21),V=r(U),Q=n(15),$=n(30),K=r($)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return p.cmsState.subState("metadataCollection").subState(t)}function o(t){return(0,f.mapObject)(t.meta_data,function(t){var e=s(t,2),n=e[0],r=e[1];switch(n){case"date":return l.deserializeAsDate(r);case"number":return l.deserializeAsInteger(r);default:return r}})}function a(t){if(!(0,v.isCamelCase)(t))throw new m.ArgumentError('Metadata key "'+t+'" is not in camel case.')}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(34),l=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(c),f=n(0),d=n(5),h=function(t){return t&&t.__esModule?t:{default:t}}(d),p=n(4),v=n(15),m=n(1),g=function(){function t(e){var n=this;r(this,t),this._binaryId=e,e&&(this._loadableData=new h.default({state:i(e),loader:function(){return n._loadData()}}))}return u(t,[{key:"get",value:function(t){a(t);var e=this._getData();if(e)return e[(0,v.underscore)(t)]}},{key:"keys",value:function(){var t=this._getData();return t?(0,f.map)((0,f.keys)(t),v.camelCase):[]}},{key:"_getData",value:function(){if(this._binaryId)return this._loadableData.get()}},{key:"_loadData",value:function(){var t="blobs/"+encodeURIComponent(this._binaryId)+"/meta_data";return scrivito.CmsRestApi.get(t).then(o)}},{key:"binaryId",get:function(){return this._binaryId}}],[{key:"store",value:function(t,e){new h.default({state:i(t)}).set(o(e))}}]),t}();e.default=g},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){if(!(0,c.isString)(t))throw new l.ArgumentError("Expected a string for attribute name, but got "+(0,p.default)(t));if(!t)throw new l.ArgumentError("An empty string is not a valid attribute name")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(32),u=r(s),c=n(0),l=n(1),f=n(89),d=r(f),h=n(21),p=r(h),v=n(158),m=function(){function t(e){i(this,t),this.name=e.name,this._classData=e,this.attributes=(0,c.map)(e.attributes,function(t){return new u.default(t)})}return a(t,null,[{key:"init",value:function(t){var e=this,n=t.map(function(t){return new e(t)});d.default.register(this.type(),n)}},{key:"find",value:function(t){return d.default.findByType(this.type(),t)}},{key:"get",value:function(t){var e=this.find(t);if(e)return e;throw new l.InternalError('Model class "'+t+'" does not exist.')}},{key:"all",value:function(){return d.default.allForType(this.type())}}]),a(t,[{key:"title",value:function(){return this._classData.title}},{key:"description",value:function(){return this._classData.description}},{key:"thumbnail",value:function(){return this._classData.thumbnail}},{key:"hasDetailsView",value:function(){return this.useRailsDetailsTemplate()?!!this._classData.hasServerDetailsTemplate:this.hasJsDetailsView()}},{key:"hasJsDetailsView",value:function(){return!0}},{key:"attribute",value:function(t){return o(t),(0,c.findWhere)(this.attributes,{name:t})}},{key:"localizedAttributes",value:function(){return(0,c.filter)(this.attributes,function(t){return!!t.title()})}},{key:"useRailsDetailsTemplate",value:function(){return this.usesServerCallbacks()}},{key:"useRailsThumbnailHtml",value:function(){return!this._classData.description&&!this._classData.thumbnail&&!!this._classData.usesServerCallbacks}},{key:"railsThumbnailHtml",value:function(){return(0,v.getRailsThumbnail)(this.name)}},{key:"usesServerCallbacks",value:function(){return!!this._classData.usesServerCallbacks}},{key:"isHiddenFromEditors",value:function(){return!!this._classData.hideFromEditor}},{key:"fetchDefaults",value:function(t,e){var n="obj_class/"+this.name+"/defaults",r={};return t&&(r.attributes=t),e&&(r.context=e),(0,c.isEmpty)(r)||(n+="?"+$.param(r)),scrivito.Promise.resolve(scrivito.ajax("GET",n))}}]),t}();e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o={},a={register:function(t,e){o[t]=e},allForType:function(t){return o[t]},findByType:function(t,e){return i.default.findWhere(this.allForType(t),{name:e})}};e.default=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(10),s=r(a),u=n(0),c=r(u),l=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.batchSize;i(this,t),this._mget=e,this._batchSize=r||100,this._deferreds={}}return o(t,[{key:"retrieve",value:function(t){var e=this;if(c.default.isEmpty(this._deferreds)&&scrivito.nextTick(function(){return e._performRetrieval()}),!this._deferreds[t]){var n=new s.default;this._deferreds[t]=n}return this._deferreds[t].promise}},{key:"_performRetrieval",value:function(){var t=this,e=c.default.keys(this._deferreds).slice(0,this._batchSize);if(0!==e.length){var n={};c.default.each(e,function(e){n[e]=t._deferreds[e],delete t._deferreds[e]}),this._mget(e).then(function(r){c.default.each(e,function(e,i){var o=n[e],a=r[i];i<r.length?o.resolve(a):t.retrieve(e).then(o.resolve,o.reject)})},function(t){c.default.each(n,function(e){return e.reject(t)})}),this._performRetrieval()}}},{key:"reset",value:function(){this._deferreds={}}}]),t}();e.default=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){l.default.store(t,e)}function o(t){return scrivito.computeCacheKey(t)}function a(t,e){return new d.default(t,e)}function s(){return h.cmsState.subState("objQuery")}function u(){s().clear()}Object.defineProperty(e,"__esModule",{value:!0}),e.store=i,e.computeCacheKey=o,e.get=a,e.stateContainer=s,e.clearCache=u;var c=n(92),l=r(c),f=n(166),d=r(f),h=n(4)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(164),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function(){function t(e,n){r(this,t),this._params=e,this._batchSize=n}return i(t,null,[{key:"store",value:function(t,e){a.default.store(t,e)}}]),i(t,[{key:"iterator",value:function(){function t(){if(!n)return{done:!0};var i=n.objIds();if(r<i.length){var o=i[r];return r++,e[o]?t():(e[o]=!0,{value:o,done:!1})}return n=n.nextBatch(),r=0,t()}var e={},n=a.default.firstBatchFor(this._params,this._batchSize),r=0;return{next:t}}}]),t}();e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(169),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),c=n(99),l=r(c),f=n(32),d=r(f),h=n(0),p=r(h),v=n(1),m=n(15),g=function(){function t(){i(this,t)}return a(t,[{key:"get",value:function(t,e){if(!(0,m.isCamelCase)(t))throw new v.ArgumentError("Attribute names have to be in camel case.");var n=(0,m.underscore)(t);{if(!d.default.isSystemAttribute(n)){var r=scrivito.typeInfo.normalize(e),i=o(r,2),a=i[0],s=i[1],c=this._current[n];return c&&p.default.isArray(c)||(c=[]),u.deserialize(this,c,a,s)}if(p.default.has(this._systemAttributes,n)){var l=this._systemAttributes[n];return"function"==typeof this[l]?this[l]():this[l]}}}},{key:"field",value:function(t,e){return new l.default({container:this,attributeName:t,typeInfo:scrivito.typeInfo.normalize(e)})}},{key:"widget",value:function(t){throw new TypeError("Override in subclass.")}},{key:"serializeAttributes",value:function(){var t=this,e={};return p.default.each(this._current,function(n,r){if(p.default.isArray(n)&&"widgetlist"===p.default.first(n)){var i=(0,m.camelCase)(r),o=p.default.invoke(t.get(i,["widgetlist"]),"serializeAttributes");return void(e[r]=["widgetlist",o])}e[r]=n}),e}},{key:"_persistWidgets",value:function(t,e){p.default.each(e,function(e){var n=o(e,2),r=n[0],i=n[1];i&&"widgetlist"===i[0]&&p.default.each(r,function(e){e.isPersisted()||e.persistInObj(t)})})}},{key:"_objClass",get:function(){throw new TypeError("Override in subclass.")}},{key:"_current",get:function(){throw new TypeError("Override in subclass.")}}]),t}();e.default=g},function(t,e,n){"use strict";function r(){for(var t=Math.floor(Math.random()*Math.pow(16,8)).toString(16);t.length<8;)t="0"+t;return t}function i(){return r()+r()}Object.defineProperty(e,"__esModule",{value:!0}),e.randomId=i,e.randomHex=r},,,function(t,e,n){"use strict";function r(t){var e=document.createElement("link");e.rel="stylesheet",e.href=t,document.head.appendChild(e)}function i(t){var e=document.createElement("script");e.src=t,document.head.appendChild(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.loadCss=r,e.loadJs=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n=[];return u.default.each(t,function(t){var r=a.default.run(function(){return e(t)});r.success&&n.push(r.result)}),n.length<t.length&&a.default.throwNotLoaded(),n}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var o=n(5),a=r(o),s=n(0),u=r(s)},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(3),s=function(t){return t&&t.__esModule?t:{default:t}}(a),u=n(0),c=function(){function t(e){var n=e.container,r=e.attributeName,o=e.typeInfo;i(this,t),this._container=n,this._attributeName=r,this._typeInfo=o}return o(t,[{key:"get",value:function(){return this._container.get(this.name(),this._typeInfo)}},{key:"update",value:function(t){this._container.update(r({},this.name(),[t,this._typeInfo]))}},{key:"container",value:function(){return this._container}},{key:"name",value:function(){return this._attributeName}},{key:"type",value:function(){return this._typeInfo[0]}},{key:"typeOptions",value:function(){return this._typeInfo[1]||{}}},{key:"equals",value:function(e){return e instanceof t&&(this.container().equals(e.container())&&this.name()===e.name())}},{key:"values",value:function(){return this._assertValidTypes(["enum","multienum"],"Only enum and multienum attributes can have values"),this._sortValuesByLocalization(this.typeOptions().values)}},{key:"titleForValue",value:function(t){this._assertValidTypes(["enum","multienum"],"Only enum and multienum attributes can have localized values");var e=(0,u.findWhere)(this.typeOptions().valuesLocalization,{value:t});return e&&e.title||t}},{key:"toString",value:function(){var t=this._dataForId(),e=t.name,n=t.objId,r=t.widgetId,i="<BasicField name="+e+" objId="+n;return i+=r?" widgetId="+r+">":">"}},{key:"id",value:function(){var t=this._dataForId(),e=t.name,n=t.objId,r=t.widgetId,i=e+"|"+n;return r&&(i+="|"+r),i}},{key:"_assertValidTypes",value:function(t,e){(0,u.include)(t,this.type())||$.error(e)}},{key:"_dataForId",value:function(){var t={name:this.name()},e=this.container();return e instanceof s.default?t.objId=e.id():(t.objId=e.obj().id(),t.widgetId=e.id()),t}},{key:"_sortValuesByLocalization",value:function(t){var e=this;return t?this.typeOptions().valuesLocalization?(0,u.sortBy)(t,function(n){var r=(0,u.findIndex)(e.typeOptions().valuesLocalization,{value:n});return-1===r?t.length:r}):t:[]}}]),t}();e.default=c},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e,n){r(this,t),this._registry=e,this._basicObjFacetValue=n}return i(t,[{key:"name",value:function(){return this._basicObjFacetValue.name()}},{key:"count",value:function(){return this._basicObjFacetValue.count()}},{key:"includedObjs",value:function(){var t=this._basicObjFacetValue.includedObjs();return scrivito.wrapInAppClass(this._registry,t)}}]),t}();e.default=o},function(t,e,n){/*! @preserve
40
63
  *
41
64
  * tcomb.js - Type checking and DDD for JavaScript
42
65
  *
@@ -45,7 +68,7 @@
45
68
  * Copyright (c) 2014-2016 Giulio Canti
46
69
  *
47
70
  */
48
- var n=r(7);n.Any=r(102),n.Array=r(264),n.Boolean=r(192),n.Date=r(265),n.Error=r(266),n.Function=r(77),n.Nil=r(193),n.Number=r(194),n.Integer=r(267),n.IntegerT=n.Integer,n.Object=r(268),n.RegExp=r(269),n.String=r(104),n.Type=r(270),n.TypeT=n.Type,n.Arr=n.Array,n.Bool=n.Boolean,n.Dat=n.Date,n.Err=n.Error,n.Func=n.Function,n.Num=n.Number,n.Obj=n.Object,n.Re=n.RegExp,n.Str=n.String,n.dict=r(105),n.declare=r(271),n.enums=r(272),n.irreducible=r(22),n.list=r(197),n.maybe=r(273),n.refinement=r(103),n.struct=r(275),n.tuple=r(200),n.union=r(279),n.func=r(280),n.intersection=r(281),n.subtype=n.refinement,n.inter=r(282),n.interface=n.inter,n.assert=n,n.update=r(283),n.mixin=r(106),n.isType=r(19),n.is=r(42),n.getTypeName=r(16),n.match=r(284),t.exports=n},function(t,e,r){var n=r(22);t.exports=n("Any",function(){return!0})},function(t,e,r){function n(t,e){return"{"+c(t)+" | "+l(e)+"}"}function i(t,e,r){function i(e,r){var n=u(t,e,r);return n}var c=r||n(t,e),l=a(t);return i.meta={kind:"subtype",type:t,predicate:e,name:r,identity:l},i.displayName=c,i.is=function(r){return s(r,t)&&e(r)},i.update=function(t,e){return i(o.update(t,e))},i}var o=r(7),a=(r(27),r(18),r(63),r(40)),u=r(41),s=r(42),c=r(16),l=r(62);i.getDefaultName=n,t.exports=i},function(t,e,r){var n=r(22),i=r(75);t.exports=n("String",i)},function(t,e,r){function n(t,e){return"{[key: "+a(t)+"]: "+a(e)+"}"}function i(t,e,r){function i(r,n){if(d)return r;var i=!0,o={};for(var a in r)if(r.hasOwnProperty(a)){a=c(t,a,null);var u=r[a],s=c(e,u,null);i=i&&u===s,o[a]=s}return i&&(o=r),o}var f=r||n(t,e),d=(a(t),a(e),u(t)&&u(e));return i.meta={kind:"dict",domain:t,codomain:e,name:r,identity:d},i.displayName=f,i.is=function(r){if(!s(r))return!1;for(var n in r)if(r.hasOwnProperty(n)&&(!l(n,t)||!l(r[n],e)))return!1;return!0},i.update=function(t,e){return i(o.update(t,e))},i}var o=r(7),a=(r(27),r(18),r(16)),u=r(40),s=r(38),c=r(41),l=r(42);i.getDefaultName=n,t.exports=i},function(t,e,r){var n=r(33);r(7);t.exports=function(t,e,r){if(n(e))return t;for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}},function(t,e,r){"use strict";function n(t){return t.replace(c,function(t,e){var r=(0,s.default)(e);if(r)return l[r]=e,r})}function i(t,e){if(t===e)return null;if("A"===t.nodeName){var r=l[t.href];if(r)return(0,a.getWindowContext)().Obj.get(r)}return i(t.parentNode,e)}function o(){l={}}Object.defineProperty(e,"__esModule",{value:!0}),e.transformHTML=n,e.findTarget=i,e.reset=o;var a=r(37),u=r(291),s=function(t){return t&&t.__esModule?t:{default:t}}(u),c=/\bobjid:([a-f0-9]{16})\b([^"']*)/g,l={}},function(t,e,r){"use strict";function n(t){return t instanceof o.default?{objId:t.id()}:{objId:t.obj().id(),widgetId:t.id()}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var i=r(3),o=function(t){return t&&t.__esModule?t:{default:t}}(i)},,,,,,,,,,,,,function(t,e,r){"use strict";function n(t){i();var e=t.location,r=e.hash,n=r.indexOf(u);if(!(n<0)){var o=r.substr(n+u.length,3),a=r.substring(0,n);"#"===a&&(a="");var c=e.href.toString().replace(r,a);s=parseInt(o,10)||0,t.history.replaceState({},"",c)}}function i(){s=0}function o(t){var e=t.toString();return t.hash||(e+="#"),""+e+u+(s+1)}function a(){return s}Object.defineProperty(e,"__esModule",{value:!0});var u="&scrivito.authFailedCount=",s=void 0;e.default={init:n,augmentedRedirectUrl:o,reset:i,currentFailureCount:a}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var r=o(t,e);if(r)return r;var n=t._widget_pool;return l.default.find(n,function(t,n){if(r=o(t,e))return r.parentWidgetId=n,!0}),r}function o(t,e){var r=void 0;return l.default.find(t,function(t,n){if(!s.default.isSystemAttribute(n)){var i=a(t,2),o=i[0],u=i[1];if(u&&"widgetlist"===o){var c=u.indexOf(e);if(-1!==c)return r={attributeName:n,index:c},!0}}}),r}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=i;var u=r(32),s=n(u),c=r(0),l=n(c)},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(47),a=function(t){return t&&t.__esModule?t:{default:t}}(o),u=function(){function t(e,r,i,o){n(this,t),this._id=e,this.url=r,this.filename=i,this._objId=o}return i(t,[{key:"noCacheUrl",value:function(){if("published"===scrivito.currentWorkspaceId())return scrivito.Promise.resolve(null);var t="blobs/"+encodeURIComponent(this._id)+"/no_cache";return scrivito.CmsRestApi.get(t).then(function(t){return t.private_access.get.url}).catch(function(t){return scrivito.displayError(t),scrivito.Promise.reject(t)})}},{key:"copy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new a.default({idToCopy:this._id,filename:t.filename,contentType:t.content_type})}}]),t}();e.default=u},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t){var e=d[t.id()];return e||s.default.pluck(l.default.all(),"name")}function o(){scrivito.editingContext.isViewMode()||scrivito.on("content",function(t){var e=scrivito.WidgetlistFieldElement.all($(t));s.default.each(e,function(t){var e=t.basicField();d[e.id()]=JSON.parse(t.dom_element().attr(f))})})}function a(){d={}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var u=r(0),s=n(u),c=r(31),l=n(c),f="data-scrivito-private-field-widget-allowed-classes",d={};i.init=o,i.clearCache=a},function(t,e,r){t.exports=r(161)},,,,,,,,,,,,function(t,e,r){"use strict";function n(){if(window.parent!==window){var t=window.parent.connectAppDocument;return t?t(window.document):void 0}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n},function(t,e,r){"use strict";r(139),r(140),r(141),r(145),r(146),r(149),r(150),r(151),r(154),r(155),r(176),r(177),r(178),r(179),r(3),r(180),r(181),r(182),r(186),r(187),r(188),r(189)},function(t,e,r){"use strict";window.scrivito||(window.scrivito={}),window.scrivito.client={}},function(t,e,r){"use strict";var n=r(0),i=function(t){return t&&t.__esModule?t:{default:t}}(n);!function(){function t(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.default.contains(["PUT","POST","DELETE"],t),o=r&&r.skip_write_monitor;n&&(r.timeout=15e3,o||scrivito.WriteMonitor.startWrite());var u=a(t,e,r);return n&&!o&&scrivito.WriteMonitor.endWriteWhenDone(u),u}function e(t,e,n){return scrivito.ajax(t,e,n).catch(function(t){throw r(t),t})}function r(t){var e=void 0,r=void 0;i.default.isObject(t)?(e=scrivito.t("ajax_error",t.message),r=t.message_for_editor):e=i.default.contains(["abort","parsererror","timeout"],t)?scrivito.t("ajax_error.communication"):scrivito.t("ajax_error",t),scrivito.isDevelopmentMode?scrivito.AlertDialog.open(e):(scrivito.logError(e),scrivito.ErrorDialog.open(r||scrivito.t("ajax_error.message_for_editor"),[t.timestamp,e]))}function n(){u=!0}function o(){u=!1}function a(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(u)return scrivito.Promise.reject("scrivito.ajax is disabled due to scrivito.disableAjax()!");var n=window.location.protocol+"//"+window.location.host+"/__scrivito/";r.data&&(r.data=JSON.stringify(r.data));var o=$.ajax(n+e,i.default.extend({type:t,dataType:"json",contentType:"application/json; charset=utf-8",cache:!1},r));return new scrivito.Promise(function(t,e){o.then(t),o.fail(function(t,r,n){try{return e(JSON.parse(t.responseText))}catch(t){return e(n)}})})}var u=!1;scrivito.ajax=t,scrivito.ajaxWithErrorDialog=e,scrivito.displayAjaxError=r,scrivito.disableAjax=n,scrivito.enableAjax=o}()},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(0),o=n(i),a=r(1),u=r(13),s=n(u);!function(){function t(t,r){return e(t.prototype,r)}function e(t,e){o.default.each(e,function(e,n){t[e]=r(n)})}function r(t){return function(){for(var e=this,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return scrivito.PublicPromise.resolve((0,s.default)(function(){return e[t].apply(e,n)}))}}function n(){throw new a.InternalError("this method is supposed to be overwritten by calling provideAsyncMethods")}scrivito.provideAsyncMethods=e,scrivito.provideAsyncClassMethods=e,scrivito.provideAsyncInstanceMethods=t,scrivito.asyncMethodStub=n}()},function(t,e,r){"use strict";function n(t){var e=a;try{return a=[],t(),new s(a)}finally{a=e}}function i(t){a&&a.push({reason:"missing",loader:t})}function o(t){a&&a.push({reason:"outdated",loader:t})}Object.defineProperty(e,"__esModule",{value:!0});var a,u=r(0);e.capture=n,e.notifyMissingData=i,e.notifyOutdatedData=o;var s=function(){function t(t){this.captureList=t}return t.prototype.isAllDataLoaded=function(){return!u.findWhere(this.captureList,{reason:"missing"})},t.prototype.isAllDataUpToDate=function(){return 0===this.captureList.length},t.prototype.loadRequiredData=function(){if(0===this.captureList.length)return null;this.captureList.forEach(function(t){return t.loader()})},t}();e.CaptureReport=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1),i={},o={status:void 0},a=function(){function t(t){if(!t)throw new n.InternalError("LoadableValue needs stateContainer");this.container=t,this.id=t.id()}return t.resetLoadingState=function(){i={}},t.prototype.setLoading=function(t){i[this.id]=t},t.prototype.getLoading=function(){return i[this.id]},t.prototype.status=function(){return this.getState().status||"MISSING"},t.prototype.value=function(){var t=this.getState();if("AVAILABLE"===t.status)return t.value},t.prototype.error=function(){var t=this.getState();if("ERROR"===t.status)return t.error},t.prototype.version=function(){var t=this.getState();if(void 0!==t.status)return t.version},t.prototype.transitionToMissing=function(){this.setState({status:void 0})},t.prototype.transitionToAvailable=function(t,e){this.setState({status:"AVAILABLE",value:t,version:e})},t.prototype.transitionToError=function(t,e){this.setState({status:"ERROR",error:t,version:e})},t.prototype.setState=function(t){delete i[this.id],this.container.set(t)},t.prototype.getState=function(){return this.container.get()||o},t}();e.default=a},function(t,e,r){"use strict";var n=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=r(1),o=r(0),a=0,u=Object.assign||o.extend,s=function(){function t(){}return t.prototype.get=function(){var t=this,e=this.untrackedGet();return this.recordDetector(function(){return e!==t.untrackedGet()}),e},t.prototype.recordDetector=function(t){this.getTree().recordDetector(t)},t.prototype.clear=function(){this.set(void 0)},t.prototype.subState=function(t){return new l(this,t)},t.prototype.setSubState=function(t,e){var r=this.untrackedGet();if(void 0===r){var n=(o={},o[t]=e,o);this.set(n)}else{var i=u({},r);i[t]=e,this.set(i)}var o},t.prototype.getSubState=function(t){var e=this.untrackedGet();if(void 0!==e)return e[t]},t}(),c=function(t){function e(){var e=t.call(this)||this;return e.treeId=(a++).toString(),e.clearListeners(),e.batchUpdates=!1,e.version=0,e}return n(e,t),e.prototype.untrackedGet=function(){return this.state},e.prototype.set=function(t){this.state=t,this.version++,this.batchUpdates||this.notifyListeners()},e.prototype.trackChanges=function(t){var e=this,r=this.version,n=this.recordDetectors(t);return function(){return e.version!==r&&!!o.find(n,function(t){return t()})}},e.prototype.recordDetector=function(t){var e=this.detectorRecording;void 0!==e&&e.push(t)},e.prototype.getTree=function(){return this},e.prototype.id=function(){return this.treeId},e.prototype.subscribe=function(t){var e=this,r=!0,n=function(){r&&t()};return this.ensureCanMutateListeners(),this.listeners.push(n),function(){r=!1;var t=e.listeners.indexOf(n);e.ensureCanMutateListeners(),e.listeners.splice(t,1)}},e.prototype.withBatchedUpdates=function(t){var e=this.state,r=this.batchUpdates;try{this.batchUpdates=!0,t()}finally{this.batchUpdates=r,this.batchUpdates||e===this.state||this.notifyListeners()}},e.prototype.listenerCount=function(){return this.listeners.length},e.prototype.clearListeners=function(){this.listeners=[]},e.prototype.recordDetectors=function(t){if(void 0!==this.detectorRecording)throw new i.InternalError("no nested detector recording!");try{return this.detectorRecording=[],t(),this.detectorRecording}finally{this.detectorRecording=void 0}},e.prototype.notifyListeners=function(){this.listenersToNotify=this.listeners,this.listenersToNotify.forEach(function(t){return t()})},e.prototype.ensureCanMutateListeners=function(){this.listenersToNotify===this.listeners&&(this.listeners=this.listeners.slice())},e}(s);e.default=c;var l=function(t){function e(e,r){var n=t.call(this)||this;return n.parentState=e,n.key=r,n.tree=e.getTree(),n}return n(e,t),e.prototype.getTree=function(){return this.tree},e.prototype.untrackedGet=function(){return this.parentState.getSubState(this.key)},e.prototype.set=function(t){this.parentState.setSubState(this.key,t)},e.prototype.id=function(){var t=this.key.replace(/\\/g,"\\\\").replace(/\//g,"\\/");return this.parentState.id()+"/"+t},e}(s)},function(t,e,r){"use strict";var n=r(4);!function(){function t(t){i()||scrivito.nextTick(function(){(0,n.withBatchedUpdates)(function(){return e(r)})}),r.push(t)}function e(t){r=[];try{t.forEach(function(t){return t()})}finally{i()&&e(r)}}var r=[],i=function(){return r.length};scrivito.batchedStateUpdater={add:t}}()},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),a=r(10),u=n(a),s=r(49),c=n(s),l=r(0),f=n(l),d=r(1),p=r(121),h=n(p),v=r(147),y=n(v),_=r(46);!function(){function t(){return j?scrivito.Promise.resolve():(O||(O=new u.default),O.promise)}function e(e,n,i){return t().then(function(){return r(e,n,i).then(function(t){return t&&t.task&&1===f.default.size(t)?b(t.task):t})})}function r(t,e,r){return a(t,function(i){return C.perform(function(o){return n(m({method:t,path:e,requestParams:r,timeout:i,authorization:o}))})})}function n(t){return scrivito.Promise.resolve(t).catch(v)}function a(t,e){var r=new E;return s(r,t,function(){return l(r,function(){return e(r.remainingTime())})})}function s(t,e,r){return"POST"===e?r():r().catch(function(e){if(!t.timedOut()){if(e instanceof d.BackendError)return r();if(e instanceof d.NetworkError)return r()}throw e})}function l(t,e){return function r(n){return e().catch(function(e){if(e instanceof d.NetworkError&&429===e.httpCode){var i=e.response,o=p(i.getResponseHeader("Retry-After"),n);if(t.cover(Date.now()+o))return scrivito.Promise.resolve(scrivito.waitMs(o)).then(function(){return r(n+1)});throw new d.RateLimitExceededError("rate limit exceeded",429)}throw e})}(0)}function p(t,e){var r=.5*Math.pow(2,e)*1e3;return Math.max(r,1e3*t)}function v(t){if(void 0===t.status||!f.default.isNumber(t.status))throw t;var e=void 0;try{e=JSON.parse(t.responseText)}catch(e){throw new d.NetworkError(t)}if("auth_missing"===e.code&&e.details){var r=h.default.augmentedRedirectUrl((0,_.location)()),n=e.details.visit.replace("retry=RETRY","retry="+h.default.currentFailureCount()).replace(/\$RETURN_TO/,encodeURIComponent(r));return(0,_.redirectTo)(n)}var i=e.error;if(401===t.status)throw new d.UnauthorizedError(i,t.status,e.code,e.details);if(403===t.status)throw new d.AccessDeniedError(i,t.status,e.code);if(429===t.status)throw new d.NetworkError(t);if(i){if(500===t.status)throw new d.BackendError(i,t.status);if("4"===t.status.toString()[0]&&e.error)throw d.ClientError.for(i,t.status,e.code)}throw new d.NetworkError(t)}function g(t,e){return{path:e,verb:t,params:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}}}function m(t){var e=t.method,r=t.path,n=t.requestParams,i=t.timeout,o=t.authorization,a=(0,c.default)(k+"/tenants/"+j+"/perform").scheme("https").toString(),u=g(e,r,n);return scrivito.fetch(e,a,{params:u,timeout:i,authorization:o,forceVerification:P})}function b(t){switch(t.status){case"success":return t.result;case"error":throw d.ClientError.for(t.message,412,t.code);case"open":return scrivito.wait(2).then(function(){return r("GET","tasks/"+t.id).then(function(t){return b(t)})});default:throw new d.ScrivitoError("Invalid task response (unknown status)")}}var w=15e3,k=void 0,j=void 0,O=void 0,C=void 0,P=void 0;scrivito.CmsRestApi={init:function(t,e,r){e&&(k=t,j=e,O&&O.resolve()),C=r||C||y.default},reset:function(){k=void 0,j=void 0,O=void 0,C=void 0,P=void 0},get:function(t,r){return e("GET",t,r)},put:function(t,r){return e("PUT",t,r)},post:function(t,r){return e("POST",t,r)},delete:function(t,r){return e("DELETE",t,r)},requestBuiltInUserSession:function(e){return t().then(function(){var t="sessions/"+e,r=a("PUT",function(e){return n(m({method:"PUT",path:t,timeout:e}))});return r.then(h.default.reset),r})},enableForceVerification:function(){P=!0},currentPublicAuthorizationState:function(){return C?C.currentState?"[API] "+C.currentState():"[API]: authorization provider without currentState()":"[API]: no authorization provider"},get endpoint(){return k},get tenant(){return j}};var E=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w;i(this,t),this.timesOutAt=Date.now()+e}return o(t,[{key:"timedOut",value:function(){return this.remainingTime()<5}},{key:"remainingTime",value:function(){return Math.max(this.timesOutAt-Date.now(),0)}},{key:"cover",value:function(t){return t<=this.timesOutAt-5}}]),t}()}()},function(t,e,r){"use strict";function n(t){return new scrivito.Promise(function(e){return e(t(u()))}).catch(function(e){if(!(e instanceof c.UnauthorizedError))throw e;if(e.backendCode!==d)throw e;return i(e.details.verificator,e.details.data).then(function(e){return t(e.authorization)})})}function i(t,e){return p&&p.isPending()||(p=f.default.fetch(t.id,t.url).then(function(t){return new scrivito.Promise(function(r){return t(e,r)})}),p.then(o),p.challenge={verificator:t,data:e}),p}function o(t){p=void 0,h=t}function a(){o()}function u(){if(h)return h.expiresAfter<new Date?void(h=void 0):h.authorization}function s(){var t=u();if(t)return"Authorization: "+t;if(!p)return null;var e=p.challenge,r=e.verificator,n=r.id,i=e.data;if(p.isPending())return"Pending computation: "+n+" with "+i;var o="Orphaned computation: "+n+" with "+i;if(!h)return o+" (verification not present?!?)";var a=h&&h.expiresAfter;if(!a)return o+" (verification present, but without expiry?)";var s="(verification expiresAfter: "+a+")";return new Date<=a?o+" "+s:o+" "+s+" (expired)"}Object.defineProperty(e,"__esModule",{value:!0});var c=r(1),l=r(148),f=function(t){return t&&t.__esModule?t:{default:t}}(l),d="client_verification_required",p=void 0,h=void 0;a(),e.default={perform:n,reset:a,currentState:s,ERROR_CODE_CLIENT_VERIFICATION_REQUIRED:d}},function(t,e,r){"use strict";function n(){s={}}function i(t,e){var r=s[t];return r||(r=new a.default,s[t]=r,(0,u.loadJs)(e,function(e){r.reject(e),delete s[t]})),r.promise}Object.defineProperty(e,"__esModule",{value:!0});var o=r(10),a=function(t){return t&&t.__esModule?t:{default:t}}(o),u=r(97),s=void 0;n(),window._scrivitoRegisterVerificator=function(t,e){s[t].resolve(e)},e.default={fetch:i,reset:n}},function(t,e,r){"use strict";var n=r(0),i=function(t){return t&&t.__esModule?t:{default:t}}(n);!function(){function t(e){return i.default.isArray(e)?i.default.map(e,t):i.default.isObject(e)?i.default.chain(e).mapObject(t).pairs().sortBy(i.default.first):e}scrivito.computeCacheKey=function(e){var r=t(e);return JSON.stringify(r)}}()},function(t,e,r){"use strict";!function(){scrivito.currentWorkspaceId=function(){return scrivito.uiAdapter?scrivito.uiAdapter.currentWorkspaceId():"published"}}()},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}var o=r(0),a=n(o),u=r(152),s=n(u);!function(){function t(){if(window&&window.console&&!n){var t;(t=window.console).error.apply(t,arguments)}}function e(){n=!0}function r(t){if(t instanceof Error){var e=s.default.parse(t);scrivito.logError([t.message].concat(i(a.default.pluck(e,"source"))).join("\n"))}else scrivito.logError(t)}var n=!1;scrivito.logError=t,scrivito.disableConsoleError=e,scrivito.printError=r}()},function(t,e,r){var n,i,o;!function(a,u){"use strict";i=[r(153)],n=u,void 0!==(o="function"==typeof n?n.apply(e,i):n)&&(t.exports=o)}(0,function(t){"use strict";function e(t,e,r){if("function"==typeof Array.prototype.map)return t.map(e,r);for(var n=new Array(t.length),i=0;i<t.length;i++)n[i]=e.call(r,t[i]);return n}function r(t,e,r){if("function"==typeof Array.prototype.filter)return t.filter(e,r);for(var n=[],i=0;i<t.length;i++)e.call(r,t[i])&&n.push(t[i]);return n}function n(t,e){if("function"==typeof Array.prototype.indexOf)return t.indexOf(e);for(var r=0;r<t.length;r++)if(t[r]===e)return r;return-1}var i=/(^|@)\S+\:\d+/,o=/^\s*at .*(\S+\:\d+|\(native\))/m,a=/^(eval@)?(\[native code\])?$/;return{parse:function(t){if(void 0!==t.stacktrace||void 0!==t["opera#sourceloc"])return this.parseOpera(t);if(t.stack&&t.stack.match(o))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/,r=e.exec(t.replace(/[\(\)]/g,""));return[r[1],r[2]||void 0,r[3]||void 0]},parseV8OrIE:function(i){return e(r(i.stack.split("\n"),function(t){return!!t.match(o)},this),function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),i=this.extractLocation(r.pop()),o=r.join(" ")||void 0,a=n(["eval","<anonymous>"],i[0])>-1?void 0:i[0];return new t(o,void 0,a,i[1],i[2],e)},this)},parseFFOrSafari:function(n){return e(r(n.stack.split("\n"),function(t){return!t.match(a)},this),function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t(e);var r=e.split("@"),n=this.extractLocation(r.pop()),i=r.join("@")||void 0;return new t(i,void 0,n[0],n[1],n[2],e)},this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),i=[],o=2,a=n.length;o<a;o+=2){var u=r.exec(n[o]);u&&i.push(new t(void 0,void 0,u[2],u[1],void 0,n[o]))}return i},parseOpera10:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=e.stacktrace.split("\n"),i=[],o=0,a=n.length;o<a;o+=2){var u=r.exec(n[o]);u&&i.push(new t(u[3]||void 0,void 0,u[2],u[1],void 0,n[o]))}return i},parseOpera11:function(n){return e(r(n.stack.split("\n"),function(t){return!!t.match(i)&&!t.match(/^Error created at/)},this),function(e){var r,n=e.split("@"),i=this.extractLocation(n.pop()),o=n.shift()||"",a=o.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||void 0;o.match(/\(([^\)]*)\)/)&&(r=o.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var u=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t(a,u,i[0],i[1],i[2],e)},this)}}})},function(t,e,r){var n,i,o;!function(r,a){"use strict";i=[],n=a,void 0!==(o="function"==typeof n?n.apply(e,i):n)&&(t.exports=o)}(0,function(){"use strict";function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t,e,r,n,i,o){void 0!==t&&this.setFunctionName(t),void 0!==e&&this.setArgs(e),void 0!==r&&this.setFileName(r),void 0!==n&&this.setLineNumber(n),void 0!==i&&this.setColumnNumber(i),void 0!==o&&this.setSource(o)}return e.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(t){this.functionName=String(t)},getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getFileName:function(){return this.fileName},setFileName:function(t){this.fileName=String(t)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(e){if(!t(e))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(e)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(e){if(!t(e))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(e)},getSource:function(){return this.source},setSource:function(t){this.source=String(t)},toString:function(){return(this.getFunctionName()||"{anonymous}")+"("+(this.getArgs()||[]).join(",")+")"+(this.getFileName()?"@"+this.getFileName():"")+(t(this.getLineNumber())?":"+this.getLineNumber():"")+(t(this.getColumnNumber())?":"+this.getColumnNumber():"")}},e})},function(t,e,r){"use strict";var n=r(10),i=function(t){return t&&t.__esModule?t:{default:t}}(n);!function(){function t(t,n,i,o,a){var u=new XMLHttpRequest;return u.open("POST"===t?"POST":"PUT",n),u.timeout=i,u.withCredentials=!0,u.onload=function(){return e(u,o,a)},u.onerror=function(t){return r(t,a)},u}function e(t,e,r){if(o-=1,t.status>=200&&t.status<300)try{return e(JSON.parse(t.responseText))}catch(r){if(r instanceof SyntaxError)return e(t.responseText);throw r}return r(t)}function r(t,e){o-=1,e(new Error("Network Error: "+t))}var n=!1,o=0;scrivito.isFetchingActive=function(){return o>0},scrivito.disableFetching=function(){n=!0},scrivito.fetch=function(e,r,a){var u=a.params,s=a.timeout,c=a.authorization,l=a.forceVerification;return n?(new i.default).promise:(o+=1,new scrivito.Promise(function(n,i){var o=t(e,r,s,n,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(u))}))}}()},function(t,e,r){"use strict";var n=r(156),i=function(t){return t&&t.__esModule?t:{default:t}}(n),o=r(4);!function(){function t(t){var e=t.clientModulesForExport();n.forEach(function(t){scrivito[t]=e[t]})}function e(){var t={};return n.forEach(function(e){t[e]=scrivito[e]}),t}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.ui,n=e.realmContext;n&&i.default.init(n),r&&t(r),(0,o.initializeGlobalState)(r)}var n=["BinaryRequest","CmsRestApi","ObjReplication"];scrivito.client.init=r,scrivito.client.modulesForExport=e}()},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),a=r(157),u=n(a),s=r(170),c=n(s),l=r(171),f=n(l),d=r(172),p=n(d),h=r(173),v=n(h),y=r(174),_=n(y),g=r(1),m=r(61),b=n(m),w=r(175),k=function(){function t(){i(this,t),this._registry=new _.default,this._registry.defaultClassForObjs=(0,f.default)(this._registry),this._registry.defaultClassForWidgets=(0,u.default)(this._registry),this._registry.defaultClassForLinks=(0,p.default)(this._registry),this._registry.ObjSearch=(0,c.default)(this._registry),this.appModelAccessor=new b.default(this._registry)}return o(t,null,[{key:"init",value:function(e){var r=new t;e.Obj=r.Obj,e.Widget=r.Widget,e.Link=r.Link,e.ObjSearch=r.ObjSearch,e.appModelAccessor=r.appModelAccessor,e.createObjClass=function(){return r.createObjClass.apply(r,arguments)},e.createWidgetClass=function(){return r.createWidgetClass.apply(r,arguments)},e.getClass=function(){return r.getClass.apply(r,arguments)},e.registerClass=function(){return r.registerClass.apply(r,arguments)},e.allObjClasses=function(){return r.allObjClasses()},e.allWidgetClasses=function(){return r.allWidgetClasses()},e._privateRealm=r}}]),o(t,[{key:"createObjClass",value:function(t){return(0,w.assertValidObjClassDefinition)(t,this.Obj),this._createAppClass(t,this.Obj)}},{key:"createWidgetClass",value:function(t){(0,w.assertValidWidgetClassDefinition)(t,this.Widget);var e=t.onlyInside;return e&&(delete t.onlyInside,t.validContainerClasses=[e]),this._createAppClass(t,this.Widget)}},{key:"getClass",value:function(t){return this._registry.getClass(t)}},{key:"registerClass",value:function(t,e){if(!e||!(0,w.isValidAppClass)(e,this.Obj,this.Widget))throw new g.ArgumentError("registerClass has to be called with a CMS Obj or Widget class.");this._registry.register(t,e)}},{key:"allObjClasses",value:function(){return this._registry.allObjClasses()}},{key:"allWidgetClasses",value:function(){return this._registry.allWidgetClasses()}},{key:"_createAppClass",value:function(t,e){var r=t.extend||e,n=(0,v.default)(t,r),i=t.name;return i&&this._registry.register(i,n),n}},{key:"Obj",get:function(){return this._registry.defaultClassForObjs}},{key:"Widget",get:function(){return this._registry.defaultClassForWidgets}},{key:"Link",get:function(){return this._registry.defaultClassForLinks}},{key:"ObjSearch",get:function(){return this._registry.ObjSearch}}]),t}();e.default=k},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t){var e=new v.default(t);return function(e){function r(e){i(this,r);var n=o(this,(r.__proto__||Object.getPrototypeOf(r)).call(this)),a=l.default.forInstance(n),u=t.objClassNameFor(n.constructor);if(!u)throw new p.ArgumentError("Creating widgets is not supported for the class Widget or abstract classes.");if(e.constructor!==Object)throw new p.ArgumentError("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(e._objClass)throw new p.ArgumentError('Invalid attribute "_objClass". "new '+e._objClass+'" will automatically set the CMS object class correctly.');e._objClass=u;var s=scrivito.AttributeContentFactory.prepareAttributes(e,a,u);return n._scrivitoPrivateContent=new d.default(s),n}return a(r,e),s(r,[{key:"obj",value:function(){var e=this._scrivitoPrivateContent.obj();return scrivito.wrapInAppClass(t,e)}},{key:"copy",value:function(){var e=t.widgetClassFor(this.objClass()),r=this._scrivitoPrivateContent.copy();return scrivito.buildAppClassInstance(r,e)}}]),r}(scrivito.AttributeContentFactory(e))}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();e.default=u;var c=r(23),l=n(c),f=r(14),d=n(f),p=r(1),h=r(61),v=n(h)},function(t,e,r){"use strict";function n(t){return o().get()[t]||null}function i(t){o().set(t)}function o(){var t=c.uiState.subState("railsThumbnails");return new s.default({state:t,loader:a,throwNotLoaded:!0})}function a(){return scrivito.ajax("GET","obj_class/thumbnails")}Object.defineProperty(e,"__esModule",{value:!0}),e.storeRailsThumbnails=e.getRailsThumbnail=void 0;var u=r(5),s=function(t){return t&&t.__esModule?t:{default:t}}(u),c=r(4);e.getRailsThumbnail=n,e.storeRailsThumbnails=i},function(t,e,r){"use strict";function n(t){return i(t).get()}function i(t){var e=void 0,r=c.uiState.subState("validRailsPageClasses");return e=t?r.subState("byPath").subState(t):r.subState("withoutPath"),new s.default({state:e,loader:a(t),throwNotLoaded:!0})}function o(t,e){i(t).set(e)}function a(t){var e="";return t&&(e="?"+$.param({parent_path:t})),function(){return scrivito.ajax("GET","objs/valid_page_classes"+e)}}Object.defineProperty(e,"__esModule",{value:!0}),e.storeValidRailsPageClasses=e.validRailsPageClasses=void 0;var u=r(5),s=function(t){return t&&t.__esModule?t:{default:t}}(u),c=r(4);e.validRailsPageClasses=n,e.storeValidRailsPageClasses=o},function(t,e,r){"use strict";function n(t){return(0,o.default)(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var i=r(125),o=function(t){return t&&t.__esModule?t:{default:t}}(i)},function(t,e,r){var n,i;!function(r,o){"use strict";var a=function(t,e){var r,n,i,o,a,u,l,f,d,p,h,v,y,_,g,m="-",b=[";","?",":","@","&","=","+","$",",","/"],w=[";","?",":","@","&","=","+","$",","],k=[".","!","~","*","'","(",")"],j="",O="",C=!0,P={},E={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"Ae","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"Oe","Ő":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"Ue","Ű":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"ae","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"oe","ő":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"ue","ű":"u","ý":"y","þ":"th","ÿ":"y","ẞ":"SS","ا":"a","أ":"a","إ":"i","آ":"aa","ؤ":"u","ئ":"e","ء":"a","ب":"b","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ي":"y","ى":"a","ة":"h","ﻻ":"la","ﻷ":"laa","ﻹ":"lai","ﻵ":"laa","گ":"g","چ":"ch","پ":"p","ژ":"zh","ک":"k","ی":"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","က":"k","ခ":"kh","ဂ":"g","ဃ":"ga","င":"ng","စ":"s","ဆ":"sa","ဇ":"z","စျ":"za","ည":"ny","ဋ":"t","ဌ":"ta","ဍ":"d","ဎ":"da","ဏ":"na","တ":"t","ထ":"ta","ဒ":"d","ဓ":"da","န":"n","ပ":"p","ဖ":"pa","ဗ":"b","ဘ":"ba","မ":"m","ယ":"y","ရ":"ya","လ":"l","ဝ":"w","သ":"th","ဟ":"h","ဠ":"la","အ":"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h","ဧ":"e","၏":"-e","ဣ":"i","ဤ":"-i","ဉ":"u","ဦ":"-u","ဩ":"aw","သြော":"aw","ဪ":"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"","č":"c","ď":"d","ě":"e","ň":"n","ř":"r","š":"s","ť":"t","ů":"u","ž":"z","Č":"C","Ď":"D","Ě":"E","Ň":"N","Ř":"R","Š":"S","Ť":"T","Ů":"U","Ž":"Z","ހ":"h","ށ":"sh","ނ":"n","ރ":"r","ބ":"b","ޅ":"lh","ކ":"k","އ":"a","ވ":"v","މ":"m","ފ":"f","ދ":"dh","ތ":"th","ލ":"l","ގ":"g","ޏ":"gn","ސ":"s","ޑ":"d","ޒ":"z","ޓ":"t","ޔ":"y","ޕ":"p","ޖ":"j","ޗ":"ch","ޘ":"tt","ޙ":"hh","ޚ":"kh","ޛ":"th","ޜ":"z","ޝ":"sh","ޞ":"s","ޟ":"d","ޠ":"t","ޡ":"z","ޢ":"a","ޣ":"gh","ޤ":"q","ޥ":"w","ަ":"a","ާ":"aa","ި":"i","ީ":"ee","ު":"u","ޫ":"oo","ެ":"e","ޭ":"ey","ޮ":"o","ޯ":"oa","ް":"","α":"a","β":"v","γ":"g","δ":"d","ε":"e","ζ":"z","η":"i","θ":"th","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"ks","ο":"o","π":"p","ρ":"r","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"o","ά":"a","έ":"e","ί":"i","ό":"o","ύ":"y","ή":"i","ώ":"o","ς":"s","ϊ":"i","ΰ":"y","ϋ":"y","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"I","Θ":"TH","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"KS","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"O","Ά":"A","Έ":"E","Ί":"I","Ό":"O","Ύ":"Y","Ή":"I","Ώ":"O","Ϊ":"I","Ϋ":"Y","ā":"a","ē":"e","ģ":"g","ī":"i","ķ":"k","ļ":"l","ņ":"n","ū":"u","Ā":"A","Ē":"E","Ģ":"G","Ī":"I","Ķ":"k","Ļ":"L","Ņ":"N","Ū":"U","Ќ":"Kj","ќ":"kj","Љ":"Lj","љ":"lj","Њ":"Nj","њ":"nj","Тс":"Ts","тс":"ts","ą":"a","ć":"c","ę":"e","ł":"l","ń":"n","ś":"s","ź":"z","ż":"z","Ą":"A","Ć":"C","Ę":"E","Ł":"L","Ń":"N","Ś":"S","Ź":"Z","Ż":"Z","Є":"Ye","І":"I","Ї":"Yi","Ґ":"G","є":"ye","і":"i","ї":"yi","ґ":"g","ă":"a","Ă":"A","ș":"s","Ș":"S","ț":"t","Ț":"T","ţ":"t","Ţ":"T","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ё":"yo","ж":"zh","з":"z","и":"i","й":"i","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"kh","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ё":"Yo","Ж":"Zh","З":"Z","И":"I","Й":"I","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"Kh","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","ђ":"dj","ј":"j","ћ":"c","џ":"dz","Ђ":"Dj","Ј":"j","Ћ":"C","Џ":"Dz","ľ":"l","ĺ":"l","ŕ":"r","Ľ":"L","Ĺ":"L","Ŕ":"R","ş":"s","Ş":"S","ı":"i","İ":"I","ğ":"g","Ğ":"G","ả":"a","Ả":"A","ẳ":"a","Ẳ":"A","ẩ":"a","Ẩ":"A","đ":"d","Đ":"D","ẹ":"e","Ẹ":"E","ẽ":"e","Ẽ":"E","ẻ":"e","Ẻ":"E","ế":"e","Ế":"E","ề":"e","Ề":"E","ệ":"e","Ệ":"E","ễ":"e","Ễ":"E","ể":"e","Ể":"E","ọ":"o","Ọ":"o","ố":"o","Ố":"O","ồ":"o","Ồ":"O","ổ":"o","Ổ":"O","ộ":"o","Ộ":"O","ỗ":"o","Ỗ":"O","ơ":"o","Ơ":"O","ớ":"o","Ớ":"O","ờ":"o","Ờ":"O","ợ":"o","Ợ":"O","ỡ":"o","Ỡ":"O","Ở":"o","ở":"o","ị":"i","Ị":"I","ĩ":"i","Ĩ":"I","ỉ":"i","Ỉ":"i","ủ":"u","Ủ":"U","ụ":"u","Ụ":"U","ũ":"u","Ũ":"U","ư":"u","Ư":"U","ứ":"u","Ứ":"U","ừ":"u","Ừ":"U","ự":"u","Ự":"U","ữ":"u","Ữ":"U","ử":"u","Ử":"ư","ỷ":"y","Ỷ":"y","ỳ":"y","Ỳ":"Y","ỵ":"y","Ỵ":"Y","ỹ":"y","Ỹ":"Y","ạ":"a","Ạ":"A","ấ":"a","Ấ":"A","ầ":"a","Ầ":"A","ậ":"a","Ậ":"A","ẫ":"a","Ẫ":"A","ắ":"a","Ắ":"A","ằ":"a","Ằ":"A","ặ":"a","Ặ":"A","ẵ":"a","Ẵ":"A","“":'"',"”":'"',"‘":"'","’":"'","∂":"d","ƒ":"f","™":"(TM)","©":"(C)","œ":"oe","Œ":"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o","º":"o","ª":"a","•":"*","၊":",","။":".",$:"USD","€":"EUR","₢":"BRN","₣":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","¥":"CNY","元":"CNY","円":"YEN","﷼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF","₺":"TRY","؋":"AFN","₼":"AZN","лв":"BGN","៛":"KHR","₡":"CRC","₸":"KZT","ден":"MKD","zł":"PLN","₽":"RUB","₾":"GEL"},A=["်","ް"],S={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},x={en:{},az:{"ç":"c","ə":"e","ğ":"g","ı":"i","ö":"o","ş":"s","ü":"u","Ç":"C","Ə":"E","Ğ":"G","İ":"I","Ö":"O","Ş":"S","Ü":"U"},cs:{"č":"c","ď":"d","ě":"e","ň":"n","ř":"r","š":"s","ť":"t","ů":"u","ž":"z","Č":"C","Ď":"D","Ě":"E","Ň":"N","Ř":"R","Š":"S","Ť":"T","Ů":"U","Ž":"Z"},fi:{"ä":"a","Ä":"A","ö":"o","Ö":"O"},hu:{"ä":"a","Ä":"A","ö":"o","Ö":"O","ü":"u","Ü":"U","ű":"u","Ű":"U"},lt:{"ą":"a","č":"c","ę":"e","ė":"e","į":"i","š":"s","ų":"u","ū":"u","ž":"z","Ą":"A","Č":"C","Ę":"E","Ė":"E","Į":"I","Š":"S","Ų":"U","Ū":"U"},lv:{"ā":"a","č":"c","ē":"e","ģ":"g","ī":"i","ķ":"k","ļ":"l","ņ":"n","š":"s","ū":"u","ž":"z","Ā":"A","Č":"C","Ē":"E","Ģ":"G","Ī":"i","Ķ":"k","Ļ":"L","Ņ":"N","Š":"S","Ū":"u","Ž":"Z"},pl:{"ą":"a","ć":"c","ę":"e","ł":"l","ń":"n","ó":"o","ś":"s","ź":"z","ż":"z","Ą":"A","Ć":"C","Ę":"e","Ł":"L","Ń":"N","Ó":"O","Ś":"S","Ź":"Z","Ż":"Z"},sk:{"ä":"a","Ä":"A"},sr:{"љ":"lj","њ":"nj","Љ":"Lj","Њ":"Nj","đ":"dj","Đ":"Dj"},tr:{"Ü":"U","Ö":"O","ü":"u","ö":"o"}},T={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}};if("string"!=typeof t)return"";if("string"==typeof e&&(m=e),l=T.en,f=x.en,"object"==typeof e){r=e.maintainCase||!1,P=e.custom&&"object"==typeof e.custom?e.custom:P,i=+e.truncate>1&&e.truncate||!1,o=e.uric||!1,a=e.uricNoSlash||!1,u=e.mark||!1,C=!1!==e.symbols&&!1!==e.lang,m=e.separator||m,o&&(g+=b.join("")),a&&(g+=w.join("")),u&&(g+=k.join("")),l=e.lang&&T[e.lang]&&C?T[e.lang]:C?T.en:{},f=e.lang&&x[e.lang]?x[e.lang]:!1===e.lang||!0===e.lang?{}:x.en,e.titleCase&&"number"==typeof e.titleCase.length&&Array.prototype.toString.call(e.titleCase)?(e.titleCase.forEach(function(t){P[t+""]=t+""}),n=!0):n=!!e.titleCase,e.custom&&"number"==typeof e.custom.length&&Array.prototype.toString.call(e.custom)&&e.custom.forEach(function(t){P[t+""]=t+""}),Object.keys(P).forEach(function(e){var r;r=e.length>1?new RegExp("\\b"+s(e)+"\\b","gi"):new RegExp(s(e),"gi"),t=t.replace(r,P[e])});for(h in P)g+=h}for(g+=m,g=s(g),t=t.replace(/(^\s+|\s+$)/g,""),y=!1,_=!1,p=0,v=t.length;p<v;p++)h=t[p],c(h,P)?y=!1:f[h]?(h=y&&f[h].match(/[A-Za-z0-9]/)?" "+f[h]:f[h],y=!1):h in E?(p+1<v&&A.indexOf(t[p+1])>=0?(O+=h,h=""):!0===_?(h=S[O]+E[h],O=""):h=y&&E[h].match(/[A-Za-z0-9]/)?" "+E[h]:E[h],y=!1,_=!1):h in S?(O+=h,h="",p===v-1&&(h=S[O]),_=!0):!l[h]||o&&-1!==b.join("").indexOf(h)||a&&-1!==w.join("").indexOf(h)?(!0===_?(h=S[O]+h,O="",_=!1):y&&(/[A-Za-z0-9]/.test(h)||j.substr(-1).match(/A-Za-z0-9]/))&&(h=" "+h),y=!1):(h=y||j.substr(-1).match(/[A-Za-z0-9]/)?m+l[h]:l[h],h+=void 0!==t[p+1]&&t[p+1].match(/[A-Za-z0-9]/)?m:"",y=!0),j+=h.replace(new RegExp("[^\\w\\s"+g+"_-]","g"),m);return n&&(j=j.replace(/(\w)(\S*)/g,function(t,e,r){var n=e.toUpperCase()+(null!==r?r:"");return Object.keys(P).indexOf(n.toLowerCase())<0?n:n.toLowerCase()})),j=j.replace(/\s+/g,m).replace(new RegExp("\\"+m+"+","g"),m).replace(new RegExp("(^\\"+m+"+|\\"+m+"+$)","g"),""),i&&j.length>i&&(d=j.charAt(i)===m,j=j.slice(0,i),d||(j=j.slice(0,j.lastIndexOf(m)))),r||n||(j=j.toLowerCase()),j},u=function(t){return function(e){return a(e,t)}},s=function(t){return t.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},c=function(t,e){for(var r in e)if(e[r]===t)return!0};void 0!==t&&t.exports?(t.exports=a,t.exports.createSlug=u):(n=[],void 0!==(i=function(){return a}.apply(e,n))&&(t.exports=i))}()},function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),a=r(163),u=n(a),s=r(68),c=n(s),l=r(5),f=function(t){return t&&t.__esModule?t:{default:t}}(l),d=function(){function t(e,r){var n=this;i(this,t),this._loadableData=new f.default({state:r,loader:function(t){return u.retrieveObj(n._id).then(function(e){return t(function(){return n._replication().notifyBackendState(e)}),e})}}),this._id=e}return o(t,[{key:"set",value:function(t){this._loadableData.set(t)}},{key:"setError",value:function(t){this._loadableData.setError(t)}},{key:"isAvailable",value:function(){return this._loadableData.isAvailable()}},{key:"update",value:function(t){var e=c.apply(this.current,t);this._loadableData.set(e),this._replication().notifyLocalState(e)}},{key:"finishSaving",value:function(){return this._replication().finishSaving()}},{key:"_replication",value:function(){return scrivito.ObjReplication.get(this._id)}},{key:"current",get:function(){return this._loadableData.get()}}]),t}();e.default=d},function(t,e,r){"use strict";function n(t){var e=scrivito.currentWorkspaceId();return scrivito.CmsRestApi.get("workspaces/"+e+"/objs/mget",{ids:t,include_deleted:!0}).then(function(t){return t.results})}function i(t){return c.retrieve(t).then(function(e){if(e)return e;throw new a.ResourceNotFoundError('Obj with id "'+t+'" not found.')})}function o(){c.reset()}Object.defineProperty(e,"__esModule",{value:!0}),e.retrieveObj=i,e.reset=o;var a=r(1),u=r(90),s=function(t){return t&&t.__esModule?t:{default:t}}(u),c=new s.default(n,{batchSize:17})},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t){(0,_.each)(t,function(t){return y.preload(t)})}function u(t,e){var r=(0,_.extend)({},t,{index:e}),n=d.computeCacheKey(r);return d.stateContainer().subState(n)}function s(t){return function(){return t+"|"+scrivito.ObjReplication.getWorkspaceVersion()}}function c(t){var e=(0,_.omit)({query:t.query,offset:t.offset,sort_by:t.sortBy,sort_order:t.sortDirection},_.isUndefined);return t.includeDeleted&&(e.options={include_deleted:!0}),e}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),f=r(91),d=i(f),p=r(165),h=i(p),v=r(51),y=i(v),_=r(0),g=r(13),m=n(g),b=r(5),w=n(b),k={results:[]},j=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o(this,t),this._params=e,this._batchSize=r,n?(this._index=n.index+1,this._continuation=n.continuationForNextBatch(),this._previousBatch=n):this._index=0}return l(t,null,[{key:"store",value:function(t,e){var r=u(c(t),0),n=s(void 0);new w.default({state:r,invalidation:n}).set({results:e})}},{key:"firstBatchFor",value:function(e,r){return new t(c(e),r)}}]),l(t,[{key:"objIds",value:function(){return this._response().results}},{key:"nextBatch",value:function(){if(this.continuationForNextBatch())return new t(this._params,this._batchSize,this)}},{key:"continuationForNextBatch",value:function(){return this._response().continuation}},{key:"_response",value:function(){return this._data().get()||k}},{key:"_data",value:function(){var t=this;return new w.default({state:u(this._params,this._index),loader:function(){return t._load()},invalidation:s(this._continuation)})}},{key:"_load",value:function(){var t=this;return this._fetchContinuation().then(function(e){var r={size:t._batchSize,continuation:e},n=(0,_.extend)({},t._params,r);return h.retrieve(n).then(function(t){return a(t.results),t})})}},{key:"_fetchContinuation",value:function(){var t=this;return this._previousBatch?(0,m.default)(function(){return t._previousBatch.continuationForNextBatch()}):scrivito.Promise.resolve()}},{key:"index",get:function(){return this._index}}]),t}();e.default=j},function(t,e,r){"use strict";function n(t){var e=scrivito.currentWorkspaceId(),r=o.default.extend({consistent:!0},t);return scrivito.CmsRestApi.get("workspaces/"+e+"/objs/search",r).then(function(t){return t.results=o.default.pluck(t.results,"id"),o.default.pick(t,"results","continuation")})}Object.defineProperty(e,"__esModule",{value:!0}),e.retrieve=n;var i=r(0),o=function(t){return t&&t.__esModule?t:{default:t}}(i)},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return!!t.current._deleted}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),a=r(51),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(a),s=r(1),c=r(92),l=function(t){return t&&t.__esModule?t:{default:t}}(c),f=function(){function t(e,r){n(this,t),this._params=e,this._batchSize=r}return o(t,[{key:"iterator",value:function(){return new d(this._params,this._batchSize)}}]),t}();e.default=f;var d=function(){function t(e,r){n(this,t),this._iterator=new l.default(e,r).iterator()}return o(t,[{key:"next",value:function(){if(!this._iterator)return{done:!0};var t=this._iterator.next().value;if(!t)return{done:!0};try{var e=u.get(t);return void 0===e?(this._iterator=void 0,{done:!0}):i(e)?this.next():{value:e,done:!1}}catch(t){if(t instanceof s.ResourceNotFoundError)return this.next();throw t}}}]),t}()},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(){return scrivito.ObjReplication.getWorkspaceVersion()}function a(t){var e=scrivito.computeCacheKey(t);return y.cmsState.subState("facetQuery").subState(e)}function u(t){var e=v.default.without.apply(v.default,[v.default.keys(t)].concat(b));if(e.length)throw new _.ArgumentError("Invalid options: "+(0,m.default)(e)+". Valid options: "+b)}function s(t,e,r){var n={facets:[{attribute:t,limit:e.limit||10,include_objs:e.includeObjs||0}],size:0};return r&&r.length&&(n.query=r),n}Object.defineProperty(e,"__esModule",{value:!0});var c=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),l=r(168),f=n(l),d=r(5),p=n(d),h=r(0),v=n(h),y=r(4),_=r(1),g=r(21),m=n(g),b=["limit","includeObjs"],w=function(){function t(e,r,n){var c=this;i(this,t),u(r),this._requestParams=s(e,r,n),this._loadableData=new p.default({state:a(this._requestParams),loader:function(){return c._loadData()},invalidation:o})}return c(t,[{key:"result",value:function(){var t=this._loadableData.get();if(!t)return[];var e=v.default.first(t.facets);return v.default.map(e,function(t){var e=t.value,r=t.total,n=t.results.map(function(t){return t.id});return new f.default(e,r,n)})}},{key:"_loadData",value:function(){var t=scrivito.currentWorkspaceId();return scrivito.CmsRestApi.get("workspaces/"+t+"/objs/search",this._requestParams)}}],[{key:"store",value:function(t,e,r,n){u(e);var i=s(t,e,r);new p.default({state:a(i),invalidation:o,throwNotLoaded:!0}).set(n)}}]),t}();e.default=w},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(3),a=function(t){return t&&t.__esModule?t:{default:t}}(o),u=function(){function t(e,r,i){n(this,t),this._name=e,this._count=r,this._includedObjs=i}return i(t,[{key:"name",value:function(){return this._name}},{key:"count",value:function(){return this._count}},{key:"includedObjs",value:function(){return a.default.get(this._includedObjs)}}]),t}();e.default=u},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e,r,n){var i=k(e,2),f=i[0],v=i[1];switch(r){case"binary":return o(f,v);case"date":return a(f,v);case"float":return l(f,v);case"enum":return s(f,v,n);case"html":return u(f,v);case"integer":return d(f,v);case"link":return p(f,v);case"linklist":return h(f,v);case"multienum":return c(f,v,n);case"reference":return _(f,v);case"referencelist":return g(f,v);case"string":return m(f,v);case"stringlist":return b(f,v);case"widgetlist":return w(f,v,t)}}function o(t,e){if("binary"===t&&e){var r=e.id,n="published"===scrivito.currentWorkspaceId();return new F.default(r,n).transform({})}return null}function a(t,e){return"date"!==t?null:P.deserializeAsDate(e)}function u(t,e){return x.default.contains(["html","string"],t)&&x.default.isString(e)?e:""}function s(t,e,r){var n=r.values;return"string"===t&&x.default.contains(n,e)?e:null}function c(t,e,r){var n=r.values;return"stringlist"===t&&Array.isArray(e)?x.default.intersection(e,n):[]}function l(t,e){switch(t){case"string":return e.match(/^-?\d+(\.\d+)?$/)?f(e):null;case"number":return f(e);default:return null}}function f(t){var e=parseFloat(t);return P.isValidFloat(e)?e:null}function d(t,e){switch(t){case"string":case"number":return P.deserializeAsInteger(e);default:return null}}function p(t,e){return"link"===t&&x.default.isObject(e)?v(e):null}function h(t,e){return x.default.isArray(e)?x.default.compact(e.map(v)):[]}function v(t){var e=x.default.pick(t,"title","query","fragment","target","url");e.hash=e.fragment,delete e.fragment,e.objId=t.obj_id;var r=A.default.build(e);return r.isBroken()?null:r}function y(t){var e=O.default.get(t);return e||null}function _(t,e){return"reference"===t&&e?y(e):null}function g(t,e){if("referencelist"!==t)return[];if(!e)return[];var r=e.map(y);return x.default.compact(r)}function m(t,e){return x.default.contains(["html","string"],t)&&x.default.isString(e)?e:""}function b(t,e){return"stringlist"===t&&Array.isArray(e)?e:[]}function w(t,e,r){return"widgetlist"!==t?[]:x.default.map(e,function(t){return r.widget(t)})}Object.defineProperty(e,"__esModule",{value:!0});var k=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.deserialize=i;var j=r(3),O=n(j),C=r(34),P=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(C),E=r(24),A=n(E),S=r(0),x=n(S),T=r(30),F=n(T)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t){var e=function(e){function r(){return i(this,r),o(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return a(r,e),s(r,[{key:"iterator",value:function(){var e=c(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"iterator",this).call(this);return{next:function(){var r=e.next(),n=r.done,i=r.value;return n?{done:n}:{done:n,value:scrivito.wrapInAppClass(t,i)}}}}},{key:"and",value:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=scrivito.unwrapAppClassValues(n);return c(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"and",this).call(this,t,e,o,i)}},{key:"andNot",value:function(t,e,n){var i=scrivito.unwrapAppClassValues(n);return c(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"andNot",this).call(this,t,e,i)}},{key:"facet",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=c(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"facet",this).call(this,e,n);return v.default.map(i,function(e){return new p.default(t,e)})}},{key:"take",value:function(t){return(0,y.arrayFromIterable)(this.batchSize(t),t)}}]),r}(f.default);if("function"==typeof window.Symbol){var r=window.Symbol.iterator;if(r){var n=e.prototype;n[r]=n.iterator}}return e}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=function t(e,r,n){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,r);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,r,n)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(n)};e.default=u;var l=r(59),f=n(l),d=r(100),p=n(d),h=r(0),v=n(h),y=r(73)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t){function e(e){var r=new t.ObjSearch;return e&&r.and("_objClass","equals",e),r}function r(e){return scrivito.wrapInAppClass(t,e)}var n=new v.default(t);return function(u){function c(){return i(this,c),o(this,(c.__proto__||Object.getPrototypeOf(c)).apply(this,arguments))}return a(c,u),s(c,[{key:"lastChanged",value:function(){return this._scrivitoPrivateContent.lastChanged()}},{key:"path",value:function(){return this._scrivitoPrivateContent.path()}},{key:"parent",value:function(){return r(this._scrivitoPrivateContent.parent())}},{key:"ancestors",value:function(){return r(this._scrivitoPrivateContent.ancestors())}},{key:"backlinks",value:function(){return r(this._scrivitoPrivateContent.backlinks())}},{key:"children",value:function(){return r(this._scrivitoPrivateContent.children())}},{key:"orderedChildren",value:function(){return r(this._scrivitoPrivateContent.orderedChildren())}},{key:"permalink",value:function(){return this._scrivitoPrivateContent.permalink()}},{key:"slug",value:function(){return this._scrivitoPrivateContent.slug()}},{key:"isBinary",value:function(){var t=d.default.forInstance(this);return!!t&&t.isBinary()}},{key:"contentLength",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentLength():0}},{key:"contentType",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentType():""}},{key:"contentUrl",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentUrl():""}},{key:"metadata",value:function(){return this.isBinary()?this._scrivitoPrivateContent.metadata():new _.default}},{key:"destroy",value:function(){this._scrivitoPrivateContent.destroy()}},{key:"widget",value:function(t){return r(this._scrivitoPrivateContent.widget(t))}},{key:"widgets",value:function(){return r(this._scrivitoPrivateContent.widgets())}}],[{key:"get",value:function(t){return n.getObj(this,t)}},{key:"getIncludingDeleted",value:function(t){return n.getObjIncludingDeleted(this,t)}},{key:"getByPath",value:function(t){return r(l.default.getByPath(t))}},{key:"getByPermalink",value:function(t){return r(l.default.getByPermalink(t))}},{key:"all",value:function(){return e(t.objClassNameFor(this)).batchSize(1e3)}},{key:"root",value:function(){return r(l.default.root())}},{key:"where",value:function(r,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return e(t.objClassNameFor(this)).and(r,n,i,o)}},{key:"create",value:function(e){var n=d.default.forClass(this),i=t.objClassNameFor(this);if(!i)throw new p.ArgumentError("Creating CMS objects is not supported for the class Obj or abstract classes.");if(e.constructor!==Object)throw new p.ArgumentError("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(e._objClass)throw new p.ArgumentError('Invalid attribute "_objClass". "'+e._objClass+'.create" will automatically set the CMS object class correctly.');e._objClass=i;var o=scrivito.AttributeContentFactory.prepareAttributes(e,n,i);return r(l.default.create(o))}}]),c}(scrivito.AttributeContentFactory(n))}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();e.default=u;var c=r(3),l=n(c),f=r(23),d=n(f),p=r(1),h=r(61),v=n(h),y=r(87),_=n(y)},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){return function(e){function r(t){return n(this,r),i(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t))}return o(r,e),u(r,[{key:"obj",value:function(){return scrivito.wrapInAppClass(t,s(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"obj",this).call(this))}},{key:"fetchObj",value:function(e){return s(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"fetchObj",this).call(this,e).then(function(e){return scrivito.wrapInAppClass(t,e)})}},{key:"_scrivitoPrivateContent",get:function(){return l.default.build(this.buildAttributes())}}]),r}(l.default)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=function t(e,r,n){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,r);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,r,n)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(n)};e.default=a;var c=r(24),l=function(t){return t&&t.__esModule?t:{default:t}}(c)},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){var r=new c.default(t,e);return function(t){function e(){return n(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),u(e,null,[{key:"_scrivitoPrivateSchema",get:function(){return r}}]),e}(e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();e.default=a;var s=r(23),c=function(t){return t&&t.__esModule?t:{default:t}}(s)},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(0),a=function(t){return t&&t.__esModule?t:{default:t}}(o),u=function(){function t(){n(this,t),this._mapping={}}return i(t,[{key:"register",value:function(t,e){this._mapping[t]=e}},{key:"getClass",value:function(t){return this._mapping[t]}},{key:"allObjClasses",value:function(){return this._allForBaseClass(this.defaultClassForObjs)}},{key:"allWidgetClasses",value:function(){return this._allForBaseClass(this.defaultClassForWidgets)}},{key:"objClassFor",value:function(t){return this._appClassFor(t,this.defaultClassForObjs)}},{key:"widgetClassFor",value:function(t){return this._appClassFor(t,this.defaultClassForWidgets)}},{key:"objClassNameFor",value:function(t){return a.default.findKey(this._mapping,function(e){return e===t})}},{key:"_appClassFor",value:function(t,e){var r=this.getClass(t);return r&&e.isPrototypeOf(r)?r:e}},{key:"_allForBaseClass",value:function(t){return a.default.pick(this._mapping,function(e){return t.isPrototypeOf(e)})}}]),t}();e.default=u},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}function o(t,e){s(t,y,e,"CMS object")}function a(t,e){s(t,_,e,"widget")}function u(t,e,r){return e.isPrototypeOf(t)||r.isPrototypeOf(t)}function s(t,e,r,n){var o=f.default.without.apply(f.default,[f.default.keys(t)].concat(i(e)));if(o.length)throw new v.ArgumentError("Invalid key(s) "+(0,p.default)(o)+" given. Valid keys are "+(0,p.default)(e)+".");c(t.attributes);var a=t.extend;if(a&&r!==a&&!r.isPrototypeOf(a))throw new v.ArgumentError('Invalid value for "extend": not a '+n+" class")}function c(t){if(void 0!==t){if(t.constructor!==Object)throw new v.ArgumentError('Required key "attributes" is invalid. Should be an Object.');f.default.each(t,function(t,e){if(!(0,h.isCamelCase)(e))throw new v.ArgumentError('Attribute "'+e+'" is not in camel case.');if(!f.default.isArray(t)&&!f.default.isString(t))throw new v.ArgumentError('Attribute definition for "'+e+'" is invalid. Should be a String or an Array.')})}}Object.defineProperty(e,"__esModule",{value:!0}),e.isValidAppClass=e.assertValidWidgetClassDefinition=e.assertValidObjClassDefinition=void 0;var l=r(0),f=n(l),d=r(21),p=n(d),h=r(15),v=r(1),y=["attributes","extend","name"],_=["attributes","extend","name","onlyInside"];e.assertValidObjClassDefinition=o,e.assertValidWidgetClassDefinition=a,e.isValidAppClass=u},function(t,e,r){"use strict";var n=r(5),i=function(t){return t&&t.__esModule?t:{default:t}}(n);!function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=i.default.run(function(){return e.next()});if(!o.allDataLoaded)return{done:!1,objs:n};var a=o.result,u=a.value,s=a.done;return s||0===r?{done:s,objs:n}:t(e,r-1,n.concat([u]))}scrivito.loadAllUntil=t}()},function(t,e,r){"use strict";var n=r(5),i=function(t){return t&&t.__esModule?t:{default:t}}(n);!function(){function t(t,e){var r=i.default.run(e);return r.allDataLoaded?r.result:t}scrivito.loadableWithDefault=t,scrivito.loadWithDefault=t}()},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=r(1);!function(){var t=function(t){function e(t){return n(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,"Data is not yet loaded.",t))}return o(e,t),e}(a.ScrivitoError);scrivito.NotLoadedError=t}()},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),a=r(32),u=n(a),s=r(0),c=n(s),l=r(1);!function(){function t(t){return function(){function e(){i(this,e)}return o(e,[{key:"id",value:function(){return this._scrivitoPrivateContent.id()}},{key:"objClass",value:function(){return this._scrivitoPrivateContent.objClass()}},{key:"finishSaving",value:function(){return this._scrivitoPrivateContent.finishSaving()}},{key:"get",value:function(e){return t.read(this,e)}},{key:"update",value:function(e){t.update(this,e)}}]),e}()}function e(t,e,r){return c.default.mapObject(t,function(t,n){if(u.default.isSystemAttribute(n))return[t];var i=e.attributes[n];if(!i)throw new l.ArgumentError('Attribute "'+n+'" is not defined for CMS object class "'+r+'".');return[scrivito.unwrapAppClassValues(t),i]})}scrivito.AttributeContentFactory=t,scrivito.AttributeContentFactory.prepareAttributes=e}()},function(t,e,r){"use strict";var n=r(0),i=function(t){return t&&t.__esModule?t:{default:t}}(n);!function(){var t=[],e=void 0;i.default.extend(scrivito,{nextTick:function(r){e?t.push(r):setTimeout(r,0)},simulateNextTicks:function(){if(e){for(var r=[];t.length;){var n=i.default.shuffle(t);t=[],i.default.each(n,function(t){try{t()}catch(t){r.push(t)}})}if(r.length>0)throw r[0]}},enableNextTickCapture:function(){e=!0},disableNextTickCapture:function(){e=!1}})}()},function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(10),s=i(u),c=r(68),l=n(c),f=r(51),d=n(f),p=r(0),h=i(p),v=r(1);!function(){function t(t,e){return l.diff(t,e)}function e(t,e){return l.apply(t,e)}function r(t,e){return n(t,e)>0?t:e}function n(t,e){return t?e?i(t._version,e._version):1:-1}function i(t,e){return t>e?1:e>t?-1:0}function u(t){h.default.each(p,function(e){e(t)})}var c={},f=void 0,p={},y=0,_=0;scrivito.ObjReplication=function(){function i(t){var e=this;o(this,i),this._id=t,this._replicationActive=!1,this._scheduledReplication=!1,this._currentRequestDeferred=null,this._nextRequestDeferred=null,this._performThrottledReplication=scrivito.throttle(function(){return e._performReplication()},1e3)}return a(i,null,[{key:"get",value:function(t){return c[t]||(c[t]=new scrivito.ObjReplication(t)),c[t]}},{key:"subscribeWrites",value:function(t){return y+=1,p[y]=t,y}},{key:"unsubscribeWrites",value:function(t){delete p[t]}},{key:"getWorkspaceVersion",value:function(){return _}}]),a(i,[{key:"notifyLocalState",value:function(t){if(!f){if(void 0===this._backendState)throw new v.InternalError("Can not set local state before backend state.");if(this._backendState&&this._backendState._deleted)throw new v.InternalError("Can not update a fully deleted obj.");this._localState=t,this._startReplication()}}},{key:"notifyBackendState",value:function(r){if(void 0===this._backendState)return this._updateBackendState(r),void this._updateLocalState(r);if(n(r,this._bufferedBackendState||this._backendState)>0)if(this._replicationActive)this._bufferedBackendState=r;else{if(r._deleted)this._updateLocalState(null);else{var i=t(this._backendState,r);this._updateLocalState(e(this.localState,i))}this._updateBackendState(r)}}},{key:"finishSaving",value:function(){var t=void 0;if(this._nextRequestDeferred)t=this._nextRequestDeferred.promise;else{if(!this._currentRequestDeferred)return scrivito.Promise.resolve();t=this._currentRequestDeferred.promise}return t.catch(function(){return scrivito.Promise.reject()})}},{key:"_startReplication",value:function(){var e=this;h.default.isEmpty(t(this._backendState,this._localState))?this._nextRequestDeferred&&(this._nextRequestDeferred.resolve(),this._nextRequestDeferred=null):this._replicationActive?this._nextRequestDeferred||(this._nextRequestDeferred=new s.default):this._scheduledReplication||(this._scheduledReplication=!0,this._initDeferredForRequest(),u(this._currentRequestDeferred.promise),scrivito.nextTick(function(){return e._performThrottledReplication()}))}},{key:"_performReplication",value:function(){var e=this,r=this._localState,n=t(this._backendState,this._localState);this._scheduledReplication=!1,this._replicationActive=!0,this._replicatePatchToBackend(n).then(function(t){e._handleBackendUpdate(r,t),e._currentRequestDeferred.resolve(e._id),e._currentRequestDeferred=null,e._replicationActive=!1,e._startReplication()},function(t){e._currentRequestDeferred.reject(t),e._currentRequestDeferred=null,e._replicationActive=!1})}},{key:"_replicatePatchToBackend",value:function(t){if("deleted"===t._modification)return this._deleteObj();if(h.default.isEmpty(t))return scrivito.Promise.resolve(this._backendState);var e=scrivito.currentWorkspaceId(),r="workspaces/"+e+"/objs/"+this._id;return scrivito.CmsRestApi.put(r,{obj:t})}},{key:"_deleteObj",value:function(){var t=scrivito.currentWorkspaceId(),e="workspaces/"+t+"/objs/"+this._id;return scrivito.CmsRestApi.delete(e,{include_deleted:!0})}},{key:"_initDeferredForRequest",value:function(){if(this._nextRequestDeferred){var t=this._nextRequestDeferred;this._nextRequestDeferred=null,this._currentRequestDeferred=t}else this._currentRequestDeferred=new s.default}},{key:"_handleBackendUpdate",value:function(n,i){var o=t(n,this._localState);this._updateBackendState(r(i,this._bufferedBackendState)),this._bufferedBackendState=void 0,this._updateLocalState(e(this._backendState,o))}},{key:"_updateLocalState",value:function(t){this._localState=t,d.set(this._id,this._localState)}},{key:"_updateBackendState",value:function(t){void 0!==this._backendState&&_++,this._backendState=t}},{key:"isNotStoredInBackend",value:function(){return null===this._backendState}},{key:"isRequestInFlight",value:function(){return this._replicationActive}},{key:"backendState",get:function(){return this._backendState}},{key:"localState",get:function(){return this._localState}}],[{key:"disableReplication",value:function(){f=!0}},{key:"enableReplication",value:function(){f=!1}},{key:"clearWriteCallbacks",value:function(){p={}}},{key:"clearCache",value:function(){c={}}}]),i}()}()},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(0),o=n(i),a=r(183),u=n(a);!function(){u.default.noConflict(),u.default.config({warnings:!1,longStackTraces:!1}),o.default.extend(scrivito,{Promise:u.default,promise:{enableDebugMode:function(){u.default.config({warnings:!0,longStackTraces:!0})},wrapInJqueryDeferred:function(t,e){var r=e;return t.then(function(t){return r.resolve(t)},function(t){r.reject(t)}),r},always:function(t,e){return t.then(e,e),t},capturePromises:function(){u.default.setScheduler(function(t){scrivito.nextTick(t)})}}})}()},function(t,e,r){(function(e,r,n){/* @preserve
71
+ var r=n(7);r.Any=n(102),r.Array=n(266),r.Boolean=n(192),r.Date=n(267),r.Error=n(268),r.Function=n(77),r.Nil=n(193),r.Number=n(194),r.Integer=n(269),r.IntegerT=r.Integer,r.Object=n(270),r.RegExp=n(271),r.String=n(104),r.Type=n(272),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(105),r.declare=n(273),r.enums=n(274),r.irreducible=n(22),r.list=n(197),r.maybe=n(275),r.refinement=n(103),r.struct=n(277),r.tuple=n(200),r.union=n(281),r.func=n(282),r.intersection=n(283),r.subtype=r.refinement,r.inter=n(284),r.interface=r.inter,r.assert=r,r.update=n(285),r.mixin=n(106),r.isType=n(19),r.is=n(42),r.getTypeName=n(16),r.match=n(286),t.exports=r},function(t,e,n){var r=n(22);t.exports=r("Any",function(){return!0})},function(t,e,n){function r(t,e){return"{"+c(t)+" | "+l(e)+"}"}function i(t,e,n){function i(e,n){var r=s(t,e,n);return r}var c=n||r(t,e),l=a(t);return i.meta={kind:"subtype",type:t,predicate:e,name:n,identity:l},i.displayName=c,i.is=function(n){return u(n,t)&&e(n)},i.update=function(t,e){return i(o.update(t,e))},i}var o=n(7),a=(n(27),n(18),n(63),n(40)),s=n(41),u=n(42),c=n(16),l=n(62);i.getDefaultName=r,t.exports=i},function(t,e,n){var r=n(22),i=n(75);t.exports=r("String",i)},function(t,e,n){function r(t,e){return"{[key: "+a(t)+"]: "+a(e)+"}"}function i(t,e,n){function i(n,r){if(d)return n;var i=!0,o={};for(var a in n)if(n.hasOwnProperty(a)){a=c(t,a,null);var s=n[a],u=c(e,s,null);i=i&&s===u,o[a]=u}return i&&(o=n),o}var f=n||r(t,e),d=(a(t),a(e),s(t)&&s(e));return i.meta={kind:"dict",domain:t,codomain:e,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,t)||!l(n[r],e)))return!1;return!0},i.update=function(t,e){return i(o.update(t,e))},i}var o=n(7),a=(n(27),n(18),n(16)),s=n(40),u=n(38),c=n(41),l=n(42);i.getDefaultName=r,t.exports=i},function(t,e,n){var r=n(33);n(7);t.exports=function(t,e,n){if(r(e))return t;for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}},function(t,e,n){"use strict";function r(t){return t.replace(c,function(t,e){var n=(0,u.default)(e);if(n)return l[n]=e,n})}function i(t,e){if(t===e)return null;if("A"===t.nodeName){var n=l[t.href];if(n)return(0,a.getWindowContext)().Obj.get(n)}return i(t.parentNode,e)}function o(){l={}}Object.defineProperty(e,"__esModule",{value:!0}),e.transformHTML=r,e.findTarget=i,e.reset=o;var a=n(37),s=n(293),u=function(t){return t&&t.__esModule?t:{default:t}}(s),c=/\bobjid:([a-f0-9]{16})\b([^"']*)/g,l={}},function(t,e,n){"use strict";function r(t){return t instanceof o.default?{objId:t.id()}:{objId:t.obj().id(),widgetId:t.id()}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var i=n(3),o=function(t){return t&&t.__esModule?t:{default:t}}(i)},,,,,,,,,,,,,function(t,e,n){"use strict";function r(t){i();var e=t.location,n=e.hash,r=n.indexOf(s);if(!(r<0)){var o=n.substr(r+s.length,3),a=n.substring(0,r);"#"===a&&(a="");var c=e.href.toString().replace(n,a);u=parseInt(o,10)||0,t.history.replaceState({},"",c)}}function i(){u=0}function o(t){var e=t.toString();return t.hash||(e+="#"),""+e+s+(u+1)}function a(){return u}Object.defineProperty(e,"__esModule",{value:!0});var s="&scrivito.authFailedCount=",u=void 0;e.default={init:r,augmentedRedirectUrl:o,reset:i,currentFailureCount:a}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n=o(t,e);if(n)return n;var r=t._widget_pool;return l.default.find(r,function(t,r){if(n=o(t,e))return n.parentWidgetId=r,!0}),n}function o(t,e){var n=void 0;return l.default.find(t,function(t,r){if(!u.default.isSystemAttribute(r)){var i=a(t,2),o=i[0],s=i[1];if(s&&"widgetlist"===o){var c=s.indexOf(e);if(-1!==c)return n={attributeName:r,index:c},!0}}}),n}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=i;var s=n(32),u=r(s),c=n(0),l=r(c)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(47),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function(){function t(e,n,i,o){r(this,t),this._id=e,this.url=n,this.filename=i,this._objId=o}return i(t,[{key:"noCacheUrl",value:function(){if("published"===scrivito.currentWorkspaceId())return scrivito.Promise.resolve(null);var t="blobs/"+encodeURIComponent(this._id)+"/no_cache";return scrivito.CmsRestApi.get(t).then(function(t){return t.private_access.get.url}).catch(function(t){return scrivito.displayError(t),scrivito.Promise.reject(t)})}},{key:"copy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new a.default({idToCopy:this._id,filename:t.filename,contentType:t.content_type})}}]),t}();e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){var e=d[t.id()];return e||u.default.pluck(l.default.all(),"name")}function o(){scrivito.editingContext.isViewMode()||scrivito.on("content",function(t){var e=scrivito.WidgetlistFieldElement.all($(t));u.default.each(e,function(t){var e=t.basicField();d[e.id()]=JSON.parse(t.dom_element().attr(f))})})}function a(){d={}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var s=n(0),u=r(s),c=n(31),l=r(c),f="data-scrivito-private-field-widget-allowed-classes",d={};i.init=o,i.clearCache=a},function(t,e,n){t.exports=n(161)},,,,,,,,,,,,function(t,e,n){"use strict";function r(){if(window.parent!==window){var t=window.parent.connectAppDocument;return t?t(window.document):void 0}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e,n){"use strict";n(139),n(140),n(141),n(145),n(146),n(149),n(150),n(151),n(154),n(155),n(176),n(177),n(178),n(179),n(3),n(180),n(181),n(182),n(186),n(187),n(188),n(189)},function(t,e,n){"use strict";window.scrivito||(window.scrivito={}),window.scrivito.client={}},function(t,e,n){"use strict";var r=n(0),i=function(t){return t&&t.__esModule?t:{default:t}}(r);!function(){function t(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=i.default.contains(["PUT","POST","DELETE"],t),o=n&&n.skip_write_monitor;r&&(n.timeout=15e3,o||scrivito.WriteMonitor.startWrite());var s=a(t,e,n);return r&&!o&&scrivito.WriteMonitor.endWriteWhenDone(s),s}function e(t,e,r){return scrivito.ajax(t,e,r).catch(function(t){throw n(t),t})}function n(t){var e=void 0,n=void 0;i.default.isObject(t)?(e=scrivito.t("ajax_error",t.message),n=t.message_for_editor):e=i.default.contains(["abort","parsererror","timeout"],t)?scrivito.t("ajax_error.communication"):scrivito.t("ajax_error",t),scrivito.isDevelopmentMode?scrivito.AlertDialog.open(e):(scrivito.logError(e),scrivito.ErrorDialog.open(n||scrivito.t("ajax_error.message_for_editor"),[t.timestamp,e]))}function r(){s=!0}function o(){s=!1}function a(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(s)return scrivito.Promise.reject("scrivito.ajax is disabled due to scrivito.disableAjax()!");var r=window.location.protocol+"//"+window.location.host+"/__scrivito/";n.data&&(n.data=JSON.stringify(n.data));var o=$.ajax(r+e,i.default.extend({type:t,dataType:"json",contentType:"application/json; charset=utf-8",cache:!1},n));return new scrivito.Promise(function(t,e){o.then(t),o.fail(function(t,n,r){try{return e(JSON.parse(t.responseText))}catch(t){return e(r)}})})}var s=!1;scrivito.ajax=t,scrivito.ajaxWithErrorDialog=e,scrivito.displayAjaxError=n,scrivito.disableAjax=r,scrivito.enableAjax=o}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(0),o=r(i),a=n(1),s=n(13),u=r(s);!function(){function t(t,n){return e(t.prototype,n)}function e(t,e){o.default.each(e,function(e,r){t[e]=n(r)})}function n(t){return function(){for(var e=this,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return scrivito.PublicPromise.resolve((0,u.default)(function(){return e[t].apply(e,r)}))}}function r(){throw new a.InternalError("this method is supposed to be overwritten by calling provideAsyncMethods")}scrivito.provideAsyncMethods=e,scrivito.provideAsyncClassMethods=e,scrivito.provideAsyncInstanceMethods=t,scrivito.asyncMethodStub=r}()},function(t,e,n){"use strict";function r(t){var e=a;try{return a=[],t(),new u(a)}finally{a=e}}function i(t){a&&a.push({reason:"missing",loader:t})}function o(t){a&&a.push({reason:"outdated",loader:t})}Object.defineProperty(e,"__esModule",{value:!0});var a,s=n(0);e.capture=r,e.notifyMissingData=i,e.notifyOutdatedData=o;var u=function(){function t(t){this.captureList=t}return t.prototype.isAllDataLoaded=function(){return!s.findWhere(this.captureList,{reason:"missing"})},t.prototype.isAllDataUpToDate=function(){return 0===this.captureList.length},t.prototype.loadRequiredData=function(){if(0===this.captureList.length)return null;this.captureList.forEach(function(t){return t.loader()})},t}();e.CaptureReport=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i={},o={status:void 0},a=function(){function t(t){if(!t)throw new r.InternalError("LoadableValue needs stateContainer");this.container=t,this.id=t.id()}return t.resetLoadingState=function(){i={}},t.prototype.setLoading=function(t){i[this.id]=t},t.prototype.getLoading=function(){return i[this.id]},t.prototype.status=function(){return this.getState().status||"MISSING"},t.prototype.value=function(){var t=this.getState();if("AVAILABLE"===t.status)return t.value},t.prototype.error=function(){var t=this.getState();if("ERROR"===t.status)return t.error},t.prototype.version=function(){var t=this.getState();if(void 0!==t.status)return t.version},t.prototype.transitionToMissing=function(){this.setState({status:void 0})},t.prototype.transitionToAvailable=function(t,e){this.setState({status:"AVAILABLE",value:t,version:e})},t.prototype.transitionToError=function(t,e){this.setState({status:"ERROR",error:t,version:e})},t.prototype.setState=function(t){delete i[this.id],this.container.set(t)},t.prototype.getState=function(){return this.container.get()||o},t}();e.default=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=n(0),a=0,s=Object.assign||o.extend,u=function(){function t(){}return t.prototype.get=function(){var t=this,e=this.untrackedGet();return this.recordDetector(function(){return e!==t.untrackedGet()}),e},t.prototype.recordDetector=function(t){this.getTree().recordDetector(t)},t.prototype.clear=function(){this.set(void 0)},t.prototype.subState=function(t){return new l(this,t)},t.prototype.setSubState=function(t,e){var n=this.untrackedGet();if(void 0===n){var r=(o={},o[t]=e,o);this.set(r)}else{var i=s({},n);i[t]=e,this.set(i)}var o},t.prototype.getSubState=function(t){var e=this.untrackedGet();if(void 0!==e)return e[t]},t}(),c=function(t){function e(){var e=t.call(this)||this;return e.treeId=(a++).toString(),e.clearListeners(),e.batchUpdates=!1,e.version=0,e}return r(e,t),e.prototype.untrackedGet=function(){return this.state},e.prototype.set=function(t){this.state=t,this.version++,this.batchUpdates||this.notifyListeners()},e.prototype.trackChanges=function(t){var e=this,n=this.version,r=this.recordDetectors(t);return function(){return e.version!==n&&!!o.find(r,function(t){return t()})}},e.prototype.recordDetector=function(t){var e=this.detectorRecording;void 0!==e&&e.push(t)},e.prototype.getTree=function(){return this},e.prototype.id=function(){return this.treeId},e.prototype.subscribe=function(t){var e=this,n=!0,r=function(){n&&t()};return this.ensureCanMutateListeners(),this.listeners.push(r),function(){n=!1;var t=e.listeners.indexOf(r);e.ensureCanMutateListeners(),e.listeners.splice(t,1)}},e.prototype.withBatchedUpdates=function(t){var e=this.state,n=this.batchUpdates;try{this.batchUpdates=!0,t()}finally{this.batchUpdates=n,this.batchUpdates||e===this.state||this.notifyListeners()}},e.prototype.listenerCount=function(){return this.listeners.length},e.prototype.clearListeners=function(){this.listeners=[]},e.prototype.recordDetectors=function(t){if(void 0!==this.detectorRecording)throw new i.InternalError("no nested detector recording!");try{return this.detectorRecording=[],t(),this.detectorRecording}finally{this.detectorRecording=void 0}},e.prototype.notifyListeners=function(){this.listenersToNotify=this.listeners,this.listenersToNotify.forEach(function(t){return t()})},e.prototype.ensureCanMutateListeners=function(){this.listenersToNotify===this.listeners&&(this.listeners=this.listeners.slice())},e}(u);e.default=c;var l=function(t){function e(e,n){var r=t.call(this)||this;return r.parentState=e,r.key=n,r.tree=e.getTree(),r}return r(e,t),e.prototype.getTree=function(){return this.tree},e.prototype.untrackedGet=function(){return this.parentState.getSubState(this.key)},e.prototype.set=function(t){this.parentState.setSubState(this.key,t)},e.prototype.id=function(){var t=this.key.replace(/\\/g,"\\\\").replace(/\//g,"\\/");return this.parentState.id()+"/"+t},e}(u)},function(t,e,n){"use strict";var r=n(4);!function(){function t(t){i()||scrivito.nextTick(function(){(0,r.withBatchedUpdates)(function(){return e(n)})}),n.push(t)}function e(t){n=[];try{t.forEach(function(t){return t()})}finally{i()&&e(n)}}var n=[],i=function(){return n.length};scrivito.batchedStateUpdater={add:t}}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(10),s=r(a),u=n(49),c=r(u),l=n(0),f=r(l),d=n(1),h=n(121),p=r(h),v=n(147),m=r(v),g=n(46);!function(){function t(){return k?scrivito.Promise.resolve():(E||(E=new s.default),E.promise)}function e(e,r,i){return t().then(function(){return n(e,r,i).then(function(t){return t&&t.task&&1===f.default.size(t)?_(t.task):t})})}function n(t,e,n){return a(t,function(i){return x.perform(function(o){return r(b({method:t,path:e,requestParams:n,timeout:i,authorization:o}))})})}function r(t){return scrivito.Promise.resolve(t).catch(v)}function a(t,e){var n=new O;return u(n,t,function(){return l(n,function(){return e(n.remainingTime())})})}function u(t,e,n){return"POST"===e?n():n().catch(function(e){if(!t.timedOut()){if(e instanceof d.BackendError)return n();if(e instanceof d.NetworkError)return n()}throw e})}function l(t,e){return function n(r){return e().catch(function(e){if(e instanceof d.NetworkError&&429===e.httpCode){var i=e.response,o=h(i.getResponseHeader("Retry-After"),r);if(t.cover(Date.now()+o))return scrivito.Promise.resolve(scrivito.waitMs(o)).then(function(){return n(r+1)});throw new d.RateLimitExceededError("rate limit exceeded",429)}throw e})}(0)}function h(t,e){var n=.5*Math.pow(2,e)*1e3;return Math.max(n,1e3*t)}function v(t){if(void 0===t.status||!f.default.isNumber(t.status))throw t;var e=void 0;try{e=JSON.parse(t.responseText)}catch(e){throw new d.NetworkError(t)}if("auth_missing"===e.code&&e.details){var n=p.default.augmentedRedirectUrl((0,g.location)()),r=e.details.visit.replace("retry=RETRY","retry="+p.default.currentFailureCount()).replace(/\$RETURN_TO/,encodeURIComponent(n));return(0,g.redirectTo)(r)}var i=e.error;if(401===t.status)throw new d.UnauthorizedError(i,t.status,e.code,e.details);if(403===t.status)throw new d.AccessDeniedError(i,t.status,e.code);if(429===t.status)throw new d.NetworkError(t);if(i){if(500===t.status)throw new d.BackendError(i,t.status);if("4"===t.status.toString()[0]&&e.error)throw d.ClientError.for(i,t.status,e.code)}throw new d.NetworkError(t)}function y(t,e){return{path:e,verb:t,params:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}}}function b(t){var e=t.method,n=t.path,r=t.requestParams,i=t.timeout,o=t.authorization,a=(0,c.default)(C+"/tenants/"+k+"/perform").scheme("https").toString(),s=y(e,n,r);return scrivito.fetch(e,a,{params:s,timeout:i,authorization:o,forceVerification:j})}function _(t){switch(t.status){case"success":return t.result;case"error":throw d.ClientError.for(t.message,412,t.code);case"open":return scrivito.wait(2).then(function(){return n("GET","tasks/"+t.id).then(function(t){return _(t)})});default:throw new d.ScrivitoError("Invalid task response (unknown status)")}}var w=15e3,C=void 0,k=void 0,E=void 0,x=void 0,j=void 0;scrivito.CmsRestApi={init:function(t,e,n){e&&(C=t,k=e,E&&E.resolve()),x=n||x||m.default},reset:function(){C=void 0,k=void 0,E=void 0,x=void 0,j=void 0},get:function(t,n){return e("GET",t,n)},put:function(t,n){return e("PUT",t,n)},post:function(t,n){return e("POST",t,n)},delete:function(t,n){return e("DELETE",t,n)},requestBuiltInUserSession:function(e){return t().then(function(){var t="sessions/"+e,n=a("PUT",function(e){return r(b({method:"PUT",path:t,timeout:e}))});return n.then(p.default.reset),n})},enableForceVerification:function(){j=!0},currentPublicAuthorizationState:function(){return x?x.currentState?"[API] "+x.currentState():"[API]: authorization provider without currentState()":"[API]: no authorization provider"},get endpoint(){return C},get tenant(){return k}};var O=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w;i(this,t),this.timesOutAt=Date.now()+e}return o(t,[{key:"timedOut",value:function(){return this.remainingTime()<5}},{key:"remainingTime",value:function(){return Math.max(this.timesOutAt-Date.now(),0)}},{key:"cover",value:function(t){return t<=this.timesOutAt-5}}]),t}()}()},function(t,e,n){"use strict";function r(t){return new scrivito.Promise(function(e){return e(t(s()))}).catch(function(e){if(!(e instanceof c.UnauthorizedError))throw e;if(e.backendCode!==d)throw e;return i(e.details.verificator,e.details.data).then(function(e){return t(e.authorization)})})}function i(t,e){return h&&h.isPending()||(h=f.default.fetch(t.id,t.url).then(function(t){return new scrivito.Promise(function(n){return t(e,n)})}),h.then(o),h.challenge={verificator:t,data:e}),h}function o(t){h=void 0,p=t}function a(){o()}function s(){if(p)return p.expiresAfter<new Date?void(p=void 0):p.authorization}function u(){var t=s();if(t)return"Authorization: "+t;if(!h)return null;var e=h.challenge,n=e.verificator,r=n.id,i=e.data;if(h.isPending())return"Pending computation: "+r+" with "+i;var o="Orphaned computation: "+r+" with "+i;if(!p)return o+" (verification not present?!?)";var a=p&&p.expiresAfter;if(!a)return o+" (verification present, but without expiry?)";var u="(verification expiresAfter: "+a+")";return new Date<=a?o+" "+u:o+" "+u+" (expired)"}Object.defineProperty(e,"__esModule",{value:!0});var c=n(1),l=n(148),f=function(t){return t&&t.__esModule?t:{default:t}}(l),d="client_verification_required",h=void 0,p=void 0;a(),e.default={perform:r,reset:a,currentState:u,ERROR_CODE_CLIENT_VERIFICATION_REQUIRED:d}},function(t,e,n){"use strict";function r(){u={}}function i(t,e){var n=u[t];return n||(n=new a.default,u[t]=n,(0,s.loadJs)(e,function(e){n.reject(e),delete u[t]})),n.promise}Object.defineProperty(e,"__esModule",{value:!0});var o=n(10),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=n(97),u=void 0;r(),window._scrivitoRegisterVerificator=function(t,e){u[t].resolve(e)},e.default={fetch:i,reset:r}},function(t,e,n){"use strict";var r=n(0),i=function(t){return t&&t.__esModule?t:{default:t}}(r);!function(){function t(e){return i.default.isArray(e)?i.default.map(e,t):i.default.isObject(e)?i.default.chain(e).mapObject(t).pairs().sortBy(i.default.first):e}scrivito.computeCacheKey=function(e){var n=t(e);return JSON.stringify(n)}}()},function(t,e,n){"use strict";!function(){scrivito.currentWorkspaceId=function(){return scrivito.uiAdapter?scrivito.uiAdapter.currentWorkspaceId():"published"}}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var o=n(0),a=r(o),s=n(152),u=r(s);!function(){function t(){if(window&&window.console&&!r){var t;(t=window.console).error.apply(t,arguments)}}function e(){r=!0}function n(t){if(t instanceof Error){var e=u.default.parse(t);scrivito.logError([t.message].concat(i(a.default.pluck(e,"source"))).join("\n"))}else scrivito.logError(t)}var r=!1;scrivito.logError=t,scrivito.disableConsoleError=e,scrivito.printError=n}()},function(t,e,n){var r,i,o;!function(a,s){"use strict";i=[n(153)],r=s,void 0!==(o="function"==typeof r?r.apply(e,i):r)&&(t.exports=o)}(0,function(t){"use strict";function e(t,e,n){if("function"==typeof Array.prototype.map)return t.map(e,n);for(var r=new Array(t.length),i=0;i<t.length;i++)r[i]=e.call(n,t[i]);return r}function n(t,e,n){if("function"==typeof Array.prototype.filter)return t.filter(e,n);for(var r=[],i=0;i<t.length;i++)e.call(n,t[i])&&r.push(t[i]);return r}function r(t,e){if("function"==typeof Array.prototype.indexOf)return t.indexOf(e);for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var i=/(^|@)\S+\:\d+/,o=/^\s*at .*(\S+\:\d+|\(native\))/m,a=/^(eval@)?(\[native code\])?$/;return{parse:function(t){if(void 0!==t.stacktrace||void 0!==t["opera#sourceloc"])return this.parseOpera(t);if(t.stack&&t.stack.match(o))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/,n=e.exec(t.replace(/[\(\)]/g,""));return[n[1],n[2]||void 0,n[3]||void 0]},parseV8OrIE:function(i){return e(n(i.stack.split("\n"),function(t){return!!t.match(o)},this),function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),i=this.extractLocation(n.pop()),o=n.join(" ")||void 0,a=r(["eval","<anonymous>"],i[0])>-1?void 0:i[0];return new t(o,void 0,a,i[1],i[2],e)},this)},parseFFOrSafari:function(r){return e(n(r.stack.split("\n"),function(t){return!t.match(a)},this),function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t(e);var n=e.split("@"),r=this.extractLocation(n.pop()),i=n.join("@")||void 0;return new t(i,void 0,r[0],r[1],r[2],e)},this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var n=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),i=[],o=2,a=r.length;o<a;o+=2){var s=n.exec(r[o]);s&&i.push(new t(void 0,void 0,s[2],s[1],void 0,r[o]))}return i},parseOpera10:function(e){for(var n=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),i=[],o=0,a=r.length;o<a;o+=2){var s=n.exec(r[o]);s&&i.push(new t(s[3]||void 0,void 0,s[2],s[1],void 0,r[o]))}return i},parseOpera11:function(r){return e(n(r.stack.split("\n"),function(t){return!!t.match(i)&&!t.match(/^Error created at/)},this),function(e){var n,r=e.split("@"),i=this.extractLocation(r.pop()),o=r.shift()||"",a=o.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||void 0;o.match(/\(([^\)]*)\)/)&&(n=o.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var s=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new t(a,s,i[0],i[1],i[2],e)},this)}}})},function(t,e,n){var r,i,o;!function(n,a){"use strict";i=[],r=a,void 0!==(o="function"==typeof r?r.apply(e,i):r)&&(t.exports=o)}(0,function(){"use strict";function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t,e,n,r,i,o){void 0!==t&&this.setFunctionName(t),void 0!==e&&this.setArgs(e),void 0!==n&&this.setFileName(n),void 0!==r&&this.setLineNumber(r),void 0!==i&&this.setColumnNumber(i),void 0!==o&&this.setSource(o)}return e.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(t){this.functionName=String(t)},getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getFileName:function(){return this.fileName},setFileName:function(t){this.fileName=String(t)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(e){if(!t(e))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(e)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(e){if(!t(e))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(e)},getSource:function(){return this.source},setSource:function(t){this.source=String(t)},toString:function(){return(this.getFunctionName()||"{anonymous}")+"("+(this.getArgs()||[]).join(",")+")"+(this.getFileName()?"@"+this.getFileName():"")+(t(this.getLineNumber())?":"+this.getLineNumber():"")+(t(this.getColumnNumber())?":"+this.getColumnNumber():"")}},e})},function(t,e,n){"use strict";var r=n(10),i=function(t){return t&&t.__esModule?t:{default:t}}(r);!function(){function t(t,r,i,o,a){var s=new XMLHttpRequest;return s.open("POST"===t?"POST":"PUT",r),s.timeout=i,s.withCredentials=!0,s.onload=function(){return e(s,o,a)},s.onerror=function(t){return n(t,a)},s}function e(t,e,n){if(o-=1,t.status>=200&&t.status<300)try{return e(JSON.parse(t.responseText))}catch(n){if(n instanceof SyntaxError)return e(t.responseText);throw n}return n(t)}function n(t,e){o-=1,e(new Error("Network Error: "+t))}var r=!1,o=0;scrivito.isFetchingActive=function(){return o>0},scrivito.disableFetching=function(){r=!0},scrivito.fetch=function(e,n,a){var s=a.params,u=a.timeout,c=a.authorization,l=a.forceVerification;return r?(new i.default).promise:(o+=1,new scrivito.Promise(function(r,i){var o=t(e,n,u,r,i);c&&o.setRequestHeader("Authorization",c),l&&o.setRequestHeader("Scrivito-Force-Verification","true"),o.setRequestHeader("Content-type","application/json; charset=utf-8"),o.send(JSON.stringify(s))}))}}()},function(t,e,n){"use strict";var r=n(156),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=n(4);!function(){function t(t){var e=t.clientModulesForExport();r.forEach(function(t){scrivito[t]=e[t]})}function e(){var t={};return r.forEach(function(e){t[e]=scrivito[e]}),t}function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.ui,r=e.realmContext;r&&i.default.init(r),n&&t(n),(0,o.initializeGlobalState)(n)}var r=["BinaryRequest","CmsRestApi","ObjReplication"];scrivito.client.init=n,scrivito.client.modulesForExport=e}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(157),s=r(a),u=n(170),c=r(u),l=n(171),f=r(l),d=n(172),h=r(d),p=n(173),v=r(p),m=n(174),g=r(m),y=n(1),b=n(61),_=r(b),w=n(175),C=function(){function t(){i(this,t),this._registry=new g.default,this._registry.defaultClassForObjs=(0,f.default)(this._registry),this._registry.defaultClassForWidgets=(0,s.default)(this._registry),this._registry.defaultClassForLinks=(0,h.default)(this._registry),this._registry.ObjSearch=(0,c.default)(this._registry),this.appModelAccessor=new _.default(this._registry)}return o(t,null,[{key:"init",value:function(e){var n=new t;e.Obj=n.Obj,e.Widget=n.Widget,e.Link=n.Link,e.ObjSearch=n.ObjSearch,e.appModelAccessor=n.appModelAccessor,e.createObjClass=function(){return n.createObjClass.apply(n,arguments)},e.createWidgetClass=function(){return n.createWidgetClass.apply(n,arguments)},e.getClass=function(){return n.getClass.apply(n,arguments)},e.registerClass=function(){return n.registerClass.apply(n,arguments)},e.allObjClasses=function(){return n.allObjClasses()},e.allWidgetClasses=function(){return n.allWidgetClasses()},e._privateRealm=n}}]),o(t,[{key:"createObjClass",value:function(t){return(0,w.assertValidObjClassDefinition)(t,this.Obj),this._createAppClass(t,this.Obj)}},{key:"createWidgetClass",value:function(t){(0,w.assertValidWidgetClassDefinition)(t,this.Widget);var e=t.onlyInside;return e&&(delete t.onlyInside,t.validContainerClasses=[e]),this._createAppClass(t,this.Widget)}},{key:"getClass",value:function(t){return this._registry.getClass(t)}},{key:"registerClass",value:function(t,e){if(!e||!(0,w.isValidAppClass)(e,this.Obj,this.Widget))throw new y.ArgumentError("registerClass has to be called with a CMS Obj or Widget class.");this._registry.register(t,e)}},{key:"allObjClasses",value:function(){return this._registry.allObjClasses()}},{key:"allWidgetClasses",value:function(){return this._registry.allWidgetClasses()}},{key:"_createAppClass",value:function(t,e){var n=t.extend||e,r=(0,v.default)(t,n),i=t.name;return i&&this._registry.register(i,r),r}},{key:"Obj",get:function(){return this._registry.defaultClassForObjs}},{key:"Widget",get:function(){return this._registry.defaultClassForWidgets}},{key:"Link",get:function(){return this._registry.defaultClassForLinks}},{key:"ObjSearch",get:function(){return this._registry.ObjSearch}}]),t}();e.default=C},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){var e=new v.default(t);return function(e){function n(e){i(this,n);var r=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this)),a=l.default.forInstance(r),s=t.objClassNameFor(r.constructor);if(!s)throw new h.ArgumentError("Creating widgets is not supported for the class Widget or abstract classes.");if(e.constructor!==Object)throw new h.ArgumentError("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(e._objClass)throw new h.ArgumentError('Invalid attribute "_objClass". "new '+e._objClass+'" will automatically set the CMS object class correctly.');e._objClass=s;var u=scrivito.AttributeContentFactory.prepareAttributes(e,a,s);return r._scrivitoPrivateContent=new d.default(u),r}return a(n,e),u(n,[{key:"obj",value:function(){var e=this._scrivitoPrivateContent.obj();return scrivito.wrapInAppClass(t,e)}},{key:"copy",value:function(){var e=t.widgetClassFor(this.objClass()),n=this._scrivitoPrivateContent.copy();return scrivito.buildAppClassInstance(n,e)}}]),n}(scrivito.AttributeContentFactory(e))}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();e.default=s;var c=n(23),l=r(c),f=n(14),d=r(f),h=n(1),p=n(61),v=r(p)},function(t,e,n){"use strict";function r(t){return o().get()[t]||null}function i(t){o().set(t)}function o(){var t=c.uiState.subState("railsThumbnails");return new u.default({state:t,loader:a,throwNotLoaded:!0})}function a(){return scrivito.ajax("GET","obj_class/thumbnails")}Object.defineProperty(e,"__esModule",{value:!0}),e.storeRailsThumbnails=e.getRailsThumbnail=void 0;var s=n(5),u=function(t){return t&&t.__esModule?t:{default:t}}(s),c=n(4);e.getRailsThumbnail=r,e.storeRailsThumbnails=i},function(t,e,n){"use strict";function r(t){return i(t).get()}function i(t){var e=void 0,n=c.uiState.subState("validRailsPageClasses");return e=t?n.subState("byPath").subState(t):n.subState("withoutPath"),new u.default({state:e,loader:a(t),throwNotLoaded:!0})}function o(t,e){i(t).set(e)}function a(t){var e="";return t&&(e="?"+$.param({parent_path:t})),function(){return scrivito.ajax("GET","objs/valid_page_classes"+e)}}Object.defineProperty(e,"__esModule",{value:!0}),e.storeValidRailsPageClasses=e.validRailsPageClasses=void 0;var s=n(5),u=function(t){return t&&t.__esModule?t:{default:t}}(s),c=n(4);e.validRailsPageClasses=r,e.storeValidRailsPageClasses=o},function(t,e,n){"use strict";function r(t){return(0,o.default)(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var i=n(125),o=function(t){return t&&t.__esModule?t:{default:t}}(i)},function(t,e,n){var r,i;!function(n,o){"use strict";var a=function(t,e){var n,r,i,o,a,s,l,f,d,h,p,v,m,g,y,b="-",_=[";","?",":","@","&","=","+","$",",","/"],w=[";","?",":","@","&","=","+","$",","],C=[".","!","~","*","'","(",")"],k="",E="",x=!0,j={},O={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"Ae","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"Oe","Ő":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"Ue","Ű":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"ae","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"oe","ő":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"ue","ű":"u","ý":"y","þ":"th","ÿ":"y","ẞ":"SS","ا":"a","أ":"a","إ":"i","آ":"aa","ؤ":"u","ئ":"e","ء":"a","ب":"b","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ي":"y","ى":"a","ة":"h","ﻻ":"la","ﻷ":"laa","ﻹ":"lai","ﻵ":"laa","گ":"g","چ":"ch","پ":"p","ژ":"zh","ک":"k","ی":"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","က":"k","ခ":"kh","ဂ":"g","ဃ":"ga","င":"ng","စ":"s","ဆ":"sa","ဇ":"z","စျ":"za","ည":"ny","ဋ":"t","ဌ":"ta","ဍ":"d","ဎ":"da","ဏ":"na","တ":"t","ထ":"ta","ဒ":"d","ဓ":"da","န":"n","ပ":"p","ဖ":"pa","ဗ":"b","ဘ":"ba","မ":"m","ယ":"y","ရ":"ya","လ":"l","ဝ":"w","သ":"th","ဟ":"h","ဠ":"la","အ":"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h","ဧ":"e","၏":"-e","ဣ":"i","ဤ":"-i","ဉ":"u","ဦ":"-u","ဩ":"aw","သြော":"aw","ဪ":"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"","č":"c","ď":"d","ě":"e","ň":"n","ř":"r","š":"s","ť":"t","ů":"u","ž":"z","Č":"C","Ď":"D","Ě":"E","Ň":"N","Ř":"R","Š":"S","Ť":"T","Ů":"U","Ž":"Z","ހ":"h","ށ":"sh","ނ":"n","ރ":"r","ބ":"b","ޅ":"lh","ކ":"k","އ":"a","ވ":"v","މ":"m","ފ":"f","ދ":"dh","ތ":"th","ލ":"l","ގ":"g","ޏ":"gn","ސ":"s","ޑ":"d","ޒ":"z","ޓ":"t","ޔ":"y","ޕ":"p","ޖ":"j","ޗ":"ch","ޘ":"tt","ޙ":"hh","ޚ":"kh","ޛ":"th","ޜ":"z","ޝ":"sh","ޞ":"s","ޟ":"d","ޠ":"t","ޡ":"z","ޢ":"a","ޣ":"gh","ޤ":"q","ޥ":"w","ަ":"a","ާ":"aa","ި":"i","ީ":"ee","ު":"u","ޫ":"oo","ެ":"e","ޭ":"ey","ޮ":"o","ޯ":"oa","ް":"","α":"a","β":"v","γ":"g","δ":"d","ε":"e","ζ":"z","η":"i","θ":"th","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"ks","ο":"o","π":"p","ρ":"r","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"o","ά":"a","έ":"e","ί":"i","ό":"o","ύ":"y","ή":"i","ώ":"o","ς":"s","ϊ":"i","ΰ":"y","ϋ":"y","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"I","Θ":"TH","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"KS","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"O","Ά":"A","Έ":"E","Ί":"I","Ό":"O","Ύ":"Y","Ή":"I","Ώ":"O","Ϊ":"I","Ϋ":"Y","ā":"a","ē":"e","ģ":"g","ī":"i","ķ":"k","ļ":"l","ņ":"n","ū":"u","Ā":"A","Ē":"E","Ģ":"G","Ī":"I","Ķ":"k","Ļ":"L","Ņ":"N","Ū":"U","Ќ":"Kj","ќ":"kj","Љ":"Lj","љ":"lj","Њ":"Nj","њ":"nj","Тс":"Ts","тс":"ts","ą":"a","ć":"c","ę":"e","ł":"l","ń":"n","ś":"s","ź":"z","ż":"z","Ą":"A","Ć":"C","Ę":"E","Ł":"L","Ń":"N","Ś":"S","Ź":"Z","Ż":"Z","Є":"Ye","І":"I","Ї":"Yi","Ґ":"G","є":"ye","і":"i","ї":"yi","ґ":"g","ă":"a","Ă":"A","ș":"s","Ș":"S","ț":"t","Ț":"T","ţ":"t","Ţ":"T","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ё":"yo","ж":"zh","з":"z","и":"i","й":"i","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"kh","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ё":"Yo","Ж":"Zh","З":"Z","И":"I","Й":"I","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"Kh","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","ђ":"dj","ј":"j","ћ":"c","џ":"dz","Ђ":"Dj","Ј":"j","Ћ":"C","Џ":"Dz","ľ":"l","ĺ":"l","ŕ":"r","Ľ":"L","Ĺ":"L","Ŕ":"R","ş":"s","Ş":"S","ı":"i","İ":"I","ğ":"g","Ğ":"G","ả":"a","Ả":"A","ẳ":"a","Ẳ":"A","ẩ":"a","Ẩ":"A","đ":"d","Đ":"D","ẹ":"e","Ẹ":"E","ẽ":"e","Ẽ":"E","ẻ":"e","Ẻ":"E","ế":"e","Ế":"E","ề":"e","Ề":"E","ệ":"e","Ệ":"E","ễ":"e","Ễ":"E","ể":"e","Ể":"E","ọ":"o","Ọ":"o","ố":"o","Ố":"O","ồ":"o","Ồ":"O","ổ":"o","Ổ":"O","ộ":"o","Ộ":"O","ỗ":"o","Ỗ":"O","ơ":"o","Ơ":"O","ớ":"o","Ớ":"O","ờ":"o","Ờ":"O","ợ":"o","Ợ":"O","ỡ":"o","Ỡ":"O","Ở":"o","ở":"o","ị":"i","Ị":"I","ĩ":"i","Ĩ":"I","ỉ":"i","Ỉ":"i","ủ":"u","Ủ":"U","ụ":"u","Ụ":"U","ũ":"u","Ũ":"U","ư":"u","Ư":"U","ứ":"u","Ứ":"U","ừ":"u","Ừ":"U","ự":"u","Ự":"U","ữ":"u","Ữ":"U","ử":"u","Ử":"ư","ỷ":"y","Ỷ":"y","ỳ":"y","Ỳ":"Y","ỵ":"y","Ỵ":"Y","ỹ":"y","Ỹ":"Y","ạ":"a","Ạ":"A","ấ":"a","Ấ":"A","ầ":"a","Ầ":"A","ậ":"a","Ậ":"A","ẫ":"a","Ẫ":"A","ắ":"a","Ắ":"A","ằ":"a","Ằ":"A","ặ":"a","Ặ":"A","ẵ":"a","Ẵ":"A","“":'"',"”":'"',"‘":"'","’":"'","∂":"d","ƒ":"f","™":"(TM)","©":"(C)","œ":"oe","Œ":"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o","º":"o","ª":"a","•":"*","၊":",","။":".",$:"USD","€":"EUR","₢":"BRN","₣":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","¥":"CNY","元":"CNY","円":"YEN","﷼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF","₺":"TRY","؋":"AFN","₼":"AZN","лв":"BGN","៛":"KHR","₡":"CRC","₸":"KZT","ден":"MKD","zł":"PLN","₽":"RUB","₾":"GEL"},S=["်","ް"],T={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},A={en:{},az:{"ç":"c","ə":"e","ğ":"g","ı":"i","ö":"o","ş":"s","ü":"u","Ç":"C","Ə":"E","Ğ":"G","İ":"I","Ö":"O","Ş":"S","Ü":"U"},cs:{"č":"c","ď":"d","ě":"e","ň":"n","ř":"r","š":"s","ť":"t","ů":"u","ž":"z","Č":"C","Ď":"D","Ě":"E","Ň":"N","Ř":"R","Š":"S","Ť":"T","Ů":"U","Ž":"Z"},fi:{"ä":"a","Ä":"A","ö":"o","Ö":"O"},hu:{"ä":"a","Ä":"A","ö":"o","Ö":"O","ü":"u","Ü":"U","ű":"u","Ű":"U"},lt:{"ą":"a","č":"c","ę":"e","ė":"e","į":"i","š":"s","ų":"u","ū":"u","ž":"z","Ą":"A","Č":"C","Ę":"E","Ė":"E","Į":"I","Š":"S","Ų":"U","Ū":"U"},lv:{"ā":"a","č":"c","ē":"e","ģ":"g","ī":"i","ķ":"k","ļ":"l","ņ":"n","š":"s","ū":"u","ž":"z","Ā":"A","Č":"C","Ē":"E","Ģ":"G","Ī":"i","Ķ":"k","Ļ":"L","Ņ":"N","Š":"S","Ū":"u","Ž":"Z"},pl:{"ą":"a","ć":"c","ę":"e","ł":"l","ń":"n","ó":"o","ś":"s","ź":"z","ż":"z","Ą":"A","Ć":"C","Ę":"e","Ł":"L","Ń":"N","Ó":"O","Ś":"S","Ź":"Z","Ż":"Z"},sk:{"ä":"a","Ä":"A"},sr:{"љ":"lj","њ":"nj","Љ":"Lj","Њ":"Nj","đ":"dj","Đ":"Dj"},tr:{"Ü":"U","Ö":"O","ü":"u","ö":"o"}},P={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}};if("string"!=typeof t)return"";if("string"==typeof e&&(b=e),l=P.en,f=A.en,"object"==typeof e){n=e.maintainCase||!1,j=e.custom&&"object"==typeof e.custom?e.custom:j,i=+e.truncate>1&&e.truncate||!1,o=e.uric||!1,a=e.uricNoSlash||!1,s=e.mark||!1,x=!1!==e.symbols&&!1!==e.lang,b=e.separator||b,o&&(y+=_.join("")),a&&(y+=w.join("")),s&&(y+=C.join("")),l=e.lang&&P[e.lang]&&x?P[e.lang]:x?P.en:{},f=e.lang&&A[e.lang]?A[e.lang]:!1===e.lang||!0===e.lang?{}:A.en,e.titleCase&&"number"==typeof e.titleCase.length&&Array.prototype.toString.call(e.titleCase)?(e.titleCase.forEach(function(t){j[t+""]=t+""}),r=!0):r=!!e.titleCase,e.custom&&"number"==typeof e.custom.length&&Array.prototype.toString.call(e.custom)&&e.custom.forEach(function(t){j[t+""]=t+""}),Object.keys(j).forEach(function(e){var n;n=e.length>1?new RegExp("\\b"+u(e)+"\\b","gi"):new RegExp(u(e),"gi"),t=t.replace(n,j[e])});for(p in j)y+=p}for(y+=b,y=u(y),t=t.replace(/(^\s+|\s+$)/g,""),m=!1,g=!1,h=0,v=t.length;h<v;h++)p=t[h],c(p,j)?m=!1:f[p]?(p=m&&f[p].match(/[A-Za-z0-9]/)?" "+f[p]:f[p],m=!1):p in O?(h+1<v&&S.indexOf(t[h+1])>=0?(E+=p,p=""):!0===g?(p=T[E]+O[p],E=""):p=m&&O[p].match(/[A-Za-z0-9]/)?" "+O[p]:O[p],m=!1,g=!1):p in T?(E+=p,p="",h===v-1&&(p=T[E]),g=!0):!l[p]||o&&-1!==_.join("").indexOf(p)||a&&-1!==w.join("").indexOf(p)?(!0===g?(p=T[E]+p,E="",g=!1):m&&(/[A-Za-z0-9]/.test(p)||k.substr(-1).match(/A-Za-z0-9]/))&&(p=" "+p),m=!1):(p=m||k.substr(-1).match(/[A-Za-z0-9]/)?b+l[p]:l[p],p+=void 0!==t[h+1]&&t[h+1].match(/[A-Za-z0-9]/)?b:"",m=!0),k+=p.replace(new RegExp("[^\\w\\s"+y+"_-]","g"),b);return r&&(k=k.replace(/(\w)(\S*)/g,function(t,e,n){var r=e.toUpperCase()+(null!==n?n:"");return Object.keys(j).indexOf(r.toLowerCase())<0?r:r.toLowerCase()})),k=k.replace(/\s+/g,b).replace(new RegExp("\\"+b+"+","g"),b).replace(new RegExp("(^\\"+b+"+|\\"+b+"+$)","g"),""),i&&k.length>i&&(d=k.charAt(i)===b,k=k.slice(0,i),d||(k=k.slice(0,k.lastIndexOf(b)))),n||r||(k=k.toLowerCase()),k},s=function(t){return function(e){return a(e,t)}},u=function(t){return t.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},c=function(t,e){for(var n in e)if(e[n]===t)return!0};void 0!==t&&t.exports?(t.exports=a,t.exports.createSlug=s):(r=[],void 0!==(i=function(){return a}.apply(e,r))&&(t.exports=i))}()},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(163),s=r(a),u=n(68),c=r(u),l=n(5),f=function(t){return t&&t.__esModule?t:{default:t}}(l),d=function(){function t(e,n){var r=this;i(this,t),this._loadableData=new f.default({state:n,loader:function(t){return s.retrieveObj(r._id).then(function(e){return t(function(){return r._replication().notifyBackendState(e)}),e})}}),this._id=e}return o(t,[{key:"set",value:function(t){this._loadableData.set(t)}},{key:"setError",value:function(t){this._loadableData.setError(t)}},{key:"isAvailable",value:function(){return this._loadableData.isAvailable()}},{key:"update",value:function(t){var e=c.apply(this.current,t);this._loadableData.set(e),this._replication().notifyLocalState(e)}},{key:"finishSaving",value:function(){return this._replication().finishSaving()}},{key:"_replication",value:function(){return scrivito.ObjReplication.get(this._id)}},{key:"current",get:function(){return this._loadableData.get()}}]),t}();e.default=d},function(t,e,n){"use strict";function r(t){var e=scrivito.currentWorkspaceId();return scrivito.CmsRestApi.get("workspaces/"+e+"/objs/mget",{ids:t,include_deleted:!0}).then(function(t){return t.results})}function i(t){return c.retrieve(t).then(function(e){if(e)return e;throw new a.ResourceNotFoundError('Obj with id "'+t+'" not found.')})}function o(){c.reset()}Object.defineProperty(e,"__esModule",{value:!0}),e.retrieveObj=i,e.reset=o;var a=n(1),s=n(90),u=function(t){return t&&t.__esModule?t:{default:t}}(s),c=new u.default(r,{batchSize:17})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t){(0,g.each)(t,function(t){return m.preload(t)})}function s(t,e){var n=(0,g.extend)({},t,{index:e}),r=d.computeCacheKey(n);return d.stateContainer().subState(r)}function u(t){return function(){return t+"|"+scrivito.ObjReplication.getWorkspaceVersion()}}function c(t){var e=(0,g.omit)({query:t.query,offset:t.offset,sort_by:t.sortBy,sort_order:t.sortDirection},g.isUndefined);return t.includeDeleted&&(e.options={include_deleted:!0}),e}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=n(91),d=i(f),h=n(165),p=i(h),v=n(52),m=i(v),g=n(0),y=n(13),b=r(y),_=n(5),w=r(_),C={results:[]},k=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o(this,t),this._params=e,this._batchSize=n,r?(this._index=r.index+1,this._continuation=r.continuationForNextBatch(),this._previousBatch=r):this._index=0}return l(t,null,[{key:"store",value:function(t,e){var n=s(c(t),0),r=u(void 0);new w.default({state:n,invalidation:r}).set({results:e})}},{key:"firstBatchFor",value:function(e,n){return new t(c(e),n)}}]),l(t,[{key:"objIds",value:function(){return this._response().results}},{key:"nextBatch",value:function(){if(this.continuationForNextBatch())return new t(this._params,this._batchSize,this)}},{key:"continuationForNextBatch",value:function(){return this._response().continuation}},{key:"_response",value:function(){return this._data().get()||C}},{key:"_data",value:function(){var t=this;return new w.default({state:s(this._params,this._index),loader:function(){return t._load()},invalidation:u(this._continuation)})}},{key:"_load",value:function(){var t=this;return this._fetchContinuation().then(function(e){var n={size:t._batchSize,continuation:e},r=(0,g.extend)({},t._params,n);return p.retrieve(r).then(function(t){return a(t.results),t})})}},{key:"_fetchContinuation",value:function(){var t=this;return this._previousBatch?(0,b.default)(function(){return t._previousBatch.continuationForNextBatch()}):scrivito.Promise.resolve()}},{key:"index",get:function(){return this._index}}]),t}();e.default=k},function(t,e,n){"use strict";function r(t){var e=scrivito.currentWorkspaceId(),n=o.default.extend({consistent:!0},t);return scrivito.CmsRestApi.get("workspaces/"+e+"/objs/search",n).then(function(t){return t.results=o.default.pluck(t.results,"id"),o.default.pick(t,"results","continuation")})}Object.defineProperty(e,"__esModule",{value:!0}),e.retrieve=r;var i=n(0),o=function(t){return t&&t.__esModule?t:{default:t}}(i)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return!!t.current._deleted}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(52),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(a),u=n(1),c=n(92),l=function(t){return t&&t.__esModule?t:{default:t}}(c),f=function(){function t(e,n){r(this,t),this._params=e,this._batchSize=n}return o(t,[{key:"iterator",value:function(){return new d(this._params,this._batchSize)}}]),t}();e.default=f;var d=function(){function t(e,n){r(this,t),this._iterator=new l.default(e,n).iterator()}return o(t,[{key:"next",value:function(){if(!this._iterator)return{done:!0};var t=this._iterator.next().value;if(!t)return{done:!0};try{var e=s.get(t);return void 0===e?(this._iterator=void 0,{done:!0}):i(e)?this.next():{value:e,done:!1}}catch(t){if(t instanceof u.ResourceNotFoundError)return this.next();throw t}}}]),t}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(){return scrivito.ObjReplication.getWorkspaceVersion()}function a(t){var e=scrivito.computeCacheKey(t);return m.cmsState.subState("facetQuery").subState(e)}function s(t){var e=v.default.without.apply(v.default,[v.default.keys(t)].concat(_));if(e.length)throw new g.ArgumentError("Invalid options: "+(0,b.default)(e)+". Valid options: "+_)}function u(t,e,n){var r={facets:[{attribute:t,limit:e.limit||10,include_objs:e.includeObjs||0}],size:0};return n&&n.length&&(r.query=n),r}Object.defineProperty(e,"__esModule",{value:!0});var c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(168),f=r(l),d=n(5),h=r(d),p=n(0),v=r(p),m=n(4),g=n(1),y=n(21),b=r(y),_=["limit","includeObjs"],w=function(){function t(e,n,r){var c=this;i(this,t),s(n),this._requestParams=u(e,n,r),this._loadableData=new h.default({state:a(this._requestParams),loader:function(){return c._loadData()},invalidation:o})}return c(t,[{key:"result",value:function(){var t=this._loadableData.get();if(!t)return[];var e=v.default.first(t.facets);return v.default.map(e,function(t){var e=t.value,n=t.total,r=t.results.map(function(t){return t.id});return new f.default(e,n,r)})}},{key:"_loadData",value:function(){var t=scrivito.currentWorkspaceId();return scrivito.CmsRestApi.get("workspaces/"+t+"/objs/search",this._requestParams)}}],[{key:"store",value:function(t,e,n,r){s(e);var i=u(t,e,n);new h.default({state:a(i),invalidation:o,throwNotLoaded:!0}).set(r)}}]),t}();e.default=w},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(3),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function(){function t(e,n,i){r(this,t),this._name=e,this._count=n,this._includedObjs=i}return i(t,[{key:"name",value:function(){return this._name}},{key:"count",value:function(){return this._count}},{key:"includedObjs",value:function(){return a.default.get(this._includedObjs)}}]),t}();e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n,r){var i=C(e,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 _(f,v);case"widgetlist":return w(f,v,t)}}function o(t,e){if("binary"===t&&e){var n=e.id,r="published"===scrivito.currentWorkspaceId();return new N.default(n,r).transform({})}return null}function a(t,e){return"date"!==t?null:j.deserializeAsDate(e)}function s(t,e){return A.default.contains(["html","string"],t)&&A.default.isString(e)?e:""}function u(t,e,n){var r=n.values;return"string"===t&&A.default.contains(r,e)?e:null}function c(t,e,n){var r=n.values;return"stringlist"===t&&Array.isArray(e)?A.default.intersection(e,r):[]}function l(t,e){switch(t){case"string":return e.match(/^-?\d+(\.\d+)?$/)?f(e):null;case"number":return f(e);default:return null}}function f(t){var e=parseFloat(t);return j.isValidFloat(e)?e:null}function d(t,e){switch(t){case"string":case"number":return j.deserializeAsInteger(e);default:return null}}function h(t,e){return"link"===t&&A.default.isObject(e)?v(e):null}function p(t,e){return A.default.isArray(e)?A.default.compact(e.map(v)):[]}function v(t){var e=A.default.pick(t,"title","query","fragment","target","url");e.hash=e.fragment,delete e.fragment,e.objId=t.obj_id;var n=S.default.build(e);return n.isBroken()?null:n}function m(t){var e=E.default.get(t);return e||null}function g(t,e){return"reference"===t&&e?m(e):null}function y(t,e){if("referencelist"!==t)return[];if(!e)return[];var n=e.map(m);return A.default.compact(n)}function b(t,e){return A.default.contains(["html","string"],t)&&A.default.isString(e)?e:""}function _(t,e){return"stringlist"===t&&Array.isArray(e)?e:[]}function w(t,e,n){return"widgetlist"!==t?[]:A.default.map(e,function(t){return n.widget(t)})}Object.defineProperty(e,"__esModule",{value:!0});var C=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.deserialize=i;var k=n(3),E=r(k),x=n(34),j=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(x),O=n(24),S=r(O),T=n(0),A=r(T),P=n(30),N=r(P)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){var e=function(e){function n(){return i(this,n),o(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return a(n,e),u(n,[{key:"iterator",value:function(){var e=c(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"iterator",this).call(this);return{next:function(){var n=e.next(),r=n.done,i=n.value;return r?{done:r}:{done:r,value:scrivito.wrapInAppClass(t,i)}}}}},{key:"and",value:function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=scrivito.unwrapAppClassValues(r);return c(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"and",this).call(this,t,e,o,i)}},{key:"andNot",value:function(t,e,r){var i=scrivito.unwrapAppClassValues(r);return c(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"andNot",this).call(this,t,e,i)}},{key:"facet",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=c(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"facet",this).call(this,e,r);return v.default.map(i,function(e){return new h.default(t,e)})}},{key:"take",value:function(t){return(0,m.arrayFromIterable)(this.batchSize(t),t)}}]),n}(f.default);if("function"==typeof window.Symbol){var n=window.Symbol.iterator;if(n){var r=e.prototype;r[n]=r.iterator}}return e}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)};e.default=s;var l=n(60),f=r(l),d=n(100),h=r(d),p=n(0),v=r(p),m=n(73)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){function e(e){var n=new t.ObjSearch;return e&&n.and("_objClass","equals",e),n}function n(e){return scrivito.wrapInAppClass(t,e)}var r=new v.default(t);return function(s){function c(){return i(this,c),o(this,(c.__proto__||Object.getPrototypeOf(c)).apply(this,arguments))}return a(c,s),u(c,[{key:"lastChanged",value:function(){return this._scrivitoPrivateContent.lastChanged()}},{key:"path",value:function(){return this._scrivitoPrivateContent.path()}},{key:"parent",value:function(){return n(this._scrivitoPrivateContent.parent())}},{key:"ancestors",value:function(){return n(this._scrivitoPrivateContent.ancestors())}},{key:"backlinks",value:function(){return n(this._scrivitoPrivateContent.backlinks())}},{key:"children",value:function(){return n(this._scrivitoPrivateContent.children())}},{key:"orderedChildren",value:function(){return n(this._scrivitoPrivateContent.orderedChildren())}},{key:"permalink",value:function(){return this._scrivitoPrivateContent.permalink()}},{key:"slug",value:function(){return this._scrivitoPrivateContent.slug()}},{key:"isBinary",value:function(){var t=d.default.forInstance(this);return!!t&&t.isBinary()}},{key:"contentLength",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentLength():0}},{key:"contentType",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentType():""}},{key:"contentUrl",value:function(){return this.isBinary()?this._scrivitoPrivateContent.contentUrl():""}},{key:"metadata",value:function(){return this.isBinary()?this._scrivitoPrivateContent.metadata():new g.default}},{key:"destroy",value:function(){this._scrivitoPrivateContent.destroy()}},{key:"widget",value:function(t){return n(this._scrivitoPrivateContent.widget(t))}},{key:"widgets",value:function(){return n(this._scrivitoPrivateContent.widgets())}}],[{key:"get",value:function(t){return r.getObj(this,t)}},{key:"getIncludingDeleted",value:function(t){return r.getObjIncludingDeleted(this,t)}},{key:"getByPath",value:function(t){return n(l.default.getByPath(t))}},{key:"getByPermalink",value:function(t){return n(l.default.getByPermalink(t))}},{key:"all",value:function(){return e(t.objClassNameFor(this)).batchSize(1e3)}},{key:"root",value:function(){return n(l.default.root())}},{key:"where",value:function(n,r,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return e(t.objClassNameFor(this)).and(n,r,i,o)}},{key:"create",value:function(e){var r=d.default.forClass(this),i=t.objClassNameFor(this);if(!i)throw new h.ArgumentError("Creating CMS objects is not supported for the class Obj or abstract classes.");if(e.constructor!==Object)throw new h.ArgumentError("The provided attributes are invalid. They have to be an Object with valid Scrivito attribute values.");if(e._objClass)throw new h.ArgumentError('Invalid attribute "_objClass". "'+e._objClass+'.create" will automatically set the CMS object class correctly.');e._objClass=i;var o=scrivito.AttributeContentFactory.prepareAttributes(e,r,i);return n(l.default.create(o))}}]),c}(scrivito.AttributeContentFactory(r))}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();e.default=s;var c=n(3),l=r(c),f=n(23),d=r(f),h=n(1),p=n(61),v=r(p),m=n(87),g=r(m)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){return function(e){function n(t){return r(this,n),i(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t))}return o(n,e),s(n,[{key:"obj",value:function(){return scrivito.wrapInAppClass(t,u(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"obj",this).call(this))}},{key:"fetchObj",value:function(e){return u(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"fetchObj",this).call(this,e).then(function(e){return scrivito.wrapInAppClass(t,e)})}},{key:"_scrivitoPrivateContent",get:function(){return l.default.build(this.buildAttributes())}}]),n}(l.default)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)};e.default=a;var c=n(24),l=function(t){return t&&t.__esModule?t:{default:t}}(c)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){var n=new c.default(t,e);return function(t){function e(){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return o(e,t),s(e,null,[{key:"_scrivitoPrivateSchema",get:function(){return n}}]),e}(e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();e.default=a;var u=n(23),c=function(t){return t&&t.__esModule?t:{default:t}}(u)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(0),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function(){function t(){r(this,t),this._mapping={}}return i(t,[{key:"register",value:function(t,e){this._mapping[t]=e}},{key:"getClass",value:function(t){return this._mapping[t]}},{key:"allObjClasses",value:function(){return this._allForBaseClass(this.defaultClassForObjs)}},{key:"allWidgetClasses",value:function(){return this._allForBaseClass(this.defaultClassForWidgets)}},{key:"objClassFor",value:function(t){return this._appClassFor(t,this.defaultClassForObjs)}},{key:"widgetClassFor",value:function(t){return this._appClassFor(t,this.defaultClassForWidgets)}},{key:"objClassNameFor",value:function(t){return a.default.findKey(this._mapping,function(e){return e===t})}},{key:"_appClassFor",value:function(t,e){var n=this.getClass(t);return n&&e.isPrototypeOf(n)?n:e}},{key:"_allForBaseClass",value:function(t){return a.default.pick(this._mapping,function(e){return t.isPrototypeOf(e)})}}]),t}();e.default=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function o(t,e){u(t,m,e,"CMS object")}function a(t,e){u(t,g,e,"widget")}function s(t,e,n){return e.isPrototypeOf(t)||n.isPrototypeOf(t)}function u(t,e,n,r){var o=f.default.without.apply(f.default,[f.default.keys(t)].concat(i(e)));if(o.length)throw new v.ArgumentError("Invalid key(s) "+(0,h.default)(o)+" given. Valid keys are "+(0,h.default)(e)+".");c(t.attributes);var a=t.extend;if(a&&n!==a&&!n.isPrototypeOf(a))throw new v.ArgumentError('Invalid value for "extend": not a '+r+" class")}function c(t){if(void 0!==t){if(t.constructor!==Object)throw new v.ArgumentError('Required key "attributes" is invalid. Should be an Object.');f.default.each(t,function(t,e){if(!(0,p.isCamelCase)(e))throw new v.ArgumentError('Attribute "'+e+'" is not in camel case.');if(!f.default.isArray(t)&&!f.default.isString(t))throw new v.ArgumentError('Attribute definition for "'+e+'" is invalid. Should be a String or an Array.')})}}Object.defineProperty(e,"__esModule",{value:!0}),e.isValidAppClass=e.assertValidWidgetClassDefinition=e.assertValidObjClassDefinition=void 0;var l=n(0),f=r(l),d=n(21),h=r(d),p=n(15),v=n(1),m=["attributes","extend","name"],g=["attributes","extend","name","onlyInside"];e.assertValidObjClassDefinition=o,e.assertValidWidgetClassDefinition=a,e.isValidAppClass=s},function(t,e,n){"use strict";var r=n(5),i=function(t){return t&&t.__esModule?t:{default:t}}(r);!function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=i.default.run(function(){return e.next()});if(!o.allDataLoaded)return{done:!1,objs:r};var a=o.result,s=a.value,u=a.done;return u||0===n?{done:u,objs:r}:t(e,n-1,r.concat([s]))}scrivito.loadAllUntil=t}()},function(t,e,n){"use strict";var r=n(5),i=function(t){return t&&t.__esModule?t:{default:t}}(r);!function(){function t(t,e){var n=i.default.run(e);return n.allDataLoaded?n.result:t}scrivito.loadableWithDefault=t,scrivito.loadWithDefault=t}()},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(1);!function(){var t=function(t){function e(t){return r(this,e),i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,"Data is not yet loaded.",t))}return o(e,t),e}(a.ScrivitoError);scrivito.NotLoadedError=t}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(32),s=r(a),u=n(0),c=r(u),l=n(1);!function(){function t(t){return function(){function e(){i(this,e)}return o(e,[{key:"id",value:function(){return this._scrivitoPrivateContent.id()}},{key:"objClass",value:function(){return this._scrivitoPrivateContent.objClass()}},{key:"finishSaving",value:function(){return this._scrivitoPrivateContent.finishSaving()}},{key:"get",value:function(e){return t.read(this,e)}},{key:"update",value:function(e){t.update(this,e)}}]),e}()}function e(t,e,n){return c.default.mapObject(t,function(t,r){if(s.default.isSystemAttribute(r))return[t];var i=e.attributes[r];if(!i)throw new l.ArgumentError('Attribute "'+r+'" is not defined for CMS object class "'+n+'".');return[scrivito.unwrapAppClassValues(t),i]})}scrivito.AttributeContentFactory=t,scrivito.AttributeContentFactory.prepareAttributes=e}()},function(t,e,n){"use strict";var r=n(0),i=function(t){return t&&t.__esModule?t:{default:t}}(r);!function(){var t=[],e=void 0;i.default.extend(scrivito,{nextTick:function(n){e?t.push(n):setTimeout(n,0)},simulateNextTicks:function(){if(e){for(var n=[];t.length;){var r=i.default.shuffle(t);t=[],i.default.each(r,function(t){try{t()}catch(t){n.push(t)}})}if(n.length>0)throw n[0]}},enableNextTickCapture:function(){e=!0},disableNextTickCapture:function(){e=!1}})}()},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(10),u=i(s),c=n(68),l=r(c),f=n(52),d=r(f),h=n(0),p=i(h),v=n(1);!function(){function t(t,e){return l.diff(t,e)}function e(t,e){return l.apply(t,e)}function n(t,e){return r(t,e)>0?t:e}function r(t,e){return t?e?i(t._version,e._version):1:-1}function i(t,e){return t>e?1:e>t?-1:0}function s(t){p.default.each(h,function(e){e(t)})}var c={},f=void 0,h={},m=0,g=0;scrivito.ObjReplication=function(){function i(t){var e=this;o(this,i),this._id=t,this._replicationActive=!1,this._scheduledReplication=!1,this._currentRequestDeferred=null,this._nextRequestDeferred=null,this._performThrottledReplication=scrivito.throttle(function(){return e._performReplication()},1e3)}return a(i,null,[{key:"get",value:function(t){return c[t]||(c[t]=new scrivito.ObjReplication(t)),c[t]}},{key:"subscribeWrites",value:function(t){return m+=1,h[m]=t,m}},{key:"unsubscribeWrites",value:function(t){delete h[t]}},{key:"getWorkspaceVersion",value:function(){return g}}]),a(i,[{key:"notifyLocalState",value:function(t){if(!f){if(void 0===this._backendState)throw new v.InternalError("Can not set local state before backend state.");if(this._backendState&&this._backendState._deleted)throw new v.InternalError("Can not update a fully deleted obj.");this._localState=t,this._startReplication()}}},{key:"notifyBackendState",value:function(n){if(void 0===this._backendState)return this._updateBackendState(n),void this._updateLocalState(n);if(r(n,this._bufferedBackendState||this._backendState)>0)if(this._replicationActive)this._bufferedBackendState=n;else{if(n._deleted)this._updateLocalState(null);else{var i=t(this._backendState,n);this._updateLocalState(e(this.localState,i))}this._updateBackendState(n)}}},{key:"finishSaving",value:function(){var t=void 0;if(this._nextRequestDeferred)t=this._nextRequestDeferred.promise;else{if(!this._currentRequestDeferred)return scrivito.Promise.resolve();t=this._currentRequestDeferred.promise}return t.catch(function(){return scrivito.Promise.reject()})}},{key:"_startReplication",value:function(){var e=this;p.default.isEmpty(t(this._backendState,this._localState))?this._nextRequestDeferred&&(this._nextRequestDeferred.resolve(),this._nextRequestDeferred=null):this._replicationActive?this._nextRequestDeferred||(this._nextRequestDeferred=new u.default):this._scheduledReplication||(this._scheduledReplication=!0,this._initDeferredForRequest(),s(this._currentRequestDeferred.promise),scrivito.nextTick(function(){return e._performThrottledReplication()}))}},{key:"_performReplication",value:function(){var e=this,n=this._localState,r=t(this._backendState,this._localState);this._scheduledReplication=!1,this._replicationActive=!0,this._replicatePatchToBackend(r).then(function(t){e._handleBackendUpdate(n,t),e._currentRequestDeferred.resolve(e._id),e._currentRequestDeferred=null,e._replicationActive=!1,e._startReplication()},function(t){e._currentRequestDeferred.reject(t),e._currentRequestDeferred=null,e._replicationActive=!1})}},{key:"_replicatePatchToBackend",value:function(t){if("deleted"===t._modification)return this._deleteObj();if(p.default.isEmpty(t))return scrivito.Promise.resolve(this._backendState);var e=scrivito.currentWorkspaceId(),n="workspaces/"+e+"/objs/"+this._id;return scrivito.CmsRestApi.put(n,{obj:t})}},{key:"_deleteObj",value:function(){var t=scrivito.currentWorkspaceId(),e="workspaces/"+t+"/objs/"+this._id;return scrivito.CmsRestApi.delete(e,{include_deleted:!0})}},{key:"_initDeferredForRequest",value:function(){if(this._nextRequestDeferred){var t=this._nextRequestDeferred;this._nextRequestDeferred=null,this._currentRequestDeferred=t}else this._currentRequestDeferred=new u.default}},{key:"_handleBackendUpdate",value:function(r,i){var o=t(r,this._localState);this._updateBackendState(n(i,this._bufferedBackendState)),this._bufferedBackendState=void 0,this._updateLocalState(e(this._backendState,o))}},{key:"_updateLocalState",value:function(t){this._localState=t,d.set(this._id,this._localState)}},{key:"_updateBackendState",value:function(t){void 0!==this._backendState&&g++,this._backendState=t}},{key:"isNotStoredInBackend",value:function(){return null===this._backendState}},{key:"isRequestInFlight",value:function(){return this._replicationActive}},{key:"backendState",get:function(){return this._backendState}},{key:"localState",get:function(){return this._localState}}],[{key:"disableReplication",value:function(){f=!0}},{key:"enableReplication",value:function(){f=!1}},{key:"clearWriteCallbacks",value:function(){h={}}},{key:"clearCache",value:function(){c={}}}]),i}()}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(0),o=r(i),a=n(183),s=r(a);!function(){s.default.noConflict(),s.default.config({warnings:!1,longStackTraces:!1}),o.default.extend(scrivito,{Promise:s.default,promise:{enableDebugMode:function(){s.default.config({warnings:!0,longStackTraces:!0})},wrapInJqueryDeferred:function(t,e){var n=e;return t.then(function(t){return n.resolve(t)},function(t){n.reject(t)}),n},always:function(t,e){return t.then(e,e),t},capturePromises:function(){s.default.setScheduler(function(t){scrivito.nextTick(t)})}}})}()},function(t,e,n){(function(e,n,r){/* @preserve
49
72
  * The MIT License (MIT)
50
73
  *
51
74
  * Copyright (c) 2013-2015 Petka Antonov
@@ -69,4 +92,6 @@ var n=r(7);n.Any=r(102),n.Array=r(264),n.Boolean=r(192),n.Date=r(265),n.Error=r(
69
92
  * THE SOFTWARE.
70
93
  *
71
94
  */
72
- !function(e){t.exports=e()}(function(){var t,i,o;return function t(e,r,n){function i(a,u){if(!r[a]){if(!e[a]){var s="function"==typeof _dereq_&&_dereq_;if(!u&&s)return s(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[a]={exports:{}};e[a][0].call(l.exports,function(t){var r=e[a][1][t];return i(r||t)},l,l.exports,t,e,r,n)}return r[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(t,e,r){"use strict";e.exports=function(t){function e(t){var e=new r(t),n=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),n}var r=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},{}],2:[function(t,r,n){"use strict";function i(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new l(16),this._normalQueue=new l(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=c}function o(t,e,r){this._lateQueue.push(t,e,r),this._queueTick()}function a(t,e,r){this._normalQueue.push(t,e,r),this._queueTick()}function u(t){this._normalQueue._pushOne(t),this._queueTick()}var s;try{throw new Error}catch(t){s=t}var c=t("./schedule"),l=t("./queue"),f=t("./util");i.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},i.prototype.hasCustomScheduler=function(){return this._customScheduler},i.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},i.prototype.disableTrampolineIfNecessary=function(){f.hasDevTools&&(this._trampolineEnabled=!1)},i.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},i.prototype.fatalError=function(t,r){r?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},i.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},f.hasDevTools?(i.prototype.invokeLater=function(t,e,r){this._trampolineEnabled?o.call(this,t,e,r):this._schedule(function(){setTimeout(function(){t.call(e,r)},100)})},i.prototype.invoke=function(t,e,r){this._trampolineEnabled?a.call(this,t,e,r):this._schedule(function(){t.call(e,r)})},i.prototype.settlePromises=function(t){this._trampolineEnabled?u.call(this,t):this._schedule(function(){t._settlePromises()})}):(i.prototype.invokeLater=o,i.prototype.invoke=a,i.prototype.settlePromises=u),i.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var r=t.shift(),n=t.shift();e.call(r,n)}else e._settlePromises()}},i.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},i.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},i.prototype._reset=function(){this._isTickUsed=!1},r.exports=i,r.exports.firstLineError=s},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var i=!1,o=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},u=function(t,e){0==(50397184&this._bitField)&&this._resolveCallback(e.target)},s=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=n.propagateFromFunction(),t.prototype._boundValue=n.boundValueFunction());var c=r(o),l=new t(e);l._propagateFrom(this,1);var f=this._target();if(l._setBoundTo(c),c instanceof t){var d={promiseRejectionQueued:!1,promise:l,target:f,bindingPromise:c};f._then(e,a,void 0,l,d),c._then(u,s,void 0,l,d),l._setOnCancel(c)}else l._resolveCallback(f);return l},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},t.bind=function(e,r){return t.resolve(r).bind(e)}}},{}],4:[function(t,e,r){"use strict";function n(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=n,e.exports=o},{"./promise":22}],5:[function(t,e,r){"use strict";var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}e.exports=function(e){function r(t,r){var n;if(null!=t&&(n=t[r]),"function"!=typeof n){var i="Object "+u.classString(t)+" has no method '"+u.toString(r)+"'";throw new e.TypeError(i)}return n}function n(t){return r(t,this.pop()).apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}var a,u=t("./util"),s=u.canEvaluate;u.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(n,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,r="number"==typeof t;if(r)e=o;else if(s){var n=a(t);e=null!==n?n:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,r){"use strict";e.exports=function(e,r,n,i){var o=t("./util"),a=o.tryCatch,u=o.errorObj,s=e._async;e.prototype.break=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var r=t._cancellationParent;if(null==r||!r._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=r}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),s.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var r=0;r<t.length;++r)this._doInvokeOnCancel(t[r],e);else if(void 0!==t)if("function"==typeof t){if(!e){var n=a(t).call(this._boundValue());n===u&&(this._attachExtraTrace(n.e),s.throwLater(n.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),s.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(t,e,r){"use strict";e.exports=function(e){function r(t,r,u){return function(s){var c=u._boundValue();t:for(var l=0;l<t.length;++l){var f=t[l];if(f===Error||null!=f&&f.prototype instanceof Error){if(s instanceof f)return o(r).call(c,s)}else if("function"==typeof f){var d=o(f).call(c,s);if(d===a)return d;if(d)return o(r).call(c,s)}else if(n.isObject(s)){for(var p=i(f),h=0;h<p.length;++h){var v=p[h];if(f[v]!=s[v])continue t}return o(r).call(c,s)}}return e}}var n=t("./util"),i=t("./es5").keys,o=n.tryCatch,a=n.errorObj;return r}},{"./es5":13,"./util":36}],8:[function(t,e,r){"use strict";e.exports=function(t){function e(){this._trace=new e.CapturedTrace(n())}function r(){if(i)return new e}function n(){var t=o.length-1;if(t>=0)return o[t]}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=r,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var r=t.prototype._pushContext,o=t.prototype._popContext,a=t._peekContext,u=t.prototype._peekContext,s=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=r,t.prototype._popContext=o,t._peekContext=a,t.prototype._peekContext=u,t.prototype._promiseCreated=s,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=n,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,r,n){"use strict";r.exports=function(r,n){function i(t,e){return{promise:e}}function o(){return!1}function a(t,e,r){var n=this;try{t(e,r,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+L.toString(t));n._attachCancellationCallback(t)})}catch(t){return t}}function u(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?L.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function s(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function f(t,e){if(0!=(1&e)){this._cancellationParent=t;var r=t._branchesRemainingToCancel;void 0===r&&(r=0),t._branchesRemainingToCancel=r+1}0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function d(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(){var t=this._boundTo;return void 0!==t&&t instanceof r?t.isFulfilled()?t.value():void 0:t}function h(){this._trace=new F(this._peekContext())}function v(t,e){if(B(t)){var r=this._trace;if(void 0!==r&&e&&(r=r._parent),void 0!==r)r.attachExtraTrace(t);else if(!t.__stackCleaned__){var n=O(t);L.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),L.notEnumerableProp(t,"__stackCleaned__",!0)}}}function y(t,e,r,n,i){if(void 0===t&&null!==e&&Y){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&n._bitField))return;r&&(r+=" ");var o="",a="";if(e._trace){for(var u=e._trace.stack.split("\n"),s=k(u),c=s.length-1;c>=0;--c){var l=s[c];if(!W.test(l)){var f=l.match(q);f&&(o="at "+f[1]+":"+f[2]+":"+f[3]+" ");break}}if(s.length>0)for(var d=s[0],c=0;c<u.length;++c)if(u[c]===d){c>0&&(a="\n"+u[c-1]);break}}var p="a promise was created in a "+r+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;n._warn(p,!0,e)}}function _(t,e){var r=t+" is deprecated and will be removed in a future version.";return e&&(r+=" Use "+e+" instead."),g(r)}function g(t,e,n){if(at.warnings){var i,o=new z(t);if(e)n._attachExtraTrace(o);else if(at.longStackTraces&&(i=r._peekContext()))i.attachExtraTrace(o);else{var a=O(o);o.stack=a.message+"\n"+a.stack.join("\n")}et("warning",o)||C(o,"",!0)}}function m(t,e){for(var r=0;r<e.length-1;++r)e[r].push("From previous event:"),e[r]=e[r].join("\n");return r<e.length&&(e[r]=e[r].join("\n")),t+"\n"+e.join("\n")}function b(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function w(t){for(var e=t[0],r=1;r<t.length;++r){for(var n=t[r],i=e.length-1,o=e[i],a=-1,u=n.length-1;u>=0;--u)if(n[u]===o){a=u;break}for(var u=a;u>=0;--u){var s=n[u];if(e[i]!==s)break;e.pop(),i--}e=n}}function k(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],i=" (No stack trace)"===n||V.test(n),o=i&&nt(n);i&&!o&&(H&&" "!==n.charAt(0)&&(n=" "+n),e.push(n))}return e}function j(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),r=0;r<e.length;++r){var n=e[r];if(" (No stack trace)"===n||V.test(n))break}return r>0&&"SyntaxError"!=t.name&&(e=e.slice(r)),e}function O(t){var e=t.stack,r=t.toString();return e="string"==typeof e&&e.length>0?j(t):[" (No stack trace)"],{message:r,stack:"SyntaxError"==t.name?e:k(e)}}function C(t,e,r){if("undefined"!=typeof console){var n;if(L.isObject(t)){var i=t.stack;n=e+Q(i,t)}else n=e+String(t);"function"==typeof I?I(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function P(t,e,r,n){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(n):e(r,n))}catch(t){N.throwLater(t)}"unhandledRejection"===t?et(t,r,n)||i||C(r,"Unhandled rejection "):et(t,n)}function E(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():L.toString(t);if(/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+A(e)+">, no stack trace)"}function A(t){return t.length<41?t:t.substr(0,38)+"..."}function S(){return"function"==typeof ot}function x(t){var e=t.match(it);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function T(t,e){if(S()){for(var r,n,i=t.stack.split("\n"),o=e.stack.split("\n"),a=-1,u=-1,s=0;s<i.length;++s){var c=x(i[s]);if(c){r=c.fileName,a=c.line;break}}for(var s=0;s<o.length;++s){var c=x(o[s]);if(c){n=c.fileName,u=c.line;break}}a<0||u<0||!r||!n||r!==n||a>=u||(nt=function(t){if(U.test(t))return!0;var e=x(t);return!!(e&&e.fileName===r&&a<=e.line&&e.line<=u)})}}function F(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);ot(this,F),e>32&&this.uncycle()}var M,R,I,D=r._getDomain,N=r._async,z=t("./errors").Warning,L=t("./util"),B=L.canAttachTrace,U=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,W=/\((?:timers\.js):\d+:\d+\)/,q=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,V=null,Q=null,H=!1,$=!(0==L.env("BLUEBIRD_DEBUG")),G=!(0==L.env("BLUEBIRD_WARNINGS")||!$&&!L.env("BLUEBIRD_WARNINGS")),Z=!(0==L.env("BLUEBIRD_LONG_STACK_TRACES")||!$&&!L.env("BLUEBIRD_LONG_STACK_TRACES")),Y=0!=L.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(G||!!L.env("BLUEBIRD_W_FORGOTTEN_RETURN"));r.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},r.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),N.invokeLater(this._notifyUnhandledRejection,this,void 0))},r.prototype._notifyUnhandledRejectionIsHandled=function(){P("rejectionHandled",M,void 0,this)},r.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},r.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},r.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),P("unhandledRejection",R,t,this)}},r.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},r.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},r.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},r.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},r.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},r.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},r.prototype._warn=function(t,e,r){return g(t,e,r||this)},r.onPossiblyUnhandledRejection=function(t){var e=D();R="function"==typeof t?null===e?t:L.domainBind(e,t):void 0},r.onUnhandledRejectionHandled=function(t){var e=D();M="function"==typeof t?null===e?t:L.domainBind(e,t):void 0};var K=function(){};r.longStackTraces=function(){if(N.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!at.longStackTraces&&S()){var t=r.prototype._captureStackTrace,e=r.prototype._attachExtraTrace;at.longStackTraces=!0,K=function(){if(N.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");r.prototype._captureStackTrace=t,r.prototype._attachExtraTrace=e,n.deactivateLongStackTraces(),N.enableTrampoline(),at.longStackTraces=!1},r.prototype._captureStackTrace=h,r.prototype._attachExtraTrace=v,n.activateLongStackTraces(),N.disableTrampolineIfNecessary()}},r.hasLongStackTraces=function(){return at.longStackTraces&&S()};var J=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return L.global.dispatchEvent(t),function(t,e){var r=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!L.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return L.global.dispatchEvent(t),function(t,e){var r=new Event(t.toLowerCase(),{cancelable:!0});return r.detail=e,!L.global.dispatchEvent(r)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),L.global.dispatchEvent(t),function(t,e){var r=document.createEvent("CustomEvent");return r.initCustomEvent(t.toLowerCase(),!1,!0,e),!L.global.dispatchEvent(r)}}catch(t){}return function(){return!1}}(),X=function(){return L.isNode?function(){return e.emit.apply(e,arguments)}:L.global?function(t){var e="on"+t.toLowerCase(),r=L.global[e];return!!r&&(r.apply(L.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),tt={promiseCreated:i,promiseFulfilled:i,promiseRejected:i,promiseResolved:i,promiseCancelled:i,promiseChained:function(t,e,r){return{promise:e,child:r}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,r){return{reason:e,promise:r}},rejectionHandled:i},et=function(t){var e=!1;try{e=X.apply(null,arguments)}catch(t){N.throwLater(t),e=!0}var r=!1;try{r=J(t,tt[t].apply(null,arguments))}catch(t){N.throwLater(t),r=!0}return r||e};r.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?r.longStackTraces():!t.longStackTraces&&r.hasLongStackTraces()&&K()),"warnings"in t){var e=t.warnings;at.warnings=!!e,Y=at.warnings,L.isObject(e)&&"wForgottenReturn"in e&&(Y=!!e.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!at.cancellation){if(N.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");r.prototype._clearCancellationData=l,r.prototype._propagateFrom=f,r.prototype._onCancel=s,r.prototype._setOnCancel=c,r.prototype._attachCancellationCallback=u,r.prototype._execute=a,rt=f,at.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!at.monitoring?(at.monitoring=!0,r.prototype._fireEvent=et):!t.monitoring&&at.monitoring&&(at.monitoring=!1,r.prototype._fireEvent=o)),r},r.prototype._fireEvent=o,r.prototype._execute=function(t,e,r){try{t(e,r)}catch(t){return t}},r.prototype._onCancel=function(){},r.prototype._setOnCancel=function(t){},r.prototype._attachCancellationCallback=function(t){},r.prototype._captureStackTrace=function(){},r.prototype._attachExtraTrace=function(){},r.prototype._clearCancellationData=function(){},r.prototype._propagateFrom=function(t,e){};var rt=d,nt=function(){return!1},it=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;L.inherits(F,Error),n.CapturedTrace=F,F.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],r={},n=0,i=this;void 0!==i;++n)e.push(i),i=i._parent;t=this._length=n;for(var n=t-1;n>=0;--n){var o=e[n].stack;void 0===r[o]&&(r[o]=n)}for(var n=0;n<t;++n){var a=e[n].stack,u=r[a];if(void 0!==u&&u!==n){u>0&&(e[u-1]._parent=void 0,e[u-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var s=n>0?e[n-1]:this;u<t-1?(s._parent=e[u+1],s._parent.uncycle(),s._length=s._parent._length+1):(s._parent=void 0,s._length=1);for(var c=s._length+1,l=n-2;l>=0;--l)e[l]._length=c,c++;return}}}},F.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=O(t),r=e.message,n=[e.stack],i=this;void 0!==i;)n.push(k(i.stack.split("\n"))),i=i._parent;w(n),b(n),L.notEnumerableProp(t,"stack",m(r,n)),L.notEnumerableProp(t,"__stackCleaned__",!0)}};var ot=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():E(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,V=t,Q=e;var r=Error.captureStackTrace;return nt=function(t){return U.test(t)},function(t,e){Error.stackTraceLimit+=6,r(t,e),Error.stackTraceLimit-=6}}var n=new Error;if("string"==typeof n.stack&&n.stack.split("\n")[0].indexOf("stackDetection@")>=0)return V=/@/,Q=e,H=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(t){i="stack"in t}return"stack"in n||!i||"number"!=typeof Error.stackTraceLimit?(Q=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?E(e):e.toString()},null):(V=t,Q=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(I=function(t){console.warn(t)},L.isNode&&e.stderr.isTTY?I=function(t,e){var r=e?"":"";console.warn(r+t+"\n")}:L.isNode||"string"!=typeof(new Error).stack||(I=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var at={warnings:G,longStackTraces:!1,cancellation:!1,monitoring:!1};return Z&&r.longStackTraces(),{longStackTraces:function(){return at.longStackTraces},warnings:function(){return at.warnings},cancellation:function(){return at.cancellation},monitoring:function(){return at.monitoring},propagateFromFunction:function(){return rt},boundValueFunction:function(){return p},checkForgottenReturns:y,setBounds:T,warn:g,deprecated:_,CapturedTrace:F,fireDomEvent:J,fireGlobalEvent:X}}},{"./errors":12,"./util":36}],10:[function(t,e,r){"use strict";e.exports=function(t){function e(){return this.value}function r(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(r){return r instanceof t&&r.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:r},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(r,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:t},void 0);var e=arguments[1],n=function(){throw e};return this.caught(t,n)},t.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof t&&r.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:r},void 0);var n=arguments[1];n instanceof t&&n.suppressUnhandledRejections();var i=function(){return n};return this.caught(r,i)}}},{}],11:[function(t,e,r){"use strict";e.exports=function(t,e){function r(){return o(this)}function n(t,r){return i(t,r,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(r,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,n){return i(t,n,e,0)._then(r,void 0,void 0,t,void 0)},t.mapSeries=n}},{}],12:[function(t,e,r){"use strict";function n(t,e){function r(n){if(!(this instanceof r))return new r(n);f(this,"message","string"==typeof n?n:e),f(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return l(r,Error),r}function i(t){if(!(this instanceof i))return new i(t);f(this,"name","OperationalError"),f(this,"message",t),this.cause=t,this.isOperational=!0,t instanceof Error?(f(this,"message",t.message),f(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}var o,a,u=t("./es5"),s=u.freeze,c=t("./util"),l=c.inherits,f=c.notEnumerableProp,d=n("Warning","warning"),p=n("CancellationError","cancellation error"),h=n("TimeoutError","timeout error"),v=n("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(t){o=n("TypeError","type error"),a=n("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),_=0;_<y.length;++_)"function"==typeof Array.prototype[y[_]]&&(v.prototype[y[_]]=Array.prototype[y[_]]);u.defineProperty(v.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),v.prototype.isOperational=!0;var g=0;v.prototype.toString=function(){var t=Array(4*g+1).join(" "),e="\n"+t+"AggregateError of:\n";g++,t=Array(4*g+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",i=n.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];n=i.join("\n"),e+=n+"\n"}return g--,e},l(i,Error);var m=Error.__BluebirdErrorTypes__;m||(m=s({CancellationError:p,TimeoutError:h,OperationalError:i,RejectionError:i,AggregateError:v}),u.defineProperty(Error,"__BluebirdErrorTypes__",{value:m,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:o,RangeError:a,CancellationError:m.CancellationError,OperationalError:m.OperationalError,TimeoutError:m.TimeoutError,AggregateError:m.AggregateError,Warning:d}},{"./es5":13,"./util":36}],13:[function(t,e,r){var n=function(){"use strict";return void 0===this}();if(n)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:n,propertyIsWritable:function(t,e){var r=Object.getOwnPropertyDescriptor(t,e);return!(r&&!r.writable&&!r.set)}};else{var i={}.hasOwnProperty,o={}.toString,a={}.constructor.prototype,u=function(t){var e=[];for(var r in t)i.call(t,r)&&e.push(r);return e},s=function(t,e){return{value:t[e]}},c=function(t,e,r){return t[e]=r.value,t},l=function(t){return t},f=function(t){try{return Object(t).constructor.prototype}catch(t){return a}},d=function(t){try{return"[object Array]"===o.call(t)}catch(t){return!1}};e.exports={isArray:d,keys:u,names:u,defineProperty:c,getDescriptor:s,freeze:l,getPrototypeOf:f,isES5:n,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,r){"use strict";e.exports=function(t,e){var r=t.map;t.prototype.filter=function(t,n){return r(this,t,n,e)},t.filter=function(t,n,i){return r(t,n,i,e)}}},{}],15:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t,e,r){this.promise=t,this.type=e,this.handler=r,this.called=!1,this.cancelPromise=null}function i(t){this.finallyHandler=t}function o(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function a(){return s.call(this,this.promise._target()._settledValue())}function u(t){if(!o(this,t))return f.e=t,f}function s(t){var n=this.promise,s=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?s.call(n._boundValue()):s.call(n._boundValue(),t);if(void 0!==c){n._setReturnedNonUndefined();var d=r(c,n);if(d instanceof e){if(null!=this.cancelPromise){if(d._isCancelled()){var p=new l("late cancellation observer");return n._attachExtraTrace(p),f.e=p,f}d.isPending()&&d._attachCancellationCallback(new i(this))}return d._then(a,u,void 0,this,void 0)}}}return n.isRejected()?(o(this),f.e=t,f):(o(this),t)}var c=t("./util"),l=e.CancellationError,f=c.errorObj;return n.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(t,e,r,i){return"function"!=typeof t?this.then():this._then(r,i,void 0,new n(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,s,s)},e.prototype.tap=function(t){return this._passThrough(t,1,s)},n}},{"./util":36}],16:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){function u(t,r,n){for(var o=0;o<r.length;++o){n._pushContext();var a=p(r[o])(t);if(n._popContext(),a===d){n._pushContext();var u=e.reject(d.e);return n._popContext(),u}var s=i(a,n);if(s instanceof e)return s}return null}function s(t,r,i,o){if(a.cancellation()){var u=new e(n),s=this._finallyPromise=new e(n);this._promise=u.lastly(function(){return s}),u._captureStackTrace(),u._setOnCancel(this)}else{(this._promise=new e(n))._captureStackTrace()}this._stack=o,this._generatorFunction=t,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(h):h,this._yieldedPromise=null,this._cancellationPhase=!1}var c=t("./errors"),l=c.TypeError,f=t("./util"),d=f.errorObj,p=f.tryCatch,h=[];f.inherits(s,o),s.prototype._isResolved=function(){return null===this._promise},s.prototype._cleanup=function(){this._promise=this._generator=null,a.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},s.prototype._promiseCancelled=function(){if(!this._isResolved()){var t,r=void 0!==this._generator.return;if(r)this._promise._pushContext(),t=p(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var n=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=n,this._promise._attachExtraTrace(n),this._promise._pushContext(),t=p(this._generator.throw).call(this._generator,n),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},s.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=p(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},s.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=p(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},s.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},s.prototype.promise=function(){return this._promise},s.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},s.prototype._continue=function(t){var r=this._promise;if(t===d)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(t.e,!1);var n=t.value;if(!0===t.done)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var o=i(n,this._promise);if(!(o instanceof e)&&null===(o=u(o,this._yieldHandlers,this._promise)))return void this._promiseRejected(new l("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",n)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));o=o._target();var a=o._bitField;0==(50397184&a)?(this._yieldedPromise=o,o._proxy(this,null)):0!=(33554432&a)?e._async.invoke(this._promiseFulfilled,this,o._value()):0!=(16777216&a)?e._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()},e.coroutine=function(t,e){if("function"!=typeof t)throw new l("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(e).yieldHandler,n=s,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new n(void 0,void 0,r,i),a=o.promise();return o._generator=e,o._promiseFulfilled(void 0),a}},e.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new l("expecting a function but got "+f.classString(t));h.push(t)},e.spawn=function(t){if(a.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof t)return r("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new s(t,this),i=n.promise();return n._run(e.spawn),i}}},{"./errors":12,"./util":36}],17:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){var u=t("./util");u.canEvaluate,u.tryCatch,u.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var n}var i=[].slice.call(arguments);t&&i.pop();var n=new r(i).promise();return void 0!==t?n.spread(t):n}}},{"./util":36}],18:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){function u(t,e,r,n){this.constructor$(t),this._promise._captureStackTrace();var i=c();this._callback=null===i?e:l.domainBind(i,e),this._preservedValues=n===o?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],p.invoke(this._asyncInit,this,void 0)}function s(t,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+l.classString(r));var a=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+l.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+l.classString(i.concurrency)));a=i.concurrency}return a="number"==typeof a&&isFinite(a)&&a>=1?a:0,new u(t,r,a,o).promise()}var c=e._getDomain,l=t("./util"),f=l.tryCatch,d=l.errorObj,p=e._async;l.inherits(u,r),u.prototype._asyncInit=function(){this._init$(void 0,-2)},u.prototype._init=function(){},u.prototype._promiseFulfilled=function(t,r){var n=this._values,o=this.length(),u=this._preservedValues,s=this._limit;if(r<0){if(r=-1*r-1,n[r]=t,s>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(s>=1&&this._inFlight>=s)return n[r]=t,this._queue.push(r),!1;null!==u&&(u[r]=t);var c=this._promise,l=this._callback,p=c._boundValue();c._pushContext();var h=f(l).call(p,t,r,o),v=c._popContext();if(a.checkForgottenReturns(h,v,null!==u?"Promise.filter":"Promise.map",c),h===d)return this._reject(h.e),!0;var y=i(h,this._promise);if(y instanceof e){y=y._target();var _=y._bitField;if(0==(50397184&_))return s>=1&&this._inFlight++,n[r]=y,y._proxy(this,-1*(r+1)),!1;if(0==(33554432&_))return 0!=(16777216&_)?(this._reject(y._reason()),!0):(this._cancel(),!0);h=y._value()}n[r]=h}return++this._totalResolved>=o&&(null!==u?this._filter(n,u):this._resolve(n),!0)},u.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,r=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var n=t.pop();this._promiseFulfilled(r[n],n)}},u.prototype._filter=function(t,e){for(var r=e.length,n=new Array(r),i=0,o=0;o<r;++o)t[o]&&(n[i++]=e[o]);n.length=i,this._resolve(n)},u.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return s(this,t,e,null)},e.map=function(t,e,r,n){return s(t,e,r,n)}}},{"./util":36}],19:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o){var a=t("./util"),u=a.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+a.classString(t));return function(){var n=new e(r);n._captureStackTrace(),n._pushContext();var i=u(t).apply(this,arguments),a=n._popContext();return o.checkForgottenReturns(i,a,"Promise.method",n),n._resolveFromSyncValue(i),n}},e.attempt=e.try=function(t){if("function"!=typeof t)return i("expecting a function but got "+a.classString(t));var n=new e(r);n._captureStackTrace(),n._pushContext();var s;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],l=arguments[2];s=a.isArray(c)?u(t).apply(l,c):u(t).call(l,c)}else s=u(t)();var f=n._popContext();return o.checkForgottenReturns(s,f,"Promise.try",n),n._resolveFromSyncValue(s),n},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,r){"use strict";function n(t){return t instanceof Error&&l.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(n(t)){e=new c(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var r=l.keys(t),i=0;i<r.length;++i){var o=r[i];f.test(o)||(e[o]=t[o])}return e}return a.markAsOriginatingFromRejection(t),t}function o(t,e){return function(r,n){if(null!==t){if(r){var o=i(u(r));t._attachExtraTrace(o),t._reject(o)}else if(e){var a=[].slice.call(arguments,1);t._fulfill(a)}else t._fulfill(n);t=null}}}var a=t("./util"),u=a.maybeWrapAsError,s=t("./errors"),c=s.OperationalError,l=t("./es5"),f=/^(?:name|message|stack|cause)$/;e.exports=o},{"./errors":12,"./es5":13,"./util":36}],21:[function(t,e,r){"use strict";e.exports=function(e){function r(t,e){var r=this;if(!o.isArray(t))return n.call(r,t,e);var i=u(e).apply(r._boundValue(),[null].concat(t));i===s&&a.throwLater(i.e)}function n(t,e){var r=this,n=r._boundValue(),i=void 0===t?u(e).call(n,null):u(e).call(n,null,t);i===s&&a.throwLater(i.e)}function i(t,e){var r=this;if(!t){var n=new Error(t+"");n.cause=t,t=n}var i=u(e).call(r._boundValue(),t);i===s&&a.throwLater(i.e)}var o=t("./util"),a=e._async,u=o.tryCatch,s=o.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var o=n;void 0!==e&&Object(e).spread&&(o=r),this._then(o,i,void 0,this,t)}return this}}},{"./util":36}],22:[function(t,r,n){"use strict";r.exports=function(){function n(){}function i(t,e){if("function"!=typeof e)throw new m("expecting a function but got "+h.classString(e));if(t.constructor!==o)throw new m("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}function o(t){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,t!==w&&(i(this,t),this._resolveFromExecutor(t)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function a(t){this.promise._resolveCallback(t)}function u(t){this.promise._rejectCallback(t,!1)}function s(t){var e=new o(w);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var c,l=function(){return new m("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},f=function(){return new o.PromiseInspection(this._target())},d=function(t){return o.reject(new m(t))},p={},h=t("./util");c=h.isNode?function(){var t=e.domain;return void 0===t&&(t=null),t}:function(){return null},h.notEnumerableProp(o,"_getDomain",c);var v=t("./es5"),y=t("./async"),_=new y;v.defineProperty(o,"_async",{value:_});var g=t("./errors"),m=o.TypeError=g.TypeError;o.RangeError=g.RangeError;var b=o.CancellationError=g.CancellationError;o.TimeoutError=g.TimeoutError,o.OperationalError=g.OperationalError,o.RejectionError=g.OperationalError,o.AggregateError=g.AggregateError;var w=function(){},k={},j={},O=t("./thenables")(o,w),C=t("./promise_array")(o,w,O,d,n),P=t("./context")(o),E=P.create,A=t("./debuggability")(o,P),S=(A.CapturedTrace,t("./finally")(o,O)),x=t("./catch_filter")(j),T=t("./nodeback"),F=h.errorObj,M=h.tryCatch;return o.prototype.toString=function(){return"[object Promise]"},o.prototype.caught=o.prototype.catch=function(t){var e=arguments.length;if(e>1){var r,n=new Array(e-1),i=0;for(r=0;r<e-1;++r){var o=arguments[r];if(!h.isObject(o))return d("expecting an object but got A catch statement predicate "+h.classString(o));n[i++]=o}return n.length=i,t=arguments[r],this.then(void 0,x(n,t,this))}return this.then(void 0,t)},o.prototype.reflect=function(){return this._then(f,f,void 0,this,void 0)},o.prototype.then=function(t,e){if(A.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var r=".then() only accepts functions but was passed: "+h.classString(t);arguments.length>1&&(r+=", "+h.classString(e)),this._warn(r)}return this._then(t,e,void 0,void 0,void 0)},o.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},o.prototype.spread=function(t){return"function"!=typeof t?d("expecting a function but got "+h.classString(t)):this.all()._then(t,void 0,void 0,k,void 0)},o.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},o.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new C(this).promise()},o.prototype.error=function(t){return this.caught(h.originatesFromRejection,t)},o.getNewLibraryCopy=r.exports,o.is=function(t){return t instanceof o},o.fromNode=o.fromCallback=function(t){var e=new o(w);e._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=M(t)(T(e,r));return n===F&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},o.all=function(t){return new C(t).promise()},o.cast=function(t){var e=O(t);return e instanceof o||(e=new o(w),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},o.resolve=o.fulfilled=o.cast,o.reject=o.rejected=function(t){var e=new o(w);return e._captureStackTrace(),e._rejectCallback(t,!0),e},o.setScheduler=function(t){if("function"!=typeof t)throw new m("expecting a function but got "+h.classString(t));return _.setScheduler(t)},o.prototype._then=function(t,e,r,n,i){var a=void 0!==i,u=a?i:new o(w),s=this._target(),l=s._bitField;a||(u._propagateFrom(this,3),u._captureStackTrace(),void 0===n&&0!=(2097152&this._bitField)&&(n=0!=(50397184&l)?this._boundValue():s===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,u));var f=c();if(0!=(50397184&l)){var d,p,v=s._settlePromiseCtx;0!=(33554432&l)?(p=s._rejectionHandler0,d=t):0!=(16777216&l)?(p=s._fulfillmentHandler0,d=e,s._unsetRejectionIsUnhandled()):(v=s._settlePromiseLateCancellationObserver,p=new b("late cancellation observer"),s._attachExtraTrace(p),d=e),_.invoke(v,s,{handler:null===f?d:"function"==typeof d&&h.domainBind(f,d),promise:u,receiver:n,value:p})}else s._addCallbacks(t,e,u,n,f);return u},o.prototype._length=function(){return 65535&this._bitField},o.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},o.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},o.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},o.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},o.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},o.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},o.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},o.prototype._isFinal=function(){return(4194304&this._bitField)>0},o.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},o.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},o.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},o.prototype._setAsyncGuaranteed=function(){_.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},o.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==p)return void 0===e&&this._isBound()?this._boundValue():e},o.prototype._promiseAt=function(t){return this[4*t-4+2]},o.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},o.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},o.prototype._boundValue=function(){},o.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),r=t._rejectionHandler0,n=t._promise0,i=t._receiverAt(0);void 0===i&&(i=p),this._addCallbacks(e,r,n,i,null)},o.prototype._migrateCallbackAt=function(t,e){var r=t._fulfillmentHandlerAt(e),n=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=p),this._addCallbacks(r,n,i,o,null)},o.prototype._addCallbacks=function(t,e,r,n,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=r,this._receiver0=n,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:h.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:h.domainBind(i,e));else{var a=4*o-4;this[a+2]=r,this[a+3]=n,"function"==typeof t&&(this[a+0]=null===i?t:h.domainBind(i,t)),"function"==typeof e&&(this[a+1]=null===i?e:h.domainBind(i,e))}return this._setLength(o+1),o},o.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},o.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var r=O(t,this);if(!(r instanceof o))return this._fulfill(t);e&&this._propagateFrom(r,2);var n=r._target();if(n===this)return void this._reject(l());var i=n._bitField;if(0==(50397184&i)){var a=this._length();a>0&&n._migrateCallback0(this);for(var u=1;u<a;++u)n._migrateCallbackAt(this,u);this._setFollowing(),this._setLength(0),this._setFollowee(n)}else if(0!=(33554432&i))this._fulfill(n._value());else if(0!=(16777216&i))this._reject(n._reason());else{var s=new b("late cancellation observer");n._attachExtraTrace(s),this._reject(s)}}},o.prototype._rejectCallback=function(t,e,r){var n=h.ensureErrorObject(t),i=n===t;if(!i&&!r&&A.warnings()){var o="a promise was rejected with a non-error: "+h.classString(t);this._warn(o,!0)}this._attachExtraTrace(n,!!e&&i),this._reject(t)},o.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var r=!0,n=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,r)});r=!1,this._popContext(),void 0!==n&&e._rejectCallback(n,!0)},o.prototype._settlePromiseFromHandler=function(t,e,r,n){var i=n._bitField;if(0==(65536&i)){n._pushContext();var o;e===k?r&&"number"==typeof r.length?o=M(t).apply(this._boundValue(),r):(o=F,o.e=new m("cannot .spread() a non-array: "+h.classString(r))):o=M(t).call(e,r);var a=n._popContext();i=n._bitField,0==(65536&i)&&(o===j?n._reject(r):o===F?n._rejectCallback(o.e,!1):(A.checkForgottenReturns(o,a,"",n,this),n._resolveCallback(o)))}},o.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},o.prototype._followee=function(){return this._rejectionHandler0},o.prototype._setFollowee=function(t){this._rejectionHandler0=t},o.prototype._settlePromise=function(t,e,r,i){var a=t instanceof o,u=this._bitField,s=0!=(134217728&u);0!=(65536&u)?(a&&t._invokeInternalOnCancel(),r instanceof S&&r.isFinallyHandler()?(r.cancelPromise=t,M(e).call(r,i)===F&&t._reject(F.e)):e===f?t._fulfill(f.call(r)):r instanceof n?r._promiseCancelled(t):a||t instanceof C?t._cancel():r.cancel()):"function"==typeof e?a?(s&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,i,t)):e.call(r,i,t):r instanceof n?r._isResolved()||(0!=(33554432&u)?r._promiseFulfilled(i,t):r._promiseRejected(i,t)):a&&(s&&t._setAsyncGuaranteed(),0!=(33554432&u)?t._fulfill(i):t._reject(i))},o.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,r=t.promise,n=t.receiver,i=t.value;"function"==typeof e?r instanceof o?this._settlePromiseFromHandler(e,n,i,r):e.call(n,i,r):r instanceof o&&r._reject(i)},o.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},o.prototype._settlePromise0=function(t,e,r){var n=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,t,i,e)},o.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},o.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var r=l();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():_.settlePromises(this))}},o.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return _.fatalError(t,h.isNode);(65535&e)>0?_.settlePromises(this):this._ensurePossibleRejectionHandled()}},o.prototype._fulfillPromises=function(t,e){for(var r=1;r<t;r++){var n=this._fulfillmentHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,e)}},o.prototype._rejectPromises=function(t,e){for(var r=1;r<t;r++){var n=this._rejectionHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,e)}},o.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!=(16842752&t)){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,t),this._rejectPromises(e,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,t),this._fulfillPromises(e,n)}this._setLength(0)}this._clearCancellationData()},o.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},o.defer=o.pending=function(){return A.deprecated("Promise.defer","new Promise"),{promise:new o(w),resolve:a,reject:u}},h.notEnumerableProp(o,"_makeSelfResolutionError",l),t("./method")(o,w,O,d,A),t("./bind")(o,w,O,A),t("./cancel")(o,C,d,A),t("./direct_resolve")(o),t("./synchronous_inspection")(o),t("./join")(o,C,O,w,_,c),o.Promise=o,o.version="3.4.7",t("./map.js")(o,C,d,O,w,A),t("./call_get.js")(o),t("./using.js")(o,d,O,E,w,A),t("./timers.js")(o,w,A),t("./generators.js")(o,d,w,O,n,A),t("./nodeify.js")(o),t("./promisify.js")(o,w),t("./props.js")(o,C,O,d),t("./race.js")(o,w,O,d),t("./reduce.js")(o,C,d,O,w,A),t("./settle.js")(o,C,A),t("./some.js")(o,C,d),t("./filter.js")(o,w),t("./each.js")(o,w),t("./any.js")(o),h.toFastProperties(o),h.toFastProperties(o.prototype),s({a:1}),s({b:2}),s({c:3}),s(1),s(function(){}),s(void 0),s(!1),s(new o(w)),A.setBounds(y.firstLineError,h.lastLineError),o}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o){function a(t){switch(t){case-2:return[];case-3:return{}}}function u(t){var n=this._promise=new e(r);t instanceof e&&n._propagateFrom(t,3),n._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var s=t("./util");s.isArray;return s.inherits(u,o),u.prototype.length=function(){return this._length},u.prototype.promise=function(){return this._promise},u.prototype._init=function t(r,o){var u=n(this._values,this._promise);if(u instanceof e){u=u._target();var c=u._bitField;if(this._values=u,0==(50397184&c))return this._promise._setAsyncGuaranteed(),u._then(t,this._reject,void 0,this,o);if(0==(33554432&c))return 0!=(16777216&c)?this._reject(u._reason()):this._cancel();u=u._value()}if(null===(u=s.asArray(u))){var l=i("expecting an array or an iterable object but got "+s.classString(u)).reason();return void this._promise._rejectCallback(l,!1)}if(0===u.length)return void(-5===o?this._resolveEmptyArray():this._resolve(a(o)));this._iterate(u)},u.prototype._iterate=function(t){var r=this.getActualLength(t.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var i=this._promise,o=!1,a=null,u=0;u<r;++u){var s=n(t[u],i);s instanceof e?(s=s._target(),a=s._bitField):a=null,o?null!==a&&s.suppressUnhandledRejections():null!==a?0==(50397184&a)?(s._proxy(this,u),this._values[u]=s):o=0!=(33554432&a)?this._promiseFulfilled(s._value(),u):0!=(16777216&a)?this._promiseRejected(s._reason(),u):this._promiseCancelled(u):o=this._promiseFulfilled(s,u)}o||i._setAsyncGuaranteed()},u.prototype._isResolved=function(){return null===this._values},u.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},u.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},u.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},u.prototype._promiseFulfilled=function(t,e){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},u.prototype._promiseCancelled=function(){return this._cancel(),!0},u.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},u.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var r=0;r<t.length;++r)t[r]instanceof e&&t[r].cancel()}},u.prototype.shouldCopyValues=function(){return!0},u.prototype.getActualLength=function(t){return t},u}},{"./util":36}],24:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t){return!w.test(t)}function i(t){try{return!0===t.__isPromisified__}catch(t){return!1}}function o(t,e,r){var n=p.getDataPropertyOrDefault(t,e+r,m);return!!n&&i(n)}function a(t,e,r){for(var n=0;n<t.length;n+=2){var i=t[n];if(r.test(i))for(var o=i.replace(r,""),a=0;a<t.length;a+=2)if(t[a]===o)throw new g("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}function u(t,e,r,n){for(var u=p.inheritedDataKeys(t),s=[],c=0;c<u.length;++c){var l=u[c],f=t[l],d=n===k||k(l,f,t);"function"!=typeof f||i(f)||o(t,l,e)||!n(l,f,t,d)||s.push(l,f)}return a(s,e,r),s}function s(t,n,i,o,a,u){function s(){var i=n;n===d&&(i=this);var o=new e(r);o._captureStackTrace();var a="string"==typeof l&&this!==c?this[l]:t,s=h(o,u);try{a.apply(i,v(arguments,s))}catch(t){o._rejectCallback(y(t),!0,!0)}return o._isFateSealed()||o._setAsyncGuaranteed(),o}var c=function(){return this}(),l=t;return"string"==typeof l&&(t=o),p.notEnumerableProp(s,"__isPromisified__",!0),s}function c(t,e,r,n,i){for(var o=new RegExp(j(e)+"$"),a=u(t,e,o,r),s=0,c=a.length;s<c;s+=2){var l=a[s],f=a[s+1],h=l+e;if(n===O)t[h]=O(l,d,l,f,e,i);else{var v=n(f,function(){return O(l,d,l,f,e,i)});p.notEnumerableProp(v,"__isPromisified__",!0),t[h]=v}}return p.toFastProperties(t),t}function l(t,e,r){return O(t,e,void 0,t,null,r)}var f,d={},p=t("./util"),h=t("./nodeback"),v=p.withAppended,y=p.maybeWrapAsError,_=p.canEvaluate,g=t("./errors").TypeError,m={__isPromisified__:!0},b=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],w=new RegExp("^(?:"+b.join("|")+")$"),k=function(t){return p.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},j=function(t){return t.replace(/([$])/,"\\$")},O=_?f:s;e.promisify=function(t,e){if("function"!=typeof t)throw new g("expecting a function but got "+p.classString(t));if(i(t))return t;e=Object(e);var r=void 0===e.context?d:e.context,o=!!e.multiArgs,a=l(t,r,o);return p.copyDescriptors(t,a,n),a},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new g("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var r=!!e.multiArgs,n=e.suffix;"string"!=typeof n&&(n="Async");var i=e.filter;"function"!=typeof i&&(i=k);var o=e.promisifier;if("function"!=typeof o&&(o=O),!p.isIdentifier(n))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=p.inheritedDataKeys(t),u=0;u<a.length;++u){var s=t[a[u]];"constructor"!==a[u]&&p.isClass(s)&&(c(s.prototype,n,i,o,r),c(s,n,i,o,r))}return c(t,n,i,o,r)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(t,e,r){"use strict";e.exports=function(e,r,n,i){function o(t){var e,r=!1;if(void 0!==u&&t instanceof u)e=f(t),r=!0;else{var n=l.keys(t),i=n.length;e=new Array(2*i);for(var o=0;o<i;++o){var a=n[o];e[o]=t[a],e[o+i]=a}}this.constructor$(e),this._isMap=r,this._init$(void 0,-3)}function a(t){var r,a=n(t);return c(a)?(r=a instanceof e?a._then(e.props,void 0,void 0,void 0,void 0):new o(a).promise(),a instanceof e&&r._propagateFrom(a,2),r):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var u,s=t("./util"),c=s.isObject,l=t("./es5");"function"==typeof Map&&(u=Map);var f=function(){function t(t,n){this[e]=t,this[e+r]=n,e++}var e=0,r=0;return function(n){r=n.size,e=0;var i=new Array(2*n.size);return n.forEach(t,i),i}}(),d=function(t){for(var e=new u,r=t.length/2|0,n=0;n<r;++n){var i=t[r+n],o=t[n];e.set(i,o)}return e};s.inherits(o,r),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){if(this._values[e]=t,++this._totalResolved>=this._length){var r;if(this._isMap)r=d(this._values);else{r={};for(var n=this.length(),i=0,o=this.length();i<o;++i)r[this._values[i+n]]=this._values[i]}return this._resolve(r),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return a(this)},e.props=function(t){return a(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,r){"use strict";function n(t,e,r,n,i){for(var o=0;o<i;++o)r[o+n]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacity<t},i.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1),this[this._front+e&this._capacity-1]=t,this._length=e+1},i.prototype.push=function(t,e,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(t),this._pushOne(e),void this._pushOne(r);var i=this._front+n-3;this._checkCapacity(n);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=r,this._length=n},i.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t,n(this,0,this,e,this._front+this._length&e-1)},e.exports=i},{}],27:[function(t,e,r){"use strict";e.exports=function(e,r,n,i){function o(t,o){var s=n(t);if(s instanceof e)return u(s);if(null===(t=a.asArray(t)))return i("expecting an array or an iterable object but got "+a.classString(t));var c=new e(r);void 0!==o&&c._propagateFrom(o,3);for(var l=c._fulfill,f=c._reject,d=0,p=t.length;d<p;++d){var h=t[d];(void 0!==h||d in t)&&e.cast(h)._then(l,f,void 0,c,null)}return c}var a=t("./util"),u=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){function u(t,r,n,i){this.constructor$(t);var a=d();this._fn=null===a?r:p.domainBind(a,r),void 0!==n&&(n=e.resolve(n),n._attachCancellationCallback(this)),this._initialValue=n,this._currentCancellable=null,this._eachValues=i===o?Array(this._length):0===i?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function s(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function c(t,e,r,i){return"function"!=typeof e?n("expecting a function but got "+p.classString(e)):new u(t,e,r,i).promise()}function l(t){this.accum=t,this.array._gotAccum(t);var r=i(this.value,this.array._promise);return r instanceof e?(this.array._currentCancellable=r,r._then(f,void 0,void 0,this,void 0)):f.call(this,r)}function f(t){var r=this.array,n=r._promise,i=h(r._fn);n._pushContext();var o;(o=void 0!==r._eachValues?i.call(n._boundValue(),t,this.index,this.length):i.call(n._boundValue(),this.accum,t,this.index,this.length))instanceof e&&(r._currentCancellable=o);var u=n._popContext();return a.checkForgottenReturns(o,u,void 0!==r._eachValues?"Promise.each":"Promise.reduce",n),o}var d=e._getDomain,p=t("./util"),h=p.tryCatch;p.inherits(u,r),u.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},u.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},u.prototype._init=function(){},u.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},u.prototype.shouldCopyValues=function(){return!1},u.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},u.prototype._resultCancelled=function(t){if(t===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel())},u.prototype._iterate=function(t){this._values=t;var r,n,i=t.length;if(void 0!==this._initialValue?(r=this._initialValue,n=0):(r=e.resolve(t[0]),n=1),this._currentCancellable=r,!r.isRejected())for(;n<i;++n){var o={accum:null,value:t[n],index:n,length:i,array:this};r=r._then(l,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(s,s,void 0,r,this)},e.prototype.reduce=function(t,e){return c(this,t,e,null)},e.reduce=function(t,e,r,n){return c(t,e,r,n)}}},{"./util":36}],29:[function(t,i,o){"use strict";var a,u=t("./util"),s=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},c=u.getNativePromise();if(u.isNode&&"undefined"==typeof MutationObserver){var l=r.setImmediate,f=e.nextTick;a=u.isRecentNode?function(t){l.call(r,t)}:function(t){f.call(e,t)}}else if("function"==typeof c&&"function"==typeof c.resolve){var d=c.resolve();a=function(t){d.then(t)}}else a="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?void 0!==n?function(t){n(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:s:function(){var t=document.createElement("div"),e={attributes:!0},r=!1,n=document.createElement("div");new MutationObserver(function(){t.classList.toggle("foo"),r=!1}).observe(n,e);var i=function(){r||(r=!0,n.classList.toggle("foo"))};return function(r){var n=new MutationObserver(function(){n.disconnect(),r()});n.observe(t,e),i()}}();i.exports=a},{"./util":36}],30:[function(t,e,r){"use strict";e.exports=function(e,r,n){function i(t){this.constructor$(t)}var o=e.PromiseInspection;t("./util").inherits(i,r),i.prototype._promiseResolved=function(t,e){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(t,e){var r=new o;return r._bitField=33554432,r._settledValueField=t,this._promiseResolved(e,r)},i.prototype._promiseRejected=function(t,e){var r=new o;return r._bitField=16777216,r._settledValueField=t,this._promiseResolved(e,r)},e.settle=function(t){return n.deprecated(".settle()",".reflect()"),new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,r){"use strict";e.exports=function(e,r,n){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||e<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new i(t),o=r.promise();return r.setHowMany(e),r.init(),o}var a=t("./util"),u=t("./errors").RangeError,s=t("./errors").AggregateError,c=a.isArray,l={};a.inherits(i,r),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=c(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new s,e=this.length();e<this._values.length;++e)this._values[e]!==l&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new u(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,r){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var r=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},a=e.prototype.isPending=function(){return 0==(50397184&this._bitField)},u=e.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},t.prototype.isPending=function(){return a.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return u.call(this._target())},t.prototype.value=function(){return r.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),n.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t,n){if(l(t)){if(t instanceof e)return t;var i=o(t);if(i===c){n&&n._pushContext();var s=e.reject(i.e);return n&&n._popContext(),s}if("function"==typeof i){if(a(t)){var s=new e(r);return t._then(s._fulfill,s._reject,void 0,s,null),s}return u(t,i,n)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(t){return c.e=t,c}}function a(t){try{return f.call(t,"_promise0")}catch(t){return!1}}function u(t,n,i){function o(t){u&&(u._resolveCallback(t),u=null)}function a(t){u&&(u._rejectCallback(t,f,!0),u=null)}var u=new e(r),l=u;i&&i._pushContext(),u._captureStackTrace(),i&&i._popContext();var f=!0,d=s.tryCatch(n).call(t,o,a);return f=!1,u&&d===c&&(u._rejectCallback(d.e,!0,!0),u=null),l}var s=t("./util"),c=s.errorObj,l=s.isObject,f={}.hasOwnProperty;return n}},{"./util":36}],34:[function(t,e,r){"use strict";e.exports=function(e,r,n){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function a(t){throw clearTimeout(this.handle),t}var u=t("./util"),s=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var c=function(t){return l(+this).thenReturn(t)},l=e.delay=function(t,o){var a,u;return void 0!==o?(a=e.resolve(o)._then(c,null,null,t,void 0),n.cancellation()&&o instanceof e&&a._setOnCancel(o)):(a=new e(r),u=setTimeout(function(){a._fulfill()},+t),n.cancellation()&&a._setOnCancel(new i(u)),a._captureStackTrace()),a._setAsyncGuaranteed(),a};e.prototype.delay=function(t){return l(t,this)};var f=function(t,e,r){var n;n="string"!=typeof e?e instanceof Error?e:new s("operation timed out"):new s(e),u.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._reject(n),null!=r&&r.cancel()};e.prototype.timeout=function(t,e){t=+t;var r,u,s=new i(setTimeout(function(){r.isPending()&&f(r,e,u)},t));return n.cancellation()?(u=this.then(),r=u._then(o,a,void 0,s,void 0),r._setOnCancel(s)):r=this._then(o,a,void 0,s,void 0),r}}},{"./util":36}],35:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){function u(t){setTimeout(function(){throw t},0)}function s(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function c(t,r){function i(){if(a>=c)return l._fulfill();var o=s(t[a++]);if(o instanceof e&&o._isDisposable()){try{o=n(o._getDisposer().tryDispose(r),t.promise)}catch(t){return u(t)}if(o instanceof e)return o._then(i,u,null,null,null)}i()}var a=0,c=t.length,l=new e(o);return i(),l}function l(t,e,r){this._data=t,this._promise=e,this._context=r}function f(t,e,r){this.constructor$(t,e,r)}function d(t){return l.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function p(t){this.length=t,this.promise=null,this[t-1]=null}var h=t("./util"),v=t("./errors").TypeError,y=t("./util").inherits,_=h.errorObj,g=h.tryCatch,m={};l.prototype.data=function(){return this._data},l.prototype.promise=function(){return this._promise},l.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():m},l.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=e!==m?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},l.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},y(f,l),f.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},p.prototype._resultCancelled=function(){for(var t=this.length,r=0;r<t;++r){var n=this[r];n instanceof e&&n.cancel()}},e.using=function(){var t=arguments.length;if(t<2)return r("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return r("expecting a function but got "+h.classString(i));var o,u=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,u=!1):(o=arguments,t--);for(var s=new p(t),f=0;f<t;++f){var v=o[f];if(l.isDisposer(v)){var y=v;v=v.promise(),v._setDisposable(y)}else{var m=n(v);m instanceof e&&(v=m._then(d,null,null,{resources:s,index:f},void 0))}s[f]=v}for(var b=new Array(s.length),f=0;f<b.length;++f)b[f]=e.resolve(s[f]).reflect();var w=e.all(b).then(function(t){for(var e=0;e<t.length;++e){var r=t[e];if(r.isRejected())return _.e=r.error(),_;if(!r.isFulfilled())return void w.cancel();t[e]=r.value()}k._pushContext(),i=g(i);var n=u?i.apply(void 0,t):i(t),o=k._popContext();return a.checkForgottenReturns(n,o,"Promise.using",k),n}),k=w.lastly(function(){var t=new e.PromiseInspection(w);return c(s,t)});return s.promise=k,k._setOnCancel(s),k},e.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(131072&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new f(t,this,i());throw new v}}},{"./errors":12,"./util":36}],36:[function(t,n,i){"use strict";function o(){try{var t=T;return T=null,t.apply(this,arguments)}catch(t){return x.e=t,x}}function a(t){return T=t,o}function u(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function s(t){return"function"==typeof t||"object"==typeof t&&null!==t}function c(t){return u(t)?new Error(g(t)):t}function l(t,e){var r,n=t.length,i=new Array(n+1);for(r=0;r<n;++r)i[r]=t[r];return i[r]=e,i}function f(t,e,r){if(!A.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var n=Object.getOwnPropertyDescriptor(t,e);return null!=n?null==n.get&&null==n.set?n.value:r:void 0}function d(t,e,r){if(u(t))return t;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return A.defineProperty(t,e,n),t}function p(t){throw t}function h(t){try{if("function"==typeof t){var e=A.names(t.prototype),r=A.isES5&&e.length>1,n=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=I.test(t+"")&&A.names(t).length>0;if(r||n||i)return!0}return!1}catch(t){return!1}}function v(t){function e(){}e.prototype=t;for(var r=8;r--;)new e;return t}function y(t){return D.test(t)}function _(t,e,r){for(var n=new Array(t),i=0;i<t;++i)n[i]=e+i+r;return n}function g(t){try{return t+""}catch(t){return"[no string representation]"}}function m(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function b(t){try{d(t,"isOperational",!0)}catch(t){}}function w(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===t.isOperational)}function k(t){return m(t)&&A.propertyIsWritable(t,"stack")}function j(t){return{}.toString.call(t)}function O(t,e,r){for(var n=A.names(t),i=0;i<n.length;++i){var o=n[i];if(r(o))try{A.defineProperty(e,o,A.getDescriptor(t,o))}catch(t){}}}function C(t){return U?Object({NODE_ENV:"production"})[t]:void 0}function P(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(t){}}function E(t,e){return t.bind(e)}var A=t("./es5"),S="undefined"==typeof navigator,x={e:{}},T,F="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r?r:void 0!==this?this:null,M=function(t,e){function r(){this.constructor=t,this.constructor$=e;for(var r in e.prototype)n.call(e.prototype,r)&&"$"!==r.charAt(r.length-1)&&(this[r+"$"]=e.prototype[r])}var n={}.hasOwnProperty;return r.prototype=e.prototype,t.prototype=new r,t.prototype},R=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var r=0;r<t.length;++r)if(t[r]===e)return!0;return!1};if(A.isES5){var r=Object.getOwnPropertyNames;return function(t){for(var n=[],i=Object.create(null);null!=t&&!e(t);){var o;try{o=r(t)}catch(t){return n}for(var a=0;a<o.length;++a){var u=o[a];if(!i[u]){i[u]=!0;var s=Object.getOwnPropertyDescriptor(t,u);null!=s&&null==s.get&&null==s.set&&n.push(u)}}t=A.getPrototypeOf(t)}return n}}var n={}.hasOwnProperty;return function(r){if(e(r))return[];var i=[];t:for(var o in r)if(n.call(r,o))i.push(o);else{for(var a=0;a<t.length;++a)if(n.call(t[a],o))continue t;i.push(o)}return i}}(),I=/this\s*\.\s*\S+\s*=/,D=/^[a-z$_][a-z$_0-9]*$/i,N=function(){return"stack"in new Error?function(t){return k(t)?t:new Error(g(t))}:function(t){if(k(t))return t;try{throw new Error(g(t))}catch(t){return t}}}(),z=function(t){return A.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var L="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,r=[],n=t[Symbol.iterator]();!(e=n.next()).done;)r.push(e.value);return r};z=function(t){return A.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?L(t):null}}var B=void 0!==e&&"[object process]"===j(e).toLowerCase(),U=void 0!==e&&!0,W={isClass:h,isIdentifier:y,inheritedDataKeys:R,getDataPropertyOrDefault:f,thrower:p,isArray:A.isArray,asArray:z,notEnumerableProp:d,isPrimitive:u,isObject:s,isError:m,canEvaluate:S,errorObj:x,tryCatch:a,inherits:M,withAppended:l,maybeWrapAsError:c,toFastProperties:v,filledRange:_,toString:g,canAttachTrace:k,ensureErrorObject:N,originatesFromRejection:w,markAsOriginatingFromRejection:b,classString:j,copyDescriptors:O,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:B,hasEnvVariables:U,env:C,global:F,getNativePromise:P,domainBind:E};W.isRecentNode=W.isNode&&function(){var t=e.versions.node.split(".").map(Number);return 0===t[0]&&t[1]>10||t[0]>0}(),W.isNode&&W.toFastProperties(e);try{throw new Error}catch(t){W.lastLineError=t}n.exports=W},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(e,r(54),r(44),r(184).setImmediate)},function(t,e,r){function n(t,e){this._id=t,this._clearFn=e}var i=Function.prototype.apply;e.setTimeout=function(){return new n(i.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new n(i.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},n.prototype.unref=n.prototype.ref=function(){},n.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r(185),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,r){(function(t,e){!function(t,r){"use strict";function n(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var n={callback:t,args:e};return c[s]=n,u(s),s++}function i(t){delete c[t]}function o(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(r,n)}}function a(t){if(l)setTimeout(a,0,t);else{var e=c[t];if(e){l=!0;try{o(e)}finally{i(t),l=!1}}}}if(!t.setImmediate){var u,s=1,c={},l=!1,f=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?function(){u=function(t){e.nextTick(function(){a(t)})}}():function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?function(){var e="setImmediate$"+Math.random()+"$",r=function(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(e)&&a(+r.data.slice(e.length))};t.addEventListener?t.addEventListener("message",r,!1):t.attachEvent("onmessage",r),u=function(r){t.postMessage(e+r,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){a(t.data)},u=function(e){t.port2.postMessage(e)}}():f&&"onreadystatechange"in f.createElement("script")?function(){var t=f.documentElement;u=function(e){var r=f.createElement("script");r.onreadystatechange=function(){a(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}}():function(){u=function(t){setTimeout(a,0,t)}}(),d.setImmediate=n,d.clearImmediate=i}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,r(44),r(54))},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();!function(){scrivito.PublicPromise=function(){function t(e){n(this,t),this._internalPromise=e}return i(t,null,[{key:"all",value:function(t){return new scrivito.PublicPromise(scrivito.Promise.all(t))}},{key:"race",value:function(t){return new scrivito.PublicPromise(scrivito.Promise.race(t))}},{key:"resolve",value:function(t){return new scrivito.PublicPromise(scrivito.Promise.resolve(t))}},{key:"reject",value:function(t){return new scrivito.PublicPromise(scrivito.Promise.reject(t))}}]),i(t,[{key:"then",value:function(t,e){return new scrivito.PublicPromise(this._internalPromise.then(t,e))}},{key:"catch",value:function(t){return new scrivito.PublicPromise(this._internalPromise.catch(t))}}]),t}()}()},function(t,e,r){"use strict";var n=r(0),i=function(t){return t&&t.__esModule?t:{default:t}}(n);!function(){function t(t,e,n){return r?t:i.default.throttle(t,e,n)}function e(){r=!0}var r=!1;scrivito.throttle=t,scrivito.bypassThrottle=e}()},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=r(32),a=n(o),u=r(0),s=n(u),c=r(1);!function(){scrivito.typeInfo={normalize:function(t){if(s.default.isString(t))return[t];if(s.default.isArray(t))return t;throw new c.InternalError("Type Info needs to be a string or an array containing a string and optionally a hash")},normalizeAttrs:function(t){var e=this;return s.default.mapObject(t,function(t,r){var n=i(t,2),o=n[0],u=n[1];return a.default.isSystemAttribute(r)?[o]:[o,e.normalize(u)]})},unwrapAttributes:function(t){return s.default.mapObject(t,function(t){return i(t,1)[0]})}}}()},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(3),o=n(i),a=r(14),u=n(a),s=r(24),c=n(s),l=r(0),f=n(l);!function(){function t(r,n){return f.default.isArray(n)?f.default.map(n,function(e){return t(r,e)}):n instanceof o.default?e(n,r.objClassFor(n.objClass())):n instanceof u.default?e(n,r.widgetClassFor(n.objClass())):n instanceof c.default?r.defaultClassForLinks.build(n.buildAttributes()):n}function e(t,e){var r=Object.create(e.prototype);return r._scrivitoPrivateContent=t,r}function r(t){return f.default.isArray(t)?f.default.map(t,n):n(t)}function n(t){return t&&t._scrivitoPrivateContent?t._scrivitoPrivateContent:t}scrivito.wrapInAppClass=t,scrivito.unwrapAppClassValues=r,scrivito.buildAppClassInstance=e}()},function(t,e,r){"use strict";function n(t,e){var r=l[t];if(r)return r[e]}function i(t,e){v(t,e);var r=o.getWindowRegistry().objClassNameFor(t);if(!r)throw new a.ArgumentError("Expected an Obj or Widget class.");l[r]=e}Object.defineProperty(e,"__esModule",{value:!0});var o=r(57),a=r(1),u=r(101),s=r(285),c=r(286),l={};e.getUiConfigPropertyFor=n;var f=u.struct({value:u.String,title:u.String}),d=u.dict(u.String,u.struct({title:u.maybe(u.String),description:u.maybe(u.String),values:u.maybe(u.list(f))})),p=u.list(u.struct({title:u.String,component:u.maybe(u.String),properties:u.maybe(u.list(u.String))})),h=u.struct({attributesConfig:u.maybe(d),propertiesGroups:u.maybe(p),title:u.maybe(u.String),description:u.maybe(u.String),thumbnail:u.maybe(u.String),titleForContent:u.maybe(u.Function),descriptionForContent:u.maybe(u.Function),thumbnailForContent:u.maybe(u.Function),generalProperties:u.maybe(u.list(u.String))}),v=c.checkArgumentsFor("provideEditingConfig",[["appClass",s.AppClass],["editingConfig",h]],{docPermalink:"js-sdk/provideEditingConfig"});e.provideEditingConfig=i},function(t,e,r){function n(t,e){return"function"==typeof e?i(e):e}var i=r(62);t.exports=function(t){try{return JSON.stringify(t,n,2)}catch(e){return String(t)}}},function(t,e,r){var n=r(22),i=r(76);t.exports=n("Boolean",i)},function(t,e,r){var n=r(22),i=r(33);t.exports=n("Nil",i)},function(t,e,r){var n=r(22),i=r(195);t.exports=n("Number",i)},function(t,e){t.exports=function(t){return"number"==typeof t&&isFinite(t)&&!isNaN(t)}},function(t,e,r){var n=r(19);t.exports=function(t){return n(t)&&"union"===t.meta.kind}},function(t,e,r){function n(t){return"Array<"+a(t)+">"}function i(t,e){function r(e,r){if(f)return e;for(var n=!0,i=[],o=0,a=e.length;o<a;o++){var u=e[o],c=s(t,u,null);n=n&&u===c,i.push(c)}return n&&(i=e),i}var i=e||n(t),f=(a(t),u(t));return r.meta={kind:"list",type:t,name:e,identity:f},r.displayName=i,r.is=function(e){return l(e)&&e.every(function(e){return c(e,t)})},r.update=function(t,e){return r(o.update(t,e))},r}var o=r(7),a=(r(27),r(18),r(16)),u=r(40),s=r(41),c=r(42),l=r(39);i.getDefaultName=n,t.exports=i},function(t,e,r){function n(t){return"{"+Object.keys(t).map(function(e){return e+": "+i(t[e])}).join(", ")+"}"}var i=r(16);t.exports=n},function(t,e,r){function n(t,e,r){var n=t.reduce(function(t,e){return l(t,e)},e);return r&&(n.displayName=r,n.meta.name=r),n}function i(t){return c(t)?t:t.meta.props}function o(t){return c(t)?null:t.meta.defaultProps}function a(t,e){Array.prototype.push.apply(t,e)}function u(t,e,r){var u={},c={},l=[],d={};e.forEach(function(t,e){var r=f(t),n=r.unrefinedType;a(l,r.predicates),s(u,i(n)),s(c,n.prototype),s(d,o(n),!0)}),r=t.getOptions(r),r.defaultProps=s(d,r.defaultProps,!0);var p=n(l,t(u,{strict:r.strict,defaultProps:r.defaultProps}),r.name);return s(p.prototype,c),p}var s=(r(7),r(18),r(39),r(106)),c=(r(276),r(277),r(38)),l=r(103),f=r(278);t.exports=u},function(t,e,r){function n(t){return"["+t.map(a).join(", ")+"]"}function i(t,e){function r(e,r){if(a)return e;for(var n=!0,i=[],o=0,u=t.length;o<u;o++){var s=t[o],l=e[o],f=c(s,l,null);n=n&&l===f,i.push(f)}return n&&(i=e),i}var i=e||n(t),a=t.every(u);return r.meta={kind:"tuple",types:t,name:e,identity:a},r.displayName=i,r.is=function(e){return s(e)&&e.length===t.length&&t.every(function(t,r){return l(e[r],t)})},r.update=function(t,e){return r(o.update(t,e))},r}var o=r(7),a=(r(27),r(18),r(16)),u=r(40),s=r(39),c=r(41),l=r(42);i.getDefaultName=n,t.exports=i},function(t,e){function r(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}t.exports=r},function(t,e,r){"use strict";function n(t,e){if(!p){var r=(0,s.getById)(t);if(!r)throw new u.ArgumentError('Component with ID "'+t+'" not found. Please make sure you registered it using "Scrivito.registerComponent".');var n=void 0,i=void 0;e.widgetId?i=(0,c.getWindowContext)().Obj.get(e.objId).widget(e.widgetId):n=(0,c.getWindowContext)().Obj.get(e.objId),p=!0;var o=a((0,l.getDocument)(),r,{obj:n,widget:i});(0,d.default)(o,function(){return scrivito.uiAdapter.notifyDocumentResize()}),scrivito.uiAdapter.notifyDocumentResize()}}function i(){return p}function o(){p=!1}function a(t,e,r){var n=t.createElement("div");return t.body.innerHTML="",t.body.appendChild(n),ReactDOM.render(React.createElement(e,r),n),n}Object.defineProperty(e,"__esModule",{value:!0}),e.reset=e.isComponentMounted=e.mountComponent=void 0;var u=r(1),s=r(64),c=r(37),l=r(46),f=r(288),d=function(t){return t&&t.__esModule?t:{default:t}}(f),p=!1;e.mountComponent=n,e.isComponentMounted=i,e.reset=o},function(t,e,r){"use strict";function n(t){var e=t.endpoint,r=t.forceVerification,n=t.homepage,a=t.routingBasePath,u=t.routingMethod,s=t.tenant;if(!s)throw new f.ArgumentError('Required configuration "tenant" missing.');scrivito.CmsRestApi.init(e||"api.scrivito.com",s),r&&scrivito.CmsRestApi.enableForceVerification(),scrivito.RoutingPath.init(i(n)),scrivito.Routing.init(o(u,a)),d=!0}function i(t){if(!t)return function(){return c.default.root()};if(!(0,l.isFunction)(t))throw new f.ArgumentError('The "homepage" configuration option is invalid. Please provide a function returning a "scrivito.Obj", e.g. "() => scrivito.Obj.findByPath(\'/en\')"');return t}function o(t,e){if(t&&!(0,l.contains)(["path","hash"],t))throw new f.ArgumentError('Expected the configuration option "routingMethod" to be set to "hash" or "path", but saw "'+t+'" instead.');if(e&&!(0,l.isString)(e))throw new f.ArgumentError('Configuration "routingBasePath" needs to be a String.');return{routingMethod:t,routingBasePath:e}}function a(){return d}function u(){d=!1}Object.defineProperty(e,"__esModule",{value:!0}),e.resetIsConfigured=e.isConfigured=e.configure=void 0;var s=r(3),c=function(t){return t&&t.__esModule?t:{default:t}}(s),l=r(0),f=r(1),d=!1;e.configure=n,e.isConfigured=a,e.resetIsConfigured=u},function(t,e,r){"use strict";function n(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}function i(){return++f}function o(t){var e=i();d[e]=t;var r=u(),o=r.get()||[];r.set([].concat(n(o),[e]))}function a(t){var e=u().get();if(e){var r=(0,c.find)(e,function(e){return d[e]&&d[e].canEdit(t)});if(r){return{id:r,editorClass:d[r]}}}}function u(){return l.appState.subState("editors")}function s(){f=0,d={},u().clear()}Object.defineProperty(e,"__esModule",{value:!0}),e.registerEditor=e.editorRegistrationFor=e.clearEditorRegistry=void 0;var c=r(0),l=r(4),f=0,d={};e.clearEditorRegistry=s,e.editorRegistrationFor=a,e.registerEditor=o},function(t,e,r){"use strict";function n(t){return"function"==typeof t&&t.prototype&&t.prototype.isReactComponent}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n},function(t,e,r){"use strict";function n(t,e){var r=e.from;t.displayName=r.displayName||r.name}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=r(24),c=n(s),l=r(17),f=n(l),d=r(0),p=r(74),h=n(p),v=r(6),y=n(v),_=r(208),g=n(_),m=function(t){function e(t){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r._onClick=r._onClick.bind(r),r}return a(e,t),u(e,[{key:"render",value:function(){return f.default.createElement("a",this._linkProps(),this.props.children)}},{key:"_linkProps",value:function(){var t=(0,d.omit)(this.props,"to");return t.href=this._href(),t.onClick=this._onClick,t.target=this._target(),t}},{key:"_href",value:function(){return this.props.to?scrivito.urlFor(this.props.to):"#"}},{key:"_onClick",value:function(t){if(!(0,g.default)(t)&&(t.preventDefault(),this.props.to)){var e=this._target();e?scrivito.openLocation(this._href(),e):(0,h.default)(this.props.to)}}},{key:"_target",value:function(){return this.props.target?this.props.target:this.props.to&&this.props.to._scrivitoPrivateContent instanceof c.default?this.props.to.target():void 0}}]),e}(f.default.Component);m.displayName="Scrivito.LinkTag",e.default=(0,y.default)(m)},function(t,e,r){"use strict";function n(t){return t.ctrlKey||t.metaKey||t.shiftKey||t.which===i}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var i=2},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=r(65),c=n(s),l=r(23),f=n(l),d=r(0),p=r(17),h=n(p),v=r(1),y=r(210),_=n(y),g=r(6),m=n(g),b=r(204),w=r(211),k=n(w),j=r(312),O=n(j),C=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),u(e,[{key:"render",value:function(){var t=f.default.basicFieldFor(this.props.content,this.props.attribute);if(!t){var e=this.props.attribute;throw new v.ArgumentError('Component "Scrivito.ContentTag" received prop "attribute" with invalid value: Attribute "'+e+'" is not defined for content specified in prop "content".')}var r=void 0,n=void 0,i=(0,b.editorRegistrationFor)({type:t.type(),tag:this.props.tag});return i&&(r=i.id,n=i.editorClass),(0,c.default)()?h.default.createElement(O.default,{key:this._editorKey(r),field:t,editorClass:n,tag:this.props.tag,customProps:this._customProps(),content:this.props.content},this.props.children):h.default.createElement(k.default,{field:t,tag:this.props.tag,customProps:this._customProps()},this.props.children)}},{key:"_customProps",value:function(){return(0,d.omit)(this.props,"content","attribute","tag")}},{key:"_editorKey",value:function(t){var e=scrivito.unwrapAppClassValues(this.props.content);return[this.props.tag,(0,_.default)(e),this.props.attribute,t].join("|")}}]),e}(h.default.Component);C.displayName="Scrivito.ContentTag",C.defaultProps={tag:"div"},e.default=(0,m.default)(C)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t){if(t instanceof a.default)return t.id();if(t instanceof s.default)return t.obj().id()+"|"+t.id();var e=(0,f.default)(t).substr(0,100);throw new c.InternalError('keyForBasicContent called with "'+e+'". Expected an instance of BasicObj or BasicWidget.')}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var o=r(3),a=n(o),u=r(14),s=n(u),c=r(1),l=r(21),f=n(l)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=r(65),c=n(s),l=r(107),f=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(l),d=r(0),p=r(17),h=n(p),v=r(74),y=n(v),_=r(6),g=n(_),m=r(208),b=n(m),w=r(308),k=n(w),j=r(311),O=n(j),C=function(t){function e(t){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r._onClick=r._onClick.bind(r),r}return a(e,t),u(e,[{key:"render",value:function(){switch(this.props.field.type()){case"html":return this._renderHtml();case"string":return this._renderString();case"widgetlist":return this._renderWidgetlist();default:return this._renderContent({children:this.props.children})}}},{key:"_renderHtml",value:function(){if(this.props.children)return this._renderContent({children:this.props.children});var t=f.transformHTML(this._attributeValue()),e={dangerouslySetInnerHTML:{__html:t},onClick:this._onClick};return this._renderContent({props:e})}},{key:"_onClick",value:function(t){if(!(0,b.default)(t)){var e=f.findTarget(t.target,t.currentTarget);e&&(t.preventDefault(),t.stopPropagation(),(0,y.default)(e))}}},{key:"_renderString",value:function(){return this._renderContent({children:this.props.children||this._attributeValue()})}},{key:"_renderWidgetlist",value:function(){var t=void 0,e=this._attributeValue();return e.length?t=e.map(function(t){return h.default.createElement(k.default,{key:t.id(),widget:t})}):(0,c.default)()&&(t=h.default.createElement(O.default,{field:this.props.field})),this._renderContent({children:t})}},{key:"_renderContent",value:function(t){var e=t.props,r=t.children,n=(0,d.extend)({},this.props.customProps,e,this._editingProps());return h.default.createElement(this.props.tag,n,r)}},{key:"_editingProps",value:function(){return this.props.onClick?{onClick:this.props.onClick}:{}}},{key:"_attributeValue",value:function(){return this.props.field.get()}}]),e}(h.default.Component);C.displayName="Scrivito.ContentTag.AttributeValue",e.default=(0,g.default)(C)},function(t,e,r){"use strict";function n(t){t.dataTransfer.effectAllowed="move";try{t.dataTransfer.setData("text/plain",t.target.id)}catch(t){}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=r(17),c=n(s),l=r(6),f=n(l),d=function(t){function e(t){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r._onClick=r._onClick.bind(r),r}return a(e,t),u(e,[{key:"render",value:function(){var t="scrivito_option_marker scrivito_"+this.props.position;return this.props.isAlwaysShown&&(t+=" scrivito_visible"),c.default.createElement("span",{className:t,onClick:this._onClick},c.default.createElement("i",{className:"scrivito_icon scrivito_icon_marker_plus"}))}},{key:"_onClick",value:function(t){t.preventDefault(),t.stopPropagation(),this.props.insertWidget(this.props.widget,this.props.position)}}]),e}(c.default.Component);d.displayName="Scrivito.OptionMarker",e.default=(0,f.default)(d)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){"use strict";function n(){window.scrivito||(window.scrivito={}),window.scrivito.on||(window.scrivito.on=function(t,e){"content"===t&&document.addEventListener("DOMContentLoaded",function(){return e(window.document)})}),window.scrivito.in_editable_view||(window.scrivito.in_editable_view=function(){return!1})}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n},function(t,e,r){"use strict";function n(t){t&&(t.setAppAdapter(scrivito.AppAdapter),scrivito.uiAdapter=t.uiAdapter()),scrivito.client.init({ui:t,realmContext:window.Scrivito}),document.addEventListener("DOMContentLoaded",function(){return scrivito.BrowserLocation.init()})}function i(){(0,o.loadCss)("/scrivito/scrivito_editing.css"),(0,o.loadJs)("/scrivito/scrivito_editing.js")}Object.defineProperty(e,"__esModule",{value:!0}),e.initializeSdk=n,e.loadEditing=i,r(138),r(259),r(297),r(300);var o=r(97);window.scrivito||(window.scrivito={})},function(t,e,r){"use strict";r(260),r(261),r(292),r(293),r(294),r(295),r(296)},function(t,e,r){"use strict";window.scrivito||(window.scrivito={}),window.scrivito.AppSupport={}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=r(23),a=n(o),u=r(0),s=n(u),c=r(74),l=n(c),f=r(190),d=r(37),p=r(202),h=r(290),v=n(h),y=r(46),_=r(107);!function(){function t(t,i,o){var u=a.default.forClass(o),c={name:i,type:t,attributes:e(u,s.default.keys(u.attributes)),validContainerClasses:u.validContainerClasses};return r(c,i),n(c,i),c}function e(t,e){return e.map(function(e){var r=t.attributeDefinition(e),n=i(r,2),o=n[0],a=n[1],u={name:e,type:o};return a&&(a.only&&(u.only=a.only),a.values&&(u.values=a.values)),u})}function r(t,e){h.forEach(function(r){var n=(0,f.getUiConfigPropertyFor)(e,r);n&&(t[r]=n)})}function n(t,e){var r=(0,f.getUiConfigPropertyFor)(e,"attributesConfig");r&&Object.keys(r).forEach(function(e){var n=s.default.findWhere(t.attributes,{name:e});if(n){var i=r[e],o=i.title,a=i.description,u=i.values,c={title:o,description:a};u&&(c.valuesLocalization=u),s.default.extend(n,c)}})}function o(t,e){return u(t,(0,d.getWindowContext)().Obj.getIncludingDeleted(e))}function u(t,e){var r=(0,f.getUiConfigPropertyFor)(e.objClass(),t);if(r)return r(e)}function c(t){var e={obj_id:t.obj.id()};return t.url.fragment()&&(e.fragment=t.url.fragment()),t.url.search()&&(e.query=t.url.search()),e}var h=["title","description","thumbnail"],g={titleForClass:function(t){return(0,f.getUiConfigPropertyFor)(t,"title")},propertiesGroupsForClass:function(t){return(0,f.getUiConfigPropertyFor)(t,"propertiesGroups")},generalPropertiesForClass:function(t){return(0,f.getUiConfigPropertyFor)(t,"generalProperties")},titleForObj:function(t){return o("titleForContent",t)},descriptionForObj:function(t){return o("descriptionForContent",t)},titleForWidget:function(t,e){return u("titleForContent",(0,d.getWindowContext)().Obj.getIncludingDeleted(t).widget(e))},thumbnailForObj:function(t){return o("thumbnailForContent",t)},urlForLink:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.objId,r=t.query,n=t.fragment,i=(0,d.getWindowContext)().Obj.getIncludingDeleted(e);return scrivito.urlFor(i,{query:r,fragment:n})},getClasses:function(){var e=(0,d.getWindowContext)(),r=[];return s.default.each(e.allObjClasses(),function(e,n){return r.push(t("Obj",n,e))}),s.default.each(e.allWidgetClasses(),function(e,n){return r.push(t("Widget",n,e))}),r},navigateTo:function(t){(0,l.default)(function(){return(0,d.getWindowContext)().Obj.get(t)})},mountComponent:p.mountComponent,resolveUrl:function(t){return(0,v.default)(t).then(function(t){return t&&t.obj?c(t):null})},getDocumentHeight:function(){return(0,y.getDocument)().querySelector("html").getBoundingClientRect().height},transformHTML:function(t){return(0,_.transformHTML)(t)}};scrivito.AppAdapter=g}()},function(t,e,r){"use strict";function n(){window.scrollTo(0,0)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n},function(t,e){t.exports=function(t){throw new TypeError("[tcomb] "+t)}},function(t,e,r){var n=r(22),i=r(39);t.exports=n("Array",i)},function(t,e,r){var n=r(22);t.exports=n("Date",function(t){return t instanceof Date})},function(t,e,r){var n=r(22);t.exports=n("Error",function(t){return t instanceof Error})},function(t,e,r){var n=r(103),i=r(194);t.exports=n(i,function(t){return t%1==0},"Integer")},function(t,e,r){var n=r(22),i=r(38);t.exports=n("Object",i)},function(t,e,r){var n=r(22);t.exports=n("RegExp",function(t){return t instanceof RegExp})},function(t,e,r){var n=r(22),i=r(19);t.exports=n("Type",i)},function(t,e,r){var n=(r(7),r(27),r(19),r(33),r(106)),i=r(16),o=r(196),a=1;t.exports=function(t){function e(t,e){return r(t,e)}var r;return e.define=function(i){return o(i)&&e.hasOwnProperty("dispatch")&&(i.dispatch=e.dispatch),r=i,n(e,r,!0),t&&(r.displayName=e.displayName=t,e.meta.name=t),e.meta.identity=r.meta.identity,e.prototype=r.prototype,e},e.displayName=t||i(e)+"$"+a++,e.meta={identity:!1},e.prototype=null,e}},function(t,e,r){function n(t){return Object.keys(t).map(function(t){return o.stringify(t)}).join(" | ")}function i(t,e){function r(t,e){return t}var i=e||n(t);return r.meta={kind:"enums",map:t,name:e,identity:!0},r.displayName=i,r.is=function(e){return t.hasOwnProperty(e)},r}var o=r(7),a=(r(27),r(63),r(75));r(38);i.of=function(t,e){t=a(t)?t.split(" "):t;var r={};return t.forEach(function(t){r[t]=t}),i(r,e)},i.getDefaultName=n,t.exports=i},function(t,e,r){function n(t){return"?"+f(t)}function i(t,e){function r(e,r){return c.is(e)?e:s(t,e,r)}if(o(t)||t===u||t===c)return t;var i=e||n(t),f=a(t);return r.meta={kind:"maybe",type:t,name:e,identity:f},r.displayName=i,r.is=function(e){return c.is(e)||l(e,t)},r}var o=(r(7),r(27),r(18),r(274)),a=r(40),u=r(102),s=r(41),c=r(193),l=(r(63),r(42)),f=r(16);i.getDefaultName=n,t.exports=i},function(t,e,r){var n=r(19);t.exports=function(t){return n(t)&&"maybe"===t.meta.kind}},function(t,e,r){function n(t){return"Struct"+f(t)}function i(t,e){return d(a,t,e)}function o(t){return s(t)||(t=c(t)?{}:{name:t}),t.hasOwnProperty("strict")||(t.strict=a.strict),t.hasOwnProperty("defaultProps")||(t.defaultProps={}),t}function a(t,e){function r(e,n){if(r.is(e))return e;if(!(this instanceof r))return new r(e,n);for(var i in t)if(t.hasOwnProperty(i)){var o=t[i],a=e[i];void 0===a&&(a=c[i]),this[i]=l(o,a,null)}}e=o(e);var a=e.name,s=e.strict,c=e.defaultProps,f=a||n(t);return r.meta={kind:"struct",props:t,name:a,identity:!1,strict:s,defaultProps:c},r.displayName=f,r.is=function(t){return t instanceof r},r.update=function(t,e){return new r(u.update(t,e))},r.extend=function(t,e){return i([r].concat(t),e)},r}var u=r(7),s=(r(27),r(104),r(77),r(76),r(38)),c=r(33),l=r(41),f=(r(16),r(105),r(198)),d=r(199);a.strict=!1,a.getOptions=o,a.getDefaultName=n,a.extend=i,t.exports=a},function(t,e,r){var n=r(19);t.exports=function(t){return n(t)&&"struct"===t.meta.kind}},function(t,e,r){var n=r(19);t.exports=function(t){return n(t)&&"interface"===t.meta.kind}},function(t,e,r){function n(t){return u(t)&&"subtype"===t.meta.kind}function i(t){return n(t)?[t.meta.predicate].concat(i(t.meta.type)):[]}function o(t){return n(t)?o(t.meta.type):t}function a(t){return{predicates:i(t),unrefinedType:o(t)}}var u=r(19);t.exports=a},function(t,e,r){function n(t){return t.map(a).join(" | ")}function i(t,e){function r(t,e){if(a)return t;var n=r.dispatch(t);return!n&&r.is(t)?t:s(n,t,e)}var i=e||n(t),a=t.every(u);return r.meta={kind:"union",types:t,name:e,identity:a},r.displayName=i,r.is=function(e){return t.some(function(t){return c(e,t)})},r.dispatch=function(e){for(var r=0,n=t.length;r<n;r++){var i=t[r];if(l(i)){var o=i.dispatch(e);if(!f(o))return o}else if(c(e,i))return i}},r.update=function(t,e){return r(o.update(t,e))},r}var o=r(7),a=(r(27),r(18),r(16)),u=r(40),s=(r(39),r(41)),c=r(42),l=(r(63),r(196)),f=r(33);i.getDefaultName=n,t.exports=i},function(t,e,r){function n(t,e){return"("+t.map(d).join(", ")+") => "+d(e)}function i(t){return u.is(t)&&c(t.instrumentation)}function o(t){for(var e=t.length,r=!1,n=e-1;n>=0;n--){var i=t[n];if(!p(i)||"maybe"!==i.meta.kind)return n+1;r=!0}return r?0:e}function a(t,e,r){function u(t,e){return i(t)?t:u.of(t)}t=s(t)?t:[t];var c=r||n(t,e),d=t.length;o(t);return u.meta={kind:"func",domain:t,codomain:e,name:r,identity:!0},u.displayName=c,u.is=function(r){return i(r)&&r.instrumentation.domain.length===d&&r.instrumentation.domain.every(function(e,r){return e===t[r]})&&r.instrumentation.codomain===e},u.of=function(r,n){function i(){var i=Array.prototype.slice.call(arguments),o=i.length;if(n&&o<d){var u=Function.prototype.bind.apply(r,[this].concat(i));return a(t.slice(o),e).of(u,!0)}return l(e,r.apply(this,i))}return u.is(r)?r:(i.instrumentation={domain:t,codomain:e,f:r},i.displayName=f(r),i)},u}var u=(r(7),r(27),r(77)),s=r(39),c=(r(197),r(38)),l=r(41),f=(r(33),r(76),r(200),r(62)),d=r(16),p=r(19);a.getDefaultName=n,a.getOptionalArgumentsIndex=o,t.exports=a},function(t,e,r){function n(t){return t.map(u).join(" & ")}function i(t,e){function r(t,e){return t}var i=e||n(t),u=t.every(s);return r.meta={kind:"intersection",types:t,name:e,identity:u},r.displayName=i,r.is=function(e){return t.every(function(t){return a(e,t)})},r.update=function(t,e){return r(o.update(t,e))},r}var o=r(7),a=(r(27),r(18),r(39),r(40),r(42)),u=r(16),s=r(40);i.getDefaultName=n,t.exports=i},function(t,e,r){function n(t,e){return p(o,t,e)}function i(t){return u(t)||(t=s(t)?{}:{name:t}),t.hasOwnProperty("strict")||(t.strict=o.strict),t}function o(t,e){function r(e,r){if(v)return e;var n=!0,i=v?{}:h({},e);for(var o in t){var a=t[o],u=e[o],s=c(a,u,null);n=n&&u===s,i[o]=s}return n&&(i=e),i}e=i(e);var o=e.name,u=e.strict,p=o||l(t),v=Object.keys(t).map(function(e){return t[e]}).every(f);return r.meta={kind:"interface",props:t,name:o,identity:v,strict:u},r.displayName=p,r.is=function(e){if(s(e))return!1;if(u)for(var r in e)if(!t.hasOwnProperty(r))return!1;for(var n in t)if(!d(e[n],t[n]))return!1;return!0},r.update=function(t,e){return r(a.update(t,e))},r.extend=function(t,e){return n([r].concat(t),e)},r}var a=r(7),u=(r(27),r(104),r(77),r(76),r(38)),s=r(33),c=r(41),l=(r(16),r(105),r(198)),f=r(40),d=r(42),p=r(199),h=r(201);o.strict=!1,o.getOptions=i,o.getDefaultName=l,o.extend=n,t.exports=o},function(t,e,r){function n(t){return v(t)?t instanceof Date||t instanceof RegExp?t:_({},t):y(t)?t.concat():t}function i(t){return a.commands.hasOwnProperty(t)}function o(t){return a.commands[t]}function a(t,e){var r,u=t,s=!1;for(var c in e)e.hasOwnProperty(c)&&(i(c)?(r=o(c)(e[c],u),r!==t?(s=!0,u=r):u=t):(u===t&&(u=n(t)),r=a(u[c],e[c]),s=s||r!==u[c],u[c]=r));return s?u:t}function u(t,e){return t(e)}function s(t,e){return t.length>0?e.concat(t):e}function c(t,e){if(t.length>0){e=n(e);for(var r=0,i=t.length;r<i;r++)delete e[t[r]]}return e}function l(t){return t}function f(t,e){return t.length>0?(e=n(e),t.reduce(function(t,e){return t.splice.apply(t,e),t},e)):e}function d(t,e){if(t.from!==t.to){e=n(e);var r=e[t.to];e[t.to]=e[t.from],e[t.from]=r}return e}function p(t,e){return t.length>0?t.concat(e):e}function h(t,e){var r=!1,i=n(e);for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o],r=r||i[o]!==e[o]);return r?i:e}var v=(r(7),r(38)),y=(r(18),r(39)),_=(r(195),r(201));a.commands={$apply:u,$push:s,$remove:c,$set:l,$splice:f,$swap:d,$unshift:p,$merge:h},t.exports=a},function(t,e,r){var n=r(7),i=r(18),o=r(19),a=r(102);t.exports=function(t){for(var e,r,u,s=1,c=arguments.length;s<c;)if(e=arguments[s],r=arguments[s+1],u=arguments[s+2],i(u)&&!o(u)?s+=3:(u=r,r=a.is,s+=2),e.is(t)&&r(t))return u(t);n.fail("Match error")}},function(t,e,r){"use strict";function n(t,e){return!!t&&(t===e||t.prototype instanceof e)}Object.defineProperty(e,"__esModule",{value:!0});var i=r(101),o=r(57);e.ObjClass=i.irreducible("ObjClass",function(t){return n(t,o.getWindowRegistry().defaultClassForObjs)}),e.WidgetClass=i.irreducible("WidgetClass",function(t){return n(t,o.getWindowRegistry().defaultClassForWidgets)}),e.AppClass=i.union([e.ObjClass,e.WidgetClass])},function(t,e,r){"use strict";function n(t,e,r){var n=r.docPermalink;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=i(r,e);if(a){var u="Visit https://scrivito.com/"+n+" for more information.";throw new l.ArgumentError("Invalid arguments for '"+t+"': "+a+" "+u)}}}function i(t,e){var r=e.length,n=t.length;if(n>r)return"Expected "+r+" arguments, got "+n;var i=c.flatten(e.map(function(e,r){var n=e[0],i=e[1],a=t[r];return u.validate(a,i,{strict:!0}).errors.map(function(t){return o(n,t)})}));return i.length>0?i.join(" "):void 0}function o(t,e){var r=a(t,e);if(void 0===e.actual)return"Missing required "+r+".";if(e.expected===u.Nil)return"Unexpected "+r+".";var n=u.getTypeName(e.expected);return"Unexpected value for "+r+": got "+s.default(e.actual)+", expected type "+n+"."}function a(t,e){var r="argument '"+t+"'";return 0===e.path.length?r:"key '"+e.path.join("/")+"' in "+r}Object.defineProperty(e,"__esModule",{value:!0});var u=r(287),s=r(21),c=r(0),l=r(1);e.checkArgumentsFor=n},function(t,e,r){"use strict";function n(t,e,r){var n=u.getTypeName(e),i=r.length?"/"+r.join("/")+": "+n:n;return"Invalid value "+s(t)+" supplied to "+i}function i(t,e,r,i){return u.Function.is(e.getValidationErrorMessage)?e.getValidationErrorMessage(t,r,i):n(t,e,r)}function o(t,e,r){r=r||{};var n=u.Array.is(r)?r:r.path||[];return new f(a(t,e,n,r))}function a(t,e,r,n){return u.isType(e)?d[e.meta.kind](t,e,r,n):d.es6classes(t,e,r,n)}var u=r(101),s=u.stringify,c={},l=u.struct({message:u.Any,actual:u.Any,expected:u.Any,path:u.list(u.union([u.String,u.Number]))},"ValidationError");l.of=function(t,e,r,n){return new l({message:i(t,e,r,n),actual:t,expected:e,path:r})};var f=u.struct({errors:u.list(l),value:u.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, "+s(this.value)+"]":"[ValidationResult, false, ("+this.errors.map(function(t){return s(t.message)}).join(", ")+")]"};var d=o.validators={};d.es6classes=function(t,e,r,n){return{value:t,errors:t instanceof e?[]:[l.of(t,e,r,n.context)]}},d.irreducible=d.enums=function(t,e,r,n){return{value:t,errors:e.is(t)?[]:[l.of(t,e,r,n.context)]}},d.list=function(t,e,r,n){if(!u.Array.is(t))return{value:t,errors:[l.of(t,e,r,n.context)]};for(var i={value:[],errors:[]},o=0,s=t.length;o<s;o++){var c=a(t[o],e.meta.type,r.concat(o),n);i.value[o]=c.value,i.errors=i.errors.concat(c.errors)}return i},d.subtype=function(t,e,r,n){var i=a(t,e.meta.type,r,n);return i.errors.length?i:(e.meta.predicate(i.value)||(i.errors=[l.of(t,e,r,n.context)]),i)},d.maybe=function(t,e,r,n){return u.Nil.is(t)?{value:t,errors:[]}:a(t,e.meta.type,r,n)},d.struct=function(t,e,r,n){if(!u.Object.is(t))return{value:t,errors:[l.of(t,e,r,n.context)]};if(e.is(t))return{value:t,errors:[]};var i={value:{},errors:[]},o=e.meta.props,s=e.meta.defaultProps||c;for(var f in o)if(o.hasOwnProperty(f)){var d=t[f];void 0===d&&(d=s[f]);var p=a(d,o[f],r.concat(f),n);i.value[f]=p.value,i.errors=i.errors.concat(p.errors)}if(n.hasOwnProperty("strict")?n.strict:e.meta.strict)for(var h in t)t.hasOwnProperty(h)&&!o.hasOwnProperty(h)&&i.errors.push(l.of(t[h],u.Nil,r.concat(h),n.context));return i.errors.length||(i.value=new e(i.value)),i},d.tuple=function(t,e,r,n){var i=e.meta.types,o=i.length;if(!u.Array.is(t)||t.length>o)return{value:t,errors:[l.of(t,e,r,n.context)]};for(var s={value:[],errors:[]},c=0;c<o;c++){var f=a(t[c],i[c],r.concat(c),n);s.value[c]=f.value,s.errors=s.errors.concat(f.errors)}return s},d.dict=function(t,e,r,n){if(!u.Object.is(t))return{value:t,errors:[l.of(t,e,r,n.context)]};var i={value:{},errors:[]};for(var o in t)if(t.hasOwnProperty(o)){var s=r.concat(o),c=a(o,e.meta.domain,s,n),f=a(t[o],e.meta.codomain,s,n);i.value[o]=f.value,i.errors=i.errors.concat(c.errors,f.errors)}return i},d.union=function(t,e,r,n){var i=e.dispatch(t);return u.Function.is(i)?a(t,i,r.concat(e.meta.types.indexOf(i)),n):{value:t,errors:[l.of(t,e,r,n.context)]}},d.intersection=function(t,e,r,n){for(var i=e.meta.types,o=i.length,u={value:t,errors:[]},s=0,c=0;c<o;c++){"struct"===i[c].meta.kind&&s++;var f=a(t,i[c],r,n);u.errors=u.errors.concat(f.errors)}return s>1&&u.errors.push(l.of(t,e,r,n.context)),u},d.interface=function(t,e,r,n){if(!u.Object.is(t))return{value:t,errors:[l.of(t,e,r,n.context)]};var i={value:{},errors:[]},o=e.meta.props;for(var s in o){var c=a(t[s],o[s],r.concat(s),n);i.value[s]=c.value,i.errors=i.errors.concat(c.errors)}if(n.hasOwnProperty("strict")?n.strict:e.meta.strict)for(var f in t)o.hasOwnProperty(f)||u.Nil.is(t[f])||i.errors.push(l.of(t[f],u.Nil,r.concat(f),n.context));return i},u.mixin(u,{ValidationError:l,ValidationResult:f,validate:o}),t.exports=u},function(t,e,r){"use strict";function n(t,e){if(!t._scrivitoResizeListeners){t._scrivitoResizeListeners=[],t.style.position="relative";var r=i();r.resizeElement=t,t._scrivitoResizeTrigger=r,(0,s.default)()&&t.appendChild(r),r.data="about:blank",(0,s.default)()||t.appendChild(r)}t._scrivitoResizeListeners.push(e)}function i(){var t=document.createElement("object");return t.type="text/html",t.onload=o,t.style.display="block",t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.height="100%",t.style.width="100%",t.style.overflow="hidden",t.style.pointerEvents="none",t.style.zIndex=-1,t}function o(){this.contentDocument.defaultView._scrivitoResizeTrigger=this.resizeElement,this.contentDocument.defaultView.addEventListener("resize",a)}function a(t){var e=t.target||t.srcElement,r=e._scrivitoResizeTrigger;r._scrivitoResizeListeners.forEach(function(e){return e(r,t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var u=r(289),s=function(t){return t&&t.__esModule?t:{default:t}}(u)},function(t,e,r){"use strict";function n(){var t=window.navigator.userAgent;return t.indexOf("MSIE")>=0||t.indexOf("Trident")>=0}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t){var e=(0,a.default)(c.location()),r=(0,a.default)(t);return(0,p.isConfigured)()&&(e.origin()===r.origin()||r.is("relative"))?(0,f.default)(function(){return scrivito.Routing.recognize(t)}).then(function(t){return(0,u.include)(["/",""],t.path)?null:{obj:t.obj,url:r}}).catch(function(t){if(t instanceof d.ResourceNotFoundError)return null;throw t}):scrivito.Promise.resolve(null)}Object.defineProperty(e,"__esModule",{value:!0});var o=r(49),a=n(o),u=r(0),s=r(46),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(s),l=r(13),f=n(l),d=r(1),p=r(203);e.default=i},function(t,e,r){"use strict";function n(t){var e=o.default.get(t);return e?scrivito.basicUrlFor(e):scrivito.Routing.generateUrl({path:t})}Object.defineProperty(e,"__esModule",{value:!0});var i=r(3),o=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=n},function(t,e,r){"use strict";var n=r(3),i=function(t){return t&&t.__esModule?t:{default:t}}(n),o=r(0),a=r(52),u=r(46),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(u);!function(){function t(t){var e=t.obj,r=t.queryParameters,n=t.hash,i={scrivitoObjId:e.id(),scrivitoQueryParameters:r,scrivitoHash:n},a=scrivito.Routing.generate({obj:e,queryParameters:r,hash:n}),u=s.history();u.state&&u.state.scrivitoObjId===e.id()&&(0,o.isEqual)(u.state.scrivitoQueryParameters,r)&&u.state.scrivitoHash===n||u.pushState(i,"",a)}function e(t){var e=t.obj,r=t.queryParameters,n=t.hash,i={scrivitoObjId:e.id(),scrivitoQueryParameters:r,scrivitoHash:n},o=scrivito.Routing.generate({obj:e,queryParameters:r,hash:n});s.history().replaceState(i,"",o)}function r(){s.setOnpopstate(c)}function n(){var t=s.location().toString();(0,a.replaceCurrentPage)(function(){var e=scrivito.Routing.recognize(t),r=e.obj,n=e.queryParameters,i=e.hash;return r?{obj:r,queryParameters:n,hash:i}:{queryParameters:n,hash:i}})}function u(){n(),r()}function c(t){var e=void 0,r=void 0,o=void 0;t.state&&(e=t.state.scrivitoObjId,r=t.state.scrivitoHash,o=t.state.scrivitoQueryParameters),e?(0,a.replaceCurrentPage)(function(){return{obj:i.default.get(e),queryParameters:o,hash:r}}):n()}scrivito.BrowserLocation={},scrivito.BrowserLocation.init=u,scrivito.BrowserLocation.pushWith=t,scrivito.BrowserLocation.replaceWith=e}()},function(t,e,r){"use strict";!function(){function t(t){scrivito.uiAdapter?scrivito.uiAdapter.navigateToExternalUrl(t):scrivito.setWindowLocation(t)}function e(t){window.location=t}function r(t,e){window.open(t,e)}scrivito.setWindowLocation=e,scrivito.changeLocation=t,scrivito.openLocation=r}()},function(t,e,r){"use strict";var n=r(49),i=function(t){return t&&t.__esModule?t:{default:t}}(n),o=r(1),a=r(46),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(a);!function(){function t(t){var e=t.routingMethod,r=t.routingBasePath;m=!0,_="path"===e,g=r||""}function e(){m=!1,_=void 0,g=void 0}function r(t){if(!m)throw scrivito.logError("Error from Scrivito SDK: No application configured, cannot initialize routing."),new o.InternalError(t+" can't be called before init.")}function n(t){var e=t.obj,n=t.queryParameters,i=t.hash;return r("generate"),a({path:scrivito.RoutingPath.generate(e),queryParameters:n,hash:i})}function a(t){var e=t.path,n=t.queryParameters,o=t.hash;r("generateUrl");var a=(0,i.default)(u.location()).origin();if(_){var s=("/"+g+"/"+e).replace(/\/+/g,"/"),c=(0,i.default)(a).pathname(s);return n&&c.query(n),o&&c.hash(o),c.toString()}return(0,i.default)(a).hash(""+y+e).toString()}function s(t){r("recognize");var e=c(t);return{path:e,obj:f(e),queryParameters:v(t),hash:l(t)}}function c(t){return _?d(t):p(t)}function l(t){return _?h(t):null}function f(t){return null!==t?scrivito.RoutingPath.recognize(t):null}function d(t){var e=(0,i.default)(t).path();return e.substring(0,g.length)!==g?null:e.substring(g.length)}function p(t){var e=(0,i.default)(t),r=(0,i.default)(u.location()),n=e.fragment();return e.filename()!==r.filename()?null:""===n?"":n.substring(0,y.length)===y?n.substring(y.length):null}function h(t){var e=(0,i.default)(t).hash();return""===e?null:e}function v(t){return(0,i.default)(t).query(!0)}var y="!",_=void 0,g=void 0,m=!1;scrivito.Routing={},scrivito.Routing.init=t,scrivito.Routing.reset=e,scrivito.Routing.generate=n,scrivito.Routing.recognize=s,scrivito.Routing.generateUrl=a}()},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(3),o=n(i),a=r(0),u=n(a),s=r(57),c=r(1);!function(){function t(t,e){return t.substring(0,e.length)===e?t.substring(e.length):t}function e(t){if(!l)return!1;var e=scrivito.loadableWithDefault(null,l);return!!e&&e.id()===t.id()}function r(t){if(!(t instanceof o.default))throw new c.ArgumentError("Parameter obj needs to be a BasicObj.")}function n(t){if(!u.default.isString(t))throw new c.ArgumentError("Parameter path needs to be a String.")}function i(t){var e=(0,s.getWindowRegistry)();return scrivito.wrapInAppClass(e,t).slug()}function a(t){var e=u.default.last(t.split("-"));return u.default.last(e.split("/"))}var l=void 0,f={init:function(t){l=t},generate:function(t){if(r(t),e(t))return"/";if(t.permalink())return"/"+t.permalink();var n=i(t);return n?"/"+n+"-"+t.id():"/"+t.id()},recognize:function(e){if(n(e),u.default.include(["/",""],e))return scrivito.unwrapAppClassValues(l());var r=t(e,"/"),i=o.default.getByPermalink(r);return i||o.default.get(a(r))},get homepageCallback(){return l},resetHomepageCallback:function(){l=void 0}};scrivito.RoutingPath=f}()},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(3),o=n(i),a=r(23),u=n(a),s=r(24),c=n(s),l=r(37),f=r(1),d=r(30),p=n(d);!function(){function t(t){return r(t),t instanceof c.default?a(t):t instanceof p.default?n(t):d(t)?i(t):scrivito.Routing.generate({obj:t})}function e(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.query,i=r.fragment,o=scrivito.unwrapAppClassValues(e),a=n?"?"+n:"",u=i?"#"+i:"";return t(o).concat(a).concat(u)}function r(t){if(!t)throw new f.ArgumentError("Missing target.");if(!(t instanceof c.default||t instanceof o.default||t instanceof p.default))throw new f.ArgumentError("Target is invalid. Valid targets are instances of Obj or Link.")}function n(t){return t.url()}function i(t){var e=t.get("blob",["binary"]);return e?n(e):"#__empty_blob"}function a(e){return e.isExternal()?e.url():t(e.obj())}function s(){return(0,l.getWindowContext)()}function d(t){var e=s().getClass(t.objClass());return!!e&&u.default.forClass(e).isBinary()}scrivito.basicUrlFor=t,scrivito.urlFor=e}()},function(t,e,r){"use strict";r(298),r(299)},function(t,e,r){"use strict";window.scrivito||(window.scrivito={})},function(t,e,r){"use strict";!function(){var t=void 0,e=0,r={},n={subscribe:function(t){var n=t.onFocus,i=t.onBlur,o=e;return r[o]={onFocus:n,onBlur:i},e+=1,o},unsubscribe:function(t){delete r[t]},notifyFocus:function(e){t=e,r[t].onFocus()},notifyBlur:function(e){e===t&&r[e].onBlur()},get handlers(){return r},reset:function(){t=void 0,e=0,r={}}};scrivito.WidgetFocus=n}()},function(t,e,r){"use strict";var n=r(301),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(n);window.Scrivito=i},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(30);Object.defineProperty(e,"Binary",{enumerable:!0,get:function(){return n(i).default}});var o=r(47);Object.defineProperty(e,"FutureBinary",{enumerable:!0,get:function(){return n(o).default}});var a=r(100);Object.defineProperty(e,"ObjFacetValue",{enumerable:!0,get:function(){return n(a).default}});var u=r(13);Object.defineProperty(e,"load",{enumerable:!0,get:function(){return n(u).default}});var s=r(1);Object.defineProperty(e,"ArgumentError",{enumerable:!0,get:function(){return s.ArgumentError}}),Object.defineProperty(e,"ResourceNotFoundError",{enumerable:!0,get:function(){return s.ResourceNotFoundError}}),Object.defineProperty(e,"ScrivitoError",{enumerable:!0,get:function(){return s.ScrivitoError}}),Object.defineProperty(e,"TransformationSourceInvalidError",{enumerable:!0,get:function(){return s.TransformationSourceInvalidError}}),Object.defineProperty(e,"TransformationSourceTooLargeError",{enumerable:!0,get:function(){return s.TransformationSourceTooLargeError}});var c=r(203);Object.defineProperty(e,"configure",{enumerable:!0,get:function(){return c.configure}});var l=r(52);Object.defineProperty(e,"currentPage",{enumerable:!0,get:function(){return l.currentPage}}),Object.defineProperty(e,"currentPageParams",{enumerable:!0,get:function(){return l.currentPageParams}});var f=r(74);Object.defineProperty(e,"navigateTo",{enumerable:!0,get:function(){return n(f).default}});var d=r(302);Object.defineProperty(e,"openContentBrowser",{enumerable:!0,get:function(){return n(d).default}});var p=r(190);Object.defineProperty(e,"provideEditingConfig",{enumerable:!0,get:function(){return p.provideEditingConfig}});var h=r(204);Object.defineProperty(e,"registerEditor",{enumerable:!0,get:function(){return h.registerEditor}});var v=r(304);Object.defineProperty(e,"isInPlaceEditingActive",{enumerable:!0,get:function(){return n(v).default}});var y=r(305);Object.defineProperty(e,"ChildListTag",{enumerable:!0,get:function(){return n(y).default}});var _=r(209);Object.defineProperty(e,"ContentTag",{enumerable:!0,get:function(){return n(_).default}});var g=r(316);Object.defineProperty(e,"CurrentPage",{enumerable:!0,get:function(){return n(g).default}});var m=r(317);Object.defineProperty(e,"ImageTag",{enumerable:!0,get:function(){return n(m).default}});var b=r(319);Object.defineProperty(e,"InternalErrorPage",{enumerable:!0,get:function(){return n(b).default}});var w=r(207);Object.defineProperty(e,"LinkTag",{enumerable:!0,get:function(){return n(w).default}});var k=r(320);Object.defineProperty(e,"NotFoundErrorPage",{enumerable:!0,get:function(){return n(k).default}});var j=r(6);Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return n(j).default}});var O=r(321);Object.defineProperty(e,"provideComponent",{enumerable:!0,get:function(){return n(O).default}});var C=r(64);Object.defineProperty(e,"registerComponent",{enumerable:!0,get:function(){return C.registerForId}})},function(t,e,r){"use strict";function n(t){return scrivito.uiAdapter.openContentBrowser((0,a.default)(t&&(0,i.pick)(t,"selection","selectionMode")))}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var i=r(0),o=r(303),a=function(t){return t&&t.__esModule?t:{default:t}}(o)},function(t,e,r){"use strict";function n(t){var e=[];return t.forEach(function(t){var r=o(t);void 0!==r&&e.push(r)}),e}function i(t){var e={};return(0,u.each)(t,function(t,r){var n=o(t);void 0!==n&&(e[r]=n)}),e}function o(t){if(!t)return t;switch(void 0===t?"undefined":a(t)){case"string":case"number":case"boolean":return t;case"object":if(t instanceof l.default)return o(t.params());if(t instanceof Date)return;return(0,u.isArray)(t)?n(t):i(t)}}Object.defineProperty(e,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=o;var u=r(0),s=r(34),c=(function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);e.default=t}(s),r(59)),l=function(t){return t&&t.__esModule?t:{default:t}}(c)},function(t,e,r){"use strict";function n(){return"published"!==scrivito.currentWorkspaceId()&&(!!(0,i.isComponentMounted)()||!!scrivito.uiAdapter&&scrivito.uiAdapter.isEditingMode())}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var i=r(202)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(65),l=n(c),f=r(0),d=r(17),p=n(d),h=r(52),v=r(6),y=n(v),_=r(306),g=n(_),m=r(307),b=n(m),w=function(t){function e(t){o(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.state={hasFocus:!1},r._onMouseOver=r._onMouseOver.bind(r),r._onMouseOut=r._onMouseOut.bind(r),r}return u(e,t),s(e,[{key:"render",value:function(){var t=this,e=this.props.parent||(0,h.currentPage)();if(!e)return null;e=e._scrivitoPrivateContent;var r=(0,f.omit)(this.props,"parent","tag","renderChild"),n=void 0;return(0,l.default)()&&(r.onMouseOver=this._onMouseOver,r.onMouseOut=this._onMouseOut,r["data-scrivito-private-child-list-path"]=!0,this.state.hasFocus&&(r.className="scrivito_active scrivito_entered "+r.className),n=p.default.createElement(b.default,{key:"menuMarker",parent:e})),p.default.createElement(this.props.tag,r,[n].concat(i(e.orderedChildren().map(function(e){return p.default.createElement(g.default,{key:e.id(),child:e,renderChild:t.props.renderChild})}))))}},{key:"_onMouseOver",value:function(t){t.stopPropagation(),this.setState({hasFocus:!0})}},{key:"_onMouseOut",value:function(t){t.stopPropagation(),this.setState({hasFocus:!1})}}]),e}(p.default.Component);w.displayName="Scrivito.ChildListTag",w.defaultProps={tag:"ul"},e.default=(0,y.default)(w)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t){var e=t.child,r=t.renderChild,n=(0,u.getWindowContext)().appModelAccessor.wrapInAppClass(e);return r?r(n):a.default.createElement("li",null,a.default.createElement(f.default,{to:n},e.get("title","string")))}Object.defineProperty(e,"__esModule",{value:!0});var o=r(17),a=n(o),u=r(37),s=r(6),c=n(s),l=r(207),f=n(l);i.displayName="Scrivito.ChildListTag.ChildItem",e.default=(0,c.default)(i)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=r(17),c=n(s),l=r(66),f=r(6),d=n(f),p=function(t){function e(t){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r._onClick=r._onClick.bind(r),r}return a(e,t),u(e,[{key:"render",value:function(){var t=this;return c.default.createElement("span",{ref:function(e){return t._menuMarker=e},className:"scrivito_editing_marker",onClick:this._onClick},c.default.createElement("i",{className:"scrivito_icon"}),c.default.createElement("span",{className:"scrivito_editing_marker_title"},this.props.parent.objClass()))}},{key:"_onClick",value:function(t){t.preventDefault(),t.stopPropagation(),this._menuMarker&&scrivito.uiAdapter.showChildListMenu((0,l.findDOMNode)(this._menuMarker),this.props.parent.id())}}]),e}(c.default.Component);p.displayName="Scrivito.ChildListTag.MenuMarker",e.default=(0,d.default)(p)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t,e){var r=(0,w.default)(t),n=r.objId,i=r.widgetId;scrivito.uiAdapter.insertWidget(n,i,e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},l=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),f=r(65),d=n(f),p=r(23),h=n(p),v=r(0),y=r(17),_=n(y),g=r(66),m=r(57),b=r(108),w=n(b),k=r(6),j=n(k),O=r(309),C=n(O),P=r(213),E=n(P),A=r(310),S=n(A),x=function(t){function e(t){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.state={hasFocus:!1,isDragged:!1},r._onMouseOver=r._onMouseOver.bind(r),r._onMouseOut=r._onMouseOut.bind(r),r._onWidgetFocus=r._onWidgetFocus.bind(r),r._onWidgetBlur=r._onWidgetBlur.bind(r),r._setDragState=r._setDragState.bind(r),r}return a(e,t),l(e,[{key:"componentDidMount",value:function(){if((0,d.default)()&&this._widget){var t=(0,w.default)(this.props.widget),e=t.objId,r=t.widgetId,n=(0,g.findDOMNode)(this._widget);scrivito.uiAdapter.registerWidgetDropZoneInDom(n,e,r)}this._focusToken=scrivito.WidgetFocus.subscribe({onFocus:this._onWidgetFocus,onBlur:this._onWidgetBlur})}},{key:"componentWillUnmount",value:function(){scrivito.WidgetFocus.unsubscribe(this._focusToken)}},{key:"render",value:function(){var t=this,e=_.default.createElement(S.default,{widget:this.props.widget});return(0,d.default)()?_.default.createElement("div",c({ref:function(e){return t._widget=e},className:this._className(),style:this._style(),onMouseOver:this._onMouseOver,onMouseOut:this._onMouseOut},this._dataProps()),_.default.createElement(C.default,{widget:this.props.widget,setDragState:this._setDragState}),e,this._renderOptionMarker("top"),this._renderOptionMarker("bottom")):_.default.createElement("div",null,e)}},{key:"_setDragState",value:function(t){this.setState({isDragging:t})}},{key:"_className",value:function(){if(this.state.hasFocus)return"scrivito_active scrivito_entered"}},{key:"_dataProps",value:function(){var t={"data-scrivito-private-widget":!0,"data-scrivito-private-dropzone":!0};return this._isStructureMarker()&&(t["data-scrivito-private-structure-widget"]=!0),this.state.isDragging&&(t["data-scrivito-private-dropback"]=!0),t}},{key:"_style",value:function(){if(this.state.isDragging)return{opacity:.5}}},{key:"_isStructureMarker",value:function(){var t=(0,m.getWindowRegistry)(),e=t.widgetClassFor(this.props.widget.objClass()),r=h.default.forClass(e);return!!r&&(0,v.some)(r.attributes,function(t,e){var n=r.attributeDefinition(e);return"widgetlist"===s(n,1)[0]})}},{key:"_onMouseOver",value:function(t){t.stopPropagation(),scrivito.WidgetFocus.notifyFocus(this._focusToken)}},{key:"_onMouseOut",value:function(t){t.stopPropagation(),scrivito.WidgetFocus.notifyBlur(this._focusToken)}},{key:"_onWidgetFocus",value:function(){this.setState({hasFocus:!0})}},{key:"_onWidgetBlur",value:function(){this.setState({hasFocus:!1})}},{key:"_renderOptionMarker",value:function(t){return _.default.createElement(E.default,{position:t,widget:this.props.widget,insertWidget:u,isAlwaysShown:scrivito.uiAdapter.alwaysShowOptionMarkers()})}}]),e}(_.default.Component);x.displayName="Scrivito.Widget",e.default=(0,j.default)(x)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=r(17),c=n(s),l=r(66),f=r(108),d=n(f),p=r(212),h=n(p),v=r(6),y=n(v),_=function(t){function e(t){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r._onClick=r._onClick.bind(r),r._onDragStart=r._onDragStart.bind(r),r._onDragEnd=r._onDragEnd.bind(r),r}return a(e,t),u(e,[{key:"render",value:function(){var t=this;return c.default.createElement("span",{ref:function(e){return t._menuMarker=e},className:"scrivito_editing_marker",onClick:this._onClick,onDragStart:this._onDragStart,onDragEnd:this._onDragEnd,draggable:"true"},c.default.createElement("i",{className:"scrivito_icon"}),c.default.createElement("span",{className:"scrivito_editing_marker_title"},this.props.widget.objClass()))}},{key:"_onClick",value:function(t){if(t.preventDefault(),t.stopPropagation(),this._menuMarker){var e=(0,d.default)(this.props.widget),r=e.objId,n=e.widgetId;scrivito.uiAdapter.showWidgetMenu((0,l.findDOMNode)(this._menuMarker),r,n)}}},{key:"_onDragStart",value:function(t){(0,h.default)(t);var e=(0,d.default)(this.props.widget),r=e.objId,n=e.widgetId;scrivito.uiAdapter.onDragStart(r,n),this.props.setDragState(!0)}},{key:"_onDragEnd",value:function(){scrivito.uiAdapter.onDragEnd(),this.props.setDragState(!1)}}]),e}(c.default.Component);_.displayName="Scrivito.ContentTag.MenuMarker",e.default=(0,y.default)(_)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=r(65),c=n(s),l=r(17),f=n(l),d=r(57),p=r(1),h=r(64),v=r(6),y=n(v),_=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),u(e,[{key:"shouldComponentUpdate",value:function(t){return this.props.widget.equals(t.widget)}},{key:"render",value:function(){var t=(0,d.getWindowRegistry)(),e=scrivito.wrapInAppClass(t,this.props.widget);return f.default.createElement(this._componentClass(e),{widget:e})}},{key:"_scrivitoRenderOnError",value:function(){return(0,c.default)()?f.default.createElement("div",{className:"content_error"},"Widget could not be rendered due to application error."):null}},{key:"_componentClass",value:function(t){var e=t.constructor,r=(0,h.getByAppClass)(e);if(!r)throw new p.ArgumentError('No component registered for widget class "'+this.props.widget.objClass()+'".');return r}}]),e}(f.default.Component);_.displayName="Scrivito.ContentTag.WidgetContent",e.default=(0,y.default)(_)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=r(17),c=n(s),l=r(66),f=r(108),d=n(f),p=r(6),h=n(p),v=function(t){function e(t){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r._onClick=r._onClick.bind(r),r}return a(e,t),u(e,[{key:"componentDidMount",value:function(){if(this._widgetPlaceholder){var t=(0,l.findDOMNode)(this._widgetPlaceholder),e=(0,d.default)(this.props.field.container()),r=e.objId,n=e.widgetId,i=this.props.field.name();scrivito.uiAdapter.registerEmptyWidgetlistDropZoneInDom({domNode:t,objId:r,widgetId:n,attributeName:i})}}},{key:"render",value:function(){var t=this;return c.default.createElement("div",{ref:function(e){return t._widgetPlaceholder=e},className:"scrivito_empty_widget_field","data-scrivito-private-dropzone":"true",onClick:this._onClick})}},{key:"_onClick",value:function(t){if(t.preventDefault(),t.stopPropagation(),this._widgetPlaceholder){var e=this.props.field.name(),r=(0,d.default)(this.props.field.container()),n=r.objId,i=r.widgetId;scrivito.uiAdapter.showWidgetlistMenu((0,l.findDOMNode)(this._widgetPlaceholder),{objId:n,widgetId:i,attributeName:e,mousePosition:{x:t.pageX,y:t.pageY}})}}}]),e}(c.default.Component);v.displayName="Scrivito.ContentTag.WidgetlistPlaceholder",e.default=(0,h.default)(v)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=r(17),c=n(s),l=r(66),f=r(0),d=r(211),p=n(d),h=r(313),v=n(h),y=r(315),_=n(y),g=r(6),m=n(g),b=function(t){function e(t){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.state={domMode:"None"},r._onClick=r._onClick.bind(r),r}return a(e,t),u(e,[{key:"componentWillMount",value:function(){var t=this,e=this.props.field,r=e.type(),n=e.typeOptions(),i=this.props.editorClass;if(i){var o=(0,f.extend)({type:r},(0,f.pick)(n,"validClasses","values")),a=new v.default(e,function(e){return t._setDomMode(e)});this._editor=new i({attributeInfo:o,controller:a}),this._editorWillBeActivated()}}},{key:"componentDidMount",value:function(){"Replace"===this.state.domMode&&this._editorDomWasMounted()}},{key:"componentDidUpdate",value:function(t,e){var r=e.domMode,n=this.state.domMode;r!==n&&("Replace"===n?this._editorDomWasMounted():this._editorDomWasUnmounted())}},{key:"componentWillUnmount",value:function(){this._editorWillBeDeactivated()}},{key:"render",value:function(){var t=this;return"Replace"===this.state.domMode?c.default.createElement(this.props.tag,(0,f.extend)((0,f.omit)(this.props.customProps,"children"),{ref:function(e){return t._editorComponent=e}})):c.default.createElement(p.default,{ref:function(e){return t._editorComponent=e},children:this.props.children,customProps:this.props.customProps,field:this.props.field,key:this.state.domMode,tag:this.props.tag,onClick:function(e){return t._onClick(e)}})}},{key:"_onClick",value:function(t){this._editor&&this._editor.onClick&&this._editor.onClick(new _.default(t))}},{key:"_editorWillBeActivated",value:function(){this._editor&&this._editor.editorWillBeActivated&&this._editor.editorWillBeActivated()}},{key:"_editorWillBeDeactivated",value:function(){this._editor&&this._editor.editorWillBeDeactivated&&this._editor.editorWillBeDeactivated()}},{key:"_editorDomWasMounted",value:function(){this._editor&&this._editor.editorDomWasMounted&&this._editorComponent&&this._editor.editorDomWasMounted((0,l.findDOMNode)(this._editorComponent))}},{key:"_editorDomWasUnmounted",value:function(){this._editor&&this._editor.editorDomWasUnmounted&&this._editor.editorDomWasUnmounted()}},{key:"_setDomMode",value:function(t){this.setState({domMode:t})}}]),e}(c.default.Component);b.displayName="Scrivito.ContentTag.Editor",e.default=(0,m.default)(b)},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(314),a=function(t){return t&&t.__esModule?t:{default:t}}(o),u=r(107),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(u),c=function(){function t(e,r){n(this,t),this.setDomMode=r,this._buffer=new a.default({get:function(){return"html"===e.type()?s.transformHTML(e.get()):e.get()},set:function(t){return e.update(t)},flushRate:100})}return i(t,[{key:"content",get:function(){return this._buffer.get()},set:function(t){this._buffer.set(t)}}]),t}();e.default=c},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o={},a=function(){function t(e){var r=e.get,i=e.set,a=e.flushRate;n(this,t),this._getUnderlying=r,this._setUnderlying=i,this._flushRate=a,this._bufferedValue=o}return i(t,[{key:"get",value:function(){var t=this._bufferedValue;return t!==o?t:this._getUnderlying()}},{key:"set",value:function(t){this._bufferedValue=t,this._flushRunning||this._runFlush()}},{key:"_runFlush",value:function(){var t=this;if(this._bufferedValue===o)return void(this._flushRunning=!1);this._setUnderlying(this._bufferedValue),this._bufferedValue=o,setTimeout(function(){return t._runFlush()},this._flushRate),this._flushRunning=!0}}]),t}();e.default=a},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=function(){function t(e){n(this,t),this._internalEvent=e}return i(t,[{key:"preventDefault",value:function(){this._internalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this._internalEvent.stopPropagation()}}]),t}();e.default=o},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(){var t=(0,u.currentPage)(),e=(0,u.currentPageParams)();if(!t)return null;var r=t.constructor,n=(0,c.getByAppClass)(r);if(!n)throw new s.ArgumentError('No component registered for obj class "'+t.objClass()+'".');return a.default.createElement(n,{page:t,params:e})}Object.defineProperty(e,"__esModule",{value:!0});var o=r(17),a=n(o),u=r(52),s=r(1),c=r(64),l=r(6),f=n(l);i.displayName="Scrivito.CurrentPage",e.default=(0,f.default)(i)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(23),l=n(c),f=r(0),d=r(17),p=n(d),h=r(1),v=r(30),y=n(v),_=r(46),g=r(318),m=n(g),b=r(6),w=n(b),k=r(209),j=n(k),O=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),s(e,[{key:"render",value:function(){if(!this.props.content)return null;var t=(0,f.omit)(this.props,"content","attribute");if(this.props.content instanceof y.default)return p.default.createElement("img",u({src:this._urlFor(this.props.content)},t));var e=this._getBinary();return e||(t["data-scrivito-image-placeholder"]=!0),p.default.createElement(j.default,u({attribute:this.props.attribute,content:this.props.content,tag:"img",src:this._urlFor(e)},t))}},{key:"_urlFor",value:function(t){return t?this._scaleDownBinary(t).url():m.default}},{key:"_getBinary",value:function(){var t=l.default.forInstance(this.props.content),e=t.attributes[this.props.attribute];if(!e)throw new h.ScrivitoError('Component "Scrivito.ImageTag" received prop "content" with an object missing attribute "'+this.props.attribute+'".');if("binary"===e)return this.props.content.get(this.props.attribute);if("reference"===e)return this._getReferencedBinary();throw new h.ScrivitoError('Component "Scrivito.ImageTag" received prop "content" with an object, whose attribute "'+this.props.attribute+'" is of invalid type "'+e+'". Valid attribute types are "binary" and "reference".')}},{key:"_getReferencedBinary",value:function(){var t=this.props.content.get(this.props.attribute);if(t){var e=t.get("blob");if(e)return e}return null}},{key:"_scaleDownBinary",value:function(t){return t.isRaw()||t.isExplicitlyTransformed()?t:t.transform({width:(0,_.screen)().width*(0,_.devicePixelRatio)()})}}]),e}(p.default.Component);O.displayName="Scrivito.ImageTag",O.defaultProps={attribute:"blob"},e.default=(0,w.default)(O)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/gif;base64,R0lGODlhyADIAIAAAP///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS41LWMwMjEgNzkuMTU0OTExLCAyMDEzLzEwLzI5LTExOjQ3OjE2ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDBEQjBEMDdFODMzMTFFNTg0QzY4MUNBMUVCQUU2MjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDBEQjBEMDhFODMzMTFFNTg0QzY4MUNBMUVCQUU2MjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowMERCMEQwNUU4MzMxMUU1ODRDNjgxQ0ExRUJBRTYyNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowMERCMEQwNkU4MzMxMUU1ODRDNjgxQ0ExRUJBRTYyNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAAALAAAAADIAMgAAAL/hI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8YhMKpfMpvMJjUqn1Kr1is1qt9yu9wsOi8fksvmMTqvX7Lb7DY/L5/S6/Y7P6/f8vv8PGCg4SFhoeIiYqLjI2Oj4CBkpOUlZaXmJmam5ydnp+QkaKjpKWmp6ipqqusra6voKGys7S1tre4ubq7vL2+v7CxwsPExcbHyMnKy8zNzs/AwdLT1NXW19jZ2tvc3d7f0NHi4+Tl5ufo6err7O3u7+Dh8vP09fb3+Pn6+/z9/v/w8woMCBBAsaPIgwocKFDBs6fAgxosSJFCtavIgxo8aNBhw7eixTAAA7"},function(t,e,r){"use strict";function n(t){var e=t.children;return!(0,i.currentPageError)()||(0,i.currentPageError)()instanceof o.ResourceNotFoundError?null:e?React.createElement("div",null,e):React.createElement("div",null,React.createElement("h1",null,"We're sorry, but something went wrong."))}Object.defineProperty(e,"__esModule",{value:!0});var i=r(52),o=r(1),a=r(6),u=function(t){return t&&t.__esModule?t:{default:t}}(a);n.displayName="Scrivito.InternalErrorPage",e.default=(0,u.default)(n)},function(t,e,r){"use strict";function n(t){var e=t.children;return(0,i.currentPageError)()instanceof o.ResourceNotFoundError?e?React.createElement("div",null,e):React.createElement("div",null,React.createElement("h1",null,"The page you were looking for doesn't exist."),React.createElement("p",null,"You may have mistyped the address or the page may have moved.")):null}Object.defineProperty(e,"__esModule",{value:!0});var i=r(52),o=r(1),a=r(6),u=function(t){return t&&t.__esModule?t:{default:t}}(a);n.displayName="Scrivito.NotFoundErrorPage",e.default=(0,u.default)(n)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){o(t),a(e),u(e);var r=t._scrivitoPrivateSchema.name;e.displayName||e.name&&"_class"!==e.name||!r||(e.displayName=r),(0,l.registerForAppClass)(t,(0,d.default)(e))}function o(t){var e=(0,s.getWindowContext)().Obj,r=(0,s.getWindowContext)().Widget,n=t.prototype;if(!(n instanceof e||n instanceof r))throw new c.ArgumentError(t+" is not a valid application class.")}function a(t){if("function"!=typeof t)throw new c.ArgumentError("Scrivito.provideComponent expected a valid React component, but received "+(0,h.default)(t))}function u(t){if(t.propTypes)throw new c.ArgumentError("Custom props are not allowed when providing a component.")}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var s=r(37),c=r(1),l=r(64),f=r(6),d=n(f),p=r(21),h=n(p)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(257),o=n(i),a=r(258),u=r(137),s=n(u),c=(0,s.default)();c?c.installRailsApi():(0,o.default)(),(0,a.initializeSdk)(c)}]);
95
+ !function(e){t.exports=e()}(function(){var t,i,o;return function t(e,n,r){function i(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof _dereq_&&_dereq_;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return i(n||t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(t,e,n){"use strict";e.exports=function(t){function e(t){var e=new n(t),r=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),r}var n=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},{}],2:[function(t,n,r){"use strict";function i(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new l(16),this._normalQueue=new l(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=c}function o(t,e,n){this._lateQueue.push(t,e,n),this._queueTick()}function a(t,e,n){this._normalQueue.push(t,e,n),this._queueTick()}function s(t){this._normalQueue._pushOne(t),this._queueTick()}var u;try{throw new Error}catch(t){u=t}var c=t("./schedule"),l=t("./queue"),f=t("./util");i.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},i.prototype.hasCustomScheduler=function(){return this._customScheduler},i.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},i.prototype.disableTrampolineIfNecessary=function(){f.hasDevTools&&(this._trampolineEnabled=!1)},i.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},i.prototype.fatalError=function(t,n){n?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},i.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},f.hasDevTools?(i.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},i.prototype.invoke=function(t,e,n){this._trampolineEnabled?a.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},i.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(i.prototype.invokeLater=o,i.prototype.invoke=a,i.prototype.settlePromises=s),i.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var n=t.shift(),r=t.shift();e.call(n,r)}else e._settlePromises()}},i.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},i.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},i.prototype._reset=function(){this._isTickUsed=!1},n.exports=i,n.exports.firstLineError=u},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},s=function(t,e){0==(50397184&this._bitField)&&this._resolveCallback(e.target)},u=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var c=n(o),l=new t(e);l._propagateFrom(this,1);var f=this._target();if(l._setBoundTo(c),c instanceof t){var d={promiseRejectionQueued:!1,promise:l,target:f,bindingPromise:c};f._then(e,a,void 0,l,d),c._then(s,u,void 0,l,d),l._setOnCancel(c)}else l._resolveCallback(f);return l},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}e.exports=function(e){function n(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var i="Object "+s.classString(t)+" has no method '"+s.toString(n)+"'";throw new e.TypeError(i)}return r}function r(t){return n(t,this.pop()).apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}var a,s=t("./util"),u=s.canEvaluate;s.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=o;else if(u){var r=a(t);e=null!==r?r:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),a=o.tryCatch,s=o.errorObj,u=e._async;e.prototype.break=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),u.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n<t.length;++n)this._doInvokeOnCancel(t[n],e);else if(void 0!==t)if("function"==typeof t){if(!e){var r=a(t).call(this._boundValue());r===s&&(this._attachExtraTrace(r.e),u.throwLater(r.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),u.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(t,e,n){"use strict";e.exports=function(e){function n(t,n,s){return function(u){var c=s._boundValue();t:for(var l=0;l<t.length;++l){var f=t[l];if(f===Error||null!=f&&f.prototype instanceof Error){if(u instanceof f)return o(n).call(c,u)}else if("function"==typeof f){var d=o(f).call(c,u);if(d===a)return d;if(d)return o(n).call(c,u)}else if(r.isObject(u)){for(var h=i(f),p=0;p<h.length;++p){var v=h[p];if(f[v]!=u[v])continue t}return o(n).call(c,u)}}return e}}var r=t("./util"),i=t("./es5").keys,o=r.tryCatch,a=r.errorObj;return n}},{"./es5":13,"./util":36}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){this._trace=new e.CapturedTrace(r())}function n(){if(i)return new e}function r(){var t=o.length-1;if(t>=0)return o[t]}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,u=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=u,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,n,r){"use strict";n.exports=function(n,r){function i(t,e){return{promise:e}}function o(){return!1}function a(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+B.toString(t));r._attachCancellationCallback(t)})}catch(t){return t}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?B.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function u(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function f(t,e){if(0!=(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function d(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof n?t.isFulfilled()?t.value():void 0:t}function p(){this._trace=new N(this._peekContext())}function v(t,e){if(z(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=E(t);B.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),B.notEnumerableProp(t,"__stackCleaned__",!0)}}}function m(t,e,n,r,i){if(void 0===t&&null!==e&&X){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&r._bitField))return;n&&(n+=" ");var o="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),u=C(s),c=u.length-1;c>=0;--c){var l=u[c];if(!q.test(l)){var f=l.match(W);f&&(o="at "+f[1]+":"+f[2]+":"+f[3]+" ");break}}if(u.length>0)for(var d=u[0],c=0;c<s.length;++c)if(s[c]===d){c>0&&(a="\n"+s[c-1]);break}}var h="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;r._warn(h,!0,e)}}function g(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),y(n)}function y(t,e,r){if(at.warnings){var i,o=new I(t);if(e)r._attachExtraTrace(o);else if(at.longStackTraces&&(i=n._peekContext()))i.attachExtraTrace(o);else{var a=E(o);o.stack=a.message+"\n"+a.stack.join("\n")}et("warning",o)||x(o,"",!0)}}function b(t,e){for(var n=0;n<e.length-1;++n)e[n].push("From previous event:"),e[n]=e[n].join("\n");return n<e.length&&(e[n]=e[n].join("\n")),t+"\n"+e.join("\n")}function _(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function w(t){for(var e=t[0],n=1;n<t.length;++n){for(var r=t[n],i=e.length-1,o=e[i],a=-1,s=r.length-1;s>=0;--s)if(r[s]===o){a=s;break}for(var s=a;s>=0;--s){var u=r[s];if(e[i]!==u)break;e.pop(),i--}e=r}}function C(t){for(var e=[],n=0;n<t.length;++n){var r=t[n],i=" (No stack trace)"===r||U.test(r),o=i&&rt(r);i&&!o&&(Q&&" "!==r.charAt(0)&&(r=" "+r),e.push(r))}return e}function k(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),n=0;n<e.length;++n){var r=e[n];if(" (No stack trace)"===r||U.test(r))break}return n>0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function E(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?k(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:C(e)}}function x(t,e,n){if("undefined"!=typeof console){var r;if(B.isObject(t)){var i=t.stack;r=e+V(i,t)}else r=e+String(t);"function"==typeof M?M(r,n):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(r)}}function j(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(t){L.throwLater(t)}"unhandledRejection"===t?et(t,n,r)||i||x(n,"Unhandled rejection "):et(t,r)}function O(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():B.toString(t);if(/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+S(e)+">, no stack trace)"}function S(t){return t.length<41?t:t.substr(0,38)+"..."}function T(){return"function"==typeof ot}function A(t){var e=t.match(it);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function P(t,e){if(T()){for(var n,r,i=t.stack.split("\n"),o=e.stack.split("\n"),a=-1,s=-1,u=0;u<i.length;++u){var c=A(i[u]);if(c){n=c.fileName,a=c.line;break}}for(var u=0;u<o.length;++u){var c=A(o[u]);if(c){r=c.fileName,s=c.line;break}}a<0||s<0||!n||!r||n!==r||a>=s||(rt=function(t){if(H.test(t))return!0;var e=A(t);return!!(e&&e.fileName===n&&a<=e.line&&e.line<=s)})}}function N(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);ot(this,N),e>32&&this.uncycle()}var D,F,M,R=n._getDomain,L=n._async,I=t("./errors").Warning,B=t("./util"),z=B.canAttachTrace,H=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,q=/\((?:timers\.js):\d+:\d+\)/,W=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,U=null,V=null,Q=!1,$=!(0==B.env("BLUEBIRD_DEBUG")),K=!(0==B.env("BLUEBIRD_WARNINGS")||!$&&!B.env("BLUEBIRD_WARNINGS")),G=!(0==B.env("BLUEBIRD_LONG_STACK_TRACES")||!$&&!B.env("BLUEBIRD_LONG_STACK_TRACES")),X=0!=B.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(K||!!B.env("BLUEBIRD_W_FORGOTTEN_RETURN"));n.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},n.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),L.invokeLater(this._notifyUnhandledRejection,this,void 0))},n.prototype._notifyUnhandledRejectionIsHandled=function(){j("rejectionHandled",D,void 0,this)},n.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},n.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},n.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),j("unhandledRejection",F,t,this)}},n.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},n.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},n.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},n.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},n.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},n.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},n.prototype._warn=function(t,e,n){return y(t,e,n||this)},n.onPossiblyUnhandledRejection=function(t){var e=R();F="function"==typeof t?null===e?t:B.domainBind(e,t):void 0},n.onUnhandledRejectionHandled=function(t){var e=R();D="function"==typeof t?null===e?t:B.domainBind(e,t):void 0};var Y=function(){};n.longStackTraces=function(){if(L.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!at.longStackTraces&&T()){var t=n.prototype._captureStackTrace,e=n.prototype._attachExtraTrace;at.longStackTraces=!0,Y=function(){if(L.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");n.prototype._captureStackTrace=t,n.prototype._attachExtraTrace=e,r.deactivateLongStackTraces(),L.enableTrampoline(),at.longStackTraces=!1},n.prototype._captureStackTrace=p,n.prototype._attachExtraTrace=v,r.activateLongStackTraces(),L.disableTrampolineIfNecessary()}},n.hasLongStackTraces=function(){return at.longStackTraces&&T()};var Z=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return B.global.dispatchEvent(t),function(t,e){var n=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!B.global.dispatchEvent(n)}}if("function"==typeof Event){var t=new Event("CustomEvent");return B.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,!B.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),B.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!B.global.dispatchEvent(n)}}catch(t){}return function(){return!1}}(),J=function(){return B.isNode?function(){return e.emit.apply(e,arguments)}:B.global?function(t){var e="on"+t.toLowerCase(),n=B.global[e];return!!n&&(n.apply(B.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),tt={promiseCreated:i,promiseFulfilled:i,promiseRejected:i,promiseResolved:i,promiseCancelled:i,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:i},et=function(t){var e=!1;try{e=J.apply(null,arguments)}catch(t){L.throwLater(t),e=!0}var n=!1;try{n=Z(t,tt[t].apply(null,arguments))}catch(t){L.throwLater(t),n=!0}return n||e};n.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?n.longStackTraces():!t.longStackTraces&&n.hasLongStackTraces()&&Y()),"warnings"in t){var e=t.warnings;at.warnings=!!e,X=at.warnings,B.isObject(e)&&"wForgottenReturn"in e&&(X=!!e.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!at.cancellation){if(L.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");n.prototype._clearCancellationData=l,n.prototype._propagateFrom=f,n.prototype._onCancel=u,n.prototype._setOnCancel=c,n.prototype._attachCancellationCallback=s,n.prototype._execute=a,nt=f,at.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!at.monitoring?(at.monitoring=!0,n.prototype._fireEvent=et):!t.monitoring&&at.monitoring&&(at.monitoring=!1,n.prototype._fireEvent=o)),n},n.prototype._fireEvent=o,n.prototype._execute=function(t,e,n){try{t(e,n)}catch(t){return t}},n.prototype._onCancel=function(){},n.prototype._setOnCancel=function(t){},n.prototype._attachCancellationCallback=function(t){},n.prototype._captureStackTrace=function(){},n.prototype._attachExtraTrace=function(){},n.prototype._clearCancellationData=function(){},n.prototype._propagateFrom=function(t,e){};var nt=d,rt=function(){return!1},it=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;B.inherits(N,Error),r.CapturedTrace=N,N.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;r<t;++r){var a=e[r].stack,s=n[a];if(void 0!==s&&s!==r){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var u=r>0?e[r-1]:this;s<t-1?(u._parent=e[s+1],u._parent.uncycle(),u._length=u._parent._length+1):(u._parent=void 0,u._length=1);for(var c=u._length+1,l=r-2;l>=0;--l)e[l]._length=c,c++;return}}}},N.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=E(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(C(i.stack.split("\n"))),i=i._parent;w(r),_(r),B.notEnumerableProp(t,"stack",b(n,r)),B.notEnumerableProp(t,"__stackCleaned__",!0)}};var ot=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():O(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,U=t,V=e;var n=Error.captureStackTrace;return rt=function(t){return H.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return U=/@/,V=e,Q=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(t){i="stack"in t}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(V=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?O(e):e.toString()},null):(U=t,V=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(M=function(t){console.warn(t)},B.isNode&&e.stderr.isTTY?M=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:B.isNode||"string"!=typeof(new Error).stack||(M=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var at={warnings:K,longStackTraces:!1,cancellation:!1,monitoring:!1};return G&&n.longStackTraces(),{longStackTraces:function(){return at.longStackTraces},warnings:function(){return at.warnings},cancellation:function(){return at.cancellation},monitoring:function(){return at.monitoring},propagateFromFunction:function(){return nt},boundValueFunction:function(){return h},checkForgottenReturns:m,setBounds:P,warn:y,deprecated:g,CapturedTrace:N,fireDomEvent:Z,fireGlobalEvent:J}}},{"./errors":12,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){function n(){return o(this)}function r(t,n){return i(t,n,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,r){return i(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},{}],12:[function(t,e,n){"use strict";function r(t,e){function n(r){if(!(this instanceof n))return new n(r);f(this,"message","string"==typeof r?r:e),f(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return l(n,Error),n}function i(t){if(!(this instanceof i))return new i(t);f(this,"name","OperationalError"),f(this,"message",t),this.cause=t,this.isOperational=!0,t instanceof Error?(f(this,"message",t.message),f(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}var o,a,s=t("./es5"),u=s.freeze,c=t("./util"),l=c.inherits,f=c.notEnumerableProp,d=r("Warning","warning"),h=r("CancellationError","cancellation error"),p=r("TimeoutError","timeout error"),v=r("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(t){o=r("TypeError","type error"),a=r("RangeError","range error")}for(var m="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g<m.length;++g)"function"==typeof Array.prototype[m[g]]&&(v.prototype[m[g]]=Array.prototype[m[g]]);s.defineProperty(v.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),v.prototype.isOperational=!0;var y=0;v.prototype.toString=function(){var t=Array(4*y+1).join(" "),e="\n"+t+"AggregateError of:\n";y++,t=Array(4*y+1).join(" ");for(var n=0;n<this.length;++n){for(var r=this[n]===this?"[Circular AggregateError]":this[n]+"",i=r.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];r=i.join("\n"),e+=r+"\n"}return y--,e},l(i,Error);var b=Error.__BluebirdErrorTypes__;b||(b=u({CancellationError:h,TimeoutError:p,OperationalError:i,RejectionError:i,AggregateError:v}),s.defineProperty(Error,"__BluebirdErrorTypes__",{value:b,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:o,RangeError:a,CancellationError:b.CancellationError,OperationalError:b.OperationalError,TimeoutError:b.TimeoutError,AggregateError:b.AggregateError,Warning:d}},{"./es5":13,"./util":36}],13:[function(t,e,n){var r=function(){"use strict";return void 0===this}();if(r)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:r,propertyIsWritable:function(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!(n&&!n.writable&&!n.set)}};else{var i={}.hasOwnProperty,o={}.toString,a={}.constructor.prototype,s=function(t){var e=[];for(var n in t)i.call(t,n)&&e.push(n);return e},u=function(t,e){return{value:t[e]}},c=function(t,e,n){return t[e]=n.value,t},l=function(t){return t},f=function(t){try{return Object(t).constructor.prototype}catch(t){return a}},d=function(t){try{return"[object Array]"===o.call(t)}catch(t){return!1}};e.exports={isArray:d,keys:s,names:s,defineProperty:c,getDescriptor:u,freeze:l,getPrototypeOf:f,isES5:r,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,n){"use strict";e.exports=function(t,e){var n=t.map;t.prototype.filter=function(t,r){return n(this,t,r,e)},t.filter=function(t,r,i){return n(t,r,i,e)}}},{}],15:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e,n){this.promise=t,this.type=e,this.handler=n,this.called=!1,this.cancelPromise=null}function i(t){this.finallyHandler=t}function o(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function a(){return u.call(this,this.promise._target()._settledValue())}function s(t){if(!o(this,t))return f.e=t,f}function u(t){var r=this.promise,u=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?u.call(r._boundValue()):u.call(r._boundValue(),t);if(void 0!==c){r._setReturnedNonUndefined();var d=n(c,r);if(d instanceof e){if(null!=this.cancelPromise){if(d._isCancelled()){var h=new l("late cancellation observer");return r._attachExtraTrace(h),f.e=h,f}d.isPending()&&d._attachCancellationCallback(new i(this))}return d._then(a,s,void 0,this,void 0)}}}return r.isRejected()?(o(this),f.e=t,f):(o(this),t)}var c=t("./util"),l=e.CancellationError,f=c.errorObj;return r.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,i){return"function"!=typeof t?this.then():this._then(n,i,void 0,new r(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,u,u)},e.prototype.tap=function(t){return this._passThrough(t,1,u)},r}},{"./util":36}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,a){function s(t,n,r){for(var o=0;o<n.length;++o){r._pushContext();var a=h(n[o])(t);if(r._popContext(),a===d){r._pushContext();var s=e.reject(d.e);return r._popContext(),s}var u=i(a,r);if(u instanceof e)return u}return null}function u(t,n,i,o){if(a.cancellation()){var s=new e(r),u=this._finallyPromise=new e(r);this._promise=s.lastly(function(){return u}),s._captureStackTrace(),s._setOnCancel(this)}else{(this._promise=new e(r))._captureStackTrace()}this._stack=o,this._generatorFunction=t,this._receiver=n,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(p):p,this._yieldedPromise=null,this._cancellationPhase=!1}var c=t("./errors"),l=c.TypeError,f=t("./util"),d=f.errorObj,h=f.tryCatch,p=[];f.inherits(u,o),u.prototype._isResolved=function(){return null===this._promise},u.prototype._cleanup=function(){this._promise=this._generator=null,a.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},u.prototype._promiseCancelled=function(){if(!this._isResolved()){var t,n=void 0!==this._generator.return;if(n)this._promise._pushContext(),t=h(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),t=h(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},u.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=h(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},u.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=h(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},u.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},u.prototype.promise=function(){return this._promise},u.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},u.prototype._continue=function(t){var n=this._promise;if(t===d)return this._cleanup(),this._cancellationPhase?n.cancel():n._rejectCallback(t.e,!1);var r=t.value;if(!0===t.done)return this._cleanup(),this._cancellationPhase?n.cancel():n._resolveCallback(r);var o=i(r,this._promise);if(!(o instanceof e)&&null===(o=s(o,this._yieldHandlers,this._promise)))return void this._promiseRejected(new l("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",r)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));o=o._target();var a=o._bitField;0==(50397184&a)?(this._yieldedPromise=o,o._proxy(this,null)):0!=(33554432&a)?e._async.invoke(this._promiseFulfilled,this,o._value()):0!=(16777216&a)?e._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()},e.coroutine=function(t,e){if("function"!=typeof t)throw new l("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=Object(e).yieldHandler,r=u,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new r(void 0,void 0,n,i),a=o.promise();return o._generator=e,o._promiseFulfilled(void 0),a}},e.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new l("expecting a function but got "+f.classString(t));p.push(t)},e.spawn=function(t){if(a.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof t)return n("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=new u(t,this),i=r.promise();return r._run(e.spawn),i}}},{"./errors":12,"./util":36}],17:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,a){var s=t("./util");s.canEvaluate,s.tryCatch,s.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,a){function s(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var i=c();this._callback=null===i?e:l.domainBind(i,e),this._preservedValues=r===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],h.invoke(this._asyncInit,this,void 0)}function u(t,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+l.classString(n));var a=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+l.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+l.classString(i.concurrency)));a=i.concurrency}return a="number"==typeof a&&isFinite(a)&&a>=1?a:0,new s(t,n,a,o).promise()}var c=e._getDomain,l=t("./util"),f=l.tryCatch,d=l.errorObj,h=e._async;l.inherits(s,n),s.prototype._asyncInit=function(){this._init$(void 0,-2)},s.prototype._init=function(){},s.prototype._promiseFulfilled=function(t,n){var r=this._values,o=this.length(),s=this._preservedValues,u=this._limit;if(n<0){if(n=-1*n-1,r[n]=t,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return r[n]=t,this._queue.push(n),!1;null!==s&&(s[n]=t);var c=this._promise,l=this._callback,h=c._boundValue();c._pushContext();var p=f(l).call(h,t,n,o),v=c._popContext();if(a.checkForgottenReturns(p,v,null!==s?"Promise.filter":"Promise.map",c),p===d)return this._reject(p.e),!0;var m=i(p,this._promise);if(m instanceof e){m=m._target();var g=m._bitField;if(0==(50397184&g))return u>=1&&this._inFlight++,r[n]=m,m._proxy(this,-1*(n+1)),!1;if(0==(33554432&g))return 0!=(16777216&g)?(this._reject(m._reason()),!0):(this._cancel(),!0);p=m._value()}r[n]=p}return++this._totalResolved>=o&&(null!==s?this._filter(r,s):this._resolve(r),!0)},s.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var r=t.pop();this._promiseFulfilled(n[r],r)}},s.prototype._filter=function(t,e){for(var n=e.length,r=new Array(n),i=0,o=0;o<n;++o)t[o]&&(r[i++]=e[o]);r.length=i,this._resolve(r)},s.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return u(this,t,e,null)},e.map=function(t,e,n,r){return u(t,e,n,r)}}},{"./util":36}],19:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var a=t("./util"),s=a.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+a.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=s(t).apply(this,arguments),a=r._popContext();return o.checkForgottenReturns(i,a,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e.try=function(t){if("function"!=typeof t)return i("expecting a function but got "+a.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var u;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],l=arguments[2];u=a.isArray(c)?s(t).apply(l,c):s(t).call(l,c)}else u=s(t)();var f=r._popContext();return o.checkForgottenReturns(u,f,"Promise.try",r),r._resolveFromSyncValue(u),r},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&l.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new c(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=l.keys(t),i=0;i<n.length;++i){var o=n[i];f.test(o)||(e[o]=t[o])}return e}return a.markAsOriginatingFromRejection(t),t}function o(t,e){return function(n,r){if(null!==t){if(n){var o=i(s(n));t._attachExtraTrace(o),t._reject(o)}else if(e){var a=[].slice.call(arguments,1);t._fulfill(a)}else t._fulfill(r);t=null}}}var a=t("./util"),s=a.maybeWrapAsError,u=t("./errors"),c=u.OperationalError,l=t("./es5"),f=/^(?:name|message|stack|cause)$/;e.exports=o},{"./errors":12,"./es5":13,"./util":36}],21:[function(t,e,n){"use strict";e.exports=function(e){function n(t,e){var n=this;if(!o.isArray(t))return r.call(n,t,e);var i=s(e).apply(n._boundValue(),[null].concat(t));i===u&&a.throwLater(i.e)}function r(t,e){var n=this,r=n._boundValue(),i=void 0===t?s(e).call(r,null):s(e).call(r,null,t);i===u&&a.throwLater(i.e)}function i(t,e){var n=this;if(!t){var r=new Error(t+"");r.cause=t,t=r}var i=s(e).call(n._boundValue(),t);i===u&&a.throwLater(i.e)}var o=t("./util"),a=e._async,s=o.tryCatch,u=o.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var o=r;void 0!==e&&Object(e).spread&&(o=n),this._then(o,i,void 0,this,t)}return this}}},{"./util":36}],22:[function(t,n,r){"use strict";n.exports=function(){function r(){}function i(t,e){if("function"!=typeof e)throw new b("expecting a function but got "+p.classString(e));if(t.constructor!==o)throw new b("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}function o(t){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,t!==w&&(i(this,t),this._resolveFromExecutor(t)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function a(t){this.promise._resolveCallback(t)}function s(t){this.promise._rejectCallback(t,!1)}function u(t){var e=new o(w);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var c,l=function(){return new b("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},f=function(){return new o.PromiseInspection(this._target())},d=function(t){return o.reject(new b(t))},h={},p=t("./util");c=p.isNode?function(){var t=e.domain;return void 0===t&&(t=null),t}:function(){return null},p.notEnumerableProp(o,"_getDomain",c);var v=t("./es5"),m=t("./async"),g=new m;v.defineProperty(o,"_async",{value:g});var y=t("./errors"),b=o.TypeError=y.TypeError;o.RangeError=y.RangeError;var _=o.CancellationError=y.CancellationError;o.TimeoutError=y.TimeoutError,o.OperationalError=y.OperationalError,o.RejectionError=y.OperationalError,o.AggregateError=y.AggregateError;var w=function(){},C={},k={},E=t("./thenables")(o,w),x=t("./promise_array")(o,w,E,d,r),j=t("./context")(o),O=j.create,S=t("./debuggability")(o,j),T=(S.CapturedTrace,t("./finally")(o,E)),A=t("./catch_filter")(k),P=t("./nodeback"),N=p.errorObj,D=p.tryCatch;return o.prototype.toString=function(){return"[object Promise]"},o.prototype.caught=o.prototype.catch=function(t){var e=arguments.length;if(e>1){var n,r=new Array(e-1),i=0;for(n=0;n<e-1;++n){var o=arguments[n];if(!p.isObject(o))return d("expecting an object but got A catch statement predicate "+p.classString(o));r[i++]=o}return r.length=i,t=arguments[n],this.then(void 0,A(r,t,this))}return this.then(void 0,t)},o.prototype.reflect=function(){return this._then(f,f,void 0,this,void 0)},o.prototype.then=function(t,e){if(S.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+p.classString(t);arguments.length>1&&(n+=", "+p.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},o.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},o.prototype.spread=function(t){return"function"!=typeof t?d("expecting a function but got "+p.classString(t)):this.all()._then(t,void 0,void 0,C,void 0)},o.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},o.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new x(this).promise()},o.prototype.error=function(t){return this.caught(p.originatesFromRejection,t)},o.getNewLibraryCopy=n.exports,o.is=function(t){return t instanceof o},o.fromNode=o.fromCallback=function(t){var e=new o(w);e._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=D(t)(P(e,n));return r===N&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},o.all=function(t){return new x(t).promise()},o.cast=function(t){var e=E(t);return e instanceof o||(e=new o(w),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},o.resolve=o.fulfilled=o.cast,o.reject=o.rejected=function(t){var e=new o(w);return e._captureStackTrace(),e._rejectCallback(t,!0),e},o.setScheduler=function(t){if("function"!=typeof t)throw new b("expecting a function but got "+p.classString(t));return g.setScheduler(t)},o.prototype._then=function(t,e,n,r,i){var a=void 0!==i,s=a?i:new o(w),u=this._target(),l=u._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!=(2097152&this._bitField)&&(r=0!=(50397184&l)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var f=c();if(0!=(50397184&l)){var d,h,v=u._settlePromiseCtx;0!=(33554432&l)?(h=u._rejectionHandler0,d=t):0!=(16777216&l)?(h=u._fulfillmentHandler0,d=e,u._unsetRejectionIsUnhandled()):(v=u._settlePromiseLateCancellationObserver,h=new _("late cancellation observer"),u._attachExtraTrace(h),d=e),g.invoke(v,u,{handler:null===f?d:"function"==typeof d&&p.domainBind(f,d),promise:s,receiver:r,value:h})}else u._addCallbacks(t,e,s,r,f);return s},o.prototype._length=function(){return 65535&this._bitField},o.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},o.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},o.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},o.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},o.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},o.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},o.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},o.prototype._isFinal=function(){return(4194304&this._bitField)>0},o.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},o.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},o.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},o.prototype._setAsyncGuaranteed=function(){g.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},o.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==h)return void 0===e&&this._isBound()?this._boundValue():e},o.prototype._promiseAt=function(t){return this[4*t-4+2]},o.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},o.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},o.prototype._boundValue=function(){},o.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(e,n,r,i,null)},o.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=h),this._addCallbacks(n,r,i,o,null)},o.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:p.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:p.domainBind(i,e));else{var a=4*o-4;this[a+2]=n,this[a+3]=r,"function"==typeof t&&(this[a+0]=null===i?t:p.domainBind(i,t)),"function"==typeof e&&(this[a+1]=null===i?e:p.domainBind(i,e))}return this._setLength(o+1),o},o.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},o.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=E(t,this);if(!(n instanceof o))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var i=r._bitField;if(0==(50397184&i)){var a=this._length();a>0&&r._migrateCallback0(this);for(var s=1;s<a;++s)r._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!=(33554432&i))this._fulfill(r._value());else if(0!=(16777216&i))this._reject(r._reason());else{var u=new _("late cancellation observer");r._attachExtraTrace(u),this._reject(u)}}},o.prototype._rejectCallback=function(t,e,n){var r=p.ensureErrorObject(t),i=r===t;if(!i&&!n&&S.warnings()){var o="a promise was rejected with a non-error: "+p.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,!!e&&i),this._reject(t)},o.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)},o.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0==(65536&i)){r._pushContext();var o;e===C?n&&"number"==typeof n.length?o=D(t).apply(this._boundValue(),n):(o=N,o.e=new b("cannot .spread() a non-array: "+p.classString(n))):o=D(t).call(e,n);var a=r._popContext();i=r._bitField,0==(65536&i)&&(o===k?r._reject(n):o===N?r._rejectCallback(o.e,!1):(S.checkForgottenReturns(o,a,"",r,this),r._resolveCallback(o)))}},o.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},o.prototype._followee=function(){return this._rejectionHandler0},o.prototype._setFollowee=function(t){this._rejectionHandler0=t},o.prototype._settlePromise=function(t,e,n,i){var a=t instanceof o,s=this._bitField,u=0!=(134217728&s);0!=(65536&s)?(a&&t._invokeInternalOnCancel(),n instanceof T&&n.isFinallyHandler()?(n.cancelPromise=t,D(e).call(n,i)===N&&t._reject(N.e)):e===f?t._fulfill(f.call(n)):n instanceof r?n._promiseCancelled(t):a||t instanceof x?t._cancel():n.cancel()):"function"==typeof e?a?(u&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,n,i,t)):e.call(n,i,t):n instanceof r?n._isResolved()||(0!=(33554432&s)?n._promiseFulfilled(i,t):n._promiseRejected(i,t)):a&&(u&&t._setAsyncGuaranteed(),0!=(33554432&s)?t._fulfill(i):t._reject(i))},o.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,i=t.value;"function"==typeof e?n instanceof o?this._settlePromiseFromHandler(e,r,i,n):e.call(r,i,n):n instanceof o&&n._reject(i)},o.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},o.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},o.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},o.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():g.settlePromises(this))}},o.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return g.fatalError(t,p.isNode);(65535&e)>0?g.settlePromises(this):this._ensurePossibleRejectionHandled()}},o.prototype._fulfillPromises=function(t,e){for(var n=1;n<t;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},o.prototype._rejectPromises=function(t,e){for(var n=1;n<t;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},o.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!=(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},o.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},o.defer=o.pending=function(){return S.deprecated("Promise.defer","new Promise"),{promise:new o(w),resolve:a,reject:s}},p.notEnumerableProp(o,"_makeSelfResolutionError",l),t("./method")(o,w,E,d,S),t("./bind")(o,w,E,S),t("./cancel")(o,x,d,S),t("./direct_resolve")(o),t("./synchronous_inspection")(o),t("./join")(o,x,E,w,g,c),o.Promise=o,o.version="3.4.7",t("./map.js")(o,x,d,E,w,S),t("./call_get.js")(o),t("./using.js")(o,d,E,O,w,S),t("./timers.js")(o,w,S),t("./generators.js")(o,d,w,E,r,S),t("./nodeify.js")(o),t("./promisify.js")(o,w),t("./props.js")(o,x,E,d),t("./race.js")(o,w,E,d),t("./reduce.js")(o,x,d,E,w,S),t("./settle.js")(o,x,S),t("./some.js")(o,x,d),t("./filter.js")(o,w),t("./each.js")(o,w),t("./any.js")(o),p.toFastProperties(o),p.toFastProperties(o.prototype),u({a:1}),u({b:2}),u({c:3}),u(1),u(function(){}),u(void 0),u(!1),u(new o(w)),S.setBounds(m.firstLineError,p.lastLineError),o}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function a(t){switch(t){case-2:return[];case-3:return{}}}function s(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var u=t("./util");u.isArray;return u.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function t(n,o){var s=r(this._values,this._promise);if(s instanceof e){s=s._target();var c=s._bitField;if(this._values=s,0==(50397184&c))return this._promise._setAsyncGuaranteed(),s._then(t,this._reject,void 0,this,o);if(0==(33554432&c))return 0!=(16777216&c)?this._reject(s._reason()):this._cancel();s=s._value()}if(null===(s=u.asArray(s))){var l=i("expecting an array or an iterable object but got "+u.classString(s)).reason();return void this._promise._rejectCallback(l,!1)}if(0===s.length)return void(-5===o?this._resolveEmptyArray():this._resolve(a(o)));this._iterate(s)},s.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,a=null,s=0;s<n;++s){var u=r(t[s],i);u instanceof e?(u=u._target(),a=u._bitField):a=null,o?null!==a&&u.suppressUnhandledRejections():null!==a?0==(50397184&a)?(u._proxy(this,s),this._values[s]=u):o=0!=(33554432&a)?this._promiseFulfilled(u._value(),s):0!=(16777216&a)?this._promiseRejected(u._reason(),s):this._promiseCancelled(s):o=this._promiseFulfilled(u,s)}o||i._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;n<t.length;++n)t[n]instanceof e&&t[n].cancel()}},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(t){return t},s}},{"./util":36}],24:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t){return!w.test(t)}function i(t){try{return!0===t.__isPromisified__}catch(t){return!1}}function o(t,e,n){var r=h.getDataPropertyOrDefault(t,e+n,b);return!!r&&i(r)}function a(t,e,n){for(var r=0;r<t.length;r+=2){var i=t[r];if(n.test(i))for(var o=i.replace(n,""),a=0;a<t.length;a+=2)if(t[a]===o)throw new y("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}function s(t,e,n,r){for(var s=h.inheritedDataKeys(t),u=[],c=0;c<s.length;++c){var l=s[c],f=t[l],d=r===C||C(l,f,t);"function"!=typeof f||i(f)||o(t,l,e)||!r(l,f,t,d)||u.push(l,f)}return a(u,e,n),u}function u(t,r,i,o,a,s){function u(){var i=r;r===d&&(i=this);var o=new e(n);o._captureStackTrace();var a="string"==typeof l&&this!==c?this[l]:t,u=p(o,s);try{a.apply(i,v(arguments,u))}catch(t){o._rejectCallback(m(t),!0,!0)}return o._isFateSealed()||o._setAsyncGuaranteed(),o}var c=function(){return this}(),l=t;return"string"==typeof l&&(t=o),h.notEnumerableProp(u,"__isPromisified__",!0),u}function c(t,e,n,r,i){for(var o=new RegExp(k(e)+"$"),a=s(t,e,o,n),u=0,c=a.length;u<c;u+=2){var l=a[u],f=a[u+1],p=l+e;if(r===E)t[p]=E(l,d,l,f,e,i);else{var v=r(f,function(){return E(l,d,l,f,e,i)});h.notEnumerableProp(v,"__isPromisified__",!0),t[p]=v}}return h.toFastProperties(t),t}function l(t,e,n){return E(t,e,void 0,t,null,n)}var f,d={},h=t("./util"),p=t("./nodeback"),v=h.withAppended,m=h.maybeWrapAsError,g=h.canEvaluate,y=t("./errors").TypeError,b={__isPromisified__:!0},_=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],w=new RegExp("^(?:"+_.join("|")+")$"),C=function(t){return h.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},k=function(t){return t.replace(/([$])/,"\\$")},E=g?f:u;e.promisify=function(t,e){if("function"!=typeof t)throw new y("expecting a function but got "+h.classString(t));if(i(t))return t;e=Object(e);var n=void 0===e.context?d:e.context,o=!!e.multiArgs,a=l(t,n,o);return h.copyDescriptors(t,a,r),a},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new y("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var n=!!e.multiArgs,r=e.suffix;"string"!=typeof r&&(r="Async");var i=e.filter;"function"!=typeof i&&(i=C);var o=e.promisifier;if("function"!=typeof o&&(o=E),!h.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=h.inheritedDataKeys(t),s=0;s<a.length;++s){var u=t[a[s]];"constructor"!==a[s]&&h.isClass(u)&&(c(u.prototype,r,i,o,n),c(u,r,i,o,n))}return c(t,r,i,o,n)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t){var e,n=!1;if(void 0!==s&&t instanceof s)e=f(t),n=!0;else{var r=l.keys(t),i=r.length;e=new Array(2*i);for(var o=0;o<i;++o){var a=r[o];e[o]=t[a],e[o+i]=a}}this.constructor$(e),this._isMap=n,this._init$(void 0,-3)}function a(t){var n,a=r(t);return c(a)?(n=a instanceof e?a._then(e.props,void 0,void 0,void 0,void 0):new o(a).promise(),a instanceof e&&n._propagateFrom(a,2),n):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var s,u=t("./util"),c=u.isObject,l=t("./es5");"function"==typeof Map&&(s=Map);var f=function(){function t(t,r){this[e]=t,this[e+n]=r,e++}var e=0,n=0;return function(r){n=r.size,e=0;var i=new Array(2*r.size);return r.forEach(t,i),i}}(),d=function(t){for(var e=new s,n=t.length/2|0,r=0;r<n;++r){var i=t[n+r],o=t[r];e.set(i,o)}return e};u.inherits(o,n),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){if(this._values[e]=t,++this._totalResolved>=this._length){var n;if(this._isMap)n=d(this._values);else{n={};for(var r=this.length(),i=0,o=this.length();i<o;++i)n[this._values[i+r]]=this._values[i]}return this._resolve(n),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return a(this)},e.props=function(t){return a(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;o<i;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacity<t},i.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1),this[this._front+e&this._capacity-1]=t,this._length=e+1},i.prototype.push=function(t,e,n){var r=this.length()+3;if(this._willBeOverCapacity(r))return this._pushOne(t),this._pushOne(e),void this._pushOne(n);var i=this._front+r-3;this._checkCapacity(r);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=n,this._length=r},i.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t,r(this,0,this,e,this._front+this._length&e-1)},e.exports=i},{}],27:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t,o){var u=r(t);if(u instanceof e)return s(u);if(null===(t=a.asArray(t)))return i("expecting an array or an iterable object but got "+a.classString(t));var c=new e(n);void 0!==o&&c._propagateFrom(o,3);for(var l=c._fulfill,f=c._reject,d=0,h=t.length;d<h;++d){var p=t[d];(void 0!==p||d in t)&&e.cast(p)._then(l,f,void 0,c,null)}return c}var a=t("./util"),s=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,a){function s(t,n,r,i){this.constructor$(t);var a=d();this._fn=null===a?n:h.domainBind(a,n),void 0!==r&&(r=e.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,this._eachValues=i===o?Array(this._length):0===i?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function u(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function c(t,e,n,i){return"function"!=typeof e?r("expecting a function but got "+h.classString(e)):new s(t,e,n,i).promise()}function l(t){this.accum=t,this.array._gotAccum(t);var n=i(this.value,this.array._promise);return n instanceof e?(this.array._currentCancellable=n,n._then(f,void 0,void 0,this,void 0)):f.call(this,n)}function f(t){var n=this.array,r=n._promise,i=p(n._fn);r._pushContext();var o;(o=void 0!==n._eachValues?i.call(r._boundValue(),t,this.index,this.length):i.call(r._boundValue(),this.accum,t,this.index,this.length))instanceof e&&(n._currentCancellable=o);var s=r._popContext();return a.checkForgottenReturns(o,s,void 0!==n._eachValues?"Promise.each":"Promise.reduce",r),o}var d=e._getDomain,h=t("./util"),p=h.tryCatch;h.inherits(s,n),s.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},s.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},s.prototype._init=function(){},s.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},s.prototype.shouldCopyValues=function(){return!1},s.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},s.prototype._resultCancelled=function(t){if(t===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel())},s.prototype._iterate=function(t){this._values=t;var n,r,i=t.length;if(void 0!==this._initialValue?(n=this._initialValue,r=0):(n=e.resolve(t[0]),r=1),this._currentCancellable=n,!n.isRejected())for(;r<i;++r){var o={accum:null,value:t[r],index:r,length:i,array:this};n=n._then(l,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(u,u,void 0,n,this)},e.prototype.reduce=function(t,e){return c(this,t,e,null)},e.reduce=function(t,e,n,r){return c(t,e,n,r)}}},{"./util":36}],29:[function(t,i,o){"use strict";var a,s=t("./util"),u=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},c=s.getNativePromise();if(s.isNode&&"undefined"==typeof MutationObserver){var l=n.setImmediate,f=e.nextTick;a=s.isRecentNode?function(t){l.call(n,t)}:function(t){f.call(e,t)}}else if("function"==typeof c&&"function"==typeof c.resolve){var d=c.resolve();a=function(t){d.then(t)}}else a="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?void 0!==r?function(t){r(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:u:function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div");new MutationObserver(function(){t.classList.toggle("foo"),n=!1}).observe(r,e);var i=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),i()}}();i.exports=a},{"./util":36}],30:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t)}var o=e.PromiseInspection;t("./util").inherits(i,n),i.prototype._promiseResolved=function(t,e){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},i.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||e<0)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new i(t),o=n.promise();return n.setHowMany(e),n.init(),o}var a=t("./util"),s=t("./errors").RangeError,u=t("./errors").AggregateError,c=a.isArray,l={};a.inherits(i,n),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=c(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new u,e=this.length();e<this._values.length;++e)this._values[e]!==l&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new s(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},a=e.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=e.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},t.prototype.isPending=function(){return a.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return s.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(l(t)){if(t instanceof e)return t;var i=o(t);if(i===c){r&&r._pushContext();var u=e.reject(i.e);return r&&r._popContext(),u}if("function"==typeof i){if(a(t)){var u=new e(n);return t._then(u._fulfill,u._reject,void 0,u,null),u}return s(t,i,r)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(t){return c.e=t,c}}function a(t){try{return f.call(t,"_promise0")}catch(t){return!1}}function s(t,r,i){function o(t){s&&(s._resolveCallback(t),s=null)}function a(t){s&&(s._rejectCallback(t,f,!0),s=null)}var s=new e(n),l=s;i&&i._pushContext(),s._captureStackTrace(),i&&i._popContext();var f=!0,d=u.tryCatch(r).call(t,o,a);return f=!1,s&&d===c&&(s._rejectCallback(d.e,!0,!0),s=null),l}var u=t("./util"),c=u.errorObj,l=u.isObject,f={}.hasOwnProperty;return r}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function a(t){throw clearTimeout(this.handle),t}var s=t("./util"),u=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var c=function(t){return l(+this).thenReturn(t)},l=e.delay=function(t,o){var a,s;return void 0!==o?(a=e.resolve(o)._then(c,null,null,t,void 0),r.cancellation()&&o instanceof e&&a._setOnCancel(o)):(a=new e(n),s=setTimeout(function(){a._fulfill()},+t),r.cancellation()&&a._setOnCancel(new i(s)),a._captureStackTrace()),a._setAsyncGuaranteed(),a};e.prototype.delay=function(t){return l(t,this)};var f=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new u("operation timed out"):new u(e),s.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};e.prototype.timeout=function(t,e){t=+t;var n,s,u=new i(setTimeout(function(){n.isPending()&&f(n,e,s)},t));return r.cancellation()?(s=this.then(),n=s._then(o,a,void 0,u,void 0),n._setOnCancel(u)):n=this._then(o,a,void 0,u,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,a){function s(t){setTimeout(function(){throw t},0)}function u(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function c(t,n){function i(){if(a>=c)return l._fulfill();var o=u(t[a++]);if(o instanceof e&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),t.promise)}catch(t){return s(t)}if(o instanceof e)return o._then(i,s,null,null,null)}i()}var a=0,c=t.length,l=new e(o);return i(),l}function l(t,e,n){this._data=t,this._promise=e,this._context=n}function f(t,e,n){this.constructor$(t,e,n)}function d(t){return l.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function h(t){this.length=t,this.promise=null,this[t-1]=null}var p=t("./util"),v=t("./errors").TypeError,m=t("./util").inherits,g=p.errorObj,y=p.tryCatch,b={};l.prototype.data=function(){return this._data},l.prototype.promise=function(){return this._promise},l.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():b},l.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==b?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},l.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},m(f,l),f.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},h.prototype._resultCancelled=function(){for(var t=this.length,n=0;n<t;++n){var r=this[n];r instanceof e&&r.cancel()}},e.using=function(){var t=arguments.length;if(t<2)return n("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return n("expecting a function but got "+p.classString(i));var o,s=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,s=!1):(o=arguments,t--);for(var u=new h(t),f=0;f<t;++f){var v=o[f];if(l.isDisposer(v)){var m=v;v=v.promise(),v._setDisposable(m)}else{var b=r(v);b instanceof e&&(v=b._then(d,null,null,{resources:u,index:f},void 0))}u[f]=v}for(var _=new Array(u.length),f=0;f<_.length;++f)_[f]=e.resolve(u[f]).reflect();var w=e.all(_).then(function(t){for(var e=0;e<t.length;++e){var n=t[e];if(n.isRejected())return g.e=n.error(),g;if(!n.isFulfilled())return void w.cancel();t[e]=n.value()}C._pushContext(),i=y(i);var r=s?i.apply(void 0,t):i(t),o=C._popContext();return a.checkForgottenReturns(r,o,"Promise.using",C),r}),C=w.lastly(function(){var t=new e.PromiseInspection(w);return c(u,t)});return u.promise=C,C._setOnCancel(u),C},e.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(131072&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new f(t,this,i());throw new v}}},{"./errors":12,"./util":36}],36:[function(t,r,i){"use strict";function o(){try{var t=P;return P=null,t.apply(this,arguments)}catch(t){return A.e=t,A}}function a(t){return P=t,o}function s(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function u(t){return"function"==typeof t||"object"==typeof t&&null!==t}function c(t){return s(t)?new Error(y(t)):t}function l(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;n<r;++n)i[n]=t[n];return i[n]=e,i}function f(t,e,n){if(!S.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function d(t,e,n){if(s(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return S.defineProperty(t,e,r),t}function h(t){throw t}function p(t){try{if("function"==typeof t){var e=S.names(t.prototype),n=S.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=M.test(t+"")&&S.names(t).length>0;if(n||r||i)return!0}return!1}catch(t){return!1}}function v(t){function e(){}e.prototype=t;for(var n=8;n--;)new e;return t}function m(t){return R.test(t)}function g(t,e,n){for(var r=new Array(t),i=0;i<t;++i)r[i]=e+i+n;return r}function y(t){try{return t+""}catch(t){return"[no string representation]"}}function b(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function _(t){try{d(t,"isOperational",!0)}catch(t){}}function w(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===t.isOperational)}function C(t){return b(t)&&S.propertyIsWritable(t,"stack")}function k(t){return{}.toString.call(t)}function E(t,e,n){for(var r=S.names(t),i=0;i<r.length;++i){var o=r[i];if(n(o))try{S.defineProperty(e,o,S.getDescriptor(t,o))}catch(t){}}}function x(t){return H?Object({NODE_ENV:"production"})[t]:void 0}function j(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(t){}}function O(t,e){return t.bind(e)}var S=t("./es5"),T="undefined"==typeof navigator,A={e:{}},P,N="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:void 0!==this?this:null,D=function(t,e){function n(){this.constructor=t,this.constructor$=e;for(var n in e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}var r={}.hasOwnProperty;return n.prototype=e.prototype,t.prototype=new n,t.prototype},F=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var n=0;n<t.length;++n)if(t[n]===e)return!0;return!1};if(S.isES5){var n=Object.getOwnPropertyNames;return function(t){for(var r=[],i=Object.create(null);null!=t&&!e(t);){var o;try{o=n(t)}catch(t){return r}for(var a=0;a<o.length;++a){var s=o[a];if(!i[s]){i[s]=!0;var u=Object.getOwnPropertyDescriptor(t,s);null!=u&&null==u.get&&null==u.set&&r.push(s)}}t=S.getPrototypeOf(t)}return r}}var r={}.hasOwnProperty;return function(n){if(e(n))return[];var i=[];t:for(var o in n)if(r.call(n,o))i.push(o);else{for(var a=0;a<t.length;++a)if(r.call(t[a],o))continue t;i.push(o)}return i}}(),M=/this\s*\.\s*\S+\s*=/,R=/^[a-z$_][a-z$_0-9]*$/i,L=function(){return"stack"in new Error?function(t){return C(t)?t:new Error(y(t))}:function(t){if(C(t))return t;try{throw new Error(y(t))}catch(t){return t}}}(),I=function(t){return S.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var B="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,n=[],r=t[Symbol.iterator]();!(e=r.next()).done;)n.push(e.value);return n};I=function(t){return S.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?B(t):null}}var z=void 0!==e&&"[object process]"===k(e).toLowerCase(),H=void 0!==e&&!0,q={isClass:p,isIdentifier:m,inheritedDataKeys:F,getDataPropertyOrDefault:f,thrower:h,isArray:S.isArray,asArray:I,notEnumerableProp:d,isPrimitive:s,isObject:u,isError:b,canEvaluate:T,errorObj:A,tryCatch:a,inherits:D,withAppended:l,maybeWrapAsError:c,toFastProperties:v,filledRange:g,toString:y,canAttachTrace:C,ensureErrorObject:L,originatesFromRejection:w,markAsOriginatingFromRejection:_,classString:k,copyDescriptors:E,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:z,hasEnvVariables:H,env:x,global:N,getNativePromise:j,domainBind:O};q.isRecentNode=q.isNode&&function(){var t=e.versions.node.split(".").map(Number);return 0===t[0]&&t[1]>10||t[0]>0}(),q.isNode&&q.toFastProperties(e);try{throw new Error}catch(t){q.lastLineError=t}r.exports=q},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(e,n(53),n(44),n(184).setImmediate)},function(t,e,n){function r(t,e){this._id=t,this._clearFn=e}var i=Function.prototype.apply;e.setTimeout=function(){return new r(i.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new r(i.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(185),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";function r(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var r={callback:t,args:e};return c[u]=r,s(u),u++}function i(t){delete c[t]}function o(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}function a(t){if(l)setTimeout(a,0,t);else{var e=c[t];if(e){l=!0;try{o(e)}finally{i(t),l=!1}}}}if(!t.setImmediate){var s,u=1,c={},l=!1,f=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?function(){s=function(t){e.nextTick(function(){a(t)})}}():function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?function(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"==typeof n.data&&0===n.data.indexOf(e)&&a(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),s=function(n){t.postMessage(e+n,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){a(t.data)},s=function(e){t.port2.postMessage(e)}}():f&&"onreadystatechange"in f.createElement("script")?function(){var t=f.documentElement;s=function(e){var n=f.createElement("script");n.onreadystatechange=function(){a(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():function(){s=function(t){setTimeout(a,0,t)}}(),d.setImmediate=r,d.clearImmediate=i}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,n(44),n(53))},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();!function(){scrivito.PublicPromise=function(){function t(e){r(this,t),this._internalPromise=e}return i(t,null,[{key:"all",value:function(t){return new scrivito.PublicPromise(scrivito.Promise.all(t))}},{key:"race",value:function(t){return new scrivito.PublicPromise(scrivito.Promise.race(t))}},{key:"resolve",value:function(t){return new scrivito.PublicPromise(scrivito.Promise.resolve(t))}},{key:"reject",value:function(t){return new scrivito.PublicPromise(scrivito.Promise.reject(t))}}]),i(t,[{key:"then",value:function(t,e){return new scrivito.PublicPromise(this._internalPromise.then(t,e))}},{key:"catch",value:function(t){return new scrivito.PublicPromise(this._internalPromise.catch(t))}}]),t}()}()},function(t,e,n){"use strict";var r=n(0),i=function(t){return t&&t.__esModule?t:{default:t}}(r);!function(){function t(t,e,r){return n?t:i.default.throttle(t,e,r)}function e(){n=!0}var n=!1;scrivito.throttle=t,scrivito.bypassThrottle=e}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=n(32),a=r(o),s=n(0),u=r(s),c=n(1);!function(){scrivito.typeInfo={normalize:function(t){if(u.default.isString(t))return[t];if(u.default.isArray(t))return t;throw new c.InternalError("Type Info needs to be a string or an array containing a string and optionally a hash")},normalizeAttrs:function(t){var e=this;return u.default.mapObject(t,function(t,n){var r=i(t,2),o=r[0],s=r[1];return a.default.isSystemAttribute(n)?[o]:[o,e.normalize(s)]})},unwrapAttributes:function(t){return u.default.mapObject(t,function(t){return i(t,1)[0]})}}}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(3),o=r(i),a=n(14),s=r(a),u=n(24),c=r(u),l=n(0),f=r(l);!function(){function t(n,r){return f.default.isArray(r)?f.default.map(r,function(e){return t(n,e)}):r instanceof o.default?e(r,n.objClassFor(r.objClass())):r instanceof s.default?e(r,n.widgetClassFor(r.objClass())):r instanceof c.default?n.defaultClassForLinks.build(r.buildAttributes()):r}function e(t,e){var n=Object.create(e.prototype);return n._scrivitoPrivateContent=t,n}function n(t){return f.default.isArray(t)?f.default.map(t,r):r(t)}function r(t){return t&&t._scrivitoPrivateContent?t._scrivitoPrivateContent:t}scrivito.wrapInAppClass=t,scrivito.unwrapAppClassValues=n,scrivito.buildAppClassInstance=e}()},function(t,e,n){"use strict";function r(t,e){var n=l[t];if(n)return n[e]}function i(t,e){v(t,e);var n=o.getWindowRegistry().objClassNameFor(t);if(!n)throw new a.ArgumentError("Expected an Obj or Widget class.");l[n]=e}Object.defineProperty(e,"__esModule",{value:!0});var o=n(58),a=n(1),s=n(101),u=n(287),c=n(288),l={};e.getUiConfigPropertyFor=r;var f=s.struct({value:s.String,title:s.String}),d=s.dict(s.String,s.struct({title:s.maybe(s.String),description:s.maybe(s.String),values:s.maybe(s.list(f))})),h=s.list(s.struct({title:s.String,component:s.maybe(s.String),properties:s.maybe(s.list(s.String))})),p=s.struct({attributesConfig:s.maybe(d),propertiesGroups:s.maybe(h),title:s.maybe(s.String),description:s.maybe(s.String),thumbnail:s.maybe(s.String),titleForContent:s.maybe(s.Function),descriptionForContent:s.maybe(s.Function),thumbnailForContent:s.maybe(s.Function),generalProperties:s.maybe(s.list(s.String))}),v=c.checkArgumentsFor("provideEditingConfig",[["appClass",u.AppClass],["editingConfig",p]],{docPermalink:"js-sdk/provideEditingConfig"});e.provideEditingConfig=i},function(t,e,n){function r(t,e){return"function"==typeof e?i(e):e}var i=n(62);t.exports=function(t){try{return JSON.stringify(t,r,2)}catch(e){return String(t)}}},function(t,e,n){var r=n(22),i=n(76);t.exports=r("Boolean",i)},function(t,e,n){var r=n(22),i=n(33);t.exports=r("Nil",i)},function(t,e,n){var r=n(22),i=n(195);t.exports=r("Number",i)},function(t,e){t.exports=function(t){return"number"==typeof t&&isFinite(t)&&!isNaN(t)}},function(t,e,n){var r=n(19);t.exports=function(t){return r(t)&&"union"===t.meta.kind}},function(t,e,n){function r(t){return"Array<"+a(t)+">"}function i(t,e){function n(e,n){if(f)return e;for(var r=!0,i=[],o=0,a=e.length;o<a;o++){var s=e[o],c=u(t,s,null);r=r&&s===c,i.push(c)}return r&&(i=e),i}var i=e||r(t),f=(a(t),s(t));return n.meta={kind:"list",type:t,name:e,identity:f},n.displayName=i,n.is=function(e){return l(e)&&e.every(function(e){return c(e,t)})},n.update=function(t,e){return n(o.update(t,e))},n}var o=n(7),a=(n(27),n(18),n(16)),s=n(40),u=n(41),c=n(42),l=n(39);i.getDefaultName=r,t.exports=i},function(t,e,n){function r(t){return"{"+Object.keys(t).map(function(e){return e+": "+i(t[e])}).join(", ")+"}"}var i=n(16);t.exports=r},function(t,e,n){function r(t,e,n){var r=t.reduce(function(t,e){return l(t,e)},e);return n&&(r.displayName=n,r.meta.name=n),r}function i(t){return c(t)?t:t.meta.props}function o(t){return c(t)?null:t.meta.defaultProps}function a(t,e){Array.prototype.push.apply(t,e)}function s(t,e,n){var s={},c={},l=[],d={};e.forEach(function(t,e){var n=f(t),r=n.unrefinedType;a(l,n.predicates),u(s,i(r)),u(c,r.prototype),u(d,o(r),!0)}),n=t.getOptions(n),n.defaultProps=u(d,n.defaultProps,!0);var h=r(l,t(s,{strict:n.strict,defaultProps:n.defaultProps}),n.name);return u(h.prototype,c),h}var u=(n(7),n(18),n(39),n(106)),c=(n(278),n(279),n(38)),l=n(103),f=n(280);t.exports=s},function(t,e,n){function r(t){return"["+t.map(a).join(", ")+"]"}function i(t,e){function n(e,n){if(a)return e;for(var r=!0,i=[],o=0,s=t.length;o<s;o++){var u=t[o],l=e[o],f=c(u,l,null);r=r&&l===f,i.push(f)}return r&&(i=e),i}var i=e||r(t),a=t.every(s);return n.meta={kind:"tuple",types:t,name:e,identity:a},n.displayName=i,n.is=function(e){return u(e)&&e.length===t.length&&t.every(function(t,n){return l(e[n],t)})},n.update=function(t,e){return n(o.update(t,e))},n}var o=n(7),a=(n(27),n(18),n(16)),s=n(40),u=n(39),c=n(41),l=n(42);i.getDefaultName=r,t.exports=i},function(t,e){function n(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}t.exports=n},function(t,e,n){"use strict";function r(t,e){if(!h){var n=(0,u.getById)(t);if(!n)throw new s.ArgumentError('Component with ID "'+t+'" not found. Please make sure you registered it using "Scrivito.registerComponent".');var r=void 0,i=void 0;e.widgetId?i=(0,c.getWindowContext)().Obj.get(e.objId).widget(e.widgetId):r=(0,c.getWindowContext)().Obj.get(e.objId),h=!0;var o=a((0,l.getDocument)(),n,{obj:r,widget:i});(0,d.default)(o,function(){return scrivito.uiAdapter.notifyDocumentResize()}),scrivito.uiAdapter.notifyDocumentResize()}}function i(){return h}function o(){h=!1}function a(t,e,n){var r=t.createElement("div");return t.body.innerHTML="",t.body.appendChild(r),ReactDOM.render(React.createElement(e,n),r),r}Object.defineProperty(e,"__esModule",{value:!0}),e.reset=e.isComponentMounted=e.mountComponent=void 0;var s=n(1),u=n(64),c=n(37),l=n(46),f=n(290),d=function(t){return t&&t.__esModule?t:{default:t}}(f),h=!1;e.mountComponent=r,e.isComponentMounted=i,e.reset=o},function(t,e,n){"use strict";function r(t){var e=t.endpoint,n=t.forceVerification,r=t.homepage,a=t.routingBasePath,s=t.routingMethod,u=t.tenant;if(!u)throw new f.ArgumentError('Required configuration "tenant" missing.');scrivito.CmsRestApi.init(e||"api.scrivito.com",u),n&&scrivito.CmsRestApi.enableForceVerification(),scrivito.RoutingPath.init(i(r)),scrivito.Routing.init(o(s,a)),d=!0}function i(t){if(!t)return function(){return c.default.root()};if(!(0,l.isFunction)(t))throw new f.ArgumentError('The "homepage" configuration option is invalid. Please provide a function returning a "scrivito.Obj", e.g. "() => scrivito.Obj.findByPath(\'/en\')"');return t}function o(t,e){if(t&&!(0,l.contains)(["path","hash"],t))throw new f.ArgumentError('Expected the configuration option "routingMethod" to be set to "hash" or "path", but saw "'+t+'" instead.');if(e&&!(0,l.isString)(e))throw new f.ArgumentError('Configuration "routingBasePath" needs to be a String.');return{routingMethod:t,routingBasePath:e}}function a(){return d}function s(){d=!1}Object.defineProperty(e,"__esModule",{value:!0}),e.resetIsConfigured=e.isConfigured=e.configure=void 0;var u=n(3),c=function(t){return t&&t.__esModule?t:{default:t}}(u),l=n(0),f=n(1),d=!1;e.configure=r,e.isConfigured=a,e.resetIsConfigured=s},function(t,e,n){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function i(){return++f}function o(t){var e=i();d[e]=t;var n=s(),o=n.get()||[];n.set([].concat(r(o),[e]))}function a(t){var e=s().get();if(e){var n=(0,c.find)(e,function(e){return d[e]&&d[e].canEdit(t)});if(n){return{id:n,editorClass:d[n]}}}}function s(){return l.appState.subState("editors")}function u(){f=0,d={},s().clear()}Object.defineProperty(e,"__esModule",{value:!0}),e.registerEditor=e.editorRegistrationFor=e.clearEditorRegistry=void 0;var c=n(0),l=n(4),f=0,d={};e.clearEditorRegistry=u,e.editorRegistrationFor=a,e.registerEditor=o},function(t,e,n){"use strict";function r(t){return"function"==typeof t&&t.prototype&&t.prototype.isReactComponent}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e,n){"use strict";function r(t,e){var n=e.from;t.displayName=n.displayName||n.name}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(24),c=r(u),l=n(17),f=r(l),d=n(0),h=n(74),p=r(h),v=n(6),m=r(v),g=n(208),y=r(g),b=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n._onClick=n._onClick.bind(n),n}return a(e,t),s(e,[{key:"render",value:function(){return f.default.createElement("a",this._linkProps(),this.props.children)}},{key:"_linkProps",value:function(){var t=(0,d.omit)(this.props,"to");return t.href=this._href(),t.onClick=this._onClick,t.target=this._target(),t}},{key:"_href",value:function(){return this.props.to?scrivito.urlFor(this.props.to):"#"}},{key:"_onClick",value:function(t){if(!(0,y.default)(t)&&(t.preventDefault(),this.props.to)){var e=this._target();e?scrivito.openLocation(this._href(),e):(0,p.default)(this.props.to)}}},{key:"_target",value:function(){return this.props.target?this.props.target:this.props.to&&this.props.to._scrivitoPrivateContent instanceof c.default?this.props.to.target():void 0}}]),e}(f.default.Component);b.displayName="Scrivito.LinkTag",e.default=(0,m.default)(b)},function(t,e,n){"use strict";function r(t){return t.ctrlKey||t.metaKey||t.shiftKey||t.which===i}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var i=2},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(65),c=r(u),l=n(23),f=r(l),d=n(0),h=n(17),p=r(h),v=n(1),m=n(210),g=r(m),y=n(6),b=r(y),_=n(204),w=n(211),C=r(w),k=n(314),E=r(k),x=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),s(e,[{key:"render",value:function(){var t=f.default.basicFieldFor(this.props.content,this.props.attribute);if(!t){var e=this.props.attribute;throw new v.ArgumentError('Component "Scrivito.ContentTag" received prop "attribute" with invalid value: Attribute "'+e+'" is not defined for content specified in prop "content".')}var n=void 0,r=void 0,i=(0,_.editorRegistrationFor)({type:t.type(),tag:this.props.tag});return i&&(n=i.id,r=i.editorClass),(0,c.default)()?p.default.createElement(E.default,{key:this._editorKey(n),field:t,editorClass:r,tag:this.props.tag,customProps:this._customProps(),content:this.props.content},this.props.children):p.default.createElement(C.default,{field:t,tag:this.props.tag,customProps:this._customProps()},this.props.children)}},{key:"_customProps",value:function(){return(0,d.omit)(this.props,"content","attribute","tag")}},{key:"_editorKey",value:function(t){var e=scrivito.unwrapAppClassValues(this.props.content);return[this.props.tag,(0,g.default)(e),this.props.attribute,t].join("|")}}]),e}(p.default.Component);x.displayName="Scrivito.ContentTag",x.defaultProps={tag:"div"},e.default=(0,b.default)(x)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(t instanceof a.default)return t.id();if(t instanceof u.default)return t.obj().id()+"|"+t.id();var e=(0,f.default)(t).substr(0,100);throw new c.InternalError('keyForBasicContent called with "'+e+'". Expected an instance of BasicObj or BasicWidget.')}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var o=n(3),a=r(o),s=n(14),u=r(s),c=n(1),l=n(21),f=r(l)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(65),c=r(u),l=n(107),f=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(l),d=n(0),h=n(17),p=r(h),v=n(74),m=r(v),g=n(6),y=r(g),b=n(208),_=r(b),w=n(310),C=r(w),k=n(313),E=r(k),x=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n._onClick=n._onClick.bind(n),n}return a(e,t),s(e,[{key:"render",value:function(){switch(this.props.field.type()){case"html":return this._renderHtml();case"string":return this._renderString();case"widgetlist":return this._renderWidgetlist();default:return this._renderContent({children:this.props.children})}}},{key:"_renderHtml",value:function(){if(this.props.children)return this._renderContent({children:this.props.children});var t=f.transformHTML(this._attributeValue()),e={dangerouslySetInnerHTML:{__html:t},onClick:this._onClick};return this._renderContent({props:e})}},{key:"_onClick",value:function(t){if(!(0,_.default)(t)){var e=f.findTarget(t.target,t.currentTarget);e&&(t.preventDefault(),t.stopPropagation(),(0,m.default)(e))}}},{key:"_renderString",value:function(){return this._renderContent({children:this.props.children||this._attributeValue()})}},{key:"_renderWidgetlist",value:function(){var t=void 0,e=this._attributeValue();return e.length?t=e.map(function(t){return p.default.createElement(C.default,{key:t.id(),widget:t})}):(0,c.default)()&&(t=p.default.createElement(E.default,{field:this.props.field})),this._renderContent({children:t})}},{key:"_renderContent",value:function(t){var e=t.props,n=t.children,r=(0,d.extend)({},this.props.customProps,e,this._editingProps());return p.default.createElement(this.props.tag,r,n)}},{key:"_editingProps",value:function(){return this.props.onClick?{onClick:this.props.onClick}:{}}},{key:"_attributeValue",value:function(){return this.props.field.get()}}]),e}(p.default.Component);x.displayName="Scrivito.ContentTag.AttributeValue",e.default=(0,y.default)(x)},function(t,e,n){"use strict";function r(t){t.dataTransfer.effectAllowed="move";try{t.dataTransfer.setData("text/plain",t.target.id)}catch(t){}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(17),c=r(u),l=n(6),f=r(l),d=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n._onClick=n._onClick.bind(n),n}return a(e,t),s(e,[{key:"render",value:function(){var t="scrivito_option_marker scrivito_"+this.props.position;return this.props.isAlwaysShown&&(t+=" scrivito_visible"),c.default.createElement("span",{className:t,onClick:this._onClick},c.default.createElement("i",{className:"scrivito_icon scrivito_icon_marker_plus"}))}},{key:"_onClick",value:function(t){t.preventDefault(),t.stopPropagation(),this.props.insertWidget(this.props.widget,this.props.position)}}]),e}(c.default.Component);d.displayName="Scrivito.OptionMarker",e.default=(0,f.default)(d)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(50),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function(){function t(e,n){r(this,t),this.domNode=e,this.controller=n}return i(t,[{key:"content",value:function(){return this.controller.content}},{key:"idFromPath",value:function(t){if(t.match(/^objid:/))return t.replace(/^objid:/,"")}},{key:"edQuery",value:function(){return a.default.apply(void 0,arguments)}},{key:"jQueryElement",value:function(){return this.edQuery(this.domNode)}},{key:"pathForId",value:function(t){return"objid:"+t}},{key:"save",value:function(t){this.controller.content=t;var e={done:function(t){return t(),e}};return e}},{key:"trigger",value:function(){}}]),t}();e.default=s},function(t,e,n){"use strict";function r(t){var e=(0,o.default)(t);e.not("[data-scrivito-editors-placeholder]")&&e.attr("data-scrivito-editors-placeholder","Click to edit")}Object.defineProperty(e,"__esModule",{value:!0});var i=n(50),o=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=r},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function r(){window.scrivito||(window.scrivito={}),window.scrivito.on||(window.scrivito.on=function(t,e){"content"===t&&document.addEventListener("DOMContentLoaded",function(){return e(window.document)})}),window.scrivito.in_editable_view||(window.scrivito.in_editable_view=function(){return!1})}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e,n){"use strict";function r(t){t&&(t.setAppAdapter(scrivito.AppAdapter),scrivito.uiAdapter=t.uiAdapter()),scrivito.client.init({ui:t,realmContext:window.Scrivito}),document.addEventListener("DOMContentLoaded",function(){return scrivito.BrowserLocation.init()})}function i(){(0,o.loadCss)("/scrivito/scrivito_editing.css"),(0,o.loadJs)("/scrivito/scrivito_editing.js")}Object.defineProperty(e,"__esModule",{value:!0}),e.initializeSdk=r,e.loadEditing=i,n(138),n(261),n(299),n(302);var o=n(97);window.scrivito||(window.scrivito={})},function(t,e,n){"use strict";n(262),n(263),n(294),n(295),n(296),n(297),n(298)},function(t,e,n){"use strict";window.scrivito||(window.scrivito={}),window.scrivito.AppSupport={}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=n(23),a=r(o),s=n(0),u=r(s),c=n(74),l=r(c),f=n(190),d=n(37),h=n(202),p=n(292),v=r(p),m=n(46),g=n(107);!function(){function t(t,i,o){var s=a.default.forClass(o),c={name:i,type:t,attributes:e(s,u.default.keys(s.attributes)),validContainerClasses:s.validContainerClasses};return n(c,i),r(c,i),c}function e(t,e){return e.map(function(e){var n=t.attributeDefinition(e),r=i(n,2),o=r[0],a=r[1],s={name:e,type:o};return a&&(a.only&&(s.only=a.only),a.values&&(s.values=a.values)),s})}function n(t,e){p.forEach(function(n){var r=(0,f.getUiConfigPropertyFor)(e,n);r&&(t[n]=r)})}function r(t,e){var n=(0,f.getUiConfigPropertyFor)(e,"attributesConfig");n&&Object.keys(n).forEach(function(e){var r=u.default.findWhere(t.attributes,{name:e});if(r){var i=n[e],o=i.title,a=i.description,s=i.values,c={title:o,description:a};s&&(c.valuesLocalization=s),u.default.extend(r,c)}})}function o(t,e){return s(t,(0,d.getWindowContext)().Obj.getIncludingDeleted(e))}function s(t,e){var n=(0,f.getUiConfigPropertyFor)(e.objClass(),t);if(n)return n(e)}function c(t){var e={obj_id:t.obj.id()};return t.url.fragment()&&(e.fragment=t.url.fragment()),t.url.search()&&(e.query=t.url.search()),e}var p=["title","description","thumbnail"],y={titleForClass:function(t){return(0,f.getUiConfigPropertyFor)(t,"title")},propertiesGroupsForClass:function(t){return(0,f.getUiConfigPropertyFor)(t,"propertiesGroups")},generalPropertiesForClass:function(t){return(0,f.getUiConfigPropertyFor)(t,"generalProperties")},titleForObj:function(t){return o("titleForContent",t)},descriptionForObj:function(t){return o("descriptionForContent",t)},titleForWidget:function(t,e){return s("titleForContent",(0,d.getWindowContext)().Obj.getIncludingDeleted(t).widget(e))},thumbnailForObj:function(t){return o("thumbnailForContent",t)},urlForLink:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.objId,n=t.query,r=t.fragment,i=(0,d.getWindowContext)().Obj.getIncludingDeleted(e);return scrivito.urlFor(i,{query:n,fragment:r})},getClasses:function(){var e=(0,d.getWindowContext)(),n=[];return u.default.each(e.allObjClasses(),function(e,r){return n.push(t("Obj",r,e))}),u.default.each(e.allWidgetClasses(),function(e,r){return n.push(t("Widget",r,e))}),n},navigateTo:function(t){(0,l.default)(function(){return(0,d.getWindowContext)().Obj.get(t)})},mountComponent:h.mountComponent,resolveUrl:function(t){return(0,v.default)(t).then(function(t){return t&&t.obj?c(t):null})},getDocumentHeight:function(){return(0,m.getDocument)().querySelector("html").getBoundingClientRect().height},transformHTML:function(t){return(0,g.transformHTML)(t)}};scrivito.AppAdapter=y}()},function(t,e,n){"use strict";function r(){window.scrollTo(0,0)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e){t.exports=function(t){throw new TypeError("[tcomb] "+t)}},function(t,e,n){var r=n(22),i=n(39);t.exports=r("Array",i)},function(t,e,n){var r=n(22);t.exports=r("Date",function(t){return t instanceof Date})},function(t,e,n){var r=n(22);t.exports=r("Error",function(t){return t instanceof Error})},function(t,e,n){var r=n(103),i=n(194);t.exports=r(i,function(t){return t%1==0},"Integer")},function(t,e,n){var r=n(22),i=n(38);t.exports=r("Object",i)},function(t,e,n){var r=n(22);t.exports=r("RegExp",function(t){return t instanceof RegExp})},function(t,e,n){var r=n(22),i=n(19);t.exports=r("Type",i)},function(t,e,n){var r=(n(7),n(27),n(19),n(33),n(106)),i=n(16),o=n(196),a=1;t.exports=function(t){function e(t,e){return n(t,e)}var n;return e.define=function(i){return o(i)&&e.hasOwnProperty("dispatch")&&(i.dispatch=e.dispatch),n=i,r(e,n,!0),t&&(n.displayName=e.displayName=t,e.meta.name=t),e.meta.identity=n.meta.identity,e.prototype=n.prototype,e},e.displayName=t||i(e)+"$"+a++,e.meta={identity:!1},e.prototype=null,e}},function(t,e,n){function r(t){return Object.keys(t).map(function(t){return o.stringify(t)}).join(" | ")}function i(t,e){function n(t,e){return t}var i=e||r(t);return n.meta={kind:"enums",map:t,name:e,identity:!0},n.displayName=i,n.is=function(e){return t.hasOwnProperty(e)},n}var o=n(7),a=(n(27),n(63),n(75));n(38);i.of=function(t,e){t=a(t)?t.split(" "):t;var n={};return t.forEach(function(t){n[t]=t}),i(n,e)},i.getDefaultName=r,t.exports=i},function(t,e,n){function r(t){return"?"+f(t)}function i(t,e){function n(e,n){return c.is(e)?e:u(t,e,n)}if(o(t)||t===s||t===c)return t;var i=e||r(t),f=a(t);return n.meta={kind:"maybe",type:t,name:e,identity:f},n.displayName=i,n.is=function(e){return c.is(e)||l(e,t)},n}var o=(n(7),n(27),n(18),n(276)),a=n(40),s=n(102),u=n(41),c=n(193),l=(n(63),n(42)),f=n(16);i.getDefaultName=r,t.exports=i},function(t,e,n){var r=n(19);t.exports=function(t){return r(t)&&"maybe"===t.meta.kind}},function(t,e,n){function r(t){return"Struct"+f(t)}function i(t,e){return d(a,t,e)}function o(t){return u(t)||(t=c(t)?{}:{name:t}),t.hasOwnProperty("strict")||(t.strict=a.strict),t.hasOwnProperty("defaultProps")||(t.defaultProps={}),t}function a(t,e){function n(e,r){if(n.is(e))return e;if(!(this instanceof n))return new n(e,r);for(var i in t)if(t.hasOwnProperty(i)){var o=t[i],a=e[i];void 0===a&&(a=c[i]),this[i]=l(o,a,null)}}e=o(e);var a=e.name,u=e.strict,c=e.defaultProps,f=a||r(t);return n.meta={kind:"struct",props:t,name:a,identity:!1,strict:u,defaultProps:c},n.displayName=f,n.is=function(t){return t instanceof n},n.update=function(t,e){return new n(s.update(t,e))},n.extend=function(t,e){return i([n].concat(t),e)},n}var s=n(7),u=(n(27),n(104),n(77),n(76),n(38)),c=n(33),l=n(41),f=(n(16),n(105),n(198)),d=n(199);a.strict=!1,a.getOptions=o,a.getDefaultName=r,a.extend=i,t.exports=a},function(t,e,n){var r=n(19);t.exports=function(t){return r(t)&&"struct"===t.meta.kind}},function(t,e,n){var r=n(19);t.exports=function(t){return r(t)&&"interface"===t.meta.kind}},function(t,e,n){function r(t){return s(t)&&"subtype"===t.meta.kind}function i(t){return r(t)?[t.meta.predicate].concat(i(t.meta.type)):[]}function o(t){return r(t)?o(t.meta.type):t}function a(t){return{predicates:i(t),unrefinedType:o(t)}}var s=n(19);t.exports=a},function(t,e,n){function r(t){return t.map(a).join(" | ")}function i(t,e){function n(t,e){if(a)return t;var r=n.dispatch(t);return!r&&n.is(t)?t:u(r,t,e)}var i=e||r(t),a=t.every(s);return n.meta={kind:"union",types:t,name:e,identity:a},n.displayName=i,n.is=function(e){return t.some(function(t){return c(e,t)})},n.dispatch=function(e){for(var n=0,r=t.length;n<r;n++){var i=t[n];if(l(i)){var o=i.dispatch(e);if(!f(o))return o}else if(c(e,i))return i}},n.update=function(t,e){return n(o.update(t,e))},n}var o=n(7),a=(n(27),n(18),n(16)),s=n(40),u=(n(39),n(41)),c=n(42),l=(n(63),n(196)),f=n(33);i.getDefaultName=r,t.exports=i},function(t,e,n){function r(t,e){return"("+t.map(d).join(", ")+") => "+d(e)}function i(t){return s.is(t)&&c(t.instrumentation)}function o(t){for(var e=t.length,n=!1,r=e-1;r>=0;r--){var i=t[r];if(!h(i)||"maybe"!==i.meta.kind)return r+1;n=!0}return n?0:e}function a(t,e,n){function s(t,e){return i(t)?t:s.of(t)}t=u(t)?t:[t];var c=n||r(t,e),d=t.length;o(t);return s.meta={kind:"func",domain:t,codomain:e,name:n,identity:!0},s.displayName=c,s.is=function(n){return i(n)&&n.instrumentation.domain.length===d&&n.instrumentation.domain.every(function(e,n){return e===t[n]})&&n.instrumentation.codomain===e},s.of=function(n,r){function i(){var i=Array.prototype.slice.call(arguments),o=i.length;if(r&&o<d){var s=Function.prototype.bind.apply(n,[this].concat(i));return a(t.slice(o),e).of(s,!0)}return l(e,n.apply(this,i))}return s.is(n)?n:(i.instrumentation={domain:t,codomain:e,f:n},i.displayName=f(n),i)},s}var s=(n(7),n(27),n(77)),u=n(39),c=(n(197),n(38)),l=n(41),f=(n(33),n(76),n(200),n(62)),d=n(16),h=n(19);a.getDefaultName=r,a.getOptionalArgumentsIndex=o,t.exports=a},function(t,e,n){function r(t){return t.map(s).join(" & ")}function i(t,e){function n(t,e){return t}var i=e||r(t),s=t.every(u);return n.meta={kind:"intersection",types:t,name:e,identity:s},n.displayName=i,n.is=function(e){return t.every(function(t){return a(e,t)})},n.update=function(t,e){return n(o.update(t,e))},n}var o=n(7),a=(n(27),n(18),n(39),n(40),n(42)),s=n(16),u=n(40);i.getDefaultName=r,t.exports=i},function(t,e,n){function r(t,e){return h(o,t,e)}function i(t){return s(t)||(t=u(t)?{}:{name:t}),t.hasOwnProperty("strict")||(t.strict=o.strict),t}function o(t,e){function n(e,n){if(v)return e;var r=!0,i=v?{}:p({},e);for(var o in t){var a=t[o],s=e[o],u=c(a,s,null);r=r&&s===u,i[o]=u}return r&&(i=e),i}e=i(e);var o=e.name,s=e.strict,h=o||l(t),v=Object.keys(t).map(function(e){return t[e]}).every(f);return n.meta={kind:"interface",props:t,name:o,identity:v,strict:s},n.displayName=h,n.is=function(e){if(u(e))return!1;if(s)for(var n in e)if(!t.hasOwnProperty(n))return!1;for(var r in t)if(!d(e[r],t[r]))return!1;return!0},n.update=function(t,e){return n(a.update(t,e))},n.extend=function(t,e){return r([n].concat(t),e)},n}var a=n(7),s=(n(27),n(104),n(77),n(76),n(38)),u=n(33),c=n(41),l=(n(16),n(105),n(198)),f=n(40),d=n(42),h=n(199),p=n(201);o.strict=!1,o.getOptions=i,o.getDefaultName=l,o.extend=r,t.exports=o},function(t,e,n){function r(t){return v(t)?t instanceof Date||t instanceof RegExp?t:g({},t):m(t)?t.concat():t}function i(t){return a.commands.hasOwnProperty(t)}function o(t){return a.commands[t]}function a(t,e){var n,s=t,u=!1;for(var c in e)e.hasOwnProperty(c)&&(i(c)?(n=o(c)(e[c],s),n!==t?(u=!0,s=n):s=t):(s===t&&(s=r(t)),n=a(s[c],e[c]),u=u||n!==s[c],s[c]=n));return u?s:t}function s(t,e){return t(e)}function u(t,e){return t.length>0?e.concat(t):e}function c(t,e){if(t.length>0){e=r(e);for(var n=0,i=t.length;n<i;n++)delete e[t[n]]}return e}function l(t){return t}function f(t,e){return t.length>0?(e=r(e),t.reduce(function(t,e){return t.splice.apply(t,e),t},e)):e}function d(t,e){if(t.from!==t.to){e=r(e);var n=e[t.to];e[t.to]=e[t.from],e[t.from]=n}return e}function h(t,e){return t.length>0?t.concat(e):e}function p(t,e){var n=!1,i=r(e);for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o],n=n||i[o]!==e[o]);return n?i:e}var v=(n(7),n(38)),m=(n(18),n(39)),g=(n(195),n(201));a.commands={$apply:s,$push:u,$remove:c,$set:l,$splice:f,$swap:d,$unshift:h,$merge:p},t.exports=a},function(t,e,n){var r=n(7),i=n(18),o=n(19),a=n(102);t.exports=function(t){for(var e,n,s,u=1,c=arguments.length;u<c;)if(e=arguments[u],n=arguments[u+1],s=arguments[u+2],i(s)&&!o(s)?u+=3:(s=n,n=a.is,u+=2),e.is(t)&&n(t))return s(t);r.fail("Match error")}},function(t,e,n){"use strict";function r(t,e){return!!t&&(t===e||t.prototype instanceof e)}Object.defineProperty(e,"__esModule",{value:!0});var i=n(101),o=n(58);e.ObjClass=i.irreducible("ObjClass",function(t){return r(t,o.getWindowRegistry().defaultClassForObjs)}),e.WidgetClass=i.irreducible("WidgetClass",function(t){return r(t,o.getWindowRegistry().defaultClassForWidgets)}),e.AppClass=i.union([e.ObjClass,e.WidgetClass])},function(t,e,n){"use strict";function r(t,e,n){var r=n.docPermalink;return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var a=i(n,e);if(a){var s="Visit https://scrivito.com/"+r+" for more information.";throw new l.ArgumentError("Invalid arguments for '"+t+"': "+a+" "+s)}}}function i(t,e){var n=e.length,r=t.length;if(r>n)return"Expected "+n+" arguments, got "+r;var i=c.flatten(e.map(function(e,n){var r=e[0],i=e[1],a=t[n];return s.validate(a,i,{strict:!0}).errors.map(function(t){return o(r,t)})}));return i.length>0?i.join(" "):void 0}function o(t,e){var n=a(t,e);if(void 0===e.actual)return"Missing required "+n+".";if(e.expected===s.Nil)return"Unexpected "+n+".";var r=s.getTypeName(e.expected);return"Unexpected value for "+n+": got "+u.default(e.actual)+", expected type "+r+"."}function a(t,e){var n="argument '"+t+"'";return 0===e.path.length?n:"key '"+e.path.join("/")+"' in "+n}Object.defineProperty(e,"__esModule",{value:!0});var s=n(289),u=n(21),c=n(0),l=n(1);e.checkArgumentsFor=r},function(t,e,n){"use strict";function r(t,e,n){var r=s.getTypeName(e),i=n.length?"/"+n.join("/")+": "+r:r;return"Invalid value "+u(t)+" supplied to "+i}function i(t,e,n,i){return s.Function.is(e.getValidationErrorMessage)?e.getValidationErrorMessage(t,n,i):r(t,e,n)}function o(t,e,n){n=n||{};var r=s.Array.is(n)?n:n.path||[];return new f(a(t,e,r,n))}function a(t,e,n,r){return s.isType(e)?d[e.meta.kind](t,e,n,r):d.es6classes(t,e,n,r)}var s=n(101),u=s.stringify,c={},l=s.struct({message:s.Any,actual:s.Any,expected:s.Any,path:s.list(s.union([s.String,s.Number]))},"ValidationError");l.of=function(t,e,n,r){return new l({message:i(t,e,n,r),actual:t,expected:e,path:n})};var f=s.struct({errors:s.list(l),value:s.Any},"ValidationResult");f.prototype.isValid=function(){return!this.errors.length},f.prototype.firstError=function(){return this.isValid()?null:this.errors[0]},f.prototype.toString=function(){return this.isValid()?"[ValidationResult, true, "+u(this.value)+"]":"[ValidationResult, false, ("+this.errors.map(function(t){return u(t.message)}).join(", ")+")]"};var d=o.validators={};d.es6classes=function(t,e,n,r){return{value:t,errors:t instanceof e?[]:[l.of(t,e,n,r.context)]}},d.irreducible=d.enums=function(t,e,n,r){return{value:t,errors:e.is(t)?[]:[l.of(t,e,n,r.context)]}},d.list=function(t,e,n,r){if(!s.Array.is(t))return{value:t,errors:[l.of(t,e,n,r.context)]};for(var i={value:[],errors:[]},o=0,u=t.length;o<u;o++){var c=a(t[o],e.meta.type,n.concat(o),r);i.value[o]=c.value,i.errors=i.errors.concat(c.errors)}return i},d.subtype=function(t,e,n,r){var i=a(t,e.meta.type,n,r);return i.errors.length?i:(e.meta.predicate(i.value)||(i.errors=[l.of(t,e,n,r.context)]),i)},d.maybe=function(t,e,n,r){return s.Nil.is(t)?{value:t,errors:[]}:a(t,e.meta.type,n,r)},d.struct=function(t,e,n,r){if(!s.Object.is(t))return{value:t,errors:[l.of(t,e,n,r.context)]};if(e.is(t))return{value:t,errors:[]};var i={value:{},errors:[]},o=e.meta.props,u=e.meta.defaultProps||c;for(var f in o)if(o.hasOwnProperty(f)){var d=t[f];void 0===d&&(d=u[f]);var h=a(d,o[f],n.concat(f),r);i.value[f]=h.value,i.errors=i.errors.concat(h.errors)}if(r.hasOwnProperty("strict")?r.strict:e.meta.strict)for(var p in t)t.hasOwnProperty(p)&&!o.hasOwnProperty(p)&&i.errors.push(l.of(t[p],s.Nil,n.concat(p),r.context));return i.errors.length||(i.value=new e(i.value)),i},d.tuple=function(t,e,n,r){var i=e.meta.types,o=i.length;if(!s.Array.is(t)||t.length>o)return{value:t,errors:[l.of(t,e,n,r.context)]};for(var u={value:[],errors:[]},c=0;c<o;c++){var f=a(t[c],i[c],n.concat(c),r);u.value[c]=f.value,u.errors=u.errors.concat(f.errors)}return u},d.dict=function(t,e,n,r){if(!s.Object.is(t))return{value:t,errors:[l.of(t,e,n,r.context)]};var i={value:{},errors:[]};for(var o in t)if(t.hasOwnProperty(o)){var u=n.concat(o),c=a(o,e.meta.domain,u,r),f=a(t[o],e.meta.codomain,u,r);i.value[o]=f.value,i.errors=i.errors.concat(c.errors,f.errors)}return i},d.union=function(t,e,n,r){var i=e.dispatch(t);return s.Function.is(i)?a(t,i,n.concat(e.meta.types.indexOf(i)),r):{value:t,errors:[l.of(t,e,n,r.context)]}},d.intersection=function(t,e,n,r){for(var i=e.meta.types,o=i.length,s={value:t,errors:[]},u=0,c=0;c<o;c++){"struct"===i[c].meta.kind&&u++;var f=a(t,i[c],n,r);s.errors=s.errors.concat(f.errors)}return u>1&&s.errors.push(l.of(t,e,n,r.context)),s},d.interface=function(t,e,n,r){if(!s.Object.is(t))return{value:t,errors:[l.of(t,e,n,r.context)]};var i={value:{},errors:[]},o=e.meta.props;for(var u in o){var c=a(t[u],o[u],n.concat(u),r);i.value[u]=c.value,i.errors=i.errors.concat(c.errors)}if(r.hasOwnProperty("strict")?r.strict:e.meta.strict)for(var f in t)o.hasOwnProperty(f)||s.Nil.is(t[f])||i.errors.push(l.of(t[f],s.Nil,n.concat(f),r.context));return i},s.mixin(s,{ValidationError:l,ValidationResult:f,validate:o}),t.exports=s},function(t,e,n){"use strict";function r(t,e){if(!t._scrivitoResizeListeners){t._scrivitoResizeListeners=[],t.style.position="relative";var n=i();n.resizeElement=t,t._scrivitoResizeTrigger=n,(0,u.default)()&&t.appendChild(n),n.data="about:blank",(0,u.default)()||t.appendChild(n)}t._scrivitoResizeListeners.push(e)}function i(){var t=document.createElement("object");return t.type="text/html",t.onload=o,t.style.display="block",t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.height="100%",t.style.width="100%",t.style.overflow="hidden",t.style.pointerEvents="none",t.style.zIndex=-1,t}function o(){this.contentDocument.defaultView._scrivitoResizeTrigger=this.resizeElement,this.contentDocument.defaultView.addEventListener("resize",a)}function a(t){var e=t.target||t.srcElement,n=e._scrivitoResizeTrigger;n._scrivitoResizeListeners.forEach(function(e){return e(n,t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var s=n(291),u=function(t){return t&&t.__esModule?t:{default:t}}(s)},function(t,e,n){"use strict";function r(){var t=window.navigator.userAgent;return t.indexOf("MSIE")>=0||t.indexOf("Trident")>=0}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){var e=(0,a.default)(c.location()),n=(0,a.default)(t);return(0,h.isConfigured)()&&(e.origin()===n.origin()||n.is("relative"))?(0,f.default)(function(){return scrivito.Routing.recognize(t)}).then(function(t){return(0,s.include)(["/",""],t.path)?null:{obj:t.obj,url:n}}).catch(function(t){if(t instanceof d.ResourceNotFoundError)return null;throw t}):scrivito.Promise.resolve(null)}Object.defineProperty(e,"__esModule",{value:!0});var o=n(49),a=r(o),s=n(0),u=n(46),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(u),l=n(13),f=r(l),d=n(1),h=n(203);e.default=i},function(t,e,n){"use strict";function r(t){var e=o.default.get(t);return e?scrivito.basicUrlFor(e):scrivito.Routing.generateUrl({path:t})}Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),o=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=r},function(t,e,n){"use strict";var r=n(3),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=n(0),a=n(54),s=n(46),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s);!function(){function t(t){var e=t.obj,n=t.queryParameters,r=t.hash,i={scrivitoObjId:e.id(),scrivitoQueryParameters:n,scrivitoHash:r},a=scrivito.Routing.generate({obj:e,queryParameters:n,hash:r}),s=u.history();s.state&&s.state.scrivitoObjId===e.id()&&(0,o.isEqual)(s.state.scrivitoQueryParameters,n)&&s.state.scrivitoHash===r||s.pushState(i,"",a)}function e(t){var e=t.obj,n=t.queryParameters,r=t.hash,i={scrivitoObjId:e.id(),scrivitoQueryParameters:n,scrivitoHash:r},o=scrivito.Routing.generate({obj:e,queryParameters:n,hash:r});u.history().replaceState(i,"",o)}function n(){u.setOnpopstate(c)}function r(){var t=u.location().toString();(0,a.replaceCurrentPage)(function(){var e=scrivito.Routing.recognize(t),n=e.obj,r=e.queryParameters,i=e.hash;return n?{obj:n,queryParameters:r,hash:i}:{queryParameters:r,hash:i}})}function s(){r(),n()}function c(t){var e=void 0,n=void 0,o=void 0;t.state&&(e=t.state.scrivitoObjId,n=t.state.scrivitoHash,o=t.state.scrivitoQueryParameters),e?(0,a.replaceCurrentPage)(function(){return{obj:i.default.get(e),queryParameters:o,hash:n}}):r()}scrivito.BrowserLocation={},scrivito.BrowserLocation.init=s,scrivito.BrowserLocation.pushWith=t,scrivito.BrowserLocation.replaceWith=e}()},function(t,e,n){"use strict";!function(){function t(t){scrivito.uiAdapter?scrivito.uiAdapter.navigateToExternalUrl(t):scrivito.setWindowLocation(t)}function e(t){window.location=t}function n(t,e){window.open(t,e)}scrivito.setWindowLocation=e,scrivito.changeLocation=t,scrivito.openLocation=n}()},function(t,e,n){"use strict";var r=n(49),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=n(1),a=n(46),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(a);!function(){function t(t){var e=t.routingMethod,n=t.routingBasePath;b=!0,g="path"===e,y=n||""}function e(){b=!1,g=void 0,y=void 0}function n(t){if(!b)throw scrivito.logError("Error from Scrivito SDK: No application configured, cannot initialize routing."),new o.InternalError(t+" can't be called before init.")}function r(t){var e=t.obj,r=t.queryParameters,i=t.hash;return n("generate"),a({path:scrivito.RoutingPath.generate(e),queryParameters:r,hash:i})}function a(t){var e=t.path,r=t.queryParameters,o=t.hash;n("generateUrl");var a=(0,i.default)(s.location()).origin();if(g){var u=("/"+y+"/"+e).replace(/\/+/g,"/"),c=(0,i.default)(a).pathname(u);return r&&c.query(r),o&&c.hash(o),c.toString()}return(0,i.default)(a).hash(""+m+e).toString()}function u(t){n("recognize");var e=c(t);return{path:e,obj:f(e),queryParameters:v(t),hash:l(t)}}function c(t){return g?d(t):h(t)}function l(t){return g?p(t):null}function f(t){return null!==t?scrivito.RoutingPath.recognize(t):null}function d(t){var e=(0,i.default)(t).path();return e.substring(0,y.length)!==y?null:e.substring(y.length)}function h(t){var e=(0,i.default)(t),n=(0,i.default)(s.location()),r=e.fragment();return e.filename()!==n.filename()?null:""===r?"":r.substring(0,m.length)===m?r.substring(m.length):null}function p(t){var e=(0,i.default)(t).hash();return""===e?null:e}function v(t){return(0,i.default)(t).query(!0)}var m="!",g=void 0,y=void 0,b=!1;scrivito.Routing={},scrivito.Routing.init=t,scrivito.Routing.reset=e,scrivito.Routing.generate=r,scrivito.Routing.recognize=u,scrivito.Routing.generateUrl=a}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(3),o=r(i),a=n(0),s=r(a),u=n(58),c=n(1);!function(){function t(t,e){return t.substring(0,e.length)===e?t.substring(e.length):t}function e(t){if(!l)return!1;var e=scrivito.loadableWithDefault(null,l);return!!e&&e.id()===t.id()}function n(t){if(!(t instanceof o.default))throw new c.ArgumentError("Parameter obj needs to be a BasicObj.")}function r(t){if(!s.default.isString(t))throw new c.ArgumentError("Parameter path needs to be a String.")}function i(t){var e=(0,u.getWindowRegistry)();return scrivito.wrapInAppClass(e,t).slug()}function a(t){var e=s.default.last(t.split("-"));return s.default.last(e.split("/"))}var l=void 0,f={init:function(t){l=t},generate:function(t){if(n(t),e(t))return"/";if(t.permalink())return"/"+t.permalink();var r=i(t);return r?"/"+r+"-"+t.id():"/"+t.id()},recognize:function(e){if(r(e),s.default.include(["/",""],e))return scrivito.unwrapAppClassValues(l());var n=t(e,"/"),i=o.default.getByPermalink(n);return i||o.default.get(a(n))},get homepageCallback(){return l},resetHomepageCallback:function(){l=void 0}};scrivito.RoutingPath=f}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(3),o=r(i),a=n(23),s=r(a),u=n(24),c=r(u),l=n(37),f=n(1),d=n(30),h=r(d);!function(){function t(t){return n(t),t instanceof c.default?a(t):t instanceof h.default?r(t):d(t)?i(t):scrivito.Routing.generate({obj:t})}function e(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.query,i=n.fragment,o=scrivito.unwrapAppClassValues(e),a=r?"?"+r:"",s=i?"#"+i:"";return t(o).concat(a).concat(s)}function n(t){if(!t)throw new f.ArgumentError("Missing target.");if(!(t instanceof c.default||t instanceof o.default||t instanceof h.default))throw new f.ArgumentError("Target is invalid. Valid targets are instances of Obj or Link.")}function r(t){return t.url()}function i(t){var e=t.get("blob",["binary"]);return e?r(e):"#__empty_blob"}function a(e){return e.isExternal()?e.url():t(e.obj())}function u(){return(0,l.getWindowContext)()}function d(t){var e=u().getClass(t.objClass());return!!e&&s.default.forClass(e).isBinary()}scrivito.basicUrlFor=t,scrivito.urlFor=e}()},function(t,e,n){"use strict";n(300),n(301)},function(t,e,n){"use strict";window.scrivito||(window.scrivito={})},function(t,e,n){"use strict";!function(){var t=void 0,e=0,n={},r={subscribe:function(t){var r=t.onFocus,i=t.onBlur,o=e;return n[o]={onFocus:r,onBlur:i},e+=1,o},unsubscribe:function(t){delete n[t]},notifyFocus:function(e){t=e,n[t].onFocus()},notifyBlur:function(e){e===t&&n[e].onBlur()},get handlers(){return n},reset:function(){t=void 0,e=0,n={}}};scrivito.WidgetFocus=r}()},function(t,e,n){"use strict";var r=n(303),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(r);window.Scrivito=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(30);Object.defineProperty(e,"Binary",{enumerable:!0,get:function(){return r(i).default}});var o=n(47);Object.defineProperty(e,"FutureBinary",{enumerable:!0,get:function(){return r(o).default}});var a=n(100);Object.defineProperty(e,"ObjFacetValue",{enumerable:!0,get:function(){return r(a).default}});var s=n(13);Object.defineProperty(e,"load",{enumerable:!0,get:function(){return r(s).default}});var u=n(1);Object.defineProperty(e,"ArgumentError",{enumerable:!0,get:function(){return u.ArgumentError}}),Object.defineProperty(e,"ResourceNotFoundError",{enumerable:!0,get:function(){return u.ResourceNotFoundError}}),Object.defineProperty(e,"ScrivitoError",{enumerable:!0,get:function(){return u.ScrivitoError}}),Object.defineProperty(e,"TransformationSourceInvalidError",{enumerable:!0,get:function(){return u.TransformationSourceInvalidError}}),Object.defineProperty(e,"TransformationSourceTooLargeError",{enumerable:!0,get:function(){return u.TransformationSourceTooLargeError}});var c=n(203);Object.defineProperty(e,"configure",{enumerable:!0,get:function(){return c.configure}});var l=n(54);Object.defineProperty(e,"currentPage",{enumerable:!0,get:function(){return l.currentPage}}),Object.defineProperty(e,"currentPageParams",{enumerable:!0,get:function(){return l.currentPageParams}});var f=n(74);Object.defineProperty(e,"navigateTo",{enumerable:!0,get:function(){return r(f).default}});var d=n(304);Object.defineProperty(e,"openContentBrowser",{enumerable:!0,get:function(){return r(d).default}});var h=n(190);Object.defineProperty(e,"provideEditingConfig",{enumerable:!0,get:function(){return h.provideEditingConfig}});var p=n(204);Object.defineProperty(e,"registerEditor",{enumerable:!0,get:function(){return p.registerEditor}});var v=n(306);Object.defineProperty(e,"isInPlaceEditingActive",{enumerable:!0,get:function(){return r(v).default}});var m=n(307);Object.defineProperty(e,"ChildListTag",{enumerable:!0,get:function(){return r(m).default}});var g=n(209);Object.defineProperty(e,"ContentTag",{enumerable:!0,get:function(){return r(g).default}});var y=n(318);Object.defineProperty(e,"CurrentPage",{enumerable:!0,get:function(){return r(y).default}});var b=n(319);Object.defineProperty(e,"ImageTag",{enumerable:!0,get:function(){return r(b).default}});var _=n(321);Object.defineProperty(e,"InternalErrorPage",{enumerable:!0,get:function(){return r(_).default}});var w=n(207);Object.defineProperty(e,"LinkTag",{enumerable:!0,get:function(){return r(w).default}});var C=n(322);Object.defineProperty(e,"NotFoundErrorPage",{enumerable:!0,get:function(){return r(C).default}});var k=n(6);Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return r(k).default}});var E=n(323);Object.defineProperty(e,"provideComponent",{enumerable:!0,get:function(){return r(E).default}});var x=n(64);Object.defineProperty(e,"registerComponent",{enumerable:!0,get:function(){return x.registerForId}})},function(t,e,n){"use strict";function r(t){return scrivito.uiAdapter.openContentBrowser((0,a.default)(t&&(0,i.pick)(t,"selection","selectionMode")))}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var i=n(0),o=n(305),a=function(t){return t&&t.__esModule?t:{default:t}}(o)},function(t,e,n){"use strict";function r(t){var e=[];return t.forEach(function(t){var n=o(t);void 0!==n&&e.push(n)}),e}function i(t){var e={};return(0,s.each)(t,function(t,n){var r=o(t);void 0!==r&&(e[n]=r)}),e}function o(t){if(!t)return t;switch(void 0===t?"undefined":a(t)){case"string":case"number":case"boolean":return t;case"object":if(t instanceof l.default)return o(t.params());if(t instanceof Date)return;return(0,s.isArray)(t)?r(t):i(t)}}Object.defineProperty(e,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=o;var s=n(0),u=n(34),c=(function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);e.default=t}(u),n(60)),l=function(t){return t&&t.__esModule?t:{default:t}}(c)},function(t,e,n){"use strict";function r(){return"published"!==scrivito.currentWorkspaceId()&&(!!(0,i.isComponentMounted)()||!!scrivito.uiAdapter&&scrivito.uiAdapter.isEditingMode())}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var i=n(202)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(65),l=r(c),f=n(0),d=n(17),h=r(d),p=n(54),v=n(6),m=r(v),g=n(308),y=r(g),b=n(309),_=r(b),w=function(t){function e(t){o(this,e);var n=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={hasFocus:!1},n._onMouseOver=n._onMouseOver.bind(n),n._onMouseOut=n._onMouseOut.bind(n),n}return s(e,t),u(e,[{key:"render",value:function(){var t=this,e=this.props.parent||(0,p.currentPage)();if(!e)return null;e=e._scrivitoPrivateContent;var n=(0,f.omit)(this.props,"parent","tag","renderChild"),r=void 0;return(0,l.default)()&&(n.onMouseOver=this._onMouseOver,n.onMouseOut=this._onMouseOut,n["data-scrivito-private-child-list-path"]=!0,this.state.hasFocus&&(n.className="scrivito_active scrivito_entered "+n.className),r=h.default.createElement(_.default,{key:"menuMarker",parent:e})),h.default.createElement(this.props.tag,n,[r].concat(i(e.orderedChildren().map(function(e){return h.default.createElement(y.default,{key:e.id(),child:e,renderChild:t.props.renderChild})}))))}},{key:"_onMouseOver",value:function(t){t.stopPropagation(),this.setState({hasFocus:!0})}},{key:"_onMouseOut",value:function(t){t.stopPropagation(),this.setState({hasFocus:!1})}}]),e}(h.default.Component);w.displayName="Scrivito.ChildListTag",w.defaultProps={tag:"ul"},e.default=(0,m.default)(w)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){var e=t.child,n=t.renderChild,r=(0,s.getWindowContext)().appModelAccessor.wrapInAppClass(e);return n?n(r):a.default.createElement("li",null,a.default.createElement(f.default,{to:r},e.get("title","string")))}Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),a=r(o),s=n(37),u=n(6),c=r(u),l=n(207),f=r(l);i.displayName="Scrivito.ChildListTag.ChildItem",e.default=(0,c.default)(i)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(17),c=r(u),l=n(66),f=n(6),d=r(f),h=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n._onClick=n._onClick.bind(n),n}return a(e,t),s(e,[{key:"render",value:function(){var t=this;return c.default.createElement("span",{ref:function(e){return t._menuMarker=e},className:"scrivito_editing_marker",onClick:this._onClick},c.default.createElement("i",{className:"scrivito_icon"}),c.default.createElement("span",{className:"scrivito_editing_marker_title"},this.props.parent.objClass()))}},{key:"_onClick",value:function(t){t.preventDefault(),t.stopPropagation(),this._menuMarker&&scrivito.uiAdapter.showChildListMenu((0,l.findDOMNode)(this._menuMarker),this.props.parent.id())}}]),e}(c.default.Component);h.displayName="Scrivito.ChildListTag.MenuMarker",e.default=(0,d.default)(h)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){var n=(0,w.default)(t),r=n.objId,i=n.widgetId;scrivito.uiAdapter.insertWidget(r,i,e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=n(65),d=r(f),h=n(23),p=r(h),v=n(0),m=n(17),g=r(m),y=n(66),b=n(58),_=n(108),w=r(_),C=n(6),k=r(C),E=n(311),x=r(E),j=n(213),O=r(j),S=n(312),T=r(S),A=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={hasFocus:!1,isDragged:!1},n._onMouseOver=n._onMouseOver.bind(n),n._onMouseOut=n._onMouseOut.bind(n),n._onWidgetFocus=n._onWidgetFocus.bind(n),n._onWidgetBlur=n._onWidgetBlur.bind(n),n._setDragState=n._setDragState.bind(n),n}return a(e,t),l(e,[{key:"componentDidMount",value:function(){if((0,d.default)()&&this._widget){var t=(0,w.default)(this.props.widget),e=t.objId,n=t.widgetId,r=(0,y.findDOMNode)(this._widget);scrivito.uiAdapter.registerWidgetDropZoneInDom(r,e,n)}this._focusToken=scrivito.WidgetFocus.subscribe({onFocus:this._onWidgetFocus,onBlur:this._onWidgetBlur})}},{key:"componentWillUnmount",value:function(){scrivito.WidgetFocus.unsubscribe(this._focusToken)}},{key:"render",value:function(){var t=this,e=g.default.createElement(T.default,{widget:this.props.widget});return(0,d.default)()?g.default.createElement("div",c({ref:function(e){return t._widget=e},className:this._className(),style:this._style(),onMouseOver:this._onMouseOver,onMouseOut:this._onMouseOut},this._dataProps()),g.default.createElement(x.default,{widget:this.props.widget,setDragState:this._setDragState}),e,this._renderOptionMarker("top"),this._renderOptionMarker("bottom")):g.default.createElement("div",null,e)}},{key:"_setDragState",value:function(t){this.setState({isDragging:t})}},{key:"_className",value:function(){if(this.state.hasFocus)return"scrivito_active scrivito_entered"}},{key:"_dataProps",value:function(){var t={"data-scrivito-private-widget":!0,"data-scrivito-private-dropzone":!0};return this._isStructureMarker()&&(t["data-scrivito-private-structure-widget"]=!0),this.state.isDragging&&(t["data-scrivito-private-dropback"]=!0),t}},{key:"_style",value:function(){if(this.state.isDragging)return{opacity:.5}}},{key:"_isStructureMarker",value:function(){var t=(0,b.getWindowRegistry)(),e=t.widgetClassFor(this.props.widget.objClass()),n=p.default.forClass(e);return!!n&&(0,v.some)(n.attributes,function(t,e){var r=n.attributeDefinition(e);return"widgetlist"===u(r,1)[0]})}},{key:"_onMouseOver",value:function(t){t.stopPropagation(),scrivito.WidgetFocus.notifyFocus(this._focusToken)}},{key:"_onMouseOut",value:function(t){t.stopPropagation(),scrivito.WidgetFocus.notifyBlur(this._focusToken)}},{key:"_onWidgetFocus",value:function(){this.setState({hasFocus:!0})}},{key:"_onWidgetBlur",value:function(){this.setState({hasFocus:!1})}},{key:"_renderOptionMarker",value:function(t){return g.default.createElement(O.default,{position:t,widget:this.props.widget,insertWidget:s,isAlwaysShown:scrivito.uiAdapter.alwaysShowOptionMarkers()})}}]),e}(g.default.Component);A.displayName="Scrivito.Widget",e.default=(0,k.default)(A)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(17),c=r(u),l=n(66),f=n(108),d=r(f),h=n(212),p=r(h),v=n(6),m=r(v),g=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n._onClick=n._onClick.bind(n),n._onDragStart=n._onDragStart.bind(n),n._onDragEnd=n._onDragEnd.bind(n),n}return a(e,t),s(e,[{key:"render",value:function(){var t=this;return c.default.createElement("span",{ref:function(e){return t._menuMarker=e},className:"scrivito_editing_marker",onClick:this._onClick,onDragStart:this._onDragStart,onDragEnd:this._onDragEnd,draggable:"true"},c.default.createElement("i",{className:"scrivito_icon"}),c.default.createElement("span",{className:"scrivito_editing_marker_title"},this.props.widget.objClass()))}},{key:"_onClick",value:function(t){if(t.preventDefault(),t.stopPropagation(),this._menuMarker){var e=(0,d.default)(this.props.widget),n=e.objId,r=e.widgetId;scrivito.uiAdapter.showWidgetMenu((0,l.findDOMNode)(this._menuMarker),n,r)}}},{key:"_onDragStart",value:function(t){(0,p.default)(t);var e=(0,d.default)(this.props.widget),n=e.objId,r=e.widgetId;scrivito.uiAdapter.onDragStart(n,r),this.props.setDragState(!0)}},{key:"_onDragEnd",value:function(){scrivito.uiAdapter.onDragEnd(),this.props.setDragState(!1)}}]),e}(c.default.Component);g.displayName="Scrivito.ContentTag.MenuMarker",e.default=(0,m.default)(g)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(65),c=r(u),l=n(17),f=r(l),d=n(58),h=n(1),p=n(64),v=n(6),m=r(v),g=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),s(e,[{key:"shouldComponentUpdate",value:function(t){return this.props.widget.equals(t.widget)}},{key:"render",value:function(){var t=(0,d.getWindowRegistry)(),e=scrivito.wrapInAppClass(t,this.props.widget);return f.default.createElement(this._componentClass(e),{widget:e})}},{key:"_scrivitoRenderOnError",value:function(){return(0,c.default)()?f.default.createElement("div",{className:"content_error"},"Widget could not be rendered due to application error."):null}},{key:"_componentClass",value:function(t){var e=t.constructor,n=(0,p.getByAppClass)(e);if(!n)throw new h.ArgumentError('No component registered for widget class "'+this.props.widget.objClass()+'".');return n}}]),e}(f.default.Component);g.displayName="Scrivito.ContentTag.WidgetContent",e.default=(0,m.default)(g)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(17),c=r(u),l=n(66),f=n(108),d=r(f),h=n(6),p=r(h),v=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n._onClick=n._onClick.bind(n),n}return a(e,t),s(e,[{key:"componentDidMount",value:function(){if(this._widgetPlaceholder){var t=(0,l.findDOMNode)(this._widgetPlaceholder),e=(0,d.default)(this.props.field.container()),n=e.objId,r=e.widgetId,i=this.props.field.name();scrivito.uiAdapter.registerEmptyWidgetlistDropZoneInDom({domNode:t,objId:n,widgetId:r,attributeName:i})}}},{key:"render",value:function(){var t=this;return c.default.createElement("div",{ref:function(e){return t._widgetPlaceholder=e},className:"scrivito_empty_widget_field","data-scrivito-private-dropzone":"true",onClick:this._onClick})}},{key:"_onClick",value:function(t){if(t.preventDefault(),t.stopPropagation(),this._widgetPlaceholder){var e=this.props.field.name(),n=(0,d.default)(this.props.field.container()),r=n.objId,i=n.widgetId;scrivito.uiAdapter.showWidgetlistMenu((0,l.findDOMNode)(this._widgetPlaceholder),{objId:r,widgetId:i,attributeName:e,mousePosition:{x:t.pageX,y:t.pageY}})}}}]),e}(c.default.Component);v.displayName="Scrivito.ContentTag.WidgetlistPlaceholder",e.default=(0,p.default)(v)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(17),c=r(u),l=n(66),f=n(0),d=n(211),h=r(d),p=n(315),v=r(p),m=n(317),g=r(m),y=n(6),b=r(y),_=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.state={domMode:"None"},n._onClick=n._onClick.bind(n),n}return a(e,t),s(e,[{key:"componentWillMount",value:function(){var t=this,e=this.props.field,n=e.type(),r=e.typeOptions(),i=this.props.editorClass;if(i){var o=(0,f.extend)({type:n},(0,f.pick)(r,"validClasses","values")),a=new v.default(e,function(e){return t._setDomMode(e)});this._editor=new i({attributeInfo:o,controller:a}),this._editorWillBeActivated()}}},{key:"componentDidMount",value:function(){"Replace"===this.state.domMode&&this._editorDomWasMounted()}},{key:"componentDidUpdate",value:function(t,e){var n=e.domMode,r=this.state.domMode;n!==r&&("Replace"===r?this._editorDomWasMounted():this._editorDomWasUnmounted())}},{key:"componentWillUnmount",value:function(){this._editorWillBeDeactivated()}},{key:"render",value:function(){var t=this;return"Replace"===this.state.domMode?c.default.createElement(this.props.tag,(0,f.extend)((0,f.omit)(this.props.customProps,"children"),{ref:function(e){return t._editorComponent=e}})):c.default.createElement(h.default,{ref:function(e){return t._editorComponent=e},children:this.props.children,customProps:this.props.customProps,field:this.props.field,key:this.state.domMode,tag:this.props.tag,onClick:function(e){return t._onClick(e)}})}},{key:"_onClick",value:function(t){this._editor&&this._editor.onClick&&this._editor.onClick(new g.default(t))}},{key:"_editorWillBeActivated",value:function(){this._editor&&this._editor.editorWillBeActivated&&this._editor.editorWillBeActivated()}},{key:"_editorWillBeDeactivated",value:function(){this._editor&&this._editor.editorWillBeDeactivated&&this._editor.editorWillBeDeactivated()}},{key:"_editorDomWasMounted",value:function(){this._editor&&this._editor.editorDomWasMounted&&this._editorComponent&&this._editor.editorDomWasMounted((0,l.findDOMNode)(this._editorComponent))}},{key:"_editorDomWasUnmounted",value:function(){this._editor&&this._editor.editorDomWasUnmounted&&this._editor.editorDomWasUnmounted()}},{key:"_setDomMode",value:function(t){this.setState({domMode:t})}}]),e}(c.default.Component);_.displayName="Scrivito.ContentTag.Editor",e.default=(0,b.default)(_)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(316),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=n(107),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(s),c=function(){function t(e,n){r(this,t),this.setDomMode=n,this._buffer=new a.default({get:function(){return"html"===e.type()?u.transformHTML(e.get()):e.get()},set:function(t){return e.update(t)},flushRate:100})}return i(t,[{key:"content",get:function(){return this._buffer.get()},set:function(t){this._buffer.set(t)}}]),t}();e.default=c},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o={},a=function(){function t(e){var n=e.get,i=e.set,a=e.flushRate;r(this,t),this._getUnderlying=n,this._setUnderlying=i,this._flushRate=a,this._bufferedValue=o}return i(t,[{key:"get",value:function(){var t=this._bufferedValue;return t!==o?t:this._getUnderlying()}},{key:"set",value:function(t){this._bufferedValue=t,this._flushRunning||this._runFlush()}},{key:"_runFlush",value:function(){var t=this;if(this._bufferedValue===o)return void(this._flushRunning=!1);this._setUnderlying(this._bufferedValue),this._bufferedValue=o,setTimeout(function(){return t._runFlush()},this._flushRate),this._flushRunning=!0}}]),t}();e.default=a},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e){r(this,t),this._internalEvent=e}return i(t,[{key:"preventDefault",value:function(){this._internalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this._internalEvent.stopPropagation()}}]),t}();e.default=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(){var t=(0,s.currentPage)(),e=(0,s.currentPageParams)();if(!t)return null;var n=t.constructor,r=(0,c.getByAppClass)(n);if(!r)throw new u.ArgumentError('No component registered for obj class "'+t.objClass()+'".');return a.default.createElement(r,{page:t,params:e})}Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),a=r(o),s=n(54),u=n(1),c=n(64),l=n(6),f=r(l);i.displayName="Scrivito.CurrentPage",e.default=(0,f.default)(i)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(23),l=r(c),f=n(0),d=n(17),h=r(d),p=n(1),v=n(30),m=r(v),g=n(46),y=n(320),b=r(y),_=n(6),w=r(_),C=n(209),k=r(C),E=function(t){function e(){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),u(e,[{key:"render",value:function(){if(!this.props.content)return null;var t=(0,f.omit)(this.props,"content","attribute");if(this.props.content instanceof m.default)return h.default.createElement("img",s({src:this._urlFor(this.props.content)},t));var e=this._getBinary();return e||(t["data-scrivito-image-placeholder"]=!0),h.default.createElement(k.default,s({attribute:this.props.attribute,content:this.props.content,tag:"img",src:this._urlFor(e)},t))}},{key:"_urlFor",value:function(t){return t?this._scaleDownBinary(t).url():b.default}},{key:"_getBinary",value:function(){var t=l.default.forInstance(this.props.content),e=t.attributes[this.props.attribute];if(!e)throw new p.ScrivitoError('Component "Scrivito.ImageTag" received prop "content" with an object missing attribute "'+this.props.attribute+'".');if("binary"===e)return this.props.content.get(this.props.attribute);if("reference"===e)return this._getReferencedBinary();throw new p.ScrivitoError('Component "Scrivito.ImageTag" received prop "content" with an object, whose attribute "'+this.props.attribute+'" is of invalid type "'+e+'". Valid attribute types are "binary" and "reference".')}},{key:"_getReferencedBinary",value:function(){var t=this.props.content.get(this.props.attribute);if(t){var e=t.get("blob");if(e)return e}return null}},{key:"_scaleDownBinary",value:function(t){return t.isRaw()||t.isExplicitlyTransformed()?t:t.transform({width:(0,g.screen)().width*(0,g.devicePixelRatio)()})}}]),e}(h.default.Component);E.displayName="Scrivito.ImageTag",E.defaultProps={attribute:"blob"},e.default=(0,w.default)(E)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/gif;base64,R0lGODlhyADIAIAAAP///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS41LWMwMjEgNzkuMTU0OTExLCAyMDEzLzEwLzI5LTExOjQ3OjE2ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDBEQjBEMDdFODMzMTFFNTg0QzY4MUNBMUVCQUU2MjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDBEQjBEMDhFODMzMTFFNTg0QzY4MUNBMUVCQUU2MjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowMERCMEQwNUU4MzMxMUU1ODRDNjgxQ0ExRUJBRTYyNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowMERCMEQwNkU4MzMxMUU1ODRDNjgxQ0ExRUJBRTYyNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAAALAAAAADIAMgAAAL/hI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8YhMKpfMpvMJjUqn1Kr1is1qt9yu9wsOi8fksvmMTqvX7Lb7DY/L5/S6/Y7P6/f8vv8PGCg4SFhoeIiYqLjI2Oj4CBkpOUlZaXmJmam5ydnp+QkaKjpKWmp6ipqqusra6voKGys7S1tre4ubq7vL2+v7CxwsPExcbHyMnKy8zNzs/AwdLT1NXW19jZ2tvc3d7f0NHi4+Tl5ufo6err7O3u7+Dh8vP09fb3+Pn6+/z9/v/w8woMCBBAsaPIgwocKFDBs6fAgxosSJFCtavIgxo8aNBhw7eixTAAA7"},function(t,e,n){"use strict";function r(t){var e=t.children;return!(0,i.currentPageError)()||(0,i.currentPageError)()instanceof o.ResourceNotFoundError?null:e?React.createElement("div",null,e):React.createElement("div",null,React.createElement("h1",null,"We're sorry, but something went wrong."))}Object.defineProperty(e,"__esModule",{value:!0});var i=n(54),o=n(1),a=n(6),s=function(t){return t&&t.__esModule?t:{default:t}}(a);r.displayName="Scrivito.InternalErrorPage",e.default=(0,s.default)(r)},function(t,e,n){"use strict";function r(t){var e=t.children;return(0,i.currentPageError)()instanceof o.ResourceNotFoundError?e?React.createElement("div",null,e):React.createElement("div",null,React.createElement("h1",null,"The page you were looking for doesn't exist."),React.createElement("p",null,"You may have mistyped the address or the page may have moved.")):null}Object.defineProperty(e,"__esModule",{value:!0});var i=n(54),o=n(1),a=n(6),s=function(t){return t&&t.__esModule?t:{default:t}}(a);r.displayName="Scrivito.NotFoundErrorPage",e.default=(0,s.default)(r)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){o(t),a(e),s(e);var n=t._scrivitoPrivateSchema.name;e.displayName||e.name&&"_class"!==e.name||!n||(e.displayName=n),(0,l.registerForAppClass)(t,(0,d.default)(e))}function o(t){var e=(0,u.getWindowContext)().Obj,n=(0,u.getWindowContext)().Widget,r=t.prototype;if(!(r instanceof e||r instanceof n))throw new c.ArgumentError(t+" is not a valid application class.")}function a(t){if("function"!=typeof t)throw new c.ArgumentError("Scrivito.provideComponent expected a valid React component, but received "+(0,p.default)(t))}function s(t){if(t.propTypes)throw new c.ArgumentError("Custom props are not allowed when providing a component.")}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var u=n(37),c=n(1),l=n(64),f=n(6),d=r(f),h=n(21),p=r(h)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(){Scrivito.registerEditor(a.default),Scrivito.registerEditor(u.default),Scrivito.registerEditor(l.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.initializeEditors=i;var o=n(325),a=r(o),s=n(329),u=r(s),c=n(330),l=r(c)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(50),s=r(a),u=n(214),c=r(u),l=n(215),f=r(l),d=n(326),h=r(d),p=function(){function t(e){var n=e.controller;i(this,t),this.controller=n}return o(t,null,[{key:"canEdit",value:function(t){return"html"===t.type}}]),o(t,[{key:"editorWillBeActivated",value:function(){this.controller.setDomMode("Replace")}},{key:"editorDomWasMounted",value:function(t){(0,f.default)(t),(0,s.default)(t).html(this.controller.content);var e=new c.default(t,this.controller);(0,h.default)(e)}}]),t}();e.default=p},function(t,e,n){var r,i,o,a,s,u;i=n(327),r=n(328),o=i.extensions.anchor.extend({name:"scrivito_anchor",proxy:null,contentDefault:'<i class="scrivito_customer_icon sci_link"></i>',init:function(){var t;return i.extensions.anchor.prototype.init.apply(this,arguments),this.targetCheckbox=null!=(t=this.getEditorOption("anchor"))?t.targetCheckbox:void 0},handleClick:function(t){var e,n,r,o,a;return t.preventDefault(),t.stopPropagation(),this.isDisplayed()||(o=i.selection.getSelectionRange(this.document),r=i.selection.getSelectedParentElement(o),n=i.util.getClosestTag(r,"a"),e=a=null,n&&(n=this.proxy.edQuery(n),e=n.attr("href")||null,a=n.attr("target")||null),this.showForm({value:e,target:a})),!1},getTemplate:function(){var t;return t="",this.targetCheckbox&&(t="<div class='medium-editor-toolbar-form-row medium-editor-toolbar-anchor-target-toggle'>\n <label>\n <input type='checkbox' class='medium-editor-toolbar-anchor-target'>\n <i class='scrivito_customer_icon sci_inv_check'></i>\n <i class='scrivito_customer_icon sci_rounded_square'></i>\n "+this.targetCheckboxText+"\n </label>\n</div>"),("<i class='medium-editor-toolbar-browse scrivito_customer_icon sci_collection'></i>\n<input type='text' class='medium-editor-toolbar-input' placeholder='"+this.placeholderText+"'>\n<i class='medium-editor-toolbar-save scrivito_customer_icon sci_check'></i>\n<i class='medium-editor-toolbar-close scrivito_customer_icon sci_cross'></i>\n"+t).replace(/\n\s*/g,"")},attachFormEvents:function(t){var e;return i.extensions.anchor.prototype.attachFormEvents.call(this,t),t=this.proxy.edQuery(t),e=t.find(".medium-editor-toolbar-input"),t.find(".medium-editor-toolbar-browse").on("click",function(t){return function(){var n,r;return r=(n=t.proxy.idFromPath(e.val()))?[n]:[],Scrivito.openContentBrowser({selection:r,selectionMode:"single"}).catch(function(t){throw e.focus(),t}).then(function(n){return e.focus(),n.length?e.val(t.proxy.pathForId(n[0])):e.val("")}),!1}}(this))},completeFormSave:function(t){return this.base.restoreSelection(),t.value?this.execAction(this.action,t):this.execAction("unlink"),this.base.checkSelection()}}),s=function(){var t,e,n;return t=["bold","italic","scrivito_anchor","h2","h3","unorderedlist","orderedlist"],(null!=(e=Scrivito.Editors)&&null!=(n=e._config)?n.showHtmlEditorCodeButton:void 0)&&t.splice(2,0,"scrivito_code"),t},u=function(){return{anchor:{targetCheckbox:!0},anchorPreview:!1,extensions:{scrivito_anchor:new o,scrivito_code:new r({label:'<i class="scrivito_customer_icon sci_code"></i>',start:"<code>",end:"</code>"}),imageDragging:{}},placeholder:!1,toolbar:{buttons:s(),standardizeSelectionStart:!0}}},a=function(t){var e,n,r;return e=t.jQueryElement(),n=u(),null!=(r=n.extensions.scrivito_anchor)&&(r.proxy=t),new i(e,n).subscribe("editableInput",function(){return t.save(e.html())})},t.exports=a},function(t,e,n){(function(r){var i;/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
96
+ "classList"in document.createElement("_")||function(t){"use strict";if("Element"in t){var e=t.Element.prototype,n=Object,r=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},i=Array.prototype.indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},o=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},a=function(t,e){if(""===e)throw new o("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new o("INVALID_CHARACTER_ERR","String contains an invalid character");return i.call(t,e)},s=function(t){for(var e=r.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],i=0,o=n.length;i<o;i++)this.push(n[i]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},u=s.prototype=[],c=function(){return new s(this)};if(o.prototype=Error.prototype,u.item=function(t){return this[t]||null},u.contains=function(t){return t+="",-1!==a(this,t)},u.add=function(){var t,e=arguments,n=0,r=e.length,i=!1;do{t=e[n]+"",-1===a(this,t)&&(this.push(t),i=!0)}while(++n<r);i&&this._updateClassName()},u.remove=function(){var t,e,n=arguments,r=0,i=n.length,o=!1;do{for(t=n[r]+"",e=a(this,t);-1!==e;)this.splice(e,1),o=!0,e=a(this,t)}while(++r<i);o&&this._updateClassName()},u.toggle=function(t,e){t+="";var n=this.contains(t),r=n?!0!==e&&"remove":!1!==e&&"add";return r&&this[r](t),!0===e||!1===e?e:!n},u.toString=function(){return this.join(" ")},n.defineProperty){var l={get:c,enumerable:!0,configurable:!0};try{n.defineProperty(e,"classList",l)}catch(t){-2146823252===t.number&&(l.enumerable=!1,n.defineProperty(e,"classList",l))}}else n.prototype.__defineGetter__&&e.__defineGetter__("classList",c)}}(self),/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
97
+ function(t){"use strict";if(t.URL=t.URL||t.webkitURL,t.Blob&&t.URL)try{return void new Blob}catch(t){}var e=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||function(t){var e=function(t){return Object.prototype.toString.call(t).match(/^\[object\s(.*)\]$/)[1]},n=function(){this.data=[]},r=function(t,e,n){this.data=t,this.size=t.length,this.type=e,this.encoding=n},i=n.prototype,o=r.prototype,a=t.FileReaderSync,s=function(t){this.code=this[this.name=t]},u="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),c=u.length,l=t.URL||t.webkitURL||t,f=l.createObjectURL,d=l.revokeObjectURL,h=l,p=t.btoa,v=t.atob,m=t.ArrayBuffer,g=t.Uint8Array,y=/^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/;for(r.fake=o.fake=!0;c--;)s.prototype[u[c]]=c+1;return l.createObjectURL||(h=t.URL=function(t){var e,n=document.createElementNS("http://www.w3.org/1999/xhtml","a");return n.href=t,"origin"in n||("data:"===n.protocol.toLowerCase()?n.origin=null:(e=t.match(y),n.origin=e&&e[1])),n}),h.createObjectURL=function(t){var e,n=t.type;return null===n&&(n="application/octet-stream"),t instanceof r?(e="data:"+n,"base64"===t.encoding?e+";base64,"+t.data:"URI"===t.encoding?e+","+decodeURIComponent(t.data):p?e+";base64,"+p(t.data):e+","+encodeURIComponent(t.data)):f?f.call(l,t):void 0},h.revokeObjectURL=function(t){"data:"!==t.substring(0,5)&&d&&d.call(l,t)},i.append=function(t){var n=this.data;if(g&&(t instanceof m||t instanceof g)){for(var i="",o=new g(t),u=0,c=o.length;u<c;u++)i+=String.fromCharCode(o[u]);n.push(i)}else if("Blob"===e(t)||"File"===e(t)){if(!a)throw new s("NOT_READABLE_ERR");var l=new a;n.push(l.readAsBinaryString(t))}else t instanceof r?"base64"===t.encoding&&v?n.push(v(t.data)):"URI"===t.encoding?n.push(decodeURIComponent(t.data)):"raw"===t.encoding&&n.push(t.data):("string"!=typeof t&&(t+=""),n.push(unescape(encodeURIComponent(t))))},i.getBlob=function(t){return arguments.length||(t=null),new r(this.data.join(""),t,"raw")},i.toString=function(){return"[object BlobBuilder]"},o.slice=function(t,e,n){var i=arguments.length;return i<3&&(n=null),new r(this.data.slice(t,i>1?e:this.data.length),n,this.encoding)},o.toString=function(){return"[object Blob]"},o.close=function(){this.size=0,delete this.data},n}(t);t.Blob=function(t,n){var r=n?n.type||"":"",i=new e;if(t)for(var o=0,a=t.length;o<a;o++)Uint8Array&&t[o]instanceof Uint8Array?i.append(t[o].buffer):i.append(t[o]);var s=i.getBlob(r);return!s.slice&&s.webkitSlice&&(s.slice=s.webkitSlice),s};var n=Object.getPrototypeOf||function(t){return t.__proto__};t.Blob.prototype=n(new t.Blob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this),function(o,a){"use strict";"object"==typeof t&&void 0!==r&&r&&r.versions&&r.versions.electron||"object"!=typeof t?void 0!==(i=function(){return a}.call(e,n,e,t))&&(t.exports=i):t.exports=a}(0,function(){"use strict";function t(t,e){return this.init(t,e)}return t.extensions={},function(e){function n(t,e){var n,r=Array.prototype.slice.call(arguments,2);e=e||{};for(var i=0;i<r.length;i++){var o=r[i];if(o)for(n in o)o.hasOwnProperty(n)&&void 0!==o[n]&&(t||!1===e.hasOwnProperty(n))&&(e[n]=o[n])}return e}var r=!1;try{var i=document.createElement("div"),o=document.createTextNode(" ");i.appendChild(o),r=i.contains(o)}catch(t){}var a={isIE:"Microsoft Internet Explorer"===navigator.appName||"Netscape"===navigator.appName&&null!==new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(navigator.userAgent),isEdge:null!==/Edge\/\d+/.exec(navigator.userAgent),isFF:navigator.userAgent.toLowerCase().indexOf("firefox")>-1,isMac:e.navigator.platform.toUpperCase().indexOf("MAC")>=0,keyCode:{BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,DELETE:46,K:75,M:77,V:86},isMetaCtrlKey:function(t){return!!(a.isMac&&t.metaKey||!a.isMac&&t.ctrlKey)},isKey:function(t,e){var n=a.getKeyCode(t);return!1===Array.isArray(e)?n===e:-1!==e.indexOf(n)},getKeyCode:function(t){var e=t.which;return null===e&&(e=null!==t.charCode?t.charCode:t.keyCode),e},blockContainerElementNames:["p","h1","h2","h3","h4","h5","h6","blockquote","pre","ul","li","ol","address","article","aside","audio","canvas","dd","dl","dt","fieldset","figcaption","figure","footer","form","header","hgroup","main","nav","noscript","output","section","video","table","thead","tbody","tfoot","tr","th","td"],emptyElementNames:["br","col","colgroup","hr","img","input","source","wbr"],extend:function(){var t=[!0].concat(Array.prototype.slice.call(arguments));return n.apply(this,t)},defaults:function(){var t=[!1].concat(Array.prototype.slice.call(arguments));return n.apply(this,t)},createLink:function(t,e,n,r){var i=t.createElement("a");return a.moveTextRangeIntoElement(e[0],e[e.length-1],i),i.setAttribute("href",n),r&&("_blank"===r&&i.setAttribute("rel","noopener noreferrer"),i.setAttribute("target",r)),i},findOrCreateMatchingTextNodes:function(t,e,n){for(var r=t.createTreeWalker(e,NodeFilter.SHOW_ALL,null,!1),i=[],o=0,s=!1,u=null,c=null;null!==(u=r.nextNode());)if(!(u.nodeType>3))if(3===u.nodeType){if(!s&&n.start<o+u.nodeValue.length&&(s=!0,c=a.splitStartNodeIfNeeded(u,n.start,o)),s&&a.splitEndNodeIfNeeded(u,c,n.end,o),s&&o===n.end)break;if(s&&o>n.end+1)throw new Error("PerformLinking overshot the target!");s&&i.push(c||u),o+=u.nodeValue.length,null!==c&&(o+=c.nodeValue.length,r.nextNode()),c=null}else"img"===u.tagName.toLowerCase()&&(!s&&n.start<=o&&(s=!0),s&&i.push(u));return i},splitStartNodeIfNeeded:function(t,e,n){return e!==n?t.splitText(e-n):null},splitEndNodeIfNeeded:function(t,e,n,r){var i,o;i=r+t.nodeValue.length+(e?e.nodeValue.length:0)-1,o=n-r-(e?t.nodeValue.length:0),i>=n&&r!==i&&0!==o&&(e||t).splitText(o)},splitByBlockElements:function(e){if(3!==e.nodeType&&1!==e.nodeType)return[];var n=[],r=t.util.blockContainerElementNames.join(",");if(3===e.nodeType||0===e.querySelectorAll(r).length)return[e];for(var i=0;i<e.childNodes.length;i++){var o=e.childNodes[i];if(3===o.nodeType)n.push(o);else if(1===o.nodeType){var a=o.querySelectorAll(r);0===a.length?n.push(o):n=n.concat(t.util.splitByBlockElements(o))}}return n},findAdjacentTextNodeWithContent:function(t,e,n){var r,i=!1,o=n.createNodeIterator(t,NodeFilter.SHOW_TEXT,null,!1);for(r=o.nextNode();r;){if(r===e)i=!0;else if(i&&3===r.nodeType&&r.nodeValue&&r.nodeValue.trim().length>0)break;r=o.nextNode()}return r},findPreviousSibling:function(t){if(!t||a.isMediumEditorElement(t))return!1;for(var e=t.previousSibling;!e&&!a.isMediumEditorElement(t.parentNode);)t=t.parentNode,e=t.previousSibling;return e},isDescendant:function(t,e,n){if(!t||!e)return!1;if(t===e)return!!n;if(1!==t.nodeType)return!1;if(r||3!==e.nodeType)return t.contains(e);for(var i=e.parentNode;null!==i;){if(i===t)return!0;i=i.parentNode}return!1},isElement:function(t){return!(!t||1!==t.nodeType)},throttle:function(t,e){var n,r,i,o=null,a=0,s=function(){a=Date.now(),o=null,i=t.apply(n,r),o||(n=r=null)};return e||0===e||(e=50),function(){var u=Date.now(),c=e-(u-a);return n=this,r=arguments,c<=0||c>e?(o&&(clearTimeout(o),o=null),a=u,i=t.apply(n,r),o||(n=r=null)):o||(o=setTimeout(s,c)),i}},traverseUp:function(t,e){if(!t)return!1;do{if(1===t.nodeType){if(e(t))return t;if(a.isMediumEditorElement(t))return!1}t=t.parentNode}while(t);return!1},htmlEntities:function(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},insertHTMLCommand:function(e,n){var r,i,o,s,u,c,l,f=!1,d=["insertHTML",!1,n];if(!t.util.isEdge&&e.queryCommandSupported("insertHTML"))try{return e.execCommand.apply(e,d)}catch(t){}if(r=e.getSelection(),r.rangeCount){if(i=r.getRangeAt(0),l=i.commonAncestorContainer,a.isMediumEditorElement(l)&&!l.firstChild)i.selectNode(l.appendChild(e.createTextNode("")));else if(3===l.nodeType&&0===i.startOffset&&i.endOffset===l.nodeValue.length||3!==l.nodeType&&l.innerHTML===i.toString()){for(;!a.isMediumEditorElement(l)&&l.parentNode&&1===l.parentNode.childNodes.length&&!a.isMediumEditorElement(l.parentNode);)l=l.parentNode;i.selectNode(l)}for(i.deleteContents(),o=e.createElement("div"),o.innerHTML=n,s=e.createDocumentFragment();o.firstChild;)u=o.firstChild,c=s.appendChild(u);i.insertNode(s),c&&(i=i.cloneRange(),i.setStartAfter(c),i.collapse(!0),t.selection.selectRange(e,i)),f=!0}return e.execCommand.callListeners&&e.execCommand.callListeners(d,f),f},execFormatBlock:function(e,n){var r,i=a.getTopBlockContainer(t.selection.getSelectionStart(e));if("blockquote"===n){if(i&&(r=Array.prototype.slice.call(i.childNodes),r.some(function(t){return a.isBlockContainer(t)})))return e.execCommand("outdent",!1,null);if(a.isIE)return e.execCommand("indent",!1,n)}if(i&&n===i.nodeName.toLowerCase()&&(n="p"),a.isIE&&(n="<"+n+">"),i&&"blockquote"===i.nodeName.toLowerCase()){if(a.isIE&&"<p>"===n)return e.execCommand("outdent",!1,n);if((a.isFF||a.isEdge)&&"p"===n)return r=Array.prototype.slice.call(i.childNodes),r.some(function(t){return!a.isBlockContainer(t)})&&e.execCommand("formatBlock",!1,n),e.execCommand("outdent",!1,n)}return e.execCommand("formatBlock",!1,n)},setTargetBlank:function(t,e){var n,r=e||!1;if("a"===t.nodeName.toLowerCase())t.target="_blank",t.rel="noopener noreferrer";else for(t=t.getElementsByTagName("a"),n=0;n<t.length;n+=1)!1!==r&&r!==t[n].attributes.href.value||(t[n].target="_blank",t[n].rel="noopener noreferrer")},removeTargetBlank:function(t,e){var n;if("a"===t.nodeName.toLowerCase())t.removeAttribute("target"),t.removeAttribute("rel");else for(t=t.getElementsByTagName("a"),n=0;n<t.length;n+=1)e===t[n].attributes.href.value&&(t[n].removeAttribute("target"),t[n].removeAttribute("rel"))},addClassToAnchors:function(t,e){var n,r,i=e.split(" ");if("a"===t.nodeName.toLowerCase())for(r=0;r<i.length;r+=1)t.classList.add(i[r]);else{var o=t.getElementsByTagName("a");if(0===o.length){var s=a.getClosestTag(t,"a");t=s?[s]:[]}else t=o;for(n=0;n<t.length;n+=1)for(r=0;r<i.length;r+=1)t[n].classList.add(i[r])}},isListItem:function(t){if(!t)return!1;if("li"===t.nodeName.toLowerCase())return!0;for(var e=t.parentNode,n=e.nodeName.toLowerCase();"li"===n||!a.isBlockContainer(e)&&"div"!==n;){if("li"===n)return!0;if(!(e=e.parentNode))return!1;n=e.nodeName.toLowerCase()}return!1},cleanListDOM:function(e,n){if("li"===n.nodeName.toLowerCase()){var r=n.parentElement;"p"===r.parentElement.nodeName.toLowerCase()&&(a.unwrap(r.parentElement,e),t.selection.moveCursor(e,n.firstChild,n.firstChild.textContent.length))}},splitOffDOMTree:function(t,e,n){for(var r=e,i=null,o=!n;r!==t;){var a,s=r.parentNode,u=s.cloneNode(!1),c=o?r:s.firstChild;for(i&&(o?u.appendChild(i):a=i),i=u;c;){var l=c.nextSibling;c===r?(c.hasChildNodes()?c=c.cloneNode(!1):c.parentNode.removeChild(c),c.textContent&&i.appendChild(c),c=o?l:null):(c.parentNode.removeChild(c),(c.hasChildNodes()||c.textContent)&&i.appendChild(c),c=l)}a&&i.appendChild(a),r=s}return i},moveTextRangeIntoElement:function(t,e,n){if(!t||!e)return!1;var r=a.findCommonRoot(t,e);if(!r)return!1;if(e===t){var i=t.parentNode,o=t.nextSibling;return i.removeChild(t),n.appendChild(t),o?i.insertBefore(n,o):i.appendChild(n),n.hasChildNodes()}for(var s,u,c,l=[],f=0;f<r.childNodes.length;f++)if(c=r.childNodes[f],s){if(a.isDescendant(c,e,!0)){u=c;break}l.push(c)}else a.isDescendant(c,t,!0)&&(s=c);var d=u.nextSibling,h=r.ownerDocument.createDocumentFragment();return s===t?(s.parentNode.removeChild(s),h.appendChild(s)):h.appendChild(a.splitOffDOMTree(s,t)),l.forEach(function(t){t.parentNode.removeChild(t),h.appendChild(t)}),u===e?(u.parentNode.removeChild(u),h.appendChild(u)):h.appendChild(a.splitOffDOMTree(u,e,!0)),n.appendChild(h),u.parentNode===r?r.insertBefore(n,u):d?r.insertBefore(n,d):r.appendChild(n),n.hasChildNodes()},depthOfNode:function(t){for(var e=0,n=t;null!==n.parentNode;)n=n.parentNode,e++;return e},findCommonRoot:function(t,e){for(var n=a.depthOfNode(t),r=a.depthOfNode(e),i=t,o=e;n!==r;)n>r?(i=i.parentNode,n-=1):(o=o.parentNode,r-=1);for(;i!==o;)i=i.parentNode,o=o.parentNode;return i},isElementAtBeginningOfBlock:function(t){for(var e,n;!a.isBlockContainer(t)&&!a.isMediumEditorElement(t);){for(n=t;n=n.previousSibling;)if(e=3===n.nodeType?n.nodeValue:n.textContent,e.length>0)return!1;t=t.parentNode}return!0},isMediumEditorElement:function(t){return t&&t.getAttribute&&!!t.getAttribute("data-medium-editor-element")},getContainerEditorElement:function(t){return a.traverseUp(t,function(t){return a.isMediumEditorElement(t)})},isBlockContainer:function(t){return t&&3!==t.nodeType&&-1!==a.blockContainerElementNames.indexOf(t.nodeName.toLowerCase())},getClosestBlockContainer:function(t){return a.traverseUp(t,function(t){return a.isBlockContainer(t)||a.isMediumEditorElement(t)})},getTopBlockContainer:function(t){var e=!!a.isBlockContainer(t)&&t;return a.traverseUp(t,function(t){return a.isBlockContainer(t)&&(e=t),!(e||!a.isMediumEditorElement(t))&&(e=t,!0)}),e},getFirstSelectableLeafNode:function(t){for(;t&&t.firstChild;)t=t.firstChild;if(t=a.traverseUp(t,function(t){return-1===a.emptyElementNames.indexOf(t.nodeName.toLowerCase())}),"table"===t.nodeName.toLowerCase()){var e=t.querySelector("th, td");e&&(t=e)}return t},getFirstTextNode:function(t){return a.warn("getFirstTextNode is deprecated and will be removed in version 6.0.0"),a._getFirstTextNode(t)},_getFirstTextNode:function(t){if(3===t.nodeType)return t;for(var e=0;e<t.childNodes.length;e++){var n=a._getFirstTextNode(t.childNodes[e]);if(null!==n)return n}return null},ensureUrlHasProtocol:function(t){return-1===t.indexOf("://")?"http://"+t:t},warn:function(){void 0!==e.console&&"function"==typeof e.console.warn&&e.console.warn.apply(e.console,arguments)},deprecated:function(t,e,n){var r=t+" is deprecated, please use "+e+" instead.";n&&(r+=" Will be removed in "+n),a.warn(r)},deprecatedMethod:function(t,e,n,r){a.deprecated(t,e,r),"function"==typeof this[e]&&this[e].apply(this,n)},cleanupAttrs:function(t,e){e.forEach(function(e){t.removeAttribute(e)})},cleanupTags:function(t,e){-1!==e.indexOf(t.nodeName.toLowerCase())&&t.parentNode.removeChild(t)},unwrapTags:function(e,n){-1!==n.indexOf(e.nodeName.toLowerCase())&&t.util.unwrap(e,document)},getClosestTag:function(t,e){return a.traverseUp(t,function(t){return t.nodeName.toLowerCase()===e.toLowerCase()})},unwrap:function(t,e){for(var n=e.createDocumentFragment(),r=Array.prototype.slice.call(t.childNodes),i=0;i<r.length;i++)n.appendChild(r[i]);n.childNodes.length?t.parentNode.replaceChild(n,t):t.parentNode.removeChild(t)},guid:function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}};t.util=a}(window),function(){var e=function(e){t.util.extend(this,e)};e.extend=function(e){var n,r=this;n=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return r.apply(this,arguments)},t.util.extend(n,r);var i=function(){this.constructor=n};return i.prototype=r.prototype,n.prototype=new i,e&&t.util.extend(n.prototype,e),n},e.prototype={init:function(){},base:void 0,name:void 0,checkState:void 0,destroy:void 0,queryCommandState:void 0,isActive:void 0,isAlreadyApplied:void 0,setActive:void 0,setInactive:void 0,getInteractionElements:void 0,window:void 0,document:void 0,getEditorElements:function(){return this.base.elements},getEditorId:function(){return this.base.id},getEditorOption:function(t){return this.base.options[t]}},["execAction","on","off","subscribe","trigger"].forEach(function(t){e.prototype[t]=function(){return this.base[t].apply(this.base,arguments)}}),t.Extension=e}(),function(){function e(e){return t.util.isBlockContainer(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}var n={findMatchingSelectionParent:function(e,n){var r,i,o=n.getSelection();return 0!==o.rangeCount&&(r=o.getRangeAt(0),i=r.commonAncestorContainer,t.util.traverseUp(i,e))},getSelectionElement:function(e){return this.findMatchingSelectionParent(function(e){return t.util.isMediumEditorElement(e)},e)},exportSelection:function(t,e){if(!t)return null;var n=null,r=e.getSelection();if(r.rangeCount>0){var i,o=r.getRangeAt(0),a=o.cloneRange();a.selectNodeContents(t),a.setEnd(o.startContainer,o.startOffset),i=a.toString().length,n={start:i,end:i+o.toString().length},this.doesRangeStartWithImages(o,e)&&(n.startsWithImage=!0);var s=this.getTrailingImageCount(t,n,o.endContainer,o.endOffset);if(s&&(n.trailingImageCount=s),0!==i){var u=this.getIndexRelativeToAdjacentEmptyBlocks(e,t,o.startContainer,o.startOffset);-1!==u&&(n.emptyBlocksIndex=u)}}return n},importSelection:function(t,e,n,r){if(t&&e){var i=n.createRange();i.setStart(e,0),i.collapse(!0);var o,a=e,s=[],u=0,c=!1,l=!1,f=0,d=!1,h=!1,p=null;for((r||t.startsWithImage||void 0!==t.emptyBlocksIndex)&&(h=!0);!d&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||l){if(t.trailingImageCount&&l&&("img"===a.nodeName.toLowerCase()&&f++,f===t.trailingImageCount)){for(var v=0;a.parentNode.childNodes[v]!==a;)v++;i.setEnd(a.parentNode,v+1),d=!0}if(!d&&1===a.nodeType)for(var m=a.childNodes.length-1;m>=0;)s.push(a.childNodes[m]),m-=1}else o=u+a.length,!c&&t.start>=u&&t.start<=o&&(h||t.start<o?(i.setStart(a,t.start-u),c=!0):p=a),c&&t.end>=u&&t.end<=o&&(t.trailingImageCount?l=!0:(i.setEnd(a,t.end-u),d=!0)),u=o;d||(a=s.pop())}!c&&p&&(i.setStart(p,p.length),i.setEnd(p,p.length)),void 0!==t.emptyBlocksIndex&&(i=this.importSelectionMoveCursorPastBlocks(n,e,t.emptyBlocksIndex,i)),r&&(i=this.importSelectionMoveCursorPastAnchor(t,i)),this.selectRange(n,i)}},importSelectionMoveCursorPastAnchor:function(e,n){var r=function(t){return"a"===t.nodeName.toLowerCase()};if(e.start===e.end&&3===n.startContainer.nodeType&&n.startOffset===n.startContainer.nodeValue.length&&t.util.traverseUp(n.startContainer,r)){for(var i=n.startContainer,o=n.startContainer.parentNode;null!==o&&"a"!==o.nodeName.toLowerCase();)o.childNodes[o.childNodes.length-1]!==i?o=null:(i=o,o=o.parentNode);if(null!==o&&"a"===o.nodeName.toLowerCase()){for(var a=null,s=0;null===a&&s<o.parentNode.childNodes.length;s++)o.parentNode.childNodes[s]===o&&(a=s);n.setStart(o.parentNode,a+1),n.collapse(!0)}}return n},importSelectionMoveCursorPastBlocks:function(n,r,i,o){var a,s,u=n.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,e,!1),c=o.startContainer,l=0;for(i=i||1,a=3===c.nodeType&&t.util.isBlockContainer(c.previousSibling)?c.previousSibling:t.util.getClosestBlockContainer(c);u.nextNode();)if(s){if(s=u.currentNode,++l===i)break;if(s.textContent.length>0)break}else a===u.currentNode&&(s=u.currentNode);return s||(s=a),o.setStart(t.util.getFirstSelectableLeafNode(s),0),o},getIndexRelativeToAdjacentEmptyBlocks:function(n,r,i,o){if(i.textContent.length>0&&o>0)return-1;var a=i;if(3!==a.nodeType&&(a=i.childNodes[o]),a){if(!t.util.isElementAtBeginningOfBlock(a))return-1;var s=t.util.findPreviousSibling(a);if(!s)return-1;if(s.nodeValue)return-1}for(var u=t.util.getClosestBlockContainer(i),c=n.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,e,!1),l=0;c.nextNode();){var f=""===c.currentNode.textContent;if((f||l>0)&&(l+=1),c.currentNode===u)return l;f||(l=0)}return l},doesRangeStartWithImages:function(t,e){if(0!==t.startOffset||1!==t.startContainer.nodeType)return!1;if("img"===t.startContainer.nodeName.toLowerCase())return!0;var n=t.startContainer.querySelector("img");if(!n)return!1;for(var r=e.createTreeWalker(t.startContainer,NodeFilter.SHOW_ALL,null,!1);r.nextNode();){var i=r.currentNode;if(i===n)break;if(i.nodeValue)return!1}return!0},getTrailingImageCount:function(t,e,n,r){if(0===r||1!==n.nodeType)return 0;if("img"!==n.nodeName.toLowerCase()&&!n.querySelector("img"))return 0;for(var i=n.childNodes[r-1];i.hasChildNodes();)i=i.lastChild;for(var o,a=t,s=[],u=0,c=!1,l=!1,f=!1,d=0;!f&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||l){if("img"===a.nodeName.toLowerCase()&&d++,a===i)f=!0;else if(1===a.nodeType)for(var h=a.childNodes.length-1;h>=0;)s.push(a.childNodes[h]),h-=1}else d=0,o=u+a.length,!c&&e.start>=u&&e.start<=o&&(c=!0),c&&e.end>=u&&e.end<=o&&(l=!0),u=o;f||(a=s.pop())}return d},selectionContainsContent:function(t){var e=t.getSelection();if(!e||e.isCollapsed||!e.rangeCount)return!1;if(""!==e.toString().trim())return!0;var n=this.getSelectedParentElement(e.getRangeAt(0));return!(!n||!("img"===n.nodeName.toLowerCase()||1===n.nodeType&&n.querySelector("img")))},selectionInContentEditableFalse:function(t){var e,n=this.findMatchingSelectionParent(function(t){var n=t&&t.getAttribute("contenteditable");return"true"===n&&(e=!0),"#text"!==t.nodeName&&"false"===n},t);return!e&&n},getSelectionHtml:function(t){var e,n,r,i="",o=t.getSelection();if(o.rangeCount){for(r=t.createElement("div"),e=0,n=o.rangeCount;e<n;e+=1)r.appendChild(o.getRangeAt(e).cloneContents());i=r.innerHTML}return i},getCaretOffsets:function(t,e){var n,r;return e||(e=window.getSelection().getRangeAt(0)),n=e.cloneRange(),r=e.cloneRange(),n.selectNodeContents(t),n.setEnd(e.endContainer,e.endOffset),r.selectNodeContents(t),r.setStart(e.endContainer,e.endOffset),{left:n.toString().length,right:r.toString().length}},rangeSelectsSingleNode:function(t){var e=t.startContainer;return e===t.endContainer&&e.hasChildNodes()&&t.endOffset===t.startOffset+1},getSelectedParentElement:function(t){return t?this.rangeSelectsSingleNode(t)&&3!==t.startContainer.childNodes[t.startOffset].nodeType?t.startContainer.childNodes[t.startOffset]:3===t.startContainer.nodeType?t.startContainer.parentNode:t.startContainer:null},getSelectedElements:function(t){var e,n,r,i=t.getSelection();if(!i.rangeCount||i.isCollapsed||!i.getRangeAt(0).commonAncestorContainer)return[];if(e=i.getRangeAt(0),3===e.commonAncestorContainer.nodeType){for(n=[],r=e.commonAncestorContainer;r.parentNode&&1===r.parentNode.childNodes.length;)n.push(r.parentNode),r=r.parentNode;return n}return[].filter.call(e.commonAncestorContainer.getElementsByTagName("*"),function(t){return"function"!=typeof i.containsNode||i.containsNode(t,!0)})},selectNode:function(t,e){var n=e.createRange();n.selectNodeContents(t),this.selectRange(e,n)},select:function(t,e,n,r,i){var o=t.createRange();return o.setStart(e,n),r?o.setEnd(r,i):o.collapse(!0),this.selectRange(t,o),o},clearSelection:function(t,e){e?t.getSelection().collapseToStart():t.getSelection().collapseToEnd()},moveCursor:function(t,e,n){this.select(t,e,n)},getSelectionRange:function(t){var e=t.getSelection();return 0===e.rangeCount?null:e.getRangeAt(0)},selectRange:function(t,e){var n=t.getSelection();n.removeAllRanges(),n.addRange(e)},getSelectionStart:function(t){var e=t.getSelection().anchorNode;return e&&3===e.nodeType?e.parentNode:e}};t.selection=n}(),function(){function e(e,n){return e.some(function(e){if("function"!=typeof e.getInteractionElements)return!1;var r=e.getInteractionElements();return!!r&&(Array.isArray(r)||(r=[r]),r.some(function(e){return t.util.isDescendant(e,n,!0)}))})}var n=function(t){this.base=t,this.options=this.base.options,this.events=[],this.disabledEvents={},this.customEvents={},this.listeners={}};n.prototype={InputEventOnContenteditableSupported:!t.util.isIE&&!t.util.isEdge,attachDOMEvent:function(e,n,r,i){var o=this.base.options.contentWindow,a=this.base.options.ownerDocument;e=t.util.isElement(e)||[o,a].indexOf(e)>-1?[e]:e,Array.prototype.forEach.call(e,function(t){t.addEventListener(n,r,i),this.events.push([t,n,r,i])}.bind(this))},detachDOMEvent:function(e,n,r,i){var o,a,s=this.base.options.contentWindow,u=this.base.options.ownerDocument;null!==e&&(e=t.util.isElement(e)||[s,u].indexOf(e)>-1?[e]:e,Array.prototype.forEach.call(e,function(t){-1!==(o=this.indexOfListener(t,n,r,i))&&(a=this.events.splice(o,1)[0],a[0].removeEventListener(a[1],a[2],a[3]))}.bind(this)))},indexOfListener:function(t,e,n,r){var i,o,a;for(i=0,o=this.events.length;i<o;i+=1)if(a=this.events[i],a[0]===t&&a[1]===e&&a[2]===n&&a[3]===r)return i;return-1},detachAllDOMEvents:function(){for(var t=this.events.pop();t;)t[0].removeEventListener(t[1],t[2],t[3]),t=this.events.pop()},detachAllEventsFromElement:function(t){for(var e=this.events.filter(function(e){return e&&e[0].getAttribute&&e[0].getAttribute("medium-editor-index")===t.getAttribute("medium-editor-index")}),n=0,r=e.length;n<r;n++){var i=e[n];this.detachDOMEvent(i[0],i[1],i[2],i[3])}},attachAllEventsToElement:function(t){this.listeners.editableInput&&(this.contentCache[t.getAttribute("medium-editor-index")]=t.innerHTML),this.eventsCache&&this.eventsCache.forEach(function(e){this.attachDOMEvent(t,e.name,e.handler.bind(this))},this)},enableCustomEvent:function(t){void 0!==this.disabledEvents[t]&&delete this.disabledEvents[t]},disableCustomEvent:function(t){this.disabledEvents[t]=!0},attachCustomEvent:function(t,e){this.setupListener(t),this.customEvents[t]||(this.customEvents[t]=[]),this.customEvents[t].push(e)},detachCustomEvent:function(t,e){var n=this.indexOfCustomListener(t,e);-1!==n&&this.customEvents[t].splice(n,1)},indexOfCustomListener:function(t,e){return this.customEvents[t]&&this.customEvents[t].length?this.customEvents[t].indexOf(e):-1},detachAllCustomEvents:function(){this.customEvents={}},triggerCustomEvent:function(t,e,n){this.customEvents[t]&&!this.disabledEvents[t]&&this.customEvents[t].forEach(function(t){t(e,n)})},destroy:function(){this.detachAllDOMEvents(),this.detachAllCustomEvents(),this.detachExecCommand(),this.base.elements&&this.base.elements.forEach(function(t){t.removeAttribute("data-medium-focused")})},attachToExecCommand:function(){this.execCommandListener||(this.execCommandListener=function(t){this.handleDocumentExecCommand(t)}.bind(this),this.wrapExecCommand(),this.options.ownerDocument.execCommand.listeners.push(this.execCommandListener))},detachExecCommand:function(){var t=this.options.ownerDocument;if(this.execCommandListener&&t.execCommand.listeners){var e=t.execCommand.listeners.indexOf(this.execCommandListener);-1!==e&&t.execCommand.listeners.splice(e,1),t.execCommand.listeners.length||this.unwrapExecCommand()}},wrapExecCommand:function(){var t=this.options.ownerDocument;if(!t.execCommand.listeners){var e=function(e,n){t.execCommand.listeners&&t.execCommand.listeners.forEach(function(t){t({command:e[0],value:e[2],args:e,result:n})})},n=function(){var n=t.execCommand.orig.apply(this,arguments);if(!t.execCommand.listeners)return n;var r=Array.prototype.slice.call(arguments);return e(r,n),n};n.orig=t.execCommand,n.listeners=[],n.callListeners=e,t.execCommand=n}},unwrapExecCommand:function(){var t=this.options.ownerDocument;t.execCommand.orig&&(t.execCommand=t.execCommand.orig)},setupListener:function(t){if(!this.listeners[t]){switch(t){case"externalInteraction":this.attachDOMEvent(this.options.ownerDocument.body,"mousedown",this.handleBodyMousedown.bind(this),!0),this.attachDOMEvent(this.options.ownerDocument.body,"click",this.handleBodyClick.bind(this),!0),this.attachDOMEvent(this.options.ownerDocument.body,"focus",this.handleBodyFocus.bind(this),!0);break;case"blur":case"focus":this.setupListener("externalInteraction");break;case"editableInput":this.contentCache={},this.base.elements.forEach(function(t){this.contentCache[t.getAttribute("medium-editor-index")]=t.innerHTML},this),this.InputEventOnContenteditableSupported&&this.attachToEachElement("input",this.handleInput),this.InputEventOnContenteditableSupported||(this.setupListener("editableKeypress"),this.keypressUpdateInput=!0,this.attachDOMEvent(document,"selectionchange",this.handleDocumentSelectionChange.bind(this)),this.attachToExecCommand());break;case"editableClick":this.attachToEachElement("click",this.handleClick);break;case"editableBlur":this.attachToEachElement("blur",this.handleBlur);break;case"editableKeypress":this.attachToEachElement("keypress",this.handleKeypress);break;case"editableKeyup":this.attachToEachElement("keyup",this.handleKeyup);break;case"editableKeydown":this.attachToEachElement("keydown",this.handleKeydown);break;case"editableKeydownSpace":case"editableKeydownEnter":case"editableKeydownTab":case"editableKeydownDelete":this.setupListener("editableKeydown");break;case"editableMouseover":this.attachToEachElement("mouseover",this.handleMouseover);break;case"editableDrag":this.attachToEachElement("dragover",this.handleDragging),this.attachToEachElement("dragleave",this.handleDragging);break;case"editableDrop":this.attachToEachElement("drop",this.handleDrop);break;case"editablePaste":this.attachToEachElement("paste",this.handlePaste)}this.listeners[t]=!0}},attachToEachElement:function(t,e){this.eventsCache||(this.eventsCache=[]),this.base.elements.forEach(function(n){this.attachDOMEvent(n,t,e.bind(this))},this),this.eventsCache.push({name:t,handler:e})},cleanupElement:function(t){var e=t.getAttribute("medium-editor-index");e&&(this.detachAllEventsFromElement(t),this.contentCache&&delete this.contentCache[e])},focusElement:function(t){t.focus(),this.updateFocus(t,{target:t,type:"focus"})},updateFocus:function(n,r){var i,o=this.base.getFocusedElement();o&&"click"===r.type&&this.lastMousedownTarget&&(t.util.isDescendant(o,this.lastMousedownTarget,!0)||e(this.base.extensions,this.lastMousedownTarget))&&(i=o),i||this.base.elements.some(function(e){return!i&&t.util.isDescendant(e,n,!0)&&(i=e),!!i},this);var a=!t.util.isDescendant(o,n,!0)&&!e(this.base.extensions,n);i!==o&&(o&&a&&(o.removeAttribute("data-medium-focused"),this.triggerCustomEvent("blur",r,o)),i&&(i.setAttribute("data-medium-focused",!0),this.triggerCustomEvent("focus",r,i))),a&&this.triggerCustomEvent("externalInteraction",r)},updateInput:function(t,e){if(this.contentCache){var n=t.getAttribute("medium-editor-index"),r=t.innerHTML;r!==this.contentCache[n]&&this.triggerCustomEvent("editableInput",e,t),this.contentCache[n]=r}},handleDocumentSelectionChange:function(e){if(e.currentTarget&&e.currentTarget.activeElement){var n,r=e.currentTarget.activeElement;this.base.elements.some(function(e){return!!t.util.isDescendant(e,r,!0)&&(n=e,!0)},this),n&&this.updateInput(n,{target:r,currentTarget:n})}},handleDocumentExecCommand:function(){var t=this.base.getFocusedElement();t&&this.updateInput(t,{target:t,currentTarget:t})},handleBodyClick:function(t){this.updateFocus(t.target,t)},handleBodyFocus:function(t){this.updateFocus(t.target,t)},handleBodyMousedown:function(t){this.lastMousedownTarget=t.target},handleInput:function(t){this.updateInput(t.currentTarget,t)},handleClick:function(t){this.triggerCustomEvent("editableClick",t,t.currentTarget)},handleBlur:function(t){this.triggerCustomEvent("editableBlur",t,t.currentTarget)},handleKeypress:function(t){if(this.triggerCustomEvent("editableKeypress",t,t.currentTarget),this.keypressUpdateInput){var e={target:t.target,currentTarget:t.currentTarget};setTimeout(function(){this.updateInput(e.currentTarget,e)}.bind(this),0)}},handleKeyup:function(t){this.triggerCustomEvent("editableKeyup",t,t.currentTarget)},handleMouseover:function(t){this.triggerCustomEvent("editableMouseover",t,t.currentTarget)},handleDragging:function(t){this.triggerCustomEvent("editableDrag",t,t.currentTarget)},handleDrop:function(t){this.triggerCustomEvent("editableDrop",t,t.currentTarget)},handlePaste:function(t){this.triggerCustomEvent("editablePaste",t,t.currentTarget)},handleKeydown:function(e){return this.triggerCustomEvent("editableKeydown",e,e.currentTarget),t.util.isKey(e,t.util.keyCode.SPACE)?this.triggerCustomEvent("editableKeydownSpace",e,e.currentTarget):t.util.isKey(e,t.util.keyCode.ENTER)||e.ctrlKey&&t.util.isKey(e,t.util.keyCode.M)?this.triggerCustomEvent("editableKeydownEnter",e,e.currentTarget):t.util.isKey(e,t.util.keyCode.TAB)?this.triggerCustomEvent("editableKeydownTab",e,e.currentTarget):t.util.isKey(e,[t.util.keyCode.DELETE,t.util.keyCode.BACKSPACE])?this.triggerCustomEvent("editableKeydownDelete",e,e.currentTarget):void 0}},t.Events=n}(),function(){var e=t.Extension.extend({action:void 0,aria:void 0,tagNames:void 0,style:void 0,useQueryState:void 0,contentDefault:void 0,contentFA:void 0,classList:void 0,attrs:void 0,constructor:function(n){e.isBuiltInButton(n)?t.Extension.call(this,this.defaults[n]):t.Extension.call(this,n)},init:function(){t.Extension.prototype.init.apply(this,arguments),this.button=this.createButton(),this.on(this.button,"click",this.handleClick.bind(this))},getButton:function(){return this.button},getAction:function(){return"function"==typeof this.action?this.action(this.base.options):this.action},getAria:function(){return"function"==typeof this.aria?this.aria(this.base.options):this.aria},getTagNames:function(){return"function"==typeof this.tagNames?this.tagNames(this.base.options):this.tagNames},createButton:function(){var t=this.document.createElement("button"),e=this.contentDefault,n=this.getAria(),r=this.getEditorOption("buttonLabels");return t.classList.add("medium-editor-action"),t.classList.add("medium-editor-action-"+this.name),this.classList&&this.classList.forEach(function(e){t.classList.add(e)}),t.setAttribute("data-action",this.getAction()),n&&(t.setAttribute("title",n),t.setAttribute("aria-label",n)),this.attrs&&Object.keys(this.attrs).forEach(function(e){t.setAttribute(e,this.attrs[e])},this),"fontawesome"===r&&this.contentFA&&(e=this.contentFA),t.innerHTML=e,t},handleClick:function(t){t.preventDefault(),t.stopPropagation();var e=this.getAction();e&&this.execAction(e)},isActive:function(){return this.button.classList.contains(this.getEditorOption("activeButtonClass"))},setInactive:function(){this.button.classList.remove(this.getEditorOption("activeButtonClass")),delete this.knownState},setActive:function(){this.button.classList.add(this.getEditorOption("activeButtonClass")),delete this.knownState},queryCommandState:function(){var t=null;return this.useQueryState&&(t=this.base.queryCommandState(this.getAction())),t},isAlreadyApplied:function(t){var e,n,r=!1,i=this.getTagNames();return!1===this.knownState||!0===this.knownState?this.knownState:(i&&i.length>0&&(r=-1!==i.indexOf(t.nodeName.toLowerCase())),!r&&this.style&&(e=this.style.value.split("|"),n=this.window.getComputedStyle(t,null).getPropertyValue(this.style.prop),e.forEach(function(t){this.knownState||((r=-1!==n.indexOf(t))||"text-decoration"!==this.style.prop)&&(this.knownState=r)},this)),r)}});e.isBuiltInButton=function(e){return"string"==typeof e&&t.extensions.button.prototype.defaults.hasOwnProperty(e)},t.extensions.button=e}(),function(){t.extensions.button.prototype.defaults={bold:{name:"bold",action:"bold",aria:"bold",tagNames:["b","strong"],style:{prop:"font-weight",value:"700|bold"},useQueryState:!0,contentDefault:"<b>B</b>",contentFA:'<i class="fa fa-bold"></i>'},italic:{name:"italic",action:"italic",aria:"italic",tagNames:["i","em"],style:{prop:"font-style",value:"italic"},useQueryState:!0,contentDefault:"<b><i>I</i></b>",contentFA:'<i class="fa fa-italic"></i>'},underline:{name:"underline",action:"underline",aria:"underline",tagNames:["u"],style:{prop:"text-decoration",value:"underline"},useQueryState:!0,contentDefault:"<b><u>U</u></b>",contentFA:'<i class="fa fa-underline"></i>'},strikethrough:{name:"strikethrough",action:"strikethrough",aria:"strike through",tagNames:["strike"],style:{prop:"text-decoration",value:"line-through"},useQueryState:!0,contentDefault:"<s>A</s>",contentFA:'<i class="fa fa-strikethrough"></i>'},superscript:{name:"superscript",action:"superscript",aria:"superscript",tagNames:["sup"],contentDefault:"<b>x<sup>1</sup></b>",contentFA:'<i class="fa fa-superscript"></i>'},subscript:{name:"subscript",action:"subscript",aria:"subscript",tagNames:["sub"],contentDefault:"<b>x<sub>1</sub></b>",contentFA:'<i class="fa fa-subscript"></i>'},image:{name:"image",action:"image",aria:"image",tagNames:["img"],contentDefault:"<b>image</b>",contentFA:'<i class="fa fa-picture-o"></i>'},html:{name:"html",action:"html",aria:"evaluate html",tagNames:["iframe","object"],contentDefault:"<b>html</b>",contentFA:'<i class="fa fa-code"></i>'},orderedlist:{name:"orderedlist",action:"insertorderedlist",aria:"ordered list",tagNames:["ol"],useQueryState:!0,contentDefault:"<b>1.</b>",contentFA:'<i class="fa fa-list-ol"></i>'},unorderedlist:{name:"unorderedlist",action:"insertunorderedlist",aria:"unordered list",tagNames:["ul"],useQueryState:!0,contentDefault:"<b>&bull;</b>",contentFA:'<i class="fa fa-list-ul"></i>'},indent:{name:"indent",action:"indent",aria:"indent",tagNames:[],contentDefault:"<b>&rarr;</b>",contentFA:'<i class="fa fa-indent"></i>'},outdent:{name:"outdent",action:"outdent",aria:"outdent",tagNames:[],contentDefault:"<b>&larr;</b>",contentFA:'<i class="fa fa-outdent"></i>'},justifyCenter:{name:"justifyCenter",action:"justifyCenter",aria:"center justify",tagNames:[],style:{prop:"text-align",value:"center"},contentDefault:"<b>C</b>",contentFA:'<i class="fa fa-align-center"></i>'},justifyFull:{name:"justifyFull",action:"justifyFull",aria:"full justify",tagNames:[],style:{prop:"text-align",value:"justify"},contentDefault:"<b>J</b>",contentFA:'<i class="fa fa-align-justify"></i>'},justifyLeft:{name:"justifyLeft",action:"justifyLeft",aria:"left justify",tagNames:[],style:{prop:"text-align",value:"left"},contentDefault:"<b>L</b>",contentFA:'<i class="fa fa-align-left"></i>'},justifyRight:{name:"justifyRight",action:"justifyRight",aria:"right justify",tagNames:[],style:{prop:"text-align",value:"right"},contentDefault:"<b>R</b>",contentFA:'<i class="fa fa-align-right"></i>'},removeFormat:{name:"removeFormat",aria:"remove formatting",action:"removeFormat",contentDefault:"<b>X</b>",contentFA:'<i class="fa fa-eraser"></i>'},quote:{name:"quote",action:"append-blockquote",aria:"blockquote",tagNames:["blockquote"],contentDefault:"<b>&ldquo;</b>",contentFA:'<i class="fa fa-quote-right"></i>'},pre:{name:"pre",action:"append-pre",aria:"preformatted text",tagNames:["pre"],contentDefault:"<b>0101</b>",contentFA:'<i class="fa fa-code fa-lg"></i>'},h1:{name:"h1",action:"append-h1",aria:"header type one",tagNames:["h1"],contentDefault:"<b>H1</b>",contentFA:'<i class="fa fa-header"><sup>1</sup>'},h2:{name:"h2",action:"append-h2",aria:"header type two",tagNames:["h2"],contentDefault:"<b>H2</b>",contentFA:'<i class="fa fa-header"><sup>2</sup>'},h3:{name:"h3",action:"append-h3",aria:"header type three",tagNames:["h3"],contentDefault:"<b>H3</b>",contentFA:'<i class="fa fa-header"><sup>3</sup>'},h4:{name:"h4",action:"append-h4",aria:"header type four",tagNames:["h4"],contentDefault:"<b>H4</b>",contentFA:'<i class="fa fa-header"><sup>4</sup>'},h5:{name:"h5",action:"append-h5",aria:"header type five",tagNames:["h5"],contentDefault:"<b>H5</b>",contentFA:'<i class="fa fa-header"><sup>5</sup>'},h6:{name:"h6",action:"append-h6",aria:"header type six",tagNames:["h6"],contentDefault:"<b>H6</b>",contentFA:'<i class="fa fa-header"><sup>6</sup>'}}}(),function(){var e=t.extensions.button.extend({init:function(){t.extensions.button.prototype.init.apply(this,arguments)},formSaveLabel:"&#10003;",formCloseLabel:"&times;",activeClass:"medium-editor-toolbar-form-active",hasForm:!0,getForm:function(){},isDisplayed:function(){return!!this.hasForm&&this.getForm().classList.contains(this.activeClass)},showForm:function(){this.hasForm&&this.getForm().classList.add(this.activeClass)},hideForm:function(){this.hasForm&&this.getForm().classList.remove(this.activeClass)},showToolbarDefaultActions:function(){var t=this.base.getExtensionByName("toolbar");t&&t.showToolbarDefaultActions()},hideToolbarDefaultActions:function(){var t=this.base.getExtensionByName("toolbar");t&&t.hideToolbarDefaultActions()},setToolbarPosition:function(){var t=this.base.getExtensionByName("toolbar");t&&t.setToolbarPosition()}});t.extensions.form=e}(),function(){var e=t.extensions.form.extend({customClassOption:null,customClassOptionText:"Button",linkValidation:!1,placeholderText:"Paste or type a link",targetCheckbox:!1,targetCheckboxText:"Open in new window",name:"anchor",action:"createLink",aria:"link",tagNames:["a"],contentDefault:"<b>#</b>",contentFA:'<i class="fa fa-link"></i>',init:function(){t.extensions.form.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this))},handleClick:function(e){e.preventDefault(),e.stopPropagation();var n=t.selection.getSelectionRange(this.document);return"a"===n.startContainer.nodeName.toLowerCase()||"a"===n.endContainer.nodeName.toLowerCase()||t.util.getClosestTag(t.selection.getSelectedParentElement(n),"a")?this.execAction("unlink"):(this.isDisplayed()||this.showForm(),!1)},handleKeydown:function(e){t.util.isKey(e,t.util.keyCode.K)&&t.util.isMetaCtrlKey(e)&&!e.shiftKey&&this.handleClick(e)},getForm:function(){return this.form||(this.form=this.createForm()),this.form},getTemplate:function(){var t=['<input type="text" class="medium-editor-toolbar-input" placeholder="',this.placeholderText,'">'];return t.push('<a href="#" class="medium-editor-toolbar-save">',"fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-check"></i>':this.formSaveLabel,"</a>"),t.push('<a href="#" class="medium-editor-toolbar-close">',"fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-times"></i>':this.formCloseLabel,"</a>"),this.targetCheckbox&&t.push('<div class="medium-editor-toolbar-form-row">','<input type="checkbox" class="medium-editor-toolbar-anchor-target" id="medium-editor-toolbar-anchor-target-field-'+this.getEditorId()+'">','<label for="medium-editor-toolbar-anchor-target-field-'+this.getEditorId()+'">',this.targetCheckboxText,"</label>","</div>"),this.customClassOption&&t.push('<div class="medium-editor-toolbar-form-row">','<input type="checkbox" class="medium-editor-toolbar-anchor-button">',"<label>",this.customClassOptionText,"</label>","</div>"),t.join("")},isDisplayed:function(){return t.extensions.form.prototype.isDisplayed.apply(this)},hideForm:function(){t.extensions.form.prototype.hideForm.apply(this),this.getInput().value=""},showForm:function(e){var n=this.getInput(),r=this.getAnchorTargetCheckbox(),i=this.getAnchorButtonCheckbox();if(e=e||{value:""},"string"==typeof e&&(e={value:e}),this.base.saveSelection(),this.hideToolbarDefaultActions(),t.extensions.form.prototype.showForm.apply(this),this.setToolbarPosition(),n.value=e.value,n.focus(),r&&(r.checked="_blank"===e.target),i){var o=e.buttonClass?e.buttonClass.split(" "):[];i.checked=-1!==o.indexOf(this.customClassOption)}},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},getFormOpts:function(){var t=this.getAnchorTargetCheckbox(),e=this.getAnchorButtonCheckbox(),n={value:this.getInput().value.trim()};return this.linkValidation&&(n.value=this.checkLinkFormat(n.value)),n.target="_self",t&&t.checked&&(n.target="_blank"),e&&e.checked&&(n.buttonClass=this.customClassOption),n},doFormSave:function(){var t=this.getFormOpts();this.completeFormSave(t)},completeFormSave:function(t){this.base.restoreSelection(),this.execAction(this.action,t),this.base.checkSelection()},ensureEncodedUri:function(t){return t===decodeURI(t)?encodeURI(t):t},ensureEncodedUriComponent:function(t){return t===decodeURIComponent(t)?encodeURIComponent(t):t},ensureEncodedParam:function(t){var e=t.split("="),n=e[0],r=e[1];return n+(void 0===r?"":"="+this.ensureEncodedUriComponent(r))},ensureEncodedQuery:function(t){return t.split("&").map(this.ensureEncodedParam.bind(this)).join("&")},checkLinkFormat:function(t){var e=/^([a-z]+:)?\/\/|^(mailto|tel|maps):|^\#/i,n=e.test(t),r="",i=/^\+?\s?\(?(?:\d\s?\-?\)?){3,20}$/,o=t.match(/^(.*?)(?:\?(.*?))?(?:#(.*))?$/),a=o[1],s=o[2],u=o[3];if(i.test(t))return"tel:"+t;if(!n){var c=a.split("/")[0];(c.match(/.+(\.|:).+/)||"localhost"===c)&&(r="http://")}return r+this.ensureEncodedUri(a)+(void 0===s?"":"?"+this.ensureEncodedQuery(s))+(void 0===u?"":"#"+u)},doFormCancel:function(){this.base.restoreSelection(),this.base.checkSelection()},attachFormEvents:function(t){var e=t.querySelector(".medium-editor-toolbar-close"),n=t.querySelector(".medium-editor-toolbar-save"),r=t.querySelector(".medium-editor-toolbar-input");this.on(t,"click",this.handleFormClick.bind(this)),this.on(r,"keyup",this.handleTextboxKeyup.bind(this)),this.on(e,"click",this.handleCloseClick.bind(this)),this.on(n,"click",this.handleSaveClick.bind(this),!0)},createForm:function(){var t=this.document,e=t.createElement("div");return e.className="medium-editor-toolbar-form",e.id="medium-editor-toolbar-form-anchor-"+this.getEditorId(),e.innerHTML=this.getTemplate(),this.attachFormEvents(e),e},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},getAnchorTargetCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-target")},getAnchorButtonCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-button")},handleTextboxKeyup:function(e){if(e.keyCode===t.util.keyCode.ENTER)return e.preventDefault(),void this.doFormSave();e.keyCode===t.util.keyCode.ESCAPE&&(e.preventDefault(),this.doFormCancel())},handleFormClick:function(t){t.stopPropagation()},handleSaveClick:function(t){t.preventDefault(),this.doFormSave()},handleCloseClick:function(t){t.preventDefault(),this.doFormCancel()}});t.extensions.anchor=e}(),function(){var e=t.Extension.extend({name:"anchor-preview",hideDelay:500,previewValueSelector:"a",showWhenToolbarIsVisible:!1,showOnEmptyLinks:!0,init:function(){this.anchorPreview=this.createPreview(),this.getEditorOption("elementsContainer").appendChild(this.anchorPreview),this.attachToEditables()},getInteractionElements:function(){return this.getPreviewElement()},getPreviewElement:function(){return this.anchorPreview},createPreview:function(){var t=this.document.createElement("div");return t.id="medium-editor-anchor-preview-"+this.getEditorId(),t.className="medium-editor-anchor-preview",t.innerHTML=this.getTemplate(),this.on(t,"click",this.handleClick.bind(this)),t},getTemplate:function(){return'<div class="medium-editor-toolbar-anchor-preview" id="medium-editor-toolbar-anchor-preview"> <a class="medium-editor-toolbar-anchor-preview-inner"></a></div>'},destroy:function(){this.anchorPreview&&(this.anchorPreview.parentNode&&this.anchorPreview.parentNode.removeChild(this.anchorPreview),delete this.anchorPreview)},hidePreview:function(){this.anchorPreview&&this.anchorPreview.classList.remove("medium-editor-anchor-preview-active"),this.activeAnchor=null},showPreview:function(t){return!(!this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")&&!t.getAttribute("data-disable-preview"))||(this.previewValueSelector&&(this.anchorPreview.querySelector(this.previewValueSelector).textContent=t.attributes.href.value,this.anchorPreview.querySelector(this.previewValueSelector).href=t.attributes.href.value),this.anchorPreview.classList.add("medium-toolbar-arrow-over"),this.anchorPreview.classList.remove("medium-toolbar-arrow-under"),this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||this.anchorPreview.classList.add("medium-editor-anchor-preview-active"),this.activeAnchor=t,this.positionPreview(),this.attachPreviewHandlers(),this)},positionPreview:function(t){t=t||this.activeAnchor;var e,n,r,i,o,a=this.window.innerWidth,s=this.anchorPreview.offsetHeight,u=t.getBoundingClientRect(),c=this.diffLeft,l=this.diffTop,f=this.getEditorOption("elementsContainer"),d=["absolute","fixed"].indexOf(window.getComputedStyle(f).getPropertyValue("position"))>-1,h={};e=this.anchorPreview.offsetWidth/2;var p=this.base.getExtensionByName("toolbar");p&&(c=p.diffLeft,l=p.diffTop),n=c-e,d?(i=f.getBoundingClientRect(),["top","left"].forEach(function(t){h[t]=u[t]-i[t]}),h.width=u.width,h.height=u.height,u=h,a=i.width,o=f.scrollTop):o=this.window.pageYOffset,r=u.left+u.width/2,o+=s+u.top+u.height-l-this.anchorPreview.offsetHeight,this.anchorPreview.style.top=Math.round(o)+"px",this.anchorPreview.style.right="initial",r<e?(this.anchorPreview.style.left=n+e+"px",this.anchorPreview.style.right="initial"):a-r<e?(this.anchorPreview.style.left="auto",this.anchorPreview.style.right=0):(this.anchorPreview.style.left=n+r+"px",this.anchorPreview.style.right="initial")},attachToEditables:function(){this.subscribe("editableMouseover",this.handleEditableMouseover.bind(this)),this.subscribe("positionedToolbar",this.handlePositionedToolbar.bind(this))},handlePositionedToolbar:function(){this.showWhenToolbarIsVisible||this.hidePreview()},handleClick:function(t){var e=this.base.getExtensionByName("anchor"),n=this.activeAnchor;e&&n&&(t.preventDefault(),this.base.selectElement(this.activeAnchor),this.base.delay(function(){if(n){var t={value:n.attributes.href.value,target:n.getAttribute("target"),buttonClass:n.getAttribute("class")};e.showForm(t),n=null}}.bind(this))),this.hidePreview()},handleAnchorMouseout:function(){this.anchorToPreview=null,this.off(this.activeAnchor,"mouseout",this.instanceHandleAnchorMouseout),this.instanceHandleAnchorMouseout=null},handleEditableMouseover:function(e){var n=t.util.getClosestTag(e.target,"a");if(!1!==n){if(!this.showOnEmptyLinks&&(!/href=["']\S+["']/.test(n.outerHTML)||/href=["']#\S+["']/.test(n.outerHTML)))return!0;var r=this.base.getExtensionByName("toolbar");if(!this.showWhenToolbarIsVisible&&r&&r.isDisplayed&&r.isDisplayed())return!0;this.activeAnchor&&this.activeAnchor!==n&&this.detachPreviewHandlers(),this.anchorToPreview=n,this.instanceHandleAnchorMouseout=this.handleAnchorMouseout.bind(this),this.on(this.anchorToPreview,"mouseout",this.instanceHandleAnchorMouseout),this.base.delay(function(){this.anchorToPreview&&this.showPreview(this.anchorToPreview)}.bind(this))}},handlePreviewMouseover:function(){this.lastOver=(new Date).getTime(),this.hovering=!0},handlePreviewMouseout:function(t){t.relatedTarget&&/anchor-preview/.test(t.relatedTarget.className)||(this.hovering=!1)},updatePreview:function(){if(this.hovering)return!0;(new Date).getTime()-this.lastOver>this.hideDelay&&this.detachPreviewHandlers()},detachPreviewHandlers:function(){clearInterval(this.intervalTimer),this.instanceHandlePreviewMouseover&&(this.off(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.activeAnchor&&(this.off(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout))),this.hidePreview(),this.hovering=this.instanceHandlePreviewMouseover=this.instanceHandlePreviewMouseout=null},attachPreviewHandlers:function(){this.lastOver=(new Date).getTime(),this.hovering=!0,this.instanceHandlePreviewMouseover=this.handlePreviewMouseover.bind(this),this.instanceHandlePreviewMouseout=this.handlePreviewMouseout.bind(this),this.intervalTimer=setInterval(this.updatePreview.bind(this),200),this.on(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.on(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout)}});t.extensions.anchorPreview=e}(),function(){function e(e){return!t.util.getClosestTag(e,"a")}var n,r,i,o,a;n=[" ","\t","\n","\r"," "," "," "," "," ","\u2028","\u2029"],r="com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw",i="(((?:(https?://|ftps?://|nntp://)|www\\d{0,3}[.]|[a-z0-9.\\-]+[.]("+r+")\\/)\\S+(?:[^\\s`!\\[\\]{};:'\".,?«»“”‘’])))|(([a-z0-9\\-]+\\.)?[a-z0-9\\-]+\\.("+r+"))",o=new RegExp("^("+r+")$","i"),a=new RegExp(i,"gi");var s=t.Extension.extend({init:function(){t.Extension.prototype.init.apply(this,arguments),this.disableEventHandling=!1,this.subscribe("editableKeypress",this.onKeypress.bind(this)),this.subscribe("editableBlur",this.onBlur.bind(this)),this.document.execCommand("AutoUrlDetect",!1,!1)},isLastInstance:function(){for(var t=0,e=0;e<this.window._mediumEditors.length;e++){var n=this.window._mediumEditors[e];null!==n&&void 0!==n.getExtensionByName("autoLink")&&t++}return 1===t},destroy:function(){this.document.queryCommandSupported("AutoUrlDetect")&&this.isLastInstance()&&this.document.execCommand("AutoUrlDetect",!1,!0)},onBlur:function(t,e){this.performLinking(e)},onKeypress:function(e){this.disableEventHandling||t.util.isKey(e,[t.util.keyCode.SPACE,t.util.keyCode.ENTER])&&(clearTimeout(this.performLinkingTimeout),this.performLinkingTimeout=setTimeout(function(){try{var t=this.base.exportSelection();this.performLinking(e.target)&&this.base.importSelection(t,!0)}catch(t){window.console&&window.console.error("Failed to perform linking",t),this.disableEventHandling=!0}}.bind(this),0))},performLinking:function(e){var n=t.util.splitByBlockElements(e),r=!1;0===n.length&&(n=[e]);for(var i=0;i<n.length;i++)r=this.removeObsoleteAutoLinkSpans(n[i])||r,r=this.performLinkingWithinElement(n[i])||r;return this.base.events.updateInput(e,{target:e,currentTarget:e}),r},removeObsoleteAutoLinkSpans:function(n){if(!n||3===n.nodeType)return!1;for(var r=n.querySelectorAll('span[data-auto-link="true"]'),i=!1,o=0;o<r.length;o++){var a=r[o].textContent;if(-1===a.indexOf("://")&&(a=t.util.ensureUrlHasProtocol(a)),r[o].getAttribute("data-href")!==a&&e(r[o])){i=!0;var s=a.replace(/\s+$/,"");if(r[o].getAttribute("data-href")===s){var u=a.length-s.length,c=t.util.splitOffDOMTree(r[o],this.splitTextBeforeEnd(r[o],u));r[o].parentNode.insertBefore(c,r[o].nextSibling)}else t.util.unwrap(r[o],this.document)}}return i},splitTextBeforeEnd:function(t,e){for(var n=this.document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1),r=!0;r;)r=null!==n.lastChild();for(var i,o,a;e>0&&null!==a;)i=n.currentNode,o=i.nodeValue,o.length>e?(a=i.splitText(o.length-e),e=0):(a=n.previousNode(),e-=o.length);return a},performLinkingWithinElement:function(e){for(var n=this.findLinkableText(e),r=0;r<n.length;r++){var i=t.util.findOrCreateMatchingTextNodes(this.document,e,n[r]);this.shouldNotLink(i)||this.createAutoLink(i,n[r].href)}return!1},shouldNotLink:function(e){for(var n=!1,r=0;r<e.length&&!1===n;r++)n=!!t.util.traverseUp(e[r],function(t){return"a"===t.nodeName.toLowerCase()||t.getAttribute&&"true"===t.getAttribute("data-auto-link")});return n},findLinkableText:function(t){for(var e=t.textContent,r=null,i=[];null!==(r=a.exec(e));){var s=!0,u=r.index+r[0].length;s=!(0!==r.index&&-1===n.indexOf(e[r.index-1])||u!==e.length&&-1===n.indexOf(e[u])),s=s&&(-1!==r[0].indexOf("/")||o.test(r[0].split(".").pop().split("?").shift())),s&&i.push({href:r[0],start:r.index,end:u})}return i},createAutoLink:function(e,n){n=t.util.ensureUrlHasProtocol(n);var r=t.util.createLink(this.document,e,n,this.getEditorOption("targetBlank")?"_blank":null),i=this.document.createElement("span");for(i.setAttribute("data-auto-link","true"),i.setAttribute("data-href",n),r.insertBefore(i,r.firstChild);r.childNodes.length>1;)i.appendChild(r.childNodes[1])}});t.extensions.autoLink=s}(),function(){function e(e){var r=t.util.getContainerEditorElement(e);Array.prototype.slice.call(r.parentElement.querySelectorAll("."+n)).forEach(function(t){t.classList.remove(n)})}var n="medium-editor-dragover",r=t.Extension.extend({name:"fileDragging",allowedTypes:["image"],init:function(){t.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(t){t.preventDefault(),t.dataTransfer.dropEffect="copy";var r=t.target.classList?t.target:t.target.parentElement;e(r),"dragover"===t.type&&r.classList.add(n)},handleDrop:function(t){t.preventDefault(),t.stopPropagation(),this.base.selectElement(t.target);var n=this.base.exportSelection();n.start=n.end,this.base.importSelection(n),t.dataTransfer.files&&Array.prototype.slice.call(t.dataTransfer.files).forEach(function(t){this.isAllowedFile(t)&&t.type.match("image")&&this.insertImageFile(t)},this),e(t.target)},isAllowedFile:function(t){return this.allowedTypes.some(function(e){return!!t.type.match(e)})},insertImageFile:function(e){if("function"==typeof FileReader){var n=new FileReader;n.readAsDataURL(e),n.addEventListener("load",function(e){var n=this.document.createElement("img");n.src=e.target.result,t.util.insertHTMLCommand(this.document,n.outerHTML)}.bind(this))}}});t.extensions.fileDragging=r}(),function(){var e=t.Extension.extend({name:"keyboard-commands",commands:[{command:"bold",key:"B",meta:!0,shift:!1,alt:!1},{command:"italic",key:"I",meta:!0,shift:!1,alt:!1},{command:"underline",key:"U",meta:!0,shift:!1,alt:!1}],init:function(){t.Extension.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.keys={},this.commands.forEach(function(t){var e=t.key.charCodeAt(0);this.keys[e]||(this.keys[e]=[]),this.keys[e].push(t)},this)},handleKeydown:function(e){var n=t.util.getKeyCode(e);if(this.keys[n]){var r=t.util.isMetaCtrlKey(e),i=!!e.shiftKey,o=!!e.altKey;this.keys[n].forEach(function(t){t.meta!==r||t.shift!==i||t.alt!==o&&void 0!==t.alt||(e.preventDefault(),e.stopPropagation(),"function"==typeof t.command?t.command.apply(this):!1!==t.command&&this.execAction(t.command))},this)}}});t.extensions.keyboardCommands=e}(),function(){var e=t.extensions.form.extend({name:"fontname",action:"fontName",aria:"change font name",contentDefault:"&#xB1;",contentFA:'<i class="fa fa-font"></i>',fonts:["","Arial","Verdana","Times New Roman"],init:function(){t.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(t){if(t.preventDefault(),t.stopPropagation(),!this.isDisplayed()){var e=this.document.queryCommandValue("fontName")+"";this.showForm(e)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return"block"===this.getForm().style.display},hideForm:function(){this.getForm().style.display="none",this.getSelect().value=""},showForm:function(t){var e=this.getSelect();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),e.value=t||"",e.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontName(),this.base.checkSelection()},createForm:function(){var t,e=this.document,n=e.createElement("div"),r=e.createElement("select"),i=e.createElement("a"),o=e.createElement("a");n.className="medium-editor-toolbar-form",n.id="medium-editor-toolbar-form-fontname-"+this.getEditorId(),this.on(n,"click",this.handleFormClick.bind(this));for(var a=0;a<this.fonts.length;a++)t=e.createElement("option"),t.innerHTML=this.fonts[a],t.value=this.fonts[a],r.appendChild(t);return r.className="medium-editor-toolbar-select",n.appendChild(r),this.on(r,"change",this.handleFontChange.bind(this)),o.setAttribute("href","#"),o.className="medium-editor-toobar-save",o.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-check"></i>':"&#10003;",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")?'<i class="fa fa-times"></i>':"&times;",n.appendChild(i),this.on(i,"click",this.handleCloseClick.bind(this)),n},getSelect:function(){return this.getForm().querySelector("select.medium-editor-toolbar-select")},clearFontName:function(){t.selection.getSelectedElements(this.document).forEach(function(t){"font"===t.nodeName.toLowerCase()&&t.hasAttribute("face")&&t.removeAttribute("face")})},handleFontChange:function(){var t=this.getSelect().value;""===t?this.clearFontName():this.execAction("fontName",{value:t})},handleFormClick:function(t){t.stopPropagation()},handleSaveClick:function(t){t.preventDefault(),this.doFormSave()},handleCloseClick:function(t){t.preventDefault(),this.doFormCancel()}});t.extensions.fontName=e}(),function(){var e=t.extensions.form.extend({name:"fontsize",action:"fontSize",aria:"increase/decrease font size",contentDefault:"&#xB1;",contentFA:'<i class="fa fa-text-height"></i>',init:function(){t.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(t){if(t.preventDefault(),t.stopPropagation(),!this.isDisplayed()){var e=this.document.queryCommandValue("fontSize")+"";this.showForm(e)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return"block"===this.getForm().style.display},hideForm:function(){this.getForm().style.display="none",this.getInput().value=""},showForm:function(t){var e=this.getInput();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),e.value=t||"",e.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontSize(),this.base.checkSelection()},createForm:function(){var t=this.document,e=t.createElement("div"),n=t.createElement("input"),r=t.createElement("a"),i=t.createElement("a");return e.className="medium-editor-toolbar-form",e.id="medium-editor-toolbar-form-fontsize-"+this.getEditorId(),this.on(e,"click",this.handleFormClick.bind(this)),n.setAttribute("type","range"),n.setAttribute("min","1"),n.setAttribute("max","7"),n.className="medium-editor-toolbar-input",e.appendChild(n),this.on(n,"change",this.handleSliderChange.bind(this)),i.setAttribute("href","#"),i.className="medium-editor-toobar-save",i.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-check"></i>':"&#10003;",e.appendChild(i),this.on(i,"click",this.handleSaveClick.bind(this),!0),r.setAttribute("href","#"),r.className="medium-editor-toobar-close",r.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-times"></i>':"&times;",e.appendChild(r),this.on(r,"click",this.handleCloseClick.bind(this)),e},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},clearFontSize:function(){t.selection.getSelectedElements(this.document).forEach(function(t){"font"===t.nodeName.toLowerCase()&&t.hasAttribute("size")&&t.removeAttribute("size")})},handleSliderChange:function(){var t=this.getInput().value;"4"===t?this.clearFontSize():this.execAction("fontSize",{value:t})},handleFormClick:function(t){t.stopPropagation()},handleSaveClick:function(t){t.preventDefault(),this.doFormSave()},handleCloseClick:function(t){t.preventDefault(),this.doFormCancel()}});t.extensions.fontSize=e}(),function(){function e(){return[[new RegExp(/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g),""],[new RegExp(/<!--StartFragment-->|<!--EndFragment-->/g),""],[new RegExp(/<br>$/i),""],[new RegExp(/<[^>]*docs-internal-guid[^>]*>/gi),""],[new RegExp(/<\/b>(<br[^>]*>)?$/gi),""],[new RegExp(/<span class="Apple-converted-space">\s+<\/span>/g)," "],[new RegExp(/<br class="Apple-interchange-newline">/g),"<br>"],[new RegExp(/<span[^>]*(font-style:italic;font-weight:(bold|700)|font-weight:(bold|700);font-style:italic)[^>]*>/gi),'<span class="replace-with italic bold">'],[new RegExp(/<span[^>]*font-style:italic[^>]*>/gi),'<span class="replace-with italic">'],[new RegExp(/<span[^>]*font-weight:(bold|700)[^>]*>/gi),'<span class="replace-with bold">'],[new RegExp(/&lt;(\/?)(i|b|a)&gt;/gi),"<$1$2>"],[new RegExp(/&lt;a(?:(?!href).)+href=(?:&quot;|&rdquo;|&ldquo;|"|“|”)(((?!&quot;|&rdquo;|&ldquo;|"|“|”).)*)(?:&quot;|&rdquo;|&ldquo;|"|“|”)(?:(?!&gt;).)*&gt;/gi),'<a href="$1">'],[new RegExp(/<\/p>\n+/gi),"</p>"],[new RegExp(/\n+<p/gi),"<p"],[new RegExp(/<\/?o:[a-z]*>/gi),""],[new RegExp(/<!\[if !supportLists\]>(((?!<!).)*)<!\[endif]\>/gi),"$1"]]}function n(t,e,n){var r=t.clipboardData||e.clipboardData||n.dataTransfer,i={};if(!r)return i;if(r.getData){var o=r.getData("Text");o&&o.length>0&&(i["text/plain"]=o)}if(r.types)for(var a=0;a<r.types.length;a++){var s=r.types[a];i[s]=r.getData(s)}return i}var r=null,i=null,o=function(t){t.stopPropagation()},a=t.Extension.extend({forcePlainText:!0,cleanPastedHTML:!1,preCleanReplacements:[],cleanReplacements:[],cleanAttrs:["class","style","dir"],cleanTags:["meta"],unwrapTags:[],init:function(){t.Extension.prototype.init.apply(this,arguments),(this.forcePlainText||this.cleanPastedHTML)&&(this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.getEditorElements().forEach(function(t){this.on(t,"paste",this.handlePaste.bind(this))},this),this.subscribe("addElement",this.handleAddElement.bind(this)))},handleAddElement:function(t,e){this.on(e,"paste",this.handlePaste.bind(this))},destroy:function(){(this.forcePlainText||this.cleanPastedHTML)&&this.removePasteBin()},handlePaste:function(t,e){if(!t.defaultPrevented){var r=n(t,this.window,this.document),i=r["text/html"],o=r["text/plain"];this.window.clipboardData&&void 0===t.clipboardData&&!i&&(i=o),(i||o)&&(t.preventDefault(),this.doPaste(i,o,e))}},doPaste:function(e,n,r){var i,o,a="";if(this.cleanPastedHTML&&e)return this.cleanPaste(e);if(this.getEditorOption("disableReturn")||r&&r.getAttribute("data-disable-return"))a=t.util.htmlEntities(n);else if(i=n.split(/[\r\n]+/g),i.length>1)for(o=0;o<i.length;o+=1)""!==i[o]&&(a+="<p>"+t.util.htmlEntities(i[o])+"</p>");else a=t.util.htmlEntities(i[0]);t.util.insertHTMLCommand(this.document,a)},handlePasteBinPaste:function(t){if(t.defaultPrevented)return void this.removePasteBin();var e=n(t,this.window,this.document),r=e["text/html"],o=e["text/plain"],a=i;if(!this.cleanPastedHTML||r)return t.preventDefault(),this.removePasteBin(),this.doPaste(r,o,a),void this.trigger("editablePaste",{currentTarget:a,target:a},a);setTimeout(function(){this.cleanPastedHTML&&(r=this.getPasteBinHtml()),this.removePasteBin(),this.doPaste(r,o,a),this.trigger("editablePaste",{currentTarget:a,target:a},a)}.bind(this),0)},handleKeydown:function(e,n){t.util.isKey(e,t.util.keyCode.V)&&t.util.isMetaCtrlKey(e)&&(e.stopImmediatePropagation(),this.removePasteBin(),this.createPasteBin(n))},createPasteBin:function(e){var n,a=t.selection.getSelectionRange(this.document),s=this.window.pageYOffset;i=e,a&&(n=a.getClientRects(),n.length?s+=n[0].top:void 0!==a.startContainer.getBoundingClientRect?s+=a.startContainer.getBoundingClientRect().top:s+=a.getBoundingClientRect().top),r=a;var u=this.document.createElement("div");u.id=this.pasteBinId="medium-editor-pastebin-"+ +Date.now(),u.setAttribute("style","border: 1px red solid; position: absolute; top: "+s+"px; width: 10px; height: 10px; overflow: hidden; opacity: 0"),u.setAttribute("contentEditable",!0),u.innerHTML="%ME_PASTEBIN%",this.document.body.appendChild(u),this.on(u,"focus",o),this.on(u,"focusin",o),this.on(u,"focusout",o),u.focus(),t.selection.selectNode(u,this.document),this.boundHandlePaste||(this.boundHandlePaste=this.handlePasteBinPaste.bind(this)),this.on(u,"paste",this.boundHandlePaste)},removePasteBin:function(){null!==r&&(t.selection.selectRange(this.document,r),r=null),null!==i&&(i=null);var e=this.getPasteBin();e&&e&&(this.off(e,"focus",o),this.off(e,"focusin",o),this.off(e,"focusout",o),this.off(e,"paste",this.boundHandlePaste),e.parentElement.removeChild(e))},getPasteBin:function(){return this.document.getElementById(this.pasteBinId)},getPasteBinHtml:function(){var t=this.getPasteBin();if(!t)return!1;if(t.firstChild&&"mcepastebin"===t.firstChild.id)return!1;var e=t.innerHTML;return!(!e||"%ME_PASTEBIN%"===e)&&e},cleanPaste:function(t){var n,r,i,o,a=/<p|<br|<div/.test(t),s=[].concat(this.preCleanReplacements||[],e(),this.cleanReplacements||[]);for(n=0;n<s.length;n+=1)t=t.replace(s[n][0],s[n][1]);if(!a)return this.pasteHTML(t);for(i=this.document.createElement("div"),i.innerHTML="<p>"+t.split("<br><br>").join("</p><p>")+"</p>",r=i.querySelectorAll("a,p,div,br"),n=0;n<r.length;n+=1)switch(o=r[n],o.innerHTML=o.innerHTML.replace(/\n/gi," "),o.nodeName.toLowerCase()){case"p":case"div":this.filterCommonBlocks(o);break;case"br":this.filterLineBreak(o)}this.pasteHTML(i.innerHTML)},pasteHTML:function(e,n){n=t.util.defaults({},n,{cleanAttrs:this.cleanAttrs,cleanTags:this.cleanTags,unwrapTags:this.unwrapTags});var r,i,o,a,s=this.document.createDocumentFragment();for(s.appendChild(this.document.createElement("body")),a=s.querySelector("body"),a.innerHTML=e,this.cleanupSpans(a),r=a.querySelectorAll("*"),o=0;o<r.length;o+=1)i=r[o],"a"===i.nodeName.toLowerCase()&&this.getEditorOption("targetBlank")&&t.util.setTargetBlank(i),t.util.cleanupAttrs(i,n.cleanAttrs),t.util.cleanupTags(i,n.cleanTags),t.util.unwrapTags(i,n.unwrapTags);t.util.insertHTMLCommand(this.document,a.innerHTML.replace(/&nbsp;/g," "))},isCommonBlock:function(t){return t&&("p"===t.nodeName.toLowerCase()||"div"===t.nodeName.toLowerCase())},filterCommonBlocks:function(t){/^\s*$/.test(t.textContent)&&t.parentNode&&t.parentNode.removeChild(t)},filterLineBreak:function(t){this.isCommonBlock(t.previousElementSibling)?this.removeWithParent(t):!this.isCommonBlock(t.parentNode)||t.parentNode.firstChild!==t&&t.parentNode.lastChild!==t?t.parentNode&&1===t.parentNode.childElementCount&&""===t.parentNode.textContent&&this.removeWithParent(t):this.removeWithParent(t)},removeWithParent:function(t){t&&t.parentNode&&(t.parentNode.parentNode&&1===t.parentNode.childElementCount?t.parentNode.parentNode.removeChild(t.parentNode):t.parentNode.removeChild(t))},cleanupSpans:function(e){var n,r,i,o=e.querySelectorAll(".replace-with"),a=function(t){return t&&"#text"!==t.nodeName&&"false"===t.getAttribute("contenteditable")};for(n=0;n<o.length;n+=1)r=o[n],i=this.document.createElement(r.classList.contains("bold")?"b":"i"),r.classList.contains("bold")&&r.classList.contains("italic")?i.innerHTML="<i>"+r.innerHTML+"</i>":i.innerHTML=r.innerHTML,r.parentNode.replaceChild(i,r);for(o=e.querySelectorAll("span"),n=0;n<o.length;n+=1){if(r=o[n],t.util.traverseUp(r,a))return!1;t.util.unwrap(r,this.document)}}});t.extensions.paste=a}(),function(){var e=t.Extension.extend({name:"placeholder",text:"Type your text",hideOnClick:!0,init:function(){t.Extension.prototype.init.apply(this,arguments),this.initPlaceholders(),this.attachEventHandlers()},initPlaceholders:function(){this.getEditorElements().forEach(this.initElement,this)},handleAddElement:function(t,e){this.initElement(e)},initElement:function(t){t.getAttribute("data-placeholder")||t.setAttribute("data-placeholder",this.text),this.updatePlaceholder(t)},destroy:function(){this.getEditorElements().forEach(this.cleanupElement,this)},handleRemoveElement:function(t,e){this.cleanupElement(e)},cleanupElement:function(t){t.getAttribute("data-placeholder")===this.text&&t.removeAttribute("data-placeholder")},showPlaceholder:function(e){e&&(t.util.isFF&&0===e.childNodes.length?(e.classList.add("medium-editor-placeholder-relative"),e.classList.remove("medium-editor-placeholder")):(e.classList.add("medium-editor-placeholder"),e.classList.remove("medium-editor-placeholder-relative")))},hidePlaceholder:function(t){t&&(t.classList.remove("medium-editor-placeholder"),t.classList.remove("medium-editor-placeholder-relative"))},updatePlaceholder:function(t,e){if(t.querySelector("img, blockquote, ul, ol, table")||""!==t.textContent.replace(/^\s+|\s+$/g,""))return this.hidePlaceholder(t);e||this.showPlaceholder(t)},attachEventHandlers:function(){this.hideOnClick&&this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableInput",this.handleInput.bind(this)),this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("addElement",this.handleAddElement.bind(this)),this.subscribe("removeElement",this.handleRemoveElement.bind(this))},handleInput:function(t,e){var n=this.hideOnClick&&e===this.base.getFocusedElement();this.updatePlaceholder(e,n)},handleFocus:function(t,e){this.hidePlaceholder(e)},handleBlur:function(t,e){this.updatePlaceholder(e)}});t.extensions.placeholder=e}(),function(){var e=t.Extension.extend({name:"toolbar",align:"center",allowMultiParagraphSelection:!0,buttons:["bold","italic","underline","anchor","h2","h3","quote"],diffLeft:0,diffTop:-10,firstButtonClass:"medium-editor-button-first",lastButtonClass:"medium-editor-button-last",standardizeSelectionStart:!1,static:!1,sticky:!1,stickyTopOffset:0,updateOnEmptySelection:!1,relativeContainer:null,init:function(){t.Extension.prototype.init.apply(this,arguments),this.initThrottledMethods(),this.relativeContainer?this.relativeContainer.appendChild(this.getToolbarElement()):this.getEditorOption("elementsContainer").appendChild(this.getToolbarElement())},forEachExtension:function(t,e){return this.base.extensions.forEach(function(n){if(n!==this)return t.apply(e||this,arguments)},this)},createToolbar:function(){var t=this.document.createElement("div");return t.id="medium-editor-toolbar-"+this.getEditorId(),t.className="medium-editor-toolbar",this.static?t.className+=" static-toolbar":this.relativeContainer?t.className+=" medium-editor-relative-toolbar":t.className+=" medium-editor-stalker-toolbar",t.appendChild(this.createToolbarButtons()),this.forEachExtension(function(e){e.hasForm&&t.appendChild(e.getForm())}),this.attachEventHandlers(),t},createToolbarButtons:function(){var e,n,r,i,o,a,s=this.document.createElement("ul");return s.id="medium-editor-toolbar-actions"+this.getEditorId(),s.className="medium-editor-toolbar-actions",s.style.display="block",this.buttons.forEach(function(r){"string"==typeof r?(o=r,a=null):(o=r.name,a=r),(i=this.base.addBuiltInExtension(o,a))&&"function"==typeof i.getButton&&(n=i.getButton(this.base),e=this.document.createElement("li"),t.util.isElement(n)?e.appendChild(n):e.innerHTML=n,s.appendChild(e))},this),r=s.querySelectorAll("button"),r.length>0&&(r[0].classList.add(this.firstButtonClass),r[r.length-1].classList.add(this.lastButtonClass)),s},destroy:function(){this.toolbar&&(this.toolbar.parentNode&&this.toolbar.parentNode.removeChild(this.toolbar),delete this.toolbar)},getInteractionElements:function(){return this.getToolbarElement()},getToolbarElement:function(){return this.toolbar||(this.toolbar=this.createToolbar()),this.toolbar},getToolbarActionsElement:function(){return this.getToolbarElement().querySelector(".medium-editor-toolbar-actions")},initThrottledMethods:function(){this.throttledPositionToolbar=t.util.throttle(function(){this.base.isActive&&this.positionToolbarIfShown()}.bind(this))},attachEventHandlers:function(){this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableClick",this.handleEditableClick.bind(this)),this.subscribe("editableKeyup",this.handleEditableKeyup.bind(this)),this.on(this.document.documentElement,"mouseup",this.handleDocumentMouseup.bind(this)),this.static&&this.sticky&&this.on(this.window,"scroll",this.handleWindowScroll.bind(this),!0),this.on(this.window,"resize",this.handleWindowResize.bind(this))},handleWindowScroll:function(){this.positionToolbarIfShown()},handleWindowResize:function(){this.throttledPositionToolbar()},handleDocumentMouseup:function(e){if(e&&e.target&&t.util.isDescendant(this.getToolbarElement(),e.target))return!1;this.checkState()},handleEditableClick:function(){setTimeout(function(){this.checkState()}.bind(this),0)},handleEditableKeyup:function(){this.checkState()},handleBlur:function(){clearTimeout(this.hideTimeout),clearTimeout(this.delayShowTimeout),this.hideTimeout=setTimeout(function(){this.hideToolbar()}.bind(this),1)},handleFocus:function(){this.checkState()},isDisplayed:function(){return this.getToolbarElement().classList.contains("medium-editor-toolbar-active")},showToolbar:function(){clearTimeout(this.hideTimeout),this.isDisplayed()||(this.getToolbarElement().classList.add("medium-editor-toolbar-active"),this.trigger("showToolbar",{},this.base.getFocusedElement()))},hideToolbar:function(){this.isDisplayed()&&(this.getToolbarElement().classList.remove("medium-editor-toolbar-active"),this.trigger("hideToolbar",{},this.base.getFocusedElement()))},isToolbarDefaultActionsDisplayed:function(){return"block"===this.getToolbarActionsElement().style.display},hideToolbarDefaultActions:function(){this.isToolbarDefaultActionsDisplayed()&&(this.getToolbarActionsElement().style.display="none")},showToolbarDefaultActions:function(){this.hideExtensionForms(),this.isToolbarDefaultActionsDisplayed()||(this.getToolbarActionsElement().style.display="block"),this.delayShowTimeout=this.base.delay(function(){this.showToolbar()}.bind(this))},hideExtensionForms:function(){this.forEachExtension(function(t){t.hasForm&&t.isDisplayed()&&t.hideForm()})},multipleBlockElementsSelected:function(){var e=/<[^\/>][^>]*><\/[^>]+>/gim,n=new RegExp("<("+t.util.blockContainerElementNames.join("|")+")[^>]*>","g"),r=t.selection.getSelectionHtml(this.document).replace(e,""),i=r.match(n);return!!i&&i.length>1},modifySelection:function(){var e=this.window.getSelection(),n=e.getRangeAt(0);if(this.standardizeSelectionStart&&n.startContainer.nodeValue&&n.startOffset===n.startContainer.nodeValue.length){var r=t.util.findAdjacentTextNodeWithContent(t.selection.getSelectionElement(this.window),n.startContainer,this.document);if(r){for(var i=0;0===r.nodeValue.substr(i,1).trim().length;)i+=1;n=t.selection.select(this.document,r,i,n.endContainer,n.endOffset)}}},checkState:function(){if(!this.base.preventSelectionUpdates){if(!this.base.getFocusedElement()||t.selection.selectionInContentEditableFalse(this.window))return this.hideToolbar();var e=t.selection.getSelectionElement(this.window);return!e||-1===this.getEditorElements().indexOf(e)||e.getAttribute("data-disable-toolbar")?this.hideToolbar():this.updateOnEmptySelection&&this.static?this.showAndUpdateToolbar():!t.selection.selectionContainsContent(this.document)||!1===this.allowMultiParagraphSelection&&this.multipleBlockElementsSelected()?this.hideToolbar():void this.showAndUpdateToolbar()}},showAndUpdateToolbar:function(){this.modifySelection(),this.setToolbarButtonStates(),this.trigger("positionToolbar",{},this.base.getFocusedElement()),this.showToolbarDefaultActions(),this.setToolbarPosition()},setToolbarButtonStates:function(){this.forEachExtension(function(t){"function"==typeof t.isActive&&"function"==typeof t.setInactive&&t.setInactive()}),this.checkActiveButtons()},checkActiveButtons:function(){var e,n=[],r=null,i=t.selection.getSelectionRange(this.document),o=function(t){"function"==typeof t.checkState?t.checkState(e):"function"==typeof t.isActive&&"function"==typeof t.isAlreadyApplied&&"function"==typeof t.setActive&&!t.isActive()&&t.isAlreadyApplied(e)&&t.setActive()};if(i&&(this.forEachExtension(function(t){if("function"==typeof t.queryCommandState&&null!==(r=t.queryCommandState()))return void(r&&"function"==typeof t.setActive&&t.setActive());n.push(t)}),e=t.selection.getSelectedParentElement(i),this.getEditorElements().some(function(n){return t.util.isDescendant(n,e,!0)})))for(;e&&(n.forEach(o),!t.util.isMediumEditorElement(e));)e=e.parentNode},positionToolbarIfShown:function(){this.isDisplayed()&&this.setToolbarPosition()},setToolbarPosition:function(){var t=this.base.getFocusedElement(),e=this.window.getSelection();if(!t)return this;!this.static&&e.isCollapsed||(this.showToolbar(),this.relativeContainer||(this.static?this.positionStaticToolbar(t):this.positionToolbar(e)),this.trigger("positionedToolbar",{},this.base.getFocusedElement()))},positionStaticToolbar:function(t){this.getToolbarElement().style.left="0";var e,n=this.document.documentElement&&this.document.documentElement.scrollTop||this.document.body.scrollTop,r=this.window.innerWidth,i=this.getToolbarElement(),o=t.getBoundingClientRect(),a=o.top+n,s=o.left+o.width/2,u=i.offsetHeight,c=i.offsetWidth,l=c/2;switch(this.sticky?n>a+t.offsetHeight-u-this.stickyTopOffset?(i.style.top=a+t.offsetHeight-u+"px",i.classList.remove("medium-editor-sticky-toolbar")):n>a-u-this.stickyTopOffset?(i.classList.add("medium-editor-sticky-toolbar"),i.style.top=this.stickyTopOffset+"px"):(i.classList.remove("medium-editor-sticky-toolbar"),i.style.top=a-u+"px"):i.style.top=a-u+"px",this.align){case"left":e=o.left;break;case"right":e=o.right-c;break;case"center":e=s-l}e<0?e=0:e+c>r&&(e=r-Math.ceil(c)-1),i.style.left=e+"px"},positionToolbar:function(t){this.getToolbarElement().style.left="0",this.getToolbarElement().style.right="initial";var e=t.getRangeAt(0),n=e.getBoundingClientRect();(!n||0===n.height&&0===n.width&&e.startContainer===e.endContainer)&&(n=1===e.startContainer.nodeType&&e.startContainer.querySelector("img")?e.startContainer.querySelector("img").getBoundingClientRect():e.startContainer.getBoundingClientRect());var r,i,o=this.window.innerWidth,a=this.getToolbarElement(),s=a.offsetHeight,u=a.offsetWidth,c=u/2,l=this.diffLeft-c,f=this.getEditorOption("elementsContainer"),d=["absolute","fixed"].indexOf(window.getComputedStyle(f).getPropertyValue("position"))>-1,h={},p={};d?(i=f.getBoundingClientRect(),["top","left"].forEach(function(t){p[t]=n[t]-i[t]}),p.width=n.width,p.height=n.height,n=p,o=i.width,h.top=f.scrollTop):h.top=this.window.pageYOffset,r=n.left+n.width/2,h.top+=n.top-s,n.top<50?(a.classList.add("medium-toolbar-arrow-over"),a.classList.remove("medium-toolbar-arrow-under"),h.top+=50+n.height-this.diffTop):(a.classList.add("medium-toolbar-arrow-under"),a.classList.remove("medium-toolbar-arrow-over"),h.top+=this.diffTop),r<c?(h.left=l+c,h.right="initial"):o-r<c?(h.left="auto",h.right=0):(h.left=l+r,h.right="initial"),["top","left","right"].forEach(function(t){a.style[t]=h[t]+(isNaN(h[t])?"":"px")})}});t.extensions.toolbar=e}(),function(){var e=t.Extension.extend({init:function(){t.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(t){t.preventDefault(),t.dataTransfer.dropEffect="copy","dragover"===t.type?t.target.classList.add("medium-editor-dragover"):"dragleave"===t.type&&t.target.classList.remove("medium-editor-dragover")},handleDrop:function(e){var n;e.preventDefault(),e.stopPropagation(),e.dataTransfer.files&&(n=Array.prototype.slice.call(e.dataTransfer.files,0),n.some(function(e){if(e.type.match("image")){var n,r;n=new FileReader,n.readAsDataURL(e),r="medium-img-"+ +new Date,t.util.insertHTMLCommand(this.document,'<img class="medium-editor-image-loading" id="'+r+'" />'),n.onload=function(){var t=this.document.getElementById(r);t&&(t.removeAttribute("id"),t.removeAttribute("class"),t.src=n.result)}.bind(this)}}.bind(this))),e.target.classList.remove("medium-editor-dragover")}});t.extensions.imageDragging=e}(),function(){function e(e){var n=t.selection.getSelectionStart(this.options.ownerDocument),r=n.textContent,i=t.selection.getCaretOffsets(n);(void 0===r[i.left-1]||""===r[i.left-1].trim()||void 0!==r[i.left]&&""===r[i.left].trim())&&e.preventDefault()}function n(e,n){if(this.options.disableReturn||n.getAttribute("data-disable-return"))e.preventDefault();else if(this.options.disableDoubleReturn||n.getAttribute("data-disable-double-return")){var r=t.selection.getSelectionStart(this.options.ownerDocument);(r&&""===r.textContent.trim()&&"li"!==r.nodeName.toLowerCase()||r.previousElementSibling&&"br"!==r.previousElementSibling.nodeName.toLowerCase()&&""===r.previousElementSibling.textContent.trim())&&e.preventDefault()}}function r(e){var n=t.selection.getSelectionStart(this.options.ownerDocument);"pre"===(n&&n.nodeName.toLowerCase())&&(e.preventDefault(),t.util.insertHTMLCommand(this.options.ownerDocument," ")),t.util.isListItem(n)&&(e.preventDefault(),e.shiftKey?this.options.ownerDocument.execCommand("outdent",!1,null):this.options.ownerDocument.execCommand("indent",!1,null))}function i(e){var n,r=t.selection.getSelectionStart(this.options.ownerDocument),i=r.nodeName.toLowerCase(),o=/^(\s+|<br\/?>)?$/i,a=/h\d/i;t.util.isKey(e,[t.util.keyCode.BACKSPACE,t.util.keyCode.ENTER])&&r.previousElementSibling&&a.test(i)&&0===t.selection.getCaretOffsets(r).left?t.util.isKey(e,t.util.keyCode.BACKSPACE)&&o.test(r.previousElementSibling.innerHTML)?(r.previousElementSibling.parentNode.removeChild(r.previousElementSibling),e.preventDefault()):!this.options.disableDoubleReturn&&t.util.isKey(e,t.util.keyCode.ENTER)&&(n=this.options.ownerDocument.createElement("p"),n.innerHTML="<br>",r.previousElementSibling.parentNode.insertBefore(n,r),e.preventDefault()):t.util.isKey(e,t.util.keyCode.DELETE)&&r.nextElementSibling&&r.previousElementSibling&&!a.test(i)&&o.test(r.innerHTML)&&a.test(r.nextElementSibling.nodeName.toLowerCase())?(t.selection.moveCursor(this.options.ownerDocument,r.nextElementSibling),r.previousElementSibling.parentNode.removeChild(r),e.preventDefault()):t.util.isKey(e,t.util.keyCode.BACKSPACE)&&"li"===i&&o.test(r.innerHTML)&&!r.previousElementSibling&&!r.parentElement.previousElementSibling&&r.nextElementSibling&&"li"===r.nextElementSibling.nodeName.toLowerCase()?(n=this.options.ownerDocument.createElement("p"),n.innerHTML="<br>",r.parentElement.parentElement.insertBefore(n,r.parentElement),t.selection.moveCursor(this.options.ownerDocument,n),r.parentElement.removeChild(r),e.preventDefault()):t.util.isKey(e,t.util.keyCode.BACKSPACE)&&!1!==t.util.getClosestTag(r,"blockquote")&&0===t.selection.getCaretOffsets(r).left?(e.preventDefault(),t.util.execFormatBlock(this.options.ownerDocument,"p")):t.util.isKey(e,t.util.keyCode.ENTER)&&!1!==t.util.getClosestTag(r,"blockquote")&&0===t.selection.getCaretOffsets(r).right?(n=this.options.ownerDocument.createElement("p"),n.innerHTML="<br>",r.parentElement.insertBefore(n,r.nextSibling),t.selection.moveCursor(this.options.ownerDocument,n),e.preventDefault()):t.util.isKey(e,t.util.keyCode.BACKSPACE)&&t.util.isMediumEditorElement(r.parentElement)&&!r.previousElementSibling&&r.nextElementSibling&&o.test(r.innerHTML)&&(e.preventDefault(),t.selection.moveCursor(this.options.ownerDocument,r.nextSibling),r.parentElement.removeChild(r))}function o(e){var n,r=t.selection.getSelectionStart(this.options.ownerDocument);r&&(t.util.isMediumEditorElement(r)&&0===r.children.length&&!t.util.isBlockContainer(r)&&this.options.ownerDocument.execCommand("formatBlock",!1,"p"),!t.util.isKey(e,t.util.keyCode.ENTER)||t.util.isListItem(r)||t.util.isBlockContainer(r)||(n=r.nodeName.toLowerCase(),"a"===n?this.options.ownerDocument.execCommand("unlink",!1,null):e.shiftKey||e.ctrlKey||this.options.ownerDocument.execCommand("formatBlock",!1,"p")))}function a(t,e){var n=e.parentNode.querySelector('textarea[medium-editor-textarea-id="'+e.getAttribute("medium-editor-textarea-id")+'"]');n&&(n.value=e.innerHTML.trim())}function s(t){t._mediumEditors||(t._mediumEditors=[null]),this.id||(this.id=t._mediumEditors.length),t._mediumEditors[this.id]=this}function u(t){t._mediumEditors&&t._mediumEditors[this.id]&&(t._mediumEditors[this.id]=null)}function c(e,n,r){var i=[];if(e||(e=[]),"string"==typeof e&&(e=n.querySelectorAll(e)),t.util.isElement(e)&&(e=[e]),r)for(var o=0;o<e.length;o++){var a=e[o];!t.util.isElement(a)||a.getAttribute("data-medium-editor-element")||a.getAttribute("medium-editor-textarea-id")||i.push(a)}else i=Array.prototype.slice.apply(e);return i}function l(t){var e=t.parentNode.querySelector('textarea[medium-editor-textarea-id="'+t.getAttribute("medium-editor-textarea-id")+'"]');e&&(e.classList.remove("medium-editor-hidden"),e.removeAttribute("medium-editor-textarea-id")),t.parentNode&&t.parentNode.removeChild(t)}function f(t,e){return Object.keys(e).forEach(function(n){void 0===t[n]&&(t[n]=e[n])}),t}function d(t,e,n){return t=f(t,{window:n.options.contentWindow,document:n.options.ownerDocument,base:n}),"function"==typeof t.init&&t.init(),t.name||(t.name=e),t}function h(){return!this.elements.every(function(t){return!!t.getAttribute("data-disable-toolbar")})&&!1!==this.options.toolbar}function p(){return!!h.call(this)&&!1!==this.options.anchorPreview}function v(){return!1!==this.options.placeholder}function m(){return!1!==this.options.autoLink}function g(){return!1!==this.options.imageDragging}function y(){return!1!==this.options.keyboardCommands}function b(){return!this.options.extensions.imageDragging}function _(t){for(var e=this.options.ownerDocument.createElement("div"),n=Date.now(),r="medium-editor-"+n,i=t.attributes;this.options.ownerDocument.getElementById(r);)n++,r="medium-editor-"+n;e.className=t.className,e.id=r,e.innerHTML=t.value,t.setAttribute("medium-editor-textarea-id",r);for(var o=0,a=i.length;o<a;o++)e.hasAttribute(i[o].nodeName)||e.setAttribute(i[o].nodeName,i[o].nodeValue);return t.form&&this.on(t.form,"reset",function(t){t.defaultPrevented||this.resetContent(this.options.ownerDocument.getElementById(r))}.bind(this)),t.classList.add("medium-editor-hidden"),t.parentNode.insertBefore(e,t),e}function w(e,r){if(!e.getAttribute("data-medium-editor-element")){"textarea"===e.nodeName.toLowerCase()&&(e=_.call(this,e),this.instanceHandleEditableInput||(this.instanceHandleEditableInput=a.bind(this),this.subscribe("editableInput",this.instanceHandleEditableInput))),this.options.disableEditing||e.getAttribute("data-disable-editing")||(e.setAttribute("contentEditable",!0),e.setAttribute("spellcheck",this.options.spellcheck)),this.instanceHandleEditableKeydownEnter||(e.getAttribute("data-disable-return")||e.getAttribute("data-disable-double-return"))&&(this.instanceHandleEditableKeydownEnter=n.bind(this),this.subscribe("editableKeydownEnter",this.instanceHandleEditableKeydownEnter)),this.options.disableReturn||e.getAttribute("data-disable-return")||this.on(e,"keyup",o.bind(this));var i=t.util.guid();e.setAttribute("data-medium-editor-element",!0),e.classList.add("medium-editor-element"),e.setAttribute("role","textbox"),e.setAttribute("aria-multiline",!0),e.setAttribute("data-medium-editor-editor-index",r),e.setAttribute("medium-editor-index",i),O[i]=e.innerHTML,this.events.attachAllEventsToElement(e)}return e}function C(){this.subscribe("editableKeydownTab",r.bind(this)),this.subscribe("editableKeydownDelete",i.bind(this)),this.subscribe("editableKeydownEnter",i.bind(this)),this.options.disableExtraSpaces&&this.subscribe("editableKeydownSpace",e.bind(this)),this.instanceHandleEditableKeydownEnter||(this.options.disableReturn||this.options.disableDoubleReturn)&&(this.instanceHandleEditableKeydownEnter=n.bind(this),this.subscribe("editableKeydownEnter",this.instanceHandleEditableKeydownEnter))}function k(){if(this.extensions=[],Object.keys(this.options.extensions).forEach(function(t){"toolbar"!==t&&this.options.extensions[t]&&this.extensions.push(d(this.options.extensions[t],t,this))},this),b.call(this)){var e=this.options.fileDragging;e||(e={},g.call(this)||(e.allowedTypes=[])),this.addBuiltInExtension("fileDragging",e)}var n={paste:!0,"anchor-preview":p.call(this),autoLink:m.call(this),keyboardCommands:y.call(this),placeholder:v.call(this)};Object.keys(n).forEach(function(t){n[t]&&this.addBuiltInExtension(t)},this);var r=this.options.extensions.toolbar;if(!r&&h.call(this)){var i=t.util.extend({},this.options.toolbar,{allowMultiParagraphSelection:this.options.allowMultiParagraphSelection});r=new t.extensions.toolbar(i)}r&&this.extensions.push(d(r,"toolbar",this))}function E(e,n){var r=[["allowMultiParagraphSelection","toolbar.allowMultiParagraphSelection"]];return n&&r.forEach(function(e){n.hasOwnProperty(e[0])&&void 0!==n[e[0]]&&t.util.deprecated(e[0],e[1],"v6.0.0")}),t.util.defaults({},n,e)}function x(e,n){var r,i,o=/^append-(.+)$/gi,a=/justify([A-Za-z]*)$/g;if(r=o.exec(e))return t.util.execFormatBlock(this.options.ownerDocument,r[1]);if("fontSize"===e)return n.size&&t.util.deprecated(".size option for fontSize command",".value","6.0.0"),i=n.value||n.size,this.options.ownerDocument.execCommand("fontSize",!1,i);if("fontName"===e)return n.name&&t.util.deprecated(".name option for fontName command",".value","6.0.0"),i=n.value||n.name,this.options.ownerDocument.execCommand("fontName",!1,i);if("createLink"===e)return this.createLink(n);if("image"===e){var s=this.options.contentWindow.getSelection().toString().trim();return this.options.ownerDocument.execCommand("insertImage",!1,s)}if("html"===e){var u=this.options.contentWindow.getSelection().toString().trim();return t.util.insertHTMLCommand(this.options.ownerDocument,u)}if(a.exec(e)){var c=this.options.ownerDocument.execCommand(e,!1,null),l=t.selection.getSelectedParentElement(t.selection.getSelectionRange(this.options.ownerDocument));return l&&j.call(this,t.util.getTopBlockContainer(l)),c}return i=n&&n.value,this.options.ownerDocument.execCommand(e,!1,i)}function j(e){if(e){var n,r=Array.prototype.slice.call(e.childNodes).filter(function(t){var e="div"===t.nodeName.toLowerCase();return e&&!n&&(n=t.style.textAlign),e});r.length&&(this.saveSelection(),r.forEach(function(e){if(e.style.textAlign===n){var r=e.lastChild;if(r){t.util.unwrap(e,this.options.ownerDocument);var i=this.options.ownerDocument.createElement("BR");r.parentNode.insertBefore(i,r.nextSibling)}}},this),e.style.textAlign=n,this.restoreSelection())}}var O={};t.prototype={init:function(t,e){return this.options=E.call(this,this.defaults,e),this.origElements=t,this.options.elementsContainer||(this.options.elementsContainer=this.options.ownerDocument.body),this.setup()},setup:function(){this.isActive||(s.call(this,this.options.contentWindow),this.events=new t.Events(this),this.elements=[],this.addElements(this.origElements),0!==this.elements.length&&(this.isActive=!0,k.call(this),C.call(this)))},destroy:function(){this.isActive&&(this.isActive=!1,this.extensions.forEach(function(t){"function"==typeof t.destroy&&t.destroy()},this),this.events.destroy(),this.elements.forEach(function(t){this.options.spellcheck&&(t.innerHTML=t.innerHTML),t.removeAttribute("contentEditable"),t.removeAttribute("spellcheck"),t.removeAttribute("data-medium-editor-element"),t.classList.remove("medium-editor-element"),t.removeAttribute("role"),t.removeAttribute("aria-multiline"),t.removeAttribute("medium-editor-index"),t.removeAttribute("data-medium-editor-editor-index"),t.getAttribute("medium-editor-textarea-id")&&l(t)},this),this.elements=[],this.instanceHandleEditableKeydownEnter=null,this.instanceHandleEditableInput=null,u.call(this,this.options.contentWindow))},on:function(t,e,n,r){return this.events.attachDOMEvent(t,e,n,r),this},off:function(t,e,n,r){return this.events.detachDOMEvent(t,e,n,r),this},subscribe:function(t,e){return this.events.attachCustomEvent(t,e),this},unsubscribe:function(t,e){return this.events.detachCustomEvent(t,e),this},trigger:function(t,e,n){return this.events.triggerCustomEvent(t,e,n),this},delay:function(t){var e=this;return setTimeout(function(){e.isActive&&t()},this.options.delay)},serialize:function(){var t,e,n={},r=this.elements.length;for(t=0;t<r;t+=1)e=""!==this.elements[t].id?this.elements[t].id:"element-"+t,n[e]={value:this.elements[t].innerHTML.trim()};return n},getExtensionByName:function(t){var e;return this.extensions&&this.extensions.length&&this.extensions.some(function(n){return n.name===t&&(e=n,!0)}),e},addBuiltInExtension:function(e,n){var r,i=this.getExtensionByName(e);if(i)return i;switch(e){case"anchor":r=t.util.extend({},this.options.anchor,n),i=new t.extensions.anchor(r);break;case"anchor-preview":i=new t.extensions.anchorPreview(this.options.anchorPreview);break;case"autoLink":i=new t.extensions.autoLink;break;case"fileDragging":i=new t.extensions.fileDragging(n);break;case"fontname":i=new t.extensions.fontName(this.options.fontName);break;case"fontsize":i=new t.extensions.fontSize(n);break;case"keyboardCommands":i=new t.extensions.keyboardCommands(this.options.keyboardCommands);break;case"paste":i=new t.extensions.paste(this.options.paste);break;case"placeholder":i=new t.extensions.placeholder(this.options.placeholder);break;default:t.extensions.button.isBuiltInButton(e)&&(n?(r=t.util.defaults({},n,t.extensions.button.prototype.defaults[e]),i=new t.extensions.button(r)):i=new t.extensions.button(e))}return i&&this.extensions.push(d(i,e,this)),i},stopSelectionUpdates:function(){this.preventSelectionUpdates=!0},startSelectionUpdates:function(){this.preventSelectionUpdates=!1},checkSelection:function(){var t=this.getExtensionByName("toolbar");return t&&t.checkState(),this},queryCommandState:function(t){var e,n=/^full-(.+)$/gi,r=null;(e=n.exec(t))&&(t=e[1]);try{r=this.options.ownerDocument.queryCommandState(t)}catch(t){r=null}return r},execAction:function(e,n){var r,i,o=/^full-(.+)$/gi;return r=o.exec(e),r?(this.saveSelection(),this.selectAllContents(),i=x.call(this,r[1],n),this.restoreSelection()):i=x.call(this,e,n),"insertunorderedlist"!==e&&"insertorderedlist"!==e||t.util.cleanListDOM(this.options.ownerDocument,this.getSelectedParentElement()),this.checkSelection(),i},getSelectedParentElement:function(e){return void 0===e&&(e=this.options.contentWindow.getSelection().getRangeAt(0)),t.selection.getSelectedParentElement(e)},selectAllContents:function(){var e=t.selection.getSelectionElement(this.options.contentWindow);if(e){for(;1===e.children.length;)e=e.children[0];this.selectElement(e)}},selectElement:function(e){t.selection.selectNode(e,this.options.ownerDocument);var n=t.selection.getSelectionElement(this.options.contentWindow);n&&this.events.focusElement(n)},getFocusedElement:function(){var t;return this.elements.some(function(e){return!t&&e.getAttribute("data-medium-focused")&&(t=e),!!t},this),t},exportSelection:function(){var e=t.selection.getSelectionElement(this.options.contentWindow),n=this.elements.indexOf(e),r=null;return n>=0&&(r=t.selection.exportSelection(e,this.options.ownerDocument)),null!==r&&0!==n&&(r.editableElementIndex=n),r},saveSelection:function(){this.selectionState=this.exportSelection()},importSelection:function(e,n){if(e){var r=this.elements[e.editableElementIndex||0];t.selection.importSelection(e,r,this.options.ownerDocument,n)}},restoreSelection:function(){this.importSelection(this.selectionState)},createLink:function(e){var n,r=t.selection.getSelectionElement(this.options.contentWindow),i={};if(-1!==this.elements.indexOf(r)){try{if(this.events.disableCustomEvent("editableInput"),e.url&&t.util.deprecated(".url option for createLink",".value","6.0.0"),(n=e.url||e.value)&&n.trim().length>0){var o=this.options.contentWindow.getSelection();if(o){var a,s,u,c,l=o.getRangeAt(0),f=l.commonAncestorContainer;if(3===l.endContainer.nodeType&&3!==l.startContainer.nodeType&&0===l.startOffset&&l.startContainer.firstChild===l.endContainer&&(f=l.endContainer),s=t.util.getClosestBlockContainer(l.startContainer),u=t.util.getClosestBlockContainer(l.endContainer),3!==f.nodeType&&0!==f.textContent.length&&s===u){var d=s||r,h=this.options.ownerDocument.createDocumentFragment();this.execAction("unlink"),a=this.exportSelection(),h.appendChild(d.cloneNode(!0)),r===d?t.selection.select(this.options.ownerDocument,d.firstChild,0,d.lastChild,3===d.lastChild.nodeType?d.lastChild.nodeValue.length:d.lastChild.childNodes.length):t.selection.select(this.options.ownerDocument,d,0,d,d.childNodes.length);var p=this.exportSelection();c=t.util.findOrCreateMatchingTextNodes(this.options.ownerDocument,h,{start:a.start-p.start,end:a.end-p.start,editableElementIndex:a.editableElementIndex}),0===c.length&&(h=this.options.ownerDocument.createDocumentFragment(),h.appendChild(f.cloneNode(!0)),c=[h.firstChild.firstChild,h.firstChild.lastChild]),t.util.createLink(this.options.ownerDocument,c,n.trim());var v=(h.firstChild.innerHTML.match(/^\s+/)||[""])[0].length;t.util.insertHTMLCommand(this.options.ownerDocument,h.firstChild.innerHTML.replace(/^\s+/,"")),a.start-=v,a.end-=v,this.importSelection(a)}else this.options.ownerDocument.execCommand("createLink",!1,n);this.options.targetBlank||"_blank"===e.target?t.util.setTargetBlank(t.selection.getSelectionStart(this.options.ownerDocument),n):t.util.removeTargetBlank(t.selection.getSelectionStart(this.options.ownerDocument),n),e.buttonClass&&t.util.addClassToAnchors(t.selection.getSelectionStart(this.options.ownerDocument),e.buttonClass)}}if(this.options.targetBlank||"_blank"===e.target||e.buttonClass){i=this.options.ownerDocument.createEvent("HTMLEvents"),i.initEvent("input",!0,!0,this.options.contentWindow);for(var m=0,g=this.elements.length;m<g;m+=1)this.elements[m].dispatchEvent(i)}}finally{this.events.enableCustomEvent("editableInput")}this.events.triggerCustomEvent("editableInput",i,r)}},cleanPaste:function(t){this.getExtensionByName("paste").cleanPaste(t)},pasteHTML:function(t,e){this.getExtensionByName("paste").pasteHTML(t,e)},setContent:function(t,e){if(e=e||0,this.elements[e]){var n=this.elements[e];n.innerHTML=t,this.checkContentChanged(n)}},getContent:function(t){return t=t||0,this.elements[t]?this.elements[t].innerHTML.trim():null},checkContentChanged:function(e){e=e||t.selection.getSelectionElement(this.options.contentWindow),this.events.updateInput(e,{target:e,currentTarget:e})},resetContent:function(t){if(t){var e=this.elements.indexOf(t);return void(-1!==e&&this.setContent(O[t.getAttribute("medium-editor-index")],e))}this.elements.forEach(function(t,e){this.setContent(O[t.getAttribute("medium-editor-index")],e)},this)},addElements:function(t){var e=c(t,this.options.ownerDocument,!0);if(0===e.length)return!1;e.forEach(function(t){t=w.call(this,t,this.id),this.elements.push(t),this.trigger("addElement",{target:t,currentTarget:t},t)},this)},removeElements:function(t){var e=c(t,this.options.ownerDocument),n=e.map(function(t){return t.getAttribute("medium-editor-textarea-id")&&t.parentNode?t.parentNode.querySelector('div[medium-editor-textarea-id="'+t.getAttribute("medium-editor-textarea-id")+'"]'):t});this.elements=this.elements.filter(function(t){return-1===n.indexOf(t)||(this.events.cleanupElement(t),t.getAttribute("medium-editor-textarea-id")&&l(t),this.trigger("removeElement",{target:t,currentTarget:t},t),!1)},this)}},t.getEditorFromElement=function(t){var e=t.getAttribute("data-medium-editor-editor-index"),n=t&&t.ownerDocument&&(t.ownerDocument.defaultView||t.ownerDocument.parentWindow);return n&&n._mediumEditors&&n._mediumEditors[e]?n._mediumEditors[e]:null}}(),function(){t.prototype.defaults={activeButtonClass:"medium-editor-button-active",buttonLabels:!1,delay:0,disableReturn:!1,disableDoubleReturn:!1,disableExtraSpaces:!1,disableEditing:!1,autoLink:!1,elementsContainer:!1,contentWindow:window,ownerDocument:document,targetBlank:!1,extensions:{},spellcheck:!0}}(),t.parseVersionString=function(t){var e=t.split("-"),n=e[0].split("."),r=e.length>1?e[1]:"";return{major:parseInt(n[0],10),minor:parseInt(n[1],10),revision:parseInt(n[2],10),preRelease:r,toString:function(){return[n[0],n[1],n[2]].join(".")+(r?"-"+r:"")}}},t.version=t.parseVersionString.call(this,{version:"5.23.2"}.version),t}())}).call(e,n(53))},function(t,e,n){"use strict";function r(t){if(!(void 0!==t.label&&/\S{1}/.test(t.label)&&void 0!==t.start&&/\S{1}/.test(t.start)&&void 0!==t.end&&/\S{1}/.test(t.end)||void 0!==t.label&&/\S{1}/.test(t.label)&&void 0!==t.action&&/\S{1}/.test(t.action)))return void console.error('[Custom-Button] You need to specify "label", "start" and "end" OR "label" and "action"');t.start=void 0===t.start?"":t.start,t.end=void 0===t.end?"":t.end;var e=this;this.options=t,this.button=document.createElement("button"),this.button.className="medium-editor-action",this.button.innerHTML=t.label,this.button.onclick=function(){var n=i(),r=window.getSelection(),o=r.anchorNode.parentElement;void 0===t.start||-1==n.indexOf(t.start)&&-1==n.indexOf(t.end)?(void 0!=t.action&&(n=t.action(n,!0,o)),n=t.start+n+t.end):(void 0!=t.action&&(n=t.action(n,!1,o)),n=String(n).split(t.start).join(""),n=String(n).split(t.end).join(""));var a,s;if(r.getRangeAt&&r.rangeCount){if(a=window.getSelection().getRangeAt(0),a.deleteContents(),a.createContextualFragment)s=a.createContextualFragment(n);else{var u=document.createElement("div");for(u.innerHTML=n,s=document.createDocumentFragment();child=u.firstChild;)s.appendChild(child)}var c=s.firstChild,l=s.lastChild;a.insertNode(s),c&&(a.setStartBefore(c),a.setEndAfter(l)),r.removeAllRanges(),r.addRange(a)}e.base.checkContentChanged()}}function i(){var t,e="";if(void 0!==window.getSelection){if(t=window.getSelection(),t.rangeCount){for(var n=document.createElement("div"),r=0,i=t.rangeCount;r<i;++r)n.appendChild(t.getRangeAt(r).cloneContents());e=n.innerHTML}}else void 0!==document.selection&&"Text"==document.selection.type&&(e=document.selection.createRange().htmlText);return e}r.prototype.getButton=function(){return this.button},r.prototype.checkState=function(t){var e=i();""!=this.options.start&&e.indexOf(this.options.start)>-1&&e.indexOf(this.options.end)>-1?this.button.classList.add("medium-editor-button-active"):this.button.classList.remove("medium-editor-button-active")},void 0!==t&&t.exports&&(e=t.exports=r),e.MediumButton=r},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e){var n=e.controller;r(this,t),this._controller=n}return i(t,null,[{key:"canEdit",value:function(t){return"reference"===t.type}}]),i(t,[{key:"onClick",value:function(){var t=this;Scrivito.openContentBrowser({selection:this._currentSelection(),selectionMode:"single"}).then(function(e){return t._saveContentBrowserSelection(e)})}},{key:"_currentSelection",value:function(){return this._controller.content?[this._controller.content.id()]:[]}},{key:"_saveContentBrowserSelection",value:function(t){this._controller.content=t[0]||null}}]),t}();e.default=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(214),s=r(a),u=n(215),c=r(u),l=n(331),f=r(l),d=function(){function t(e){var n=e.attributeInfo,r=e.controller;i(this,t),this.attributeInfo=n,this.controller=r}return o(t,null,[{key:"canEdit",value:function(t){return"string"===t.type}}]),o(t,[{key:"editorWillBeActivated",value:function(){this.controller.setDomMode("Replace")}},{key:"editorDomWasMounted",value:function(t){(0,c.default)(t);var e=new s.default(t,this.controller);e.edQuery(t).text(this.controller.content),(0,f.default)(e)}}]),t}();e.default=d},function(t,e){var n,r,i,o,a,s,u,c,l,f,d,h,p,v,m;p=function(t,e){var n;switch(n=e.jQueryElement(),t.keyCode||t.which){case 13:if(!c(n))return t.preventDefault(),n.blur();break;case 27:return t.stopPropagation(),n.blur()}},h=function(t){return m(t)},d=function(t){return v(t.jQueryElement())},f=function(t){return s(t.jQueryElement())},l=function(t){return m(t).done(function(){return t.trigger("scrivito_editors:blur")}),a(t),v(t.jQueryElement())},m=function(t){var e;return e=u(t.jQueryElement()),t.save(e).done(function(){return t.trigger("scrivito_editors:save")})},u=function(t){return i(t),t[0].innerText.replace(/\r\n/g,"\n").replace(/\n+$/,"")},i=function(t){var e,n;if(n=o(t),e=n.not(t),e.length>0)return e.remove(),t.text(n.text())},o=function(t){var e,n,r;return r=t.data("scrivito_editors_siblings_before_edit"),n=t.siblings(),e=!r||n.filter(r).length<r.length,e?t.data("scrivito_editors_siblings_before_edit",n):t.siblings().addBack().not(r)},c=function(t){return!0===t.data("scrivitoEditorsMultiline")||!1!==t.data("scrivitoEditorsMultiline")&&t.css("white-space").match(/pre/)},v=function(t){var e,n;if(c(t)&&!t.data("scrivito_editors_prepared_for_editing")&&(t.data("scrivito_editors_prepared_for_editing",!0),e=t.html(),n=e.replace(/\r?\n/g,"<br />"),e!==n))return t.html(n)},a=function(t){var e;return e=t.jQueryElement(),e.data("scrivito_editors_prepared_for_editing",!1),e.text(t.content())},n=300,s=function(t){var e;if(e=document.getSelection(),e.anchorNode&&e.focusNode)return t.find(e.anchorNode).addBack(e.anchorNode).length&&t.find(e.focusNode).addBack(e.focusNode).length?void 0:e.selectAllChildren(t[0])},r=function(t){var e;return e=t.jQueryElement(),e.attr("contenteditable",!0).blur(function(){return l(t)}).click(function(){return f(t)}).focus(function(){return d(t)}).keypress(function(e){return p(e,t)}).keyup(function(e){return p(e,t)}),"false"!==e.attr("data-scrivito-editors-autosave")&&e.on("cut input keypress keyup paste",function(){return h(t)}),v(e),e.on("click",function(t){return e.attr("contenteditable",!0),i(e),t.timeStamp-e.data("scrivito_editors_last_click")<n||t.preventDefault(),e.data("scrivito_editors_last_click",t.timeStamp)})},t.exports=r},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(259),o=r(i),a=n(260),s=n(137),u=r(s),c=n(324),l=(0,u.default)();l?l.installRailsApi():(0,o.default)(),(0,a.initializeSdk)(l),(0,c.initializeEditors)()}]);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.0.rc1
4
+ version: 1.12.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Infopark AG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-17 00:00:00.000000000 Z
11
+ date: 2017-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -392,7 +392,6 @@ files:
392
392
  - lib/assets/images/scrivito/source_invalid.png
393
393
  - lib/assets/images/scrivito/source_too_large.png
394
394
  - lib/assets/javascripts/scrivito.js
395
- - lib/assets/javascripts/scrivito_editing.js
396
395
  - lib/assets/javascripts/scrivito_ui_redirect.js
397
396
  - lib/assets/javascripts/scrivito_with_js_sdk.js
398
397
  - lib/assets/stylesheets/scrivito.css
@@ -1,26 +0,0 @@
1
- !function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},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=622)}({380:function(e,t,n){"use strict";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<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=n(60),a=function(e){return e&&e.__esModule?e:{default:e}}(r),s=function(){function e(t,n){i(this,e),this.domNode=t,this.controller=n}return o(e,[{key:"content",value:function(){return this.controller.content}},{key:"idFromPath",value:function(e){if(e.match(/^objid:/))return e.replace(/^objid:/,"")}},{key:"edQuery",value:function(){return a.default.apply(void 0,arguments)}},{key:"jQueryElement",value:function(){return this.edQuery(this.domNode)}},{key:"pathForId",value:function(e){return"objid:"+e}},{key:"save",value:function(e){this.controller.content=e;var t={done:function(e){return e(),t}};return t}},{key:"trigger",value:function(){}}]),e}();t.default=s},381:function(e,t,n){"use strict";function i(e){var t=(0,r.default)(e);t.not("[data-scrivito-editors-placeholder]")&&t.attr("data-scrivito-editors-placeholder","Click to edit")}Object.defineProperty(t,"__esModule",{value:!0});var o=n(60),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=i},54:function(e,t){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(e){if(u===setTimeout)return setTimeout(e,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function r(e){if(d===clearTimeout)return clearTimeout(e);if((d===i||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function a(){m&&f&&(m=!1,f.length?p=f.concat(p):g=-1,p.length&&s())}function s(){if(!m){var e=o(a);m=!0;for(var t=p.length;t;){for(f=p,p=[];++g<t;)f&&f[g].run();g=-1,t=p.length}f=null,m=!1,r(e)}}function l(e,t){this.fun=e,this.array=t}function c(){}var u,d,h=e.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:n}catch(e){u=n}try{d="function"==typeof clearTimeout?clearTimeout:i}catch(e){d=i}}();var f,p=[],m=!1,g=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new l(e,t)),1!==p.length||m||o(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},60:function(e,t,n){var i,o;/*!
2
- * jQuery JavaScript Library v1.11.1
3
- * http://jquery.com/
4
- *
5
- * Includes Sizzle.js
6
- * http://sizzlejs.com/
7
- *
8
- * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
9
- * Released under the MIT license
10
- * http://jquery.org/license
11
- *
12
- * Date: 2014-05-01T17:42Z
13
- */
14
- !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,r){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,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return se.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(me.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 l(e,t){do{e=e[t]}while(e&&1!==e.nodeType);return e}function c(e){var t=Ee[e]={};return se.each(e.match(Ce)||[],function(e,n){t[n]=!0}),t}function u(){ve.addEventListener?(ve.removeEventListener("DOMContentLoaded",d,!1),n.removeEventListener("load",d,!1)):(ve.detachEvent("onreadystatechange",d),n.detachEvent("onload",d))}function d(){(ve.addEventListener||"load"===event.type||"complete"===ve.readyState)&&(u(),se.ready())}function h(e,t,n){if(void 0===n&&1===e.nodeType){var i="data-"+t.replace(Se,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Ne.test(n)?se.parseJSON(n):n)}catch(e){}se.data(e,t,n)}else n=void 0}return n}function f(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,i){if(se.acceptData(e)){var o,r,a=se.expando,s=e.nodeType,l=s?se.cache:e,c=s?e[a]:e[a]&&a;if(c&&l[c]&&(i||l[c].data)||void 0!==n||"string"!=typeof t)return c||(c=s?e[a]=J.pop()||se.guid++:a),l[c]||(l[c]=s?{}:{toJSON:se.noop}),"object"!=typeof t&&"function"!=typeof t||(i?l[c]=se.extend(l[c],t):l[c].data=se.extend(l[c].data,t)),r=l[c],i||(r.data||(r.data={}),r=r.data),void 0!==n&&(r[se.camelCase(t)]=n),"string"==typeof t?null==(o=r[t])&&(o=r[se.camelCase(t)]):o=r,o}}function m(e,t,n){if(se.acceptData(e)){var i,o,r=e.nodeType,a=r?se.cache:e,s=r?e[se.expando]:se.expando;if(a[s]){if(t&&(i=n?a[s]:a[s].data)){se.isArray(t)?t=t.concat(se.map(t,se.camelCase)):t in i?t=[t]:(t=se.camelCase(t),t=t in i?[t]:t.split(" ")),o=t.length;for(;o--;)delete i[t[o]];if(n?!f(i):!se.isEmptyObject(i))return}(n||(delete a[s].data,f(a[s])))&&(r?se.cleanData([e],!0):ae.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}function g(){return!0}function v(){return!1}function b(){try{return ve.activeElement}catch(e){}}function y(e){var t=Re.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function x(e,t){var n,i,o=0,r=typeof e.getElementsByTagName!==ke?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==ke?e.querySelectorAll(t||"*"):void 0;if(!r)for(r=[],n=e.childNodes||e;null!=(i=n[o]);o++)!t||se.nodeName(i,t)?r.push(i):se.merge(r,x(i,t));return void 0===t||t&&se.nodeName(e,t)?se.merge([e],r):r}function C(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function E(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 w(e){return e.type=(null!==se.find.attr(e,"type"))+"/"+e.type,e}function T(e){var t=Qe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function k(e,t){for(var n,i=0;null!=(n=e[i]);i++)se._data(n,"globalEval",!t||se._data(t[i],"globalEval"))}function N(e,t){if(1===t.nodeType&&se.hasData(e)){var n,i,o,r=se._data(e),a=se._data(t,r),s=r.events;if(s){delete a.handle,a.events={};for(n in s)for(i=0,o=s[n].length;i<o;i++)se.event.add(t,n,s[n][i])}a.data&&(a.data=se.extend({},a.data))}}function S(e,t){var n,i,o;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!ae.noCloneEvent&&t[se.expando]){o=se._data(t);for(i in o.events)se.removeEvent(t,i,o.handle);t.removeAttribute(se.expando)}"script"===n&&t.text!==e.text?(w(t).text=e.text,T(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),ae.html5Clone&&e.innerHTML&&!se.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Be.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}}function A(e,t){var i,o=se(t.createElement(e)).appendTo(t.body),r=n.getDefaultComputedStyle&&(i=n.getDefaultComputedStyle(o[0]))?i.display:se.css(o[0],"display");return o.detach(),r}function L(e){var t=ve,n=tt[e];return n||(n=A(e,t),"none"!==n&&n||(et=(et||se("<iframe frameborder='0' width='0' height='0'/>")).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 D(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),i=t,o=pt.length;o--;)if((t=pt[o]+n)in e)return t;return i}function B(e,t){for(var n,i,o,r=[],a=0,s=e.length;a<s;a++)i=e[a],i.style&&(r[a]=se._data(i,"olddisplay"),n=i.style.display,t?(r[a]||"none"!==n||(i.style.display=""),""===i.style.display&&De(i)&&(r[a]=se._data(i,"olddisplay",L(i.nodeName)))):(o=De(i),(n&&"none"!==n||!o)&&se._data(i,"olddisplay",o?n:se.css(i,"display"))));for(a=0;a<s;a++)i=e[a],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?r[a]||"":"none"));return e}function M(e,t,n){var i=ut.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function F(e,t,n,i,o){for(var r=n===(i?"border":"content")?4:"width"===t?1:0,a=0;r<4;r+=2)"margin"===n&&(a+=se.css(e,n+Le[r],!0,o)),i?("content"===n&&(a-=se.css(e,"padding"+Le[r],!0,o)),"margin"!==n&&(a-=se.css(e,"border"+Le[r]+"Width",!0,o))):(a+=se.css(e,"padding"+Le[r],!0,o),"padding"!==n&&(a+=se.css(e,"border"+Le[r]+"Width",!0,o)));return a}function O(e,t,n){var i=!0,o="width"===t?e.offsetWidth:e.offsetHeight,r=nt(e),a=ae.boxSizing&&"border-box"===se.css(e,"boxSizing",!1,r);if(o<=0||null==o){if(o=it(e,t,r),(o<0||null==o)&&(o=e.style[t]),rt.test(o))return o;i=a&&(ae.boxSizingReliable()||o===e.style[t]),o=parseFloat(o)||0}return o+F(e,t,n||(a?"border":"content"),i,r)+"px"}function H(e,t,n,i,o){return new H.prototype.init(e,t,n,i,o)}function _(){return setTimeout(function(){mt=void 0}),mt=se.now()}function R(e,t){var n,i={height:e},o=0;for(t=t?1:0;o<4;o+=2-t)n=Le[o],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function j(e,t,n){for(var i,o=(Ct[t]||[]).concat(Ct["*"]),r=0,a=o.length;r<a;r++)if(i=o[r].call(n,t,e))return i}function I(e,t,n){var i,o,r,a,s,l,c,u=this,d={},h=e.style,f=e.nodeType&&De(e),p=se._data(e,"fxshow");n.queue||(s=se._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,se.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],c=se.css(e,"display"),"inline"===("none"===c?se._data(e,"olddisplay")||L(e.nodeName):c)&&"none"===se.css(e,"float")&&(ae.inlineBlockNeedsLayout&&"inline"!==L(e.nodeName)?h.zoom=1:h.display="inline-block")),n.overflow&&(h.overflow="hidden",ae.shrinkWrapBlocks()||u.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}));for(i in t)if(o=t[i],vt.exec(o)){if(delete t[i],r=r||"toggle"===o,o===(f?"hide":"show")){if("show"!==o||!p||void 0===p[i])continue;f=!0}d[i]=p&&p[i]||se.style(e,i)}else c=void 0;if(se.isEmptyObject(d))"inline"===("none"===c?L(e.nodeName):c)&&(h.display=c);else{p?"hidden"in p&&(f=p.hidden):p=se._data(e,"fxshow",{}),r&&(p.hidden=!f),f?se(e).show():u.done(function(){se(e).hide()}),u.done(function(){var t;se._removeData(e,"fxshow");for(t in d)se.style(e,t,d[t])});for(i in d)a=j(f?p[i]:0,i,u),i in p||(p[i]=a.start,f&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}}function q(e,t){var n,i,o,r,a;for(n in e)if(i=se.camelCase(n),o=t[i],r=e[n],se.isArray(r)&&(o=r[1],r=e[n]=r[0]),n!==i&&(e[i]=r,delete e[n]),(a=se.cssHooks[i])&&"expand"in a){r=a.expand(r),delete e[i];for(n in r)n in e||(e[n]=r[n],t[n]=o)}else t[i]=o}function W(e,t,n){var i,o,r=0,a=xt.length,s=se.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var t=mt||_(),n=Math.max(0,c.startTime+c.duration-t),i=n/c.duration||0,r=1-i,a=0,l=c.tweens.length;a<l;a++)c.tweens[a].run(r);return s.notifyWith(e,[c,r,n]),r<1&&l?n:(s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:se.extend({},t),opts:se.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:mt||_(),duration:n.duration,tweens:[],createTween:function(t,n){var i=se.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)c.tweens[n].run(1);return t?s.resolveWith(e,[c,t]):s.rejectWith(e,[c,t]),this}}),u=c.props;for(q(u,c.opts.specialEasing);r<a;r++)if(i=xt[r].call(c,e,u,c.opts))return i;return se.map(u,j,c),se.isFunction(c.opts.start)&&c.opts.start.call(e,c),se.fx.timer(se.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function K(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,o=0,r=t.toLowerCase().match(Ce)||[];if(se.isFunction(n))for(;i=r[o++];)"+"===i.charAt(0)?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function z(e,t,n,i){function o(s){var l;return r[s]=!0,se.each(e[s]||[],function(e,s){var c=s(t,n,i);return"string"!=typeof c||a||r[c]?a?!(l=c):void 0:(t.dataTypes.unshift(c),o(c),!1)}),l}var r={},a=e===Ut;return o(t.dataTypes[0])||!r["*"]&&o("*")}function U(e,t){var n,i,o=se.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((o[i]?e:n||(n={}))[i]=t[i]);return n&&se.extend(!0,e,n),e}function $(e,t,n){for(var i,o,r,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===o&&(o=e.mimeType||t.getResponseHeader("Content-Type"));if(o)for(a in s)if(s[a]&&s[a].test(o)){l.unshift(a);break}if(l[0]in n)r=l[0];else{for(a in n){if(!l[0]||e.converters[a+" "+l[0]]){r=a;break}i||(i=a)}r=r||i}if(r)return r!==l[0]&&l.unshift(r),n[r]}function V(e,t,n,i){var o,r,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(r=u.shift();r;)if(e.responseFields[r]&&(n[e.responseFields[r]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=u.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(a=c[l+" "+r]||c["* "+r]))for(o in c)if(s=o.split(" "),s[1]===r&&(a=c[l+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[o]:!0!==c[o]&&(r=s[0],u.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+r}}}return{state:"success",data:t}}function X(e,t,n,i){var o;if(se.isArray(t))se.each(t,function(t,o){n||Xt.test(e)?i(e,o):X(e+"["+("object"==typeof o?t:"")+"]",o,n,i)});else if(n||"object"!==se.type(t))i(e,t);else for(o in t)X(e+"["+o+"]",t[o],n,i)}function Q(){try{return new n.XMLHttpRequest}catch(e){}}function Y(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function G(e){return se.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}var J=[],Z=J.slice,ee=J.concat,te=J.push,ne=J.indexOf,ie={},oe=ie.toString,re=ie.hasOwnProperty,ae={},se=function(e,t){return new se.fn.init(e,t)},le=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ce=/^-ms-/,ue=/-([\da-z])/gi,de=function(e,t){return t.toUpperCase()};se.fn=se.prototype={jquery:"1.11.1",constructor:se,selector:"",length:0,toArray:function(){return Z.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:Z.call(this)},pushStack:function(e){var t=se.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return se.each(this,e,t)},map:function(e){return this.pushStack(se.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(Z.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:te,sort:J.sort,splice:J.splice},se.extend=se.fn.extend=function(){var e,t,n,i,o,r,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||se.isFunction(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(o=arguments[s]))for(i in o)e=a[i],n=o[i],a!==n&&(c&&n&&(se.isPlainObject(n)||(t=se.isArray(n)))?(t?(t=!1,r=e&&se.isArray(e)?e:[]):r=e&&se.isPlainObject(e)?e:{},a[i]=se.extend(c,r,n)):void 0!==n&&(a[i]=n));return a},se.extend({expando:"jQuery"+("1.11.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===se.type(e)},isArray:Array.isArray||function(e){return"array"===se.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!se.isArray(e)&&e-parseFloat(e)>=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&&!re.call(e,"constructor")&&!re.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(ae.ownLast)for(t in e)return re.call(e,t);for(t in e);return void 0===t||re.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ie[oe.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(ue,de)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var i=0,o=e.length,r=a(e);if(n){if(r)for(;i<o&&!1!==t.apply(e[i],n);i++);else for(i in e)if(!1===t.apply(e[i],n))break}else if(r)for(;i<o&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},trim:function(e){return null==e?"":(e+"").replace(le,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(a(Object(e))?se.merge(n,"string"==typeof e?[e]:e):te.call(n,e)),n},inArray:function(e,t,n){var i;if(t){if(ne)return ne.call(t,e,n);for(i=t.length,n=n?n<0?Math.max(0,i+n):n:0;n<i;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){for(var n=+t.length,i=0,o=e.length;i<n;)e[o++]=t[i++];if(n!==n)for(;void 0!==t[i];)e[o++]=t[i++];return e.length=o,e},grep:function(e,t,n){for(var i=[],o=0,r=e.length,a=!n;o<r;o++)!t(e[o],o)!==a&&i.push(e[o]);return i},map:function(e,t,n){var i,o=0,r=e.length,s=a(e),l=[];if(s)for(;o<r;o++)null!=(i=t(e[o],o,n))&&l.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&l.push(i);return ee.apply([],l)},guid:1,proxy:function(e,t){var n,i,o;if("string"==typeof t&&(o=e[t],t=e,e=o),se.isFunction(e))return n=Z.call(arguments,2),i=function(){return e.apply(t||this,n.concat(Z.call(arguments)))},i.guid=e.guid=e.guid||se.guid++,i},now:function(){return+new Date},support:ae}),se.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){ie["[object "+t+"]"]=t.toLowerCase()});var he=/*!
15
- * Sizzle CSS Selector Engine v1.10.19
16
- * http://sizzlejs.com/
17
- *
18
- * Copyright 2013 jQuery Foundation, Inc. and other contributors
19
- * Released under the MIT license
20
- * http://jquery.org/license
21
- *
22
- * Date: 2014-04-18
23
- */
24
- function(e){function t(e,t,n,i){var o,r,a,s,c,d,h,f,p,m;if((t?t.ownerDocument||t:R)!==D&&L(t),t=t||D,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(B&&!i){if(o=ge.exec(e))if(a=o[1]){if(9===s){if(!(r=t.getElementById(a))||!r.parentNode)return n;if(r.id===a)return n.push(r),n}else if(t.ownerDocument&&(r=t.ownerDocument.getElementById(a))&&H(t,r)&&r.id===a)return n.push(r),n}else{if(o[2])return G.apply(n,t.getElementsByTagName(e)),n;if((a=o[3])&&y.getElementsByClassName&&t.getElementsByClassName)return G.apply(n,t.getElementsByClassName(a)),n}if(y.qsa&&(!M||!M.test(e))){if(f=h=_,p=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(d=w(e),(h=t.getAttribute("id"))?f=h.replace(be,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",c=d.length;c--;)d[c]=f+u(d[c]);p=ve.test(e)&&l(t.parentNode)||t,m=d.join(",")}if(m)try{return G.apply(n,p.querySelectorAll(m)),n}catch(e){}finally{h||t.removeAttribute("id")}}}return k(e.replace(ae,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>x.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[_]=!0,e}function o(e){var t=D.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function r(e,t){for(var n=e.split("|"),i=e.length;i--;)x.attrHandle[n[i]]=t}function a(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||$)-(~e.sourceIndex||$);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return i(function(t){return t=+t,i(function(n,i){for(var o,r=e([],n.length,t),a=r.length;a--;)n[o=r[a]]&&(n[o]=!(i[o]=n[o]))})})}function l(e){return e&&typeof e.getElementsByTagName!==U&&e}function c(){}function u(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function d(e,t,n){var i=t.dir,o=n&&"parentNode"===i,r=I++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,a){var s,l,c=[j,r];if(a){for(;t=t[i];)if((1===t.nodeType||o)&&e(t,n,a))return!0}else for(;t=t[i];)if(1===t.nodeType||o){if(l=t[_]||(t[_]={}),(s=l[i])&&s[0]===j&&s[1]===r)return c[2]=s[2];if(l[i]=c,c[2]=e(t,n,a))return!0}}}function h(e){return e.length>1?function(t,n,i){for(var o=e.length;o--;)if(!e[o](t,n,i))return!1;return!0}:e[0]}function f(e,n,i){for(var o=0,r=n.length;o<r;o++)t(e,n[o],i);return i}function p(e,t,n,i,o){for(var r,a=[],s=0,l=e.length,c=null!=t;s<l;s++)(r=e[s])&&(n&&!n(r,i,o)||(a.push(r),c&&t.push(s)));return a}function m(e,t,n,o,r,a){return o&&!o[_]&&(o=m(o)),r&&!r[_]&&(r=m(r,a)),i(function(i,a,s,l){var c,u,d,h=[],m=[],g=a.length,v=i||f(t||"*",s.nodeType?[s]:s,[]),b=!e||!i&&t?v:p(v,h,e,s,l),y=n?r||(i?e:g||o)?[]:a:b;if(n&&n(b,y,s,l),o)for(c=p(y,m),o(c,[],s,l),u=c.length;u--;)(d=c[u])&&(y[m[u]]=!(b[m[u]]=d));if(i){if(r||e){if(r){for(c=[],u=y.length;u--;)(d=y[u])&&c.push(b[u]=d);r(null,y=[],c,l)}for(u=y.length;u--;)(d=y[u])&&(c=r?Z.call(i,d):h[u])>-1&&(i[c]=!(a[c]=d))}}else y=p(y===a?y.splice(g,y.length):y),r?r(null,a,y,l):G.apply(a,y)})}function g(e){for(var t,n,i,o=e.length,r=x.relative[e[0].type],a=r||x.relative[" "],s=r?1:0,l=d(function(e){return e===t},a,!0),c=d(function(e){return Z.call(t,e)>-1},a,!0),f=[function(e,n,i){return!r&&(i||n!==N)||((t=n).nodeType?l(e,n,i):c(e,n,i))}];s<o;s++)if(n=x.relative[e[s].type])f=[d(h(f),n)];else{if(n=x.filter[e[s].type].apply(null,e[s].matches),n[_]){for(i=++s;i<o&&!x.relative[e[i].type];i++);return m(s>1&&h(f),s>1&&u(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ae,"$1"),n,s<i&&g(e.slice(s,i)),i<o&&g(e=e.slice(i)),i<o&&u(e))}f.push(n)}return h(f)}function v(e,n){var o=n.length>0,r=e.length>0,a=function(i,a,s,l,c){var u,d,h,f=0,m="0",g=i&&[],v=[],b=N,y=i||r&&x.find.TAG("*",c),C=j+=null==b?1:Math.random()||.1,E=y.length;for(c&&(N=a!==D&&a);m!==E&&null!=(u=y[m]);m++){if(r&&u){for(d=0;h=e[d++];)if(h(u,a,s)){l.push(u);break}c&&(j=C)}o&&((u=!h&&u)&&f--,i&&g.push(u))}if(f+=m,o&&m!==f){for(d=0;h=n[d++];)h(g,v,a,s);if(i){if(f>0)for(;m--;)g[m]||v[m]||(v[m]=Q.call(l));v=p(v)}G.apply(l,v),c&&!i&&v.length>0&&f+n.length>1&&t.uniqueSort(l)}return c&&(j=C,N=b),g};return o?i(a):a}var b,y,x,C,E,w,T,k,N,S,A,L,D,P,B,M,F,O,H,_="sizzle"+-new Date,R=e.document,j=0,I=0,q=n(),W=n(),K=n(),z=function(e,t){return e===t&&(A=!0),0},U="undefined",$=1<<31,V={}.hasOwnProperty,X=[],Q=X.pop,Y=X.push,G=X.push,J=X.slice,Z=X.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},ee="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",te="[\\x20\\t\\r\\n\\f]",ne="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ie=ne.replace("w","w#"),oe="\\["+te+"*("+ne+")(?:"+te+"*([*^$|!~]?=)"+te+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+te+"*\\]",re=":("+ne+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",ae=new RegExp("^"+te+"+|((?:^|[^\\\\])(?:\\\\.)*)"+te+"+$","g"),se=new RegExp("^"+te+"*,"+te+"*"),le=new RegExp("^"+te+"*([>+~]|"+te+")"+te+"*"),ce=new RegExp("="+te+"*([^\\]'\"]*?)"+te+"*\\]","g"),ue=new RegExp(re),de=new RegExp("^"+ie+"$"),he={ID:new RegExp("^#("+ne+")"),CLASS:new RegExp("^\\.("+ne+")"),TAG:new RegExp("^("+ne.replace("w","w*")+")"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+re),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")},fe=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,be=/'|\\/g,ye=new RegExp("\\\\([\\da-f]{1,6}"+te+"?|("+te+")|.)","ig"),xe=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{G.apply(X=J.call(R.childNodes),R.childNodes),X[R.childNodes.length].nodeType}catch(e){G={apply:X.length?function(e,t){Y.apply(e,J.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}y=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n=e?e.ownerDocument||e:R,i=n.defaultView;return n!==D&&9===n.nodeType&&n.documentElement?(D=n,P=n.documentElement,B=!E(n),i&&i!==i.top&&(i.addEventListener?i.addEventListener("unload",function(){L()},!1):i.attachEvent&&i.attachEvent("onunload",function(){L()})),y.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),y.getElementsByTagName=o(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),y.getElementsByClassName=me.test(n.getElementsByClassName)&&o(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),y.getById=o(function(e){return P.appendChild(e).id=_,!n.getElementsByName||!n.getElementsByName(_).length}),y.getById?(x.find.ID=function(e,t){if(typeof t.getElementById!==U&&B){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},x.filter.ID=function(e){var t=e.replace(ye,xe);return function(e){return e.getAttribute("id")===t}}):(delete x.find.ID,x.filter.ID=function(e){var t=e.replace(ye,xe);return function(e){var n=typeof e.getAttributeNode!==U&&e.getAttributeNode("id");return n&&n.value===t}}),x.find.TAG=y.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==U)return t.getElementsByTagName(e)}:function(e,t){var n,i=[],o=0,r=t.getElementsByTagName(e);if("*"===e){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},x.find.CLASS=y.getElementsByClassName&&function(e,t){if(typeof t.getElementsByClassName!==U&&B)return t.getElementsByClassName(e)},F=[],M=[],(y.qsa=me.test(n.querySelectorAll))&&(o(function(e){e.innerHTML="<select msallowclip=''><option selected=''></option></select>",e.querySelectorAll("[msallowclip^='']").length&&M.push("[*^$]="+te+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||M.push("\\["+te+"*(?:value|"+ee+")"),e.querySelectorAll(":checked").length||M.push(":checked")}),o(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&M.push("name"+te+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||M.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),M.push(",.*:")})),(y.matchesSelector=me.test(O=P.matches||P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&o(function(e){y.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),F.push("!=",re)}),M=M.length&&new RegExp(M.join("|")),F=F.length&&new RegExp(F.join("|")),t=me.test(P.compareDocumentPosition),H=t||me.test(P.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},z=t?function(e,t){if(e===t)return A=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&i||!y.sortDetached&&t.compareDocumentPosition(e)===i?e===n||e.ownerDocument===R&&H(R,e)?-1:t===n||t.ownerDocument===R&&H(R,t)?1:S?Z.call(S,e)-Z.call(S,t):0:4&i?-1:1)}:function(e,t){if(e===t)return A=!0,0;var i,o=0,r=e.parentNode,s=t.parentNode,l=[e],c=[t];if(!r||!s)return e===n?-1:t===n?1:r?-1:s?1:S?Z.call(S,e)-Z.call(S,t):0;if(r===s)return a(e,t);for(i=e;i=i.parentNode;)l.unshift(i);for(i=t;i=i.parentNode;)c.unshift(i);for(;l[o]===c[o];)o++;return o?a(l[o],c[o]):l[o]===R?-1:c[o]===R?1:0},n):D},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==D&&L(e),n=n.replace(ce,"='$1']"),y.matchesSelector&&B&&(!F||!F.test(n))&&(!M||!M.test(n)))try{var i=O.call(e,n);if(i||y.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return t(n,D,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==D&&L(e),H(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==D&&L(e);var n=x.attrHandle[t.toLowerCase()],i=n&&V.call(x.attrHandle,t.toLowerCase())?n(e,t,!B):void 0;return void 0!==i?i:y.attributes||!B?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,o=0;if(A=!y.detectDuplicates,S=!y.sortStable&&e.slice(0),e.sort(z),A){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)e.splice(n[i],1)}return S=null,e},C=t.getText=function(e){var t,n="",i=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[i++];)n+=C(t);return n},x=t.selectors={cacheLength:50,createPseudo:i,match:he,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(ye,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,xe),"~="===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 he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ue.test(n)&&(t=w(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(ye,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=q[e+" "];return t||(t=new RegExp("(^|"+te+")"+e+"("+te+"|$)"))&&q(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==U&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(o){var r=t.attr(o,e);return null==r?"!="===n:!n||(r+="","="===n?r===i:"!="===n?r!==i:"^="===n?i&&0===r.indexOf(i):"*="===n?i&&r.indexOf(i)>-1:"$="===n?i&&r.slice(-i.length)===i:"~="===n?(" "+r+" ").indexOf(i)>-1:"|="===n&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,o){var r="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===o?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,h,f,p,m=r!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),b=!l&&!s;if(g){if(r){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&b){for(u=g[_]||(g[_]={}),c=u[e]||[],f=c[0]===j&&c[1],h=c[0]===j&&c[2],d=f&&g.childNodes[f];d=++f&&d&&d[m]||(h=f=0)||p.pop();)if(1===d.nodeType&&++h&&d===t){u[e]=[j,f,h];break}}else if(b&&(c=(t[_]||(t[_]={}))[e])&&c[0]===j)h=c[1];else for(;(d=++f&&d&&d[m]||(h=f=0)||p.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++h||(b&&((d[_]||(d[_]={}))[e]=[j,h]),d!==t)););return(h-=o)===i||h%i==0&&h/i>=0}}},PSEUDO:function(e,n){var o,r=x.pseudos[e]||x.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return r[_]?r(n):r.length>1?(o=[e,e,"",n],x.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,o=r(e,n),a=o.length;a--;)i=Z.call(e,o[a]),e[i]=!(t[i]=o[a])}):function(e){return r(e,0,o)}):r}},pseudos:{not:i(function(e){var t=[],n=[],o=T(e.replace(ae,"$1"));return o[_]?i(function(e,t,n,i){for(var r,a=o(e,null,i,[]),s=e.length;s--;)(r=a[s])&&(e[s]=!(t[s]=r))}):function(e,i,r){return t[0]=e,o(t,null,r,n),!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:i(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ye,xe).toLowerCase(),function(t){var n;do{if(n=B?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===D.activeElement&&(!D.hasFocus||D.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!x.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return fe.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<t;n+=2)e.push(n);return e}),odd:s(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:s(function(e,t,n){for(var i=n<0?n+t:n;--i>=0;)e.push(i);return e}),gt:s(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}},x.pseudos.nth=x.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})x.pseudos[b]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(b);for(b in{submit:!0,reset:!0})x.pseudos[b]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(b);return c.prototype=x.filters=x.pseudos,x.setFilters=new c,w=t.tokenize=function(e,n){var i,o,r,a,s,l,c,u=W[e+" "];if(u)return n?0:u.slice(0);for(s=e,l=[],c=x.preFilter;s;){i&&!(o=se.exec(s))||(o&&(s=s.slice(o[0].length)||s),l.push(r=[])),i=!1,(o=le.exec(s))&&(i=o.shift(),r.push({value:i,type:o[0].replace(ae," ")}),s=s.slice(i.length));for(a in x.filter)!(o=he[a].exec(s))||c[a]&&!(o=c[a](o))||(i=o.shift(),r.push({value:i,type:a,matches:o}),s=s.slice(i.length));if(!i)break}return n?s.length:s?t.error(e):W(e,l).slice(0)},T=t.compile=function(e,t){var n,i=[],o=[],r=K[e+" "];if(!r){for(t||(t=w(e)),n=t.length;n--;)r=g(t[n]),r[_]?i.push(r):o.push(r);r=K(e,v(o,i)),r.selector=e}return r},k=t.select=function(e,t,n,i){var o,r,a,s,c,d="function"==typeof e&&e,h=!i&&w(e=d.selector||e);if(n=n||[],1===h.length){if(r=h[0]=h[0].slice(0),r.length>2&&"ID"===(a=r[0]).type&&y.getById&&9===t.nodeType&&B&&x.relative[r[1].type]){if(!(t=(x.find.ID(a.matches[0].replace(ye,xe),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(r.shift().value.length)}for(o=he.needsContext.test(e)?0:r.length;o--&&(a=r[o],!x.relative[s=a.type]);)if((c=x.find[s])&&(i=c(a.matches[0].replace(ye,xe),ve.test(r[0].type)&&l(t.parentNode)||t))){if(r.splice(o,1),!(e=i.length&&u(r)))return G.apply(n,i),n;break}}return(d||T(e,h))(i,t,!B,n,ve.test(e)&&l(t.parentNode)||t),n},y.sortStable=_.split("").sort(z).join("")===_,y.detectDuplicates=!!A,L(),y.sortDetached=o(function(e){return 1&e.compareDocumentPosition(D.createElement("div"))}),o(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||r("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),y.attributes&&o(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||r("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||r(ee,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(n);se.find=he,se.expr=he.selectors,se.expr[":"]=se.expr.pseudos,se.unique=he.uniqueSort,se.text=he.getText,se.isXMLDoc=he.isXML,se.contains=he.contains;var fe=se.expr.match.needsContext,pe=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,me=/^.[^:#\[\.,]*$/;se.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?se.find.matchesSelector(i,e)?[i]:[]:se.find.matches(e,se.grep(t,function(e){return 1===e.nodeType}))},se.fn.extend({find:function(e){var t,n=[],i=this,o=i.length;if("string"!=typeof e)return this.pushStack(se(e).filter(function(){for(t=0;t<o;t++)if(se.contains(i[t],this))return!0}));for(t=0;t<o;t++)se.find(e,i[t],n);return n=this.pushStack(o>1?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&&fe.test(e)?se(e):e||[],!1).length}});var ge,ve=n.document,be=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(se.fn.init=function(e,t){var n,i;if(!e)return this;if("string"==typeof e){if(!(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:be.exec(e))||!n[1]&&t)return!t||t.jquery?(t||ge).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:ve,!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((i=ve.getElementById(n[2]))&&i.parentNode){if(i.id!==n[2])return ge.find(e);this.length=1,this[0]=i}return this.context=ve,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):se.isFunction(e)?void 0!==ge.ready?ge.ready(e):e(se):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),se.makeArray(e,this))}).prototype=se.fn,ge=se(ve);var ye=/^(?:parents|prev(?:Until|All))/,xe={children:!0,contents:!0,next:!0,prev:!0};se.extend({dir:function(e,t,n){for(var i=[],o=e[t];o&&9!==o.nodeType&&(void 0===n||1!==o.nodeType||!se(o).is(n));)1===o.nodeType&&i.push(o),o=o[t];return i},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),i=n.length;return this.filter(function(){for(t=0;t<i;t++)if(se.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,i=0,o=this.length,r=[],a=fe.test(e)||"string"!=typeof e?se(e,t||this.context):0;i<o;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&se.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(r.length>1?se.unique(r):r)},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 l(e,"nextSibling")},prev:function(e){return l(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,i){var o=se.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=se.filter(i,o)),this.length>1&&(xe[e]||(o=se.unique(o)),ye.test(e)&&(o=o.reverse())),this.pushStack(o)}});var Ce=/\S+/g,Ee={};se.Callbacks=function(e){e="string"==typeof e?Ee[e]||c(e):se.extend({},e);var t,n,i,o,r,a,s=[],l=!e.once&&[],u=function(c){for(n=e.memory&&c,i=!0,r=a||0,a=0,o=s.length,t=!0;s&&r<o;r++)if(!1===s[r].apply(c[0],c[1])&&e.stopOnFalse){n=!1;break}t=!1,s&&(l?l.length&&u(l.shift()):n?s=[]:d.disable())},d={add:function(){if(s){var i=s.length;!function t(n){se.each(n,function(n,i){var o=se.type(i);"function"===o?e.unique&&d.has(i)||s.push(i):i&&i.length&&"string"!==o&&t(i)})}(arguments),t?o=s.length:n&&(a=i,u(n))}return this},remove:function(){return s&&se.each(arguments,function(e,n){for(var i;(i=se.inArray(n,s,i))>-1;)s.splice(i,1),t&&(i<=o&&o--,i<=r&&r--)}),this},has:function(e){return e?se.inArray(e,s)>-1:!(!s||!s.length)},empty:function(){return s=[],o=0,this},disable:function(){return s=l=n=void 0,this},disabled:function(){return!s},lock:function(){return l=void 0,n||d.disable(),this},locked:function(){return!l},fireWith:function(e,n){return!s||i&&!l||(n=n||[],n=[e,n.slice?n.slice():n],t?l.push(n):u(n)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!i}};return d},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",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return se.Deferred(function(n){se.each(t,function(t,r){var a=se.isFunction(e[t])&&e[t];o[r[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[r[0]+"With"](this===i?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?se.extend(e,i):i}},o={};return i.pipe=i.then,se.each(t,function(e,r){var a=r[2],s=r[3];i[r[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),o[r[0]]=function(){return o[r[0]+"With"](this===o?i:this,arguments),this},o[r[0]+"With"]=a.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t,n,i,o=0,r=Z.call(arguments),a=r.length,s=1!==a||e&&se.isFunction(e.promise)?a:0,l=1===s?e:se.Deferred(),c=function(e,n,i){return function(o){n[e]=this,i[e]=arguments.length>1?Z.call(arguments):o,i===t?l.notifyWith(n,i):--s||l.resolveWith(n,i)}};if(a>1)for(t=new Array(a),n=new Array(a),i=new Array(a);o<a;o++)r[o]&&se.isFunction(r[o].promise)?r[o].promise().done(c(o,i,r)).fail(l.reject).progress(c(o,n,t)):--s;return s||l.resolveWith(i,r),l.promise()}});var we;se.fn.ready=function(e){return se.ready.promise().done(e),this},se.extend({isReady:!1,readyWait:1,holdReady:function(e){e?se.readyWait++:se.ready(!0)},ready:function(e){if(!0===e?!--se.readyWait:!se.isReady){if(!ve.body)return setTimeout(se.ready);se.isReady=!0,!0!==e&&--se.readyWait>0||(we.resolveWith(ve,[se]),se.fn.triggerHandler&&(se(ve).triggerHandler("ready"),se(ve).off("ready")))}}}),se.ready.promise=function(e){if(!we)if(we=se.Deferred(),"complete"===ve.readyState)setTimeout(se.ready);else if(ve.addEventListener)ve.addEventListener("DOMContentLoaded",d,!1),n.addEventListener("load",d,!1);else{ve.attachEvent("onreadystatechange",d),n.attachEvent("onload",d);var t=!1;try{t=null==n.frameElement&&ve.documentElement}catch(e){}t&&t.doScroll&&function e(){if(!se.isReady){try{t.doScroll("left")}catch(t){return setTimeout(e,50)}u(),se.ready()}}()}return we.promise(e)};var Te,ke="undefined";for(Te in se(ae))break;ae.ownLast="0"!==Te,ae.inlineBlockNeedsLayout=!1,se(function(){var e,t,n,i;(n=ve.getElementsByTagName("body")[0])&&n.style&&(t=ve.createElement("div"),i=ve.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),typeof t.style.zoom!==ke&&(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(i))}),function(){var e=ve.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 Ne=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Se=/([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])&&!f(e)},data:function(e,t,n){return p(e,t,n)},removeData:function(e,t){return m(e,t)},_data:function(e,t,n){return p(e,t,n,!0)},_removeData:function(e,t){return m(e,t,!0)}}),se.fn.extend({data:function(e,t){var n,i,o,r=this[0],a=r&&r.attributes;if(void 0===e){if(this.length&&(o=se.data(r),1===r.nodeType&&!se._data(r,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(i=a[n].name,0===i.indexOf("data-")&&(i=se.camelCase(i.slice(5)),h(r,i,o[i])));se._data(r,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){se.data(this,e)}):arguments.length>1?this.each(function(){se.data(this,e,t)}):r?h(r,e,se.data(r,e)):void 0},removeData:function(e){return this.each(function(){se.removeData(this,e)})}}),se.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=se._data(e,t),n&&(!i||se.isArray(n)?i=se._data(e,t,se.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=se.queue(e,t),i=n.length,o=n.shift(),r=se._queueHooks(e,t),a=function(){se.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===t&&n.unshift("inprogress"),delete r.stop,o.call(e,a,r)),!i&&r&&r.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<n?se.queue(this[0],e):void 0===t?this:this.each(function(){var n=se.queue(this,e,t);se._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&se.dequeue(this,e)})},dequeue:function(e){return this.each(function(){se.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,o=se.Deferred(),r=this,a=this.length,s=function(){--i||o.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=se._data(r[a],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(s));return s(),o.promise(t)}});var Ae=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Le=["Top","Right","Bottom","Left"],De=function(e,t){return e=t||e,"none"===se.css(e,"display")||!se.contains(e.ownerDocument,e)},Pe=se.access=function(e,t,n,i,o,r,a){var s=0,l=e.length,c=null==n;if("object"===se.type(n)){o=!0;for(s in n)se.access(e,t,s,n[s],!0,r,a)}else if(void 0!==i&&(o=!0,se.isFunction(i)||(a=!0),c&&(a?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(se(e),n)})),t))for(;s<l;s++)t(e[s],n,a?i:i.call(e[s],s,t(e[s],n)));return o?e:c?t.call(e):l?t(e[0],n):r},Be=/^(?:checkbox|radio)$/i;!function(){var e=ve.createElement("input"),t=ve.createElement("div"),n=ve.createDocumentFragment();if(t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",ae.leadingWhitespace=3===t.firstChild.nodeType,ae.tbody=!t.getElementsByTagName("tbody").length,ae.htmlSerialize=!!t.getElementsByTagName("link").length,ae.html5Clone="<:nav></:nav>"!==ve.createElement("nav").cloneNode(!0).outerHTML,e.type="checkbox",e.checked=!0,n.appendChild(e),ae.appendChecked=e.checked,t.innerHTML="<textarea>x</textarea>",ae.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,n.appendChild(t),t.innerHTML="<input type='radio' checked='checked' name='t'/>",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,i=ve.createElement("div");for(e in{submit:!0,change:!0,focusin:!0})t="on"+e,(ae[e+"Bubbles"]=t in n)||(i.setAttribute(t,"t"),ae[e+"Bubbles"]=!1===i.attributes[t].expando);i=null}();var Me=/^(?:input|select|textarea)$/i,Fe=/^key/,Oe=/^(?:mouse|pointer|contextmenu)|click/,He=/^(?:focusinfocus|focusoutblur)$/,_e=/^([^.]*)(?:\.(.+)|)$/;se.event={global:{},add:function(e,t,n,i,o){var r,a,s,l,c,u,d,h,f,p,m,g=se._data(e);if(g){for(n.handler&&(l=n,n=l.handler,o=l.selector),n.guid||(n.guid=se.guid++),(a=g.events)||(a=g.events={}),(u=g.handle)||(u=g.handle=function(e){return typeof se===ke||e&&se.event.triggered===e.type?void 0:se.event.dispatch.apply(u.elem,arguments)},u.elem=e),t=(t||"").match(Ce)||[""],s=t.length;s--;)r=_e.exec(t[s])||[],f=m=r[1],p=(r[2]||"").split(".").sort(),f&&(c=se.event.special[f]||{},f=(o?c.delegateType:c.bindType)||f,c=se.event.special[f]||{},d=se.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&se.expr.match.needsContext.test(o),namespace:p.join(".")},l),(h=a[f])||(h=a[f]=[],h.delegateCount=0,c.setup&&!1!==c.setup.call(e,i,p,u)||(e.addEventListener?e.addEventListener(f,u,!1):e.attachEvent&&e.attachEvent("on"+f,u))),c.add&&(c.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,d):h.push(d),se.event.global[f]=!0);e=null}},remove:function(e,t,n,i,o){var r,a,s,l,c,u,d,h,f,p,m,g=se.hasData(e)&&se._data(e);if(g&&(u=g.events)){for(t=(t||"").match(Ce)||[""],c=t.length;c--;)if(s=_e.exec(t[c])||[],f=m=s[1],p=(s[2]||"").split(".").sort(),f){for(d=se.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,h=u[f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=r=h.length;r--;)a=h[r],!o&&m!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||i&&i!==a.selector&&("**"!==i||!a.selector)||(h.splice(r,1),a.selector&&h.delegateCount--,d.remove&&d.remove.call(e,a));l&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,p,g.handle)||se.removeEvent(e,f,g.handle),delete u[f])}else for(f in u)se.event.remove(e,f+t[c],n,i,!0);se.isEmptyObject(u)&&(delete g.handle,se._removeData(e,"events"))}},trigger:function(e,t,i,o){var r,a,s,l,c,u,d,h=[i||ve],f=re.call(e,"type")?e.type:e,p=re.call(e,"namespace")?e.namespace.split("."):[];if(s=u=i=i||ve,3!==i.nodeType&&8!==i.nodeType&&!He.test(f+se.event.triggered)&&(f.indexOf(".")>=0&&(p=f.split("."),f=p.shift(),p.sort()),a=f.indexOf(":")<0&&"on"+f,e=e[se.expando]?e:new se.Event(f,"object"==typeof e&&e),e.isTrigger=o?2:3,e.namespace=p.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:se.makeArray(t,[e]),c=se.event.special[f]||{},o||!c.trigger||!1!==c.trigger.apply(i,t))){if(!o&&!c.noBubble&&!se.isWindow(i)){for(l=c.delegateType||f,He.test(l+f)||(s=s.parentNode);s;s=s.parentNode)h.push(s),u=s;u===(i.ownerDocument||ve)&&h.push(u.defaultView||u.parentWindow||n)}for(d=0;(s=h[d++])&&!e.isPropagationStopped();)e.type=d>1?l:c.bindType||f,r=(se._data(s,"events")||{})[e.type]&&se._data(s,"handle"),r&&r.apply(s,t),(r=a&&s[a])&&r.apply&&se.acceptData(s)&&(e.result=r.apply(s,t),!1===e.result&&e.preventDefault());if(e.type=f,!o&&!e.isDefaultPrevented()&&(!c._default||!1===c._default.apply(h.pop(),t))&&se.acceptData(i)&&a&&i[f]&&!se.isWindow(i)){u=i[a],u&&(i[a]=null),se.event.triggered=f;try{i[f]()}catch(e){}se.event.triggered=void 0,u&&(i[a]=u)}return e.result}},dispatch:function(e){e=se.event.fix(e);var t,n,i,o,r,a=[],s=Z.call(arguments),l=(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,l),t=0;(o=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,r=0;(i=o.handlers[r++])&&!e.isImmediatePropagationStopped();)e.namespace_re&&!e.namespace_re.test(i.namespace)||(e.handleObj=i,e.data=i.data,void 0!==(n=((se.event.special[i.origType]||{}).handle||i.handler).apply(o.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,i,o,r,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(o=[],r=0;r<s;r++)i=t[r],n=i.selector+" ",void 0===o[n]&&(o[n]=i.needsContext?se(n,this).index(l)>=0:se.find(n,this,null,[l]).length),o[n]&&o.push(i);o.length&&a.push({elem:l,handlers:o})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},fix:function(e){if(e[se.expando])return e;var t,n,i,o=e.type,r=e,a=this.fixHooks[o];for(a||(this.fixHooks[o]=a=Oe.test(o)?this.mouseHooks:Fe.test(o)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,e=new se.Event(r),t=i.length;t--;)n=i[t],e[n]=r[n];return e.target||(e.target=r.srcElement||ve),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,r):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,o,r=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(i=e.target.ownerDocument||ve,o=i.documentElement,n=i.body,e.pageX=t.clientX+(o&&o.scrollLeft||n&&n.scrollLeft||0)-(o&&o.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(o&&o.scrollTop||n&&n.scrollTop||0)-(o&&o.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||void 0===r||(e.which=1&r?1:2&r?3:4&r?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==b()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){if(this===b()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(se.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1},_default:function(e){return se.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,i){var o=se.extend(new se.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?se.event.trigger(o,null,t):se.event.dispatch.call(t,o),o.isDefaultPrevented()&&n.preventDefault()}},se.removeEvent=ve.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var i="on"+t;e.detachEvent&&(typeof e[i]===ke&&(e[i]=null),e.detachEvent(i,n))},se.Event=function(e,t){if(!(this instanceof se.Event))return new se.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?g:v):this.type=e,t&&se.extend(this,t),this.timeStamp=e&&e.timeStamp||se.now(),this[se.expando]=!0},se.Event.prototype={isDefaultPrevented:v,isPropagationStopped:v,isImmediatePropagationStopped:v,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=g,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=g,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=g,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},se.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){se.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,o=e.relatedTarget,r=e.handleObj;return o&&(o===i||se.contains(i,o))||(e.type=r.origType,n=r.handler.apply(this,arguments),e.type=t),n}}}),ae.submitBubbles||(se.event.special.submit={setup:function(){if(se.nodeName(this,"form"))return!1;se.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,n=se.nodeName(t,"input")||se.nodeName(t,"button")?t.form:void 0;n&&!se._data(n,"submitBubbles")&&(se.event.add(n,"submit._submit",function(e){e._submit_bubble=!0}),se._data(n,"submitBubbles",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&se.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(se.nodeName(this,"form"))return!1;se.event.remove(this,"._submit")}}),ae.changeBubbles||(se.event.special.change={setup:function(){if(Me.test(this.nodeName))return"checkbox"!==this.type&&"radio"!==this.type||(se.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),se.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),se.event.simulate("change",this,e,!0)})),!1;se.event.add(this,"beforeactivate._change",function(e){var t=e.target;Me.test(t.nodeName)&&!se._data(t,"changeBubbles")&&(se.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||se.event.simulate("change",this.parentNode,e,!0)}),se._data(t,"changeBubbles",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return e.handleObj.handler.apply(this,arguments)},teardown:function(){return se.event.remove(this,"._change"),!Me.test(this.nodeName)}}),ae.focusinBubbles||se.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){se.event.simulate(t,e.target,se.event.fix(e),!0)};se.event.special[t]={setup:function(){var i=this.ownerDocument||this,o=se._data(i,t);o||i.addEventListener(e,n,!0),se._data(i,t,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=se._data(i,t)-1;o?se._data(i,t,o):(i.removeEventListener(e,n,!0),se._removeData(i,t))}}}),se.fn.extend({on:function(e,t,n,i,o){var r,a;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(r in e)this.on(r,t,n,e[r],o);return this}if(null==n&&null==i?(i=t,n=t=void 0):null==i&&("string"==typeof t?(i=n,n=void 0):(i=n,n=t,t=void 0)),!1===i)i=v;else if(!i)return this;return 1===o&&(a=i,i=function(e){return se().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=se.guid++)),this.each(function(){se.event.add(this,e,i,n,t)})},one:function(e,t,n,i){return this.on(e,t,n,i,1)},off:function(e,t,n){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,se(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=v),this.each(function(){se.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){se.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return se.event.trigger(e,t,n,!0)}});var Re="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",je=/ jQuery\d+="(?:null|\d+)"/g,Ie=new RegExp("<(?:"+Re+")[\\s/>]","i"),qe=/^\s+/,We=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ke=/<([\w:]+)/,ze=/<tbody/i,Ue=/<|&#?\w+;/,$e=/<(?:script|style|link)/i,Ve=/checked\s*(?:[^=]|=\s*.checked.)/i,Xe=/^$|\/(?:java|ecma)script/i,Qe=/^true\/(.*)/,Ye=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Ge={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:ae.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Je=y(ve),Ze=Je.appendChild(ve.createElement("div"));Ge.optgroup=Ge.option,Ge.tbody=Ge.tfoot=Ge.colgroup=Ge.caption=Ge.thead,Ge.th=Ge.td,se.extend({clone:function(e,t,n){var i,o,r,a,s,l=se.contains(e.ownerDocument,e);if(ae.html5Clone||se.isXMLDoc(e)||!Ie.test("<"+e.nodeName+">")?r=e.cloneNode(!0):(Ze.innerHTML=e.outerHTML,Ze.removeChild(r=Ze.firstChild)),!(ae.noCloneEvent&&ae.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||se.isXMLDoc(e)))for(i=x(r),s=x(e),a=0;null!=(o=s[a]);++a)i[a]&&S(o,i[a]);if(t)if(n)for(s=s||x(e),i=i||x(r),a=0;null!=(o=s[a]);a++)N(o,i[a]);else N(e,r);return i=x(r,"script"),i.length>0&&k(i,!l&&x(e,"script")),i=s=o=null,r},buildFragment:function(e,t,n,i){for(var o,r,a,s,l,c,u,d=e.length,h=y(t),f=[],p=0;p<d;p++)if((r=e[p])||0===r)if("object"===se.type(r))se.merge(f,r.nodeType?[r]:r);else if(Ue.test(r)){for(s=s||h.appendChild(t.createElement("div")),l=(Ke.exec(r)||["",""])[1].toLowerCase(),u=Ge[l]||Ge._default,s.innerHTML=u[1]+r.replace(We,"<$1></$2>")+u[2],o=u[0];o--;)s=s.lastChild;if(!ae.leadingWhitespace&&qe.test(r)&&f.push(t.createTextNode(qe.exec(r)[0])),!ae.tbody)for(r="table"!==l||ze.test(r)?"<table>"!==u[1]||ze.test(r)?0:s:s.firstChild,o=r&&r.childNodes.length;o--;)se.nodeName(c=r.childNodes[o],"tbody")&&!c.childNodes.length&&r.removeChild(c);for(se.merge(f,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=h.lastChild}else f.push(t.createTextNode(r));for(s&&h.removeChild(s),ae.appendChecked||se.grep(x(f,"input"),C),p=0;r=f[p++];)if((!i||-1===se.inArray(r,i))&&(a=se.contains(r.ownerDocument,r),s=x(h.appendChild(r),"script"),a&&k(s),n))for(o=0;r=s[o++];)Xe.test(r.type||"")&&n.push(r);return s=null,h},cleanData:function(e,t){for(var n,i,o,r,a=0,s=se.expando,l=se.cache,c=ae.deleteExpando,u=se.event.special;null!=(n=e[a]);a++)if((t||se.acceptData(n))&&(o=n[s],r=o&&l[o])){if(r.events)for(i in r.events)u[i]?se.event.remove(n,i):se.removeEvent(n,i,r.handle);l[o]&&(delete l[o],c?delete n[s]:typeof n.removeAttribute!==ke?n.removeAttribute(s):n[s]=null,J.push(o))}}}),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||ve).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){E(this,e).appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=E(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,i=e?se.filter(e,this):this,o=0;null!=(n=i[o]);o++)t||1!==n.nodeType||se.cleanData(x(n)),n.parentNode&&(t&&se.contains(n.ownerDocument,n)&&k(x(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(x(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,i=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(je,""):void 0;if("string"==typeof e&&!$e.test(e)&&(ae.htmlSerialize||!Ie.test(e))&&(ae.leadingWhitespace||!qe.test(e))&&!Ge[(Ke.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(We,"<$1></$2>");try{for(;n<i;n++)t=this[n]||{},1===t.nodeType&&(se.cleanData(x(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,se.cleanData(x(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=ee.apply([],e);var n,i,o,r,a,s,l=0,c=this.length,u=this,d=c-1,h=e[0],f=se.isFunction(h);if(f||c>1&&"string"==typeof h&&!ae.checkClone&&Ve.test(h))return this.each(function(n){var i=u.eq(n);f&&(e[0]=h.call(this,n,i.html())),i.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(r=se.map(x(s,"script"),w),o=r.length;l<c;l++)i=s,l!==d&&(i=se.clone(i,!0,!0),o&&se.merge(r,x(i,"script"))),t.call(this[l],i,l);if(o)for(a=r[r.length-1].ownerDocument,se.map(r,T),l=0;l<o;l++)i=r[l],Xe.test(i.type||"")&&!se._data(i,"globalEval")&&se.contains(a,i)&&(i.src?se._evalUrl&&se._evalUrl(i.src):se.globalEval((i.text||i.textContent||i.innerHTML||"").replace(Ye,"")));s=n=null}return this}}),se.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){se.fn[e]=function(e){for(var n,i=0,o=[],r=se(e),a=r.length-1;i<=a;i++)n=i===a?this:this.clone(!0),se(r[i])[t](n),te.apply(o,n.get());return this.pushStack(o)}});var et,tt={};!function(){var e;ae.shrinkWrapBlocks=function(){if(null!=e)return e;e=!1;var t,n,i;return(n=ve.getElementsByTagName("body")[0])&&n.style?(t=ve.createElement("div"),i=ve.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),typeof t.style.zoom!==ke&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(ve.createElement("div")).style.width="5px",e=3!==t.offsetWidth),n.removeChild(i),e):void 0}}();var nt,it,ot=/^margin/,rt=new RegExp("^("+Ae+")(?!px)[a-z%]+$","i"),at=/^(top|right|bottom|left)$/;n.getComputedStyle?(nt=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)},it=function(e,t,n){var i,o,r,a,s=e.style;return n=n||nt(e),a=n?n.getPropertyValue(t)||n[t]:void 0,n&&(""!==a||se.contains(e.ownerDocument,e)||(a=se.style(e,t)),rt.test(a)&&ot.test(t)&&(i=s.width,o=s.minWidth,r=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=o,s.maxWidth=r)),void 0===a?a:a+""}):ve.documentElement.currentStyle&&(nt=function(e){return e.currentStyle},it=function(e,t,n){var i,o,r,a,s=e.style;return n=n||nt(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),rt.test(a)&&!at.test(t)&&(i=s.left,o=e.runtimeStyle,r=o&&o.left,r&&(o.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=i,r&&(o.left=r)),void 0===a?a:a+""||"auto"}),function(){function e(){var e,t,i,o;(t=ve.getElementsByTagName("body")[0])&&t.style&&(e=ve.createElement("div"),i=ve.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",t.appendChild(i).appendChild(e),e.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",r=a=!1,l=!0,n.getComputedStyle&&(r="1%"!==(n.getComputedStyle(e,null)||{}).top,a="4px"===(n.getComputedStyle(e,null)||{width:"4px"}).width,o=e.appendChild(ve.createElement("div")),o.style.cssText=e.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",o.style.marginRight=o.style.width="0",e.style.width="1px",l=!parseFloat((n.getComputedStyle(o,null)||{}).marginRight)),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=e.getElementsByTagName("td"),o[0].style.cssText="margin:0;border:0;padding:0;display:none",s=0===o[0].offsetHeight,s&&(o[0].style.display="",o[1].style.display="none",s=0===o[0].offsetHeight),t.removeChild(i))}var t,i,o,r,a,s,l;t=ve.createElement("div"),t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",o=t.getElementsByTagName("a")[0],(i=o&&o.style)&&(i.cssText="float:left;opacity:.5",ae.opacity="0.5"===i.opacity,ae.cssFloat=!!i.cssFloat,t.style.backgroundClip="content-box",t.cloneNode(!0).style.backgroundClip="",ae.clearCloneStyle="content-box"===t.style.backgroundClip,ae.boxSizing=""===i.boxSizing||""===i.MozBoxSizing||""===i.WebkitBoxSizing,se.extend(ae,{reliableHiddenOffsets:function(){return null==s&&e(),s},boxSizingReliable:function(){return null==a&&e(),a},pixelPosition:function(){return null==r&&e(),r},reliableMarginRight:function(){return null==l&&e(),l}}))}(),se.swap=function(e,t,n,i){var o,r,a={};for(r in t)a[r]=e.style[r],e.style[r]=t[r];o=n.apply(e,i||[]);for(r in t)e.style[r]=a[r];return o};var st=/alpha\([^)]*\)/i,lt=/opacity\s*=\s*([^)]*)/,ct=/^(none|table(?!-c[ea]).+)/,ut=new RegExp("^("+Ae+")(.*)$","i"),dt=new RegExp("^([+-])=("+Ae+")","i"),ht={position:"absolute",visibility:"hidden",display:"block"},ft={letterSpacing:"0",fontWeight:"400"},pt=["Webkit","O","Moz","ms"];se.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=it(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,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,r,a,s=se.camelCase(t),l=e.style;if(t=se.cssProps[s]||(se.cssProps[s]=P(l,s)),a=se.cssHooks[t]||se.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(o=a.get(e,!1,i))?o:l[t];if(r=typeof n,"string"===r&&(o=dt.exec(n))&&(n=(o[1]+1)*o[2]+parseFloat(se.css(e,t)),r="number"),null!=n&&n===n&&("number"!==r||se.cssNumber[s]||(n+="px"),ae.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,i)))))try{l[t]=n}catch(e){}}},css:function(e,t,n,i){var o,r,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&&(r=a.get(e,!0,n)),void 0===r&&(r=it(e,t,i)),"normal"===r&&t in ft&&(r=ft[t]),""===n||n?(o=parseFloat(r),!0===n||se.isNumeric(o)?o||0:r):r}}),se.each(["height","width"],function(e,t){se.cssHooks[t]={get:function(e,n,i){if(n)return ct.test(se.css(e,"display"))&&0===e.offsetWidth?se.swap(e,ht,function(){return O(e,t,i)}):O(e,t,i)},set:function(e,n,i){var o=i&&nt(e);return M(e,n,i?F(e,t,i,ae.boxSizing&&"border-box"===se.css(e,"boxSizing",!1,o),o):0)}}}),ae.opacity||(se.cssHooks.opacity={get:function(e,t){return lt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,i=e.currentStyle,o=se.isNumeric(t)?"alpha(opacity="+100*t+")":"",r=i&&i.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===se.trim(r.replace(st,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||i&&!i.filter)||(n.filter=st.test(r)?r.replace(st,o):r+" "+o)}}),se.cssHooks.marginRight=D(ae.reliableMarginRight,function(e,t){if(t)return se.swap(e,{display:"inline-block"},it,[e,"marginRight"])}),se.each({margin:"",padding:"",border:"Width"},function(e,t){se.cssHooks[e+t]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[e+Le[i]+t]=r[i]||r[i-2]||r[0];return o}},ot.test(e)||(se.cssHooks[e+t].set=M)}),se.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var i,o,r={},a=0;if(se.isArray(t)){for(i=nt(e),o=t.length;a<o;a++)r[t[a]]=se.css(e,t[a],!1,i);return r}return void 0!==n?se.style(e,t,n):se.css(e,t)},e,t,arguments.length>1)},show:function(){return B(this,!0)},hide:function(){return B(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){De(this)?se(this).show():se(this).hide()})}}),se.Tween=H,H.prototype={constructor:H,init:function(e,t,n,i,o,r){this.elem=e,this.prop=n,this.easing=o||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=r||(se.cssNumber[n]?"":"px")},cur:function(){var e=H.propHooks[this.prop];return e&&e.get?e.get(this):H.propHooks._default.get(this)},run:function(e){var t,n=H.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):H.propHooks._default.set(this),this}},H.prototype.init.prototype=H.prototype,H.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}}},H.propHooks.scrollTop=H.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=H.prototype.init,se.fx.step={};var mt,gt,vt=/^(?:toggle|show|hide)$/,bt=new RegExp("^(?:([+-])=|)("+Ae+")([a-z%]*)$","i"),yt=/queueHooks$/,xt=[I],Ct={"*":[function(e,t){var n=this.createTween(e,t),i=n.cur(),o=bt.exec(t),r=o&&o[3]||(se.cssNumber[e]?"":"px"),a=(se.cssNumber[e]||"px"!==r&&+i)&&bt.exec(se.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==r){r=r||a[3],o=o||[],a=+i||1;do{s=s||".5",a/=s,se.style(n.elem,e,a+r)}while(s!==(s=n.cur()/i)&&1!==s&&--l)}return o&&(a=n.start=+a||+i||0,n.unit=r,n.end=o[1]?a+(o[1]+1)*o[2]:+o[2]),n}]};se.Animation=se.extend(W,{tweener:function(e,t){se.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,i=0,o=e.length;i<o;i++)n=e[i],Ct[n]=Ct[n]||[],Ct[n].unshift(t)},prefilter:function(e,t){t?xt.unshift(e):xt.push(e)}}),se.speed=function(e,t,n){var i=e&&"object"==typeof e?se.extend({},e):{complete:n||!n&&t||se.isFunction(e)&&e,duration:e,easing:n&&t||t&&!se.isFunction(t)&&t};return i.duration=se.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in se.fx.speeds?se.fx.speeds[i.duration]:se.fx.speeds._default,null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){se.isFunction(i.old)&&i.old.call(this),i.queue&&se.dequeue(this,i.queue)},i},se.fn.extend({fadeTo:function(e,t,n,i){return this.filter(De).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var o=se.isEmptyObject(e),r=se.speed(t,n,i),a=function(){var t=W(this,se.extend({},e),r);(o||se._data(this,"finish"))&&t.stop(!0)};return a.finish=a,o||!1===r.queue?this.each(a):this.queue(r.queue,a)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",r=se.timers,a=se._data(this);if(o)a[o]&&a[o].stop&&i(a[o]);else for(o in a)a[o]&&a[o].stop&&yt.test(o)&&i(a[o]);for(o=r.length;o--;)r[o].elem!==this||null!=e&&r[o].queue!==e||(r[o].anim.stop(n),t=!1,r.splice(o,1));!t&&n||se.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=se._data(this),i=n[e+"queue"],o=n[e+"queueHooks"],r=se.timers,a=i?i.length:0;for(n.finish=!0,se.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;t<a;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),se.each(["toggle","show","hide"],function(e,t){var n=se.fn[t];se.fn[t]=function(e,i,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(R(t,!0),e,i,o)}}),se.each({slideDown:R("show"),slideUp:R("hide"),slideToggle:R("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){se.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),se.timers=[],se.fx.tick=function(){var e,t=se.timers,n=0;for(mt=se.now();n<t.length;n++)(e=t[n])()||t[n]!==e||t.splice(n--,1);t.length||se.fx.stop(),mt=void 0},se.fx.timer=function(e){se.timers.push(e),e()?se.fx.start():se.timers.pop()},se.fx.interval=13,se.fx.start=function(){gt||(gt=setInterval(se.fx.tick,se.fx.interval))},se.fx.stop=function(){clearInterval(gt),gt=null},se.fx.speeds={slow:600,fast:200,_default:400},se.fn.delay=function(e,t){return e=se.fx?se.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=setTimeout(t,e);n.stop=function(){clearTimeout(i)}})},function(){var e,t,n,i,o;t=ve.createElement("div"),t.setAttribute("className","t"),t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",i=t.getElementsByTagName("a")[0],n=ve.createElement("select"),o=n.appendChild(ve.createElement("option")),e=t.getElementsByTagName("input")[0],i.style.cssText="top:1px",ae.getSetAttribute="t"!==t.className,ae.style=/top/.test(i.getAttribute("style")),ae.hrefNormalized="/a"===i.getAttribute("href"),ae.checkOn=!!e.value,ae.optSelected=o.selected,ae.enctype=!!ve.createElement("form").enctype,n.disabled=!0,ae.optDisabled=!o.disabled,e=ve.createElement("input"),e.setAttribute("value",""),ae.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),ae.radioValue="t"===e.value}();var Et=/\r/g;se.fn.extend({val:function(e){var t,n,i,o=this[0];{if(arguments.length)return i=se.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,se(this).val()):e,null==o?o="":"number"==typeof o?o+="":se.isArray(o)&&(o=se.map(o,function(e){return null==e?"":e+""})),(t=se.valHooks[this.type]||se.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))});if(o)return(t=se.valHooks[o.type]||se.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(Et,""):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,i=e.options,o=e.selectedIndex,r="select-one"===e.type||o<0,a=r?null:[],s=r?o+1:i.length,l=o<0?s:r?o:0;l<s;l++)if(n=i[l],(n.selected||l===o)&&(ae.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!se.nodeName(n.parentNode,"optgroup"))){if(t=se(n).val(),r)return t;a.push(t)}return a},set:function(e,t){for(var n,i,o=e.options,r=se.makeArray(t),a=o.length;a--;)if(i=o[a],se.inArray(se.valHooks.option.get(i),r)>=0)try{i.selected=n=!0}catch(e){i.scrollHeight}else i.selected=!1;return n||(e.selectedIndex=-1),o}}}}),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 wt,Tt,kt=se.expr.attrHandle,Nt=/^(?:checked|selected)$/i,St=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 i,o,r=e.nodeType;if(e&&3!==r&&8!==r&&2!==r)return typeof e.getAttribute===ke?se.prop(e,t,n):(1===r&&se.isXMLDoc(e)||(t=t.toLowerCase(),i=se.attrHooks[t]||(se.expr.match.bool.test(t)?Tt:wt)),void 0===n?i&&"get"in i&&null!==(o=i.get(e,t))?o:(o=se.find.attr(e,t),null==o?void 0:o):null!==n?i&&"set"in i&&void 0!==(o=i.set(e,n,t))?o:(e.setAttribute(t,n+""),n):void se.removeAttr(e,t))},removeAttr:function(e,t){var n,i,o=0,r=t&&t.match(Ce);if(r&&1===e.nodeType)for(;n=r[o++];)i=se.propFix[n]||n,se.expr.match.bool.test(n)?At&&St||!Nt.test(n)?e[i]=!1:e[se.camelCase("default-"+n)]=e[i]=!1:se.attr(e,n,""),e.removeAttribute(St?n:i)},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}}}}}),Tt={set:function(e,t,n){return!1===t?se.removeAttr(e,n):At&&St||!Nt.test(n)?e.setAttribute(!St&&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=kt[t]||se.find.attr;kt[t]=At&&St||!Nt.test(t)?function(e,t,i){var o,r;return i||(r=kt[t],kt[t]=o,o=null!=n(e,t,i)?t.toLowerCase():null,kt[t]=r),o}:function(e,t,n){if(!n)return e[se.camelCase("default-"+t)]?t.toLowerCase():null}}),At&&St||(se.attrHooks.value={set:function(e,t,n){if(!se.nodeName(e,"input"))return wt&&wt.set(e,t,n);e.defaultValue=t}}),St||(wt={set:function(e,t,n){var i=e.getAttributeNode(n);if(i||e.setAttributeNode(i=e.ownerDocument.createAttribute(n)),i.value=t+="","value"===n||t===e.getAttribute(n))return t}},kt.id=kt.name=kt.coords=function(e,t,n){var i;if(!n)return(i=e.getAttributeNode(t))&&""!==i.value?i.value:null},se.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:wt.set},se.attrHooks.contenteditable={set:function(e,t,n){wt.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 Lt=/^(?:input|select|textarea|button|object)$/i,Dt=/^(?: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 i,o,r,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return r=1!==a||!se.isXMLDoc(e),r&&(t=se.propFix[t]||t,o=se.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:e[t]=n:o&&"get"in o&&null!==(i=o.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=se.find.attr(e,"tabindex");return t?parseInt(t,10):Lt.test(e.nodeName)||Dt.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,i,o,r,a,s=0,l=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(Ce)||[];s<l;s++)if(n=this[s],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Pt," "):" ")){for(r=0;o=t[r++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");a=se.trim(i),n.className!==a&&(n.className=a)}return this},removeClass:function(e){var t,n,i,o,r,a,s=0,l=this.length,c=0===arguments.length||"string"==typeof e&&e;if(se.isFunction(e))return this.each(function(t){se(this).removeClass(e.call(this,t,this.className))});if(c)for(t=(e||"").match(Ce)||[];s<l;s++)if(n=this[s],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Pt," "):"")){for(r=0;o=t[r++];)for(;i.indexOf(" "+o+" ")>=0;)i=i.replace(" "+o+" "," ");a=e?se.trim(i):"",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,i=0,o=se(this),r=e.match(Ce)||[];t=r[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else n!==ke&&"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,i=this.length;n<i;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(Pt," ").indexOf(t)>=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,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var Bt=se.now(),Mt=/\?/,Ft=/(,)|(\[|{)|(}|])|"(?:[^"\\\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,i=null,o=se.trim(e+"");return o&&!se.trim(o.replace(Ft,function(e,n,o,r){return t&&n&&(i=0),0===i?e:(t=o||n,i+=!r-!o,"")}))?Function("return "+o)():se.error("Invalid JSON: "+e)},se.parseXML=function(e){var t,i;if(!e||"string"!=typeof e)return null;try{n.DOMParser?(i=new DOMParser,t=i.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 Ot,Ht,_t=/#.*$/,Rt=/([?&])_=[^&]*/,jt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,It=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,qt=/^(?:GET|HEAD)$/,Wt=/^\/\//,Kt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,zt={},Ut={},$t="*/".concat("*");try{Ht=location.href}catch(e){Ht=ve.createElement("a"),Ht.href="",Ht=Ht.href}Ot=Kt.exec(Ht.toLowerCase())||[],se.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ht,type:"GET",isLocal:It.test(Ot[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,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?U(U(e,se.ajaxSettings),t):U(se.ajaxSettings,e)},ajaxPrefilter:K(zt),ajaxTransport:K(Ut),ajax:function(e,t){function n(e,t,n,i){var o,u,v,b,x,E=t;2!==y&&(y=2,s&&clearTimeout(s),c=void 0,a=i||"",C.readyState=e>0?4:0,o=e>=200&&e<300||304===e,n&&(b=$(d,C,n)),b=V(d,b,C,o),o?(d.ifModified&&(x=C.getResponseHeader("Last-Modified"),x&&(se.lastModified[r]=x),(x=C.getResponseHeader("etag"))&&(se.etag[r]=x)),204===e||"HEAD"===d.type?E="nocontent":304===e?E="notmodified":(E=b.state,u=b.data,v=b.error,o=!v)):(v=E,!e&&E||(E="error",e<0&&(e=0))),C.status=e,C.statusText=(t||E)+"",o?p.resolveWith(h,[u,E,C]):p.rejectWith(h,[C,E,v]),C.statusCode(g),g=void 0,l&&f.trigger(o?"ajaxSuccess":"ajaxError",[C,d,o?u:v]),m.fireWith(h,[C,E]),l&&(f.trigger("ajaxComplete",[C,d]),--se.active||se.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,o,r,a,s,l,c,u,d=se.ajaxSetup({},t),h=d.context||d,f=d.context&&(h.nodeType||h.jquery)?se(h):se.event,p=se.Deferred(),m=se.Callbacks("once memory"),g=d.statusCode||{},v={},b={},y=0,x="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===y){if(!u)for(u={};t=jt.exec(a);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===y?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return y||(e=b[n]=b[n]||e,v[e]=t),this},overrideMimeType:function(e){return y||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(y<2)for(t in e)g[t]=[g[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||x;return c&&c.abort(t),n(0,t),this}};if(p.promise(C).complete=m.add,C.success=C.done,C.error=C.fail,d.url=((e||d.url||Ht)+"").replace(_t,"").replace(Wt,Ot[1]+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=se.trim(d.dataType||"*").toLowerCase().match(Ce)||[""],null==d.crossDomain&&(i=Kt.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===Ot[1]&&i[2]===Ot[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(Ot[3]||("http:"===Ot[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=se.param(d.data,d.traditional)),z(zt,d,t,C),2===y)return C;l=d.global,l&&0==se.active++&&se.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!qt.test(d.type),r=d.url,d.hasContent||(d.data&&(r=d.url+=(Mt.test(r)?"&":"?")+d.data,delete d.data),!1===d.cache&&(d.url=Rt.test(r)?r.replace(Rt,"$1_="+Bt++):r+(Mt.test(r)?"&":"?")+"_="+Bt++)),d.ifModified&&(se.lastModified[r]&&C.setRequestHeader("If-Modified-Since",se.lastModified[r]),se.etag[r]&&C.setRequestHeader("If-None-Match",se.etag[r])),(d.data&&d.hasContent&&!1!==d.contentType||t.contentType)&&C.setRequestHeader("Content-Type",d.contentType),C.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+$t+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)C.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(!1===d.beforeSend.call(h,C,d)||2===y))return C.abort();x="abort";for(o in{success:1,error:1,complete:1})C[o](d[o]);if(c=z(Ut,d,t,C)){C.readyState=1,l&&f.trigger("ajaxSend",[C,d]),d.async&&d.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},d.timeout));try{y=1,c.send(v,n)}catch(e){if(!(y<2))throw e;n(-1,e)}}else n(-1,"No Transport");return C},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,i,o){return se.isFunction(n)&&(o=o||i,i=n,n=void 0),se.ajax({url:e,type:t,dataType:o,data:n,success:i})}}),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 Vt=/%20/g,Xt=/\[\]$/,Qt=/\r?\n/g,Yt=/^(?:submit|button|image|reset|file)$/i,Gt=/^(?:input|select|textarea|keygen)/i;se.param=function(e,t){var n,i=[],o=function(e,t){t=se.isFunction(t)?t():null==t?"":t,i[i.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(){o(this.name,this.value)});else for(n in e)X(n,e[n],t,o);return i.join("&").replace(Vt,"+")},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")&&Gt.test(this.nodeName)&&!Yt.test(e)&&(this.checked||!Be.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(Qt,"\r\n")}}):{name:t.name,value:n.replace(Qt,"\r\n")}}).get()}}),se.ajaxSettings.xhr=void 0!==n.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Q()||Y()}:Q;var Jt=0,Zt={},en=se.ajaxSettings.xhr();n.ActiveXObject&&se(n).on("unload",function(){for(var e in Zt)Zt[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,i){var o,r=e.xhr(),a=++Jt;if(r.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)r[o]=e.xhrFields[o];e.mimeType&&r.overrideMimeType&&r.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(o in n)void 0!==n[o]&&r.setRequestHeader(o,n[o]+"");r.send(e.hasContent&&e.data||null),t=function(n,o){var s,l,c;if(t&&(o||4===r.readyState))if(delete Zt[a],t=void 0,r.onreadystatechange=se.noop,o)4!==r.readyState&&r.abort();else{c={},s=r.status,"string"==typeof r.responseText&&(c.text=r.responseText);try{l=r.statusText}catch(e){l=""}s||!e.isLocal||e.crossDomain?1223===s&&(s=204):s=c.text?200:404}c&&i(s,l,c,r.getAllResponseHeaders())},e.async?4===r.readyState?setTimeout(t):r.onreadystatechange=Zt[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=ve.head||se("head")[0]||ve.documentElement;return{send:function(i,o){t=ve.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||o(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+"_"+Bt++;return this[e]=!0,e}}),se.ajaxPrefilter("json jsonp",function(e,t,i){var o,r,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 o=e.jsonpCallback=se.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(nn,"$1"+o):!1!==e.jsonp&&(e.url+=(Mt.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return a||se.error(o+" was not called"),a[0]},e.dataTypes[0]="json",r=n[o],n[o]=function(){a=arguments},i.always(function(){n[o]=r,e[o]&&(e.jsonpCallback=t.jsonpCallback,tn.push(o)),a&&se.isFunction(r)&&r(a[0]),a=r=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||ve;var i=pe.exec(e),o=!n&&[];return i?[t.createElement(i[1])]:(i=se.buildFragment([e],t,o),o&&o.length&&se(o).remove(),se.merge([],i.childNodes))};var on=se.fn.load;se.fn.load=function(e,t,n){if("string"!=typeof e&&on)return on.apply(this,arguments);var i,o,r,a=this,s=e.indexOf(" ");return s>=0&&(i=se.trim(e.slice(s,e.length)),e=e.slice(0,s)),se.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),a.length>0&&se.ajax({url:e,type:r,dataType:"html",data:t}).done(function(e){o=arguments,a.html(i?se("<div>").append(se.parseHTML(e)).find(i):e)}).complete(n&&function(e,t){a.each(n,o||[e.responseText,t,e])}),this},se.expr.filters.animated=function(e){return se.grep(se.timers,function(t){return e===t.elem}).length};var rn=n.document.documentElement;se.offset={setOffset:function(e,t,n){var i,o,r,a,s,l,c,u=se.css(e,"position"),d=se(e),h={};"static"===u&&(e.style.position="relative"),s=d.offset(),r=se.css(e,"top"),l=se.css(e,"left"),c=("absolute"===u||"fixed"===u)&&se.inArray("auto",[r,l])>-1,c?(i=d.position(),a=i.top,o=i.left):(a=parseFloat(r)||0,o=parseFloat(l)||0),se.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(h.top=t.top-s.top+a),null!=t.left&&(h.left=t.left-s.left+o),"using"in t?t.using.call(e,h):d.css(h)}},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,i={top:0,left:0},o=this[0],r=o&&o.ownerDocument;if(r)return t=r.documentElement,se.contains(t,o)?(typeof o.getBoundingClientRect!==ke&&(i=o.getBoundingClientRect()),n=G(r),{top:i.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:i.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):i},position:function(){if(this[0]){var e,t,n={top:0,left:0},i=this[0];return"fixed"===se.css(i,"position")?t=i.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(i,"marginTop",!0),left:t.left-n.left-se.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||rn;e&&!se.nodeName(e,"html")&&"static"===se.css(e,"position");)e=e.offsetParent;return e||rn})}}),se.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);se.fn[e]=function(i){return Pe(this,function(e,i,o){var r=G(e);if(void 0===o)return r?t in r?r[t]:r.document.documentElement[i]:e[i];r?r.scrollTo(n?se(r).scrollLeft():o,n?o:se(r).scrollTop()):e[i]=o},e,i,arguments.length,null)}}),se.each(["top","left"],function(e,t){se.cssHooks[t]=D(ae.pixelPosition,function(e,n){if(n)return n=it(e,t),rt.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,i){se.fn[i]=function(i,o){var r=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===o?"margin":"border");return Pe(this,function(t,n,i){var o;return se.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?se.css(t,n,a):se.style(t,n,i,a)},t,r?i:void 0,r,null)}})}),se.fn.size=function(){return this.length},se.fn.andSelf=se.fn.addBack,i=[],void 0!==(o=function(){return se}.apply(t,i))&&(e.exports=o);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 r===ke&&(n.jQuery=n.$=se),se})},622:function(e,t,n){"use strict";n(623)},623:function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=n(624),r=i(o),a=n(628),s=i(a),l=n(629),c=i(l);Scrivito.registerEditor(r.default),Scrivito.registerEditor(s.default),Scrivito.registerEditor(c.default)},624:function(e,t,n){"use strict";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")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(60),s=i(a),l=n(380),c=i(l),u=n(381),d=i(u),h=n(625),f=i(h),p=function(){function e(t){var n=t.controller;o(this,e),this.controller=n}return r(e,null,[{key:"canEdit",value:function(e){return"html"===e.type}}]),r(e,[{key:"editorWillBeActivated",value:function(){this.controller.setDomMode("Replace")}},{key:"editorDomWasMounted",value:function(e){(0,d.default)(e),(0,s.default)(e).html(this.controller.content);var t=new c.default(e,this.controller);(0,f.default)(t)}}]),e}();t.default=p},625:function(e,t,n){var i,o,r,a,s,l;o=n(626),i=n(627),r=o.extensions.anchor.extend({name:"scrivito_anchor",proxy:null,contentDefault:'<i class="scrivito_customer_icon sci_link"></i>',init:function(){var e;return o.extensions.anchor.prototype.init.apply(this,arguments),this.targetCheckbox=null!=(e=this.getEditorOption("anchor"))?e.targetCheckbox:void 0},handleClick:function(e){var t,n,i,r,a;return e.preventDefault(),e.stopPropagation(),this.isDisplayed()||(r=o.selection.getSelectionRange(this.document),i=o.selection.getSelectedParentElement(r),n=o.util.getClosestTag(i,"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="<div class='medium-editor-toolbar-form-row medium-editor-toolbar-anchor-target-toggle'>\n <label>\n <input type='checkbox' class='medium-editor-toolbar-anchor-target'>\n <i class='scrivito_customer_icon sci_inv_check'></i>\n <i class='scrivito_customer_icon sci_rounded_square'></i>\n "+this.targetCheckboxText+"\n </label>\n</div>"),("<i class='medium-editor-toolbar-browse scrivito_customer_icon sci_collection'></i>\n<input type='text' class='medium-editor-toolbar-input' placeholder='"+this.placeholderText+"'>\n<i class='medium-editor-toolbar-save scrivito_customer_icon sci_check'></i>\n<i class='medium-editor-toolbar-close scrivito_customer_icon sci_cross'></i>\n"+e).replace(/\n\s*/g,"")},attachFormEvents:function(e){var t;return o.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,i;return i=(n=e.proxy.idFromPath(t.val()))?[n]:[],Scrivito.openContentBrowser({selection:i,selectionMode:"single"}).catch(function(e){throw t.focus(),e}).then(function(n){return t.focus(),n.length?t.val(e.proxy.pathForId(n[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,n;return e=["bold","italic","scrivito_anchor","h2","h3","unorderedlist","orderedlist"],(null!=(t=Scrivito.Editors)&&null!=(n=t._config)?n.showHtmlEditorCodeButton:void 0)&&e.splice(2,0,"scrivito_code"),e},l=function(){return{anchor:{targetCheckbox:!0},anchorPreview:!1,extensions:{scrivito_anchor:new r,scrivito_code:new i({label:'<i class="scrivito_customer_icon sci_code"></i>',start:"<code>",end:"</code>"}),imageDragging:{}},placeholder:!1,toolbar:{buttons:s(),standardizeSelectionStart:!0}}},a=function(e){var t,n,i;return t=e.jQueryElement(),n=l(),null!=(i=n.extensions.scrivito_anchor)&&(i.proxy=e),new o(t,n).subscribe("editableInput",function(){return e.save(t.html())})},e.exports=a},626:function(e,t,n){(function(i){var o;/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
25
- "classList"in document.createElement("_")||function(e){"use strict";if("Element"in e){var t=e.Element.prototype,n=Object,i=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},o=Array.prototype.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},r=function(e,t){this.name=e,this.code=DOMException[e],this.message=t},a=function(e,t){if(""===t)throw new r("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(t))throw new r("INVALID_CHARACTER_ERR","String contains an invalid character");return o.call(e,t)},s=function(e){for(var t=i.call(e.getAttribute("class")||""),n=t?t.split(/\s+/):[],o=0,r=n.length;o<r;o++)this.push(n[o]);this._updateClassName=function(){e.setAttribute("class",this.toString())}},l=s.prototype=[],c=function(){return new s(this)};if(r.prototype=Error.prototype,l.item=function(e){return this[e]||null},l.contains=function(e){return e+="",-1!==a(this,e)},l.add=function(){var e,t=arguments,n=0,i=t.length,o=!1;do{e=t[n]+"",-1===a(this,e)&&(this.push(e),o=!0)}while(++n<i);o&&this._updateClassName()},l.remove=function(){var e,t,n=arguments,i=0,o=n.length,r=!1;do{for(e=n[i]+"",t=a(this,e);-1!==t;)this.splice(t,1),r=!0,t=a(this,e)}while(++i<o);r&&this._updateClassName()},l.toggle=function(e,t){e+="";var n=this.contains(e),i=n?!0!==t&&"remove":!1!==t&&"add";return i&&this[i](e),!0===t||!1===t?t:!n},l.toString=function(){return this.join(" ")},n.defineProperty){var u={get:c,enumerable:!0,configurable:!0};try{n.defineProperty(t,"classList",u)}catch(e){-2146823252===e.number&&(u.enumerable=!1,n.defineProperty(t,"classList",u))}}else n.prototype.__defineGetter__&&t.__defineGetter__("classList",c)}}(self),/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
26
- function(e){"use strict";if(e.URL=e.URL||e.webkitURL,e.Blob&&e.URL)try{return void new Blob}catch(e){}var t=e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder||function(e){var t=function(e){return Object.prototype.toString.call(e).match(/^\[object\s(.*)\]$/)[1]},n=function(){this.data=[]},i=function(e,t,n){this.data=e,this.size=e.length,this.type=t,this.encoding=n},o=n.prototype,r=i.prototype,a=e.FileReaderSync,s=function(e){this.code=this[this.name=e]},l="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),c=l.length,u=e.URL||e.webkitURL||e,d=u.createObjectURL,h=u.revokeObjectURL,f=u,p=e.btoa,m=e.atob,g=e.ArrayBuffer,v=e.Uint8Array,b=/^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/;for(i.fake=r.fake=!0;c--;)s.prototype[l[c]]=c+1;return u.createObjectURL||(f=e.URL=function(e){var t,n=document.createElementNS("http://www.w3.org/1999/xhtml","a");return n.href=e,"origin"in n||("data:"===n.protocol.toLowerCase()?n.origin=null:(t=e.match(b),n.origin=t&&t[1])),n}),f.createObjectURL=function(e){var t,n=e.type;return null===n&&(n="application/octet-stream"),e instanceof i?(t="data:"+n,"base64"===e.encoding?t+";base64,"+e.data:"URI"===e.encoding?t+","+decodeURIComponent(e.data):p?t+";base64,"+p(e.data):t+","+encodeURIComponent(e.data)):d?d.call(u,e):void 0},f.revokeObjectURL=function(e){"data:"!==e.substring(0,5)&&h&&h.call(u,e)},o.append=function(e){var n=this.data;if(v&&(e instanceof g||e instanceof v)){for(var o="",r=new v(e),l=0,c=r.length;l<c;l++)o+=String.fromCharCode(r[l]);n.push(o)}else if("Blob"===t(e)||"File"===t(e)){if(!a)throw new s("NOT_READABLE_ERR");var u=new a;n.push(u.readAsBinaryString(e))}else e instanceof i?"base64"===e.encoding&&m?n.push(m(e.data)):"URI"===e.encoding?n.push(decodeURIComponent(e.data)):"raw"===e.encoding&&n.push(e.data):("string"!=typeof e&&(e+=""),n.push(unescape(encodeURIComponent(e))))},o.getBlob=function(e){return arguments.length||(e=null),new i(this.data.join(""),e,"raw")},o.toString=function(){return"[object BlobBuilder]"},r.slice=function(e,t,n){var o=arguments.length;return o<3&&(n=null),new i(this.data.slice(e,o>1?t:this.data.length),n,this.encoding)},r.toString=function(){return"[object Blob]"},r.close=function(){this.size=0,delete this.data},n}(e);e.Blob=function(e,n){var i=n?n.type||"":"",o=new t;if(e)for(var r=0,a=e.length;r<a;r++)Uint8Array&&e[r]instanceof Uint8Array?o.append(e[r].buffer):o.append(e[r]);var s=o.getBlob(i);return!s.slice&&s.webkitSlice&&(s.slice=s.webkitSlice),s};var n=Object.getPrototypeOf||function(e){return e.__proto__};e.Blob.prototype=n(new e.Blob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this),function(r,a){"use strict";"object"==typeof e&&void 0!==i&&i&&i.versions&&i.versions.electron||"object"!=typeof e?void 0!==(o=function(){return a}.call(t,n,t,e))&&(e.exports=o):e.exports=a}(0,function(){"use strict";function e(e,t){return this.init(e,t)}return e.extensions={},function(t){function n(e,t){var n,i=Array.prototype.slice.call(arguments,2);t=t||{};for(var o=0;o<i.length;o++){var r=i[o];if(r)for(n in r)r.hasOwnProperty(n)&&void 0!==r[n]&&(e||!1===t.hasOwnProperty(n))&&(t[n]=r[n])}return t}var i=!1;try{var o=document.createElement("div"),r=document.createTextNode(" ");o.appendChild(r),i=o.contains(r)}catch(e){}var a={isIE:"Microsoft Internet Explorer"===navigator.appName||"Netscape"===navigator.appName&&null!==new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(navigator.userAgent),isEdge:null!==/Edge\/\d+/.exec(navigator.userAgent),isFF:navigator.userAgent.toLowerCase().indexOf("firefox")>-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,i){var o=e.createElement("a");return a.moveTextRangeIntoElement(t[0],t[t.length-1],o),o.setAttribute("href",n),i&&("_blank"===i&&o.setAttribute("rel","noopener noreferrer"),o.setAttribute("target",i)),o},findOrCreateMatchingTextNodes:function(e,t,n){for(var i=e.createTreeWalker(t,NodeFilter.SHOW_ALL,null,!1),o=[],r=0,s=!1,l=null,c=null;null!==(l=i.nextNode());)if(!(l.nodeType>3))if(3===l.nodeType){if(!s&&n.start<r+l.nodeValue.length&&(s=!0,c=a.splitStartNodeIfNeeded(l,n.start,r)),s&&a.splitEndNodeIfNeeded(l,c,n.end,r),s&&r===n.end)break;if(s&&r>n.end+1)throw new Error("PerformLinking overshot the target!");s&&o.push(c||l),r+=l.nodeValue.length,null!==c&&(r+=c.nodeValue.length,i.nextNode()),c=null}else"img"===l.tagName.toLowerCase()&&(!s&&n.start<=r&&(s=!0),s&&o.push(l));return o},splitStartNodeIfNeeded:function(e,t,n){return t!==n?e.splitText(t-n):null},splitEndNodeIfNeeded:function(e,t,n,i){var o,r;o=i+e.nodeValue.length+(t?t.nodeValue.length:0)-1,r=n-i-(t?e.nodeValue.length:0),o>=n&&i!==o&&0!==r&&(t||e).splitText(r)},splitByBlockElements:function(t){if(3!==t.nodeType&&1!==t.nodeType)return[];var n=[],i=e.util.blockContainerElementNames.join(",");if(3===t.nodeType||0===t.querySelectorAll(i).length)return[t];for(var o=0;o<t.childNodes.length;o++){var r=t.childNodes[o];if(3===r.nodeType)n.push(r);else if(1===r.nodeType){var a=r.querySelectorAll(i);0===a.length?n.push(r):n=n.concat(e.util.splitByBlockElements(r))}}return n},findAdjacentTextNodeWithContent:function(e,t,n){var i,o=!1,r=n.createNodeIterator(e,NodeFilter.SHOW_TEXT,null,!1);for(i=r.nextNode();i;){if(i===t)o=!0;else if(o&&3===i.nodeType&&i.nodeValue&&i.nodeValue.trim().length>0)break;i=r.nextNode()}return i},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(i||3!==t.nodeType)return e.contains(t);for(var o=t.parentNode;null!==o;){if(o===e)return!0;o=o.parentNode}return!1},isElement:function(e){return!(!e||1!==e.nodeType)},throttle:function(e,t){var n,i,o,r=null,a=0,s=function(){a=Date.now(),r=null,o=e.apply(n,i),r||(n=i=null)};return t||0===t||(t=50),function(){var l=Date.now(),c=t-(l-a);return n=this,i=arguments,c<=0||c>t?(r&&(clearTimeout(r),r=null),a=l,o=e.apply(n,i),r||(n=i=null)):r||(r=setTimeout(s,c)),o}},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,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},insertHTMLCommand:function(t,n){var i,o,r,s,l,c,u,d=!1,h=["insertHTML",!1,n];if(!e.util.isEdge&&t.queryCommandSupported("insertHTML"))try{return t.execCommand.apply(t,h)}catch(e){}if(i=t.getSelection(),i.rangeCount){if(o=i.getRangeAt(0),u=o.commonAncestorContainer,a.isMediumEditorElement(u)&&!u.firstChild)o.selectNode(u.appendChild(t.createTextNode("")));else if(3===u.nodeType&&0===o.startOffset&&o.endOffset===u.nodeValue.length||3!==u.nodeType&&u.innerHTML===o.toString()){for(;!a.isMediumEditorElement(u)&&u.parentNode&&1===u.parentNode.childNodes.length&&!a.isMediumEditorElement(u.parentNode);)u=u.parentNode;o.selectNode(u)}for(o.deleteContents(),r=t.createElement("div"),r.innerHTML=n,s=t.createDocumentFragment();r.firstChild;)l=r.firstChild,c=s.appendChild(l);o.insertNode(s),c&&(o=o.cloneRange(),o.setStartAfter(c),o.collapse(!0),e.selection.selectRange(t,o)),d=!0}return t.execCommand.callListeners&&t.execCommand.callListeners(h,d),d},execFormatBlock:function(t,n){var i,o=a.getTopBlockContainer(e.selection.getSelectionStart(t));if("blockquote"===n){if(o&&(i=Array.prototype.slice.call(o.childNodes),i.some(function(e){return a.isBlockContainer(e)})))return t.execCommand("outdent",!1,null);if(a.isIE)return t.execCommand("indent",!1,n)}if(o&&n===o.nodeName.toLowerCase()&&(n="p"),a.isIE&&(n="<"+n+">"),o&&"blockquote"===o.nodeName.toLowerCase()){if(a.isIE&&"<p>"===n)return t.execCommand("outdent",!1,n);if((a.isFF||a.isEdge)&&"p"===n)return i=Array.prototype.slice.call(o.childNodes),i.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,i=t||!1;if("a"===e.nodeName.toLowerCase())e.target="_blank",e.rel="noopener noreferrer";else for(e=e.getElementsByTagName("a"),n=0;n<e.length;n+=1)!1!==i&&i!==e[n].attributes.href.value||(e[n].target="_blank",e[n].rel="noopener noreferrer")},removeTargetBlank:function(e,t){var n;if("a"===e.nodeName.toLowerCase())e.removeAttribute("target"),e.removeAttribute("rel");else for(e=e.getElementsByTagName("a"),n=0;n<e.length;n+=1)t===e[n].attributes.href.value&&(e[n].removeAttribute("target"),e[n].removeAttribute("rel"))},addClassToAnchors:function(e,t){var n,i,o=t.split(" ");if("a"===e.nodeName.toLowerCase())for(i=0;i<o.length;i+=1)e.classList.add(o[i]);else{var r=e.getElementsByTagName("a");if(0===r.length){var s=a.getClosestTag(e,"a");e=s?[s]:[]}else e=r;for(n=0;n<e.length;n+=1)for(i=0;i<o.length;i+=1)e[n].classList.add(o[i])}},isListItem:function(e){if(!e)return!1;if("li"===e.nodeName.toLowerCase())return!0;for(var t=e.parentNode,n=t.nodeName.toLowerCase();"li"===n||!a.isBlockContainer(t)&&"div"!==n;){if("li"===n)return!0;if(!(t=t.parentNode))return!1;n=t.nodeName.toLowerCase()}return!1},cleanListDOM:function(t,n){if("li"===n.nodeName.toLowerCase()){var i=n.parentElement;"p"===i.parentElement.nodeName.toLowerCase()&&(a.unwrap(i.parentElement,t),e.selection.moveCursor(t,n.firstChild,n.firstChild.textContent.length))}},splitOffDOMTree:function(e,t,n){for(var i=t,o=null,r=!n;i!==e;){var a,s=i.parentNode,l=s.cloneNode(!1),c=r?i:s.firstChild;for(o&&(r?l.appendChild(o):a=o),o=l;c;){var u=c.nextSibling;c===i?(c.hasChildNodes()?c=c.cloneNode(!1):c.parentNode.removeChild(c),c.textContent&&o.appendChild(c),c=r?u:null):(c.parentNode.removeChild(c),(c.hasChildNodes()||c.textContent)&&o.appendChild(c),c=u)}a&&o.appendChild(a),i=s}return o},moveTextRangeIntoElement:function(e,t,n){if(!e||!t)return!1;var i=a.findCommonRoot(e,t);if(!i)return!1;if(t===e){var o=e.parentNode,r=e.nextSibling;return o.removeChild(e),n.appendChild(e),r?o.insertBefore(n,r):o.appendChild(n),n.hasChildNodes()}for(var s,l,c,u=[],d=0;d<i.childNodes.length;d++)if(c=i.childNodes[d],s){if(a.isDescendant(c,t,!0)){l=c;break}u.push(c)}else a.isDescendant(c,e,!0)&&(s=c);var h=l.nextSibling,f=i.ownerDocument.createDocumentFragment();return s===e?(s.parentNode.removeChild(s),f.appendChild(s)):f.appendChild(a.splitOffDOMTree(s,e)),u.forEach(function(e){e.parentNode.removeChild(e),f.appendChild(e)}),l===t?(l.parentNode.removeChild(l),f.appendChild(l)):f.appendChild(a.splitOffDOMTree(l,t,!0)),n.appendChild(f),l.parentNode===i?i.insertBefore(n,l):h?i.insertBefore(n,h):i.appendChild(n),n.hasChildNodes()},depthOfNode:function(e){for(var t=0,n=e;null!==n.parentNode;)n=n.parentNode,t++;return t},findCommonRoot:function(e,t){for(var n=a.depthOfNode(e),i=a.depthOfNode(t),o=e,r=t;n!==i;)n>i?(o=o.parentNode,n-=1):(r=r.parentNode,i-=1);for(;o!==r;)o=o.parentNode,r=r.parentNode;return o},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;t<e.childNodes.length;t++){var n=a._getFirstTextNode(e.childNodes[t]);if(null!==n)return n}return null},ensureUrlHasProtocol:function(e){return-1===e.indexOf("://")?"http://"+e:e},warn:function(){void 0!==t.console&&"function"==typeof t.console.warn&&t.console.warn.apply(t.console,arguments)},deprecated:function(e,t,n){var i=e+" is deprecated, please use "+t+" instead.";n&&(i+=" Will be removed in "+n),a.warn(i)},deprecatedMethod:function(e,t,n,i){a.deprecated(e,t,i),"function"==typeof this[t]&&this[t].apply(this,n)},cleanupAttrs:function(e,t){t.forEach(function(t){e.removeAttribute(t)})},cleanupTags:function(e,t){-1!==t.indexOf(e.nodeName.toLowerCase())&&e.parentNode.removeChild(e)},unwrapTags:function(t,n){-1!==n.indexOf(t.nodeName.toLowerCase())&&e.util.unwrap(t,document)},getClosestTag:function(e,t){return a.traverseUp(e,function(e){return e.nodeName.toLowerCase()===t.toLowerCase()})},unwrap:function(e,t){for(var n=t.createDocumentFragment(),i=Array.prototype.slice.call(e.childNodes),o=0;o<i.length;o++)n.appendChild(i[o]);n.childNodes.length?e.parentNode.replaceChild(n,e):e.parentNode.removeChild(e)},guid:function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}};e.util=a}(window),function(){var t=function(t){e.util.extend(this,t)};t.extend=function(t){var n,i=this;n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return i.apply(this,arguments)},e.util.extend(n,i);var o=function(){this.constructor=n};return o.prototype=i.prototype,n.prototype=new o,t&&e.util.extend(n.prototype,t),n},t.prototype={init:function(){},base:void 0,name:void 0,checkState:void 0,destroy:void 0,queryCommandState:void 0,isActive:void 0,isAlreadyApplied:void 0,setActive:void 0,setInactive:void 0,getInteractionElements:void 0,window:void 0,document:void 0,getEditorElements:function(){return this.base.elements},getEditorId:function(){return this.base.id},getEditorOption:function(e){return this.base.options[e]}},["execAction","on","off","subscribe","trigger"].forEach(function(e){t.prototype[e]=function(){return this.base[e].apply(this.base,arguments)}}),e.Extension=t}(),function(){function t(t){return e.util.isBlockContainer(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}var n={findMatchingSelectionParent:function(t,n){var i,o,r=n.getSelection();return 0!==r.rangeCount&&(i=r.getRangeAt(0),o=i.commonAncestorContainer,e.util.traverseUp(o,t))},getSelectionElement:function(t){return this.findMatchingSelectionParent(function(t){return e.util.isMediumEditorElement(t)},t)},exportSelection:function(e,t){if(!e)return null;var n=null,i=t.getSelection();if(i.rangeCount>0){var o,r=i.getRangeAt(0),a=r.cloneRange();a.selectNodeContents(e),a.setEnd(r.startContainer,r.startOffset),o=a.toString().length,n={start:o,end:o+r.toString().length},this.doesRangeStartWithImages(r,t)&&(n.startsWithImage=!0);var s=this.getTrailingImageCount(e,n,r.endContainer,r.endOffset);if(s&&(n.trailingImageCount=s),0!==o){var l=this.getIndexRelativeToAdjacentEmptyBlocks(t,e,r.startContainer,r.startOffset);-1!==l&&(n.emptyBlocksIndex=l)}}return n},importSelection:function(e,t,n,i){if(e&&t){var o=n.createRange();o.setStart(t,0),o.collapse(!0);var r,a=t,s=[],l=0,c=!1,u=!1,d=0,h=!1,f=!1,p=null;for((i||e.startsWithImage||void 0!==e.emptyBlocksIndex)&&(f=!0);!h&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||u){if(e.trailingImageCount&&u&&("img"===a.nodeName.toLowerCase()&&d++,d===e.trailingImageCount)){for(var m=0;a.parentNode.childNodes[m]!==a;)m++;o.setEnd(a.parentNode,m+1),h=!0}if(!h&&1===a.nodeType)for(var g=a.childNodes.length-1;g>=0;)s.push(a.childNodes[g]),g-=1}else r=l+a.length,!c&&e.start>=l&&e.start<=r&&(f||e.start<r?(o.setStart(a,e.start-l),c=!0):p=a),c&&e.end>=l&&e.end<=r&&(e.trailingImageCount?u=!0:(o.setEnd(a,e.end-l),h=!0)),l=r;h||(a=s.pop())}!c&&p&&(o.setStart(p,p.length),o.setEnd(p,p.length)),void 0!==e.emptyBlocksIndex&&(o=this.importSelectionMoveCursorPastBlocks(n,t,e.emptyBlocksIndex,o)),i&&(o=this.importSelectionMoveCursorPastAnchor(e,o)),this.selectRange(n,o)}},importSelectionMoveCursorPastAnchor:function(t,n){var i=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,i)){for(var o=n.startContainer,r=n.startContainer.parentNode;null!==r&&"a"!==r.nodeName.toLowerCase();)r.childNodes[r.childNodes.length-1]!==o?r=null:(o=r,r=r.parentNode);if(null!==r&&"a"===r.nodeName.toLowerCase()){for(var a=null,s=0;null===a&&s<r.parentNode.childNodes.length;s++)r.parentNode.childNodes[s]===r&&(a=s);n.setStart(r.parentNode,a+1),n.collapse(!0)}}return n},importSelectionMoveCursorPastBlocks:function(n,i,o,r){var a,s,l=n.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,t,!1),c=r.startContainer,u=0;for(o=o||1,a=3===c.nodeType&&e.util.isBlockContainer(c.previousSibling)?c.previousSibling:e.util.getClosestBlockContainer(c);l.nextNode();)if(s){if(s=l.currentNode,++u===o)break;if(s.textContent.length>0)break}else a===l.currentNode&&(s=l.currentNode);return s||(s=a),r.setStart(e.util.getFirstSelectableLeafNode(s),0),r},getIndexRelativeToAdjacentEmptyBlocks:function(n,i,o,r){if(o.textContent.length>0&&r>0)return-1;var a=o;if(3!==a.nodeType&&(a=o.childNodes[r]),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 l=e.util.getClosestBlockContainer(o),c=n.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,t,!1),u=0;c.nextNode();){var d=""===c.currentNode.textContent;if((d||u>0)&&(u+=1),c.currentNode===l)return u;d||(u=0)}return u},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 i=t.createTreeWalker(e.startContainer,NodeFilter.SHOW_ALL,null,!1);i.nextNode();){var o=i.currentNode;if(o===n)break;if(o.nodeValue)return!1}return!0},getTrailingImageCount:function(e,t,n,i){if(0===i||1!==n.nodeType)return 0;if("img"!==n.nodeName.toLowerCase()&&!n.querySelector("img"))return 0;for(var o=n.childNodes[i-1];o.hasChildNodes();)o=o.lastChild;for(var r,a=e,s=[],l=0,c=!1,u=!1,d=!1,h=0;!d&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||u){if("img"===a.nodeName.toLowerCase()&&h++,a===o)d=!0;else if(1===a.nodeType)for(var f=a.childNodes.length-1;f>=0;)s.push(a.childNodes[f]),f-=1}else h=0,r=l+a.length,!c&&t.start>=l&&t.start<=r&&(c=!0),c&&t.end>=l&&t.end<=r&&(u=!0),l=r;d||(a=s.pop())}return h},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,i,o="",r=e.getSelection();if(r.rangeCount){for(i=e.createElement("div"),t=0,n=r.rangeCount;t<n;t+=1)i.appendChild(r.getRangeAt(t).cloneContents());o=i.innerHTML}return o},getCaretOffsets:function(e,t){var n,i;return t||(t=window.getSelection().getRangeAt(0)),n=t.cloneRange(),i=t.cloneRange(),n.selectNodeContents(e),n.setEnd(t.endContainer,t.endOffset),i.selectNodeContents(e),i.setStart(t.endContainer,t.endOffset),{left:n.toString().length,right:i.toString().length}},rangeSelectsSingleNode:function(e){var t=e.startContainer;return t===e.endContainer&&t.hasChildNodes()&&e.endOffset===e.startOffset+1},getSelectedParentElement:function(e){return e?this.rangeSelectsSingleNode(e)&&3!==e.startContainer.childNodes[e.startOffset].nodeType?e.startContainer.childNodes[e.startOffset]:3===e.startContainer.nodeType?e.startContainer.parentNode:e.startContainer:null},getSelectedElements:function(e){var t,n,i,o=e.getSelection();if(!o.rangeCount||o.isCollapsed||!o.getRangeAt(0).commonAncestorContainer)return[];if(t=o.getRangeAt(0),3===t.commonAncestorContainer.nodeType){for(n=[],i=t.commonAncestorContainer;i.parentNode&&1===i.parentNode.childNodes.length;)n.push(i.parentNode),i=i.parentNode;return n}return[].filter.call(t.commonAncestorContainer.getElementsByTagName("*"),function(e){return"function"!=typeof o.containsNode||o.containsNode(e,!0)})},selectNode:function(e,t){var n=t.createRange();n.selectNodeContents(e),this.selectRange(t,n)},select:function(e,t,n,i,o){var r=e.createRange();return r.setStart(t,n),i?r.setEnd(i,o):r.collapse(!0),this.selectRange(e,r),r},clearSelection:function(e,t){t?e.getSelection().collapseToStart():e.getSelection().collapseToEnd()},moveCursor:function(e,t,n){this.select(e,t,n)},getSelectionRange:function(e){var t=e.getSelection();return 0===t.rangeCount?null:t.getRangeAt(0)},selectRange:function(e,t){var n=e.getSelection();n.removeAllRanges(),n.addRange(t)},getSelectionStart:function(e){var t=e.getSelection().anchorNode;return t&&3===t.nodeType?t.parentNode:t}};e.selection=n}(),function(){function t(t,n){return t.some(function(t){if("function"!=typeof t.getInteractionElements)return!1;var i=t.getInteractionElements();return!!i&&(Array.isArray(i)||(i=[i]),i.some(function(t){return e.util.isDescendant(t,n,!0)}))})}var n=function(e){this.base=e,this.options=this.base.options,this.events=[],this.disabledEvents={},this.customEvents={},this.listeners={}};n.prototype={InputEventOnContenteditableSupported:!e.util.isIE&&!e.util.isEdge,attachDOMEvent:function(t,n,i,o){var r=this.base.options.contentWindow,a=this.base.options.ownerDocument;t=e.util.isElement(t)||[r,a].indexOf(t)>-1?[t]:t,Array.prototype.forEach.call(t,function(e){e.addEventListener(n,i,o),this.events.push([e,n,i,o])}.bind(this))},detachDOMEvent:function(t,n,i,o){var r,a,s=this.base.options.contentWindow,l=this.base.options.ownerDocument;null!==t&&(t=e.util.isElement(t)||[s,l].indexOf(t)>-1?[t]:t,Array.prototype.forEach.call(t,function(e){-1!==(r=this.indexOfListener(e,n,i,o))&&(a=this.events.splice(r,1)[0],a[0].removeEventListener(a[1],a[2],a[3]))}.bind(this)))},indexOfListener:function(e,t,n,i){var o,r,a;for(o=0,r=this.events.length;o<r;o+=1)if(a=this.events[o],a[0]===e&&a[1]===t&&a[2]===n&&a[3]===i)return o;return-1},detachAllDOMEvents:function(){for(var e=this.events.pop();e;)e[0].removeEventListener(e[1],e[2],e[3]),e=this.events.pop()},detachAllEventsFromElement:function(e){for(var t=this.events.filter(function(t){return t&&t[0].getAttribute&&t[0].getAttribute("medium-editor-index")===e.getAttribute("medium-editor-index")}),n=0,i=t.length;n<i;n++){var o=t[n];this.detachDOMEvent(o[0],o[1],o[2],o[3])}},attachAllEventsToElement:function(e){this.listeners.editableInput&&(this.contentCache[e.getAttribute("medium-editor-index")]=e.innerHTML),this.eventsCache&&this.eventsCache.forEach(function(t){this.attachDOMEvent(e,t.name,t.handler.bind(this))},this)},enableCustomEvent:function(e){void 0!==this.disabledEvents[e]&&delete this.disabledEvents[e]},disableCustomEvent:function(e){this.disabledEvents[e]=!0},attachCustomEvent:function(e,t){this.setupListener(e),this.customEvents[e]||(this.customEvents[e]=[]),this.customEvents[e].push(t)},detachCustomEvent:function(e,t){var n=this.indexOfCustomListener(e,t);-1!==n&&this.customEvents[e].splice(n,1)},indexOfCustomListener:function(e,t){return this.customEvents[e]&&this.customEvents[e].length?this.customEvents[e].indexOf(t):-1},detachAllCustomEvents:function(){this.customEvents={}},triggerCustomEvent:function(e,t,n){this.customEvents[e]&&!this.disabledEvents[e]&&this.customEvents[e].forEach(function(e){e(t,n)})},destroy:function(){this.detachAllDOMEvents(),this.detachAllCustomEvents(),this.detachExecCommand(),this.base.elements&&this.base.elements.forEach(function(e){e.removeAttribute("data-medium-focused")})},attachToExecCommand:function(){this.execCommandListener||(this.execCommandListener=function(e){this.handleDocumentExecCommand(e)}.bind(this),this.wrapExecCommand(),this.options.ownerDocument.execCommand.listeners.push(this.execCommandListener))},detachExecCommand:function(){var e=this.options.ownerDocument;if(this.execCommandListener&&e.execCommand.listeners){var t=e.execCommand.listeners.indexOf(this.execCommandListener);-1!==t&&e.execCommand.listeners.splice(t,1),e.execCommand.listeners.length||this.unwrapExecCommand()}},wrapExecCommand:function(){var e=this.options.ownerDocument;if(!e.execCommand.listeners){var t=function(t,n){e.execCommand.listeners&&e.execCommand.listeners.forEach(function(e){e({command:t[0],value:t[2],args:t,result:n})})},n=function(){var n=e.execCommand.orig.apply(this,arguments);if(!e.execCommand.listeners)return n;var i=Array.prototype.slice.call(arguments);return t(i,n),n};n.orig=e.execCommand,n.listeners=[],n.callListeners=t,e.execCommand=n}},unwrapExecCommand:function(){var e=this.options.ownerDocument;e.execCommand.orig&&(e.execCommand=e.execCommand.orig)},setupListener:function(e){if(!this.listeners[e]){switch(e){case"externalInteraction":this.attachDOMEvent(this.options.ownerDocument.body,"mousedown",this.handleBodyMousedown.bind(this),!0),this.attachDOMEvent(this.options.ownerDocument.body,"click",this.handleBodyClick.bind(this),!0),this.attachDOMEvent(this.options.ownerDocument.body,"focus",this.handleBodyFocus.bind(this),!0);break;case"blur":case"focus":this.setupListener("externalInteraction");break;case"editableInput":this.contentCache={},this.base.elements.forEach(function(e){this.contentCache[e.getAttribute("medium-editor-index")]=e.innerHTML},this),this.InputEventOnContenteditableSupported&&this.attachToEachElement("input",this.handleInput),this.InputEventOnContenteditableSupported||(this.setupListener("editableKeypress"),this.keypressUpdateInput=!0,this.attachDOMEvent(document,"selectionchange",this.handleDocumentSelectionChange.bind(this)),this.attachToExecCommand());break;case"editableClick":this.attachToEachElement("click",this.handleClick);break;case"editableBlur":this.attachToEachElement("blur",this.handleBlur);break;case"editableKeypress":this.attachToEachElement("keypress",this.handleKeypress);break;case"editableKeyup":this.attachToEachElement("keyup",this.handleKeyup);break;case"editableKeydown":this.attachToEachElement("keydown",this.handleKeydown);break;case"editableKeydownSpace":case"editableKeydownEnter":case"editableKeydownTab":case"editableKeydownDelete":this.setupListener("editableKeydown");break;case"editableMouseover":this.attachToEachElement("mouseover",this.handleMouseover);break;case"editableDrag":this.attachToEachElement("dragover",this.handleDragging),this.attachToEachElement("dragleave",this.handleDragging);break;case"editableDrop":this.attachToEachElement("drop",this.handleDrop);break;case"editablePaste":this.attachToEachElement("paste",this.handlePaste)}this.listeners[e]=!0}},attachToEachElement:function(e,t){this.eventsCache||(this.eventsCache=[]),this.base.elements.forEach(function(n){this.attachDOMEvent(n,e,t.bind(this))},this),this.eventsCache.push({name:e,handler:t})},cleanupElement:function(e){var t=e.getAttribute("medium-editor-index");t&&(this.detachAllEventsFromElement(e),this.contentCache&&delete this.contentCache[t])},focusElement:function(e){e.focus(),this.updateFocus(e,{target:e,type:"focus"})},updateFocus:function(n,i){var o,r=this.base.getFocusedElement();r&&"click"===i.type&&this.lastMousedownTarget&&(e.util.isDescendant(r,this.lastMousedownTarget,!0)||t(this.base.extensions,this.lastMousedownTarget))&&(o=r),o||this.base.elements.some(function(t){return!o&&e.util.isDescendant(t,n,!0)&&(o=t),!!o},this);var a=!e.util.isDescendant(r,n,!0)&&!t(this.base.extensions,n);o!==r&&(r&&a&&(r.removeAttribute("data-medium-focused"),this.triggerCustomEvent("blur",i,r)),o&&(o.setAttribute("data-medium-focused",!0),this.triggerCustomEvent("focus",i,o))),a&&this.triggerCustomEvent("externalInteraction",i)},updateInput:function(e,t){if(this.contentCache){var n=e.getAttribute("medium-editor-index"),i=e.innerHTML;i!==this.contentCache[n]&&this.triggerCustomEvent("editableInput",t,e),this.contentCache[n]=i}},handleDocumentSelectionChange:function(t){if(t.currentTarget&&t.currentTarget.activeElement){var n,i=t.currentTarget.activeElement;this.base.elements.some(function(t){return!!e.util.isDescendant(t,i,!0)&&(n=t,!0)},this),n&&this.updateInput(n,{target:i,currentTarget:n})}},handleDocumentExecCommand:function(){var e=this.base.getFocusedElement();e&&this.updateInput(e,{target:e,currentTarget:e})},handleBodyClick:function(e){this.updateFocus(e.target,e)},handleBodyFocus:function(e){this.updateFocus(e.target,e)},handleBodyMousedown:function(e){this.lastMousedownTarget=e.target},handleInput:function(e){this.updateInput(e.currentTarget,e)},handleClick:function(e){this.triggerCustomEvent("editableClick",e,e.currentTarget)},handleBlur:function(e){this.triggerCustomEvent("editableBlur",e,e.currentTarget)},handleKeypress:function(e){if(this.triggerCustomEvent("editableKeypress",e,e.currentTarget),this.keypressUpdateInput){var t={target:e.target,currentTarget:e.currentTarget};setTimeout(function(){this.updateInput(t.currentTarget,t)}.bind(this),0)}},handleKeyup:function(e){this.triggerCustomEvent("editableKeyup",e,e.currentTarget)},handleMouseover:function(e){this.triggerCustomEvent("editableMouseover",e,e.currentTarget)},handleDragging:function(e){this.triggerCustomEvent("editableDrag",e,e.currentTarget)},handleDrop:function(e){this.triggerCustomEvent("editableDrop",e,e.currentTarget)},handlePaste:function(e){this.triggerCustomEvent("editablePaste",e,e.currentTarget)},handleKeydown:function(t){return this.triggerCustomEvent("editableKeydown",t,t.currentTarget),e.util.isKey(t,e.util.keyCode.SPACE)?this.triggerCustomEvent("editableKeydownSpace",t,t.currentTarget):e.util.isKey(t,e.util.keyCode.ENTER)||t.ctrlKey&&e.util.isKey(t,e.util.keyCode.M)?this.triggerCustomEvent("editableKeydownEnter",t,t.currentTarget):e.util.isKey(t,e.util.keyCode.TAB)?this.triggerCustomEvent("editableKeydownTab",t,t.currentTarget):e.util.isKey(t,[e.util.keyCode.DELETE,e.util.keyCode.BACKSPACE])?this.triggerCustomEvent("editableKeydownDelete",t,t.currentTarget):void 0}},e.Events=n}(),function(){var t=e.Extension.extend({action:void 0,aria:void 0,tagNames:void 0,style:void 0,useQueryState:void 0,contentDefault:void 0,contentFA:void 0,classList:void 0,attrs:void 0,constructor:function(n){t.isBuiltInButton(n)?e.Extension.call(this,this.defaults[n]):e.Extension.call(this,n)},init:function(){e.Extension.prototype.init.apply(this,arguments),this.button=this.createButton(),this.on(this.button,"click",this.handleClick.bind(this))},getButton:function(){return this.button},getAction:function(){return"function"==typeof this.action?this.action(this.base.options):this.action},getAria:function(){return"function"==typeof this.aria?this.aria(this.base.options):this.aria},getTagNames:function(){return"function"==typeof this.tagNames?this.tagNames(this.base.options):this.tagNames},createButton:function(){var e=this.document.createElement("button"),t=this.contentDefault,n=this.getAria(),i=this.getEditorOption("buttonLabels");return e.classList.add("medium-editor-action"),e.classList.add("medium-editor-action-"+this.name),this.classList&&this.classList.forEach(function(t){e.classList.add(t)}),e.setAttribute("data-action",this.getAction()),n&&(e.setAttribute("title",n),e.setAttribute("aria-label",n)),this.attrs&&Object.keys(this.attrs).forEach(function(t){e.setAttribute(t,this.attrs[t])},this),"fontawesome"===i&&this.contentFA&&(t=this.contentFA),e.innerHTML=t,e},handleClick:function(e){e.preventDefault(),e.stopPropagation();var t=this.getAction();t&&this.execAction(t)},isActive:function(){return this.button.classList.contains(this.getEditorOption("activeButtonClass"))},setInactive:function(){this.button.classList.remove(this.getEditorOption("activeButtonClass")),delete this.knownState},setActive:function(){this.button.classList.add(this.getEditorOption("activeButtonClass")),delete this.knownState},queryCommandState:function(){var e=null;return this.useQueryState&&(e=this.base.queryCommandState(this.getAction())),e},isAlreadyApplied:function(e){var t,n,i=!1,o=this.getTagNames();return!1===this.knownState||!0===this.knownState?this.knownState:(o&&o.length>0&&(i=-1!==o.indexOf(e.nodeName.toLowerCase())),!i&&this.style&&(t=this.style.value.split("|"),n=this.window.getComputedStyle(e,null).getPropertyValue(this.style.prop),t.forEach(function(e){this.knownState||((i=-1!==n.indexOf(e))||"text-decoration"!==this.style.prop)&&(this.knownState=i)},this)),i)}});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>B</b>",contentFA:'<i class="fa fa-bold"></i>'},italic:{name:"italic",action:"italic",aria:"italic",tagNames:["i","em"],style:{prop:"font-style",value:"italic"},useQueryState:!0,contentDefault:"<b><i>I</i></b>",contentFA:'<i class="fa fa-italic"></i>'},underline:{name:"underline",action:"underline",aria:"underline",tagNames:["u"],style:{prop:"text-decoration",value:"underline"},useQueryState:!0,contentDefault:"<b><u>U</u></b>",contentFA:'<i class="fa fa-underline"></i>'},strikethrough:{name:"strikethrough",action:"strikethrough",aria:"strike through",tagNames:["strike"],style:{prop:"text-decoration",value:"line-through"},useQueryState:!0,contentDefault:"<s>A</s>",contentFA:'<i class="fa fa-strikethrough"></i>'},superscript:{name:"superscript",action:"superscript",aria:"superscript",tagNames:["sup"],contentDefault:"<b>x<sup>1</sup></b>",contentFA:'<i class="fa fa-superscript"></i>'},subscript:{name:"subscript",action:"subscript",aria:"subscript",tagNames:["sub"],contentDefault:"<b>x<sub>1</sub></b>",contentFA:'<i class="fa fa-subscript"></i>'},image:{name:"image",action:"image",aria:"image",tagNames:["img"],contentDefault:"<b>image</b>",contentFA:'<i class="fa fa-picture-o"></i>'},html:{name:"html",action:"html",aria:"evaluate html",tagNames:["iframe","object"],contentDefault:"<b>html</b>",contentFA:'<i class="fa fa-code"></i>'},orderedlist:{name:"orderedlist",action:"insertorderedlist",aria:"ordered list",tagNames:["ol"],useQueryState:!0,contentDefault:"<b>1.</b>",contentFA:'<i class="fa fa-list-ol"></i>'},unorderedlist:{name:"unorderedlist",action:"insertunorderedlist",aria:"unordered list",tagNames:["ul"],useQueryState:!0,contentDefault:"<b>&bull;</b>",contentFA:'<i class="fa fa-list-ul"></i>'},indent:{name:"indent",action:"indent",aria:"indent",tagNames:[],contentDefault:"<b>&rarr;</b>",contentFA:'<i class="fa fa-indent"></i>'},outdent:{name:"outdent",action:"outdent",aria:"outdent",tagNames:[],contentDefault:"<b>&larr;</b>",contentFA:'<i class="fa fa-outdent"></i>'},justifyCenter:{name:"justifyCenter",action:"justifyCenter",aria:"center justify",tagNames:[],style:{prop:"text-align",value:"center"},contentDefault:"<b>C</b>",contentFA:'<i class="fa fa-align-center"></i>'},justifyFull:{name:"justifyFull",action:"justifyFull",aria:"full justify",tagNames:[],style:{prop:"text-align",value:"justify"},contentDefault:"<b>J</b>",contentFA:'<i class="fa fa-align-justify"></i>'},justifyLeft:{name:"justifyLeft",action:"justifyLeft",aria:"left justify",tagNames:[],style:{prop:"text-align",value:"left"},contentDefault:"<b>L</b>",contentFA:'<i class="fa fa-align-left"></i>'},justifyRight:{name:"justifyRight",action:"justifyRight",aria:"right justify",tagNames:[],style:{prop:"text-align",value:"right"},contentDefault:"<b>R</b>",contentFA:'<i class="fa fa-align-right"></i>'},removeFormat:{name:"removeFormat",aria:"remove formatting",action:"removeFormat",contentDefault:"<b>X</b>",contentFA:'<i class="fa fa-eraser"></i>'},quote:{name:"quote",action:"append-blockquote",aria:"blockquote",tagNames:["blockquote"],contentDefault:"<b>&ldquo;</b>",contentFA:'<i class="fa fa-quote-right"></i>'},pre:{name:"pre",action:"append-pre",aria:"preformatted text",tagNames:["pre"],contentDefault:"<b>0101</b>",contentFA:'<i class="fa fa-code fa-lg"></i>'},h1:{name:"h1",action:"append-h1",aria:"header type one",tagNames:["h1"],contentDefault:"<b>H1</b>",contentFA:'<i class="fa fa-header"><sup>1</sup>'},h2:{name:"h2",action:"append-h2",aria:"header type two",tagNames:["h2"],contentDefault:"<b>H2</b>",contentFA:'<i class="fa fa-header"><sup>2</sup>'},h3:{name:"h3",action:"append-h3",aria:"header type three",tagNames:["h3"],contentDefault:"<b>H3</b>",contentFA:'<i class="fa fa-header"><sup>3</sup>'},h4:{name:"h4",action:"append-h4",aria:"header type four",tagNames:["h4"],contentDefault:"<b>H4</b>",contentFA:'<i class="fa fa-header"><sup>4</sup>'},h5:{name:"h5",action:"append-h5",aria:"header type five",tagNames:["h5"],contentDefault:"<b>H5</b>",contentFA:'<i class="fa fa-header"><sup>5</sup>'},h6:{name:"h6",action:"append-h6",aria:"header type six",tagNames:["h6"],contentDefault:"<b>H6</b>",contentFA:'<i class="fa fa-header"><sup>6</sup>'}}}(),function(){var t=e.extensions.button.extend({init:function(){e.extensions.button.prototype.init.apply(this,arguments)},formSaveLabel:"&#10003;",formCloseLabel:"&times;",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:"<b>#</b>",contentFA:'<i class="fa fa-link"></i>',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=['<input type="text" class="medium-editor-toolbar-input" placeholder="',this.placeholderText,'">'];return e.push('<a href="#" class="medium-editor-toolbar-save">',"fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-check"></i>':this.formSaveLabel,"</a>"),e.push('<a href="#" class="medium-editor-toolbar-close">',"fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-times"></i>':this.formCloseLabel,"</a>"),this.targetCheckbox&&e.push('<div class="medium-editor-toolbar-form-row">','<input type="checkbox" class="medium-editor-toolbar-anchor-target" id="medium-editor-toolbar-anchor-target-field-'+this.getEditorId()+'">','<label for="medium-editor-toolbar-anchor-target-field-'+this.getEditorId()+'">',this.targetCheckboxText,"</label>","</div>"),this.customClassOption&&e.push('<div class="medium-editor-toolbar-form-row">','<input type="checkbox" class="medium-editor-toolbar-anchor-button">',"<label>",this.customClassOptionText,"</label>","</div>"),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(),i=this.getAnchorTargetCheckbox(),o=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(),i&&(i.checked="_blank"===t.target),o){var r=t.buttonClass?t.buttonClass.split(" "):[];o.checked=-1!==r.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],i=t[1];return n+(void 0===i?"":"="+this.ensureEncodedUriComponent(i))},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),i="",o=/^\+?\s?\(?(?:\d\s?\-?\)?){3,20}$/,r=e.match(/^(.*?)(?:\?(.*?))?(?:#(.*))?$/),a=r[1],s=r[2],l=r[3];if(o.test(e))return"tel:"+e;if(!n){var c=a.split("/")[0];(c.match(/.+(\.|:).+/)||"localhost"===c)&&(i="http://")}return i+this.ensureEncodedUri(a)+(void 0===s?"":"?"+this.ensureEncodedQuery(s))+(void 0===l?"":"#"+l)},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"),i=e.querySelector(".medium-editor-toolbar-input");this.on(e,"click",this.handleFormClick.bind(this)),this.on(i,"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'<div class="medium-editor-toolbar-anchor-preview" id="medium-editor-toolbar-anchor-preview"> <a class="medium-editor-toolbar-anchor-preview-inner"></a></div>'},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,i,o,r,a=this.window.innerWidth,s=this.anchorPreview.offsetHeight,l=e.getBoundingClientRect(),c=this.diffLeft,u=this.diffTop,d=this.getEditorOption("elementsContainer"),h=["absolute","fixed"].indexOf(window.getComputedStyle(d).getPropertyValue("position"))>-1,f={};t=this.anchorPreview.offsetWidth/2;var p=this.base.getExtensionByName("toolbar");p&&(c=p.diffLeft,u=p.diffTop),n=c-t,h?(o=d.getBoundingClientRect(),["top","left"].forEach(function(e){f[e]=l[e]-o[e]}),f.width=l.width,f.height=l.height,l=f,a=o.width,r=d.scrollTop):r=this.window.pageYOffset,i=l.left+l.width/2,r+=s+l.top+l.height-u-this.anchorPreview.offsetHeight,this.anchorPreview.style.top=Math.round(r)+"px",this.anchorPreview.style.right="initial",i<t?(this.anchorPreview.style.left=n+t+"px",this.anchorPreview.style.right="initial"):a-i<t?(this.anchorPreview.style.left="auto",this.anchorPreview.style.right=0):(this.anchorPreview.style.left=n+i+"px",this.anchorPreview.style.right="initial")},attachToEditables:function(){this.subscribe("editableMouseover",this.handleEditableMouseover.bind(this)),this.subscribe("positionedToolbar",this.handlePositionedToolbar.bind(this))},handlePositionedToolbar:function(){this.showWhenToolbarIsVisible||this.hidePreview()},handleClick:function(e){var t=this.base.getExtensionByName("anchor"),n=this.activeAnchor;t&&n&&(e.preventDefault(),this.base.selectElement(this.activeAnchor),this.base.delay(function(){if(n){var e={value:n.attributes.href.value,target:n.getAttribute("target"),buttonClass:n.getAttribute("class")};t.showForm(e),n=null}}.bind(this))),this.hidePreview()},handleAnchorMouseout:function(){this.anchorToPreview=null,this.off(this.activeAnchor,"mouseout",this.instanceHandleAnchorMouseout),this.instanceHandleAnchorMouseout=null},handleEditableMouseover:function(t){var n=e.util.getClosestTag(t.target,"a");if(!1!==n){if(!this.showOnEmptyLinks&&(!/href=["']\S+["']/.test(n.outerHTML)||/href=["']#\S+["']/.test(n.outerHTML)))return!0;var i=this.base.getExtensionByName("toolbar");if(!this.showWhenToolbarIsVisible&&i&&i.isDisplayed&&i.isDisplayed())return!0;this.activeAnchor&&this.activeAnchor!==n&&this.detachPreviewHandlers(),this.anchorToPreview=n,this.instanceHandleAnchorMouseout=this.handleAnchorMouseout.bind(this),this.on(this.anchorToPreview,"mouseout",this.instanceHandleAnchorMouseout),this.base.delay(function(){this.anchorToPreview&&this.showPreview(this.anchorToPreview)}.bind(this))}},handlePreviewMouseover:function(){this.lastOver=(new Date).getTime(),this.hovering=!0},handlePreviewMouseout:function(e){e.relatedTarget&&/anchor-preview/.test(e.relatedTarget.className)||(this.hovering=!1)},updatePreview:function(){if(this.hovering)return!0;(new Date).getTime()-this.lastOver>this.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,i,o,r,a;n=[" ","\t","\n","\r"," "," "," "," "," ","\u2028","\u2029"],i="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",o="(((?:(https?://|ftps?://|nntp://)|www\\d{0,3}[.]|[a-z0-9.\\-]+[.]("+i+")\\/)\\S+(?:[^\\s`!\\[\\]{};:'\".,?«»“”‘’])))|(([a-z0-9\\-]+\\.)?[a-z0-9\\-]+\\.("+i+"))",r=new RegExp("^("+i+")$","i"),a=new RegExp(o,"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;t<this.window._mediumEditors.length;t++){var n=this.window._mediumEditors[t];null!==n&&void 0!==n.getExtensionByName("autoLink")&&e++}return 1===e},destroy:function(){this.document.queryCommandSupported("AutoUrlDetect")&&this.isLastInstance()&&this.document.execCommand("AutoUrlDetect",!1,!0)},onBlur:function(e,t){this.performLinking(t)},onKeypress:function(t){this.disableEventHandling||e.util.isKey(t,[e.util.keyCode.SPACE,e.util.keyCode.ENTER])&&(clearTimeout(this.performLinkingTimeout),this.performLinkingTimeout=setTimeout(function(){try{var e=this.base.exportSelection();this.performLinking(t.target)&&this.base.importSelection(e,!0)}catch(e){window.console&&window.console.error("Failed to perform linking",e),this.disableEventHandling=!0}}.bind(this),0))},performLinking:function(t){var n=e.util.splitByBlockElements(t),i=!1;0===n.length&&(n=[t]);for(var o=0;o<n.length;o++)i=this.removeObsoleteAutoLinkSpans(n[o])||i,i=this.performLinkingWithinElement(n[o])||i;return this.base.events.updateInput(t,{target:t,currentTarget:t}),i},removeObsoleteAutoLinkSpans:function(n){if(!n||3===n.nodeType)return!1;for(var i=n.querySelectorAll('span[data-auto-link="true"]'),o=!1,r=0;r<i.length;r++){var a=i[r].textContent;if(-1===a.indexOf("://")&&(a=e.util.ensureUrlHasProtocol(a)),i[r].getAttribute("data-href")!==a&&t(i[r])){o=!0;var s=a.replace(/\s+$/,"");if(i[r].getAttribute("data-href")===s){var l=a.length-s.length,c=e.util.splitOffDOMTree(i[r],this.splitTextBeforeEnd(i[r],l));i[r].parentNode.insertBefore(c,i[r].nextSibling)}else e.util.unwrap(i[r],this.document)}}return o},splitTextBeforeEnd:function(e,t){for(var n=this.document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null,!1),i=!0;i;)i=null!==n.lastChild();for(var o,r,a;t>0&&null!==a;)o=n.currentNode,r=o.nodeValue,r.length>t?(a=o.splitText(r.length-t),t=0):(a=n.previousNode(),t-=r.length);return a},performLinkingWithinElement:function(t){for(var n=this.findLinkableText(t),i=0;i<n.length;i++){var o=e.util.findOrCreateMatchingTextNodes(this.document,t,n[i]);this.shouldNotLink(o)||this.createAutoLink(o,n[i].href)}return!1},shouldNotLink:function(t){for(var n=!1,i=0;i<t.length&&!1===n;i++)n=!!e.util.traverseUp(t[i],function(e){return"a"===e.nodeName.toLowerCase()||e.getAttribute&&"true"===e.getAttribute("data-auto-link")});return n},findLinkableText:function(e){for(var t=e.textContent,i=null,o=[];null!==(i=a.exec(t));){var s=!0,l=i.index+i[0].length;s=!(0!==i.index&&-1===n.indexOf(t[i.index-1])||l!==t.length&&-1===n.indexOf(t[l])),s=s&&(-1!==i[0].indexOf("/")||r.test(i[0].split(".").pop().split("?").shift())),s&&o.push({href:i[0],start:i.index,end:l})}return o},createAutoLink:function(t,n){n=e.util.ensureUrlHasProtocol(n);var i=e.util.createLink(this.document,t,n,this.getEditorOption("targetBlank")?"_blank":null),o=this.document.createElement("span");for(o.setAttribute("data-auto-link","true"),o.setAttribute("data-href",n),i.insertBefore(o,i.firstChild);i.childNodes.length>1;)o.appendChild(i.childNodes[1])}});e.extensions.autoLink=s}(),function(){function t(t){var i=e.util.getContainerEditorElement(t);Array.prototype.slice.call(i.parentElement.querySelectorAll("."+n)).forEach(function(e){e.classList.remove(n)})}var n="medium-editor-dragover",i=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 i=e.target.classList?e.target:e.target.parentElement;t(i),"dragover"===e.type&&i.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=i}(),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 i=e.util.isMetaCtrlKey(t),o=!!t.shiftKey,r=!!t.altKey;this.keys[n].forEach(function(e){e.meta!==i||e.shift!==o||e.alt!==r&&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:"&#xB1;",contentFA:'<i class="fa fa-font"></i>',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"),i=t.createElement("select"),o=t.createElement("a"),r=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<this.fonts.length;a++)e=t.createElement("option"),e.innerHTML=this.fonts[a],e.value=this.fonts[a],i.appendChild(e);return i.className="medium-editor-toolbar-select",n.appendChild(i),this.on(i,"change",this.handleFontChange.bind(this)),r.setAttribute("href","#"),r.className="medium-editor-toobar-save",r.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-check"></i>':"&#10003;",n.appendChild(r),this.on(r,"click",this.handleSaveClick.bind(this),!0),o.setAttribute("href","#"),o.className="medium-editor-toobar-close",o.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-times"></i>':"&times;",n.appendChild(o),this.on(o,"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:"&#xB1;",contentFA:'<i class="fa fa-text-height"></i>',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"),i=e.createElement("a"),o=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)),o.setAttribute("href","#"),o.className="medium-editor-toobar-save",o.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'<i class="fa fa-check"></i>':"&#10003;",t.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")?'<i class="fa fa-times"></i>':"&times;",t.appendChild(i),this.on(i,"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]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g),""],[new RegExp(/<!--StartFragment-->|<!--EndFragment-->/g),""],[new RegExp(/<br>$/i),""],[new RegExp(/<[^>]*docs-internal-guid[^>]*>/gi),""],[new RegExp(/<\/b>(<br[^>]*>)?$/gi),""],[new RegExp(/<span class="Apple-converted-space">\s+<\/span>/g)," "],[new RegExp(/<br class="Apple-interchange-newline">/g),"<br>"],[new RegExp(/<span[^>]*(font-style:italic;font-weight:(bold|700)|font-weight:(bold|700);font-style:italic)[^>]*>/gi),'<span class="replace-with italic bold">'],[new RegExp(/<span[^>]*font-style:italic[^>]*>/gi),'<span class="replace-with italic">'],[new RegExp(/<span[^>]*font-weight:(bold|700)[^>]*>/gi),'<span class="replace-with bold">'],[new RegExp(/&lt;(\/?)(i|b|a)&gt;/gi),"<$1$2>"],[new RegExp(/&lt;a(?:(?!href).)+href=(?:&quot;|&rdquo;|&ldquo;|"|“|”)(((?!&quot;|&rdquo;|&ldquo;|"|“|”).)*)(?:&quot;|&rdquo;|&ldquo;|"|“|”)(?:(?!&gt;).)*&gt;/gi),'<a href="$1">'],[new RegExp(/<\/p>\n+/gi),"</p>"],[new RegExp(/\n+<p/gi),"<p"],[new RegExp(/<\/?o:[a-z]*>/gi),""],[new RegExp(/<!\[if !supportLists\]>(((?!<!).)*)<!\[endif]\>/gi),"$1"]]}function n(e,t,n){var i=e.clipboardData||t.clipboardData||n.dataTransfer,o={};if(!i)return o;if(i.getData){var r=i.getData("Text");r&&r.length>0&&(o["text/plain"]=r)}if(i.types)for(var a=0;a<i.types.length;a++){var s=i.types[a];o[s]=i.getData(s)}return o}var i=null,o=null,r=function(e){e.stopPropagation()},a=e.Extension.extend({forcePlainText:!0,cleanPastedHTML:!1,preCleanReplacements:[],cleanReplacements:[],cleanAttrs:["class","style","dir"],cleanTags:["meta"],unwrapTags:[],init:function(){e.Extension.prototype.init.apply(this,arguments),(this.forcePlainText||this.cleanPastedHTML)&&(this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.getEditorElements().forEach(function(e){this.on(e,"paste",this.handlePaste.bind(this))},this),this.subscribe("addElement",this.handleAddElement.bind(this)))},handleAddElement:function(e,t){this.on(t,"paste",this.handlePaste.bind(this))},destroy:function(){(this.forcePlainText||this.cleanPastedHTML)&&this.removePasteBin()},handlePaste:function(e,t){if(!e.defaultPrevented){var i=n(e,this.window,this.document),o=i["text/html"],r=i["text/plain"];this.window.clipboardData&&void 0===e.clipboardData&&!o&&(o=r),(o||r)&&(e.preventDefault(),this.doPaste(o,r,t))}},doPaste:function(t,n,i){var o,r,a="";if(this.cleanPastedHTML&&t)return this.cleanPaste(t);if(this.getEditorOption("disableReturn")||i&&i.getAttribute("data-disable-return"))a=e.util.htmlEntities(n);else if(o=n.split(/[\r\n]+/g),o.length>1)for(r=0;r<o.length;r+=1)""!==o[r]&&(a+="<p>"+e.util.htmlEntities(o[r])+"</p>");else a=e.util.htmlEntities(o[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),i=t["text/html"],r=t["text/plain"],a=o;if(!this.cleanPastedHTML||i)return e.preventDefault(),this.removePasteBin(),this.doPaste(i,r,a),void this.trigger("editablePaste",{currentTarget:a,target:a},a);setTimeout(function(){this.cleanPastedHTML&&(i=this.getPasteBinHtml()),this.removePasteBin(),this.doPaste(i,r,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;o=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),i=a;var l=this.document.createElement("div");l.id=this.pasteBinId="medium-editor-pastebin-"+ +Date.now(),l.setAttribute("style","border: 1px red solid; position: absolute; top: "+s+"px; width: 10px; height: 10px; overflow: hidden; opacity: 0"),l.setAttribute("contentEditable",!0),l.innerHTML="%ME_PASTEBIN%",this.document.body.appendChild(l),this.on(l,"focus",r),this.on(l,"focusin",r),this.on(l,"focusout",r),l.focus(),e.selection.selectNode(l,this.document),this.boundHandlePaste||(this.boundHandlePaste=this.handlePasteBinPaste.bind(this)),this.on(l,"paste",this.boundHandlePaste)},removePasteBin:function(){null!==i&&(e.selection.selectRange(this.document,i),i=null),null!==o&&(o=null);var t=this.getPasteBin();t&&t&&(this.off(t,"focus",r),this.off(t,"focusin",r),this.off(t,"focusout",r),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,i,o,r,a=/<p|<br|<div/.test(e),s=[].concat(this.preCleanReplacements||[],t(),this.cleanReplacements||[]);for(n=0;n<s.length;n+=1)e=e.replace(s[n][0],s[n][1]);if(!a)return this.pasteHTML(e);for(o=this.document.createElement("div"),o.innerHTML="<p>"+e.split("<br><br>").join("</p><p>")+"</p>",i=o.querySelectorAll("a,p,div,br"),n=0;n<i.length;n+=1)switch(r=i[n],r.innerHTML=r.innerHTML.replace(/\n/gi," "),r.nodeName.toLowerCase()){case"p":case"div":this.filterCommonBlocks(r);break;case"br":this.filterLineBreak(r)}this.pasteHTML(o.innerHTML)},pasteHTML:function(t,n){n=e.util.defaults({},n,{cleanAttrs:this.cleanAttrs,cleanTags:this.cleanTags,unwrapTags:this.unwrapTags});var i,o,r,a,s=this.document.createDocumentFragment();for(s.appendChild(this.document.createElement("body")),a=s.querySelector("body"),a.innerHTML=t,this.cleanupSpans(a),i=a.querySelectorAll("*"),r=0;r<i.length;r+=1)o=i[r],"a"===o.nodeName.toLowerCase()&&this.getEditorOption("targetBlank")&&e.util.setTargetBlank(o),e.util.cleanupAttrs(o,n.cleanAttrs),e.util.cleanupTags(o,n.cleanTags),e.util.unwrapTags(o,n.unwrapTags);e.util.insertHTMLCommand(this.document,a.innerHTML.replace(/&nbsp;/g," "))},isCommonBlock:function(e){return e&&("p"===e.nodeName.toLowerCase()||"div"===e.nodeName.toLowerCase())},filterCommonBlocks:function(e){/^\s*$/.test(e.textContent)&&e.parentNode&&e.parentNode.removeChild(e)},filterLineBreak:function(e){this.isCommonBlock(e.previousElementSibling)?this.removeWithParent(e):!this.isCommonBlock(e.parentNode)||e.parentNode.firstChild!==e&&e.parentNode.lastChild!==e?e.parentNode&&1===e.parentNode.childElementCount&&""===e.parentNode.textContent&&this.removeWithParent(e):this.removeWithParent(e)},removeWithParent:function(e){e&&e.parentNode&&(e.parentNode.parentNode&&1===e.parentNode.childElementCount?e.parentNode.parentNode.removeChild(e.parentNode):e.parentNode.removeChild(e))},cleanupSpans:function(t){var n,i,o,r=t.querySelectorAll(".replace-with"),a=function(e){return e&&"#text"!==e.nodeName&&"false"===e.getAttribute("contenteditable")};for(n=0;n<r.length;n+=1)i=r[n],o=this.document.createElement(i.classList.contains("bold")?"b":"i"),i.classList.contains("bold")&&i.classList.contains("italic")?o.innerHTML="<i>"+i.innerHTML+"</i>":o.innerHTML=i.innerHTML,i.parentNode.replaceChild(o,i);for(r=t.querySelectorAll("span"),n=0;n<r.length;n+=1){if(i=r[n],e.util.traverseUp(i,a))return!1;e.util.unwrap(i,this.document)}}});e.extensions.paste=a}(),function(){var t=e.Extension.extend({name:"placeholder",text:"Type your text",hideOnClick:!0,init:function(){e.Extension.prototype.init.apply(this,arguments),this.initPlaceholders(),this.attachEventHandlers()},initPlaceholders:function(){this.getEditorElements().forEach(this.initElement,this)},handleAddElement:function(e,t){this.initElement(t)},initElement:function(e){e.getAttribute("data-placeholder")||e.setAttribute("data-placeholder",this.text),this.updatePlaceholder(e)},destroy:function(){this.getEditorElements().forEach(this.cleanupElement,this)},handleRemoveElement:function(e,t){this.cleanupElement(t)},cleanupElement:function(e){e.getAttribute("data-placeholder")===this.text&&e.removeAttribute("data-placeholder")},showPlaceholder:function(t){t&&(e.util.isFF&&0===t.childNodes.length?(t.classList.add("medium-editor-placeholder-relative"),t.classList.remove("medium-editor-placeholder")):(t.classList.add("medium-editor-placeholder"),t.classList.remove("medium-editor-placeholder-relative")))},hidePlaceholder:function(e){e&&(e.classList.remove("medium-editor-placeholder"),e.classList.remove("medium-editor-placeholder-relative"))},updatePlaceholder:function(e,t){if(e.querySelector("img, blockquote, ul, ol, table")||""!==e.textContent.replace(/^\s+|\s+$/g,""))return this.hidePlaceholder(e);t||this.showPlaceholder(e)},attachEventHandlers:function(){this.hideOnClick&&this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableInput",this.handleInput.bind(this)),this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("addElement",this.handleAddElement.bind(this)),this.subscribe("removeElement",this.handleRemoveElement.bind(this))},handleInput:function(e,t){var n=this.hideOnClick&&t===this.base.getFocusedElement();this.updatePlaceholder(t,n)},handleFocus:function(e,t){this.hidePlaceholder(t)},handleBlur:function(e,t){this.updatePlaceholder(t)}});e.extensions.placeholder=t}(),function(){var t=e.Extension.extend({name:"toolbar",align:"center",allowMultiParagraphSelection:!0,buttons:["bold","italic","underline","anchor","h2","h3","quote"],diffLeft:0,diffTop:-10,firstButtonClass:"medium-editor-button-first",lastButtonClass:"medium-editor-button-last",standardizeSelectionStart:!1,static:!1,sticky:!1,stickyTopOffset:0,updateOnEmptySelection:!1,relativeContainer:null,init:function(){e.Extension.prototype.init.apply(this,arguments),this.initThrottledMethods(),this.relativeContainer?this.relativeContainer.appendChild(this.getToolbarElement()):this.getEditorOption("elementsContainer").appendChild(this.getToolbarElement())},forEachExtension:function(e,t){return this.base.extensions.forEach(function(n){if(n!==this)return e.apply(t||this,arguments)},this)},createToolbar:function(){var e=this.document.createElement("div");return e.id="medium-editor-toolbar-"+this.getEditorId(),e.className="medium-editor-toolbar",this.static?e.className+=" static-toolbar":this.relativeContainer?e.className+=" medium-editor-relative-toolbar":e.className+=" medium-editor-stalker-toolbar",e.appendChild(this.createToolbarButtons()),this.forEachExtension(function(t){t.hasForm&&e.appendChild(t.getForm())}),this.attachEventHandlers(),e},createToolbarButtons:function(){var t,n,i,o,r,a,s=this.document.createElement("ul");return s.id="medium-editor-toolbar-actions"+this.getEditorId(),s.className="medium-editor-toolbar-actions",s.style.display="block",this.buttons.forEach(function(i){"string"==typeof i?(r=i,a=null):(r=i.name,a=i),(o=this.base.addBuiltInExtension(r,a))&&"function"==typeof o.getButton&&(n=o.getButton(this.base),t=this.document.createElement("li"),e.util.isElement(n)?t.appendChild(n):t.innerHTML=n,s.appendChild(t))},this),i=s.querySelectorAll("button"),i.length>0&&(i[0].classList.add(this.firstButtonClass),i[i.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"),i=e.selection.getSelectionHtml(this.document).replace(t,""),o=i.match(n);return!!o&&o.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 i=e.util.findAdjacentTextNodeWithContent(e.selection.getSelectionElement(this.window),n.startContainer,this.document);if(i){for(var o=0;0===i.nodeValue.substr(o,1).trim().length;)o+=1;n=e.selection.select(this.document,i,o,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=[],i=null,o=e.selection.getSelectionRange(this.document),r=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(o&&(this.forEachExtension(function(e){if("function"==typeof e.queryCommandState&&null!==(i=e.queryCommandState()))return void(i&&"function"==typeof e.setActive&&e.setActive());n.push(e)}),t=e.selection.getSelectedParentElement(o),this.getEditorElements().some(function(n){return e.util.isDescendant(n,t,!0)})))for(;t&&(n.forEach(r),!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,i=this.window.innerWidth,o=this.getToolbarElement(),r=e.getBoundingClientRect(),a=r.top+n,s=r.left+r.width/2,l=o.offsetHeight,c=o.offsetWidth,u=c/2;switch(this.sticky?n>a+e.offsetHeight-l-this.stickyTopOffset?(o.style.top=a+e.offsetHeight-l+"px",o.classList.remove("medium-editor-sticky-toolbar")):n>a-l-this.stickyTopOffset?(o.classList.add("medium-editor-sticky-toolbar"),o.style.top=this.stickyTopOffset+"px"):(o.classList.remove("medium-editor-sticky-toolbar"),o.style.top=a-l+"px"):o.style.top=a-l+"px",this.align){case"left":t=r.left;break;case"right":t=r.right-c;break;case"center":t=s-u}t<0?t=0:t+c>i&&(t=i-Math.ceil(c)-1),o.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 i,o,r=this.window.innerWidth,a=this.getToolbarElement(),s=a.offsetHeight,l=a.offsetWidth,c=l/2,u=this.diffLeft-c,d=this.getEditorOption("elementsContainer"),h=["absolute","fixed"].indexOf(window.getComputedStyle(d).getPropertyValue("position"))>-1,f={},p={};h?(o=d.getBoundingClientRect(),["top","left"].forEach(function(e){p[e]=n[e]-o[e]}),p.width=n.width,p.height=n.height,n=p,r=o.width,f.top=d.scrollTop):f.top=this.window.pageYOffset,i=n.left+n.width/2,f.top+=n.top-s,n.top<50?(a.classList.add("medium-toolbar-arrow-over"),a.classList.remove("medium-toolbar-arrow-under"),f.top+=50+n.height-this.diffTop):(a.classList.add("medium-toolbar-arrow-under"),a.classList.remove("medium-toolbar-arrow-over"),f.top+=this.diffTop),i<c?(f.left=u+c,f.right="initial"):r-i<c?(f.left="auto",f.right=0):(f.left=u+i,f.right="initial"),["top","left","right"].forEach(function(e){a.style[e]=f[e]+(isNaN(f[e])?"":"px")})}});e.extensions.toolbar=t}(),function(){var t=e.Extension.extend({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","dragover"===e.type?e.target.classList.add("medium-editor-dragover"):"dragleave"===e.type&&e.target.classList.remove("medium-editor-dragover")},handleDrop:function(t){var n;t.preventDefault(),t.stopPropagation(),t.dataTransfer.files&&(n=Array.prototype.slice.call(t.dataTransfer.files,0),n.some(function(t){if(t.type.match("image")){var n,i;n=new FileReader,n.readAsDataURL(t),i="medium-img-"+ +new Date,e.util.insertHTMLCommand(this.document,'<img class="medium-editor-image-loading" id="'+i+'" />'),n.onload=function(){var e=this.document.getElementById(i);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),i=n.textContent,o=e.selection.getCaretOffsets(n);(void 0===i[o.left-1]||""===i[o.left-1].trim()||void 0!==i[o.left]&&""===i[o.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 i=e.selection.getSelectionStart(this.options.ownerDocument);(i&&""===i.textContent.trim()&&"li"!==i.nodeName.toLowerCase()||i.previousElementSibling&&"br"!==i.previousElementSibling.nodeName.toLowerCase()&&""===i.previousElementSibling.textContent.trim())&&t.preventDefault()}}function i(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 o(t){var n,i=e.selection.getSelectionStart(this.options.ownerDocument),o=i.nodeName.toLowerCase(),r=/^(\s+|<br\/?>)?$/i,a=/h\d/i;e.util.isKey(t,[e.util.keyCode.BACKSPACE,e.util.keyCode.ENTER])&&i.previousElementSibling&&a.test(o)&&0===e.selection.getCaretOffsets(i).left?e.util.isKey(t,e.util.keyCode.BACKSPACE)&&r.test(i.previousElementSibling.innerHTML)?(i.previousElementSibling.parentNode.removeChild(i.previousElementSibling),t.preventDefault()):!this.options.disableDoubleReturn&&e.util.isKey(t,e.util.keyCode.ENTER)&&(n=this.options.ownerDocument.createElement("p"),n.innerHTML="<br>",i.previousElementSibling.parentNode.insertBefore(n,i),t.preventDefault()):e.util.isKey(t,e.util.keyCode.DELETE)&&i.nextElementSibling&&i.previousElementSibling&&!a.test(o)&&r.test(i.innerHTML)&&a.test(i.nextElementSibling.nodeName.toLowerCase())?(e.selection.moveCursor(this.options.ownerDocument,i.nextElementSibling),i.previousElementSibling.parentNode.removeChild(i),t.preventDefault()):e.util.isKey(t,e.util.keyCode.BACKSPACE)&&"li"===o&&r.test(i.innerHTML)&&!i.previousElementSibling&&!i.parentElement.previousElementSibling&&i.nextElementSibling&&"li"===i.nextElementSibling.nodeName.toLowerCase()?(n=this.options.ownerDocument.createElement("p"),n.innerHTML="<br>",i.parentElement.parentElement.insertBefore(n,i.parentElement),e.selection.moveCursor(this.options.ownerDocument,n),i.parentElement.removeChild(i),t.preventDefault()):e.util.isKey(t,e.util.keyCode.BACKSPACE)&&!1!==e.util.getClosestTag(i,"blockquote")&&0===e.selection.getCaretOffsets(i).left?(t.preventDefault(),e.util.execFormatBlock(this.options.ownerDocument,"p")):e.util.isKey(t,e.util.keyCode.ENTER)&&!1!==e.util.getClosestTag(i,"blockquote")&&0===e.selection.getCaretOffsets(i).right?(n=this.options.ownerDocument.createElement("p"),n.innerHTML="<br>",i.parentElement.insertBefore(n,i.nextSibling),e.selection.moveCursor(this.options.ownerDocument,n),t.preventDefault()):e.util.isKey(t,e.util.keyCode.BACKSPACE)&&e.util.isMediumEditorElement(i.parentElement)&&!i.previousElementSibling&&i.nextElementSibling&&r.test(i.innerHTML)&&(t.preventDefault(),e.selection.moveCursor(this.options.ownerDocument,i.nextSibling),i.parentElement.removeChild(i))}function r(t){var n,i=e.selection.getSelectionStart(this.options.ownerDocument);i&&(e.util.isMediumEditorElement(i)&&0===i.children.length&&!e.util.isBlockContainer(i)&&this.options.ownerDocument.execCommand("formatBlock",!1,"p"),!e.util.isKey(t,e.util.keyCode.ENTER)||e.util.isListItem(i)||e.util.isBlockContainer(i)||(n=i.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 l(e){e._mediumEditors&&e._mediumEditors[this.id]&&(e._mediumEditors[this.id]=null)}function c(t,n,i){var o=[];if(t||(t=[]),"string"==typeof t&&(t=n.querySelectorAll(t)),e.util.isElement(t)&&(t=[t]),i)for(var r=0;r<t.length;r++){var a=t[r];!e.util.isElement(a)||a.getAttribute("data-medium-editor-element")||a.getAttribute("medium-editor-textarea-id")||o.push(a)}else o=Array.prototype.slice.apply(t);return o}function u(e){var t=e.parentNode.querySelector('textarea[medium-editor-textarea-id="'+e.getAttribute("medium-editor-textarea-id")+'"]');t&&(t.classList.remove("medium-editor-hidden"),t.removeAttribute("medium-editor-textarea-id")),e.parentNode&&e.parentNode.removeChild(e)}function d(e,t){return Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])}),e}function h(e,t,n){return e=d(e,{window:n.options.contentWindow,document:n.options.ownerDocument,base:n}),"function"==typeof e.init&&e.init(),e.name||(e.name=t),e}function f(){return!this.elements.every(function(e){return!!e.getAttribute("data-disable-toolbar")})&&!1!==this.options.toolbar}function p(){return!!f.call(this)&&!1!==this.options.anchorPreview}function m(){return!1!==this.options.placeholder}function g(){return!1!==this.options.autoLink}function v(){return!1!==this.options.imageDragging}function b(){return!1!==this.options.keyboardCommands}function y(){return!this.options.extensions.imageDragging}function x(e){for(var t=this.options.ownerDocument.createElement("div"),n=Date.now(),i="medium-editor-"+n,o=e.attributes;this.options.ownerDocument.getElementById(i);)n++,i="medium-editor-"+n;t.className=e.className,t.id=i,t.innerHTML=e.value,e.setAttribute("medium-editor-textarea-id",i);for(var r=0,a=o.length;r<a;r++)t.hasAttribute(o[r].nodeName)||t.setAttribute(o[r].nodeName,o[r].nodeValue);return e.form&&this.on(e.form,"reset",function(e){e.defaultPrevented||this.resetContent(this.options.ownerDocument.getElementById(i))}.bind(this)),e.classList.add("medium-editor-hidden"),e.parentNode.insertBefore(t,e),t}function C(t,i){if(!t.getAttribute("data-medium-editor-element")){"textarea"===t.nodeName.toLowerCase()&&(t=x.call(this,t),this.instanceHandleEditableInput||(this.instanceHandleEditableInput=a.bind(this),this.subscribe("editableInput",this.instanceHandleEditableInput))),this.options.disableEditing||t.getAttribute("data-disable-editing")||(t.setAttribute("contentEditable",!0),t.setAttribute("spellcheck",this.options.spellcheck)),this.instanceHandleEditableKeydownEnter||(t.getAttribute("data-disable-return")||t.getAttribute("data-disable-double-return"))&&(this.instanceHandleEditableKeydownEnter=n.bind(this),this.subscribe("editableKeydownEnter",this.instanceHandleEditableKeydownEnter)),this.options.disableReturn||t.getAttribute("data-disable-return")||this.on(t,"keyup",r.bind(this));var o=e.util.guid();t.setAttribute("data-medium-editor-element",!0),t.classList.add("medium-editor-element"),t.setAttribute("role","textbox"),t.setAttribute("aria-multiline",!0),t.setAttribute("data-medium-editor-editor-index",i),t.setAttribute("medium-editor-index",o),S[o]=t.innerHTML,this.events.attachAllEventsToElement(t)}return t}function E(){this.subscribe("editableKeydownTab",i.bind(this)),this.subscribe("editableKeydownDelete",o.bind(this)),this.subscribe("editableKeydownEnter",o.bind(this)),this.options.disableExtraSpaces&&this.subscribe("editableKeydownSpace",t.bind(this)),this.instanceHandleEditableKeydownEnter||(this.options.disableReturn||this.options.disableDoubleReturn)&&(this.instanceHandleEditableKeydownEnter=n.bind(this),this.subscribe("editableKeydownEnter",this.instanceHandleEditableKeydownEnter))}function w(){if(this.extensions=[],Object.keys(this.options.extensions).forEach(function(e){"toolbar"!==e&&this.options.extensions[e]&&this.extensions.push(h(this.options.extensions[e],e,this))},this),y.call(this)){var t=this.options.fileDragging;t||(t={},v.call(this)||(t.allowedTypes=[])),this.addBuiltInExtension("fileDragging",t)}var n={paste:!0,"anchor-preview":p.call(this),autoLink:g.call(this),keyboardCommands:b.call(this),placeholder:m.call(this)};Object.keys(n).forEach(function(e){n[e]&&this.addBuiltInExtension(e)},this);var i=this.options.extensions.toolbar;if(!i&&f.call(this)){var o=e.util.extend({},this.options.toolbar,{allowMultiParagraphSelection:this.options.allowMultiParagraphSelection});i=new e.extensions.toolbar(o)}i&&this.extensions.push(h(i,"toolbar",this))}function T(t,n){var i=[["allowMultiParagraphSelection","toolbar.allowMultiParagraphSelection"]];return n&&i.forEach(function(t){n.hasOwnProperty(t[0])&&void 0!==n[t[0]]&&e.util.deprecated(t[0],t[1],"v6.0.0")}),e.util.defaults({},n,t)}function k(t,n){var i,o,r=/^append-(.+)$/gi,a=/justify([A-Za-z]*)$/g;if(i=r.exec(t))return e.util.execFormatBlock(this.options.ownerDocument,i[1]);if("fontSize"===t)return n.size&&e.util.deprecated(".size option for fontSize command",".value","6.0.0"),o=n.value||n.size,this.options.ownerDocument.execCommand("fontSize",!1,o);if("fontName"===t)return n.name&&e.util.deprecated(".name option for fontName command",".value","6.0.0"),o=n.value||n.name,this.options.ownerDocument.execCommand("fontName",!1,o);if("createLink"===t)return this.createLink(n);if("image"===t){var s=this.options.contentWindow.getSelection().toString().trim();return this.options.ownerDocument.execCommand("insertImage",!1,s)}if("html"===t){var l=this.options.contentWindow.getSelection().toString().trim();return e.util.insertHTMLCommand(this.options.ownerDocument,l)}if(a.exec(t)){var c=this.options.ownerDocument.execCommand(t,!1,null),u=e.selection.getSelectedParentElement(e.selection.getSelectionRange(this.options.ownerDocument));return u&&N.call(this,e.util.getTopBlockContainer(u)),c}return o=n&&n.value,this.options.ownerDocument.execCommand(t,!1,o)}function N(t){if(t){var n,i=Array.prototype.slice.call(t.childNodes).filter(function(e){var t="div"===e.nodeName.toLowerCase();return t&&!n&&(n=e.style.textAlign),t});i.length&&(this.saveSelection(),i.forEach(function(t){if(t.style.textAlign===n){var i=t.lastChild;if(i){e.util.unwrap(t,this.options.ownerDocument);var o=this.options.ownerDocument.createElement("BR");i.parentNode.insertBefore(o,i.nextSibling)}}},this),t.style.textAlign=n,this.restoreSelection())}}var S={};e.prototype={init:function(e,t){return this.options=T.call(this,this.defaults,t),this.origElements=e,this.options.elementsContainer||(this.options.elementsContainer=this.options.ownerDocument.body),this.setup()},setup:function(){this.isActive||(s.call(this,this.options.contentWindow),this.events=new e.Events(this),this.elements=[],this.addElements(this.origElements),0!==this.elements.length&&(this.isActive=!0,w.call(this),E.call(this)))},destroy:function(){this.isActive&&(this.isActive=!1,this.extensions.forEach(function(e){"function"==typeof e.destroy&&e.destroy()},this),this.events.destroy(),this.elements.forEach(function(e){this.options.spellcheck&&(e.innerHTML=e.innerHTML),e.removeAttribute("contentEditable"),e.removeAttribute("spellcheck"),e.removeAttribute("data-medium-editor-element"),e.classList.remove("medium-editor-element"),e.removeAttribute("role"),e.removeAttribute("aria-multiline"),e.removeAttribute("medium-editor-index"),e.removeAttribute("data-medium-editor-editor-index"),e.getAttribute("medium-editor-textarea-id")&&u(e)},this),this.elements=[],this.instanceHandleEditableKeydownEnter=null,this.instanceHandleEditableInput=null,l.call(this,this.options.contentWindow))},on:function(e,t,n,i){return this.events.attachDOMEvent(e,t,n,i),this},off:function(e,t,n,i){return this.events.detachDOMEvent(e,t,n,i),this},subscribe:function(e,t){return this.events.attachCustomEvent(e,t),this},unsubscribe:function(e,t){return this.events.detachCustomEvent(e,t),this},trigger:function(e,t,n){return this.events.triggerCustomEvent(e,t,n),this},delay:function(e){var t=this;return setTimeout(function(){t.isActive&&e()},this.options.delay)},serialize:function(){var e,t,n={},i=this.elements.length;for(e=0;e<i;e+=1)t=""!==this.elements[e].id?this.elements[e].id:"element-"+e,n[t]={value:this.elements[e].innerHTML.trim()};return n},getExtensionByName:function(e){var t;return this.extensions&&this.extensions.length&&this.extensions.some(function(n){return n.name===e&&(t=n,!0)}),t},addBuiltInExtension:function(t,n){var i,o=this.getExtensionByName(t);if(o)return o;switch(t){case"anchor":i=e.util.extend({},this.options.anchor,n),o=new e.extensions.anchor(i);break;case"anchor-preview":o=new e.extensions.anchorPreview(this.options.anchorPreview);break;case"autoLink":o=new e.extensions.autoLink;break;case"fileDragging":o=new e.extensions.fileDragging(n);break;case"fontname":o=new e.extensions.fontName(this.options.fontName);break;case"fontsize":o=new e.extensions.fontSize(n);break;case"keyboardCommands":o=new e.extensions.keyboardCommands(this.options.keyboardCommands);break;case"paste":o=new e.extensions.paste(this.options.paste);break;case"placeholder":o=new e.extensions.placeholder(this.options.placeholder);break;default:e.extensions.button.isBuiltInButton(t)&&(n?(i=e.util.defaults({},n,e.extensions.button.prototype.defaults[t]),o=new e.extensions.button(i)):o=new e.extensions.button(t))}return o&&this.extensions.push(h(o,t,this)),o},stopSelectionUpdates:function(){this.preventSelectionUpdates=!0},startSelectionUpdates:function(){this.preventSelectionUpdates=!1},checkSelection:function(){var e=this.getExtensionByName("toolbar");return e&&e.checkState(),this},queryCommandState:function(e){var t,n=/^full-(.+)$/gi,i=null;(t=n.exec(e))&&(e=t[1]);try{i=this.options.ownerDocument.queryCommandState(e)}catch(e){i=null}return i},execAction:function(t,n){var i,o,r=/^full-(.+)$/gi;return i=r.exec(t),i?(this.saveSelection(),this.selectAllContents(),o=k.call(this,i[1],n),this.restoreSelection()):o=k.call(this,t,n),"insertunorderedlist"!==t&&"insertorderedlist"!==t||e.util.cleanListDOM(this.options.ownerDocument,this.getSelectedParentElement()),this.checkSelection(),o},getSelectedParentElement:function(t){return void 0===t&&(t=this.options.contentWindow.getSelection().getRangeAt(0)),e.selection.getSelectedParentElement(t)},selectAllContents:function(){var t=e.selection.getSelectionElement(this.options.contentWindow);if(t){for(;1===t.children.length;)t=t.children[0];this.selectElement(t)}},selectElement:function(t){e.selection.selectNode(t,this.options.ownerDocument);var n=e.selection.getSelectionElement(this.options.contentWindow);n&&this.events.focusElement(n)},getFocusedElement:function(){var e;return this.elements.some(function(t){return!e&&t.getAttribute("data-medium-focused")&&(e=t),!!e},this),e},exportSelection:function(){var t=e.selection.getSelectionElement(this.options.contentWindow),n=this.elements.indexOf(t),i=null;return n>=0&&(i=e.selection.exportSelection(t,this.options.ownerDocument)),null!==i&&0!==n&&(i.editableElementIndex=n),i},saveSelection:function(){this.selectionState=this.exportSelection()},importSelection:function(t,n){if(t){var i=this.elements[t.editableElementIndex||0];e.selection.importSelection(t,i,this.options.ownerDocument,n)}},restoreSelection:function(){this.importSelection(this.selectionState)},createLink:function(t){var n,i=e.selection.getSelectionElement(this.options.contentWindow),o={};if(-1!==this.elements.indexOf(i)){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 r=this.options.contentWindow.getSelection();if(r){var a,s,l,c,u=r.getRangeAt(0),d=u.commonAncestorContainer;if(3===u.endContainer.nodeType&&3!==u.startContainer.nodeType&&0===u.startOffset&&u.startContainer.firstChild===u.endContainer&&(d=u.endContainer),s=e.util.getClosestBlockContainer(u.startContainer),l=e.util.getClosestBlockContainer(u.endContainer),3!==d.nodeType&&0!==d.textContent.length&&s===l){var h=s||i,f=this.options.ownerDocument.createDocumentFragment();this.execAction("unlink"),a=this.exportSelection(),f.appendChild(h.cloneNode(!0)),i===h?e.selection.select(this.options.ownerDocument,h.firstChild,0,h.lastChild,3===h.lastChild.nodeType?h.lastChild.nodeValue.length:h.lastChild.childNodes.length):e.selection.select(this.options.ownerDocument,h,0,h,h.childNodes.length);var p=this.exportSelection();c=e.util.findOrCreateMatchingTextNodes(this.options.ownerDocument,f,{start:a.start-p.start,end:a.end-p.start,editableElementIndex:a.editableElementIndex}),0===c.length&&(f=this.options.ownerDocument.createDocumentFragment(),f.appendChild(d.cloneNode(!0)),c=[f.firstChild.firstChild,f.firstChild.lastChild]),e.util.createLink(this.options.ownerDocument,c,n.trim());var m=(f.firstChild.innerHTML.match(/^\s+/)||[""])[0].length;e.util.insertHTMLCommand(this.options.ownerDocument,f.firstChild.innerHTML.replace(/^\s+/,"")),a.start-=m,a.end-=m,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){o=this.options.ownerDocument.createEvent("HTMLEvents"),o.initEvent("input",!0,!0,this.options.contentWindow);for(var g=0,v=this.elements.length;g<v;g+=1)this.elements[g].dispatchEvent(o)}}finally{this.events.enableCustomEvent("editableInput")}this.events.triggerCustomEvent("editableInput",o,i)}},cleanPaste:function(e){this.getExtensionByName("paste").cleanPaste(e)},pasteHTML:function(e,t){this.getExtensionByName("paste").pasteHTML(e,t)},setContent:function(e,t){if(t=t||0,this.elements[t]){var n=this.elements[t];n.innerHTML=e,this.checkContentChanged(n)}},getContent:function(e){return e=e||0,this.elements[e]?this.elements[e].innerHTML.trim():null},checkContentChanged:function(t){t=t||e.selection.getSelectionElement(this.options.contentWindow),this.events.updateInput(t,{target:t,currentTarget:t})},resetContent:function(e){if(e){var t=this.elements.indexOf(e);return void(-1!==t&&this.setContent(S[e.getAttribute("medium-editor-index")],t))}this.elements.forEach(function(e,t){this.setContent(S[e.getAttribute("medium-editor-index")],t)},this)},addElements:function(e){var t=c(e,this.options.ownerDocument,!0);if(0===t.length)return!1;t.forEach(function(e){e=C.call(this,e,this.id),this.elements.push(e),this.trigger("addElement",{target:e,currentTarget:e},e)},this)},removeElements:function(e){var t=c(e,this.options.ownerDocument),n=t.map(function(e){return e.getAttribute("medium-editor-textarea-id")&&e.parentNode?e.parentNode.querySelector('div[medium-editor-textarea-id="'+e.getAttribute("medium-editor-textarea-id")+'"]'):e});this.elements=this.elements.filter(function(e){return-1===n.indexOf(e)||(this.events.cleanupElement(e),e.getAttribute("medium-editor-textarea-id")&&u(e),this.trigger("removeElement",{target:e,currentTarget:e},e),!1)},this)}},e.getEditorFromElement=function(e){var t=e.getAttribute("data-medium-editor-editor-index"),n=e&&e.ownerDocument&&(e.ownerDocument.defaultView||e.ownerDocument.parentWindow);return n&&n._mediumEditors&&n._mediumEditors[t]?n._mediumEditors[t]:null}}(),function(){e.prototype.defaults={activeButtonClass:"medium-editor-button-active",buttonLabels:!1,delay:0,disableReturn:!1,disableDoubleReturn:!1,disableExtraSpaces:!1,disableEditing:!1,autoLink:!1,elementsContainer:!1,contentWindow:window,ownerDocument:document,targetBlank:!1,extensions:{},spellcheck:!0}}(),e.parseVersionString=function(e){var t=e.split("-"),n=t[0].split("."),i=t.length>1?t[1]:"";return{major:parseInt(n[0],10),minor:parseInt(n[1],10),revision:parseInt(n[2],10),preRelease:i,toString:function(){return[n[0],n[1],n[2]].join(".")+(i?"-"+i:"")}}},e.version=e.parseVersionString.call(this,{version:"5.23.2"}.version),e}())}).call(t,n(54))},627:function(e,t,n){"use strict";function i(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=o(),i=window.getSelection(),r=i.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,r)),n=e.start+n+e.end):(void 0!=e.action&&(n=e.action(n,!1,r)),n=String(n).split(e.start).join(""),n=String(n).split(e.end).join(""));var a,s;if(i.getRangeAt&&i.rangeCount){if(a=window.getSelection().getRangeAt(0),a.deleteContents(),a.createContextualFragment)s=a.createContextualFragment(n);else{var l=document.createElement("div");for(l.innerHTML=n,s=document.createDocumentFragment();child=l.firstChild;)s.appendChild(child)}var c=s.firstChild,u=s.lastChild;a.insertNode(s),c&&(a.setStartBefore(c),a.setEndAfter(u)),i.removeAllRanges(),i.addRange(a)}t.base.checkContentChanged()}}function o(){var e,t="";if(void 0!==window.getSelection){if(e=window.getSelection(),e.rangeCount){for(var n=document.createElement("div"),i=0,o=e.rangeCount;i<o;++i)n.appendChild(e.getRangeAt(i).cloneContents());t=n.innerHTML}}else void 0!==document.selection&&"Text"==document.selection.type&&(t=document.selection.createRange().htmlText);return t}i.prototype.getButton=function(){return this.button},i.prototype.checkState=function(e){var t=o();""!=this.options.start&&t.indexOf(this.options.start)>-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=i),t.MediumButton=i},628:function(e,t,n){"use strict";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<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t){var n=t.controller;i(this,e),this._controller=n}return o(e,null,[{key:"canEdit",value:function(e){return"reference"===e.type}}]),o(e,[{key:"onClick",value:function(){var e=this;Scrivito.openContentBrowser({selection:this._currentSelection(),selectionMode:"single"}).then(function(t){return e._saveContentBrowserSelection(t)})}},{key:"_currentSelection",value:function(){return this._controller.content?[this._controller.content.id()]:[]}},{key:"_saveContentBrowserSelection",value:function(e){this._controller.content=e[0]||null}}]),e}();t.default=r},629:function(e,t,n){"use strict";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")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(380),s=i(a),l=n(381),c=i(l),u=n(630),d=i(u),h=function(){function e(t){var n=t.attributeInfo,i=t.controller;o(this,e),this.attributeInfo=n,this.controller=i}return r(e,null,[{key:"canEdit",value:function(e){return"string"===e.type}}]),r(e,[{key:"editorWillBeActivated",value:function(){this.controller.setDomMode("Replace")}},{key:"editorDomWasMounted",value:function(e){(0,c.default)(e);var t=new s.default(e,this.controller);t.edQuery(e).text(this.controller.content),(0,d.default)(t)}}]),e}();t.default=h},630:function(e,t){var n,i,o,r,a,s,l,c,u,d,h,f,p,m,g;p=function(e,t){var n;switch(n=t.jQueryElement(),e.keyCode||e.which){case 13:if(!c(n))return e.preventDefault(),n.blur();break;case 27:return e.stopPropagation(),n.blur()}},f=function(e){return g(e)},h=function(e){return m(e.jQueryElement())},d=function(e){return s(e.jQueryElement())},u=function(e){return g(e).done(function(){return e.trigger("scrivito_editors:blur")}),a(e),m(e.jQueryElement())},g=function(e){var t;return t=l(e.jQueryElement()),e.save(t).done(function(){return e.trigger("scrivito_editors:save")})},l=function(e){return o(e),e[0].innerText.replace(/\r\n/g,"\n").replace(/\n+$/,"")},o=function(e){var t,n;if(n=r(e),t=n.not(e),t.length>0)return t.remove(),e.text(n.text())},r=function(e){var t,n,i;return i=e.data("scrivito_editors_siblings_before_edit"),n=e.siblings(),t=!i||n.filter(i).length<i.length,t?e.data("scrivito_editors_siblings_before_edit",n):e.siblings().addBack().not(i)},c=function(e){return!0===e.data("scrivitoEditorsMultiline")||!1!==e.data("scrivitoEditorsMultiline")&&e.css("white-space").match(/pre/)},m=function(e){var t,n;if(c(e)&&!e.data("scrivito_editors_prepared_for_editing")&&(e.data("scrivito_editors_prepared_for_editing",!0),t=e.html(),n=t.replace(/\r?\n/g,"<br />"),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])},i=function(e){var t;return t=e.jQueryElement(),t.attr("contenteditable",!0).blur(function(){return u(e)}).click(function(){return d(e)}).focus(function(){return h(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 f(e)}),m(t),t.on("click",function(e){return t.attr("contenteditable",!0),o(t),e.timeStamp-t.data("scrivito_editors_last_click")<n||e.preventDefault(),t.data("scrivito_editors_last_click",e.timeStamp)})},e.exports=i}});